{"version":3,"file":"DownloadButton.DsYjExJs.mjs","names":["__esmMin","init_jsx_runtime","c","p","motion","init_framer_motion_DhsWWWsN","addPropertyControls","useIsStaticRenderer","RenderTarget","ControlType","init_framer_DymZktPS","DownloadIcon","size","color","ArrowIcon","DownloadButton","isStatic","props","isThumbnail","content","paddingX","paddingY","radius","backgroundColor","borderWidth","borderColor","textColor","font","label","circleSize","circleColor","iconSize","iconType","iconColor","commonInteractiveProps","onTap","href","file","ariaLabel","init_DownloadButton"],"sources":["https:/framerusercontent.com/modules/FZVZDN2PNDYRxdj8mowW/qhd0ABSO0LhQB1Daoanv/DownloadButton.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,RenderTarget,useIsStaticRenderer}from\"framer\";import{motion}from\"framer-motion\";function DownloadIcon({color,size}){return /*#__PURE__*/_jsxs(\"svg\",{width:size,height:size,viewBox:\"0 0 24 24\",fill:\"none\",\"aria-hidden\":\"true\",children:[/*#__PURE__*/_jsx(\"path\",{d:\"M12 3v10\",stroke:color,strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\"}),/*#__PURE__*/_jsx(\"path\",{d:\"M8 11l4 4 4-4\",stroke:color,strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\"}),/*#__PURE__*/_jsx(\"path\",{d:\"M5 21h14\",stroke:color,strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\"})]});}function ArrowIcon({color,size}){return /*#__PURE__*/_jsxs(\"svg\",{width:size,height:size,viewBox:\"0 0 24 24\",fill:\"none\",\"aria-hidden\":\"true\",children:[/*#__PURE__*/_jsx(\"path\",{d:\"M7 17L17 7\",stroke:color,strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\"}),/*#__PURE__*/_jsx(\"path\",{d:\"M10 7h7v7\",stroke:color,strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\"})]});}/**\n * Instructions:\n * Create a download button that looks as follow. radius corners circle on the right with download icon inside, text on the left that fills width.\n * On hover icon spins 360 degrees with spring animation of stifness=600, damping=50, mass=0.1, delay=0\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n */export default function DownloadButton(props){const isStatic=useIsStaticRenderer();const{label,file=\"\",backgroundColor,textColor,circleColor,iconColor,borderColor,borderWidth,height,paddingX,paddingY,gap,circleSize,iconSize,radius,font,iconType,onTap,ariaLabel}=props;const isThumbnail=RenderTarget.current()===RenderTarget.thumbnail;const content=/*#__PURE__*/_jsxs(motion.div,{style:{position:\"relative\",width:\"100%\",height:\"auto\",display:\"flex\",alignItems:\"center\",justifyContent:\"space-between\",paddingLeft:paddingX,paddingRight:Math.max(6,Math.round(paddingX*.5)),paddingTop:paddingY,paddingBottom:paddingY,gap,borderRadius:radius,background:backgroundColor,border:`${borderWidth}px solid ${borderColor}`,boxSizing:\"border-box\",userSelect:\"none\",WebkitUserSelect:\"none\"},children:[/*#__PURE__*/_jsx(\"span\",{style:{position:\"relative\",flex:1,minWidth:0,color:textColor,whiteSpace:\"normal\",overflowWrap:\"anywhere\",wordBreak:\"break-word\",letterSpacing:font?.letterSpacing??\"-0.01em\",lineHeight:font?.lineHeight??\"1em\",textAlign:\"left\",...font},children:label}),/*#__PURE__*/_jsx(\"div\",{style:{position:\"relative\",width:circleSize,height:circleSize,borderRadius:999,background:circleColor,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",flex:\"0 0 auto\"},\"aria-hidden\":\"true\",children:/*#__PURE__*/_jsx(motion.div,{style:{position:\"relative\",width:iconSize,height:iconSize,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",transformOrigin:\"50% 50%\"},initial:false,animate:{rotate:0},whileHover:isStatic||isThumbnail?undefined:{rotate:360,transition:{type:\"spring\",stiffness:600,damping:50,mass:.1,delay:0}},children:iconType===\"arrow\"?/*#__PURE__*/_jsx(ArrowIcon,{color:iconColor,size:iconSize}):/*#__PURE__*/_jsx(DownloadIcon,{color:iconColor,size:iconSize})})})]});const commonInteractiveProps={onClick:e=>{if(onTap)onTap(e);}};const href=file;if(!href){return /*#__PURE__*/_jsx(\"button\",{type:\"button\",\"aria-label\":ariaLabel||label,style:{position:\"relative\",width:\"100%\",height:\"auto\",padding:0,border:\"none\",background:\"transparent\",cursor:\"pointer\",outline:\"none\",WebkitTapHighlightColor:\"transparent\"},...commonInteractiveProps,children:content});}return /*#__PURE__*/_jsx(\"a\",{href:href,target:\"_blank\",rel:\"noopener noreferrer\",\"aria-label\":ariaLabel||label,style:{position:\"relative\",width:\"100%\",height:\"auto\",display:\"block\",textDecoration:\"none\",cursor:\"pointer\",WebkitTapHighlightColor:\"transparent\"},...commonInteractiveProps,children:content});}addPropertyControls(DownloadButton,{label:{type:ControlType.String,title:\"Label\",defaultValue:\"CONTACT US\"},ariaLabel:{type:ControlType.String,title:\"ARIA Label\",defaultValue:\"Download\"},file:{type:ControlType.File,title:\"File\",allowedFileTypes:[\"pdf\",\"doc\",\"docx\",\"txt\",\"zip\"]},iconType:{type:ControlType.Enum,title:\"Icon\",options:[\"download\",\"arrow\"],optionTitles:[\"Download\",\"Arrow\"],defaultValue:\"download\",displaySegmentedControl:true},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#E36A2A\"},textColor:{type:ControlType.Color,title:\"Text\",defaultValue:\"#000000\"},circleColor:{type:ControlType.Color,title:\"Circle\",defaultValue:\"#000000\"},iconColor:{type:ControlType.Color,title:\"Icon\",defaultValue:\"#E36A2A\"},borderColor:{type:ControlType.Color,title:\"Border\",defaultValue:\"#000000\"},borderWidth:{type:ControlType.Number,title:\"Border W\",defaultValue:0,min:0,max:8,step:1,unit:\"px\"},height:{type:ControlType.Number,title:\"Height\",defaultValue:40,min:28,max:120,step:1,unit:\"px\",hidden:()=>true},paddingX:{type:ControlType.Number,title:\"Padding X\",defaultValue:16,min:8,max:40,step:1,unit:\"px\"},paddingY:{type:ControlType.Number,title:\"Padding Y\",defaultValue:10,min:0,max:40,step:1,unit:\"px\"},gap:{type:ControlType.Number,title:\"Gap\",defaultValue:10,min:0,max:24,step:1,unit:\"px\"},circleSize:{type:ControlType.Number,title:\"Circle Size\",defaultValue:26,min:18,max:80,step:1,unit:\"px\"},iconSize:{type:ControlType.Number,title:\"Icon Size\",defaultValue:18,min:10,max:48,step:1,unit:\"px\"},radius:{type:ControlType.Number,title:\"Radius\",defaultValue:999,min:0,max:999,step:1,unit:\"px\"},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"12px\",variant:\"Semibold\",letterSpacing:\"0.08em\",lineHeight:\"1em\"}},onTap:{type:ControlType.EventHandler,title:\"Tap\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"DownloadButton\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./DownloadButton.map"],"mappings":"A,qOAAgL,SAASW,EAAa,CAAC,QAAM,QAAM,CAAC,MAAoB,gBAAM,MAAM,CAAC,MAAMC,EAAK,OAAOA,EAAK,QAAQ,YAAY,KAAK,OAAO,cAAc,OAAO,SAAS,CAAc,gBAAK,OAAO,CAAC,EAAE,WAAW,OAAOC,EAAM,YAAY,IAAI,cAAc,QAAQ,eAAe,OAAO,CAAC,EAAe,gBAAK,OAAO,CAAC,EAAE,gBAAgB,OAAOA,EAAM,YAAY,IAAI,cAAc,QAAQ,eAAe,OAAO,CAAC,EAAe,gBAAK,OAAO,CAAC,EAAE,WAAW,OAAOA,EAAM,YAAY,IAAI,cAAc,QAAQ,eAAe,OAAO,CAAC,CAAC,CAAC,CAAC,CAAE,CAAC,SAASC,EAAU,CAAC,QAAM,QAAM,CAAC,MAAoB,gBAAM,MAAM,CAAC,MAAMF,EA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