{"version":3,"file":"LIquidButtonV1.DdLLKLPk.mjs","names":["useState","startTransition"],"sources":["https:/framerusercontent.com/modules/foDcrJiN5AHXnBlSASMc/Qb3BvtDS2J1WiQisG89K/LIquidButtonV1.js"],"sourcesContent":["// Liquid fill button\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{motion}from\"framer-motion\";import{addPropertyControls,ControlType}from\"framer\";import{RenderTarget}from\"framer\";import{useState,startTransition}from\"react\";/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */export default function LiquidFillButton(props){const{text,link,backgroundColor,fillColor,textColor,fillTextColor,borderRadius,borderWidth,borderColor,font,style}=props;const[isHovered,setIsHovered]=useState(false);const isPreview=RenderTarget.current()===RenderTarget.preview;const isActive=isPreview&&isHovered;const staticRender=RenderTarget.current()===RenderTarget.canvas||RenderTarget.current()===RenderTarget.thumbnail;const isFixedWidth=style?.width===\"100%\";const isFixedHeight=style?.height===\"100%\";return /*#__PURE__*/_jsx(\"a\",{href:link,style:{textDecoration:\"none\",display:\"inline-block\",...isFixedWidth?{width:\"100%\"}:{},...isFixedHeight?{height:\"100%\"}:{}},children:/*#__PURE__*/_jsxs(motion.button,{style:{position:\"relative\",overflow:\"hidden\",backgroundColor,border:`${borderWidth}px solid ${borderColor}`,cursor:\"pointer\",padding:\"16px 32px\",borderRadius,color:textColor,...font,...isFixedWidth?{width:\"100%\"}:{minWidth:\"max-content\"},...isFixedHeight?{height:\"100%\"}:{}},animate:{color:isActive?fillTextColor:textColor,backgroundColor:staticRender?backgroundColor:backgroundColor,borderColor:staticRender?borderColor:borderColor},transition:staticRender?{duration:0}:{color:{duration:.3,delay:.2,ease:\"easeInOut\"},backgroundColor:{duration:.3,ease:\"easeInOut\"},borderColor:{duration:.3,ease:\"easeInOut\"}},onMouseEnter:()=>startTransition(()=>setIsHovered(true)),onMouseLeave:()=>startTransition(()=>setIsHovered(false)),children:[/*#__PURE__*/_jsx(motion.div,{style:{position:\"absolute\",bottom:0,left:0,right:0,backgroundColor:fillColor,zIndex:0},initial:{height:\"0%\"},animate:{height:isActive?\"100%\":\"0%\"},transition:{duration:staticRender?0:.6,ease:[.43,.13,.23,.96]}}),/*#__PURE__*/_jsx(motion.span,{style:{position:\"relative\",zIndex:1,display:\"block\"},animate:{color:staticRender?textColor:isActive?fillTextColor:textColor},transition:staticRender?{duration:0}:{duration:.3,ease:\"easeInOut\"},children:text})]})});}addPropertyControls(LiquidFillButton,{text:{type:ControlType.String,title:\"Text\",defaultValue:\"Hover Me\"},link:{type:ControlType.Link,title:\"Link\"},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#FFFFFF\"},fillColor:{type:ControlType.Color,title:\"Fill Color\",defaultValue:\"#000000\"},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#000000\"},fillTextColor:{type:ControlType.Color,title:\"Fill Text Color\",defaultValue:\"#FFFFFF\"},borderRadius:{type:ControlType.Number,title:\"Radius\",defaultValue:8,min:0,max:50,step:1,unit:\"px\"},borderWidth:{type:ControlType.Number,title:\"Border Width\",defaultValue:2,min:0,max:10,step:1,unit:\"px\"},borderColor:{type:ControlType.Color,title:\"Border Color\",defaultValue:\"#000000\"},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"16px\",variant:\"Semibold\",letterSpacing:\"-0.01em\",lineHeight:\"1em\"}}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"LiquidFillButton\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"any\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./LIquidButtonV1.map"],"mappings":"2OAIG,SAAwB,EAAiB,EAAM,CAAC,GAAK,CAAC,OAAK,OAAK,kBAAgB,YAAU,YAAU,gBAAc,eAAa,cAAY,cAAY,OAAK,S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