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