digital-rabbit-cl 1.3.13 → 1.3.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Button/Button.d.ts +12 -2
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/Button/useButtonStyles.d.ts +2 -4
- package/dist/components/Button/useButtonStyles.d.ts.map +1 -1
- package/dist/digital-rabbit-cl.es.js +594 -602
- package/dist/digital-rabbit-cl.umd.js +3 -3
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
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 z, { createContext as kr, useContext as zr, useState as st, useLayoutEffect as $r, useSyncExternalStore as Ar, useMemo as
|
|
2
|
+
import { jsx as x, 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 Ar, useMemo as Pe, useRef as Ft, useEffect as Ke } from "react";
|
|
4
4
|
const Er = "Button-module__button___2ZuB7", Nr = "Button-module__sizeSmall___DRT8P", Rr = "Button-module__sizeLarge___yeZSH", Ve = {
|
|
5
5
|
button: Er,
|
|
6
6
|
sizeSmall: Nr,
|
|
@@ -8,24 +8,20 @@ const Er = "Button-module__button___2ZuB7", Nr = "Button-module__sizeSmall___DRT
|
|
|
8
8
|
}, Br = ({
|
|
9
9
|
isActive: e,
|
|
10
10
|
disabled: r,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
outline: i,
|
|
16
|
-
theme: l
|
|
11
|
+
color: t,
|
|
12
|
+
hoverColor: s,
|
|
13
|
+
outline: o,
|
|
14
|
+
theme: n
|
|
17
15
|
}) => {
|
|
18
|
-
const
|
|
19
|
-
let u;
|
|
20
|
-
|
|
21
|
-
let
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
color: h,
|
|
28
|
-
opacity: x
|
|
16
|
+
const i = t || n.colors.primary, l = n.buttons.textColor;
|
|
17
|
+
let u, f, y;
|
|
18
|
+
o ? (u = "transparent", f = i, y = i, e && (u = s || i, f = s || i, y = l)) : (u = i, f = i, y = l, e && (u = s || i, f = s || i, y = l));
|
|
19
|
+
let m = 1;
|
|
20
|
+
return r ? m = 0.3 : e && !s && (m = 0.75), {
|
|
21
|
+
backgroundColor: u,
|
|
22
|
+
borderColor: f,
|
|
23
|
+
color: y,
|
|
24
|
+
opacity: m
|
|
29
25
|
};
|
|
30
26
|
};
|
|
31
27
|
function Gt(e, r) {
|
|
@@ -114,69 +110,65 @@ const Ct = {
|
|
|
114
110
|
}
|
|
115
111
|
}, Zt = kr(Je), Io = ({ theme: e, children: r }) => {
|
|
116
112
|
const t = e ? Gt(Je, e) : Je;
|
|
117
|
-
return /* @__PURE__ */
|
|
113
|
+
return /* @__PURE__ */ x(Zt.Provider, { value: t, children: r });
|
|
118
114
|
}, H = () => zr(Zt), Uo = ({
|
|
119
|
-
//
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
outline: i = !1,
|
|
128
|
-
type: l = "button",
|
|
115
|
+
// Core styling
|
|
116
|
+
color: e,
|
|
117
|
+
hoverColor: r,
|
|
118
|
+
// Variant props
|
|
119
|
+
disabled: t = !1,
|
|
120
|
+
size: s = "large",
|
|
121
|
+
outline: o = !1,
|
|
122
|
+
type: n = "button",
|
|
129
123
|
// Standard React props
|
|
130
|
-
className:
|
|
131
|
-
style:
|
|
132
|
-
buttonProps:
|
|
133
|
-
onClick:
|
|
134
|
-
children:
|
|
124
|
+
className: i,
|
|
125
|
+
style: l,
|
|
126
|
+
buttonProps: u = {},
|
|
127
|
+
onClick: f,
|
|
128
|
+
children: y
|
|
135
129
|
}) => {
|
|
136
|
-
const
|
|
130
|
+
const m = H(), [g, k] = st(!1), h = {
|
|
137
131
|
...Br({
|
|
138
|
-
isActive:
|
|
139
|
-
disabled:
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
outline: i,
|
|
145
|
-
theme: x
|
|
132
|
+
isActive: g,
|
|
133
|
+
disabled: t,
|
|
134
|
+
color: e,
|
|
135
|
+
hoverColor: r,
|
|
136
|
+
outline: o,
|
|
137
|
+
theme: m
|
|
146
138
|
}),
|
|
147
|
-
fontSize:
|
|
148
|
-
borderWidth:
|
|
149
|
-
borderRadius:
|
|
150
|
-
"--button-padding-small": `calc(${
|
|
151
|
-
"--button-padding-large": `calc(${
|
|
152
|
-
...
|
|
139
|
+
fontSize: m.fonts.size,
|
|
140
|
+
borderWidth: m.border.width,
|
|
141
|
+
borderRadius: m.border.radius,
|
|
142
|
+
"--button-padding-small": `calc(${m.fonts.rhythm} * ${m.sizes.small.paddingVertical}) calc(${m.fonts.rhythm} * ${m.buttons.paddingHorizontal})`,
|
|
143
|
+
"--button-padding-large": `calc(${m.fonts.rhythm} * ${m.sizes.large.paddingVertical}) calc(${m.fonts.rhythm} * ${m.buttons.paddingHorizontal})`,
|
|
144
|
+
...l
|
|
153
145
|
// Top-level style overrides
|
|
154
|
-
},
|
|
146
|
+
}, w = [
|
|
155
147
|
Ve.button,
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
148
|
+
s === "small" ? Ve.sizeSmall : Ve.sizeLarge,
|
|
149
|
+
o ? Ve.outline : "",
|
|
150
|
+
i
|
|
159
151
|
].filter(Boolean).join(" ");
|
|
160
|
-
return /* @__PURE__ */
|
|
152
|
+
return /* @__PURE__ */ x(
|
|
161
153
|
"button",
|
|
162
154
|
{
|
|
163
|
-
...
|
|
164
|
-
className:
|
|
165
|
-
disabled:
|
|
166
|
-
onClick:
|
|
167
|
-
onMouseEnter: () =>
|
|
168
|
-
onMouseLeave: () =>
|
|
169
|
-
type:
|
|
170
|
-
style:
|
|
171
|
-
children:
|
|
155
|
+
...u,
|
|
156
|
+
className: w,
|
|
157
|
+
disabled: t,
|
|
158
|
+
onClick: f,
|
|
159
|
+
onMouseEnter: () => k(!0),
|
|
160
|
+
onMouseLeave: () => k(!1),
|
|
161
|
+
type: n,
|
|
162
|
+
style: h,
|
|
163
|
+
children: y
|
|
172
164
|
}
|
|
173
165
|
);
|
|
174
166
|
};
|
|
175
|
-
var wt = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto < "u" && typeof msCrypto.getRandomValues == "function" && msCrypto.getRandomValues.bind(msCrypto),
|
|
176
|
-
function
|
|
167
|
+
var wt = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto < "u" && typeof msCrypto.getRandomValues == "function" && msCrypto.getRandomValues.bind(msCrypto), Pr = new Uint8Array(16);
|
|
168
|
+
function Dr() {
|
|
177
169
|
if (!wt)
|
|
178
170
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
179
|
-
return wt(
|
|
171
|
+
return wt(Pr);
|
|
180
172
|
}
|
|
181
173
|
var Qt = [];
|
|
182
174
|
for (var ze = 0; ze < 256; ++ze)
|
|
@@ -188,7 +180,7 @@ function Lr(e, r) {
|
|
|
188
180
|
function Kt(e, r, t) {
|
|
189
181
|
var s = r && t || 0;
|
|
190
182
|
typeof e == "string" && (r = e === "binary" ? new Array(16) : null, e = null), e = e || {};
|
|
191
|
-
var o = e.random || (e.rng ||
|
|
183
|
+
var o = e.random || (e.rng || Dr)();
|
|
192
184
|
if (o[6] = o[6] & 15 | 64, o[8] = o[8] & 63 | 128, r)
|
|
193
185
|
for (var n = 0; n < 16; ++n)
|
|
194
186
|
r[s + n] = o[n];
|
|
@@ -239,20 +231,20 @@ const Hr = "Checkbox-module__container___aV9qz", Or = "Checkbox-module__svg___kk
|
|
|
239
231
|
// Element-specific props
|
|
240
232
|
labelProps: l
|
|
241
233
|
}) => {
|
|
242
|
-
const
|
|
234
|
+
const u = H(), f = u.colors.error, y = t ? f : e || u.colors.primary, m = Ur({
|
|
243
235
|
color: y,
|
|
244
236
|
disabled: r,
|
|
245
237
|
fontSize: ".85em"
|
|
246
|
-
}),
|
|
247
|
-
"--form-label-padding-bottom": `calc(${
|
|
238
|
+
}), g = {
|
|
239
|
+
"--form-label-padding-bottom": `calc(${u.fonts.rhythm} * 0.17)`,
|
|
248
240
|
color: m.color,
|
|
249
241
|
fontSize: m.fontSize,
|
|
250
242
|
opacity: m.opacity,
|
|
251
243
|
cursor: m.cursor,
|
|
252
244
|
...i
|
|
253
245
|
// Top level style prop overrides
|
|
254
|
-
},
|
|
255
|
-
return /* @__PURE__ */
|
|
246
|
+
}, k = [Vt.label, r ? Vt.disabled : "", n].filter(Boolean).join(" ");
|
|
247
|
+
return /* @__PURE__ */ x("label", { ...l, className: k, htmlFor: s, style: g, children: o });
|
|
256
248
|
}, Ye = ({
|
|
257
249
|
// Color props
|
|
258
250
|
color: e,
|
|
@@ -265,27 +257,27 @@ const Hr = "Checkbox-module__container___aV9qz", Or = "Checkbox-module__svg___kk
|
|
|
265
257
|
// Form props
|
|
266
258
|
name: i,
|
|
267
259
|
id: l,
|
|
268
|
-
onChange:
|
|
269
|
-
label:
|
|
260
|
+
onChange: u,
|
|
261
|
+
label: f,
|
|
270
262
|
labelStyle: y,
|
|
271
263
|
// Style overrides
|
|
272
264
|
className: m,
|
|
273
|
-
style:
|
|
265
|
+
style: g,
|
|
274
266
|
// Element-specific props
|
|
275
|
-
divProps:
|
|
267
|
+
divProps: k
|
|
276
268
|
}) => {
|
|
277
|
-
const F = H(),
|
|
278
|
-
color:
|
|
269
|
+
const F = H(), h = l || Kt(), w = F.colors.error, V = n ? w : e || F.colors.primary, b = Mr({
|
|
270
|
+
color: V,
|
|
279
271
|
checkmarkColor: r,
|
|
280
272
|
disabled: o,
|
|
281
273
|
inverted: s
|
|
282
274
|
}), A = (U) => {
|
|
283
|
-
o ||
|
|
275
|
+
o || u(U);
|
|
284
276
|
}, $ = {
|
|
285
277
|
cursor: b.cursor,
|
|
286
278
|
fontSize: F.fonts.size,
|
|
287
279
|
opacity: b.opacity,
|
|
288
|
-
...
|
|
280
|
+
...g
|
|
289
281
|
// Top-level style prop overrides
|
|
290
282
|
}, E = {
|
|
291
283
|
width: "1em"
|
|
@@ -298,11 +290,11 @@ const Hr = "Checkbox-module__container___aV9qz", Or = "Checkbox-module__svg___kk
|
|
|
298
290
|
strokeWidth: "15",
|
|
299
291
|
fill: "transparent"
|
|
300
292
|
}, te = [je.container, m].filter(Boolean).join(" ");
|
|
301
|
-
return /* @__PURE__ */ Z("div", { ...
|
|
302
|
-
/* @__PURE__ */
|
|
293
|
+
return /* @__PURE__ */ Z("div", { ...k, className: te, style: $, children: [
|
|
294
|
+
/* @__PURE__ */ x(
|
|
303
295
|
"input",
|
|
304
296
|
{
|
|
305
|
-
id:
|
|
297
|
+
id: h,
|
|
306
298
|
checked: t,
|
|
307
299
|
disabled: o,
|
|
308
300
|
onChange: (U) => A({ target: { checked: U.target.checked, name: i, type: "checkbox" } }),
|
|
@@ -320,21 +312,21 @@ const Hr = "Checkbox-module__container___aV9qz", Or = "Checkbox-module__svg___kk
|
|
|
320
312
|
style: E,
|
|
321
313
|
className: je.svg,
|
|
322
314
|
children: [
|
|
323
|
-
/* @__PURE__ */
|
|
324
|
-
t && /* @__PURE__ */
|
|
315
|
+
/* @__PURE__ */ x("rect", { x: "0", y: "0", height: "100", width: "100", style: O }),
|
|
316
|
+
t && /* @__PURE__ */ x("path", { d: "M 25 45 L 45 65 L 75 30", style: M })
|
|
325
317
|
]
|
|
326
318
|
}
|
|
327
319
|
),
|
|
328
|
-
|
|
320
|
+
f && /* @__PURE__ */ x(
|
|
329
321
|
ot,
|
|
330
322
|
{
|
|
331
|
-
htmlFor:
|
|
323
|
+
htmlFor: h,
|
|
332
324
|
className: je.label,
|
|
333
325
|
style: { paddingBottom: 0, ...y },
|
|
334
326
|
color: b.checkboxColor,
|
|
335
327
|
disabled: o,
|
|
336
328
|
error: n,
|
|
337
|
-
children:
|
|
329
|
+
children: f
|
|
338
330
|
}
|
|
339
331
|
)
|
|
340
332
|
] });
|
|
@@ -366,24 +358,24 @@ function W(e) {
|
|
|
366
358
|
return e;
|
|
367
359
|
return r;
|
|
368
360
|
}
|
|
369
|
-
var
|
|
361
|
+
var De = (e) => /^\w*$/.test(e), L = (e) => e === void 0, it = (e) => Array.isArray(e) ? e.filter(Boolean) : [], at = (e) => it(e.replace(/["|']|\]/g, "").split(/\.|\[/)), v = (e, r, t) => {
|
|
370
362
|
if (!r || !I(e))
|
|
371
363
|
return t;
|
|
372
|
-
const s = (
|
|
364
|
+
const s = (De(r) ? [r] : at(r)).reduce((o, n) => K(o) ? o : o[n], e);
|
|
373
365
|
return L(s) || s === e ? L(e[r]) ? t : e[r] : s;
|
|
374
|
-
}, Y = (e) => typeof e == "boolean",
|
|
366
|
+
}, Y = (e) => typeof e == "boolean", P = (e, r, t) => {
|
|
375
367
|
let s = -1;
|
|
376
|
-
const o =
|
|
368
|
+
const o = De(r) ? [r] : at(r), n = o.length, i = n - 1;
|
|
377
369
|
for (; ++s < n; ) {
|
|
378
370
|
const l = o[s];
|
|
379
|
-
let
|
|
371
|
+
let u = t;
|
|
380
372
|
if (s !== i) {
|
|
381
|
-
const
|
|
382
|
-
|
|
373
|
+
const f = e[l];
|
|
374
|
+
u = I(f) || Array.isArray(f) ? f : isNaN(+o[s + 1]) ? {} : [];
|
|
383
375
|
}
|
|
384
376
|
if (l === "__proto__" || l === "constructor" || l === "prototype")
|
|
385
377
|
return;
|
|
386
|
-
e[l] =
|
|
378
|
+
e[l] = u, e = e[l];
|
|
387
379
|
}
|
|
388
380
|
};
|
|
389
381
|
const Ne = {
|
|
@@ -422,7 +414,7 @@ var tr = (e, r, t, s = !0) => {
|
|
|
422
414
|
};
|
|
423
415
|
const ct = typeof window < "u" ? z.useLayoutEffect : z.useEffect;
|
|
424
416
|
function Gr(e) {
|
|
425
|
-
const r = lt(), { control: t = r.control, disabled: s, name: o, exact: n } = e || {}, [i, l] = z.useState(t._formState),
|
|
417
|
+
const r = lt(), { control: t = r.control, disabled: s, name: o, exact: n } = e || {}, [i, l] = z.useState(t._formState), u = z.useRef({
|
|
426
418
|
isDirty: !1,
|
|
427
419
|
isLoading: !1,
|
|
428
420
|
dirtyFields: !1,
|
|
@@ -434,17 +426,17 @@ function Gr(e) {
|
|
|
434
426
|
});
|
|
435
427
|
return ct(() => t._subscribe({
|
|
436
428
|
name: o,
|
|
437
|
-
formState:
|
|
429
|
+
formState: u.current,
|
|
438
430
|
exact: n,
|
|
439
|
-
callback: (
|
|
431
|
+
callback: (f) => {
|
|
440
432
|
!s && l({
|
|
441
433
|
...t._formState,
|
|
442
|
-
...
|
|
434
|
+
...f
|
|
443
435
|
});
|
|
444
436
|
}
|
|
445
437
|
}), [o, s, n]), z.useEffect(() => {
|
|
446
|
-
|
|
447
|
-
}, [t]), z.useMemo(() => tr(i, t,
|
|
438
|
+
u.current.isValid && t._setValid(!0);
|
|
439
|
+
}, [t]), z.useMemo(() => tr(i, t, u.current, !1), [i, t]);
|
|
448
440
|
}
|
|
449
441
|
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);
|
|
450
442
|
function se(e, r, t = /* @__PURE__ */ new WeakSet()) {
|
|
@@ -471,55 +463,55 @@ function se(e, r, t = /* @__PURE__ */ new WeakSet()) {
|
|
|
471
463
|
return !0;
|
|
472
464
|
}
|
|
473
465
|
function Zr(e) {
|
|
474
|
-
const r = lt(), { control: t = r.control, name: s, defaultValue: o, disabled: n, exact: i, compute: l } = e || {},
|
|
475
|
-
|
|
476
|
-
const [
|
|
477
|
-
const $ = t._getWatch(s,
|
|
478
|
-
return
|
|
479
|
-
}),
|
|
480
|
-
const E = Xe(s, t._names, $ || t._formValues, !1,
|
|
481
|
-
return
|
|
482
|
-
}, [t._formValues, t._names, s]),
|
|
466
|
+
const r = lt(), { control: t = r.control, name: s, defaultValue: o, disabled: n, exact: i, compute: l } = e || {}, u = z.useRef(o), f = z.useRef(l), y = z.useRef(void 0), m = z.useRef(t), g = z.useRef(s);
|
|
467
|
+
f.current = l;
|
|
468
|
+
const [k, F] = z.useState(() => {
|
|
469
|
+
const $ = t._getWatch(s, u.current);
|
|
470
|
+
return f.current ? f.current($) : $;
|
|
471
|
+
}), h = z.useCallback(($) => {
|
|
472
|
+
const E = Xe(s, t._names, $ || t._formValues, !1, u.current);
|
|
473
|
+
return f.current ? f.current(E) : E;
|
|
474
|
+
}, [t._formValues, t._names, s]), w = z.useCallback(($) => {
|
|
483
475
|
if (!n) {
|
|
484
|
-
const E = Xe(s, t._names, $ || t._formValues, !1,
|
|
485
|
-
if (
|
|
486
|
-
const O =
|
|
476
|
+
const E = Xe(s, t._names, $ || t._formValues, !1, u.current);
|
|
477
|
+
if (f.current) {
|
|
478
|
+
const O = f.current(E);
|
|
487
479
|
se(O, y.current) || (F(O), y.current = O);
|
|
488
480
|
} else
|
|
489
481
|
F(E);
|
|
490
482
|
}
|
|
491
483
|
}, [t._formValues, t._names, n, s]);
|
|
492
|
-
ct(() => ((m.current !== t || !se(
|
|
484
|
+
ct(() => ((m.current !== t || !se(g.current, s)) && (m.current = t, g.current = s, w()), t._subscribe({
|
|
493
485
|
name: s,
|
|
494
486
|
formState: {
|
|
495
487
|
values: !0
|
|
496
488
|
},
|
|
497
489
|
exact: i,
|
|
498
490
|
callback: ($) => {
|
|
499
|
-
|
|
491
|
+
w($.values);
|
|
500
492
|
}
|
|
501
|
-
})), [t, i, s,
|
|
502
|
-
const
|
|
493
|
+
})), [t, i, s, w]), z.useEffect(() => t._removeUnmounted());
|
|
494
|
+
const V = m.current !== t, b = g.current, A = z.useMemo(() => {
|
|
503
495
|
if (n)
|
|
504
496
|
return null;
|
|
505
|
-
const $ = !
|
|
506
|
-
return
|
|
507
|
-
}, [n,
|
|
508
|
-
return A !== null ? A :
|
|
497
|
+
const $ = !V && !se(b, s);
|
|
498
|
+
return V || $ ? h() : null;
|
|
499
|
+
}, [n, V, s, b, h]);
|
|
500
|
+
return A !== null ? A : k;
|
|
509
501
|
}
|
|
510
502
|
function Qr(e) {
|
|
511
|
-
const r = lt(), { name: t, disabled: s, control: o = r.control, shouldUnregister: n, defaultValue: i } = e, l = Xt(o._names.array, t),
|
|
503
|
+
const r = lt(), { name: t, disabled: s, control: o = r.control, shouldUnregister: n, defaultValue: i } = e, l = Xt(o._names.array, t), u = z.useMemo(() => v(o._formValues, t, v(o._defaultValues, t, i)), [o, t, i]), f = Zr({
|
|
512
504
|
control: o,
|
|
513
505
|
name: t,
|
|
514
|
-
defaultValue:
|
|
506
|
+
defaultValue: u,
|
|
515
507
|
exact: !0
|
|
516
508
|
}), y = Gr({
|
|
517
509
|
control: o,
|
|
518
510
|
name: t,
|
|
519
511
|
exact: !0
|
|
520
|
-
}), m = z.useRef(e),
|
|
512
|
+
}), m = z.useRef(e), g = z.useRef(void 0), k = z.useRef(o.register(t, {
|
|
521
513
|
...e.rules,
|
|
522
|
-
value:
|
|
514
|
+
value: f,
|
|
523
515
|
...Y(e.disabled) ? { disabled: e.disabled } : {}
|
|
524
516
|
}));
|
|
525
517
|
m.current = e;
|
|
@@ -544,19 +536,19 @@ function Qr(e) {
|
|
|
544
536
|
enumerable: !0,
|
|
545
537
|
get: () => v(y.errors, t)
|
|
546
538
|
}
|
|
547
|
-
}), [y, t]),
|
|
539
|
+
}), [y, t]), h = z.useCallback((A) => k.current.onChange({
|
|
548
540
|
target: {
|
|
549
541
|
value: Yt(A),
|
|
550
542
|
name: t
|
|
551
543
|
},
|
|
552
544
|
type: Ne.CHANGE
|
|
553
|
-
}), [t]),
|
|
545
|
+
}), [t]), w = z.useCallback(() => k.current.onBlur({
|
|
554
546
|
target: {
|
|
555
547
|
value: v(o._formValues, t),
|
|
556
548
|
name: t
|
|
557
549
|
},
|
|
558
550
|
type: Ne.BLUR
|
|
559
|
-
}), [t, o._formValues]),
|
|
551
|
+
}), [t, o._formValues]), V = z.useCallback((A) => {
|
|
560
552
|
const $ = v(o._fields, t);
|
|
561
553
|
$ && A && ($._f.ref = {
|
|
562
554
|
focus: () => A.focus && A.focus(),
|
|
@@ -566,14 +558,14 @@ function Qr(e) {
|
|
|
566
558
|
});
|
|
567
559
|
}, [o._fields, t]), b = z.useMemo(() => ({
|
|
568
560
|
name: t,
|
|
569
|
-
value:
|
|
561
|
+
value: f,
|
|
570
562
|
...Y(s) || y.disabled ? { disabled: y.disabled || s } : {},
|
|
571
|
-
onChange:
|
|
572
|
-
onBlur:
|
|
573
|
-
ref:
|
|
574
|
-
}), [t, s, y.disabled,
|
|
563
|
+
onChange: h,
|
|
564
|
+
onBlur: w,
|
|
565
|
+
ref: V
|
|
566
|
+
}), [t, s, y.disabled, h, w, V, f]);
|
|
575
567
|
return z.useEffect(() => {
|
|
576
|
-
const A = o._options.shouldUnregister || n, $ =
|
|
568
|
+
const A = o._options.shouldUnregister || n, $ = g.current;
|
|
577
569
|
$ && $ !== t && !l && o.unregister($), o.register(t, {
|
|
578
570
|
...m.current.rules,
|
|
579
571
|
...Y(m.current.disabled) ? { disabled: m.current.disabled } : {}
|
|
@@ -584,9 +576,9 @@ function Qr(e) {
|
|
|
584
576
|
};
|
|
585
577
|
if (E(t, !0), A) {
|
|
586
578
|
const O = W(v(o._options.defaultValues, t, m.current.defaultValue));
|
|
587
|
-
|
|
579
|
+
P(o._defaultValues, t, O), L(v(o._formValues, t)) && P(o._formValues, t, O);
|
|
588
580
|
}
|
|
589
|
-
return !l && o.register(t),
|
|
581
|
+
return !l && o.register(t), g.current = t, () => {
|
|
590
582
|
(l ? A && !o._state.action : A) ? o.unregister(t) : E(t, !1);
|
|
591
583
|
};
|
|
592
584
|
}, [t, o, l, n]), z.useEffect(() => {
|
|
@@ -658,7 +650,7 @@ function Yr(e) {
|
|
|
658
650
|
return !0;
|
|
659
651
|
}
|
|
660
652
|
function j(e, r) {
|
|
661
|
-
const t = Array.isArray(r) ? r :
|
|
653
|
+
const t = Array.isArray(r) ? r : De(r) ? [r] : at(r), s = t.length === 1 ? e : Jr(e, t), o = t.length - 1, n = t[o];
|
|
662
654
|
return s && delete s[n], o !== 0 && (I(s) && G(s) || Array.isArray(s) && Yr(s)) && j(e, t.slice(0, -1)), e;
|
|
663
655
|
}
|
|
664
656
|
var Xr = (e) => {
|
|
@@ -714,7 +706,7 @@ var es = (e, r, t, s) => {
|
|
|
714
706
|
const o = {};
|
|
715
707
|
for (const n of e) {
|
|
716
708
|
const i = v(r, n);
|
|
717
|
-
i &&
|
|
709
|
+
i && P(o, n, i._f);
|
|
718
710
|
}
|
|
719
711
|
return {
|
|
720
712
|
criteriaMode: t,
|
|
@@ -748,9 +740,9 @@ const Se = (e, r, t, s) => {
|
|
|
748
740
|
}
|
|
749
741
|
}
|
|
750
742
|
};
|
|
751
|
-
function
|
|
743
|
+
function Pt(e, r, t) {
|
|
752
744
|
const s = v(e, t);
|
|
753
|
-
if (s ||
|
|
745
|
+
if (s || De(t))
|
|
754
746
|
return {
|
|
755
747
|
error: s,
|
|
756
748
|
name: t
|
|
@@ -782,9 +774,9 @@ var ss = (e, r, t, s) => {
|
|
|
782
774
|
return G(n) || Object.keys(n).length >= Object.keys(r).length || Object.keys(n).find((i) => r[i] === (!s || re.all));
|
|
783
775
|
}, 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) => {
|
|
784
776
|
const s = be(v(e, t));
|
|
785
|
-
return
|
|
777
|
+
return P(s, "root", r[t]), P(e, t, s), e;
|
|
786
778
|
};
|
|
787
|
-
function
|
|
779
|
+
function Dt(e, r, t = "validate") {
|
|
788
780
|
if (X(e) || Array.isArray(e) && e.every(X) || Y(e) && !e)
|
|
789
781
|
return {
|
|
790
782
|
type: t,
|
|
@@ -796,23 +788,23 @@ var ye = (e) => I(e) && !Be(e) ? e : {
|
|
|
796
788
|
value: e,
|
|
797
789
|
message: ""
|
|
798
790
|
}, Lt = async (e, r, t, s, o, n) => {
|
|
799
|
-
const { ref: i, refs: l, required:
|
|
800
|
-
if (!
|
|
791
|
+
const { ref: i, refs: l, required: u, maxLength: f, minLength: y, min: m, max: g, pattern: k, validate: F, name: h, valueAsNumber: w, mount: V } = e._f, b = v(t, h);
|
|
792
|
+
if (!V || r.has(h))
|
|
801
793
|
return {};
|
|
802
794
|
const A = l ? l[0] : i, $ = (N) => {
|
|
803
795
|
o && A.reportValidity && (A.setCustomValidity(Y(N) ? "" : N || ""), A.reportValidity());
|
|
804
|
-
}, E = {}, O = ft(i), M = Fe(i), te = O || M, U = (
|
|
796
|
+
}, E = {}, O = ft(i), M = Fe(i), te = O || M, U = (w || dt(i)) && L(i.value) && L(b) || Re(i) && i.value === "" || b === "" || Array.isArray(b) && !b.length, ae = ut.bind(null, h, s, E), J = (N, R, T, q = le.maxLength, Q = le.minLength) => {
|
|
805
797
|
const ne = N ? R : T;
|
|
806
|
-
E[
|
|
798
|
+
E[h] = {
|
|
807
799
|
type: N ? q : Q,
|
|
808
800
|
message: ne,
|
|
809
801
|
ref: i,
|
|
810
802
|
...ae(N ? q : Q, ne)
|
|
811
803
|
};
|
|
812
804
|
};
|
|
813
|
-
if (n ? !Array.isArray(b) || !b.length :
|
|
814
|
-
const { value: N, message: R } = X(
|
|
815
|
-
if (N && (E[
|
|
805
|
+
if (n ? !Array.isArray(b) || !b.length : u && (!te && (U || K(b)) || Y(b) && !b || M && !nr(l).isValid || O && !ar(l).isValid)) {
|
|
806
|
+
const { value: N, message: R } = X(u) ? { value: !!u, message: u } : ye(u);
|
|
807
|
+
if (N && (E[h] = {
|
|
816
808
|
type: le.required,
|
|
817
809
|
message: R,
|
|
818
810
|
ref: A,
|
|
@@ -820,9 +812,9 @@ var ye = (e) => I(e) && !Be(e) ? e : {
|
|
|
820
812
|
}, !s))
|
|
821
813
|
return $(R), E;
|
|
822
814
|
}
|
|
823
|
-
if (!U && (!K(m) || !K(
|
|
815
|
+
if (!U && (!K(m) || !K(g))) {
|
|
824
816
|
let N, R;
|
|
825
|
-
const T = ye(
|
|
817
|
+
const T = ye(g), q = ye(m);
|
|
826
818
|
if (!K(b) && !isNaN(b)) {
|
|
827
819
|
const Q = i.valueAsNumber || b && +b;
|
|
828
820
|
K(T.value) || (N = Q > T.value), K(q.value) || (R = Q < q.value);
|
|
@@ -831,16 +823,16 @@ var ye = (e) => I(e) && !Be(e) ? e : {
|
|
|
831
823
|
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));
|
|
832
824
|
}
|
|
833
825
|
if ((N || R) && (J(!!N, T.message, q.message, le.max, le.min), !s))
|
|
834
|
-
return $(E[
|
|
826
|
+
return $(E[h].message), E;
|
|
835
827
|
}
|
|
836
|
-
if ((
|
|
837
|
-
const N = ye(
|
|
828
|
+
if ((f || y) && !U && (X(b) || n && Array.isArray(b))) {
|
|
829
|
+
const N = ye(f), R = ye(y), T = !K(N.value) && b.length > +N.value, q = !K(R.value) && b.length < +R.value;
|
|
838
830
|
if ((T || q) && (J(T, N.message, R.message), !s))
|
|
839
|
-
return $(E[
|
|
831
|
+
return $(E[h].message), E;
|
|
840
832
|
}
|
|
841
|
-
if (
|
|
842
|
-
const { value: N, message: R } = ye(
|
|
843
|
-
if (Be(N) && !b.match(N) && (E[
|
|
833
|
+
if (k && !U && X(b)) {
|
|
834
|
+
const { value: N, message: R } = ye(k);
|
|
835
|
+
if (Be(N) && !b.match(N) && (E[h] = {
|
|
844
836
|
type: le.pattern,
|
|
845
837
|
message: R,
|
|
846
838
|
ref: i,
|
|
@@ -850,8 +842,8 @@ var ye = (e) => I(e) && !Be(e) ? e : {
|
|
|
850
842
|
}
|
|
851
843
|
if (F) {
|
|
852
844
|
if (oe(F)) {
|
|
853
|
-
const N = await F(b, t), R =
|
|
854
|
-
if (R && (E[
|
|
845
|
+
const N = await F(b, t), R = Dt(N, A);
|
|
846
|
+
if (R && (E[h] = {
|
|
855
847
|
...R,
|
|
856
848
|
...ae(le.validate, R.message)
|
|
857
849
|
}, !s))
|
|
@@ -861,13 +853,13 @@ var ye = (e) => I(e) && !Be(e) ? e : {
|
|
|
861
853
|
for (const R in F) {
|
|
862
854
|
if (!G(N) && !s)
|
|
863
855
|
break;
|
|
864
|
-
const T =
|
|
856
|
+
const T = Dt(await F[R](b, t), A, R);
|
|
865
857
|
T && (N = {
|
|
866
858
|
...T,
|
|
867
859
|
...ae(R, T.message)
|
|
868
|
-
}, $(T.message), s && (E[
|
|
860
|
+
}, $(T.message), s && (E[h] = N));
|
|
869
861
|
}
|
|
870
|
-
if (!G(N) && (E[
|
|
862
|
+
if (!G(N) && (E[h] = {
|
|
871
863
|
ref: A,
|
|
872
864
|
...N
|
|
873
865
|
}, !s))
|
|
@@ -910,7 +902,7 @@ function cs(e = {}) {
|
|
|
910
902
|
unMount: /* @__PURE__ */ new Set(),
|
|
911
903
|
array: /* @__PURE__ */ new Set(),
|
|
912
904
|
watch: /* @__PURE__ */ new Set()
|
|
913
|
-
},
|
|
905
|
+
}, u, f = 0;
|
|
914
906
|
const y = {
|
|
915
907
|
isDirty: !1,
|
|
916
908
|
dirtyFields: !1,
|
|
@@ -923,40 +915,40 @@ function cs(e = {}) {
|
|
|
923
915
|
let m = {
|
|
924
916
|
...y
|
|
925
917
|
};
|
|
926
|
-
const
|
|
918
|
+
const g = {
|
|
927
919
|
array: kt(),
|
|
928
920
|
state: kt()
|
|
929
|
-
},
|
|
930
|
-
clearTimeout(
|
|
931
|
-
},
|
|
921
|
+
}, k = r.criteriaMode === re.all, F = (a) => (c) => {
|
|
922
|
+
clearTimeout(f), f = setTimeout(a, c);
|
|
923
|
+
}, h = async (a) => {
|
|
932
924
|
if (!r.disabled && (y.isValid || m.isValid || a)) {
|
|
933
925
|
const c = r.resolver ? G((await M()).errors) : await U(s, !0);
|
|
934
|
-
c !== t.isValid &&
|
|
926
|
+
c !== t.isValid && g.state.next({
|
|
935
927
|
isValid: c
|
|
936
928
|
});
|
|
937
929
|
}
|
|
938
|
-
},
|
|
939
|
-
!r.disabled && (y.isValidating || y.validatingFields || m.isValidating || m.validatingFields) && ((a || Array.from(l.mount)).forEach((
|
|
940
|
-
|
|
941
|
-
}),
|
|
930
|
+
}, w = (a, c) => {
|
|
931
|
+
!r.disabled && (y.isValidating || y.validatingFields || m.isValidating || m.validatingFields) && ((a || Array.from(l.mount)).forEach((d) => {
|
|
932
|
+
d && (c ? P(t.validatingFields, d, c) : j(t.validatingFields, d));
|
|
933
|
+
}), g.state.next({
|
|
942
934
|
validatingFields: t.validatingFields,
|
|
943
935
|
isValidating: !G(t.validatingFields)
|
|
944
936
|
}));
|
|
945
|
-
},
|
|
946
|
-
if (S &&
|
|
937
|
+
}, V = (a, c = [], d, S, p = !0, _ = !0) => {
|
|
938
|
+
if (S && d && !r.disabled) {
|
|
947
939
|
if (i.action = !0, _ && Array.isArray(v(s, a))) {
|
|
948
|
-
const
|
|
949
|
-
p &&
|
|
940
|
+
const C = d(v(s, a), S.argA, S.argB);
|
|
941
|
+
p && P(s, a, C);
|
|
950
942
|
}
|
|
951
943
|
if (_ && Array.isArray(v(t.errors, a))) {
|
|
952
|
-
const
|
|
953
|
-
p &&
|
|
944
|
+
const C = d(v(t.errors, a), S.argA, S.argB);
|
|
945
|
+
p && P(t.errors, a, C), is(t.errors, a);
|
|
954
946
|
}
|
|
955
947
|
if ((y.touchedFields || m.touchedFields) && _ && Array.isArray(v(t.touchedFields, a))) {
|
|
956
|
-
const
|
|
957
|
-
p &&
|
|
948
|
+
const C = d(v(t.touchedFields, a), S.argA, S.argB);
|
|
949
|
+
p && P(t.touchedFields, a, C);
|
|
958
950
|
}
|
|
959
|
-
(y.dirtyFields || m.dirtyFields) && (t.dirtyFields = ge(o, n)),
|
|
951
|
+
(y.dirtyFields || m.dirtyFields) && (t.dirtyFields = ge(o, n)), g.state.next({
|
|
960
952
|
name: a,
|
|
961
953
|
isDirty: J(a, c),
|
|
962
954
|
dirtyFields: t.dirtyFields,
|
|
@@ -964,44 +956,44 @@ function cs(e = {}) {
|
|
|
964
956
|
isValid: t.isValid
|
|
965
957
|
});
|
|
966
958
|
} else
|
|
967
|
-
|
|
959
|
+
P(n, a, c);
|
|
968
960
|
}, b = (a, c) => {
|
|
969
|
-
|
|
961
|
+
P(t.errors, a, c), g.state.next({
|
|
970
962
|
errors: t.errors
|
|
971
963
|
});
|
|
972
964
|
}, A = (a) => {
|
|
973
|
-
t.errors = a,
|
|
965
|
+
t.errors = a, g.state.next({
|
|
974
966
|
errors: t.errors,
|
|
975
967
|
isValid: !1
|
|
976
968
|
});
|
|
977
|
-
}, $ = (a, c,
|
|
969
|
+
}, $ = (a, c, d, S) => {
|
|
978
970
|
const p = v(s, a);
|
|
979
971
|
if (p) {
|
|
980
|
-
const _ = v(n, a, L(
|
|
981
|
-
L(_) || S && S.defaultChecked || c ?
|
|
972
|
+
const _ = v(n, a, L(d) ? v(o, a) : d);
|
|
973
|
+
L(_) || S && S.defaultChecked || c ? P(n, a, c ? _ : Et(p._f)) : T(a, _), i.mount && h();
|
|
982
974
|
}
|
|
983
|
-
}, E = (a, c,
|
|
984
|
-
let _ = !1,
|
|
975
|
+
}, E = (a, c, d, S, p) => {
|
|
976
|
+
let _ = !1, C = !1;
|
|
985
977
|
const B = {
|
|
986
978
|
name: a
|
|
987
979
|
};
|
|
988
980
|
if (!r.disabled) {
|
|
989
|
-
if (!
|
|
990
|
-
(y.isDirty || m.isDirty) && (
|
|
991
|
-
const
|
|
992
|
-
|
|
981
|
+
if (!d || S) {
|
|
982
|
+
(y.isDirty || m.isDirty) && (C = t.isDirty, t.isDirty = B.isDirty = J(), _ = C !== B.isDirty);
|
|
983
|
+
const D = se(v(o, a), c);
|
|
984
|
+
C = !!v(t.dirtyFields, a), D ? j(t.dirtyFields, a) : P(t.dirtyFields, a, !0), B.dirtyFields = t.dirtyFields, _ = _ || (y.dirtyFields || m.dirtyFields) && C !== !D;
|
|
993
985
|
}
|
|
994
|
-
if (
|
|
995
|
-
const
|
|
996
|
-
|
|
986
|
+
if (d) {
|
|
987
|
+
const D = v(t.touchedFields, a);
|
|
988
|
+
D || (P(t.touchedFields, a, d), B.touchedFields = t.touchedFields, _ = _ || (y.touchedFields || m.touchedFields) && D !== d);
|
|
997
989
|
}
|
|
998
|
-
_ && p &&
|
|
990
|
+
_ && p && g.state.next(B);
|
|
999
991
|
}
|
|
1000
992
|
return _ ? B : {};
|
|
1001
|
-
}, O = (a, c,
|
|
993
|
+
}, O = (a, c, d, S) => {
|
|
1002
994
|
const p = v(t.errors, a), _ = (y.isValid || m.isValid) && Y(c) && t.isValid !== c;
|
|
1003
|
-
if (r.delayError &&
|
|
1004
|
-
const
|
|
995
|
+
if (r.delayError && d ? (u = F(() => b(a, d)), u(r.delayError)) : (clearTimeout(f), u = null, d ? P(t.errors, a, d) : j(t.errors, a)), (d ? !se(p, d) : p) || !G(S) || _) {
|
|
996
|
+
const C = {
|
|
1005
997
|
...S,
|
|
1006
998
|
..._ && Y(c) ? { isValid: c } : {},
|
|
1007
999
|
errors: t.errors,
|
|
@@ -1009,134 +1001,134 @@ function cs(e = {}) {
|
|
|
1009
1001
|
};
|
|
1010
1002
|
t = {
|
|
1011
1003
|
...t,
|
|
1012
|
-
...
|
|
1013
|
-
},
|
|
1004
|
+
...C
|
|
1005
|
+
}, g.state.next(C);
|
|
1014
1006
|
}
|
|
1015
1007
|
}, M = async (a) => {
|
|
1016
|
-
|
|
1008
|
+
w(a, !0);
|
|
1017
1009
|
const c = await r.resolver(n, r.context, es(a || l.mount, s, r.criteriaMode, r.shouldUseNativeValidation));
|
|
1018
|
-
return
|
|
1010
|
+
return w(a), c;
|
|
1019
1011
|
}, te = async (a) => {
|
|
1020
1012
|
const { errors: c } = await M(a);
|
|
1021
1013
|
if (a)
|
|
1022
|
-
for (const
|
|
1023
|
-
const S = v(c,
|
|
1024
|
-
S ?
|
|
1014
|
+
for (const d of a) {
|
|
1015
|
+
const S = v(c, d);
|
|
1016
|
+
S ? P(t.errors, d, S) : j(t.errors, d);
|
|
1025
1017
|
}
|
|
1026
1018
|
else
|
|
1027
1019
|
t.errors = c;
|
|
1028
1020
|
return c;
|
|
1029
|
-
}, U = async (a, c,
|
|
1021
|
+
}, U = async (a, c, d = {
|
|
1030
1022
|
valid: !0
|
|
1031
1023
|
}) => {
|
|
1032
1024
|
for (const S in a) {
|
|
1033
1025
|
const p = a[S];
|
|
1034
1026
|
if (p) {
|
|
1035
|
-
const { _f: _, ...
|
|
1027
|
+
const { _f: _, ...C } = p;
|
|
1036
1028
|
if (_) {
|
|
1037
|
-
const B = l.array.has(_.name),
|
|
1038
|
-
|
|
1039
|
-
const ee = await Lt(p, l.disabled, n,
|
|
1040
|
-
if (
|
|
1029
|
+
const B = l.array.has(_.name), D = p._f && ts(p._f);
|
|
1030
|
+
D && y.validatingFields && w([_.name], !0);
|
|
1031
|
+
const ee = await Lt(p, l.disabled, n, k, r.shouldUseNativeValidation && !c, B);
|
|
1032
|
+
if (D && y.validatingFields && w([_.name]), ee[_.name] && (d.valid = !1, c))
|
|
1041
1033
|
break;
|
|
1042
|
-
!c && (v(ee, _.name) ? B ? as(t.errors, ee, _.name) :
|
|
1034
|
+
!c && (v(ee, _.name) ? B ? as(t.errors, ee, _.name) : P(t.errors, _.name, ee[_.name]) : j(t.errors, _.name));
|
|
1043
1035
|
}
|
|
1044
|
-
!G(
|
|
1036
|
+
!G(C) && await U(C, c, d);
|
|
1045
1037
|
}
|
|
1046
1038
|
}
|
|
1047
|
-
return
|
|
1039
|
+
return d.valid;
|
|
1048
1040
|
}, ae = () => {
|
|
1049
1041
|
for (const a of l.unMount) {
|
|
1050
1042
|
const c = v(s, a);
|
|
1051
|
-
c && (c._f.refs ? c._f.refs.every((
|
|
1043
|
+
c && (c._f.refs ? c._f.refs.every((d) => !Ie(d)) : !Ie(c._f.ref)) && Le(a);
|
|
1052
1044
|
}
|
|
1053
1045
|
l.unMount = /* @__PURE__ */ new Set();
|
|
1054
|
-
}, J = (a, c) => !r.disabled && (a && c &&
|
|
1046
|
+
}, J = (a, c) => !r.disabled && (a && c && P(n, a, c), !se(Ce(), o)), N = (a, c, d) => Xe(a, l, {
|
|
1055
1047
|
...i.mount ? n : L(c) ? o : X(a) ? { [a]: c } : c
|
|
1056
|
-
},
|
|
1048
|
+
}, d, c), R = (a) => it(v(i.mount ? n : o, a, r.shouldUnregister ? v(o, a, []) : [])), T = (a, c, d = {}) => {
|
|
1057
1049
|
const S = v(s, a);
|
|
1058
1050
|
let p = c;
|
|
1059
1051
|
if (S) {
|
|
1060
1052
|
const _ = S._f;
|
|
1061
|
-
_ && (!_.disabled &&
|
|
1062
|
-
(!
|
|
1063
|
-
}) : _.refs.forEach((
|
|
1053
|
+
_ && (!_.disabled && P(n, a, ir(c, _)), p = Re(_.ref) && K(c) ? "" : c, sr(_.ref) ? [..._.ref.options].forEach((C) => C.selected = p.includes(C.value)) : _.refs ? Fe(_.ref) ? _.refs.forEach((C) => {
|
|
1054
|
+
(!C.defaultChecked || !C.disabled) && (Array.isArray(p) ? C.checked = !!p.find((B) => B === C.value) : C.checked = p === C.value || !!p);
|
|
1055
|
+
}) : _.refs.forEach((C) => C.checked = C.value === p) : dt(_.ref) ? _.ref.value = "" : (_.ref.value = p, _.ref.type || g.state.next({
|
|
1064
1056
|
name: a,
|
|
1065
1057
|
values: W(n)
|
|
1066
1058
|
})));
|
|
1067
1059
|
}
|
|
1068
|
-
(
|
|
1069
|
-
}, q = (a, c,
|
|
1060
|
+
(d.shouldDirty || d.shouldTouch) && E(a, p, d.shouldTouch, d.shouldDirty, !0), d.shouldValidate && fe(a);
|
|
1061
|
+
}, q = (a, c, d) => {
|
|
1070
1062
|
for (const S in c) {
|
|
1071
1063
|
if (!c.hasOwnProperty(S))
|
|
1072
1064
|
return;
|
|
1073
|
-
const p = c[S], _ = a + "." + S,
|
|
1074
|
-
(l.array.has(a) || I(p) ||
|
|
1065
|
+
const p = c[S], _ = a + "." + S, C = v(s, _);
|
|
1066
|
+
(l.array.has(a) || I(p) || C && !C._f) && !ue(p) ? q(_, p, d) : T(_, p, d);
|
|
1075
1067
|
}
|
|
1076
|
-
}, Q = (a, c,
|
|
1068
|
+
}, Q = (a, c, d = {}) => {
|
|
1077
1069
|
const S = v(s, a), p = l.array.has(a), _ = W(c);
|
|
1078
|
-
|
|
1070
|
+
P(n, a, _), p ? (g.array.next({
|
|
1079
1071
|
name: a,
|
|
1080
1072
|
values: W(n)
|
|
1081
|
-
}), (y.isDirty || y.dirtyFields || m.isDirty || m.dirtyFields) &&
|
|
1073
|
+
}), (y.isDirty || y.dirtyFields || m.isDirty || m.dirtyFields) && d.shouldDirty && g.state.next({
|
|
1082
1074
|
name: a,
|
|
1083
1075
|
dirtyFields: ge(o, n),
|
|
1084
1076
|
isDirty: J(a, _)
|
|
1085
|
-
})) : S && !S._f && !K(_) ? q(a, _,
|
|
1077
|
+
})) : S && !S._f && !K(_) ? q(a, _, d) : T(a, _, d), Bt(a, l) && g.state.next({ ...t, name: a }), g.state.next({
|
|
1086
1078
|
name: i.mount ? a : void 0,
|
|
1087
1079
|
values: W(n)
|
|
1088
1080
|
});
|
|
1089
1081
|
}, ne = async (a) => {
|
|
1090
1082
|
i.mount = !0;
|
|
1091
1083
|
const c = a.target;
|
|
1092
|
-
let
|
|
1093
|
-
const p = v(s,
|
|
1094
|
-
S = Number.isNaN(
|
|
1095
|
-
},
|
|
1084
|
+
let d = c.name, S = !0;
|
|
1085
|
+
const p = v(s, d), _ = (D) => {
|
|
1086
|
+
S = Number.isNaN(D) || ue(D) && isNaN(D.getTime()) || se(D, v(n, d, D));
|
|
1087
|
+
}, C = Nt(r.mode), B = Nt(r.reValidateMode);
|
|
1096
1088
|
if (p) {
|
|
1097
|
-
let
|
|
1098
|
-
const we = c.type ? Et(p._f) : Yt(a), ce = a.type === Ne.BLUR || a.type === Ne.FOCUS_OUT, Cr = !rs(p._f) && !r.resolver && !v(t.errors,
|
|
1099
|
-
|
|
1100
|
-
const Me = E(
|
|
1101
|
-
if (!ce &&
|
|
1102
|
-
name:
|
|
1089
|
+
let D, ee;
|
|
1090
|
+
const we = c.type ? Et(p._f) : Yt(a), ce = a.type === Ne.BLUR || a.type === Ne.FOCUS_OUT, Cr = !rs(p._f) && !r.resolver && !v(t.errors, d) && !p._f.deps || ns(ce, v(t.touchedFields, d), t.isSubmitted, B, C), Te = Bt(d, l, ce);
|
|
1091
|
+
P(n, d, we), ce ? (!c || !c.readOnly) && (p._f.onBlur && p._f.onBlur(a), u && u(0)) : p._f.onChange && p._f.onChange(a);
|
|
1092
|
+
const Me = E(d, we, ce), wr = !G(Me) || Te;
|
|
1093
|
+
if (!ce && g.state.next({
|
|
1094
|
+
name: d,
|
|
1103
1095
|
type: a.type,
|
|
1104
1096
|
values: W(n)
|
|
1105
1097
|
}), Cr)
|
|
1106
|
-
return (y.isValid || m.isValid) && (r.mode === "onBlur" ? ce &&
|
|
1107
|
-
if (!ce && Te &&
|
|
1108
|
-
const { errors: St } = await M([
|
|
1098
|
+
return (y.isValid || m.isValid) && (r.mode === "onBlur" ? ce && h() : ce || h()), wr && g.state.next({ name: d, ...Te ? {} : Me });
|
|
1099
|
+
if (!ce && Te && g.state.next({ ...t }), r.resolver) {
|
|
1100
|
+
const { errors: St } = await M([d]);
|
|
1109
1101
|
if (_(we), S) {
|
|
1110
|
-
const Vr =
|
|
1111
|
-
|
|
1102
|
+
const Vr = Pt(t.errors, s, d), xt = Pt(St, s, Vr.name || d);
|
|
1103
|
+
D = xt.error, d = xt.name, ee = G(St);
|
|
1112
1104
|
}
|
|
1113
1105
|
} else
|
|
1114
|
-
|
|
1115
|
-
S && (p._f.deps && (!Array.isArray(p._f.deps) || p._f.deps.length > 0) && fe(p._f.deps), O(
|
|
1106
|
+
w([d], !0), D = (await Lt(p, l.disabled, n, k, r.shouldUseNativeValidation))[d], w([d]), _(we), S && (D ? ee = !1 : (y.isValid || m.isValid) && (ee = await U(s, !0)));
|
|
1107
|
+
S && (p._f.deps && (!Array.isArray(p._f.deps) || p._f.deps.length > 0) && fe(p._f.deps), O(d, ee, D, Me));
|
|
1116
1108
|
}
|
|
1117
1109
|
}, _e = (a, c) => {
|
|
1118
1110
|
if (v(t.errors, c) && a.focus)
|
|
1119
1111
|
return a.focus(), 1;
|
|
1120
1112
|
}, fe = async (a, c = {}) => {
|
|
1121
|
-
let
|
|
1113
|
+
let d, S;
|
|
1122
1114
|
const p = be(a);
|
|
1123
1115
|
if (r.resolver) {
|
|
1124
1116
|
const _ = await te(L(a) ? a : p);
|
|
1125
|
-
|
|
1117
|
+
d = G(_), S = a ? !p.some((C) => v(_, C)) : d;
|
|
1126
1118
|
} else a ? (S = (await Promise.all(p.map(async (_) => {
|
|
1127
|
-
const
|
|
1128
|
-
return await U(
|
|
1129
|
-
}))).every(Boolean), !(!S && !t.isValid) &&
|
|
1130
|
-
return
|
|
1131
|
-
...!X(a) || (y.isValid || m.isValid) &&
|
|
1132
|
-
...r.resolver || !a ? { isValid:
|
|
1119
|
+
const C = v(s, _);
|
|
1120
|
+
return await U(C && C._f ? { [_]: C } : C);
|
|
1121
|
+
}))).every(Boolean), !(!S && !t.isValid) && h()) : S = d = await U(s);
|
|
1122
|
+
return g.state.next({
|
|
1123
|
+
...!X(a) || (y.isValid || m.isValid) && d !== t.isValid ? {} : { name: a },
|
|
1124
|
+
...r.resolver || !a ? { isValid: d } : {},
|
|
1133
1125
|
errors: t.errors
|
|
1134
1126
|
}), c.shouldFocus && !S && Se(s, _e, a ? p : l.mount), S;
|
|
1135
1127
|
}, Ce = (a, c) => {
|
|
1136
|
-
let
|
|
1128
|
+
let d = {
|
|
1137
1129
|
...i.mount ? n : o
|
|
1138
1130
|
};
|
|
1139
|
-
return c && (
|
|
1131
|
+
return c && (d = rr(c.dirtyFields ? t.dirtyFields : t.touchedFields, d)), L(a) ? d : X(a) ? v(d, a) : a.map((S) => v(d, S));
|
|
1140
1132
|
}, yt = (a, c) => ({
|
|
1141
1133
|
invalid: !!v((c || t).errors, a),
|
|
1142
1134
|
isDirty: !!v((c || t).dirtyFields, a),
|
|
@@ -1144,23 +1136,23 @@ function cs(e = {}) {
|
|
|
1144
1136
|
isValidating: !!v(t.validatingFields, a),
|
|
1145
1137
|
isTouched: !!v((c || t).touchedFields, a)
|
|
1146
1138
|
}), _r = (a) => {
|
|
1147
|
-
a && be(a).forEach((c) => j(t.errors, c)),
|
|
1139
|
+
a && be(a).forEach((c) => j(t.errors, c)), g.state.next({
|
|
1148
1140
|
errors: a ? t.errors : {}
|
|
1149
1141
|
});
|
|
1150
|
-
}, mt = (a, c,
|
|
1151
|
-
const S = (v(s, a, { _f: {} })._f || {}).ref, p = v(t.errors, a) || {}, { ref: _, message:
|
|
1152
|
-
|
|
1153
|
-
...
|
|
1142
|
+
}, mt = (a, c, d) => {
|
|
1143
|
+
const S = (v(s, a, { _f: {} })._f || {}).ref, p = v(t.errors, a) || {}, { ref: _, message: C, type: B, ...D } = p;
|
|
1144
|
+
P(t.errors, a, {
|
|
1145
|
+
...D,
|
|
1154
1146
|
...c,
|
|
1155
1147
|
ref: S
|
|
1156
|
-
}),
|
|
1148
|
+
}), g.state.next({
|
|
1157
1149
|
name: a,
|
|
1158
1150
|
errors: t.errors,
|
|
1159
1151
|
isValid: !1
|
|
1160
|
-
}),
|
|
1161
|
-
}, pr = (a, c) => oe(a) ?
|
|
1162
|
-
next: (
|
|
1163
|
-
}) : N(a, c, !0), ht = (a) =>
|
|
1152
|
+
}), d && d.shouldFocus && S && S.focus && S.focus();
|
|
1153
|
+
}, pr = (a, c) => oe(a) ? g.state.subscribe({
|
|
1154
|
+
next: (d) => "values" in d && a(N(void 0, c), d)
|
|
1155
|
+
}) : N(a, c, !0), ht = (a) => g.state.subscribe({
|
|
1164
1156
|
next: (c) => {
|
|
1165
1157
|
os(a.name, c.name, a.exact) && ss(c, a.formState || y, Fr, a.reRenderRoot) && a.callback({
|
|
1166
1158
|
values: { ...n },
|
|
@@ -1176,28 +1168,28 @@ function cs(e = {}) {
|
|
|
1176
1168
|
...a,
|
|
1177
1169
|
formState: m
|
|
1178
1170
|
})), Le = (a, c = {}) => {
|
|
1179
|
-
for (const
|
|
1180
|
-
l.mount.delete(
|
|
1181
|
-
|
|
1171
|
+
for (const d of a ? be(a) : l.mount)
|
|
1172
|
+
l.mount.delete(d), l.array.delete(d), c.keepValue || (j(s, d), j(n, d)), !c.keepError && j(t.errors, d), !c.keepDirty && j(t.dirtyFields, d), !c.keepTouched && j(t.touchedFields, d), !c.keepIsValidating && j(t.validatingFields, d), !r.shouldUnregister && !c.keepDefaultValue && j(o, d);
|
|
1173
|
+
g.state.next({
|
|
1182
1174
|
values: W(n)
|
|
1183
|
-
}),
|
|
1175
|
+
}), g.state.next({
|
|
1184
1176
|
...t,
|
|
1185
1177
|
...c.keepDirty ? { isDirty: J() } : {}
|
|
1186
|
-
}), !c.keepIsValid &&
|
|
1178
|
+
}), !c.keepIsValid && h();
|
|
1187
1179
|
}, gt = ({ disabled: a, name: c }) => {
|
|
1188
1180
|
(Y(a) && i.mount || a || l.disabled.has(c)) && (a ? l.disabled.add(c) : l.disabled.delete(c));
|
|
1189
1181
|
}, He = (a, c = {}) => {
|
|
1190
|
-
let
|
|
1182
|
+
let d = v(s, a);
|
|
1191
1183
|
const S = Y(c.disabled) || Y(r.disabled);
|
|
1192
|
-
return
|
|
1193
|
-
...
|
|
1184
|
+
return P(s, a, {
|
|
1185
|
+
...d || {},
|
|
1194
1186
|
_f: {
|
|
1195
|
-
...
|
|
1187
|
+
...d && d._f ? d._f : { ref: { name: a } },
|
|
1196
1188
|
name: a,
|
|
1197
1189
|
mount: !0,
|
|
1198
1190
|
...c
|
|
1199
1191
|
}
|
|
1200
|
-
}), l.mount.add(a),
|
|
1192
|
+
}), l.mount.add(a), d ? gt({
|
|
1201
1193
|
disabled: Y(c.disabled) ? c.disabled : r.disabled,
|
|
1202
1194
|
name: a
|
|
1203
1195
|
}) : $(a, !0, c.value), {
|
|
@@ -1215,14 +1207,14 @@ function cs(e = {}) {
|
|
|
1215
1207
|
onBlur: ne,
|
|
1216
1208
|
ref: (p) => {
|
|
1217
1209
|
if (p) {
|
|
1218
|
-
He(a, c),
|
|
1219
|
-
const _ = L(p.value) && p.querySelectorAll && p.querySelectorAll("input,select,textarea")[0] || p,
|
|
1220
|
-
if (
|
|
1210
|
+
He(a, c), d = v(s, a);
|
|
1211
|
+
const _ = L(p.value) && p.querySelectorAll && p.querySelectorAll("input,select,textarea")[0] || p, C = Kr(_), B = d._f.refs || [];
|
|
1212
|
+
if (C ? B.find((D) => D === _) : _ === d._f.ref)
|
|
1221
1213
|
return;
|
|
1222
|
-
|
|
1214
|
+
P(s, a, {
|
|
1223
1215
|
_f: {
|
|
1224
|
-
...
|
|
1225
|
-
...
|
|
1216
|
+
...d._f,
|
|
1217
|
+
...C ? {
|
|
1226
1218
|
refs: [
|
|
1227
1219
|
...B.filter(Ie),
|
|
1228
1220
|
_,
|
|
@@ -1233,42 +1225,42 @@ function cs(e = {}) {
|
|
|
1233
1225
|
}
|
|
1234
1226
|
}), $(a, !1, void 0, _);
|
|
1235
1227
|
} else
|
|
1236
|
-
|
|
1228
|
+
d = v(s, a, {}), d._f && (d._f.mount = !1), (r.shouldUnregister || c.shouldUnregister) && !(Xt(l.array, a) && i.action) && l.unMount.add(a);
|
|
1237
1229
|
}
|
|
1238
1230
|
};
|
|
1239
1231
|
}, Oe = () => r.shouldFocusError && Se(s, _e, l.mount), br = (a) => {
|
|
1240
|
-
Y(a) && (
|
|
1241
|
-
const S = v(s,
|
|
1232
|
+
Y(a) && (g.state.next({ disabled: a }), Se(s, (c, d) => {
|
|
1233
|
+
const S = v(s, d);
|
|
1242
1234
|
S && (c.disabled = S._f.disabled || a, Array.isArray(S._f.refs) && S._f.refs.forEach((p) => {
|
|
1243
1235
|
p.disabled = S._f.disabled || a;
|
|
1244
1236
|
}));
|
|
1245
1237
|
}, 0, !1));
|
|
1246
|
-
}, _t = (a, c) => async (
|
|
1238
|
+
}, _t = (a, c) => async (d) => {
|
|
1247
1239
|
let S;
|
|
1248
|
-
|
|
1240
|
+
d && (d.preventDefault && d.preventDefault(), d.persist && d.persist());
|
|
1249
1241
|
let p = W(n);
|
|
1250
|
-
if (
|
|
1242
|
+
if (g.state.next({
|
|
1251
1243
|
isSubmitting: !0
|
|
1252
1244
|
}), r.resolver) {
|
|
1253
|
-
const { errors: _, values:
|
|
1254
|
-
t.errors = _, p = W(
|
|
1245
|
+
const { errors: _, values: C } = await M();
|
|
1246
|
+
t.errors = _, p = W(C);
|
|
1255
1247
|
} else
|
|
1256
1248
|
await U(s);
|
|
1257
1249
|
if (l.disabled.size)
|
|
1258
1250
|
for (const _ of l.disabled)
|
|
1259
1251
|
j(p, _);
|
|
1260
1252
|
if (j(t.errors, "root"), G(t.errors)) {
|
|
1261
|
-
|
|
1253
|
+
g.state.next({
|
|
1262
1254
|
errors: {}
|
|
1263
1255
|
});
|
|
1264
1256
|
try {
|
|
1265
|
-
await a(p,
|
|
1257
|
+
await a(p, d);
|
|
1266
1258
|
} catch (_) {
|
|
1267
1259
|
S = _;
|
|
1268
1260
|
}
|
|
1269
1261
|
} else
|
|
1270
|
-
c && await c({ ...t.errors },
|
|
1271
|
-
if (
|
|
1262
|
+
c && await c({ ...t.errors }, d), Oe(), setTimeout(Oe);
|
|
1263
|
+
if (g.state.next({
|
|
1272
1264
|
isSubmitted: !0,
|
|
1273
1265
|
isSubmitting: !1,
|
|
1274
1266
|
isSubmitSuccessful: G(t.errors) && !S,
|
|
@@ -1277,25 +1269,25 @@ function cs(e = {}) {
|
|
|
1277
1269
|
}), S)
|
|
1278
1270
|
throw S;
|
|
1279
1271
|
}, Sr = (a, c = {}) => {
|
|
1280
|
-
v(s, a) && (L(c.defaultValue) ? Q(a, W(v(o, a))) : (Q(a, c.defaultValue),
|
|
1272
|
+
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 && h()), g.state.next({ ...t }));
|
|
1281
1273
|
}, pt = (a, c = {}) => {
|
|
1282
|
-
const
|
|
1283
|
-
if (c.keepDefaultValues || (o =
|
|
1274
|
+
const d = a ? W(a) : o, S = W(d), p = G(a), _ = p ? o : S;
|
|
1275
|
+
if (c.keepDefaultValues || (o = d), !c.keepValues) {
|
|
1284
1276
|
if (c.keepDirtyValues) {
|
|
1285
|
-
const
|
|
1277
|
+
const C = /* @__PURE__ */ new Set([
|
|
1286
1278
|
...l.mount,
|
|
1287
1279
|
...Object.keys(ge(o, n))
|
|
1288
1280
|
]);
|
|
1289
|
-
for (const B of Array.from(
|
|
1290
|
-
v(t.dirtyFields, B) ?
|
|
1281
|
+
for (const B of Array.from(C))
|
|
1282
|
+
v(t.dirtyFields, B) ? P(_, B, v(n, B)) : Q(B, v(_, B));
|
|
1291
1283
|
} else {
|
|
1292
1284
|
if (nt && L(a))
|
|
1293
|
-
for (const
|
|
1294
|
-
const B = v(s,
|
|
1285
|
+
for (const C of l.mount) {
|
|
1286
|
+
const B = v(s, C);
|
|
1295
1287
|
if (B && B._f) {
|
|
1296
|
-
const
|
|
1297
|
-
if (Re(
|
|
1298
|
-
const ee =
|
|
1288
|
+
const D = Array.isArray(B._f.refs) ? B._f.refs[0] : B._f.ref;
|
|
1289
|
+
if (Re(D)) {
|
|
1290
|
+
const ee = D.closest("form");
|
|
1299
1291
|
if (ee) {
|
|
1300
1292
|
ee.reset();
|
|
1301
1293
|
break;
|
|
@@ -1304,14 +1296,14 @@ function cs(e = {}) {
|
|
|
1304
1296
|
}
|
|
1305
1297
|
}
|
|
1306
1298
|
if (c.keepFieldsRef)
|
|
1307
|
-
for (const
|
|
1308
|
-
Q(
|
|
1299
|
+
for (const C of l.mount)
|
|
1300
|
+
Q(C, v(_, C));
|
|
1309
1301
|
else
|
|
1310
1302
|
s = {};
|
|
1311
1303
|
}
|
|
1312
|
-
n = r.shouldUnregister ? c.keepDefaultValues ? W(o) : {} : W(_),
|
|
1304
|
+
n = r.shouldUnregister ? c.keepDefaultValues ? W(o) : {} : W(_), g.array.next({
|
|
1313
1305
|
values: { ..._ }
|
|
1314
|
-
}),
|
|
1306
|
+
}), g.state.next({
|
|
1315
1307
|
values: { ..._ }
|
|
1316
1308
|
});
|
|
1317
1309
|
}
|
|
@@ -1323,7 +1315,7 @@ function cs(e = {}) {
|
|
|
1323
1315
|
watch: /* @__PURE__ */ new Set(),
|
|
1324
1316
|
watchAll: !1,
|
|
1325
1317
|
focus: ""
|
|
1326
|
-
}, i.mount = !y.isValid || !!c.keepIsValid || !!c.keepDirtyValues || !r.shouldUnregister && !G(_), i.watch = !!r.shouldUnregister,
|
|
1318
|
+
}, i.mount = !y.isValid || !!c.keepIsValid || !!c.keepDirtyValues || !r.shouldUnregister && !G(_), i.watch = !!r.shouldUnregister, g.state.next({
|
|
1327
1319
|
submitCount: c.keepSubmitCount ? t.submitCount : 0,
|
|
1328
1320
|
isDirty: p ? !1 : c.keepDirty ? t.isDirty : !!(c.keepDefaultValues && !se(a, o)),
|
|
1329
1321
|
isSubmitted: c.keepIsSubmitted ? t.isSubmitted : !1,
|
|
@@ -1335,7 +1327,7 @@ function cs(e = {}) {
|
|
|
1335
1327
|
defaultValues: o
|
|
1336
1328
|
});
|
|
1337
1329
|
}, vt = (a, c) => pt(oe(a) ? a(n) : a, c), xr = (a, c = {}) => {
|
|
1338
|
-
const
|
|
1330
|
+
const d = v(s, a), S = d && d._f;
|
|
1339
1331
|
if (S) {
|
|
1340
1332
|
const p = S.refs ? S.refs[0] : S.ref;
|
|
1341
1333
|
p.focus && (p.focus(), c.shouldSelect && oe(p.select) && p.select());
|
|
@@ -1357,20 +1349,20 @@ function cs(e = {}) {
|
|
|
1357
1349
|
_focusError: Oe,
|
|
1358
1350
|
_getWatch: N,
|
|
1359
1351
|
_getDirty: J,
|
|
1360
|
-
_setValid:
|
|
1361
|
-
_setFieldArray:
|
|
1352
|
+
_setValid: h,
|
|
1353
|
+
_setFieldArray: V,
|
|
1362
1354
|
_setDisabledField: gt,
|
|
1363
1355
|
_setErrors: A,
|
|
1364
1356
|
_getFieldArray: R,
|
|
1365
1357
|
_reset: pt,
|
|
1366
1358
|
_resetDefaultValues: () => oe(r.defaultValues) && r.defaultValues().then((a) => {
|
|
1367
|
-
vt(a, r.resetOptions),
|
|
1359
|
+
vt(a, r.resetOptions), g.state.next({
|
|
1368
1360
|
isLoading: !1
|
|
1369
1361
|
});
|
|
1370
1362
|
}),
|
|
1371
1363
|
_removeUnmounted: ae,
|
|
1372
1364
|
_disableForm: br,
|
|
1373
|
-
_subjects:
|
|
1365
|
+
_subjects: g,
|
|
1374
1366
|
_proxyFormState: y,
|
|
1375
1367
|
get _fields() {
|
|
1376
1368
|
return s;
|
|
@@ -1509,8 +1501,8 @@ const Ht = (e, r, t) => {
|
|
|
1509
1501
|
const o = v(r.fields, s), n = Object.assign(e[s] || {}, { ref: o && o.ref });
|
|
1510
1502
|
if (ds(r.names || Object.keys(e), s)) {
|
|
1511
1503
|
const i = Object.assign({}, v(t, s));
|
|
1512
|
-
|
|
1513
|
-
} else
|
|
1504
|
+
P(i, "root", n), P(t, s, i);
|
|
1505
|
+
} else P(t, s, n);
|
|
1514
1506
|
}
|
|
1515
1507
|
return t;
|
|
1516
1508
|
}, ds = (e, r) => {
|
|
@@ -1521,32 +1513,32 @@ function Tt(e) {
|
|
|
1521
1513
|
return e.replace(/\]|\[/g, "");
|
|
1522
1514
|
}
|
|
1523
1515
|
function lr(e, r, t) {
|
|
1524
|
-
function s(l,
|
|
1525
|
-
var
|
|
1516
|
+
function s(l, u) {
|
|
1517
|
+
var f;
|
|
1526
1518
|
Object.defineProperty(l, "_zod", {
|
|
1527
1519
|
value: l._zod ?? {},
|
|
1528
1520
|
enumerable: !1
|
|
1529
|
-
}), (
|
|
1521
|
+
}), (f = l._zod).traits ?? (f.traits = /* @__PURE__ */ new Set()), l._zod.traits.add(e), r(l, u);
|
|
1530
1522
|
for (const y in i.prototype)
|
|
1531
1523
|
y in l || Object.defineProperty(l, y, { value: i.prototype[y].bind(l) });
|
|
1532
|
-
l._zod.constr = i, l._zod.def =
|
|
1524
|
+
l._zod.constr = i, l._zod.def = u;
|
|
1533
1525
|
}
|
|
1534
1526
|
const o = (t == null ? void 0 : t.Parent) ?? Object;
|
|
1535
1527
|
class n extends o {
|
|
1536
1528
|
}
|
|
1537
1529
|
Object.defineProperty(n, "name", { value: e });
|
|
1538
1530
|
function i(l) {
|
|
1539
|
-
var
|
|
1540
|
-
const
|
|
1541
|
-
s(
|
|
1542
|
-
for (const y of
|
|
1531
|
+
var u;
|
|
1532
|
+
const f = t != null && t.Parent ? new n() : this;
|
|
1533
|
+
s(f, l), (u = f._zod).deferred ?? (u.deferred = []);
|
|
1534
|
+
for (const y of f._zod.deferred)
|
|
1543
1535
|
y();
|
|
1544
|
-
return
|
|
1536
|
+
return f;
|
|
1545
1537
|
}
|
|
1546
1538
|
return Object.defineProperty(i, "init", { value: s }), Object.defineProperty(i, Symbol.hasInstance, {
|
|
1547
1539
|
value: (l) => {
|
|
1548
|
-
var
|
|
1549
|
-
return t != null && t.Parent && l instanceof t.Parent ? !0 : (
|
|
1540
|
+
var u, f;
|
|
1541
|
+
return t != null && t.Parent && l instanceof t.Parent ? !0 : (f = (u = l == null ? void 0 : l._zod) == null ? void 0 : u.traits) == null ? void 0 : f.has(e);
|
|
1550
1542
|
}
|
|
1551
1543
|
}), Object.defineProperty(i, "name", { value: e }), i;
|
|
1552
1544
|
}
|
|
@@ -1568,10 +1560,10 @@ function $e(e) {
|
|
|
1568
1560
|
return typeof e == "string" ? e : e == null ? void 0 : e.message;
|
|
1569
1561
|
}
|
|
1570
1562
|
function dr(e, r, t) {
|
|
1571
|
-
var o, n, i, l,
|
|
1563
|
+
var o, n, i, l, u, f;
|
|
1572
1564
|
const s = { ...e, path: e.path ?? [] };
|
|
1573
1565
|
if (!e.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((
|
|
1566
|
+
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((u = t.customError) == null ? void 0 : u.call(t, e)) ?? $e((f = t.localeError) == null ? void 0 : f.call(t, e)) ?? "Invalid input";
|
|
1575
1567
|
s.message = y;
|
|
1576
1568
|
}
|
|
1577
1569
|
return delete s.inst, delete s.continue, r != null && r.reportInput || delete s.input, s;
|
|
@@ -1592,7 +1584,7 @@ const fr = (e, r) => {
|
|
|
1592
1584
|
if (i instanceof Promise)
|
|
1593
1585
|
throw new fs();
|
|
1594
1586
|
if (i.issues.length) {
|
|
1595
|
-
const l = new ((o == null ? void 0 : o.Err) ?? e)(i.issues.map((
|
|
1587
|
+
const l = new ((o == null ? void 0 : o.Err) ?? e)(i.issues.map((u) => dr(u, n, cr())));
|
|
1596
1588
|
throw ur(l, o == null ? void 0 : o.callee), l;
|
|
1597
1589
|
}
|
|
1598
1590
|
return i.value;
|
|
@@ -1600,7 +1592,7 @@ const fr = (e, r) => {
|
|
|
1600
1592
|
const n = s ? Object.assign(s, { async: !0 }) : { async: !0 };
|
|
1601
1593
|
let i = r._zod.run({ value: t, issues: [] }, n);
|
|
1602
1594
|
if (i instanceof Promise && (i = await i), i.issues.length) {
|
|
1603
|
-
const l = new ((o == null ? void 0 : o.Err) ?? e)(i.issues.map((
|
|
1595
|
+
const l = new ((o == null ? void 0 : o.Err) ?? e)(i.issues.map((u) => dr(u, n, cr())));
|
|
1604
1596
|
throw ur(l, o == null ? void 0 : o.callee), l;
|
|
1605
1597
|
}
|
|
1606
1598
|
return i.value;
|
|
@@ -1625,8 +1617,8 @@ function bs(e, r) {
|
|
|
1625
1617
|
return e.push(m);
|
|
1626
1618
|
});
|
|
1627
1619
|
}), r) {
|
|
1628
|
-
var
|
|
1629
|
-
t[i] = ut(i, r, t, o,
|
|
1620
|
+
var u = t[i].types, f = u && u[s.code];
|
|
1621
|
+
t[i] = ut(i, r, t, o, f ? [].concat(f, s.message) : s.message);
|
|
1630
1622
|
}
|
|
1631
1623
|
e.shift();
|
|
1632
1624
|
}
|
|
@@ -1644,8 +1636,8 @@ function Ss(e, r) {
|
|
|
1644
1636
|
return e.push(m);
|
|
1645
1637
|
});
|
|
1646
1638
|
}), r) {
|
|
1647
|
-
var
|
|
1648
|
-
t[i] = ut(i, r, t, o,
|
|
1639
|
+
var u = t[i].types, f = u && u[s.code];
|
|
1640
|
+
t[i] = ut(i, r, t, o, f ? [].concat(f, s.message) : s.message);
|
|
1649
1641
|
}
|
|
1650
1642
|
e.shift();
|
|
1651
1643
|
}
|
|
@@ -1706,15 +1698,15 @@ function Cs({
|
|
|
1706
1698
|
reValidateMode: n = "onChange",
|
|
1707
1699
|
className: i,
|
|
1708
1700
|
style: l,
|
|
1709
|
-
formProps:
|
|
1701
|
+
formProps: u
|
|
1710
1702
|
}) {
|
|
1711
|
-
const
|
|
1703
|
+
const f = us({
|
|
1712
1704
|
resolver: t ? xs(t) : void 0,
|
|
1713
1705
|
defaultValues: s,
|
|
1714
1706
|
mode: o,
|
|
1715
1707
|
reValidateMode: n
|
|
1716
|
-
}), y =
|
|
1717
|
-
return /* @__PURE__ */
|
|
1708
|
+
}), y = f.handleSubmit(e);
|
|
1709
|
+
return /* @__PURE__ */ x(mr.Provider, { value: f, children: /* @__PURE__ */ x("form", { ...u, className: i, style: l, onSubmit: y, children: typeof r == "function" ? r(f) : r }) });
|
|
1718
1710
|
}
|
|
1719
1711
|
const qo = Cs, ws = "FormError-module__formError___kaUBn", Vs = {
|
|
1720
1712
|
formError: ws
|
|
@@ -1735,7 +1727,7 @@ const qo = Cs, ws = "FormError-module__formError___kaUBn", Vs = {
|
|
|
1735
1727
|
...s
|
|
1736
1728
|
// Top level style prop overrides
|
|
1737
1729
|
}, l = [Vs.formError, t].filter(Boolean).join(" ");
|
|
1738
|
-
return /* @__PURE__ */
|
|
1730
|
+
return /* @__PURE__ */ x("div", { ...o, className: l, style: i, role: "alert", "aria-live": "polite", children: r });
|
|
1739
1731
|
}, zs = "FormGroup-module__formGroup___aVI-B", $s = "FormGroup-module__inputWrapper___429QE", As = "FormGroup-module__indented___t61iz", Es = "FormGroup-module__disabled___W-tJ0", Ns = "FormGroup-module__required___mO3xA", me = {
|
|
1740
1732
|
formGroup: zs,
|
|
1741
1733
|
inputWrapper: $s,
|
|
@@ -1755,30 +1747,30 @@ const qo = Cs, ws = "FormError-module__formError___kaUBn", Vs = {
|
|
|
1755
1747
|
errorMessage: i,
|
|
1756
1748
|
labelProps: l,
|
|
1757
1749
|
// Content
|
|
1758
|
-
children:
|
|
1750
|
+
children: u,
|
|
1759
1751
|
// Style overrides
|
|
1760
|
-
className:
|
|
1752
|
+
className: f,
|
|
1761
1753
|
style: y,
|
|
1762
1754
|
// Element-specific props
|
|
1763
1755
|
divProps: m
|
|
1764
1756
|
}) => {
|
|
1765
|
-
const
|
|
1757
|
+
const g = H(), k = [
|
|
1766
1758
|
me.formGroup,
|
|
1767
1759
|
r ? me.error : "",
|
|
1768
1760
|
e ? me.disabled : "",
|
|
1769
|
-
|
|
1761
|
+
f
|
|
1770
1762
|
].filter(Boolean).join(" "), F = {
|
|
1771
|
-
"--form-group-margin-bottom": `calc(${
|
|
1763
|
+
"--form-group-margin-bottom": `calc(${g.fonts.rhythm} * 0.35)`,
|
|
1772
1764
|
...y
|
|
1773
|
-
},
|
|
1774
|
-
if (z.isValidElement(
|
|
1775
|
-
const
|
|
1776
|
-
if (e &&
|
|
1777
|
-
return z.cloneElement(
|
|
1765
|
+
}, h = z.Children.map(u, (w) => {
|
|
1766
|
+
if (z.isValidElement(w)) {
|
|
1767
|
+
const V = {};
|
|
1768
|
+
if (e && w.props.disabled === void 0 && (V.disabled = !0), r && w.props.error === void 0 && (V.error = !0), o && w.props.id === void 0 && (V.id = o), Object.keys(V).length > 0)
|
|
1769
|
+
return z.cloneElement(w, V);
|
|
1778
1770
|
}
|
|
1779
|
-
return
|
|
1771
|
+
return w;
|
|
1780
1772
|
});
|
|
1781
|
-
return /* @__PURE__ */ Z("div", { ...m, className:
|
|
1773
|
+
return /* @__PURE__ */ Z("div", { ...m, className: k, style: F, children: [
|
|
1782
1774
|
n && /* @__PURE__ */ Z(ot, { htmlFor: o, disabled: e, error: r, ...l, children: [
|
|
1783
1775
|
n,
|
|
1784
1776
|
t && /* @__PURE__ */ Z("span", { className: me.required, "aria-label": "required", children: [
|
|
@@ -1786,8 +1778,8 @@ const qo = Cs, ws = "FormError-module__formError___kaUBn", Vs = {
|
|
|
1786
1778
|
"*"
|
|
1787
1779
|
] })
|
|
1788
1780
|
] }),
|
|
1789
|
-
/* @__PURE__ */
|
|
1790
|
-
r && i && /* @__PURE__ */
|
|
1781
|
+
/* @__PURE__ */ x("div", { className: `${me.inputWrapper} ${s ? me.indented : ""}`, children: h }),
|
|
1782
|
+
r && i && /* @__PURE__ */ x(ks, { children: i })
|
|
1791
1783
|
] });
|
|
1792
1784
|
};
|
|
1793
1785
|
function de({
|
|
@@ -1799,45 +1791,45 @@ function de({
|
|
|
1799
1791
|
disabled: n,
|
|
1800
1792
|
className: i,
|
|
1801
1793
|
style: l,
|
|
1802
|
-
indent:
|
|
1803
|
-
labelProps:
|
|
1794
|
+
indent: u,
|
|
1795
|
+
labelProps: f
|
|
1804
1796
|
}) {
|
|
1805
1797
|
const { control: y } = Fs(), {
|
|
1806
1798
|
field: m,
|
|
1807
|
-
fieldState: { error:
|
|
1799
|
+
fieldState: { error: g }
|
|
1808
1800
|
} = Qr({
|
|
1809
1801
|
name: e,
|
|
1810
1802
|
control: y,
|
|
1811
1803
|
rules: o
|
|
1812
1804
|
});
|
|
1813
|
-
return /* @__PURE__ */
|
|
1805
|
+
return /* @__PURE__ */ x(
|
|
1814
1806
|
Rs,
|
|
1815
1807
|
{
|
|
1816
1808
|
label: r,
|
|
1817
1809
|
name: e,
|
|
1818
|
-
error: !!
|
|
1819
|
-
errorMessage:
|
|
1810
|
+
error: !!g,
|
|
1811
|
+
errorMessage: g == null ? void 0 : g.message,
|
|
1820
1812
|
disabled: n,
|
|
1821
1813
|
required: t,
|
|
1822
1814
|
className: i,
|
|
1823
1815
|
style: l,
|
|
1824
|
-
indent:
|
|
1825
|
-
labelProps:
|
|
1816
|
+
indent: u,
|
|
1817
|
+
labelProps: f,
|
|
1826
1818
|
children: s({
|
|
1827
1819
|
value: m.value,
|
|
1828
1820
|
onChange: m.onChange,
|
|
1829
1821
|
onBlur: m.onBlur,
|
|
1830
1822
|
name: m.name,
|
|
1831
|
-
error: !!
|
|
1832
|
-
indent:
|
|
1823
|
+
error: !!g,
|
|
1824
|
+
indent: u
|
|
1833
1825
|
})
|
|
1834
1826
|
}
|
|
1835
1827
|
);
|
|
1836
1828
|
}
|
|
1837
|
-
const Bs = "Input-module__input___WjT81",
|
|
1829
|
+
const Bs = "Input-module__input___WjT81", Ps = "Input-module__sizeSmall___NFvsi", Ds = "Input-module__sizeLarge___4Boj3", Ue = {
|
|
1838
1830
|
input: Bs,
|
|
1839
|
-
sizeSmall:
|
|
1840
|
-
sizeLarge:
|
|
1831
|
+
sizeSmall: Ps,
|
|
1832
|
+
sizeLarge: Ds
|
|
1841
1833
|
}, Ls = ({
|
|
1842
1834
|
color: e = "#000",
|
|
1843
1835
|
disabled: r = !1,
|
|
@@ -1862,40 +1854,40 @@ const Bs = "Input-module__input___WjT81", Ds = "Input-module__sizeSmall___NFvsi"
|
|
|
1862
1854
|
name: n = "",
|
|
1863
1855
|
placeholder: i,
|
|
1864
1856
|
placeholderOpacity: l = 0.3,
|
|
1865
|
-
type:
|
|
1866
|
-
value:
|
|
1857
|
+
type: u = "text",
|
|
1858
|
+
value: f = "",
|
|
1867
1859
|
// Event handlers
|
|
1868
1860
|
onChange: y,
|
|
1869
1861
|
onBlur: m,
|
|
1870
1862
|
// Standard React props
|
|
1871
|
-
className:
|
|
1872
|
-
style:
|
|
1863
|
+
className: g,
|
|
1864
|
+
style: k,
|
|
1873
1865
|
// Element-specific props
|
|
1874
1866
|
inputProps: F
|
|
1875
1867
|
}) => {
|
|
1876
|
-
const
|
|
1877
|
-
color:
|
|
1868
|
+
const h = H(), w = h.colors.error, V = r ? w : t || h.colors.primary, b = Ls({
|
|
1869
|
+
color: V,
|
|
1878
1870
|
disabled: e,
|
|
1879
|
-
fontSize:
|
|
1871
|
+
fontSize: h.fonts.size,
|
|
1880
1872
|
placeholderOpacity: l
|
|
1881
1873
|
}), A = {
|
|
1882
1874
|
"--placeholder-opacity": b.placeholderOpacity,
|
|
1883
|
-
"--input-padding-small": `calc(${
|
|
1884
|
-
"--input-padding-large": `calc(${
|
|
1875
|
+
"--input-padding-small": `calc(${h.fonts.rhythm} * ${h.sizes.small.paddingVertical}) calc(${h.fonts.rhythm} * ${h.inputs.paddingHorizontal})`,
|
|
1876
|
+
"--input-padding-large": `calc(${h.fonts.rhythm} * ${h.sizes.large.paddingVertical}) calc(${h.fonts.rhythm} * ${h.inputs.paddingHorizontal})`,
|
|
1885
1877
|
borderColor: b.borderColor,
|
|
1886
|
-
borderWidth:
|
|
1887
|
-
borderRadius:
|
|
1878
|
+
borderWidth: h.border.width,
|
|
1879
|
+
borderRadius: h.border.radius,
|
|
1888
1880
|
color: b.color,
|
|
1889
1881
|
fontSize: b.fontSize,
|
|
1890
1882
|
opacity: b.opacity,
|
|
1891
|
-
...
|
|
1883
|
+
...k
|
|
1892
1884
|
// Top level style prop overrides
|
|
1893
1885
|
}, $ = [
|
|
1894
1886
|
Ue.input,
|
|
1895
1887
|
s === "small" ? Ue.sizeSmall : Ue.sizeLarge,
|
|
1896
|
-
|
|
1888
|
+
g
|
|
1897
1889
|
].filter(Boolean).join(" ");
|
|
1898
|
-
return /* @__PURE__ */
|
|
1890
|
+
return /* @__PURE__ */ x(
|
|
1899
1891
|
"input",
|
|
1900
1892
|
{
|
|
1901
1893
|
...F,
|
|
@@ -1906,8 +1898,8 @@ const Bs = "Input-module__input___WjT81", Ds = "Input-module__sizeSmall___NFvsi"
|
|
|
1906
1898
|
onChange: y,
|
|
1907
1899
|
onBlur: m,
|
|
1908
1900
|
placeholder: i,
|
|
1909
|
-
type:
|
|
1910
|
-
value:
|
|
1901
|
+
type: u,
|
|
1902
|
+
value: f,
|
|
1911
1903
|
style: A
|
|
1912
1904
|
}
|
|
1913
1905
|
);
|
|
@@ -1922,7 +1914,7 @@ function Go({
|
|
|
1922
1914
|
style: i,
|
|
1923
1915
|
...l
|
|
1924
1916
|
}) {
|
|
1925
|
-
return /* @__PURE__ */
|
|
1917
|
+
return /* @__PURE__ */ x(
|
|
1926
1918
|
de,
|
|
1927
1919
|
{
|
|
1928
1920
|
name: e,
|
|
@@ -1932,15 +1924,15 @@ function Go({
|
|
|
1932
1924
|
disabled: o,
|
|
1933
1925
|
className: n,
|
|
1934
1926
|
style: i,
|
|
1935
|
-
children: ({ value:
|
|
1927
|
+
children: ({ value: u, onChange: f, onBlur: y, name: m, error: g }) => /* @__PURE__ */ x(
|
|
1936
1928
|
Hs,
|
|
1937
1929
|
{
|
|
1938
1930
|
...l,
|
|
1939
1931
|
name: m,
|
|
1940
|
-
value:
|
|
1941
|
-
onChange: (
|
|
1932
|
+
value: u || "",
|
|
1933
|
+
onChange: (k) => f(k.target.value),
|
|
1942
1934
|
inputProps: { onBlur: y },
|
|
1943
|
-
error:
|
|
1935
|
+
error: g
|
|
1944
1936
|
}
|
|
1945
1937
|
)
|
|
1946
1938
|
}
|
|
@@ -1972,39 +1964,39 @@ const Os = "Textarea-module__textarea___Z-y6g", Ts = "Textarea-module__sizeSmall
|
|
|
1972
1964
|
name: n = "",
|
|
1973
1965
|
placeholder: i,
|
|
1974
1966
|
placeholderOpacity: l = 0.3,
|
|
1975
|
-
rows:
|
|
1976
|
-
value:
|
|
1967
|
+
rows: u = 3,
|
|
1968
|
+
value: f = "",
|
|
1977
1969
|
// Event handlers
|
|
1978
1970
|
onChange: y,
|
|
1979
1971
|
onBlur: m,
|
|
1980
1972
|
// Standard React props
|
|
1981
|
-
className:
|
|
1982
|
-
style:
|
|
1973
|
+
className: g,
|
|
1974
|
+
style: k,
|
|
1983
1975
|
// Element-specific props
|
|
1984
1976
|
textareaProps: F
|
|
1985
1977
|
}) => {
|
|
1986
|
-
const
|
|
1987
|
-
color:
|
|
1978
|
+
const h = H(), w = h.colors.error, V = r ? w : t || h.colors.primary, b = js({
|
|
1979
|
+
color: V,
|
|
1988
1980
|
disabled: e,
|
|
1989
1981
|
placeholderOpacity: l
|
|
1990
1982
|
}), A = {
|
|
1991
1983
|
"--placeholder-opacity": b.placeholderOpacity,
|
|
1992
|
-
"--textarea-padding-small": `calc(${
|
|
1993
|
-
"--textarea-padding-large": `calc(${
|
|
1984
|
+
"--textarea-padding-small": `calc(${h.fonts.rhythm} * ${h.sizes.small.paddingVertical}) calc(${h.fonts.rhythm} * ${h.inputs.paddingHorizontal})`,
|
|
1985
|
+
"--textarea-padding-large": `calc(${h.fonts.rhythm} * ${h.sizes.large.paddingVertical}) calc(${h.fonts.rhythm} * ${h.inputs.paddingHorizontal})`,
|
|
1994
1986
|
borderColor: b.borderColor,
|
|
1995
|
-
borderWidth:
|
|
1996
|
-
borderRadius:
|
|
1987
|
+
borderWidth: h.border.width,
|
|
1988
|
+
borderRadius: h.border.radius,
|
|
1997
1989
|
color: b.color,
|
|
1998
|
-
fontSize:
|
|
1990
|
+
fontSize: h.fonts.size,
|
|
1999
1991
|
opacity: b.opacity,
|
|
2000
|
-
...
|
|
1992
|
+
...k
|
|
2001
1993
|
// Top level style overrides
|
|
2002
1994
|
}, $ = [
|
|
2003
1995
|
We.textarea,
|
|
2004
1996
|
s === "small" ? We.sizeSmall : We.sizeLarge,
|
|
2005
|
-
|
|
1997
|
+
g
|
|
2006
1998
|
].filter(Boolean).join(" ");
|
|
2007
|
-
return /* @__PURE__ */
|
|
1999
|
+
return /* @__PURE__ */ x(
|
|
2008
2000
|
"textarea",
|
|
2009
2001
|
{
|
|
2010
2002
|
...F,
|
|
@@ -2015,8 +2007,8 @@ const Os = "Textarea-module__textarea___Z-y6g", Ts = "Textarea-module__sizeSmall
|
|
|
2015
2007
|
onChange: y,
|
|
2016
2008
|
onBlur: m,
|
|
2017
2009
|
placeholder: i,
|
|
2018
|
-
rows:
|
|
2019
|
-
value:
|
|
2010
|
+
rows: u,
|
|
2011
|
+
value: f,
|
|
2020
2012
|
style: A
|
|
2021
2013
|
}
|
|
2022
2014
|
);
|
|
@@ -2031,7 +2023,7 @@ function Zo({
|
|
|
2031
2023
|
style: i,
|
|
2032
2024
|
...l
|
|
2033
2025
|
}) {
|
|
2034
|
-
return /* @__PURE__ */
|
|
2026
|
+
return /* @__PURE__ */ x(
|
|
2035
2027
|
de,
|
|
2036
2028
|
{
|
|
2037
2029
|
name: e,
|
|
@@ -2041,15 +2033,15 @@ function Zo({
|
|
|
2041
2033
|
disabled: o,
|
|
2042
2034
|
className: n,
|
|
2043
2035
|
style: i,
|
|
2044
|
-
children: ({ value:
|
|
2036
|
+
children: ({ value: u, onChange: f, onBlur: y, name: m, error: g }) => /* @__PURE__ */ x(
|
|
2045
2037
|
Is,
|
|
2046
2038
|
{
|
|
2047
2039
|
...l,
|
|
2048
2040
|
name: m,
|
|
2049
|
-
value:
|
|
2050
|
-
onChange: (
|
|
2041
|
+
value: u || "",
|
|
2042
|
+
onChange: (k) => f(k.target.value),
|
|
2051
2043
|
onBlur: y,
|
|
2052
|
-
error:
|
|
2044
|
+
error: g
|
|
2053
2045
|
}
|
|
2054
2046
|
)
|
|
2055
2047
|
}
|
|
@@ -2100,34 +2092,34 @@ const Us = "Select-module__select___cjdcr", Ws = "Select-module__sizeSmall___i1q
|
|
|
2100
2092
|
placeholder: i = "",
|
|
2101
2093
|
value: l = "",
|
|
2102
2094
|
// Event handlers
|
|
2103
|
-
onChange:
|
|
2104
|
-
onBlur:
|
|
2095
|
+
onChange: u,
|
|
2096
|
+
onBlur: f,
|
|
2105
2097
|
// Standard React props
|
|
2106
2098
|
children: y,
|
|
2107
2099
|
className: m,
|
|
2108
|
-
style:
|
|
2100
|
+
style: g,
|
|
2109
2101
|
// Element-specific props
|
|
2110
|
-
selectProps:
|
|
2102
|
+
selectProps: k
|
|
2111
2103
|
}) => {
|
|
2112
|
-
const F = H(),
|
|
2113
|
-
color:
|
|
2104
|
+
const F = H(), h = F.colors.error, w = r ? h : t || F.colors.primary, V = Gs({
|
|
2105
|
+
color: w,
|
|
2114
2106
|
disabled: e
|
|
2115
2107
|
}), b = {
|
|
2116
2108
|
"--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
2109
|
"--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})`,
|
|
2118
|
-
backgroundImage:
|
|
2110
|
+
backgroundImage: V.backgroundImage,
|
|
2119
2111
|
backgroundPosition: "right center",
|
|
2120
2112
|
backgroundRepeat: "no-repeat",
|
|
2121
2113
|
backgroundSize: "auto 85%",
|
|
2122
2114
|
backgroundColor: "transparent",
|
|
2123
|
-
borderColor:
|
|
2115
|
+
borderColor: V.borderColor,
|
|
2124
2116
|
borderWidth: F.border.width,
|
|
2125
2117
|
borderRadius: F.border.radius,
|
|
2126
|
-
color:
|
|
2127
|
-
cursor:
|
|
2118
|
+
color: V.color,
|
|
2119
|
+
cursor: V.cursor,
|
|
2128
2120
|
fontSize: F.fonts.size,
|
|
2129
|
-
opacity:
|
|
2130
|
-
...
|
|
2121
|
+
opacity: V.opacity,
|
|
2122
|
+
...g
|
|
2131
2123
|
// Top level style overrides
|
|
2132
2124
|
}, A = [
|
|
2133
2125
|
qe.select,
|
|
@@ -2137,17 +2129,17 @@ const Us = "Select-module__select___cjdcr", Ws = "Select-module__sizeSmall___i1q
|
|
|
2137
2129
|
return /* @__PURE__ */ Z(
|
|
2138
2130
|
"select",
|
|
2139
2131
|
{
|
|
2140
|
-
...
|
|
2132
|
+
...k,
|
|
2141
2133
|
className: A,
|
|
2142
2134
|
disabled: e,
|
|
2143
2135
|
id: o,
|
|
2144
2136
|
name: n,
|
|
2145
|
-
onChange:
|
|
2146
|
-
onBlur:
|
|
2137
|
+
onChange: u,
|
|
2138
|
+
onBlur: f,
|
|
2147
2139
|
value: l,
|
|
2148
2140
|
style: b,
|
|
2149
2141
|
children: [
|
|
2150
|
-
i !== "" && /* @__PURE__ */
|
|
2142
|
+
i !== "" && /* @__PURE__ */ x("option", { disabled: !0, value: "", children: i }),
|
|
2151
2143
|
y
|
|
2152
2144
|
]
|
|
2153
2145
|
}
|
|
@@ -2162,9 +2154,9 @@ function Qo({
|
|
|
2162
2154
|
className: n,
|
|
2163
2155
|
style: i,
|
|
2164
2156
|
children: l,
|
|
2165
|
-
...
|
|
2157
|
+
...u
|
|
2166
2158
|
}) {
|
|
2167
|
-
return /* @__PURE__ */
|
|
2159
|
+
return /* @__PURE__ */ x(
|
|
2168
2160
|
de,
|
|
2169
2161
|
{
|
|
2170
2162
|
name: e,
|
|
@@ -2174,15 +2166,15 @@ function Qo({
|
|
|
2174
2166
|
disabled: o,
|
|
2175
2167
|
className: n,
|
|
2176
2168
|
style: i,
|
|
2177
|
-
children: ({ value:
|
|
2169
|
+
children: ({ value: f, onChange: y, onBlur: m, name: g, error: k }) => /* @__PURE__ */ x(
|
|
2178
2170
|
Zs,
|
|
2179
2171
|
{
|
|
2180
|
-
...
|
|
2181
|
-
name:
|
|
2182
|
-
value:
|
|
2172
|
+
...u,
|
|
2173
|
+
name: g,
|
|
2174
|
+
value: f || "",
|
|
2183
2175
|
onChange: (F) => y(F.target.value),
|
|
2184
2176
|
onBlur: m,
|
|
2185
|
-
error:
|
|
2177
|
+
error: k,
|
|
2186
2178
|
children: l
|
|
2187
2179
|
}
|
|
2188
2180
|
)
|
|
@@ -2198,7 +2190,7 @@ function Ko({
|
|
|
2198
2190
|
style: n,
|
|
2199
2191
|
...i
|
|
2200
2192
|
}) {
|
|
2201
|
-
return /* @__PURE__ */
|
|
2193
|
+
return /* @__PURE__ */ x(
|
|
2202
2194
|
de,
|
|
2203
2195
|
{
|
|
2204
2196
|
name: e,
|
|
@@ -2207,13 +2199,13 @@ function Ko({
|
|
|
2207
2199
|
disabled: s,
|
|
2208
2200
|
className: o,
|
|
2209
2201
|
style: n,
|
|
2210
|
-
children: ({ value: l, onChange:
|
|
2202
|
+
children: ({ value: l, onChange: u, name: f, error: y }) => /* @__PURE__ */ x(
|
|
2211
2203
|
Ye,
|
|
2212
2204
|
{
|
|
2213
2205
|
...i,
|
|
2214
|
-
name:
|
|
2206
|
+
name: f,
|
|
2215
2207
|
checked: !!l,
|
|
2216
|
-
onChange: (m) =>
|
|
2208
|
+
onChange: (m) => u(m.target.checked),
|
|
2217
2209
|
error: y
|
|
2218
2210
|
}
|
|
2219
2211
|
)
|
|
@@ -2243,22 +2235,22 @@ const Qs = "Radio-module__container___AQxhk", Ks = "Radio-module__svg___zl5kF",
|
|
|
2243
2235
|
id: n,
|
|
2244
2236
|
onChange: i,
|
|
2245
2237
|
label: l,
|
|
2246
|
-
labelStyle:
|
|
2238
|
+
labelStyle: u,
|
|
2247
2239
|
// Style overrides
|
|
2248
|
-
className:
|
|
2240
|
+
className: f,
|
|
2249
2241
|
style: y,
|
|
2250
2242
|
// Element-specific props
|
|
2251
2243
|
divProps: m
|
|
2252
2244
|
}) => {
|
|
2253
|
-
const
|
|
2254
|
-
color:
|
|
2245
|
+
const g = H(), k = n || Kt(), F = g.colors.error, h = s ? F : e || g.colors.primary, w = Ys({
|
|
2246
|
+
color: h,
|
|
2255
2247
|
disabled: t
|
|
2256
|
-
}),
|
|
2248
|
+
}), V = (M) => {
|
|
2257
2249
|
t || i(M);
|
|
2258
2250
|
}, b = {
|
|
2259
|
-
cursor:
|
|
2260
|
-
fontSize:
|
|
2261
|
-
opacity:
|
|
2251
|
+
cursor: w.cursor,
|
|
2252
|
+
fontSize: g.fonts.size,
|
|
2253
|
+
opacity: w.opacity,
|
|
2262
2254
|
...y
|
|
2263
2255
|
// Top level style overrides
|
|
2264
2256
|
}, A = {
|
|
@@ -2266,19 +2258,19 @@ const Qs = "Radio-module__container___AQxhk", Ks = "Radio-module__svg___zl5kF",
|
|
|
2266
2258
|
}, $ = {
|
|
2267
2259
|
fill: "transparent",
|
|
2268
2260
|
strokeWidth: "12.5",
|
|
2269
|
-
stroke:
|
|
2261
|
+
stroke: w.radioColor
|
|
2270
2262
|
}, E = {
|
|
2271
|
-
fill:
|
|
2272
|
-
}, O = [Ge.container,
|
|
2263
|
+
fill: w.radioColor
|
|
2264
|
+
}, O = [Ge.container, f].filter(Boolean).join(" ");
|
|
2273
2265
|
return /* @__PURE__ */ Z("div", { ...m, className: O, style: b, children: [
|
|
2274
|
-
/* @__PURE__ */
|
|
2266
|
+
/* @__PURE__ */ x(
|
|
2275
2267
|
"input",
|
|
2276
2268
|
{
|
|
2277
|
-
id:
|
|
2269
|
+
id: k,
|
|
2278
2270
|
checked: r,
|
|
2279
2271
|
disabled: t,
|
|
2280
2272
|
name: o,
|
|
2281
|
-
onChange: (M) =>
|
|
2273
|
+
onChange: (M) => V({ target: { checked: M.target.checked, name: o, type: "radio" } }),
|
|
2282
2274
|
style: { display: "none" },
|
|
2283
2275
|
type: "radio"
|
|
2284
2276
|
}
|
|
@@ -2288,22 +2280,22 @@ const Qs = "Radio-module__container___AQxhk", Ks = "Radio-module__svg___zl5kF",
|
|
|
2288
2280
|
{
|
|
2289
2281
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2290
2282
|
viewBox: "0 0 100 100",
|
|
2291
|
-
onClick: () =>
|
|
2283
|
+
onClick: () => V({ target: { checked: !r, name: o, type: "radio" } }),
|
|
2292
2284
|
className: Ge.svg,
|
|
2293
2285
|
style: A,
|
|
2294
2286
|
children: [
|
|
2295
|
-
/* @__PURE__ */
|
|
2296
|
-
r && /* @__PURE__ */
|
|
2287
|
+
/* @__PURE__ */ x("circle", { cx: "50", cy: "50", r: "42.5", width: "100%", style: $ }),
|
|
2288
|
+
r && /* @__PURE__ */ x("circle", { cx: "50", cy: "50", r: "25", style: E })
|
|
2297
2289
|
]
|
|
2298
2290
|
}
|
|
2299
2291
|
),
|
|
2300
|
-
l && /* @__PURE__ */
|
|
2292
|
+
l && /* @__PURE__ */ x(
|
|
2301
2293
|
ot,
|
|
2302
2294
|
{
|
|
2303
|
-
htmlFor:
|
|
2295
|
+
htmlFor: k,
|
|
2304
2296
|
className: Ge.label,
|
|
2305
|
-
style: { paddingBottom: 0, ...
|
|
2306
|
-
color:
|
|
2297
|
+
style: { paddingBottom: 0, ...u },
|
|
2298
|
+
color: w.radioColor,
|
|
2307
2299
|
disabled: t,
|
|
2308
2300
|
error: s,
|
|
2309
2301
|
children: l
|
|
@@ -2320,9 +2312,9 @@ function Jo({
|
|
|
2320
2312
|
className: n,
|
|
2321
2313
|
style: i,
|
|
2322
2314
|
value: l,
|
|
2323
|
-
...
|
|
2315
|
+
...u
|
|
2324
2316
|
}) {
|
|
2325
|
-
return /* @__PURE__ */
|
|
2317
|
+
return /* @__PURE__ */ x(
|
|
2326
2318
|
de,
|
|
2327
2319
|
{
|
|
2328
2320
|
name: e,
|
|
@@ -2331,14 +2323,14 @@ function Jo({
|
|
|
2331
2323
|
disabled: o,
|
|
2332
2324
|
className: n,
|
|
2333
2325
|
style: i,
|
|
2334
|
-
children: ({ value:
|
|
2326
|
+
children: ({ value: f, onChange: y, name: m, error: g }) => /* @__PURE__ */ x(
|
|
2335
2327
|
hr,
|
|
2336
2328
|
{
|
|
2337
|
-
...
|
|
2329
|
+
...u,
|
|
2338
2330
|
name: m,
|
|
2339
|
-
checked:
|
|
2331
|
+
checked: f === l,
|
|
2340
2332
|
onChange: () => y(l),
|
|
2341
|
-
error:
|
|
2333
|
+
error: g,
|
|
2342
2334
|
label: r
|
|
2343
2335
|
}
|
|
2344
2336
|
)
|
|
@@ -2355,7 +2347,7 @@ function Yo({
|
|
|
2355
2347
|
style: i,
|
|
2356
2348
|
indent: l = !0
|
|
2357
2349
|
}) {
|
|
2358
|
-
return /* @__PURE__ */
|
|
2350
|
+
return /* @__PURE__ */ x(
|
|
2359
2351
|
de,
|
|
2360
2352
|
{
|
|
2361
2353
|
name: e,
|
|
@@ -2370,17 +2362,17 @@ function Yo({
|
|
|
2370
2362
|
marginBottom: ".25em"
|
|
2371
2363
|
}
|
|
2372
2364
|
},
|
|
2373
|
-
children: ({ value:
|
|
2365
|
+
children: ({ value: u, onChange: f, name: y, error: m }) => /* @__PURE__ */ x(xe, { children: s.map((g) => /* @__PURE__ */ x(
|
|
2374
2366
|
hr,
|
|
2375
2367
|
{
|
|
2376
2368
|
name: y,
|
|
2377
|
-
checked:
|
|
2378
|
-
onChange: () =>
|
|
2379
|
-
label:
|
|
2380
|
-
disabled: o ||
|
|
2369
|
+
checked: u === g.value,
|
|
2370
|
+
onChange: () => f(g.value),
|
|
2371
|
+
label: g.label,
|
|
2372
|
+
disabled: o || g.disabled,
|
|
2381
2373
|
error: m
|
|
2382
2374
|
},
|
|
2383
|
-
|
|
2375
|
+
g.value
|
|
2384
2376
|
)) })
|
|
2385
2377
|
}
|
|
2386
2378
|
);
|
|
@@ -2394,9 +2386,9 @@ function Xo({
|
|
|
2394
2386
|
disabled: n,
|
|
2395
2387
|
className: i,
|
|
2396
2388
|
style: l,
|
|
2397
|
-
indent:
|
|
2389
|
+
indent: u = !0
|
|
2398
2390
|
}) {
|
|
2399
|
-
return /* @__PURE__ */
|
|
2391
|
+
return /* @__PURE__ */ x(
|
|
2400
2392
|
de,
|
|
2401
2393
|
{
|
|
2402
2394
|
name: e,
|
|
@@ -2405,39 +2397,39 @@ function Xo({
|
|
|
2405
2397
|
disabled: n,
|
|
2406
2398
|
className: i,
|
|
2407
2399
|
style: l,
|
|
2408
|
-
indent:
|
|
2400
|
+
indent: u,
|
|
2409
2401
|
labelProps: {
|
|
2410
2402
|
style: {
|
|
2411
2403
|
marginBottom: ".25em"
|
|
2412
2404
|
}
|
|
2413
2405
|
},
|
|
2414
|
-
children: ({ value:
|
|
2415
|
-
const
|
|
2416
|
-
y(
|
|
2406
|
+
children: ({ value: f, onChange: y, name: m, error: g }) => {
|
|
2407
|
+
const k = Array.isArray(f) ? f : [], F = (h, w) => {
|
|
2408
|
+
y(w ? [...k, h] : k.filter((V) => V !== h));
|
|
2417
2409
|
};
|
|
2418
|
-
return /* @__PURE__ */
|
|
2410
|
+
return /* @__PURE__ */ x(xe, { children: s ? s.map((h) => /* @__PURE__ */ x(
|
|
2419
2411
|
Ye,
|
|
2420
2412
|
{
|
|
2421
2413
|
name: `${m}[]`,
|
|
2422
|
-
checked:
|
|
2423
|
-
onChange: (
|
|
2424
|
-
label:
|
|
2425
|
-
disabled: n ||
|
|
2426
|
-
error:
|
|
2414
|
+
checked: k.includes(h.value),
|
|
2415
|
+
onChange: (w) => F(h.value, w.target.checked),
|
|
2416
|
+
label: h.label,
|
|
2417
|
+
disabled: n || h.disabled,
|
|
2418
|
+
error: g
|
|
2427
2419
|
},
|
|
2428
|
-
|
|
2429
|
-
)) : z.Children.map(o, (
|
|
2430
|
-
if (z.isValidElement(
|
|
2431
|
-
const
|
|
2432
|
-
return z.cloneElement(
|
|
2420
|
+
h.value
|
|
2421
|
+
)) : z.Children.map(o, (h) => {
|
|
2422
|
+
if (z.isValidElement(h) && h.type === Ye) {
|
|
2423
|
+
const w = h.props.value || h.props.name;
|
|
2424
|
+
return z.cloneElement(h, {
|
|
2433
2425
|
name: `${m}[]`,
|
|
2434
|
-
checked:
|
|
2435
|
-
onChange: (
|
|
2436
|
-
error:
|
|
2437
|
-
disabled: n ||
|
|
2426
|
+
checked: k.includes(w),
|
|
2427
|
+
onChange: (V) => F(w, V.target.checked),
|
|
2428
|
+
error: g || h.props.error,
|
|
2429
|
+
disabled: n || h.props.disabled
|
|
2438
2430
|
});
|
|
2439
2431
|
}
|
|
2440
|
-
return
|
|
2432
|
+
return h;
|
|
2441
2433
|
}) });
|
|
2442
2434
|
}
|
|
2443
2435
|
}
|
|
@@ -2475,9 +2467,9 @@ const Xs = "Hamburger-module__hamburger___Tf4-t", eo = "Hamburger-module__line__
|
|
|
2475
2467
|
setOpen: i,
|
|
2476
2468
|
// Style overrides
|
|
2477
2469
|
className: l,
|
|
2478
|
-
style:
|
|
2470
|
+
style: u
|
|
2479
2471
|
}) => {
|
|
2480
|
-
const
|
|
2472
|
+
const f = ro({
|
|
2481
2473
|
compact: t,
|
|
2482
2474
|
color: e,
|
|
2483
2475
|
visible: r,
|
|
@@ -2489,13 +2481,13 @@ const Xs = "Hamburger-module__hamburger___Tf4-t", eo = "Hamburger-module__line__
|
|
|
2489
2481
|
ref: s,
|
|
2490
2482
|
className: y,
|
|
2491
2483
|
onClick: () => i(!o),
|
|
2492
|
-
style: { ...
|
|
2484
|
+
style: { ...f, ...u },
|
|
2493
2485
|
"aria-label": "Toggle menu",
|
|
2494
2486
|
"aria-expanded": o,
|
|
2495
2487
|
children: [
|
|
2496
|
-
/* @__PURE__ */
|
|
2497
|
-
/* @__PURE__ */
|
|
2498
|
-
/* @__PURE__ */
|
|
2488
|
+
/* @__PURE__ */ x("div", { className: ve.line }),
|
|
2489
|
+
/* @__PURE__ */ x("div", { className: ve.line }),
|
|
2490
|
+
/* @__PURE__ */ x("div", { className: ve.line })
|
|
2499
2491
|
]
|
|
2500
2492
|
}
|
|
2501
2493
|
);
|
|
@@ -2511,8 +2503,8 @@ const Xs = "Hamburger-module__hamburger___Tf4-t", eo = "Hamburger-module__line__
|
|
|
2511
2503
|
paddingSm: n,
|
|
2512
2504
|
padding: i,
|
|
2513
2505
|
margin: l,
|
|
2514
|
-
gap:
|
|
2515
|
-
backgroundColor:
|
|
2506
|
+
gap: u,
|
|
2507
|
+
backgroundColor: f,
|
|
2516
2508
|
color: y
|
|
2517
2509
|
} = {}) => {
|
|
2518
2510
|
const m = H();
|
|
@@ -2523,8 +2515,8 @@ const Xs = "Hamburger-module__hamburger___Tf4-t", eo = "Hamburger-module__line__
|
|
|
2523
2515
|
"--header-height": o,
|
|
2524
2516
|
"--header-padding": e ? n || m.layout.paddingSm : i || m.layout.padding,
|
|
2525
2517
|
"--header-margin": l,
|
|
2526
|
-
"--header-gap":
|
|
2527
|
-
backgroundColor:
|
|
2518
|
+
"--header-gap": u,
|
|
2519
|
+
backgroundColor: f,
|
|
2528
2520
|
color: y
|
|
2529
2521
|
};
|
|
2530
2522
|
}, ie = (e) => {
|
|
@@ -2546,19 +2538,19 @@ const Xs = "Hamburger-module__hamburger___Tf4-t", eo = "Hamburger-module__line__
|
|
|
2546
2538
|
height: n,
|
|
2547
2539
|
padding: i,
|
|
2548
2540
|
paddingSm: l,
|
|
2549
|
-
margin:
|
|
2550
|
-
gap:
|
|
2541
|
+
margin: u,
|
|
2542
|
+
gap: f,
|
|
2551
2543
|
breakpoint: y,
|
|
2552
2544
|
fixed: m = !1,
|
|
2553
2545
|
// Content
|
|
2554
|
-
children:
|
|
2546
|
+
children: g,
|
|
2555
2547
|
// Style overrides
|
|
2556
|
-
className:
|
|
2548
|
+
className: k,
|
|
2557
2549
|
style: F,
|
|
2558
2550
|
// Element-specific props
|
|
2559
|
-
headerProps:
|
|
2551
|
+
headerProps: h
|
|
2560
2552
|
}) => {
|
|
2561
|
-
const
|
|
2553
|
+
const w = H(), V = y || w.breakpoints.sm, { maxWidth: b, unit: A } = Ee(V), $ = ie(`(max-width: ${b}${A})`), E = io({
|
|
2562
2554
|
isSmallScreen: $,
|
|
2563
2555
|
maxWidth: t,
|
|
2564
2556
|
minWidth: s,
|
|
@@ -2566,17 +2558,17 @@ const Xs = "Hamburger-module__hamburger___Tf4-t", eo = "Hamburger-module__line__
|
|
|
2566
2558
|
height: n,
|
|
2567
2559
|
paddingSm: l,
|
|
2568
2560
|
padding: i,
|
|
2569
|
-
margin:
|
|
2570
|
-
gap:
|
|
2561
|
+
margin: u,
|
|
2562
|
+
gap: f,
|
|
2571
2563
|
backgroundColor: e,
|
|
2572
2564
|
color: r
|
|
2573
|
-
}), O = [jt.container,
|
|
2574
|
-
return /* @__PURE__ */
|
|
2565
|
+
}), O = [jt.container, k].filter(Boolean).join(" "), M = m ? { position: "fixed", top: 0, left: 0, right: 0, zIndex: 1e3 } : {};
|
|
2566
|
+
return /* @__PURE__ */ x("header", { ...h, className: jt.header, style: M, children: /* @__PURE__ */ x(
|
|
2575
2567
|
"div",
|
|
2576
2568
|
{
|
|
2577
2569
|
className: O,
|
|
2578
2570
|
style: { ...E, ...F },
|
|
2579
|
-
children:
|
|
2571
|
+
children: g
|
|
2580
2572
|
}
|
|
2581
2573
|
) });
|
|
2582
2574
|
}, 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 = {
|
|
@@ -2593,26 +2585,26 @@ const Xs = "Hamburger-module__hamburger___Tf4-t", eo = "Hamburger-module__line__
|
|
|
2593
2585
|
desktop: s
|
|
2594
2586
|
}) => {
|
|
2595
2587
|
const o = H();
|
|
2596
|
-
return
|
|
2588
|
+
return Pe(() => {
|
|
2597
2589
|
if (e) {
|
|
2598
|
-
const n = (t == null ? void 0 : t.backgroundColor) || o.colors.primary, i = (t == null ? void 0 : t.color) || o.colors.secondary, l = (t == null ? void 0 : t.activeBackgroundColor) || o.colors.secondary,
|
|
2590
|
+
const n = (t == null ? void 0 : t.backgroundColor) || o.colors.primary, i = (t == null ? void 0 : t.color) || o.colors.secondary, l = (t == null ? void 0 : t.activeBackgroundColor) || o.colors.secondary, u = (t == null ? void 0 : t.activeColor) || o.colors.primary, f = r || t != null && t.compact ? "1.5rem" : "2rem";
|
|
2599
2591
|
return {
|
|
2600
2592
|
navStyles: {
|
|
2601
2593
|
backgroundColor: n,
|
|
2602
2594
|
color: i,
|
|
2603
|
-
fontSize:
|
|
2595
|
+
fontSize: f,
|
|
2604
2596
|
...t == null ? void 0 : t.style
|
|
2605
2597
|
},
|
|
2606
2598
|
linkActiveStyles: {
|
|
2607
2599
|
backgroundColor: l,
|
|
2608
|
-
color:
|
|
2600
|
+
color: u
|
|
2609
2601
|
},
|
|
2610
2602
|
linkHoverStyles: {
|
|
2611
2603
|
// No hover styles on mobile (touch devices)
|
|
2612
2604
|
}
|
|
2613
2605
|
};
|
|
2614
2606
|
} else {
|
|
2615
|
-
const n = s == null ? void 0 : s.backgroundColor, i = (s == null ? void 0 : s.color) || o.fonts.color, l = (s == null ? void 0 : s.hoverOpacity) ?? 0.5,
|
|
2607
|
+
const n = s == null ? void 0 : s.backgroundColor, i = (s == null ? void 0 : s.color) || o.fonts.color, l = (s == null ? void 0 : s.hoverOpacity) ?? 0.5, u = s == null ? void 0 : s.activeBackgroundColor, f = s == null ? void 0 : s.activeColor;
|
|
2616
2608
|
return {
|
|
2617
2609
|
navStyles: {
|
|
2618
2610
|
...n && { backgroundColor: n },
|
|
@@ -2620,9 +2612,9 @@ const Xs = "Hamburger-module__hamburger___Tf4-t", eo = "Hamburger-module__line__
|
|
|
2620
2612
|
...s == null ? void 0 : s.style
|
|
2621
2613
|
},
|
|
2622
2614
|
linkActiveStyles: {
|
|
2623
|
-
...
|
|
2624
|
-
...
|
|
2625
|
-
opacity:
|
|
2615
|
+
...u && { backgroundColor: u },
|
|
2616
|
+
...f && { color: f },
|
|
2617
|
+
opacity: u || f ? 1 : l
|
|
2626
2618
|
},
|
|
2627
2619
|
linkHoverStyles: {
|
|
2628
2620
|
opacity: l
|
|
@@ -2640,8 +2632,8 @@ const Xs = "Hamburger-module__hamburger___Tf4-t", eo = "Hamburger-module__line__
|
|
|
2640
2632
|
navProps: i
|
|
2641
2633
|
}) => {
|
|
2642
2634
|
var J;
|
|
2643
|
-
const [l,
|
|
2644
|
-
isMobile:
|
|
2635
|
+
const [l, u] = st(!1), f = Ft(null), y = Ft(null), m = H(), g = { ...m.breakpoints, ...t }, { maxWidth: k, unit: F } = Ee(g.md), { maxWidth: h, unit: w } = Ee(g.sm), V = ie(`(max-width: ${k}${F})`), b = ie(`(max-width: ${h}${w})`), { navStyles: A, linkActiveStyles: $, linkHoverStyles: E } = ho({
|
|
2636
|
+
isMobile: V,
|
|
2645
2637
|
isCompact: b,
|
|
2646
2638
|
mobile: e,
|
|
2647
2639
|
desktop: r
|
|
@@ -2658,39 +2650,39 @@ const Xs = "Hamburger-module__hamburger___Tf4-t", eo = "Hamburger-module__line__
|
|
|
2658
2650
|
}
|
|
2659
2651
|
};
|
|
2660
2652
|
Ke(() => {
|
|
2661
|
-
if (
|
|
2653
|
+
if (V && l) {
|
|
2662
2654
|
const N = window.scrollY;
|
|
2663
2655
|
return document.body.style.position = "fixed", document.body.style.top = `-${N}px`, document.body.style.width = "100%", () => {
|
|
2664
2656
|
document.body.style.position = "", document.body.style.top = "", document.body.style.width = "", window.scrollTo(0, N);
|
|
2665
2657
|
};
|
|
2666
2658
|
}
|
|
2667
|
-
}, [
|
|
2659
|
+
}, [V, l]), Ke(() => {
|
|
2668
2660
|
const N = (R) => {
|
|
2669
|
-
!y.current || y.current.contains(R.target) ||
|
|
2661
|
+
!y.current || y.current.contains(R.target) || f.current && f.current.contains(R.target) || u(!1);
|
|
2670
2662
|
};
|
|
2671
2663
|
return document.addEventListener("mousedown", N), () => {
|
|
2672
2664
|
document.removeEventListener("mousedown", N);
|
|
2673
2665
|
};
|
|
2674
|
-
}, [
|
|
2666
|
+
}, [f, y, u]);
|
|
2675
2667
|
const M = [
|
|
2676
2668
|
he.nav,
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2669
|
+
V ? he.navMobile : he.navDesktop,
|
|
2670
|
+
V && l ? he.open : "",
|
|
2671
|
+
V && (b || e != null && e.compact) ? he.compact : "",
|
|
2680
2672
|
o
|
|
2681
2673
|
].filter(Boolean).join(" "), te = (N) => {
|
|
2682
|
-
if (!
|
|
2683
|
-
N.target.closest("a, button") &&
|
|
2684
|
-
}, U =
|
|
2674
|
+
if (!V) return;
|
|
2675
|
+
N.target.closest("a, button") && u(!1);
|
|
2676
|
+
}, U = V ? (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;
|
|
2685
2677
|
return /* @__PURE__ */ Z(xe, { children: [
|
|
2686
|
-
/* @__PURE__ */
|
|
2678
|
+
/* @__PURE__ */ x(
|
|
2687
2679
|
so,
|
|
2688
2680
|
{
|
|
2689
|
-
hamburgerRef:
|
|
2690
|
-
visible:
|
|
2681
|
+
hamburgerRef: f,
|
|
2682
|
+
visible: V,
|
|
2691
2683
|
compact: b,
|
|
2692
2684
|
open: l,
|
|
2693
|
-
setOpen:
|
|
2685
|
+
setOpen: u,
|
|
2694
2686
|
color: ae,
|
|
2695
2687
|
...e == null ? void 0 : e.hamburgerProps
|
|
2696
2688
|
}
|
|
@@ -2704,8 +2696,8 @@ const Xs = "Hamburger-module__hamburger___Tf4-t", eo = "Hamburger-module__line__
|
|
|
2704
2696
|
style: { ...O, ...n },
|
|
2705
2697
|
onClickCapture: te,
|
|
2706
2698
|
children: [
|
|
2707
|
-
|
|
2708
|
-
typeof U == "function" ? U({ setOpen:
|
|
2699
|
+
V && l && /* @__PURE__ */ x("div", { className: he.navHeader }),
|
|
2700
|
+
typeof U == "function" ? U({ setOpen: u }) : U
|
|
2709
2701
|
]
|
|
2710
2702
|
}
|
|
2711
2703
|
)
|
|
@@ -2722,7 +2714,7 @@ const Xs = "Hamburger-module__hamburger___Tf4-t", eo = "Hamburger-module__line__
|
|
|
2722
2714
|
// Element-specific props
|
|
2723
2715
|
divProps: n
|
|
2724
2716
|
}) => {
|
|
2725
|
-
const i = H(), l = e || i.colors.primary,
|
|
2717
|
+
const i = H(), l = e || i.colors.primary, u = r || i.colors.secondary, f = /* @__PURE__ */ x(
|
|
2726
2718
|
"div",
|
|
2727
2719
|
{
|
|
2728
2720
|
...t ? void 0 : n,
|
|
@@ -2738,19 +2730,19 @@ const Xs = "Hamburger-module__hamburger___Tf4-t", eo = "Hamburger-module__line__
|
|
|
2738
2730
|
// Apply user style (can override fontSize, etc.)
|
|
2739
2731
|
border: `0.1em solid ${l}`,
|
|
2740
2732
|
// Color borders always take precedence
|
|
2741
|
-
borderTop: `0.1em solid ${
|
|
2733
|
+
borderTop: `0.1em solid ${u}`
|
|
2742
2734
|
}
|
|
2743
2735
|
}
|
|
2744
2736
|
), y = /* @__PURE__ */ Z(xe, { children: [
|
|
2745
|
-
|
|
2746
|
-
/* @__PURE__ */
|
|
2737
|
+
f,
|
|
2738
|
+
/* @__PURE__ */ x("style", { children: `
|
|
2747
2739
|
@keyframes spin {
|
|
2748
2740
|
0% { transform: rotate(0deg); }
|
|
2749
2741
|
100% { transform: rotate(360deg); }
|
|
2750
2742
|
}
|
|
2751
2743
|
` })
|
|
2752
2744
|
] });
|
|
2753
|
-
return t ? /* @__PURE__ */
|
|
2745
|
+
return t ? /* @__PURE__ */ x(
|
|
2754
2746
|
"div",
|
|
2755
2747
|
{
|
|
2756
2748
|
...n,
|
|
@@ -2773,7 +2765,7 @@ const Xs = "Hamburger-module__hamburger___Tf4-t", eo = "Hamburger-module__line__
|
|
|
2773
2765
|
requestAnimationFrame(() => {
|
|
2774
2766
|
s(!0);
|
|
2775
2767
|
});
|
|
2776
|
-
}, []), t ? /* @__PURE__ */
|
|
2768
|
+
}, []), t ? /* @__PURE__ */ x(xe, { children: e }) : r || /* @__PURE__ */ x(go, {});
|
|
2777
2769
|
}, _o = "Stack-module__stack___yUU-B", po = "Stack-module__vertical___sKTyQ", vo = "Stack-module__horizontal___YsvtV", Ze = {
|
|
2778
2770
|
stack: _o,
|
|
2779
2771
|
vertical: po,
|
|
@@ -2794,7 +2786,7 @@ const Xs = "Hamburger-module__hamburger___Tf4-t", eo = "Hamburger-module__line__
|
|
|
2794
2786
|
e === "row" ? Ze.horizontal : Ze.vertical,
|
|
2795
2787
|
t
|
|
2796
2788
|
].filter(Boolean).join(" ");
|
|
2797
|
-
return /* @__PURE__ */
|
|
2789
|
+
return /* @__PURE__ */ x("div", { ...o, className: n, style: s, children: r });
|
|
2798
2790
|
}, bo = "ResponsiveSection-module__section___gBESK", So = "ResponsiveSection-module__innerDiv___r1bky", It = {
|
|
2799
2791
|
section: bo,
|
|
2800
2792
|
innerDiv: So
|
|
@@ -2809,32 +2801,32 @@ const Xs = "Hamburger-module__hamburger___Tf4-t", eo = "Hamburger-module__line__
|
|
|
2809
2801
|
height: n,
|
|
2810
2802
|
padding: i,
|
|
2811
2803
|
paddingSm: l,
|
|
2812
|
-
margin:
|
|
2813
|
-
gap:
|
|
2804
|
+
margin: u,
|
|
2805
|
+
gap: f,
|
|
2814
2806
|
verticalRhythm: y = 3,
|
|
2815
2807
|
// Content
|
|
2816
2808
|
children: m,
|
|
2817
2809
|
// Style overrides
|
|
2818
|
-
className:
|
|
2819
|
-
style:
|
|
2810
|
+
className: g,
|
|
2811
|
+
style: k,
|
|
2820
2812
|
// Element-specific props
|
|
2821
2813
|
sectionProps: F
|
|
2822
2814
|
}) => {
|
|
2823
|
-
const
|
|
2815
|
+
const h = H(), w = ie(`(min-width: ${h.breakpoints.sm})`), V = {
|
|
2824
2816
|
backgroundColor: e,
|
|
2825
|
-
color: r ||
|
|
2826
|
-
margin:
|
|
2827
|
-
...
|
|
2817
|
+
color: r || h.fonts.color,
|
|
2818
|
+
margin: u,
|
|
2819
|
+
...k
|
|
2828
2820
|
// Top level style prop overrides
|
|
2829
|
-
}, b = `calc(${
|
|
2830
|
-
"--max-width": t ||
|
|
2821
|
+
}, b = `calc(${h.fonts.rhythm} * ${y})`, A = w ? i || h.layout.padding : l || h.layout.paddingSm, $ = {
|
|
2822
|
+
"--max-width": t || h.layout.maxWidth,
|
|
2831
2823
|
"--min-width": s,
|
|
2832
2824
|
"--width": o,
|
|
2833
2825
|
"--height": n,
|
|
2834
2826
|
"--section-padding": `${b} ${A}`,
|
|
2835
|
-
"--gap":
|
|
2836
|
-
}, E = [It.section,
|
|
2837
|
-
return /* @__PURE__ */
|
|
2827
|
+
"--gap": f
|
|
2828
|
+
}, E = [It.section, g].filter(Boolean).join(" ");
|
|
2829
|
+
return /* @__PURE__ */ x("section", { ...F, className: E, style: V, children: /* @__PURE__ */ x("div", { className: It.innerDiv, style: $, children: m }) });
|
|
2838
2830
|
}, xo = "Hero-module__hero___IB2tg", Fo = "Hero-module__content___rkkfQ", Ut = {
|
|
2839
2831
|
hero: xo,
|
|
2840
2832
|
content: Fo
|
|
@@ -2842,7 +2834,7 @@ const Xs = "Hamburger-module__hamburger___Tf4-t", eo = "Hamburger-module__line__
|
|
|
2842
2834
|
isMd: e = !1,
|
|
2843
2835
|
isLg: r = !1,
|
|
2844
2836
|
theme: t
|
|
2845
|
-
}) =>
|
|
2837
|
+
}) => Pe(() => {
|
|
2846
2838
|
const { rhythm: s } = t.fonts;
|
|
2847
2839
|
let o = `calc(${s} * 2) 0`, n = "2rem", i = "1.125rem";
|
|
2848
2840
|
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"), {
|
|
@@ -2863,15 +2855,15 @@ const Xs = "Hamburger-module__hamburger___Tf4-t", eo = "Hamburger-module__line__
|
|
|
2863
2855
|
style: o,
|
|
2864
2856
|
...n
|
|
2865
2857
|
}) => {
|
|
2866
|
-
const i = H(), l = [Ut.hero, s].filter(Boolean).join(" "),
|
|
2867
|
-
return /* @__PURE__ */
|
|
2858
|
+
const i = H(), l = [Ut.hero, s].filter(Boolean).join(" "), u = (r == null ? void 0 : r.md) || i.breakpoints.md, f = (r == null ? void 0 : r.lg) || i.breakpoints.lg, y = ie(`(min-width: ${u})`), m = ie(`(min-width: ${f})`), g = Co({ isMd: y, isLg: m, theme: i });
|
|
2859
|
+
return /* @__PURE__ */ x(
|
|
2868
2860
|
gr,
|
|
2869
2861
|
{
|
|
2870
2862
|
className: l,
|
|
2871
2863
|
color: e || i.fonts.color,
|
|
2872
|
-
style: { ...
|
|
2864
|
+
style: { ...g, ...o },
|
|
2873
2865
|
...n,
|
|
2874
|
-
children: /* @__PURE__ */
|
|
2866
|
+
children: /* @__PURE__ */ x("div", { className: Ut.content, children: t })
|
|
2875
2867
|
}
|
|
2876
2868
|
);
|
|
2877
2869
|
}, wo = "Footer-module__footer___A76NF", Vo = "Footer-module__container___QneNs", Wt = {
|
|
@@ -2886,8 +2878,8 @@ const Xs = "Hamburger-module__hamburger___Tf4-t", eo = "Hamburger-module__line__
|
|
|
2886
2878
|
paddingSm: n,
|
|
2887
2879
|
padding: i,
|
|
2888
2880
|
margin: l,
|
|
2889
|
-
gap:
|
|
2890
|
-
backgroundColor:
|
|
2881
|
+
gap: u,
|
|
2882
|
+
backgroundColor: f,
|
|
2891
2883
|
color: y
|
|
2892
2884
|
} = {}) => {
|
|
2893
2885
|
const m = H();
|
|
@@ -2898,8 +2890,8 @@ const Xs = "Hamburger-module__hamburger___Tf4-t", eo = "Hamburger-module__line__
|
|
|
2898
2890
|
height: o,
|
|
2899
2891
|
padding: e ? n || m.layout.paddingSm : i || m.layout.padding,
|
|
2900
2892
|
margin: l,
|
|
2901
|
-
gap:
|
|
2902
|
-
backgroundColor:
|
|
2893
|
+
gap: u,
|
|
2894
|
+
backgroundColor: f,
|
|
2903
2895
|
color: y || m.fonts.color
|
|
2904
2896
|
};
|
|
2905
2897
|
}, zo = ({
|
|
@@ -2913,18 +2905,18 @@ const Xs = "Hamburger-module__hamburger___Tf4-t", eo = "Hamburger-module__line__
|
|
|
2913
2905
|
height: n,
|
|
2914
2906
|
padding: i,
|
|
2915
2907
|
paddingSm: l,
|
|
2916
|
-
margin:
|
|
2917
|
-
gap:
|
|
2908
|
+
margin: u,
|
|
2909
|
+
gap: f,
|
|
2918
2910
|
breakPoint: y,
|
|
2919
2911
|
// Content
|
|
2920
2912
|
children: m,
|
|
2921
2913
|
// Style overrides
|
|
2922
|
-
className:
|
|
2923
|
-
style:
|
|
2914
|
+
className: g,
|
|
2915
|
+
style: k,
|
|
2924
2916
|
// Element-specific props
|
|
2925
2917
|
footerProps: F
|
|
2926
2918
|
}) => {
|
|
2927
|
-
const
|
|
2919
|
+
const h = H(), w = y || h.breakpoints.sm, { maxWidth: V, unit: b } = Ee(w), A = ie(`(max-width: ${V}${b})`), $ = ko({
|
|
2928
2920
|
isSmallScreen: A,
|
|
2929
2921
|
maxWidth: t,
|
|
2930
2922
|
minWidth: s,
|
|
@@ -2932,12 +2924,12 @@ const Xs = "Hamburger-module__hamburger___Tf4-t", eo = "Hamburger-module__line__
|
|
|
2932
2924
|
height: n,
|
|
2933
2925
|
paddingSm: l,
|
|
2934
2926
|
padding: i,
|
|
2935
|
-
margin:
|
|
2936
|
-
gap:
|
|
2927
|
+
margin: u,
|
|
2928
|
+
gap: f,
|
|
2937
2929
|
backgroundColor: e,
|
|
2938
2930
|
color: r
|
|
2939
|
-
}), E = [Wt.container,
|
|
2940
|
-
return /* @__PURE__ */
|
|
2931
|
+
}), E = [Wt.container, g].filter(Boolean).join(" ");
|
|
2932
|
+
return /* @__PURE__ */ x("footer", { ...F, className: Wt.footer, children: /* @__PURE__ */ x("div", { className: E, style: { ...$, ...k }, children: m }) });
|
|
2941
2933
|
}, $o = "FeatureCard-module__card___XQt66", Ao = "FeatureCard-module__icon___dXJ92", Eo = "FeatureCard-module__title___KxXyA", No = "FeatureCard-module__content___68xkw", Ae = {
|
|
2942
2934
|
card: $o,
|
|
2943
2935
|
icon: Ao,
|
|
@@ -2946,7 +2938,7 @@ const Xs = "Hamburger-module__hamburger___Tf4-t", eo = "Hamburger-module__line__
|
|
|
2946
2938
|
}, Ro = ({
|
|
2947
2939
|
isMd: e = !1,
|
|
2948
2940
|
theme: r
|
|
2949
|
-
}) =>
|
|
2941
|
+
}) => Pe(() => {
|
|
2950
2942
|
const { rhythm: t } = r.fonts;
|
|
2951
2943
|
return {
|
|
2952
2944
|
"--feature-icon-font-size": e ? "3rem" : "2.5rem",
|
|
@@ -2968,28 +2960,28 @@ const Xs = "Hamburger-module__hamburger___Tf4-t", eo = "Hamburger-module__line__
|
|
|
2968
2960
|
// Element-specific props
|
|
2969
2961
|
divProps: i
|
|
2970
2962
|
}) => {
|
|
2971
|
-
const l = H(),
|
|
2963
|
+
const l = H(), u = [Ae.card, o].filter(Boolean).join(" "), f = e || l.breakpoints.md, y = ie(`(min-width: ${f})`), m = Ro({ isMd: y, theme: l });
|
|
2972
2964
|
return /* @__PURE__ */ Z(
|
|
2973
2965
|
"div",
|
|
2974
2966
|
{
|
|
2975
2967
|
...i,
|
|
2976
|
-
className:
|
|
2968
|
+
className: u,
|
|
2977
2969
|
style: { ...m, ...n },
|
|
2978
2970
|
children: [
|
|
2979
|
-
r && /* @__PURE__ */
|
|
2980
|
-
/* @__PURE__ */
|
|
2981
|
-
/* @__PURE__ */
|
|
2971
|
+
r && /* @__PURE__ */ x("div", { className: Ae.icon, children: r }),
|
|
2972
|
+
/* @__PURE__ */ x("h3", { className: Ae.title, children: t }),
|
|
2973
|
+
/* @__PURE__ */ x("div", { className: Ae.content, children: s })
|
|
2982
2974
|
]
|
|
2983
2975
|
}
|
|
2984
2976
|
);
|
|
2985
|
-
}, Bo = "FeatureGridSection-module__section___wZrbC",
|
|
2977
|
+
}, Bo = "FeatureGridSection-module__section___wZrbC", Po = "FeatureGridSection-module__grid___iwPJv", qt = {
|
|
2986
2978
|
section: Bo,
|
|
2987
|
-
grid:
|
|
2988
|
-
},
|
|
2979
|
+
grid: Po
|
|
2980
|
+
}, Do = ({
|
|
2989
2981
|
columns: e,
|
|
2990
2982
|
isMd: r = !1,
|
|
2991
2983
|
isLg: t = !1
|
|
2992
|
-
}) =>
|
|
2984
|
+
}) => Pe(() => r ? r && !t && (e === 3 || e === 4) ? {
|
|
2993
2985
|
"--grid-template-columns": "repeat(2, 1fr)"
|
|
2994
2986
|
} : {
|
|
2995
2987
|
"--grid-template-columns": {
|
|
@@ -3012,14 +3004,14 @@ const Xs = "Hamburger-module__hamburger___Tf4-t", eo = "Hamburger-module__line__
|
|
|
3012
3004
|
style: n,
|
|
3013
3005
|
...i
|
|
3014
3006
|
}) => {
|
|
3015
|
-
const l = H(),
|
|
3007
|
+
const l = H(), u = [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})`), g = ie(`(min-width: ${y})`), k = Do({ columns: e, isMd: m, isLg: g }), F = {
|
|
3016
3008
|
"--section-padding-vertical": `calc(${l.fonts.rhythm} * 2)`
|
|
3017
|
-
},
|
|
3018
|
-
...
|
|
3009
|
+
}, h = {
|
|
3010
|
+
...k,
|
|
3019
3011
|
gap: t,
|
|
3020
3012
|
...n
|
|
3021
3013
|
};
|
|
3022
|
-
return /* @__PURE__ */
|
|
3014
|
+
return /* @__PURE__ */ x(gr, { className: u, style: F, ...i, children: /* @__PURE__ */ x("div", { className: qt.grid, style: h, children: s }) });
|
|
3023
3015
|
}, Lo = "PageLayout-module__layoutContainer___diLdT", Ho = "PageLayout-module__content___h2mBr", Oo = "PageLayout-module__main___Sw7Pv", Qe = {
|
|
3024
3016
|
layoutContainer: Lo,
|
|
3025
3017
|
content: Ho,
|
|
@@ -3036,15 +3028,15 @@ const Xs = "Hamburger-module__hamburger___Tf4-t", eo = "Hamburger-module__line__
|
|
|
3036
3028
|
headerProps: n,
|
|
3037
3029
|
footerProps: i,
|
|
3038
3030
|
divProps: l,
|
|
3039
|
-
mainProps:
|
|
3031
|
+
mainProps: u
|
|
3040
3032
|
}) => {
|
|
3041
|
-
const
|
|
3042
|
-
return /* @__PURE__ */ Z("div", { ...l, className:
|
|
3033
|
+
const f = [Qe.layoutContainer, s].filter(Boolean).join(" ");
|
|
3034
|
+
return /* @__PURE__ */ Z("div", { ...l, className: f, style: o, children: [
|
|
3043
3035
|
/* @__PURE__ */ Z("div", { className: Qe.content, children: [
|
|
3044
|
-
e && /* @__PURE__ */
|
|
3045
|
-
/* @__PURE__ */
|
|
3036
|
+
e && /* @__PURE__ */ x(ao, { ...n, children: e }),
|
|
3037
|
+
/* @__PURE__ */ x("main", { ...u, className: Qe.main, children: t })
|
|
3046
3038
|
] }),
|
|
3047
|
-
r && /* @__PURE__ */
|
|
3039
|
+
r && /* @__PURE__ */ x(zo, { ...i, children: r })
|
|
3048
3040
|
] });
|
|
3049
3041
|
};
|
|
3050
3042
|
export {
|