{"version":3,"file":"PillTag.0fmpJcVM.mjs","names":["React.useRef","React.useMemo","p"],"sources":["https:/framerusercontent.com/modules/s2jNB2StRX0SXSXBhdnB/ws3BdmHmYqzWMMumaG6S/PillTag.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*as React from\"react\";/**\n * User wants: \"make a pill tag component where the dot is animated and it sends circular waves like a ripple effect\"\n *\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function PillTag(props){const{label,textColor,dotColor,backgroundColor,borderColor,borderWidth,radius,paddingX,paddingY,gap,textFont,dotSize,rippleEnabled,rippleCount,rippleDuration,rippleMaxScale,rippleOpacity,rippleBlur,style}=props;const isStatic=useIsStaticRenderer();const ref=React.useRef(null);const inView=useInView(ref,{margin:\"-10% 0px -10% 0px\",amount:.25});const isFixedWidth=!!style&&style.width===\"100%\";const isFixedHeight=!!style&&style.height===\"100%\";const canAnimate=rippleEnabled&&!isStatic&&inView&&rippleCount>0&&rippleDuration>0;const rippleDelayStep=React.useMemo(()=>{const c=Math.max(1,Math.round(rippleCount));return rippleDuration/c;},[rippleCount,rippleDuration]);const ripples=React.useMemo(()=>{const c=Math.max(1,Math.round(rippleCount));return new Array(c).fill(0).map((_,i)=>i);},[rippleCount]);const Dot=/*#__PURE__*/_jsxs(\"div\",{\"aria-hidden\":\"true\",style:{position:\"relative\",width:dotSize,height:dotSize,flex:\"0 0 auto\"},children:[canAnimate&&ripples.map(i=>{const delay=i*rippleDelayStep;return /*#__PURE__*/_jsx(motion.span,{style:{position:\"absolute\",inset:0,borderRadius:999,backgroundColor:dotColor,opacity:rippleOpacity,filter:rippleBlur>0?`blur(${rippleBlur}px)`:undefined,transformOrigin:\"50% 50%\",pointerEvents:\"none\"},initial:{scale:1,opacity:rippleOpacity},animate:{scale:rippleMaxScale,opacity:0},transition:{duration:rippleDuration,ease:\"easeOut\",repeat:Infinity,repeatType:\"loop\",delay}},i);}),/*#__PURE__*/_jsx(\"span\",{style:{position:\"absolute\",inset:0,borderRadius:999,backgroundColor:dotColor}})]});return /*#__PURE__*/_jsxs(\"div\",{ref:ref,style:{position:\"relative\",display:\"inline-flex\",alignItems:\"center\",justifyContent:\"center\",gap,padding:`${paddingY}px ${paddingX}px`,borderRadius:radius,backgroundColor,borderStyle:\"solid\",borderColor,borderWidth,color:textColor,userSelect:\"none\",WebkitUserSelect:\"none\",whiteSpace:\"nowrap\",...isFixedWidth?{}:{width:\"max-content\",minWidth:\"max-content\"},...isFixedHeight?{}:{height:\"max-content\"},...textFont,...style},role:\"status\",\"aria-label\":label,children:[Dot,/*#__PURE__*/_jsx(\"span\",{style:{position:\"relative\",display:\"inline-block\",width:\"max-content\",minWidth:\"max-content\"},children:label})]});}addPropertyControls(PillTag,{label:{type:ControlType.String,title:\"Label\",defaultValue:\"NEW — AGENTIC GTM FRAMEWORK\"},textFont:{type:ControlType.Font,title:\"Text Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"12px\",variant:\"Medium\",letterSpacing:\"0.22em\",lineHeight:\"1em\"}},textColor:{type:ControlType.Color,title:\"Text\",defaultValue:\"#0099FF\"},dotColor:{type:ControlType.Color,title:\"Dot\",defaultValue:\"#0099FF\"},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"rgba(0, 0, 0, 0)\"},borderColor:{type:ControlType.Color,title:\"Border\",defaultValue:\"rgba(0, 0, 0, 0)\"},borderWidth:{type:ControlType.Number,title:\"Border W\",defaultValue:0,min:0,max:8,step:1,unit:\"px\"},radius:{type:ControlType.Number,title:\"Radius\",defaultValue:999,min:0,max:999,step:1},paddingX:{type:ControlType.Number,title:\"Pad X\",defaultValue:10,min:0,max:60,step:1,unit:\"px\"},paddingY:{type:ControlType.Number,title:\"Pad Y\",defaultValue:6,min:0,max:40,step:1,unit:\"px\"},gap:{type:ControlType.Number,title:\"Gap\",defaultValue:10,min:0,max:40,step:1,unit:\"px\"},dotSize:{type:ControlType.Number,title:\"Dot Size\",defaultValue:8,min:2,max:32,step:1,unit:\"px\"},rippleEnabled:{type:ControlType.Boolean,title:\"Ripple\",defaultValue:true,enabledTitle:\"On\",disabledTitle:\"Off\"},rippleCount:{type:ControlType.Number,title:\"Ripples\",defaultValue:3,min:1,max:8,step:1,hidden:p=>!p.rippleEnabled},rippleDuration:{type:ControlType.Number,title:\"Duration\",defaultValue:1.8,min:.3,max:6,step:.1,unit:\"s\",hidden:p=>!p.rippleEnabled},rippleMaxScale:{type:ControlType.Number,title:\"Max Scale\",defaultValue:4.2,min:1.2,max:12,step:.1,hidden:p=>!p.rippleEnabled},rippleOpacity:{type:ControlType.Number,title:\"Opacity\",defaultValue:.35,min:0,max:1,step:.05,hidden:p=>!p.rippleEnabled},rippleBlur:{type:ControlType.Number,title:\"Blur\",defaultValue:0,min:0,max:12,step:1,unit:\"px\",hidden:p=>!p.rippleEnabled}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"PillTag\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"auto\",\"framerSupportedLayoutHeight\":\"auto\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./PillTag.map"],"mappings":"yPAKG,SAAwB,EAAQ,EAAM,CAAC,GAAK,CAAC,QAAM,YAAU,WAAS,kBAAgB,cAAY,cAAY,SAAO,WAAS,WAAS,MAAI,WAAS,UAAQ,gBAAc,cAAY,iBAAe,iBAAe,gBAAc,aAAW,SAAO,EAAY,EAAS,GAAqB,CAAO,EAAIA,EAAa,KAAK,CAAO,EAAO,EAAU,EAAI,CAAC,OAAO,oBAAoB,OAAO,IAAI,CAAC,CAAO,EAAa,CAAC,CAAC,GAAO,EAAM,QAAQ,OAAa,EAAc,CAAC,CAAC,GAAO,EAAM,SAAS,OAAa,EAAW,GAAe,CA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