{"version":3,"file":"KickerTag.BZry5tmt.mjs","names":["useMemo","useRef","useState"],"sources":["https:/framerusercontent.com/modules/U4ZAsug8pNOCnrwCYAab/2j5K3JQtqtcPHjsTkKrV/KickerTag.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";import{motion,useInView}from\"framer-motion\";import{useRef,useEffect,useState,startTransition,useMemo}from\"react\";/**\n * Kicker Tag — outlined pill (transparent fill, hairline border = text color),\n * shape reveal + typewriter. The cursor blinks while typing, then fades out\n * once the label is complete. The cursor is a zero-width overlay so it never\n * affects the pill's size — the pill stays the same width from first frame\n * to last (an invisible copy of the untyped text reserves the full measure).\n * @framerIntrinsicWidth 150\n * @framerIntrinsicHeight 28\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function KickerTag(props){const{label=\"LABEL\",textColor=\"rgb(124, 130, 221)\",background=\"transparent\",borderRadius=999,speed=55}=props;const text=useMemo(()=>(label||\"\").toUpperCase(),[label]);const ref=useRef(null);const isStatic=useIsStaticRenderer();const inView=useInView(ref,{once:true,amount:.6});const[n,setN]=useState(0);useEffect(()=>{if(isStatic){startTransition(()=>setN(text.length));return;}if(!inView)return;let i=0;const startDelay=setTimeout(()=>{const id=setInterval(()=>{i+=1;startTransition(()=>setN(i));if(i>=text.length)clearInterval(id);},speed);},380);return()=>clearTimeout(startDelay);},[inView,isStatic,text,speed]);const show=isStatic?text.length:n;const typed=text.slice(0,show);const rest=text.slice(show);const done=show>=text.length;const normalizedBackground=useMemo(()=>(background||\"\").toString().trim().toLowerCase(),[background]);const isOutlined=useMemo(()=>{if(!normalizedBackground)return true;if(normalizedBackground===\"transparent\"||normalizedBackground===\"none\")return true;if(normalizedBackground===\"#0000\"||normalizedBackground===\"#00000000\")return true;return normalizedBackground.startsWith(\"rgba(\")&&/,\\s*0(?:\\.0+)?\\s*\\)$/.test(normalizedBackground);},[normalizedBackground]);const baseFont=useMemo(()=>({fontFamily:'Roboto, Inter, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Helvetica, Arial, sans-serif',fontWeight:600,fontSize:11,letterSpacing:\"0.07em\",lineHeight:1,textTransform:\"uppercase\",color:textColor,whiteSpace:\"pre\"}),[textColor]);const cursorStyle=useMemo(()=>({...baseFont,marginLeft:2,opacity:.75,fontSize:10}),[baseFont]);return /*#__PURE__*/_jsxs(\"div\",{ref:ref,style:{position:\"relative\",display:\"inline-flex\",width:\"max-content\",// 1px breathing room so the hairline border never sits on the\n// component's clipped edge (canvas rasterization eats it there)\npadding:1,...props.style},children:[/*#__PURE__*/_jsx(\"link\",{href:\"https://fonts.googleapis.com/css2?family=Roboto:wght@500;600;700&display=swap\",rel:\"stylesheet\"}),/*#__PURE__*/_jsx(motion.div,{initial:isStatic?{scaleX:1}:{scaleX:0},animate:inView||isStatic?{scaleX:1}:{scaleX:0},transition:{duration:.4,ease:[.22,1,.36,1]},style:{position:\"absolute\",inset:1,background,borderRadius,transformOrigin:\"left center\",border:`1px solid ${textColor}`,boxShadow:isOutlined?\"none\":\"0 1px 2px rgba(0,0,0,0.18)\"}}),/*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\",padding:\"5px 16px\",display:\"inline-flex\",alignItems:\"center\"},children:[/*#__PURE__*/_jsx(\"span\",{style:baseFont,children:typed}),!isStatic&&/*#__PURE__*/_jsx(\"span\",{style:{display:\"inline-block\",width:0,overflow:\"visible\"},children:/*#__PURE__*/_jsx(motion.span,{animate:done?{opacity:0}:{opacity:[1,1,0,0]},transition:done?{delay:.6,duration:.3,ease:\"easeOut\"}:{duration:1,repeat:Infinity,ease:\"linear\",times:[0,.5,.5,1]},style:{...cursorStyle,display:\"inline-block\"},children:\"|\"})}),rest?/*#__PURE__*/_jsx(\"span\",{style:{...baseFont,opacity:0},children:rest}):null]})]});}addPropertyControls(KickerTag,{label:{type:ControlType.String,title:\"Label\",defaultValue:\"THE APPROACH\"},textColor:{type:ControlType.Color,title:\"Text\",defaultValue:\"rgb(124, 130, 221)\"},background:{type:ControlType.Color,title:\"Background\",defaultValue:\"transparent\"},borderRadius:{type:ControlType.Number,title:\"Radius\",defaultValue:999,min:0,max:999},speed:{type:ControlType.Number,title:\"Type speed (ms)\",defaultValue:55,min:10,max:200}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"KickerTag\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"auto\",\"framerIntrinsicWidth\":\"150\",\"framerSupportedLayoutWidth\":\"auto\",\"framerIntrinsicHeight\":\"28\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./KickerTag.map"],"mappings":"6QAUG,SAAwB,EAAU,EAAM,CAAC,GAAK,CAAC,QAAM,QAAQ,YAAU,qBAAqB,aAAW,cAAc,eAAa,IAAI,QAAM,IAAI,EAAY,EAAKA,OAAa,GAAO,GAAA,CAAI,YAAY,EAAE,CAAC,CAAK,CAAC,EAAQ,EAAIC,EAAO,IAAI,EAAQ,EAAS,EAAoB,EAAQ,EAAO,EAAU,EAAI,CAAC,KAAK,GAAK,OAAO,EAAE,CAAC,EAAO,CAAC,EAAE,GAAMC,EAAS,CAAC,EAAE,MAAc,CAAC,GAAG,EAAS,CAAC,MAAoB,EAAK,EAAK,MAAM,CAAC,EAAE,MAAO,CAAC,GAAG,CAAC,EAAO,OAAO,IAAI,EAAE,EAAQ,EAAW,eAAe,CAAC,IAAM,EAAG,gBAAgB,CAAC,GAAG,EAAE,MAAoB,EAAK,CAAC,CAAC,EAAK,GAAG,EAAK,QAAO,cAAc,CAAE,CAAE,EAAE,CAAK,CAAE,EAAE,GAAG,EAAE,UAAU,aAAa,CAAU,CAAE,EAAE,CAAC,EAAO,EAAS,EAAK,CAAK,CAAC,EAAE,IAAM,EAAK,EAAS,EAAK,OAAO,EAAQ,EAAM,EAAK,MAAM,EAAE,CAAI,EAAQ,EA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