{"version":3,"file":"Web_to_App_CTA_Button_Customisable.BZ_nrtCk.mjs","names":["useMemo"],"sources":["https:/framerusercontent.com/modules/NMHCazjJDU4OYZsaUdQl/Eq3cLgbSN1b3ITTlYIp7/Web_to_App_CTA_Button_Customisable.js"],"sourcesContent":["// User request: Make CTA label typography easier to customize in Framer by keeping buttonFont and adding explicit label typography controls (size, weight, line height, letter spacing, text transform) while preserving fit/fill width behavior, layer control, CTA ID hooks, and existing visuals/motion.\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useMemo}from\"react\";import{addPropertyControls,ControlType}from\"framer\";import{motion}from\"framer-motion\";/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n */export default function Web_to_app_cta_code_override_component(props){const{label,variant,overrideColors,overrideBorder,overrideShadow,tint,textColor,borderColor,borderWidth,borderRadius,paddingX,paddingY,minHeight,shadowEnabled,shadowColor,shadowBlur,shadowY,shadowOpacity,hoverScale,hoverLift,tapScale,layer,buttonFont,labelFontSize,labelWeight,labelLineHeight,labelLetterSpacing,labelCase,ctaId,style}=props;const trimmedCtaId=useMemo(()=>ctaId?ctaId.trim():\"\",[ctaId]);const sanitizedCtaId=useMemo(()=>{return trimmedCtaId.toLowerCase().replace(/[^a-z0-9]+/g,\"-\").replace(/^-+|-+$/g,\"\");},[trimmedCtaId]);const className=sanitizedCtaId?`web-to-app-cta-btn-code-component web-to-app-cta-${sanitizedCtaId}`:\"web-to-app-cta-btn-code-component\";const variantStyles=useMemo(()=>{switch(variant){case\"Secondary\":return{tint:\"#F5F5F5\",textColor:\"#000000\",borderColor:\"#EEEEEE\",borderWidth:1,shadowEnabled:true,shadowColor:\"rgba(0,0,0,0.08)\",shadowBlur:10,shadowY:3,shadowOpacity:.1};case\"Outline\":return{tint:\"rgba(0,0,0,0)\",textColor:\"#000000\",borderColor:\"#DDDDDD\",borderWidth:1,shadowEnabled:false,shadowColor:\"rgba(0,0,0,0.04)\",shadowBlur:4,shadowY:1,shadowOpacity:.04};case\"Ghost\":return{tint:\"rgba(0,0,0,0)\",textColor:\"#000000\",borderColor:\"rgba(0,0,0,0)\",borderWidth:0,shadowEnabled:false,shadowColor:\"rgba(0,0,0,0)\",shadowBlur:0,shadowY:0,shadowOpacity:0};case\"Custom\":return{tint,textColor,borderColor,borderWidth,shadowEnabled,shadowColor,shadowBlur,shadowY,shadowOpacity};case\"Primary\":default:return{tint:\"#000000\",textColor:\"#FFFFFF\",borderColor:\"rgba(255,255,255,0.18)\",borderWidth:1,shadowEnabled:true,shadowColor:\"rgba(0,0,0,0.12)\",shadowBlur:16,shadowY:6,shadowOpacity:.16};}},[variant,tint,textColor,borderColor,borderWidth,shadowEnabled,shadowColor,shadowBlur,shadowY,shadowOpacity]);const useCustomValues=variant===\"Custom\";const resolvedTint=useCustomValues||overrideColors?tint:variantStyles.tint;const resolvedTextColor=useCustomValues||overrideColors?textColor:variantStyles.textColor;const resolvedBorderColor=useCustomValues||overrideBorder?borderColor:variantStyles.borderColor;const resolvedBorderWidth=useCustomValues||overrideBorder?borderWidth:variantStyles.borderWidth;const resolvedShadowEnabled=useCustomValues||overrideShadow?shadowEnabled:variantStyles.shadowEnabled;const resolvedShadowColor=useCustomValues||overrideShadow?shadowColor:variantStyles.shadowColor;const resolvedShadowBlur=useCustomValues||overrideShadow?shadowBlur:variantStyles.shadowBlur;const resolvedShadowY=useCustomValues||overrideShadow?shadowY:variantStyles.shadowY;const resolvedShadowOpacity=useCustomValues||overrideShadow?shadowOpacity:variantStyles.shadowOpacity;const boxShadow=useMemo(()=>{if(!resolvedShadowEnabled)return\"none\";const clampedOpacity=Math.max(0,Math.min(1,resolvedShadowOpacity));return`0 ${resolvedShadowY}px ${resolvedShadowBlur}px rgba(0, 0, 0, ${clampedOpacity}), 0 1px 2px ${resolvedShadowColor}`;},[resolvedShadowEnabled,resolvedShadowOpacity,resolvedShadowY,resolvedShadowBlur,resolvedShadowColor]);const hasExplicitWidth=style?.width!==undefined;const resolvedWidth=hasExplicitWidth?style?.width:\"max-content\";const resolvedLabelTextTransform=useMemo(()=>{switch(labelCase){case\"Uppercase\":return\"uppercase\";case\"Lowercase\":return\"lowercase\";case\"Capitalize\":return\"capitalize\";case\"None\":default:return\"none\";}},[labelCase]);const resolvedLabelFontWeight=useMemo(()=>{switch(labelWeight){case\"Medium\":return 500;case\"Semibold\":return 600;case\"Bold\":return 700;case\"Regular\":default:return 400;}},[labelWeight]);return /*#__PURE__*/_jsx(motion.button,{type:\"button\",\"aria-label\":label,\"data-cta-id\":trimmedCtaId||undefined,style:{// Spread incoming style first so Framer can still drive placement/sizing.\n...style,// Keep a positioned root so zIndex works reliably in normal layout.\nposition:(style?.position)||\"relative\",display:\"inline-flex\",alignItems:\"center\",justifyContent:\"center\",width:resolvedWidth,minWidth:hasExplicitWidth?0:\"max-content\",minHeight,padding:`${paddingY}px ${paddingX}px`,borderRadius,backgroundColor:resolvedTint,color:resolvedTextColor,border:`${Math.max(0,resolvedBorderWidth)}px solid ${resolvedBorderColor}`,boxShadow,cursor:\"pointer\",whiteSpace:\"nowrap\",fontFamily:\"Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif\",...buttonFont,outline:\"none\",// Layer control intentionally wins over incoming style.zIndex.\nzIndex:layer},className:className,whileHover:{scale:hoverScale,y:-hoverLift},whileTap:{scale:tapScale,y:0},transition:{type:\"spring\",stiffness:500,damping:34},children:/*#__PURE__*/_jsx(\"span\",{style:{width:hasExplicitWidth?\"100%\":\"max-content\",minWidth:0,whiteSpace:\"nowrap\",overflow:\"hidden\",textOverflow:\"ellipsis\",fontSize:labelFontSize,lineHeight:`${labelLineHeight}em`,letterSpacing:`${labelLetterSpacing}em`,textTransform:resolvedLabelTextTransform,fontWeight:resolvedLabelFontWeight},children:label})});}addPropertyControls(Web_to_app_cta_code_override_component,{label:{title:\"Label\",type:ControlType.String,defaultValue:\"Open in app\"},variant:{title:\"Variant\",type:ControlType.Enum,defaultValue:\"Primary\",options:[\"Primary\",\"Secondary\",\"Outline\",\"Ghost\",\"Custom\"]},overrideColors:{title:\"Override Colors\",type:ControlType.Boolean,defaultValue:true,enabledTitle:\"On\",disabledTitle:\"Off\"},overrideBorder:{title:\"Override Border\",type:ControlType.Boolean,defaultValue:true,enabledTitle:\"On\",disabledTitle:\"Off\"},overrideShadow:{title:\"Override Shadow\",type:ControlType.Boolean,defaultValue:true,enabledTitle:\"On\",disabledTitle:\"Off\"},tint:{title:\"Tint\",type:ControlType.Color,defaultValue:\"#000000\"},textColor:{title:\"Text\",type:ControlType.Color,defaultValue:\"#FFFFFF\"},borderColor:{title:\"Border\",type:ControlType.Color,defaultValue:\"rgba(255,255,255,0.18)\"},borderWidth:{title:\"Border W\",type:ControlType.Number,defaultValue:1,min:0,max:12,step:1},borderRadius:{title:\"Radius\",type:ControlType.Number,defaultValue:999,min:0,max:999,step:1},paddingX:{title:\"Pad X\",type:ControlType.Number,defaultValue:20,min:0,max:120,step:1},paddingY:{title:\"Pad Y\",type:ControlType.Number,defaultValue:12,min:0,max:80,step:1},minHeight:{title:\"Min H\",type:ControlType.Number,defaultValue:48,min:24,max:200,step:1},shadowEnabled:{title:\"Shadow\",type:ControlType.Boolean,defaultValue:true,enabledTitle:\"On\",disabledTitle:\"Off\"},shadowColor:{title:\"Sh Color\",type:ControlType.Color,defaultValue:\"rgba(0,0,0,0.12)\"},shadowBlur:{title:\"Sh Blur\",type:ControlType.Number,defaultValue:16,min:0,max:120,step:1},shadowY:{title:\"Sh Y\",type:ControlType.Number,defaultValue:6,min:-40,max:60,step:1},shadowOpacity:{title:\"Sh Opacity\",type:ControlType.Number,defaultValue:.16,min:0,max:1,step:.01},hoverScale:{title:\"Hover Scale\",type:ControlType.Number,defaultValue:1.02,min:.8,max:1.2,step:.01},hoverLift:{title:\"Hover Lift\",type:ControlType.Number,defaultValue:1,min:0,max:20,step:1},tapScale:{title:\"Tap Scale\",type:ControlType.Number,defaultValue:.98,min:.8,max:1.2,step:.01},layer:{title:\"Layer\",type:ControlType.Number,defaultValue:10,min:-100,max:9999,step:1},buttonFont:{type:ControlType.Font,title:\"Button Font\",defaultValue:{variant:\"Semibold\",fontSize:\"15px\",letterSpacing:\"-0.01em\",lineHeight:\"1em\"},controls:\"extended\",defaultFontType:\"sans-serif\"},labelFontSize:{title:\"Label Size\",type:ControlType.Number,defaultValue:15,min:8,max:80,step:1,unit:\"px\"},labelWeight:{title:\"Label Weight\",type:ControlType.Enum,defaultValue:\"Semibold\",options:[\"Regular\",\"Medium\",\"Semibold\",\"Bold\"]},labelLineHeight:{title:\"Line Height\",type:ControlType.Number,defaultValue:1,min:.8,max:3,step:.05,displayStepper:false},labelLetterSpacing:{title:\"Letter Spacing\",type:ControlType.Number,defaultValue:-.01,min:-.2,max:.5,step:.01,unit:\"em\"},labelCase:{title:\"Text Case\",type:ControlType.Enum,defaultValue:\"None\",options:[\"None\",\"Uppercase\",\"Lowercase\",\"Capitalize\"]},ctaId:{title:\"CTA ID\",type:ControlType.String,defaultValue:\"primary-cta\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Web_to_app_cta_code_override_component\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Web_to_App_CTA_Button_Customisable.map"],"mappings":"2NAIG,SAAwB,EAAuC,EAAM,CAAC,GAAK,CAAC,QAAM,UAAQ,iBAAe,iBAAe,iBAAe,OAAK,YAAU,cAAY,cAAY,eAAa,WAAS,WAAS,YAAU,gBAAc,cAAY,aAAW,UAAQ,gBAAc,aAAW,YAAU,WAAS,QAAM,aAAW,gBAAc,cAAY,kBAAgB,qBAAmB,YAAU,QAAM,SAAO,EAAY,EAAaA,MAAY,EAAM,EAAM,KAAK,EAAE,GAAG,CAAC,CAAK,CAAC,EAAQ,EAAeA,MAAoB,EAAa,YAAY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