ics-ui-kit 0.1.0-alpha.12 → 0.1.0-alpha.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Button-DQtBfU9y.js +57 -0
- package/dist/Button-DQtBfU9y.js.map +1 -0
- package/dist/{Button-DhfE69q0.js → ButtonBase-BEM8SNmT.js} +27 -56
- package/dist/ButtonBase-BEM8SNmT.js.map +1 -0
- package/dist/CarouselItem-pSHe0ufN.js +1500 -0
- package/dist/CarouselItem-pSHe0ufN.js.map +1 -0
- package/dist/CheckboxField-i_-dPpFM.js +370 -0
- package/dist/CheckboxField-i_-dPpFM.js.map +1 -0
- package/dist/Divider-C0Ss5GJT.js +47 -0
- package/dist/{Divider-D3NvaU8c.js.map → Divider-C0Ss5GJT.js.map} +1 -1
- package/dist/Field-3XJNFTql.js +78 -0
- package/dist/Field-3XJNFTql.js.map +1 -0
- package/dist/FieldLabel-CAbVan3E.js +97 -0
- package/dist/FieldLabel-CAbVan3E.js.map +1 -0
- package/dist/FormBody-4HptEjhb.js +103 -0
- package/dist/FormBody-4HptEjhb.js.map +1 -0
- package/dist/{IconButton-BUPs2kEo.js → IconButton-BkBsOIf5.js} +15 -15
- package/dist/{IconButton-BUPs2kEo.js.map → IconButton-BkBsOIf5.js.map} +1 -1
- package/dist/ImagePlaceholder-CNAKQWTh.js +45 -0
- package/dist/ImagePlaceholder-CNAKQWTh.js.map +1 -0
- package/dist/ImagePreview-DHi7A8md.js +156 -0
- package/dist/ImagePreview-DHi7A8md.js.map +1 -0
- package/dist/ImageUploader-46sxdmt5.js +123 -0
- package/dist/ImageUploader-46sxdmt5.js.map +1 -0
- package/dist/IsolatedStylesWrapper-WgaoHh7y.js +179 -0
- package/dist/IsolatedStylesWrapper-WgaoHh7y.js.map +1 -0
- package/dist/Modal-D33MSQot.js +125 -0
- package/dist/Modal-D33MSQot.js.map +1 -0
- package/dist/ScrollShadowContainer-ByNH68Kg.js +636 -0
- package/dist/ScrollShadowContainer-ByNH68Kg.js.map +1 -0
- package/dist/Toggle-7AlEmn8A.js +104 -0
- package/dist/Toggle-7AlEmn8A.js.map +1 -0
- package/dist/ToggleGroup-CT453MNp.js +200 -0
- package/dist/ToggleGroup-CT453MNp.js.map +1 -0
- package/dist/Tooltip-C4BbGF2_.js +372 -0
- package/dist/Tooltip-C4BbGF2_.js.map +1 -0
- package/dist/{bundle-mjs-D6wdQkGI.js → bundle-mjs-LhQum_e3.js} +676 -425
- package/dist/bundle-mjs-LhQum_e3.js.map +1 -0
- package/dist/check-C-TqZgvb.js.map +1 -1
- package/dist/chevron-right-CobOebzi.js.map +1 -1
- package/dist/components/badge.js +1 -1
- package/dist/components/button/icon-button/IconButton.stories.d.ts +330 -2
- package/dist/components/button/loading-button/LoadingButton.d.ts +249 -0
- package/dist/components/button/loading-button/LoadingButton.stories.d.ts +219 -0
- package/dist/components/button.js +6 -5
- package/dist/components/button.js.map +1 -1
- package/dist/components/carousel.js +65 -1532
- package/dist/components/carousel.js.map +1 -1
- package/dist/components/checkbox.js +1 -1
- package/dist/components/divider/content-divider/ContentDivider.d.ts +14 -0
- package/dist/components/divider/content-divider/ContentDivider.stories.d.ts +7 -0
- package/dist/components/divider/index.d.ts +1 -0
- package/dist/components/divider.js +45 -2
- package/dist/components/divider.js.map +1 -1
- package/dist/components/drawer/templates/drawer-footer-template/DrawerFooterTemplate.d.ts +3 -0
- package/dist/components/drawer.js +450 -447
- package/dist/components/drawer.js.map +1 -1
- package/dist/components/dropdown.js +37 -33
- package/dist/components/dropdown.js.map +1 -1
- package/dist/components/empty-state/EmptyState.d.ts +2 -2
- package/dist/components/empty-state.js +1 -1
- package/dist/components/empty-state.js.map +1 -1
- package/dist/components/field/Field.d.ts +35 -0
- package/dist/components/field.js +1 -1
- package/dist/components/form/components/form-header/FormHeader.d.ts +2 -2
- package/dist/components/form.js +289 -288
- package/dist/components/form.js.map +1 -1
- package/dist/components/gallery/Gallery.d.ts +21 -0
- package/dist/components/gallery/Gallery.stories.d.ts +26 -0
- package/dist/components/gallery/index.d.ts +1 -0
- package/dist/components/gallery.d.ts +2 -0
- package/dist/components/gallery.js +130 -0
- package/dist/components/gallery.js.map +1 -0
- package/dist/components/icon-tooltip/IconTooltip.d.ts +2 -1
- package/dist/components/image-placeholder.js +2 -42
- package/dist/components/image-placeholder.js.map +1 -1
- package/dist/components/image-preview/ImagePreview.d.ts +6 -6
- package/dist/components/image-preview.js +2 -136
- package/dist/components/image-preview.js.map +1 -1
- package/dist/components/image-uploader.js +2 -118
- package/dist/components/image-uploader.js.map +1 -1
- package/dist/components/input/file-input/FileInput.d.ts +3 -1
- package/dist/components/input-otp.js +1 -1
- package/dist/components/input-otp.js.map +1 -1
- package/dist/components/input.js +176 -195
- package/dist/components/input.js.map +1 -1
- package/dist/components/isolated-styles-wrapper/IsolatedStylesWrapper.d.ts +1 -1
- package/dist/components/label/Label.stories.d.ts +0 -2
- package/dist/components/label/field-label/FieldLabel.d.ts +11 -0
- package/dist/components/label/field-label/FieldLabel.stories.d.ts +1 -0
- package/dist/components/label/field-label/components/RequiredIcon.d.ts +5 -0
- package/dist/components/label.js +1 -1
- package/dist/components/loading/Loading.d.ts +4 -4
- package/dist/components/loading.js +2 -2
- package/dist/components/loading.js.map +1 -1
- package/dist/components/modal.js +12 -122
- package/dist/components/modal.js.map +1 -1
- package/dist/components/option-group.js +1 -1
- package/dist/components/popover.js +34 -31
- package/dist/components/popover.js.map +1 -1
- package/dist/components/scheduler.js +11 -11
- package/dist/components/scheduler.js.map +1 -1
- package/dist/components/scroll-shadow-container/ScrollShadowContainer.d.ts +1 -0
- package/dist/components/scroll-shadow-container.js +1 -1
- package/dist/components/select.js +487 -519
- package/dist/components/select.js.map +1 -1
- package/dist/components/shortcut/Shortcut.d.ts +14 -14
- package/dist/components/shortcut/Shortcut.stories.d.ts +7 -7
- package/dist/components/shortcut.js +16 -16
- package/dist/components/shortcut.js.map +1 -1
- package/dist/components/skeleton/Skeleton.d.ts +1 -0
- package/dist/components/skeleton/Skeleton.stories.d.ts +7 -0
- package/dist/components/skeleton/index.d.ts +1 -0
- package/dist/components/skeleton.d.ts +2 -0
- package/dist/components/skeleton.js +33 -0
- package/dist/components/skeleton.js.map +1 -0
- package/dist/components/switch.js +147 -126
- package/dist/components/switch.js.map +1 -1
- package/dist/components/tabs.js +9 -8
- package/dist/components/tabs.js.map +1 -1
- package/dist/components/tag.js +3 -3
- package/dist/components/toast.js +4 -4
- package/dist/components/toast.js.map +1 -1
- package/dist/components/toggle-group.js +1 -1
- package/dist/components/toggle.js +1 -1
- package/dist/components/tooltip/Tooltip.stories.d.ts +7 -0
- package/dist/components/tooltip/index.d.ts +1 -0
- package/dist/components/tooltip.d.ts +2 -0
- package/dist/components/tooltip.js +8 -0
- package/dist/components/tooltip.js.map +1 -0
- package/dist/createLucideIcon-DgrNxRV5.js.map +1 -1
- package/dist/design-tokens.source.json +1 -1
- package/dist/download-CVOGyQ0e.js.map +1 -1
- package/dist/downloadFile-yZV-aaO2.js +15 -0
- package/dist/downloadFile-yZV-aaO2.js.map +1 -0
- package/dist/index-B6K06mzp.js +67 -0
- package/dist/index-B6K06mzp.js.map +1 -0
- package/dist/index-BCZIl2rL.js +68 -0
- package/dist/index-BCZIl2rL.js.map +1 -0
- package/dist/index-BZPx6jYI.js.map +1 -1
- package/dist/index-Bj6ZBhqh.js +105 -0
- package/dist/index-Bj6ZBhqh.js.map +1 -0
- package/dist/index-ByaXH_ih.js.map +1 -1
- package/dist/index-CACw01gt.js +702 -0
- package/dist/index-CACw01gt.js.map +1 -0
- package/dist/index-COBL2CQB.js +14 -0
- package/dist/index-COBL2CQB.js.map +1 -0
- package/dist/index-CR-odn5-.js.map +1 -1
- package/dist/{index-BjbwEU_d.js → index-ClwWa5fz.js} +20 -20
- package/dist/index-ClwWa5fz.js.map +1 -0
- package/dist/{index-DwbC6luJ.js → index-Cx4x7Bv2.js} +52 -50
- package/dist/index-Cx4x7Bv2.js.map +1 -0
- package/dist/index-CzNelU6n.js +55 -0
- package/dist/index-CzNelU6n.js.map +1 -0
- package/dist/index-DBsc8nMF.js +43 -0
- package/dist/index-DBsc8nMF.js.map +1 -0
- package/dist/index-Mbnk_gHS.js +102 -0
- package/dist/index-Mbnk_gHS.js.map +1 -0
- package/dist/index-bhXb51Q1.js +215 -0
- package/dist/index-bhXb51Q1.js.map +1 -0
- package/dist/index-n71RB2rx.js +1592 -0
- package/dist/index-n71RB2rx.js.map +1 -0
- package/dist/index-rKs9bXHr.js +7 -0
- package/dist/index-rKs9bXHr.js.map +1 -0
- package/dist/lib/utils/file/downloadFile.d.ts +2 -0
- package/dist/lib/utils/image/imageConverter.d.ts +23 -0
- package/dist/styles-scoped.css +72 -18
- package/dist/styles.css +72 -18
- package/dist/{utils-DGzAmwok.js → utils-BK4mPzkB.js} +2 -2
- package/dist/utils-BK4mPzkB.js.map +1 -0
- package/dist/x-JgjNP5oH.js.map +1 -1
- package/package.json +1 -1
- package/dist/Button-DhfE69q0.js.map +0 -1
- package/dist/CheckboxField-CL1Tc7P4.js +0 -257
- package/dist/CheckboxField-CL1Tc7P4.js.map +0 -1
- package/dist/Divider-D3NvaU8c.js +0 -46
- package/dist/Field-COOo8o9f.js +0 -80
- package/dist/Field-COOo8o9f.js.map +0 -1
- package/dist/FieldLabel-BGxT_RaE.js +0 -64
- package/dist/FieldLabel-BGxT_RaE.js.map +0 -1
- package/dist/FormBody-DM52shm4.js +0 -101
- package/dist/FormBody-DM52shm4.js.map +0 -1
- package/dist/IsolatedStylesWrapper-B_Qu75eR.js +0 -555
- package/dist/IsolatedStylesWrapper-B_Qu75eR.js.map +0 -1
- package/dist/ScrollShadowContainer-DSKr3_fV.js +0 -690
- package/dist/ScrollShadowContainer-DSKr3_fV.js.map +0 -1
- package/dist/Toggle-BuYtICWv.js +0 -129
- package/dist/Toggle-BuYtICWv.js.map +0 -1
- package/dist/ToggleGroup-CMyUAz04.js +0 -467
- package/dist/ToggleGroup-CMyUAz04.js.map +0 -1
- package/dist/bundle-mjs-D6wdQkGI.js.map +0 -1
- package/dist/floating-ui.react-dom-CWfR7VfF.js +0 -1346
- package/dist/floating-ui.react-dom-CWfR7VfF.js.map +0 -1
- package/dist/index-0WznJ1QS.js +0 -276
- package/dist/index-0WznJ1QS.js.map +0 -1
- package/dist/index-BjbwEU_d.js.map +0 -1
- package/dist/index-BqriTm0o.js +0 -47
- package/dist/index-BqriTm0o.js.map +0 -1
- package/dist/index-C6bvrqL8.js +0 -563
- package/dist/index-C6bvrqL8.js.map +0 -1
- package/dist/index-C6t9z3on.js +0 -97
- package/dist/index-C6t9z3on.js.map +0 -1
- package/dist/index-CaQG3DzJ.js +0 -64
- package/dist/index-CaQG3DzJ.js.map +0 -1
- package/dist/index-ChTGHCkY.js +0 -255
- package/dist/index-ChTGHCkY.js.map +0 -1
- package/dist/index-D808y1pT.js +0 -178
- package/dist/index-D808y1pT.js.map +0 -1
- package/dist/index-DE3fiSzl.js +0 -28
- package/dist/index-DE3fiSzl.js.map +0 -1
- package/dist/index-DPws5oAn.js +0 -90
- package/dist/index-DPws5oAn.js.map +0 -1
- package/dist/index-DeUgDpdG.js +0 -80
- package/dist/index-DeUgDpdG.js.map +0 -1
- package/dist/index-DvquTpxI.js +0 -140
- package/dist/index-DvquTpxI.js.map +0 -1
- package/dist/index-DwbC6luJ.js.map +0 -1
- package/dist/index-Ncxt32Wo.js +0 -174
- package/dist/index-Ncxt32Wo.js.map +0 -1
- package/dist/index-U7y6nBZR.js +0 -179
- package/dist/index-U7y6nBZR.js.map +0 -1
- package/dist/index-pysSAa5G.js +0 -57
- package/dist/index-pysSAa5G.js.map +0 -1
- package/dist/tooltip-DI3_ZKNk.js +0 -365
- package/dist/tooltip-DI3_ZKNk.js.map +0 -1
- package/dist/utils-DGzAmwok.js.map +0 -1
- /package/dist/components/{ui/tooltip.d.ts → tooltip/Tooltip.d.ts} +0 -0
package/dist/components/form.js
CHANGED
|
@@ -1,104 +1,105 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
1
|
+
var te = Object.defineProperty, re = Object.defineProperties;
|
|
2
|
+
var se = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var E = Object.getOwnPropertySymbols;
|
|
4
|
+
var D = Object.prototype.hasOwnProperty, B = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var T = (e, r, t) => r in e ? te(e, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[r] = t, f = (e, r) => {
|
|
6
6
|
for (var t in r || (r = {}))
|
|
7
|
-
|
|
8
|
-
if (
|
|
9
|
-
for (var t of
|
|
10
|
-
|
|
7
|
+
D.call(r, t) && T(e, t, r[t]);
|
|
8
|
+
if (E)
|
|
9
|
+
for (var t of E(r))
|
|
10
|
+
B.call(r, t) && T(e, t, r[t]);
|
|
11
11
|
return e;
|
|
12
|
-
},
|
|
13
|
-
var
|
|
12
|
+
}, F = (e, r) => re(e, se(r));
|
|
13
|
+
var b = (e, r) => {
|
|
14
14
|
var t = {};
|
|
15
|
-
for (var
|
|
16
|
-
|
|
17
|
-
if (e != null &&
|
|
18
|
-
for (var
|
|
19
|
-
r.indexOf(
|
|
15
|
+
for (var s in e)
|
|
16
|
+
D.call(e, s) && r.indexOf(s) < 0 && (t[s] = e[s]);
|
|
17
|
+
if (e != null && E)
|
|
18
|
+
for (var s of E(e))
|
|
19
|
+
r.indexOf(s) < 0 && B.call(e, s) && (t[s] = e[s]);
|
|
20
20
|
return t;
|
|
21
21
|
};
|
|
22
|
-
import { jsx as
|
|
23
|
-
import * as
|
|
24
|
-
import
|
|
25
|
-
import { S as H } from "../index-
|
|
22
|
+
import { jsx as d, jsxs as N } from "react/jsx-runtime";
|
|
23
|
+
import * as m from "react";
|
|
24
|
+
import u from "react";
|
|
25
|
+
import { S as H } from "../index-Bj6ZBhqh.js";
|
|
26
26
|
import { c as v } from "../index-CR-odn5-.js";
|
|
27
|
-
import { F as
|
|
28
|
-
import { F as
|
|
29
|
-
import { b as
|
|
30
|
-
import { a as
|
|
31
|
-
import { D as
|
|
32
|
-
import { B as
|
|
33
|
-
import { a as
|
|
34
|
-
import { F as
|
|
35
|
-
var
|
|
36
|
-
const
|
|
37
|
-
var C = (e) => !U(e) && !Array.isArray(e) &&
|
|
27
|
+
import { F as oe } from "../FieldLabel-CAbVan3E.js";
|
|
28
|
+
import { F as ne } from "../Field-3XJNFTql.js";
|
|
29
|
+
import { b as ae, d as ie, e as le, F as ce } from "../FormBody-4HptEjhb.js";
|
|
30
|
+
import { a as xt } from "../FormBody-4HptEjhb.js";
|
|
31
|
+
import { D as de } from "../Description-ZE34bSch.js";
|
|
32
|
+
import { B as j } from "../Button-DQtBfU9y.js";
|
|
33
|
+
import { a as ue } from "../CheckboxField-i_-dPpFM.js";
|
|
34
|
+
import { F as fe } from "../FeatureIcon-DUxmZx87.js";
|
|
35
|
+
var me = (e) => e.type === "checkbox", pe = (e) => e instanceof Date, U = (e) => e == null;
|
|
36
|
+
const ye = (e) => typeof e == "object";
|
|
37
|
+
var C = (e) => !U(e) && !Array.isArray(e) && ye(e) && !pe(e), ge = (e) => C(e) && e.target ? me(e.target) ? e.target.checked : e.target.value : e, he = (e) => e.substring(0, e.search(/\.\d+(\.|$)/)) || e, be = (e, r) => e.has(he(r)), Fe = (e) => {
|
|
38
38
|
const r = e.constructor && e.constructor.prototype;
|
|
39
39
|
return C(r) && r.hasOwnProperty("isPrototypeOf");
|
|
40
|
-
},
|
|
40
|
+
}, xe = typeof window != "undefined" && typeof window.HTMLElement != "undefined" && typeof document != "undefined";
|
|
41
41
|
function W(e) {
|
|
42
42
|
let r;
|
|
43
|
-
const t = Array.isArray(e),
|
|
43
|
+
const t = Array.isArray(e), s = typeof FileList != "undefined" ? e instanceof FileList : !1;
|
|
44
44
|
if (e instanceof Date)
|
|
45
45
|
r = new Date(e);
|
|
46
46
|
else if (e instanceof Set)
|
|
47
47
|
r = new Set(e);
|
|
48
|
-
else if (!(
|
|
49
|
-
if (r = t ? [] : {}, !t && !
|
|
48
|
+
else if (!(xe && (e instanceof Blob || s)) && (t || C(e)))
|
|
49
|
+
if (r = t ? [] : {}, !t && !Fe(e))
|
|
50
50
|
r = e;
|
|
51
51
|
else
|
|
52
|
-
for (const
|
|
53
|
-
e.hasOwnProperty(
|
|
52
|
+
for (const o in e)
|
|
53
|
+
e.hasOwnProperty(o) && (r[o] = W(e[o]));
|
|
54
54
|
else
|
|
55
55
|
return e;
|
|
56
56
|
return r;
|
|
57
57
|
}
|
|
58
|
-
var
|
|
58
|
+
var z = (e) => Array.isArray(e) ? e.filter(Boolean) : [], R = (e) => e === void 0, p = (e, r, t) => {
|
|
59
59
|
if (!r || !C(e))
|
|
60
60
|
return t;
|
|
61
|
-
const
|
|
62
|
-
return
|
|
63
|
-
}, O = (e) => typeof e == "boolean",
|
|
64
|
-
let
|
|
65
|
-
const
|
|
66
|
-
for (; ++
|
|
67
|
-
const l = s
|
|
68
|
-
let
|
|
69
|
-
if (
|
|
61
|
+
const s = z(r.split(/[,[\].]+?/)).reduce((o, n) => U(o) ? o : o[n], e);
|
|
62
|
+
return R(s) || s === e ? R(e[r]) ? t : e[r] : s;
|
|
63
|
+
}, O = (e) => typeof e == "boolean", ve = (e) => /^\w*$/.test(e), _e = (e) => z(e.replace(/["|']|\]/g, "").split(/\.|\[/)), Q = (e, r, t) => {
|
|
64
|
+
let s = -1;
|
|
65
|
+
const o = ve(r) ? [r] : _e(r), n = o.length, a = n - 1;
|
|
66
|
+
for (; ++s < n; ) {
|
|
67
|
+
const l = o[s];
|
|
68
|
+
let i = t;
|
|
69
|
+
if (s !== a) {
|
|
70
70
|
const c = e[l];
|
|
71
|
-
|
|
71
|
+
i = C(c) || Array.isArray(c) ? c : isNaN(+o[s + 1]) ? {} : [];
|
|
72
72
|
}
|
|
73
73
|
if (l === "__proto__" || l === "constructor" || l === "prototype")
|
|
74
74
|
return;
|
|
75
|
-
e[l] =
|
|
75
|
+
e[l] = i, e = e[l];
|
|
76
76
|
}
|
|
77
77
|
};
|
|
78
|
-
const
|
|
78
|
+
const P = {
|
|
79
79
|
BLUR: "blur",
|
|
80
80
|
CHANGE: "change"
|
|
81
81
|
}, $ = {
|
|
82
82
|
all: "all"
|
|
83
|
-
},
|
|
84
|
-
const
|
|
85
|
-
return
|
|
83
|
+
}, G = u.createContext(null), V = () => u.useContext(G), we = (e) => {
|
|
84
|
+
const s = e, { children: r } = s, t = b(s, ["children"]);
|
|
85
|
+
return u.createElement(G.Provider, { value: t }, r);
|
|
86
86
|
};
|
|
87
|
-
var
|
|
88
|
-
const
|
|
87
|
+
var Se = (e, r, t, s = !0) => {
|
|
88
|
+
const o = {
|
|
89
89
|
defaultValues: r._defaultValues
|
|
90
90
|
};
|
|
91
91
|
for (const n in e)
|
|
92
|
-
Object.defineProperty(
|
|
92
|
+
Object.defineProperty(o, n, {
|
|
93
93
|
get: () => {
|
|
94
|
-
const
|
|
95
|
-
return r._proxyFormState[
|
|
94
|
+
const a = n;
|
|
95
|
+
return r._proxyFormState[a] !== $.all && (r._proxyFormState[a] = !s || $.all), t && (t[a] = !0), e[a];
|
|
96
96
|
}
|
|
97
97
|
});
|
|
98
|
-
return
|
|
98
|
+
return o;
|
|
99
99
|
};
|
|
100
|
-
|
|
101
|
-
|
|
100
|
+
const K = typeof window != "undefined" ? m.useLayoutEffect : m.useEffect;
|
|
101
|
+
function Ne(e) {
|
|
102
|
+
const r = V(), { control: t = r.control, disabled: s, name: o, exact: n } = e || {}, [a, l] = u.useState(t._formState), i = u.useRef({
|
|
102
103
|
isDirty: !1,
|
|
103
104
|
isLoading: !1,
|
|
104
105
|
dirtyFields: !1,
|
|
@@ -107,134 +108,132 @@ function Se(e) {
|
|
|
107
108
|
isValidating: !1,
|
|
108
109
|
isValid: !1,
|
|
109
110
|
errors: !1
|
|
110
|
-
})
|
|
111
|
-
return
|
|
112
|
-
name:
|
|
113
|
-
formState:
|
|
111
|
+
});
|
|
112
|
+
return K(() => t._subscribe({
|
|
113
|
+
name: o,
|
|
114
|
+
formState: i.current,
|
|
114
115
|
exact: n,
|
|
115
|
-
callback: (
|
|
116
|
-
!
|
|
116
|
+
callback: (c) => {
|
|
117
|
+
!s && l(f(f({}, t._formState), c));
|
|
117
118
|
}
|
|
118
|
-
}), [
|
|
119
|
-
|
|
120
|
-
}, [t]),
|
|
119
|
+
}), [o, s, n]), u.useEffect(() => {
|
|
120
|
+
i.current.isValid && t._setValid(!0);
|
|
121
|
+
}, [t]), u.useMemo(() => Se(a, t, i.current, !1), [a, t]);
|
|
121
122
|
}
|
|
122
|
-
var
|
|
123
|
-
function
|
|
124
|
-
const r = V(), { control: t = r.control, name:
|
|
125
|
-
|
|
126
|
-
name:
|
|
123
|
+
var Ce = (e) => typeof e == "string", Ve = (e, r, t, s, o) => Ce(e) ? p(t, e, o) : Array.isArray(e) ? e.map((n) => p(t, n)) : t;
|
|
124
|
+
function ke(e) {
|
|
125
|
+
const r = V(), { control: t = r.control, name: s, defaultValue: o, disabled: n, exact: a } = e || {}, l = u.useRef(o), [i, c] = u.useState(t._getWatch(s, l.current));
|
|
126
|
+
return K(() => t._subscribe({
|
|
127
|
+
name: s,
|
|
127
128
|
formState: {
|
|
128
129
|
values: !0
|
|
129
130
|
},
|
|
130
|
-
exact:
|
|
131
|
-
callback: (
|
|
132
|
-
}), [t, n,
|
|
133
|
-
const [c, p] = d.useState(t._getWatch(o, s));
|
|
134
|
-
return d.useEffect(() => t._removeUnmounted()), c;
|
|
131
|
+
exact: a,
|
|
132
|
+
callback: (h) => !n && c(Ve(s, t._names, h.values || t._formValues, !1, l.current))
|
|
133
|
+
}), [s, t, n, a]), u.useEffect(() => t._removeUnmounted()), i;
|
|
135
134
|
}
|
|
136
|
-
function
|
|
137
|
-
const r = V(), { name: t, disabled:
|
|
138
|
-
control:
|
|
135
|
+
function Ie(e) {
|
|
136
|
+
const r = V(), { name: t, disabled: s, control: o = r.control, shouldUnregister: n } = e, a = be(o._names.array, t), l = ke({
|
|
137
|
+
control: o,
|
|
139
138
|
name: t,
|
|
140
|
-
defaultValue:
|
|
139
|
+
defaultValue: p(o._formValues, t, p(o._defaultValues, t, e.defaultValue)),
|
|
141
140
|
exact: !0
|
|
142
|
-
}),
|
|
143
|
-
control:
|
|
141
|
+
}), i = Ne({
|
|
142
|
+
control: o,
|
|
144
143
|
name: t,
|
|
145
144
|
exact: !0
|
|
146
|
-
}), c =
|
|
145
|
+
}), c = u.useRef(e), h = u.useRef(o.register(t, f(F(f({}, e.rules), {
|
|
147
146
|
value: l
|
|
148
|
-
}), O(e.disabled) ? { disabled: e.disabled } : {}))),
|
|
147
|
+
}), O(e.disabled) ? { disabled: e.disabled } : {}))), y = u.useMemo(() => Object.defineProperties({}, {
|
|
149
148
|
invalid: {
|
|
150
149
|
enumerable: !0,
|
|
151
|
-
get: () => !!
|
|
150
|
+
get: () => !!p(i.errors, t)
|
|
152
151
|
},
|
|
153
152
|
isDirty: {
|
|
154
153
|
enumerable: !0,
|
|
155
|
-
get: () => !!
|
|
154
|
+
get: () => !!p(i.dirtyFields, t)
|
|
156
155
|
},
|
|
157
156
|
isTouched: {
|
|
158
157
|
enumerable: !0,
|
|
159
|
-
get: () => !!
|
|
158
|
+
get: () => !!p(i.touchedFields, t)
|
|
160
159
|
},
|
|
161
160
|
isValidating: {
|
|
162
161
|
enumerable: !0,
|
|
163
|
-
get: () => !!
|
|
162
|
+
get: () => !!p(i.validatingFields, t)
|
|
164
163
|
},
|
|
165
164
|
error: {
|
|
166
165
|
enumerable: !0,
|
|
167
|
-
get: () =>
|
|
166
|
+
get: () => p(i.errors, t)
|
|
168
167
|
}
|
|
169
|
-
}), [
|
|
168
|
+
}), [i, t]), x = u.useCallback((g) => h.current.onChange({
|
|
170
169
|
target: {
|
|
171
|
-
value:
|
|
170
|
+
value: ge(g),
|
|
172
171
|
name: t
|
|
173
172
|
},
|
|
174
|
-
type:
|
|
175
|
-
}), [t]), _ =
|
|
173
|
+
type: P.CHANGE
|
|
174
|
+
}), [t]), _ = u.useCallback(() => h.current.onBlur({
|
|
176
175
|
target: {
|
|
177
|
-
value:
|
|
176
|
+
value: p(o._formValues, t),
|
|
178
177
|
name: t
|
|
179
178
|
},
|
|
180
|
-
type:
|
|
181
|
-
}), [t,
|
|
182
|
-
const S =
|
|
183
|
-
S &&
|
|
184
|
-
focus: () =>
|
|
185
|
-
select: () =>
|
|
186
|
-
setCustomValidity: (w) =>
|
|
187
|
-
reportValidity: () =>
|
|
179
|
+
type: P.BLUR
|
|
180
|
+
}), [t, o._formValues]), k = u.useCallback((g) => {
|
|
181
|
+
const S = p(o._fields, t);
|
|
182
|
+
S && g && (S._f.ref = {
|
|
183
|
+
focus: () => g.focus && g.focus(),
|
|
184
|
+
select: () => g.select && g.select(),
|
|
185
|
+
setCustomValidity: (w) => g.setCustomValidity(w),
|
|
186
|
+
reportValidity: () => g.reportValidity()
|
|
188
187
|
});
|
|
189
|
-
}, [
|
|
188
|
+
}, [o._fields, t]), I = u.useMemo(() => F(f({
|
|
190
189
|
name: t,
|
|
191
190
|
value: l
|
|
192
|
-
}, O(
|
|
193
|
-
onChange:
|
|
191
|
+
}, O(s) || i.disabled ? { disabled: i.disabled || s } : {}), {
|
|
192
|
+
onChange: x,
|
|
194
193
|
onBlur: _,
|
|
195
194
|
ref: k
|
|
196
|
-
}), [t,
|
|
197
|
-
return
|
|
198
|
-
const
|
|
199
|
-
|
|
200
|
-
const S = (w,
|
|
201
|
-
const
|
|
202
|
-
|
|
195
|
+
}), [t, s, i.disabled, x, _, k, l]);
|
|
196
|
+
return u.useEffect(() => {
|
|
197
|
+
const g = o._options.shouldUnregister || n;
|
|
198
|
+
o.register(t, f(f({}, c.current.rules), O(c.current.disabled) ? { disabled: c.current.disabled } : {}));
|
|
199
|
+
const S = (w, ee) => {
|
|
200
|
+
const A = p(o._fields, w);
|
|
201
|
+
A && A._f && (A._f.mount = ee);
|
|
203
202
|
};
|
|
204
|
-
if (S(t, !0),
|
|
205
|
-
const w = W(
|
|
206
|
-
|
|
203
|
+
if (S(t, !0), g) {
|
|
204
|
+
const w = W(p(o._options.defaultValues, t));
|
|
205
|
+
Q(o._defaultValues, t, w), R(p(o._formValues, t)) && Q(o._formValues, t, w);
|
|
207
206
|
}
|
|
208
|
-
return !
|
|
209
|
-
(
|
|
207
|
+
return !a && o.register(t), () => {
|
|
208
|
+
(a ? g && !o._state.action : g) ? o.unregister(t) : S(t, !1);
|
|
210
209
|
};
|
|
211
|
-
}, [t,
|
|
212
|
-
|
|
213
|
-
disabled:
|
|
210
|
+
}, [t, o, a, n]), u.useEffect(() => {
|
|
211
|
+
o._setDisabledField({
|
|
212
|
+
disabled: s,
|
|
214
213
|
name: t
|
|
215
214
|
});
|
|
216
|
-
}, [
|
|
215
|
+
}, [s, t, o]), u.useMemo(() => ({
|
|
217
216
|
field: I,
|
|
218
|
-
formState:
|
|
219
|
-
fieldState:
|
|
220
|
-
}), [I,
|
|
217
|
+
formState: i,
|
|
218
|
+
fieldState: y
|
|
219
|
+
}), [I, i, y]);
|
|
221
220
|
}
|
|
222
|
-
const
|
|
223
|
-
base: "rounded-md border border-secondary-border"
|
|
224
|
-
}),
|
|
225
|
-
var
|
|
221
|
+
const Ee = (e) => e.render(Ie(e)), Ae = v({
|
|
222
|
+
base: "rounded-md border border-secondary-border bg-secondary-bg"
|
|
223
|
+
}), yt = (s) => {
|
|
224
|
+
var o = s, {
|
|
226
225
|
className: e,
|
|
227
226
|
asChild: r
|
|
228
|
-
} =
|
|
227
|
+
} = o, t = b(o, [
|
|
229
228
|
"className",
|
|
230
229
|
"asChild"
|
|
231
230
|
]);
|
|
232
|
-
return /* @__PURE__ */
|
|
233
|
-
},
|
|
234
|
-
var e =
|
|
235
|
-
return /* @__PURE__ */
|
|
236
|
-
},
|
|
237
|
-
const e =
|
|
231
|
+
return /* @__PURE__ */ d(r ? H : "div", { className: Ae({ className: e }), children: /* @__PURE__ */ d(we, f({}, t)) });
|
|
232
|
+
}, J = m.createContext({}), Oe = (r) => {
|
|
233
|
+
var e = b(r, []);
|
|
234
|
+
return /* @__PURE__ */ d(J.Provider, { value: { name: e.name }, children: /* @__PURE__ */ d(Ee, f({}, e)) });
|
|
235
|
+
}, M = () => {
|
|
236
|
+
const e = m.useContext(J), r = m.useContext(X), { getFieldState: t, formState: s } = V(), o = t(e.name, s);
|
|
238
237
|
if (!e)
|
|
239
238
|
throw new Error("useFormField should be used within <FormField>");
|
|
240
239
|
const { id: n } = r;
|
|
@@ -244,145 +243,145 @@ const Ie = (e) => e.render(ke(e)), Ae = v({
|
|
|
244
243
|
formItemId: `${n}-form-item`,
|
|
245
244
|
formDescriptionId: `${n}-form-item-description`,
|
|
246
245
|
formMessageId: `${n}-form-item-message`
|
|
247
|
-
},
|
|
248
|
-
},
|
|
246
|
+
}, o);
|
|
247
|
+
}, X = m.createContext({}), Le = v({
|
|
249
248
|
base: "space-y-2"
|
|
250
|
-
}),
|
|
251
|
-
(
|
|
252
|
-
var
|
|
253
|
-
const n =
|
|
254
|
-
return /* @__PURE__ */
|
|
249
|
+
}), Y = m.forwardRef(
|
|
250
|
+
(s, t) => {
|
|
251
|
+
var o = s, { className: e } = o, r = b(o, ["className"]);
|
|
252
|
+
const n = m.useId();
|
|
253
|
+
return /* @__PURE__ */ d(X.Provider, { value: { id: n }, children: /* @__PURE__ */ d("div", f({ ref: t, className: Le({ className: e }) }, r)) });
|
|
255
254
|
}
|
|
256
255
|
);
|
|
257
|
-
|
|
258
|
-
const Re =
|
|
259
|
-
(
|
|
260
|
-
var n =
|
|
261
|
-
const { formItemId:
|
|
262
|
-
return /* @__PURE__ */
|
|
256
|
+
Y.displayName = "FormItem";
|
|
257
|
+
const Re = m.forwardRef(
|
|
258
|
+
(o, s) => {
|
|
259
|
+
var n = o, { className: e, required: r } = n, t = b(n, ["className", "required"]);
|
|
260
|
+
const { formItemId: a } = M();
|
|
261
|
+
return /* @__PURE__ */ d(oe, f({ required: r, ref: s, className: e, htmlFor: a }, t));
|
|
263
262
|
}
|
|
264
263
|
);
|
|
265
264
|
Re.displayName = "FormLabel";
|
|
266
|
-
const
|
|
265
|
+
const Z = m.forwardRef(
|
|
267
266
|
(t, r) => {
|
|
268
|
-
var e =
|
|
269
|
-
const { error:
|
|
270
|
-
return /* @__PURE__ */
|
|
267
|
+
var e = b(t, []);
|
|
268
|
+
const { error: s, formItemId: o, formDescriptionId: n, formMessageId: a } = M();
|
|
269
|
+
return /* @__PURE__ */ d(
|
|
271
270
|
H,
|
|
272
271
|
f({
|
|
273
272
|
ref: r,
|
|
274
|
-
id:
|
|
275
|
-
"aria-describedby":
|
|
276
|
-
"aria-invalid": !!
|
|
273
|
+
id: o,
|
|
274
|
+
"aria-describedby": s ? `${n} ${a}` : `${n}`,
|
|
275
|
+
"aria-invalid": !!s
|
|
277
276
|
}, e)
|
|
278
277
|
);
|
|
279
278
|
}
|
|
280
279
|
);
|
|
281
|
-
|
|
282
|
-
const
|
|
280
|
+
Z.displayName = "FormControl";
|
|
281
|
+
const Me = v({
|
|
283
282
|
base: "text-[0.8rem] font-medium text-destructive"
|
|
284
|
-
}),
|
|
285
|
-
(
|
|
286
|
-
var n =
|
|
283
|
+
}), Te = m.forwardRef(
|
|
284
|
+
(o, s) => {
|
|
285
|
+
var n = o, { className: e, children: r } = n, t = b(n, ["className", "children"]);
|
|
287
286
|
var c;
|
|
288
|
-
const { error:
|
|
289
|
-
return
|
|
287
|
+
const { error: a, formMessageId: l } = M(), i = a ? String((c = a == null ? void 0 : a.message) != null ? c : "") : r;
|
|
288
|
+
return i ? /* @__PURE__ */ d("p", F(f({ ref: s, id: l, className: Me({ className: e }) }, t), { children: i })) : null;
|
|
290
289
|
}
|
|
291
290
|
);
|
|
292
|
-
|
|
293
|
-
const
|
|
291
|
+
Te.displayName = "FormMessage";
|
|
292
|
+
const De = v({
|
|
294
293
|
base: "flex-col gap-2 lg:flex-row lg:gap-4",
|
|
295
294
|
slots: {
|
|
296
295
|
label: "h-4 lg:h-9"
|
|
297
296
|
}
|
|
298
297
|
});
|
|
299
|
-
function
|
|
298
|
+
function gt({
|
|
300
299
|
name: e,
|
|
301
300
|
title: r,
|
|
302
301
|
description: t,
|
|
303
|
-
control:
|
|
304
|
-
required:
|
|
302
|
+
control: s,
|
|
303
|
+
required: o,
|
|
305
304
|
className: n,
|
|
306
|
-
labelClassName:
|
|
305
|
+
labelClassName: a,
|
|
307
306
|
readonly: l
|
|
308
307
|
}) {
|
|
309
|
-
const
|
|
310
|
-
return /* @__PURE__ */
|
|
311
|
-
|
|
308
|
+
const i = V(), c = De();
|
|
309
|
+
return /* @__PURE__ */ d(
|
|
310
|
+
Oe,
|
|
312
311
|
{
|
|
313
|
-
control:
|
|
312
|
+
control: i.control,
|
|
314
313
|
name: e,
|
|
315
|
-
render: ({ field:
|
|
314
|
+
render: ({ field: h, fieldState: y, formState: x }) => {
|
|
316
315
|
var _;
|
|
317
|
-
return /* @__PURE__ */
|
|
318
|
-
|
|
316
|
+
return /* @__PURE__ */ d(Y, { children: /* @__PURE__ */ d(
|
|
317
|
+
ne,
|
|
319
318
|
{
|
|
320
319
|
title: r,
|
|
321
320
|
description: t,
|
|
322
|
-
required:
|
|
323
|
-
error: (_ =
|
|
324
|
-
labelClassName: c.label({ class:
|
|
321
|
+
required: o,
|
|
322
|
+
error: (_ = y.error) == null ? void 0 : _.message,
|
|
323
|
+
labelClassName: c.label({ class: a }),
|
|
325
324
|
readonly: l,
|
|
326
325
|
className: c.base({ className: n }),
|
|
327
|
-
control: ({ id: k, readonly: I }) => /* @__PURE__ */
|
|
326
|
+
control: ({ id: k, readonly: I }) => /* @__PURE__ */ d(Z, { id: k, children: s({ field: h, fieldState: y, formState: x, readonly: I }) })
|
|
328
327
|
}
|
|
329
328
|
) });
|
|
330
329
|
}
|
|
331
330
|
}
|
|
332
331
|
);
|
|
333
332
|
}
|
|
334
|
-
const
|
|
333
|
+
const Be = v({
|
|
335
334
|
base: "text-md font-semibold"
|
|
336
335
|
});
|
|
337
|
-
function
|
|
338
|
-
return /* @__PURE__ */
|
|
336
|
+
function ht({ children: e, className: r, as: t = "h3" }) {
|
|
337
|
+
return /* @__PURE__ */ d(t, { className: Be({ className: r }), children: e });
|
|
339
338
|
}
|
|
340
|
-
const
|
|
339
|
+
const je = v({
|
|
341
340
|
slots: {
|
|
342
341
|
container: "flex flex-row justify-between gap-3 lg:gap-4",
|
|
343
342
|
textWrapper: "flex flex-col gap-0.5",
|
|
344
343
|
header: "text-base font-semibold text-primary-fg"
|
|
345
344
|
}
|
|
346
|
-
}),
|
|
347
|
-
(
|
|
348
|
-
var l =
|
|
349
|
-
const
|
|
350
|
-
return /* @__PURE__ */ N("div",
|
|
351
|
-
/* @__PURE__ */ N("div", { className:
|
|
352
|
-
/* @__PURE__ */
|
|
353
|
-
/* @__PURE__ */
|
|
345
|
+
}), Qe = u.forwardRef(
|
|
346
|
+
(a, n) => {
|
|
347
|
+
var l = a, { className: e, children: r, description: t, title: s } = l, o = b(l, ["className", "children", "description", "title"]);
|
|
348
|
+
const i = je();
|
|
349
|
+
return /* @__PURE__ */ N("div", F(f({ className: i.container({ className: e }), ref: n }, o), { children: [
|
|
350
|
+
/* @__PURE__ */ N("div", { className: i.textWrapper(), children: [
|
|
351
|
+
/* @__PURE__ */ d("h3", { className: i.header(), children: s }),
|
|
352
|
+
/* @__PURE__ */ d(de, { children: t })
|
|
354
353
|
] }),
|
|
355
354
|
r
|
|
356
355
|
] }));
|
|
357
356
|
}
|
|
358
357
|
);
|
|
359
|
-
|
|
360
|
-
function
|
|
358
|
+
Qe.displayName = "FormSection";
|
|
359
|
+
function Pe(e, r) {
|
|
361
360
|
if (r === e) return !1;
|
|
362
|
-
const t = Object.values(r),
|
|
363
|
-
if (t.length !==
|
|
364
|
-
const
|
|
365
|
-
return Object.keys(r).some((n,
|
|
361
|
+
const t = Object.values(r), s = Object.values(e);
|
|
362
|
+
if (t.length !== s.length || t.some((n, a) => n !== s[a])) return !0;
|
|
363
|
+
const o = Object.keys(e);
|
|
364
|
+
return Object.keys(r).some((n, a) => n !== o[a]);
|
|
366
365
|
}
|
|
367
|
-
function
|
|
366
|
+
function $e(e, r) {
|
|
368
367
|
return e.matches[r] = !1, e.mediaQueries[r] = {}, e;
|
|
369
368
|
}
|
|
370
|
-
function
|
|
369
|
+
function q(e) {
|
|
371
370
|
const r = Object.keys(e);
|
|
372
|
-
return typeof window == "undefined" ? r.reduce(
|
|
371
|
+
return typeof window == "undefined" ? r.reduce($e, {
|
|
373
372
|
mediaQueries: {},
|
|
374
373
|
matches: {}
|
|
375
|
-
}) : r.reduce((t,
|
|
376
|
-
const
|
|
377
|
-
return t.mediaQueries[
|
|
374
|
+
}) : r.reduce((t, s) => {
|
|
375
|
+
const o = window.matchMedia(e[s]);
|
|
376
|
+
return t.mediaQueries[s] = o, t.matches[s] = o.matches, t;
|
|
378
377
|
}, {
|
|
379
378
|
mediaQueries: {},
|
|
380
379
|
matches: {}
|
|
381
380
|
});
|
|
382
381
|
}
|
|
383
|
-
function
|
|
384
|
-
function t(
|
|
385
|
-
return o
|
|
382
|
+
function He(e, r) {
|
|
383
|
+
function t(s, o) {
|
|
384
|
+
return s[o] = e.mediaQueries[o].matches, s;
|
|
386
385
|
}
|
|
387
386
|
switch (r.type) {
|
|
388
387
|
case "updateMatches":
|
|
@@ -391,80 +390,82 @@ function $e(e, r) {
|
|
|
391
390
|
mediaQueries: e.mediaQueries
|
|
392
391
|
};
|
|
393
392
|
case "setQueries":
|
|
394
|
-
return
|
|
393
|
+
return q(r.queries);
|
|
395
394
|
}
|
|
396
395
|
}
|
|
397
|
-
function
|
|
398
|
-
const r =
|
|
399
|
-
|
|
400
|
-
|
|
396
|
+
function Ue(e) {
|
|
397
|
+
const r = m.useRef(e), [t, s] = m.useReducer(He, e, q);
|
|
398
|
+
m.useEffect(() => {
|
|
399
|
+
Pe(e, r.current) && (s({
|
|
401
400
|
type: "setQueries",
|
|
402
401
|
queries: e
|
|
403
402
|
}), r.current = e);
|
|
404
403
|
}, [e]);
|
|
405
|
-
function
|
|
406
|
-
return
|
|
404
|
+
function o() {
|
|
405
|
+
return s({
|
|
407
406
|
type: "updateMatches"
|
|
408
407
|
});
|
|
409
408
|
}
|
|
410
|
-
function n(
|
|
411
|
-
const c =
|
|
412
|
-
return typeof
|
|
409
|
+
function n(i) {
|
|
410
|
+
const c = o;
|
|
411
|
+
return typeof i.addListener != "undefined" ? i.addListener(c) : i.addEventListener("change", c), c;
|
|
413
412
|
}
|
|
414
|
-
|
|
415
|
-
const
|
|
416
|
-
function
|
|
417
|
-
typeof
|
|
413
|
+
m.useEffect(() => {
|
|
414
|
+
const i = Object.values(t.mediaQueries), c = i.map(n);
|
|
415
|
+
function h(y, x) {
|
|
416
|
+
typeof y.addListener != "undefined" ? y.removeListener(c[x]) : y.removeEventListener("change", c[x]);
|
|
418
417
|
}
|
|
419
418
|
return () => {
|
|
420
|
-
|
|
419
|
+
i.forEach(h);
|
|
421
420
|
};
|
|
422
421
|
}, [t.mediaQueries]);
|
|
423
422
|
const {
|
|
424
|
-
matches:
|
|
425
|
-
} = t, l =
|
|
423
|
+
matches: a
|
|
424
|
+
} = t, l = m.useMemo(() => Object.values(a), [a]);
|
|
426
425
|
return {
|
|
427
|
-
matches:
|
|
426
|
+
matches: a,
|
|
428
427
|
matchesAny: l.some(Boolean),
|
|
429
428
|
matchesAll: l.length > 0 && l.every(Boolean)
|
|
430
429
|
};
|
|
431
430
|
}
|
|
432
|
-
function Ue(e) {
|
|
433
|
-
return He(We(e)).matchesAll;
|
|
434
|
-
}
|
|
435
|
-
const R = {};
|
|
436
431
|
function We(e) {
|
|
437
|
-
return
|
|
432
|
+
return Ue(ze(e)).matchesAll;
|
|
433
|
+
}
|
|
434
|
+
const L = {};
|
|
435
|
+
function ze(e) {
|
|
436
|
+
return L[e] === void 0 && (L[e] = {
|
|
438
437
|
default: e
|
|
439
|
-
}),
|
|
438
|
+
}), L[e];
|
|
440
439
|
}
|
|
441
440
|
const Ge = {
|
|
442
441
|
lg: "1024px"
|
|
443
|
-
}, Ke = () =>
|
|
442
|
+
}, Ke = () => We(`(min-width: ${Ge.lg})`), Je = () => !Ke(), Xe = v({
|
|
444
443
|
slots: {
|
|
445
444
|
container: "flex w-full flex-col gap-3 lg:flex-row",
|
|
446
|
-
startBlock: "flex items-center",
|
|
445
|
+
startBlock: "flex items-center py-1 lg:py-2.5",
|
|
447
446
|
endBlock: "ml-auto flex w-full flex-col gap-3 lg:w-auto lg:flex-row"
|
|
448
447
|
}
|
|
449
|
-
}),
|
|
448
|
+
}), Ye = u.forwardRef(
|
|
450
449
|
({
|
|
451
450
|
className: e,
|
|
452
451
|
primaryButton: r,
|
|
453
452
|
secondaryButton: t,
|
|
454
|
-
checkboxLabel:
|
|
455
|
-
checkboxProps:
|
|
453
|
+
checkboxLabel: s,
|
|
454
|
+
checkboxProps: o,
|
|
456
455
|
primaryButtonProps: n,
|
|
457
|
-
secondaryButtonProps:
|
|
456
|
+
secondaryButtonProps: a
|
|
458
457
|
}, l) => {
|
|
459
|
-
const
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
458
|
+
const i = Je(), { container: c, startBlock: h, endBlock: y } = Xe();
|
|
459
|
+
i && (n = F(f({}, n), { size: "xl" }), a = F(f({}, a), { size: "xl" }));
|
|
460
|
+
const x = r && /* @__PURE__ */ d(j, F(f({ variant: "primary" }, n), { children: r }), "primary-button"), _ = t && /* @__PURE__ */ d(j, F(f({ variant: "outline" }, a), { children: t }), "secondary-button");
|
|
461
|
+
return /* @__PURE__ */ d(ae, { className: e, ref: l, children: /* @__PURE__ */ N("div", { className: c(), children: [
|
|
462
|
+
s && /* @__PURE__ */ d("div", { className: h(), children: /* @__PURE__ */ d(ue, f({ label: s }, o)) }),
|
|
463
|
+
/* @__PURE__ */ d("div", { className: y(), children: i ? [x, _] : [_, x] })
|
|
463
464
|
] }) });
|
|
464
465
|
}
|
|
465
466
|
);
|
|
466
|
-
|
|
467
|
-
const
|
|
467
|
+
Ye.displayName = "FormFooterTemplate";
|
|
468
|
+
const Ze = v({
|
|
468
469
|
slots: {
|
|
469
470
|
header: "flex items-start gap-4",
|
|
470
471
|
contentWrapper: "flex flex-col",
|
|
@@ -476,69 +477,69 @@ const Ye = v({
|
|
|
476
477
|
header: "flex-row pr-9"
|
|
477
478
|
},
|
|
478
479
|
left: {
|
|
479
|
-
header: "flex-col gap-
|
|
480
|
+
header: "flex-col gap-2 lg:gap-3"
|
|
480
481
|
},
|
|
481
482
|
center: {
|
|
482
|
-
header: "flex-col items-center gap-
|
|
483
|
+
header: "flex-col items-center gap-2 text-center lg:gap-3"
|
|
483
484
|
}
|
|
484
485
|
}
|
|
485
486
|
},
|
|
486
487
|
defaultVariants: {
|
|
487
488
|
alignment: "compact"
|
|
488
489
|
}
|
|
489
|
-
}),
|
|
490
|
-
(l,
|
|
491
|
-
var
|
|
492
|
-
const { header: c, contentWrapper:
|
|
493
|
-
return /* @__PURE__ */ N(
|
|
494
|
-
/* @__PURE__ */
|
|
495
|
-
/* @__PURE__ */ N("div", { className:
|
|
490
|
+
}), qe = u.forwardRef(
|
|
491
|
+
(l, a) => {
|
|
492
|
+
var i = l, { className: e, icon: r, title: t, alignment: s, description: o } = i, n = b(i, ["className", "icon", "title", "alignment", "description"]);
|
|
493
|
+
const { header: c, contentWrapper: h, icon: y } = Ze({ alignment: s });
|
|
494
|
+
return /* @__PURE__ */ N(ce, F(f({ ref: a, className: c({ class: e }) }, n), { children: [
|
|
495
|
+
/* @__PURE__ */ d(fe, { size: "lg", type: "primary", icon: r, className: y() }),
|
|
496
|
+
/* @__PURE__ */ N("div", { className: h(), children: [
|
|
496
497
|
t,
|
|
497
|
-
|
|
498
|
+
o
|
|
498
499
|
] })
|
|
499
500
|
] }));
|
|
500
501
|
}
|
|
501
|
-
),
|
|
502
|
-
(
|
|
503
|
-
var n =
|
|
504
|
-
return /* @__PURE__ */
|
|
505
|
-
|
|
502
|
+
), et = u.forwardRef(
|
|
503
|
+
(o, s) => {
|
|
504
|
+
var n = o, { title: e, description: r } = n, t = b(n, ["title", "description"]);
|
|
505
|
+
return /* @__PURE__ */ d(
|
|
506
|
+
qe,
|
|
506
507
|
f({
|
|
507
|
-
title: /* @__PURE__ */
|
|
508
|
-
description: /* @__PURE__ */
|
|
509
|
-
ref:
|
|
508
|
+
title: /* @__PURE__ */ d(le, { children: e }),
|
|
509
|
+
description: /* @__PURE__ */ d(ie, { children: r }),
|
|
510
|
+
ref: s
|
|
510
511
|
}, t)
|
|
511
512
|
);
|
|
512
513
|
}
|
|
513
514
|
);
|
|
514
|
-
|
|
515
|
-
const
|
|
515
|
+
et.displayName = "FormHeaderTemplate";
|
|
516
|
+
const tt = v({
|
|
516
517
|
base: "space-y-5 lg:space-y-4"
|
|
517
|
-
}),
|
|
518
|
-
(
|
|
519
|
-
var n =
|
|
520
|
-
return /* @__PURE__ */
|
|
518
|
+
}), rt = u.forwardRef(
|
|
519
|
+
(o, s) => {
|
|
520
|
+
var n = o, { className: e, children: r } = n, t = b(n, ["className", "children"]);
|
|
521
|
+
return /* @__PURE__ */ d("div", F(f({ ref: s, className: tt({ className: e }) }, t), { children: r }));
|
|
521
522
|
}
|
|
522
523
|
);
|
|
523
|
-
|
|
524
|
+
rt.displayName = "FormStack";
|
|
524
525
|
export {
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
526
|
+
yt as Form,
|
|
527
|
+
xt as FormBody,
|
|
528
|
+
Z as FormControl,
|
|
529
|
+
ie as FormDescription,
|
|
530
|
+
gt as FormField,
|
|
531
|
+
Oe as FormFieldControl,
|
|
532
|
+
ae as FormFooter,
|
|
533
|
+
Ye as FormFooterTemplate,
|
|
534
|
+
ce as FormHeader,
|
|
535
|
+
et as FormHeaderTemplate,
|
|
536
|
+
Y as FormItem,
|
|
536
537
|
Re as FormLabel,
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
538
|
+
Te as FormMessage,
|
|
539
|
+
Qe as FormSection,
|
|
540
|
+
ht as FormSectionTitle,
|
|
541
|
+
rt as FormStack,
|
|
542
|
+
le as FormTitle,
|
|
543
|
+
M as useFormField
|
|
543
544
|
};
|
|
544
545
|
//# sourceMappingURL=form.js.map
|