{"version":3,"file":"AppleGlassStack_1.BKBVSJOy.mjs","names":["useState","startTransition"],"sources":["https:/framerusercontent.com/modules/cDLNoNDbwUUzXg4Z0jDo/MqBWYDrijuFUvTL2FHhW/AppleGlassStack_1.js"],"sourcesContent":["// Apple liquid glass style boxes with title, body copy, optional background image, and animated hover effect with shine pass-through\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{motion}from\"framer-motion\";import{addPropertyControls,ControlType}from\"framer\";import{useState,startTransition}from\"react\";/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function AppleGlassStack(props){const{items,direction,gap,backgroundColor,glassOpacity,borderRadius,padding,titleFont,bodyFont,titleColor,bodyColor,hoverLift,containerPadding,allowOverflow,backgroundBlur,style}=props;return /*#__PURE__*/_jsx(\"div\",{style:{...style,display:\"flex\",flexDirection:direction===\"vertical\"?\"column\":\"row\",gap:`${gap}px`,width:\"100%\",height:\"100%\",overflow:allowOverflow?\"visible\":\"hidden\",padding:`${containerPadding}px`,boxSizing:\"border-box\"},children:items.map((item,index)=>/*#__PURE__*/_jsx(GlassBox,{item:item,backgroundColor:backgroundColor,glassOpacity:glassOpacity,borderRadius:borderRadius,padding:padding,titleFont:titleFont,bodyFont:bodyFont,titleColor:titleColor,bodyColor:bodyColor,hoverLift:hoverLift,backgroundBlur:backgroundBlur,strokeSize:props.strokeSize,strokeColor:props.strokeColor,shineColor:props.shineColor,boxWidth:props.boxWidth,boxHeight:props.boxHeight},index))});}function GlassBox(props){const{item,backgroundColor,glassOpacity,borderRadius,padding,titleFont,bodyFont,titleColor,bodyColor,hoverLift,backgroundBlur,strokeSize,strokeColor,shineColor,boxWidth,boxHeight}=props;const[isHovered,setIsHovered]=useState(false);const[mousePosition,setMousePosition]=useState({x:0,y:0});const handleMouseMove=e=>{const rect=e.currentTarget.getBoundingClientRect();const x=(e.clientX-rect.left)/rect.width-.5;const y=(e.clientY-rect.top)/rect.height-.5;startTransition(()=>setMousePosition({x,y}));};const handleMouseLeave=()=>{startTransition(()=>{setIsHovered(false);setMousePosition({x:0,y:0});});};return /*#__PURE__*/_jsx(\"div\",{style:{perspective:\"1000px\",width:\"100%\"},children:/*#__PURE__*/_jsxs(motion.div,{style:{position:\"relative\",width:`${boxWidth}px`,minHeight:`${boxHeight}px`,borderRadius:`${borderRadius}px`,overflow:\"hidden\",cursor:\"pointer\",backdropFilter:`blur(${backgroundBlur}px)`,WebkitBackdropFilter:`blur(${backgroundBlur}px)`,transformStyle:\"preserve-3d\"},onMouseEnter:()=>startTransition(()=>setIsHovered(true)),onMouseLeave:handleMouseLeave,onMouseMove:handleMouseMove,animate:{y:isHovered?-hoverLift:0,x:isHovered?mousePosition.x*10:0,scale:isHovered?1.02:1},transition:{duration:.3,ease:\"easeOut\"},children:[item.backgroundImage&&/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",top:0,left:0,right:0,bottom:0,backgroundImage:`url(${item.backgroundImage.src})`,backgroundSize:\"cover\",backgroundPosition:\"center\",zIndex:0},role:\"img\",\"aria-label\":item.backgroundImage.alt}),/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",top:0,left:0,right:0,bottom:0,backgroundColor:backgroundColor,opacity:glassOpacity,borderRadius:`${borderRadius}px`,zIndex:1}}),/*#__PURE__*/_jsx(motion.div,{style:{position:\"absolute\",top:0,left:0,right:0,bottom:0,background:`linear-gradient(90deg, transparent 0%, ${shineColor} 49.5%, ${shineColor} 50%, ${shineColor} 50.5%, transparent 100%)`,zIndex:2,pointerEvents:\"none\"},initial:{x:\"-100%\"},animate:{x:isHovered?\"100%\":\"-100%\"},transition:{duration:.8,ease:[.25,.1,.25,1]}}),/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",top:0,left:0,right:0,bottom:0,border:`${strokeSize}px solid ${strokeColor}`,borderRadius:`${borderRadius}px`,zIndex:2,pointerEvents:\"none\"}}),/*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\",zIndex:3,padding:`${padding}px`,display:\"flex\",flexDirection:\"column\",justifyContent:\"center\",alignItems:\"center\",textAlign:\"center\",minHeight:`${boxHeight}px`,gap:\"12px\"},children:[/*#__PURE__*/_jsx(\"h3\",{style:{margin:0,color:titleColor,...titleFont},children:item.title}),/*#__PURE__*/_jsx(\"p\",{style:{margin:0,color:bodyColor,...bodyFont},children:item.body})]})]})});}addPropertyControls(AppleGlassStack,{items:{type:ControlType.Array,title:\"Items\",control:{type:ControlType.Object,controls:{title:{type:ControlType.String,title:\"Title\",defaultValue:\"Glass Box\"},body:{type:ControlType.String,title:\"Body\",defaultValue:\"Beautiful liquid glass effect with smooth animations\",displayTextArea:true},backgroundImage:{type:ControlType.ResponsiveImage,title:\"Background Image\"}}},defaultValue:[{title:\"Innovation\",body:\"Experience the future of design with liquid glass aesthetics\"},{title:\"Performance\",body:\"Smooth animations and seamless interactions\"},{title:\"Design\",body:\"Beautiful glassmorphism inspired by Apple's design language\"}]},direction:{type:ControlType.Enum,title:\"Direction\",options:[\"vertical\",\"horizontal\"],optionTitles:[\"Vertical\",\"Horizontal\"],defaultValue:\"vertical\",displaySegmentedControl:true},gap:{type:ControlType.Number,title:\"Gap\",defaultValue:20,min:0,max:100,step:1,unit:\"px\"},containerPadding:{type:ControlType.Number,title:\"Container Padding\",defaultValue:20,min:0,max:100,step:1,unit:\"px\"},allowOverflow:{type:ControlType.Boolean,title:\"Allow Overflow\",defaultValue:true,enabledTitle:\"Yes\",disabledTitle:\"No\"},backgroundColor:{type:ControlType.Color,title:\"Glass Color\",defaultValue:\"rgba(255, 255, 255, 0.1)\"},glassOpacity:{type:ControlType.Number,title:\"Glass Opacity\",defaultValue:.8,min:0,max:1,step:.05},borderRadius:{type:ControlType.Number,title:\"Border Radius\",defaultValue:24,min:0,max:50,step:1,unit:\"px\"},padding:{type:ControlType.Number,title:\"Padding\",defaultValue:40,min:0,max:100,step:1,unit:\"px\"},titleFont:{type:ControlType.Font,title:\"Title 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\"}},titleColor:{type:ControlType.Color,title:\"Title Color\",defaultValue:\"#FFFFFF\"},bodyColor:{type:ControlType.Color,title:\"Body Color\",defaultValue:\"rgba(255, 255, 255, 0.8)\"},hoverLift:{type:ControlType.Number,title:\"Hover Lift\",defaultValue:8,min:0,max:30,step:1,unit:\"px\"},backgroundBlur:{type:ControlType.Number,title:\"Background Blur\",defaultValue:0,min:0,max:100,step:1,unit:\"px\"},strokeSize:{type:ControlType.Number,title:\"Stroke Size\",defaultValue:1,min:0,max:10,step:.5,unit:\"px\"},strokeColor:{type:ControlType.Color,title:\"Stroke Color\",defaultValue:\"rgba(255, 255, 255, 0.18)\"},shineColor:{type:ControlType.Color,title:\"Shine Color\",defaultValue:\"rgba(255, 255, 255, 0.25)\"},boxWidth:{type:ControlType.Number,title:\"Box Width\",defaultValue:300,min:100,max:1e3,step:10,unit:\"px\"},boxHeight:{type:ControlType.Number,title:\"Box Height\",defaultValue:200,min:100,max:800,step:10,unit:\"px\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"AppleGlassStack\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./AppleGlassStack_1.map"],"mappings":"yOAIG,SAAwB,EAAgB,EAAM,CAAC,GAAK,CAAC,QAAM,YAAU,MAAI,kBAAgB,eAAa,eAAa,UAAQ,YAAU,WAAS,aAAW,YAAU,YAAU,mBAAiB,gBAAc,i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