{"version":3,"file":"NativeCheckboxCheckmark.jJoUEyng.mjs","names":["useRef","useCallback"],"sources":["https:/framerusercontent.com/modules/MlKq6RMQFLGq8YhW1HrS/CrjbHEZrH4MoNW3lYaWy/NativeCheckboxCheckmark.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef,useCallback,useEffect,useRef}from\"react\";/*\nUser request:\nCreate a code override export named NativeCheckboxCheckmark for a Framer native checkbox control. The override must preserve the real checkbox input, keyboard behavior, labels, focused state, and form submission. Apply browser-native checkbox appearance so a visible centered white checkmark is rendered when the checkbox is selected; do not create a decorative replacement. Preserve each control’s existing checked fill intent as closely as possible using accentColor, and retain normal unchecked cream/white presentation and existing border/focus behavior. Do not implement networking or change form values. It must be safe to apply to individual FormBooleanInputNode controls and work responsively.\n*/function resolveAccentColor(input){if(typeof window===\"undefined\")return\"#000000\";const computed=window.getComputedStyle(input);const candidates=[computed.accentColor,computed.backgroundColor,computed.borderColor,computed.color];for(const value of candidates){const normalized=(value||\"\").trim().toLowerCase();if(!normalized||normalized===\"auto\"||normalized===\"initial\"||normalized===\"transparent\")continue;return value;}return\"#000000\";}export function NativeCheckboxCheckmark(Component){return /*#__PURE__*/forwardRef(function NativeCheckboxCheckmarkOverride(props,ref){const nodeRef=useRef(null);const setCombinedRef=useCallback(node=>{nodeRef.current=node;if(typeof ref===\"function\")ref(node);else if(ref&&typeof ref===\"object\")ref.current=node;},[ref]);useEffect(()=>{if(typeof window===\"undefined\")return;const root=nodeRef.current;if(!root)return;const input=root instanceof HTMLInputElement&&root.type===\"checkbox\"?root:root.querySelector('input[type=\"checkbox\"]');if(!input)return;const previousAppearance=input.style.appearance;const previousWebkitAppearance=input.style.webkitAppearance;const previousAccentColor=input.style.accentColor;input.style.appearance=\"auto\";input.style.webkitAppearance=\"checkbox\";input.style.accentColor=resolveAccentColor(input);return()=>{input.style.appearance=previousAppearance;input.style.webkitAppearance=previousWebkitAppearance;input.style.accentColor=previousAccentColor;};},[]);return /*#__PURE__*/_jsx(Component,{ref:setCombinedRef,...props,style:{...props.style}});});}\nexport const __FramerMetadata__ = {\"exports\":{\"NativeCheckboxCheckmark\":{\"type\":\"reactHoc\",\"name\":\"NativeCheckboxCheckmark\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./NativeCheckboxCheckmark.map"],"mappings":"gJAGE,SAAS,EAAmB,EAAM,CAAC,GAAU,IAAS,OAAY,MAAM,UAAU,IAAM,EAAS,EAAO,iBAAiB,CAAK,EAAQ,EAAW,CAAC,EAAS,YAAY,EAAS,gBAAgB,EAAS,YAAY,EAAS,KAAK,EAAE,IAAI,IAAM,KAAS,EAAW,CAAC,IAAM,GAAY,GAAO,GAAA,CAAI,KAAK,CAAC,CAAC,YAAY,EAAK,MAAC,GAAY,IAAa,QAAQ,IAAa,WAAW,IAAa,eAAuB,OAAO,CAAM,CAAC,MAAM,SAAU,CAAC,SAAgB,EAAwB,EAAU,CAAC,OAAoB,EAAW,SAAyC,EAAM,EAAI,CAAC,IAAM,EAAQA,EAAO,IAAI,EAAQ,EAAeC,EAAY,GAAM,CAAC,EAAQ,QAAQ,EAAQ,OAAO,GAAM,WAAW,EAAI,CAAI,EAAU,GAAK,OAAO,GAAM,WAAS,EAAI,QAAQ,EAAK,EAAE,CAAC,CAAG,CAAC,EAA+pB,OAA7pB,MAAc,CAAC,GAAU,IAAS,OAAY,OAAO,IAAM,EAAK,EAAQ,QAAQ,GAAG,CAAC,EAAK,OAAO,IAAM,EAAM,aAAgB,kBAAkB,EAAK,OAAO,WAAW,EAAK,EAAK,cAAc,wBAAwB,EAAE,GAAG,CAAC,EAAM,OAAO,IAAM,EAAmB,EAAM,MAAM,WAAiB,EAAyB,EAAM,MAAM,iBAAuB,EAAoB,EAAM,MAAM,YAAoI,MAAxH,GAAM,MAAM,WAAW,OAAO,EAAM,MAAM,iBAAiB,WAAW,EAAM,MAAM,YAAY,EAAmB,CAAK,MAAY,CAAC,EAAM,MAAM,WAAW,EAAmB,EAAM,MAAM,iBAAiB,EAAyB,EAAM,MAAM,YAAY,CAAoB,CAAE,EAAE,CAAC,CAAC,EAAsB,EAAK,EAAU,CAAC,IAAI,EAAe,GAAG,EAAM,MAAM,CAAC,GAAG,EAAM,KAAK,CAAC,CAAC,CAAE,CAAC,CAAE,qBAHv8C,IAA2D"}