{"version":3,"file":"SwipeButton_1.Cbbtorhe.mjs","names":["useState","startTransition"],"sources":["https:/framerusercontent.com/modules/9ev8gmJt03EKH0bGzeH1/9IoGWSHH3tnKZUBPyhel/SwipeButton_1.js"],"sourcesContent":["// Button with uploadable SVG icon on the right and hover-fill background effect\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,startTransition}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * Text Scrambler Button (Icon Left)\n *\n * @framerIntrinsicWidth 200\n * @framerIntrinsicHeight 60\n *\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function TextScrambler(props){const{font,color=\"#FFFFFF\",hoverTextColor=\"#FFFFFF\",buttonText=\"UPLOAD\",buttonColor=\"#FFFFFF\",backgroundColor=\"transparent\",hoverColor=\"#000000\",svgIcon=\"https://framerusercontent.com/images/GfGkADagM4KEibNcIiRUWlfrR0.jpg\",svgIconHover=\"https://framerusercontent.com/images/aNsAT3jCvt4zglbWCUoFe33Q.jpg\",iconSize=24,iconBackgroundColor=\"transparent\",borderRadius=8,paddingVertical=16,paddingHorizontal=32}=props;const[isHovered,setIsHovered]=useState(false);return /*#__PURE__*/_jsxs(\"button\",{style:{...props.style,position:\"relative\",width:\"max-content\",minWidth:\"max-content\",cursor:\"pointer\",border:`2px solid ${buttonColor}`,borderRadius:`${borderRadius}px`,padding:`${paddingVertical}px ${paddingHorizontal}px`,paddingRight:`${iconSize+paddingHorizontal*2}px`,backgroundColor:backgroundColor,overflow:\"hidden\",display:\"flex\",alignItems:\"center\",gap:\"12px\"},onMouseEnter:()=>startTransition(()=>setIsHovered(true)),onMouseLeave:()=>startTransition(()=>setIsHovered(false)),children:[/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",backgroundColor:hoverColor,transform:isHovered?\"scaleX(1)\":\"scaleX(0)\",transformOrigin:\"right\",transition:\"transform 0.4s cubic-bezier(0.4, 0, 0.2, 1)\",zIndex:0}}),/*#__PURE__*/_jsx(\"span\",{style:{...font,color:isHovered?hoverTextColor:color,whiteSpace:\"pre\",fontVariantNumeric:\"tabular-nums\",position:\"relative\",zIndex:1,transition:\"color 0.4s cubic-bezier(0.4, 0, 0.2, 1)\"},children:buttonText}),/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",top:0,right:0,height:\"100%\",width:`${iconSize+paddingHorizontal}px`,backgroundColor:iconBackgroundColor,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",zIndex:1,transition:\"background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1)\"},children:/*#__PURE__*/_jsx(\"img\",{src:isHovered?svgIconHover:svgIcon,alt:\"icon\",style:{width:`${iconSize}px`,height:`${iconSize}px`,objectFit:\"contain\",transition:\"opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1)\"}})})]});}addPropertyControls(TextScrambler,{buttonText:{type:ControlType.String,title:\"Button Text\",defaultValue:\"UPLOAD\"},svgIcon:{type:ControlType.File,title:\"SVG Icon\",allowedFileTypes:[\"svg\",\"png\",\"jpg\",\"jpeg\"]},svgIconHover:{type:ControlType.File,title:\"SVG Icon (Hover)\",allowedFileTypes:[\"svg\",\"png\",\"jpg\",\"jpeg\"]},iconSize:{type:ControlType.Number,title:\"Icon Size\",defaultValue:24,min:12,max:64,step:1,unit:\"px\"},iconBackgroundColor:{type:ControlType.Color,title:\"Icon Background\",defaultValue:\"rgba(0,0,0,0)\"},color:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#FFFFFF\"},hoverTextColor:{type:ControlType.Color,title:\"Hover Text Color\",defaultValue:\"#FFFFFF\"},buttonColor:{type:ControlType.Color,title:\"Border Color\",defaultValue:\"#FFFFFF\"},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"rgba(0,0,0,0)\"},hoverColor:{type:ControlType.Color,title:\"Swipe Letter Button\",defaultValue:\"#000000\"},borderRadius:{type:ControlType.Number,title:\"Corner Radius\",defaultValue:8,min:0,max:50,step:1,unit:\"px\"},paddingVertical:{type:ControlType.Number,title:\"Vertical Padding\",defaultValue:16,min:0,max:100,step:1,unit:\"px\"},paddingHorizontal:{type:ControlType.Number,title:\"Horizontal Padding\",defaultValue:32,min:0,max:100,step:1,unit:\"px\"},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"16px\",variant:\"Bold\",letterSpacing:\"0.05em\",lineHeight:\"1em\"}}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"TextScrambler\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"auto\",\"framerContractVersion\":\"1\",\"framerIntrinsicHeight\":\"60\",\"framerSupportedLayoutWidth\":\"auto\",\"framerIntrinsicWidth\":\"200\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./SwipeButton_1.map"],"mappings":"mLASG,SAAwB,EAAc,EAAM,CAAC,GAAK,CAAC,OAAK,QAAM,UAAU,iBAAe,UAAU,aAAW,SAAS,cAAY,UAAU,kBAAgB,cAAc,aAAW,UAAU,UAAQ,sEAAsE,eAAa,oEAAoE,WAAS,GAAG,sBAAoB,cAAc,eAAa,EAAE,kBAAgB,GAAG,oBAAkB,IAAI,EAAW,CAAC,EAAU,GAAcA,EAAS,GAAM,CAAC,OAAoB,EAAM,SAAS,CAAC,MAAM,CAAC,GAAG,EAAM,MAAM,SAAS,WAAW,MAAM,cAAc,SAAS,cAAc,OAAO,UAAU,OAAO,aAAa,IAAc,aAAa,GAAG,EAAa,IAAI,QAAQ,GAAG,EAAgB,KAAK,EAAkB,IAAI,aAAa,GAAG,EAAS,EAAkB,EAAE,IAAoB,kBAAgB,SAAS,SAAS,QAAQ,OAAO,WAAW,SAAS,IAAI,OAAO,CAAC,iBAAiBC,MAAoB,EAAa,GAAK,CAAC,CAAC,iBAAiBA,MAAoB,EAAa,GAAM,CAAC,CAAC,SAAS,C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