{"version":3,"file":"Fvf.DhIIut59.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/NTJzfMANXnfYrNO40EGr/7zZEyZmvW7H2dk5eu4Qf/Fvf.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState}from\"react\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";import{motion}from\"framer-motion\";/**\n * SLANTED REVEAL BUTTON\n * ----------------------------------------------------------------\n * A button with a dramatic diagonal (\"slanted\") reveal on hover.\n * The hover layer carries BOTH the background color AND a duplicate\n * label together as one solid sheet — it slides + skews in from the\n * chosen edge and physically covers the base layer, so background\n * and text swap in sync along a hard diagonal seam (not a color\n * cross-fade). A counter-skew on the inner label keeps the hover\n * text upright while the outer sheet stays slanted.\n *\n * A top-level \"Enable Hover\" toggle lets you turn the whole\n * interaction off and fall back to a single static layer — useful\n * for touch/mobile where hover doesn't apply. The component also\n * detects Framer's static rendering context (canvas thumbnails,\n * exports) via useIsStaticRenderer and disables all animation there\n * too, rendering the same plain static fallback.\n *\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function SlantedRevealButton(props){const{text,link,openInNewTab,font,padding,radius,colors,border,hover,style}=props;const isStatic=useIsStaticRenderer();const[isHovered,setIsHovered]=useState(false);// Animation only runs when the user has hover enabled AND we are\n// not in a static rendering context (canvas thumbnail / export).\nconst hoverActive=hover.enabled&&!isStatic;const easingMap={linear:[0,0,1,1],easeIn:[.42,0,1,1],easeOut:[0,0,.58,1],easeInOut:[.42,0,.58,1],backOut:[.34,1.56,.64,1]};const isVertical=hover.direction===\"top\"||hover.direction===\"bottom\";const outerHiddenTransform={top:`translateY(-100%) skewY(${hover.skew}deg)`,bottom:`translateY(100%) skewY(${hover.skew}deg)`,left:`translateX(-100%) skewX(${hover.skew}deg)`,right:`translateX(100%) skewX(${hover.skew}deg)`}[hover.direction];const outerVisibleTransform=isVertical?`translateY(0%) skewY(${hover.skew}deg)`:`translateX(0%) skewX(${hover.skew}deg)`;// Cancels the outer sheet's skew so the duplicated hover label\n// renders upright instead of sheared.\nconst innerCounterTransform=isVertical?`skewY(${-hover.skew}deg)`:`skewX(${-hover.skew}deg)`;const Wrapper=link?\"a\":\"div\";const wrapperLinkProps=link?{href:link,target:openInNewTab?\"_blank\":undefined,rel:openInNewTab?\"noopener noreferrer\":undefined}:{};const rootStyle={...style,display:\"inline-flex\",alignItems:\"center\",justifyContent:\"center\",position:\"relative\",overflow:\"hidden\",cursor:hoverActive?\"pointer\":\"default\",userSelect:\"none\",textDecoration:\"none\",boxSizing:\"border-box\",padding:padding,borderRadius:radius,backgroundColor:colors.baseBackground,border:border.enabled?`${border.width}px solid ${border.color}`:\"none\",width:\"fit-content\",height:\"fit-content\"};const textStyle={position:\"relative\",fontFamily:font.fontFamily,fontWeight:font.fontWeight,fontSize:font.fontSize,lineHeight:font.lineHeight,letterSpacing:font.letterSpacing,fontStyle:font.fontStyle,whiteSpace:\"nowrap\"};// ---- Static fallback: no motion, no listeners, single flat layer ----\nif(!hoverActive){return /*#__PURE__*/_jsx(Wrapper,{...wrapperLinkProps,role:link?undefined:\"button\",tabIndex:0,style:rootStyle,children:/*#__PURE__*/_jsx(\"span\",{style:{...textStyle,zIndex:1,color:colors.baseText},children:text})});}// ---- Interactive version ----\nreturn /*#__PURE__*/_jsxs(Wrapper,{...wrapperLinkProps,onMouseEnter:()=>setIsHovered(true),onMouseLeave:()=>setIsHovered(false),role:link?undefined:\"button\",tabIndex:0,style:rootStyle,children:[/*#__PURE__*/_jsx(\"span\",{style:{...textStyle,zIndex:1,color:colors.baseText},children:text}),/*#__PURE__*/_jsx(motion.div,{initial:false,animate:{transform:isHovered?outerVisibleTransform:outerHiddenTransform},transition:{duration:hover.duration,ease:easingMap[hover.easing]},style:{position:\"absolute\",width:\"160%\",height:\"160%\",top:\"-30%\",left:\"-30%\",backgroundColor:colors.hoverBackground,pointerEvents:\"none\",zIndex:2},children:/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",inset:0,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",transform:innerCounterTransform},children:/*#__PURE__*/_jsx(\"span\",{style:{...textStyle,color:colors.hoverText},children:text})})})]});}SlantedRevealButton.defaultProps={text:\"Slanted Button\"};addPropertyControls(SlantedRevealButton,{text:{type:ControlType.String,title:\"Text\",defaultValue:\"Slanted Button\"},link:{type:ControlType.Link,title:\"Link\"},openInNewTab:{type:ControlType.Boolean,title:\"New Tab\",defaultValue:false,hidden:props=>!props.link},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultValue:{fontFamily:\"Inter\",fontWeight:600,fontSize:16,letterSpacing:0,lineHeight:\"1.2em\"}},padding:{type:ControlType.Padding,title:\"Padding\",defaultValue:\"16px 24px 16px 24px\"},radius:{type:ControlType.BorderRadius,title:\"Radius\",defaultValue:\"4px\"},colors:{type:ControlType.Object,title:\"Colors\",controls:{baseBackground:{type:ControlType.Color,title:\"Base BG\",defaultValue:\"#16A34A\"},baseText:{type:ControlType.Color,title:\"Base Text\",defaultValue:\"#F0FDF4\"},hoverBackground:{type:ControlType.Color,title:\"Hover BG\",defaultValue:\"#052E16\"},hoverText:{type:ControlType.Color,title:\"Hover Text\",defaultValue:\"#86EFAC\"}}},border:{type:ControlType.Object,title:\"Border\",controls:{enabled:{type:ControlType.Boolean,title:\"Enable\",defaultValue:false},width:{type:ControlType.Number,title:\"Width\",defaultValue:1,min:0,max:20,step:1,hidden:props=>!props.enabled},color:{type:ControlType.Color,title:\"Color\",defaultValue:\"#0F5132\",hidden:props=>!props.enabled}}},hover:{type:ControlType.Object,title:\"Hover Reveal\",controls:{enabled:{type:ControlType.Boolean,title:\"Enable Hover\",defaultValue:true,description:\"Turn off for touch/mobile — renders a static single layer instead.\"},direction:{type:ControlType.Enum,title:\"Direction\",options:[\"top\",\"bottom\",\"left\",\"right\"],optionTitles:[\"Top\",\"Bottom\",\"Left\",\"Right\"],defaultValue:\"top\",displaySegmentedControl:true,hidden:props=>!props.enabled},skew:{type:ControlType.Number,title:\"Skew\",defaultValue:8,min:-60,max:60,step:1,unit:\"\\xb0\",hidden:props=>!props.enabled},duration:{type:ControlType.Number,title:\"Speed\",defaultValue:.45,min:.05,max:2,step:.05,unit:\"s\",hidden:props=>!props.enabled},easing:{type:ControlType.Enum,title:\"Easing\",options:[\"linear\",\"easeIn\",\"easeOut\",\"easeInOut\",\"backOut\"],optionTitles:[\"Linear\",\"Ease In\",\"Ease Out\",\"Ease In Out\",\"Back Out\"],defaultValue:\"easeOut\",hidden:props=>!props.enabled}}}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"SlantedRevealButton\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Fvf.map"],"mappings":"0OAoBG,SAAwB,EAAoB,EAAM,CAAC,GAAK,CAAC,OAAK,OAAK,eAAa,OAAK,UAAQ,SAAO,SAAO,SAAO,QAAM,SAAO,EAAY,EAAS,EAAoB,EAAO,CAAC,EAAU,GAAcA,EAAS,EAAK,EAEnN,EAAY,EAAM,SAAS,CAAC,EAAe,EAAU,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,EAAE,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC,EAAE,UAAU,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,QAAQ,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,EAAQ,EAAW,EAAM,YAAY,OAAO,EAAM,YAAY,SAAe,EAAqB,CAAC,IAAI,2BAA2B,EAAM,KAAK,MAAM,OAAO,0BAA0B,EAAM,KAAK,MAAM,KAAK,2BAA2B,EAAM,KAAK,MAAM,MAAM,0BAA0B,EAAM,KAAK,KAAK,EAAE,EAAM,WAAiB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