{"version":3,"file":"AnimatedList.CswBAePA.mjs","names":["useRef"],"sources":["https:/framerusercontent.com/modules/pK6XLmNQSypGYq4RQHZq/VymUXLQU6xU6BVUPfbuR/AnimatedList.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{stagger,animate}from\"framer-motion\";import{useEffect,useRef}from\"react\";/**\n * @framerDisableUnlink\n *\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function StaggeredList(props){const{useArray,content,contentString,font,color,iconColor,spacing,iconStyle,animation}=props;const listRef=useRef(null);// Parse content based on input type\nconst items=useArray?content||[]:contentString?contentString.split(\"\\n\").filter(line=>line.trim()!==\"\"):[];// Trigger stagger animation when items change\nuseEffect(()=>{if(listRef.current){const elements=listRef.current.querySelectorAll(\"li\");// Combine transition with stagger delay\nconst transition={...animation.transition,delay:stagger(animation.staggerDelay,{from:animation.staggerDirection===\"reverse\"?\"last\":\"first\"})};// Determine animation values based on start position\nconst animationValues={opacity:[0,1]};const offset=animation.startOffset||20;switch(animation.startPosition){case\"top\":animationValues.y=[-offset,0];break;case\"bottom\":animationValues.y=[offset,0];break;case\"left\":animationValues.x=[-offset,0];break;case\"right\":animationValues.x=[offset,0];break;}animate(elements,animationValues,transition);}},[items,animation]);const listStyle={color:color,padding:0,margin:0,listStyle:\"none\",width:\"100%\",height:\"auto\",display:\"flex\",flexDirection:\"column\",gap:spacing,paddingLeft:iconStyle.visible?`${iconStyle.size+iconStyle.spacing}px`:\"0px\",...font};const listItemStyle={position:\"relative\",display:\"flex\",alignItems:\"center\",opacity:1};const bulletStyle={content:'\"\"',position:\"absolute\",left:`-${iconStyle.size+iconStyle.spacing}px`,width:`${iconStyle.size}px`,height:`${iconStyle.size}px`,backgroundColor:iconColor,maskImage:`url('${iconStyle.image}')`,WebkitMaskImage:`url('${iconStyle.image}')`,maskSize:\"contain\",WebkitMaskSize:\"contain\",maskRepeat:\"no-repeat\",WebkitMaskRepeat:\"no-repeat\",maskPosition:\"center\",WebkitMaskPosition:\"center\"};return /*#__PURE__*/_jsx(\"ul\",{ref:listRef,style:listStyle,children:items.map((text,index)=>/*#__PURE__*/_jsxs(\"li\",{style:listItemStyle,children:[iconStyle.visible&&/*#__PURE__*/_jsx(\"div\",{style:bulletStyle}),text]},index))});}StaggeredList.displayName=\"Staggered List\";StaggeredList.defaultProps={useArray:true,content:[\"First item\",\"Second item\",\"Third item\"],contentString:\"First item\\nSecond item\\nThird item\",font:\"\",color:\"#444\",iconColor:\"#444\",spacing:16,iconStyle:{visible:false,image:\"\",size:16,spacing:8},animation:{staggerDelay:.1,staggerDirection:\"forward\",startPosition:\"bottom\",startOffset:20,transition:{type:\"spring\",stiffness:100,damping:30}}};addPropertyControls(StaggeredList,{useArray:{type:ControlType.Boolean,title:\"Input Type\",description:\"Individual items or line-separated text\",defaultValue:true,enabledTitle:\"Array\",disabledTitle:\"Text\"},content:{type:ControlType.Array,title:\"Content\",control:{type:ControlType.String,placeholder:\"List text\"},defaultValue:[\"First item\",\"Second item\",\"Third item\"],hidden(props){return props.useArray===false;}},contentString:{type:ControlType.String,title:\"Content\",displayTextArea:true,placeholder:\"Enter items (one per line)\",defaultValue:\"First item\\nSecond item\\nThird item\",hidden(props){return props.useArray===true;}},font:{type:ControlType.Font,controls:\"extended\",title:\"Font\"},color:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#444\"},iconColor:{type:ControlType.Color,title:\"Icon Color\",defaultValue:\"#444\"},iconStyle:{type:ControlType.Object,title:\"Icon Style\",controls:{visible:{type:ControlType.Boolean,title:\"Show Icon\",defaultValue:false,enabledTitle:\"Show\",disabledTitle:\"Hide\"},image:{type:ControlType.Image,title:\"Icon\",hidden(props){return props.visible===false;}},size:{type:ControlType.Number,title:\"Size\",defaultValue:16,min:0,max:100,unit:\"px\",step:1,displayStepper:true,hidden(props){return props.visible===false;}},spacing:{type:ControlType.Number,title:\"Gap\",defaultValue:10,min:0,max:100,unit:\"px\",step:1,displayStepper:true,hidden(props){return props.visible===false;}}}},spacing:{type:ControlType.Number,title:\"List Gap\",defaultValue:8,min:0,max:100,unit:\"px\",step:1,displayStepper:true},animation:{type:ControlType.Object,title:\"Animation\",controls:{transition:{type:ControlType.Transition,title:\"Transition\",defaultValue:{type:\"spring\",stiffness:100,damping:30}},staggerDelay:{type:ControlType.Number,title:\"Stagger\",defaultValue:.1,min:0,max:1,step:.05,displayStepper:true},staggerDirection:{type:ControlType.Enum,title:\"Direction\",defaultValue:\"forward\",options:[\"forward\",\"reverse\"],optionTitles:[\"Top → Bottom\",\"Bottom → Top\"],displaySegmentedControl:true,segmentedControlDirection:\"vertical\"},startPosition:{type:ControlType.Enum,title:\"Start Position\",defaultValue:\"top\",options:[\"left\",\"top\",\"right\",\"bottom\"],optionTitles:[\"←\",\"↑\",\"→\",\"↓\"],displaySegmentedControl:true,segmentedControlDirection:\"horizontal\"},startOffset:{type:ControlType.Number,title:\"Start Offset\",defaultValue:24,min:0,max:240,unit:\"px\",step:4,displayStepper:true}}}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"StaggeredList\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\",\"framerDisableUnlink\":\"*\",\"framerSupportedLayoutWidth\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./AnimatedList.map"],"mappings":"iPAKG,SAAwB,EAAc,EAAM,CAAC,GAAK,CAAC,WAAS,UAAQ,gBAAc,OAAK,QAAM,YAAU,UAAQ,YAAU,aAAW,EAAY,EAAQA,EAAO,KAAK,CACjK,EAAM,EAAS,GAAS,EAAE,CAAC,EAAc,EAAc,MAAM;EAAK,CAAC,OAAO,GAAM,EAAK,MAAM,GAAG,GAAG,CAAC,EAAE,CAC1G,MAAc,CAAC,GAAG,EAAQ,QAAQ,CAAC,IAAM,EAAS,EAAQ,QAAQ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