{"version":3,"file":"USPCarousel.DenAAe2e.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/lmCUqHt0WUDByTWpNvM3/lG0g5yPJQxXdDLbxKObz/USPCarousel.js"],"sourcesContent":["// USP carousel with pulsing dot indicator that cycles through 3 unique selling points with fade transitions\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,useEffect,startTransition}from\"react\";import{addPropertyControls,ControlType}from\"framer\";import{motion,AnimatePresence}from\"framer-motion\";/**\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function USPCarousel(props){const{usps=[{text:\"Choose from 500 fabrics and options\"},{text:\"Free shipping on all orders\"},{text:\"30-day money-back guarantee\"}],dotColor=\"#000000\",textColor=\"#000000\",font,interval=3e3,padding=8}=props;const[currentIndex,setCurrentIndex]=useState(0);useEffect(()=>{if(typeof window===\"undefined\")return;const timer=setInterval(()=>{startTransition(()=>{setCurrentIndex(prev=>(prev+1)%usps.length);});},interval);return()=>clearInterval(timer);},[usps.length,interval]);const isFixedWidth=props?.style&&props.style.width===\"100%\";return /*#__PURE__*/_jsxs(\"div\",{style:{...props.style,position:\"relative\",display:\"flex\",alignItems:\"center\",gap:12,justifyContent:\"flex-start\",paddingLeft:padding,...isFixedWidth?{}:{width:\"max-content\"}},children:[/*#__PURE__*/_jsx(motion.div,{style:{width:6,height:6,borderRadius:\"50%\",backgroundColor:dotColor,flexShrink:0},animate:{scale:[1,1.3,1],opacity:[1,.7,1]},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:\"easeInOut\"}}),/*#__PURE__*/_jsx(\"div\",{style:{position:\"relative\",overflow:\"hidden\",minHeight:\"1.2em\",flex:1,minWidth:0},children:/*#__PURE__*/_jsx(AnimatePresence,{mode:\"wait\",children:/*#__PURE__*/_jsx(motion.span,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.8,ease:\"easeInOut\"},style:{...font,color:textColor,display:\"block\",whiteSpace:\"nowrap\",overflow:\"hidden\",textOverflow:\"ellipsis\"},children:usps[currentIndex]?.text||\"\"},currentIndex)})})]});}addPropertyControls(USPCarousel,{usps:{type:ControlType.Array,title:\"USPs\",control:{type:ControlType.Object,controls:{text:{type:ControlType.String,title:\"Text\",defaultValue:\"Choose from 500 fabrics and options\"}}},defaultValue:[{text:\"Choose from 500 fabrics and options\"},{text:\"Free shipping on all orders\"},{text:\"30-day money-back guarantee\"}],maxCount:10},dotColor:{type:ControlType.Color,title:\"Dot Color\",defaultValue:\"#000000\"},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#FFFFFF\"},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"22px\",variant:\"Semibold\",letterSpacing:\"-0.01em\",lineHeight:\"1.2em\",textAlign:\"left\"}},interval:{type:ControlType.Number,title:\"Interval\",defaultValue:3e3,min:1e3,max:1e4,step:500,unit:\"ms\"},padding:{type:ControlType.Number,title:\"Padding\",defaultValue:8,min:0,max:100,step:1,unit:\"px\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"USPCarousel\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./USPCarousel.map"],"mappings":"qQAIG,SAAwB,EAAY,EAAM,CAAC,GAAK,CAAC,OAAK,CAAC,CAAC,KAAK,qCAAqC,EAAE,CAAC,KAAK,6BAA6B,EAAE,CAAC,KAAK,6BAA6B,CAAC,EAAE,WAAS,UAAU,YAAU,UAAU,OAAK,WAAS,IAAI,UAAQ,GAAG,EAAW,CAAC,EAAa,GAAiBA,EAAS,CAAC,EAAE,MAAc,CAAC,GAAU,IAAS,OAAY,OAAO,IAAM,EAAM,gBAAgB,CAAC,MAAoB,CAAC,EAAgB,IAAO,EAAK,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