{"version":3,"file":"HighlightPillNewLight.DJsTWQ1F.mjs","names":["React.useRef"],"sources":["https:/framerusercontent.com/modules/tKCG2w6DdV6sCOJyfQXk/hhBkU48vE5pNXPWnVFJV/HighlightPillNewLight.js"],"sourcesContent":["// User instruction: \"make this animated everywhere\"\n// The orange highlight pill used in the NewLight hero headings should be animated.\n// The bar wipes in from the left like a marker stroke when it scrolls into view,\n// and the label fades up just behind it.\n// Responsive: when the pill is given a Fill/Fixed width (e.g. on the Phone\n// breakpoint) the label wraps inside the pill instead of overflowing the screen.\n// Weight is capped at 800 (ExtraBold) so the pill matches the slimmer NewLight headings.\n// \"Size Override\" (sizeOverride, 0 = off) lets a breakpoint use a smaller font\n// size than the main Font setting. With defaults it renders exactly as before.\n// Phone safety: the font size is capped at 7.2vw, so on narrow screens (390px wide,\n// about 28px) long words no longer break in the middle. On desktop widths the cap is\n// far above 42px, so desktop renders exactly as before.\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";import{motion,useInView}from\"framer-motion\";import*as React from\"react\";const EASE=[.16,1,.3,1];/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight auto\n */export default function HighlightPillNewLight(props){const{label,font,textColor,background,radius,padX,padY,duration,delay,replay,sizeOverride,style}=props;const isStatic=useIsStaticRenderer();const ref=React.useRef(null);const inView=useInView(ref,{once:!replay,amount:.4});const play=isStatic?true:inView;// Heading scale: pills follow the 42px hero headline at most\nconst baseSize=parseFloat(String(font.fontSize))||42;const rawSize=sizeOverride&&sizeOverride>0?`${sizeOverride}px`:`${Math.min(baseSize,42)}px`;const fontSize=`min(${rawSize}, 7.2vw)`;return /*#__PURE__*/_jsxs(\"span\",{ref:ref,style:{...style,position:\"relative\",display:\"inline-block\",boxSizing:\"border-box\",maxWidth:\"100%\",padding:`${padY}px ${padX}px`,isolation:\"isolate\",textAlign:\"center\"},children:[/*#__PURE__*/_jsx(motion.span,{\"aria-hidden\":true,initial:false,animate:{scaleX:play?1:0},transition:{duration,delay,ease:EASE},style:{position:\"absolute\",inset:0,background,borderRadius:radius,transformOrigin:\"left center\",zIndex:-1}}),/*#__PURE__*/_jsx(motion.span,{initial:false,animate:{opacity:play?1:0,y:play?0:6},transition:{duration:duration*.7,delay:delay+duration*.35,ease:EASE},style:{display:\"inline-block\",maxWidth:\"100%\",color:textColor,fontSize,fontFamily:`${font.fontFamily?font.fontFamily+\", \":\"\"}\"Montserrat\", sans-serif`,fontWeight:Math.min(Number(font.fontWeight)||800,800),fontStyle:font.fontStyle,lineHeight:font.lineHeight,letterSpacing:font.letterSpacing,textAlign:font.textAlign,whiteSpace:\"pre-wrap\",overflowWrap:\"anywhere\"},children:label})]});}addPropertyControls(HighlightPillNewLight,{label:{type:ControlType.String,title:\"Label\",defaultValue:\"IN DEINER TASCHE.\"},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:48,variant:\"Black\",lineHeight:\"1.05em\",letterSpacing:\"-0.02em\",textAlign:\"center\"}},sizeOverride:{type:ControlType.Number,title:\"Size Override\",defaultValue:0,min:0,max:120,step:1,unit:\"px\",description:\"0 = use Font size. Set per breakpoint for smaller screens.\"},textColor:{type:ControlType.Color,title:\"Text\",defaultValue:\"rgb(255, 255, 255)\"},background:{type:ControlType.Color,title:\"Highlight\",defaultValue:\"rgb(241, 154, 83)\"},radius:{type:ControlType.BorderRadius,title:\"Radius\",defaultValue:\"12px\"},padX:{type:ControlType.Number,title:\"Pad X\",defaultValue:18,min:0,max:80,step:1,unit:\"px\"},padY:{type:ControlType.Number,title:\"Pad Y\",defaultValue:7,min:0,max:60,step:1,unit:\"px\"},duration:{type:ControlType.Number,title:\"Duration\",defaultValue:.75,min:.1,max:3,step:.05,unit:\"s\"},delay:{type:ControlType.Number,title:\"Delay\",defaultValue:.1,min:0,max:3,step:.05,unit:\"s\"},replay:{type:ControlType.Boolean,title:\"Replay\",defaultValue:false,enabledTitle:\"Every time\",disabledTitle:\"Once\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"HighlightPillNewLight\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./HighlightPillNewLight.map"],"mappings":"iPAeG,SAAwB,EAAsB,EAAM,CAAC,GAAK,CAAC,QAAM,OAAK,YAAU,aAAW,SAAO,OAAK,OAAK,WAAS,QAAM,SAAO,eAAa,SAAO,EAAY,EAAS,EAAoB,EAAQ,EAAIA,EAAa,IAAI,EAAQ,EAAO,EAAU,EAAI,CAAC,KAAK,CAAC,EAAO,OAAO,EAAE,CAAC,EAAQ,EAAK,EAAS,GAAK,EACzS,EAAS,WAAW,OAAO,EAAK,QAAQ,CAAC,GAAG,GAAqG,EAAS,OAA7F,GAAc,EAAa,EAAE,GAAG,EAAa,IAAI,GAAG,KAAK,IAAI,EAAS,EAAE,EAAE,IAAkC,UAAU,OAAoB,EAAM,OAAO,CAAK,MAAI,MAAM,CAAC,GAAG,EAAM,SAAS,WAAW,QAAQ,eAAe,UAAU,aAAa,SAAS,OAAO,QAAQ,GAAG,EAAK,KAAK,EAAK,IAAI,UAAU,UAAU,UAAU,QAAQ,EAAE,SAAS,CAAc,EAAK,EAAO,KAAK,CAAC,cAAc,GAAK,QAAQ,GAAM,QAAQ,CAAC,OAAO,IAAQ,EAAE,WAAW,CAAC,WAAS,QAAM,KAAK,CAAI,EAAE,MAAM,CAAC,SAAS,WAAW,MAAM,EAAE,aAAW,aAAa,EAAO,gBAAgB,cAAc,OAAO,EAAE,CAAC,CAAC,EAAe,EAAK,EAAO,KAAK,CAAC,QAAQ,GAAM,QAAQ,CAAC,QAAQ,KAAS,EAAE,EAAK,EAAE,CAAC,EAAE,WAAW,CAAC,SAAS,EAAS,GAAG,MAAM,E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