{"version":3,"file":"SelectionColorChanger.ChZLRVFM.mjs","names":[],"sources":["https:/framerusercontent.com/modules/1APnjTY2p0z9Ob0Jc4nO/I0iuoTeLdoIbLrcIHP7e/SelectionColorChanger.js"],"sourcesContent":["// Component to customize text selection color across the website\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useEffect}from\"react\";/**\n * Selection Color\n *\n * @framerIntrinsicWidth 0\n * @framerIntrinsicHeight 0\n *\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function SelectionColorChanger(props){const{selectionColor,selectionTextColor,style}=props;useEffect(()=>{if(typeof document===\"undefined\")return;const styleId=\"custom-selection-style\";let styleElement=document.getElementById(styleId);if(!styleElement){styleElement=document.createElement(\"style\");styleElement.id=styleId;document.head.appendChild(styleElement);}styleElement.textContent=`\n            ::selection {\n                background-color: ${selectionColor};\n                color: ${selectionTextColor};\n            }\n            ::-moz-selection {\n                background-color: ${selectionColor};\n                color: ${selectionTextColor};\n            }\n        `;return()=>{const element=document.getElementById(styleId);if(element){element.remove();}};},[selectionColor,selectionTextColor]);return /*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",width:0,height:0,opacity:0,pointerEvents:\"none\"}});}addPropertyControls(SelectionColorChanger,{selectionColor:{type:ControlType.Color,title:\"Selection Color\",defaultValue:\"#000000\"},selectionTextColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#FFFFFF\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"SelectionColorChanger\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"0\",\"framerSupportedLayoutHeight\":\"auto\",\"framerIntrinsicHeight\":\"0\",\"framerSupportedLayoutWidth\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./SelectionColorChanger.map"],"mappings":"0KASG,SAAwB,EAAsB,EAAM,CAAC,GAAK,CAAC,iBAAe,qBAAmB,SAAO,EASoC,OAT9B,MAAc,CAAC,GAAG,OAAO,SAAW,IAAY,OAAO,IAAM,EAAQ,yBAA6B,EAAa,SAAS,eAAe,CAAO,EASjP,OATuP,IAAc,EAAa,SAAS,cAAc,OAAO,EAAE,EAAa,GAAG,EAAQ,SAAS,KAAK,YAAY,CAAY,GAAG,EAAa,YAAY;;oCAElX,EAAe;yBAC1B,EAAmB;;;oCAGR,EAAe;yBAC1B,EAAmB;;cAExB,CAAC,IAAM,EAAQ,SAAS,eAAe,CAAO,EAAK,GAAS,EAAQ,OAAO,CAAG,CAAE,EAAE,CAAC,EAAe,CAAkB,CAAC,EAAsB,EAAK,MAAM,CAAC,MAAM,CAAC,SAAS,WAAW,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,cAAc,MAAM,CAAC,CAAC,CAAE,iBAjB/M,IAAoD,IAA6B,EAiB+H,EAAoB,EAAsB,CAAC,eAAe,CAAC,KAAK,EAAY,MAAM,MAAM,kBAAkB,aAAa,SAAS,EAAE,mBAAmB,CAAC,KAAK,EAAY,MAAM,MAAM,aAAa,aAAa,SAAS,CAAC,CAAC"}