digital-rabbit-cl 1.3.11 → 1.3.12
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.
|
@@ -1,27 +1,31 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('.Button-module__button___2ZuB7{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:var(--button-padding-small)}.Button-module__sizeLarge___yeZSH{padding:var(--button-padding-large)}.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:.25em;-webkit-user-select:none;user-select:none}.FormLabel-module__label___0M-fo{display:inline-block;font-weight:700;padding-bottom:var(--form-label-padding-bottom)}.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}: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}.FormError-module__formError___kaUBn{font-size:.875em;margin-top:var(--form-error-margin-top);font-weight:400}.FormGroup-module__formGroup___aVI-B{display:flex;flex-direction:column;margin-bottom:var(--form-group-margin-bottom)}.FormGroup-module__inputWrapper___429QE{display:flex;flex-direction:column;gap:.5em}.FormGroup-module__indented___t61iz{padding-left:.5em}.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-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:var(--input-padding-small)}.Input-module__sizeLarge___4Boj3{padding:var(--input-padding-large)}.Textarea-module__textarea___Z-y6g{background-color:transparent;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::placeholder{color:inherit;opacity:var(--placeholder-opacity, .3)}.Textarea-module__textarea___Z-y6g:disabled{opacity:.3}.Textarea-module__sizeSmall___HHFEM{padding:var(--textarea-padding-small)}.Textarea-module__sizeLarge___5a3sf{padding:var(--textarea-padding-large)}.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-style:solid;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:var(--select-padding-small)}.Select-module__sizeLarge___eBA1T{padding:var(--select-padding-large)}.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:.25em;-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:relative;width:2em;z-index:11}.Hamburger-module__line___gybZM{background:currentColor;border-radius:var(--hamburger-border-radius, 10px);height:12.5%;position:relative;transform-origin:1px;transition:all .3s linear;width:100%}.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);position:relative}.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{flex-direction:column;font-size:2rem;height:100vh;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%);overflow-y:auto;overflow-x:hidden;padding-top:3.5em}.ResponsiveNav-module__navHeader___Me8bB{position:fixed;top:0;left:0;right:0;height:3.5em;background:inherit;z-index:11}.ResponsiveNav-module__navMobile___h795P.ResponsiveNav-module__compact___UhuAE{padding-top:3em}.ResponsiveNav-module__navMobile___h795P.ResponsiveNav-module__compact___UhuAE .ResponsiveNav-module__navHeader___Me8bB{height:3em}.ResponsiveNav-module__navMobile___h795P.ResponsiveNav-module__open___WDCAf{transform:translate(0)}.ResponsiveNav-module__navMobile___h795P>a{padding:.35em 2em;text-align:center;width:100%}.ResponsiveNav-module__navMobile___h795P.ResponsiveNav-module__compact___UhuAE>a{padding:.25em 1.5em}.ResponsiveNav-module__navMobile___h795P>a.active{background:var(--mobile-active-bg);color:var(--mobile-active-color)}.ResponsiveNav-module__navMobile___h795P>button{align-self:center;margin:.5em 1.4em}.ResponsiveNav-module__navMobile___h795P.ResponsiveNav-module__compact___UhuAE>button{margin:.35em 1em}.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:var(--desktop-hover-opacity)}.Stack-module__stack___yUU-B{display:flex;gap:.5em}.Stack-module__vertical___sKTyQ{flex-direction:column;margin-bottom:.5em}.Stack-module__horizontal___YsvtV{flex-direction:row;align-items:center}.ResponsiveSection-module__section___gBESK{width:100%;padding:0}.ResponsiveSection-module__innerDiv___r1bky{max-width:var(--max-width);margin:0 auto;padding:var(--section-padding)}.Hero-module__hero___IB2tg{padding:var(--hero-padding, 3rem 0)}.Hero-module__content___rkkfQ h1{font-size:var(--hero-h1-font-size, 2rem);margin-bottom:var(--hero-h1-margin-bottom)}.Hero-module__content___rkkfQ p{font-size:var(--hero-p-font-size, 1.125rem);line-height:1.6}.Footer-module__footer___A76NF{width:100%;margin-top:auto}.Footer-module__container___QneNs{display:flex;align-items:center;justify-content:space-between;margin:0 auto}.FeatureCard-module__card___XQt66{display:flex;flex-direction:column;align-items:center;text-align:center;padding:var(--feature-card-padding)}.FeatureCard-module__icon___dXJ92{font-size:var(--feature-icon-font-size, 2.5rem);margin-bottom:var(--feature-icon-margin-bottom);color:var(--feature-icon-color, var(--primary-color))}.FeatureCard-module__title___KxXyA{font-size:var(--feature-title-font-size, 1.25rem);font-weight:600;margin-bottom:var(--feature-title-margin-bottom);color:var(--feature-title-color, inherit)}.FeatureCard-module__content___68xkw{font-size:1rem;line-height:1.6;color:var(--feature-content-color, var(--primary-color))}.FeatureGridSection-module__section___wZrbC{padding:var(--section-padding-vertical) 0}.FeatureGridSection-module__grid___iwPJv{display:grid;gap:2rem;grid-template-columns:var(--grid-template-columns, 1fr)}.PageLayout-module__layoutContainer___diLdT{display:flex;flex-direction:column;min-height:100vh}.PageLayout-module__content___h2mBr{flex:1 0 auto;display:flex;flex-direction:column}.PageLayout-module__main___Sw7Pv{flex:1}')),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
|
|
2
|
-
import { jsx as
|
|
3
|
-
import
|
|
4
|
-
const Ar = "Button-module__button___2ZuB7", Nr = "Button-module__sizeSmall___DRT8P", Rr = "Button-module__sizeLarge___yeZSH",
|
|
2
|
+
import { jsx as w, jsxs as Z, Fragment as xe } from "react/jsx-runtime";
|
|
3
|
+
import z, { createContext as kr, useContext as zr, useState as st, useLayoutEffect as $r, useSyncExternalStore as Er, useMemo as Pe, useRef as Ft, useEffect as Ke } from "react";
|
|
4
|
+
const Ar = "Button-module__button___2ZuB7", Nr = "Button-module__sizeSmall___DRT8P", Rr = "Button-module__sizeLarge___yeZSH", Ve = {
|
|
5
5
|
button: Ar,
|
|
6
6
|
sizeSmall: Nr,
|
|
7
7
|
sizeLarge: Rr
|
|
8
|
-
},
|
|
8
|
+
}, Dr = ({
|
|
9
9
|
isActive: e,
|
|
10
10
|
disabled: r,
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
backgroundColor: t,
|
|
12
|
+
color: s,
|
|
13
13
|
hoverBackgroundColor: o,
|
|
14
14
|
hoverTextColor: n,
|
|
15
|
-
outline: i
|
|
15
|
+
outline: i,
|
|
16
|
+
theme: l
|
|
16
17
|
}) => {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
18
|
+
const d = t || l.colors.primary;
|
|
19
|
+
let f;
|
|
20
|
+
i ? f = s || d : s ? f = s : f = t ? l.buttons.textColor : l.buttons.primary.textColor;
|
|
21
|
+
let y, m, h;
|
|
22
|
+
i ? (y = "transparent", m = f, h = f, e && (y = o || f, m = o || f, h = n || l.buttons.textColor)) : (y = d, m = d, h = f, e && (y = o || d, m = o || d, h = n || f));
|
|
23
|
+
let x = 1;
|
|
24
|
+
return r ? x = 0.3 : e && (x = o ? 1 : 0.75), {
|
|
25
|
+
backgroundColor: y,
|
|
26
|
+
borderColor: m,
|
|
27
|
+
color: h,
|
|
28
|
+
opacity: x
|
|
25
29
|
};
|
|
26
30
|
};
|
|
27
31
|
function Gt(e, r) {
|
|
@@ -110,7 +114,7 @@ const wt = {
|
|
|
110
114
|
}
|
|
111
115
|
}, Zt = kr(Je), Io = ({ theme: e, children: r }) => {
|
|
112
116
|
const t = e ? Gt(Je, e) : Je;
|
|
113
|
-
return /* @__PURE__ */
|
|
117
|
+
return /* @__PURE__ */ w(Zt.Provider, { value: t, children: r });
|
|
114
118
|
}, H = () => zr(Zt), Uo = ({
|
|
115
119
|
// Color props
|
|
116
120
|
backgroundColor: e,
|
|
@@ -124,57 +128,55 @@ const wt = {
|
|
|
124
128
|
type: l = "button",
|
|
125
129
|
// Standard React props
|
|
126
130
|
className: d,
|
|
127
|
-
style:
|
|
128
|
-
buttonProps:
|
|
129
|
-
onClick:
|
|
130
|
-
children:
|
|
131
|
+
style: f,
|
|
132
|
+
buttonProps: y = {},
|
|
133
|
+
onClick: m,
|
|
134
|
+
children: h
|
|
131
135
|
}) => {
|
|
132
|
-
const
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
const C = e || w.colors.primary, E = {
|
|
136
|
-
...Pr({
|
|
137
|
-
isActive: x,
|
|
136
|
+
const x = H(), [F, g] = st(!1), C = {
|
|
137
|
+
...Dr({
|
|
138
|
+
isActive: F,
|
|
138
139
|
disabled: o,
|
|
139
|
-
|
|
140
|
-
|
|
140
|
+
backgroundColor: e,
|
|
141
|
+
color: r,
|
|
141
142
|
hoverBackgroundColor: t,
|
|
142
143
|
hoverTextColor: s,
|
|
143
|
-
outline: i
|
|
144
|
+
outline: i,
|
|
145
|
+
theme: x
|
|
144
146
|
}),
|
|
145
|
-
fontSize:
|
|
146
|
-
borderWidth:
|
|
147
|
-
borderRadius:
|
|
148
|
-
"--button-padding-small": `calc(${
|
|
149
|
-
"--button-padding-large": `calc(${
|
|
150
|
-
...
|
|
147
|
+
fontSize: x.fonts.size,
|
|
148
|
+
borderWidth: x.border.width,
|
|
149
|
+
borderRadius: x.border.radius,
|
|
150
|
+
"--button-padding-small": `calc(${x.fonts.rhythm} * ${x.sizes.small.paddingVertical}) calc(${x.fonts.rhythm} * ${x.buttons.paddingHorizontal})`,
|
|
151
|
+
"--button-padding-large": `calc(${x.fonts.rhythm} * ${x.sizes.large.paddingVertical}) calc(${x.fonts.rhythm} * ${x.buttons.paddingHorizontal})`,
|
|
152
|
+
...f
|
|
151
153
|
// Top-level style overrides
|
|
152
|
-
},
|
|
153
|
-
|
|
154
|
-
n === "small" ?
|
|
155
|
-
i ?
|
|
154
|
+
}, b = [
|
|
155
|
+
Ve.button,
|
|
156
|
+
n === "small" ? Ve.sizeSmall : Ve.sizeLarge,
|
|
157
|
+
i ? Ve.outline : "",
|
|
156
158
|
d
|
|
157
159
|
].filter(Boolean).join(" ");
|
|
158
|
-
return /* @__PURE__ */
|
|
160
|
+
return /* @__PURE__ */ w(
|
|
159
161
|
"button",
|
|
160
162
|
{
|
|
161
|
-
...
|
|
162
|
-
className:
|
|
163
|
+
...y,
|
|
164
|
+
className: b,
|
|
163
165
|
disabled: o,
|
|
164
|
-
onClick:
|
|
165
|
-
onMouseEnter: () =>
|
|
166
|
-
onMouseLeave: () =>
|
|
166
|
+
onClick: m,
|
|
167
|
+
onMouseEnter: () => g(!0),
|
|
168
|
+
onMouseLeave: () => g(!1),
|
|
167
169
|
type: l,
|
|
168
|
-
style:
|
|
169
|
-
children:
|
|
170
|
+
style: C,
|
|
171
|
+
children: h
|
|
170
172
|
}
|
|
171
173
|
);
|
|
172
174
|
};
|
|
173
|
-
var
|
|
175
|
+
var Ct = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto < "u" && typeof msCrypto.getRandomValues == "function" && msCrypto.getRandomValues.bind(msCrypto), Pr = new Uint8Array(16);
|
|
174
176
|
function Br() {
|
|
175
|
-
if (!
|
|
177
|
+
if (!Ct)
|
|
176
178
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
177
|
-
return
|
|
179
|
+
return Ct(Pr);
|
|
178
180
|
}
|
|
179
181
|
var Qt = [];
|
|
180
182
|
for (var ze = 0; ze < 256; ++ze)
|
|
@@ -209,7 +211,7 @@ const Hr = "Checkbox-module__container___aV9qz", Or = "Checkbox-module__svg___kk
|
|
|
209
211
|
cursor: t ? "default" : "pointer",
|
|
210
212
|
opacity: t ? 0.3 : 1
|
|
211
213
|
};
|
|
212
|
-
}, jr = "FormLabel-module__label___0M-fo", Ir = "FormLabel-module__disabled___ktIFp",
|
|
214
|
+
}, jr = "FormLabel-module__label___0M-fo", Ir = "FormLabel-module__disabled___ktIFp", Vt = {
|
|
213
215
|
label: jr,
|
|
214
216
|
disabled: Ir
|
|
215
217
|
}, Ur = ({
|
|
@@ -237,20 +239,20 @@ const Hr = "Checkbox-module__container___aV9qz", Or = "Checkbox-module__svg___kk
|
|
|
237
239
|
// Element-specific props
|
|
238
240
|
labelProps: l
|
|
239
241
|
}) => {
|
|
240
|
-
const d = H(),
|
|
241
|
-
color:
|
|
242
|
+
const d = H(), f = d.colors.error, y = t ? f : e || d.colors.primary, m = Ur({
|
|
243
|
+
color: y,
|
|
242
244
|
disabled: r,
|
|
243
245
|
fontSize: ".85em"
|
|
244
|
-
}),
|
|
246
|
+
}), h = {
|
|
245
247
|
"--form-label-padding-bottom": `calc(${d.fonts.rhythm} * 0.17)`,
|
|
246
|
-
color:
|
|
247
|
-
fontSize:
|
|
248
|
-
opacity:
|
|
249
|
-
cursor:
|
|
248
|
+
color: m.color,
|
|
249
|
+
fontSize: m.fontSize,
|
|
250
|
+
opacity: m.opacity,
|
|
251
|
+
cursor: m.cursor,
|
|
250
252
|
...i
|
|
251
253
|
// Top level style prop overrides
|
|
252
|
-
},
|
|
253
|
-
return /* @__PURE__ */
|
|
254
|
+
}, x = [Vt.label, r ? Vt.disabled : "", n].filter(Boolean).join(" ");
|
|
255
|
+
return /* @__PURE__ */ w("label", { ...l, className: x, htmlFor: s, style: h, children: o });
|
|
254
256
|
}, Ye = ({
|
|
255
257
|
// Color props
|
|
256
258
|
color: e,
|
|
@@ -264,26 +266,26 @@ const Hr = "Checkbox-module__container___aV9qz", Or = "Checkbox-module__svg___kk
|
|
|
264
266
|
name: i,
|
|
265
267
|
id: l,
|
|
266
268
|
onChange: d,
|
|
267
|
-
label:
|
|
268
|
-
labelStyle:
|
|
269
|
+
label: f,
|
|
270
|
+
labelStyle: y,
|
|
269
271
|
// Style overrides
|
|
270
|
-
className:
|
|
271
|
-
style:
|
|
272
|
+
className: m,
|
|
273
|
+
style: h,
|
|
272
274
|
// Element-specific props
|
|
273
|
-
divProps:
|
|
275
|
+
divProps: x
|
|
274
276
|
}) => {
|
|
275
|
-
const
|
|
277
|
+
const F = H(), g = l || Kt(), k = F.colors.error, C = n ? k : e || F.colors.primary, b = Mr({
|
|
276
278
|
color: C,
|
|
277
279
|
checkmarkColor: r,
|
|
278
280
|
disabled: o,
|
|
279
281
|
inverted: s
|
|
280
282
|
}), E = (U) => {
|
|
281
283
|
o || d(U);
|
|
282
|
-
},
|
|
284
|
+
}, $ = {
|
|
283
285
|
cursor: b.cursor,
|
|
284
|
-
fontSize:
|
|
286
|
+
fontSize: F.fonts.size,
|
|
285
287
|
opacity: b.opacity,
|
|
286
|
-
...
|
|
288
|
+
...h
|
|
287
289
|
// Top-level style prop overrides
|
|
288
290
|
}, A = {
|
|
289
291
|
width: "1em"
|
|
@@ -295,12 +297,12 @@ const Hr = "Checkbox-module__container___aV9qz", Or = "Checkbox-module__svg___kk
|
|
|
295
297
|
stroke: b.checkmarkColor,
|
|
296
298
|
strokeWidth: "15",
|
|
297
299
|
fill: "transparent"
|
|
298
|
-
}, te = [je.container,
|
|
299
|
-
return /* @__PURE__ */ Z("div", { ...
|
|
300
|
-
/* @__PURE__ */
|
|
300
|
+
}, te = [je.container, m].filter(Boolean).join(" ");
|
|
301
|
+
return /* @__PURE__ */ Z("div", { ...x, className: te, style: $, children: [
|
|
302
|
+
/* @__PURE__ */ w(
|
|
301
303
|
"input",
|
|
302
304
|
{
|
|
303
|
-
id:
|
|
305
|
+
id: g,
|
|
304
306
|
checked: t,
|
|
305
307
|
disabled: o,
|
|
306
308
|
onChange: (U) => E({ target: { checked: U.target.checked, name: i, type: "checkbox" } }),
|
|
@@ -318,21 +320,21 @@ const Hr = "Checkbox-module__container___aV9qz", Or = "Checkbox-module__svg___kk
|
|
|
318
320
|
style: A,
|
|
319
321
|
className: je.svg,
|
|
320
322
|
children: [
|
|
321
|
-
/* @__PURE__ */
|
|
322
|
-
t && /* @__PURE__ */
|
|
323
|
+
/* @__PURE__ */ w("rect", { x: "0", y: "0", height: "100", width: "100", style: O }),
|
|
324
|
+
t && /* @__PURE__ */ w("path", { d: "M 25 45 L 45 65 L 75 30", style: M })
|
|
323
325
|
]
|
|
324
326
|
}
|
|
325
327
|
),
|
|
326
|
-
|
|
328
|
+
f && /* @__PURE__ */ w(
|
|
327
329
|
ot,
|
|
328
330
|
{
|
|
329
|
-
htmlFor:
|
|
331
|
+
htmlFor: g,
|
|
330
332
|
className: je.label,
|
|
331
|
-
style: { paddingBottom: 0, ...
|
|
333
|
+
style: { paddingBottom: 0, ...y },
|
|
332
334
|
color: b.checkboxColor,
|
|
333
335
|
disabled: o,
|
|
334
336
|
error: n,
|
|
335
|
-
children:
|
|
337
|
+
children: f
|
|
336
338
|
}
|
|
337
339
|
)
|
|
338
340
|
] });
|
|
@@ -369,15 +371,15 @@ var Be = (e) => /^\w*$/.test(e), L = (e) => e === void 0, it = (e) => Array.isAr
|
|
|
369
371
|
return t;
|
|
370
372
|
const s = (Be(r) ? [r] : at(r)).reduce((o, n) => K(o) ? o : o[n], e);
|
|
371
373
|
return L(s) || s === e ? L(e[r]) ? t : e[r] : s;
|
|
372
|
-
}, Y = (e) => typeof e == "boolean",
|
|
374
|
+
}, Y = (e) => typeof e == "boolean", P = (e, r, t) => {
|
|
373
375
|
let s = -1;
|
|
374
376
|
const o = Be(r) ? [r] : at(r), n = o.length, i = n - 1;
|
|
375
377
|
for (; ++s < n; ) {
|
|
376
378
|
const l = o[s];
|
|
377
379
|
let d = t;
|
|
378
380
|
if (s !== i) {
|
|
379
|
-
const
|
|
380
|
-
d = I(
|
|
381
|
+
const f = e[l];
|
|
382
|
+
d = I(f) || Array.isArray(f) ? f : isNaN(+o[s + 1]) ? {} : [];
|
|
381
383
|
}
|
|
382
384
|
if (l === "__proto__" || l === "constructor" || l === "prototype")
|
|
383
385
|
return;
|
|
@@ -402,9 +404,9 @@ const Ne = {
|
|
|
402
404
|
pattern: "pattern",
|
|
403
405
|
required: "required",
|
|
404
406
|
validate: "validate"
|
|
405
|
-
}, er =
|
|
407
|
+
}, er = z.createContext(null);
|
|
406
408
|
er.displayName = "HookFormContext";
|
|
407
|
-
const lt = () =>
|
|
409
|
+
const lt = () => z.useContext(er);
|
|
408
410
|
var tr = (e, r, t, s = !0) => {
|
|
409
411
|
const o = {
|
|
410
412
|
defaultValues: r._defaultValues
|
|
@@ -418,9 +420,9 @@ var tr = (e, r, t, s = !0) => {
|
|
|
418
420
|
});
|
|
419
421
|
return o;
|
|
420
422
|
};
|
|
421
|
-
const ct = typeof window < "u" ?
|
|
423
|
+
const ct = typeof window < "u" ? z.useLayoutEffect : z.useEffect;
|
|
422
424
|
function Gr(e) {
|
|
423
|
-
const r = lt(), { control: t = r.control, disabled: s, name: o, exact: n } = e || {}, [i, l] =
|
|
425
|
+
const r = lt(), { control: t = r.control, disabled: s, name: o, exact: n } = e || {}, [i, l] = z.useState(t._formState), d = z.useRef({
|
|
424
426
|
isDirty: !1,
|
|
425
427
|
isLoading: !1,
|
|
426
428
|
dirtyFields: !1,
|
|
@@ -434,15 +436,15 @@ function Gr(e) {
|
|
|
434
436
|
name: o,
|
|
435
437
|
formState: d.current,
|
|
436
438
|
exact: n,
|
|
437
|
-
callback: (
|
|
439
|
+
callback: (f) => {
|
|
438
440
|
!s && l({
|
|
439
441
|
...t._formState,
|
|
440
|
-
...
|
|
442
|
+
...f
|
|
441
443
|
});
|
|
442
444
|
}
|
|
443
|
-
}), [o, s, n]),
|
|
445
|
+
}), [o, s, n]), z.useEffect(() => {
|
|
444
446
|
d.current.isValid && t._setValid(!0);
|
|
445
|
-
}, [t]),
|
|
447
|
+
}, [t]), z.useMemo(() => tr(i, t, d.current, !1), [i, t]);
|
|
446
448
|
}
|
|
447
449
|
var X = (e) => typeof e == "string", Xe = (e, r, t, s, o) => X(e) ? (s && r.watch.add(e), v(t, e, o)) : Array.isArray(e) ? e.map((n) => (s && r.watch.add(n), v(t, n))) : (s && (r.watchAll = !0), t), et = (e) => K(e) || !Jt(e);
|
|
448
450
|
function se(e, r, t = /* @__PURE__ */ new WeakSet()) {
|
|
@@ -469,134 +471,134 @@ function se(e, r, t = /* @__PURE__ */ new WeakSet()) {
|
|
|
469
471
|
return !0;
|
|
470
472
|
}
|
|
471
473
|
function Zr(e) {
|
|
472
|
-
const r = lt(), { control: t = r.control, name: s, defaultValue: o, disabled: n, exact: i, compute: l } = e || {}, d =
|
|
473
|
-
|
|
474
|
-
const [
|
|
475
|
-
const
|
|
476
|
-
return
|
|
477
|
-
}),
|
|
478
|
-
const A = Xe(s, t._names,
|
|
479
|
-
return
|
|
480
|
-
}, [t._formValues, t._names, s]),
|
|
474
|
+
const r = lt(), { control: t = r.control, name: s, defaultValue: o, disabled: n, exact: i, compute: l } = e || {}, d = z.useRef(o), f = z.useRef(l), y = z.useRef(void 0), m = z.useRef(t), h = z.useRef(s);
|
|
475
|
+
f.current = l;
|
|
476
|
+
const [x, F] = z.useState(() => {
|
|
477
|
+
const $ = t._getWatch(s, d.current);
|
|
478
|
+
return f.current ? f.current($) : $;
|
|
479
|
+
}), g = z.useCallback(($) => {
|
|
480
|
+
const A = Xe(s, t._names, $ || t._formValues, !1, d.current);
|
|
481
|
+
return f.current ? f.current(A) : A;
|
|
482
|
+
}, [t._formValues, t._names, s]), k = z.useCallback(($) => {
|
|
481
483
|
if (!n) {
|
|
482
|
-
const A = Xe(s, t._names,
|
|
483
|
-
if (
|
|
484
|
-
const O =
|
|
485
|
-
se(O,
|
|
484
|
+
const A = Xe(s, t._names, $ || t._formValues, !1, d.current);
|
|
485
|
+
if (f.current) {
|
|
486
|
+
const O = f.current(A);
|
|
487
|
+
se(O, y.current) || (F(O), y.current = O);
|
|
486
488
|
} else
|
|
487
|
-
|
|
489
|
+
F(A);
|
|
488
490
|
}
|
|
489
491
|
}, [t._formValues, t._names, n, s]);
|
|
490
|
-
ct(() => ((
|
|
492
|
+
ct(() => ((m.current !== t || !se(h.current, s)) && (m.current = t, h.current = s, k()), t._subscribe({
|
|
491
493
|
name: s,
|
|
492
494
|
formState: {
|
|
493
495
|
values: !0
|
|
494
496
|
},
|
|
495
497
|
exact: i,
|
|
496
|
-
callback: (
|
|
497
|
-
|
|
498
|
+
callback: ($) => {
|
|
499
|
+
k($.values);
|
|
498
500
|
}
|
|
499
|
-
})), [t, i, s,
|
|
500
|
-
const C =
|
|
501
|
+
})), [t, i, s, k]), z.useEffect(() => t._removeUnmounted());
|
|
502
|
+
const C = m.current !== t, b = h.current, E = z.useMemo(() => {
|
|
501
503
|
if (n)
|
|
502
504
|
return null;
|
|
503
|
-
const
|
|
504
|
-
return C ||
|
|
505
|
-
}, [n, C, s, b,
|
|
506
|
-
return E !== null ? E :
|
|
505
|
+
const $ = !C && !se(b, s);
|
|
506
|
+
return C || $ ? g() : null;
|
|
507
|
+
}, [n, C, s, b, g]);
|
|
508
|
+
return E !== null ? E : x;
|
|
507
509
|
}
|
|
508
510
|
function Qr(e) {
|
|
509
|
-
const r = lt(), { name: t, disabled: s, control: o = r.control, shouldUnregister: n, defaultValue: i } = e, l = Xt(o._names.array, t), d =
|
|
511
|
+
const r = lt(), { name: t, disabled: s, control: o = r.control, shouldUnregister: n, defaultValue: i } = e, l = Xt(o._names.array, t), d = z.useMemo(() => v(o._formValues, t, v(o._defaultValues, t, i)), [o, t, i]), f = Zr({
|
|
510
512
|
control: o,
|
|
511
513
|
name: t,
|
|
512
514
|
defaultValue: d,
|
|
513
515
|
exact: !0
|
|
514
|
-
}),
|
|
516
|
+
}), y = Gr({
|
|
515
517
|
control: o,
|
|
516
518
|
name: t,
|
|
517
519
|
exact: !0
|
|
518
|
-
}),
|
|
520
|
+
}), m = z.useRef(e), h = z.useRef(void 0), x = z.useRef(o.register(t, {
|
|
519
521
|
...e.rules,
|
|
520
|
-
value:
|
|
522
|
+
value: f,
|
|
521
523
|
...Y(e.disabled) ? { disabled: e.disabled } : {}
|
|
522
524
|
}));
|
|
523
|
-
|
|
524
|
-
const
|
|
525
|
+
m.current = e;
|
|
526
|
+
const F = z.useMemo(() => Object.defineProperties({}, {
|
|
525
527
|
invalid: {
|
|
526
528
|
enumerable: !0,
|
|
527
|
-
get: () => !!v(
|
|
529
|
+
get: () => !!v(y.errors, t)
|
|
528
530
|
},
|
|
529
531
|
isDirty: {
|
|
530
532
|
enumerable: !0,
|
|
531
|
-
get: () => !!v(
|
|
533
|
+
get: () => !!v(y.dirtyFields, t)
|
|
532
534
|
},
|
|
533
535
|
isTouched: {
|
|
534
536
|
enumerable: !0,
|
|
535
|
-
get: () => !!v(
|
|
537
|
+
get: () => !!v(y.touchedFields, t)
|
|
536
538
|
},
|
|
537
539
|
isValidating: {
|
|
538
540
|
enumerable: !0,
|
|
539
|
-
get: () => !!v(
|
|
541
|
+
get: () => !!v(y.validatingFields, t)
|
|
540
542
|
},
|
|
541
543
|
error: {
|
|
542
544
|
enumerable: !0,
|
|
543
|
-
get: () => v(
|
|
545
|
+
get: () => v(y.errors, t)
|
|
544
546
|
}
|
|
545
|
-
}), [
|
|
547
|
+
}), [y, t]), g = z.useCallback((E) => x.current.onChange({
|
|
546
548
|
target: {
|
|
547
549
|
value: Yt(E),
|
|
548
550
|
name: t
|
|
549
551
|
},
|
|
550
552
|
type: Ne.CHANGE
|
|
551
|
-
}), [t]),
|
|
553
|
+
}), [t]), k = z.useCallback(() => x.current.onBlur({
|
|
552
554
|
target: {
|
|
553
555
|
value: v(o._formValues, t),
|
|
554
556
|
name: t
|
|
555
557
|
},
|
|
556
558
|
type: Ne.BLUR
|
|
557
|
-
}), [t, o._formValues]), C =
|
|
558
|
-
const
|
|
559
|
-
|
|
559
|
+
}), [t, o._formValues]), C = z.useCallback((E) => {
|
|
560
|
+
const $ = v(o._fields, t);
|
|
561
|
+
$ && E && ($._f.ref = {
|
|
560
562
|
focus: () => E.focus && E.focus(),
|
|
561
563
|
select: () => E.select && E.select(),
|
|
562
564
|
setCustomValidity: (A) => E.setCustomValidity(A),
|
|
563
565
|
reportValidity: () => E.reportValidity()
|
|
564
566
|
});
|
|
565
|
-
}, [o._fields, t]), b =
|
|
567
|
+
}, [o._fields, t]), b = z.useMemo(() => ({
|
|
566
568
|
name: t,
|
|
567
|
-
value:
|
|
568
|
-
...Y(s) ||
|
|
569
|
-
onChange:
|
|
570
|
-
onBlur:
|
|
569
|
+
value: f,
|
|
570
|
+
...Y(s) || y.disabled ? { disabled: y.disabled || s } : {},
|
|
571
|
+
onChange: g,
|
|
572
|
+
onBlur: k,
|
|
571
573
|
ref: C
|
|
572
|
-
}), [t, s,
|
|
573
|
-
return
|
|
574
|
-
const E = o._options.shouldUnregister || n,
|
|
575
|
-
|
|
576
|
-
...
|
|
577
|
-
...Y(
|
|
574
|
+
}), [t, s, y.disabled, g, k, C, f]);
|
|
575
|
+
return z.useEffect(() => {
|
|
576
|
+
const E = o._options.shouldUnregister || n, $ = h.current;
|
|
577
|
+
$ && $ !== t && !l && o.unregister($), o.register(t, {
|
|
578
|
+
...m.current.rules,
|
|
579
|
+
...Y(m.current.disabled) ? { disabled: m.current.disabled } : {}
|
|
578
580
|
});
|
|
579
581
|
const A = (O, M) => {
|
|
580
582
|
const te = v(o._fields, O);
|
|
581
583
|
te && te._f && (te._f.mount = M);
|
|
582
584
|
};
|
|
583
585
|
if (A(t, !0), E) {
|
|
584
|
-
const O = W(v(o._options.defaultValues, t,
|
|
585
|
-
|
|
586
|
+
const O = W(v(o._options.defaultValues, t, m.current.defaultValue));
|
|
587
|
+
P(o._defaultValues, t, O), L(v(o._formValues, t)) && P(o._formValues, t, O);
|
|
586
588
|
}
|
|
587
|
-
return !l && o.register(t),
|
|
589
|
+
return !l && o.register(t), h.current = t, () => {
|
|
588
590
|
(l ? E && !o._state.action : E) ? o.unregister(t) : A(t, !1);
|
|
589
591
|
};
|
|
590
|
-
}, [t, o, l, n]),
|
|
592
|
+
}, [t, o, l, n]), z.useEffect(() => {
|
|
591
593
|
o._setDisabledField({
|
|
592
594
|
disabled: s,
|
|
593
595
|
name: t
|
|
594
596
|
});
|
|
595
|
-
}, [s, t, o]),
|
|
597
|
+
}, [s, t, o]), z.useMemo(() => ({
|
|
596
598
|
field: b,
|
|
597
|
-
formState:
|
|
598
|
-
fieldState:
|
|
599
|
-
}), [b,
|
|
599
|
+
formState: y,
|
|
600
|
+
fieldState: F
|
|
601
|
+
}), [b, y, F]);
|
|
600
602
|
}
|
|
601
603
|
var ut = (e, r, t, s, o) => r ? {
|
|
602
604
|
...t[e],
|
|
@@ -712,7 +714,7 @@ var es = (e, r, t, s) => {
|
|
|
712
714
|
const o = {};
|
|
713
715
|
for (const n of e) {
|
|
714
716
|
const i = v(r, n);
|
|
715
|
-
i &&
|
|
717
|
+
i && P(o, n, i._f);
|
|
716
718
|
}
|
|
717
719
|
return {
|
|
718
720
|
criteriaMode: t,
|
|
@@ -720,7 +722,7 @@ var es = (e, r, t, s) => {
|
|
|
720
722
|
fields: o,
|
|
721
723
|
shouldUseNativeValidation: s
|
|
722
724
|
};
|
|
723
|
-
},
|
|
725
|
+
}, De = (e) => e instanceof RegExp, pe = (e) => L(e) ? e : De(e) ? e.source : I(e) ? De(e.value) ? e.value.source : e.value : e, Nt = (e) => ({
|
|
724
726
|
isOnSubmit: !e || e === re.onSubmit,
|
|
725
727
|
isOnBlur: e === re.onBlur,
|
|
726
728
|
isOnChange: e === re.onChange,
|
|
@@ -728,7 +730,7 @@ var es = (e, r, t, s) => {
|
|
|
728
730
|
isOnTouch: e === re.onTouched
|
|
729
731
|
});
|
|
730
732
|
const Rt = "AsyncFunction";
|
|
731
|
-
var ts = (e) => !!e && !!e.validate && !!(oe(e.validate) && e.validate.constructor.name === Rt || I(e.validate) && Object.values(e.validate).find((r) => r.constructor.name === Rt)), rs = (e) => e.mount && (e.required || e.min || e.max || e.maxLength || e.minLength || e.pattern || e.validate),
|
|
733
|
+
var ts = (e) => !!e && !!e.validate && !!(oe(e.validate) && e.validate.constructor.name === Rt || I(e.validate) && Object.values(e.validate).find((r) => r.constructor.name === Rt)), rs = (e) => e.mount && (e.required || e.min || e.max || e.maxLength || e.minLength || e.pattern || e.validate), Dt = (e, r, t) => !t && (r.watchAll || r.watch.has(e) || [...r.watch].some((s) => e.startsWith(s) && /^\.\w+/.test(e.slice(s.length))));
|
|
732
734
|
const Se = (e, r, t, s) => {
|
|
733
735
|
for (const o of t || Object.keys(e)) {
|
|
734
736
|
const n = v(e, o);
|
|
@@ -746,7 +748,7 @@ const Se = (e, r, t, s) => {
|
|
|
746
748
|
}
|
|
747
749
|
}
|
|
748
750
|
};
|
|
749
|
-
function
|
|
751
|
+
function Pt(e, r, t) {
|
|
750
752
|
const s = v(e, t);
|
|
751
753
|
if (s || Be(t))
|
|
752
754
|
return {
|
|
@@ -780,7 +782,7 @@ var ss = (e, r, t, s) => {
|
|
|
780
782
|
return G(n) || Object.keys(n).length >= Object.keys(r).length || Object.keys(n).find((i) => r[i] === (!s || re.all));
|
|
781
783
|
}, os = (e, r, t) => !e || !r || e === r || be(e).some((s) => s && (t ? s === r : s.startsWith(r) || r.startsWith(s))), ns = (e, r, t, s, o) => o.isOnAll ? !1 : !t && o.isOnTouch ? !(r || e) : (t ? s.isOnBlur : o.isOnBlur) ? !e : (t ? s.isOnChange : o.isOnChange) ? e : !0, is = (e, r) => !it(v(e, r)).length && j(e, r), as = (e, r, t) => {
|
|
782
784
|
const s = be(v(e, t));
|
|
783
|
-
return
|
|
785
|
+
return P(s, "root", r[t]), P(e, t, s), e;
|
|
784
786
|
};
|
|
785
787
|
function Bt(e, r, t = "validate") {
|
|
786
788
|
if (X(e) || Array.isArray(e) && e.every(X) || Y(e) && !e)
|
|
@@ -790,18 +792,18 @@ function Bt(e, r, t = "validate") {
|
|
|
790
792
|
ref: r
|
|
791
793
|
};
|
|
792
794
|
}
|
|
793
|
-
var ye = (e) => I(e) && !
|
|
795
|
+
var ye = (e) => I(e) && !De(e) ? e : {
|
|
794
796
|
value: e,
|
|
795
797
|
message: ""
|
|
796
798
|
}, Lt = async (e, r, t, s, o, n) => {
|
|
797
|
-
const { ref: i, refs: l, required: d, maxLength:
|
|
798
|
-
if (!C || r.has(
|
|
799
|
+
const { ref: i, refs: l, required: d, maxLength: f, minLength: y, min: m, max: h, pattern: x, validate: F, name: g, valueAsNumber: k, mount: C } = e._f, b = v(t, g);
|
|
800
|
+
if (!C || r.has(g))
|
|
799
801
|
return {};
|
|
800
|
-
const E = l ? l[0] : i,
|
|
802
|
+
const E = l ? l[0] : i, $ = (N) => {
|
|
801
803
|
o && E.reportValidity && (E.setCustomValidity(Y(N) ? "" : N || ""), E.reportValidity());
|
|
802
|
-
}, A = {}, O = ft(i), M = Fe(i), te = O || M, U = (
|
|
804
|
+
}, A = {}, O = ft(i), M = Fe(i), te = O || M, U = (k || dt(i)) && L(i.value) && L(b) || Re(i) && i.value === "" || b === "" || Array.isArray(b) && !b.length, ae = ut.bind(null, g, s, A), J = (N, R, T, q = le.maxLength, Q = le.minLength) => {
|
|
803
805
|
const ne = N ? R : T;
|
|
804
|
-
A[
|
|
806
|
+
A[g] = {
|
|
805
807
|
type: N ? q : Q,
|
|
806
808
|
message: ne,
|
|
807
809
|
ref: i,
|
|
@@ -810,17 +812,17 @@ var ye = (e) => I(e) && !Pe(e) ? e : {
|
|
|
810
812
|
};
|
|
811
813
|
if (n ? !Array.isArray(b) || !b.length : d && (!te && (U || K(b)) || Y(b) && !b || M && !nr(l).isValid || O && !ar(l).isValid)) {
|
|
812
814
|
const { value: N, message: R } = X(d) ? { value: !!d, message: d } : ye(d);
|
|
813
|
-
if (N && (A[
|
|
815
|
+
if (N && (A[g] = {
|
|
814
816
|
type: le.required,
|
|
815
817
|
message: R,
|
|
816
818
|
ref: E,
|
|
817
819
|
...ae(le.required, R)
|
|
818
820
|
}, !s))
|
|
819
|
-
return
|
|
821
|
+
return $(R), A;
|
|
820
822
|
}
|
|
821
|
-
if (!U && (!K(
|
|
823
|
+
if (!U && (!K(m) || !K(h))) {
|
|
822
824
|
let N, R;
|
|
823
|
-
const T = ye(
|
|
825
|
+
const T = ye(h), q = ye(m);
|
|
824
826
|
if (!K(b) && !isNaN(b)) {
|
|
825
827
|
const Q = i.valueAsNumber || b && +b;
|
|
826
828
|
K(T.value) || (N = Q > T.value), K(q.value) || (R = Q < q.value);
|
|
@@ -829,50 +831,50 @@ var ye = (e) => I(e) && !Pe(e) ? e : {
|
|
|
829
831
|
X(T.value) && b && (N = _e ? ne(b) > ne(T.value) : fe ? b > T.value : Q > new Date(T.value)), X(q.value) && b && (R = _e ? ne(b) < ne(q.value) : fe ? b < q.value : Q < new Date(q.value));
|
|
830
832
|
}
|
|
831
833
|
if ((N || R) && (J(!!N, T.message, q.message, le.max, le.min), !s))
|
|
832
|
-
return
|
|
834
|
+
return $(A[g].message), A;
|
|
833
835
|
}
|
|
834
|
-
if ((
|
|
835
|
-
const N = ye(
|
|
836
|
+
if ((f || y) && !U && (X(b) || n && Array.isArray(b))) {
|
|
837
|
+
const N = ye(f), R = ye(y), T = !K(N.value) && b.length > +N.value, q = !K(R.value) && b.length < +R.value;
|
|
836
838
|
if ((T || q) && (J(T, N.message, R.message), !s))
|
|
837
|
-
return
|
|
839
|
+
return $(A[g].message), A;
|
|
838
840
|
}
|
|
839
|
-
if (
|
|
840
|
-
const { value: N, message: R } = ye(
|
|
841
|
-
if (
|
|
841
|
+
if (x && !U && X(b)) {
|
|
842
|
+
const { value: N, message: R } = ye(x);
|
|
843
|
+
if (De(N) && !b.match(N) && (A[g] = {
|
|
842
844
|
type: le.pattern,
|
|
843
845
|
message: R,
|
|
844
846
|
ref: i,
|
|
845
847
|
...ae(le.pattern, R)
|
|
846
848
|
}, !s))
|
|
847
|
-
return
|
|
849
|
+
return $(R), A;
|
|
848
850
|
}
|
|
849
|
-
if (
|
|
850
|
-
if (oe(
|
|
851
|
-
const N = await
|
|
852
|
-
if (R && (A[
|
|
851
|
+
if (F) {
|
|
852
|
+
if (oe(F)) {
|
|
853
|
+
const N = await F(b, t), R = Bt(N, E);
|
|
854
|
+
if (R && (A[g] = {
|
|
853
855
|
...R,
|
|
854
856
|
...ae(le.validate, R.message)
|
|
855
857
|
}, !s))
|
|
856
|
-
return
|
|
857
|
-
} else if (I(
|
|
858
|
+
return $(R.message), A;
|
|
859
|
+
} else if (I(F)) {
|
|
858
860
|
let N = {};
|
|
859
|
-
for (const R in
|
|
861
|
+
for (const R in F) {
|
|
860
862
|
if (!G(N) && !s)
|
|
861
863
|
break;
|
|
862
|
-
const T = Bt(await
|
|
864
|
+
const T = Bt(await F[R](b, t), E, R);
|
|
863
865
|
T && (N = {
|
|
864
866
|
...T,
|
|
865
867
|
...ae(R, T.message)
|
|
866
|
-
},
|
|
868
|
+
}, $(T.message), s && (A[g] = N));
|
|
867
869
|
}
|
|
868
|
-
if (!G(N) && (A[
|
|
870
|
+
if (!G(N) && (A[g] = {
|
|
869
871
|
ref: E,
|
|
870
872
|
...N
|
|
871
873
|
}, !s))
|
|
872
874
|
return A;
|
|
873
875
|
}
|
|
874
876
|
}
|
|
875
|
-
return
|
|
877
|
+
return $(!0), A;
|
|
876
878
|
};
|
|
877
879
|
const ls = {
|
|
878
880
|
mode: re.onSubmit,
|
|
@@ -908,8 +910,8 @@ function cs(e = {}) {
|
|
|
908
910
|
unMount: /* @__PURE__ */ new Set(),
|
|
909
911
|
array: /* @__PURE__ */ new Set(),
|
|
910
912
|
watch: /* @__PURE__ */ new Set()
|
|
911
|
-
}, d,
|
|
912
|
-
const
|
|
913
|
+
}, d, f = 0;
|
|
914
|
+
const y = {
|
|
913
915
|
isDirty: !1,
|
|
914
916
|
dirtyFields: !1,
|
|
915
917
|
validatingFields: !1,
|
|
@@ -918,43 +920,43 @@ function cs(e = {}) {
|
|
|
918
920
|
isValid: !1,
|
|
919
921
|
errors: !1
|
|
920
922
|
};
|
|
921
|
-
let
|
|
922
|
-
...
|
|
923
|
+
let m = {
|
|
924
|
+
...y
|
|
923
925
|
};
|
|
924
|
-
const
|
|
926
|
+
const h = {
|
|
925
927
|
array: kt(),
|
|
926
928
|
state: kt()
|
|
927
|
-
},
|
|
928
|
-
clearTimeout(
|
|
929
|
-
},
|
|
930
|
-
if (!r.disabled && (
|
|
929
|
+
}, x = r.criteriaMode === re.all, F = (a) => (c) => {
|
|
930
|
+
clearTimeout(f), f = setTimeout(a, c);
|
|
931
|
+
}, g = async (a) => {
|
|
932
|
+
if (!r.disabled && (y.isValid || m.isValid || a)) {
|
|
931
933
|
const c = r.resolver ? G((await M()).errors) : await U(s, !0);
|
|
932
|
-
c !== t.isValid &&
|
|
934
|
+
c !== t.isValid && h.state.next({
|
|
933
935
|
isValid: c
|
|
934
936
|
});
|
|
935
937
|
}
|
|
936
|
-
},
|
|
937
|
-
!r.disabled && (
|
|
938
|
-
u && (c ?
|
|
939
|
-
}),
|
|
938
|
+
}, k = (a, c) => {
|
|
939
|
+
!r.disabled && (y.isValidating || y.validatingFields || m.isValidating || m.validatingFields) && ((a || Array.from(l.mount)).forEach((u) => {
|
|
940
|
+
u && (c ? P(t.validatingFields, u, c) : j(t.validatingFields, u));
|
|
941
|
+
}), h.state.next({
|
|
940
942
|
validatingFields: t.validatingFields,
|
|
941
943
|
isValidating: !G(t.validatingFields)
|
|
942
944
|
}));
|
|
943
945
|
}, C = (a, c = [], u, S, p = !0, _ = !0) => {
|
|
944
946
|
if (S && u && !r.disabled) {
|
|
945
947
|
if (i.action = !0, _ && Array.isArray(v(s, a))) {
|
|
946
|
-
const
|
|
947
|
-
p &&
|
|
948
|
+
const V = u(v(s, a), S.argA, S.argB);
|
|
949
|
+
p && P(s, a, V);
|
|
948
950
|
}
|
|
949
951
|
if (_ && Array.isArray(v(t.errors, a))) {
|
|
950
|
-
const
|
|
951
|
-
p &&
|
|
952
|
+
const V = u(v(t.errors, a), S.argA, S.argB);
|
|
953
|
+
p && P(t.errors, a, V), is(t.errors, a);
|
|
952
954
|
}
|
|
953
|
-
if ((
|
|
954
|
-
const
|
|
955
|
-
p &&
|
|
955
|
+
if ((y.touchedFields || m.touchedFields) && _ && Array.isArray(v(t.touchedFields, a))) {
|
|
956
|
+
const V = u(v(t.touchedFields, a), S.argA, S.argB);
|
|
957
|
+
p && P(t.touchedFields, a, V);
|
|
956
958
|
}
|
|
957
|
-
(
|
|
959
|
+
(y.dirtyFields || m.dirtyFields) && (t.dirtyFields = ge(o, n)), h.state.next({
|
|
958
960
|
name: a,
|
|
959
961
|
isDirty: J(a, c),
|
|
960
962
|
dirtyFields: t.dirtyFields,
|
|
@@ -962,44 +964,44 @@ function cs(e = {}) {
|
|
|
962
964
|
isValid: t.isValid
|
|
963
965
|
});
|
|
964
966
|
} else
|
|
965
|
-
|
|
967
|
+
P(n, a, c);
|
|
966
968
|
}, b = (a, c) => {
|
|
967
|
-
|
|
969
|
+
P(t.errors, a, c), h.state.next({
|
|
968
970
|
errors: t.errors
|
|
969
971
|
});
|
|
970
972
|
}, E = (a) => {
|
|
971
|
-
t.errors = a,
|
|
973
|
+
t.errors = a, h.state.next({
|
|
972
974
|
errors: t.errors,
|
|
973
975
|
isValid: !1
|
|
974
976
|
});
|
|
975
|
-
},
|
|
977
|
+
}, $ = (a, c, u, S) => {
|
|
976
978
|
const p = v(s, a);
|
|
977
979
|
if (p) {
|
|
978
980
|
const _ = v(n, a, L(u) ? v(o, a) : u);
|
|
979
|
-
L(_) || S && S.defaultChecked || c ?
|
|
981
|
+
L(_) || S && S.defaultChecked || c ? P(n, a, c ? _ : At(p._f)) : T(a, _), i.mount && g();
|
|
980
982
|
}
|
|
981
983
|
}, A = (a, c, u, S, p) => {
|
|
982
|
-
let _ = !1,
|
|
983
|
-
const
|
|
984
|
+
let _ = !1, V = !1;
|
|
985
|
+
const D = {
|
|
984
986
|
name: a
|
|
985
987
|
};
|
|
986
988
|
if (!r.disabled) {
|
|
987
989
|
if (!u || S) {
|
|
988
|
-
(
|
|
990
|
+
(y.isDirty || m.isDirty) && (V = t.isDirty, t.isDirty = D.isDirty = J(), _ = V !== D.isDirty);
|
|
989
991
|
const B = se(v(o, a), c);
|
|
990
|
-
|
|
992
|
+
V = !!v(t.dirtyFields, a), B ? j(t.dirtyFields, a) : P(t.dirtyFields, a, !0), D.dirtyFields = t.dirtyFields, _ = _ || (y.dirtyFields || m.dirtyFields) && V !== !B;
|
|
991
993
|
}
|
|
992
994
|
if (u) {
|
|
993
995
|
const B = v(t.touchedFields, a);
|
|
994
|
-
B || (
|
|
996
|
+
B || (P(t.touchedFields, a, u), D.touchedFields = t.touchedFields, _ = _ || (y.touchedFields || m.touchedFields) && B !== u);
|
|
995
997
|
}
|
|
996
|
-
_ && p &&
|
|
998
|
+
_ && p && h.state.next(D);
|
|
997
999
|
}
|
|
998
|
-
return _ ?
|
|
1000
|
+
return _ ? D : {};
|
|
999
1001
|
}, O = (a, c, u, S) => {
|
|
1000
|
-
const p = v(t.errors, a), _ = (
|
|
1001
|
-
if (r.delayError && u ? (d =
|
|
1002
|
-
const
|
|
1002
|
+
const p = v(t.errors, a), _ = (y.isValid || m.isValid) && Y(c) && t.isValid !== c;
|
|
1003
|
+
if (r.delayError && u ? (d = F(() => b(a, u)), d(r.delayError)) : (clearTimeout(f), d = null, u ? P(t.errors, a, u) : j(t.errors, a)), (u ? !se(p, u) : p) || !G(S) || _) {
|
|
1004
|
+
const V = {
|
|
1003
1005
|
...S,
|
|
1004
1006
|
..._ && Y(c) ? { isValid: c } : {},
|
|
1005
1007
|
errors: t.errors,
|
|
@@ -1007,19 +1009,19 @@ function cs(e = {}) {
|
|
|
1007
1009
|
};
|
|
1008
1010
|
t = {
|
|
1009
1011
|
...t,
|
|
1010
|
-
...
|
|
1011
|
-
},
|
|
1012
|
+
...V
|
|
1013
|
+
}, h.state.next(V);
|
|
1012
1014
|
}
|
|
1013
1015
|
}, M = async (a) => {
|
|
1014
|
-
|
|
1016
|
+
k(a, !0);
|
|
1015
1017
|
const c = await r.resolver(n, r.context, es(a || l.mount, s, r.criteriaMode, r.shouldUseNativeValidation));
|
|
1016
|
-
return
|
|
1018
|
+
return k(a), c;
|
|
1017
1019
|
}, te = async (a) => {
|
|
1018
1020
|
const { errors: c } = await M(a);
|
|
1019
1021
|
if (a)
|
|
1020
1022
|
for (const u of a) {
|
|
1021
1023
|
const S = v(c, u);
|
|
1022
|
-
S ?
|
|
1024
|
+
S ? P(t.errors, u, S) : j(t.errors, u);
|
|
1023
1025
|
}
|
|
1024
1026
|
else
|
|
1025
1027
|
t.errors = c;
|
|
@@ -1030,16 +1032,16 @@ function cs(e = {}) {
|
|
|
1030
1032
|
for (const S in a) {
|
|
1031
1033
|
const p = a[S];
|
|
1032
1034
|
if (p) {
|
|
1033
|
-
const { _f: _, ...
|
|
1035
|
+
const { _f: _, ...V } = p;
|
|
1034
1036
|
if (_) {
|
|
1035
|
-
const
|
|
1036
|
-
B &&
|
|
1037
|
-
const ee = await Lt(p, l.disabled, n,
|
|
1038
|
-
if (B &&
|
|
1037
|
+
const D = l.array.has(_.name), B = p._f && ts(p._f);
|
|
1038
|
+
B && y.validatingFields && k([_.name], !0);
|
|
1039
|
+
const ee = await Lt(p, l.disabled, n, x, r.shouldUseNativeValidation && !c, D);
|
|
1040
|
+
if (B && y.validatingFields && k([_.name]), ee[_.name] && (u.valid = !1, c))
|
|
1039
1041
|
break;
|
|
1040
|
-
!c && (v(ee, _.name) ?
|
|
1042
|
+
!c && (v(ee, _.name) ? D ? as(t.errors, ee, _.name) : P(t.errors, _.name, ee[_.name]) : j(t.errors, _.name));
|
|
1041
1043
|
}
|
|
1042
|
-
!G(
|
|
1044
|
+
!G(V) && await U(V, c, u);
|
|
1043
1045
|
}
|
|
1044
1046
|
}
|
|
1045
1047
|
return u.valid;
|
|
@@ -1049,16 +1051,16 @@ function cs(e = {}) {
|
|
|
1049
1051
|
c && (c._f.refs ? c._f.refs.every((u) => !Ie(u)) : !Ie(c._f.ref)) && Le(a);
|
|
1050
1052
|
}
|
|
1051
1053
|
l.unMount = /* @__PURE__ */ new Set();
|
|
1052
|
-
}, J = (a, c) => !r.disabled && (a && c &&
|
|
1054
|
+
}, J = (a, c) => !r.disabled && (a && c && P(n, a, c), !se(we(), o)), N = (a, c, u) => Xe(a, l, {
|
|
1053
1055
|
...i.mount ? n : L(c) ? o : X(a) ? { [a]: c } : c
|
|
1054
1056
|
}, u, c), R = (a) => it(v(i.mount ? n : o, a, r.shouldUnregister ? v(o, a, []) : [])), T = (a, c, u = {}) => {
|
|
1055
1057
|
const S = v(s, a);
|
|
1056
1058
|
let p = c;
|
|
1057
1059
|
if (S) {
|
|
1058
1060
|
const _ = S._f;
|
|
1059
|
-
_ && (!_.disabled &&
|
|
1060
|
-
(!
|
|
1061
|
-
}) : _.refs.forEach((
|
|
1061
|
+
_ && (!_.disabled && P(n, a, ir(c, _)), p = Re(_.ref) && K(c) ? "" : c, sr(_.ref) ? [..._.ref.options].forEach((V) => V.selected = p.includes(V.value)) : _.refs ? Fe(_.ref) ? _.refs.forEach((V) => {
|
|
1062
|
+
(!V.defaultChecked || !V.disabled) && (Array.isArray(p) ? V.checked = !!p.find((D) => D === V.value) : V.checked = p === V.value || !!p);
|
|
1063
|
+
}) : _.refs.forEach((V) => V.checked = V.value === p) : dt(_.ref) ? _.ref.value = "" : (_.ref.value = p, _.ref.type || h.state.next({
|
|
1062
1064
|
name: a,
|
|
1063
1065
|
values: W(n)
|
|
1064
1066
|
})));
|
|
@@ -1068,19 +1070,19 @@ function cs(e = {}) {
|
|
|
1068
1070
|
for (const S in c) {
|
|
1069
1071
|
if (!c.hasOwnProperty(S))
|
|
1070
1072
|
return;
|
|
1071
|
-
const p = c[S], _ = a + "." + S,
|
|
1072
|
-
(l.array.has(a) || I(p) ||
|
|
1073
|
+
const p = c[S], _ = a + "." + S, V = v(s, _);
|
|
1074
|
+
(l.array.has(a) || I(p) || V && !V._f) && !ue(p) ? q(_, p, u) : T(_, p, u);
|
|
1073
1075
|
}
|
|
1074
1076
|
}, Q = (a, c, u = {}) => {
|
|
1075
1077
|
const S = v(s, a), p = l.array.has(a), _ = W(c);
|
|
1076
|
-
|
|
1078
|
+
P(n, a, _), p ? (h.array.next({
|
|
1077
1079
|
name: a,
|
|
1078
1080
|
values: W(n)
|
|
1079
|
-
}), (
|
|
1081
|
+
}), (y.isDirty || y.dirtyFields || m.isDirty || m.dirtyFields) && u.shouldDirty && h.state.next({
|
|
1080
1082
|
name: a,
|
|
1081
1083
|
dirtyFields: ge(o, n),
|
|
1082
1084
|
isDirty: J(a, _)
|
|
1083
|
-
})) : S && !S._f && !K(_) ? q(a, _, u) : T(a, _, u),
|
|
1085
|
+
})) : S && !S._f && !K(_) ? q(a, _, u) : T(a, _, u), Dt(a, l) && h.state.next({ ...t, name: a }), h.state.next({
|
|
1084
1086
|
name: i.mount ? a : void 0,
|
|
1085
1087
|
values: W(n)
|
|
1086
1088
|
});
|
|
@@ -1090,26 +1092,26 @@ function cs(e = {}) {
|
|
|
1090
1092
|
let u = c.name, S = !0;
|
|
1091
1093
|
const p = v(s, u), _ = (B) => {
|
|
1092
1094
|
S = Number.isNaN(B) || ue(B) && isNaN(B.getTime()) || se(B, v(n, u, B));
|
|
1093
|
-
},
|
|
1095
|
+
}, V = Nt(r.mode), D = Nt(r.reValidateMode);
|
|
1094
1096
|
if (p) {
|
|
1095
1097
|
let B, ee;
|
|
1096
|
-
const
|
|
1097
|
-
|
|
1098
|
-
const Me = A(u,
|
|
1099
|
-
if (!ce &&
|
|
1098
|
+
const Ce = c.type ? At(p._f) : Yt(a), ce = a.type === Ne.BLUR || a.type === Ne.FOCUS_OUT, wr = !rs(p._f) && !r.resolver && !v(t.errors, u) && !p._f.deps || ns(ce, v(t.touchedFields, u), t.isSubmitted, D, V), Te = Dt(u, l, ce);
|
|
1099
|
+
P(n, u, Ce), ce ? (!c || !c.readOnly) && (p._f.onBlur && p._f.onBlur(a), d && d(0)) : p._f.onChange && p._f.onChange(a);
|
|
1100
|
+
const Me = A(u, Ce, ce), Cr = !G(Me) || Te;
|
|
1101
|
+
if (!ce && h.state.next({
|
|
1100
1102
|
name: u,
|
|
1101
1103
|
type: a.type,
|
|
1102
1104
|
values: W(n)
|
|
1103
1105
|
}), wr)
|
|
1104
|
-
return (
|
|
1105
|
-
if (!ce && Te &&
|
|
1106
|
+
return (y.isValid || m.isValid) && (r.mode === "onBlur" ? ce && g() : ce || g()), Cr && h.state.next({ name: u, ...Te ? {} : Me });
|
|
1107
|
+
if (!ce && Te && h.state.next({ ...t }), r.resolver) {
|
|
1106
1108
|
const { errors: St } = await M([u]);
|
|
1107
|
-
if (_(
|
|
1108
|
-
const
|
|
1109
|
+
if (_(Ce), S) {
|
|
1110
|
+
const Vr = Pt(t.errors, s, u), xt = Pt(St, s, Vr.name || u);
|
|
1109
1111
|
B = xt.error, u = xt.name, ee = G(St);
|
|
1110
1112
|
}
|
|
1111
1113
|
} else
|
|
1112
|
-
|
|
1114
|
+
k([u], !0), B = (await Lt(p, l.disabled, n, x, r.shouldUseNativeValidation))[u], k([u]), _(Ce), S && (B ? ee = !1 : (y.isValid || m.isValid) && (ee = await U(s, !0)));
|
|
1113
1115
|
S && (p._f.deps && (!Array.isArray(p._f.deps) || p._f.deps.length > 0) && fe(p._f.deps), O(u, ee, B, Me));
|
|
1114
1116
|
}
|
|
1115
1117
|
}, _e = (a, c) => {
|
|
@@ -1120,13 +1122,13 @@ function cs(e = {}) {
|
|
|
1120
1122
|
const p = be(a);
|
|
1121
1123
|
if (r.resolver) {
|
|
1122
1124
|
const _ = await te(L(a) ? a : p);
|
|
1123
|
-
u = G(_), S = a ? !p.some((
|
|
1125
|
+
u = G(_), S = a ? !p.some((V) => v(_, V)) : u;
|
|
1124
1126
|
} else a ? (S = (await Promise.all(p.map(async (_) => {
|
|
1125
|
-
const
|
|
1126
|
-
return await U(
|
|
1127
|
-
}))).every(Boolean), !(!S && !t.isValid) &&
|
|
1128
|
-
return
|
|
1129
|
-
...!X(a) || (
|
|
1127
|
+
const V = v(s, _);
|
|
1128
|
+
return await U(V && V._f ? { [_]: V } : V);
|
|
1129
|
+
}))).every(Boolean), !(!S && !t.isValid) && g()) : S = u = await U(s);
|
|
1130
|
+
return h.state.next({
|
|
1131
|
+
...!X(a) || (y.isValid || m.isValid) && u !== t.isValid ? {} : { name: a },
|
|
1130
1132
|
...r.resolver || !a ? { isValid: u } : {},
|
|
1131
1133
|
errors: t.errors
|
|
1132
1134
|
}), c.shouldFocus && !S && Se(s, _e, a ? p : l.mount), S;
|
|
@@ -1142,52 +1144,52 @@ function cs(e = {}) {
|
|
|
1142
1144
|
isValidating: !!v(t.validatingFields, a),
|
|
1143
1145
|
isTouched: !!v((c || t).touchedFields, a)
|
|
1144
1146
|
}), _r = (a) => {
|
|
1145
|
-
a && be(a).forEach((c) => j(t.errors, c)),
|
|
1147
|
+
a && be(a).forEach((c) => j(t.errors, c)), h.state.next({
|
|
1146
1148
|
errors: a ? t.errors : {}
|
|
1147
1149
|
});
|
|
1148
1150
|
}, mt = (a, c, u) => {
|
|
1149
|
-
const S = (v(s, a, { _f: {} })._f || {}).ref, p = v(t.errors, a) || {}, { ref: _, message:
|
|
1150
|
-
|
|
1151
|
+
const S = (v(s, a, { _f: {} })._f || {}).ref, p = v(t.errors, a) || {}, { ref: _, message: V, type: D, ...B } = p;
|
|
1152
|
+
P(t.errors, a, {
|
|
1151
1153
|
...B,
|
|
1152
1154
|
...c,
|
|
1153
1155
|
ref: S
|
|
1154
|
-
}),
|
|
1156
|
+
}), h.state.next({
|
|
1155
1157
|
name: a,
|
|
1156
1158
|
errors: t.errors,
|
|
1157
1159
|
isValid: !1
|
|
1158
1160
|
}), u && u.shouldFocus && S && S.focus && S.focus();
|
|
1159
|
-
}, pr = (a, c) => oe(a) ?
|
|
1161
|
+
}, pr = (a, c) => oe(a) ? h.state.subscribe({
|
|
1160
1162
|
next: (u) => "values" in u && a(N(void 0, c), u)
|
|
1161
|
-
}) : N(a, c, !0), ht = (a) =>
|
|
1163
|
+
}) : N(a, c, !0), ht = (a) => h.state.subscribe({
|
|
1162
1164
|
next: (c) => {
|
|
1163
|
-
os(a.name, c.name, a.exact) && ss(c, a.formState ||
|
|
1165
|
+
os(a.name, c.name, a.exact) && ss(c, a.formState || y, Fr, a.reRenderRoot) && a.callback({
|
|
1164
1166
|
values: { ...n },
|
|
1165
1167
|
...t,
|
|
1166
1168
|
...c,
|
|
1167
1169
|
defaultValues: o
|
|
1168
1170
|
});
|
|
1169
1171
|
}
|
|
1170
|
-
}).unsubscribe, vr = (a) => (i.mount = !0,
|
|
1171
|
-
...
|
|
1172
|
+
}).unsubscribe, vr = (a) => (i.mount = !0, m = {
|
|
1173
|
+
...m,
|
|
1172
1174
|
...a.formState
|
|
1173
1175
|
}, ht({
|
|
1174
1176
|
...a,
|
|
1175
|
-
formState:
|
|
1177
|
+
formState: m
|
|
1176
1178
|
})), Le = (a, c = {}) => {
|
|
1177
1179
|
for (const u of a ? be(a) : l.mount)
|
|
1178
1180
|
l.mount.delete(u), l.array.delete(u), c.keepValue || (j(s, u), j(n, u)), !c.keepError && j(t.errors, u), !c.keepDirty && j(t.dirtyFields, u), !c.keepTouched && j(t.touchedFields, u), !c.keepIsValidating && j(t.validatingFields, u), !r.shouldUnregister && !c.keepDefaultValue && j(o, u);
|
|
1179
|
-
|
|
1181
|
+
h.state.next({
|
|
1180
1182
|
values: W(n)
|
|
1181
|
-
}),
|
|
1183
|
+
}), h.state.next({
|
|
1182
1184
|
...t,
|
|
1183
1185
|
...c.keepDirty ? { isDirty: J() } : {}
|
|
1184
|
-
}), !c.keepIsValid &&
|
|
1186
|
+
}), !c.keepIsValid && g();
|
|
1185
1187
|
}, gt = ({ disabled: a, name: c }) => {
|
|
1186
1188
|
(Y(a) && i.mount || a || l.disabled.has(c)) && (a ? l.disabled.add(c) : l.disabled.delete(c));
|
|
1187
1189
|
}, He = (a, c = {}) => {
|
|
1188
1190
|
let u = v(s, a);
|
|
1189
1191
|
const S = Y(c.disabled) || Y(r.disabled);
|
|
1190
|
-
return
|
|
1192
|
+
return P(s, a, {
|
|
1191
1193
|
...u || {},
|
|
1192
1194
|
_f: {
|
|
1193
1195
|
...u && u._f ? u._f : { ref: { name: a } },
|
|
@@ -1198,7 +1200,7 @@ function cs(e = {}) {
|
|
|
1198
1200
|
}), l.mount.add(a), u ? gt({
|
|
1199
1201
|
disabled: Y(c.disabled) ? c.disabled : r.disabled,
|
|
1200
1202
|
name: a
|
|
1201
|
-
}) :
|
|
1203
|
+
}) : $(a, !0, c.value), {
|
|
1202
1204
|
...S ? { disabled: c.disabled || r.disabled } : {},
|
|
1203
1205
|
...r.progressive ? {
|
|
1204
1206
|
required: !!c.required,
|
|
@@ -1214,28 +1216,28 @@ function cs(e = {}) {
|
|
|
1214
1216
|
ref: (p) => {
|
|
1215
1217
|
if (p) {
|
|
1216
1218
|
He(a, c), u = v(s, a);
|
|
1217
|
-
const _ = L(p.value) && p.querySelectorAll && p.querySelectorAll("input,select,textarea")[0] || p,
|
|
1218
|
-
if (
|
|
1219
|
+
const _ = L(p.value) && p.querySelectorAll && p.querySelectorAll("input,select,textarea")[0] || p, V = Kr(_), D = u._f.refs || [];
|
|
1220
|
+
if (V ? D.find((B) => B === _) : _ === u._f.ref)
|
|
1219
1221
|
return;
|
|
1220
|
-
|
|
1222
|
+
P(s, a, {
|
|
1221
1223
|
_f: {
|
|
1222
1224
|
...u._f,
|
|
1223
|
-
...
|
|
1225
|
+
...V ? {
|
|
1224
1226
|
refs: [
|
|
1225
|
-
...
|
|
1227
|
+
...D.filter(Ie),
|
|
1226
1228
|
_,
|
|
1227
1229
|
...Array.isArray(v(o, a)) ? [{}] : []
|
|
1228
1230
|
],
|
|
1229
1231
|
ref: { type: _.type, name: a }
|
|
1230
1232
|
} : { ref: _ }
|
|
1231
1233
|
}
|
|
1232
|
-
}),
|
|
1234
|
+
}), $(a, !1, void 0, _);
|
|
1233
1235
|
} else
|
|
1234
1236
|
u = v(s, a, {}), u._f && (u._f.mount = !1), (r.shouldUnregister || c.shouldUnregister) && !(Xt(l.array, a) && i.action) && l.unMount.add(a);
|
|
1235
1237
|
}
|
|
1236
1238
|
};
|
|
1237
1239
|
}, Oe = () => r.shouldFocusError && Se(s, _e, l.mount), br = (a) => {
|
|
1238
|
-
Y(a) && (
|
|
1240
|
+
Y(a) && (h.state.next({ disabled: a }), Se(s, (c, u) => {
|
|
1239
1241
|
const S = v(s, u);
|
|
1240
1242
|
S && (c.disabled = S._f.disabled || a, Array.isArray(S._f.refs) && S._f.refs.forEach((p) => {
|
|
1241
1243
|
p.disabled = S._f.disabled || a;
|
|
@@ -1245,18 +1247,18 @@ function cs(e = {}) {
|
|
|
1245
1247
|
let S;
|
|
1246
1248
|
u && (u.preventDefault && u.preventDefault(), u.persist && u.persist());
|
|
1247
1249
|
let p = W(n);
|
|
1248
|
-
if (
|
|
1250
|
+
if (h.state.next({
|
|
1249
1251
|
isSubmitting: !0
|
|
1250
1252
|
}), r.resolver) {
|
|
1251
|
-
const { errors: _, values:
|
|
1252
|
-
t.errors = _, p = W(
|
|
1253
|
+
const { errors: _, values: V } = await M();
|
|
1254
|
+
t.errors = _, p = W(V);
|
|
1253
1255
|
} else
|
|
1254
1256
|
await U(s);
|
|
1255
1257
|
if (l.disabled.size)
|
|
1256
1258
|
for (const _ of l.disabled)
|
|
1257
1259
|
j(p, _);
|
|
1258
1260
|
if (j(t.errors, "root"), G(t.errors)) {
|
|
1259
|
-
|
|
1261
|
+
h.state.next({
|
|
1260
1262
|
errors: {}
|
|
1261
1263
|
});
|
|
1262
1264
|
try {
|
|
@@ -1266,7 +1268,7 @@ function cs(e = {}) {
|
|
|
1266
1268
|
}
|
|
1267
1269
|
} else
|
|
1268
1270
|
c && await c({ ...t.errors }, u), Oe(), setTimeout(Oe);
|
|
1269
|
-
if (
|
|
1271
|
+
if (h.state.next({
|
|
1270
1272
|
isSubmitted: !0,
|
|
1271
1273
|
isSubmitting: !1,
|
|
1272
1274
|
isSubmitSuccessful: G(t.errors) && !S,
|
|
@@ -1275,23 +1277,23 @@ function cs(e = {}) {
|
|
|
1275
1277
|
}), S)
|
|
1276
1278
|
throw S;
|
|
1277
1279
|
}, Sr = (a, c = {}) => {
|
|
1278
|
-
v(s, a) && (L(c.defaultValue) ? Q(a, W(v(o, a))) : (Q(a, c.defaultValue),
|
|
1280
|
+
v(s, a) && (L(c.defaultValue) ? Q(a, W(v(o, a))) : (Q(a, c.defaultValue), P(o, a, W(c.defaultValue))), c.keepTouched || j(t.touchedFields, a), c.keepDirty || (j(t.dirtyFields, a), t.isDirty = c.defaultValue ? J(a, W(v(o, a))) : J()), c.keepError || (j(t.errors, a), y.isValid && g()), h.state.next({ ...t }));
|
|
1279
1281
|
}, pt = (a, c = {}) => {
|
|
1280
1282
|
const u = a ? W(a) : o, S = W(u), p = G(a), _ = p ? o : S;
|
|
1281
1283
|
if (c.keepDefaultValues || (o = u), !c.keepValues) {
|
|
1282
1284
|
if (c.keepDirtyValues) {
|
|
1283
|
-
const
|
|
1285
|
+
const V = /* @__PURE__ */ new Set([
|
|
1284
1286
|
...l.mount,
|
|
1285
1287
|
...Object.keys(ge(o, n))
|
|
1286
1288
|
]);
|
|
1287
|
-
for (const
|
|
1288
|
-
v(t.dirtyFields,
|
|
1289
|
+
for (const D of Array.from(V))
|
|
1290
|
+
v(t.dirtyFields, D) ? P(_, D, v(n, D)) : Q(D, v(_, D));
|
|
1289
1291
|
} else {
|
|
1290
1292
|
if (nt && L(a))
|
|
1291
|
-
for (const
|
|
1292
|
-
const
|
|
1293
|
-
if (
|
|
1294
|
-
const B = Array.isArray(
|
|
1293
|
+
for (const V of l.mount) {
|
|
1294
|
+
const D = v(s, V);
|
|
1295
|
+
if (D && D._f) {
|
|
1296
|
+
const B = Array.isArray(D._f.refs) ? D._f.refs[0] : D._f.ref;
|
|
1295
1297
|
if (Re(B)) {
|
|
1296
1298
|
const ee = B.closest("form");
|
|
1297
1299
|
if (ee) {
|
|
@@ -1302,14 +1304,14 @@ function cs(e = {}) {
|
|
|
1302
1304
|
}
|
|
1303
1305
|
}
|
|
1304
1306
|
if (c.keepFieldsRef)
|
|
1305
|
-
for (const
|
|
1306
|
-
Q(
|
|
1307
|
+
for (const V of l.mount)
|
|
1308
|
+
Q(V, v(_, V));
|
|
1307
1309
|
else
|
|
1308
1310
|
s = {};
|
|
1309
1311
|
}
|
|
1310
|
-
n = r.shouldUnregister ? c.keepDefaultValues ? W(o) : {} : W(_),
|
|
1312
|
+
n = r.shouldUnregister ? c.keepDefaultValues ? W(o) : {} : W(_), h.array.next({
|
|
1311
1313
|
values: { ..._ }
|
|
1312
|
-
}),
|
|
1314
|
+
}), h.state.next({
|
|
1313
1315
|
values: { ..._ }
|
|
1314
1316
|
});
|
|
1315
1317
|
}
|
|
@@ -1321,7 +1323,7 @@ function cs(e = {}) {
|
|
|
1321
1323
|
watch: /* @__PURE__ */ new Set(),
|
|
1322
1324
|
watchAll: !1,
|
|
1323
1325
|
focus: ""
|
|
1324
|
-
}, i.mount = !
|
|
1326
|
+
}, i.mount = !y.isValid || !!c.keepIsValid || !!c.keepDirtyValues || !r.shouldUnregister && !G(_), i.watch = !!r.shouldUnregister, h.state.next({
|
|
1325
1327
|
submitCount: c.keepSubmitCount ? t.submitCount : 0,
|
|
1326
1328
|
isDirty: p ? !1 : c.keepDirty ? t.isDirty : !!(c.keepDefaultValues && !se(a, o)),
|
|
1327
1329
|
isSubmitted: c.keepIsSubmitted ? t.isSubmitted : !1,
|
|
@@ -1355,21 +1357,21 @@ function cs(e = {}) {
|
|
|
1355
1357
|
_focusError: Oe,
|
|
1356
1358
|
_getWatch: N,
|
|
1357
1359
|
_getDirty: J,
|
|
1358
|
-
_setValid:
|
|
1360
|
+
_setValid: g,
|
|
1359
1361
|
_setFieldArray: C,
|
|
1360
1362
|
_setDisabledField: gt,
|
|
1361
1363
|
_setErrors: E,
|
|
1362
1364
|
_getFieldArray: R,
|
|
1363
1365
|
_reset: pt,
|
|
1364
1366
|
_resetDefaultValues: () => oe(r.defaultValues) && r.defaultValues().then((a) => {
|
|
1365
|
-
vt(a, r.resetOptions),
|
|
1367
|
+
vt(a, r.resetOptions), h.state.next({
|
|
1366
1368
|
isLoading: !1
|
|
1367
1369
|
});
|
|
1368
1370
|
}),
|
|
1369
1371
|
_removeUnmounted: ae,
|
|
1370
1372
|
_disableForm: br,
|
|
1371
|
-
_subjects:
|
|
1372
|
-
_proxyFormState:
|
|
1373
|
+
_subjects: h,
|
|
1374
|
+
_proxyFormState: y,
|
|
1373
1375
|
get _fields() {
|
|
1374
1376
|
return s;
|
|
1375
1377
|
},
|
|
@@ -1425,7 +1427,7 @@ function cs(e = {}) {
|
|
|
1425
1427
|
};
|
|
1426
1428
|
}
|
|
1427
1429
|
function us(e = {}) {
|
|
1428
|
-
const r =
|
|
1430
|
+
const r = z.useRef(void 0), t = z.useRef(void 0), [s, o] = z.useState({
|
|
1429
1431
|
isDirty: !1,
|
|
1430
1432
|
isValidating: !1,
|
|
1431
1433
|
isLoading: oe(e.defaultValues),
|
|
@@ -1466,27 +1468,27 @@ function us(e = {}) {
|
|
|
1466
1468
|
...l,
|
|
1467
1469
|
isReady: !0
|
|
1468
1470
|
})), n._formState.isReady = !0, i;
|
|
1469
|
-
}, [n]),
|
|
1471
|
+
}, [n]), z.useEffect(() => n._disableForm(e.disabled), [n, e.disabled]), z.useEffect(() => {
|
|
1470
1472
|
e.mode && (n._options.mode = e.mode), e.reValidateMode && (n._options.reValidateMode = e.reValidateMode);
|
|
1471
|
-
}, [n, e.mode, e.reValidateMode]),
|
|
1473
|
+
}, [n, e.mode, e.reValidateMode]), z.useEffect(() => {
|
|
1472
1474
|
e.errors && (n._setErrors(e.errors), n._focusError());
|
|
1473
|
-
}, [n, e.errors]),
|
|
1475
|
+
}, [n, e.errors]), z.useEffect(() => {
|
|
1474
1476
|
e.shouldUnregister && n._subjects.state.next({
|
|
1475
1477
|
values: n._getWatch()
|
|
1476
1478
|
});
|
|
1477
|
-
}, [n, e.shouldUnregister]),
|
|
1479
|
+
}, [n, e.shouldUnregister]), z.useEffect(() => {
|
|
1478
1480
|
if (n._proxyFormState.isDirty) {
|
|
1479
1481
|
const i = n._getDirty();
|
|
1480
1482
|
i !== s.isDirty && n._subjects.state.next({
|
|
1481
1483
|
isDirty: i
|
|
1482
1484
|
});
|
|
1483
1485
|
}
|
|
1484
|
-
}, [n, s.isDirty]),
|
|
1486
|
+
}, [n, s.isDirty]), z.useEffect(() => {
|
|
1485
1487
|
e.values && !se(e.values, t.current) ? (n._reset(e.values, {
|
|
1486
1488
|
keepFieldsRef: !0,
|
|
1487
1489
|
...n._options.resetOptions
|
|
1488
1490
|
}), t.current = e.values, o((i) => ({ ...i }))) : n._resetDefaultValues();
|
|
1489
|
-
}, [n, e.values]),
|
|
1491
|
+
}, [n, e.values]), z.useEffect(() => {
|
|
1490
1492
|
n._state.mount || (n._setValid(), n._state.mount = !0), n._state.watch && (n._state.watch = !1, n._subjects.state.next({ ...n._formState })), n._removeUnmounted();
|
|
1491
1493
|
}), r.current.formState = tr(s, n), r.current;
|
|
1492
1494
|
}
|
|
@@ -1507,8 +1509,8 @@ const Ht = (e, r, t) => {
|
|
|
1507
1509
|
const o = v(r.fields, s), n = Object.assign(e[s] || {}, { ref: o && o.ref });
|
|
1508
1510
|
if (ds(r.names || Object.keys(e), s)) {
|
|
1509
1511
|
const i = Object.assign({}, v(t, s));
|
|
1510
|
-
|
|
1511
|
-
} else
|
|
1512
|
+
P(i, "root", n), P(t, s, i);
|
|
1513
|
+
} else P(t, s, n);
|
|
1512
1514
|
}
|
|
1513
1515
|
return t;
|
|
1514
1516
|
}, ds = (e, r) => {
|
|
@@ -1520,13 +1522,13 @@ function Tt(e) {
|
|
|
1520
1522
|
}
|
|
1521
1523
|
function lr(e, r, t) {
|
|
1522
1524
|
function s(l, d) {
|
|
1523
|
-
var
|
|
1525
|
+
var f;
|
|
1524
1526
|
Object.defineProperty(l, "_zod", {
|
|
1525
1527
|
value: l._zod ?? {},
|
|
1526
1528
|
enumerable: !1
|
|
1527
|
-
}), (
|
|
1528
|
-
for (const
|
|
1529
|
-
|
|
1529
|
+
}), (f = l._zod).traits ?? (f.traits = /* @__PURE__ */ new Set()), l._zod.traits.add(e), r(l, d);
|
|
1530
|
+
for (const y in i.prototype)
|
|
1531
|
+
y in l || Object.defineProperty(l, y, { value: i.prototype[y].bind(l) });
|
|
1530
1532
|
l._zod.constr = i, l._zod.def = d;
|
|
1531
1533
|
}
|
|
1532
1534
|
const o = (t == null ? void 0 : t.Parent) ?? Object;
|
|
@@ -1535,16 +1537,16 @@ function lr(e, r, t) {
|
|
|
1535
1537
|
Object.defineProperty(n, "name", { value: e });
|
|
1536
1538
|
function i(l) {
|
|
1537
1539
|
var d;
|
|
1538
|
-
const
|
|
1539
|
-
s(
|
|
1540
|
-
for (const
|
|
1541
|
-
|
|
1542
|
-
return
|
|
1540
|
+
const f = t != null && t.Parent ? new n() : this;
|
|
1541
|
+
s(f, l), (d = f._zod).deferred ?? (d.deferred = []);
|
|
1542
|
+
for (const y of f._zod.deferred)
|
|
1543
|
+
y();
|
|
1544
|
+
return f;
|
|
1543
1545
|
}
|
|
1544
1546
|
return Object.defineProperty(i, "init", { value: s }), Object.defineProperty(i, Symbol.hasInstance, {
|
|
1545
1547
|
value: (l) => {
|
|
1546
|
-
var d,
|
|
1547
|
-
return t != null && t.Parent && l instanceof t.Parent ? !0 : (
|
|
1548
|
+
var d, f;
|
|
1549
|
+
return t != null && t.Parent && l instanceof t.Parent ? !0 : (f = (d = l == null ? void 0 : l._zod) == null ? void 0 : d.traits) == null ? void 0 : f.has(e);
|
|
1548
1550
|
}
|
|
1549
1551
|
}), Object.defineProperty(i, "name", { value: e }), i;
|
|
1550
1552
|
}
|
|
@@ -1566,11 +1568,11 @@ function $e(e) {
|
|
|
1566
1568
|
return typeof e == "string" ? e : e == null ? void 0 : e.message;
|
|
1567
1569
|
}
|
|
1568
1570
|
function dr(e, r, t) {
|
|
1569
|
-
var o, n, i, l, d,
|
|
1571
|
+
var o, n, i, l, d, f;
|
|
1570
1572
|
const s = { ...e, path: e.path ?? [] };
|
|
1571
1573
|
if (!e.message) {
|
|
1572
|
-
const
|
|
1573
|
-
s.message =
|
|
1574
|
+
const y = $e((i = (n = (o = e.inst) == null ? void 0 : o._zod.def) == null ? void 0 : n.error) == null ? void 0 : i.call(n, e)) ?? $e((l = r == null ? void 0 : r.error) == null ? void 0 : l.call(r, e)) ?? $e((d = t.customError) == null ? void 0 : d.call(t, e)) ?? $e((f = t.localeError) == null ? void 0 : f.call(t, e)) ?? "Invalid input";
|
|
1575
|
+
s.message = y;
|
|
1574
1576
|
}
|
|
1575
1577
|
return delete s.inst, delete s.continue, r != null && r.reportInput || delete s.input, s;
|
|
1576
1578
|
}
|
|
@@ -1618,13 +1620,13 @@ function bs(e, r) {
|
|
|
1618
1620
|
var l = s.unionErrors[0].errors[0];
|
|
1619
1621
|
t[i] = { message: l.message, type: l.code };
|
|
1620
1622
|
} else t[i] = { message: n, type: o };
|
|
1621
|
-
if ("unionErrors" in s && s.unionErrors.forEach(function(
|
|
1622
|
-
return
|
|
1623
|
-
return e.push(
|
|
1623
|
+
if ("unionErrors" in s && s.unionErrors.forEach(function(y) {
|
|
1624
|
+
return y.errors.forEach(function(m) {
|
|
1625
|
+
return e.push(m);
|
|
1624
1626
|
});
|
|
1625
1627
|
}), r) {
|
|
1626
|
-
var d = t[i].types,
|
|
1627
|
-
t[i] = ut(i, r, t, o,
|
|
1628
|
+
var d = t[i].types, f = d && d[s.code];
|
|
1629
|
+
t[i] = ut(i, r, t, o, f ? [].concat(f, s.message) : s.message);
|
|
1628
1630
|
}
|
|
1629
1631
|
e.shift();
|
|
1630
1632
|
}
|
|
@@ -1637,13 +1639,13 @@ function Ss(e, r) {
|
|
|
1637
1639
|
var l = s.errors[0][0];
|
|
1638
1640
|
t[i] = { message: l.message, type: l.code };
|
|
1639
1641
|
} else t[i] = { message: n, type: o };
|
|
1640
|
-
if (s.code === "invalid_union" && s.errors.forEach(function(
|
|
1641
|
-
return
|
|
1642
|
-
return e.push(
|
|
1642
|
+
if (s.code === "invalid_union" && s.errors.forEach(function(y) {
|
|
1643
|
+
return y.forEach(function(m) {
|
|
1644
|
+
return e.push(m);
|
|
1643
1645
|
});
|
|
1644
1646
|
}), r) {
|
|
1645
|
-
var d = t[i].types,
|
|
1646
|
-
t[i] = ut(i, r, t, o,
|
|
1647
|
+
var d = t[i].types, f = d && d[s.code];
|
|
1648
|
+
t[i] = ut(i, r, t, o, f ? [].concat(f, s.message) : s.message);
|
|
1647
1649
|
}
|
|
1648
1650
|
e.shift();
|
|
1649
1651
|
}
|
|
@@ -1688,9 +1690,9 @@ function xs(e, r, t) {
|
|
|
1688
1690
|
};
|
|
1689
1691
|
throw new Error("Invalid input: not a Zod schema");
|
|
1690
1692
|
}
|
|
1691
|
-
const mr =
|
|
1693
|
+
const mr = z.createContext(null);
|
|
1692
1694
|
function Fs() {
|
|
1693
|
-
const e =
|
|
1695
|
+
const e = z.useContext(mr);
|
|
1694
1696
|
if (!e)
|
|
1695
1697
|
throw new Error("useFormContext must be used within a Form component");
|
|
1696
1698
|
return e;
|
|
@@ -1706,16 +1708,16 @@ function ws({
|
|
|
1706
1708
|
style: l,
|
|
1707
1709
|
formProps: d
|
|
1708
1710
|
}) {
|
|
1709
|
-
const
|
|
1711
|
+
const f = us({
|
|
1710
1712
|
resolver: t ? xs(t) : void 0,
|
|
1711
1713
|
defaultValues: s,
|
|
1712
1714
|
mode: o,
|
|
1713
1715
|
reValidateMode: n
|
|
1714
|
-
}),
|
|
1715
|
-
return /* @__PURE__ */
|
|
1716
|
+
}), y = f.handleSubmit(e);
|
|
1717
|
+
return /* @__PURE__ */ w(mr.Provider, { value: f, children: /* @__PURE__ */ w("form", { ...d, className: i, style: l, onSubmit: y, children: typeof r == "function" ? r(f) : r }) });
|
|
1716
1718
|
}
|
|
1717
|
-
const qo = ws,
|
|
1718
|
-
formError:
|
|
1719
|
+
const qo = ws, Cs = "FormError-module__formError___kaUBn", Vs = {
|
|
1720
|
+
formError: Cs
|
|
1719
1721
|
}, ks = ({
|
|
1720
1722
|
// Color prop
|
|
1721
1723
|
color: e,
|
|
@@ -1732,8 +1734,8 @@ const qo = ws, Vs = "FormError-module__formError___kaUBn", Cs = {
|
|
|
1732
1734
|
color: e || n.colors.error,
|
|
1733
1735
|
...s
|
|
1734
1736
|
// Top level style prop overrides
|
|
1735
|
-
}, l = [
|
|
1736
|
-
return /* @__PURE__ */
|
|
1737
|
+
}, l = [Vs.formError, t].filter(Boolean).join(" ");
|
|
1738
|
+
return /* @__PURE__ */ w("div", { ...o, className: l, style: i, role: "alert", "aria-live": "polite", children: r });
|
|
1737
1739
|
}, zs = "FormGroup-module__formGroup___aVI-B", $s = "FormGroup-module__inputWrapper___429QE", Es = "FormGroup-module__indented___t61iz", As = "FormGroup-module__disabled___W-tJ0", Ns = "FormGroup-module__required___mO3xA", me = {
|
|
1738
1740
|
formGroup: zs,
|
|
1739
1741
|
inputWrapper: $s,
|
|
@@ -1755,28 +1757,28 @@ const qo = ws, Vs = "FormError-module__formError___kaUBn", Cs = {
|
|
|
1755
1757
|
// Content
|
|
1756
1758
|
children: d,
|
|
1757
1759
|
// Style overrides
|
|
1758
|
-
className:
|
|
1759
|
-
style:
|
|
1760
|
+
className: f,
|
|
1761
|
+
style: y,
|
|
1760
1762
|
// Element-specific props
|
|
1761
|
-
divProps:
|
|
1763
|
+
divProps: m
|
|
1762
1764
|
}) => {
|
|
1763
|
-
const
|
|
1765
|
+
const h = H(), x = [
|
|
1764
1766
|
me.formGroup,
|
|
1765
1767
|
r ? me.error : "",
|
|
1766
1768
|
e ? me.disabled : "",
|
|
1767
|
-
|
|
1768
|
-
].filter(Boolean).join(" "),
|
|
1769
|
-
"--form-group-margin-bottom": `calc(${
|
|
1770
|
-
...
|
|
1771
|
-
},
|
|
1772
|
-
if (
|
|
1769
|
+
f
|
|
1770
|
+
].filter(Boolean).join(" "), F = {
|
|
1771
|
+
"--form-group-margin-bottom": `calc(${h.fonts.rhythm} * 0.35)`,
|
|
1772
|
+
...y
|
|
1773
|
+
}, g = z.Children.map(d, (k) => {
|
|
1774
|
+
if (z.isValidElement(k)) {
|
|
1773
1775
|
const C = {};
|
|
1774
|
-
if (e &&
|
|
1775
|
-
return
|
|
1776
|
+
if (e && k.props.disabled === void 0 && (C.disabled = !0), r && k.props.error === void 0 && (C.error = !0), o && k.props.id === void 0 && (C.id = o), Object.keys(C).length > 0)
|
|
1777
|
+
return z.cloneElement(k, C);
|
|
1776
1778
|
}
|
|
1777
|
-
return
|
|
1779
|
+
return k;
|
|
1778
1780
|
});
|
|
1779
|
-
return /* @__PURE__ */ Z("div", { ...
|
|
1781
|
+
return /* @__PURE__ */ Z("div", { ...m, className: x, style: F, children: [
|
|
1780
1782
|
n && /* @__PURE__ */ Z(ot, { htmlFor: o, disabled: e, error: r, ...l, children: [
|
|
1781
1783
|
n,
|
|
1782
1784
|
t && /* @__PURE__ */ Z("span", { className: me.required, "aria-label": "required", children: [
|
|
@@ -1784,8 +1786,8 @@ const qo = ws, Vs = "FormError-module__formError___kaUBn", Cs = {
|
|
|
1784
1786
|
"*"
|
|
1785
1787
|
] })
|
|
1786
1788
|
] }),
|
|
1787
|
-
/* @__PURE__ */
|
|
1788
|
-
r && i && /* @__PURE__ */
|
|
1789
|
+
/* @__PURE__ */ w("div", { className: `${me.inputWrapper} ${s ? me.indented : ""}`, children: g }),
|
|
1790
|
+
r && i && /* @__PURE__ */ w(ks, { children: i })
|
|
1789
1791
|
] });
|
|
1790
1792
|
};
|
|
1791
1793
|
function de({
|
|
@@ -1798,43 +1800,43 @@ function de({
|
|
|
1798
1800
|
className: i,
|
|
1799
1801
|
style: l,
|
|
1800
1802
|
indent: d,
|
|
1801
|
-
labelProps:
|
|
1803
|
+
labelProps: f
|
|
1802
1804
|
}) {
|
|
1803
|
-
const { control:
|
|
1804
|
-
field:
|
|
1805
|
-
fieldState: { error:
|
|
1805
|
+
const { control: y } = Fs(), {
|
|
1806
|
+
field: m,
|
|
1807
|
+
fieldState: { error: h }
|
|
1806
1808
|
} = Qr({
|
|
1807
1809
|
name: e,
|
|
1808
|
-
control:
|
|
1810
|
+
control: y,
|
|
1809
1811
|
rules: o
|
|
1810
1812
|
});
|
|
1811
|
-
return /* @__PURE__ */
|
|
1813
|
+
return /* @__PURE__ */ w(
|
|
1812
1814
|
Rs,
|
|
1813
1815
|
{
|
|
1814
1816
|
label: r,
|
|
1815
1817
|
name: e,
|
|
1816
|
-
error: !!
|
|
1817
|
-
errorMessage:
|
|
1818
|
+
error: !!h,
|
|
1819
|
+
errorMessage: h == null ? void 0 : h.message,
|
|
1818
1820
|
disabled: n,
|
|
1819
1821
|
required: t,
|
|
1820
1822
|
className: i,
|
|
1821
1823
|
style: l,
|
|
1822
1824
|
indent: d,
|
|
1823
|
-
labelProps:
|
|
1825
|
+
labelProps: f,
|
|
1824
1826
|
children: s({
|
|
1825
|
-
value:
|
|
1826
|
-
onChange:
|
|
1827
|
-
onBlur:
|
|
1828
|
-
name:
|
|
1829
|
-
error: !!
|
|
1827
|
+
value: m.value,
|
|
1828
|
+
onChange: m.onChange,
|
|
1829
|
+
onBlur: m.onBlur,
|
|
1830
|
+
name: m.name,
|
|
1831
|
+
error: !!h,
|
|
1830
1832
|
indent: d
|
|
1831
1833
|
})
|
|
1832
1834
|
}
|
|
1833
1835
|
);
|
|
1834
1836
|
}
|
|
1835
|
-
const
|
|
1836
|
-
input:
|
|
1837
|
-
sizeSmall:
|
|
1837
|
+
const Ds = "Input-module__input___WjT81", Ps = "Input-module__sizeSmall___NFvsi", Bs = "Input-module__sizeLarge___4Boj3", Ue = {
|
|
1838
|
+
input: Ds,
|
|
1839
|
+
sizeSmall: Ps,
|
|
1838
1840
|
sizeLarge: Bs
|
|
1839
1841
|
}, Ls = ({
|
|
1840
1842
|
color: e = "#000",
|
|
@@ -1861,51 +1863,51 @@ const Ps = "Input-module__input___WjT81", Ds = "Input-module__sizeSmall___NFvsi"
|
|
|
1861
1863
|
placeholder: i,
|
|
1862
1864
|
placeholderOpacity: l = 0.3,
|
|
1863
1865
|
type: d = "text",
|
|
1864
|
-
value:
|
|
1866
|
+
value: f = "",
|
|
1865
1867
|
// Event handlers
|
|
1866
|
-
onChange:
|
|
1867
|
-
onBlur:
|
|
1868
|
+
onChange: y,
|
|
1869
|
+
onBlur: m,
|
|
1868
1870
|
// Standard React props
|
|
1869
|
-
className:
|
|
1870
|
-
style:
|
|
1871
|
+
className: h,
|
|
1872
|
+
style: x,
|
|
1871
1873
|
// Element-specific props
|
|
1872
|
-
inputProps:
|
|
1874
|
+
inputProps: F
|
|
1873
1875
|
}) => {
|
|
1874
|
-
const
|
|
1876
|
+
const g = H(), k = g.colors.error, C = r ? k : t || g.colors.primary, b = Ls({
|
|
1875
1877
|
color: C,
|
|
1876
1878
|
disabled: e,
|
|
1877
|
-
fontSize:
|
|
1879
|
+
fontSize: g.fonts.size,
|
|
1878
1880
|
placeholderOpacity: l
|
|
1879
1881
|
}), E = {
|
|
1880
1882
|
"--placeholder-opacity": b.placeholderOpacity,
|
|
1881
|
-
"--input-padding-small": `calc(${
|
|
1882
|
-
"--input-padding-large": `calc(${
|
|
1883
|
+
"--input-padding-small": `calc(${g.fonts.rhythm} * ${g.sizes.small.paddingVertical}) calc(${g.fonts.rhythm} * ${g.inputs.paddingHorizontal})`,
|
|
1884
|
+
"--input-padding-large": `calc(${g.fonts.rhythm} * ${g.sizes.large.paddingVertical}) calc(${g.fonts.rhythm} * ${g.inputs.paddingHorizontal})`,
|
|
1883
1885
|
borderColor: b.borderColor,
|
|
1884
|
-
borderWidth:
|
|
1885
|
-
borderRadius:
|
|
1886
|
+
borderWidth: g.border.width,
|
|
1887
|
+
borderRadius: g.border.radius,
|
|
1886
1888
|
color: b.color,
|
|
1887
1889
|
fontSize: b.fontSize,
|
|
1888
1890
|
opacity: b.opacity,
|
|
1889
|
-
...
|
|
1891
|
+
...x
|
|
1890
1892
|
// Top level style prop overrides
|
|
1891
|
-
},
|
|
1893
|
+
}, $ = [
|
|
1892
1894
|
Ue.input,
|
|
1893
1895
|
s === "small" ? Ue.sizeSmall : Ue.sizeLarge,
|
|
1894
|
-
|
|
1896
|
+
h
|
|
1895
1897
|
].filter(Boolean).join(" ");
|
|
1896
|
-
return /* @__PURE__ */
|
|
1898
|
+
return /* @__PURE__ */ w(
|
|
1897
1899
|
"input",
|
|
1898
1900
|
{
|
|
1899
|
-
...
|
|
1900
|
-
className:
|
|
1901
|
+
...F,
|
|
1902
|
+
className: $,
|
|
1901
1903
|
disabled: e,
|
|
1902
1904
|
id: o,
|
|
1903
1905
|
name: n,
|
|
1904
|
-
onChange:
|
|
1905
|
-
onBlur:
|
|
1906
|
+
onChange: y,
|
|
1907
|
+
onBlur: m,
|
|
1906
1908
|
placeholder: i,
|
|
1907
1909
|
type: d,
|
|
1908
|
-
value:
|
|
1910
|
+
value: f,
|
|
1909
1911
|
style: E
|
|
1910
1912
|
}
|
|
1911
1913
|
);
|
|
@@ -1920,7 +1922,7 @@ function Go({
|
|
|
1920
1922
|
style: i,
|
|
1921
1923
|
...l
|
|
1922
1924
|
}) {
|
|
1923
|
-
return /* @__PURE__ */
|
|
1925
|
+
return /* @__PURE__ */ w(
|
|
1924
1926
|
de,
|
|
1925
1927
|
{
|
|
1926
1928
|
name: e,
|
|
@@ -1930,15 +1932,15 @@ function Go({
|
|
|
1930
1932
|
disabled: o,
|
|
1931
1933
|
className: n,
|
|
1932
1934
|
style: i,
|
|
1933
|
-
children: ({ value: d, onChange:
|
|
1935
|
+
children: ({ value: d, onChange: f, onBlur: y, name: m, error: h }) => /* @__PURE__ */ w(
|
|
1934
1936
|
Hs,
|
|
1935
1937
|
{
|
|
1936
1938
|
...l,
|
|
1937
|
-
name:
|
|
1939
|
+
name: m,
|
|
1938
1940
|
value: d || "",
|
|
1939
|
-
onChange: (
|
|
1940
|
-
inputProps: { onBlur:
|
|
1941
|
-
error:
|
|
1941
|
+
onChange: (x) => f(x.target.value),
|
|
1942
|
+
inputProps: { onBlur: y },
|
|
1943
|
+
error: h
|
|
1942
1944
|
}
|
|
1943
1945
|
)
|
|
1944
1946
|
}
|
|
@@ -1971,50 +1973,50 @@ const Os = "Textarea-module__textarea___Z-y6g", Ts = "Textarea-module__sizeSmall
|
|
|
1971
1973
|
placeholder: i,
|
|
1972
1974
|
placeholderOpacity: l = 0.3,
|
|
1973
1975
|
rows: d = 3,
|
|
1974
|
-
value:
|
|
1976
|
+
value: f = "",
|
|
1975
1977
|
// Event handlers
|
|
1976
|
-
onChange:
|
|
1977
|
-
onBlur:
|
|
1978
|
+
onChange: y,
|
|
1979
|
+
onBlur: m,
|
|
1978
1980
|
// Standard React props
|
|
1979
|
-
className:
|
|
1980
|
-
style:
|
|
1981
|
+
className: h,
|
|
1982
|
+
style: x,
|
|
1981
1983
|
// Element-specific props
|
|
1982
|
-
textareaProps:
|
|
1984
|
+
textareaProps: F
|
|
1983
1985
|
}) => {
|
|
1984
|
-
const
|
|
1986
|
+
const g = H(), k = g.colors.error, C = r ? k : t || g.colors.primary, b = js({
|
|
1985
1987
|
color: C,
|
|
1986
1988
|
disabled: e,
|
|
1987
1989
|
placeholderOpacity: l
|
|
1988
1990
|
}), E = {
|
|
1989
1991
|
"--placeholder-opacity": b.placeholderOpacity,
|
|
1990
|
-
"--textarea-padding-small": `calc(${
|
|
1991
|
-
"--textarea-padding-large": `calc(${
|
|
1992
|
+
"--textarea-padding-small": `calc(${g.fonts.rhythm} * ${g.sizes.small.paddingVertical}) calc(${g.fonts.rhythm} * ${g.inputs.paddingHorizontal})`,
|
|
1993
|
+
"--textarea-padding-large": `calc(${g.fonts.rhythm} * ${g.sizes.large.paddingVertical}) calc(${g.fonts.rhythm} * ${g.inputs.paddingHorizontal})`,
|
|
1992
1994
|
borderColor: b.borderColor,
|
|
1993
|
-
borderWidth:
|
|
1994
|
-
borderRadius:
|
|
1995
|
+
borderWidth: g.border.width,
|
|
1996
|
+
borderRadius: g.border.radius,
|
|
1995
1997
|
color: b.color,
|
|
1996
|
-
fontSize:
|
|
1998
|
+
fontSize: g.fonts.size,
|
|
1997
1999
|
opacity: b.opacity,
|
|
1998
|
-
...
|
|
2000
|
+
...x
|
|
1999
2001
|
// Top level style overrides
|
|
2000
|
-
},
|
|
2002
|
+
}, $ = [
|
|
2001
2003
|
We.textarea,
|
|
2002
2004
|
s === "small" ? We.sizeSmall : We.sizeLarge,
|
|
2003
|
-
|
|
2005
|
+
h
|
|
2004
2006
|
].filter(Boolean).join(" ");
|
|
2005
|
-
return /* @__PURE__ */
|
|
2007
|
+
return /* @__PURE__ */ w(
|
|
2006
2008
|
"textarea",
|
|
2007
2009
|
{
|
|
2008
|
-
...
|
|
2009
|
-
className:
|
|
2010
|
+
...F,
|
|
2011
|
+
className: $,
|
|
2010
2012
|
disabled: e,
|
|
2011
2013
|
id: o,
|
|
2012
2014
|
name: n,
|
|
2013
|
-
onChange:
|
|
2014
|
-
onBlur:
|
|
2015
|
+
onChange: y,
|
|
2016
|
+
onBlur: m,
|
|
2015
2017
|
placeholder: i,
|
|
2016
2018
|
rows: d,
|
|
2017
|
-
value:
|
|
2019
|
+
value: f,
|
|
2018
2020
|
style: E
|
|
2019
2021
|
}
|
|
2020
2022
|
);
|
|
@@ -2029,7 +2031,7 @@ function Zo({
|
|
|
2029
2031
|
style: i,
|
|
2030
2032
|
...l
|
|
2031
2033
|
}) {
|
|
2032
|
-
return /* @__PURE__ */
|
|
2034
|
+
return /* @__PURE__ */ w(
|
|
2033
2035
|
de,
|
|
2034
2036
|
{
|
|
2035
2037
|
name: e,
|
|
@@ -2039,15 +2041,15 @@ function Zo({
|
|
|
2039
2041
|
disabled: o,
|
|
2040
2042
|
className: n,
|
|
2041
2043
|
style: i,
|
|
2042
|
-
children: ({ value: d, onChange:
|
|
2044
|
+
children: ({ value: d, onChange: f, onBlur: y, name: m, error: h }) => /* @__PURE__ */ w(
|
|
2043
2045
|
Is,
|
|
2044
2046
|
{
|
|
2045
2047
|
...l,
|
|
2046
|
-
name:
|
|
2048
|
+
name: m,
|
|
2047
2049
|
value: d || "",
|
|
2048
|
-
onChange: (
|
|
2049
|
-
onBlur:
|
|
2050
|
-
error:
|
|
2050
|
+
onChange: (x) => f(x.target.value),
|
|
2051
|
+
onBlur: y,
|
|
2052
|
+
error: h
|
|
2051
2053
|
}
|
|
2052
2054
|
)
|
|
2053
2055
|
}
|
|
@@ -2099,54 +2101,54 @@ const Us = "Select-module__select___cjdcr", Ws = "Select-module__sizeSmall___i1q
|
|
|
2099
2101
|
value: l = "",
|
|
2100
2102
|
// Event handlers
|
|
2101
2103
|
onChange: d,
|
|
2102
|
-
onBlur:
|
|
2104
|
+
onBlur: f,
|
|
2103
2105
|
// Standard React props
|
|
2104
|
-
children:
|
|
2105
|
-
className:
|
|
2106
|
-
style:
|
|
2106
|
+
children: y,
|
|
2107
|
+
className: m,
|
|
2108
|
+
style: h,
|
|
2107
2109
|
// Element-specific props
|
|
2108
|
-
selectProps:
|
|
2110
|
+
selectProps: x
|
|
2109
2111
|
}) => {
|
|
2110
|
-
const
|
|
2111
|
-
color:
|
|
2112
|
+
const F = H(), g = F.colors.error, k = r ? g : t || F.colors.primary, C = Gs({
|
|
2113
|
+
color: k,
|
|
2112
2114
|
disabled: e
|
|
2113
2115
|
}), b = {
|
|
2114
|
-
"--select-padding-small": `calc(${
|
|
2115
|
-
"--select-padding-large": `calc(${
|
|
2116
|
+
"--select-padding-small": `calc(${F.fonts.rhythm} * ${F.sizes.small.paddingVertical}) calc(${F.fonts.rhythm} * 1.2) calc(${F.fonts.rhythm} * ${F.sizes.small.paddingVertical}) calc(${F.fonts.rhythm} * ${F.inputs.paddingHorizontal})`,
|
|
2117
|
+
"--select-padding-large": `calc(${F.fonts.rhythm} * ${F.sizes.large.paddingVertical}) calc(${F.fonts.rhythm} * 1.4) calc(${F.fonts.rhythm} * ${F.sizes.large.paddingVertical}) calc(${F.fonts.rhythm} * ${F.inputs.paddingHorizontal})`,
|
|
2116
2118
|
backgroundImage: C.backgroundImage,
|
|
2117
2119
|
backgroundPosition: "right center",
|
|
2118
2120
|
backgroundRepeat: "no-repeat",
|
|
2119
2121
|
backgroundSize: "auto 85%",
|
|
2120
2122
|
backgroundColor: "transparent",
|
|
2121
2123
|
borderColor: C.borderColor,
|
|
2122
|
-
borderWidth:
|
|
2123
|
-
borderRadius:
|
|
2124
|
+
borderWidth: F.border.width,
|
|
2125
|
+
borderRadius: F.border.radius,
|
|
2124
2126
|
color: C.color,
|
|
2125
2127
|
cursor: C.cursor,
|
|
2126
|
-
fontSize:
|
|
2128
|
+
fontSize: F.fonts.size,
|
|
2127
2129
|
opacity: C.opacity,
|
|
2128
|
-
...
|
|
2130
|
+
...h
|
|
2129
2131
|
// Top level style overrides
|
|
2130
2132
|
}, E = [
|
|
2131
2133
|
qe.select,
|
|
2132
2134
|
s === "small" ? qe.sizeSmall : qe.sizeLarge,
|
|
2133
|
-
|
|
2135
|
+
m
|
|
2134
2136
|
].filter(Boolean).join(" ");
|
|
2135
2137
|
return /* @__PURE__ */ Z(
|
|
2136
2138
|
"select",
|
|
2137
2139
|
{
|
|
2138
|
-
...
|
|
2140
|
+
...x,
|
|
2139
2141
|
className: E,
|
|
2140
2142
|
disabled: e,
|
|
2141
2143
|
id: o,
|
|
2142
2144
|
name: n,
|
|
2143
2145
|
onChange: d,
|
|
2144
|
-
onBlur:
|
|
2146
|
+
onBlur: f,
|
|
2145
2147
|
value: l,
|
|
2146
2148
|
style: b,
|
|
2147
2149
|
children: [
|
|
2148
|
-
i !== "" && /* @__PURE__ */
|
|
2149
|
-
|
|
2150
|
+
i !== "" && /* @__PURE__ */ w("option", { disabled: !0, value: "", children: i }),
|
|
2151
|
+
y
|
|
2150
2152
|
]
|
|
2151
2153
|
}
|
|
2152
2154
|
);
|
|
@@ -2162,7 +2164,7 @@ function Qo({
|
|
|
2162
2164
|
children: l,
|
|
2163
2165
|
...d
|
|
2164
2166
|
}) {
|
|
2165
|
-
return /* @__PURE__ */
|
|
2167
|
+
return /* @__PURE__ */ w(
|
|
2166
2168
|
de,
|
|
2167
2169
|
{
|
|
2168
2170
|
name: e,
|
|
@@ -2172,15 +2174,15 @@ function Qo({
|
|
|
2172
2174
|
disabled: o,
|
|
2173
2175
|
className: n,
|
|
2174
2176
|
style: i,
|
|
2175
|
-
children: ({ value:
|
|
2177
|
+
children: ({ value: f, onChange: y, onBlur: m, name: h, error: x }) => /* @__PURE__ */ w(
|
|
2176
2178
|
Zs,
|
|
2177
2179
|
{
|
|
2178
2180
|
...d,
|
|
2179
|
-
name:
|
|
2180
|
-
value:
|
|
2181
|
-
onChange: (
|
|
2182
|
-
onBlur:
|
|
2183
|
-
error:
|
|
2181
|
+
name: h,
|
|
2182
|
+
value: f || "",
|
|
2183
|
+
onChange: (F) => y(F.target.value),
|
|
2184
|
+
onBlur: m,
|
|
2185
|
+
error: x,
|
|
2184
2186
|
children: l
|
|
2185
2187
|
}
|
|
2186
2188
|
)
|
|
@@ -2196,7 +2198,7 @@ function Ko({
|
|
|
2196
2198
|
style: n,
|
|
2197
2199
|
...i
|
|
2198
2200
|
}) {
|
|
2199
|
-
return /* @__PURE__ */
|
|
2201
|
+
return /* @__PURE__ */ w(
|
|
2200
2202
|
de,
|
|
2201
2203
|
{
|
|
2202
2204
|
name: e,
|
|
@@ -2205,14 +2207,14 @@ function Ko({
|
|
|
2205
2207
|
disabled: s,
|
|
2206
2208
|
className: o,
|
|
2207
2209
|
style: n,
|
|
2208
|
-
children: ({ value: l, onChange: d, name:
|
|
2210
|
+
children: ({ value: l, onChange: d, name: f, error: y }) => /* @__PURE__ */ w(
|
|
2209
2211
|
Ye,
|
|
2210
2212
|
{
|
|
2211
2213
|
...i,
|
|
2212
|
-
name:
|
|
2214
|
+
name: f,
|
|
2213
2215
|
checked: !!l,
|
|
2214
|
-
onChange: (
|
|
2215
|
-
error:
|
|
2216
|
+
onChange: (m) => d(m.target.checked),
|
|
2217
|
+
error: y
|
|
2216
2218
|
}
|
|
2217
2219
|
)
|
|
2218
2220
|
}
|
|
@@ -2243,36 +2245,36 @@ const Qs = "Radio-module__container___AQxhk", Ks = "Radio-module__svg___zl5kF",
|
|
|
2243
2245
|
label: l,
|
|
2244
2246
|
labelStyle: d,
|
|
2245
2247
|
// Style overrides
|
|
2246
|
-
className:
|
|
2247
|
-
style:
|
|
2248
|
+
className: f,
|
|
2249
|
+
style: y,
|
|
2248
2250
|
// Element-specific props
|
|
2249
|
-
divProps:
|
|
2251
|
+
divProps: m
|
|
2250
2252
|
}) => {
|
|
2251
|
-
const
|
|
2252
|
-
color:
|
|
2253
|
+
const h = H(), x = n || Kt(), F = h.colors.error, g = s ? F : e || h.colors.primary, k = Ys({
|
|
2254
|
+
color: g,
|
|
2253
2255
|
disabled: t
|
|
2254
2256
|
}), C = (M) => {
|
|
2255
2257
|
t || i(M);
|
|
2256
2258
|
}, b = {
|
|
2257
|
-
cursor:
|
|
2258
|
-
fontSize:
|
|
2259
|
-
opacity:
|
|
2260
|
-
...
|
|
2259
|
+
cursor: k.cursor,
|
|
2260
|
+
fontSize: h.fonts.size,
|
|
2261
|
+
opacity: k.opacity,
|
|
2262
|
+
...y
|
|
2261
2263
|
// Top level style overrides
|
|
2262
2264
|
}, E = {
|
|
2263
2265
|
width: "1em"
|
|
2264
|
-
},
|
|
2266
|
+
}, $ = {
|
|
2265
2267
|
fill: "transparent",
|
|
2266
2268
|
strokeWidth: "12.5",
|
|
2267
|
-
stroke:
|
|
2269
|
+
stroke: k.radioColor
|
|
2268
2270
|
}, A = {
|
|
2269
|
-
fill:
|
|
2270
|
-
}, O = [Ge.container,
|
|
2271
|
-
return /* @__PURE__ */ Z("div", { ...
|
|
2272
|
-
/* @__PURE__ */
|
|
2271
|
+
fill: k.radioColor
|
|
2272
|
+
}, O = [Ge.container, f].filter(Boolean).join(" ");
|
|
2273
|
+
return /* @__PURE__ */ Z("div", { ...m, className: O, style: b, children: [
|
|
2274
|
+
/* @__PURE__ */ w(
|
|
2273
2275
|
"input",
|
|
2274
2276
|
{
|
|
2275
|
-
id:
|
|
2277
|
+
id: x,
|
|
2276
2278
|
checked: r,
|
|
2277
2279
|
disabled: t,
|
|
2278
2280
|
name: o,
|
|
@@ -2290,18 +2292,18 @@ const Qs = "Radio-module__container___AQxhk", Ks = "Radio-module__svg___zl5kF",
|
|
|
2290
2292
|
className: Ge.svg,
|
|
2291
2293
|
style: E,
|
|
2292
2294
|
children: [
|
|
2293
|
-
/* @__PURE__ */
|
|
2294
|
-
r && /* @__PURE__ */
|
|
2295
|
+
/* @__PURE__ */ w("circle", { cx: "50", cy: "50", r: "42.5", width: "100%", style: $ }),
|
|
2296
|
+
r && /* @__PURE__ */ w("circle", { cx: "50", cy: "50", r: "25", style: A })
|
|
2295
2297
|
]
|
|
2296
2298
|
}
|
|
2297
2299
|
),
|
|
2298
|
-
l && /* @__PURE__ */
|
|
2300
|
+
l && /* @__PURE__ */ w(
|
|
2299
2301
|
ot,
|
|
2300
2302
|
{
|
|
2301
|
-
htmlFor:
|
|
2303
|
+
htmlFor: x,
|
|
2302
2304
|
className: Ge.label,
|
|
2303
2305
|
style: { paddingBottom: 0, ...d },
|
|
2304
|
-
color:
|
|
2306
|
+
color: k.radioColor,
|
|
2305
2307
|
disabled: t,
|
|
2306
2308
|
error: s,
|
|
2307
2309
|
children: l
|
|
@@ -2320,7 +2322,7 @@ function Jo({
|
|
|
2320
2322
|
value: l,
|
|
2321
2323
|
...d
|
|
2322
2324
|
}) {
|
|
2323
|
-
return /* @__PURE__ */
|
|
2325
|
+
return /* @__PURE__ */ w(
|
|
2324
2326
|
de,
|
|
2325
2327
|
{
|
|
2326
2328
|
name: e,
|
|
@@ -2329,14 +2331,14 @@ function Jo({
|
|
|
2329
2331
|
disabled: o,
|
|
2330
2332
|
className: n,
|
|
2331
2333
|
style: i,
|
|
2332
|
-
children: ({ value:
|
|
2334
|
+
children: ({ value: f, onChange: y, name: m, error: h }) => /* @__PURE__ */ w(
|
|
2333
2335
|
hr,
|
|
2334
2336
|
{
|
|
2335
2337
|
...d,
|
|
2336
|
-
name:
|
|
2337
|
-
checked:
|
|
2338
|
-
onChange: () =>
|
|
2339
|
-
error:
|
|
2338
|
+
name: m,
|
|
2339
|
+
checked: f === l,
|
|
2340
|
+
onChange: () => y(l),
|
|
2341
|
+
error: h,
|
|
2340
2342
|
label: r
|
|
2341
2343
|
}
|
|
2342
2344
|
)
|
|
@@ -2353,7 +2355,7 @@ function Yo({
|
|
|
2353
2355
|
style: i,
|
|
2354
2356
|
indent: l = !0
|
|
2355
2357
|
}) {
|
|
2356
|
-
return /* @__PURE__ */
|
|
2358
|
+
return /* @__PURE__ */ w(
|
|
2357
2359
|
de,
|
|
2358
2360
|
{
|
|
2359
2361
|
name: e,
|
|
@@ -2368,17 +2370,17 @@ function Yo({
|
|
|
2368
2370
|
marginBottom: ".25em"
|
|
2369
2371
|
}
|
|
2370
2372
|
},
|
|
2371
|
-
children: ({ value: d, onChange:
|
|
2373
|
+
children: ({ value: d, onChange: f, name: y, error: m }) => /* @__PURE__ */ w(xe, { children: s.map((h) => /* @__PURE__ */ w(
|
|
2372
2374
|
hr,
|
|
2373
2375
|
{
|
|
2374
|
-
name:
|
|
2375
|
-
checked: d ===
|
|
2376
|
-
onChange: () =>
|
|
2377
|
-
label:
|
|
2378
|
-
disabled: o ||
|
|
2379
|
-
error:
|
|
2376
|
+
name: y,
|
|
2377
|
+
checked: d === h.value,
|
|
2378
|
+
onChange: () => f(h.value),
|
|
2379
|
+
label: h.label,
|
|
2380
|
+
disabled: o || h.disabled,
|
|
2381
|
+
error: m
|
|
2380
2382
|
},
|
|
2381
|
-
|
|
2383
|
+
h.value
|
|
2382
2384
|
)) })
|
|
2383
2385
|
}
|
|
2384
2386
|
);
|
|
@@ -2394,7 +2396,7 @@ function Xo({
|
|
|
2394
2396
|
style: l,
|
|
2395
2397
|
indent: d = !0
|
|
2396
2398
|
}) {
|
|
2397
|
-
return /* @__PURE__ */
|
|
2399
|
+
return /* @__PURE__ */ w(
|
|
2398
2400
|
de,
|
|
2399
2401
|
{
|
|
2400
2402
|
name: e,
|
|
@@ -2409,33 +2411,33 @@ function Xo({
|
|
|
2409
2411
|
marginBottom: ".25em"
|
|
2410
2412
|
}
|
|
2411
2413
|
},
|
|
2412
|
-
children: ({ value:
|
|
2413
|
-
const
|
|
2414
|
-
|
|
2414
|
+
children: ({ value: f, onChange: y, name: m, error: h }) => {
|
|
2415
|
+
const x = Array.isArray(f) ? f : [], F = (g, k) => {
|
|
2416
|
+
y(k ? [...x, g] : x.filter((C) => C !== g));
|
|
2415
2417
|
};
|
|
2416
|
-
return /* @__PURE__ */
|
|
2418
|
+
return /* @__PURE__ */ w(xe, { children: s ? s.map((g) => /* @__PURE__ */ w(
|
|
2417
2419
|
Ye,
|
|
2418
2420
|
{
|
|
2419
|
-
name: `${
|
|
2420
|
-
checked:
|
|
2421
|
-
onChange: (
|
|
2422
|
-
label:
|
|
2423
|
-
disabled: n ||
|
|
2424
|
-
error:
|
|
2421
|
+
name: `${m}[]`,
|
|
2422
|
+
checked: x.includes(g.value),
|
|
2423
|
+
onChange: (k) => F(g.value, k.target.checked),
|
|
2424
|
+
label: g.label,
|
|
2425
|
+
disabled: n || g.disabled,
|
|
2426
|
+
error: h
|
|
2425
2427
|
},
|
|
2426
|
-
|
|
2427
|
-
)) :
|
|
2428
|
-
if (
|
|
2429
|
-
const
|
|
2430
|
-
return
|
|
2431
|
-
name: `${
|
|
2432
|
-
checked:
|
|
2433
|
-
onChange: (C) =>
|
|
2434
|
-
error:
|
|
2435
|
-
disabled: n ||
|
|
2428
|
+
g.value
|
|
2429
|
+
)) : z.Children.map(o, (g) => {
|
|
2430
|
+
if (z.isValidElement(g) && g.type === Ye) {
|
|
2431
|
+
const k = g.props.value || g.props.name;
|
|
2432
|
+
return z.cloneElement(g, {
|
|
2433
|
+
name: `${m}[]`,
|
|
2434
|
+
checked: x.includes(k),
|
|
2435
|
+
onChange: (C) => F(k, C.target.checked),
|
|
2436
|
+
error: h || g.props.error,
|
|
2437
|
+
disabled: n || g.props.disabled
|
|
2436
2438
|
});
|
|
2437
2439
|
}
|
|
2438
|
-
return
|
|
2440
|
+
return g;
|
|
2439
2441
|
}) });
|
|
2440
2442
|
}
|
|
2441
2443
|
}
|
|
@@ -2475,25 +2477,25 @@ const Xs = "Hamburger-module__hamburger___Tf4-t", eo = "Hamburger-module__line__
|
|
|
2475
2477
|
className: l,
|
|
2476
2478
|
style: d
|
|
2477
2479
|
}) => {
|
|
2478
|
-
const
|
|
2480
|
+
const f = ro({
|
|
2479
2481
|
compact: t,
|
|
2480
2482
|
color: e,
|
|
2481
2483
|
visible: r,
|
|
2482
2484
|
border: n
|
|
2483
|
-
}),
|
|
2485
|
+
}), y = [ve.hamburger, o ? ve.open : "", l].filter(Boolean).join(" ");
|
|
2484
2486
|
return /* @__PURE__ */ Z(
|
|
2485
2487
|
"button",
|
|
2486
2488
|
{
|
|
2487
2489
|
ref: s,
|
|
2488
|
-
className:
|
|
2490
|
+
className: y,
|
|
2489
2491
|
onClick: () => i(!o),
|
|
2490
|
-
style: { ...
|
|
2492
|
+
style: { ...f, ...d },
|
|
2491
2493
|
"aria-label": "Toggle menu",
|
|
2492
2494
|
"aria-expanded": o,
|
|
2493
2495
|
children: [
|
|
2494
|
-
/* @__PURE__ */
|
|
2495
|
-
/* @__PURE__ */
|
|
2496
|
-
/* @__PURE__ */
|
|
2496
|
+
/* @__PURE__ */ w("div", { className: ve.line }),
|
|
2497
|
+
/* @__PURE__ */ w("div", { className: ve.line }),
|
|
2498
|
+
/* @__PURE__ */ w("div", { className: ve.line })
|
|
2497
2499
|
]
|
|
2498
2500
|
}
|
|
2499
2501
|
);
|
|
@@ -2510,20 +2512,20 @@ const Xs = "Hamburger-module__hamburger___Tf4-t", eo = "Hamburger-module__line__
|
|
|
2510
2512
|
padding: i,
|
|
2511
2513
|
margin: l,
|
|
2512
2514
|
gap: d,
|
|
2513
|
-
backgroundColor:
|
|
2514
|
-
color:
|
|
2515
|
+
backgroundColor: f,
|
|
2516
|
+
color: y
|
|
2515
2517
|
} = {}) => {
|
|
2516
|
-
const
|
|
2518
|
+
const m = H();
|
|
2517
2519
|
return {
|
|
2518
|
-
"--header-max-width": r ||
|
|
2520
|
+
"--header-max-width": r || m.layout.maxWidth,
|
|
2519
2521
|
"--header-min-width": t,
|
|
2520
2522
|
"--header-width": s,
|
|
2521
2523
|
"--header-height": o,
|
|
2522
|
-
"--header-padding": e ? n ||
|
|
2524
|
+
"--header-padding": e ? n || m.layout.paddingSm : i || m.layout.padding,
|
|
2523
2525
|
"--header-margin": l,
|
|
2524
2526
|
"--header-gap": d,
|
|
2525
|
-
backgroundColor:
|
|
2526
|
-
color:
|
|
2527
|
+
backgroundColor: f,
|
|
2528
|
+
color: y
|
|
2527
2529
|
};
|
|
2528
2530
|
}, ie = (e) => {
|
|
2529
2531
|
const r = typeof window < "u" && typeof window.matchMedia == "function";
|
|
@@ -2545,19 +2547,19 @@ const Xs = "Hamburger-module__hamburger___Tf4-t", eo = "Hamburger-module__line__
|
|
|
2545
2547
|
padding: i,
|
|
2546
2548
|
paddingSm: l,
|
|
2547
2549
|
margin: d,
|
|
2548
|
-
gap:
|
|
2549
|
-
breakpoint:
|
|
2550
|
-
fixed:
|
|
2550
|
+
gap: f,
|
|
2551
|
+
breakpoint: y,
|
|
2552
|
+
fixed: m = !1,
|
|
2551
2553
|
// Content
|
|
2552
|
-
children:
|
|
2554
|
+
children: h,
|
|
2553
2555
|
// Style overrides
|
|
2554
|
-
className:
|
|
2555
|
-
style:
|
|
2556
|
+
className: x,
|
|
2557
|
+
style: F,
|
|
2556
2558
|
// Element-specific props
|
|
2557
|
-
headerProps:
|
|
2559
|
+
headerProps: g
|
|
2558
2560
|
}) => {
|
|
2559
|
-
const
|
|
2560
|
-
isSmallScreen:
|
|
2561
|
+
const k = H(), C = y || k.breakpoints.sm, { maxWidth: b, unit: E } = Ae(C), $ = ie(`(max-width: ${b}${E})`), A = io({
|
|
2562
|
+
isSmallScreen: $,
|
|
2561
2563
|
maxWidth: t,
|
|
2562
2564
|
minWidth: s,
|
|
2563
2565
|
width: o,
|
|
@@ -2565,16 +2567,16 @@ const Xs = "Hamburger-module__hamburger___Tf4-t", eo = "Hamburger-module__line__
|
|
|
2565
2567
|
paddingSm: l,
|
|
2566
2568
|
padding: i,
|
|
2567
2569
|
margin: d,
|
|
2568
|
-
gap:
|
|
2570
|
+
gap: f,
|
|
2569
2571
|
backgroundColor: e,
|
|
2570
2572
|
color: r
|
|
2571
|
-
}), O = [jt.container,
|
|
2572
|
-
return /* @__PURE__ */
|
|
2573
|
+
}), O = [jt.container, x].filter(Boolean).join(" "), M = m ? { position: "fixed", top: 0, left: 0, right: 0, zIndex: 1e3 } : {};
|
|
2574
|
+
return /* @__PURE__ */ w("header", { ...g, className: jt.header, style: M, children: /* @__PURE__ */ w(
|
|
2573
2575
|
"div",
|
|
2574
2576
|
{
|
|
2575
2577
|
className: O,
|
|
2576
|
-
style: { ...A, ...
|
|
2577
|
-
children:
|
|
2578
|
+
style: { ...A, ...F },
|
|
2579
|
+
children: h
|
|
2578
2580
|
}
|
|
2579
2581
|
) });
|
|
2580
2582
|
}, lo = "ResponsiveNav-module__nav___xOfv5", co = "ResponsiveNav-module__navMobile___h795P", uo = "ResponsiveNav-module__navHeader___Me8bB", fo = "ResponsiveNav-module__compact___UhuAE", yo = "ResponsiveNav-module__open___WDCAf", mo = "ResponsiveNav-module__navDesktop___9wscZ", he = {
|
|
@@ -2591,19 +2593,19 @@ const Xs = "Hamburger-module__hamburger___Tf4-t", eo = "Hamburger-module__line__
|
|
|
2591
2593
|
desktop: s
|
|
2592
2594
|
}) => {
|
|
2593
2595
|
const o = H(), n = o.fonts.rhythm;
|
|
2594
|
-
return
|
|
2596
|
+
return Pe(() => {
|
|
2595
2597
|
if (e) {
|
|
2596
|
-
const i = (t == null ? void 0 : t.backgroundColor) || o.colors.primary, l = (t == null ? void 0 : t.color) || o.colors.secondary, d = (t == null ? void 0 : t.activeBackgroundColor) || o.colors.accent,
|
|
2598
|
+
const i = (t == null ? void 0 : t.backgroundColor) || o.colors.primary, l = (t == null ? void 0 : t.color) || o.colors.secondary, d = (t == null ? void 0 : t.activeBackgroundColor) || o.colors.accent, f = (t == null ? void 0 : t.activeColor) || o.colors.primary, y = r || t != null && t.compact ? "1.5rem" : "2rem";
|
|
2597
2599
|
return {
|
|
2598
2600
|
navStyles: {
|
|
2599
2601
|
backgroundColor: i,
|
|
2600
2602
|
color: l,
|
|
2601
|
-
fontSize:
|
|
2603
|
+
fontSize: y,
|
|
2602
2604
|
...t == null ? void 0 : t.style
|
|
2603
2605
|
},
|
|
2604
2606
|
linkActiveStyles: {
|
|
2605
2607
|
backgroundColor: d,
|
|
2606
|
-
color:
|
|
2608
|
+
color: f
|
|
2607
2609
|
},
|
|
2608
2610
|
linkHoverStyles: {
|
|
2609
2611
|
// No hover styles on mobile (touch devices)
|
|
@@ -2636,7 +2638,7 @@ const Xs = "Hamburger-module__hamburger___Tf4-t", eo = "Hamburger-module__line__
|
|
|
2636
2638
|
navProps: i
|
|
2637
2639
|
}) => {
|
|
2638
2640
|
var J;
|
|
2639
|
-
const [l, d] = st(!1),
|
|
2641
|
+
const [l, d] = st(!1), f = Ft(null), y = Ft(null), m = H(), h = { ...m.breakpoints, ...t }, { maxWidth: x, unit: F } = Ae(h.md), { maxWidth: g, unit: k } = Ae(h.sm), C = ie(`(max-width: ${x}${F})`), b = ie(`(max-width: ${g}${k})`), { navStyles: E, linkActiveStyles: $, linkHoverStyles: A } = ho({
|
|
2640
2642
|
isMobile: C,
|
|
2641
2643
|
isCompact: b,
|
|
2642
2644
|
mobile: e,
|
|
@@ -2644,10 +2646,10 @@ const Xs = "Hamburger-module__hamburger___Tf4-t", eo = "Hamburger-module__line__
|
|
|
2644
2646
|
}), O = {
|
|
2645
2647
|
...E,
|
|
2646
2648
|
// Mobile active state colors
|
|
2647
|
-
|
|
2648
|
-
"--mobile-active-bg":
|
|
2649
|
+
...$.backgroundColor && {
|
|
2650
|
+
"--mobile-active-bg": $.backgroundColor
|
|
2649
2651
|
},
|
|
2650
|
-
|
|
2652
|
+
...$.color && { "--mobile-active-color": $.color },
|
|
2651
2653
|
// Desktop hover opacity
|
|
2652
2654
|
...A.opacity !== void 0 && {
|
|
2653
2655
|
"--desktop-hover-opacity": A.opacity
|
|
@@ -2662,12 +2664,12 @@ const Xs = "Hamburger-module__hamburger___Tf4-t", eo = "Hamburger-module__line__
|
|
|
2662
2664
|
}
|
|
2663
2665
|
}, [C, l]), Ke(() => {
|
|
2664
2666
|
const N = (R) => {
|
|
2665
|
-
!
|
|
2667
|
+
!y.current || y.current.contains(R.target) || f.current && f.current.contains(R.target) || d(!1);
|
|
2666
2668
|
};
|
|
2667
2669
|
return document.addEventListener("mousedown", N), () => {
|
|
2668
2670
|
document.removeEventListener("mousedown", N);
|
|
2669
2671
|
};
|
|
2670
|
-
}, [
|
|
2672
|
+
}, [f, y, d]);
|
|
2671
2673
|
const M = [
|
|
2672
2674
|
he.nav,
|
|
2673
2675
|
C ? he.navMobile : he.navDesktop,
|
|
@@ -2677,12 +2679,12 @@ const Xs = "Hamburger-module__hamburger___Tf4-t", eo = "Hamburger-module__line__
|
|
|
2677
2679
|
].filter(Boolean).join(" "), te = (N) => {
|
|
2678
2680
|
if (!C) return;
|
|
2679
2681
|
N.target.closest("a, button") && d(!1);
|
|
2680
|
-
}, U = C ? (e == null ? void 0 : e.content) || s : (r == null ? void 0 : r.content) || s, ae = l ? (e == null ? void 0 : e.hamburgerColor) || (e == null ? void 0 : e.color) ||
|
|
2682
|
+
}, U = C ? (e == null ? void 0 : e.content) || s : (r == null ? void 0 : r.content) || s, ae = l ? (e == null ? void 0 : e.hamburgerColor) || (e == null ? void 0 : e.color) || m.colors.secondary : (J = e == null ? void 0 : e.hamburgerProps) == null ? void 0 : J.color;
|
|
2681
2683
|
return /* @__PURE__ */ Z(xe, { children: [
|
|
2682
|
-
/* @__PURE__ */
|
|
2684
|
+
/* @__PURE__ */ w(
|
|
2683
2685
|
so,
|
|
2684
2686
|
{
|
|
2685
|
-
hamburgerRef:
|
|
2687
|
+
hamburgerRef: f,
|
|
2686
2688
|
visible: C,
|
|
2687
2689
|
compact: b,
|
|
2688
2690
|
open: l,
|
|
@@ -2695,12 +2697,12 @@ const Xs = "Hamburger-module__hamburger___Tf4-t", eo = "Hamburger-module__line__
|
|
|
2695
2697
|
"nav",
|
|
2696
2698
|
{
|
|
2697
2699
|
...i,
|
|
2698
|
-
ref:
|
|
2700
|
+
ref: y,
|
|
2699
2701
|
className: M,
|
|
2700
2702
|
style: { ...O, ...n },
|
|
2701
2703
|
onClickCapture: te,
|
|
2702
2704
|
children: [
|
|
2703
|
-
C && l && /* @__PURE__ */
|
|
2705
|
+
C && l && /* @__PURE__ */ w("div", { className: he.navHeader }),
|
|
2704
2706
|
typeof U == "function" ? U({ setOpen: d }) : U
|
|
2705
2707
|
]
|
|
2706
2708
|
}
|
|
@@ -2718,7 +2720,7 @@ const Xs = "Hamburger-module__hamburger___Tf4-t", eo = "Hamburger-module__line__
|
|
|
2718
2720
|
// Element-specific props
|
|
2719
2721
|
divProps: n
|
|
2720
2722
|
}) => {
|
|
2721
|
-
const i = H(), l = e || i.colors.primary, d = r || i.colors.secondary,
|
|
2723
|
+
const i = H(), l = e || i.colors.primary, d = r || i.colors.secondary, f = /* @__PURE__ */ w(
|
|
2722
2724
|
"div",
|
|
2723
2725
|
{
|
|
2724
2726
|
...t ? void 0 : n,
|
|
@@ -2737,16 +2739,16 @@ const Xs = "Hamburger-module__hamburger___Tf4-t", eo = "Hamburger-module__line__
|
|
|
2737
2739
|
borderTop: `0.1em solid ${d}`
|
|
2738
2740
|
}
|
|
2739
2741
|
}
|
|
2740
|
-
),
|
|
2741
|
-
|
|
2742
|
-
/* @__PURE__ */
|
|
2742
|
+
), y = /* @__PURE__ */ Z(xe, { children: [
|
|
2743
|
+
f,
|
|
2744
|
+
/* @__PURE__ */ w("style", { children: `
|
|
2743
2745
|
@keyframes spin {
|
|
2744
2746
|
0% { transform: rotate(0deg); }
|
|
2745
2747
|
100% { transform: rotate(360deg); }
|
|
2746
2748
|
}
|
|
2747
2749
|
` })
|
|
2748
2750
|
] });
|
|
2749
|
-
return t ? /* @__PURE__ */
|
|
2751
|
+
return t ? /* @__PURE__ */ w(
|
|
2750
2752
|
"div",
|
|
2751
2753
|
{
|
|
2752
2754
|
...n,
|
|
@@ -2760,16 +2762,16 @@ const Xs = "Hamburger-module__hamburger___Tf4-t", eo = "Hamburger-module__line__
|
|
|
2760
2762
|
...o
|
|
2761
2763
|
// Top level style prop overrides
|
|
2762
2764
|
},
|
|
2763
|
-
children:
|
|
2765
|
+
children: y
|
|
2764
2766
|
}
|
|
2765
|
-
) :
|
|
2767
|
+
) : y;
|
|
2766
2768
|
}, tn = ({ children: e, loadingComponent: r }) => {
|
|
2767
2769
|
const [t, s] = st(!1);
|
|
2768
2770
|
return Ke(() => {
|
|
2769
2771
|
requestAnimationFrame(() => {
|
|
2770
2772
|
s(!0);
|
|
2771
2773
|
});
|
|
2772
|
-
}, []), t ? /* @__PURE__ */
|
|
2774
|
+
}, []), t ? /* @__PURE__ */ w(xe, { children: e }) : r || /* @__PURE__ */ w(go, {});
|
|
2773
2775
|
}, _o = "Stack-module__stack___yUU-B", po = "Stack-module__vertical___sKTyQ", vo = "Stack-module__horizontal___YsvtV", Ze = {
|
|
2774
2776
|
stack: _o,
|
|
2775
2777
|
vertical: po,
|
|
@@ -2790,7 +2792,7 @@ const Xs = "Hamburger-module__hamburger___Tf4-t", eo = "Hamburger-module__line__
|
|
|
2790
2792
|
e === "row" ? Ze.horizontal : Ze.vertical,
|
|
2791
2793
|
t
|
|
2792
2794
|
].filter(Boolean).join(" ");
|
|
2793
|
-
return /* @__PURE__ */
|
|
2795
|
+
return /* @__PURE__ */ w("div", { ...o, className: n, style: s, children: r });
|
|
2794
2796
|
}, bo = "ResponsiveSection-module__section___gBESK", So = "ResponsiveSection-module__innerDiv___r1bky", It = {
|
|
2795
2797
|
section: bo,
|
|
2796
2798
|
innerDiv: So
|
|
@@ -2806,31 +2808,31 @@ const Xs = "Hamburger-module__hamburger___Tf4-t", eo = "Hamburger-module__line__
|
|
|
2806
2808
|
padding: i,
|
|
2807
2809
|
paddingSm: l,
|
|
2808
2810
|
margin: d,
|
|
2809
|
-
gap:
|
|
2810
|
-
verticalRhythm:
|
|
2811
|
+
gap: f,
|
|
2812
|
+
verticalRhythm: y = 3,
|
|
2811
2813
|
// Content
|
|
2812
|
-
children:
|
|
2814
|
+
children: m,
|
|
2813
2815
|
// Style overrides
|
|
2814
|
-
className:
|
|
2815
|
-
style:
|
|
2816
|
+
className: h,
|
|
2817
|
+
style: x,
|
|
2816
2818
|
// Element-specific props
|
|
2817
|
-
sectionProps:
|
|
2819
|
+
sectionProps: F
|
|
2818
2820
|
}) => {
|
|
2819
|
-
const
|
|
2821
|
+
const g = H(), k = ie(`(min-width: ${g.breakpoints.sm})`), C = {
|
|
2820
2822
|
backgroundColor: e,
|
|
2821
|
-
color: r ||
|
|
2823
|
+
color: r || g.fonts.color,
|
|
2822
2824
|
margin: d,
|
|
2823
|
-
...
|
|
2825
|
+
...x
|
|
2824
2826
|
// Top level style prop overrides
|
|
2825
|
-
}, b = `calc(${
|
|
2826
|
-
"--max-width": t ||
|
|
2827
|
+
}, b = `calc(${g.fonts.rhythm} * ${y})`, E = k ? i || g.layout.padding : l || g.layout.paddingSm, $ = {
|
|
2828
|
+
"--max-width": t || g.layout.maxWidth,
|
|
2827
2829
|
"--min-width": s,
|
|
2828
2830
|
"--width": o,
|
|
2829
2831
|
"--height": n,
|
|
2830
2832
|
"--section-padding": `${b} ${E}`,
|
|
2831
|
-
"--gap":
|
|
2832
|
-
}, A = [It.section,
|
|
2833
|
-
return /* @__PURE__ */
|
|
2833
|
+
"--gap": f
|
|
2834
|
+
}, A = [It.section, h].filter(Boolean).join(" ");
|
|
2835
|
+
return /* @__PURE__ */ w("section", { ...F, className: A, style: C, children: /* @__PURE__ */ w("div", { className: It.innerDiv, style: $, children: m }) });
|
|
2834
2836
|
}, xo = "Hero-module__hero___IB2tg", Fo = "Hero-module__content___rkkfQ", Ut = {
|
|
2835
2837
|
hero: xo,
|
|
2836
2838
|
content: Fo
|
|
@@ -2838,7 +2840,7 @@ const Xs = "Hamburger-module__hamburger___Tf4-t", eo = "Hamburger-module__line__
|
|
|
2838
2840
|
isMd: e = !1,
|
|
2839
2841
|
isLg: r = !1,
|
|
2840
2842
|
theme: t
|
|
2841
|
-
}) =>
|
|
2843
|
+
}) => Pe(() => {
|
|
2842
2844
|
const { rhythm: s } = t.fonts;
|
|
2843
2845
|
let o = `calc(${s} * 2) 0`, n = "2rem", i = "1.125rem";
|
|
2844
2846
|
return r ? (o = `calc(${s} * 4) 0`, n = "3.5rem", i = "1.5rem") : e && (o = `calc(${s} * 3.5) 0`, n = "3rem", i = "1.25rem"), {
|
|
@@ -2859,20 +2861,20 @@ const Xs = "Hamburger-module__hamburger___Tf4-t", eo = "Hamburger-module__line__
|
|
|
2859
2861
|
style: o,
|
|
2860
2862
|
...n
|
|
2861
2863
|
}) => {
|
|
2862
|
-
const i = H(), l = [Ut.hero, s].filter(Boolean).join(" "), d = (r == null ? void 0 : r.md) || i.breakpoints.md,
|
|
2863
|
-
return /* @__PURE__ */
|
|
2864
|
+
const i = H(), l = [Ut.hero, s].filter(Boolean).join(" "), d = (r == null ? void 0 : r.md) || i.breakpoints.md, f = (r == null ? void 0 : r.lg) || i.breakpoints.lg, y = ie(`(min-width: ${d})`), m = ie(`(min-width: ${f})`), h = wo({ isMd: y, isLg: m, theme: i });
|
|
2865
|
+
return /* @__PURE__ */ w(
|
|
2864
2866
|
gr,
|
|
2865
2867
|
{
|
|
2866
2868
|
className: l,
|
|
2867
2869
|
color: e || i.fonts.color,
|
|
2868
|
-
style: { ...
|
|
2870
|
+
style: { ...h, ...o },
|
|
2869
2871
|
...n,
|
|
2870
|
-
children: /* @__PURE__ */
|
|
2872
|
+
children: /* @__PURE__ */ w("div", { className: Ut.content, children: t })
|
|
2871
2873
|
}
|
|
2872
2874
|
);
|
|
2873
|
-
},
|
|
2874
|
-
footer:
|
|
2875
|
-
container:
|
|
2875
|
+
}, Co = "Footer-module__footer___A76NF", Vo = "Footer-module__container___QneNs", Wt = {
|
|
2876
|
+
footer: Co,
|
|
2877
|
+
container: Vo
|
|
2876
2878
|
}, ko = ({
|
|
2877
2879
|
isSmallScreen: e = !1,
|
|
2878
2880
|
maxWidth: r,
|
|
@@ -2883,20 +2885,20 @@ const Xs = "Hamburger-module__hamburger___Tf4-t", eo = "Hamburger-module__line__
|
|
|
2883
2885
|
padding: i,
|
|
2884
2886
|
margin: l,
|
|
2885
2887
|
gap: d,
|
|
2886
|
-
backgroundColor:
|
|
2887
|
-
color:
|
|
2888
|
+
backgroundColor: f,
|
|
2889
|
+
color: y
|
|
2888
2890
|
} = {}) => {
|
|
2889
|
-
const
|
|
2891
|
+
const m = H();
|
|
2890
2892
|
return {
|
|
2891
|
-
maxWidth: r ||
|
|
2893
|
+
maxWidth: r || m.layout.maxWidth,
|
|
2892
2894
|
minWidth: t,
|
|
2893
2895
|
width: s,
|
|
2894
2896
|
height: o,
|
|
2895
|
-
padding: e ? n ||
|
|
2897
|
+
padding: e ? n || m.layout.paddingSm : i || m.layout.padding,
|
|
2896
2898
|
margin: l,
|
|
2897
2899
|
gap: d,
|
|
2898
|
-
backgroundColor:
|
|
2899
|
-
color:
|
|
2900
|
+
backgroundColor: f,
|
|
2901
|
+
color: y || m.fonts.color
|
|
2900
2902
|
};
|
|
2901
2903
|
}, zo = ({
|
|
2902
2904
|
// Color props
|
|
@@ -2910,17 +2912,17 @@ const Xs = "Hamburger-module__hamburger___Tf4-t", eo = "Hamburger-module__line__
|
|
|
2910
2912
|
padding: i,
|
|
2911
2913
|
paddingSm: l,
|
|
2912
2914
|
margin: d,
|
|
2913
|
-
gap:
|
|
2914
|
-
breakPoint:
|
|
2915
|
+
gap: f,
|
|
2916
|
+
breakPoint: y,
|
|
2915
2917
|
// Content
|
|
2916
|
-
children:
|
|
2918
|
+
children: m,
|
|
2917
2919
|
// Style overrides
|
|
2918
|
-
className:
|
|
2919
|
-
style:
|
|
2920
|
+
className: h,
|
|
2921
|
+
style: x,
|
|
2920
2922
|
// Element-specific props
|
|
2921
|
-
footerProps:
|
|
2923
|
+
footerProps: F
|
|
2922
2924
|
}) => {
|
|
2923
|
-
const
|
|
2925
|
+
const g = H(), k = y || g.breakpoints.sm, { maxWidth: C, unit: b } = Ae(k), E = ie(`(max-width: ${C}${b})`), $ = ko({
|
|
2924
2926
|
isSmallScreen: E,
|
|
2925
2927
|
maxWidth: t,
|
|
2926
2928
|
minWidth: s,
|
|
@@ -2929,11 +2931,11 @@ const Xs = "Hamburger-module__hamburger___Tf4-t", eo = "Hamburger-module__line__
|
|
|
2929
2931
|
paddingSm: l,
|
|
2930
2932
|
padding: i,
|
|
2931
2933
|
margin: d,
|
|
2932
|
-
gap:
|
|
2934
|
+
gap: f,
|
|
2933
2935
|
backgroundColor: e,
|
|
2934
2936
|
color: r
|
|
2935
|
-
}), A = [Wt.container,
|
|
2936
|
-
return /* @__PURE__ */
|
|
2937
|
+
}), A = [Wt.container, h].filter(Boolean).join(" ");
|
|
2938
|
+
return /* @__PURE__ */ w("footer", { ...F, className: Wt.footer, children: /* @__PURE__ */ w("div", { className: A, style: { ...$, ...x }, children: m }) });
|
|
2937
2939
|
}, $o = "FeatureCard-module__card___XQt66", Eo = "FeatureCard-module__icon___dXJ92", Ao = "FeatureCard-module__title___KxXyA", No = "FeatureCard-module__content___68xkw", Ee = {
|
|
2938
2940
|
card: $o,
|
|
2939
2941
|
icon: Eo,
|
|
@@ -2942,7 +2944,7 @@ const Xs = "Hamburger-module__hamburger___Tf4-t", eo = "Hamburger-module__line__
|
|
|
2942
2944
|
}, Ro = ({
|
|
2943
2945
|
isMd: e = !1,
|
|
2944
2946
|
theme: r
|
|
2945
|
-
}) =>
|
|
2947
|
+
}) => Pe(() => {
|
|
2946
2948
|
const { rhythm: t } = r.fonts;
|
|
2947
2949
|
return {
|
|
2948
2950
|
"--feature-icon-font-size": e ? "3rem" : "2.5rem",
|
|
@@ -2964,28 +2966,28 @@ const Xs = "Hamburger-module__hamburger___Tf4-t", eo = "Hamburger-module__line__
|
|
|
2964
2966
|
// Element-specific props
|
|
2965
2967
|
divProps: i
|
|
2966
2968
|
}) => {
|
|
2967
|
-
const l = H(), d = [Ee.card, o].filter(Boolean).join(" "),
|
|
2969
|
+
const l = H(), d = [Ee.card, o].filter(Boolean).join(" "), f = e || l.breakpoints.md, y = ie(`(min-width: ${f})`), m = Ro({ isMd: y, theme: l });
|
|
2968
2970
|
return /* @__PURE__ */ Z(
|
|
2969
2971
|
"div",
|
|
2970
2972
|
{
|
|
2971
2973
|
...i,
|
|
2972
2974
|
className: d,
|
|
2973
|
-
style: { ...
|
|
2975
|
+
style: { ...m, ...n },
|
|
2974
2976
|
children: [
|
|
2975
|
-
r && /* @__PURE__ */
|
|
2976
|
-
/* @__PURE__ */
|
|
2977
|
-
/* @__PURE__ */
|
|
2977
|
+
r && /* @__PURE__ */ w("div", { className: Ee.icon, children: r }),
|
|
2978
|
+
/* @__PURE__ */ w("h3", { className: Ee.title, children: t }),
|
|
2979
|
+
/* @__PURE__ */ w("div", { className: Ee.content, children: s })
|
|
2978
2980
|
]
|
|
2979
2981
|
}
|
|
2980
2982
|
);
|
|
2981
|
-
},
|
|
2982
|
-
section:
|
|
2983
|
-
grid:
|
|
2983
|
+
}, Do = "FeatureGridSection-module__section___wZrbC", Po = "FeatureGridSection-module__grid___iwPJv", qt = {
|
|
2984
|
+
section: Do,
|
|
2985
|
+
grid: Po
|
|
2984
2986
|
}, Bo = ({
|
|
2985
2987
|
columns: e,
|
|
2986
2988
|
isMd: r = !1,
|
|
2987
2989
|
isLg: t = !1
|
|
2988
|
-
}) =>
|
|
2990
|
+
}) => Pe(() => r ? r && !t && (e === 3 || e === 4) ? {
|
|
2989
2991
|
"--grid-template-columns": "repeat(2, 1fr)"
|
|
2990
2992
|
} : {
|
|
2991
2993
|
"--grid-template-columns": {
|
|
@@ -3008,14 +3010,14 @@ const Xs = "Hamburger-module__hamburger___Tf4-t", eo = "Hamburger-module__line__
|
|
|
3008
3010
|
style: n,
|
|
3009
3011
|
...i
|
|
3010
3012
|
}) => {
|
|
3011
|
-
const l = H(), d = [qt.section, o].filter(Boolean).join(" "),
|
|
3013
|
+
const l = H(), d = [qt.section, o].filter(Boolean).join(" "), f = (r == null ? void 0 : r.md) || l.breakpoints.md, y = (r == null ? void 0 : r.lg) || l.breakpoints.lg, m = ie(`(min-width: ${f})`), h = ie(`(min-width: ${y})`), x = Bo({ columns: e, isMd: m, isLg: h }), F = {
|
|
3012
3014
|
"--section-padding-vertical": `calc(${l.fonts.rhythm} * 2)`
|
|
3013
|
-
},
|
|
3014
|
-
...
|
|
3015
|
+
}, g = {
|
|
3016
|
+
...x,
|
|
3015
3017
|
gap: t,
|
|
3016
3018
|
...n
|
|
3017
3019
|
};
|
|
3018
|
-
return /* @__PURE__ */
|
|
3020
|
+
return /* @__PURE__ */ w(gr, { className: d, style: F, ...i, children: /* @__PURE__ */ w("div", { className: qt.grid, style: g, children: s }) });
|
|
3019
3021
|
}, Lo = "PageLayout-module__layoutContainer___diLdT", Ho = "PageLayout-module__content___h2mBr", Oo = "PageLayout-module__main___Sw7Pv", Qe = {
|
|
3020
3022
|
layoutContainer: Lo,
|
|
3021
3023
|
content: Ho,
|
|
@@ -3034,13 +3036,13 @@ const Xs = "Hamburger-module__hamburger___Tf4-t", eo = "Hamburger-module__line__
|
|
|
3034
3036
|
divProps: l,
|
|
3035
3037
|
mainProps: d
|
|
3036
3038
|
}) => {
|
|
3037
|
-
const
|
|
3038
|
-
return /* @__PURE__ */ Z("div", { ...l, className:
|
|
3039
|
+
const f = [Qe.layoutContainer, s].filter(Boolean).join(" ");
|
|
3040
|
+
return /* @__PURE__ */ Z("div", { ...l, className: f, style: o, children: [
|
|
3039
3041
|
/* @__PURE__ */ Z("div", { className: Qe.content, children: [
|
|
3040
|
-
e && /* @__PURE__ */
|
|
3041
|
-
/* @__PURE__ */
|
|
3042
|
+
e && /* @__PURE__ */ w(ao, { ...n, children: e }),
|
|
3043
|
+
/* @__PURE__ */ w("main", { ...d, className: Qe.main, children: t })
|
|
3042
3044
|
] }),
|
|
3043
|
-
r && /* @__PURE__ */
|
|
3045
|
+
r && /* @__PURE__ */ w(zo, { ...i, children: r })
|
|
3044
3046
|
] });
|
|
3045
3047
|
};
|
|
3046
3048
|
export {
|