digital-rabbit-cl 1.1.0 → 1.1.1
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.
- package/dist/components/Form/FormRadio.d.ts +9 -0
- package/dist/components/Form/FormRadio.d.ts.map +1 -0
- package/dist/components/Form/index.d.ts +2 -0
- package/dist/components/Form/index.d.ts.map +1 -1
- package/dist/digital-rabbit-cl.es.js +360 -324
- package/dist/digital-rabbit-cl.umd.js +5 -5
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
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}.FormError-module__formError___kaUBn{font-size:.875em;margin-top:.25rem;font-weight:400}.FormGroup-module__formGroup___aVI-B{display:flex;flex-direction:column;margin-bottom:.5em}.FormGroup-module__inputWrapper___429QE{display:flex;flex-direction:column;gap:.5em}.FormGroup-module__formGroup___aVI-B.FormGroup-module__error___3axpm .FormGroup-module__inputWrapper___429QE input,.FormGroup-module__formGroup___aVI-B.FormGroup-module__error___3axpm .FormGroup-module__inputWrapper___429QE textarea,.FormGroup-module__formGroup___aVI-B.FormGroup-module__error___3axpm .FormGroup-module__inputWrapper___429QE select{border-color:currentColor}.FormGroup-module__formGroup___aVI-B.FormGroup-module__disabled___W-tJ0{opacity:.6;pointer-events:none}.FormGroup-module__required___mO3xA{color:inherit;margin-left:.125em}.FormGroup-module__errorMessage___SHzl3{font-size:.875em;margin-top:.25rem;font-weight:400}.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}.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}.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}.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)}.
|
|
2
|
-
import { jsx as
|
|
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}.FormError-module__formError___kaUBn{font-size:.875em;margin-top:.25rem;font-weight:400}.FormGroup-module__formGroup___aVI-B{display:flex;flex-direction:column;margin-bottom:.5em}.FormGroup-module__inputWrapper___429QE{display:flex;flex-direction:column;gap:.5em}.FormGroup-module__formGroup___aVI-B.FormGroup-module__error___3axpm .FormGroup-module__inputWrapper___429QE input,.FormGroup-module__formGroup___aVI-B.FormGroup-module__error___3axpm .FormGroup-module__inputWrapper___429QE textarea,.FormGroup-module__formGroup___aVI-B.FormGroup-module__error___3axpm .FormGroup-module__inputWrapper___429QE select{border-color:currentColor}.FormGroup-module__formGroup___aVI-B.FormGroup-module__disabled___W-tJ0{opacity:.6;pointer-events:none}.FormGroup-module__required___mO3xA{color:inherit;margin-left:.125em}.FormGroup-module__errorMessage___SHzl3{font-size:.875em;margin-top:.25rem;font-weight:400}.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}.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}.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}.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}.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)}.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}')),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
|
|
2
|
+
import { jsx as k, jsxs as ne, Fragment as Qe } from "react/jsx-runtime";
|
|
3
3
|
import V, { createContext as mr, useContext as hr, useState as Je, useLayoutEffect as gr, useMemo as Mt, useSyncExternalStore as _r, useRef as ht, useEffect as He } from "react";
|
|
4
|
-
const pr = "Button-module__button___2ZuB7", vr = "Button-module__sizeSmall___DRT8P", br = "Button-module__sizeDefault___iwWOV",
|
|
4
|
+
const pr = "Button-module__button___2ZuB7", vr = "Button-module__sizeSmall___DRT8P", br = "Button-module__sizeDefault___iwWOV", Ve = {
|
|
5
5
|
button: pr,
|
|
6
6
|
sizeSmall: vr,
|
|
7
7
|
sizeDefault: br
|
|
@@ -64,7 +64,7 @@ const pr = "Button-module__button___2ZuB7", vr = "Button-module__sizeSmall___DRT
|
|
|
64
64
|
wrapperPaddingSm: "0.5rem",
|
|
65
65
|
wrapperPadding: "1rem"
|
|
66
66
|
}
|
|
67
|
-
}, Tt = mr(ue),
|
|
67
|
+
}, Tt = mr(ue), io = ({ theme: e = {}, children: r }) => {
|
|
68
68
|
var s;
|
|
69
69
|
const t = {
|
|
70
70
|
...ue,
|
|
@@ -94,8 +94,8 @@ const pr = "Button-module__button___2ZuB7", vr = "Button-module__sizeSmall___DRT
|
|
|
94
94
|
...e.layout
|
|
95
95
|
}
|
|
96
96
|
};
|
|
97
|
-
return /* @__PURE__ */
|
|
98
|
-
}, q = () => hr(Tt),
|
|
97
|
+
return /* @__PURE__ */ k(Tt.Provider, { value: t, children: r });
|
|
98
|
+
}, q = () => hr(Tt), ao = ({
|
|
99
99
|
color: e,
|
|
100
100
|
hoverColor: r,
|
|
101
101
|
hoverTextColor: t,
|
|
@@ -109,26 +109,26 @@ const pr = "Button-module__button___2ZuB7", vr = "Button-module__sizeSmall___DRT
|
|
|
109
109
|
onClick: f,
|
|
110
110
|
fontSize: g
|
|
111
111
|
}) => {
|
|
112
|
-
const
|
|
112
|
+
const y = q(), [x, A] = Je(!1);
|
|
113
113
|
let F;
|
|
114
|
-
s ? F = s : F = e ?
|
|
114
|
+
s ? F = s : F = e ? y.buttons.textColor : y.buttons.primary.textColor;
|
|
115
115
|
const P = {
|
|
116
116
|
...Sr({
|
|
117
117
|
isActive: x,
|
|
118
118
|
disabled: h,
|
|
119
|
-
buttonColor: e ||
|
|
119
|
+
buttonColor: e || y.colors.primary,
|
|
120
120
|
textColor: F,
|
|
121
121
|
hoverColor: r,
|
|
122
122
|
hoverTextColor: t,
|
|
123
123
|
outline: n
|
|
124
124
|
}),
|
|
125
|
-
fontSize: g ||
|
|
125
|
+
fontSize: g || y.fonts.size
|
|
126
126
|
}, b = [
|
|
127
|
-
|
|
128
|
-
o === "small" ?
|
|
129
|
-
n ?
|
|
127
|
+
Ve.button,
|
|
128
|
+
o === "small" ? Ve.sizeSmall : Ve.sizeDefault,
|
|
129
|
+
n ? Ve.outline : ""
|
|
130
130
|
].filter(Boolean).join(" ");
|
|
131
|
-
return /* @__PURE__ */
|
|
131
|
+
return /* @__PURE__ */ k(
|
|
132
132
|
"button",
|
|
133
133
|
{
|
|
134
134
|
className: b,
|
|
@@ -153,8 +153,8 @@ function Fr() {
|
|
|
153
153
|
return _t(xr);
|
|
154
154
|
}
|
|
155
155
|
var Lt = [];
|
|
156
|
-
for (var
|
|
157
|
-
Lt[
|
|
156
|
+
for (var we = 0; we < 256; ++we)
|
|
157
|
+
Lt[we] = (we + 256).toString(16).substr(1);
|
|
158
158
|
function Vr(e, r) {
|
|
159
159
|
var t = 0, s = Lt;
|
|
160
160
|
return [s[e[t++]], s[e[t++]], s[e[t++]], s[e[t++]], "-", s[e[t++]], s[e[t++]], "-", s[e[t++]], s[e[t++]], "-", s[e[t++]], s[e[t++]], "-", s[e[t++]], s[e[t++]], s[e[t++]], s[e[t++]], s[e[t++]], s[e[t++]]].join("");
|
|
@@ -198,10 +198,10 @@ const wr = "Checkbox-module__container___aV9qz", kr = "Checkbox-module__svg___kk
|
|
|
198
198
|
labelStyle: h,
|
|
199
199
|
name: f,
|
|
200
200
|
onChange: g,
|
|
201
|
-
style:
|
|
201
|
+
style: y,
|
|
202
202
|
...x
|
|
203
203
|
}) => {
|
|
204
|
-
const A = q(), F = a || It(),
|
|
204
|
+
const A = q(), F = a || It(), C = A.colors.error, P = n ? C : t || A.colors.primary, b = Er({
|
|
205
205
|
color: P,
|
|
206
206
|
checkmarkColor: r,
|
|
207
207
|
disabled: s,
|
|
@@ -212,7 +212,7 @@ const wr = "Checkbox-module__container___aV9qz", kr = "Checkbox-module__svg___kk
|
|
|
212
212
|
cursor: b.cursor,
|
|
213
213
|
fontSize: o || A.fonts.size,
|
|
214
214
|
opacity: b.opacity,
|
|
215
|
-
...
|
|
215
|
+
...y
|
|
216
216
|
}, w = {
|
|
217
217
|
width: o || "1rem"
|
|
218
218
|
}, I = {
|
|
@@ -222,7 +222,7 @@ const wr = "Checkbox-module__container___aV9qz", kr = "Checkbox-module__svg___kk
|
|
|
222
222
|
...h
|
|
223
223
|
};
|
|
224
224
|
return /* @__PURE__ */ ne("div", { className: Te.container, style: E, ...x, children: [
|
|
225
|
-
/* @__PURE__ */
|
|
225
|
+
/* @__PURE__ */ k(
|
|
226
226
|
"input",
|
|
227
227
|
{
|
|
228
228
|
id: F,
|
|
@@ -243,7 +243,7 @@ const wr = "Checkbox-module__container___aV9qz", kr = "Checkbox-module__svg___kk
|
|
|
243
243
|
style: w,
|
|
244
244
|
className: Te.svg,
|
|
245
245
|
children: [
|
|
246
|
-
/* @__PURE__ */
|
|
246
|
+
/* @__PURE__ */ k(
|
|
247
247
|
"rect",
|
|
248
248
|
{
|
|
249
249
|
x: "0",
|
|
@@ -257,7 +257,7 @@ const wr = "Checkbox-module__container___aV9qz", kr = "Checkbox-module__svg___kk
|
|
|
257
257
|
}
|
|
258
258
|
}
|
|
259
259
|
),
|
|
260
|
-
e && /* @__PURE__ */
|
|
260
|
+
e && /* @__PURE__ */ k(
|
|
261
261
|
"path",
|
|
262
262
|
{
|
|
263
263
|
d: "M 25 45 L 45 65 L 75 30",
|
|
@@ -269,9 +269,9 @@ const wr = "Checkbox-module__container___aV9qz", kr = "Checkbox-module__svg___kk
|
|
|
269
269
|
]
|
|
270
270
|
}
|
|
271
271
|
),
|
|
272
|
-
d && /* @__PURE__ */
|
|
272
|
+
d && /* @__PURE__ */ k("label", { htmlFor: F, className: Te.label, style: I, children: d })
|
|
273
273
|
] });
|
|
274
|
-
},
|
|
274
|
+
}, lo = () => {
|
|
275
275
|
const e = q();
|
|
276
276
|
return gr(() => {
|
|
277
277
|
const r = document.documentElement;
|
|
@@ -299,14 +299,14 @@ function H(e) {
|
|
|
299
299
|
return e;
|
|
300
300
|
return r;
|
|
301
301
|
}
|
|
302
|
-
var
|
|
302
|
+
var De = (e) => /^\w*$/.test(e), T = (e) => e === void 0, Ye = (e) => Array.isArray(e) ? e.filter(Boolean) : [], Xe = (e) => Ye(e.replace(/["|']|\]/g, "").split(/\.|\[/)), p = (e, r, t) => {
|
|
303
303
|
if (!r || !U(e))
|
|
304
304
|
return t;
|
|
305
|
-
const s = (
|
|
305
|
+
const s = (De(r) ? [r] : Xe(r)).reduce((n, o) => Q(n) ? n : n[o], e);
|
|
306
306
|
return T(s) || s === e ? T(e[r]) ? t : e[r] : s;
|
|
307
307
|
}, J = (e) => typeof e == "boolean", N = (e, r, t) => {
|
|
308
308
|
let s = -1;
|
|
309
|
-
const n =
|
|
309
|
+
const n = De(r) ? [r] : Xe(r), o = n.length, a = o - 1;
|
|
310
310
|
for (; ++s < o; ) {
|
|
311
311
|
const l = n[s];
|
|
312
312
|
let d = t;
|
|
@@ -319,7 +319,7 @@ var ze = (e) => /^\w*$/.test(e), T = (e) => e === void 0, Ye = (e) => Array.isAr
|
|
|
319
319
|
e[l] = d, e = e[l];
|
|
320
320
|
}
|
|
321
321
|
};
|
|
322
|
-
const
|
|
322
|
+
const Ee = {
|
|
323
323
|
BLUR: "blur",
|
|
324
324
|
FOCUS_OUT: "focusout",
|
|
325
325
|
CHANGE: "change"
|
|
@@ -404,7 +404,7 @@ function ee(e, r, t = /* @__PURE__ */ new WeakSet()) {
|
|
|
404
404
|
return !0;
|
|
405
405
|
}
|
|
406
406
|
function Rr(e) {
|
|
407
|
-
const r = et(), { control: t = r.control, name: s, defaultValue: n, disabled: o, exact: a, compute: l } = e || {}, d = V.useRef(n), h = V.useRef(l), f = V.useRef(void 0), g = V.useRef(t),
|
|
407
|
+
const r = et(), { control: t = r.control, name: s, defaultValue: n, disabled: o, exact: a, compute: l } = e || {}, d = V.useRef(n), h = V.useRef(l), f = V.useRef(void 0), g = V.useRef(t), y = V.useRef(s);
|
|
408
408
|
h.current = l;
|
|
409
409
|
const [x, A] = V.useState(() => {
|
|
410
410
|
const E = t._getWatch(s, d.current);
|
|
@@ -412,7 +412,7 @@ function Rr(e) {
|
|
|
412
412
|
}), F = V.useCallback((E) => {
|
|
413
413
|
const w = je(s, t._names, E || t._formValues, !1, d.current);
|
|
414
414
|
return h.current ? h.current(w) : w;
|
|
415
|
-
}, [t._formValues, t._names, s]),
|
|
415
|
+
}, [t._formValues, t._names, s]), C = V.useCallback((E) => {
|
|
416
416
|
if (!o) {
|
|
417
417
|
const w = je(s, t._names, E || t._formValues, !1, d.current);
|
|
418
418
|
if (h.current) {
|
|
@@ -422,17 +422,17 @@ function Rr(e) {
|
|
|
422
422
|
A(w);
|
|
423
423
|
}
|
|
424
424
|
}, [t._formValues, t._names, o, s]);
|
|
425
|
-
tt(() => ((g.current !== t || !ee(
|
|
425
|
+
tt(() => ((g.current !== t || !ee(y.current, s)) && (g.current = t, y.current = s, C()), t._subscribe({
|
|
426
426
|
name: s,
|
|
427
427
|
formState: {
|
|
428
428
|
values: !0
|
|
429
429
|
},
|
|
430
430
|
exact: a,
|
|
431
431
|
callback: (E) => {
|
|
432
|
-
|
|
432
|
+
C(E.values);
|
|
433
433
|
}
|
|
434
|
-
})), [t, a, s,
|
|
435
|
-
const P = g.current !== t, b =
|
|
434
|
+
})), [t, a, s, C]), V.useEffect(() => t._removeUnmounted());
|
|
435
|
+
const P = g.current !== t, b = y.current, z = V.useMemo(() => {
|
|
436
436
|
if (o)
|
|
437
437
|
return null;
|
|
438
438
|
const E = !P && !ee(b, s);
|
|
@@ -450,7 +450,7 @@ function Nr(e) {
|
|
|
450
450
|
control: n,
|
|
451
451
|
name: t,
|
|
452
452
|
exact: !0
|
|
453
|
-
}), g = V.useRef(e),
|
|
453
|
+
}), g = V.useRef(e), y = V.useRef(void 0), x = V.useRef(n.register(t, {
|
|
454
454
|
...e.rules,
|
|
455
455
|
value: h,
|
|
456
456
|
...J(e.disabled) ? { disabled: e.disabled } : {}
|
|
@@ -482,13 +482,13 @@ function Nr(e) {
|
|
|
482
482
|
value: $t(z),
|
|
483
483
|
name: t
|
|
484
484
|
},
|
|
485
|
-
type:
|
|
486
|
-
}), [t]),
|
|
485
|
+
type: Ee.CHANGE
|
|
486
|
+
}), [t]), C = V.useCallback(() => x.current.onBlur({
|
|
487
487
|
target: {
|
|
488
488
|
value: p(n._formValues, t),
|
|
489
489
|
name: t
|
|
490
490
|
},
|
|
491
|
-
type:
|
|
491
|
+
type: Ee.BLUR
|
|
492
492
|
}), [t, n._formValues]), P = V.useCallback((z) => {
|
|
493
493
|
const E = p(n._fields, t);
|
|
494
494
|
E && z && (E._f.ref = {
|
|
@@ -502,11 +502,11 @@ function Nr(e) {
|
|
|
502
502
|
value: h,
|
|
503
503
|
...J(s) || f.disabled ? { disabled: f.disabled || s } : {},
|
|
504
504
|
onChange: F,
|
|
505
|
-
onBlur:
|
|
505
|
+
onBlur: C,
|
|
506
506
|
ref: P
|
|
507
|
-
}), [t, s, f.disabled, F,
|
|
507
|
+
}), [t, s, f.disabled, F, C, P, h]);
|
|
508
508
|
return V.useEffect(() => {
|
|
509
|
-
const z = n._options.shouldUnregister || o, E =
|
|
509
|
+
const z = n._options.shouldUnregister || o, E = y.current;
|
|
510
510
|
E && E !== t && !l && n.unregister(E), n.register(t, {
|
|
511
511
|
...g.current.rules,
|
|
512
512
|
...J(g.current.disabled) ? { disabled: g.current.disabled } : {}
|
|
@@ -519,7 +519,7 @@ function Nr(e) {
|
|
|
519
519
|
const I = H(p(n._options.defaultValues, t, g.current.defaultValue));
|
|
520
520
|
N(n._defaultValues, t, I), T(p(n._formValues, t)) && N(n._formValues, t, I);
|
|
521
521
|
}
|
|
522
|
-
return !l && n.register(t),
|
|
522
|
+
return !l && n.register(t), y.current = t, () => {
|
|
523
523
|
(l ? z && !n._state.action : z) ? n.unregister(t) : w(t, !1);
|
|
524
524
|
};
|
|
525
525
|
}, [t, n, l, o]), V.useEffect(() => {
|
|
@@ -571,12 +571,12 @@ function Wt(e, r) {
|
|
|
571
571
|
}
|
|
572
572
|
return t;
|
|
573
573
|
}
|
|
574
|
-
var W = (e) => U(e) && !Object.keys(e).length, st = (e) => e.type === "file", te = (e) => typeof e == "function",
|
|
574
|
+
var W = (e) => U(e) && !Object.keys(e).length, st = (e) => e.type === "file", te = (e) => typeof e == "function", Ae = (e) => {
|
|
575
575
|
if (!Ke)
|
|
576
576
|
return !1;
|
|
577
577
|
const r = e ? e.ownerDocument : 0;
|
|
578
578
|
return e instanceof (r && r.defaultView ? r.defaultView.HTMLElement : HTMLElement);
|
|
579
|
-
}, qt = (e) => e.type === "select-multiple", ot = (e) => e.type === "radio", Or = (e) => ot(e) || be(e), Le = (e) =>
|
|
579
|
+
}, qt = (e) => e.type === "select-multiple", ot = (e) => e.type === "radio", Or = (e) => ot(e) || be(e), Le = (e) => Ae(e) && e.isConnected;
|
|
580
580
|
function Mr(e, r) {
|
|
581
581
|
const t = r.slice(0, -1).length;
|
|
582
582
|
let s = 0;
|
|
@@ -591,7 +591,7 @@ function Tr(e) {
|
|
|
591
591
|
return !0;
|
|
592
592
|
}
|
|
593
593
|
function $(e, r) {
|
|
594
|
-
const t = Array.isArray(r) ? r :
|
|
594
|
+
const t = Array.isArray(r) ? r : De(r) ? [r] : Xe(r), s = t.length === 1 ? e : Mr(e, t), n = t.length - 1, o = t[n];
|
|
595
595
|
return s && delete s[o], n !== 0 && (U(s) && W(s) || Array.isArray(s) && Tr(s)) && $(e, t.slice(0, -1)), e;
|
|
596
596
|
}
|
|
597
597
|
var Lr = (e) => {
|
|
@@ -655,7 +655,7 @@ var Ir = (e, r, t, s) => {
|
|
|
655
655
|
fields: n,
|
|
656
656
|
shouldUseNativeValidation: s
|
|
657
657
|
};
|
|
658
|
-
},
|
|
658
|
+
}, ze = (e) => e instanceof RegExp, he = (e) => T(e) ? e : ze(e) ? e.source : U(e) ? ze(e.value) ? e.value.source : e.value : e, Ft = (e) => ({
|
|
659
659
|
isOnSubmit: !e || e === X.onSubmit,
|
|
660
660
|
isOnBlur: e === X.onBlur,
|
|
661
661
|
isOnChange: e === X.onChange,
|
|
@@ -683,7 +683,7 @@ const ve = (e, r, t, s) => {
|
|
|
683
683
|
};
|
|
684
684
|
function kt(e, r, t) {
|
|
685
685
|
const s = p(e, t);
|
|
686
|
-
if (s ||
|
|
686
|
+
if (s || De(t))
|
|
687
687
|
return {
|
|
688
688
|
error: s,
|
|
689
689
|
name: t
|
|
@@ -725,16 +725,16 @@ function Ct(e, r, t = "validate") {
|
|
|
725
725
|
ref: r
|
|
726
726
|
};
|
|
727
727
|
}
|
|
728
|
-
var fe = (e) => U(e) && !
|
|
728
|
+
var fe = (e) => U(e) && !ze(e) ? e : {
|
|
729
729
|
value: e,
|
|
730
730
|
message: ""
|
|
731
731
|
}, Et = async (e, r, t, s, n, o) => {
|
|
732
|
-
const { ref: a, refs: l, required: d, maxLength: h, minLength: f, min: g, max:
|
|
732
|
+
const { ref: a, refs: l, required: d, maxLength: h, minLength: f, min: g, max: y, pattern: x, validate: A, name: F, valueAsNumber: C, mount: P } = e._f, b = p(t, F);
|
|
733
733
|
if (!P || r.has(F))
|
|
734
734
|
return {};
|
|
735
735
|
const z = l ? l[0] : a, E = (D) => {
|
|
736
736
|
n && z.reportValidity && (z.setCustomValidity(J(D) ? "" : D || ""), z.reportValidity());
|
|
737
|
-
}, w = {}, I = ot(a), B = be(a), ie = I || B, G = (
|
|
737
|
+
}, w = {}, I = ot(a), B = be(a), ie = I || B, G = (C || st(a)) && T(a.value) && T(b) || Ae(a) && a.value === "" || b === "" || Array.isArray(b) && !b.length, re = rt.bind(null, F, s, w), se = (D, O, L, j = ae.maxLength, Z = ae.minLength) => {
|
|
738
738
|
const oe = D ? O : L;
|
|
739
739
|
w[F] = {
|
|
740
740
|
type: D ? j : Z,
|
|
@@ -753,14 +753,14 @@ var fe = (e) => U(e) && !Ae(e) ? e : {
|
|
|
753
753
|
}, !s))
|
|
754
754
|
return E(O), w;
|
|
755
755
|
}
|
|
756
|
-
if (!G && (!Q(g) || !Q(
|
|
756
|
+
if (!G && (!Q(g) || !Q(y))) {
|
|
757
757
|
let D, O;
|
|
758
|
-
const L = fe(
|
|
758
|
+
const L = fe(y), j = fe(g);
|
|
759
759
|
if (!Q(b) && !isNaN(b)) {
|
|
760
760
|
const Z = a.valueAsNumber || b && +b;
|
|
761
761
|
Q(L.value) || (D = Z > L.value), Q(j.value) || (O = Z < j.value);
|
|
762
762
|
} else {
|
|
763
|
-
const Z = a.valueAsDate || new Date(b), oe = (
|
|
763
|
+
const Z = a.valueAsDate || new Date(b), oe = (xe) => /* @__PURE__ */ new Date((/* @__PURE__ */ new Date()).toDateString() + " " + xe), me = a.type == "time", de = a.type == "week";
|
|
764
764
|
K(L.value) && b && (D = me ? oe(b) > oe(L.value) : de ? b > L.value : Z > new Date(L.value)), K(j.value) && b && (O = me ? oe(b) < oe(j.value) : de ? b < j.value : Z < new Date(j.value));
|
|
765
765
|
}
|
|
766
766
|
if ((D || O) && (se(!!D, L.message, j.message, ae.max, ae.min), !s))
|
|
@@ -773,7 +773,7 @@ var fe = (e) => U(e) && !Ae(e) ? e : {
|
|
|
773
773
|
}
|
|
774
774
|
if (x && !G && K(b)) {
|
|
775
775
|
const { value: D, message: O } = fe(x);
|
|
776
|
-
if (
|
|
776
|
+
if (ze(D) && !b.match(D) && (w[F] = {
|
|
777
777
|
type: ae.pattern,
|
|
778
778
|
message: O,
|
|
779
779
|
ref: a,
|
|
@@ -856,7 +856,7 @@ function Zr(e = {}) {
|
|
|
856
856
|
let g = {
|
|
857
857
|
...f
|
|
858
858
|
};
|
|
859
|
-
const
|
|
859
|
+
const y = {
|
|
860
860
|
array: pt(),
|
|
861
861
|
state: pt()
|
|
862
862
|
}, x = r.criteriaMode === X.all, A = (i) => (u) => {
|
|
@@ -864,32 +864,32 @@ function Zr(e = {}) {
|
|
|
864
864
|
}, F = async (i) => {
|
|
865
865
|
if (!r.disabled && (f.isValid || g.isValid || i)) {
|
|
866
866
|
const u = r.resolver ? W((await B()).errors) : await G(s, !0);
|
|
867
|
-
u !== t.isValid &&
|
|
867
|
+
u !== t.isValid && y.state.next({
|
|
868
868
|
isValid: u
|
|
869
869
|
});
|
|
870
870
|
}
|
|
871
|
-
},
|
|
871
|
+
}, C = (i, u) => {
|
|
872
872
|
!r.disabled && (f.isValidating || f.validatingFields || g.isValidating || g.validatingFields) && ((i || Array.from(l.mount)).forEach((c) => {
|
|
873
873
|
c && (u ? N(t.validatingFields, c, u) : $(t.validatingFields, c));
|
|
874
|
-
}),
|
|
874
|
+
}), y.state.next({
|
|
875
875
|
validatingFields: t.validatingFields,
|
|
876
876
|
isValidating: !W(t.validatingFields)
|
|
877
877
|
}));
|
|
878
|
-
}, P = (i, u = [], c, v, _ = !0,
|
|
878
|
+
}, P = (i, u = [], c, v, _ = !0, m = !0) => {
|
|
879
879
|
if (v && c && !r.disabled) {
|
|
880
|
-
if (a.action = !0,
|
|
880
|
+
if (a.action = !0, m && Array.isArray(p(s, i))) {
|
|
881
881
|
const S = c(p(s, i), v.argA, v.argB);
|
|
882
882
|
_ && N(s, i, S);
|
|
883
883
|
}
|
|
884
|
-
if (
|
|
884
|
+
if (m && Array.isArray(p(t.errors, i))) {
|
|
885
885
|
const S = c(p(t.errors, i), v.argA, v.argB);
|
|
886
886
|
_ && N(t.errors, i, S), Wr(t.errors, i);
|
|
887
887
|
}
|
|
888
|
-
if ((f.touchedFields || g.touchedFields) &&
|
|
888
|
+
if ((f.touchedFields || g.touchedFields) && m && Array.isArray(p(t.touchedFields, i))) {
|
|
889
889
|
const S = c(p(t.touchedFields, i), v.argA, v.argB);
|
|
890
890
|
_ && N(t.touchedFields, i, S);
|
|
891
891
|
}
|
|
892
|
-
(f.dirtyFields || g.dirtyFields) && (t.dirtyFields = ye(n, o)),
|
|
892
|
+
(f.dirtyFields || g.dirtyFields) && (t.dirtyFields = ye(n, o)), y.state.next({
|
|
893
893
|
name: i,
|
|
894
894
|
isDirty: se(i, u),
|
|
895
895
|
dirtyFields: t.dirtyFields,
|
|
@@ -899,56 +899,56 @@ function Zr(e = {}) {
|
|
|
899
899
|
} else
|
|
900
900
|
N(o, i, u);
|
|
901
901
|
}, b = (i, u) => {
|
|
902
|
-
N(t.errors, i, u),
|
|
902
|
+
N(t.errors, i, u), y.state.next({
|
|
903
903
|
errors: t.errors
|
|
904
904
|
});
|
|
905
905
|
}, z = (i) => {
|
|
906
|
-
t.errors = i,
|
|
906
|
+
t.errors = i, y.state.next({
|
|
907
907
|
errors: t.errors,
|
|
908
908
|
isValid: !1
|
|
909
909
|
});
|
|
910
910
|
}, E = (i, u, c, v) => {
|
|
911
911
|
const _ = p(s, i);
|
|
912
912
|
if (_) {
|
|
913
|
-
const
|
|
914
|
-
T(
|
|
913
|
+
const m = p(o, i, T(c) ? p(n, i) : c);
|
|
914
|
+
T(m) || v && v.defaultChecked || u ? N(o, i, u ? m : xt(_._f)) : L(i, m), a.mount && F();
|
|
915
915
|
}
|
|
916
916
|
}, w = (i, u, c, v, _) => {
|
|
917
|
-
let
|
|
917
|
+
let m = !1, S = !1;
|
|
918
918
|
const R = {
|
|
919
919
|
name: i
|
|
920
920
|
};
|
|
921
921
|
if (!r.disabled) {
|
|
922
922
|
if (!c || v) {
|
|
923
|
-
(f.isDirty || g.isDirty) && (S = t.isDirty, t.isDirty = R.isDirty = se(),
|
|
923
|
+
(f.isDirty || g.isDirty) && (S = t.isDirty, t.isDirty = R.isDirty = se(), m = S !== R.isDirty);
|
|
924
924
|
const M = ee(p(n, i), u);
|
|
925
|
-
S = !!p(t.dirtyFields, i), M ? $(t.dirtyFields, i) : N(t.dirtyFields, i, !0), R.dirtyFields = t.dirtyFields,
|
|
925
|
+
S = !!p(t.dirtyFields, i), M ? $(t.dirtyFields, i) : N(t.dirtyFields, i, !0), R.dirtyFields = t.dirtyFields, m = m || (f.dirtyFields || g.dirtyFields) && S !== !M;
|
|
926
926
|
}
|
|
927
927
|
if (c) {
|
|
928
928
|
const M = p(t.touchedFields, i);
|
|
929
|
-
M || (N(t.touchedFields, i, c), R.touchedFields = t.touchedFields,
|
|
929
|
+
M || (N(t.touchedFields, i, c), R.touchedFields = t.touchedFields, m = m || (f.touchedFields || g.touchedFields) && M !== c);
|
|
930
930
|
}
|
|
931
|
-
|
|
931
|
+
m && _ && y.state.next(R);
|
|
932
932
|
}
|
|
933
|
-
return
|
|
933
|
+
return m ? R : {};
|
|
934
934
|
}, I = (i, u, c, v) => {
|
|
935
|
-
const _ = p(t.errors, i),
|
|
936
|
-
if (r.delayError && c ? (d = A(() => b(i, c)), d(r.delayError)) : (clearTimeout(h), d = null, c ? N(t.errors, i, c) : $(t.errors, i)), (c ? !ee(_, c) : _) || !W(v) ||
|
|
935
|
+
const _ = p(t.errors, i), m = (f.isValid || g.isValid) && J(u) && t.isValid !== u;
|
|
936
|
+
if (r.delayError && c ? (d = A(() => b(i, c)), d(r.delayError)) : (clearTimeout(h), d = null, c ? N(t.errors, i, c) : $(t.errors, i)), (c ? !ee(_, c) : _) || !W(v) || m) {
|
|
937
937
|
const S = {
|
|
938
938
|
...v,
|
|
939
|
-
...
|
|
939
|
+
...m && J(u) ? { isValid: u } : {},
|
|
940
940
|
errors: t.errors,
|
|
941
941
|
name: i
|
|
942
942
|
};
|
|
943
943
|
t = {
|
|
944
944
|
...t,
|
|
945
945
|
...S
|
|
946
|
-
},
|
|
946
|
+
}, y.state.next(S);
|
|
947
947
|
}
|
|
948
948
|
}, B = async (i) => {
|
|
949
|
-
|
|
949
|
+
C(i, !0);
|
|
950
950
|
const u = await r.resolver(o, r.context, Ir(i || l.mount, s, r.criteriaMode, r.shouldUseNativeValidation));
|
|
951
|
-
return
|
|
951
|
+
return C(i), u;
|
|
952
952
|
}, ie = async (i) => {
|
|
953
953
|
const { errors: u } = await B(i);
|
|
954
954
|
if (i)
|
|
@@ -965,14 +965,14 @@ function Zr(e = {}) {
|
|
|
965
965
|
for (const v in i) {
|
|
966
966
|
const _ = i[v];
|
|
967
967
|
if (_) {
|
|
968
|
-
const { _f:
|
|
969
|
-
if (
|
|
970
|
-
const R = l.array.has(
|
|
971
|
-
M && f.validatingFields &&
|
|
968
|
+
const { _f: m, ...S } = _;
|
|
969
|
+
if (m) {
|
|
970
|
+
const R = l.array.has(m.name), M = _._f && Br(_._f);
|
|
971
|
+
M && f.validatingFields && C([m.name], !0);
|
|
972
972
|
const Y = await Et(_, l.disabled, o, x, r.shouldUseNativeValidation && !u, R);
|
|
973
|
-
if (M && f.validatingFields &&
|
|
973
|
+
if (M && f.validatingFields && C([m.name]), Y[m.name] && (c.valid = !1, u))
|
|
974
974
|
break;
|
|
975
|
-
!u && (p(Y,
|
|
975
|
+
!u && (p(Y, m.name) ? R ? qr(t.errors, Y, m.name) : N(t.errors, m.name, Y[m.name]) : $(t.errors, m.name));
|
|
976
976
|
}
|
|
977
977
|
!W(S) && await G(S, u, c);
|
|
978
978
|
}
|
|
@@ -984,16 +984,16 @@ function Zr(e = {}) {
|
|
|
984
984
|
u && (u._f.refs ? u._f.refs.every((c) => !Le(c)) : !Le(u._f.ref)) && Pe(i);
|
|
985
985
|
}
|
|
986
986
|
l.unMount = /* @__PURE__ */ new Set();
|
|
987
|
-
}, se = (i, u) => !r.disabled && (i && u && N(o, i, u), !ee(
|
|
987
|
+
}, se = (i, u) => !r.disabled && (i && u && N(o, i, u), !ee(xe(), n)), D = (i, u, c) => je(i, l, {
|
|
988
988
|
...a.mount ? o : T(u) ? n : K(i) ? { [i]: u } : u
|
|
989
989
|
}, c, u), O = (i) => Ye(p(a.mount ? o : n, i, r.shouldUnregister ? p(n, i, []) : [])), L = (i, u, c = {}) => {
|
|
990
990
|
const v = p(s, i);
|
|
991
991
|
let _ = u;
|
|
992
992
|
if (v) {
|
|
993
|
-
const
|
|
994
|
-
|
|
993
|
+
const m = v._f;
|
|
994
|
+
m && (!m.disabled && N(o, i, Qt(u, m)), _ = Ae(m.ref) && Q(u) ? "" : u, qt(m.ref) ? [...m.ref.options].forEach((S) => S.selected = _.includes(S.value)) : m.refs ? be(m.ref) ? m.refs.forEach((S) => {
|
|
995
995
|
(!S.defaultChecked || !S.disabled) && (Array.isArray(_) ? S.checked = !!_.find((R) => R === S.value) : S.checked = _ === S.value || !!_);
|
|
996
|
-
}) :
|
|
996
|
+
}) : m.refs.forEach((S) => S.checked = S.value === _) : st(m.ref) ? m.ref.value = "" : (m.ref.value = _, m.ref.type || y.state.next({
|
|
997
997
|
name: i,
|
|
998
998
|
values: H(o)
|
|
999
999
|
})));
|
|
@@ -1003,19 +1003,19 @@ function Zr(e = {}) {
|
|
|
1003
1003
|
for (const v in u) {
|
|
1004
1004
|
if (!u.hasOwnProperty(v))
|
|
1005
1005
|
return;
|
|
1006
|
-
const _ = u[v],
|
|
1007
|
-
(l.array.has(i) || U(_) || S && !S._f) && !ce(_) ? j(
|
|
1006
|
+
const _ = u[v], m = i + "." + v, S = p(s, m);
|
|
1007
|
+
(l.array.has(i) || U(_) || S && !S._f) && !ce(_) ? j(m, _, c) : L(m, _, c);
|
|
1008
1008
|
}
|
|
1009
1009
|
}, Z = (i, u, c = {}) => {
|
|
1010
|
-
const v = p(s, i), _ = l.array.has(i),
|
|
1011
|
-
N(o, i,
|
|
1010
|
+
const v = p(s, i), _ = l.array.has(i), m = H(u);
|
|
1011
|
+
N(o, i, m), _ ? (y.array.next({
|
|
1012
1012
|
name: i,
|
|
1013
1013
|
values: H(o)
|
|
1014
|
-
}), (f.isDirty || f.dirtyFields || g.isDirty || g.dirtyFields) && c.shouldDirty &&
|
|
1014
|
+
}), (f.isDirty || f.dirtyFields || g.isDirty || g.dirtyFields) && c.shouldDirty && y.state.next({
|
|
1015
1015
|
name: i,
|
|
1016
1016
|
dirtyFields: ye(n, o),
|
|
1017
|
-
isDirty: se(i,
|
|
1018
|
-
})) : v && !v._f && !Q(
|
|
1017
|
+
isDirty: se(i, m)
|
|
1018
|
+
})) : v && !v._f && !Q(m) ? j(i, m, c) : L(i, m, c), wt(i, l) && y.state.next({ ...t, name: i }), y.state.next({
|
|
1019
1019
|
name: a.mount ? i : void 0,
|
|
1020
1020
|
values: H(o)
|
|
1021
1021
|
});
|
|
@@ -1023,28 +1023,28 @@ function Zr(e = {}) {
|
|
|
1023
1023
|
a.mount = !0;
|
|
1024
1024
|
const u = i.target;
|
|
1025
1025
|
let c = u.name, v = !0;
|
|
1026
|
-
const _ = p(s, c),
|
|
1026
|
+
const _ = p(s, c), m = (M) => {
|
|
1027
1027
|
v = Number.isNaN(M) || ce(M) && isNaN(M.getTime()) || ee(M, p(o, c, M));
|
|
1028
1028
|
}, S = Ft(r.mode), R = Ft(r.reValidateMode);
|
|
1029
1029
|
if (_) {
|
|
1030
1030
|
let M, Y;
|
|
1031
|
-
const
|
|
1032
|
-
N(o, c,
|
|
1033
|
-
const Me = w(c,
|
|
1034
|
-
if (!le &&
|
|
1031
|
+
const Fe = u.type ? xt(_._f) : $t(i), le = i.type === Ee.BLUR || i.type === Ee.FOCUS_OUT, dr = !$r(_._f) && !r.resolver && !p(t.errors, c) && !_._f.deps || jr(le, p(t.touchedFields, c), t.isSubmitted, R, S), Oe = wt(c, l, le);
|
|
1032
|
+
N(o, c, Fe), le ? (!u || !u.readOnly) && (_._f.onBlur && _._f.onBlur(i), d && d(0)) : _._f.onChange && _._f.onChange(i);
|
|
1033
|
+
const Me = w(c, Fe, le), fr = !W(Me) || Oe;
|
|
1034
|
+
if (!le && y.state.next({
|
|
1035
1035
|
name: c,
|
|
1036
1036
|
type: i.type,
|
|
1037
1037
|
values: H(o)
|
|
1038
1038
|
}), dr)
|
|
1039
|
-
return (f.isValid || g.isValid) && (r.mode === "onBlur" ? le && F() : le || F()), fr &&
|
|
1040
|
-
if (!le && Oe &&
|
|
1039
|
+
return (f.isValid || g.isValid) && (r.mode === "onBlur" ? le && F() : le || F()), fr && y.state.next({ name: c, ...Oe ? {} : Me });
|
|
1040
|
+
if (!le && Oe && y.state.next({ ...t }), r.resolver) {
|
|
1041
1041
|
const { errors: yt } = await B([c]);
|
|
1042
|
-
if (
|
|
1042
|
+
if (m(Fe), v) {
|
|
1043
1043
|
const yr = kt(t.errors, s, c), mt = kt(yt, s, yr.name || c);
|
|
1044
1044
|
M = mt.error, c = mt.name, Y = W(yt);
|
|
1045
1045
|
}
|
|
1046
1046
|
} else
|
|
1047
|
-
|
|
1047
|
+
C([c], !0), M = (await Et(_, l.disabled, o, x, r.shouldUseNativeValidation))[c], C([c]), m(Fe), v && (M ? Y = !1 : (f.isValid || g.isValid) && (Y = await G(s, !0)));
|
|
1048
1048
|
v && (_._f.deps && (!Array.isArray(_._f.deps) || _._f.deps.length > 0) && de(_._f.deps), I(c, Y, M, Me));
|
|
1049
1049
|
}
|
|
1050
1050
|
}, me = (i, u) => {
|
|
@@ -1054,18 +1054,18 @@ function Zr(e = {}) {
|
|
|
1054
1054
|
let c, v;
|
|
1055
1055
|
const _ = pe(i);
|
|
1056
1056
|
if (r.resolver) {
|
|
1057
|
-
const
|
|
1058
|
-
c = W(
|
|
1059
|
-
} else i ? (v = (await Promise.all(_.map(async (
|
|
1060
|
-
const S = p(s,
|
|
1061
|
-
return await G(S && S._f ? { [
|
|
1057
|
+
const m = await ie(T(i) ? i : _);
|
|
1058
|
+
c = W(m), v = i ? !_.some((S) => p(m, S)) : c;
|
|
1059
|
+
} else i ? (v = (await Promise.all(_.map(async (m) => {
|
|
1060
|
+
const S = p(s, m);
|
|
1061
|
+
return await G(S && S._f ? { [m]: S } : S);
|
|
1062
1062
|
}))).every(Boolean), !(!v && !t.isValid) && F()) : v = c = await G(s);
|
|
1063
|
-
return
|
|
1063
|
+
return y.state.next({
|
|
1064
1064
|
...!K(i) || (f.isValid || g.isValid) && c !== t.isValid ? {} : { name: i },
|
|
1065
1065
|
...r.resolver || !i ? { isValid: c } : {},
|
|
1066
1066
|
errors: t.errors
|
|
1067
1067
|
}), u.shouldFocus && !v && ve(s, me, i ? _ : l.mount), v;
|
|
1068
|
-
},
|
|
1068
|
+
}, xe = (i, u) => {
|
|
1069
1069
|
let c = {
|
|
1070
1070
|
...a.mount ? o : n
|
|
1071
1071
|
};
|
|
@@ -1077,23 +1077,23 @@ function Zr(e = {}) {
|
|
|
1077
1077
|
isValidating: !!p(t.validatingFields, i),
|
|
1078
1078
|
isTouched: !!p((u || t).touchedFields, i)
|
|
1079
1079
|
}), or = (i) => {
|
|
1080
|
-
i && pe(i).forEach((u) => $(t.errors, u)),
|
|
1080
|
+
i && pe(i).forEach((u) => $(t.errors, u)), y.state.next({
|
|
1081
1081
|
errors: i ? t.errors : {}
|
|
1082
1082
|
});
|
|
1083
1083
|
}, it = (i, u, c) => {
|
|
1084
|
-
const v = (p(s, i, { _f: {} })._f || {}).ref, _ = p(t.errors, i) || {}, { ref:
|
|
1084
|
+
const v = (p(s, i, { _f: {} })._f || {}).ref, _ = p(t.errors, i) || {}, { ref: m, message: S, type: R, ...M } = _;
|
|
1085
1085
|
N(t.errors, i, {
|
|
1086
1086
|
...M,
|
|
1087
1087
|
...u,
|
|
1088
1088
|
ref: v
|
|
1089
|
-
}),
|
|
1089
|
+
}), y.state.next({
|
|
1090
1090
|
name: i,
|
|
1091
1091
|
errors: t.errors,
|
|
1092
1092
|
isValid: !1
|
|
1093
1093
|
}), c && c.shouldFocus && v && v.focus && v.focus();
|
|
1094
|
-
}, nr = (i, u) => te(i) ?
|
|
1094
|
+
}, nr = (i, u) => te(i) ? y.state.subscribe({
|
|
1095
1095
|
next: (c) => "values" in c && i(D(void 0, u), c)
|
|
1096
|
-
}) : D(i, u, !0), at = (i) =>
|
|
1096
|
+
}) : D(i, u, !0), at = (i) => y.state.subscribe({
|
|
1097
1097
|
next: (u) => {
|
|
1098
1098
|
Hr(i.name, u.name, i.exact) && Ur(u, i.formState || f, cr, i.reRenderRoot) && i.callback({
|
|
1099
1099
|
values: { ...o },
|
|
@@ -1111,9 +1111,9 @@ function Zr(e = {}) {
|
|
|
1111
1111
|
})), Pe = (i, u = {}) => {
|
|
1112
1112
|
for (const c of i ? pe(i) : l.mount)
|
|
1113
1113
|
l.mount.delete(c), l.array.delete(c), u.keepValue || ($(s, c), $(o, c)), !u.keepError && $(t.errors, c), !u.keepDirty && $(t.dirtyFields, c), !u.keepTouched && $(t.touchedFields, c), !u.keepIsValidating && $(t.validatingFields, c), !r.shouldUnregister && !u.keepDefaultValue && $(n, c);
|
|
1114
|
-
|
|
1114
|
+
y.state.next({
|
|
1115
1115
|
values: H(o)
|
|
1116
|
-
}),
|
|
1116
|
+
}), y.state.next({
|
|
1117
1117
|
...t,
|
|
1118
1118
|
...u.keepDirty ? { isDirty: se() } : {}
|
|
1119
1119
|
}), !u.keepIsValid && F();
|
|
@@ -1149,8 +1149,8 @@ function Zr(e = {}) {
|
|
|
1149
1149
|
ref: (_) => {
|
|
1150
1150
|
if (_) {
|
|
1151
1151
|
Re(i, u), c = p(s, i);
|
|
1152
|
-
const
|
|
1153
|
-
if (S ? R.find((M) => M ===
|
|
1152
|
+
const m = T(_.value) && _.querySelectorAll && _.querySelectorAll("input,select,textarea")[0] || _, S = Or(m), R = c._f.refs || [];
|
|
1153
|
+
if (S ? R.find((M) => M === m) : m === c._f.ref)
|
|
1154
1154
|
return;
|
|
1155
1155
|
N(s, i, {
|
|
1156
1156
|
_f: {
|
|
@@ -1158,19 +1158,19 @@ function Zr(e = {}) {
|
|
|
1158
1158
|
...S ? {
|
|
1159
1159
|
refs: [
|
|
1160
1160
|
...R.filter(Le),
|
|
1161
|
-
|
|
1161
|
+
m,
|
|
1162
1162
|
...Array.isArray(p(n, i)) ? [{}] : []
|
|
1163
1163
|
],
|
|
1164
|
-
ref: { type:
|
|
1165
|
-
} : { ref:
|
|
1164
|
+
ref: { type: m.type, name: i }
|
|
1165
|
+
} : { ref: m }
|
|
1166
1166
|
}
|
|
1167
|
-
}), E(i, !1, void 0,
|
|
1167
|
+
}), E(i, !1, void 0, m);
|
|
1168
1168
|
} else
|
|
1169
1169
|
c = p(s, i, {}), c._f && (c._f.mount = !1), (r.shouldUnregister || u.shouldUnregister) && !(Ut(l.array, i) && a.action) && l.unMount.add(i);
|
|
1170
1170
|
}
|
|
1171
1171
|
};
|
|
1172
1172
|
}, Ne = () => r.shouldFocusError && ve(s, me, l.mount), ar = (i) => {
|
|
1173
|
-
J(i) && (
|
|
1173
|
+
J(i) && (y.state.next({ disabled: i }), ve(s, (u, c) => {
|
|
1174
1174
|
const v = p(s, c);
|
|
1175
1175
|
v && (u.disabled = v._f.disabled || i, Array.isArray(v._f.refs) && v._f.refs.forEach((_) => {
|
|
1176
1176
|
_.disabled = v._f.disabled || i;
|
|
@@ -1180,28 +1180,28 @@ function Zr(e = {}) {
|
|
|
1180
1180
|
let v;
|
|
1181
1181
|
c && (c.preventDefault && c.preventDefault(), c.persist && c.persist());
|
|
1182
1182
|
let _ = H(o);
|
|
1183
|
-
if (
|
|
1183
|
+
if (y.state.next({
|
|
1184
1184
|
isSubmitting: !0
|
|
1185
1185
|
}), r.resolver) {
|
|
1186
|
-
const { errors:
|
|
1187
|
-
t.errors =
|
|
1186
|
+
const { errors: m, values: S } = await B();
|
|
1187
|
+
t.errors = m, _ = H(S);
|
|
1188
1188
|
} else
|
|
1189
1189
|
await G(s);
|
|
1190
1190
|
if (l.disabled.size)
|
|
1191
|
-
for (const
|
|
1192
|
-
$(_,
|
|
1191
|
+
for (const m of l.disabled)
|
|
1192
|
+
$(_, m);
|
|
1193
1193
|
if ($(t.errors, "root"), W(t.errors)) {
|
|
1194
|
-
|
|
1194
|
+
y.state.next({
|
|
1195
1195
|
errors: {}
|
|
1196
1196
|
});
|
|
1197
1197
|
try {
|
|
1198
1198
|
await i(_, c);
|
|
1199
|
-
} catch (
|
|
1200
|
-
v =
|
|
1199
|
+
} catch (m) {
|
|
1200
|
+
v = m;
|
|
1201
1201
|
}
|
|
1202
1202
|
} else
|
|
1203
1203
|
u && await u({ ...t.errors }, c), Ne(), setTimeout(Ne);
|
|
1204
|
-
if (
|
|
1204
|
+
if (y.state.next({
|
|
1205
1205
|
isSubmitted: !0,
|
|
1206
1206
|
isSubmitting: !1,
|
|
1207
1207
|
isSubmitSuccessful: W(t.errors) && !v,
|
|
@@ -1210,9 +1210,9 @@ function Zr(e = {}) {
|
|
|
1210
1210
|
}), v)
|
|
1211
1211
|
throw v;
|
|
1212
1212
|
}, lr = (i, u = {}) => {
|
|
1213
|
-
p(s, i) && (T(u.defaultValue) ? Z(i, H(p(n, i))) : (Z(i, u.defaultValue), N(n, i, H(u.defaultValue))), u.keepTouched || $(t.touchedFields, i), u.keepDirty || ($(t.dirtyFields, i), t.isDirty = u.defaultValue ? se(i, H(p(n, i))) : se()), u.keepError || ($(t.errors, i), f.isValid && F()),
|
|
1213
|
+
p(s, i) && (T(u.defaultValue) ? Z(i, H(p(n, i))) : (Z(i, u.defaultValue), N(n, i, H(u.defaultValue))), u.keepTouched || $(t.touchedFields, i), u.keepDirty || ($(t.dirtyFields, i), t.isDirty = u.defaultValue ? se(i, H(p(n, i))) : se()), u.keepError || ($(t.errors, i), f.isValid && F()), y.state.next({ ...t }));
|
|
1214
1214
|
}, ct = (i, u = {}) => {
|
|
1215
|
-
const c = i ? H(i) : n, v = H(c), _ = W(i),
|
|
1215
|
+
const c = i ? H(i) : n, v = H(c), _ = W(i), m = _ ? n : v;
|
|
1216
1216
|
if (u.keepDefaultValues || (n = c), !u.keepValues) {
|
|
1217
1217
|
if (u.keepDirtyValues) {
|
|
1218
1218
|
const S = /* @__PURE__ */ new Set([
|
|
@@ -1220,14 +1220,14 @@ function Zr(e = {}) {
|
|
|
1220
1220
|
...Object.keys(ye(n, o))
|
|
1221
1221
|
]);
|
|
1222
1222
|
for (const R of Array.from(S))
|
|
1223
|
-
p(t.dirtyFields, R) ? N(
|
|
1223
|
+
p(t.dirtyFields, R) ? N(m, R, p(o, R)) : Z(R, p(m, R));
|
|
1224
1224
|
} else {
|
|
1225
1225
|
if (Ke && T(i))
|
|
1226
1226
|
for (const S of l.mount) {
|
|
1227
1227
|
const R = p(s, S);
|
|
1228
1228
|
if (R && R._f) {
|
|
1229
1229
|
const M = Array.isArray(R._f.refs) ? R._f.refs[0] : R._f.ref;
|
|
1230
|
-
if (
|
|
1230
|
+
if (Ae(M)) {
|
|
1231
1231
|
const Y = M.closest("form");
|
|
1232
1232
|
if (Y) {
|
|
1233
1233
|
Y.reset();
|
|
@@ -1238,14 +1238,14 @@ function Zr(e = {}) {
|
|
|
1238
1238
|
}
|
|
1239
1239
|
if (u.keepFieldsRef)
|
|
1240
1240
|
for (const S of l.mount)
|
|
1241
|
-
Z(S, p(
|
|
1241
|
+
Z(S, p(m, S));
|
|
1242
1242
|
else
|
|
1243
1243
|
s = {};
|
|
1244
1244
|
}
|
|
1245
|
-
o = r.shouldUnregister ? u.keepDefaultValues ? H(n) : {} : H(
|
|
1246
|
-
values: { ...
|
|
1247
|
-
}),
|
|
1248
|
-
values: { ...
|
|
1245
|
+
o = r.shouldUnregister ? u.keepDefaultValues ? H(n) : {} : H(m), y.array.next({
|
|
1246
|
+
values: { ...m }
|
|
1247
|
+
}), y.state.next({
|
|
1248
|
+
values: { ...m }
|
|
1249
1249
|
});
|
|
1250
1250
|
}
|
|
1251
1251
|
l = {
|
|
@@ -1256,7 +1256,7 @@ function Zr(e = {}) {
|
|
|
1256
1256
|
watch: /* @__PURE__ */ new Set(),
|
|
1257
1257
|
watchAll: !1,
|
|
1258
1258
|
focus: ""
|
|
1259
|
-
}, a.mount = !f.isValid || !!u.keepIsValid || !!u.keepDirtyValues || !r.shouldUnregister && !W(
|
|
1259
|
+
}, a.mount = !f.isValid || !!u.keepIsValid || !!u.keepDirtyValues || !r.shouldUnregister && !W(m), a.watch = !!r.shouldUnregister, y.state.next({
|
|
1260
1260
|
submitCount: u.keepSubmitCount ? t.submitCount : 0,
|
|
1261
1261
|
isDirty: _ ? !1 : u.keepDirty ? t.isDirty : !!(u.keepDefaultValues && !ee(i, n)),
|
|
1262
1262
|
isSubmitted: u.keepIsSubmitted ? t.isSubmitted : !1,
|
|
@@ -1297,13 +1297,13 @@ function Zr(e = {}) {
|
|
|
1297
1297
|
_getFieldArray: O,
|
|
1298
1298
|
_reset: ct,
|
|
1299
1299
|
_resetDefaultValues: () => te(r.defaultValues) && r.defaultValues().then((i) => {
|
|
1300
|
-
dt(i, r.resetOptions),
|
|
1300
|
+
dt(i, r.resetOptions), y.state.next({
|
|
1301
1301
|
isLoading: !1
|
|
1302
1302
|
});
|
|
1303
1303
|
}),
|
|
1304
1304
|
_removeUnmounted: re,
|
|
1305
1305
|
_disableForm: ar,
|
|
1306
|
-
_subjects:
|
|
1306
|
+
_subjects: y,
|
|
1307
1307
|
_proxyFormState: f,
|
|
1308
1308
|
get _fields() {
|
|
1309
1309
|
return s;
|
|
@@ -1345,7 +1345,7 @@ function Zr(e = {}) {
|
|
|
1345
1345
|
handleSubmit: ut,
|
|
1346
1346
|
watch: nr,
|
|
1347
1347
|
setValue: Z,
|
|
1348
|
-
getValues:
|
|
1348
|
+
getValues: xe,
|
|
1349
1349
|
reset: dt,
|
|
1350
1350
|
resetField: lr,
|
|
1351
1351
|
clearErrors: or,
|
|
@@ -1497,14 +1497,14 @@ function Xr(e, r) {
|
|
|
1497
1497
|
}
|
|
1498
1498
|
const Xt = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
|
|
1499
1499
|
};
|
|
1500
|
-
function
|
|
1500
|
+
function ke(e) {
|
|
1501
1501
|
return typeof e == "string" ? e : e == null ? void 0 : e.message;
|
|
1502
1502
|
}
|
|
1503
1503
|
function er(e, r, t) {
|
|
1504
1504
|
var n, o, a, l, d, h;
|
|
1505
1505
|
const s = { ...e, path: e.path ?? [] };
|
|
1506
1506
|
if (!e.message) {
|
|
1507
|
-
const f =
|
|
1507
|
+
const f = ke((a = (o = (n = e.inst) == null ? void 0 : n._zod.def) == null ? void 0 : o.error) == null ? void 0 : a.call(o, e)) ?? ke((l = r == null ? void 0 : r.error) == null ? void 0 : l.call(r, e)) ?? ke((d = t.customError) == null ? void 0 : d.call(t, e)) ?? ke((h = t.localeError) == null ? void 0 : h.call(t, e)) ?? "Invalid input";
|
|
1508
1508
|
s.message = f;
|
|
1509
1509
|
}
|
|
1510
1510
|
return delete s.inst, delete s.continue, r != null && r.reportInput || delete s.input, s;
|
|
@@ -1645,9 +1645,9 @@ function us({
|
|
|
1645
1645
|
mode: n,
|
|
1646
1646
|
reValidateMode: o
|
|
1647
1647
|
}), d = l.handleSubmit(e);
|
|
1648
|
-
return /* @__PURE__ */
|
|
1648
|
+
return /* @__PURE__ */ k(sr.Provider, { value: l, children: /* @__PURE__ */ k("form", { onSubmit: d, ...a, children: typeof r == "function" ? r(l) : r }) });
|
|
1649
1649
|
}
|
|
1650
|
-
const
|
|
1650
|
+
const uo = us, cs = "FormLabel-module__label___0M-fo", ds = "FormLabel-module__disabled___ktIFp", Rt = {
|
|
1651
1651
|
label: cs,
|
|
1652
1652
|
disabled: ds
|
|
1653
1653
|
}, fs = ({
|
|
@@ -1673,7 +1673,7 @@ const lo = us, cs = "FormLabel-module__label___0M-fo", ds = "FormLabel-module__d
|
|
|
1673
1673
|
color: f,
|
|
1674
1674
|
disabled: t,
|
|
1675
1675
|
fontSize: n || ".85em"
|
|
1676
|
-
}),
|
|
1676
|
+
}), y = {
|
|
1677
1677
|
color: g.color,
|
|
1678
1678
|
fontSize: g.fontSize,
|
|
1679
1679
|
opacity: g.opacity,
|
|
@@ -1683,12 +1683,12 @@ const lo = us, cs = "FormLabel-module__label___0M-fo", ds = "FormLabel-module__d
|
|
|
1683
1683
|
Rt.label,
|
|
1684
1684
|
t ? Rt.disabled : ""
|
|
1685
1685
|
].filter(Boolean).join(" ");
|
|
1686
|
-
return /* @__PURE__ */
|
|
1686
|
+
return /* @__PURE__ */ k(
|
|
1687
1687
|
"label",
|
|
1688
1688
|
{
|
|
1689
1689
|
className: x,
|
|
1690
1690
|
htmlFor: o,
|
|
1691
|
-
style:
|
|
1691
|
+
style: y,
|
|
1692
1692
|
...l,
|
|
1693
1693
|
children: e
|
|
1694
1694
|
}
|
|
@@ -1704,7 +1704,7 @@ const lo = us, cs = "FormLabel-module__label___0M-fo", ds = "FormLabel-module__d
|
|
|
1704
1704
|
color: q().colors.error,
|
|
1705
1705
|
...t
|
|
1706
1706
|
};
|
|
1707
|
-
return /* @__PURE__ */
|
|
1707
|
+
return /* @__PURE__ */ k(
|
|
1708
1708
|
"div",
|
|
1709
1709
|
{
|
|
1710
1710
|
className: `${hs.formError} ${r || ""}`.trim(),
|
|
@@ -1737,13 +1737,13 @@ const lo = us, cs = "FormLabel-module__label___0M-fo", ds = "FormLabel-module__d
|
|
|
1737
1737
|
s ? ge.error : "",
|
|
1738
1738
|
o ? ge.disabled : "",
|
|
1739
1739
|
l
|
|
1740
|
-
].filter(Boolean).join(" "), g = V.Children.map(e, (
|
|
1741
|
-
if (V.isValidElement(
|
|
1740
|
+
].filter(Boolean).join(" "), g = V.Children.map(e, (y) => {
|
|
1741
|
+
if (V.isValidElement(y)) {
|
|
1742
1742
|
const x = {};
|
|
1743
|
-
if (o &&
|
|
1744
|
-
return V.cloneElement(
|
|
1743
|
+
if (o && y.props.disabled === void 0 && (x.disabled = !0), s && y.props.error === void 0 && (x.error = !0), t && y.props.id === void 0 && (x.id = t), Object.keys(x).length > 0)
|
|
1744
|
+
return V.cloneElement(y, x);
|
|
1745
1745
|
}
|
|
1746
|
-
return
|
|
1746
|
+
return y;
|
|
1747
1747
|
});
|
|
1748
1748
|
return /* @__PURE__ */ ne("div", { className: f, style: d, children: [
|
|
1749
1749
|
r && /* @__PURE__ */ ne(
|
|
@@ -1755,15 +1755,15 @@ const lo = us, cs = "FormLabel-module__label___0M-fo", ds = "FormLabel-module__d
|
|
|
1755
1755
|
...h,
|
|
1756
1756
|
children: [
|
|
1757
1757
|
r,
|
|
1758
|
-
a && /* @__PURE__ */
|
|
1758
|
+
a && /* @__PURE__ */ k("span", { className: ge.required, "aria-label": "required", children: " *" })
|
|
1759
1759
|
]
|
|
1760
1760
|
}
|
|
1761
1761
|
),
|
|
1762
|
-
/* @__PURE__ */
|
|
1763
|
-
s && n && /* @__PURE__ */
|
|
1762
|
+
/* @__PURE__ */ k("div", { className: ge.inputWrapper, children: g }),
|
|
1763
|
+
s && n && /* @__PURE__ */ k(gs, { children: n })
|
|
1764
1764
|
] });
|
|
1765
1765
|
};
|
|
1766
|
-
function
|
|
1766
|
+
function Se({
|
|
1767
1767
|
name: e,
|
|
1768
1768
|
label: r,
|
|
1769
1769
|
required: t,
|
|
@@ -1781,7 +1781,7 @@ function De({
|
|
|
1781
1781
|
control: d,
|
|
1782
1782
|
rules: n
|
|
1783
1783
|
});
|
|
1784
|
-
return /* @__PURE__ */
|
|
1784
|
+
return /* @__PURE__ */ k(
|
|
1785
1785
|
xs,
|
|
1786
1786
|
{
|
|
1787
1787
|
label: r,
|
|
@@ -1830,25 +1830,25 @@ const Fs = "Input-module__input___WjT81", Vs = "Input-module__sizeSmall___NFvsi"
|
|
|
1830
1830
|
style: h,
|
|
1831
1831
|
type: f = "text",
|
|
1832
1832
|
value: g = "",
|
|
1833
|
-
...
|
|
1833
|
+
...y
|
|
1834
1834
|
}) => {
|
|
1835
|
-
const x = q(), A = x.colors.error, F = t ? A : e || x.colors.primary,
|
|
1835
|
+
const x = q(), A = x.colors.error, F = t ? A : e || x.colors.primary, C = ks({
|
|
1836
1836
|
color: F,
|
|
1837
1837
|
disabled: r,
|
|
1838
1838
|
fontSize: s || x.fonts.size,
|
|
1839
1839
|
placeholderOpacity: l
|
|
1840
1840
|
}), P = {
|
|
1841
|
-
"--placeholder-opacity":
|
|
1842
|
-
borderColor:
|
|
1843
|
-
color:
|
|
1844
|
-
fontSize:
|
|
1845
|
-
opacity:
|
|
1841
|
+
"--placeholder-opacity": C.placeholderOpacity,
|
|
1842
|
+
borderColor: C.borderColor,
|
|
1843
|
+
color: C.color,
|
|
1844
|
+
fontSize: C.fontSize,
|
|
1845
|
+
opacity: C.opacity,
|
|
1846
1846
|
...h
|
|
1847
1847
|
}, b = [
|
|
1848
1848
|
Ie.input,
|
|
1849
1849
|
d === "small" ? Ie.sizeSmall : Ie.sizeDefault
|
|
1850
1850
|
].filter(Boolean).join(" ");
|
|
1851
|
-
return /* @__PURE__ */
|
|
1851
|
+
return /* @__PURE__ */ k(
|
|
1852
1852
|
"input",
|
|
1853
1853
|
{
|
|
1854
1854
|
className: b,
|
|
@@ -1859,11 +1859,11 @@ const Fs = "Input-module__input___WjT81", Vs = "Input-module__sizeSmall___NFvsi"
|
|
|
1859
1859
|
style: P,
|
|
1860
1860
|
type: f,
|
|
1861
1861
|
value: g,
|
|
1862
|
-
...
|
|
1862
|
+
...y
|
|
1863
1863
|
}
|
|
1864
1864
|
);
|
|
1865
1865
|
};
|
|
1866
|
-
function
|
|
1866
|
+
function co({
|
|
1867
1867
|
name: e,
|
|
1868
1868
|
label: r,
|
|
1869
1869
|
required: t,
|
|
@@ -1873,8 +1873,8 @@ function uo({
|
|
|
1873
1873
|
style: a,
|
|
1874
1874
|
...l
|
|
1875
1875
|
}) {
|
|
1876
|
-
return /* @__PURE__ */
|
|
1877
|
-
|
|
1876
|
+
return /* @__PURE__ */ k(
|
|
1877
|
+
Se,
|
|
1878
1878
|
{
|
|
1879
1879
|
name: e,
|
|
1880
1880
|
label: r,
|
|
@@ -1883,7 +1883,7 @@ function uo({
|
|
|
1883
1883
|
disabled: n,
|
|
1884
1884
|
className: o,
|
|
1885
1885
|
style: a,
|
|
1886
|
-
children: ({ value: d, onChange: h, onBlur: f, name: g, error:
|
|
1886
|
+
children: ({ value: d, onChange: h, onBlur: f, name: g, error: y }) => /* @__PURE__ */ k(
|
|
1887
1887
|
Cs,
|
|
1888
1888
|
{
|
|
1889
1889
|
...l,
|
|
@@ -1891,7 +1891,7 @@ function uo({
|
|
|
1891
1891
|
value: d || "",
|
|
1892
1892
|
onChange: (x) => h(x.target.value),
|
|
1893
1893
|
onBlur: f,
|
|
1894
|
-
error:
|
|
1894
|
+
error: y
|
|
1895
1895
|
}
|
|
1896
1896
|
)
|
|
1897
1897
|
}
|
|
@@ -1923,9 +1923,9 @@ const Es = "Textarea-module__textarea___Z-y6g", As = "Textarea-module__sizeSmall
|
|
|
1923
1923
|
size: h,
|
|
1924
1924
|
style: f,
|
|
1925
1925
|
value: g = "",
|
|
1926
|
-
...
|
|
1926
|
+
...y
|
|
1927
1927
|
}) => {
|
|
1928
|
-
const x = q(), A = x.colors.error, F = t ? A : e || x.colors.primary,
|
|
1928
|
+
const x = q(), A = x.colors.error, F = t ? A : e || x.colors.primary, C = Ds({
|
|
1929
1929
|
color: F,
|
|
1930
1930
|
disabled: r,
|
|
1931
1931
|
placeholderOpacity: l
|
|
@@ -1935,25 +1935,25 @@ const Es = "Textarea-module__textarea___Z-y6g", As = "Textarea-module__sizeSmall
|
|
|
1935
1935
|
return E.id = P, E.textContent = `
|
|
1936
1936
|
.${P}::placeholder {
|
|
1937
1937
|
color: inherit;
|
|
1938
|
-
opacity: ${
|
|
1938
|
+
opacity: ${C.placeholderOpacity};
|
|
1939
1939
|
}
|
|
1940
1940
|
`, document.head.appendChild(E), () => {
|
|
1941
1941
|
const w = document.getElementById(P);
|
|
1942
1942
|
w && w.remove();
|
|
1943
1943
|
};
|
|
1944
|
-
}, [P,
|
|
1944
|
+
}, [P, C.placeholderOpacity]);
|
|
1945
1945
|
const b = {
|
|
1946
|
-
borderColor:
|
|
1947
|
-
color:
|
|
1946
|
+
borderColor: C.borderColor,
|
|
1947
|
+
color: C.color,
|
|
1948
1948
|
fontSize: s || x.fonts.size,
|
|
1949
|
-
opacity:
|
|
1949
|
+
opacity: C.opacity,
|
|
1950
1950
|
...f
|
|
1951
1951
|
}, z = [
|
|
1952
1952
|
Be.textarea,
|
|
1953
1953
|
h === "small" ? Be.sizeSmall : Be.sizeDefault,
|
|
1954
1954
|
P
|
|
1955
1955
|
].filter(Boolean).join(" ");
|
|
1956
|
-
return /* @__PURE__ */
|
|
1956
|
+
return /* @__PURE__ */ k(
|
|
1957
1957
|
"textarea",
|
|
1958
1958
|
{
|
|
1959
1959
|
className: z,
|
|
@@ -1964,11 +1964,11 @@ const Es = "Textarea-module__textarea___Z-y6g", As = "Textarea-module__sizeSmall
|
|
|
1964
1964
|
rows: d,
|
|
1965
1965
|
style: b,
|
|
1966
1966
|
value: g,
|
|
1967
|
-
...
|
|
1967
|
+
...y
|
|
1968
1968
|
}
|
|
1969
1969
|
);
|
|
1970
1970
|
};
|
|
1971
|
-
function
|
|
1971
|
+
function fo({
|
|
1972
1972
|
name: e,
|
|
1973
1973
|
label: r,
|
|
1974
1974
|
required: t,
|
|
@@ -1978,8 +1978,8 @@ function co({
|
|
|
1978
1978
|
style: a,
|
|
1979
1979
|
...l
|
|
1980
1980
|
}) {
|
|
1981
|
-
return /* @__PURE__ */
|
|
1982
|
-
|
|
1981
|
+
return /* @__PURE__ */ k(
|
|
1982
|
+
Se,
|
|
1983
1983
|
{
|
|
1984
1984
|
name: e,
|
|
1985
1985
|
label: r,
|
|
@@ -1988,7 +1988,7 @@ function co({
|
|
|
1988
1988
|
disabled: n,
|
|
1989
1989
|
className: o,
|
|
1990
1990
|
style: a,
|
|
1991
|
-
children: ({ value: d, onChange: h, onBlur: f, name: g, error:
|
|
1991
|
+
children: ({ value: d, onChange: h, onBlur: f, name: g, error: y }) => /* @__PURE__ */ k(
|
|
1992
1992
|
Ps,
|
|
1993
1993
|
{
|
|
1994
1994
|
...l,
|
|
@@ -1996,7 +1996,7 @@ function co({
|
|
|
1996
1996
|
value: d || "",
|
|
1997
1997
|
onChange: (x) => h(x.target.value),
|
|
1998
1998
|
onBlur: f,
|
|
1999
|
-
error:
|
|
1999
|
+
error: y
|
|
2000
2000
|
}
|
|
2001
2001
|
)
|
|
2002
2002
|
}
|
|
@@ -2047,10 +2047,10 @@ const Rs = "Select-module__select___cjdcr", Ns = "Select-module__sizeSmall___i1q
|
|
|
2047
2047
|
value: f = "",
|
|
2048
2048
|
...g
|
|
2049
2049
|
}) => {
|
|
2050
|
-
const
|
|
2050
|
+
const y = q(), x = y.colors.error, A = s ? x : r || y.colors.primary, F = Ms({
|
|
2051
2051
|
color: A,
|
|
2052
2052
|
disabled: t
|
|
2053
|
-
}),
|
|
2053
|
+
}), C = {
|
|
2054
2054
|
backgroundImage: F.backgroundImage,
|
|
2055
2055
|
backgroundPosition: "right center",
|
|
2056
2056
|
backgroundRepeat: "no-repeat",
|
|
@@ -2059,7 +2059,7 @@ const Rs = "Select-module__select___cjdcr", Ns = "Select-module__sizeSmall___i1q
|
|
|
2059
2059
|
borderColor: F.borderColor,
|
|
2060
2060
|
color: F.color,
|
|
2061
2061
|
cursor: F.cursor,
|
|
2062
|
-
fontSize: n ||
|
|
2062
|
+
fontSize: n || y.fonts.size,
|
|
2063
2063
|
opacity: F.opacity,
|
|
2064
2064
|
...h
|
|
2065
2065
|
}, P = [
|
|
@@ -2073,17 +2073,17 @@ const Rs = "Select-module__select___cjdcr", Ns = "Select-module__sizeSmall___i1q
|
|
|
2073
2073
|
disabled: t,
|
|
2074
2074
|
name: o,
|
|
2075
2075
|
onChange: a,
|
|
2076
|
-
style:
|
|
2076
|
+
style: C,
|
|
2077
2077
|
value: f,
|
|
2078
2078
|
...g,
|
|
2079
2079
|
children: [
|
|
2080
|
-
l !== "" && /* @__PURE__ */
|
|
2080
|
+
l !== "" && /* @__PURE__ */ k("option", { disabled: !0, value: "", children: l }),
|
|
2081
2081
|
e
|
|
2082
2082
|
]
|
|
2083
2083
|
}
|
|
2084
2084
|
);
|
|
2085
2085
|
};
|
|
2086
|
-
function
|
|
2086
|
+
function yo({
|
|
2087
2087
|
name: e,
|
|
2088
2088
|
label: r,
|
|
2089
2089
|
required: t,
|
|
@@ -2094,8 +2094,8 @@ function fo({
|
|
|
2094
2094
|
children: l,
|
|
2095
2095
|
...d
|
|
2096
2096
|
}) {
|
|
2097
|
-
return /* @__PURE__ */
|
|
2098
|
-
|
|
2097
|
+
return /* @__PURE__ */ k(
|
|
2098
|
+
Se,
|
|
2099
2099
|
{
|
|
2100
2100
|
name: e,
|
|
2101
2101
|
label: r,
|
|
@@ -2104,11 +2104,11 @@ function fo({
|
|
|
2104
2104
|
disabled: n,
|
|
2105
2105
|
className: o,
|
|
2106
2106
|
style: a,
|
|
2107
|
-
children: ({ value: h, onChange: f, onBlur: g, name:
|
|
2107
|
+
children: ({ value: h, onChange: f, onBlur: g, name: y, error: x }) => /* @__PURE__ */ k(
|
|
2108
2108
|
Ts,
|
|
2109
2109
|
{
|
|
2110
2110
|
...d,
|
|
2111
|
-
name:
|
|
2111
|
+
name: y,
|
|
2112
2112
|
value: h || "",
|
|
2113
2113
|
onChange: (A) => f(A.target.value),
|
|
2114
2114
|
onBlur: g,
|
|
@@ -2119,7 +2119,7 @@ function fo({
|
|
|
2119
2119
|
}
|
|
2120
2120
|
);
|
|
2121
2121
|
}
|
|
2122
|
-
function
|
|
2122
|
+
function mo({
|
|
2123
2123
|
name: e,
|
|
2124
2124
|
required: r,
|
|
2125
2125
|
rules: t,
|
|
@@ -2128,8 +2128,8 @@ function yo({
|
|
|
2128
2128
|
style: o,
|
|
2129
2129
|
...a
|
|
2130
2130
|
}) {
|
|
2131
|
-
return /* @__PURE__ */
|
|
2132
|
-
|
|
2131
|
+
return /* @__PURE__ */ k(
|
|
2132
|
+
Se,
|
|
2133
2133
|
{
|
|
2134
2134
|
name: e,
|
|
2135
2135
|
required: r,
|
|
@@ -2137,7 +2137,7 @@ function yo({
|
|
|
2137
2137
|
disabled: s,
|
|
2138
2138
|
className: n,
|
|
2139
2139
|
style: o,
|
|
2140
|
-
children: ({ value: l, onChange: d, name: h, error: f }) => /* @__PURE__ */
|
|
2140
|
+
children: ({ value: l, onChange: d, name: h, error: f }) => /* @__PURE__ */ k(
|
|
2141
2141
|
Ar,
|
|
2142
2142
|
{
|
|
2143
2143
|
...a,
|
|
@@ -2150,69 +2150,18 @@ function yo({
|
|
|
2150
2150
|
}
|
|
2151
2151
|
);
|
|
2152
2152
|
}
|
|
2153
|
-
const Ls = "
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
}, $s = ({
|
|
2158
|
-
const n = q();
|
|
2159
|
-
return Mt(() => {
|
|
2160
|
-
const o = e ? { right: ".5em" } : {};
|
|
2161
|
-
return {
|
|
2162
|
-
"--hamburger-border-radius": s || n.borderRadius || "10px",
|
|
2163
|
-
color: r || "inherit",
|
|
2164
|
-
display: t ? "flex" : "none",
|
|
2165
|
-
...o
|
|
2166
|
-
};
|
|
2167
|
-
}, [r, t, e, s, n.borderRadius]);
|
|
2168
|
-
}, Us = ({
|
|
2169
|
-
visible: e,
|
|
2170
|
-
compact: r,
|
|
2171
|
-
color: t,
|
|
2172
|
-
hamburgerRef: s,
|
|
2173
|
-
open: n = !1,
|
|
2174
|
-
setOpen: o,
|
|
2175
|
-
buttonProps: a,
|
|
2176
|
-
borderRadius: l
|
|
2177
|
-
}) => {
|
|
2178
|
-
const d = $s({
|
|
2179
|
-
compact: r,
|
|
2180
|
-
color: t,
|
|
2181
|
-
visible: e,
|
|
2182
|
-
borderRadius: l
|
|
2183
|
-
}), h = [
|
|
2184
|
-
_e.hamburger,
|
|
2185
|
-
n ? _e.open : ""
|
|
2186
|
-
].filter(Boolean).join(" ");
|
|
2187
|
-
return /* @__PURE__ */ ne(
|
|
2188
|
-
"button",
|
|
2189
|
-
{
|
|
2190
|
-
ref: s,
|
|
2191
|
-
className: h,
|
|
2192
|
-
onClick: () => o(!n),
|
|
2193
|
-
style: d,
|
|
2194
|
-
"aria-label": "Toggle menu",
|
|
2195
|
-
"aria-expanded": n,
|
|
2196
|
-
...a,
|
|
2197
|
-
children: [
|
|
2198
|
-
/* @__PURE__ */ C("div", { className: _e.line }),
|
|
2199
|
-
/* @__PURE__ */ C("div", { className: _e.line }),
|
|
2200
|
-
/* @__PURE__ */ C("div", { className: _e.line })
|
|
2201
|
-
]
|
|
2202
|
-
}
|
|
2203
|
-
);
|
|
2204
|
-
}, Hs = "Radio-module__container___AQxhk", js = "Radio-module__svg___zl5kF", Ws = "Radio-module__label___vAFIP", Ue = {
|
|
2205
|
-
container: Hs,
|
|
2206
|
-
svg: js,
|
|
2207
|
-
label: Ws
|
|
2208
|
-
}, qs = ({
|
|
2153
|
+
const Ls = "Radio-module__container___AQxhk", Is = "Radio-module__svg___zl5kF", Bs = "Radio-module__label___vAFIP", Ue = {
|
|
2154
|
+
container: Ls,
|
|
2155
|
+
svg: Is,
|
|
2156
|
+
label: Bs
|
|
2157
|
+
}, $s = ({
|
|
2209
2158
|
color: e = "#000",
|
|
2210
2159
|
disabled: r = !1
|
|
2211
2160
|
}) => ({
|
|
2212
2161
|
radioColor: e,
|
|
2213
2162
|
cursor: r ? "default" : "pointer",
|
|
2214
2163
|
opacity: r ? 0.3 : 1
|
|
2215
|
-
}),
|
|
2164
|
+
}), Us = ({
|
|
2216
2165
|
checked: e = !1,
|
|
2217
2166
|
color: r,
|
|
2218
2167
|
disabled: t = !1,
|
|
@@ -2226,32 +2175,32 @@ const Ls = "Hamburger-module__hamburger___Tf4-t", Is = "Hamburger-module__line__
|
|
|
2226
2175
|
style: f,
|
|
2227
2176
|
...g
|
|
2228
2177
|
}) => {
|
|
2229
|
-
const
|
|
2178
|
+
const y = q(), x = o || It(), A = y.colors.error, F = s ? A : r || y.colors.primary, C = $s({
|
|
2230
2179
|
color: F,
|
|
2231
2180
|
disabled: t
|
|
2232
2181
|
}), P = (B) => {
|
|
2233
2182
|
t || h(B);
|
|
2234
2183
|
}, b = {
|
|
2235
|
-
cursor:
|
|
2236
|
-
fontSize: n ||
|
|
2237
|
-
opacity:
|
|
2184
|
+
cursor: C.cursor,
|
|
2185
|
+
fontSize: n || y.fonts.size,
|
|
2186
|
+
opacity: C.opacity,
|
|
2238
2187
|
...f
|
|
2239
2188
|
}, z = {
|
|
2240
|
-
width: n ||
|
|
2189
|
+
width: n || y.fonts.size
|
|
2241
2190
|
}, E = {
|
|
2242
2191
|
fill: "transparent",
|
|
2243
2192
|
strokeWidth: "12.5",
|
|
2244
|
-
stroke:
|
|
2193
|
+
stroke: C.radioColor
|
|
2245
2194
|
}, w = {
|
|
2246
|
-
fill:
|
|
2195
|
+
fill: C.radioColor
|
|
2247
2196
|
}, I = {
|
|
2248
|
-
color:
|
|
2249
|
-
cursor:
|
|
2250
|
-
fontSize: n ||
|
|
2197
|
+
color: C.radioColor,
|
|
2198
|
+
cursor: C.cursor,
|
|
2199
|
+
fontSize: n || y.fonts.size,
|
|
2251
2200
|
...l
|
|
2252
2201
|
};
|
|
2253
2202
|
return /* @__PURE__ */ ne("div", { className: Ue.container, style: b, ...g, children: [
|
|
2254
|
-
/* @__PURE__ */
|
|
2203
|
+
/* @__PURE__ */ k(
|
|
2255
2204
|
"input",
|
|
2256
2205
|
{
|
|
2257
2206
|
id: x,
|
|
@@ -2272,7 +2221,7 @@ const Ls = "Hamburger-module__hamburger___Tf4-t", Is = "Hamburger-module__line__
|
|
|
2272
2221
|
className: Ue.svg,
|
|
2273
2222
|
style: z,
|
|
2274
2223
|
children: [
|
|
2275
|
-
/* @__PURE__ */
|
|
2224
|
+
/* @__PURE__ */ k(
|
|
2276
2225
|
"circle",
|
|
2277
2226
|
{
|
|
2278
2227
|
cx: "50",
|
|
@@ -2282,7 +2231,7 @@ const Ls = "Hamburger-module__hamburger___Tf4-t", Is = "Hamburger-module__line__
|
|
|
2282
2231
|
style: E
|
|
2283
2232
|
}
|
|
2284
2233
|
),
|
|
2285
|
-
e && /* @__PURE__ */
|
|
2234
|
+
e && /* @__PURE__ */ k(
|
|
2286
2235
|
"circle",
|
|
2287
2236
|
{
|
|
2288
2237
|
cx: "50",
|
|
@@ -2294,7 +2243,7 @@ const Ls = "Hamburger-module__hamburger___Tf4-t", Is = "Hamburger-module__line__
|
|
|
2294
2243
|
]
|
|
2295
2244
|
}
|
|
2296
2245
|
),
|
|
2297
|
-
a && /* @__PURE__ */
|
|
2246
|
+
a && /* @__PURE__ */ k(
|
|
2298
2247
|
"label",
|
|
2299
2248
|
{
|
|
2300
2249
|
htmlFor: x,
|
|
@@ -2304,10 +2253,96 @@ const Ls = "Hamburger-module__hamburger___Tf4-t", Is = "Hamburger-module__line__
|
|
|
2304
2253
|
}
|
|
2305
2254
|
)
|
|
2306
2255
|
] });
|
|
2307
|
-
}
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2256
|
+
};
|
|
2257
|
+
function ho({
|
|
2258
|
+
name: e,
|
|
2259
|
+
label: r,
|
|
2260
|
+
required: t,
|
|
2261
|
+
rules: s,
|
|
2262
|
+
disabled: n,
|
|
2263
|
+
className: o,
|
|
2264
|
+
style: a,
|
|
2265
|
+
value: l,
|
|
2266
|
+
...d
|
|
2267
|
+
}) {
|
|
2268
|
+
return /* @__PURE__ */ k(
|
|
2269
|
+
Se,
|
|
2270
|
+
{
|
|
2271
|
+
name: e,
|
|
2272
|
+
required: t,
|
|
2273
|
+
rules: s,
|
|
2274
|
+
disabled: n,
|
|
2275
|
+
className: o,
|
|
2276
|
+
style: a,
|
|
2277
|
+
children: ({ value: h, onChange: f, name: g, error: y }) => /* @__PURE__ */ k(
|
|
2278
|
+
Us,
|
|
2279
|
+
{
|
|
2280
|
+
...d,
|
|
2281
|
+
name: g,
|
|
2282
|
+
checked: h === l,
|
|
2283
|
+
onChange: () => f(l),
|
|
2284
|
+
error: y,
|
|
2285
|
+
label: r
|
|
2286
|
+
}
|
|
2287
|
+
)
|
|
2288
|
+
}
|
|
2289
|
+
);
|
|
2290
|
+
}
|
|
2291
|
+
const Hs = "Hamburger-module__hamburger___Tf4-t", js = "Hamburger-module__line___gybZM", Ws = "Hamburger-module__open___gRswh", _e = {
|
|
2292
|
+
hamburger: Hs,
|
|
2293
|
+
line: js,
|
|
2294
|
+
open: Ws
|
|
2295
|
+
}, qs = ({ compact: e, color: r, visible: t, borderRadius: s }) => {
|
|
2296
|
+
const n = q();
|
|
2297
|
+
return Mt(() => {
|
|
2298
|
+
const o = e ? { right: ".5em" } : {};
|
|
2299
|
+
return {
|
|
2300
|
+
"--hamburger-border-radius": s || n.borderRadius || "10px",
|
|
2301
|
+
color: r || "inherit",
|
|
2302
|
+
display: t ? "flex" : "none",
|
|
2303
|
+
...o
|
|
2304
|
+
};
|
|
2305
|
+
}, [r, t, e, s, n.borderRadius]);
|
|
2306
|
+
}, Gs = ({
|
|
2307
|
+
visible: e,
|
|
2308
|
+
compact: r,
|
|
2309
|
+
color: t,
|
|
2310
|
+
hamburgerRef: s,
|
|
2311
|
+
open: n = !1,
|
|
2312
|
+
setOpen: o,
|
|
2313
|
+
buttonProps: a,
|
|
2314
|
+
borderRadius: l
|
|
2315
|
+
}) => {
|
|
2316
|
+
const d = qs({
|
|
2317
|
+
compact: r,
|
|
2318
|
+
color: t,
|
|
2319
|
+
visible: e,
|
|
2320
|
+
borderRadius: l
|
|
2321
|
+
}), h = [
|
|
2322
|
+
_e.hamburger,
|
|
2323
|
+
n ? _e.open : ""
|
|
2324
|
+
].filter(Boolean).join(" ");
|
|
2325
|
+
return /* @__PURE__ */ ne(
|
|
2326
|
+
"button",
|
|
2327
|
+
{
|
|
2328
|
+
ref: s,
|
|
2329
|
+
className: h,
|
|
2330
|
+
onClick: () => o(!n),
|
|
2331
|
+
style: d,
|
|
2332
|
+
"aria-label": "Toggle menu",
|
|
2333
|
+
"aria-expanded": n,
|
|
2334
|
+
...a,
|
|
2335
|
+
children: [
|
|
2336
|
+
/* @__PURE__ */ k("div", { className: _e.line }),
|
|
2337
|
+
/* @__PURE__ */ k("div", { className: _e.line }),
|
|
2338
|
+
/* @__PURE__ */ k("div", { className: _e.line })
|
|
2339
|
+
]
|
|
2340
|
+
}
|
|
2341
|
+
);
|
|
2342
|
+
}, Zs = "Header-module__header___RUooH", Qs = "Header-module__container___t68M9", Nt = {
|
|
2343
|
+
header: Zs,
|
|
2344
|
+
container: Qs
|
|
2345
|
+
}, Js = ({
|
|
2311
2346
|
isSmallScreen: e = !1,
|
|
2312
2347
|
maxWidth: r,
|
|
2313
2348
|
paddingSm: t,
|
|
@@ -2328,7 +2363,7 @@ const Ls = "Hamburger-module__hamburger___Tf4-t", Is = "Hamburger-module__line__
|
|
|
2328
2363
|
const a = window.matchMedia(e);
|
|
2329
2364
|
return a.addEventListener("change", o), () => a.removeEventListener("change", o);
|
|
2330
2365
|
}, () => r ? window.matchMedia(e).matches : !1, () => !1);
|
|
2331
|
-
},
|
|
2366
|
+
}, go = ({
|
|
2332
2367
|
children: e,
|
|
2333
2368
|
breakPointSm: r,
|
|
2334
2369
|
maxWidth: t,
|
|
@@ -2339,20 +2374,20 @@ const Ls = "Hamburger-module__hamburger___Tf4-t", Is = "Hamburger-module__line__
|
|
|
2339
2374
|
headerProps: l = {},
|
|
2340
2375
|
headerRef: d
|
|
2341
2376
|
}) => {
|
|
2342
|
-
const h = q(), g = (r || h.breakpoints.sm).match(/^(\d+(?:\.\d+)?)(px|em|rem)$/),
|
|
2377
|
+
const h = q(), g = (r || h.breakpoints.sm).match(/^(\d+(?:\.\d+)?)(px|em|rem)$/), y = g ? parseInt(g[1], 10) - 1 : 474, x = g ? g[2] : "px", A = Ze(`(max-width: ${y}${x})`), F = Js({
|
|
2343
2378
|
isSmallScreen: A,
|
|
2344
2379
|
maxWidth: t,
|
|
2345
2380
|
paddingSm: s,
|
|
2346
2381
|
padding: n,
|
|
2347
2382
|
fontSize: o
|
|
2348
2383
|
});
|
|
2349
|
-
return /* @__PURE__ */
|
|
2350
|
-
},
|
|
2351
|
-
nav:
|
|
2352
|
-
navMobile:
|
|
2353
|
-
open:
|
|
2354
|
-
navDesktop:
|
|
2355
|
-
},
|
|
2384
|
+
return /* @__PURE__ */ k("header", { ref: d, className: Nt.header, ...l, children: /* @__PURE__ */ k("div", { className: Nt.container, style: { ...F, ...a }, children: e }) });
|
|
2385
|
+
}, Ks = "ResponsiveNav-module__nav___xOfv5", Ys = "ResponsiveNav-module__navMobile___h795P", Xs = "ResponsiveNav-module__open___WDCAf", eo = "ResponsiveNav-module__navDesktop___9wscZ", Ce = {
|
|
2386
|
+
nav: Ks,
|
|
2387
|
+
navMobile: Ys,
|
|
2388
|
+
open: Xs,
|
|
2389
|
+
navDesktop: eo
|
|
2390
|
+
}, to = ({
|
|
2356
2391
|
isMobile: e,
|
|
2357
2392
|
isCompact: r,
|
|
2358
2393
|
mobileBackground: t,
|
|
@@ -2386,7 +2421,7 @@ function Ot(e) {
|
|
|
2386
2421
|
const t = parseInt(e) - 1, s = e.replace(/[0-9]/g, "");
|
|
2387
2422
|
return { maxWidth: t, unit: s };
|
|
2388
2423
|
}
|
|
2389
|
-
const
|
|
2424
|
+
const _o = ({
|
|
2390
2425
|
breakPointMd: e,
|
|
2391
2426
|
breakPointSm: r,
|
|
2392
2427
|
children: t,
|
|
@@ -2398,7 +2433,7 @@ const go = ({
|
|
|
2398
2433
|
style: d,
|
|
2399
2434
|
navProps: h
|
|
2400
2435
|
}) => {
|
|
2401
|
-
const [f, g] = Je(!1),
|
|
2436
|
+
const [f, g] = Je(!1), y = ht(null), x = ht(null), A = q(), F = e || A.breakpoints.md, C = r || A.breakpoints.sm, { maxWidth: P, unit: b } = Ot(F), { maxWidth: z, unit: E } = Ot(C), w = Ze(`(max-width: ${P}${b})`), I = Ze(`(max-width: ${z}${E})`), B = to({
|
|
2402
2437
|
isMobile: w,
|
|
2403
2438
|
isCompact: I,
|
|
2404
2439
|
mobileBackground: s,
|
|
@@ -2411,29 +2446,29 @@ const go = ({
|
|
|
2411
2446
|
w || g(!1);
|
|
2412
2447
|
}, [w]), He(() => {
|
|
2413
2448
|
const G = (re) => {
|
|
2414
|
-
!x.current || x.current.contains(re.target) ||
|
|
2449
|
+
!x.current || x.current.contains(re.target) || y.current && y.current.contains(re.target) || g(!1);
|
|
2415
2450
|
};
|
|
2416
2451
|
return document.addEventListener("mousedown", G), () => {
|
|
2417
2452
|
document.removeEventListener("mousedown", G);
|
|
2418
2453
|
};
|
|
2419
|
-
}, [
|
|
2454
|
+
}, [y, x, g]);
|
|
2420
2455
|
const ie = [
|
|
2421
|
-
|
|
2422
|
-
w ?
|
|
2423
|
-
w && f ?
|
|
2456
|
+
Ce.nav,
|
|
2457
|
+
w ? Ce.navMobile : Ce.navDesktop,
|
|
2458
|
+
w && f ? Ce.open : ""
|
|
2424
2459
|
].filter(Boolean).join(" ");
|
|
2425
2460
|
return /* @__PURE__ */ ne(Qe, { children: [
|
|
2426
|
-
/* @__PURE__ */
|
|
2427
|
-
|
|
2461
|
+
/* @__PURE__ */ k(
|
|
2462
|
+
Gs,
|
|
2428
2463
|
{
|
|
2429
|
-
hamburgerRef:
|
|
2464
|
+
hamburgerRef: y,
|
|
2430
2465
|
visible: w,
|
|
2431
2466
|
compact: I,
|
|
2432
2467
|
open: f,
|
|
2433
2468
|
setOpen: g
|
|
2434
2469
|
}
|
|
2435
2470
|
),
|
|
2436
|
-
/* @__PURE__ */
|
|
2471
|
+
/* @__PURE__ */ k(
|
|
2437
2472
|
"nav",
|
|
2438
2473
|
{
|
|
2439
2474
|
ref: x,
|
|
@@ -2444,14 +2479,14 @@ const go = ({
|
|
|
2444
2479
|
}
|
|
2445
2480
|
)
|
|
2446
2481
|
] });
|
|
2447
|
-
},
|
|
2482
|
+
}, ro = ({
|
|
2448
2483
|
size: e = 2.5,
|
|
2449
2484
|
color: r,
|
|
2450
2485
|
innerColor: t,
|
|
2451
2486
|
fullScreen: s = !0
|
|
2452
2487
|
}) => {
|
|
2453
2488
|
const n = q(), o = r || n.colors.primary, a = t || n.colors.secondary, l = /* @__PURE__ */ ne(Qe, { children: [
|
|
2454
|
-
/* @__PURE__ */
|
|
2489
|
+
/* @__PURE__ */ k(
|
|
2455
2490
|
"div",
|
|
2456
2491
|
{
|
|
2457
2492
|
style: {
|
|
@@ -2464,14 +2499,14 @@ const go = ({
|
|
|
2464
2499
|
}
|
|
2465
2500
|
}
|
|
2466
2501
|
),
|
|
2467
|
-
/* @__PURE__ */
|
|
2502
|
+
/* @__PURE__ */ k("style", { children: `
|
|
2468
2503
|
@keyframes spin {
|
|
2469
2504
|
0% { transform: rotate(0deg); }
|
|
2470
2505
|
100% { transform: rotate(360deg); }
|
|
2471
2506
|
}
|
|
2472
2507
|
` })
|
|
2473
2508
|
] });
|
|
2474
|
-
return s ? /* @__PURE__ */
|
|
2509
|
+
return s ? /* @__PURE__ */ k(
|
|
2475
2510
|
"div",
|
|
2476
2511
|
{
|
|
2477
2512
|
style: {
|
|
@@ -2484,37 +2519,38 @@ const go = ({
|
|
|
2484
2519
|
children: l
|
|
2485
2520
|
}
|
|
2486
2521
|
) : l;
|
|
2487
|
-
},
|
|
2522
|
+
}, po = ({ children: e, loadingComponent: r }) => {
|
|
2488
2523
|
const [t, s] = Je(!1);
|
|
2489
2524
|
return He(() => {
|
|
2490
2525
|
requestAnimationFrame(() => {
|
|
2491
2526
|
s(!0);
|
|
2492
2527
|
});
|
|
2493
|
-
}, []), t ? /* @__PURE__ */
|
|
2528
|
+
}, []), t ? /* @__PURE__ */ k(Qe, { children: e }) : r || /* @__PURE__ */ k(ro, {});
|
|
2494
2529
|
};
|
|
2495
2530
|
export {
|
|
2496
|
-
|
|
2497
|
-
|
|
2531
|
+
ao as Button,
|
|
2532
|
+
lo as CSSReset,
|
|
2498
2533
|
Ar as Checkbox,
|
|
2499
|
-
|
|
2500
|
-
|
|
2534
|
+
uo as Form,
|
|
2535
|
+
mo as FormCheckbox,
|
|
2501
2536
|
gs as FormError,
|
|
2502
|
-
|
|
2537
|
+
Se as FormField,
|
|
2503
2538
|
xs as FormGroup,
|
|
2504
|
-
|
|
2539
|
+
co as FormInput,
|
|
2505
2540
|
ys as FormLabel,
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2541
|
+
ho as FormRadio,
|
|
2542
|
+
yo as FormSelect,
|
|
2543
|
+
fo as FormTextarea,
|
|
2544
|
+
Gs as Hamburger,
|
|
2545
|
+
go as Header,
|
|
2510
2546
|
Cs as Input,
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2547
|
+
ro as LoadingSpinner,
|
|
2548
|
+
Us as Radio,
|
|
2549
|
+
_o as ResponsiveNav,
|
|
2514
2550
|
Ts as Select,
|
|
2515
|
-
|
|
2551
|
+
po as StyleLoader,
|
|
2516
2552
|
Ps as Textarea,
|
|
2517
|
-
|
|
2553
|
+
io as ThemeProvider,
|
|
2518
2554
|
ls as useFormContext,
|
|
2519
2555
|
q as useTheme
|
|
2520
2556
|
};
|