{"version":3,"file":"GlassBackButton.CD8CUnMB.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/TvzVyscnsxBG5Xu6O9WY/PHqSiSvti1gmA41EisQt/GlassBackButton.js"],"sourcesContent":["// Simple and elegant back button with clean aesthetic\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useState}from\"react\";/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight auto\n */export default function SimpleBackButton(props){const{label,showText,scale,textColor,borderColor,font,fontSize,arrowStrokeWidth,borderRadius,style}=props;const[isHovered,setIsHovered]=useState(false);const handleClick=()=>{if(typeof window!==\"undefined\"){window.history.back();}};const buttonStyle={position:\"relative\",display:\"inline-flex\",alignItems:\"center\",justifyContent:\"center\",width:style?.width??\"auto\",gap:showText?8*scale:isHovered?8*scale:0,padding:`${8*scale}px ${12*scale}px`,minWidth:44*scale,minHeight:44*scale,borderRadius:borderRadius*scale,border:`1px solid ${borderColor}`,backgroundColor:\"transparent\",cursor:\"pointer\",userSelect:\"none\",outline:\"none\",overflow:\"hidden\",boxShadow:\"none\",transform:`translateY(${isHovered?-2:0}px)`,transition:`all 0.3s cubic-bezier(0.4, 0, 0.2, 1)`,...style};if(isHovered){buttonStyle.boxShadow=\"none\";}const iconStyle={width:20*scale,height:20*scale,color:textColor,flexShrink:0,display:\"flex\",alignItems:\"center\",justifyContent:\"center\"};const textStyle={...font,color:textColor,whiteSpace:\"nowrap\",overflow:\"hidden\",textOverflow:\"ellipsis\",fontSize:fontSize,opacity:showText||isHovered?1:0,maxWidth:showText||isHovered?\"200px\":\"0px\",transition:\"opacity 0.3s ease, max-width 0.3s ease\"};return /*#__PURE__*/_jsxs(\"button\",{style:buttonStyle,onMouseEnter:()=>setIsHovered(true),onMouseLeave:()=>setIsHovered(false),onClick:handleClick,\"aria-label\":!showText?\"Go back\":label,children:[/*#__PURE__*/_jsx(\"div\",{style:iconStyle,children:/*#__PURE__*/_jsx(\"svg\",{width:20*scale,height:20*scale,viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"currentColor\",strokeWidth:arrowStrokeWidth,strokeLinecap:\"round\",strokeLinejoin:\"round\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M15 18l-6-6 6-6\"})})}),/*#__PURE__*/_jsx(\"span\",{style:textStyle,children:label})]});}addPropertyControls(SimpleBackButton,{label:{type:ControlType.String,title:\"Label\",defaultValue:\"Retour\"},scale:{type:ControlType.Number,title:\"Scale\",defaultValue:1,min:.5,max:2,step:.1,displayStepper:true},fontSize:{type:ControlType.Number,title:\"Text Size\",defaultValue:15,min:10,max:30,step:1,unit:\"px\"},arrowStrokeWidth:{type:ControlType.Number,title:\"Arrow Thickness\",defaultValue:2,min:1,max:4,step:.5},showText:{type:ControlType.Boolean,title:\"Show Text\",defaultValue:false,enabledTitle:\"Always\",disabledTitle:\"On Hover\"},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#000000\"},borderColor:{type:ControlType.Color,title:\"Border\",defaultValue:\"#EEEEEE\"},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{variant:\"Medium\"}},borderRadius:{type:ControlType.Number,title:\"Border Radius\",defaultValue:12,min:0,max:50,step:1,unit:\"px\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"SimpleBackButton\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any\",\"framerSupportedLayoutHeight\":\"auto\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./GlassBackButton.map"],"mappings":"+LAIG,SAAwB,EAAiB,EAAM,CAAC,GAAK,CAAC,QAAM,WAAS,QAAM,YAAU,cAAY,OAAK,WAAS,mBAAiB,eAAa,SAAO,EAAW,CAAC,EAAU,GAAcA,EAAS,EAAK,EAAQ,MAAgB,CAAW,IAAS,QAAa,EAAO,QAA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