{"version":3,"file":"HyveOutlineButton.BCRoAzTY.mjs","names":["React.useState","p"],"sources":["https:/framerusercontent.com/modules/DsYEfSzAHwtLM0IC72cS/P2VIhs0qOkmRGaFcpVZF/HyveOutlineButton.js"],"sourcesContent":["/**\n *  © 2025 Hyve Digital // All rights reserved. // https://hyve.digital\n * HyveOutlineButton - v1.7.0\n * Last updated: 2025-01-10\n * Hyve Digital Button System\n * Changelog v1.7.0: Rebranded from OutlineButton - CSS vars now use --hyve-* prefix\n * Changelog v1.5.4: Accessibility improvements via BaseButton v1.5.4 (ARIA tags)\n * Changelog v1.5.3: Now works with Framer Fill/Fit Content (requires BaseButton v1.5.3)\n * Changelog v1.5.2: Restored Disabled/Loading toggles + conditional Loading Text field\n * Changelog v1.5.1: Made loadingText always visible (not conditionally hidden)\n * Changelog v1.5.0: Added loadingText prop for per-instance loading messages\n * Changelog v1.4.0: Refactored UX - moved Disabled/Loading to Developer section (commented out for MVP)\n * Changelog v1.3.4: UI polish - moved Link to top, removed Debug Border\n * Changelog v1.3.3: Fixed initial shadow load timing (use useEffect)\n * Changelog v1.3.2: Fixed shadow rendering bug (removed useMemo caching)\n * Changelog v1.3.1: Added Link support + pressed state shadow reduction\n */import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";import{BaseButton}from\"https://framerusercontent.com/modules/1iq69sT5EHowdsAyHkWm/7k6MAmHEEGHEdtg47rP5/BaseButton.js\";import{ICONS}from\"https://framerusercontent.com/modules/ScPIzZV2nYt49GMDbLGr/wXpGoJja7aWBVIIgpRgs/IconSelectAdapter.js\";// Helper for CSS variables\nconst v=(name,fallback)=>`var(${name}, ${fallback})`;/**\n * Parse a CSS box-shadow and reduce the blur radius for pressed state\n */function reduceShadowBlur(shadow){if(!shadow||shadow===\"none\")return\"none\";const shadowPattern=/^([+-]?\\d+(?:\\.\\d+)?(?:px|rem|em)?)\\s+([+-]?\\d+(?:\\.\\d+)?(?:px|rem|em)?)\\s+([+-]?\\d+(?:\\.\\d+)?(?:px|rem|em)?)(?:\\s+([+-]?\\d+(?:\\.\\d+)?(?:px|rem|em)?))?(.*)$/;const match=shadow.trim().match(shadowPattern);if(!match)return shadow;const[,hOffset,vOffset,blur,spread,rest]=match;const blurMatch=blur.match(/^([+-]?\\d+(?:\\.\\d+)?)(px|rem|em)?$/);if(!blurMatch)return shadow;const blurValue=parseFloat(blurMatch[1]);const blurUnit=blurMatch[2]||\"px\";const reducedBlur=Math.max(1,blurValue*.2);const newBlur=`${reducedBlur}${blurUnit}`;const vOffsetMatch=vOffset.match(/^([+-]?\\d+(?:\\.\\d+)?)(px|rem|em)?$/);if(vOffsetMatch){const vValue=parseFloat(vOffsetMatch[1]);const vUnit=vOffsetMatch[2]||\"px\";const reducedVOffset=Math.max(1,vValue*.5);const newVOffset=`${reducedVOffset}${vUnit}`;if(spread){return`${hOffset} ${newVOffset} ${newBlur} ${spread}${rest}`;}return`${hOffset} ${newVOffset} ${newBlur}${rest}`;}if(spread){return`${hOffset} ${vOffset} ${newBlur} ${spread}${rest}`;}return`${hOffset} ${vOffset} ${newBlur}${rest}`;}export function HyveOutlineButton(props){const{tone=\"default\",disabled=false,loadingText,...rest}=props;const[pressed,setPressed]=React.useState(false);const[baseShadow,setBaseShadow]=React.useState(\"none\");/**\n     * OUTLINE (SECONDARY COLOR) SPEC (default):\n     * Basic: Fill base, Stroke brand-300, Text brand-700\n     * Hover: Fill brand-50, Stroke brand-300, Text brand-700\n     * Disabled: Fill base, Stroke grey-200, Text grey-400\n     * Shadow: Only on default tone when not disabled\n     * Pressed: Shadow blur reduced to 20% for tactile feedback\n     *\n     * OUTLINE DESTRUCTIVE SPEC:\n     * Basic: Fill base, Stroke destructive-300, Text destructive-700\n     * Hover: Fill destructive-50, Stroke destructive-300, Text destructive-700\n     * Disabled: Same as grey\n     * Shadow: None\n     */const base=v(\"--hyve-base\",\"#FFFFFF\");const brand50=v(\"--hyve-brand-50\",\"#E6F0FF\");const brand300=v(\"--hyve-brand-300\",\"#66A3FF\");const brand700=v(\"--hyve-brand-700\",\"#0059C9\");const dest50=v(\"--hyve-destructive-50\",\"#FEF2F2\");const dest300=v(\"--hyve-destructive-300\",\"#FCA5A5\");const dest700=v(\"--hyve-destructive-700\",\"#B91C1C\");const grey200=v(\"--hyve-grey-200\",\"#E5E7EB\");const grey400=v(\"--hyve-grey-400\",\"#9CA3AF\");// Read shadow after mount when CSS is ready\nReact.useEffect(()=>{if(typeof window===\"undefined\")return;if(tone!==\"default\"||disabled){setBaseShadow(\"none\");return;}const shadowValue=getComputedStyle(document.documentElement).getPropertyValue(\"--hyve-shadow\").trim();setBaseShadow(shadowValue||\"none\");},[tone,disabled]);// Apply pressed shadow reduction\nconst shadow=pressed&&baseShadow!==\"none\"?reduceShadowBlur(baseShadow):baseShadow;const hoverBg=tone===\"destructive\"?dest50:brand50;const borderColor=tone===\"destructive\"?dest300:brand300;const textColor=tone===\"destructive\"?dest700:brand700;return /*#__PURE__*/_jsx(BaseButton,{...rest,disabled:disabled,loadingText:loadingText,background:base,backgroundHover:hoverBg,backgroundPressed:hoverBg,backgroundDisabled:base,color:textColor,colorDisabled:grey400,borderColor:borderColor,borderColorHover:borderColor,borderColorPressed:borderColor,borderColorDisabled:grey200,borderStyle:\"full\",boxShadow:shadow,onPressedChange:setPressed});}addPropertyControls(HyveOutlineButton,{text:{type:ControlType.String,title:\"Label\",defaultValue:\"Button\"},link:{type:ControlType.Link,title:\"Link\"},openInNewTab:{type:ControlType.Boolean,title:\"Open in New Tab\",defaultValue:false,hidden:props=>!props.link},tone:{type:ControlType.Enum,title:\"Tone\",options:[\"default\",\"destructive\"],defaultValue:\"default\"},size:{type:ControlType.Enum,title:\"Size\",options:[\"s\",\"m\",\"l\",\"xl\",\"xxl\"],defaultValue:\"m\"},leadingIconName:{type:ControlType.Enum,title:\"Leading Icon\",options:[null,...Object.keys(ICONS)],optionTitles:[\"None\",...Object.keys(ICONS)],hidden:p=>!!p.leadingIconSvg},trailingIconName:{type:ControlType.Enum,title:\"Trailing Icon\",options:[null,...Object.keys(ICONS)],optionTitles:[\"None\",...Object.keys(ICONS)],hidden:p=>!!p.trailingIconSvg},leadingIconSvg:{type:ControlType.String,title:\"Leading SVG\",displayTextArea:true,hidden:p=>!!p.leadingIconName},trailingIconSvg:{type:ControlType.String,title:\"Trailing SVG\",displayTextArea:true,hidden:p=>!!p.trailingIconName},iconOnly:{type:ControlType.Boolean,title:\"Icon Only\",defaultValue:false},animateTrailingIcon:{type:ControlType.Boolean,title:\"Animate Trailing Icon\",defaultValue:true,hidden:p=>!p.trailingIconName&&!p.trailingIconSvg},disabled:{type:ControlType.Boolean,title:\"Disabled\",defaultValue:false},loading:{type:ControlType.Boolean,title:\"Loading\",defaultValue:false},loadingText:{type:ControlType.String,title:\"Loading Text\",defaultValue:\"\",placeholder:\"e.g. Submitting...\",hidden:props=>!props.loading}});\nexport const __FramerMetadata__ = {\"exports\":{\"HyveOutlineButton\":{\"type\":\"reactComponent\",\"name\":\"HyveOutlineButton\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}"],"mappings":"6PAmBG,SAAS,EAAiB,EAAO,CAAC,GAAG,CAAC,GAAQ,IAAS,OAAO,MAAM,OAA0L,IAAM,EAAM,EAAO,MAAM,CAAC,MAAzL,+JAA6M,CAAC,GAAG,CAAC,EAAM,OAAO,EAAO,GAAK,EAAE,EAAQ,EAAQ,EAAK,EAAO,GAAM,EAAY,EAAU,EAAK,MAAM,qCAAqC,CAAC,GAAG,CAAC,EAAU,OAAO,EAAO,IAAM,EAAU,WAAW,EAAU,GAAG,CAAO,EAAS,EAAU,IAAI,KAAsD,EAAQ,GAAvC,KAAK,IAAI,EAAE,EAAU,GAAG,GAAgC,IAAiB,EAAa,EAAQ,MAAM,qCAAqC,CAAC,GAAG,EAAa,CAAC,IAAM,EAAO,WAAW,EAAa,GAAG,CAAO,EAAM,EAAa,IAAI,KAAsD,EAA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