{"version":3,"file":"CustomScrollbar.CxMNc5LP.mjs","names":["p","_Fragment"],"sources":["https:/framerusercontent.com/modules/gbKRxg0Gm3m9pC2Ny3fD/qpk5KIR1NKKfDE1immps/CustomScrollbar.js"],"sourcesContent":["import{jsx as _jsx,Fragment as _Fragment}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useEffect}from\"react\";/**\n * @author Naceja\n */export default function CustomScrollbar({bar,track,thumb}){const barPadding=bar.padding.split(\" \").map((p,i,paddingArgs)=>{if(paddingArgs.length===1){return`border: ${p} solid ${track.color};`;}return`border-${({0:\"top\",1:\"right\",2:\"bottom\",3:\"left\"})[i]}: ${p} solid ${track.color};\n        `;});const cssScrollbar=`\n        ::-webkit-scrollbar {\n            width: ${bar.width}px;\n            height: ${bar.height}px;\n            display: ${bar.hidden?\"none\":\"initial\"} \n        }\n        ::-webkit-scrollbar-track {\n            background: ${track.color};\n        }\n        ::-webkit-scrollbar-thumb { \n            ${barPadding}\n            background: ${thumb.color};\n            border-radius: ${thumb.radius};\n            min-height: ${thumb.minSize}px;\n            min-width: ${thumb.minSize}px;\n        }\n        ::-webkit-scrollbar-thumb:hover { \n            background: ${thumb.hoverColor};\n        }\n\n        @-moz-document url-prefix() {\n            * {\n                scrollbar-width: thin;\n                scrollbar-color: ${track.color};\n            }\n        }\n    `;useEffect(()=>{let style=document.getElementById(\"framer-custom-scrollbar\");if(!style){style=document.createElement(\"style\");style.id=\"framer-custom-scrollbar\";document.head.appendChild(style);}style.innerHTML=cssScrollbar;return()=>{document.head.removeChild(style);};},[bar,track,thumb]);return /*#__PURE__*/_jsx(_Fragment,{});}addPropertyControls(CustomScrollbar,{track:{hidden:props=>Boolean(props.bar.hidden),type:ControlType.Object,title:\"Track\",description:\"Track bar customizations\",controls:{color:{type:ControlType.Color,title:\"Color\",defaultValue:\"transparent\"}}},thumb:{hidden:props=>Boolean(props.bar.hidden),type:ControlType.Object,title:\"Thumb\",description:\"Thumb bar customizations\",controls:{color:{type:ControlType.Color,title:\"Color\",defaultValue:\"#0099FF\"},hoverColor:{type:ControlType.Color,title:\"Hover Color\",defaultValue:\"#0055FF\"},radius:{type:ControlType.BorderRadius,title:\"Border Radius\",defaultValue:\"100px\"},minSize:{type:ControlType.Number,title:\"Min Size\",description:\"The minimum size to thumb (Width/Height according to content)\",defaultValue:50}}},bar:{type:ControlType.Object,title:\"Bar\",description:\"Bar (Scrollbar container) customizations\",controls:{width:{type:ControlType.Number,title:\"Width\",description:\"For vertical scrollbar\",defaultValue:5},height:{type:ControlType.Number,title:\"Height\",description:\"For horizontal scrollbar\",defaultValue:5},hidden:{type:ControlType.Boolean,title:\"Hidden?\",defaultValue:false},padding:{type:ControlType.Padding,title:\"Padding (spacing)\",description:\"Consider the bar sizes for this value\",defaultValue:\"0px\"}}}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CustomScrollbar\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CustomScrollbar.map"],"mappings":"yQAEG,SAAwB,EAAgB,CAAC,MAAI,QAAM,SAAO,CAAC,IAAM,EAAW,EAAI,QAAQ,MAAM,IAAI,CAAC,KAAK,EAAE,EAAE,IAAkB,EAAY,SAAS,EAAS,WAAWA,EAAE,SAAS,EAAM,MAAM,GAAU,UAAW,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,CAAE,GAAG,IAAIA,EAAE,SAAS,EAAM,MAAM;UACjR,CAAO,EAAa;;qBAEX,EAAI,MAAM;sBACT,EAAI,OAAO;uBACV,EAAI,OAAO,OAAO,UAAU;;;0BAGzB,EAAM,MAAM;;;cAGxB,EAAW;0BACC,EAAM,MAAM;6BACT,EAAM,OAAO;0BAChB,EAAM,QAAQ;yBACf,EAAM,QAAQ;;;0BAGb,EAAM,WAAW;;;;;;mCAMR,EAAM,MAAM;;;MAGyP,OAAlS,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