@amstfn/td-design-system 0.3.0
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/CHANGELOG.md +45 -0
- package/README.md +219 -0
- package/dist/data-grid.cjs +2 -0
- package/dist/data-grid.cjs.map +1 -0
- package/dist/data-grid.d.ts +218 -0
- package/dist/data-grid.es.js +356 -0
- package/dist/data-grid.es.js.map +1 -0
- package/dist/design-system.css +1 -0
- package/dist/favicon.svg +1 -0
- package/dist/icons.svg +24 -0
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +2463 -0
- package/dist/index.es.js +3765 -0
- package/dist/index.es.js.map +1 -0
- package/dist/spacing-BkZfHpT0.cjs +2 -0
- package/dist/spacing-BkZfHpT0.cjs.map +1 -0
- package/dist/spacing-C8pTXcGE.js +15 -0
- package/dist/spacing-C8pTXcGE.js.map +1 -0
- package/package.json +129 -0
package/dist/index.es.js
ADDED
|
@@ -0,0 +1,3765 @@
|
|
|
1
|
+
import { jsx as y, jsxs as zr } from "react/jsx-runtime";
|
|
2
|
+
import { Alert as Hr, Button as Er, Form as he, Checkbox as Kt, Collapse as wr, Radio as lt, DatePicker as Pr, FloatButton as Qt, Input as Vr, AutoComplete as _r, Select as Lr, Modal as Rr, Flex as Wr, Skeleton as Be, Tag as Or, Typography as Ue, theme as Ht, ConfigProvider as Gr } from "antd";
|
|
3
|
+
import B, { memo as H, useId as Ae, isValidElement as st, cloneElement as ye, Children as Nr, Fragment as jt, useContext as Yt, useMemo as _e, createContext as Ur } from "react";
|
|
4
|
+
import { T as de } from "./spacing-C8pTXcGE.js";
|
|
5
|
+
import Xr from "antd/locale/en_US";
|
|
6
|
+
import qr from "antd/locale/fa_IR";
|
|
7
|
+
import $r from "antd-jalali-v5";
|
|
8
|
+
import "dayjs/locale/fa";
|
|
9
|
+
const Kr = {
|
|
10
|
+
success: "success",
|
|
11
|
+
info: "info",
|
|
12
|
+
warning: "warning",
|
|
13
|
+
error: "error"
|
|
14
|
+
}, Qr = {
|
|
15
|
+
filled: "filled"
|
|
16
|
+
}, si = H(function({
|
|
17
|
+
type: r = Kr.success,
|
|
18
|
+
variant: t = Qr.filled,
|
|
19
|
+
showIcon: i = !0,
|
|
20
|
+
...a
|
|
21
|
+
}) {
|
|
22
|
+
return /* @__PURE__ */ y(Hr, { ...a, type: r, variant: t, showIcon: i });
|
|
23
|
+
}), De = {
|
|
24
|
+
brand: "brand",
|
|
25
|
+
neutral: "neutral",
|
|
26
|
+
danger: "danger"
|
|
27
|
+
}, fe = {
|
|
28
|
+
contained: "contained",
|
|
29
|
+
outlined: "outlined",
|
|
30
|
+
tinted: "tinted",
|
|
31
|
+
text: "text",
|
|
32
|
+
link: "link"
|
|
33
|
+
}, Le = {
|
|
34
|
+
small: "small",
|
|
35
|
+
medium: "medium",
|
|
36
|
+
large: "large"
|
|
37
|
+
}, jr = {
|
|
38
|
+
[De.brand]: "primary",
|
|
39
|
+
[De.neutral]: "default",
|
|
40
|
+
[De.danger]: "danger"
|
|
41
|
+
}, Yr = {
|
|
42
|
+
[fe.contained]: "solid",
|
|
43
|
+
[fe.outlined]: "outlined",
|
|
44
|
+
[fe.tinted]: "filled",
|
|
45
|
+
[fe.text]: "text",
|
|
46
|
+
[fe.link]: "link"
|
|
47
|
+
}, Zr = {
|
|
48
|
+
[Le.small]: "small",
|
|
49
|
+
[Le.medium]: "middle",
|
|
50
|
+
[Le.large]: "large"
|
|
51
|
+
};
|
|
52
|
+
function Jr(e, r) {
|
|
53
|
+
return e === De.neutral && r === fe.link ? { type: "link" } : {
|
|
54
|
+
color: jr[e],
|
|
55
|
+
variant: Yr[r]
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
const di = H(function({
|
|
59
|
+
fullWidth: r,
|
|
60
|
+
tone: t = De.brand,
|
|
61
|
+
variant: i = fe.contained,
|
|
62
|
+
size: a = Le.medium,
|
|
63
|
+
style: n,
|
|
64
|
+
...d
|
|
65
|
+
}) {
|
|
66
|
+
return /* @__PURE__ */ y(
|
|
67
|
+
Er,
|
|
68
|
+
{
|
|
69
|
+
...d,
|
|
70
|
+
...Jr(t, i),
|
|
71
|
+
size: Zr[a],
|
|
72
|
+
style: { width: r ? "100%" : void 0, ...n }
|
|
73
|
+
}
|
|
74
|
+
);
|
|
75
|
+
}), et = {
|
|
76
|
+
horizontal: "horizontal",
|
|
77
|
+
vertical: "vertical"
|
|
78
|
+
}, eo = {
|
|
79
|
+
[et.horizontal]: "row",
|
|
80
|
+
[et.vertical]: "column"
|
|
81
|
+
}, to = H(function({
|
|
82
|
+
direction: r = et.horizontal,
|
|
83
|
+
style: t,
|
|
84
|
+
children: i,
|
|
85
|
+
...a
|
|
86
|
+
}) {
|
|
87
|
+
return /* @__PURE__ */ y(
|
|
88
|
+
Kt.Group,
|
|
89
|
+
{
|
|
90
|
+
style: {
|
|
91
|
+
display: "flex",
|
|
92
|
+
flexDirection: eo[r],
|
|
93
|
+
gap: de.sm,
|
|
94
|
+
...t
|
|
95
|
+
},
|
|
96
|
+
...a,
|
|
97
|
+
children: i
|
|
98
|
+
}
|
|
99
|
+
);
|
|
100
|
+
}), ro = H(function({
|
|
101
|
+
label: r,
|
|
102
|
+
help: t,
|
|
103
|
+
required: i,
|
|
104
|
+
status: a,
|
|
105
|
+
style: n,
|
|
106
|
+
styles: d,
|
|
107
|
+
"aria-label": c,
|
|
108
|
+
...S
|
|
109
|
+
}) {
|
|
110
|
+
const v = r != null && r !== !1 && r !== "";
|
|
111
|
+
return /* @__PURE__ */ y(
|
|
112
|
+
he.Item,
|
|
113
|
+
{
|
|
114
|
+
help: t ? /* @__PURE__ */ y("span", { role: a === "error" ? "alert" : void 0, children: t }) : void 0,
|
|
115
|
+
required: i,
|
|
116
|
+
validateStatus: a,
|
|
117
|
+
style: { marginBottom: de.sm },
|
|
118
|
+
children: /* @__PURE__ */ y(
|
|
119
|
+
Kt,
|
|
120
|
+
{
|
|
121
|
+
"aria-invalid": a === "error" ? !0 : void 0,
|
|
122
|
+
"aria-required": i ? !0 : void 0,
|
|
123
|
+
"aria-label": c,
|
|
124
|
+
style: n,
|
|
125
|
+
styles: v ? d : (E) => {
|
|
126
|
+
const h = typeof d == "function" ? d(E) : d;
|
|
127
|
+
return {
|
|
128
|
+
...h,
|
|
129
|
+
root: { ...h?.root, lineHeight: 1 }
|
|
130
|
+
};
|
|
131
|
+
},
|
|
132
|
+
...S,
|
|
133
|
+
children: r
|
|
134
|
+
}
|
|
135
|
+
)
|
|
136
|
+
}
|
|
137
|
+
);
|
|
138
|
+
}), dt = ro;
|
|
139
|
+
Object.assign(dt, { Group: to });
|
|
140
|
+
const ci = H(function({
|
|
141
|
+
borderless: r = !1,
|
|
142
|
+
ghost: t = !1,
|
|
143
|
+
...i
|
|
144
|
+
}) {
|
|
145
|
+
return /* @__PURE__ */ y(wr, { ...i, bordered: !r, ghost: t });
|
|
146
|
+
}), ui = H(function({
|
|
147
|
+
label: r,
|
|
148
|
+
help: t,
|
|
149
|
+
required: i,
|
|
150
|
+
status: a,
|
|
151
|
+
style: n,
|
|
152
|
+
...d
|
|
153
|
+
}) {
|
|
154
|
+
return /* @__PURE__ */ y(
|
|
155
|
+
he.Item,
|
|
156
|
+
{
|
|
157
|
+
help: t ? /* @__PURE__ */ y("span", { role: a === "error" ? "alert" : void 0, children: t }) : void 0,
|
|
158
|
+
required: i,
|
|
159
|
+
validateStatus: a,
|
|
160
|
+
style: { marginBottom: de.sm },
|
|
161
|
+
children: /* @__PURE__ */ y(
|
|
162
|
+
lt,
|
|
163
|
+
{
|
|
164
|
+
"aria-invalid": a === "error" ? !0 : void 0,
|
|
165
|
+
"aria-required": i ? !0 : void 0,
|
|
166
|
+
style: n,
|
|
167
|
+
...d,
|
|
168
|
+
children: r
|
|
169
|
+
}
|
|
170
|
+
)
|
|
171
|
+
}
|
|
172
|
+
);
|
|
173
|
+
}), gi = H(function({
|
|
174
|
+
label: r,
|
|
175
|
+
help: t,
|
|
176
|
+
required: i,
|
|
177
|
+
status: a,
|
|
178
|
+
style: n,
|
|
179
|
+
optionType: d,
|
|
180
|
+
buttonStyle: c,
|
|
181
|
+
size: S,
|
|
182
|
+
vertical: v,
|
|
183
|
+
options: E,
|
|
184
|
+
children: h,
|
|
185
|
+
...C
|
|
186
|
+
}) {
|
|
187
|
+
const b = Ae();
|
|
188
|
+
return /* @__PURE__ */ y(
|
|
189
|
+
he.Item,
|
|
190
|
+
{
|
|
191
|
+
label: r ? /* @__PURE__ */ y("span", { id: b, children: r }) : void 0,
|
|
192
|
+
help: t ? /* @__PURE__ */ y("span", { role: a === "error" ? "alert" : void 0, children: t }) : void 0,
|
|
193
|
+
required: i,
|
|
194
|
+
validateStatus: a,
|
|
195
|
+
style: { marginBottom: de.sm },
|
|
196
|
+
children: /* @__PURE__ */ y(
|
|
197
|
+
lt.Group,
|
|
198
|
+
{
|
|
199
|
+
"aria-invalid": a === "error" ? !0 : void 0,
|
|
200
|
+
"aria-required": i ? !0 : void 0,
|
|
201
|
+
"aria-labelledby": r ? b : void 0,
|
|
202
|
+
style: n,
|
|
203
|
+
optionType: d,
|
|
204
|
+
buttonStyle: c,
|
|
205
|
+
size: S,
|
|
206
|
+
vertical: v,
|
|
207
|
+
options: E,
|
|
208
|
+
...C,
|
|
209
|
+
children: h
|
|
210
|
+
}
|
|
211
|
+
)
|
|
212
|
+
}
|
|
213
|
+
);
|
|
214
|
+
}), Fi = H(function(r) {
|
|
215
|
+
return /* @__PURE__ */ y(lt.Button, { ...r });
|
|
216
|
+
}), Zt = H(function({
|
|
217
|
+
label: r,
|
|
218
|
+
help: t,
|
|
219
|
+
required: i,
|
|
220
|
+
fullWidth: a = !0,
|
|
221
|
+
status: n,
|
|
222
|
+
style: d,
|
|
223
|
+
id: c,
|
|
224
|
+
...S
|
|
225
|
+
}) {
|
|
226
|
+
const v = Ae(), E = c ?? v;
|
|
227
|
+
return /* @__PURE__ */ y(
|
|
228
|
+
he.Item,
|
|
229
|
+
{
|
|
230
|
+
label: r,
|
|
231
|
+
htmlFor: E,
|
|
232
|
+
help: t ? /* @__PURE__ */ y("span", { role: n === "error" ? "alert" : void 0, children: t }) : void 0,
|
|
233
|
+
required: i,
|
|
234
|
+
validateStatus: n === "error" ? "error" : void 0,
|
|
235
|
+
style: { marginBottom: de.sm, width: a ? "100%" : void 0 },
|
|
236
|
+
children: /* @__PURE__ */ y(
|
|
237
|
+
Pr,
|
|
238
|
+
{
|
|
239
|
+
id: E,
|
|
240
|
+
status: n,
|
|
241
|
+
style: { width: a ? "100%" : void 0, ...d },
|
|
242
|
+
...S
|
|
243
|
+
}
|
|
244
|
+
)
|
|
245
|
+
}
|
|
246
|
+
);
|
|
247
|
+
}), k = {
|
|
248
|
+
colorPrimaryBg: "#EDF7F1",
|
|
249
|
+
colorPrimaryBgHover: "#C5E6D3",
|
|
250
|
+
colorPrimaryBorder: "#98D2B1",
|
|
251
|
+
colorPrimaryBorderHover: "#70C193",
|
|
252
|
+
colorPrimaryHover: "#47AF74",
|
|
253
|
+
colorPrimaryBase: "#1F9E56",
|
|
254
|
+
colorPrimaryActive: "#1A8548",
|
|
255
|
+
colorPrimaryTextHover: "#47AF74",
|
|
256
|
+
colorPrimaryText: "#1F9E56",
|
|
257
|
+
colorPrimaryTextActive: "#1A8548",
|
|
258
|
+
colorSuccessBg: "#F4F9F1",
|
|
259
|
+
colorSuccessBgHover: "#D7E8CF",
|
|
260
|
+
colorSuccessBorder: "#B9D7AA",
|
|
261
|
+
colorSuccessBorderHover: "#9CC787",
|
|
262
|
+
colorSuccessHover: "#9CC787",
|
|
263
|
+
colorSuccessBase: "#5FA43D",
|
|
264
|
+
colorSuccessActive: "#4C8331",
|
|
265
|
+
colorSuccessTextHover: "#7FB664",
|
|
266
|
+
colorSuccessText: "#5FA43D",
|
|
267
|
+
colorSuccessTextActive: "#4C8331",
|
|
268
|
+
colorWarningBg: "#FFF6EC",
|
|
269
|
+
colorWarningBgHover: "#FFE4C2",
|
|
270
|
+
colorWarningBorder: "#FFD198",
|
|
271
|
+
colorWarningBorderHover: "#FEBE70",
|
|
272
|
+
colorWarningHover: "#FEBE70",
|
|
273
|
+
colorWarningBase: "#FF9717",
|
|
274
|
+
colorWarningActive: "#D07A12",
|
|
275
|
+
colorWarningTextHover: "#FEA840",
|
|
276
|
+
colorWarningText: "#FF9717",
|
|
277
|
+
colorWarningTextActive: "#D07A12",
|
|
278
|
+
colorErrorBg: "#FFF1F0",
|
|
279
|
+
colorErrorBgHover: "#FFF1F0",
|
|
280
|
+
colorErrorBorder: "#FFCCC7",
|
|
281
|
+
colorErrorBorderHover: "#FFA39E",
|
|
282
|
+
colorErrorHover: "#FF7875",
|
|
283
|
+
colorErrorBase: "#FF4D4F",
|
|
284
|
+
colorErrorActive: "#CF1322",
|
|
285
|
+
colorErrorTextHover: "#FF7875",
|
|
286
|
+
colorErrorText: "#FF4D4F",
|
|
287
|
+
colorErrorTextActive: "#CF1322",
|
|
288
|
+
colorInfoBg: "#F0FAFF",
|
|
289
|
+
colorInfoBgHover: "#D6EFFF",
|
|
290
|
+
colorInfoBorder: "#ADDDFF",
|
|
291
|
+
colorInfoBorderHover: "#85C8FF",
|
|
292
|
+
colorInfoHover: "#85C8FF",
|
|
293
|
+
colorInfoBase: "#3496FF",
|
|
294
|
+
colorInfoActive: "#2173D9",
|
|
295
|
+
colorInfoTextHover: "#5CB0FF",
|
|
296
|
+
colorInfoText: "#3496FF",
|
|
297
|
+
colorInfoTextActive: "#2173D9",
|
|
298
|
+
colorText: "rgba(0, 0, 0, 0.88)",
|
|
299
|
+
colorTextSecondary: "rgba(0, 0, 0, 0.65)",
|
|
300
|
+
colorTextTertiary: "rgba(0, 0, 0, 0.45)",
|
|
301
|
+
colorTextQuaternary: "rgba(0, 0, 0, 0.25)",
|
|
302
|
+
colorBorder: "#D9D9D9",
|
|
303
|
+
colorBorderSecondary: "#F0F0F0",
|
|
304
|
+
colorBorderDisabled: "#D9D9D9",
|
|
305
|
+
colorFill: "rgba(0, 0, 0, 0.15)",
|
|
306
|
+
colorFillSecondary: "rgba(0, 0, 0, 0.06)",
|
|
307
|
+
colorFillTertiary: "rgba(0, 0, 0, 0.04)",
|
|
308
|
+
colorFillQuaternary: "rgba(0, 0, 0, 0.02)",
|
|
309
|
+
colorBgLayout: "#F5F5F5",
|
|
310
|
+
colorBgContainer: "#FFFFFF",
|
|
311
|
+
colorBgElevated: "#FFFFFF",
|
|
312
|
+
colorBgSpotlight: "rgba(0, 0, 0, 0.85)",
|
|
313
|
+
colorBgMask: "rgba(0, 0, 0, 0.45)",
|
|
314
|
+
sizeXXL: 48,
|
|
315
|
+
sizeXL: 32,
|
|
316
|
+
sizeLG: 24,
|
|
317
|
+
sizeMD: 20,
|
|
318
|
+
sizeMS: 16,
|
|
319
|
+
size: 16,
|
|
320
|
+
sizeSM: 12,
|
|
321
|
+
sizeXS: 8,
|
|
322
|
+
sizeXXS: 4,
|
|
323
|
+
controlHeightLG: 40,
|
|
324
|
+
controlHeightSM: 24,
|
|
325
|
+
controlHeightXS: 16,
|
|
326
|
+
borderRadiusXS: 2,
|
|
327
|
+
borderRadiusSM: 4,
|
|
328
|
+
borderRadiusLG: 8,
|
|
329
|
+
borderRadiusXL: 12,
|
|
330
|
+
borderRadiusXXL: 16,
|
|
331
|
+
borderRadiusOuter: 4,
|
|
332
|
+
colorWhite: "#FFFFFF",
|
|
333
|
+
colorBlack: "#000000",
|
|
334
|
+
fontSizeXL: 20,
|
|
335
|
+
fontSizeLG: 16,
|
|
336
|
+
fontSizeSM: 12,
|
|
337
|
+
fontSizeXS: 11,
|
|
338
|
+
fontSizeXXS: 10,
|
|
339
|
+
fontSizeHeading1: 38,
|
|
340
|
+
fontSizeHeading2: 30,
|
|
341
|
+
fontSizeHeading3: 24,
|
|
342
|
+
fontSizeHeading4: 20,
|
|
343
|
+
fontSizeHeading5: 16,
|
|
344
|
+
lineHeight: 1.571,
|
|
345
|
+
lineHeightLG: 1.5,
|
|
346
|
+
lineHeightSM: 1.6666666666666667,
|
|
347
|
+
lineHeightHeading1: 1.211,
|
|
348
|
+
lineHeightHeading2: 1.267,
|
|
349
|
+
lineHeightHeading3: 1.333,
|
|
350
|
+
lineHeightHeading4: 1.4,
|
|
351
|
+
lineHeightHeading5: 1.5,
|
|
352
|
+
lineWidthBold: 2,
|
|
353
|
+
borderRadiusFull: 9999,
|
|
354
|
+
colorFillContrast: "rgba(0, 0, 0, 0.3)",
|
|
355
|
+
colorBgBlur: "rgba(255, 255, 255, 0)",
|
|
356
|
+
transparent: "rgba(255, 255, 255, 0)",
|
|
357
|
+
colorBgSolid: "#000000",
|
|
358
|
+
colorBgSolidHover: "rgba(0, 0, 0, 0.75)",
|
|
359
|
+
colorBgSolidActive: "rgba(0, 0, 0, 0.95)",
|
|
360
|
+
colorErrorBgFilledHover: "#FFDFDC",
|
|
361
|
+
colorErrorBgActive: "#FFCCC7"
|
|
362
|
+
}, U = {
|
|
363
|
+
brand: {
|
|
364
|
+
1: "#EDF7F1",
|
|
365
|
+
2: "#C5E6D3",
|
|
366
|
+
3: "#98D2B1",
|
|
367
|
+
4: "#70C193",
|
|
368
|
+
5: "#47AF74",
|
|
369
|
+
6: "#1F9E56",
|
|
370
|
+
7: "#1A8548",
|
|
371
|
+
8: "#146839",
|
|
372
|
+
9: "#10512C",
|
|
373
|
+
10: "#0A331C"
|
|
374
|
+
},
|
|
375
|
+
error: {
|
|
376
|
+
1: "#FFF1F0",
|
|
377
|
+
2: "#FFCCC7",
|
|
378
|
+
3: "#FFA39E",
|
|
379
|
+
4: "#FF7875",
|
|
380
|
+
5: "#FF4D4F",
|
|
381
|
+
6: "#F5222D",
|
|
382
|
+
7: "#CF1322",
|
|
383
|
+
8: "#A8071A",
|
|
384
|
+
9: "#820014",
|
|
385
|
+
10: "#5C0011"
|
|
386
|
+
},
|
|
387
|
+
warning: {
|
|
388
|
+
1: "#FFF6EC",
|
|
389
|
+
2: "#FFE4C2",
|
|
390
|
+
3: "#FFD198",
|
|
391
|
+
4: "#FEBE70",
|
|
392
|
+
5: "#FEA840",
|
|
393
|
+
6: "#FF9717",
|
|
394
|
+
7: "#D07A12",
|
|
395
|
+
8: "#A5610E",
|
|
396
|
+
9: "#75450A",
|
|
397
|
+
10: "#3F2505"
|
|
398
|
+
},
|
|
399
|
+
info: {
|
|
400
|
+
1: "#EEF5FD",
|
|
401
|
+
2: "#C9E1FA",
|
|
402
|
+
3: "#A6CEF6",
|
|
403
|
+
4: "#7CB8F2",
|
|
404
|
+
5: "#4C9DEE",
|
|
405
|
+
6: "#2588EA",
|
|
406
|
+
7: "#1E6EBE",
|
|
407
|
+
8: "#185898",
|
|
408
|
+
9: "#124373",
|
|
409
|
+
10: "#0B2744"
|
|
410
|
+
},
|
|
411
|
+
success: {
|
|
412
|
+
1: "#F4F9F1",
|
|
413
|
+
2: "#D7E8CF",
|
|
414
|
+
3: "#B9D7AA",
|
|
415
|
+
4: "#9CC787",
|
|
416
|
+
5: "#7FB664",
|
|
417
|
+
6: "#5FA43D",
|
|
418
|
+
7: "#4C8331",
|
|
419
|
+
8: "#3C6726",
|
|
420
|
+
9: "#2B4A1B",
|
|
421
|
+
10: "#192C10"
|
|
422
|
+
},
|
|
423
|
+
gray: {
|
|
424
|
+
1: "#FFFFFF",
|
|
425
|
+
2: "#FAFAFA",
|
|
426
|
+
3: "#F5F5F5",
|
|
427
|
+
4: "#F0F0F0",
|
|
428
|
+
5: "#D9D9D9",
|
|
429
|
+
6: "#BFBFBF",
|
|
430
|
+
7: "#8C8C8C",
|
|
431
|
+
8: "#595959",
|
|
432
|
+
9: "#434343",
|
|
433
|
+
10: "#262626"
|
|
434
|
+
}
|
|
435
|
+
}, Q = {
|
|
436
|
+
colorPrimary: "#1F9E56",
|
|
437
|
+
colorSuccess: "#5FA43D",
|
|
438
|
+
colorWarning: "#FF9717",
|
|
439
|
+
colorError: "#FF4D4F",
|
|
440
|
+
colorInfo: "#3496FF",
|
|
441
|
+
colorTextBase: "#000000",
|
|
442
|
+
colorBgBase: "#FFFFFF",
|
|
443
|
+
sizeUnit: 4,
|
|
444
|
+
sizeStep: 4,
|
|
445
|
+
sizePopupArrow: 16,
|
|
446
|
+
controlHeight: 32,
|
|
447
|
+
opacityImage: 100,
|
|
448
|
+
fontFamily: "IRANSansX",
|
|
449
|
+
fontFamilyCode: "IRANSansX",
|
|
450
|
+
fontSize: 14,
|
|
451
|
+
lineWidth: 1,
|
|
452
|
+
borderRadius: 6,
|
|
453
|
+
zIndexPopupBase: 1e3,
|
|
454
|
+
lineType: "solid",
|
|
455
|
+
motion: !0,
|
|
456
|
+
motionBase: 0,
|
|
457
|
+
motionEaseInBack: "cubic-bezier(0.71, -0.46, 0.88, 0.6)",
|
|
458
|
+
motionEaseInOut: "cubic-bezier(0.645, 0.045, 0.355, 1)",
|
|
459
|
+
motionEaseInOutCirc: "cubic-bezier(0.78, 0.14, 0.15, 0.86)",
|
|
460
|
+
motionEaseInQuint: "cubic-bezier(0.755, 0.05, 0.855, 0.06)",
|
|
461
|
+
motionEaseOut: "cubic-bezier(0.215, 0.61, 0.355, 1)",
|
|
462
|
+
motionEaseOutBack: "cubic-bezier(0.12, 0.4, 0.29, 1.46)",
|
|
463
|
+
motionEaseOutCirc: "cubic-bezier(0.08, 0.82, 0.17, 1)",
|
|
464
|
+
motionEaseOutQuint: "cubic-bezier(0.23, 1, 0.32, 1)",
|
|
465
|
+
motionUnit: 0.1,
|
|
466
|
+
wireframe: !1
|
|
467
|
+
}, oo = {
|
|
468
|
+
primary: {
|
|
469
|
+
main: Q.colorPrimary,
|
|
470
|
+
light: U.brand[5],
|
|
471
|
+
dark: U.brand[7],
|
|
472
|
+
contrastText: k.colorWhite
|
|
473
|
+
},
|
|
474
|
+
secondary: {
|
|
475
|
+
main: "#7B1FA2",
|
|
476
|
+
light: "#BA68C8",
|
|
477
|
+
dark: "#4A148C",
|
|
478
|
+
contrastText: "#FFFFFF"
|
|
479
|
+
},
|
|
480
|
+
success: {
|
|
481
|
+
main: Q.colorSuccess,
|
|
482
|
+
light: U.success[5],
|
|
483
|
+
dark: U.success[7],
|
|
484
|
+
contrastText: k.colorWhite
|
|
485
|
+
},
|
|
486
|
+
warning: {
|
|
487
|
+
main: Q.colorWarning,
|
|
488
|
+
light: U.warning[5],
|
|
489
|
+
dark: U.warning[7],
|
|
490
|
+
contrastText: k.colorWhite
|
|
491
|
+
},
|
|
492
|
+
error: {
|
|
493
|
+
main: Q.colorError,
|
|
494
|
+
light: U.error[4],
|
|
495
|
+
dark: U.error[7],
|
|
496
|
+
contrastText: k.colorWhite
|
|
497
|
+
},
|
|
498
|
+
info: {
|
|
499
|
+
main: Q.colorInfo,
|
|
500
|
+
light: k.colorInfoTextHover,
|
|
501
|
+
dark: k.colorInfoActive,
|
|
502
|
+
contrastText: k.colorWhite
|
|
503
|
+
},
|
|
504
|
+
neutral: {
|
|
505
|
+
white: U.gray[1],
|
|
506
|
+
black: k.colorBlack,
|
|
507
|
+
gray50: U.gray[2],
|
|
508
|
+
gray100: U.gray[3],
|
|
509
|
+
gray200: U.gray[4],
|
|
510
|
+
gray300: U.gray[5],
|
|
511
|
+
gray400: U.gray[6],
|
|
512
|
+
gray500: U.gray[7],
|
|
513
|
+
gray600: U.gray[8],
|
|
514
|
+
gray700: U.gray[9],
|
|
515
|
+
gray800: U.gray[10],
|
|
516
|
+
gray900: k.colorBlack
|
|
517
|
+
},
|
|
518
|
+
text: {
|
|
519
|
+
primary: k.colorText,
|
|
520
|
+
secondary: k.colorTextSecondary,
|
|
521
|
+
disabled: k.colorTextQuaternary,
|
|
522
|
+
inverse: k.colorWhite
|
|
523
|
+
},
|
|
524
|
+
background: {
|
|
525
|
+
default: k.colorBgLayout,
|
|
526
|
+
paper: k.colorBgContainer,
|
|
527
|
+
elevated: k.colorBgElevated
|
|
528
|
+
},
|
|
529
|
+
border: {
|
|
530
|
+
default: k.colorBorder,
|
|
531
|
+
focus: Q.colorPrimary,
|
|
532
|
+
error: Q.colorError
|
|
533
|
+
}
|
|
534
|
+
}, fi = {
|
|
535
|
+
...oo,
|
|
536
|
+
text: {
|
|
537
|
+
primary: "#FFFFFF",
|
|
538
|
+
secondary: "#B0BEC5",
|
|
539
|
+
disabled: "#78909C",
|
|
540
|
+
inverse: "#212121"
|
|
541
|
+
},
|
|
542
|
+
background: {
|
|
543
|
+
default: "#121212",
|
|
544
|
+
paper: "#1E1E1E",
|
|
545
|
+
elevated: "#2C2C2C"
|
|
546
|
+
},
|
|
547
|
+
border: {
|
|
548
|
+
default: "#424242",
|
|
549
|
+
focus: U.brand[5],
|
|
550
|
+
error: U.error[4]
|
|
551
|
+
}
|
|
552
|
+
}, Me = {
|
|
553
|
+
fontStyle: {
|
|
554
|
+
reqularItalic: "Reqular Italic",
|
|
555
|
+
semiboldItalic: "Semibold Italic",
|
|
556
|
+
regularItalic: "Regular Italic",
|
|
557
|
+
mediumItalic: "Medium Italic"
|
|
558
|
+
},
|
|
559
|
+
layout: {
|
|
560
|
+
sidebarWidthMD: 256,
|
|
561
|
+
sidebarWidthSm: 180,
|
|
562
|
+
sidebarWidthLG: 360,
|
|
563
|
+
sidebarCollapsedWidth: 48,
|
|
564
|
+
colorBgSidebar: "#FBFBFB",
|
|
565
|
+
headerHeight: 44,
|
|
566
|
+
footerHeight: 34
|
|
567
|
+
},
|
|
568
|
+
opacity: {
|
|
569
|
+
0: 0,
|
|
570
|
+
1: 2,
|
|
571
|
+
2: 4,
|
|
572
|
+
3: 6,
|
|
573
|
+
4: 8,
|
|
574
|
+
5: 10,
|
|
575
|
+
6: 12,
|
|
576
|
+
7: 16,
|
|
577
|
+
8: 20,
|
|
578
|
+
9: 25,
|
|
579
|
+
10: 30,
|
|
580
|
+
11: 35,
|
|
581
|
+
12: 40,
|
|
582
|
+
13: 45,
|
|
583
|
+
14: 50,
|
|
584
|
+
15: 55,
|
|
585
|
+
16: 60,
|
|
586
|
+
17: 65,
|
|
587
|
+
18: 70,
|
|
588
|
+
19: 75,
|
|
589
|
+
20: 80,
|
|
590
|
+
21: 85,
|
|
591
|
+
22: 90,
|
|
592
|
+
23: 95
|
|
593
|
+
},
|
|
594
|
+
colorLink: "#1677FF",
|
|
595
|
+
colorSplit: "#EEEFF1",
|
|
596
|
+
fontSizeIcon: 12,
|
|
597
|
+
controlInteractiveSize: 16,
|
|
598
|
+
paddingXL: 32,
|
|
599
|
+
paddingLG: 24,
|
|
600
|
+
paddingMD: 20,
|
|
601
|
+
padding: 16,
|
|
602
|
+
paddingSM: 12,
|
|
603
|
+
paddingXS: 8,
|
|
604
|
+
paddingXXS: 4,
|
|
605
|
+
marginXXL: 48,
|
|
606
|
+
marginXL: 32,
|
|
607
|
+
marginLG: 24,
|
|
608
|
+
marginMD: 20,
|
|
609
|
+
margin: 16,
|
|
610
|
+
marginSM: 12,
|
|
611
|
+
marginXS: 8,
|
|
612
|
+
marginXXS: 4,
|
|
613
|
+
controlPaddingHorizontal: 12,
|
|
614
|
+
controlPaddingHorizontalSM: 8,
|
|
615
|
+
paddingContentHorizontalLG: 24,
|
|
616
|
+
paddingContentVerticalLG: 16,
|
|
617
|
+
paddingContentHorizontal: 16,
|
|
618
|
+
paddingContentVertical: 12,
|
|
619
|
+
paddingContentHorizontalSM: 16,
|
|
620
|
+
paddingContentVerticalSM: 8,
|
|
621
|
+
colorLinkHover: "#69B1FF",
|
|
622
|
+
colorLinkActive: "#0958D9",
|
|
623
|
+
colorFillContent: "rgba(0, 0, 0, 0.06)",
|
|
624
|
+
colorFillContentHover: "rgba(0, 0, 0, 0.15)",
|
|
625
|
+
colorFillAlter: "rgba(0, 0, 0, 0.02)",
|
|
626
|
+
colorBgContainerDisabled: "rgba(0, 0, 0, 0.04)",
|
|
627
|
+
colorBorderBg: "#FFFFFF",
|
|
628
|
+
colorTextPlaceholder: "rgba(0, 0, 0, 0.25)",
|
|
629
|
+
colorTextDisabled: "rgba(0, 0, 0, 0.25)",
|
|
630
|
+
colorTextHeading: "rgba(0, 0, 0, 0.88)",
|
|
631
|
+
colorTextLabel: "rgba(0, 0, 0, 0.65)",
|
|
632
|
+
colorTextDescription: "rgba(0, 0, 0, 0.45)",
|
|
633
|
+
colorTextLightSolid: "#FFFFFF",
|
|
634
|
+
colorHighlight: "#FFA39E",
|
|
635
|
+
colorBgTextHover: "rgba(0, 0, 0, 0.06)",
|
|
636
|
+
colorBgTextActive: "rgba(0, 0, 0, 0.15)",
|
|
637
|
+
colorIcon: "rgba(0, 0, 0, 0.45)",
|
|
638
|
+
colorIconHover: "rgba(0, 0, 0, 0.88)",
|
|
639
|
+
colorErrorOutline: "rgba(255, 77, 79, 0.1)",
|
|
640
|
+
colorWarningOutline: "rgba(250, 173, 20, 0.1)",
|
|
641
|
+
controlItemBgHover: "rgba(0, 0, 0, 0.04)",
|
|
642
|
+
controlItemBgActive: "#EDF7F1",
|
|
643
|
+
controlItemBgActiveHover: "#C5E6D3",
|
|
644
|
+
controlItemBgActiveDisabled: "rgba(0, 0, 0, 0.15)",
|
|
645
|
+
controlTmpOutline: "rgba(0, 0, 0, 0.02)",
|
|
646
|
+
controlOutline: "rgba(5, 145, 255, 0.1)",
|
|
647
|
+
controlOutlineWidth: 2,
|
|
648
|
+
opacityLoading: 65,
|
|
649
|
+
screenXS: 320,
|
|
650
|
+
screenSM: 576,
|
|
651
|
+
screenMD: 768,
|
|
652
|
+
screenLG: 992,
|
|
653
|
+
screenXL: 1200,
|
|
654
|
+
screenXXL: 1600,
|
|
655
|
+
screenXSMin: 320,
|
|
656
|
+
screenXSMax: 575,
|
|
657
|
+
screenSMMin: 576,
|
|
658
|
+
screenSMMax: 767,
|
|
659
|
+
screenMDMin: 768,
|
|
660
|
+
screenMDMax: 991,
|
|
661
|
+
screenLGMin: 992,
|
|
662
|
+
screenLGMax: 1199,
|
|
663
|
+
screenXLMin: 1200,
|
|
664
|
+
screenXLMax: 1599,
|
|
665
|
+
screenXXLMin: 1600,
|
|
666
|
+
lineWidthFocus: 3,
|
|
667
|
+
linkDecoration: "none",
|
|
668
|
+
linkFocusDecoration: "none",
|
|
669
|
+
linkHoverDecoration: "none",
|
|
670
|
+
fontWeightStrong: 700,
|
|
671
|
+
fontWeightNormal: 400,
|
|
672
|
+
drawerWidth: 378,
|
|
673
|
+
drawerWidthMD: 520,
|
|
674
|
+
drawerWidthLG: 736
|
|
675
|
+
}, io = {
|
|
676
|
+
Button: {
|
|
677
|
+
borderColorDisabled: "#D9D9D9",
|
|
678
|
+
contentFontSize: 14,
|
|
679
|
+
contentFontSizeLG: 14,
|
|
680
|
+
contentFontSizeSM: 14,
|
|
681
|
+
contentLineHeight: 1.571,
|
|
682
|
+
contentLineHeightLG: 1.5,
|
|
683
|
+
contentLineHeightSM: 1.6666666666666667,
|
|
684
|
+
dangerColor: "#FFFFFF",
|
|
685
|
+
dangerShadow: "0 2px 0 rgba(255,38,5,0.06)",
|
|
686
|
+
defaultActiveBg: "#FFFFFF",
|
|
687
|
+
defaultActiveBorderColor: "#1A8548",
|
|
688
|
+
defaultActiveColor: "#1A8548",
|
|
689
|
+
defaultBg: "#FFFFFF",
|
|
690
|
+
defaultBorderColor: "#D9D9D9",
|
|
691
|
+
defaultColor: "rgba(0, 0, 0, 0.88)",
|
|
692
|
+
defaultGhostBorderColor: "#FFFFFF",
|
|
693
|
+
defaultGhostColor: "#FFFFFF",
|
|
694
|
+
defaultHoverBg: "#FFFFFF",
|
|
695
|
+
defaultHoverBorderColor: "#47AF74",
|
|
696
|
+
defaultHoverColor: "#47AF74",
|
|
697
|
+
defaultShadow: "0 2px 0 rgba(0,0,0,0.02)",
|
|
698
|
+
fontWeight: 400,
|
|
699
|
+
ghostBg: "rgba(255, 255, 255, 0)",
|
|
700
|
+
groupBorderColor: "#47AF74",
|
|
701
|
+
iconGap: 8,
|
|
702
|
+
linkHoverBg: "rgba(255, 255, 255, 0)",
|
|
703
|
+
onlyIconSize: 14,
|
|
704
|
+
onlyIconSizeLG: 16,
|
|
705
|
+
onlyIconSizeSM: 12,
|
|
706
|
+
paddingBlock: 4,
|
|
707
|
+
paddingBlockLG: 7,
|
|
708
|
+
paddingBlockSM: 0,
|
|
709
|
+
paddingInline: 15,
|
|
710
|
+
paddingInlineLG: 15,
|
|
711
|
+
paddingInlineSM: 7,
|
|
712
|
+
primaryColor: "#FFFFFF",
|
|
713
|
+
primaryShadow: "0 2px 0 rgba(5,145,255,0.1)",
|
|
714
|
+
solidTextColor: "#FFFFFF",
|
|
715
|
+
textHoverBg: "rgba(0, 0, 0, 0.04)",
|
|
716
|
+
textTextActiveColor: "rgba(0, 0, 0, 0.88)",
|
|
717
|
+
textTextColor: "rgba(0, 0, 0, 0.88)",
|
|
718
|
+
textTextHoverColor: "rgba(0, 0, 0, 0.88)",
|
|
719
|
+
dashedBgDisabled: "rgba(0, 0, 0, 0.04)",
|
|
720
|
+
defaultBgDisabled: "rgba(0, 0, 0, 0.04)"
|
|
721
|
+
},
|
|
722
|
+
Typography: {
|
|
723
|
+
titleMarginBottom: 0,
|
|
724
|
+
titleMarginTop: 0
|
|
725
|
+
},
|
|
726
|
+
Divider: {
|
|
727
|
+
orientationMargin: 0.05,
|
|
728
|
+
textPaddingInline: 14,
|
|
729
|
+
verticalMarginInline: 8
|
|
730
|
+
},
|
|
731
|
+
Layout: {
|
|
732
|
+
bodyBg: "#F5F5F5",
|
|
733
|
+
footerBg: "#F5F5F5",
|
|
734
|
+
footerPadding: "24px 50px",
|
|
735
|
+
headerBg: "#001529",
|
|
736
|
+
headerColor: "rgba(0, 0, 0, 0.88)",
|
|
737
|
+
headerHeight: 64,
|
|
738
|
+
headerPadding: "0 50px",
|
|
739
|
+
lightSiderBg: "#FFFFFF",
|
|
740
|
+
lightTriggerBg: "#FFFFFF",
|
|
741
|
+
lightTriggerColor: "rgba(0, 0, 0, 0.88)",
|
|
742
|
+
siderBg: "#001529",
|
|
743
|
+
triggerBg: "#002140",
|
|
744
|
+
triggerColor: "#FFFFFF",
|
|
745
|
+
triggerHeight: 48,
|
|
746
|
+
zeroTriggerHeight: 40,
|
|
747
|
+
zeroTriggerWidth: 40
|
|
748
|
+
},
|
|
749
|
+
Splitter: {
|
|
750
|
+
splitBarDraggableSize: 20,
|
|
751
|
+
splitBarSize: 2,
|
|
752
|
+
splitTriggerSize: 6
|
|
753
|
+
},
|
|
754
|
+
Anchor: {
|
|
755
|
+
linkPaddingBlock: 4,
|
|
756
|
+
linkPaddingInlineStart: 16
|
|
757
|
+
},
|
|
758
|
+
Breadcrumb: {
|
|
759
|
+
iconFontSize: 14,
|
|
760
|
+
itemColor: "rgba(0, 0, 0, 0.45)",
|
|
761
|
+
lastItemColor: "rgba(0, 0, 0, 0.88)",
|
|
762
|
+
linkColor: "rgba(0, 0, 0, 0.45)",
|
|
763
|
+
linkHoverColor: "rgba(0, 0, 0, 0.88)",
|
|
764
|
+
separatorColor: "rgba(0, 0, 0, 0.45)",
|
|
765
|
+
separatorMargin: 8
|
|
766
|
+
},
|
|
767
|
+
Dropdown: {
|
|
768
|
+
paddingBlock: 5,
|
|
769
|
+
zIndexPopup: 1050
|
|
770
|
+
},
|
|
771
|
+
Menu: {
|
|
772
|
+
activeBarBorderWidth: 1,
|
|
773
|
+
activeBarHeight: 2,
|
|
774
|
+
activeBarWidth: 0,
|
|
775
|
+
collapsedIconSize: 16,
|
|
776
|
+
collapsedWidth: 80,
|
|
777
|
+
dangerItemActiveBg: "#FFF1F0",
|
|
778
|
+
dangerItemColor: "#FF4D4F",
|
|
779
|
+
dangerItemHoverColor: "#FF4D4F",
|
|
780
|
+
dangerItemSelectedBg: "#FFF1F0",
|
|
781
|
+
dangerItemSelectedColor: "#FF4D4F",
|
|
782
|
+
darkDangerItemActiveBg: "#FF4D4F",
|
|
783
|
+
darkDangerItemColor: "#FF4D4F",
|
|
784
|
+
darkDangerItemHoverColor: "#FF7875",
|
|
785
|
+
darkDangerItemSelectedBg: "#FF4D4F",
|
|
786
|
+
darkDangerItemSelectedColor: "#FFFFFF",
|
|
787
|
+
darkGroupTitleColor: "rgba(255, 255, 255, 0.65)",
|
|
788
|
+
darkItemBg: "#001529",
|
|
789
|
+
darkItemColor: "rgba(255, 255, 255, 0.65)",
|
|
790
|
+
darkItemDisabledColor: "rgba(255, 255, 255, 0.25)",
|
|
791
|
+
darkItemHoverBg: "rgba(255, 255, 255, 0)",
|
|
792
|
+
darkItemHoverColor: "#FFFFFF",
|
|
793
|
+
darkItemSelectedBg: "#1F9E56",
|
|
794
|
+
darkItemSelectedColor: "#FFFFFF",
|
|
795
|
+
darkPopupBg: "#001529",
|
|
796
|
+
darkSubMenuItemBg: "#000C17",
|
|
797
|
+
dropdownWidth: 160,
|
|
798
|
+
groupTitleColor: "rgba(0, 0, 0, 0.45)",
|
|
799
|
+
groupTitleFontSize: 14,
|
|
800
|
+
groupTitleLineHeight: 1.5714285714285714,
|
|
801
|
+
horizontalItemBorderRadius: 0,
|
|
802
|
+
horizontalItemHoverBg: "rgba(255, 255, 255, 0)",
|
|
803
|
+
horizontalItemHoverColor: "#1F9E56",
|
|
804
|
+
horizontalItemSelectedBg: "rgba(255, 255, 255, 0)",
|
|
805
|
+
horizontalItemSelectedColor: "#1F9E56",
|
|
806
|
+
horizontalLineHeight: 46,
|
|
807
|
+
iconMarginInlineEnd: 10,
|
|
808
|
+
iconSize: 14,
|
|
809
|
+
itemActiveBg: "#EDF7F1",
|
|
810
|
+
itemBg: "#FFFFFF",
|
|
811
|
+
itemBorderRadius: 8,
|
|
812
|
+
itemColor: "rgba(0, 0, 0, 0.88)",
|
|
813
|
+
itemDisabledColor: "rgba(0, 0, 0, 0.25)",
|
|
814
|
+
itemHeight: 40,
|
|
815
|
+
itemHoverBg: "rgba(0, 0, 0, 0.06)",
|
|
816
|
+
itemHoverColor: "rgba(0, 0, 0, 0.88)",
|
|
817
|
+
itemMarginBlock: 4,
|
|
818
|
+
itemMarginInline: 4,
|
|
819
|
+
itemPaddingInline: 16,
|
|
820
|
+
itemSelectedBg: "#EDF7F1",
|
|
821
|
+
itemSelectedColor: "#1F9E56",
|
|
822
|
+
popupBg: "#FFFFFF",
|
|
823
|
+
subMenuItemBg: "rgba(0, 0, 0, 0.02)",
|
|
824
|
+
subMenuItemBorderRadius: 4,
|
|
825
|
+
subMenuItemSelectedColor: "#1F9E56",
|
|
826
|
+
zIndexPopup: 1050
|
|
827
|
+
},
|
|
828
|
+
Pagination: {
|
|
829
|
+
itemActiveBg: "#FFFFFF",
|
|
830
|
+
itemActiveBgDisabled: "rgba(0, 0, 0, 0.15)",
|
|
831
|
+
itemActiveColor: "#1F9E56",
|
|
832
|
+
itemActiveColorDisabled: "rgba(0, 0, 0, 0.25)",
|
|
833
|
+
itemActiveColorHover: "#47AF74",
|
|
834
|
+
itemBg: "#FFFFFF",
|
|
835
|
+
itemInputBg: "#FFFFFF",
|
|
836
|
+
itemLinkBg: "#FFFFFF",
|
|
837
|
+
itemSize: 32,
|
|
838
|
+
itemSizeSM: 24,
|
|
839
|
+
miniOptionsSizeChangerTop: 0
|
|
840
|
+
},
|
|
841
|
+
Steps: {
|
|
842
|
+
customIconFontSize: 24,
|
|
843
|
+
customIconSize: 24,
|
|
844
|
+
customIconTop: 24,
|
|
845
|
+
descriptionMaxWidth: 140,
|
|
846
|
+
dotCurrentSize: 10,
|
|
847
|
+
dotSize: 8,
|
|
848
|
+
iconFontSize: 14,
|
|
849
|
+
iconSize: 32,
|
|
850
|
+
iconSizeSM: 24,
|
|
851
|
+
iconTop: -0.5,
|
|
852
|
+
navArrowColor: "rgba(0, 0, 0, 0.25)",
|
|
853
|
+
navContentMaxWidth: "unset",
|
|
854
|
+
titleLineHeight: 32
|
|
855
|
+
},
|
|
856
|
+
Tabs: {
|
|
857
|
+
cardBg: "rgba(0, 0, 0, 0.02)",
|
|
858
|
+
cardGutter: 2,
|
|
859
|
+
cardHeight: 40,
|
|
860
|
+
cardHeightLG: 48,
|
|
861
|
+
cardHeightSM: 32,
|
|
862
|
+
cardPadding: "8px 16px",
|
|
863
|
+
cardPaddingLG: "11px 16px",
|
|
864
|
+
cardPaddingSM: "4px 8px",
|
|
865
|
+
horizontalItemGutter: 32,
|
|
866
|
+
horizontalItemMargin: " ",
|
|
867
|
+
horizontalItemMarginRTL: " ",
|
|
868
|
+
horizontalItemPadding: "12px 0",
|
|
869
|
+
horizontalItemPaddingLG: "16px 0",
|
|
870
|
+
horizontalItemPaddingSM: "8px 0",
|
|
871
|
+
horizontalMargin: "0 0 16px 0",
|
|
872
|
+
inkBarColor: "#1F9E56",
|
|
873
|
+
itemActiveColor: "#1A8548",
|
|
874
|
+
itemColor: "rgba(0, 0, 0, 0.88)",
|
|
875
|
+
itemHoverColor: "#47AF74",
|
|
876
|
+
itemSelectedColor: "#1F9E56",
|
|
877
|
+
titleFontSize: 14,
|
|
878
|
+
titleFontSizeLG: 16,
|
|
879
|
+
titleFontSizeSM: 12,
|
|
880
|
+
verticalItemMargin: "16px 0 0 0",
|
|
881
|
+
verticalItemPadding: "8px 24px",
|
|
882
|
+
zIndexPopup: 1050
|
|
883
|
+
},
|
|
884
|
+
AutoComplete: {
|
|
885
|
+
activeBorderColor: "#1F9E56",
|
|
886
|
+
activeOutlineColor: "rgba(5, 145, 255, 0.1)",
|
|
887
|
+
clearBg: "#FFFFFF",
|
|
888
|
+
hoverBorderColor: "#47AF74",
|
|
889
|
+
multipleItemBg: "rgba(0, 0, 0, 0.06)",
|
|
890
|
+
multipleItemBorderColor: "rgba(255, 255, 255, 0)",
|
|
891
|
+
multipleItemBorderColorDisabled: "rgba(255, 255, 255, 0)",
|
|
892
|
+
multipleItemColorDisabled: "rgba(0, 0, 0, 0.25)",
|
|
893
|
+
multipleItemHeight: 24,
|
|
894
|
+
multipleItemHeightLG: 32,
|
|
895
|
+
multipleItemHeightSM: 16,
|
|
896
|
+
multipleSelectorBgDisabled: "rgba(0, 0, 0, 0.04)",
|
|
897
|
+
optionActiveBg: "rgba(0, 0, 0, 0.04)",
|
|
898
|
+
optionFontSize: 14,
|
|
899
|
+
optionHeight: 32,
|
|
900
|
+
optionLineHeight: 1.5714285714285714,
|
|
901
|
+
optionPadding: "5px 12px",
|
|
902
|
+
optionSelectedBg: "#EDF7F1",
|
|
903
|
+
optionSelectedColor: "rgba(0, 0, 0, 0.88)",
|
|
904
|
+
optionSelectedFontWeight: 700,
|
|
905
|
+
selectorBg: "#FFFFFF",
|
|
906
|
+
showArrowPaddingInlineEnd: 18,
|
|
907
|
+
singleItemHeightLG: 40,
|
|
908
|
+
zIndexPopup: 1050
|
|
909
|
+
},
|
|
910
|
+
Cascader: {
|
|
911
|
+
controlItemWidth: 111,
|
|
912
|
+
controlWidth: 184,
|
|
913
|
+
dropdownHeight: 180,
|
|
914
|
+
menuPadding: 4,
|
|
915
|
+
optionPadding: "5px 12px",
|
|
916
|
+
optionSelectedBg: "#EDF7F1",
|
|
917
|
+
optionSelectedColor: "rgba(0, 0, 0, 0.88)",
|
|
918
|
+
optionSelectedFontWeight: 700
|
|
919
|
+
},
|
|
920
|
+
Input: {
|
|
921
|
+
activeBg: "#FFFFFF",
|
|
922
|
+
activeBorderColor: "#1F9E56",
|
|
923
|
+
activeShadow: "0 0 0 2px rgba(5,145,255,0.1)",
|
|
924
|
+
addonBg: "rgba(0, 0, 0, 0.02)",
|
|
925
|
+
errorActiveShadow: "0 0 0 2px rgba(255,38,5,0.06)",
|
|
926
|
+
hoverBg: "#FFFFFF",
|
|
927
|
+
hoverBorderColor: "#47AF74",
|
|
928
|
+
inputFontSize: 14,
|
|
929
|
+
inputFontSizeLG: 16,
|
|
930
|
+
inputFontSizeSM: 14,
|
|
931
|
+
paddingBlock: 4,
|
|
932
|
+
paddingBlockLG: 7,
|
|
933
|
+
paddingBlockSM: 0,
|
|
934
|
+
paddingInline: 11,
|
|
935
|
+
paddingInlineLG: 11,
|
|
936
|
+
paddingInlineSM: 7,
|
|
937
|
+
warningActiveShadow: "0 0 0 2px rgba(255,215,5,0.1)"
|
|
938
|
+
},
|
|
939
|
+
DatePicker: {
|
|
940
|
+
activeBg: "#FFFFFF",
|
|
941
|
+
activeBorderColor: "#1F9E56",
|
|
942
|
+
activeShadow: "0 0 0 2px rgba(5,145,255,0.1)",
|
|
943
|
+
addonBg: "rgba(0, 0, 0, 0.02)",
|
|
944
|
+
cellActiveWithRangeBg: "#EDF7F1",
|
|
945
|
+
cellBgDisabled: "rgba(0, 0, 0, 0.04)",
|
|
946
|
+
cellHeight: 24,
|
|
947
|
+
cellHoverBg: "rgba(0, 0, 0, 0.04)",
|
|
948
|
+
cellHoverWithRangeBg: "#CBE0FD",
|
|
949
|
+
cellRangeBorderColor: "#82B4F9",
|
|
950
|
+
cellWidth: 36,
|
|
951
|
+
errorActiveShadow: "0 0 0 2px rgba(255,38,5,0.06)",
|
|
952
|
+
hoverBg: "#FFFFFF",
|
|
953
|
+
hoverBorderColor: "#47AF74",
|
|
954
|
+
inputFontSize: 14,
|
|
955
|
+
inputFontSizeLG: 16,
|
|
956
|
+
inputFontSizeSM: 14,
|
|
957
|
+
multipleItemBg: "rgba(0, 0, 0, 0.06)",
|
|
958
|
+
multipleItemBorderColor: "rgba(255, 255, 255, 0)",
|
|
959
|
+
multipleItemBorderColorDisabled: "rgba(255, 255, 255, 0)",
|
|
960
|
+
multipleItemColorDisabled: "rgba(0, 0, 0, 0.25)",
|
|
961
|
+
multipleItemHeight: 24,
|
|
962
|
+
multipleItemHeightLG: 32,
|
|
963
|
+
multipleItemHeightSM: 16,
|
|
964
|
+
multipleSelectorBgDisabled: "rgba(0, 0, 0, 0.04)",
|
|
965
|
+
paddingBlock: 4,
|
|
966
|
+
paddingBlockLG: 7,
|
|
967
|
+
paddingBlockSM: 0,
|
|
968
|
+
paddingInline: 11,
|
|
969
|
+
paddingInlineLG: 11,
|
|
970
|
+
paddingInlineSM: 7,
|
|
971
|
+
presetsMaxWidth: 200,
|
|
972
|
+
presetsWidth: 120,
|
|
973
|
+
textHeight: 40,
|
|
974
|
+
timeCellHeight: 28,
|
|
975
|
+
timeColumnHeight: 224,
|
|
976
|
+
timeColumnWidth: 56,
|
|
977
|
+
warningActiveShadow: "0 0 0 2px rgba(255,215,5,0.1)",
|
|
978
|
+
withoutTimeCellHeight: 66,
|
|
979
|
+
zIndexPopup: 1050
|
|
980
|
+
},
|
|
981
|
+
Form: {
|
|
982
|
+
inlineItemMarginBottom: 0,
|
|
983
|
+
itemMarginBottom: 24,
|
|
984
|
+
labelColonMarginInlineEnd: 8,
|
|
985
|
+
labelColonMarginInlineStart: 2,
|
|
986
|
+
labelColor: "rgba(0, 0, 0, 0.88)",
|
|
987
|
+
labelFontSize: 14,
|
|
988
|
+
labelHeight: 32,
|
|
989
|
+
labelRequiredMarkColor: "#FF4D4F",
|
|
990
|
+
verticalLabelMargin: 0,
|
|
991
|
+
verticalLabelPadding: "0 0 8px"
|
|
992
|
+
},
|
|
993
|
+
InputNumber: {
|
|
994
|
+
activeBg: "#FFFFFF",
|
|
995
|
+
activeBorderColor: "#1F9E56",
|
|
996
|
+
activeShadow: "0 0 0 2px rgba(5,145,255,0.1)",
|
|
997
|
+
addonBg: "rgba(0, 0, 0, 0.02)",
|
|
998
|
+
controlWidth: 90,
|
|
999
|
+
errorActiveShadow: "0 0 0 2px rgba(255,38,5,0.06)",
|
|
1000
|
+
filledHandleBg: "#F0F0F0",
|
|
1001
|
+
handleActiveBg: "rgba(0, 0, 0, 0.02)",
|
|
1002
|
+
handleBg: "#FFFFFF",
|
|
1003
|
+
handleBorderColor: "#D9D9D9",
|
|
1004
|
+
handleFontSize: 7,
|
|
1005
|
+
handleHoverColor: "#1F9E56",
|
|
1006
|
+
handleVisible: "auto",
|
|
1007
|
+
handleWidth: 22,
|
|
1008
|
+
hoverBg: "#FFFFFF",
|
|
1009
|
+
hoverBorderColor: "#47AF74",
|
|
1010
|
+
inputFontSize: 14,
|
|
1011
|
+
inputFontSizeLG: 16,
|
|
1012
|
+
inputFontSizeSM: 14,
|
|
1013
|
+
paddingBlock: 4,
|
|
1014
|
+
paddingBlockLG: 7,
|
|
1015
|
+
paddingBlockSM: 0,
|
|
1016
|
+
paddingInline: 11,
|
|
1017
|
+
paddingInlineLG: 11,
|
|
1018
|
+
paddingInlineSM: 7,
|
|
1019
|
+
warningActiveShadow: "0 0 0 2px rgba(255,215,5,0.1)"
|
|
1020
|
+
},
|
|
1021
|
+
Mentions: {
|
|
1022
|
+
activeBg: "#FFFFFF",
|
|
1023
|
+
activeBorderColor: "#1F9E56",
|
|
1024
|
+
activeShadow: "0 0 0 2px rgba(5,145,255,0.1)",
|
|
1025
|
+
addonBg: "rgba(0, 0, 0, 0.02)",
|
|
1026
|
+
controlItemWidth: 100,
|
|
1027
|
+
dropdownHeight: 250,
|
|
1028
|
+
errorActiveShadow: "0 0 0 2px rgba(255,38,5,0.06)",
|
|
1029
|
+
hoverBg: "#FFFFFF",
|
|
1030
|
+
hoverBorderColor: "#47AF74",
|
|
1031
|
+
inputFontSize: 14,
|
|
1032
|
+
inputFontSizeLG: 16,
|
|
1033
|
+
inputFontSizeSM: 14,
|
|
1034
|
+
paddingBlock: 4,
|
|
1035
|
+
paddingBlockLG: 7,
|
|
1036
|
+
paddingBlockSM: 0,
|
|
1037
|
+
paddingInline: 11,
|
|
1038
|
+
paddingInlineLG: 11,
|
|
1039
|
+
paddingInlineSM: 7,
|
|
1040
|
+
warningActiveShadow: "0 0 0 2px rgba(255,215,5,0.1)",
|
|
1041
|
+
zIndexPopup: 1050
|
|
1042
|
+
},
|
|
1043
|
+
Radio: {
|
|
1044
|
+
buttonBg: "#FFFFFF",
|
|
1045
|
+
buttonCheckedBg: "#FFFFFF",
|
|
1046
|
+
buttonCheckedBgDisabled: "rgba(0, 0, 0, 0.15)",
|
|
1047
|
+
buttonCheckedColorDisabled: "rgba(0, 0, 0, 0.25)",
|
|
1048
|
+
buttonColor: "rgba(0, 0, 0, 0.88)",
|
|
1049
|
+
buttonPaddingInline: 15,
|
|
1050
|
+
buttonSolidCheckedActiveBg: "#1A8548",
|
|
1051
|
+
buttonSolidCheckedBg: "#1F9E56",
|
|
1052
|
+
buttonSolidCheckedColor: "#FFFFFF",
|
|
1053
|
+
buttonSolidCheckedHoverBg: "#47AF74",
|
|
1054
|
+
dotColorDisabled: "rgba(0, 0, 0, 0.25)",
|
|
1055
|
+
dotSize: 8,
|
|
1056
|
+
radioSize: 16,
|
|
1057
|
+
wrapperMarginInlineEnd: 8
|
|
1058
|
+
},
|
|
1059
|
+
Rate: {
|
|
1060
|
+
starBg: "rgba(0, 0, 0, 0.06)",
|
|
1061
|
+
starColor: "#FADB14",
|
|
1062
|
+
starHoverScale: "scale(1.1)",
|
|
1063
|
+
starSize: 20,
|
|
1064
|
+
starSizeLG: 25,
|
|
1065
|
+
starSizeSM: 15
|
|
1066
|
+
},
|
|
1067
|
+
Select: {
|
|
1068
|
+
activeBorderColor: "#1F9E56",
|
|
1069
|
+
activeOutlineColor: "rgba(5, 145, 255, 0.1)",
|
|
1070
|
+
clearBg: "#FFFFFF",
|
|
1071
|
+
hoverBorderColor: "#47AF74",
|
|
1072
|
+
multipleItemBg: "rgba(0, 0, 0, 0.06)",
|
|
1073
|
+
multipleItemBorderColor: "rgba(255, 255, 255, 0)",
|
|
1074
|
+
multipleItemBorderColorDisabled: "rgba(255, 255, 255, 0)",
|
|
1075
|
+
multipleItemColorDisabled: "rgba(0, 0, 0, 0.25)",
|
|
1076
|
+
multipleItemHeight: 24,
|
|
1077
|
+
multipleItemHeightLG: 32,
|
|
1078
|
+
multipleItemHeightSM: 16,
|
|
1079
|
+
multipleSelectorBgDisabled: "rgba(0, 0, 0, 0.04)",
|
|
1080
|
+
optionActiveBg: "rgba(0, 0, 0, 0.04)",
|
|
1081
|
+
optionFontSize: 14,
|
|
1082
|
+
optionHeight: 32,
|
|
1083
|
+
optionLineHeight: 1.5714285714285714,
|
|
1084
|
+
optionPadding: "5px 12px",
|
|
1085
|
+
optionSelectedBg: "#EDF7F1",
|
|
1086
|
+
optionSelectedColor: "rgba(0, 0, 0, 0.88)",
|
|
1087
|
+
optionSelectedFontWeight: 700,
|
|
1088
|
+
selectorBg: "#FFFFFF",
|
|
1089
|
+
showArrowPaddingInlineEnd: 18,
|
|
1090
|
+
singleItemHeightLG: 40,
|
|
1091
|
+
zIndexPopup: 1050
|
|
1092
|
+
},
|
|
1093
|
+
Slider: {
|
|
1094
|
+
controlSize: 10,
|
|
1095
|
+
dotActiveBorderColor: "#98D2B1",
|
|
1096
|
+
dotBorderColor: "#F0F0F0",
|
|
1097
|
+
dotSize: 8,
|
|
1098
|
+
handleActiveColor: "#1F9E56",
|
|
1099
|
+
handleActiveOutlineColor: "#C5E6D3",
|
|
1100
|
+
handleColor: "#98D2B1",
|
|
1101
|
+
handleColorDisabled: "#BFBFBF",
|
|
1102
|
+
handleLineWidth: 2,
|
|
1103
|
+
handleLineWidthHover: 2.5,
|
|
1104
|
+
handleSize: 10,
|
|
1105
|
+
handleSizeHover: 12,
|
|
1106
|
+
railBg: "rgba(0, 0, 0, 0.04)",
|
|
1107
|
+
railHoverBg: "rgba(0, 0, 0, 0.06)",
|
|
1108
|
+
railSize: 4,
|
|
1109
|
+
trackBg: "#98D2B1",
|
|
1110
|
+
trackBgDisabled: "rgba(0, 0, 0, 0.04)",
|
|
1111
|
+
trackHoverBg: "#70C193"
|
|
1112
|
+
},
|
|
1113
|
+
Switch: {
|
|
1114
|
+
handleBg: "#FFFFFF",
|
|
1115
|
+
handleShadow: "0 2px 4px 0 rgba(0,35,11,0.2)",
|
|
1116
|
+
handleSize: 18,
|
|
1117
|
+
handleSizeSM: 12,
|
|
1118
|
+
innerMaxMargin: 24,
|
|
1119
|
+
innerMaxMarginSM: 18,
|
|
1120
|
+
innerMinMargin: 9,
|
|
1121
|
+
innerMinMarginSM: 6,
|
|
1122
|
+
trackHeight: 22,
|
|
1123
|
+
trackHeightSM: 16,
|
|
1124
|
+
trackMinWidth: 44,
|
|
1125
|
+
trackMinWidthSM: 28,
|
|
1126
|
+
trackPadding: 2
|
|
1127
|
+
},
|
|
1128
|
+
TimePicker: {
|
|
1129
|
+
activeBg: "#FFFFFF",
|
|
1130
|
+
activeBorderColor: "#1F9E56",
|
|
1131
|
+
activeShadow: "0 0 0 2px rgba(5,145,255,0.1)",
|
|
1132
|
+
addonBg: "rgba(0, 0, 0, 0.02)",
|
|
1133
|
+
cellActiveWithRangeBg: "#EDF7F1",
|
|
1134
|
+
cellBgDisabled: "rgba(0, 0, 0, 0.04)",
|
|
1135
|
+
cellHeight: 24,
|
|
1136
|
+
cellHoverBg: "rgba(0, 0, 0, 0.04)",
|
|
1137
|
+
cellHoverWithRangeBg: "#CBE0FD",
|
|
1138
|
+
cellRangeBorderColor: "#82B4F9",
|
|
1139
|
+
cellWidth: 36,
|
|
1140
|
+
errorActiveShadow: "0 0 0 2px rgba(255,38,5,0.06)",
|
|
1141
|
+
hoverBg: "#FFFFFF",
|
|
1142
|
+
hoverBorderColor: "#47AF74",
|
|
1143
|
+
inputFontSize: 14,
|
|
1144
|
+
inputFontSizeLG: 16,
|
|
1145
|
+
inputFontSizeSM: 14,
|
|
1146
|
+
multipleItemBg: "rgba(0, 0, 0, 0.06)",
|
|
1147
|
+
multipleItemBorderColor: "rgba(255, 255, 255, 0)",
|
|
1148
|
+
multipleItemBorderColorDisabled: "rgba(255, 255, 255, 0)",
|
|
1149
|
+
multipleItemColorDisabled: "rgba(0, 0, 0, 0.25)",
|
|
1150
|
+
multipleItemHeight: 24,
|
|
1151
|
+
multipleItemHeightLG: 32,
|
|
1152
|
+
multipleItemHeightSM: 16,
|
|
1153
|
+
multipleSelectorBgDisabled: "rgba(0, 0, 0, 0.04)",
|
|
1154
|
+
paddingBlock: 4,
|
|
1155
|
+
paddingBlockLG: 7,
|
|
1156
|
+
paddingBlockSM: 0,
|
|
1157
|
+
paddingInline: 11,
|
|
1158
|
+
paddingInlineLG: 11,
|
|
1159
|
+
paddingInlineSM: 7,
|
|
1160
|
+
presetsMaxWidth: 200,
|
|
1161
|
+
presetsWidth: 120,
|
|
1162
|
+
textHeight: 40,
|
|
1163
|
+
timeCellHeight: 28,
|
|
1164
|
+
timeColumnHeight: 224,
|
|
1165
|
+
timeColumnWidth: 56,
|
|
1166
|
+
warningActiveShadow: "0 0 0 2px rgba(255,215,5,0.1)",
|
|
1167
|
+
withoutTimeCellHeight: 66,
|
|
1168
|
+
zIndexPopup: 1050
|
|
1169
|
+
},
|
|
1170
|
+
Transfer: {
|
|
1171
|
+
headerHeight: 40,
|
|
1172
|
+
itemHeight: 32,
|
|
1173
|
+
itemPaddingBlock: 5,
|
|
1174
|
+
listHeight: 200,
|
|
1175
|
+
listWidth: 180,
|
|
1176
|
+
listWidthLG: 250
|
|
1177
|
+
},
|
|
1178
|
+
TreeSelect: {
|
|
1179
|
+
indentSize: 24,
|
|
1180
|
+
nodeHoverBg: "rgba(0, 0, 0, 0.04)",
|
|
1181
|
+
nodeHoverColor: "rgba(0, 0, 0, 0.88)",
|
|
1182
|
+
nodeSelectedBg: "#EDF7F1",
|
|
1183
|
+
nodeSelectedColor: "rgba(0, 0, 0, 0.88)",
|
|
1184
|
+
titleHeight: 24
|
|
1185
|
+
},
|
|
1186
|
+
Upload: {
|
|
1187
|
+
actionsColor: "rgba(0, 0, 0, 0.45)",
|
|
1188
|
+
pictureCardSize: 102
|
|
1189
|
+
},
|
|
1190
|
+
Avatar: {
|
|
1191
|
+
containerSize: 32,
|
|
1192
|
+
containerSizeLG: 40,
|
|
1193
|
+
containerSizeSM: 24,
|
|
1194
|
+
groupBorderColor: "#FFFFFF",
|
|
1195
|
+
groupOverlapping: -8,
|
|
1196
|
+
groupSpace: 4,
|
|
1197
|
+
iconFontSize: 18,
|
|
1198
|
+
iconFontSizeLG: 24,
|
|
1199
|
+
iconFontSizeSM: 14,
|
|
1200
|
+
textFontSize: 14,
|
|
1201
|
+
textFontSizeLG: 14,
|
|
1202
|
+
textFontSizeSM: 14
|
|
1203
|
+
},
|
|
1204
|
+
Badge: {
|
|
1205
|
+
dotSize: 6,
|
|
1206
|
+
indicatorHeight: 20,
|
|
1207
|
+
indicatorHeightSM: 14,
|
|
1208
|
+
indicatorZIndex: "auto",
|
|
1209
|
+
statusSize: 6,
|
|
1210
|
+
textFontSize: 12,
|
|
1211
|
+
textFontSizeSM: 12,
|
|
1212
|
+
textFontWeight: 400
|
|
1213
|
+
},
|
|
1214
|
+
Calendar: {
|
|
1215
|
+
fullBg: "#FFFFFF",
|
|
1216
|
+
fullPanelBg: "#FFFFFF",
|
|
1217
|
+
itemActiveBg: "#EDF7F1",
|
|
1218
|
+
miniContentHeight: 256,
|
|
1219
|
+
monthControlWidth: 70,
|
|
1220
|
+
yearControlWidth: 80
|
|
1221
|
+
},
|
|
1222
|
+
Card: {
|
|
1223
|
+
actionsBg: "#FFFFFF",
|
|
1224
|
+
actionsLiMargin: "12px 0",
|
|
1225
|
+
bodyPadding: 24,
|
|
1226
|
+
bodyPaddingSM: 12,
|
|
1227
|
+
extraColor: "rgba(0, 0, 0, 0.88)",
|
|
1228
|
+
headerBg: "rgba(255, 255, 255, 0)",
|
|
1229
|
+
headerFontSize: 16,
|
|
1230
|
+
headerFontSizeSM: 14,
|
|
1231
|
+
headerHeight: 56,
|
|
1232
|
+
headerHeightSM: 38,
|
|
1233
|
+
headerPadding: 24,
|
|
1234
|
+
headerPaddingSM: 12,
|
|
1235
|
+
tabsMarginBottom: -17
|
|
1236
|
+
},
|
|
1237
|
+
Carousel: {
|
|
1238
|
+
arrowOffset: 8,
|
|
1239
|
+
arrowSize: 16,
|
|
1240
|
+
dotActiveWidth: 24,
|
|
1241
|
+
dotGap: 4,
|
|
1242
|
+
dotHeight: 3,
|
|
1243
|
+
dotOffset: 12,
|
|
1244
|
+
dotWidth: 16
|
|
1245
|
+
},
|
|
1246
|
+
Descriptions: {
|
|
1247
|
+
colonMarginLeft: 2,
|
|
1248
|
+
colonMarginRight: 8,
|
|
1249
|
+
contentColor: "rgba(0, 0, 0, 0.88)",
|
|
1250
|
+
extraColor: "rgba(0, 0, 0, 0.88)",
|
|
1251
|
+
itemPaddingBottom: 16,
|
|
1252
|
+
itemPaddingEnd: 16,
|
|
1253
|
+
labelBg: "rgba(0, 0, 0, 0.02)",
|
|
1254
|
+
labelColor: "rgba(0, 0, 0, 0.45)",
|
|
1255
|
+
titleColor: "rgba(0, 0, 0, 0.88)",
|
|
1256
|
+
titleMarginBottom: 20
|
|
1257
|
+
},
|
|
1258
|
+
Image: {
|
|
1259
|
+
previewOperationColor: "rgba(255, 255, 255, 0.65)",
|
|
1260
|
+
previewOperationColorDisabled: "rgba(255, 255, 255, 0.25)",
|
|
1261
|
+
previewOperationHoverColor: "rgba(255, 255, 255, 0.85)",
|
|
1262
|
+
previewOperationSize: 18,
|
|
1263
|
+
zIndexPopup: 1080
|
|
1264
|
+
},
|
|
1265
|
+
List: {
|
|
1266
|
+
avatarMarginRight: 16,
|
|
1267
|
+
contentWidth: 220,
|
|
1268
|
+
descriptionFontSize: 14,
|
|
1269
|
+
emptyTextPadding: 16,
|
|
1270
|
+
footerBg: "rgba(255, 255, 255, 0)",
|
|
1271
|
+
headerBg: "rgba(255, 255, 255, 0)",
|
|
1272
|
+
itemPadding: "12px 0",
|
|
1273
|
+
itemPaddingLG: "16px 24px",
|
|
1274
|
+
itemPaddingSM: "8px 16px",
|
|
1275
|
+
metaMarginBottom: 16,
|
|
1276
|
+
titleMarginBottom: 12
|
|
1277
|
+
},
|
|
1278
|
+
Popover: {
|
|
1279
|
+
titleMinWidth: 177,
|
|
1280
|
+
zIndexPopup: 1030
|
|
1281
|
+
},
|
|
1282
|
+
Segmented: {
|
|
1283
|
+
itemActiveBg: "rgba(0, 0, 0, 0.15)",
|
|
1284
|
+
itemColor: "rgba(0, 0, 0, 0.65)",
|
|
1285
|
+
itemHoverBg: "rgba(0, 0, 0, 0.06)",
|
|
1286
|
+
itemHoverColor: "rgba(0, 0, 0, 0.88)",
|
|
1287
|
+
itemSelectedBg: "#FFFFFF",
|
|
1288
|
+
itemSelectedColor: "rgba(0, 0, 0, 0.88)",
|
|
1289
|
+
trackBg: "#F5F5F5",
|
|
1290
|
+
trackPadding: 2
|
|
1291
|
+
},
|
|
1292
|
+
Statistic: {
|
|
1293
|
+
contentFontSize: 24,
|
|
1294
|
+
titleFontSize: 14
|
|
1295
|
+
},
|
|
1296
|
+
Table: {
|
|
1297
|
+
bodySortBg: "#FAFAFA",
|
|
1298
|
+
borderColor: "#F0F0F0",
|
|
1299
|
+
cellFontSize: 14,
|
|
1300
|
+
cellFontSizeMD: 14,
|
|
1301
|
+
cellFontSizeSM: 14,
|
|
1302
|
+
cellPaddingBlock: 16,
|
|
1303
|
+
cellPaddingBlockMD: 12,
|
|
1304
|
+
cellPaddingBlockSM: 8,
|
|
1305
|
+
cellPaddingInline: 16,
|
|
1306
|
+
cellPaddingInlineMD: 8,
|
|
1307
|
+
cellPaddingInlineSM: 8,
|
|
1308
|
+
expandIconBg: "#FFFFFF",
|
|
1309
|
+
filterDropdownBg: "#FFFFFF",
|
|
1310
|
+
filterDropdownMenuBg: "#FFFFFF",
|
|
1311
|
+
fixedHeaderSortActiveBg: "#F0F0F0",
|
|
1312
|
+
footerBg: "#FAFAFA",
|
|
1313
|
+
footerColor: "rgba(0, 0, 0, 0.88)",
|
|
1314
|
+
headerBg: "#FAFAFA",
|
|
1315
|
+
headerBorderRadius: 8,
|
|
1316
|
+
headerColor: "rgba(0, 0, 0, 0.88)",
|
|
1317
|
+
headerFilterHoverBg: "rgba(0, 0, 0, 0.06)",
|
|
1318
|
+
headerSortActiveBg: "#F0F0F0",
|
|
1319
|
+
headerSortHoverBg: "#F0F0F0",
|
|
1320
|
+
headerSplitColor: "#F0F0F0",
|
|
1321
|
+
rowExpandedBg: "rgba(0, 0, 0, 0.02)",
|
|
1322
|
+
rowHoverBg: "#FAFAFA",
|
|
1323
|
+
rowSelectedBg: "#EDF7F1",
|
|
1324
|
+
rowSelectedHoverBg: "#C5E6D3",
|
|
1325
|
+
selectionColumnWidth: 32,
|
|
1326
|
+
stickyScrollBarBg: "rgba(0, 0, 0, 0.25)",
|
|
1327
|
+
stickyScrollBarBorderRadius: 100
|
|
1328
|
+
},
|
|
1329
|
+
Tag: {
|
|
1330
|
+
defaultBg: "#FAFAFA",
|
|
1331
|
+
defaultColor: "rgba(0, 0, 0, 0.88)",
|
|
1332
|
+
solidTextColor: "#FFFFFF"
|
|
1333
|
+
},
|
|
1334
|
+
Timeline: {
|
|
1335
|
+
dotBg: "#FFFFFF",
|
|
1336
|
+
dotBorderWidth: 2,
|
|
1337
|
+
itemPaddingBottom: 20,
|
|
1338
|
+
tailColor: "#EEEFF1",
|
|
1339
|
+
tailWidth: 2
|
|
1340
|
+
},
|
|
1341
|
+
Tooltip: {
|
|
1342
|
+
zIndexPopup: 1070
|
|
1343
|
+
},
|
|
1344
|
+
Tour: {
|
|
1345
|
+
closeBtnSize: 0,
|
|
1346
|
+
primaryNextBtnHoverBg: "#F0F0F0",
|
|
1347
|
+
primaryPrevBtnBg: "rgba(255, 255, 255, 0.15)",
|
|
1348
|
+
zIndexPopup: 1070
|
|
1349
|
+
},
|
|
1350
|
+
Tree: {
|
|
1351
|
+
directoryNodeSelectedBg: "#1F9E56",
|
|
1352
|
+
directoryNodeSelectedColor: "#FFFFFF",
|
|
1353
|
+
indentSize: 24,
|
|
1354
|
+
nodeHoverBg: "rgba(0, 0, 0, 0.04)",
|
|
1355
|
+
nodeHoverColor: "rgba(0, 0, 0, 0.88)",
|
|
1356
|
+
nodeSelectedBg: "#EDF7F1",
|
|
1357
|
+
nodeSelectedColor: "rgba(0, 0, 0, 0.88)",
|
|
1358
|
+
titleHeight: 24
|
|
1359
|
+
},
|
|
1360
|
+
Alert: {
|
|
1361
|
+
defaultPadding: "8px 12px",
|
|
1362
|
+
withDescriptionIconSize: 24,
|
|
1363
|
+
withDescriptionPadding: "20px 24px"
|
|
1364
|
+
},
|
|
1365
|
+
Drawer: {
|
|
1366
|
+
draggerSize: 4,
|
|
1367
|
+
footerPaddingBlock: 8,
|
|
1368
|
+
footerPaddingInline: 16,
|
|
1369
|
+
zIndexPopup: 1e3
|
|
1370
|
+
},
|
|
1371
|
+
Message: {
|
|
1372
|
+
contentBg: "#FFFFFF",
|
|
1373
|
+
contentPadding: "9px 12px",
|
|
1374
|
+
zIndexPopup: 2010
|
|
1375
|
+
},
|
|
1376
|
+
Modal: {
|
|
1377
|
+
contentBg: "#FFFFFF",
|
|
1378
|
+
footerBg: "rgba(255, 255, 255, 0)",
|
|
1379
|
+
headerBg: "#FFFFFF",
|
|
1380
|
+
titleColor: "rgba(0, 0, 0, 0.88)",
|
|
1381
|
+
titleFontSize: 16,
|
|
1382
|
+
titleLineHeight: 1.5
|
|
1383
|
+
},
|
|
1384
|
+
Notification: {
|
|
1385
|
+
colorErrorBg: "rgba(255, 255, 255, 0)",
|
|
1386
|
+
colorInfoBg: "rgba(255, 255, 255, 0)",
|
|
1387
|
+
colorSuccessBg: "rgba(255, 255, 255, 0)",
|
|
1388
|
+
colorWarningBg: "rgba(255, 255, 255, 0)",
|
|
1389
|
+
width: 384,
|
|
1390
|
+
zIndexPopup: 2050
|
|
1391
|
+
},
|
|
1392
|
+
Popconfirm: {
|
|
1393
|
+
zIndexPopup: 1060
|
|
1394
|
+
},
|
|
1395
|
+
Progress: {
|
|
1396
|
+
"circleTextFontSize 2": "1.1666666666666667em",
|
|
1397
|
+
circleTextColor: "rgba(0, 0, 0, 0.88)",
|
|
1398
|
+
circleTextFontSize: "1em",
|
|
1399
|
+
defaultColor: "#3496FF",
|
|
1400
|
+
lineBorderRadius: 100,
|
|
1401
|
+
remainingColor: "rgba(0, 0, 0, 0.06)"
|
|
1402
|
+
},
|
|
1403
|
+
Result: {
|
|
1404
|
+
extraMargin: "24px 0 0 0",
|
|
1405
|
+
iconFontSize: 72,
|
|
1406
|
+
subtitleFontSize: 14,
|
|
1407
|
+
titleFontSize: 24
|
|
1408
|
+
},
|
|
1409
|
+
Skeleton: {
|
|
1410
|
+
blockRadius: 4,
|
|
1411
|
+
gradientFromColor: "rgba(0, 0, 0, 0.06)",
|
|
1412
|
+
gradientToColor: "rgba(0, 0, 0, 0.15)",
|
|
1413
|
+
paragraphLiHeight: 16,
|
|
1414
|
+
paragraphMarginTop: 28,
|
|
1415
|
+
titleHeight: 28
|
|
1416
|
+
},
|
|
1417
|
+
Spin: {
|
|
1418
|
+
contentHeight: 400,
|
|
1419
|
+
dotSize: 20,
|
|
1420
|
+
dotSizeLG: 32,
|
|
1421
|
+
dotSizeSM: 14
|
|
1422
|
+
},
|
|
1423
|
+
Collapse: {
|
|
1424
|
+
borderlessContentBg: "rgba(255, 255, 255, 0)",
|
|
1425
|
+
borderlessContentPadding: "4px 16px 16px",
|
|
1426
|
+
contentBg: "#FFFFFF",
|
|
1427
|
+
contentPadding: "16px 16px",
|
|
1428
|
+
headerBg: "rgba(0, 0, 0, 0.02)",
|
|
1429
|
+
headerPadding: "12px 16px"
|
|
1430
|
+
},
|
|
1431
|
+
Listy: {
|
|
1432
|
+
itemPaddingBlock: 12,
|
|
1433
|
+
itemPaddingInline: 16
|
|
1434
|
+
}
|
|
1435
|
+
}, mi = {
|
|
1436
|
+
device: {
|
|
1437
|
+
Mobile: 480,
|
|
1438
|
+
Tablet: 768,
|
|
1439
|
+
"Desktop SM": 1024,
|
|
1440
|
+
Desktop: 1440
|
|
1441
|
+
},
|
|
1442
|
+
deviceMin: {
|
|
1443
|
+
Mobile: 320,
|
|
1444
|
+
Tablet: 768,
|
|
1445
|
+
"Desktop SM": 992,
|
|
1446
|
+
Desktop: 1200
|
|
1447
|
+
},
|
|
1448
|
+
deviceMax: {
|
|
1449
|
+
Mobile: 767,
|
|
1450
|
+
Tablet: 991,
|
|
1451
|
+
"Desktop SM": 1199,
|
|
1452
|
+
Desktop: 1599
|
|
1453
|
+
},
|
|
1454
|
+
hideOnDesktop: {
|
|
1455
|
+
Mobile: !0,
|
|
1456
|
+
Tablet: !0,
|
|
1457
|
+
"Desktop SM": !0,
|
|
1458
|
+
Desktop: !1
|
|
1459
|
+
},
|
|
1460
|
+
hideOnDesktopSM: {
|
|
1461
|
+
Mobile: !0,
|
|
1462
|
+
Tablet: !0,
|
|
1463
|
+
"Desktop SM": !1,
|
|
1464
|
+
Desktop: !0
|
|
1465
|
+
},
|
|
1466
|
+
hideOnTablet: {
|
|
1467
|
+
Mobile: !0,
|
|
1468
|
+
Tablet: !1,
|
|
1469
|
+
"Desktop SM": !0,
|
|
1470
|
+
Desktop: !0
|
|
1471
|
+
},
|
|
1472
|
+
hideOnMobile: {
|
|
1473
|
+
Mobile: !1,
|
|
1474
|
+
Tablet: !0,
|
|
1475
|
+
"Desktop SM": !0,
|
|
1476
|
+
Desktop: !0
|
|
1477
|
+
},
|
|
1478
|
+
onlyDesktop: {
|
|
1479
|
+
Mobile: !1,
|
|
1480
|
+
Tablet: !1,
|
|
1481
|
+
"Desktop SM": !1,
|
|
1482
|
+
Desktop: !0
|
|
1483
|
+
},
|
|
1484
|
+
onlyDesktopSM: {
|
|
1485
|
+
Mobile: !1,
|
|
1486
|
+
Tablet: !1,
|
|
1487
|
+
"Desktop SM": !0,
|
|
1488
|
+
Desktop: !1
|
|
1489
|
+
},
|
|
1490
|
+
onlyTablet: {
|
|
1491
|
+
Mobile: !1,
|
|
1492
|
+
Tablet: !0,
|
|
1493
|
+
"Desktop SM": !1,
|
|
1494
|
+
Desktop: !1
|
|
1495
|
+
},
|
|
1496
|
+
onlyMobile: {
|
|
1497
|
+
Mobile: !0,
|
|
1498
|
+
Tablet: !1,
|
|
1499
|
+
"Desktop SM": !1,
|
|
1500
|
+
Desktop: !1
|
|
1501
|
+
},
|
|
1502
|
+
gutter: {
|
|
1503
|
+
Mobile: 8,
|
|
1504
|
+
Tablet: 12,
|
|
1505
|
+
"Desktop SM": 16,
|
|
1506
|
+
Desktop: 16
|
|
1507
|
+
},
|
|
1508
|
+
pageOffset: {
|
|
1509
|
+
Mobile: 16,
|
|
1510
|
+
Tablet: 16,
|
|
1511
|
+
"Desktop SM": 24,
|
|
1512
|
+
Desktop: 24
|
|
1513
|
+
}
|
|
1514
|
+
}, Jt = {
|
|
1515
|
+
tooltipVerticalPadding: 6,
|
|
1516
|
+
buttonPaddingHorizontal: 15,
|
|
1517
|
+
buttonPaddingHorizontalSM: 7,
|
|
1518
|
+
buttonIconOnlyFontSize: 16,
|
|
1519
|
+
buttonIconOnlyFontSizeLG: 18,
|
|
1520
|
+
buttonIconOnlyFontSizeSM: 14,
|
|
1521
|
+
borderRadiusRound: 16,
|
|
1522
|
+
borderRadiusRoundSM: 12,
|
|
1523
|
+
borderRadiusRoundLG: 20,
|
|
1524
|
+
buttonRoundPaddingHorizontal: 16,
|
|
1525
|
+
buttonRoundPaddingHorizontalLG: 20,
|
|
1526
|
+
buttonRoundPaddingHorizontalSM: 12,
|
|
1527
|
+
tagPaddingHorizontal: 7,
|
|
1528
|
+
tagIconSize: 10,
|
|
1529
|
+
iconMarginInline: 3,
|
|
1530
|
+
alertPaddingHorizontal: 12,
|
|
1531
|
+
alertIconSizeLG: 24,
|
|
1532
|
+
alertCloseIcon: 12,
|
|
1533
|
+
alertIcon: 14,
|
|
1534
|
+
messageContentHorizontal: 9,
|
|
1535
|
+
messageIcon: 16,
|
|
1536
|
+
switchHeight: 22,
|
|
1537
|
+
switchHeightSM: 16,
|
|
1538
|
+
switchPadding: 2,
|
|
1539
|
+
switchPinSize: 18,
|
|
1540
|
+
switchPinSizeActive: 22,
|
|
1541
|
+
switchPinSizeSM: 12,
|
|
1542
|
+
switchPinSizeSMActive: 14,
|
|
1543
|
+
switchWidth: 44,
|
|
1544
|
+
switchWidthSM: 28,
|
|
1545
|
+
switchInnerMarginMin: 9,
|
|
1546
|
+
switchInnerMarginMinSM: 6,
|
|
1547
|
+
switchLoadingIconColor: "rgba(0, 0, 0, 0.65)",
|
|
1548
|
+
borderRadiusSwitch: 100,
|
|
1549
|
+
borderRadiusMax: 100,
|
|
1550
|
+
borderRadiusSwitchHandle: 9,
|
|
1551
|
+
switchIconSizeSM: 12,
|
|
1552
|
+
switchIconSize: 14,
|
|
1553
|
+
iconSize: 14,
|
|
1554
|
+
codeBg: "rgba(150, 150, 150, 0.1)",
|
|
1555
|
+
codeBorder: "rgba(100, 100, 100, 0.2)",
|
|
1556
|
+
keyboardBg: "rgba(150, 150, 150, 0.06)",
|
|
1557
|
+
keyboardBorder: "rgba(100, 100, 100, 0.2)",
|
|
1558
|
+
codeAndKeyboardHorizontalMargin: 2,
|
|
1559
|
+
codeAndKeyboardHorizontalPadding: 4,
|
|
1560
|
+
codeAndKeyboardTopPadding: 2,
|
|
1561
|
+
codeKeyboardRadius: 3,
|
|
1562
|
+
codeAndKeyboardBottomPadding: 1,
|
|
1563
|
+
badgeShadowColor: "#FFFFFF",
|
|
1564
|
+
badgeShadowSize: 1,
|
|
1565
|
+
badgeHeight: 20,
|
|
1566
|
+
badgeHeightSM: 14,
|
|
1567
|
+
badgeDotSize: 6,
|
|
1568
|
+
badgeStatusSize: 6,
|
|
1569
|
+
borderRadiusBadge: 10,
|
|
1570
|
+
borderRadiusBadgeSM: 7,
|
|
1571
|
+
spinDotSize: 20,
|
|
1572
|
+
spinDotItemSize: 6.75,
|
|
1573
|
+
spinDotItemSizeSM: 4.5,
|
|
1574
|
+
spinDotItemSizeLG: 11.25,
|
|
1575
|
+
spinDotSizeSM: 14,
|
|
1576
|
+
spinDotSizeLG: 32,
|
|
1577
|
+
notificationCloseButtonSize: 22,
|
|
1578
|
+
notificationCloseIconSize: 14,
|
|
1579
|
+
notificationNoticeIconSize: 24,
|
|
1580
|
+
resultIconSize: 72,
|
|
1581
|
+
resultVerticalPadding: 48,
|
|
1582
|
+
resultContentHorizontalPadding: 40,
|
|
1583
|
+
popConfirmIconSize: 14,
|
|
1584
|
+
tourCloseSize: 22,
|
|
1585
|
+
tourCoverVerticalPadding: 46,
|
|
1586
|
+
tourIndicatorSize: 6,
|
|
1587
|
+
tourMaskBg: "rgba(0, 0, 0, 0.5)",
|
|
1588
|
+
avatarFontSizeBase: 18,
|
|
1589
|
+
avatarFontSizeSM: 14,
|
|
1590
|
+
avatarFontSizeLG: 24,
|
|
1591
|
+
emptyImgHeight: 100,
|
|
1592
|
+
emptyImgHeightMD: 40,
|
|
1593
|
+
emptyImgHeightSM: 35,
|
|
1594
|
+
QRCodeMaskBackgroundColor: "rgba(255, 255, 255, 0.96)",
|
|
1595
|
+
QRCodeExpiredTextColor: "rgba(0, 0, 0, 0.88)",
|
|
1596
|
+
carouselDotWidth: 16,
|
|
1597
|
+
carouselDotHeight: 3,
|
|
1598
|
+
carouselDotWidthActive: 24,
|
|
1599
|
+
carouselArrowSize: 20,
|
|
1600
|
+
carouselDotOffset: 12,
|
|
1601
|
+
carouselArrowOffset: 25,
|
|
1602
|
+
modalHeaderHeight: 56,
|
|
1603
|
+
modalCloseBtnSize: 22,
|
|
1604
|
+
modalCloseIconSize: 16,
|
|
1605
|
+
modalConfirmIconSize: 22,
|
|
1606
|
+
modalCloseButtonPosition: 17,
|
|
1607
|
+
drawerCloseIcon: 24,
|
|
1608
|
+
segmentedPaddingHorizontal: 11,
|
|
1609
|
+
segmentedPaddingHorizontalSM: 7,
|
|
1610
|
+
segmentedPadding: 2,
|
|
1611
|
+
segmentedLabelMinHeight: 28,
|
|
1612
|
+
segmentedLabelMinHeightLG: 36,
|
|
1613
|
+
segmentedLabelMinHeightSM: 20,
|
|
1614
|
+
segmentedItemGap: 6,
|
|
1615
|
+
segmentedIcon: 14,
|
|
1616
|
+
segmentedIconLG: 16,
|
|
1617
|
+
radioSize: 16,
|
|
1618
|
+
radioDotSize: 6,
|
|
1619
|
+
radioDotPadding: 4,
|
|
1620
|
+
radioButtonPaddingInline: 15,
|
|
1621
|
+
radioButtonPaddingInlineSM: 7,
|
|
1622
|
+
radioRadius: 8,
|
|
1623
|
+
radioDotDisabledSize: 8,
|
|
1624
|
+
radioButtonGroupPadding: 1,
|
|
1625
|
+
radioButtonHeight: 30,
|
|
1626
|
+
radioButtonHeightSM: 22,
|
|
1627
|
+
radioButtonHeightLG: 38,
|
|
1628
|
+
borderRadiusRadioButton: 5,
|
|
1629
|
+
borderRadiusRadioButtonSM: 3,
|
|
1630
|
+
borderRadiusRadioButtonLG: 7,
|
|
1631
|
+
checkboxSize: 16,
|
|
1632
|
+
checkboxIndeterminateSize: 8,
|
|
1633
|
+
rateStarSize: 20,
|
|
1634
|
+
timelineItemHeadSize: 10,
|
|
1635
|
+
timelineItemPaddingBottom: 20,
|
|
1636
|
+
itemTailHorizontalPadding: 4,
|
|
1637
|
+
itemTailVerticalPadding: 10,
|
|
1638
|
+
collapseExpandIconHeight: 22,
|
|
1639
|
+
collapseExpandIconHeightLG: 24,
|
|
1640
|
+
collapseExpandIconHeightSM: 20,
|
|
1641
|
+
collapseExpandIconPaddingHorizontalStart: 4,
|
|
1642
|
+
collapseExpandIconPaddingHorizontalStartSM: 4,
|
|
1643
|
+
collapseExpandIconPaddingHorizontalStartLG: 8,
|
|
1644
|
+
selectInputPaddingHorizontalBase: 11,
|
|
1645
|
+
selectInputPaddingHorizontalSM: 7,
|
|
1646
|
+
selectionItemPadding: 18,
|
|
1647
|
+
selectionItemPaddingLG: 20,
|
|
1648
|
+
selectionItemPaddingSM: 18,
|
|
1649
|
+
selectTagItemEnd: 4,
|
|
1650
|
+
selectDropdownItemVertical: 5,
|
|
1651
|
+
selectDropdownItemGroupHorizontal: 24,
|
|
1652
|
+
inputPaddingHorizontal: 11,
|
|
1653
|
+
inputPaddingHorizontalSM: 7,
|
|
1654
|
+
inputPaddingHorizontalLG: 11,
|
|
1655
|
+
inputPaddingVertical: 4,
|
|
1656
|
+
inputPaddingVerticalSM: 0,
|
|
1657
|
+
inputPaddingVerticalLG: 7,
|
|
1658
|
+
transparent: "rgba(0, 0, 0, 0)",
|
|
1659
|
+
radiusNone: 0,
|
|
1660
|
+
inputNumberHandleWidth: 22,
|
|
1661
|
+
skeletonButtonWidth: 64,
|
|
1662
|
+
skeletonInputWidth: 160,
|
|
1663
|
+
skeletonButtonWidthLG: 80,
|
|
1664
|
+
skeletonInputWidthLG: 200,
|
|
1665
|
+
skeletonButtonWidthSM: 48,
|
|
1666
|
+
skeletonInputWidthSM: 120,
|
|
1667
|
+
colorPickerWidth: 234,
|
|
1668
|
+
colorPickerHandlerSize: 16,
|
|
1669
|
+
colorPickerHandlerSizeSM: 12,
|
|
1670
|
+
colorPickerSliderHeight: 8,
|
|
1671
|
+
colorPickerPreviewSize: 28,
|
|
1672
|
+
paddingNone: 0,
|
|
1673
|
+
colorPickerPresetColorSize: 18,
|
|
1674
|
+
paginationItemPaddingInline: 6,
|
|
1675
|
+
floatButtonBodyVerticalPadding: 2,
|
|
1676
|
+
floatButtonBodyHorizontalPadding: 4,
|
|
1677
|
+
floatButtonIconSize: 18,
|
|
1678
|
+
marginNone: 0,
|
|
1679
|
+
tabHorizontalSM: 6,
|
|
1680
|
+
tabVerticalLG: 6,
|
|
1681
|
+
tabCardGap: 2,
|
|
1682
|
+
darkBtnTextHover: "rgba(255, 255, 255, 0.08)",
|
|
1683
|
+
darkBtnFilled: "rgba(255, 255, 255, 0.08)",
|
|
1684
|
+
darkBtnFilledHover: "rgba(255, 255, 255, 0.12)",
|
|
1685
|
+
tooltipVerticalPaddingSM: 2,
|
|
1686
|
+
colorTextLightSolidPrimary: "#FFFFFF",
|
|
1687
|
+
emptyImageColor1: "#D9D9D9",
|
|
1688
|
+
emptyImageColor2: "#F5F5F5",
|
|
1689
|
+
emptyImageColor3: "#BFBFBF",
|
|
1690
|
+
emptyImageColor4: "#FFFFFF",
|
|
1691
|
+
emptyImageColor5: "#F0F0F0",
|
|
1692
|
+
emptyImageColor6: "#FAFAFA",
|
|
1693
|
+
"test-will-be-removed-in-the-next-update": "#FF0000"
|
|
1694
|
+
}, hi = {
|
|
1695
|
+
...Jt,
|
|
1696
|
+
emptyImageColor1: "#3E3E3E",
|
|
1697
|
+
emptyImageColor2: "#272727",
|
|
1698
|
+
emptyImageColor3: "#4F4F4F",
|
|
1699
|
+
emptyImageColor4: "#141414",
|
|
1700
|
+
emptyImageColor5: "#303030",
|
|
1701
|
+
emptyImageColor6: "#1D1D1D",
|
|
1702
|
+
"test-will-be-removed-in-the-next-update": "#FFFFFF"
|
|
1703
|
+
}, bi = {
|
|
1704
|
+
none: 0,
|
|
1705
|
+
xs: k.borderRadiusXS,
|
|
1706
|
+
sm: k.borderRadiusSM,
|
|
1707
|
+
md: Q.borderRadius,
|
|
1708
|
+
lg: k.borderRadiusLG,
|
|
1709
|
+
xl: k.borderRadiusXL,
|
|
1710
|
+
full: k.borderRadiusFull
|
|
1711
|
+
}, pi = {
|
|
1712
|
+
none: "none",
|
|
1713
|
+
xs: "0px 1px 2px rgba(0, 0, 0, 0.05)",
|
|
1714
|
+
sm: "0px 1px 3px rgba(0, 0, 0, 0.1), 0px 1px 2px rgba(0, 0, 0, 0.06)",
|
|
1715
|
+
md: "0px 4px 6px rgba(0, 0, 0, 0.07), 0px 2px 4px rgba(0, 0, 0, 0.06)",
|
|
1716
|
+
lg: "0px 10px 15px rgba(0, 0, 0, 0.1), 0px 4px 6px rgba(0, 0, 0, 0.05)",
|
|
1717
|
+
xl: "0px 20px 25px rgba(0, 0, 0, 0.1), 0px 10px 10px rgba(0, 0, 0, 0.04)",
|
|
1718
|
+
modal: "0px 24px 48px rgba(0, 0, 0, 0.16)"
|
|
1719
|
+
}, Si = {
|
|
1720
|
+
fontFamily: {
|
|
1721
|
+
primary: `"${Q.fontFamily}", sans-serif`,
|
|
1722
|
+
mono: `"${Q.fontFamilyCode}", monospace`
|
|
1723
|
+
},
|
|
1724
|
+
fontWeight: {
|
|
1725
|
+
regular: Me.fontWeightNormal,
|
|
1726
|
+
medium: 500,
|
|
1727
|
+
semibold: 600,
|
|
1728
|
+
bold: Me.fontWeightStrong
|
|
1729
|
+
},
|
|
1730
|
+
fontSize: {
|
|
1731
|
+
xs: k.fontSizeXS,
|
|
1732
|
+
sm: k.fontSizeSM,
|
|
1733
|
+
md: Q.fontSize,
|
|
1734
|
+
lg: k.fontSizeLG,
|
|
1735
|
+
xl: k.fontSizeXL,
|
|
1736
|
+
xxl: k.fontSizeHeading3,
|
|
1737
|
+
xxxl: k.fontSizeHeading1
|
|
1738
|
+
},
|
|
1739
|
+
lineHeight: {
|
|
1740
|
+
tight: k.lineHeightHeading1,
|
|
1741
|
+
normal: k.lineHeight,
|
|
1742
|
+
relaxed: k.lineHeightSM
|
|
1743
|
+
},
|
|
1744
|
+
letterSpacing: {
|
|
1745
|
+
tight: "-0.01em",
|
|
1746
|
+
normal: "0",
|
|
1747
|
+
wide: "0.02em"
|
|
1748
|
+
}
|
|
1749
|
+
}, yi = {
|
|
1750
|
+
base: 0,
|
|
1751
|
+
dropdown: 1e3,
|
|
1752
|
+
sticky: 1100,
|
|
1753
|
+
fixed: 1200,
|
|
1754
|
+
modalBackdrop: 1300,
|
|
1755
|
+
modal: 1400,
|
|
1756
|
+
popover: 1500,
|
|
1757
|
+
tooltip: 1600,
|
|
1758
|
+
toast: 1700
|
|
1759
|
+
}, ue = {
|
|
1760
|
+
default: "default",
|
|
1761
|
+
primary: "primary"
|
|
1762
|
+
}, Oe = {
|
|
1763
|
+
circle: "circle",
|
|
1764
|
+
square: "square"
|
|
1765
|
+
}, tt = {
|
|
1766
|
+
none: "none",
|
|
1767
|
+
count: "count",
|
|
1768
|
+
dot: "dot"
|
|
1769
|
+
}, er = {
|
|
1770
|
+
[ue.default]: "default",
|
|
1771
|
+
[ue.primary]: "primary"
|
|
1772
|
+
}, Re = "rgba(5, 5, 5, 0.06)";
|
|
1773
|
+
function no(e, r) {
|
|
1774
|
+
return e !== ue.default ? r : Object.assign(
|
|
1775
|
+
{},
|
|
1776
|
+
{
|
|
1777
|
+
"--ant-btn-border-color": Re,
|
|
1778
|
+
"--ant-btn-border-color-hover": Re,
|
|
1779
|
+
"--ant-btn-border-color-active": Re,
|
|
1780
|
+
"--ant-btn-bg-color-hover": Me.colorFillContent,
|
|
1781
|
+
"--ant-btn-bg-color-active": Me.colorFillContent,
|
|
1782
|
+
"--ant-btn-text-color-hover": "var(--ant-btn-text-color)",
|
|
1783
|
+
"--ant-btn-text-color-active": "var(--ant-btn-text-color)"
|
|
1784
|
+
},
|
|
1785
|
+
r
|
|
1786
|
+
);
|
|
1787
|
+
}
|
|
1788
|
+
const ao = /* @__PURE__ */ y(jt, {});
|
|
1789
|
+
function lo(e) {
|
|
1790
|
+
return e != null && e !== !1 && e !== "";
|
|
1791
|
+
}
|
|
1792
|
+
function so(e, r) {
|
|
1793
|
+
if (e)
|
|
1794
|
+
return e;
|
|
1795
|
+
if (!lo(r))
|
|
1796
|
+
return ao;
|
|
1797
|
+
}
|
|
1798
|
+
function co(e, r) {
|
|
1799
|
+
if (e === tt.count)
|
|
1800
|
+
return { count: r };
|
|
1801
|
+
if (e === tt.dot)
|
|
1802
|
+
return { dot: !0 };
|
|
1803
|
+
}
|
|
1804
|
+
const uo = H(function({
|
|
1805
|
+
tone: r = ue.default,
|
|
1806
|
+
shape: t = Oe.circle,
|
|
1807
|
+
badge: i = tt.none,
|
|
1808
|
+
badgeCount: a,
|
|
1809
|
+
content: n,
|
|
1810
|
+
children: d,
|
|
1811
|
+
description: c,
|
|
1812
|
+
icon: S,
|
|
1813
|
+
style: v,
|
|
1814
|
+
...E
|
|
1815
|
+
}) {
|
|
1816
|
+
const h = co(i, a), C = n ?? d ?? c, b = so(S, C);
|
|
1817
|
+
return /* @__PURE__ */ y(
|
|
1818
|
+
Qt,
|
|
1819
|
+
{
|
|
1820
|
+
...E,
|
|
1821
|
+
...h ? { badge: h } : {},
|
|
1822
|
+
...b !== void 0 ? { icon: b } : {},
|
|
1823
|
+
type: er[r],
|
|
1824
|
+
shape: t,
|
|
1825
|
+
content: C,
|
|
1826
|
+
style: no(r, v)
|
|
1827
|
+
}
|
|
1828
|
+
);
|
|
1829
|
+
});
|
|
1830
|
+
function tr(e) {
|
|
1831
|
+
const r = [];
|
|
1832
|
+
return Nr.forEach(e, (t) => {
|
|
1833
|
+
if (st(t) && t.type === jt) {
|
|
1834
|
+
r.push(...tr(t.props.children));
|
|
1835
|
+
return;
|
|
1836
|
+
}
|
|
1837
|
+
r.push(t);
|
|
1838
|
+
}), r;
|
|
1839
|
+
}
|
|
1840
|
+
function go(e, r, t) {
|
|
1841
|
+
if (r !== ue.primary)
|
|
1842
|
+
return e;
|
|
1843
|
+
const i = tr(e), a = i.length - 1;
|
|
1844
|
+
return i.map((n, d) => {
|
|
1845
|
+
const c = t === Oe.square || d === a ? ue.primary : ue.default;
|
|
1846
|
+
if (!st(n))
|
|
1847
|
+
return n;
|
|
1848
|
+
const S = t === Oe.square ? Object.assign(
|
|
1849
|
+
{ "--ant-btn-compact-connect-border-color": Re },
|
|
1850
|
+
n.props.style
|
|
1851
|
+
) : n.props.style;
|
|
1852
|
+
return ye(n, { tone: c, style: S });
|
|
1853
|
+
});
|
|
1854
|
+
}
|
|
1855
|
+
const vi = H(function({
|
|
1856
|
+
tone: r = ue.default,
|
|
1857
|
+
shape: t = Oe.circle,
|
|
1858
|
+
open: i = !1,
|
|
1859
|
+
onOpenChange: a,
|
|
1860
|
+
onClick: n,
|
|
1861
|
+
icon: d,
|
|
1862
|
+
style: c,
|
|
1863
|
+
className: S,
|
|
1864
|
+
classNames: v,
|
|
1865
|
+
styles: E,
|
|
1866
|
+
placement: h,
|
|
1867
|
+
children: C,
|
|
1868
|
+
...b
|
|
1869
|
+
}) {
|
|
1870
|
+
if (!i) {
|
|
1871
|
+
const G = {
|
|
1872
|
+
...b,
|
|
1873
|
+
tone: r,
|
|
1874
|
+
shape: t,
|
|
1875
|
+
icon: d,
|
|
1876
|
+
className: S,
|
|
1877
|
+
style: c,
|
|
1878
|
+
onClick: (V) => {
|
|
1879
|
+
n?.(V), a?.(!0);
|
|
1880
|
+
}
|
|
1881
|
+
};
|
|
1882
|
+
return /* @__PURE__ */ y(uo, { ...G });
|
|
1883
|
+
}
|
|
1884
|
+
return /* @__PURE__ */ y(
|
|
1885
|
+
Qt.Group,
|
|
1886
|
+
{
|
|
1887
|
+
...b,
|
|
1888
|
+
className: S,
|
|
1889
|
+
classNames: v,
|
|
1890
|
+
styles: E,
|
|
1891
|
+
placement: h,
|
|
1892
|
+
type: er[r],
|
|
1893
|
+
shape: t,
|
|
1894
|
+
icon: d,
|
|
1895
|
+
style: c,
|
|
1896
|
+
onClick: n,
|
|
1897
|
+
children: go(C, r, t)
|
|
1898
|
+
}
|
|
1899
|
+
);
|
|
1900
|
+
}), Fo = H(function({
|
|
1901
|
+
label: r,
|
|
1902
|
+
help: t,
|
|
1903
|
+
required: i,
|
|
1904
|
+
fullWidth: a = !0,
|
|
1905
|
+
status: n,
|
|
1906
|
+
ref: d,
|
|
1907
|
+
style: c,
|
|
1908
|
+
id: S,
|
|
1909
|
+
...v
|
|
1910
|
+
}) {
|
|
1911
|
+
const E = Ae(), h = S ?? E;
|
|
1912
|
+
return /* @__PURE__ */ y(
|
|
1913
|
+
he.Item,
|
|
1914
|
+
{
|
|
1915
|
+
label: r,
|
|
1916
|
+
htmlFor: h,
|
|
1917
|
+
help: t ? /* @__PURE__ */ y("span", { role: n === "error" ? "alert" : void 0, children: t }) : void 0,
|
|
1918
|
+
required: i,
|
|
1919
|
+
validateStatus: n === "error" ? "error" : void 0,
|
|
1920
|
+
style: { marginBottom: de.sm, width: a ? "100%" : void 0 },
|
|
1921
|
+
children: /* @__PURE__ */ y(
|
|
1922
|
+
Vr,
|
|
1923
|
+
{
|
|
1924
|
+
id: h,
|
|
1925
|
+
ref: d,
|
|
1926
|
+
status: n,
|
|
1927
|
+
"aria-invalid": n === "error" ? !0 : void 0,
|
|
1928
|
+
"aria-required": i ? !0 : void 0,
|
|
1929
|
+
style: { width: a ? "100%" : void 0, ...c },
|
|
1930
|
+
...v
|
|
1931
|
+
}
|
|
1932
|
+
)
|
|
1933
|
+
}
|
|
1934
|
+
);
|
|
1935
|
+
});
|
|
1936
|
+
function fo({
|
|
1937
|
+
label: e,
|
|
1938
|
+
help: r,
|
|
1939
|
+
required: t,
|
|
1940
|
+
fullWidth: i = !0,
|
|
1941
|
+
status: a,
|
|
1942
|
+
style: n,
|
|
1943
|
+
id: d,
|
|
1944
|
+
...c
|
|
1945
|
+
}) {
|
|
1946
|
+
const S = Ae(), v = d ?? S;
|
|
1947
|
+
return /* @__PURE__ */ y(
|
|
1948
|
+
he.Item,
|
|
1949
|
+
{
|
|
1950
|
+
label: e,
|
|
1951
|
+
htmlFor: v,
|
|
1952
|
+
help: r ? /* @__PURE__ */ y("span", { role: a === "error" ? "alert" : void 0, children: r }) : void 0,
|
|
1953
|
+
required: t,
|
|
1954
|
+
validateStatus: a === "error" ? "error" : void 0,
|
|
1955
|
+
style: { marginBottom: de.sm, width: i ? "100%" : void 0 },
|
|
1956
|
+
children: /* @__PURE__ */ y(
|
|
1957
|
+
_r,
|
|
1958
|
+
{
|
|
1959
|
+
id: v,
|
|
1960
|
+
status: a,
|
|
1961
|
+
style: { width: i ? "100%" : void 0, ...n },
|
|
1962
|
+
...c
|
|
1963
|
+
}
|
|
1964
|
+
)
|
|
1965
|
+
}
|
|
1966
|
+
);
|
|
1967
|
+
}
|
|
1968
|
+
const rr = H(fo);
|
|
1969
|
+
function mo({
|
|
1970
|
+
label: e,
|
|
1971
|
+
help: r,
|
|
1972
|
+
required: t,
|
|
1973
|
+
fullWidth: i = !0,
|
|
1974
|
+
status: a,
|
|
1975
|
+
style: n,
|
|
1976
|
+
id: d,
|
|
1977
|
+
...c
|
|
1978
|
+
}) {
|
|
1979
|
+
const S = Ae(), v = d ?? S;
|
|
1980
|
+
return /* @__PURE__ */ y(
|
|
1981
|
+
he.Item,
|
|
1982
|
+
{
|
|
1983
|
+
label: e,
|
|
1984
|
+
htmlFor: v,
|
|
1985
|
+
help: r ? /* @__PURE__ */ y("span", { role: a === "error" ? "alert" : void 0, children: r }) : void 0,
|
|
1986
|
+
required: t,
|
|
1987
|
+
validateStatus: a === "error" ? "error" : void 0,
|
|
1988
|
+
style: { marginBottom: de.sm, width: i ? "100%" : void 0 },
|
|
1989
|
+
children: /* @__PURE__ */ y(
|
|
1990
|
+
Lr,
|
|
1991
|
+
{
|
|
1992
|
+
id: v,
|
|
1993
|
+
status: a,
|
|
1994
|
+
"aria-required": t ? !0 : void 0,
|
|
1995
|
+
style: { width: i ? "100%" : void 0, ...n },
|
|
1996
|
+
...c
|
|
1997
|
+
}
|
|
1998
|
+
)
|
|
1999
|
+
}
|
|
2000
|
+
);
|
|
2001
|
+
}
|
|
2002
|
+
const or = H(mo), Bi = H(function(r) {
|
|
2003
|
+
return /* @__PURE__ */ y(Rr, { ...r });
|
|
2004
|
+
}), Ci = H(function({
|
|
2005
|
+
children: r,
|
|
2006
|
+
align: t = "end"
|
|
2007
|
+
}) {
|
|
2008
|
+
return /* @__PURE__ */ y(
|
|
2009
|
+
Wr,
|
|
2010
|
+
{
|
|
2011
|
+
gap: de.sm,
|
|
2012
|
+
justify: t === "start" ? "flex-start" : t === "center" ? "center" : "flex-end",
|
|
2013
|
+
style: { width: "100%" },
|
|
2014
|
+
children: r
|
|
2015
|
+
}
|
|
2016
|
+
);
|
|
2017
|
+
}), ve = {
|
|
2018
|
+
small: "small",
|
|
2019
|
+
default: "default",
|
|
2020
|
+
large: "large"
|
|
2021
|
+
}, ir = {
|
|
2022
|
+
default: "default",
|
|
2023
|
+
square: "square",
|
|
2024
|
+
round: "round",
|
|
2025
|
+
circle: "circle"
|
|
2026
|
+
}, ho = {
|
|
2027
|
+
circle: "circle",
|
|
2028
|
+
square: "square"
|
|
2029
|
+
}, ct = {
|
|
2030
|
+
[ve.small]: "small",
|
|
2031
|
+
[ve.default]: "medium",
|
|
2032
|
+
[ve.large]: "large"
|
|
2033
|
+
};
|
|
2034
|
+
function bo(e, r) {
|
|
2035
|
+
return e !== ir.square ? r : { borderRadius: Jt.radiusNone, ...r };
|
|
2036
|
+
}
|
|
2037
|
+
const xi = H(function(r) {
|
|
2038
|
+
return /* @__PURE__ */ y(Be, { ...r });
|
|
2039
|
+
}), Ii = H(function({
|
|
2040
|
+
size: r = ve.default,
|
|
2041
|
+
shape: t = ir.default,
|
|
2042
|
+
active: i = !1,
|
|
2043
|
+
style: a,
|
|
2044
|
+
...n
|
|
2045
|
+
}) {
|
|
2046
|
+
return /* @__PURE__ */ y(
|
|
2047
|
+
Be.Button,
|
|
2048
|
+
{
|
|
2049
|
+
...n,
|
|
2050
|
+
active: i,
|
|
2051
|
+
size: ct[r],
|
|
2052
|
+
shape: t,
|
|
2053
|
+
style: bo(t, a)
|
|
2054
|
+
}
|
|
2055
|
+
);
|
|
2056
|
+
}), Ti = H(function({
|
|
2057
|
+
size: r = ve.default,
|
|
2058
|
+
shape: t = ho.circle,
|
|
2059
|
+
active: i = !1,
|
|
2060
|
+
...a
|
|
2061
|
+
}) {
|
|
2062
|
+
return /* @__PURE__ */ y(Be.Avatar, { ...a, active: i, size: ct[r], shape: t });
|
|
2063
|
+
}), Di = H(function({
|
|
2064
|
+
size: r = ve.default,
|
|
2065
|
+
active: t = !1,
|
|
2066
|
+
...i
|
|
2067
|
+
}) {
|
|
2068
|
+
return /* @__PURE__ */ y(Be.Input, { ...i, active: t, size: ct[r] });
|
|
2069
|
+
}), ki = H(function({
|
|
2070
|
+
active: r = !1,
|
|
2071
|
+
...t
|
|
2072
|
+
}) {
|
|
2073
|
+
return /* @__PURE__ */ y(Be.Image, { ...t, active: r });
|
|
2074
|
+
}), Mi = H(function({
|
|
2075
|
+
active: r = !1,
|
|
2076
|
+
...t
|
|
2077
|
+
}) {
|
|
2078
|
+
return /* @__PURE__ */ y(Be.Node, { ...t, active: r });
|
|
2079
|
+
}), po = {
|
|
2080
|
+
filled: "filled",
|
|
2081
|
+
outlined: "outlined",
|
|
2082
|
+
solid: "solid"
|
|
2083
|
+
}, nr = {
|
|
2084
|
+
default: "default",
|
|
2085
|
+
red: "red",
|
|
2086
|
+
volcano: "volcano",
|
|
2087
|
+
orange: "orange",
|
|
2088
|
+
gold: "gold",
|
|
2089
|
+
yellow: "yellow",
|
|
2090
|
+
lime: "lime",
|
|
2091
|
+
green: "green",
|
|
2092
|
+
cyan: "cyan",
|
|
2093
|
+
blue: "blue",
|
|
2094
|
+
geekblue: "geekblue",
|
|
2095
|
+
purple: "purple",
|
|
2096
|
+
magenta: "magenta"
|
|
2097
|
+
}, ar = {
|
|
2098
|
+
default: "default",
|
|
2099
|
+
success: "success",
|
|
2100
|
+
processing: "processing",
|
|
2101
|
+
error: "error",
|
|
2102
|
+
warning: "warning"
|
|
2103
|
+
};
|
|
2104
|
+
function So(e, r) {
|
|
2105
|
+
if (r !== ar.default)
|
|
2106
|
+
return r;
|
|
2107
|
+
if (e !== nr.default)
|
|
2108
|
+
return e;
|
|
2109
|
+
}
|
|
2110
|
+
const Ai = H(function({
|
|
2111
|
+
variant: r = po.filled,
|
|
2112
|
+
color: t = nr.default,
|
|
2113
|
+
status: i = ar.default,
|
|
2114
|
+
...a
|
|
2115
|
+
}) {
|
|
2116
|
+
return /* @__PURE__ */ y(Or, { ...a, color: So(t, i), variant: r });
|
|
2117
|
+
});
|
|
2118
|
+
var ze = (e) => e.type === "checkbox", me = (e) => e instanceof Date, K = (e) => e == null;
|
|
2119
|
+
const lr = (e) => typeof e == "object";
|
|
2120
|
+
var _ = (e) => !K(e) && !Array.isArray(e) && lr(e) && !me(e), rt = (e) => _(e) && e.target ? ze(e.target) ? e.target.checked : e.target.value : e, sr = (e, r) => r.split(".").some((t, i, a) => !isNaN(Number(t)) && e.has(a.slice(0, i).join("."))), dr = (e) => {
|
|
2121
|
+
const r = e.constructor && e.constructor.prototype;
|
|
2122
|
+
return _(r) && r.hasOwnProperty("isPrototypeOf");
|
|
2123
|
+
}, Xe = typeof window < "u" && typeof window.HTMLElement < "u" && typeof document < "u";
|
|
2124
|
+
function O(e) {
|
|
2125
|
+
if (e instanceof Date)
|
|
2126
|
+
return new Date(e);
|
|
2127
|
+
const r = typeof FileList < "u" && e instanceof FileList;
|
|
2128
|
+
if (Xe && (e instanceof Blob || r))
|
|
2129
|
+
return e;
|
|
2130
|
+
const t = Array.isArray(e);
|
|
2131
|
+
if (!t && !(_(e) && dr(e)))
|
|
2132
|
+
return e;
|
|
2133
|
+
const i = t ? [] : Object.create(Object.getPrototypeOf(e));
|
|
2134
|
+
for (const a in e)
|
|
2135
|
+
Object.prototype.hasOwnProperty.call(e, a) && (i[a] = O(e[a]));
|
|
2136
|
+
return i;
|
|
2137
|
+
}
|
|
2138
|
+
const ce = {
|
|
2139
|
+
BLUR: "blur",
|
|
2140
|
+
FOCUS_OUT: "focusout",
|
|
2141
|
+
CHANGE: "change",
|
|
2142
|
+
SUBMIT: "submit",
|
|
2143
|
+
TRIGGER: "trigger",
|
|
2144
|
+
VALID: "valid"
|
|
2145
|
+
}, ne = {
|
|
2146
|
+
onBlur: "onBlur",
|
|
2147
|
+
onChange: "onChange",
|
|
2148
|
+
onSubmit: "onSubmit",
|
|
2149
|
+
onTouched: "onTouched",
|
|
2150
|
+
all: "all"
|
|
2151
|
+
}, ie = {
|
|
2152
|
+
max: "max",
|
|
2153
|
+
min: "min",
|
|
2154
|
+
maxLength: "maxLength",
|
|
2155
|
+
minLength: "minLength",
|
|
2156
|
+
pattern: "pattern",
|
|
2157
|
+
required: "required",
|
|
2158
|
+
validate: "validate"
|
|
2159
|
+
}, Ze = "form", cr = "root", ur = ["__proto__", "constructor", "prototype"];
|
|
2160
|
+
var He = (e) => /^\w*$/.test(e), P = (e) => e === void 0, qe = (e) => e.split(/[.[\]'"]/g).filter(Boolean), F = (e, r, t) => {
|
|
2161
|
+
if (!r || !_(e))
|
|
2162
|
+
return t;
|
|
2163
|
+
const i = He(r) ? [r] : qe(r);
|
|
2164
|
+
if (i.some((n) => ur.includes(n)))
|
|
2165
|
+
return t;
|
|
2166
|
+
const a = i.reduce((n, d) => K(n) ? void 0 : n[d], e);
|
|
2167
|
+
return P(a) || a === e ? P(e[r]) ? t : e[r] : a;
|
|
2168
|
+
}, Z = (e) => typeof e == "boolean", j = (e) => typeof e == "function", w = (e, r, t) => {
|
|
2169
|
+
let i = -1;
|
|
2170
|
+
const a = He(r) ? [r] : qe(r), n = a.length, d = n - 1;
|
|
2171
|
+
for (; ++i < n; ) {
|
|
2172
|
+
const c = a[i];
|
|
2173
|
+
let S = t;
|
|
2174
|
+
if (i !== d) {
|
|
2175
|
+
const v = e[c];
|
|
2176
|
+
S = _(v) || Array.isArray(v) ? v : isNaN(+a[i + 1]) ? {} : [];
|
|
2177
|
+
}
|
|
2178
|
+
if (ur.includes(c))
|
|
2179
|
+
return;
|
|
2180
|
+
e[c] = S, e = e[c];
|
|
2181
|
+
}
|
|
2182
|
+
};
|
|
2183
|
+
const ut = B.createContext(null);
|
|
2184
|
+
ut.displayName = "HookFormControlContext";
|
|
2185
|
+
const gt = () => B.useContext(ut);
|
|
2186
|
+
var gr = (e, r, t, i = !0) => {
|
|
2187
|
+
const a = {};
|
|
2188
|
+
for (const n in e)
|
|
2189
|
+
Object.defineProperty(a, n, {
|
|
2190
|
+
get: () => {
|
|
2191
|
+
const d = n;
|
|
2192
|
+
return r._proxyFormState[d] !== ne.all && (r._proxyFormState[d] = !i || ne.all), t && (t[d] = !0), e[d];
|
|
2193
|
+
}
|
|
2194
|
+
});
|
|
2195
|
+
return a;
|
|
2196
|
+
};
|
|
2197
|
+
const Ft = Xe ? B.useLayoutEffect : B.useEffect;
|
|
2198
|
+
function yo(e) {
|
|
2199
|
+
const r = gt(), { control: t = r, disabled: i, name: a, exact: n } = e || {}, [d, c] = B.useState(() => ({
|
|
2200
|
+
...t._formState,
|
|
2201
|
+
defaultValues: t._defaultValues
|
|
2202
|
+
})), S = B.useRef({
|
|
2203
|
+
isDirty: !1,
|
|
2204
|
+
isLoading: !1,
|
|
2205
|
+
dirtyFields: !1,
|
|
2206
|
+
touchedFields: !1,
|
|
2207
|
+
validatingFields: !1,
|
|
2208
|
+
isValidating: !1,
|
|
2209
|
+
isValid: !1,
|
|
2210
|
+
errors: !1
|
|
2211
|
+
});
|
|
2212
|
+
return Ft(() => t._subscribe({
|
|
2213
|
+
name: a,
|
|
2214
|
+
formState: S.current,
|
|
2215
|
+
exact: n,
|
|
2216
|
+
callback: (v) => {
|
|
2217
|
+
!i && c({
|
|
2218
|
+
...t._formState,
|
|
2219
|
+
...v,
|
|
2220
|
+
defaultValues: t._defaultValues
|
|
2221
|
+
});
|
|
2222
|
+
}
|
|
2223
|
+
}), [a, i, n]), B.useEffect(() => {
|
|
2224
|
+
S.current.isValid && t._setValid(!0);
|
|
2225
|
+
}, [t]), B.useMemo(() => gr(d, t, S.current, !1), [d, t]);
|
|
2226
|
+
}
|
|
2227
|
+
var Y = (e) => typeof e == "string", ot = (e, r, t, i, a) => Y(e) ? (i && r.watch.add(e), F(t, e, a)) : Array.isArray(e) ? e.map((n) => (i && r.watch.add(n), F(t, n))) : (i && (r.watchAll = !0), t), it = (e) => K(e) || !lr(e);
|
|
2228
|
+
const Et = (e, r) => r.length === 0 && !Array.isArray(e) && !dr(e);
|
|
2229
|
+
function J(e, r, t = /* @__PURE__ */ new WeakSet()) {
|
|
2230
|
+
if (e === r)
|
|
2231
|
+
return !0;
|
|
2232
|
+
if (it(e) || it(r))
|
|
2233
|
+
return Object.is(e, r);
|
|
2234
|
+
if (me(e) && me(r))
|
|
2235
|
+
return Object.is(e.getTime(), r.getTime());
|
|
2236
|
+
const i = Object.keys(e), a = Object.keys(r);
|
|
2237
|
+
if (i.length !== a.length)
|
|
2238
|
+
return !1;
|
|
2239
|
+
if (Et(e, i) || Et(r, a))
|
|
2240
|
+
return Object.is(e, r);
|
|
2241
|
+
if (t.has(e) || t.has(r))
|
|
2242
|
+
return !0;
|
|
2243
|
+
t.add(e), t.add(r);
|
|
2244
|
+
for (const n of i) {
|
|
2245
|
+
const d = e[n];
|
|
2246
|
+
if (!(n in r))
|
|
2247
|
+
return !1;
|
|
2248
|
+
if (n !== "ref") {
|
|
2249
|
+
const c = r[n];
|
|
2250
|
+
if (me(d) && me(c) || (_(d) || Array.isArray(d)) && (_(c) || Array.isArray(c)) ? !J(d, c, t) : !Object.is(d, c))
|
|
2251
|
+
return !1;
|
|
2252
|
+
}
|
|
2253
|
+
}
|
|
2254
|
+
return !0;
|
|
2255
|
+
}
|
|
2256
|
+
function vo(e) {
|
|
2257
|
+
const r = gt(), { control: t = r, name: i, defaultValue: a, disabled: n, exact: d, compute: c } = e || {}, S = B.useRef(a), v = B.useRef(c), E = B.useRef(void 0), h = B.useRef(t), C = B.useRef(i);
|
|
2258
|
+
v.current = c;
|
|
2259
|
+
const [b, G] = B.useState(() => {
|
|
2260
|
+
const z = t._getWatch(i, S.current);
|
|
2261
|
+
return v.current ? v.current(z) : z;
|
|
2262
|
+
}), V = B.useCallback((z) => {
|
|
2263
|
+
const D = ot(i, t._names, z || t._formValues, !1, S.current);
|
|
2264
|
+
return v.current ? v.current(D) : D;
|
|
2265
|
+
}, [t._formValues, t._names, i]), L = B.useCallback((z) => {
|
|
2266
|
+
if (!n) {
|
|
2267
|
+
const D = ot(i, t._names, z || t._formValues, !1, S.current);
|
|
2268
|
+
if (v.current) {
|
|
2269
|
+
const ae = v.current(D);
|
|
2270
|
+
J(ae, E.current) || (G(ae), E.current = ae);
|
|
2271
|
+
} else
|
|
2272
|
+
G(D);
|
|
2273
|
+
}
|
|
2274
|
+
}, [t._formValues, t._names, n, i]);
|
|
2275
|
+
Ft(() => ((h.current !== t || !J(C.current, i)) && (h.current = t, C.current = i, L()), t._subscribe({
|
|
2276
|
+
name: i,
|
|
2277
|
+
formState: {
|
|
2278
|
+
values: !0
|
|
2279
|
+
},
|
|
2280
|
+
exact: d,
|
|
2281
|
+
callback: (z) => {
|
|
2282
|
+
L(z.values);
|
|
2283
|
+
}
|
|
2284
|
+
})), [t, d, i, L]), B.useEffect(() => t._removeUnmounted());
|
|
2285
|
+
const R = h.current !== t, x = C.current, A = B.useMemo(() => {
|
|
2286
|
+
if (n)
|
|
2287
|
+
return null;
|
|
2288
|
+
const z = !R && !J(x, i);
|
|
2289
|
+
return R || z ? V() : null;
|
|
2290
|
+
}, [n, R, i, x, V]);
|
|
2291
|
+
return A !== null ? A : b;
|
|
2292
|
+
}
|
|
2293
|
+
function Bo(e) {
|
|
2294
|
+
const r = gt(), { name: t, disabled: i, control: a = r, shouldUnregister: n, defaultValue: d, exact: c = !0 } = e, S = sr(a._names.array, t), v = B.useMemo(() => F(a._formValues, t, F(a._defaultValues, t, d)), [a, t, d]), E = vo({
|
|
2295
|
+
control: a,
|
|
2296
|
+
name: t,
|
|
2297
|
+
defaultValue: v,
|
|
2298
|
+
exact: c
|
|
2299
|
+
}), h = yo({
|
|
2300
|
+
control: a,
|
|
2301
|
+
name: t,
|
|
2302
|
+
exact: c
|
|
2303
|
+
}), C = B.useRef(e), b = B.useRef(a.register(t, {
|
|
2304
|
+
...e.rules,
|
|
2305
|
+
value: E,
|
|
2306
|
+
...Z(e.disabled) ? { disabled: e.disabled } : {}
|
|
2307
|
+
}));
|
|
2308
|
+
C.current = e;
|
|
2309
|
+
const G = B.useMemo(() => Object.defineProperties({}, {
|
|
2310
|
+
invalid: {
|
|
2311
|
+
enumerable: !0,
|
|
2312
|
+
get: () => !!F(h.errors, t)
|
|
2313
|
+
},
|
|
2314
|
+
isDirty: {
|
|
2315
|
+
enumerable: !0,
|
|
2316
|
+
get: () => !!F(h.dirtyFields, t)
|
|
2317
|
+
},
|
|
2318
|
+
isTouched: {
|
|
2319
|
+
enumerable: !0,
|
|
2320
|
+
get: () => !!F(h.touchedFields, t)
|
|
2321
|
+
},
|
|
2322
|
+
isValidating: {
|
|
2323
|
+
enumerable: !0,
|
|
2324
|
+
get: () => !!F(h.validatingFields, t)
|
|
2325
|
+
},
|
|
2326
|
+
error: {
|
|
2327
|
+
enumerable: !0,
|
|
2328
|
+
get: () => F(h.errors, t)
|
|
2329
|
+
}
|
|
2330
|
+
}), [h, t]), V = B.useCallback((A) => {
|
|
2331
|
+
const z = rt(A);
|
|
2332
|
+
F(a._fields, t) || (b.current = a.register(t, {
|
|
2333
|
+
...C.current.rules,
|
|
2334
|
+
value: z
|
|
2335
|
+
})), b.current.onChange({
|
|
2336
|
+
target: {
|
|
2337
|
+
value: rt(A),
|
|
2338
|
+
name: t
|
|
2339
|
+
},
|
|
2340
|
+
type: ce.CHANGE
|
|
2341
|
+
});
|
|
2342
|
+
}, [t, a]), L = B.useCallback(() => b.current.onBlur({
|
|
2343
|
+
target: {
|
|
2344
|
+
value: F(a._formValues, t),
|
|
2345
|
+
name: t
|
|
2346
|
+
},
|
|
2347
|
+
type: ce.BLUR
|
|
2348
|
+
}), [t, a._formValues]), R = B.useCallback((A) => {
|
|
2349
|
+
const z = F(a._fields, t);
|
|
2350
|
+
z && z._f && A && (z._f.ref = {
|
|
2351
|
+
focus: () => j(A.focus) && A.focus(),
|
|
2352
|
+
select: () => j(A.select) && A.select(),
|
|
2353
|
+
setCustomValidity: (D) => j(A.setCustomValidity) && A.setCustomValidity(D),
|
|
2354
|
+
reportValidity: () => j(A.reportValidity) && A.reportValidity()
|
|
2355
|
+
});
|
|
2356
|
+
}, [a._fields, t]), x = B.useMemo(() => ({
|
|
2357
|
+
name: t,
|
|
2358
|
+
value: E,
|
|
2359
|
+
...Z(i) || h.disabled ? { disabled: h.disabled || i } : {},
|
|
2360
|
+
onChange: V,
|
|
2361
|
+
onBlur: L,
|
|
2362
|
+
ref: R
|
|
2363
|
+
}), [t, i, h.disabled, V, L, R, E]);
|
|
2364
|
+
return B.useEffect(() => {
|
|
2365
|
+
const A = a._options.shouldUnregister || n;
|
|
2366
|
+
a.register(t, {
|
|
2367
|
+
...C.current.rules,
|
|
2368
|
+
...Z(C.current.disabled) ? { disabled: C.current.disabled } : {}
|
|
2369
|
+
});
|
|
2370
|
+
const z = (D, ae) => {
|
|
2371
|
+
const le = F(a._fields, D);
|
|
2372
|
+
le && le._f && (le._f.mount = ae);
|
|
2373
|
+
};
|
|
2374
|
+
if (z(t, !0), A) {
|
|
2375
|
+
const D = O(F(n ? a._defaultValues : a._options.values || a._defaultValues, t, F(a._options.defaultValues, t, C.current.defaultValue)));
|
|
2376
|
+
w(a._defaultValues, t, D), P(F(a._formValues, t)) && w(a._formValues, t, D);
|
|
2377
|
+
}
|
|
2378
|
+
return !S && a.register(t), () => {
|
|
2379
|
+
(S ? A && !a._state.action : A) ? a.unregister(t) : z(t, !1);
|
|
2380
|
+
};
|
|
2381
|
+
}, [t, a, S, n]), B.useEffect(() => {
|
|
2382
|
+
a._setDisabledField({
|
|
2383
|
+
disabled: i,
|
|
2384
|
+
name: t
|
|
2385
|
+
});
|
|
2386
|
+
}, [i, t, a]), B.useMemo(() => ({
|
|
2387
|
+
field: x,
|
|
2388
|
+
formState: h,
|
|
2389
|
+
fieldState: G
|
|
2390
|
+
}), [x, h, G]);
|
|
2391
|
+
}
|
|
2392
|
+
const Co = (e) => e.render(Bo(e)), ft = B.createContext(null);
|
|
2393
|
+
ft.displayName = "HookFormContext";
|
|
2394
|
+
const xo = () => B.useContext(ft), Io = ({ children: e, watch: r, getValues: t, getFieldState: i, setError: a, clearErrors: n, setValue: d, setValues: c, trigger: S, formState: v, resetField: E, reset: h, handleSubmit: C, unregister: b, control: G, register: V, setFocus: L, subscribe: R }) => {
|
|
2395
|
+
const x = B.useMemo(() => ({
|
|
2396
|
+
watch: r,
|
|
2397
|
+
getValues: t,
|
|
2398
|
+
getFieldState: i,
|
|
2399
|
+
setError: a,
|
|
2400
|
+
clearErrors: n,
|
|
2401
|
+
setValue: d,
|
|
2402
|
+
setValues: c,
|
|
2403
|
+
trigger: S,
|
|
2404
|
+
formState: v,
|
|
2405
|
+
resetField: E,
|
|
2406
|
+
reset: h,
|
|
2407
|
+
handleSubmit: C,
|
|
2408
|
+
unregister: b,
|
|
2409
|
+
control: G,
|
|
2410
|
+
register: V,
|
|
2411
|
+
setFocus: L,
|
|
2412
|
+
subscribe: R
|
|
2413
|
+
}), [
|
|
2414
|
+
n,
|
|
2415
|
+
G,
|
|
2416
|
+
v,
|
|
2417
|
+
i,
|
|
2418
|
+
t,
|
|
2419
|
+
C,
|
|
2420
|
+
V,
|
|
2421
|
+
h,
|
|
2422
|
+
E,
|
|
2423
|
+
a,
|
|
2424
|
+
L,
|
|
2425
|
+
d,
|
|
2426
|
+
c,
|
|
2427
|
+
R,
|
|
2428
|
+
S,
|
|
2429
|
+
b,
|
|
2430
|
+
r
|
|
2431
|
+
]);
|
|
2432
|
+
return B.createElement(
|
|
2433
|
+
ft.Provider,
|
|
2434
|
+
{ value: x },
|
|
2435
|
+
B.createElement(ut.Provider, { value: x.control }, e)
|
|
2436
|
+
);
|
|
2437
|
+
};
|
|
2438
|
+
var To = (e, r, t, i, a) => r ? {
|
|
2439
|
+
...t[e],
|
|
2440
|
+
types: {
|
|
2441
|
+
...t[e] && t[e].types ? t[e].types : {},
|
|
2442
|
+
[i]: a || !0
|
|
2443
|
+
}
|
|
2444
|
+
} : {}, Fr = (e) => Array.isArray(e) ? e.filter(Boolean) : [], We = (e) => Array.isArray(e) ? e : [e], wt = () => {
|
|
2445
|
+
let e = [];
|
|
2446
|
+
return {
|
|
2447
|
+
get observers() {
|
|
2448
|
+
return e;
|
|
2449
|
+
},
|
|
2450
|
+
next: (a) => {
|
|
2451
|
+
for (const n of e)
|
|
2452
|
+
n.next && n.next(a);
|
|
2453
|
+
},
|
|
2454
|
+
subscribe: (a) => (e.push(a), {
|
|
2455
|
+
unsubscribe: () => {
|
|
2456
|
+
e = e.filter((n) => n !== a);
|
|
2457
|
+
}
|
|
2458
|
+
}),
|
|
2459
|
+
unsubscribe: () => {
|
|
2460
|
+
e = [];
|
|
2461
|
+
}
|
|
2462
|
+
};
|
|
2463
|
+
};
|
|
2464
|
+
function fr(e, r) {
|
|
2465
|
+
const t = {};
|
|
2466
|
+
for (const i in e)
|
|
2467
|
+
if (e.hasOwnProperty(i)) {
|
|
2468
|
+
const a = e[i], n = r[i];
|
|
2469
|
+
if (a && _(a) && n) {
|
|
2470
|
+
const d = fr(a, n);
|
|
2471
|
+
_(d) && (t[i] = d);
|
|
2472
|
+
} else e[i] && (t[i] = n);
|
|
2473
|
+
}
|
|
2474
|
+
return t;
|
|
2475
|
+
}
|
|
2476
|
+
var $ = (e) => _(e) && !Object.keys(e).length, mt = (e) => e.type === "file", Ge = (e) => {
|
|
2477
|
+
if (!Xe)
|
|
2478
|
+
return !1;
|
|
2479
|
+
const r = e ? e.ownerDocument : 0;
|
|
2480
|
+
return e instanceof (r && r.defaultView ? r.defaultView.HTMLElement : HTMLElement);
|
|
2481
|
+
}, mr = (e) => e.type === "select-multiple", ht = (e) => e.type === "radio", Do = (e) => ht(e) || ze(e), Je = (e) => Ge(e) && e.isConnected;
|
|
2482
|
+
function ko(e, r) {
|
|
2483
|
+
const t = r.slice(0, -1).length;
|
|
2484
|
+
let i = 0;
|
|
2485
|
+
for (; i < t; ) {
|
|
2486
|
+
if (K(e)) {
|
|
2487
|
+
e = void 0;
|
|
2488
|
+
break;
|
|
2489
|
+
}
|
|
2490
|
+
e = e[r[i]], i++;
|
|
2491
|
+
}
|
|
2492
|
+
return e;
|
|
2493
|
+
}
|
|
2494
|
+
function Mo(e) {
|
|
2495
|
+
for (const r in e)
|
|
2496
|
+
if (e.hasOwnProperty(r) && !P(e[r]))
|
|
2497
|
+
return !1;
|
|
2498
|
+
return !0;
|
|
2499
|
+
}
|
|
2500
|
+
function X(e, r) {
|
|
2501
|
+
if (Y(r) && Object.prototype.hasOwnProperty.call(e, r))
|
|
2502
|
+
return delete e[r], e;
|
|
2503
|
+
const t = Array.isArray(r) ? r : He(r) ? [r] : qe(r), i = t.length === 1 ? e : ko(e, t), a = t.length - 1, n = t[a];
|
|
2504
|
+
return i && delete i[n], a !== 0 && (_(i) && $(i) || Array.isArray(i) && Mo(i)) && X(e, t.slice(0, -1)), e;
|
|
2505
|
+
}
|
|
2506
|
+
var Ao = (e) => {
|
|
2507
|
+
for (const r in e)
|
|
2508
|
+
if (j(e[r]))
|
|
2509
|
+
return !0;
|
|
2510
|
+
return !1;
|
|
2511
|
+
};
|
|
2512
|
+
function hr(e) {
|
|
2513
|
+
return Array.isArray(e) || _(e) && !Ao(e);
|
|
2514
|
+
}
|
|
2515
|
+
function nt(e, r = {}) {
|
|
2516
|
+
for (const t in e) {
|
|
2517
|
+
const i = e[t];
|
|
2518
|
+
hr(i) ? (r[t] = Array.isArray(i) ? [] : {}, nt(i, r[t])) : P(i) || (r[t] = !0);
|
|
2519
|
+
}
|
|
2520
|
+
return r;
|
|
2521
|
+
}
|
|
2522
|
+
function at(e) {
|
|
2523
|
+
if (e !== !1) {
|
|
2524
|
+
if (e === !0)
|
|
2525
|
+
return !0;
|
|
2526
|
+
if (Array.isArray(e)) {
|
|
2527
|
+
const r = e.map((t) => at(t));
|
|
2528
|
+
return r.some((t) => t !== void 0) ? r : void 0;
|
|
2529
|
+
}
|
|
2530
|
+
if (_(e)) {
|
|
2531
|
+
const r = {};
|
|
2532
|
+
for (const t in e) {
|
|
2533
|
+
const i = at(e[t]);
|
|
2534
|
+
P(i) || (r[t] = i);
|
|
2535
|
+
}
|
|
2536
|
+
return Object.keys(r).length ? r : void 0;
|
|
2537
|
+
}
|
|
2538
|
+
}
|
|
2539
|
+
}
|
|
2540
|
+
function Fe(e, r, t) {
|
|
2541
|
+
t || (t = nt(r));
|
|
2542
|
+
for (const i in e) {
|
|
2543
|
+
const a = e[i];
|
|
2544
|
+
if (hr(a))
|
|
2545
|
+
P(r) || it(t[i]) ? t[i] = nt(a, Array.isArray(a) ? [] : {}) : Fe(a, K(r) ? {} : r[i], t[i]);
|
|
2546
|
+
else {
|
|
2547
|
+
const n = r[i];
|
|
2548
|
+
t[i] = !J(a, n);
|
|
2549
|
+
}
|
|
2550
|
+
}
|
|
2551
|
+
return at(t) || {};
|
|
2552
|
+
}
|
|
2553
|
+
const Pt = {
|
|
2554
|
+
value: !1,
|
|
2555
|
+
isValid: !1
|
|
2556
|
+
}, Vt = { value: !0, isValid: !0 };
|
|
2557
|
+
var br = (e) => {
|
|
2558
|
+
if (Array.isArray(e)) {
|
|
2559
|
+
if (e.length > 1) {
|
|
2560
|
+
const r = e.filter((t) => t && t.checked && !t.disabled).map((t) => t.value);
|
|
2561
|
+
return { value: r, isValid: !!r.length };
|
|
2562
|
+
}
|
|
2563
|
+
return e[0].checked && !e[0].disabled ? (
|
|
2564
|
+
// @ts-expect-error expected to work in the browser
|
|
2565
|
+
e[0].attributes && !P(e[0].attributes.value) ? P(e[0].value) || e[0].value === "" ? Vt : { value: e[0].value, isValid: !0 } : Vt
|
|
2566
|
+
) : Pt;
|
|
2567
|
+
}
|
|
2568
|
+
return Pt;
|
|
2569
|
+
}, pr = (e, { valueAsNumber: r, valueAsDate: t, setValueAs: i }) => P(e) ? e : r ? e === "" ? NaN : e && +e : t && Y(e) ? new Date(e) : i ? i(e) : e;
|
|
2570
|
+
const _t = {
|
|
2571
|
+
isValid: !1,
|
|
2572
|
+
value: null
|
|
2573
|
+
};
|
|
2574
|
+
var Sr = (e) => Array.isArray(e) ? e.reduce((r, t) => t && t.checked && !t.disabled ? {
|
|
2575
|
+
isValid: !0,
|
|
2576
|
+
value: t.value
|
|
2577
|
+
} : r, _t) : _t;
|
|
2578
|
+
function Lt(e) {
|
|
2579
|
+
const r = e.ref;
|
|
2580
|
+
return mt(r) ? r.files : ht(r) ? Sr(e.refs).value : mr(r) ? [...r.selectedOptions].map(({ value: t }) => t) : ze(r) ? br(e.refs).value : pr(P(r.value) ? e.ref.value : r.value, e);
|
|
2581
|
+
}
|
|
2582
|
+
var zo = (e, r, t, i) => {
|
|
2583
|
+
const a = {};
|
|
2584
|
+
for (const n of e) {
|
|
2585
|
+
const d = F(r, n);
|
|
2586
|
+
d && w(a, n, d._f);
|
|
2587
|
+
}
|
|
2588
|
+
return {
|
|
2589
|
+
criteriaMode: t,
|
|
2590
|
+
names: [...e],
|
|
2591
|
+
fields: a,
|
|
2592
|
+
shouldUseNativeValidation: i
|
|
2593
|
+
};
|
|
2594
|
+
}, Ne = (e) => e instanceof RegExp, Te = (e) => P(e) ? e : Ne(e) ? e.source : _(e) ? Ne(e.value) ? e.value.source : e.value : e, Rt = (e) => ({
|
|
2595
|
+
isOnSubmit: !e || e === ne.onSubmit,
|
|
2596
|
+
isOnBlur: e === ne.onBlur,
|
|
2597
|
+
isOnChange: e === ne.onChange,
|
|
2598
|
+
isOnAll: e === ne.all,
|
|
2599
|
+
isOnTouch: e === ne.onTouched
|
|
2600
|
+
});
|
|
2601
|
+
const Wt = "AsyncFunction";
|
|
2602
|
+
var Ho = (e) => !!e && !!e.validate && !!(j(e.validate) && e.validate.constructor.name === Wt || _(e.validate) && Object.values(e.validate).find((r) => r.constructor.name === Wt)), Eo = (e) => e.mount && (e.required || e.min || e.max || e.maxLength || e.minLength || e.pattern || e.validate), Ot = (e, r, t) => !t && (r.watchAll || r.watch.has(e) || [...r.watch].some((i) => e.startsWith(`${i}.`)));
|
|
2603
|
+
const ke = (e, r, t, i) => {
|
|
2604
|
+
for (const a of t || Object.keys(e)) {
|
|
2605
|
+
const n = F(e, a);
|
|
2606
|
+
if (n) {
|
|
2607
|
+
const { _f: d, ...c } = n;
|
|
2608
|
+
if (d) {
|
|
2609
|
+
if (d.refs && d.refs[0] && r(d.refs[0], a) && !i)
|
|
2610
|
+
return !0;
|
|
2611
|
+
if (d.ref && r(d.ref, d.name) && !i)
|
|
2612
|
+
return !0;
|
|
2613
|
+
if (ke(c, r))
|
|
2614
|
+
break;
|
|
2615
|
+
} else if (_(c) && ke(c, r))
|
|
2616
|
+
break;
|
|
2617
|
+
}
|
|
2618
|
+
}
|
|
2619
|
+
};
|
|
2620
|
+
function Gt(e, r, t) {
|
|
2621
|
+
const i = F(e, t);
|
|
2622
|
+
if (i || He(t))
|
|
2623
|
+
return {
|
|
2624
|
+
error: i,
|
|
2625
|
+
name: t
|
|
2626
|
+
};
|
|
2627
|
+
const a = t.split(".");
|
|
2628
|
+
for (; a.length; ) {
|
|
2629
|
+
const n = a.join("."), d = F(r, n), c = F(e, n);
|
|
2630
|
+
if (d && !Array.isArray(d) && t !== n)
|
|
2631
|
+
return { name: t };
|
|
2632
|
+
if (c && c.type)
|
|
2633
|
+
return {
|
|
2634
|
+
name: n,
|
|
2635
|
+
error: c
|
|
2636
|
+
};
|
|
2637
|
+
if (c && c.root && c.root.type)
|
|
2638
|
+
return {
|
|
2639
|
+
name: `${n}.root`,
|
|
2640
|
+
error: c.root
|
|
2641
|
+
};
|
|
2642
|
+
a.pop();
|
|
2643
|
+
}
|
|
2644
|
+
return {
|
|
2645
|
+
name: t
|
|
2646
|
+
};
|
|
2647
|
+
}
|
|
2648
|
+
var wo = (e, r, t, i) => {
|
|
2649
|
+
t(e);
|
|
2650
|
+
const { name: a, ...n } = e;
|
|
2651
|
+
return $(n) || i && Object.keys(n).length >= Object.keys(r).length || Object.keys(n).find((d) => r[d] === (!i || ne.all));
|
|
2652
|
+
}, Po = (e, r, t) => !e || !r || e === r || We(e).some((i) => i && (t ? i === r : i.startsWith(r) || r.startsWith(i))), Vo = (e, r, t, i, a) => a.isOnAll ? !1 : !t && a.isOnTouch ? !(r || e) : (t ? i.isOnBlur : a.isOnBlur) ? !e : (t ? i.isOnChange : a.isOnChange) ? e : !0, _o = (e, r) => !Fr(F(e, r)).length && X(e, r), Nt = (e, r, t) => {
|
|
2653
|
+
const i = F(e, t), a = Array.isArray(i) ? i : [];
|
|
2654
|
+
return w(a, cr, r[t]), w(e, t, a), e;
|
|
2655
|
+
};
|
|
2656
|
+
function Ut(e, r, t = "validate") {
|
|
2657
|
+
if (Y(e) || Array.isArray(e) && e.every(Y) || Z(e) && !e)
|
|
2658
|
+
return {
|
|
2659
|
+
type: t,
|
|
2660
|
+
message: Y(e) ? e : "",
|
|
2661
|
+
ref: r
|
|
2662
|
+
};
|
|
2663
|
+
}
|
|
2664
|
+
var Se = (e) => _(e) && !Ne(e) ? e : {
|
|
2665
|
+
value: e,
|
|
2666
|
+
message: ""
|
|
2667
|
+
}, Xt = async (e, r, t, i, a, n) => {
|
|
2668
|
+
const { ref: d, refs: c, required: S, maxLength: v, minLength: E, min: h, max: C, pattern: b, validate: G, name: V, valueAsNumber: L, mount: R } = e._f, x = F(t, V);
|
|
2669
|
+
if (!R || r.has(V))
|
|
2670
|
+
return {};
|
|
2671
|
+
const A = c ? c[0] : d, z = (M) => {
|
|
2672
|
+
a && A.reportValidity && (A.setCustomValidity(Z(M) ? "" : M || ""), A.reportValidity());
|
|
2673
|
+
}, D = {}, ae = ht(d), le = ze(d), Ee = ae || le, be = (L || mt(d)) && P(d.value) && P(x) || Ge(d) && d.value === "" || x === "" || Array.isArray(x) && !x.length, re = To.bind(null, V, i, D), we = (M, T, q, W = ie.maxLength, ee = ie.minLength) => {
|
|
2674
|
+
const se = M ? T : q;
|
|
2675
|
+
D[V] = {
|
|
2676
|
+
type: M ? W : ee,
|
|
2677
|
+
message: se,
|
|
2678
|
+
ref: d,
|
|
2679
|
+
...re(M ? W : ee, se)
|
|
2680
|
+
};
|
|
2681
|
+
};
|
|
2682
|
+
if (n ? !Array.isArray(x) || !x.length : S && (!Ee && (be || K(x)) || Z(x) && !x || le && !br(c).isValid || ae && !Sr(c).isValid)) {
|
|
2683
|
+
const { value: M, message: T } = Y(S) ? { value: !!S, message: S } : Se(S);
|
|
2684
|
+
if (M && (D[V] = {
|
|
2685
|
+
type: ie.required,
|
|
2686
|
+
message: T,
|
|
2687
|
+
ref: A,
|
|
2688
|
+
...re(ie.required, T)
|
|
2689
|
+
}, !i))
|
|
2690
|
+
return z(T), D;
|
|
2691
|
+
}
|
|
2692
|
+
if (!be && (!K(h) || !K(C))) {
|
|
2693
|
+
let M, T;
|
|
2694
|
+
const q = Se(C), W = Se(h);
|
|
2695
|
+
if (!K(x) && !isNaN(x)) {
|
|
2696
|
+
const ee = d.valueAsNumber || x && +x;
|
|
2697
|
+
K(q.value) || (M = ee > q.value), K(W.value) || (T = ee < W.value);
|
|
2698
|
+
} else {
|
|
2699
|
+
const ee = d.valueAsDate || new Date(x), se = (Pe) => /* @__PURE__ */ new Date((/* @__PURE__ */ new Date()).toDateString() + " " + Pe), pe = d.type == "time", Ce = d.type == "week";
|
|
2700
|
+
Y(q.value) && x && (M = pe ? se(x) > se(q.value) : Ce ? x > q.value : ee > new Date(q.value)), Y(W.value) && x && (T = pe ? se(x) < se(W.value) : Ce ? x < W.value : ee < new Date(W.value));
|
|
2701
|
+
}
|
|
2702
|
+
if ((M || T) && (we(!!M, q.message, W.message, ie.max, ie.min), !i))
|
|
2703
|
+
return z(D[V].message), D;
|
|
2704
|
+
}
|
|
2705
|
+
if ((v || E) && !be && (Y(x) || n && Array.isArray(x))) {
|
|
2706
|
+
const M = Se(v), T = Se(E), q = !K(M.value) && x.length > +M.value, W = !K(T.value) && x.length < +T.value;
|
|
2707
|
+
if ((q || W) && (we(q, M.message, T.message), !i))
|
|
2708
|
+
return z(D[V].message), D;
|
|
2709
|
+
}
|
|
2710
|
+
if (b && !be && Y(x)) {
|
|
2711
|
+
const { value: M, message: T } = Se(b);
|
|
2712
|
+
if (Ne(M) && !x.match(M) && (D[V] = {
|
|
2713
|
+
type: ie.pattern,
|
|
2714
|
+
message: T,
|
|
2715
|
+
ref: d,
|
|
2716
|
+
...re(ie.pattern, T)
|
|
2717
|
+
}, !i))
|
|
2718
|
+
return z(T), D;
|
|
2719
|
+
}
|
|
2720
|
+
if (G) {
|
|
2721
|
+
if (j(G)) {
|
|
2722
|
+
const M = await G(x, t), T = Ut(M, A);
|
|
2723
|
+
if (T && (D[V] = {
|
|
2724
|
+
...T,
|
|
2725
|
+
...re(ie.validate, T.message)
|
|
2726
|
+
}, !i))
|
|
2727
|
+
return z(T.message), D;
|
|
2728
|
+
} else if (_(G)) {
|
|
2729
|
+
let M = {};
|
|
2730
|
+
for (const T in G) {
|
|
2731
|
+
if (!$(M) && !i)
|
|
2732
|
+
break;
|
|
2733
|
+
const q = Ut(await G[T](x, t), A, T);
|
|
2734
|
+
q && (M = {
|
|
2735
|
+
...q,
|
|
2736
|
+
...re(T, q.message)
|
|
2737
|
+
}, z(q.message), i && (D[V] = M));
|
|
2738
|
+
}
|
|
2739
|
+
if (!$(M) && (D[V] = {
|
|
2740
|
+
ref: A,
|
|
2741
|
+
...M
|
|
2742
|
+
}, !i))
|
|
2743
|
+
return D;
|
|
2744
|
+
}
|
|
2745
|
+
}
|
|
2746
|
+
return z(!0), D;
|
|
2747
|
+
};
|
|
2748
|
+
const Lo = {
|
|
2749
|
+
mode: ne.onSubmit,
|
|
2750
|
+
reValidateMode: ne.onChange,
|
|
2751
|
+
shouldFocusError: !0
|
|
2752
|
+
}, yr = {
|
|
2753
|
+
submitCount: 0,
|
|
2754
|
+
isDirty: !1,
|
|
2755
|
+
isReady: !1,
|
|
2756
|
+
isValidating: !1,
|
|
2757
|
+
isSubmitted: !1,
|
|
2758
|
+
isSubmitting: !1,
|
|
2759
|
+
isSubmitSuccessful: !1,
|
|
2760
|
+
isValid: !1,
|
|
2761
|
+
touchedFields: {},
|
|
2762
|
+
dirtyFields: {},
|
|
2763
|
+
validatingFields: {}
|
|
2764
|
+
};
|
|
2765
|
+
function Ro(e = {}) {
|
|
2766
|
+
let r = {
|
|
2767
|
+
...Lo,
|
|
2768
|
+
...e
|
|
2769
|
+
}, t = {
|
|
2770
|
+
...O(yr),
|
|
2771
|
+
isLoading: j(r.defaultValues),
|
|
2772
|
+
errors: r.errors || {},
|
|
2773
|
+
disabled: r.disabled || !1
|
|
2774
|
+
}, i = {}, a = _(r.defaultValues) || _(r.values) ? O(r.defaultValues || r.values) || {} : {}, n = r.shouldUnregister ? {} : O(a), d = {
|
|
2775
|
+
action: !1,
|
|
2776
|
+
mount: !1,
|
|
2777
|
+
watch: !1,
|
|
2778
|
+
keepIsValid: !1
|
|
2779
|
+
}, c = {
|
|
2780
|
+
mount: /* @__PURE__ */ new Set(),
|
|
2781
|
+
disabled: /* @__PURE__ */ new Set(),
|
|
2782
|
+
unMount: /* @__PURE__ */ new Set(),
|
|
2783
|
+
array: /* @__PURE__ */ new Set(),
|
|
2784
|
+
watch: /* @__PURE__ */ new Set(),
|
|
2785
|
+
registerName: /* @__PURE__ */ new Set()
|
|
2786
|
+
}, S, v = 0;
|
|
2787
|
+
const E = {
|
|
2788
|
+
isDirty: !1,
|
|
2789
|
+
dirtyFields: !1,
|
|
2790
|
+
validatingFields: !1,
|
|
2791
|
+
touchedFields: !1,
|
|
2792
|
+
isValidating: !1,
|
|
2793
|
+
isValid: !1,
|
|
2794
|
+
errors: !1
|
|
2795
|
+
}, h = {
|
|
2796
|
+
...E
|
|
2797
|
+
};
|
|
2798
|
+
let C = {
|
|
2799
|
+
...h
|
|
2800
|
+
};
|
|
2801
|
+
const b = {
|
|
2802
|
+
array: wt(),
|
|
2803
|
+
state: wt()
|
|
2804
|
+
}, G = r.criteriaMode === ne.all, V = (o) => (l) => {
|
|
2805
|
+
clearTimeout(v), v = setTimeout(o, l);
|
|
2806
|
+
}, L = async (o) => {
|
|
2807
|
+
if (!d.keepIsValid && !r.disabled && (h.isValid || C.isValid || o)) {
|
|
2808
|
+
let l;
|
|
2809
|
+
r.resolver ? (l = $((await re()).errors), R()) : l = await T({
|
|
2810
|
+
fields: i,
|
|
2811
|
+
onlyCheckValid: !0,
|
|
2812
|
+
eventType: ce.VALID
|
|
2813
|
+
}), l !== t.isValid && b.state.next({
|
|
2814
|
+
isValid: l
|
|
2815
|
+
});
|
|
2816
|
+
}
|
|
2817
|
+
}, R = (o, l) => {
|
|
2818
|
+
!r.disabled && (h.isValidating || h.validatingFields || C.isValidating || C.validatingFields) && ((o || Array.from(c.mount)).forEach((s) => {
|
|
2819
|
+
s && (l ? w(t.validatingFields, s, l) : X(t.validatingFields, s));
|
|
2820
|
+
}), b.state.next({
|
|
2821
|
+
validatingFields: t.validatingFields,
|
|
2822
|
+
isValidating: !$(t.validatingFields)
|
|
2823
|
+
}));
|
|
2824
|
+
}, x = () => {
|
|
2825
|
+
t.dirtyFields = Fe(a, n);
|
|
2826
|
+
}, A = (o, l = [], s, u, f = !0, m = !0) => {
|
|
2827
|
+
if (u && s && !r.disabled) {
|
|
2828
|
+
if (d.action = !0, m && Array.isArray(F(i, o))) {
|
|
2829
|
+
const g = s(F(i, o), u.argA, u.argB);
|
|
2830
|
+
f && w(i, o, g);
|
|
2831
|
+
}
|
|
2832
|
+
if (m && Array.isArray(F(t.errors, o))) {
|
|
2833
|
+
const g = s(F(t.errors, o), u.argA, u.argB);
|
|
2834
|
+
f && w(t.errors, o, g), _o(t.errors, o);
|
|
2835
|
+
}
|
|
2836
|
+
if ((h.touchedFields || C.touchedFields) && m && Array.isArray(F(t.touchedFields, o))) {
|
|
2837
|
+
const g = s(F(t.touchedFields, o), u.argA, u.argB);
|
|
2838
|
+
f && w(t.touchedFields, o, g);
|
|
2839
|
+
}
|
|
2840
|
+
(h.dirtyFields || C.dirtyFields) && x(), b.state.next({
|
|
2841
|
+
name: o,
|
|
2842
|
+
isDirty: W(o, l),
|
|
2843
|
+
dirtyFields: t.dirtyFields,
|
|
2844
|
+
errors: t.errors,
|
|
2845
|
+
isValid: t.isValid
|
|
2846
|
+
});
|
|
2847
|
+
} else
|
|
2848
|
+
w(n, o, l);
|
|
2849
|
+
}, z = (o, l) => {
|
|
2850
|
+
w(t.errors, o, l), b.state.next({
|
|
2851
|
+
errors: t.errors
|
|
2852
|
+
});
|
|
2853
|
+
}, D = (o) => {
|
|
2854
|
+
t.errors = o, b.state.next({
|
|
2855
|
+
errors: t.errors,
|
|
2856
|
+
isValid: !1
|
|
2857
|
+
});
|
|
2858
|
+
}, ae = (o) => {
|
|
2859
|
+
const l = He(o) ? [o] : qe(o);
|
|
2860
|
+
let s = n, u = a;
|
|
2861
|
+
for (let f = 0; f < l.length - 1; f++) {
|
|
2862
|
+
const m = l[f];
|
|
2863
|
+
if (s = K(s) ? s : s[m], u = K(u) ? u : u[m], s === null && u !== null)
|
|
2864
|
+
return !0;
|
|
2865
|
+
}
|
|
2866
|
+
return !1;
|
|
2867
|
+
}, le = (o, l, s, u) => {
|
|
2868
|
+
const f = F(i, o);
|
|
2869
|
+
if (f) {
|
|
2870
|
+
if (ae(o))
|
|
2871
|
+
return;
|
|
2872
|
+
const m = P(F(n, o)), g = F(n, o, P(s) ? F(a, o) : s);
|
|
2873
|
+
P(g) || u && u.defaultChecked || l ? w(n, o, l ? g : Lt(f._f)) : pe(o, g), d.mount && !d.action && (L(), m && t.isDirty && (h.isDirty || C.isDirty) && (W() || (t.isDirty = !1, b.state.next({ ...t }))));
|
|
2874
|
+
}
|
|
2875
|
+
}, Ee = (o, l, s, u, f) => {
|
|
2876
|
+
let m = !1, g = !1;
|
|
2877
|
+
const p = {
|
|
2878
|
+
name: o
|
|
2879
|
+
};
|
|
2880
|
+
if (!r.disabled) {
|
|
2881
|
+
if (!s || u) {
|
|
2882
|
+
(h.isDirty || C.isDirty) && (g = t.isDirty, t.isDirty = p.isDirty = W(), m = g !== p.isDirty);
|
|
2883
|
+
const I = J(F(a, o), l);
|
|
2884
|
+
g = !!F(t.dirtyFields, o), I !== t.isDirty ? t.dirtyFields = Fe(a, n) : I ? X(t.dirtyFields, o) : w(t.dirtyFields, o, !0), p.dirtyFields = t.dirtyFields, m = m || (h.dirtyFields || C.dirtyFields) && g !== !I;
|
|
2885
|
+
}
|
|
2886
|
+
if (s) {
|
|
2887
|
+
const I = F(t.touchedFields, o);
|
|
2888
|
+
I || (w(t.touchedFields, o, s), p.touchedFields = t.touchedFields, m = m || (h.touchedFields || C.touchedFields) && I !== s);
|
|
2889
|
+
}
|
|
2890
|
+
m && f && b.state.next(p);
|
|
2891
|
+
}
|
|
2892
|
+
return m ? p : {};
|
|
2893
|
+
}, be = (o, l, s, u) => {
|
|
2894
|
+
const f = F(t.errors, o), m = (h.isValid || C.isValid) && Z(l) && t.isValid !== l;
|
|
2895
|
+
if (r.delayError && s ? (S = V(() => z(o, s)), S(r.delayError)) : (clearTimeout(v), S = null, s ? w(t.errors, o, s) : X(t.errors, o)), (s ? !J(f, s) : f) || !$(u) || m) {
|
|
2896
|
+
const g = {
|
|
2897
|
+
...u,
|
|
2898
|
+
...m && Z(l) ? { isValid: l } : {},
|
|
2899
|
+
errors: t.errors,
|
|
2900
|
+
name: o
|
|
2901
|
+
};
|
|
2902
|
+
t = {
|
|
2903
|
+
...t,
|
|
2904
|
+
...g
|
|
2905
|
+
}, b.state.next(g);
|
|
2906
|
+
}
|
|
2907
|
+
}, re = async (o) => (R(o, !0), await r.resolver(n, r.context, zo(o || c.mount, i, r.criteriaMode, r.shouldUseNativeValidation))), we = async (o) => {
|
|
2908
|
+
const { errors: l } = await re(o);
|
|
2909
|
+
if (R(o), o)
|
|
2910
|
+
for (const s of o) {
|
|
2911
|
+
const u = F(l, s);
|
|
2912
|
+
u ? c.array.has(s) && _(u) && !Object.keys(u).some((f) => !Number.isNaN(Number(f))) ? Nt(t.errors, { [s]: u }, s) : w(t.errors, s, u) : X(t.errors, s);
|
|
2913
|
+
}
|
|
2914
|
+
else
|
|
2915
|
+
t.errors = l;
|
|
2916
|
+
return l;
|
|
2917
|
+
}, M = async ({ name: o, eventType: l }) => {
|
|
2918
|
+
if (e.validate) {
|
|
2919
|
+
const s = await e.validate({
|
|
2920
|
+
formValues: n,
|
|
2921
|
+
formState: t,
|
|
2922
|
+
name: o,
|
|
2923
|
+
eventType: l
|
|
2924
|
+
});
|
|
2925
|
+
if (_(s))
|
|
2926
|
+
for (const u in s) {
|
|
2927
|
+
const f = s[u];
|
|
2928
|
+
f && Ve(`${Ze}.${u}`, {
|
|
2929
|
+
message: Y(f.message) ? f.message : "",
|
|
2930
|
+
type: f.type || ie.validate
|
|
2931
|
+
});
|
|
2932
|
+
}
|
|
2933
|
+
else Y(s) || !s ? Ve(Ze, {
|
|
2934
|
+
message: s || "",
|
|
2935
|
+
type: ie.validate
|
|
2936
|
+
}) : Ct(Ze);
|
|
2937
|
+
return s;
|
|
2938
|
+
}
|
|
2939
|
+
return !0;
|
|
2940
|
+
}, T = async ({ fields: o, onlyCheckValid: l, name: s, eventType: u, context: f = {
|
|
2941
|
+
valid: !0,
|
|
2942
|
+
runRootValidation: !1
|
|
2943
|
+
} }) => {
|
|
2944
|
+
if (e.validate && (f.runRootValidation = !0, !await M({
|
|
2945
|
+
name: s,
|
|
2946
|
+
eventType: u
|
|
2947
|
+
}) && (f.valid = !1, l)))
|
|
2948
|
+
return f.valid;
|
|
2949
|
+
for (const m in o) {
|
|
2950
|
+
const g = o[m];
|
|
2951
|
+
if (g) {
|
|
2952
|
+
const { _f: p, ...I } = g;
|
|
2953
|
+
if (p) {
|
|
2954
|
+
const N = c.array.has(p.name), te = g._f && Ho(g._f), oe = h.validatingFields || h.isValidating || C.validatingFields || C.isValidating;
|
|
2955
|
+
te && oe && R([p.name], !0);
|
|
2956
|
+
const ge = await Xt(g, c.disabled, n, G, r.shouldUseNativeValidation && !l, N);
|
|
2957
|
+
if (te && oe && R([p.name]), ge[p.name] && (f.valid = !1, l) || (!l && (F(ge, p.name) ? N ? Nt(t.errors, ge, p.name) : w(t.errors, p.name, ge[p.name]) : X(t.errors, p.name)), e.shouldUseNativeValidation && ge[p.name]))
|
|
2958
|
+
break;
|
|
2959
|
+
}
|
|
2960
|
+
!$(I) && await T({
|
|
2961
|
+
context: f,
|
|
2962
|
+
onlyCheckValid: l,
|
|
2963
|
+
fields: I,
|
|
2964
|
+
name: m,
|
|
2965
|
+
eventType: u
|
|
2966
|
+
});
|
|
2967
|
+
}
|
|
2968
|
+
}
|
|
2969
|
+
return f.valid;
|
|
2970
|
+
}, q = () => {
|
|
2971
|
+
for (const o of c.unMount) {
|
|
2972
|
+
const l = F(i, o);
|
|
2973
|
+
l && (l._f.refs ? l._f.refs.every((s) => !Je(s)) : !Je(l._f.ref)) && Ke(o);
|
|
2974
|
+
}
|
|
2975
|
+
c.unMount = /* @__PURE__ */ new Set();
|
|
2976
|
+
}, W = (o, l) => !r.disabled && (o && l && w(n, o, l), !J(vt(), a)), ee = (o, l, s) => ot(o, c, {
|
|
2977
|
+
...d.mount ? n : P(l) ? a : Y(o) ? { [o]: l } : l
|
|
2978
|
+
}, s, l), se = (o) => Fr(F(d.mount ? n : a, o, r.shouldUnregister ? F(a, o, []) : [])), pe = (o, l, s = {}, u = !1) => {
|
|
2979
|
+
const f = F(i, o);
|
|
2980
|
+
let m = l;
|
|
2981
|
+
if (f) {
|
|
2982
|
+
const g = f._f;
|
|
2983
|
+
g && (!g.disabled && w(n, o, pr(l, g)), m = Ge(g.ref) && K(l) ? "" : l, mr(g.ref) ? [...g.ref.options].forEach((p) => p.selected = m.includes(p.value)) : g.refs ? ze(g.ref) ? g.refs.forEach((p) => {
|
|
2984
|
+
(!p.defaultChecked || !p.disabled) && (Array.isArray(m) ? p.checked = !!m.find((I) => I === p.value) : p.checked = m === p.value || !!m);
|
|
2985
|
+
}) : g.refs.forEach((p) => p.checked = p.value === m) : mt(g.ref) ? g.ref.value = "" : (g.ref.value = m, g.ref.type || b.state.next({
|
|
2986
|
+
name: o,
|
|
2987
|
+
values: u ? n : O(n)
|
|
2988
|
+
})));
|
|
2989
|
+
}
|
|
2990
|
+
(s.shouldDirty || s.shouldTouch) && Ee(o, m, s.shouldTouch, s.shouldDirty, !0), s.shouldValidate && $e(o);
|
|
2991
|
+
}, Ce = (o, l, s, u = !1) => {
|
|
2992
|
+
for (const f in l) {
|
|
2993
|
+
if (!l.hasOwnProperty(f))
|
|
2994
|
+
return;
|
|
2995
|
+
const m = l[f], g = o + "." + f, p = F(i, g);
|
|
2996
|
+
(c.array.has(o) || _(m) || p && !p._f) && !me(m) ? Ce(g, m, s, u) : pe(g, m, s, u);
|
|
2997
|
+
}
|
|
2998
|
+
}, Pe = (o, l, s, u) => {
|
|
2999
|
+
const f = F(i, o), m = c.array.has(o), g = u ? l : O(l), p = F(n, o), I = J(p, g);
|
|
3000
|
+
if (I || w(n, o, g), m)
|
|
3001
|
+
b.array.next({
|
|
3002
|
+
name: o,
|
|
3003
|
+
values: u ? n : O(n)
|
|
3004
|
+
}), (h.isDirty || h.dirtyFields || C.isDirty || C.dirtyFields) && s.shouldDirty && (x(), b.state.next({
|
|
3005
|
+
name: o,
|
|
3006
|
+
dirtyFields: t.dirtyFields,
|
|
3007
|
+
isDirty: W(o, g)
|
|
3008
|
+
}));
|
|
3009
|
+
else {
|
|
3010
|
+
const N = Array.isArray(g) && !g.length || $(g);
|
|
3011
|
+
!f || f._f || K(g) || N ? pe(o, g, s, u) : Ce(o, g, s, u);
|
|
3012
|
+
}
|
|
3013
|
+
if (!I) {
|
|
3014
|
+
const N = Ot(o, c), te = u ? n : O(n);
|
|
3015
|
+
b.state.next({
|
|
3016
|
+
...N && t,
|
|
3017
|
+
name: d.mount || N ? o : void 0,
|
|
3018
|
+
values: te
|
|
3019
|
+
});
|
|
3020
|
+
}
|
|
3021
|
+
}, xe = (o, l, s = {}) => Pe(o, l, s, !1), Br = (o, l = {}) => {
|
|
3022
|
+
const s = j(o) ? o(n) : o;
|
|
3023
|
+
if (!J(n, s)) {
|
|
3024
|
+
n = {
|
|
3025
|
+
...n,
|
|
3026
|
+
...s
|
|
3027
|
+
};
|
|
3028
|
+
for (const u of c.mount)
|
|
3029
|
+
Pe(u, F(s, u), l, !0);
|
|
3030
|
+
b.state.next({
|
|
3031
|
+
...t,
|
|
3032
|
+
name: void 0,
|
|
3033
|
+
type: void 0,
|
|
3034
|
+
values: n
|
|
3035
|
+
}), l.shouldValidate && L();
|
|
3036
|
+
}
|
|
3037
|
+
}, St = async (o) => {
|
|
3038
|
+
d.mount = !0;
|
|
3039
|
+
const l = o.target;
|
|
3040
|
+
let s = l.name, u = !0;
|
|
3041
|
+
const f = F(i, s), m = (I) => {
|
|
3042
|
+
u = Number.isNaN(I) || me(I) && isNaN(I.getTime()) || J(I, F(n, s, I));
|
|
3043
|
+
}, g = Rt(r.mode), p = Rt(r.reValidateMode);
|
|
3044
|
+
if (f) {
|
|
3045
|
+
let I, N;
|
|
3046
|
+
const te = l.type ? Lt(f._f) : rt(o), oe = o.type === ce.BLUR || o.type === ce.FOCUS_OUT, ge = !Eo(f._f) && !e.validate && !r.resolver && !F(t.errors, s) && !f._f.deps || Vo(oe, F(t.touchedFields, s), t.isSubmitted, p, g), Ye = Ot(s, c, oe);
|
|
3047
|
+
w(n, s, te), oe ? (!l || !l.readOnly) && (f._f.onBlur && f._f.onBlur(o), S && S(0)) : f._f.onChange && f._f.onChange(o);
|
|
3048
|
+
const Ie = Ee(s, te, oe), Mr = !$(Ie) || Ye;
|
|
3049
|
+
if (!oe && b.state.next({
|
|
3050
|
+
name: s,
|
|
3051
|
+
type: o.type,
|
|
3052
|
+
values: O(n)
|
|
3053
|
+
}), ge)
|
|
3054
|
+
return (h.isValid || C.isValid) && (r.mode === "onBlur" ? oe && L() : oe || L()), Mr && b.state.next({ name: s, ...Ye ? {} : Ie });
|
|
3055
|
+
if (!r.resolver && e.validate && await M({
|
|
3056
|
+
name: s,
|
|
3057
|
+
eventType: o.type
|
|
3058
|
+
}), !oe && Ye && b.state.next({ ...t }), r.resolver) {
|
|
3059
|
+
const { errors: At } = await re([s]);
|
|
3060
|
+
if (R([s]), m(te), !u) {
|
|
3061
|
+
!$(Ie) && b.state.next(Ie);
|
|
3062
|
+
return;
|
|
3063
|
+
}
|
|
3064
|
+
const Ar = Gt(t.errors, i, s), zt = Gt(At, i, Ar.name || s);
|
|
3065
|
+
I = zt.error, s = zt.name, N = $(At);
|
|
3066
|
+
} else
|
|
3067
|
+
R([s], !0), I = (await Xt(f, c.disabled, n, G, r.shouldUseNativeValidation))[s], R([s]), m(te), u && (I ? N = !1 : (h.isValid || C.isValid) && (N = await T({
|
|
3068
|
+
fields: i,
|
|
3069
|
+
onlyCheckValid: !0,
|
|
3070
|
+
name: s,
|
|
3071
|
+
eventType: o.type
|
|
3072
|
+
})));
|
|
3073
|
+
u && (f._f.deps && (!Array.isArray(f._f.deps) || f._f.deps.length > 0) && $e(f._f.deps), be(s, N, I, Ie));
|
|
3074
|
+
}
|
|
3075
|
+
}, yt = (o, l) => {
|
|
3076
|
+
if (F(t.errors, l) && o.focus)
|
|
3077
|
+
return o.focus(), 1;
|
|
3078
|
+
}, $e = async (o, l = {}) => {
|
|
3079
|
+
let s, u;
|
|
3080
|
+
const f = We(o);
|
|
3081
|
+
if (r.resolver) {
|
|
3082
|
+
const m = await we(P(o) ? o : f);
|
|
3083
|
+
s = $(m), u = o ? !f.some((g) => F(m, g)) : s;
|
|
3084
|
+
} else o ? (u = (await Promise.all(f.map(async (m) => {
|
|
3085
|
+
const g = F(i, m);
|
|
3086
|
+
return await T({
|
|
3087
|
+
fields: g && g._f ? { [m]: g } : g,
|
|
3088
|
+
eventType: ce.TRIGGER
|
|
3089
|
+
});
|
|
3090
|
+
}))).every(Boolean), !(!u && !t.isValid) && L()) : u = s = await T({
|
|
3091
|
+
fields: i,
|
|
3092
|
+
name: o,
|
|
3093
|
+
eventType: ce.TRIGGER
|
|
3094
|
+
});
|
|
3095
|
+
return b.state.next({
|
|
3096
|
+
...!Y(o) || (h.isValid || C.isValid) && s !== t.isValid ? {} : { name: o },
|
|
3097
|
+
...r.resolver || !o ? { isValid: s } : {},
|
|
3098
|
+
errors: t.errors
|
|
3099
|
+
}), l.shouldFocus && !u && ke(i, yt, o ? f : c.mount), u;
|
|
3100
|
+
}, vt = (o, l) => {
|
|
3101
|
+
let s = {
|
|
3102
|
+
...d.mount ? n : a
|
|
3103
|
+
};
|
|
3104
|
+
return l && (s = fr(l.dirtyFields ? t.dirtyFields : t.touchedFields, s)), P(o) ? s : Y(o) ? F(s, o) : o.map((u) => F(s, u));
|
|
3105
|
+
}, Bt = (o, l) => ({
|
|
3106
|
+
invalid: !!F((l || t).errors, o),
|
|
3107
|
+
isDirty: !!F((l || t).dirtyFields, o),
|
|
3108
|
+
error: F((l || t).errors, o),
|
|
3109
|
+
isValidating: !!F(t.validatingFields, o),
|
|
3110
|
+
isTouched: !!F((l || t).touchedFields, o)
|
|
3111
|
+
}), Ct = (o) => {
|
|
3112
|
+
const l = o ? We(o) : void 0;
|
|
3113
|
+
l?.forEach((s) => X(t.errors, s)), l ? l.forEach((s) => {
|
|
3114
|
+
b.state.next({
|
|
3115
|
+
name: s,
|
|
3116
|
+
errors: t.errors
|
|
3117
|
+
});
|
|
3118
|
+
}) : b.state.next({
|
|
3119
|
+
errors: {}
|
|
3120
|
+
});
|
|
3121
|
+
}, Ve = (o, l, s) => {
|
|
3122
|
+
const u = (F(i, o, { _f: {} })._f || {}).ref, f = F(t.errors, o) || {}, { ref: m, message: g, type: p, ...I } = f;
|
|
3123
|
+
w(t.errors, o, {
|
|
3124
|
+
...I,
|
|
3125
|
+
...l,
|
|
3126
|
+
ref: u
|
|
3127
|
+
}), b.state.next({
|
|
3128
|
+
name: o,
|
|
3129
|
+
errors: t.errors,
|
|
3130
|
+
isValid: !1
|
|
3131
|
+
}), s && s.shouldFocus && u && u.focus && u.focus();
|
|
3132
|
+
}, Cr = (o, l) => j(o) ? b.state.subscribe({
|
|
3133
|
+
next: (s) => "values" in s && o(s.values || ee(void 0, l), s)
|
|
3134
|
+
}) : ee(o, l, !0), xt = (o) => b.state.subscribe({
|
|
3135
|
+
next: (l) => {
|
|
3136
|
+
if (Po(o.name, l.name, o.exact) && wo(l, o.formState || h, kr, o.reRenderRoot)) {
|
|
3137
|
+
const s = { ...n };
|
|
3138
|
+
o.callback({
|
|
3139
|
+
values: s,
|
|
3140
|
+
...t,
|
|
3141
|
+
...l,
|
|
3142
|
+
defaultValues: a
|
|
3143
|
+
});
|
|
3144
|
+
}
|
|
3145
|
+
}
|
|
3146
|
+
}).unsubscribe, xr = (o) => (d.mount = !0, C = {
|
|
3147
|
+
...C,
|
|
3148
|
+
...o.formState
|
|
3149
|
+
}, xt({
|
|
3150
|
+
...o,
|
|
3151
|
+
formState: {
|
|
3152
|
+
...E,
|
|
3153
|
+
...o.formState
|
|
3154
|
+
}
|
|
3155
|
+
})), Ke = (o, l = {}) => {
|
|
3156
|
+
for (const s of o ? We(o) : c.mount)
|
|
3157
|
+
c.mount.delete(s), c.array.delete(s), l.keepValue || (X(i, s), X(n, s)), !l.keepError && X(t.errors, s), !l.keepDirty && X(t.dirtyFields, s), !l.keepTouched && X(t.touchedFields, s), !l.keepIsValidating && X(t.validatingFields, s), !r.shouldUnregister && !l.keepDefaultValue && X(a, s);
|
|
3158
|
+
b.state.next({
|
|
3159
|
+
values: O(n)
|
|
3160
|
+
}), b.state.next({
|
|
3161
|
+
...t,
|
|
3162
|
+
...l.keepDirty ? { isDirty: W() } : {}
|
|
3163
|
+
}), !l.keepIsValid && L();
|
|
3164
|
+
}, It = ({ disabled: o, name: l }) => {
|
|
3165
|
+
if (Z(o) && d.mount || o || c.disabled.has(l)) {
|
|
3166
|
+
const f = c.disabled.has(l) !== !!o;
|
|
3167
|
+
o ? c.disabled.add(l) : c.disabled.delete(l), f && d.mount && !d.action && L();
|
|
3168
|
+
}
|
|
3169
|
+
}, Qe = (o, l = {}) => {
|
|
3170
|
+
let s = F(i, o);
|
|
3171
|
+
const u = Z(l.disabled) || Z(r.disabled), f = !c.registerName.has(o) && s && s._f && !s._f.mount;
|
|
3172
|
+
return w(i, o, {
|
|
3173
|
+
...s || {},
|
|
3174
|
+
_f: {
|
|
3175
|
+
...s && s._f ? s._f : { ref: { name: o } },
|
|
3176
|
+
name: o,
|
|
3177
|
+
mount: !0,
|
|
3178
|
+
...l
|
|
3179
|
+
}
|
|
3180
|
+
}), c.mount.add(o), s && !f ? It({
|
|
3181
|
+
disabled: Z(l.disabled) ? l.disabled : r.disabled,
|
|
3182
|
+
name: o
|
|
3183
|
+
}) : le(o, !0, l.value), {
|
|
3184
|
+
...u ? { disabled: l.disabled || r.disabled } : {},
|
|
3185
|
+
...r.progressive ? {
|
|
3186
|
+
required: !!l.required,
|
|
3187
|
+
min: Te(l.min),
|
|
3188
|
+
max: Te(l.max),
|
|
3189
|
+
minLength: Te(l.minLength),
|
|
3190
|
+
maxLength: Te(l.maxLength),
|
|
3191
|
+
pattern: Te(l.pattern)
|
|
3192
|
+
} : {},
|
|
3193
|
+
name: o,
|
|
3194
|
+
onChange: St,
|
|
3195
|
+
onBlur: St,
|
|
3196
|
+
ref: (m) => {
|
|
3197
|
+
if (m) {
|
|
3198
|
+
c.registerName.add(o), Qe(o, l), c.registerName.delete(o), s = F(i, o);
|
|
3199
|
+
const g = P(m.value) && m.querySelectorAll && m.querySelectorAll("input,select,textarea")[0] || m, p = Do(g), I = s._f.refs || [];
|
|
3200
|
+
if (p ? I.find((N) => N === g) : g === s._f.ref)
|
|
3201
|
+
return;
|
|
3202
|
+
w(i, o, {
|
|
3203
|
+
_f: {
|
|
3204
|
+
...s._f,
|
|
3205
|
+
...p ? {
|
|
3206
|
+
refs: [
|
|
3207
|
+
...I.filter(Je),
|
|
3208
|
+
g,
|
|
3209
|
+
...Array.isArray(F(a, o)) ? [{}] : []
|
|
3210
|
+
],
|
|
3211
|
+
ref: { type: g.type, name: o }
|
|
3212
|
+
} : { ref: g }
|
|
3213
|
+
}
|
|
3214
|
+
}), le(o, !1, void 0, g);
|
|
3215
|
+
} else
|
|
3216
|
+
s = F(i, o, {}), s._f && (s._f.mount = !1), (r.shouldUnregister || l.shouldUnregister) && !(sr(c.array, o) && d.action) && c.unMount.add(o);
|
|
3217
|
+
}
|
|
3218
|
+
};
|
|
3219
|
+
}, je = () => r.shouldFocusError && !r.shouldUseNativeValidation && ke(i, yt, c.mount), Ir = (o) => {
|
|
3220
|
+
Z(o) && (b.state.next({ disabled: o }), ke(i, (l, s) => {
|
|
3221
|
+
const u = F(i, s);
|
|
3222
|
+
u && (l.disabled = u._f.disabled || o, Array.isArray(u._f.refs) && u._f.refs.forEach((f) => {
|
|
3223
|
+
f.disabled = u._f.disabled || o;
|
|
3224
|
+
}));
|
|
3225
|
+
}, 0, !1));
|
|
3226
|
+
}, Tt = (o, l) => async (s) => {
|
|
3227
|
+
let u;
|
|
3228
|
+
s && (s.preventDefault && s.preventDefault(), s.persist && s.persist());
|
|
3229
|
+
let f = O(n);
|
|
3230
|
+
if (b.state.next({
|
|
3231
|
+
isSubmitting: !0
|
|
3232
|
+
}), r.resolver) {
|
|
3233
|
+
const { errors: m, values: g } = await re();
|
|
3234
|
+
R(), t.errors = m, f = O(g);
|
|
3235
|
+
} else
|
|
3236
|
+
await T({
|
|
3237
|
+
fields: i,
|
|
3238
|
+
eventType: ce.SUBMIT
|
|
3239
|
+
});
|
|
3240
|
+
if (c.disabled.size)
|
|
3241
|
+
for (const m of c.disabled)
|
|
3242
|
+
X(f, m);
|
|
3243
|
+
if (X(t.errors, cr), $(t.errors)) {
|
|
3244
|
+
b.state.next({
|
|
3245
|
+
errors: {}
|
|
3246
|
+
});
|
|
3247
|
+
try {
|
|
3248
|
+
await o(f, s);
|
|
3249
|
+
} catch (m) {
|
|
3250
|
+
u = m;
|
|
3251
|
+
}
|
|
3252
|
+
} else
|
|
3253
|
+
l && await l({ ...t.errors }, s), je(), setTimeout(je);
|
|
3254
|
+
if (b.state.next({
|
|
3255
|
+
isSubmitted: !0,
|
|
3256
|
+
isSubmitting: !1,
|
|
3257
|
+
isSubmitSuccessful: $(t.errors) && !u,
|
|
3258
|
+
submitCount: t.submitCount + 1,
|
|
3259
|
+
errors: t.errors
|
|
3260
|
+
}), u)
|
|
3261
|
+
throw u;
|
|
3262
|
+
}, Tr = (o, l = {}) => {
|
|
3263
|
+
F(i, o) && (P(l.defaultValue) ? xe(o, O(F(a, o))) : (xe(o, l.defaultValue), w(a, o, O(l.defaultValue))), l.keepTouched || X(t.touchedFields, o), l.keepDirty || (X(t.dirtyFields, o), t.isDirty = l.defaultValue ? W(o, O(F(a, o))) : W()), l.keepError || (X(t.errors, o), h.isValid && L()), b.state.next({ ...t }));
|
|
3264
|
+
}, Dt = (o, l = {}) => {
|
|
3265
|
+
const s = o ? O(o) : a, u = O(s), f = $(o), m = u;
|
|
3266
|
+
if (l.keepDefaultValues || (a = s), !l.keepValues) {
|
|
3267
|
+
if (l.keepDirtyValues) {
|
|
3268
|
+
const g = /* @__PURE__ */ new Set([
|
|
3269
|
+
...c.mount,
|
|
3270
|
+
...Object.keys(Fe(a, n))
|
|
3271
|
+
]);
|
|
3272
|
+
for (const p of Array.from(g)) {
|
|
3273
|
+
const I = F(t.dirtyFields, p), N = F(n, p), te = F(m, p);
|
|
3274
|
+
I && !P(N) ? w(m, p, N) : !I && !P(te) && xe(p, te);
|
|
3275
|
+
}
|
|
3276
|
+
} else {
|
|
3277
|
+
if (Xe && P(o))
|
|
3278
|
+
for (const g of c.mount) {
|
|
3279
|
+
const p = F(i, g);
|
|
3280
|
+
if (p && p._f) {
|
|
3281
|
+
const I = Array.isArray(p._f.refs) ? p._f.refs[0] : p._f.ref;
|
|
3282
|
+
if (Ge(I)) {
|
|
3283
|
+
const N = I.closest("form");
|
|
3284
|
+
if (N) {
|
|
3285
|
+
N.reset();
|
|
3286
|
+
break;
|
|
3287
|
+
}
|
|
3288
|
+
}
|
|
3289
|
+
}
|
|
3290
|
+
}
|
|
3291
|
+
if (l.keepFieldsRef)
|
|
3292
|
+
for (const g of c.mount)
|
|
3293
|
+
xe(g, F(m, g));
|
|
3294
|
+
else
|
|
3295
|
+
i = {};
|
|
3296
|
+
}
|
|
3297
|
+
if (r.shouldUnregister) {
|
|
3298
|
+
if (n = l.keepDefaultValues ? O(a) : {}, l.keepFieldsRef)
|
|
3299
|
+
for (const g of c.mount)
|
|
3300
|
+
w(n, g, F(m, g));
|
|
3301
|
+
} else
|
|
3302
|
+
n = O(m);
|
|
3303
|
+
b.array.next({
|
|
3304
|
+
values: { ...m }
|
|
3305
|
+
}), b.state.next({
|
|
3306
|
+
values: { ...m }
|
|
3307
|
+
});
|
|
3308
|
+
}
|
|
3309
|
+
c = {
|
|
3310
|
+
mount: l.keepDirtyValues ? c.mount : /* @__PURE__ */ new Set(),
|
|
3311
|
+
unMount: /* @__PURE__ */ new Set(),
|
|
3312
|
+
array: /* @__PURE__ */ new Set(),
|
|
3313
|
+
registerName: /* @__PURE__ */ new Set(),
|
|
3314
|
+
disabled: /* @__PURE__ */ new Set(),
|
|
3315
|
+
watch: /* @__PURE__ */ new Set(),
|
|
3316
|
+
watchAll: !1,
|
|
3317
|
+
focus: ""
|
|
3318
|
+
}, d.mount = !h.isValid || !!l.keepIsValid || !!l.keepDirtyValues || !r.shouldUnregister && !$(m), d.watch = !!r.shouldUnregister, d.keepIsValid = !!l.keepIsValid, d.action = !1, l.keepErrors || (t.errors = {}), b.state.next({
|
|
3319
|
+
submitCount: l.keepSubmitCount ? t.submitCount : 0,
|
|
3320
|
+
isDirty: f ? !1 : l.keepDirty ? t.isDirty : l.keepValues ? W() : !!(l.keepDefaultValues && !J(o, a)),
|
|
3321
|
+
isSubmitted: l.keepIsSubmitted ? t.isSubmitted : !1,
|
|
3322
|
+
dirtyFields: f ? {} : l.keepDirtyValues ? l.keepDefaultValues && n ? Fe(a, n) : t.dirtyFields : l.keepDefaultValues && o ? Fe(a, o) : l.keepDirty ? t.dirtyFields : {},
|
|
3323
|
+
touchedFields: l.keepTouched ? t.touchedFields : {},
|
|
3324
|
+
errors: l.keepErrors ? t.errors : {},
|
|
3325
|
+
isSubmitSuccessful: l.keepIsSubmitSuccessful ? t.isSubmitSuccessful : !1,
|
|
3326
|
+
isSubmitting: !1,
|
|
3327
|
+
defaultValues: a
|
|
3328
|
+
});
|
|
3329
|
+
}, kt = (o, l) => Dt(j(o) ? o(n) : o, { ...r.resetOptions, ...l }), Dr = (o, l = {}) => {
|
|
3330
|
+
const s = F(i, o), u = s && s._f;
|
|
3331
|
+
if (u) {
|
|
3332
|
+
const f = u.refs ? u.refs[0] : u.ref;
|
|
3333
|
+
f.focus && setTimeout(() => {
|
|
3334
|
+
f.focus(), l.shouldSelect && j(f.select) && f.select();
|
|
3335
|
+
});
|
|
3336
|
+
}
|
|
3337
|
+
}, kr = (o) => {
|
|
3338
|
+
t = {
|
|
3339
|
+
...t,
|
|
3340
|
+
...o
|
|
3341
|
+
};
|
|
3342
|
+
}, Mt = {
|
|
3343
|
+
control: {
|
|
3344
|
+
register: Qe,
|
|
3345
|
+
unregister: Ke,
|
|
3346
|
+
getFieldState: Bt,
|
|
3347
|
+
handleSubmit: Tt,
|
|
3348
|
+
setError: Ve,
|
|
3349
|
+
_subscribe: xt,
|
|
3350
|
+
_runSchema: re,
|
|
3351
|
+
_updateIsValidating: R,
|
|
3352
|
+
_focusError: je,
|
|
3353
|
+
_getWatch: ee,
|
|
3354
|
+
_getDirty: W,
|
|
3355
|
+
_setValid: L,
|
|
3356
|
+
_setFieldArray: A,
|
|
3357
|
+
_setDisabledField: It,
|
|
3358
|
+
_setErrors: D,
|
|
3359
|
+
_getFieldArray: se,
|
|
3360
|
+
_reset: Dt,
|
|
3361
|
+
_resetDefaultValues: () => j(r.defaultValues) && r.defaultValues().then((o) => {
|
|
3362
|
+
kt(o, r.resetOptions), b.state.next({
|
|
3363
|
+
isLoading: !1
|
|
3364
|
+
});
|
|
3365
|
+
}),
|
|
3366
|
+
_removeUnmounted: q,
|
|
3367
|
+
_disableForm: Ir,
|
|
3368
|
+
_subjects: b,
|
|
3369
|
+
_proxyFormState: h,
|
|
3370
|
+
get _fields() {
|
|
3371
|
+
return i;
|
|
3372
|
+
},
|
|
3373
|
+
get _formValues() {
|
|
3374
|
+
return n;
|
|
3375
|
+
},
|
|
3376
|
+
get _state() {
|
|
3377
|
+
return d;
|
|
3378
|
+
},
|
|
3379
|
+
set _state(o) {
|
|
3380
|
+
d = o;
|
|
3381
|
+
},
|
|
3382
|
+
get _defaultValues() {
|
|
3383
|
+
return a;
|
|
3384
|
+
},
|
|
3385
|
+
get _names() {
|
|
3386
|
+
return c;
|
|
3387
|
+
},
|
|
3388
|
+
set _names(o) {
|
|
3389
|
+
c = o;
|
|
3390
|
+
},
|
|
3391
|
+
get _formState() {
|
|
3392
|
+
return t;
|
|
3393
|
+
},
|
|
3394
|
+
get _options() {
|
|
3395
|
+
return r;
|
|
3396
|
+
},
|
|
3397
|
+
set _options(o) {
|
|
3398
|
+
r = {
|
|
3399
|
+
...r,
|
|
3400
|
+
...o
|
|
3401
|
+
};
|
|
3402
|
+
}
|
|
3403
|
+
},
|
|
3404
|
+
subscribe: xr,
|
|
3405
|
+
trigger: $e,
|
|
3406
|
+
register: Qe,
|
|
3407
|
+
handleSubmit: Tt,
|
|
3408
|
+
watch: Cr,
|
|
3409
|
+
setValue: xe,
|
|
3410
|
+
setValues: Br,
|
|
3411
|
+
getValues: vt,
|
|
3412
|
+
reset: kt,
|
|
3413
|
+
resetField: Tr,
|
|
3414
|
+
resetDefaultValues: (o, l = {}) => {
|
|
3415
|
+
if (a = O(o), !l.keepDirty) {
|
|
3416
|
+
const s = Fe(a, n);
|
|
3417
|
+
t.dirtyFields = s, t.isDirty = !$(s);
|
|
3418
|
+
}
|
|
3419
|
+
l.keepIsValid || L(), b.state.next({
|
|
3420
|
+
...t,
|
|
3421
|
+
defaultValues: a
|
|
3422
|
+
});
|
|
3423
|
+
},
|
|
3424
|
+
clearErrors: Ct,
|
|
3425
|
+
unregister: Ke,
|
|
3426
|
+
setError: Ve,
|
|
3427
|
+
setFocus: Dr,
|
|
3428
|
+
getFieldState: Bt
|
|
3429
|
+
};
|
|
3430
|
+
return {
|
|
3431
|
+
...Mt,
|
|
3432
|
+
formControl: Mt
|
|
3433
|
+
};
|
|
3434
|
+
}
|
|
3435
|
+
function Wo(e = {}) {
|
|
3436
|
+
const r = B.useRef(void 0), t = B.useRef(void 0), [i, a] = B.useState(() => ({
|
|
3437
|
+
...O(yr),
|
|
3438
|
+
isLoading: j(e.defaultValues),
|
|
3439
|
+
errors: e.errors || {},
|
|
3440
|
+
disabled: e.disabled || !1,
|
|
3441
|
+
defaultValues: j(e.defaultValues) ? void 0 : e.defaultValues
|
|
3442
|
+
}));
|
|
3443
|
+
if (!r.current)
|
|
3444
|
+
if (e.formControl)
|
|
3445
|
+
r.current = {
|
|
3446
|
+
...e.formControl,
|
|
3447
|
+
formState: i
|
|
3448
|
+
}, e.defaultValues && !j(e.defaultValues) && e.formControl.reset(e.defaultValues, e.resetOptions);
|
|
3449
|
+
else {
|
|
3450
|
+
const { formControl: d, ...c } = Ro(e);
|
|
3451
|
+
r.current = {
|
|
3452
|
+
...c,
|
|
3453
|
+
formState: i
|
|
3454
|
+
};
|
|
3455
|
+
}
|
|
3456
|
+
const n = r.current.control;
|
|
3457
|
+
return n._options = e, Ft(() => {
|
|
3458
|
+
const d = n._subscribe({
|
|
3459
|
+
formState: n._proxyFormState,
|
|
3460
|
+
callback: () => a({
|
|
3461
|
+
...n._formState,
|
|
3462
|
+
defaultValues: n._defaultValues
|
|
3463
|
+
}),
|
|
3464
|
+
reRenderRoot: !0
|
|
3465
|
+
});
|
|
3466
|
+
return a((c) => ({
|
|
3467
|
+
...c,
|
|
3468
|
+
isReady: !0
|
|
3469
|
+
})), n._formState.isReady = !0, d;
|
|
3470
|
+
}, [n]), B.useEffect(() => n._disableForm(e.disabled), [n, e.disabled]), B.useEffect(() => {
|
|
3471
|
+
e.mode && (n._options.mode = e.mode), e.reValidateMode && (n._options.reValidateMode = e.reValidateMode);
|
|
3472
|
+
}, [n, e.mode, e.reValidateMode]), B.useEffect(() => {
|
|
3473
|
+
e.errors && (n._setErrors(e.errors), n._focusError());
|
|
3474
|
+
}, [n, e.errors]), B.useEffect(() => {
|
|
3475
|
+
e.shouldUnregister && n._subjects.state.next({
|
|
3476
|
+
values: n._getWatch()
|
|
3477
|
+
});
|
|
3478
|
+
}, [n, e.shouldUnregister]), B.useEffect(() => {
|
|
3479
|
+
if (n._proxyFormState.isDirty) {
|
|
3480
|
+
const d = n._getDirty();
|
|
3481
|
+
d !== i.isDirty && n._subjects.state.next({
|
|
3482
|
+
isDirty: d
|
|
3483
|
+
});
|
|
3484
|
+
}
|
|
3485
|
+
}, [n, i.isDirty]), B.useEffect(() => {
|
|
3486
|
+
var d;
|
|
3487
|
+
e.values && !J(e.values, t.current) ? (n._reset(e.values, {
|
|
3488
|
+
keepFieldsRef: !0,
|
|
3489
|
+
...n._options.resetOptions
|
|
3490
|
+
}), !((d = n._options.resetOptions) === null || d === void 0) && d.keepIsValid || n._setValid(), t.current = e.values, a((c) => ({ ...c }))) : n._resetDefaultValues();
|
|
3491
|
+
}, [n, e.values]), B.useEffect(() => {
|
|
3492
|
+
n._state.mount || (n._setValid(), n._state.mount = !0), n._state.watch && (n._state.watch = !1, n._subjects.state.next({ ...n._formState })), n._removeUnmounted();
|
|
3493
|
+
}), r.current.formState = B.useMemo(() => gr(i, n), [n, i]), r.current;
|
|
3494
|
+
}
|
|
3495
|
+
function Oo({
|
|
3496
|
+
onSubmit: e,
|
|
3497
|
+
defaultValues: r,
|
|
3498
|
+
children: t,
|
|
3499
|
+
id: i,
|
|
3500
|
+
className: a,
|
|
3501
|
+
mode: n = "onSubmit",
|
|
3502
|
+
reValidateMode: d = "onChange"
|
|
3503
|
+
}) {
|
|
3504
|
+
const c = Wo({
|
|
3505
|
+
defaultValues: r,
|
|
3506
|
+
mode: n,
|
|
3507
|
+
reValidateMode: d
|
|
3508
|
+
});
|
|
3509
|
+
return /* @__PURE__ */ y(Io, { ...c, children: /* @__PURE__ */ y(
|
|
3510
|
+
"form",
|
|
3511
|
+
{
|
|
3512
|
+
id: i,
|
|
3513
|
+
className: a,
|
|
3514
|
+
onSubmit: (S) => {
|
|
3515
|
+
c.handleSubmit(async (v) => {
|
|
3516
|
+
await e(v);
|
|
3517
|
+
})(S);
|
|
3518
|
+
},
|
|
3519
|
+
noValidate: !0,
|
|
3520
|
+
children: t
|
|
3521
|
+
}
|
|
3522
|
+
) });
|
|
3523
|
+
}
|
|
3524
|
+
const zi = H(Oo);
|
|
3525
|
+
function Go(e) {
|
|
3526
|
+
if (e)
|
|
3527
|
+
return {
|
|
3528
|
+
required: e.required,
|
|
3529
|
+
min: e.min,
|
|
3530
|
+
max: e.max,
|
|
3531
|
+
minLength: e.minLength,
|
|
3532
|
+
maxLength: e.maxLength,
|
|
3533
|
+
pattern: e.pattern,
|
|
3534
|
+
validate: e.validate
|
|
3535
|
+
};
|
|
3536
|
+
}
|
|
3537
|
+
const No = /* @__PURE__ */ new Set([
|
|
3538
|
+
Fo,
|
|
3539
|
+
or,
|
|
3540
|
+
dt,
|
|
3541
|
+
Zt,
|
|
3542
|
+
rr
|
|
3543
|
+
]);
|
|
3544
|
+
function Uo(e) {
|
|
3545
|
+
return No.has(e);
|
|
3546
|
+
}
|
|
3547
|
+
function Xo(e, r, t) {
|
|
3548
|
+
const i = t.error?.message, a = !!t.error, n = e.props;
|
|
3549
|
+
return e.type === or ? ye(e, {
|
|
3550
|
+
...n,
|
|
3551
|
+
name: r.name,
|
|
3552
|
+
value: r.value,
|
|
3553
|
+
onChange: (d) => {
|
|
3554
|
+
r.onChange(d);
|
|
3555
|
+
},
|
|
3556
|
+
onBlur: r.onBlur,
|
|
3557
|
+
status: a ? "error" : void 0,
|
|
3558
|
+
help: i
|
|
3559
|
+
}) : e.type === rr ? ye(e, {
|
|
3560
|
+
...n,
|
|
3561
|
+
name: r.name,
|
|
3562
|
+
value: r.value,
|
|
3563
|
+
onChange: (d) => {
|
|
3564
|
+
r.onChange(d);
|
|
3565
|
+
},
|
|
3566
|
+
onBlur: r.onBlur,
|
|
3567
|
+
status: a ? "error" : void 0,
|
|
3568
|
+
help: i
|
|
3569
|
+
}) : e.type === dt ? ye(e, {
|
|
3570
|
+
...n,
|
|
3571
|
+
name: r.name,
|
|
3572
|
+
checked: !!r.value,
|
|
3573
|
+
onChange: (d) => {
|
|
3574
|
+
r.onChange(d.target.checked);
|
|
3575
|
+
},
|
|
3576
|
+
onBlur: r.onBlur,
|
|
3577
|
+
status: a ? "error" : void 0,
|
|
3578
|
+
help: i
|
|
3579
|
+
}) : e.type === Zt ? ye(e, {
|
|
3580
|
+
...n,
|
|
3581
|
+
name: r.name,
|
|
3582
|
+
value: r.value ?? null,
|
|
3583
|
+
onChange: (d) => {
|
|
3584
|
+
r.onChange(d);
|
|
3585
|
+
},
|
|
3586
|
+
onBlur: r.onBlur,
|
|
3587
|
+
status: a ? "error" : void 0,
|
|
3588
|
+
help: i
|
|
3589
|
+
}) : ye(e, {
|
|
3590
|
+
...n,
|
|
3591
|
+
name: r.name,
|
|
3592
|
+
value: r.value ?? "",
|
|
3593
|
+
onChange: (d) => {
|
|
3594
|
+
r.onChange(d.target.value);
|
|
3595
|
+
},
|
|
3596
|
+
onBlur: r.onBlur,
|
|
3597
|
+
status: a ? "error" : void 0,
|
|
3598
|
+
help: i,
|
|
3599
|
+
ref: r.ref
|
|
3600
|
+
});
|
|
3601
|
+
}
|
|
3602
|
+
function qo({ name: e, rules: r, children: t, defaultValue: i }) {
|
|
3603
|
+
const { control: a } = xo();
|
|
3604
|
+
if (!st(t))
|
|
3605
|
+
return null;
|
|
3606
|
+
if (!Uo(t.type))
|
|
3607
|
+
throw new Error(
|
|
3608
|
+
"TdFormField children must be TdInput, TdSelect, TdAutocomplete, TdCheckbox, or TdDatePicker"
|
|
3609
|
+
);
|
|
3610
|
+
return /* @__PURE__ */ y(
|
|
3611
|
+
Co,
|
|
3612
|
+
{
|
|
3613
|
+
name: e,
|
|
3614
|
+
control: a,
|
|
3615
|
+
rules: Go(r),
|
|
3616
|
+
defaultValue: i,
|
|
3617
|
+
render: ({ field: n, fieldState: d }) => Xo(t, n, d)
|
|
3618
|
+
}
|
|
3619
|
+
);
|
|
3620
|
+
}
|
|
3621
|
+
const Hi = H(qo), Ei = H(function(r) {
|
|
3622
|
+
return /* @__PURE__ */ y(Ue.Link, { ...r });
|
|
3623
|
+
}), wi = H(function(r) {
|
|
3624
|
+
return /* @__PURE__ */ y(Ue.Paragraph, { ...r });
|
|
3625
|
+
}), Pi = H(function(r) {
|
|
3626
|
+
return /* @__PURE__ */ y(Ue.Text, { ...r });
|
|
3627
|
+
}), Vi = H(function(r) {
|
|
3628
|
+
return /* @__PURE__ */ y(Ue.Title, { ...r });
|
|
3629
|
+
}), bt = Ur(null);
|
|
3630
|
+
function $o() {
|
|
3631
|
+
const e = Yt(bt);
|
|
3632
|
+
if (!e)
|
|
3633
|
+
throw new Error("useTdTheme must be used within a TdThemeProvider");
|
|
3634
|
+
return e;
|
|
3635
|
+
}
|
|
3636
|
+
function _i() {
|
|
3637
|
+
return Yt(bt);
|
|
3638
|
+
}
|
|
3639
|
+
function Li() {
|
|
3640
|
+
const { mode: e, direction: r } = $o();
|
|
3641
|
+
return _e(() => ({ mode: e, direction: r }), [e, r]);
|
|
3642
|
+
}
|
|
3643
|
+
const { fontStyle: Ri, layout: Wi, opacity: Oi, ...Ko } = Me, qt = {
|
|
3644
|
+
...Q,
|
|
3645
|
+
opacityImage: Q.opacityImage > 1 ? Q.opacityImage / 100 : Q.opacityImage,
|
|
3646
|
+
fontFamily: `"${Q.fontFamily}", sans-serif`,
|
|
3647
|
+
fontFamilyCode: `"${Q.fontFamilyCode}", monospace`
|
|
3648
|
+
}, Qo = {
|
|
3649
|
+
...k,
|
|
3650
|
+
...Ko
|
|
3651
|
+
}, jo = (e) => ({
|
|
3652
|
+
algorithm: e === "dark" ? Ht.darkAlgorithm : Ht.defaultAlgorithm,
|
|
3653
|
+
token: e === "light" ? { ...qt, ...Qo } : qt,
|
|
3654
|
+
components: e === "light" ? io : void 0
|
|
3655
|
+
}), pt = (e = "light", r = "ltr", t) => {
|
|
3656
|
+
const i = jo(e);
|
|
3657
|
+
return {
|
|
3658
|
+
...i,
|
|
3659
|
+
...t,
|
|
3660
|
+
token: { ...i.token, ...t?.token },
|
|
3661
|
+
components: { ...i.components, ...t?.components }
|
|
3662
|
+
};
|
|
3663
|
+
}, Gi = pt("light"), Ni = pt("dark");
|
|
3664
|
+
function vr(e) {
|
|
3665
|
+
const r = e?.toLowerCase() ?? "";
|
|
3666
|
+
return r === "fa" || r === "fa-ir" || r.startsWith("fa-");
|
|
3667
|
+
}
|
|
3668
|
+
function Yo(e) {
|
|
3669
|
+
return e?.calendar ? e.calendar : vr(e?.locale) ? "jalali" : "gregorian";
|
|
3670
|
+
}
|
|
3671
|
+
const $t = {
|
|
3672
|
+
locale: "en-US"
|
|
3673
|
+
};
|
|
3674
|
+
function Ui({
|
|
3675
|
+
children: e,
|
|
3676
|
+
mode: r = "light",
|
|
3677
|
+
direction: t = "ltr",
|
|
3678
|
+
locale: i = $t,
|
|
3679
|
+
themeOptions: a
|
|
3680
|
+
}) {
|
|
3681
|
+
const n = _e(
|
|
3682
|
+
() => pt(r, t, a),
|
|
3683
|
+
[r, t, a]
|
|
3684
|
+
), d = _e(() => ({ ...$t, ...i }), [i]), c = _e(
|
|
3685
|
+
() => ({
|
|
3686
|
+
mode: r,
|
|
3687
|
+
direction: t,
|
|
3688
|
+
locale: d,
|
|
3689
|
+
theme: n
|
|
3690
|
+
}),
|
|
3691
|
+
[r, t, d, n]
|
|
3692
|
+
), S = Yo(d), v = vr(d.locale) ? qr : Xr;
|
|
3693
|
+
return /* @__PURE__ */ y(bt.Provider, { value: c, children: /* @__PURE__ */ zr(Gr, { theme: n, direction: t, locale: v, children: [
|
|
3694
|
+
S === "jalali" ? /* @__PURE__ */ y($r, {}) : null,
|
|
3695
|
+
e
|
|
3696
|
+
] }) });
|
|
3697
|
+
}
|
|
3698
|
+
export {
|
|
3699
|
+
si as TdAlert,
|
|
3700
|
+
Kr as TdAlertTypes,
|
|
3701
|
+
Qr as TdAlertVariants,
|
|
3702
|
+
Me as TdAlias,
|
|
3703
|
+
rr as TdAutocomplete,
|
|
3704
|
+
di as TdButton,
|
|
3705
|
+
Le as TdButtonSizes,
|
|
3706
|
+
De as TdButtonTones,
|
|
3707
|
+
fe as TdButtonVariants,
|
|
3708
|
+
dt as TdCheckbox,
|
|
3709
|
+
et as TdCheckboxDirections,
|
|
3710
|
+
ci as TdCollapse,
|
|
3711
|
+
oo as TdColors,
|
|
3712
|
+
io as TdComponentTokens,
|
|
3713
|
+
fi as TdDarkColors,
|
|
3714
|
+
Zt as TdDatePicker,
|
|
3715
|
+
uo as TdFloatButton,
|
|
3716
|
+
tt as TdFloatButtonBadges,
|
|
3717
|
+
vi as TdFloatButtonGroup,
|
|
3718
|
+
Oe as TdFloatButtonShapes,
|
|
3719
|
+
ue as TdFloatButtonTones,
|
|
3720
|
+
zi as TdForm,
|
|
3721
|
+
Hi as TdFormField,
|
|
3722
|
+
Fo as TdInput,
|
|
3723
|
+
Ei as TdLink,
|
|
3724
|
+
k as TdMap,
|
|
3725
|
+
Bi as TdModal,
|
|
3726
|
+
Ci as TdModalActions,
|
|
3727
|
+
U as TdPalette,
|
|
3728
|
+
wi as TdParagraph,
|
|
3729
|
+
ui as TdRadio,
|
|
3730
|
+
Fi as TdRadioButton,
|
|
3731
|
+
gi as TdRadioGroup,
|
|
3732
|
+
bi as TdRadius,
|
|
3733
|
+
mi as TdResponsive,
|
|
3734
|
+
Q as TdSeed,
|
|
3735
|
+
or as TdSelect,
|
|
3736
|
+
pi as TdShadows,
|
|
3737
|
+
xi as TdSkeleton,
|
|
3738
|
+
Ti as TdSkeletonAvatar,
|
|
3739
|
+
ho as TdSkeletonAvatarShapes,
|
|
3740
|
+
Ii as TdSkeletonButton,
|
|
3741
|
+
ir as TdSkeletonButtonShapes,
|
|
3742
|
+
ki as TdSkeletonImage,
|
|
3743
|
+
Di as TdSkeletonInput,
|
|
3744
|
+
Mi as TdSkeletonNode,
|
|
3745
|
+
ve as TdSkeletonSizes,
|
|
3746
|
+
de as TdSpacing,
|
|
3747
|
+
hi as TdStaticDarkTokens,
|
|
3748
|
+
Jt as TdStaticTokens,
|
|
3749
|
+
Ai as TdTag,
|
|
3750
|
+
nr as TdTagColors,
|
|
3751
|
+
ar as TdTagStatuses,
|
|
3752
|
+
po as TdTagVariants,
|
|
3753
|
+
Pi as TdText,
|
|
3754
|
+
Ui as TdThemeProvider,
|
|
3755
|
+
Vi as TdTitle,
|
|
3756
|
+
Si as TdTypography,
|
|
3757
|
+
yi as TdZIndex,
|
|
3758
|
+
pt as createTdTheme,
|
|
3759
|
+
Ni as tdDarkTheme,
|
|
3760
|
+
Gi as tdLightTheme,
|
|
3761
|
+
$o as useTdTheme,
|
|
3762
|
+
_i as useTdThemeContext,
|
|
3763
|
+
Li as useTdThemeMode
|
|
3764
|
+
};
|
|
3765
|
+
//# sourceMappingURL=index.es.js.map
|