digital-rabbit-cl 1.0.29 → 1.0.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -4,6 +4,9 @@
|
|
|
4
4
|
* Reads theme from ThemeProvider context and applies CSS custom properties.
|
|
5
5
|
* Maps theme.colors and theme.fonts to CSS variables.
|
|
6
6
|
*
|
|
7
|
+
* Uses useLayoutEffect to apply theme synchronously before paint,
|
|
8
|
+
* preventing flash of unstyled content (FOUC).
|
|
9
|
+
*
|
|
7
10
|
* @example
|
|
8
11
|
* ```jsx
|
|
9
12
|
* <ThemeProvider theme={{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CSSReset.d.ts","sourceRoot":"","sources":["../../../src/components/CSSReset/CSSReset.tsx"],"names":[],"mappings":"AACA,OAAO,aAAa,CAAC;AAGrB
|
|
1
|
+
{"version":3,"file":"CSSReset.d.ts","sourceRoot":"","sources":["../../../src/components/CSSReset/CSSReset.tsx"],"names":[],"mappings":"AACA,OAAO,aAAa,CAAC;AAGrB;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,QAAA,MAAM,QAAQ,EAAE,KAAK,CAAC,EA0FrB,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.Button-module__button___2ZuB7{border-width:.15em;border-style:solid;cursor:pointer;font-weight:700;line-height:1.25;outline:none}.Button-module__button___2ZuB7:disabled{cursor:default}.Button-module__sizeSmall___DRT8P{padding:.1em .5em}.Button-module__sizeDefault___iwWOV{padding:.25em .5em}.Checkbox-module__container___aV9qz{display:flex;align-items:center;line-height:1.2}.Checkbox-module__svg___kkluC{flex-shrink:0}.Checkbox-module__label___cwRtI{font-weight:700;margin-left:.35em;-webkit-user-select:none;user-select:none}:root{--font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;--font-size: 16px;--line-height: 1.5;--font-weight-header: 700;--primary-color: #000;--background-color: #fff;--accent-color: #0066cc;--font-size-h1: 2.5rem;--font-size-h2: 1.75rem;--font-size-h3: 1.38316rem;--font-size-h4: 1rem;--font-size-h5: .85028rem;--font-size-h6: .78405rem;--breakpoint-xs: 350px;--breakpoint-sm: 475px;--breakpoint-md: 769px;--breakpoint-lg: 1025px;--layout-max-width: 1280px;--layout-wrapper-padding-sm: .5rem;--layout-wrapper-padding: 1rem}html{line-height:var(--line-height);-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;font-size:var(--font-size);font-family:var(--font-family);box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}body{margin:0;font-family:var(--font-family);font-size:var(--font-size);line-height:var(--line-height);color:var(--primary-color);background-color:var(--background-color);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}main{display:block}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5em;font-weight:var(--font-weight-header)}h1{font-size:var(--font-size-h1)}h2{font-size:var(--font-size-h2)}h3{font-size:var(--font-size-h3)}h4{font-size:var(--font-size-h4)}h5{font-size:var(--font-size-h5)}h6{font-size:var(--font-size-h6)}hr{box-sizing:content-box;height:0;overflow:visible;border:0;border-top:1px solid rgba(0,0,0,.1);margin:1em 0}pre{font-family:monospace,monospace;font-size:1em;overflow:auto}a{background-color:transparent;text-decoration:none}a:link{color:var(--accent-color)}a:hover{text-decoration:underline}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none;max-width:100%;height:auto;vertical-align:middle}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:var(--line-height);margin:0}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;cursor:pointer}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto;resize:vertical}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item;cursor:pointer}template,[hidden]{display:none}table{border-collapse:collapse;width:100%}ul,ol{padding-left:1.5em}p{margin-top:0;margin-bottom:1em}.FormLabel-module__label___0M-fo{display:inline-block;font-weight:700;padding-bottom:.25em}.FormLabel-module__label___0M-fo.FormLabel-module__disabled___ktIFp{opacity:.5;cursor:not-allowed}.FormLabel-module__label___0M-fo:not(.FormLabel-module__disabled___ktIFp){cursor:default}.Input-module__input___WjT81{background-color:transparent;border-width:.15em;border-style:solid;box-sizing:border-box;display:block;font-weight:700;line-height:1.25;outline:none;width:100%}.Input-module__input___WjT81::placeholder{color:inherit;opacity:var(--placeholder-opacity, .3)}.Input-module__input___WjT81:disabled{opacity:.3}.Input-module__sizeSmall___NFvsi{padding:.1em .25em}.Input-module__sizeDefault___AxPA0{padding:.25em .5em}.Radio-module__container___AQxhk{display:flex;align-items:center;line-height:1.25}.Radio-module__svg___zl5kF{flex-shrink:0}.Radio-module__label___vAFIP{font-weight:700;margin-left:.35em;-webkit-user-select:none;user-select:none}.Select-module__select___cjdcr{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;background-position:right center;background-repeat:no-repeat;background-size:auto 85%;border-width:.15em;border-style:solid;border-radius:0;box-sizing:border-box;display:block;font-weight:700;line-height:1.25;outline:none;width:100%}.Select-module__select___cjdcr:disabled{cursor:default;opacity:.3}.Select-module__select___cjdcr:not(:disabled){cursor:pointer}.Select-module__sizeSmall___i1quj{padding:.1em 1.75em .1em .25em}.Select-module__sizeDefault___EiWvW{padding:.25em 2em .25em .5em}.Textarea-module__textarea___Z-y6g{background-color:transparent;border-width:.15em;border-style:solid;box-sizing:border-box;display:block;font-weight:700;line-height:1.25;outline:none;width:100%}.Textarea-module__textarea___Z-y6g:disabled{opacity:.3}.Textarea-module__sizeSmall___HHFEM{padding:.1em .25em}.Textarea-module__sizeDefault___LL2Uc{padding:.25em .5em}.Header-module__header___RUooH{width:100%}.Header-module__container___t68M9{display:flex;align-items:center;justify-content:space-between;margin:0 auto;font-size:var(--header-font-size);max-width:var(--header-max-width);padding:var(--header-padding)}.ResponsiveNav-module__nav___xOfv5{display:flex}.ResponsiveNav-module__nav___xOfv5>*,.ResponsiveNav-module__nav___xOfv5>a{color:inherit;font-weight:700;text-decoration:none}.ResponsiveNav-module__navMobile___h795P{background:var(--mobile-nav-background, #0066cc);color:var(--mobile-nav-color, #000);flex-direction:column;font-size:2rem;height:100vh;padding-top:4.25rem;position:fixed;top:0;right:0;text-align:left;text-transform:uppercase;transition:transform .3s ease-in-out;width:100%;z-index:10;transform:translate(100%)}.ResponsiveNav-module__navMobile___h795P.ResponsiveNav-module__open___WDCAf{transform:translate(0)}.ResponsiveNav-module__navMobile___h795P>a{padding:.5rem 3rem;text-align:center;width:100%}.ResponsiveNav-module__navMobile___h795P>a.active,.ResponsiveNav-module__navMobile___h795P>a:hover{background:var(--mobile-nav-active-background, #000);color:var(--mobile-nav-active-color, #0066cc)}.ResponsiveNav-module__navMobile___h795P>button{align-self:center;margin:.75rem 2rem}.ResponsiveNav-module__navMobile___h795P>button:hover{color:var(--mobile-nav-button-hover-text-color, #4381c1)!important}.ResponsiveNav-module__navDesktop___9wscZ{align-items:center;flex-direction:row;height:auto}.ResponsiveNav-module__navDesktop___9wscZ>*{margin-left:1.25rem}.ResponsiveNav-module__navDesktop___9wscZ>a.active,.ResponsiveNav-module__navDesktop___9wscZ>a:hover{opacity:.5}.Hamburger-module__hamburger___Tf4-t{background:transparent;border:none;cursor:pointer;display:none;flex-direction:column;justify-content:space-around;height:2em;outline:none;padding:0;position:fixed;right:1em;width:2em;z-index:11}.Hamburger-module__line___gybZM{background:currentColor;border-radius:var(--hamburger-border-radius, 10px);height:.25em;position:relative;transform-origin:1px;transition:all .3s linear;width:2em}.Hamburger-module__line___gybZM:first-child{transform:rotate(0)}.Hamburger-module__line___gybZM:nth-child(2){opacity:1;transform:translate(0)}.Hamburger-module__line___gybZM:nth-child(3){transform:rotate(0)}.Hamburger-module__hamburger___Tf4-t.Hamburger-module__open___gRswh .Hamburger-module__line___gybZM:first-child{transform:rotate(45deg)}.Hamburger-module__hamburger___Tf4-t.Hamburger-module__open___gRswh .Hamburger-module__line___gybZM:nth-child(2){opacity:0;transform:translate(20px)}.Hamburger-module__hamburger___Tf4-t.Hamburger-module__open___gRswh .Hamburger-module__line___gybZM:nth-child(3){transform:rotate(-45deg)}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('.Button-module__button___2ZuB7{border-width:.15em;border-style:solid;cursor:pointer;font-weight:700;line-height:1.25;outline:none}.Button-module__button___2ZuB7:disabled{cursor:default}.Button-module__sizeSmall___DRT8P{padding:.1em .5em}.Button-module__sizeDefault___iwWOV{padding:.25em .5em}.Checkbox-module__container___aV9qz{display:flex;align-items:center;line-height:1.2}.Checkbox-module__svg___kkluC{flex-shrink:0}.Checkbox-module__label___cwRtI{font-weight:700;margin-left:.35em;-webkit-user-select:none;user-select:none}:root{--font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;--font-size: 16px;--line-height: 1.5;--font-weight-header: 700;--primary-color: #000;--background-color: #fff;--accent-color: #0066cc;--font-size-h1: 2.5rem;--font-size-h2: 1.75rem;--font-size-h3: 1.38316rem;--font-size-h4: 1rem;--font-size-h5: .85028rem;--font-size-h6: .78405rem;--breakpoint-xs: 350px;--breakpoint-sm: 475px;--breakpoint-md: 769px;--breakpoint-lg: 1025px;--layout-max-width: 1280px;--layout-wrapper-padding-sm: .5rem;--layout-wrapper-padding: 1rem}html{line-height:var(--line-height);-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;font-size:var(--font-size);font-family:var(--font-family);box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}body{margin:0;font-family:var(--font-family);font-size:var(--font-size);line-height:var(--line-height);color:var(--primary-color);background-color:var(--background-color);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}main{display:block}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5em;font-weight:var(--font-weight-header)}h1{font-size:var(--font-size-h1)}h2{font-size:var(--font-size-h2)}h3{font-size:var(--font-size-h3)}h4{font-size:var(--font-size-h4)}h5{font-size:var(--font-size-h5)}h6{font-size:var(--font-size-h6)}hr{box-sizing:content-box;height:0;overflow:visible;border:0;border-top:1px solid rgba(0,0,0,.1);margin:1em 0}pre{font-family:monospace,monospace;font-size:1em;overflow:auto}a{background-color:transparent;text-decoration:none}a:link{color:var(--accent-color)}a:hover{text-decoration:underline}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none;max-width:100%;height:auto;vertical-align:middle}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:var(--line-height);margin:0}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;cursor:pointer}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto;resize:vertical}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item;cursor:pointer}template,[hidden]{display:none}table{border-collapse:collapse;width:100%}ul,ol{padding-left:1.5em}p{margin-top:0;margin-bottom:1em}.FormLabel-module__label___0M-fo{display:inline-block;font-weight:700;padding-bottom:.25em}.FormLabel-module__label___0M-fo.FormLabel-module__disabled___ktIFp{opacity:.5;cursor:not-allowed}.FormLabel-module__label___0M-fo:not(.FormLabel-module__disabled___ktIFp){cursor:default}.Input-module__input___WjT81{background-color:transparent;border-width:.15em;border-style:solid;box-sizing:border-box;display:block;font-weight:700;line-height:1.25;outline:none;width:100%}.Input-module__input___WjT81::placeholder{color:inherit;opacity:var(--placeholder-opacity, .3)}.Input-module__input___WjT81:disabled{opacity:.3}.Input-module__sizeSmall___NFvsi{padding:.1em .25em}.Input-module__sizeDefault___AxPA0{padding:.25em .5em}.Radio-module__container___AQxhk{display:flex;align-items:center;line-height:1.25}.Radio-module__svg___zl5kF{flex-shrink:0}.Radio-module__label___vAFIP{font-weight:700;margin-left:.35em;-webkit-user-select:none;user-select:none}.Select-module__select___cjdcr{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;background-position:right center;background-repeat:no-repeat;background-size:auto 85%;border-width:.15em;border-style:solid;border-radius:0;box-sizing:border-box;display:block;font-weight:700;line-height:1.25;outline:none;width:100%}.Select-module__select___cjdcr:disabled{cursor:default;opacity:.3}.Select-module__select___cjdcr:not(:disabled){cursor:pointer}.Select-module__sizeSmall___i1quj{padding:.1em 1.75em .1em .25em}.Select-module__sizeDefault___EiWvW{padding:.25em 2em .25em .5em}.Textarea-module__textarea___Z-y6g{background-color:transparent;border-width:.15em;border-style:solid;box-sizing:border-box;display:block;font-weight:700;line-height:1.25;outline:none;width:100%}.Textarea-module__textarea___Z-y6g:disabled{opacity:.3}.Textarea-module__sizeSmall___HHFEM{padding:.1em .25em}.Textarea-module__sizeDefault___LL2Uc{padding:.25em .5em}.Header-module__header___RUooH{position:absolute;width:100%}.Header-module__container___t68M9{display:flex;align-items:center;justify-content:space-between;margin:0 auto;font-size:var(--header-font-size);max-width:var(--header-max-width);padding:var(--header-padding)}.ResponsiveNav-module__nav___xOfv5{display:flex}.ResponsiveNav-module__nav___xOfv5>*,.ResponsiveNav-module__nav___xOfv5>a{color:inherit;font-weight:700;text-decoration:none}.ResponsiveNav-module__navMobile___h795P{background:var(--mobile-nav-background, #0066cc);color:var(--mobile-nav-color, #000);flex-direction:column;font-size:2rem;height:100vh;padding-top:4.25rem;position:fixed;top:0;right:0;text-align:left;text-transform:uppercase;transition:transform .3s ease-in-out;width:100%;z-index:10;transform:translate(100%)}.ResponsiveNav-module__navMobile___h795P.ResponsiveNav-module__open___WDCAf{transform:translate(0)}.ResponsiveNav-module__navMobile___h795P>a{padding:.5rem 3rem;text-align:center;width:100%}.ResponsiveNav-module__navMobile___h795P>a.active,.ResponsiveNav-module__navMobile___h795P>a:hover{background:var(--mobile-nav-active-background, #000);color:var(--mobile-nav-active-color, #0066cc)}.ResponsiveNav-module__navMobile___h795P>button{align-self:center;margin:.75rem 2rem}.ResponsiveNav-module__navMobile___h795P>button:hover{color:var(--mobile-nav-button-hover-text-color, #4381c1)!important}.ResponsiveNav-module__navDesktop___9wscZ{align-items:center;flex-direction:row;height:auto}.ResponsiveNav-module__navDesktop___9wscZ>*{margin-left:1.25rem}.ResponsiveNav-module__navDesktop___9wscZ>a.active,.ResponsiveNav-module__navDesktop___9wscZ>a:hover{opacity:.5}.Hamburger-module__hamburger___Tf4-t{background:transparent;border:none;cursor:pointer;display:none;flex-direction:column;justify-content:space-around;height:2em;outline:none;padding:0;position:fixed;right:1em;width:2em;z-index:11}.Hamburger-module__line___gybZM{background:currentColor;border-radius:var(--hamburger-border-radius, 10px);height:.25em;position:relative;transform-origin:1px;transition:all .3s linear;width:2em}.Hamburger-module__line___gybZM:first-child{transform:rotate(0)}.Hamburger-module__line___gybZM:nth-child(2){opacity:1;transform:translate(0)}.Hamburger-module__line___gybZM:nth-child(3){transform:rotate(0)}.Hamburger-module__hamburger___Tf4-t.Hamburger-module__open___gRswh .Hamburger-module__line___gybZM:first-child{transform:rotate(45deg)}.Hamburger-module__hamburger___Tf4-t.Hamburger-module__open___gRswh .Hamburger-module__line___gybZM:nth-child(2){opacity:0;transform:translate(20px)}.Hamburger-module__hamburger___Tf4-t.Hamburger-module__open___gRswh .Hamburger-module__line___gybZM:nth-child(3){transform:rotate(-45deg)}')),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
|
|
2
1
|
import { jsx as _, jsxs as z, Fragment as ee } from "react/jsx-runtime";
|
|
3
|
-
import $, { createContext as te, useContext as oe, useState as Z,
|
|
4
|
-
const
|
|
5
|
-
button:
|
|
6
|
-
sizeSmall:
|
|
7
|
-
sizeDefault:
|
|
8
|
-
},
|
|
2
|
+
import $, { createContext as te, useContext as oe, useState as Z, useLayoutEffect as se, useSyncExternalStore as ne, useMemo as q, useRef as T, useEffect as j } from "react";
|
|
3
|
+
const re = "Button-module__button___2ZuB7", ae = "Button-module__sizeSmall___DRT8P", le = "Button-module__sizeDefault___iwWOV", H = {
|
|
4
|
+
button: re,
|
|
5
|
+
sizeSmall: ae,
|
|
6
|
+
sizeDefault: le
|
|
7
|
+
}, ce = ({
|
|
9
8
|
isActive: e,
|
|
10
9
|
disabled: t,
|
|
11
10
|
buttonColor: o = "#FFF",
|
|
@@ -64,7 +63,7 @@ const ne = "Button-module__button___2ZuB7", re = "Button-module__sizeSmall___DRT
|
|
|
64
63
|
wrapperPaddingSm: "0.5rem",
|
|
65
64
|
wrapperPadding: "1rem"
|
|
66
65
|
}
|
|
67
|
-
}, G = te(v),
|
|
66
|
+
}, G = te(v), Je = ({ theme: e = {}, children: t }) => {
|
|
68
67
|
var s;
|
|
69
68
|
const o = {
|
|
70
69
|
...v,
|
|
@@ -95,7 +94,7 @@ const ne = "Button-module__button___2ZuB7", re = "Button-module__sizeSmall___DRT
|
|
|
95
94
|
}
|
|
96
95
|
};
|
|
97
96
|
return /* @__PURE__ */ _(G.Provider, { value: o, children: t });
|
|
98
|
-
}, h = () => oe(G),
|
|
97
|
+
}, h = () => oe(G), Ke = ({
|
|
99
98
|
color: e,
|
|
100
99
|
hoverColor: t,
|
|
101
100
|
hoverTextColor: o,
|
|
@@ -113,7 +112,7 @@ const ne = "Button-module__button___2ZuB7", re = "Button-module__sizeSmall___DRT
|
|
|
113
112
|
let f;
|
|
114
113
|
s ? f = s : f = e ? m.buttons.textColor : m.buttons.primary.textColor;
|
|
115
114
|
const g = {
|
|
116
|
-
...
|
|
115
|
+
...ce({
|
|
117
116
|
isActive: c,
|
|
118
117
|
disabled: u,
|
|
119
118
|
buttonColor: e || m.colors.primary,
|
|
@@ -146,33 +145,33 @@ const ne = "Button-module__button___2ZuB7", re = "Button-module__sizeSmall___DRT
|
|
|
146
145
|
}
|
|
147
146
|
);
|
|
148
147
|
};
|
|
149
|
-
var A = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto < "u" && typeof msCrypto.getRandomValues == "function" && msCrypto.getRandomValues.bind(msCrypto),
|
|
150
|
-
function
|
|
148
|
+
var A = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto < "u" && typeof msCrypto.getRandomValues == "function" && msCrypto.getRandomValues.bind(msCrypto), ie = new Uint8Array(16);
|
|
149
|
+
function ue() {
|
|
151
150
|
if (!A)
|
|
152
151
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
153
|
-
return A(
|
|
152
|
+
return A(ie);
|
|
154
153
|
}
|
|
155
154
|
var J = [];
|
|
156
155
|
for (var P = 0; P < 256; ++P)
|
|
157
156
|
J[P] = (P + 256).toString(16).substr(1);
|
|
158
|
-
function
|
|
157
|
+
function me(e, t) {
|
|
159
158
|
var o = 0, s = J;
|
|
160
159
|
return [s[e[o++]], s[e[o++]], s[e[o++]], s[e[o++]], "-", s[e[o++]], s[e[o++]], "-", s[e[o++]], s[e[o++]], "-", s[e[o++]], s[e[o++]], "-", s[e[o++]], s[e[o++]], s[e[o++]], s[e[o++]], s[e[o++]], s[e[o++]]].join("");
|
|
161
160
|
}
|
|
162
161
|
function K(e, t, o) {
|
|
163
162
|
var s = t && o || 0;
|
|
164
163
|
typeof e == "string" && (t = e === "binary" ? new Array(16) : null, e = null), e = e || {};
|
|
165
|
-
var n = e.random || (e.rng ||
|
|
164
|
+
var n = e.random || (e.rng || ue)();
|
|
166
165
|
if (n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128, t)
|
|
167
166
|
for (var r = 0; r < 16; ++r)
|
|
168
167
|
t[s + r] = n[r];
|
|
169
|
-
return t ||
|
|
168
|
+
return t || me(n);
|
|
170
169
|
}
|
|
171
|
-
const
|
|
172
|
-
container:
|
|
173
|
-
svg:
|
|
174
|
-
label:
|
|
175
|
-
},
|
|
170
|
+
const de = "Checkbox-module__container___aV9qz", pe = "Checkbox-module__svg___kkluC", ye = "Checkbox-module__label___cwRtI", R = {
|
|
171
|
+
container: de,
|
|
172
|
+
svg: pe,
|
|
173
|
+
label: ye
|
|
174
|
+
}, fe = ({
|
|
176
175
|
color: e = "#000",
|
|
177
176
|
checkmarkColor: t,
|
|
178
177
|
disabled: o = !1,
|
|
@@ -185,7 +184,7 @@ const me = "Checkbox-module__container___aV9qz", de = "Checkbox-module__svg___kk
|
|
|
185
184
|
cursor: o ? "default" : "pointer",
|
|
186
185
|
opacity: o ? 0.3 : 1
|
|
187
186
|
};
|
|
188
|
-
},
|
|
187
|
+
}, Xe = ({
|
|
189
188
|
checked: e = !1,
|
|
190
189
|
checkmarkColor: t,
|
|
191
190
|
color: o,
|
|
@@ -200,7 +199,7 @@ const me = "Checkbox-module__container___aV9qz", de = "Checkbox-module__svg___kk
|
|
|
200
199
|
style: d,
|
|
201
200
|
...m
|
|
202
201
|
}) => {
|
|
203
|
-
const c = h(), p = r || K(), f =
|
|
202
|
+
const c = h(), p = r || K(), f = fe({
|
|
204
203
|
color: o || c.colors.primary,
|
|
205
204
|
checkmarkColor: t,
|
|
206
205
|
disabled: s,
|
|
@@ -270,16 +269,16 @@ const me = "Checkbox-module__container___aV9qz", de = "Checkbox-module__svg___kk
|
|
|
270
269
|
),
|
|
271
270
|
a && /* @__PURE__ */ _("label", { htmlFor: p, className: R.label, style: w, children: a })
|
|
272
271
|
] });
|
|
273
|
-
},
|
|
272
|
+
}, Ye = () => {
|
|
274
273
|
const e = h();
|
|
275
|
-
return
|
|
274
|
+
return se(() => {
|
|
276
275
|
const t = document.documentElement;
|
|
277
276
|
e.fonts && (e.fonts.fontFamily && t.style.setProperty("--font-family", e.fonts.fontFamily), e.fonts.size && t.style.setProperty("--font-size", e.fonts.size), e.fonts.lineHeight !== void 0 && t.style.setProperty("--line-height", e.fonts.lineHeight.toString()), e.fonts.fontWeightHeader !== void 0 && t.style.setProperty("--font-weight-header", e.fonts.fontWeightHeader.toString()), e.fonts.fontSizeH1 && t.style.setProperty("--font-size-h1", e.fonts.fontSizeH1), e.fonts.fontSizeH2 && t.style.setProperty("--font-size-h2", e.fonts.fontSizeH2), e.fonts.fontSizeH3 && t.style.setProperty("--font-size-h3", e.fonts.fontSizeH3), e.fonts.fontSizeH4 && t.style.setProperty("--font-size-h4", e.fonts.fontSizeH4), e.fonts.fontSizeH5 && t.style.setProperty("--font-size-h5", e.fonts.fontSizeH5), e.fonts.fontSizeH6 && t.style.setProperty("--font-size-h6", e.fonts.fontSizeH6)), e.colors && (e.colors.primary && t.style.setProperty("--primary-color", e.colors.primary), e.colors.secondary && t.style.setProperty("--background-color", e.colors.secondary), e.colors.accent && t.style.setProperty("--accent-color", e.colors.accent)), e.breakpoints && (e.breakpoints.xs && t.style.setProperty("--breakpoint-xs", e.breakpoints.xs), e.breakpoints.sm && t.style.setProperty("--breakpoint-sm", e.breakpoints.sm), e.breakpoints.md && t.style.setProperty("--breakpoint-md", e.breakpoints.md), e.breakpoints.lg && t.style.setProperty("--breakpoint-lg", e.breakpoints.lg)), e.layout && (e.layout.maxWidth && t.style.setProperty("--layout-max-width", e.layout.maxWidth), e.layout.wrapperPaddingSm && t.style.setProperty("--layout-wrapper-padding-sm", e.layout.wrapperPaddingSm), e.layout.wrapperPadding && t.style.setProperty("--layout-wrapper-padding", e.layout.wrapperPadding));
|
|
278
277
|
}, [e]), null;
|
|
279
|
-
},
|
|
280
|
-
label:
|
|
281
|
-
disabled:
|
|
282
|
-
},
|
|
278
|
+
}, _e = "FormLabel-module__label___0M-fo", he = "FormLabel-module__disabled___ktIFp", O = {
|
|
279
|
+
label: _e,
|
|
280
|
+
disabled: he
|
|
281
|
+
}, ge = ({
|
|
283
282
|
color: e = "#000",
|
|
284
283
|
disabled: t = !1,
|
|
285
284
|
fontSize: o = ".85em"
|
|
@@ -288,7 +287,7 @@ const me = "Checkbox-module__container___aV9qz", de = "Checkbox-module__svg___kk
|
|
|
288
287
|
fontSize: o,
|
|
289
288
|
opacity: t ? 0.5 : 1,
|
|
290
289
|
cursor: t ? "not-allowed" : "default"
|
|
291
|
-
}),
|
|
290
|
+
}), et = ({
|
|
292
291
|
children: e,
|
|
293
292
|
color: t,
|
|
294
293
|
disabled: o = !1,
|
|
@@ -297,7 +296,7 @@ const me = "Checkbox-module__container___aV9qz", de = "Checkbox-module__svg___kk
|
|
|
297
296
|
style: r,
|
|
298
297
|
...l
|
|
299
298
|
}) => {
|
|
300
|
-
const a = h(), i =
|
|
299
|
+
const a = h(), i = ge({
|
|
301
300
|
color: t || a.colors.primary,
|
|
302
301
|
disabled: o,
|
|
303
302
|
fontSize: s || ".85em"
|
|
@@ -321,11 +320,11 @@ const me = "Checkbox-module__container___aV9qz", de = "Checkbox-module__svg___kk
|
|
|
321
320
|
children: e
|
|
322
321
|
}
|
|
323
322
|
);
|
|
324
|
-
},
|
|
325
|
-
input:
|
|
326
|
-
sizeSmall:
|
|
327
|
-
sizeDefault:
|
|
328
|
-
},
|
|
323
|
+
}, Se = "Input-module__input___WjT81", be = "Input-module__sizeSmall___NFvsi", xe = "Input-module__sizeDefault___AxPA0", F = {
|
|
324
|
+
input: Se,
|
|
325
|
+
sizeSmall: be,
|
|
326
|
+
sizeDefault: xe
|
|
327
|
+
}, ve = ({
|
|
329
328
|
color: e = "#000",
|
|
330
329
|
disabled: t = !1,
|
|
331
330
|
fontSize: o = "1em",
|
|
@@ -336,7 +335,7 @@ const me = "Checkbox-module__container___aV9qz", de = "Checkbox-module__svg___kk
|
|
|
336
335
|
fontSize: o,
|
|
337
336
|
opacity: t ? 0.3 : 1,
|
|
338
337
|
placeholderOpacity: s
|
|
339
|
-
}),
|
|
338
|
+
}), tt = ({
|
|
340
339
|
color: e,
|
|
341
340
|
disabled: t = !1,
|
|
342
341
|
fontSize: o,
|
|
@@ -350,7 +349,7 @@ const me = "Checkbox-module__container___aV9qz", de = "Checkbox-module__svg___kk
|
|
|
350
349
|
value: y = "",
|
|
351
350
|
...d
|
|
352
351
|
}) => {
|
|
353
|
-
const m = h(), c =
|
|
352
|
+
const m = h(), c = ve({
|
|
354
353
|
color: e || m.colors.primary,
|
|
355
354
|
disabled: t,
|
|
356
355
|
fontSize: o || m.fonts.size,
|
|
@@ -380,18 +379,18 @@ const me = "Checkbox-module__container___aV9qz", de = "Checkbox-module__svg___kk
|
|
|
380
379
|
...d
|
|
381
380
|
}
|
|
382
381
|
);
|
|
383
|
-
},
|
|
384
|
-
container:
|
|
385
|
-
svg:
|
|
386
|
-
label:
|
|
387
|
-
},
|
|
382
|
+
}, ze = "Radio-module__container___AQxhk", ke = "Radio-module__svg___zl5kF", we = "Radio-module__label___vAFIP", M = {
|
|
383
|
+
container: ze,
|
|
384
|
+
svg: ke,
|
|
385
|
+
label: we
|
|
386
|
+
}, Ce = ({
|
|
388
387
|
color: e = "#000",
|
|
389
388
|
disabled: t = !1
|
|
390
389
|
}) => ({
|
|
391
390
|
radioColor: e,
|
|
392
391
|
cursor: t ? "default" : "pointer",
|
|
393
392
|
opacity: t ? 0.3 : 1
|
|
394
|
-
}),
|
|
393
|
+
}), ot = ({
|
|
395
394
|
checked: e = !1,
|
|
396
395
|
color: t,
|
|
397
396
|
disabled: o = !1,
|
|
@@ -404,7 +403,7 @@ const me = "Checkbox-module__container___aV9qz", de = "Checkbox-module__svg___kk
|
|
|
404
403
|
style: u,
|
|
405
404
|
...y
|
|
406
405
|
}) => {
|
|
407
|
-
const d = h(), m = n || K(), c =
|
|
406
|
+
const d = h(), m = n || K(), c = Ce({
|
|
408
407
|
color: t || d.colors.primary,
|
|
409
408
|
disabled: o
|
|
410
409
|
}), p = (x) => {
|
|
@@ -482,11 +481,11 @@ const me = "Checkbox-module__container___aV9qz", de = "Checkbox-module__svg___kk
|
|
|
482
481
|
}
|
|
483
482
|
)
|
|
484
483
|
] });
|
|
485
|
-
},
|
|
486
|
-
select:
|
|
487
|
-
sizeSmall:
|
|
488
|
-
sizeDefault:
|
|
489
|
-
},
|
|
484
|
+
}, He = "Select-module__select___cjdcr", Pe = "Select-module__sizeSmall___i1quj", Ne = "Select-module__sizeDefault___EiWvW", I = {
|
|
485
|
+
select: He,
|
|
486
|
+
sizeSmall: Pe,
|
|
487
|
+
sizeDefault: Ne
|
|
488
|
+
}, $e = ({
|
|
490
489
|
color: e = "#000",
|
|
491
490
|
disabled: t = !1
|
|
492
491
|
}) => ({
|
|
@@ -513,7 +512,7 @@ const me = "Checkbox-module__container___aV9qz", de = "Checkbox-module__svg___kk
|
|
|
513
512
|
`.trim();
|
|
514
513
|
return `url("data:image/svg+xml,${encodeURIComponent(l)}")`;
|
|
515
514
|
})(e)
|
|
516
|
-
}),
|
|
515
|
+
}), st = ({
|
|
517
516
|
children: e,
|
|
518
517
|
color: t,
|
|
519
518
|
disabled: o = !1,
|
|
@@ -526,7 +525,7 @@ const me = "Checkbox-module__container___aV9qz", de = "Checkbox-module__svg___kk
|
|
|
526
525
|
value: u = "",
|
|
527
526
|
...y
|
|
528
527
|
}) => {
|
|
529
|
-
const d = h(), m =
|
|
528
|
+
const d = h(), m = $e({
|
|
530
529
|
color: t || d.colors.primary,
|
|
531
530
|
disabled: o
|
|
532
531
|
}), c = {
|
|
@@ -561,11 +560,11 @@ const me = "Checkbox-module__container___aV9qz", de = "Checkbox-module__svg___kk
|
|
|
561
560
|
]
|
|
562
561
|
}
|
|
563
562
|
);
|
|
564
|
-
},
|
|
565
|
-
textarea:
|
|
566
|
-
sizeSmall:
|
|
567
|
-
sizeDefault:
|
|
568
|
-
},
|
|
563
|
+
}, Re = "Textarea-module__textarea___Z-y6g", Fe = "Textarea-module__sizeSmall___HHFEM", Me = "Textarea-module__sizeDefault___LL2Uc", B = {
|
|
564
|
+
textarea: Re,
|
|
565
|
+
sizeSmall: Fe,
|
|
566
|
+
sizeDefault: Me
|
|
567
|
+
}, Ie = ({
|
|
569
568
|
color: e = "#000",
|
|
570
569
|
disabled: t = !1,
|
|
571
570
|
placeholderOpacity: o = 0.3
|
|
@@ -574,7 +573,7 @@ const me = "Checkbox-module__container___aV9qz", de = "Checkbox-module__svg___kk
|
|
|
574
573
|
borderColor: e,
|
|
575
574
|
opacity: t ? 0.3 : 1,
|
|
576
575
|
placeholderOpacity: o
|
|
577
|
-
}),
|
|
576
|
+
}), nt = ({
|
|
578
577
|
color: e,
|
|
579
578
|
disabled: t = !1,
|
|
580
579
|
fontSize: o,
|
|
@@ -588,7 +587,7 @@ const me = "Checkbox-module__container___aV9qz", de = "Checkbox-module__svg___kk
|
|
|
588
587
|
value: y = "",
|
|
589
588
|
...d
|
|
590
589
|
}) => {
|
|
591
|
-
const m = h(), c =
|
|
590
|
+
const m = h(), c = Ie({
|
|
592
591
|
color: e || m.colors.primary,
|
|
593
592
|
disabled: t,
|
|
594
593
|
placeholderOpacity: l
|
|
@@ -630,10 +629,10 @@ const me = "Checkbox-module__container___aV9qz", de = "Checkbox-module__svg___kk
|
|
|
630
629
|
...d
|
|
631
630
|
}
|
|
632
631
|
);
|
|
633
|
-
},
|
|
634
|
-
header:
|
|
635
|
-
container:
|
|
636
|
-
},
|
|
632
|
+
}, Be = "Header-module__header___RUooH", De = "Header-module__container___t68M9", U = {
|
|
633
|
+
header: Be,
|
|
634
|
+
container: De
|
|
635
|
+
}, We = ({
|
|
637
636
|
isSmallScreen: e = !1,
|
|
638
637
|
maxWidth: t,
|
|
639
638
|
paddingSm: o,
|
|
@@ -646,15 +645,15 @@ const me = "Checkbox-module__container___aV9qz", de = "Checkbox-module__svg___kk
|
|
|
646
645
|
"--header-padding": e ? o || r.layout.wrapperPaddingSm : s || r.layout.wrapperPadding,
|
|
647
646
|
"--header-font-size": e ? "0.75rem" : n || r.fonts.size
|
|
648
647
|
};
|
|
649
|
-
},
|
|
648
|
+
}, D = (e) => {
|
|
650
649
|
const t = typeof window < "u" && typeof window.matchMedia == "function";
|
|
651
|
-
return
|
|
650
|
+
return ne((r) => {
|
|
652
651
|
if (!t) return () => {
|
|
653
652
|
};
|
|
654
653
|
const l = window.matchMedia(e);
|
|
655
654
|
return l.addEventListener("change", r), () => l.removeEventListener("change", r);
|
|
656
655
|
}, () => t ? window.matchMedia(e).matches : !1, () => !1);
|
|
657
|
-
},
|
|
656
|
+
}, rt = ({
|
|
658
657
|
children: e,
|
|
659
658
|
breakPointSm: t,
|
|
660
659
|
maxWidth: o,
|
|
@@ -665,7 +664,7 @@ const me = "Checkbox-module__container___aV9qz", de = "Checkbox-module__svg___kk
|
|
|
665
664
|
headerProps: a = {},
|
|
666
665
|
headerRef: i
|
|
667
666
|
}) => {
|
|
668
|
-
const u = h(), d = (t || u.breakpoints.sm).match(/^(\d+(?:\.\d+)?)(px|em|rem)$/), m = d ? parseInt(d[1], 10) - 1 : 474, c = d ? d[2] : "px", p =
|
|
667
|
+
const u = h(), d = (t || u.breakpoints.sm).match(/^(\d+(?:\.\d+)?)(px|em|rem)$/), m = d ? parseInt(d[1], 10) - 1 : 474, c = d ? d[2] : "px", p = D(`(max-width: ${m}${c})`), f = We({
|
|
669
668
|
isSmallScreen: p,
|
|
670
669
|
maxWidth: o,
|
|
671
670
|
paddingSm: s,
|
|
@@ -673,12 +672,12 @@ const me = "Checkbox-module__container___aV9qz", de = "Checkbox-module__svg___kk
|
|
|
673
672
|
fontSize: r
|
|
674
673
|
});
|
|
675
674
|
return /* @__PURE__ */ _("header", { ref: i, className: U.header, ...a, children: /* @__PURE__ */ _("div", { className: U.container, style: { ...f, ...l }, children: e }) });
|
|
676
|
-
},
|
|
677
|
-
nav:
|
|
678
|
-
navMobile:
|
|
679
|
-
open:
|
|
680
|
-
navDesktop:
|
|
681
|
-
},
|
|
675
|
+
}, Le = "ResponsiveNav-module__nav___xOfv5", Ee = "ResponsiveNav-module__navMobile___h795P", Te = "ResponsiveNav-module__open___WDCAf", je = "ResponsiveNav-module__navDesktop___9wscZ", N = {
|
|
676
|
+
nav: Le,
|
|
677
|
+
navMobile: Ee,
|
|
678
|
+
open: Te,
|
|
679
|
+
navDesktop: je
|
|
680
|
+
}, Ve = ({
|
|
682
681
|
isMobile: e,
|
|
683
682
|
isCompact: t,
|
|
684
683
|
mobileBackground: o,
|
|
@@ -707,11 +706,11 @@ const me = "Checkbox-module__container___aV9qz", de = "Checkbox-module__svg___kk
|
|
|
707
706
|
e,
|
|
708
707
|
t
|
|
709
708
|
]);
|
|
710
|
-
},
|
|
711
|
-
hamburger:
|
|
712
|
-
line:
|
|
713
|
-
open:
|
|
714
|
-
},
|
|
709
|
+
}, Ae = "Hamburger-module__hamburger___Tf4-t", Oe = "Hamburger-module__line___gybZM", Ue = "Hamburger-module__open___gRswh", C = {
|
|
710
|
+
hamburger: Ae,
|
|
711
|
+
line: Oe,
|
|
712
|
+
open: Ue
|
|
713
|
+
}, Qe = ({ compact: e, color: t, visible: o, borderRadius: s }) => {
|
|
715
714
|
const n = h();
|
|
716
715
|
return q(() => {
|
|
717
716
|
const r = e ? { right: ".5em" } : {};
|
|
@@ -722,7 +721,7 @@ const me = "Checkbox-module__container___aV9qz", de = "Checkbox-module__svg___kk
|
|
|
722
721
|
...r
|
|
723
722
|
};
|
|
724
723
|
}, [t, o, e, s, n.borderRadius]);
|
|
725
|
-
},
|
|
724
|
+
}, Ze = ({
|
|
726
725
|
visible: e,
|
|
727
726
|
compact: t,
|
|
728
727
|
color: o,
|
|
@@ -732,7 +731,7 @@ const me = "Checkbox-module__container___aV9qz", de = "Checkbox-module__svg___kk
|
|
|
732
731
|
buttonProps: l,
|
|
733
732
|
borderRadius: a
|
|
734
733
|
}) => {
|
|
735
|
-
const i =
|
|
734
|
+
const i = Qe({
|
|
736
735
|
compact: t,
|
|
737
736
|
color: o,
|
|
738
737
|
visible: e,
|
|
@@ -763,7 +762,7 @@ function Q(e) {
|
|
|
763
762
|
const o = parseInt(e) - 1, s = e.replace(/[0-9]/g, "");
|
|
764
763
|
return { maxWidth: o, unit: s };
|
|
765
764
|
}
|
|
766
|
-
const
|
|
765
|
+
const at = ({
|
|
767
766
|
breakPointMd: e,
|
|
768
767
|
breakPointSm: t,
|
|
769
768
|
children: o,
|
|
@@ -775,23 +774,23 @@ const rt = ({
|
|
|
775
774
|
style: i,
|
|
776
775
|
navProps: u
|
|
777
776
|
}) => {
|
|
778
|
-
const [y, d] = Z(!1), m =
|
|
777
|
+
const [y, d] = Z(!1), m = T(null), c = T(null), p = h(), f = e || p.breakpoints.md, b = t || p.breakpoints.sm, { maxWidth: g, unit: S } = Q(f), { maxWidth: w, unit: x } = Q(b), k = D(`(max-width: ${g}${S})`), W = D(`(max-width: ${w}${x})`), X = Ve({
|
|
779
778
|
isMobile: k,
|
|
780
|
-
isCompact:
|
|
779
|
+
isCompact: W,
|
|
781
780
|
mobileBackground: s,
|
|
782
781
|
mobileColor: n,
|
|
783
782
|
mobileActiveBackground: r,
|
|
784
783
|
mobileActiveColor: l,
|
|
785
784
|
mobileButtonHoverColor: a
|
|
786
785
|
});
|
|
787
|
-
|
|
786
|
+
j(() => {
|
|
788
787
|
k || d(!1);
|
|
789
|
-
}, [k]),
|
|
790
|
-
const
|
|
791
|
-
!c.current || c.current.contains(
|
|
788
|
+
}, [k]), j(() => {
|
|
789
|
+
const L = (E) => {
|
|
790
|
+
!c.current || c.current.contains(E.target) || m.current && m.current.contains(E.target) || d(!1);
|
|
792
791
|
};
|
|
793
|
-
return document.addEventListener("mousedown",
|
|
794
|
-
document.removeEventListener("mousedown",
|
|
792
|
+
return document.addEventListener("mousedown", L), () => {
|
|
793
|
+
document.removeEventListener("mousedown", L);
|
|
795
794
|
};
|
|
796
795
|
}, [m, c, d]);
|
|
797
796
|
const Y = [
|
|
@@ -801,11 +800,11 @@ const rt = ({
|
|
|
801
800
|
].filter(Boolean).join(" ");
|
|
802
801
|
return /* @__PURE__ */ z(ee, { children: [
|
|
803
802
|
/* @__PURE__ */ _(
|
|
804
|
-
|
|
803
|
+
Ze,
|
|
805
804
|
{
|
|
806
805
|
hamburgerRef: m,
|
|
807
806
|
visible: k,
|
|
808
|
-
compact:
|
|
807
|
+
compact: W,
|
|
809
808
|
open: y,
|
|
810
809
|
setOpen: d
|
|
811
810
|
}
|
|
@@ -823,16 +822,16 @@ const rt = ({
|
|
|
823
822
|
] });
|
|
824
823
|
};
|
|
825
824
|
export {
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
825
|
+
Ke as Button,
|
|
826
|
+
Ye as CSSReset,
|
|
827
|
+
Xe as Checkbox,
|
|
828
|
+
et as FormLabel,
|
|
829
|
+
rt as Header,
|
|
830
|
+
tt as Input,
|
|
831
|
+
ot as Radio,
|
|
832
|
+
at as ResponsiveNav,
|
|
833
|
+
st as Select,
|
|
834
|
+
nt as Textarea,
|
|
835
|
+
Je as ThemeProvider,
|
|
837
836
|
h as useTheme
|
|
838
837
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
(function(){
|
|
2
|
-
(function(h,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],l):(h=typeof globalThis<"u"?globalThis:h||self,l(h.DigitalRabbitCL={},h.jsxRuntime,h.React))})(this,(function(h,l,S){"use strict";const P={button:"Button-module__button___2ZuB7",sizeSmall:"Button-module__sizeSmall___DRT8P",sizeDefault:"Button-module__sizeDefault___iwWOV"},G=({isActive:e,disabled:t,buttonColor:o="#FFF",textColor:s="#000",hoverColor:r,hoverTextColor:n,outline:c})=>{let a,u,d;c?(a="transparent",u=o,d=o,e&&(a=r||o,u=r||o,d=n||s)):(a=o,u=o,d=s,e&&(a=r||o,u=r||o,d=n||s));let f=1;return t?f=.3:e&&(f=r||c?1:.75),{backgroundColor:a,borderColor:u,color:d,opacity:f}},W={primary:"#FFF",secondary:"#000",accent:"#4381C1",error:"#F00",success:"#008000",warning:"#FFEB3B"},k={colors:W,fonts:{color:"#000",lineHeight:1.5,fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',fontWeightHeader:700,size:"22px",rhythm:"1.45rem",fontSizeH1:"2.5rem",fontSizeH2:"1.75rem",fontSizeH3:"1.38316rem",fontSizeH4:"1rem",fontSizeH5:"0.85028rem",fontSizeH6:"0.78405rem"},buttons:{textColor:"#FFF",primary:{textColor:W.secondary}},borderRadius:"0px",breakpoints:{xs:"350px",sm:"475px",md:"769px",lg:"1025px"},layout:{maxWidth:"1280px",wrapperPaddingSm:"0.5rem",wrapperPadding:"1rem"}},L=S.createContext(k),J=({theme:e={},children:t})=>{var s;const o={...k,...e,colors:{...k.colors,...e.colors},fonts:{...k.fonts,...e.fonts},buttons:{...k.buttons,...e.buttons,primary:{...k.buttons.primary,...(s=e.buttons)==null?void 0:s.primary}},breakpoints:{...k.breakpoints,...e.breakpoints},layout:{...k.layout,...e.layout}};return l.jsx(L.Provider,{value:o,children:t})},g=()=>S.useContext(L),K=({color:e,hoverColor:t,hoverTextColor:o,textColor:s,outline:r=!1,size:n,type:c="button",buttonProps:a={},children:u,disabled:d=!1,onClick:f,fontSize:p})=>{const m=g(),[i,y]=S.useState(!1);let _;s?_=s:_=e?m.buttons.textColor:m.buttons.primary.textColor;const b={...G({isActive:i,disabled:d,buttonColor:e||m.colors.primary,textColor:_,hoverColor:t,hoverTextColor:o,outline:r}),fontSize:p||m.fonts.size},v=[P.button,n==="small"?P.sizeSmall:P.sizeDefault,r?P.outline:""].filter(Boolean).join(" ");return l.jsx("button",{className:v,disabled:d,onClick:f,onMouseEnter:()=>y(!0),onMouseLeave:()=>y(!1),type:c,...a,style:{...b,...a.style},children:u})};var E=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),X=new Uint8Array(16);function Y(){if(!E)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return E(X)}for(var j=[],H=0;H<256;++H)j[H]=(H+256).toString(16).substr(1);function R(e,t){var o=0,s=j;return[s[e[o++]],s[e[o++]],s[e[o++]],s[e[o++]],"-",s[e[o++]],s[e[o++]],"-",s[e[o++]],s[e[o++]],"-",s[e[o++]],s[e[o++]],"-",s[e[o++]],s[e[o++]],s[e[o++]],s[e[o++]],s[e[o++]],s[e[o++]]].join("")}function V(e,t,o){var s=t&&o||0;typeof e=="string"&&(t=e==="binary"?new Array(16):null,e=null),e=e||{};var r=e.random||(e.rng||Y)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t)for(var n=0;n<16;++n)t[s+n]=r[n];return t||R(r)}const F={container:"Checkbox-module__container___aV9qz",svg:"Checkbox-module__svg___kkluC",label:"Checkbox-module__label___cwRtI"},ee=({color:e="#000",checkmarkColor:t,disabled:o=!1,inverted:s=!1})=>{let r=e;return t?r=t:s&&(r="white"),{boxColor:e,checkmarkColor:r,cursor:o?"default":"pointer",opacity:o?.3:1}},te=({checked:e=!1,checkmarkColor:t,color:o,disabled:s=!1,fontSize:r,id:n,inverted:c=!1,label:a,labelStyle:u,name:d,onChange:f,style:p,...m})=>{const i=g(),y=n||V(),_=ee({color:o||i.colors.primary,checkmarkColor:t,disabled:s,inverted:c}),z=x=>{s||f(x)},b={cursor:_.cursor,fontSize:r||i.fonts.size,opacity:_.opacity,...p},v={width:r||"1rem"},C={color:_.boxColor,cursor:_.cursor,fontSize:r||"1rem",...u};return l.jsxs("div",{className:F.container,style:b,...m,children:[l.jsx("input",{id:y,checked:e,disabled:s,onChange:x=>z({target:{checked:x.target.checked,name:d,type:"checkbox"}}),name:d,style:{display:"none"},type:"checkbox"}),l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",onClick:()=>z({target:{checked:!e,name:d,type:"checkbox"}}),style:v,className:F.svg,children:[l.jsx("rect",{x:"0",y:"0",height:"100",width:"100",style:{fill:c&&e?_.boxColor:"transparent",strokeWidth:"25",stroke:_.boxColor}}),e&&l.jsx("path",{d:"M 25 45 L 45 65 L 75 30",stroke:_.checkmarkColor,strokeWidth:"15",fill:"transparent"})]}),a&&l.jsx("label",{htmlFor:y,className:F.label,style:C,children:a})]})},oe=()=>{const e=g();return S.useEffect(()=>{const t=document.documentElement;e.fonts&&(e.fonts.fontFamily&&t.style.setProperty("--font-family",e.fonts.fontFamily),e.fonts.size&&t.style.setProperty("--font-size",e.fonts.size),e.fonts.lineHeight!==void 0&&t.style.setProperty("--line-height",e.fonts.lineHeight.toString()),e.fonts.fontWeightHeader!==void 0&&t.style.setProperty("--font-weight-header",e.fonts.fontWeightHeader.toString()),e.fonts.fontSizeH1&&t.style.setProperty("--font-size-h1",e.fonts.fontSizeH1),e.fonts.fontSizeH2&&t.style.setProperty("--font-size-h2",e.fonts.fontSizeH2),e.fonts.fontSizeH3&&t.style.setProperty("--font-size-h3",e.fonts.fontSizeH3),e.fonts.fontSizeH4&&t.style.setProperty("--font-size-h4",e.fonts.fontSizeH4),e.fonts.fontSizeH5&&t.style.setProperty("--font-size-h5",e.fonts.fontSizeH5),e.fonts.fontSizeH6&&t.style.setProperty("--font-size-h6",e.fonts.fontSizeH6)),e.colors&&(e.colors.primary&&t.style.setProperty("--primary-color",e.colors.primary),e.colors.secondary&&t.style.setProperty("--background-color",e.colors.secondary),e.colors.accent&&t.style.setProperty("--accent-color",e.colors.accent)),e.breakpoints&&(e.breakpoints.xs&&t.style.setProperty("--breakpoint-xs",e.breakpoints.xs),e.breakpoints.sm&&t.style.setProperty("--breakpoint-sm",e.breakpoints.sm),e.breakpoints.md&&t.style.setProperty("--breakpoint-md",e.breakpoints.md),e.breakpoints.lg&&t.style.setProperty("--breakpoint-lg",e.breakpoints.lg)),e.layout&&(e.layout.maxWidth&&t.style.setProperty("--layout-max-width",e.layout.maxWidth),e.layout.wrapperPaddingSm&&t.style.setProperty("--layout-wrapper-padding-sm",e.layout.wrapperPaddingSm),e.layout.wrapperPadding&&t.style.setProperty("--layout-wrapper-padding",e.layout.wrapperPadding))},[e]),null},A={label:"FormLabel-module__label___0M-fo",disabled:"FormLabel-module__disabled___ktIFp"},se=({color:e="#000",disabled:t=!1,fontSize:o=".85em"})=>({color:e,fontSize:o,opacity:t?.5:1,cursor:t?"not-allowed":"default"}),re=({children:e,color:t,disabled:o=!1,fontSize:s,htmlFor:r,style:n,...c})=>{const a=g(),u=se({color:t||a.colors.primary,disabled:o,fontSize:s||".85em"}),d={color:u.color,fontSize:u.fontSize,opacity:u.opacity,cursor:u.cursor,...n},f=[A.label,o?A.disabled:""].filter(Boolean).join(" ");return l.jsx("label",{className:f,htmlFor:r,style:d,...c,children:e})},D={input:"Input-module__input___WjT81",sizeSmall:"Input-module__sizeSmall___NFvsi",sizeDefault:"Input-module__sizeDefault___AxPA0"},ne=({color:e="#000",disabled:t=!1,fontSize:o="1em",placeholderOpacity:s=.3})=>({borderColor:e,color:e,fontSize:o,opacity:t?.3:1,placeholderOpacity:s}),ae=({color:e,disabled:t=!1,fontSize:o,name:s="",onChange:r,placeholder:n,placeholderOpacity:c=.3,size:a,style:u,type:d="text",value:f="",...p})=>{const m=g(),i=ne({color:e||m.colors.primary,disabled:t,fontSize:o||m.fonts.size,placeholderOpacity:c}),y={"--placeholder-opacity":i.placeholderOpacity,borderColor:i.borderColor,color:i.color,fontSize:i.fontSize,opacity:i.opacity,...u},_=[D.input,a==="small"?D.sizeSmall:D.sizeDefault].filter(Boolean).join(" ");return l.jsx("input",{className:_,disabled:t,name:s,onChange:r,placeholder:n,style:y,type:d,value:f,...p})},M={container:"Radio-module__container___AQxhk",svg:"Radio-module__svg___zl5kF",label:"Radio-module__label___vAFIP"},le=({color:e="#000",disabled:t=!1})=>({radioColor:e,cursor:t?"default":"pointer",opacity:t?.3:1}),ce=({checked:e=!1,color:t,disabled:o=!1,fontSize:s,id:r,label:n,labelStyle:c,name:a,onChange:u,style:d,...f})=>{const p=g(),m=r||V(),i=le({color:t||p.colors.primary,disabled:o}),y=x=>{o||u(x)},_={cursor:i.cursor,fontSize:s||p.fonts.size,opacity:i.opacity,...d},z={width:s||p.fonts.size},b={fill:"transparent",strokeWidth:"12.5",stroke:i.radioColor},v={fill:i.radioColor},C={color:i.radioColor,cursor:i.cursor,fontSize:s||p.fonts.size,...c};return l.jsxs("div",{className:M.container,style:_,...f,children:[l.jsx("input",{id:m,checked:e,disabled:o,name:a,onChange:x=>y({target:{checked:x.target.checked,name:a,type:"radio"}}),style:{display:"none"},type:"radio"}),l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",onClick:()=>y({target:{checked:!e,name:a,type:"radio"}}),className:M.svg,style:z,children:[l.jsx("circle",{cx:"50",cy:"50",r:"42.5",width:"100%",style:b}),e&&l.jsx("circle",{cx:"50",cy:"50",r:"25",style:v})]}),n&&l.jsx("label",{htmlFor:m,className:M.label,style:C,children:n})]})},I={select:"Select-module__select___cjdcr",sizeSmall:"Select-module__sizeSmall___i1quj",sizeDefault:"Select-module__sizeDefault___EiWvW"},ie=({color:e="#000",disabled:t=!1})=>({color:e,borderColor:e,cursor:t?"default":"pointer",opacity:t?.3:1,backgroundImage:(n=>{const c=`
|
|
1
|
+
(function(h,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],l):(h=typeof globalThis<"u"?globalThis:h||self,l(h.DigitalRabbitCL={},h.jsxRuntime,h.React))})(this,(function(h,l,S){"use strict";const P={button:"Button-module__button___2ZuB7",sizeSmall:"Button-module__sizeSmall___DRT8P",sizeDefault:"Button-module__sizeDefault___iwWOV"},G=({isActive:e,disabled:t,buttonColor:o="#FFF",textColor:s="#000",hoverColor:r,hoverTextColor:n,outline:c})=>{let a,u,d;c?(a="transparent",u=o,d=o,e&&(a=r||o,u=r||o,d=n||s)):(a=o,u=o,d=s,e&&(a=r||o,u=r||o,d=n||s));let f=1;return t?f=.3:e&&(f=r||c?1:.75),{backgroundColor:a,borderColor:u,color:d,opacity:f}},L={primary:"#FFF",secondary:"#000",accent:"#4381C1",error:"#F00",success:"#008000",warning:"#FFEB3B"},k={colors:L,fonts:{color:"#000",lineHeight:1.5,fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',fontWeightHeader:700,size:"22px",rhythm:"1.45rem",fontSizeH1:"2.5rem",fontSizeH2:"1.75rem",fontSizeH3:"1.38316rem",fontSizeH4:"1rem",fontSizeH5:"0.85028rem",fontSizeH6:"0.78405rem"},buttons:{textColor:"#FFF",primary:{textColor:L.secondary}},borderRadius:"0px",breakpoints:{xs:"350px",sm:"475px",md:"769px",lg:"1025px"},layout:{maxWidth:"1280px",wrapperPaddingSm:"0.5rem",wrapperPadding:"1rem"}},W=S.createContext(k),J=({theme:e={},children:t})=>{var s;const o={...k,...e,colors:{...k.colors,...e.colors},fonts:{...k.fonts,...e.fonts},buttons:{...k.buttons,...e.buttons,primary:{...k.buttons.primary,...(s=e.buttons)==null?void 0:s.primary}},breakpoints:{...k.breakpoints,...e.breakpoints},layout:{...k.layout,...e.layout}};return l.jsx(W.Provider,{value:o,children:t})},g=()=>S.useContext(W),K=({color:e,hoverColor:t,hoverTextColor:o,textColor:s,outline:r=!1,size:n,type:c="button",buttonProps:a={},children:u,disabled:d=!1,onClick:f,fontSize:m})=>{const y=g(),[i,p]=S.useState(!1);let _;s?_=s:_=e?y.buttons.textColor:y.buttons.primary.textColor;const b={...G({isActive:i,disabled:d,buttonColor:e||y.colors.primary,textColor:_,hoverColor:t,hoverTextColor:o,outline:r}),fontSize:m||y.fonts.size},v=[P.button,n==="small"?P.sizeSmall:P.sizeDefault,r?P.outline:""].filter(Boolean).join(" ");return l.jsx("button",{className:v,disabled:d,onClick:f,onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1),type:c,...a,style:{...b,...a.style},children:u})};var E=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),X=new Uint8Array(16);function Y(){if(!E)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return E(X)}for(var j=[],H=0;H<256;++H)j[H]=(H+256).toString(16).substr(1);function R(e,t){var o=0,s=j;return[s[e[o++]],s[e[o++]],s[e[o++]],s[e[o++]],"-",s[e[o++]],s[e[o++]],"-",s[e[o++]],s[e[o++]],"-",s[e[o++]],s[e[o++]],"-",s[e[o++]],s[e[o++]],s[e[o++]],s[e[o++]],s[e[o++]],s[e[o++]]].join("")}function V(e,t,o){var s=t&&o||0;typeof e=="string"&&(t=e==="binary"?new Array(16):null,e=null),e=e||{};var r=e.random||(e.rng||Y)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t)for(var n=0;n<16;++n)t[s+n]=r[n];return t||R(r)}const F={container:"Checkbox-module__container___aV9qz",svg:"Checkbox-module__svg___kkluC",label:"Checkbox-module__label___cwRtI"},ee=({color:e="#000",checkmarkColor:t,disabled:o=!1,inverted:s=!1})=>{let r=e;return t?r=t:s&&(r="white"),{boxColor:e,checkmarkColor:r,cursor:o?"default":"pointer",opacity:o?.3:1}},te=({checked:e=!1,checkmarkColor:t,color:o,disabled:s=!1,fontSize:r,id:n,inverted:c=!1,label:a,labelStyle:u,name:d,onChange:f,style:m,...y})=>{const i=g(),p=n||V(),_=ee({color:o||i.colors.primary,checkmarkColor:t,disabled:s,inverted:c}),z=x=>{s||f(x)},b={cursor:_.cursor,fontSize:r||i.fonts.size,opacity:_.opacity,...m},v={width:r||"1rem"},C={color:_.boxColor,cursor:_.cursor,fontSize:r||"1rem",...u};return l.jsxs("div",{className:F.container,style:b,...y,children:[l.jsx("input",{id:p,checked:e,disabled:s,onChange:x=>z({target:{checked:x.target.checked,name:d,type:"checkbox"}}),name:d,style:{display:"none"},type:"checkbox"}),l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",onClick:()=>z({target:{checked:!e,name:d,type:"checkbox"}}),style:v,className:F.svg,children:[l.jsx("rect",{x:"0",y:"0",height:"100",width:"100",style:{fill:c&&e?_.boxColor:"transparent",strokeWidth:"25",stroke:_.boxColor}}),e&&l.jsx("path",{d:"M 25 45 L 45 65 L 75 30",stroke:_.checkmarkColor,strokeWidth:"15",fill:"transparent"})]}),a&&l.jsx("label",{htmlFor:p,className:F.label,style:C,children:a})]})},oe=()=>{const e=g();return S.useLayoutEffect(()=>{const t=document.documentElement;e.fonts&&(e.fonts.fontFamily&&t.style.setProperty("--font-family",e.fonts.fontFamily),e.fonts.size&&t.style.setProperty("--font-size",e.fonts.size),e.fonts.lineHeight!==void 0&&t.style.setProperty("--line-height",e.fonts.lineHeight.toString()),e.fonts.fontWeightHeader!==void 0&&t.style.setProperty("--font-weight-header",e.fonts.fontWeightHeader.toString()),e.fonts.fontSizeH1&&t.style.setProperty("--font-size-h1",e.fonts.fontSizeH1),e.fonts.fontSizeH2&&t.style.setProperty("--font-size-h2",e.fonts.fontSizeH2),e.fonts.fontSizeH3&&t.style.setProperty("--font-size-h3",e.fonts.fontSizeH3),e.fonts.fontSizeH4&&t.style.setProperty("--font-size-h4",e.fonts.fontSizeH4),e.fonts.fontSizeH5&&t.style.setProperty("--font-size-h5",e.fonts.fontSizeH5),e.fonts.fontSizeH6&&t.style.setProperty("--font-size-h6",e.fonts.fontSizeH6)),e.colors&&(e.colors.primary&&t.style.setProperty("--primary-color",e.colors.primary),e.colors.secondary&&t.style.setProperty("--background-color",e.colors.secondary),e.colors.accent&&t.style.setProperty("--accent-color",e.colors.accent)),e.breakpoints&&(e.breakpoints.xs&&t.style.setProperty("--breakpoint-xs",e.breakpoints.xs),e.breakpoints.sm&&t.style.setProperty("--breakpoint-sm",e.breakpoints.sm),e.breakpoints.md&&t.style.setProperty("--breakpoint-md",e.breakpoints.md),e.breakpoints.lg&&t.style.setProperty("--breakpoint-lg",e.breakpoints.lg)),e.layout&&(e.layout.maxWidth&&t.style.setProperty("--layout-max-width",e.layout.maxWidth),e.layout.wrapperPaddingSm&&t.style.setProperty("--layout-wrapper-padding-sm",e.layout.wrapperPaddingSm),e.layout.wrapperPadding&&t.style.setProperty("--layout-wrapper-padding",e.layout.wrapperPadding))},[e]),null},A={label:"FormLabel-module__label___0M-fo",disabled:"FormLabel-module__disabled___ktIFp"},se=({color:e="#000",disabled:t=!1,fontSize:o=".85em"})=>({color:e,fontSize:o,opacity:t?.5:1,cursor:t?"not-allowed":"default"}),re=({children:e,color:t,disabled:o=!1,fontSize:s,htmlFor:r,style:n,...c})=>{const a=g(),u=se({color:t||a.colors.primary,disabled:o,fontSize:s||".85em"}),d={color:u.color,fontSize:u.fontSize,opacity:u.opacity,cursor:u.cursor,...n},f=[A.label,o?A.disabled:""].filter(Boolean).join(" ");return l.jsx("label",{className:f,htmlFor:r,style:d,...c,children:e})},D={input:"Input-module__input___WjT81",sizeSmall:"Input-module__sizeSmall___NFvsi",sizeDefault:"Input-module__sizeDefault___AxPA0"},ne=({color:e="#000",disabled:t=!1,fontSize:o="1em",placeholderOpacity:s=.3})=>({borderColor:e,color:e,fontSize:o,opacity:t?.3:1,placeholderOpacity:s}),ae=({color:e,disabled:t=!1,fontSize:o,name:s="",onChange:r,placeholder:n,placeholderOpacity:c=.3,size:a,style:u,type:d="text",value:f="",...m})=>{const y=g(),i=ne({color:e||y.colors.primary,disabled:t,fontSize:o||y.fonts.size,placeholderOpacity:c}),p={"--placeholder-opacity":i.placeholderOpacity,borderColor:i.borderColor,color:i.color,fontSize:i.fontSize,opacity:i.opacity,...u},_=[D.input,a==="small"?D.sizeSmall:D.sizeDefault].filter(Boolean).join(" ");return l.jsx("input",{className:_,disabled:t,name:s,onChange:r,placeholder:n,style:p,type:d,value:f,...m})},M={container:"Radio-module__container___AQxhk",svg:"Radio-module__svg___zl5kF",label:"Radio-module__label___vAFIP"},le=({color:e="#000",disabled:t=!1})=>({radioColor:e,cursor:t?"default":"pointer",opacity:t?.3:1}),ce=({checked:e=!1,color:t,disabled:o=!1,fontSize:s,id:r,label:n,labelStyle:c,name:a,onChange:u,style:d,...f})=>{const m=g(),y=r||V(),i=le({color:t||m.colors.primary,disabled:o}),p=x=>{o||u(x)},_={cursor:i.cursor,fontSize:s||m.fonts.size,opacity:i.opacity,...d},z={width:s||m.fonts.size},b={fill:"transparent",strokeWidth:"12.5",stroke:i.radioColor},v={fill:i.radioColor},C={color:i.radioColor,cursor:i.cursor,fontSize:s||m.fonts.size,...c};return l.jsxs("div",{className:M.container,style:_,...f,children:[l.jsx("input",{id:y,checked:e,disabled:o,name:a,onChange:x=>p({target:{checked:x.target.checked,name:a,type:"radio"}}),style:{display:"none"},type:"radio"}),l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",onClick:()=>p({target:{checked:!e,name:a,type:"radio"}}),className:M.svg,style:z,children:[l.jsx("circle",{cx:"50",cy:"50",r:"42.5",width:"100%",style:b}),e&&l.jsx("circle",{cx:"50",cy:"50",r:"25",style:v})]}),n&&l.jsx("label",{htmlFor:y,className:M.label,style:C,children:n})]})},I={select:"Select-module__select___cjdcr",sizeSmall:"Select-module__sizeSmall___i1quj",sizeDefault:"Select-module__sizeDefault___EiWvW"},ie=({color:e="#000",disabled:t=!1})=>({color:e,borderColor:e,cursor:t?"default":"pointer",opacity:t?.3:1,backgroundImage:(n=>{const c=`
|
|
3
2
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
|
|
4
3
|
<path
|
|
5
4
|
d="M 30 42.5 L 50 22.5 L 70 42.5"
|
|
@@ -14,9 +13,9 @@
|
|
|
14
13
|
fill="transparent"
|
|
15
14
|
/>
|
|
16
15
|
</svg>
|
|
17
|
-
`.trim();return`url("data:image/svg+xml,${encodeURIComponent(c)}")`})(e)}),ue=({children:e,color:t,disabled:o=!1,fontSize:s,name:r="",onChange:n,placeholder:c="",size:a,style:u,value:d="",...f})=>{const
|
|
18
|
-
.${
|
|
16
|
+
`.trim();return`url("data:image/svg+xml,${encodeURIComponent(c)}")`})(e)}),ue=({children:e,color:t,disabled:o=!1,fontSize:s,name:r="",onChange:n,placeholder:c="",size:a,style:u,value:d="",...f})=>{const m=g(),y=ie({color:t||m.colors.primary,disabled:o}),i={backgroundImage:y.backgroundImage,backgroundPosition:"right center",backgroundRepeat:"no-repeat",backgroundSize:"auto 85%",backgroundColor:"transparent",borderColor:y.borderColor,color:y.color,cursor:y.cursor,fontSize:s||m.fonts.size,opacity:y.opacity,...u},p=[I.select,a==="small"?I.sizeSmall:I.sizeDefault].filter(Boolean).join(" ");return l.jsxs("select",{className:p,disabled:o,name:r,onChange:n,style:i,value:d,...f,children:[c!==""&&l.jsx("option",{disabled:!0,value:"",children:c}),e]})},B={textarea:"Textarea-module__textarea___Z-y6g",sizeSmall:"Textarea-module__sizeSmall___HHFEM",sizeDefault:"Textarea-module__sizeDefault___LL2Uc"},de=({color:e="#000",disabled:t=!1,placeholderOpacity:o=.3})=>({color:e,borderColor:e,opacity:t?.3:1,placeholderOpacity:o}),ye=({color:e,disabled:t=!1,fontSize:o,name:s="",onChange:r,placeholder:n,placeholderOpacity:c=.3,rows:a=3,size:u,style:d,value:f="",...m})=>{const y=g(),i=de({color:e||y.colors.primary,disabled:t,placeholderOpacity:c}),p=`textarea-placeholder-${S.useId?S.useId():Math.random().toString(36)}`;S.useEffect(()=>{const b=document.createElement("style");return b.id=p,b.textContent=`
|
|
17
|
+
.${p}::placeholder {
|
|
19
18
|
color: inherit;
|
|
20
19
|
opacity: ${i.placeholderOpacity};
|
|
21
20
|
}
|
|
22
|
-
`,document.head.appendChild(b),()=>{const v=document.getElementById(
|
|
21
|
+
`,document.head.appendChild(b),()=>{const v=document.getElementById(p);v&&v.remove()}},[p,i.placeholderOpacity]);const _={borderColor:i.borderColor,color:i.color,fontSize:o||y.fonts.size,opacity:i.opacity,...d},z=[B.textarea,u==="small"?B.sizeSmall:B.sizeDefault,p].filter(Boolean).join(" ");return l.jsx("textarea",{className:z,disabled:t,name:s,onChange:r,placeholder:n,rows:a,style:_,value:f,...m})},O={header:"Header-module__header___RUooH",container:"Header-module__container___t68M9"},me=({isSmallScreen:e=!1,maxWidth:t,paddingSm:o,padding:s,fontSize:r}={})=>{const n=g();return{"--header-max-width":t||n.layout.maxWidth,"--header-padding":e?o||n.layout.wrapperPaddingSm:s||n.layout.wrapperPadding,"--header-font-size":e?"0.75rem":r||n.fonts.size}},T=e=>{const t=typeof window<"u"&&typeof window.matchMedia=="function",o=n=>{if(!t)return()=>{};const c=window.matchMedia(e);return c.addEventListener("change",n),()=>c.removeEventListener("change",n)},s=()=>t?window.matchMedia(e).matches:!1,r=()=>!1;return S.useSyncExternalStore(o,s,r)},pe=({children:e,breakPointSm:t,maxWidth:o,paddingSm:s,padding:r,fontSize:n,style:c={},headerProps:a={},headerRef:u})=>{const d=g(),m=(t||d.breakpoints.sm).match(/^(\d+(?:\.\d+)?)(px|em|rem)$/),y=m?parseInt(m[1],10)-1:474,i=m?m[2]:"px",p=T(`(max-width: ${y}${i})`),_=me({isSmallScreen:p,maxWidth:o,paddingSm:s,padding:r,fontSize:n});return l.jsx("header",{ref:u,className:O.header,...a,children:l.jsx("div",{className:O.container,style:{..._,...c},children:e})})},N={nav:"ResponsiveNav-module__nav___xOfv5",navMobile:"ResponsiveNav-module__navMobile___h795P",open:"ResponsiveNav-module__open___WDCAf",navDesktop:"ResponsiveNav-module__navDesktop___9wscZ"},fe=({isMobile:e,isCompact:t,mobileBackground:o,mobileColor:s,mobileActiveBackground:r,mobileActiveColor:n,mobileButtonHoverColor:c})=>{const a=g();return S.useMemo(()=>({...e?{"--mobile-nav-background":o||a.colors.accent,"--mobile-nav-color":s||a.colors.primary,"--mobile-nav-active-background":r||a.colors.primary,"--mobile-nav-active-color":n||a.colors.accent,"--mobile-nav-button-hover-text-color":c||o||a.colors.accent}:{}}),[o,s,r,n,c,a.colors.accent,a.colors.primary,e,t])},$={hamburger:"Hamburger-module__hamburger___Tf4-t",line:"Hamburger-module__line___gybZM",open:"Hamburger-module__open___gRswh"},_e=({compact:e,color:t,visible:o,borderRadius:s})=>{const r=g();return S.useMemo(()=>{const n=e?{right:".5em"}:{};return{"--hamburger-border-radius":s||r.borderRadius||"10px",color:t||"inherit",display:o?"flex":"none",...n}},[t,o,e,s,r.borderRadius])},he=({visible:e,compact:t,color:o,hamburgerRef:s,open:r=!1,setOpen:n,buttonProps:c,borderRadius:a})=>{const u=_e({compact:t,color:o,visible:e,borderRadius:a}),d=[$.hamburger,r?$.open:""].filter(Boolean).join(" ");return l.jsxs("button",{ref:s,className:d,onClick:()=>n(!r),style:u,"aria-label":"Toggle menu","aria-expanded":r,...c,children:[l.jsx("div",{className:$.line}),l.jsx("div",{className:$.line}),l.jsx("div",{className:$.line})]})};function U(e){const o=parseInt(e)-1,s=e.replace(/[0-9]/g,"");return{maxWidth:o,unit:s}}const Se=({breakPointMd:e,breakPointSm:t,children:o,mobileBackground:s,mobileColor:r,mobileActiveBackground:n,mobileActiveColor:c,mobileButtonHoverColor:a,style:u,navProps:d})=>{const[f,m]=S.useState(!1),y=S.useRef(null),i=S.useRef(null),p=g(),_=e||p.breakpoints.md,z=t||p.breakpoints.sm,{maxWidth:b,unit:v}=U(_),{maxWidth:C,unit:x}=U(z),w=T(`(max-width: ${b}${v})`),q=T(`(max-width: ${C}${x})`),ge=fe({isMobile:w,isCompact:q,mobileBackground:s,mobileColor:r,mobileActiveBackground:n,mobileActiveColor:c,mobileButtonHoverColor:a});S.useEffect(()=>{w||m(!1)},[w]),S.useEffect(()=>{const Q=Z=>{!i.current||i.current.contains(Z.target)||y.current&&y.current.contains(Z.target)||m(!1)};return document.addEventListener("mousedown",Q),()=>{document.removeEventListener("mousedown",Q)}},[y,i,m]);const be=[N.nav,w?N.navMobile:N.navDesktop,w&&f?N.open:""].filter(Boolean).join(" ");return l.jsxs(l.Fragment,{children:[l.jsx(he,{hamburgerRef:y,visible:w,compact:q,open:f,setOpen:m}),l.jsx("nav",{ref:i,className:be,style:{...ge,...u},...d,children:typeof o=="function"?o({setOpen:m}):o})]})};h.Button=K,h.CSSReset=oe,h.Checkbox=te,h.FormLabel=re,h.Header=pe,h.Input=ae,h.Radio=ce,h.ResponsiveNav=Se,h.Select=ue,h.Textarea=ye,h.ThemeProvider=J,h.useTheme=g,Object.defineProperty(h,Symbol.toStringTag,{value:"Module"})}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "digital-rabbit-cl",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.31",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"uuid": "^7.0.3"
|
|
6
6
|
},
|
|
@@ -27,7 +27,8 @@
|
|
|
27
27
|
"types": "./dist/index.d.ts",
|
|
28
28
|
"import": "./dist/digital-rabbit-cl.es.js",
|
|
29
29
|
"require": "./dist/digital-rabbit-cl.umd.js"
|
|
30
|
-
}
|
|
30
|
+
},
|
|
31
|
+
"./styles": "./dist/digital-rabbit-cl.css"
|
|
31
32
|
},
|
|
32
33
|
"files": [
|
|
33
34
|
"dist"
|