{"version":3,"file":"FluidText.yoccVfVB.mjs","names":["__esmMin","init_jsx_runtime","c","p","init_framer_BEr93sCn","addPropertyControls","FluidText","props","Tag","tag","fluid","min","vw","sub","max","auto","vars","below","lhBelow","lh","maxCh","maxChBelow","CSS","from","serif","italic","weight","ls","indent","balance","tabular","text","init_FluidText","ControlType"],"sources":["https:/framerusercontent.com/modules/xkuCQn7ERtXpD4D3yPmY/zIOrh4y0CdruLzM7fLKl/FluidText.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";/**\n * Display text with a fluid size: clamp(min, vw - sub, max) from a breakpoint up, a fixed size below it.\n * Framer text styles only switch size at breakpoints, so a 1280 px window would get the 1440 size; this keeps\n * the titles proportional at every width. The text can be bound to a CMS field.\n *\n * @framerIntrinsicWidth 900\n * @framerIntrinsicHeight 120\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n */export default function FluidText(props){const{text=\"The long version of eight projects\",tag=\"h1\",serif=true,italic=true,weight=400,min=64,vw=7.22,sub=0,max=128,from=1024,below=48,lh=1,lhBelow=1,ls=-.01,color=\"#edebe6\",maxCh=0,maxChBelow=0,indent=0,balance=true,tabular=false}=props;const Tag=tag;const fluid=`clamp(${min}px, calc(${vw}vw - ${sub}px), ${max}px)`;const auto=!props.style?.width||props.style.width===\"auto\";const vars={\"--fx-b\":`${below}px`,\"--fx-f\":fluid,\"--fx-lb\":String(lhBelow),\"--fx-lf\":String(lh),\"--fx-mw\":maxCh?`${maxCh}ch`:\"none\",\"--fx-mwb\":maxChBelow?`${maxChBelow}ch`:\"none\"};return /*#__PURE__*/_jsxs(\"div\",{style:{...props.style,position:\"relative\",...auto?{width:\"max-content\",maxWidth:\"100%\"}:{}},children:[/*#__PURE__*/_jsx(\"style\",{dangerouslySetInnerHTML:{__html:CSS}}),/*#__PURE__*/_jsx(Tag,{className:\"fx\",\"data-from\":String(from),style:{...vars,fontFamily:serif?'\"Bodoni Moda Variable\", \"Bodoni Moda\", \"Bodoni 72\", Didot, serif':'\"Hanken Grotesk\", system-ui, sans-serif',fontStyle:italic?\"italic\":\"normal\",// the variable Bodoni is declared at 400, so a heavier serif asks the wght axis (no faux bold)\nfontWeight:serif?400:weight,fontVariationSettings:serif&&weight!==400?`\"wght\" ${weight}`:undefined,letterSpacing:`${ls}em`,marginLeft:indent?`${indent}em`:0,color,textWrap:balance?\"balance\":\"wrap\",fontVariantNumeric:tabular?\"lining-nums tabular-nums\":\"lining-nums\"},children:text})]});}const CSS=`\n.fx{margin:0;font-size:var(--fx-b);line-height:var(--fx-lb);max-width:var(--fx-mwb)}\n.fx[data-from=\"0\"]{font-size:var(--fx-f);line-height:var(--fx-lf);max-width:var(--fx-mw)}\n@media (min-width:768px){.fx[data-from=\"768\"]{font-size:var(--fx-f);line-height:var(--fx-lf);max-width:var(--fx-mw)}}\n@media (min-width:1024px){.fx[data-from=\"1024\"]{font-size:var(--fx-f);line-height:var(--fx-lf);max-width:var(--fx-mw)}}\n`;addPropertyControls(FluidText,{text:{type:ControlType.String,title:\"Text\",defaultValue:\"The long version of eight projects\",displayTextArea:true},tag:{type:ControlType.Enum,title:\"Tag\",options:[\"h1\",\"h2\",\"h3\",\"p\",\"span\"],defaultValue:\"h1\"},serif:{type:ControlType.Boolean,title:\"Serif\",defaultValue:true},italic:{type:ControlType.Boolean,title:\"Italic\",defaultValue:true},weight:{type:ControlType.Number,title:\"Weight\",defaultValue:400,min:100,max:900,step:100},min:{type:ControlType.Number,title:\"Min px\",defaultValue:64,min:0,max:400},vw:{type:ControlType.Number,title:\"vw\",defaultValue:7.22,min:0,max:40,step:.01},sub:{type:ControlType.Number,title:\"Minus px\",defaultValue:0,min:-200,max:200},max:{type:ControlType.Number,title:\"Max px\",defaultValue:128,min:0,max:400},from:{type:ControlType.Enum,title:\"Fluid from\",options:[0,768,1024],optionTitles:[\"Always\",\"768\",\"1024\"],defaultValue:1024},below:{type:ControlType.Number,title:\"Below px\",defaultValue:48,min:0,max:400},lh:{type:ControlType.Number,title:\"Line height\",defaultValue:1,min:.5,max:2,step:.01},lhBelow:{type:ControlType.Number,title:\"LH below\",defaultValue:1,min:.5,max:2,step:.01},ls:{type:ControlType.Number,title:\"Tracking em\",defaultValue:-.01,min:-.2,max:.2,step:.005},color:{type:ControlType.Color,title:\"Color\",defaultValue:\"#edebe6\"},maxCh:{type:ControlType.Number,title:\"Max ch\",defaultValue:0,min:0,max:60},maxChBelow:{type:ControlType.Number,title:\"Max ch below\",defaultValue:0,min:0,max:60},indent:{type:ControlType.Number,title:\"Indent em\",defaultValue:0,min:-1,max:1,step:.01},balance:{type:ControlType.Boolean,title:\"Balance\",defaultValue:true},tabular:{type:ControlType.Boolean,title:\"Tabular\",defaultValue:false}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FluidText\",\"slots\":[],\"annotations\":{\"framerIntrinsicWidth\":\"900\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerIntrinsicHeight\":\"120\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FluidText.map"],"mappings":"A,8JASG,SAAwBM,EAAU,EAAM,CAAC,GAAK,CAAC,OAAK,qCAAqC,MAAI,KAAK,QAAM,GAAK,SAAO,GAAK,SAAO,IAAI,MAAI,GAAG,KAAG,KAAK,MAAI,EAAE,MAAI,IAAI,OAAK,KAAK,QAAM,GAAG,KAAG,EAAE,UAAQ,EAAE,KAAG,KAAK,QAAM,UAAU,QAAM,EAAE,aAAW,EAAE,SAAO,EAAE,UAAQ,GAAK,UAAQ,IAAOC,EAAYC,EAAIC,EAAUC,EAAM,SAASC,EAAI,WAAWC,EAAG,OAAOC,EAAI,OAAOC,EAAI,KAAWC,EAAK,CAACR,EAAM,OAAO,OAAOA,EAAM,MAAM,QAAQ,OAAaS,EAAK,CAAC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