@slotted/react 0.1.0-beta.23 → 0.1.0-beta.25
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/{action-bar-D-V2uWjA.js → action-bar-DckD0Sug.js} +1 -1
- package/dist/action-bar.js +1 -1
- package/dist/{cascader-DO1HiJT6.js → cascader-47GYpojH.js} +1 -1
- package/dist/cascader.js +1 -1
- package/dist/{checkbox-Hq1PXk04.js → checkbox-Dw9R1CGR.js} +3 -3
- package/dist/{checkbox-group-Ckoh-2GJ.js → checkbox-group-DDlz-UF4.js} +2 -2
- package/dist/checkbox-group.js +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/{color-picker-BsDplfdK.js → color-picker-BbyW5ALf.js} +3 -3
- package/dist/color-picker.js +1 -1
- package/dist/{column-manager-Dm5ZLz6p.js → column-manager-Bz0bb4mq.js} +3 -3
- package/dist/column-manager.js +1 -1
- package/dist/{combobox-vE8dmv4K.js → combobox-BA2nvbnA.js} +1 -1
- package/dist/combobox.js +1 -1
- package/dist/{context-menu-BxbGq4bu.js → context-menu-CfEEqDKr.js} +1 -1
- package/dist/context-menu.js +1 -1
- package/dist/{currency-field-ZvfrfM0z.js → currency-field-CTzBMH8g.js} +1 -1
- package/dist/currency-field.js +1 -1
- package/dist/{dashboard-grid-Bx4J-aC7.js → dashboard-grid-WinSY-q3.js} +1 -1
- package/dist/dashboard-grid.js +1 -1
- package/dist/{data-grid-Dez5RojO.js → data-grid-Dh-oaGY7.js} +16 -16
- package/dist/data-grid.js +1 -1
- package/dist/{data-list-B18kLC9Q.js → data-list-iw9K_oiz.js} +2 -2
- package/dist/data-list.js +1 -1
- package/dist/{date-field-EBPrQL6A.js → date-field-B2WG_m4C.js} +1 -1
- package/dist/date-field.js +1 -1
- package/dist/{date-picker-B5V8NZCT.js → date-picker-B2wqU3Mw.js} +2 -2
- package/dist/date-picker.js +1 -1
- package/dist/{date-range-picker-B89Q973N.js → date-range-picker-BhQwOKkE.js} +2 -2
- package/dist/date-range-picker.js +1 -1
- package/dist/{datetime-field-DavJbR0H.js → datetime-field-CvKPkvaE.js} +1 -1
- package/dist/datetime-field.js +1 -1
- package/dist/{datetime-picker-Cx6Z52Ka.js → datetime-picker-C-PwlBW5.js} +2 -2
- package/dist/datetime-picker.js +1 -1
- package/dist/{datetime-range-picker-DYshAlgq.js → datetime-range-picker-0xs12Cf1.js} +2 -2
- package/dist/datetime-range-picker.js +1 -1
- package/dist/docs/data-grid.json +1 -1
- package/dist/docs/data-grid.md +1 -1
- package/dist/docs/datetime-picker.json +0 -1
- package/dist/docs/datetime-picker.md +1 -1
- package/dist/docs/field.json +16 -1
- package/dist/docs/field.md +3 -1
- package/dist/docs/form.json +14 -3
- package/dist/docs/form.md +3 -2
- package/dist/docs/guidelines/forms.md +89 -1
- package/dist/docs/guidelines/index.md +7 -0
- package/dist/docs/listbox.json +0 -1
- package/dist/docs/listbox.md +1 -1
- package/dist/docs/menu.json +2 -3
- package/dist/docs/menu.md +2 -2
- package/dist/docs/table.json +1 -0
- package/dist/docs/table.md +1 -1
- package/dist/docs/time-picker.json +0 -1
- package/dist/docs/time-picker.md +1 -1
- package/dist/{entity-picker-DB1HeuvJ.js → entity-picker-BFoKN50H.js} +2 -2
- package/dist/entity-picker.js +1 -1
- package/dist/{event-calendar-CEIyV-fW.js → event-calendar-BaPllnNk.js} +3 -3
- package/dist/event-calendar.js +1 -1
- package/dist/{field-CnSMUZw6.js → field-CSSHwGq_.js} +106 -105
- package/dist/{field-group-RACkEXPp.js → field-group-DeBTueJW.js} +1 -1
- package/dist/field-group.js +1 -1
- package/dist/field.js +1 -1
- package/dist/{filter-bar-CzuAJsSf.js → filter-bar-CPBr_n2c.js} +9 -9
- package/dist/filter-bar.js +1 -1
- package/dist/{form-DEcJ7tHf.js → form-Im9lGi45.js} +13 -3
- package/dist/form.js +2 -2
- package/dist/{import-export-center-tbHmRTGb.js → import-export-center-CzyIlQB_.js} +1 -1
- package/dist/import-export-center.js +1 -1
- package/dist/index.js +82 -82
- package/dist/{listbox-DvwUa0yH.js → listbox-B9cBuitS.js} +1 -1
- package/dist/listbox.js +1 -1
- package/dist/{markdown-Bw6L0Ifo.js → markdown-DX-mBYVT.js} +1 -1
- package/dist/markdown.js +1 -1
- package/dist/menu-parts-7F8syoFE.js +815 -0
- package/dist/menu.js +1 -1
- package/dist/{menubar-hazvXRYd.js → menubar-DzVGFn_I.js} +1 -1
- package/dist/menubar.js +1 -1
- package/dist/{multi-select-C1GNk4e0.js → multi-select-DnOAXeuF.js} +1 -1
- package/dist/multi-select.js +1 -1
- package/dist/{number-field-BPYe9kLB.js → number-field-C20-8yda.js} +1 -1
- package/dist/number-field.js +1 -1
- package/dist/{otp-input-CYtF30Q-.js → otp-input-YI-Emc5k.js} +1 -1
- package/dist/otp-input.js +1 -1
- package/dist/{prompt-composer-C57BzYrn.js → prompt-composer-DsnPcKa4.js} +1 -1
- package/dist/prompt-composer.js +1 -1
- package/dist/{radio-group-CLX8D2Ew.js → radio-group-DA8_LbEz.js} +2 -2
- package/dist/radio-group.js +1 -1
- package/dist/{rating-BB2k-Fay.js → rating-DSSqi85N.js} +1 -1
- package/dist/rating.js +1 -1
- package/dist/{saved-views-B54F_Bk4.js → saved-views-CsVRZTwK.js} +3 -3
- package/dist/saved-views.js +1 -1
- package/dist/{segmented-control-B1U-s58C.js → segmented-control-Dae5wU9X.js} +2 -2
- package/dist/segmented-control.js +1 -1
- package/dist/{select-OUGNxyS5.js → select-BTncjDuM.js} +38 -38
- package/dist/select.js +1 -1
- package/dist/{slider-Bp1QjJKu.js → slider-DNRphJot.js} +1 -1
- package/dist/slider.js +1 -1
- package/dist/{split-button-Dg67gBMP.js → split-button-DA1wcDJB.js} +1 -1
- package/dist/split-button.js +1 -1
- package/dist/styles/action-bar.css +1 -1
- package/dist/styles/cascader.css +1 -1
- package/dist/styles/checkbox-group.css +1 -1
- package/dist/styles/checkbox.css +1 -1
- package/dist/styles/color-picker.css +2 -2
- package/dist/styles/column-manager.css +2 -2
- package/dist/styles/combobox.css +2 -2
- package/dist/styles/command-palette.css +1 -1
- package/dist/styles/context-menu.css +1 -1
- package/dist/styles/currency-field.css +1 -1
- package/dist/styles/dashboard-grid.css +1 -1
- package/dist/styles/data-grid.css +7 -7
- package/dist/styles/data-list.css +2 -2
- package/dist/styles/date-field.css +1 -1
- package/dist/styles/date-picker.css +1 -1
- package/dist/styles/date-range-picker.css +1 -1
- package/dist/styles/datetime-field.css +1 -1
- package/dist/styles/datetime-picker.css +2 -2
- package/dist/styles/datetime-range-picker.css +1 -1
- package/dist/styles/entity-picker.css +2 -2
- package/dist/styles/event-calendar.css +2 -2
- package/dist/styles/field-group.css +1 -1
- package/dist/styles/field.css +1 -1
- package/dist/styles/filter-bar.css +6 -6
- package/dist/styles/form.css +1 -1
- package/dist/styles/import-export-center.css +5 -5
- package/dist/styles/index.css +12 -12
- package/dist/styles/listbox.css +2 -2
- package/dist/styles/markdown.css +1 -1
- package/dist/styles/menu.css +1 -1
- package/dist/styles/menubar.css +1 -1
- package/dist/styles/multi-select.css +2 -2
- package/dist/styles/number-field.css +1 -1
- package/dist/styles/otp-input.css +1 -1
- package/dist/styles/prompt-composer.css +1 -1
- package/dist/styles/radio-group.css +1 -1
- package/dist/styles/rating.css +1 -1
- package/dist/styles/saved-views.css +2 -2
- package/dist/styles/segmented-control.css +1 -1
- package/dist/styles/select.css +2 -2
- package/dist/styles/slider.css +1 -1
- package/dist/styles/split-button.css +1 -1
- package/dist/styles/switch.css +1 -1
- package/dist/styles/table.css +5 -5
- package/dist/styles/tags-input.css +1 -1
- package/dist/styles/text-field.css +1 -1
- package/dist/styles/textarea.css +1 -1
- package/dist/styles/time-field.css +1 -1
- package/dist/styles/time-picker.css +2 -2
- package/dist/styles/time-range-picker.css +1 -1
- package/dist/styles/toggle-group.css +1 -1
- package/dist/styles/toolbar.css +1 -1
- package/dist/styles/transfer.css +2 -2
- package/dist/styles/upload.css +1 -1
- package/dist/styles/wizard.css +2 -2
- package/dist/styles.css +1 -1
- package/dist/{switch-DmLzDbTb.js → switch-gR_OvGG8.js} +1 -1
- package/dist/switch.js +1 -1
- package/dist/{table-Cz9YpgLT.js → table-Boy-0cjy.js} +12 -12
- package/dist/table.js +1 -1
- package/dist/{tags-input-CAmXKSeZ.js → tags-input-DEhtpizX.js} +1 -1
- package/dist/tags-input.js +1 -1
- package/dist/{text-field-CHYoral_.js → text-field-RGXN7zNu.js} +1 -1
- package/dist/text-field.js +1 -1
- package/dist/{textarea-47JGOZKv.js → textarea-AhpUmnMk.js} +1 -1
- package/dist/textarea.js +1 -1
- package/dist/{time-field-D1-rNBsB.js → time-field-xkxX8JF6.js} +1 -1
- package/dist/time-field.js +1 -1
- package/dist/{time-picker-mwCULYh7.js → time-picker-Da_UhP9X.js} +2 -2
- package/dist/time-picker.js +1 -1
- package/dist/{time-range-picker-BKgsEHmd.js → time-range-picker-CfVzD53N.js} +2 -2
- package/dist/time-range-picker.js +1 -1
- package/dist/{toggle-group-Bnig_MWl.js → toggle-group-DoxPLYJ3.js} +1 -1
- package/dist/toggle-group.js +1 -1
- package/dist/{toolbar-EdmEn_ph.js → toolbar-CtSZ88HI.js} +1 -1
- package/dist/toolbar.js +1 -1
- package/dist/{transfer-CEHIa2XD.js → transfer-BMRyopEw.js} +5 -5
- package/dist/transfer.js +1 -1
- package/dist/types/field/field.d.ts +1 -1
- package/dist/types/field/field.d.ts.map +1 -1
- package/dist/types/field/field.types.d.ts +10 -0
- package/dist/types/field/field.types.d.ts.map +1 -1
- package/dist/types/field/index.d.ts +1 -1
- package/dist/types/field/index.d.ts.map +1 -1
- package/dist/types/form/form-parts.d.ts +7 -1
- package/dist/types/form/form-parts.d.ts.map +1 -1
- package/dist/types/form/form.types.d.ts +3 -0
- package/dist/types/form/form.types.d.ts.map +1 -1
- package/dist/types/form/index.d.ts +2 -2
- package/dist/types/form/index.d.ts.map +1 -1
- package/dist/types/menu/menu-items.d.ts.map +1 -1
- package/dist/{upload-S3d3tUt-.js → upload-BqVBpYaZ.js} +1 -1
- package/dist/upload.js +1 -1
- package/dist/{wizard-gZyH8HIo.js → wizard-CpYwQGQ-.js} +1 -1
- package/dist/wizard.js +1 -1
- package/package.json +6 -6
- package/dist/menu-parts-BDdCTmko.js +0 -805
|
@@ -4,15 +4,15 @@ import { n as t, t as n } from "./icon-D04-_QFA.js";
|
|
|
4
4
|
import { t as r } from "./inline-message-DgEAUjar.js";
|
|
5
5
|
import { a as i, i as a, n as o, o as s, r as c, t as l } from "./tooltip-DrFiRlH8.js";
|
|
6
6
|
import { keyedProps as u, withSelectorKey as d } from "@slotted/core/selector-key";
|
|
7
|
-
import { Children as f, createContext as p, isValidElement as m, useCallback as h, useContext as g, useEffect as _, useId as v, useMemo as y, useRef as
|
|
8
|
-
import { Fragment as
|
|
9
|
-
import { fieldMessages as
|
|
7
|
+
import { Children as f, createContext as p, isValidElement as m, useCallback as h, useContext as g, useEffect as _, useId as v, useMemo as y, useRef as ee, useState as b } from "react";
|
|
8
|
+
import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
9
|
+
import { fieldMessages as w } from "@slotted/core/i18n";
|
|
10
10
|
//#region src/field/field-context.ts
|
|
11
|
-
var
|
|
12
|
-
function
|
|
13
|
-
return g(
|
|
11
|
+
var T = p(void 0);
|
|
12
|
+
function E() {
|
|
13
|
+
return g(T);
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function te(e) {
|
|
16
16
|
return {
|
|
17
17
|
control: `${e}-control`,
|
|
18
18
|
counter: `${e}-counter`,
|
|
@@ -23,14 +23,14 @@ function ee(e) {
|
|
|
23
23
|
label: `${e}-label`
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
|
-
var
|
|
26
|
+
var ne = [
|
|
27
27
|
"indicator",
|
|
28
28
|
"help",
|
|
29
29
|
"description",
|
|
30
30
|
"counter",
|
|
31
31
|
"error"
|
|
32
32
|
];
|
|
33
|
-
function
|
|
33
|
+
function D(e, t, n) {
|
|
34
34
|
switch (e) {
|
|
35
35
|
case "mark": return t ? {
|
|
36
36
|
hidden: !0,
|
|
@@ -47,33 +47,33 @@ function k(e, t, n) {
|
|
|
47
47
|
case "none": return null;
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function O(e) {
|
|
51
51
|
return e.max === void 0 ? String(e.length) : `${e.length}/${e.max}`;
|
|
52
52
|
}
|
|
53
|
-
function
|
|
53
|
+
function k(e) {
|
|
54
54
|
return e.max !== void 0 && e.length > e.max;
|
|
55
55
|
}
|
|
56
|
-
var
|
|
57
|
-
function
|
|
58
|
-
|
|
56
|
+
var A = (e) => e != null && e !== !1 && e !== "", j = /* @__PURE__ */ new WeakMap();
|
|
57
|
+
function M(e, t) {
|
|
58
|
+
j.set(e, t);
|
|
59
59
|
}
|
|
60
|
-
function
|
|
61
|
-
return typeof e == "function" ?
|
|
60
|
+
function N(e) {
|
|
61
|
+
return typeof e == "function" ? j.get(e) : void 0;
|
|
62
62
|
}
|
|
63
63
|
//#endregion
|
|
64
64
|
//#region src/field/field-defaults.tsx
|
|
65
|
-
var
|
|
65
|
+
var P = p({
|
|
66
66
|
disabled: void 0,
|
|
67
67
|
labelPlacement: "top",
|
|
68
68
|
necessity: "mark",
|
|
69
69
|
readOnly: void 0,
|
|
70
70
|
size: "md"
|
|
71
71
|
});
|
|
72
|
-
function
|
|
73
|
-
return g(
|
|
72
|
+
function F() {
|
|
73
|
+
return g(P);
|
|
74
74
|
}
|
|
75
|
-
function
|
|
76
|
-
let o =
|
|
75
|
+
function I({ children: e, disabled: t, labelPlacement: n, necessity: r, readOnly: i, size: a }) {
|
|
76
|
+
let o = F(), s = y(() => ({
|
|
77
77
|
disabled: t ?? o.disabled,
|
|
78
78
|
labelPlacement: n ?? o.labelPlacement,
|
|
79
79
|
necessity: r ?? o.necessity,
|
|
@@ -87,20 +87,20 @@ function R({ children: e, disabled: t, labelPlacement: n, necessity: r, readOnly
|
|
|
87
87
|
i,
|
|
88
88
|
a
|
|
89
89
|
]);
|
|
90
|
-
return /* @__PURE__ */
|
|
90
|
+
return /* @__PURE__ */ S(P.Provider, {
|
|
91
91
|
value: s,
|
|
92
92
|
children: e
|
|
93
93
|
});
|
|
94
94
|
}
|
|
95
95
|
//#endregion
|
|
96
96
|
//#region src/field/field-parts.tsx
|
|
97
|
-
function
|
|
97
|
+
function L(e, t) {
|
|
98
98
|
return (n) => {
|
|
99
99
|
e?.(n), n.defaultPrevented || t(n);
|
|
100
100
|
};
|
|
101
101
|
}
|
|
102
|
-
function
|
|
103
|
-
let n =
|
|
102
|
+
function R(e, t) {
|
|
103
|
+
let n = E()?.registerMessage;
|
|
104
104
|
_(() => {
|
|
105
105
|
if (n !== void 0) return n(e, t), () => n(e, !1);
|
|
106
106
|
}, [
|
|
@@ -109,10 +109,10 @@ function B(e, t) {
|
|
|
109
109
|
e
|
|
110
110
|
]);
|
|
111
111
|
}
|
|
112
|
-
function
|
|
113
|
-
let s =
|
|
112
|
+
function z({ children: t, htmlFor: n, id: r, ref: i, render: a, ...o }) {
|
|
113
|
+
let s = E(), c = e(w), l = D(s?.necessity ?? "mark", s?.required === !0, s?.t ?? c), f = u({
|
|
114
114
|
...o,
|
|
115
|
-
children: /* @__PURE__ */
|
|
115
|
+
children: /* @__PURE__ */ C(x, { children: [t, l === null ? null : /* @__PURE__ */ S("span", {
|
|
116
116
|
...d(l.hidden ? { "aria-hidden": !0 } : {}, "part", "mark"),
|
|
117
117
|
children: l.text
|
|
118
118
|
})] }),
|
|
@@ -120,13 +120,13 @@ function te({ children: t, htmlFor: n, id: r, ref: i, render: a, ...o }) {
|
|
|
120
120
|
htmlFor: n ?? s?.ids.control,
|
|
121
121
|
id: r ?? s?.ids.label
|
|
122
122
|
});
|
|
123
|
-
return a === void 0 ? /* @__PURE__ */
|
|
123
|
+
return a === void 0 ? /* @__PURE__ */ S("label", {
|
|
124
124
|
...f,
|
|
125
125
|
ref: i
|
|
126
126
|
}) : a(f);
|
|
127
127
|
}
|
|
128
|
-
function
|
|
129
|
-
let l =
|
|
128
|
+
function B({ "aria-describedby": e, "aria-invalid": t, "aria-required": n, disabled: r, id: i, readOnly: a, ref: o, render: s, ...c }) {
|
|
129
|
+
let l = E(), d = l?.registerControl;
|
|
130
130
|
_(() => d?.(), [d]);
|
|
131
131
|
let f = [e, l?.describedBy].filter(Boolean).join(" ") || void 0, p = u({
|
|
132
132
|
...c,
|
|
@@ -138,14 +138,14 @@ function ne({ "aria-describedby": e, "aria-invalid": t, "aria-required": n, disa
|
|
|
138
138
|
id: i ?? l?.ids.control,
|
|
139
139
|
readOnly: a ?? l?.readOnly
|
|
140
140
|
});
|
|
141
|
-
return s === void 0 ? /* @__PURE__ */
|
|
141
|
+
return s === void 0 ? /* @__PURE__ */ S("input", {
|
|
142
142
|
...p,
|
|
143
143
|
ref: o
|
|
144
144
|
}) : s(p);
|
|
145
145
|
}
|
|
146
146
|
function V({ children: e, mark: t, tone: n, ...i }) {
|
|
147
|
-
let a =
|
|
148
|
-
return
|
|
147
|
+
let a = E();
|
|
148
|
+
return R("description", A(e)), /* @__PURE__ */ S(r, {
|
|
149
149
|
...i,
|
|
150
150
|
disabled: a?.disabled,
|
|
151
151
|
id: a?.ids.description,
|
|
@@ -156,8 +156,8 @@ function V({ children: e, mark: t, tone: n, ...i }) {
|
|
|
156
156
|
});
|
|
157
157
|
}
|
|
158
158
|
function H({ children: e, mark: t, tone: n, ...i }) {
|
|
159
|
-
let a =
|
|
160
|
-
return
|
|
159
|
+
let a = E();
|
|
160
|
+
return R("error", A(e)), /* @__PURE__ */ S(r, {
|
|
161
161
|
...i,
|
|
162
162
|
disabled: a?.disabled,
|
|
163
163
|
id: a?.ids.error,
|
|
@@ -168,53 +168,53 @@ function H({ children: e, mark: t, tone: n, ...i }) {
|
|
|
168
168
|
});
|
|
169
169
|
}
|
|
170
170
|
function U({ children: e, invalid: t, ref: n, render: r, ...i }) {
|
|
171
|
-
let a =
|
|
171
|
+
let a = E(), o = a?.registerCounter, s = a?.count;
|
|
172
172
|
_(() => {
|
|
173
173
|
if (o !== void 0) return o(!0), () => o(!1);
|
|
174
174
|
}, [o]);
|
|
175
|
-
let c = e === void 0 && s !== void 0, l = t ?? (c && s !== void 0 ?
|
|
175
|
+
let c = e === void 0 && s !== void 0, l = t ?? (c && s !== void 0 ? k(s) : !1), d = u({
|
|
176
176
|
...i,
|
|
177
|
-
children: c && s !== void 0 ?
|
|
177
|
+
children: c && s !== void 0 ? O(s) : e,
|
|
178
178
|
...l ? { "data-invalid": "" } : {},
|
|
179
179
|
"data-part": "counter",
|
|
180
180
|
id: i.id ?? a?.ids.counter
|
|
181
181
|
});
|
|
182
|
-
return r === void 0 ? /* @__PURE__ */
|
|
182
|
+
return r === void 0 ? /* @__PURE__ */ S("span", {
|
|
183
183
|
...d,
|
|
184
184
|
ref: n
|
|
185
185
|
}) : r(d);
|
|
186
186
|
}
|
|
187
187
|
function W({ children: e, ref: t, render: n, ...r }) {
|
|
188
|
-
let i =
|
|
188
|
+
let i = E(), a = i?.registerHeader;
|
|
189
189
|
_(() => {
|
|
190
190
|
if (a !== void 0) return a(!0), () => a(!1);
|
|
191
191
|
}, [a]);
|
|
192
|
-
let o = i?.count, s = o === void 0 || i?.hasCounter === !0 ? null : /* @__PURE__ */
|
|
193
|
-
...
|
|
192
|
+
let o = i?.count, s = o === void 0 || i?.hasCounter === !0 ? null : /* @__PURE__ */ S("span", {
|
|
193
|
+
...k(o) ? { "data-invalid": "" } : {},
|
|
194
194
|
"data-part": "counter",
|
|
195
195
|
"data-part-counter": "",
|
|
196
196
|
id: i?.ids.counter,
|
|
197
|
-
children:
|
|
197
|
+
children: O(o)
|
|
198
198
|
}), c = u({
|
|
199
199
|
...r,
|
|
200
|
-
children: /* @__PURE__ */
|
|
200
|
+
children: /* @__PURE__ */ C(x, { children: [e, s] }),
|
|
201
201
|
"data-part": "header"
|
|
202
202
|
});
|
|
203
|
-
return n === void 0 ? /* @__PURE__ */
|
|
203
|
+
return n === void 0 ? /* @__PURE__ */ S("div", {
|
|
204
204
|
...c,
|
|
205
205
|
ref: t
|
|
206
206
|
}) : n(c);
|
|
207
207
|
}
|
|
208
208
|
function G({ children: e, id: t, ref: n, render: r, ...i }) {
|
|
209
|
-
let a =
|
|
210
|
-
|
|
209
|
+
let a = E();
|
|
210
|
+
R("indicator", A(e));
|
|
211
211
|
let o = u({
|
|
212
212
|
...i,
|
|
213
213
|
children: e,
|
|
214
214
|
"data-part": "indicator",
|
|
215
215
|
id: t ?? a?.ids.indicator
|
|
216
216
|
});
|
|
217
|
-
return r === void 0 ? /* @__PURE__ */
|
|
217
|
+
return r === void 0 ? /* @__PURE__ */ S("span", {
|
|
218
218
|
...o,
|
|
219
219
|
ref: n
|
|
220
220
|
}) : r(o);
|
|
@@ -224,15 +224,15 @@ function K({ ref: e, render: t, type: n, ...r }) {
|
|
|
224
224
|
...r,
|
|
225
225
|
"data-part": "action"
|
|
226
226
|
});
|
|
227
|
-
return t === void 0 ? /* @__PURE__ */
|
|
227
|
+
return t === void 0 ? /* @__PURE__ */ S("button", {
|
|
228
228
|
...i,
|
|
229
229
|
ref: e,
|
|
230
230
|
type: n ?? "button"
|
|
231
231
|
}) : t(i);
|
|
232
232
|
}
|
|
233
233
|
function q({ children: t, defaultOpen: n, onOpenChange: r, open: a, side: s, ...u }) {
|
|
234
|
-
let d =
|
|
235
|
-
return
|
|
234
|
+
let d = E(), f = e(w), p = v(), m = d?.ids.help ?? `slotted-field-help-${p}`;
|
|
235
|
+
return R("help", A(t)), /* @__PURE__ */ S(x, { children: /* @__PURE__ */ C(i, {
|
|
236
236
|
closeOnPress: !1,
|
|
237
237
|
defaultOpen: n,
|
|
238
238
|
describes: "none",
|
|
@@ -240,22 +240,22 @@ function q({ children: t, defaultOpen: n, onOpenChange: r, open: a, side: s, ...
|
|
|
240
240
|
open: a,
|
|
241
241
|
openOn: "manual",
|
|
242
242
|
side: s,
|
|
243
|
-
children: [/* @__PURE__ */
|
|
243
|
+
children: [/* @__PURE__ */ S(J, {
|
|
244
244
|
...u,
|
|
245
245
|
"aria-describedby": u["aria-describedby"] ?? m,
|
|
246
246
|
"aria-label": u["aria-label"] ?? (d?.t ?? f)("help"),
|
|
247
|
-
children: /* @__PURE__ */
|
|
247
|
+
children: /* @__PURE__ */ S("span", {
|
|
248
248
|
"data-part": "help-text",
|
|
249
249
|
"data-part-help-text": "",
|
|
250
250
|
hidden: !0,
|
|
251
251
|
id: m,
|
|
252
252
|
children: t
|
|
253
253
|
})
|
|
254
|
-
}), /* @__PURE__ */
|
|
254
|
+
}), /* @__PURE__ */ C(c, { children: [/* @__PURE__ */ S(o, { children: t }), /* @__PURE__ */ S(l, {})] })]
|
|
255
255
|
}) });
|
|
256
256
|
}
|
|
257
257
|
function J({ children: e, onBlur: r, onClick: i, onFocus: o, onPointerEnter: c, onPointerLeave: l, ref: u, ...f }) {
|
|
258
|
-
let p = s(), m =
|
|
258
|
+
let p = s(), m = ee(!1);
|
|
259
259
|
_(() => {
|
|
260
260
|
p.open || (m.current = !1);
|
|
261
261
|
}, [p.open]);
|
|
@@ -267,7 +267,7 @@ function J({ children: e, onBlur: r, onClick: i, onFocus: o, onPointerEnter: c,
|
|
|
267
267
|
e.target.matches(":focus-visible") && p.toggle(!0, "keyboard", e.nativeEvent);
|
|
268
268
|
}, y = (e) => {
|
|
269
269
|
p.toggle(!1, "blur", e.nativeEvent);
|
|
270
|
-
},
|
|
270
|
+
}, b = (e) => {
|
|
271
271
|
let t = e.detail === 0 ? "keyboard" : "pointer";
|
|
272
272
|
if (p.open && m.current) {
|
|
273
273
|
m.current = !1, p.toggle(!1, t, e.nativeEvent);
|
|
@@ -275,15 +275,15 @@ function J({ children: e, onBlur: r, onClick: i, onFocus: o, onPointerEnter: c,
|
|
|
275
275
|
}
|
|
276
276
|
m.current = !0, p.toggle(!0, t, e.nativeEvent);
|
|
277
277
|
};
|
|
278
|
-
return /* @__PURE__ */
|
|
278
|
+
return /* @__PURE__ */ C(a, {
|
|
279
279
|
...d(f, "part", "help"),
|
|
280
|
-
onBlur:
|
|
281
|
-
onClick:
|
|
282
|
-
onFocus:
|
|
283
|
-
onPointerEnter:
|
|
284
|
-
onPointerLeave:
|
|
280
|
+
onBlur: L(r, y),
|
|
281
|
+
onClick: L(i, b),
|
|
282
|
+
onFocus: L(o, v),
|
|
283
|
+
onPointerEnter: L(c, h),
|
|
284
|
+
onPointerLeave: L(l, g),
|
|
285
285
|
ref: u,
|
|
286
|
-
children: [/* @__PURE__ */
|
|
286
|
+
children: [/* @__PURE__ */ S(n, { children: /* @__PURE__ */ S(t, { name: "circle-question" }) }), e]
|
|
287
287
|
});
|
|
288
288
|
}
|
|
289
289
|
//#endregion
|
|
@@ -301,67 +301,68 @@ function X(e, t) {
|
|
|
301
301
|
}
|
|
302
302
|
if (!m(e) || e.type === Z) return t;
|
|
303
303
|
let { props: n, type: r } = e, i = Y.get(r);
|
|
304
|
-
return i !== void 0 &&
|
|
304
|
+
return i !== void 0 && A(n.children) && t.messages.push(i), r === U && (t.hasCounter = !0), r === W && (t.hasHeader = !0), t.count ??= N(r)?.(n), X(n.children, t);
|
|
305
305
|
}
|
|
306
|
-
function Z({ children: t, disabled: n, id: r, invalid: i, labelPlacement: a, messages: o, necessity: s, readOnly: c, ref: l, render: d, required: p, size: g, ...D }) {
|
|
307
|
-
let
|
|
308
|
-
_(() =>
|
|
309
|
-
let
|
|
306
|
+
function Z({ children: t, disabled: n, id: r, invalid: i, labelPlacement: a, messages: o, necessity: s, readOnly: c, ref: l, render: d, required: p, size: g, width: E = "full", ...D }) {
|
|
307
|
+
let A = F(), j = e(w, o), M = v(), N = y(() => te(r ?? `slotted-field-${M}`), [M, r]), [P, I] = b([]), [L, R] = b(void 0), [B, V] = b(!1), [H, U] = b(!1), [W, G] = b(!1), K = ee(!1);
|
|
308
|
+
_(() => G(!0), []);
|
|
309
|
+
let q = W ? void 0 : X(t, {
|
|
310
310
|
count: void 0,
|
|
311
311
|
hasCounter: !1,
|
|
312
312
|
hasHeader: !1,
|
|
313
313
|
messages: []
|
|
314
|
-
}),
|
|
314
|
+
}), J = q?.messages ?? P, Y = q === void 0 ? L : q.count, Z = q?.hasCounter ?? B, re = q?.hasHeader ?? H, ie = h((e, t) => {
|
|
315
315
|
I((n) => t === n.includes(e) ? n : t ? [...n, e] : n.filter((t) => t !== e));
|
|
316
|
-
}, []),
|
|
317
|
-
|
|
318
|
-
}, []),
|
|
316
|
+
}, []), ae = h(() => {
|
|
317
|
+
K.current = !0;
|
|
318
|
+
}, []), oe = h((e) => V(e), []), se = h((e) => U(e), []);
|
|
319
319
|
_(() => {}, []);
|
|
320
|
-
let
|
|
321
|
-
count:
|
|
322
|
-
describedBy:
|
|
323
|
-
disabled:
|
|
324
|
-
hasCounter:
|
|
325
|
-
hasHeader:
|
|
326
|
-
ids:
|
|
320
|
+
let ce = Z || Y !== void 0, le = ne.filter((e) => e === "counter" ? ce : J.includes(e)).map((e) => N[e]).join(" ") || void 0, Q = g ?? A.size, ue = n ?? A.disabled, de = c ?? A.readOnly, fe = s ?? A.necessity, pe = {
|
|
321
|
+
count: Y,
|
|
322
|
+
describedBy: le,
|
|
323
|
+
disabled: ue,
|
|
324
|
+
hasCounter: Z,
|
|
325
|
+
hasHeader: re,
|
|
326
|
+
ids: N,
|
|
327
327
|
invalid: i,
|
|
328
328
|
messageSize: Q === "lg" ? "md" : "sm",
|
|
329
|
-
necessity:
|
|
330
|
-
readOnly:
|
|
331
|
-
registerControl:
|
|
332
|
-
registerCounter:
|
|
333
|
-
registerHeader:
|
|
334
|
-
registerMessage:
|
|
329
|
+
necessity: fe,
|
|
330
|
+
readOnly: de,
|
|
331
|
+
registerControl: ae,
|
|
332
|
+
registerCounter: oe,
|
|
333
|
+
registerHeader: se,
|
|
334
|
+
registerMessage: ie,
|
|
335
335
|
required: p,
|
|
336
|
-
setCount:
|
|
336
|
+
setCount: R,
|
|
337
337
|
size: Q,
|
|
338
|
-
t:
|
|
339
|
-
},
|
|
340
|
-
...
|
|
338
|
+
t: j
|
|
339
|
+
}, me = Y === void 0 || Z || re ? null : /* @__PURE__ */ S("span", {
|
|
340
|
+
...k(Y) ? { "data-invalid": "" } : {},
|
|
341
341
|
"data-part": "counter",
|
|
342
342
|
"data-part-counter": "",
|
|
343
|
-
id:
|
|
344
|
-
children:
|
|
345
|
-
}), $ = !1,
|
|
343
|
+
id: N.counter,
|
|
344
|
+
children: O(Y)
|
|
345
|
+
}), $ = !1, he = f.map(t, (e) => $ || !m(e) || e.type !== z ? e : ($ = !0, /* @__PURE__ */ C(x, { children: [e, me] }))), ge = u({
|
|
346
346
|
...D,
|
|
347
|
-
children: /* @__PURE__ */
|
|
348
|
-
...
|
|
347
|
+
children: /* @__PURE__ */ C(x, { children: [he, $ ? null : me] }),
|
|
348
|
+
...ue === !0 ? { "data-disabled": "" } : {},
|
|
349
349
|
...i === !0 ? { "data-invalid": "" } : {},
|
|
350
|
-
...
|
|
350
|
+
...de === !0 ? { "data-readonly": "" } : {},
|
|
351
351
|
...p === !0 ? { "data-required": "" } : {},
|
|
352
|
-
"data-label-placement": a ??
|
|
353
|
-
"data-necessity":
|
|
352
|
+
"data-label-placement": a ?? A.labelPlacement,
|
|
353
|
+
"data-necessity": fe,
|
|
354
354
|
"data-part": "root",
|
|
355
355
|
"data-size": Q,
|
|
356
|
-
"data-ui": "field"
|
|
356
|
+
"data-ui": "field",
|
|
357
|
+
"data-width": E
|
|
357
358
|
});
|
|
358
|
-
return /* @__PURE__ */
|
|
359
|
-
value:
|
|
360
|
-
children: d === void 0 ? /* @__PURE__ */
|
|
361
|
-
...
|
|
359
|
+
return /* @__PURE__ */ S(T.Provider, {
|
|
360
|
+
value: pe,
|
|
361
|
+
children: d === void 0 ? /* @__PURE__ */ S("div", {
|
|
362
|
+
...ge,
|
|
362
363
|
ref: l
|
|
363
|
-
}) : d(
|
|
364
|
+
}) : d(ge)
|
|
364
365
|
});
|
|
365
366
|
}
|
|
366
367
|
//#endregion
|
|
367
|
-
export {
|
|
368
|
+
export { O as _, V as a, E as b, q as c, I as d, F as f, te as g, M as h, U as i, G as l, T as m, K as n, H as o, ne as p, B as r, W as s, Z as t, z as u, k as v, D as y };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as e } from "./i18n-D7xXDd8-.js";
|
|
2
|
-
import { d as t, f as n, y as r } from "./field-
|
|
2
|
+
import { d as t, f as n, y as r } from "./field-CSSHwGq_.js";
|
|
3
3
|
import { t as i } from "./inline-message-DgEAUjar.js";
|
|
4
4
|
import { keyedProps as a, withSelectorKey as o } from "@slotted/core/selector-key";
|
|
5
5
|
import { createContext as s, isValidElement as c, useCallback as l, useContext as u, useEffect as d, useId as f, useMemo as p, useState as m } from "react";
|
package/dist/field-group.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, i as t, n, o as r, r as i, s as a, t as o } from "./field-group-
|
|
1
|
+
import { a as e, i as t, n, o as r, r as i, s as a, t as o } from "./field-group-DeBTueJW.js";
|
|
2
2
|
export { o as FieldGroup, t as FieldGroupContent, e as FieldGroupDescription, r as FieldGroupError, a as FieldGroupLegend, n as deriveFieldGroupIds, i as useFieldGroup };
|
package/dist/field.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as e, a as t, b as n, c as r, d as i, f as a, g as o, i as s, l as c, n as l, o as u, p as d, r as f, s as p, t as m, u as h, v as g, y as _ } from "./field-
|
|
1
|
+
import { _ as e, a as t, b as n, c as r, d as i, f as a, g as o, i as s, l as c, n as l, o as u, p as d, r as f, s as p, t as m, u as h, v as g, y as _ } from "./field-CSSHwGq_.js";
|
|
2
2
|
export { d as FIELD_DESCRIBED_ORDER, m as Field, l as FieldAction, f as FieldControl, s as FieldCounter, i as FieldDefaultsProvider, t as FieldDescription, u as FieldError, p as FieldHeader, r as FieldHelp, c as FieldIndicator, h as FieldLabel, o as deriveFieldIds, e as formatFieldCount, g as isFieldCountOver, _ as necessityMark, n as useField, a as useFieldDefaults };
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { r as e } from "./i18n-D7xXDd8-.js";
|
|
2
2
|
import { n as t, t as n } from "./icon-D04-_QFA.js";
|
|
3
|
-
import { _ as r, a as i, c as a, d as o, h as s, m as c, n as l, t as u, u as d } from "./menu-parts-
|
|
3
|
+
import { _ as r, a as i, c as a, d as o, h as s, m as c, n as l, t as u, u as d } from "./menu-parts-7F8syoFE.js";
|
|
4
4
|
import { a as f, d as p, l as m, n as h, o as g, r as ee, s as te } from "./drawer-Du1aC1px.js";
|
|
5
5
|
import { t as ne } from "./spinner-ring-DyfaYloA.js";
|
|
6
6
|
import { n as _, t as re } from "./icon-button-DERKFHX1.js";
|
|
7
|
-
import { t as ie } from "./text-field-
|
|
7
|
+
import { t as ie } from "./text-field-RGXN7zNu.js";
|
|
8
8
|
import { a as ae, d as oe, f as se, l as ce, p as le, r as ue } from "./popover-BfEn2wdZ.js";
|
|
9
9
|
import { n as de } from "./kbd-dNz8QHfL.js";
|
|
10
|
-
import { t as fe } from "./date-picker-
|
|
11
|
-
import { t as pe } from "./datetime-picker-
|
|
12
|
-
import { a as me, i as he, n as ge, s as _e } from "./multi-select-
|
|
13
|
-
import { t as ve } from "./number-field-
|
|
14
|
-
import { a as ye, t as v } from "./segmented-control-
|
|
15
|
-
import { c as be, i as xe, n as Se, o as Ce, s as we } from "./select-
|
|
16
|
-
import { t as y } from "./time-picker-
|
|
10
|
+
import { t as fe } from "./date-picker-B2wqU3Mw.js";
|
|
11
|
+
import { t as pe } from "./datetime-picker-C-PwlBW5.js";
|
|
12
|
+
import { a as me, i as he, n as ge, s as _e } from "./multi-select-DnOAXeuF.js";
|
|
13
|
+
import { t as ve } from "./number-field-C20-8yda.js";
|
|
14
|
+
import { a as ye, t as v } from "./segmented-control-Dae5wU9X.js";
|
|
15
|
+
import { c as be, i as xe, n as Se, o as Ce, s as we } from "./select-BTncjDuM.js";
|
|
16
|
+
import { t as y } from "./time-picker-Da_UhP9X.js";
|
|
17
17
|
import { withSelectorKey as b } from "@slotted/core/selector-key";
|
|
18
18
|
import { createRemovalFocus as Te, createRovingTabindex as Ee } from "@slotted/core/focus";
|
|
19
19
|
import { createControllable as De } from "@slotted/core/state";
|
package/dist/filter-bar.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as e, n as t, r as n, t as r } from "./filter-bar-
|
|
1
|
+
import { i as e, n as t, r as n, t as r } from "./filter-bar-CPBr_n2c.js";
|
|
2
2
|
export { r as FILTER_BAR_FALLBACK, t as FilterBar, n as FilterBarDefaultsProvider, e as useFilterBarDefaults };
|
|
@@ -77,13 +77,23 @@ function w({ align: e, ref: t, ...n }) {
|
|
|
77
77
|
ref: t
|
|
78
78
|
});
|
|
79
79
|
}
|
|
80
|
+
function T({ ref: e, ...t }) {
|
|
81
|
+
return /* @__PURE__ */ d("div", {
|
|
82
|
+
"data-ui": "form",
|
|
83
|
+
"data-ui-form": "",
|
|
84
|
+
"data-part": "aside",
|
|
85
|
+
"data-part-aside": "",
|
|
86
|
+
...t,
|
|
87
|
+
ref: e
|
|
88
|
+
});
|
|
89
|
+
}
|
|
80
90
|
//#endregion
|
|
81
91
|
//#region src/form/form.tsx
|
|
82
92
|
var ae = (e, t) => {
|
|
83
93
|
let n = Object.keys(e);
|
|
84
94
|
return n.length === Object.keys(t).length && n.every((n) => t[n] !== void 0 && e[n].length === t[n].length && e[n].every((e, r) => e === t[n][r]));
|
|
85
95
|
};
|
|
86
|
-
function
|
|
96
|
+
function E({ align: r, children: a, className: y, defaultErrors: S, disabled: w, errorFocus: T, errors: E, guardUnsaved: D = !1, handle: oe, loading: se = !1, messages: ce, nativeValidation: O, onErrorsChange: k, onSubmit: A, ref: j, style: le, summary: ue, summaryDescription: de, summaryTitle: fe, validate: pe, ...me }) {
|
|
87
97
|
let M = b(), he = e(ne, ce), N = c(null), P = c(null), F = ee(), I = r ?? M.align, L = T ?? M.errorFocus, ge = ue ?? M.summary, R = fe ?? he("summaryTitle"), z = de ?? M.summaryDescription, B = pe ?? M.validate, _e = O ?? M.nativeValidation, V = E !== void 0, H = s(() => _(E), [E]), [ve, ye] = l(() => _(S)), U = V ? H : ve, [be, W] = l(!1), G = be || se, [K, q] = l(!1), [J, xe] = l([]), Y = c(!1), X = i((e, t, r) => {
|
|
88
98
|
let i = n({
|
|
89
99
|
...V ? { controlled: H } : {},
|
|
@@ -256,7 +266,7 @@ function T({ align: r, children: a, className: y, defaultErrors: S, disabled: w,
|
|
|
256
266
|
}
|
|
257
267
|
//#endregion
|
|
258
268
|
//#region src/form/form-defaults.tsx
|
|
259
|
-
function
|
|
269
|
+
function D({ children: e, ...t }) {
|
|
260
270
|
let n = b();
|
|
261
271
|
return /* @__PURE__ */ d(y.Provider, {
|
|
262
272
|
value: {
|
|
@@ -271,4 +281,4 @@ function E({ children: e, ...t }) {
|
|
|
271
281
|
});
|
|
272
282
|
}
|
|
273
283
|
//#endregion
|
|
274
|
-
export {
|
|
284
|
+
export { C as a, T as i, E as n, b as o, w as r, S as s, D as t };
|
package/dist/form.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, i as t, n, o as r, r as i,
|
|
2
|
-
export { n as Form, i as FormActions,
|
|
1
|
+
import { a as e, i as t, n, o as r, r as i, s as a, t as o } from "./form-Im9lGi45.js";
|
|
2
|
+
export { n as Form, i as FormActions, t as FormAside, o as FormDefaultsProvider, e as FormSummary, r as useFormDefaults, a as useFormState };
|
|
@@ -8,7 +8,7 @@ import { a as c, i as l, n as u, r as d } from "./tooltip-DrFiRlH8.js";
|
|
|
8
8
|
import { i as f, t as p } from "./skeleton-DeEOmm1y.js";
|
|
9
9
|
import { i as m, n as h, o as g, r as _, t as v } from "./result-state-BMYhelu1.js";
|
|
10
10
|
import { a as ee, r as te, t as y } from "./tabs-C-Bc7WmQ.js";
|
|
11
|
-
import { A as b, O as ne, b as x, c as S, f as C, l as re, u as w, v as T } from "./table-
|
|
11
|
+
import { A as b, O as ne, b as x, c as S, f as C, l as re, u as w, v as T } from "./table-Boy-0cjy.js";
|
|
12
12
|
import { v as ie } from "./toast-DHDVXIew.js";
|
|
13
13
|
import { keyedProps as ae, selectorKeyProps as oe } from "@slotted/core/selector-key";
|
|
14
14
|
import { createControllable as se } from "@slotted/core/state";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as e, n as t, r as n, t as r } from "./import-export-center-
|
|
1
|
+
import { i as e, n as t, r as n, t as r } from "./import-export-center-CzyIlQB_.js";
|
|
2
2
|
export { t as ImportExportCenter, n as ImportExportCenterDefaultsProvider, e as useImportExportCenterDefaults, r as useJobToasts };
|