{"version":3,"file":"TickerBox.C3CdBbXe.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/R4PACFdC4Md9FfMu8OHm/ahDEONY4RghEzp33m8vT/TickerBox.js"],"sourcesContent":["// Text box ticker component with click-through slides, custom fonts for header/body, and customizable glow effect\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,startTransition,useEffect}from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function TickerBox(props){const{slides=[{header:\"Slide 1\",body:\"This is the first slide with a glowing effect.\",glowColor:\"#0099FF\"},{header:\"Slide 2\",body:\"Click to see the next slide.\",glowColor:\"#8855FF\"},{header:\"Slide 3\",body:\"Each slide has its own custom glow color.\",glowColor:\"#FF5588\"}],headerFont,bodyFont,textColor=\"#000000\",backgroundColor=\"#FFFFFF\",glowIntensity=20,glowSpread=40,borderRadius=16,padding=32,autoAdvance=false,autoAdvanceDelay=3e3,showDots=true,dotColor=\"#CCCCCC\",activeDotColor=\"#000000\",showArrows=true,arrowColor=\"#000000\",arrowBackgroundColor=\"#FFFFFF\",showAddButton=true,addButtonColor=\"#000000\",addButtonTextColor=\"#FFFFFF\"}=props;const[currentIndex,setCurrentIndex]=useState(0);const[slidesList,setSlidesList]=useState(slides);// Sync slidesList with slides prop\nuseEffect(()=>{setSlidesList(slides);},[slides]);const handleClick=()=>{startTransition(()=>{setCurrentIndex(prev=>(prev+1)%slidesList.length);});};const handleDotClick=index=>{startTransition(()=>{setCurrentIndex(index);});};const handlePrevious=e=>{e.stopPropagation();startTransition(()=>{setCurrentIndex(prev=>(prev-1+slidesList.length)%slidesList.length);});};const handleNext=e=>{e.stopPropagation();startTransition(()=>{setCurrentIndex(prev=>(prev+1)%slidesList.length);});};const handleAddSlide=()=>{const newSlide={header:`Slide ${slidesList.length+1}`,body:\"This is a new slide. Click to edit in the properties panel.\",glowColor:\"#22CC66\"};startTransition(()=>{setSlidesList([...slidesList,newSlide]);setCurrentIndex(slidesList.length);});};const currentSlide=slidesList[currentIndex]||slidesList[0];const isCanvas=RenderTarget.current()===RenderTarget.canvas;return /*#__PURE__*/_jsxs(\"div\",{style:{width:\"100%\",height:\"100%\",display:\"flex\",flexDirection:\"column\",alignItems:\"center\",justifyContent:\"center\",gap:20,position:\"relative\"},children:[/*#__PURE__*/_jsxs(\"div\",{style:{width:\"100%\",flex:1,display:\"flex\",alignItems:\"center\",gap:12,position:\"relative\"},children:[showArrows&&slidesList.length>1&&/*#__PURE__*/_jsx(\"button\",{onClick:handlePrevious,style:{width:40,height:40,borderRadius:\"50%\",border:\"none\",backgroundColor:arrowBackgroundColor,color:arrowColor,cursor:\"pointer\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",fontSize:20,fontWeight:\"bold\",boxShadow:\"0 2px 8px rgba(0,0,0,0.1)\",transition:\"transform 0.2s ease\",flexShrink:0},onMouseEnter:e=>{e.currentTarget.style.transform=\"scale(1.1)\";},onMouseLeave:e=>{e.currentTarget.style.transform=\"scale(1)\";},\"aria-label\":\"Previous slide\",children:\"←\"}),/*#__PURE__*/_jsxs(\"div\",{onClick:handleClick,style:{width:\"100%\",flex:1,display:\"flex\",flexDirection:\"column\",gap:16,padding:padding,backgroundColor:backgroundColor,borderRadius:borderRadius,cursor:\"pointer\",position:\"relative\",overflow:\"hidden\",boxShadow:`0 0 ${glowSpread}px ${glowIntensity}px ${currentSlide.glowColor}`,transition:\"box-shadow 0.3s ease\"},children:[/*#__PURE__*/_jsx(\"h2\",{style:{margin:0,color:textColor,...headerFont},children:currentSlide.header}),/*#__PURE__*/_jsx(\"p\",{style:{margin:0,color:textColor,...bodyFont},children:currentSlide.body})]}),showArrows&&slidesList.length>1&&/*#__PURE__*/_jsx(\"button\",{onClick:handleNext,style:{width:40,height:40,borderRadius:\"50%\",border:\"none\",backgroundColor:arrowBackgroundColor,color:arrowColor,cursor:\"pointer\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",fontSize:20,fontWeight:\"bold\",boxShadow:\"0 2px 8px rgba(0,0,0,0.1)\",transition:\"transform 0.2s ease\",flexShrink:0},onMouseEnter:e=>{e.currentTarget.style.transform=\"scale(1.1)\";},onMouseLeave:e=>{e.currentTarget.style.transform=\"scale(1)\";},\"aria-label\":\"Next slide\",children:\"→\"})]}),/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",gap:16,alignItems:\"center\",justifyContent:\"center\",width:\"100%\"},children:[showDots&&slidesList.length>1&&/*#__PURE__*/_jsx(\"div\",{style:{display:\"flex\",gap:8,alignItems:\"center\",justifyContent:\"center\"},children:slidesList.map((_,index)=>/*#__PURE__*/_jsx(\"button\",{onClick:()=>handleDotClick(index),style:{width:10,height:10,borderRadius:\"50%\",border:\"none\",backgroundColor:index===currentIndex?activeDotColor:dotColor,cursor:\"pointer\",transition:\"background-color 0.3s ease\",padding:0},\"aria-label\":`Go to slide ${index+1}`},index))}),showAddButton&&isCanvas&&/*#__PURE__*/_jsx(\"button\",{onClick:handleAddSlide,style:{padding:\"8px 16px\",borderRadius:8,border:\"none\",backgroundColor:addButtonColor,color:addButtonTextColor,cursor:\"pointer\",fontSize:14,fontWeight:600,boxShadow:\"0 2px 8px rgba(0,0,0,0.1)\",transition:\"transform 0.2s ease\"},onMouseEnter:e=>{e.currentTarget.style.transform=\"scale(1.05)\";},onMouseLeave:e=>{e.currentTarget.style.transform=\"scale(1)\";},\"aria-label\":\"Add new slide\",children:\"+ Add Slide\"})]})]});}addPropertyControls(TickerBox,{slides:{type:ControlType.Array,title:\"Slides\",control:{type:ControlType.Object,controls:{header:{type:ControlType.String,title:\"Header\",defaultValue:\"Slide Header\"},body:{type:ControlType.String,title:\"Body\",defaultValue:\"This is the body text for this slide.\",displayTextArea:true},glowColor:{type:ControlType.Color,title:\"Glow Color\",defaultValue:\"#0099FF\"}}},defaultValue:[{header:\"Slide 1\",body:\"This is the first slide with a glowing effect.\",glowColor:\"#0099FF\"},{header:\"Slide 2\",body:\"Click to see the next slide.\",glowColor:\"#8855FF\"},{header:\"Slide 3\",body:\"Each slide has its own custom glow color.\",glowColor:\"#FF5588\"}]},headerFont:{type:ControlType.Font,title:\"Header Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"32px\",variant:\"Semibold\",letterSpacing:\"-0.03em\",lineHeight:\"1em\"}},bodyFont:{type:ControlType.Font,title:\"Body Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"15px\",variant:\"Medium\",letterSpacing:\"-0.01em\",lineHeight:\"1.3em\"}},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#000000\"},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#FFFFFF\"},glowIntensity:{type:ControlType.Number,title:\"Glow Intensity\",defaultValue:20,min:0,max:50,step:1,unit:\"px\"},glowSpread:{type:ControlType.Number,title:\"Glow Spread\",defaultValue:40,min:0,max:100,step:1,unit:\"px\"},borderRadius:{type:ControlType.Number,title:\"Border Radius\",defaultValue:16,min:0,max:50,step:1,unit:\"px\"},padding:{type:ControlType.Number,title:\"Padding\",defaultValue:32,min:0,max:100,step:1,unit:\"px\"},showArrows:{type:ControlType.Boolean,title:\"Show Arrows\",defaultValue:true,enabledTitle:\"Show\",disabledTitle:\"Hide\"},arrowColor:{type:ControlType.Color,title:\"Arrow Color\",defaultValue:\"#000000\",hidden:({showArrows})=>!showArrows},arrowBackgroundColor:{type:ControlType.Color,title:\"Arrow Background\",defaultValue:\"#FFFFFF\",hidden:({showArrows})=>!showArrows},showDots:{type:ControlType.Boolean,title:\"Show Dots\",defaultValue:true,enabledTitle:\"Show\",disabledTitle:\"Hide\"},dotColor:{type:ControlType.Color,title:\"Dot Color\",defaultValue:\"#CCCCCC\",hidden:({showDots})=>!showDots},activeDotColor:{type:ControlType.Color,title:\"Active Dot\",defaultValue:\"#000000\",hidden:({showDots})=>!showDots},showAddButton:{type:ControlType.Boolean,title:\"Show Add Button\",defaultValue:true,enabledTitle:\"Show\",disabledTitle:\"Hide\"},addButtonColor:{type:ControlType.Color,title:\"Button Color\",defaultValue:\"#000000\",hidden:({showAddButton})=>!showAddButton},addButtonTextColor:{type:ControlType.Color,title:\"Button Text\",defaultValue:\"#FFFFFF\",hidden:({showAddButton})=>!showAddButton}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"TickerBox\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./TickerBox.map"],"mappings":"sMAIG,SAAwB,EAAU,EAAM,CAAC,GAAK,CAAC,SAAO,CAAC,CAAC,OAAO,UAAU,KAAK,iDAAiD,UAAU,UAAU,CAAC,CAAC,OAAO,UAAU,KAAK,+BAA+B,UAAU,UAAU,CAAC,CAAC,OAAO,UAAU,KAAK,4CAA4C,UAAU,UAAU,CAAC,CAAC,aAAW,WAAS,YAAU,UAAU,kBAAgB,UAAU,gBAAc,GAAG,aAAW,GAAG,eAAa,GAAG,UAAQ,GAAG,cAAY,GAAM,mBAAiB,IAAI,WAAS,GAAK,WAAS,UAAU,iBAAe,UAAU,aAAW,GAAK,aAAW,UAAU,uBAAqB,UAAU,gBAAc,GAAK,iBAAe,UAAU,qBAAmB,WAAW,EAAW,CAAC,EAAa,GAAiBA,EAAS,EAAE,CAAM,CAAC,EAAW,GAAeA,EAAS,EAAO,CAC5wB,MAAc,CAAC,EAAc,EAAO,EAAG,CAAC,EAAO,CAAC,CAAC,IAAM,MAAgB,CAAC,MAAoB,CAAC,EAAgB,IAAO,EAAK,GAAG,EAAW,OAAO,EAAG,EAAS,EAAe,GAAO,CAAC,MAAoB,CAAC,EAAgB,EAAM,EAAG,EAAS,EAAe,GAAG,CAAC,EAAE,iBAAiB,CAAC,MAAoB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