UNPKG

@c15t/react

Version:

Developer-first CMP for React: cookie banner, consent manager, preferences centre. GDPR ready with minimal setup and rich customization

1 lines 12.8 kB
"use strict";let __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_modules__={"../../../../../../../node_modules/.pnpm/@rsbuild+core@1.3.5/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[1].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[1].use[2]!./src/components/shared/ui/switch/switch.module.css":function(e,r,o){o.d(r,{Z:()=>d});var t=o("../../node_modules/.pnpm/@rsbuild+core@1.3.5/node_modules/@rsbuild/core/compiled/css-loader/noSourceMaps.js"),c=o.n(t),a=o("../../node_modules/.pnpm/@rsbuild+core@1.3.5/node_modules/@rsbuild/core/compiled/css-loader/api.js"),s=o.n(a)()(c());s.push([e.id,':root{--switch-height:1.25rem;--switch-width:2rem;--switch-padding:.125rem;--switch-duration:.2s;--switch-ease:cubic-bezier(.4,0,.2,1);--switch-thumb-size:.75rem;--switch-thumb-size-disabled:.625rem;--switch-thumb-translate:.75rem;--switch-background-color:#ebebeb;--switch-background-color-dark:#333;--switch-background-color-hover:#d1d1d1;--switch-background-color-hover-dark:#292929;--switch-background-color-checked:#335cff;--switch-background-color-checked-dark:#2547d0;--switch-background-color-disabled:#fff;--switch-background-color-disabled-dark:#171717;--switch-thumb-background-color:#fff;--switch-thumb-background-color-dark:#f7f7f7;--switch-thumb-background-color-disabled:#f7f7f7;--switch-thumb-background-color-disabled-dark:#333;--switch-shadow-thumb:0 0 0 1px #ebebeb;--switch-shadow-thumb-dark:0 0 0 1px #333;--switch-focus-ring:#335cff;--switch-focus-ring-dark:#2547d0;--switch-focus-shadow:0 0 0 2px var(--switch-focus-ring);--switch-focus-shadow-dark:0 0 0 2px var(--switch-focus-ring-dark)}.c15t-root-qh0zR{height:var(--switch-height);width:var(--switch-width);padding:var(--switch-padding);white-space:nowrap;background:0 0;border:0;border-radius:9999px;outline:none;flex-shrink:0;margin:0;font-family:inherit;font-size:100%;line-height:1.15;display:block}.c15t-track-OlfR7{height:calc(var(--switch-height) - 2*var(--switch-padding));width:calc(var(--switch-width) - 2*var(--switch-padding));padding:var(--switch-padding);background-color:var(--switch-background-color);transition:all var(--switch-duration)var(--switch-ease);border-radius:9999px;outline:none;position:relative}.c15t-dark .c15t-track-OlfR7{background-color:var(--switch-background-color-dark)}.c15t-track-OlfR7:hover{background-color:var(--switch-background-color-hover)}.c15t-dark .c15t-track-OlfR7:hover{background-color:var(--switch-background-color-hover-dark)}.c15t-track-OlfR7:focus-visible{background-color:var(--switch-background-color-hover)}.c15t-dark .c15t-track-OlfR7:focus-visible{background-color:var(--switch-background-color-hover-dark)}.c15t-track-OlfR7:active{background-color:var(--switch-background-color)}.c15t-dark .c15t-track-OlfR7:active{background-color:var(--switch-background-color-dark)}.c15t-root-qh0zR[data-state=checked] .c15t-track-OlfR7{background-color:var(--switch-background-color-checked)}.c15t-dark .c15t-root-qh0zR[data-state=checked] .c15t-track-OlfR7{background-color:var(--switch-background-color-checked-dark)}.c15t-root-qh0zR[data-state=checked]:hover .c15t-track-OlfR7{background-color:var(--switch-background-color-checked)}.c15t-dark .c15t-root-qh0zR[data-state=checked]:hover .c15t-track-OlfR7{background-color:var(--switch-background-color-checked-dark)}.c15t-root-qh0zR[data-disabled]{cursor:not-allowed}.c15t-root-qh0zR:focus{outline:none}.c15t-dark .c15t-root-qh0zR:focus{outline:none}.c15t-track-disabled-reR3p{background-color:var(--switch-background-color-disabled);opacity:.4;box-shadow:inset 0 0 0 1px #ebebeb}.c15t-dark .c15t-track-disabled-reR3p{background-color:var(--switch-background-color-disabled-dark)}.c15t-root-qh0zR[data-state=checked] .c15t-track-disabled-reR3p{background-color:var(--switch-background-color-checked);opacity:.4;box-shadow:none}.c15t-dark .c15t-root-qh0zR[data-state=checked] .c15t-track-disabled-reR3p{background-color:var(--switch-background-color-checked-dark)}.c15t-thumb-JukBu{pointer-events:none;width:var(--switch-thumb-size);height:var(--switch-thumb-size);transition:transform var(--switch-duration)var(--switch-ease);display:block;position:relative;transform:translate(0)}.c15t-thumb-JukBu:before{content:"";inset-block:0;background-color:var(--switch-thumb-background-color);border-radius:9999px;width:100%;position:absolute;left:0;mask:radial-gradient(circle farthest-side,#0000 1.95px,#000 2.05px 100%) 50%/100% 100% no-repeat}.c15t-dark .c15t-thumb-JukBu:before{background-color:var(--switch-thumb-background-color-dark)}.c15t-thumb-JukBu:after{content:"";inset-block:0;width:100%;box-shadow:var(--switch-shadow-thumb);border-radius:9999px;position:absolute;left:0}.c15t-dark .c15t-thumb-JukBu:after{box-shadow:var(--switch-shadow-thumb-dark)}.c15t-root-qh0zR[data-state=checked] .c15t-thumb-JukBu{transform:translateX(var(--switch-thumb-translate))}.c15t-root-qh0zR[dir=rtl][data-state=checked] .c15t-thumb-JukBu{transform:translateX(calc(-1*var(--switch-thumb-translate)))}.c15t-track-OlfR7:active .c15t-thumb-JukBu{transform:scale(.833)}.c15t-thumb-disabled-s9gXH{box-shadow:none}.c15t-root-qh0zR[data-state=checked] .c15t-thumb-disabled-s9gXH{transform:translateX(var(--switch-thumb-translate))}.c15t-root-qh0zR:focus-visible{box-shadow:var(--switch-focus-shadow);outline:none}.c15t-dark .c15t-root-qh0zR:focus-visible{box-shadow:var(--switch-focus-shadow-dark)}',""]),s.locals={root:"c15t-root-qh0zR",track:"c15t-track-OlfR7","track-disabled":"c15t-track-disabled-reR3p",trackDisabled:"c15t-track-disabled-reR3p",thumb:"c15t-thumb-JukBu","thumb-disabled":"c15t-thumb-disabled-s9gXH",thumbDisabled:"c15t-thumb-disabled-s9gXH"};let d=s},"../../node_modules/.pnpm/@rsbuild+core@1.3.5/node_modules/@rsbuild/core/compiled/css-loader/api.js":function(e){e.exports=function(e){var r=[];return r.toString=function(){return this.map(function(r){var o="",t=void 0!==r[5];return r[4]&&(o+="@supports (".concat(r[4],") {")),r[2]&&(o+="@media ".concat(r[2]," {")),t&&(o+="@layer".concat(r[5].length>0?" ".concat(r[5]):""," {")),o+=e(r),t&&(o+="}"),r[2]&&(o+="}"),r[4]&&(o+="}"),o}).join("")},r.i=function(e,o,t,c,a){"string"==typeof e&&(e=[[null,e,void 0]]);var s={};if(t)for(var d=0;d<this.length;d++){var i=this[d][0];null!=i&&(s[i]=!0)}for(var n=0;n<e.length;n++){var u=[].concat(e[n]);t&&s[u[0]]||(void 0!==a&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=a),o&&(u[2]&&(u[1]="@media ".concat(u[2]," {").concat(u[1],"}")),u[2]=o),c&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=c):u[4]="".concat(c)),r.push(u))}},r}},"../../node_modules/.pnpm/@rsbuild+core@1.3.5/node_modules/@rsbuild/core/compiled/css-loader/noSourceMaps.js":function(e){e.exports=function(e){return e[1]}},"../../node_modules/.pnpm/@rsbuild+core@1.3.5/node_modules/@rsbuild/core/compiled/style-loader/runtime/injectStylesIntoStyleTag.js":function(e){var r=[];function o(e){for(var o=-1,t=0;t<r.length;t++)if(r[t].identifier===e){o=t;break}return o}function t(e,t){for(var c={},a=[],s=0;s<e.length;s++){var d=e[s],i=t.base?d[0]+t.base:d[0],n=c[i]||0,u="".concat(i," ").concat(n);c[i]=n+1;var l=o(u),_={css:d[1],media:d[2],sourceMap:d[3],supports:d[4],layer:d[5]};if(-1!==l)r[l].references++,r[l].updater(_);else{var b=function(e,r){var o=r.domAPI(r);return o.update(e),function(r){r?(r.css!==e.css||r.media!==e.media||r.sourceMap!==e.sourceMap||r.supports!==e.supports||r.layer!==e.layer)&&o.update(e=r):o.remove()}}(_,t);t.byIndex=s,r.splice(s,0,{identifier:u,updater:b,references:1})}a.push(u)}return a}e.exports=function(e,c){var a=t(e=e||[],c=c||{});return function(e){e=e||[];for(var s=0;s<a.length;s++){var d=o(a[s]);r[d].references--}for(var i=t(e,c),n=0;n<a.length;n++){var u=o(a[n]);0===r[u].references&&(r[u].updater(),r.splice(u,1))}a=i}}},"../../node_modules/.pnpm/@rsbuild+core@1.3.5/node_modules/@rsbuild/core/compiled/style-loader/runtime/insertBySelector.js":function(e){var r={};e.exports=function(e,o){var t=function(e){if(void 0===r[e]){var o=document.querySelector(e);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(e){o=null}r[e]=o}return r[e]}(e);if(!t)throw Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");t.appendChild(o)}},"../../node_modules/.pnpm/@rsbuild+core@1.3.5/node_modules/@rsbuild/core/compiled/style-loader/runtime/insertStyleElement.js":function(e){e.exports=function(e){var r=document.createElement("style");return e.setAttributes(r,e.attributes),e.insert(r,e.options),r}},"../../node_modules/.pnpm/@rsbuild+core@1.3.5/node_modules/@rsbuild/core/compiled/style-loader/runtime/setAttributesWithoutAttributes.js":function(e,r,o){e.exports=function(e){var r=o.nc;r&&e.setAttribute("nonce",r)}},"../../node_modules/.pnpm/@rsbuild+core@1.3.5/node_modules/@rsbuild/core/compiled/style-loader/runtime/styleDomAPI.js":function(e){e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var r=e.insertStyleElement(e);return{update:function(o){var t,c,a;t="",o.supports&&(t+="@supports (".concat(o.supports,") {")),o.media&&(t+="@media ".concat(o.media," {")),(c=void 0!==o.layer)&&(t+="@layer".concat(o.layer.length>0?" ".concat(o.layer):""," {")),t+=o.css,c&&(t+="}"),o.media&&(t+="}"),o.supports&&(t+="}"),(a=o.sourceMap)&&"undefined"!=typeof btoa&&(t+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),e.styleTagTransform(t,r,e.options)},remove:function(){!function(e){if(null!==e.parentNode)e.parentNode.removeChild(e)}(r)}}}},"../../node_modules/.pnpm/@rsbuild+core@1.3.5/node_modules/@rsbuild/core/compiled/style-loader/runtime/styleTagTransform.js":function(e){e.exports=function(e,r){if(r.styleSheet)r.styleSheet.cssText=e;else{for(;r.firstChild;)r.removeChild(r.firstChild);r.appendChild(document.createTextNode(e))}}}},__webpack_module_cache__={};function __webpack_require__(e){var r=__webpack_module_cache__[e];if(void 0!==r)return r.exports;var o=__webpack_module_cache__[e]={id:e,exports:{}};return __webpack_modules__[e](o,o.exports,__webpack_require__),o.exports}__webpack_require__.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(r,{a:r}),r},__webpack_require__.d=(e,r)=>{for(var o in r)__webpack_require__.o(r,o)&&!__webpack_require__.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:r[o]})},__webpack_require__.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.nc=void 0;var __webpack_exports__={};for(var __webpack_i__ in(()=>{__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>h});var e=__webpack_require__("../../node_modules/.pnpm/@rsbuild+core@1.3.5/node_modules/@rsbuild/core/compiled/style-loader/runtime/injectStylesIntoStyleTag.js"),r=__webpack_require__.n(e),o=__webpack_require__("../../node_modules/.pnpm/@rsbuild+core@1.3.5/node_modules/@rsbuild/core/compiled/style-loader/runtime/styleDomAPI.js"),t=__webpack_require__.n(o),c=__webpack_require__("../../node_modules/.pnpm/@rsbuild+core@1.3.5/node_modules/@rsbuild/core/compiled/style-loader/runtime/insertBySelector.js"),a=__webpack_require__.n(c),s=__webpack_require__("../../node_modules/.pnpm/@rsbuild+core@1.3.5/node_modules/@rsbuild/core/compiled/style-loader/runtime/setAttributesWithoutAttributes.js"),d=__webpack_require__.n(s),i=__webpack_require__("../../node_modules/.pnpm/@rsbuild+core@1.3.5/node_modules/@rsbuild/core/compiled/style-loader/runtime/insertStyleElement.js"),n=__webpack_require__.n(i),u=__webpack_require__("../../node_modules/.pnpm/@rsbuild+core@1.3.5/node_modules/@rsbuild/core/compiled/style-loader/runtime/styleTagTransform.js"),l=__webpack_require__.n(u),_=__webpack_require__("../../../../../../../node_modules/.pnpm/@rsbuild+core@1.3.5/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[1].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[1].use[2]!./src/components/shared/ui/switch/switch.module.css"),b={};b.styleTagTransform=l(),b.setAttributes=d(),b.insert=a().bind(null,"head"),b.domAPI=t(),b.insertStyleElement=n(),r()(_.Z,b);let h=_.Z&&_.Z.locals?_.Z.locals:void 0})(),exports.default=__webpack_exports__.default,__webpack_exports__)-1===["default"].indexOf(__webpack_i__)&&(exports[__webpack_i__]=__webpack_exports__[__webpack_i__]);Object.defineProperty(exports,"__esModule",{value:!0});