{"version":3,"file":"ButtonCTA.Cmptd2L0.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/obro5Ta9WcUg1J1knO54/aXwjNG4El1JtXrnh1Y23/ButtonCTA.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{motion}from\"framer-motion\";import{useEffect,useState}from\"react\";/**\n * Button — CTA\n *\n * Evergreen, reusable pill/rect button for CTAs like \"View All\" — matches\n * Figma node 577:1492 (\"Path — Hiring\"): bordered chip, backdrop blur,\n * 24/18 padding, 11px Inter Bold uppercase label with 1.1px tracking.\n *\n * Hover behavior reuses the same sweep mechanic already established in this\n * project — SectionTitle.tsx (on-appear sweep) and CaseCardGrid.tsx's\n * \"Read More\" CTA highlight (on-hover sweep): an absolutely-positioned\n * layer scaled from 0 → full width on the X axis, anchored to one edge via\n * transform-origin, driven by framer-motion's whileHover variants (no\n * local mouse-tracking state needed). Border and text color can optionally\n * shift on hover too.\n *\n * Every visual property (font, size, colors, spacing, radius, blur, sweep\n * color/direction/speed) is exposed as a control below — nothing is\n * hardcoded, so this one component can be dropped in anywhere on the site\n * and restyled per instance from the Properties panel.\n *\n * Renders as a real <a> when a Link is set (keyboard/focus/SEO friendly),\n * or a plain div if left empty (e.g. used as a static label).\n */export default function ButtonCTA(props){const{variant,mobileBreakpoint,content,typography,colors,layout,hoverHighlight}=props;const{text=\"View All\",link,openInNewTab=false}=content||{};const{font,fontSizeDesktop=11,fontSizeMobile=11,letterSpacing=1.1,uppercase=true}=typography||{};const{textColor=\"#2A291E\",textColorHover=\"#2A291E\",backgroundColor=\"rgba(255,255,255,0.5)\",borderColor=\"#E0E0E0\",borderColorHover=\"#2A291E\"}=colors||{};const{paddingHorizontal=24,paddingVertical=18,borderRadius=0,borderWidth=1,backdropBlur=6}=layout||{};const{enabled:sweepEnabled=true,color:highlightColor=\"#F4F4AD\",direction=\"Left to Right\",duration=.35,easing=\"easeOut\"}=hoverHighlight||{};// Real viewport width (not the button's own hug-sized box) — same\n// approach as SectionTitle.tsx, since a fit-content chip can't\n// reliably measure a meaningful container width via ResizeObserver.\nconst[isMobileMedia,setIsMobileMedia]=useState(false);useEffect(()=>{if(variant!==\"Auto\")return;if(typeof window===\"undefined\"||!window.matchMedia)return;const mql=window.matchMedia(`(max-width: ${mobileBreakpoint}px)`);const update=()=>setIsMobileMedia(mql.matches);update();if(mql.addEventListener){mql.addEventListener(\"change\",update);return()=>mql.removeEventListener(\"change\",update);}else{// Safari < 14 fallback\nmql.addListener(update);return()=>mql.removeListener(update);}},[variant,mobileBreakpoint]);const isMobile=variant===\"Mobile\"||variant===\"Auto\"&&isMobileMedia;const transformOrigin=direction===\"Right to Left\"?\"right\":\"left\";const Tag=link?motion.a:motion.div;return /*#__PURE__*/_jsxs(Tag,{href:link||undefined,target:link&&openInNewTab?\"_blank\":undefined,rel:link&&openInNewTab?\"noopener noreferrer\":undefined,initial:\"rest\",whileHover:\"hover\",whileTap:link?{scale:.98}:undefined,animate:\"rest\",variants:{rest:{borderColor},hover:{borderColor:borderColorHover}},transition:{duration,ease:easing},style:{position:\"relative\",display:\"inline-flex\",alignItems:\"center\",justifyContent:\"center\",width:\"fit-content\",boxSizing:\"border-box\",overflow:\"hidden\",cursor:link?\"pointer\":\"default\",textDecoration:\"none\",backgroundColor,borderStyle:\"solid\",borderWidth,borderRadius,padding:`${paddingVertical}px ${paddingHorizontal}px`,backdropFilter:backdropBlur?`blur(${backdropBlur}px)`:undefined,WebkitBackdropFilter:backdropBlur?`blur(${backdropBlur}px)`:undefined},children:[sweepEnabled&&/*#__PURE__*/_jsx(motion.div,{\"aria-hidden\":true,variants:{rest:{scaleX:0},hover:{scaleX:1}},transition:{duration,ease:easing},style:{position:\"absolute\",inset:0,backgroundColor:highlightColor,transformOrigin,zIndex:0}}),/*#__PURE__*/_jsx(motion.span,{variants:{rest:{color:textColor},hover:{color:textColorHover}},transition:{duration,ease:easing},style:{position:\"relative\",zIndex:1,margin:0,...font,fontSize:isMobile?fontSizeMobile:fontSizeDesktop,lineHeight:\"normal\",letterSpacing,textTransform:uppercase?\"uppercase\":\"none\",whiteSpace:\"nowrap\",wordBreak:\"break-word\"},children:text})]});}ButtonCTA.displayName=\"Button — CTA\";addPropertyControls(ButtonCTA,{variant:{type:ControlType.Enum,title:\"Variant\",options:[\"Auto\",\"Desktop\",\"Mobile\"],optionTitles:[\"Auto (responsive)\",\"Force Desktop\",\"Force Mobile\"],defaultValue:\"Auto\"},mobileBreakpoint:{type:ControlType.Number,title:\"Mobile Below (px)\",defaultValue:809,min:300,max:1200,step:1,hidden:props=>props.variant!==\"Auto\"},content:{type:ControlType.Object,title:\"Content\",controls:{text:{type:ControlType.String,title:\"Text\",defaultValue:\"View All\"},link:{type:ControlType.Link,title:\"Link\"},openInNewTab:{type:ControlType.Boolean,title:\"Open In New Tab\",defaultValue:false}}},typography:{type:ControlType.Object,title:\"Typography\",controls:{font:{type:ControlType.Font,title:\"Font\",controls:\"default\",defaultValue:{fontFamily:\"Inter\",fontWeight:700}},fontSizeDesktop:{type:ControlType.Number,title:\"Size (Desktop)\",defaultValue:11,min:8,max:60,step:1},fontSizeMobile:{type:ControlType.Number,title:\"Size (Mobile)\",defaultValue:11,min:8,max:60,step:1},letterSpacing:{type:ControlType.Number,title:\"Letter Spacing\",defaultValue:1.1,min:-4,max:8,step:.01},uppercase:{type:ControlType.Boolean,title:\"Uppercase\",defaultValue:true}}},colors:{type:ControlType.Object,title:\"Colors\",controls:{textColor:{type:ControlType.Color,title:\"Text\",defaultValue:\"#2A291E\"},textColorHover:{type:ControlType.Color,title:\"Text (Hover)\",defaultValue:\"#2A291E\"},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"rgba(255,255,255,0.5)\"},borderColor:{type:ControlType.Color,title:\"Border\",defaultValue:\"#E0E0E0\"},borderColorHover:{type:ControlType.Color,title:\"Border (Hover)\",defaultValue:\"#2A291E\"}}},layout:{type:ControlType.Object,title:\"Layout\",controls:{paddingHorizontal:{type:ControlType.Number,title:\"Padding Horizontal\",defaultValue:24,min:0,max:100,step:1},paddingVertical:{type:ControlType.Number,title:\"Padding Vertical\",defaultValue:18,min:0,max:100,step:1},borderRadius:{type:ControlType.Number,title:\"Border Radius\",defaultValue:0,min:0,max:200,step:1},borderWidth:{type:ControlType.Number,title:\"Border Width\",defaultValue:1,min:0,max:20,step:1},backdropBlur:{type:ControlType.Number,title:\"Backdrop Blur\",defaultValue:6,min:0,max:40,step:1}}},hoverHighlight:{type:ControlType.Object,title:\"Hover Highlight\",controls:{enabled:{type:ControlType.Boolean,title:\"Enabled\",defaultValue:true},color:{type:ControlType.Color,title:\"Highlight (Accent/Yellow)\",defaultValue:\"#F4F4AD\",hidden:props=>!props.enabled},direction:{type:ControlType.Enum,title:\"Sweep Direction\",options:[\"Left to Right\",\"Right to Left\"],defaultValue:\"Left to Right\",hidden:props=>!props.enabled},duration:{type:ControlType.Number,title:\"Duration (s)\",defaultValue:.35,min:.05,max:2,step:.05,hidden:props=>!props.enabled},easing:{type:ControlType.Enum,title:\"Easing\",options:[\"easeOut\",\"easeIn\",\"easeInOut\",\"linear\"],defaultValue:\"easeOut\",hidden:props=>!props.enabled}}}})// @framerSupportedLayoutWidth auto\n// @framerSupportedLayoutHeight auto\n;\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ButtonCTA\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ButtonCTA.map"],"mappings":"uPAsBG,SAAwB,EAAU,EAAM,CAAC,GAAK,CAAC,UAAQ,mBAAiB,UAAQ,aAAW,SAAO,SAAO,kBAAgB,EAAW,CAAC,OAAK,WAAW,OAAK,eAAa,IAAO,GAAS,CAAC,EAAO,CAAC,OAAK,kBAAgB,GAAG,iBAAe,GAAG,gBAAc,IAAI,YAAU,IAAM,GAAY,CAAC,EAAO,CAAC,YAA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