welcome-ui 10.0.0-alpha.3 → 10.0.0-alpha.5
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/2W3RN7C5-DMC82gDP.js +61 -0
- package/dist/{4I4MLMKD-z3Xm3qCo.js → 4I4MLMKD-BO6Lcy7s.js} +17 -17
- package/dist/Accordion.js +19 -17
- package/dist/Alert.css +1 -1
- package/dist/Alert.js +93 -87
- package/dist/AspectRatio.js +1 -0
- package/dist/Avatar.js +13 -11
- package/dist/{B7UTNDHN-BDa2-8JK.js → B7UTNDHN-BghjolIs.js} +30 -30
- package/dist/Badge.js +1 -0
- package/dist/Breadcrumb.js +76 -71
- package/dist/Button.js +8 -6
- package/dist/ButtonGroup.js +6 -4
- package/dist/Card.css +1 -1
- package/dist/Card.js +68 -15
- package/dist/Checkbox.js +30 -29
- package/dist/CloseButton.js +7 -5
- package/dist/{CustomPopper-vwbOQq72.js → CustomPopper-C1wIDHbM.js} +5 -4
- package/dist/{DSAASPLT-C-2xDjIv.js → DSAASPLT-Fx1kuAsk.js} +3 -3
- package/dist/DatePicker.js +82 -78
- package/dist/DateTimePicker.js +22 -21
- package/dist/Drawer.js +101 -80
- package/dist/DropdownMenu.css +1 -1
- package/dist/DropdownMenu.js +889 -462
- package/dist/Field.js +1 -0
- package/dist/FieldGroup.js +9 -7
- package/dist/FileDrop.js +184 -176
- package/dist/FileUpload.js +43 -40
- package/dist/{GVVKDT6A-C66-lr0B.js → GVVKDT6A-CF9ejW_c.js} +103 -103
- package/dist/Hint.js +9 -7
- package/dist/Icon.js +6 -4
- package/dist/InputText.js +30 -28
- package/dist/{KPUWHTQJ-Byij2al4.js → KPUWHTQJ-Dv3cAqjP.js} +33 -31
- package/dist/Label.js +9 -7
- package/dist/Link.js +25 -21
- package/dist/Loader.js +12 -10
- package/dist/Logo.js +21 -13
- package/dist/Modal.js +145 -114
- package/dist/{NI3IVY7K-DpF3td-7.js → NI3IVY7K-Dy240mkD.js} +160 -160
- package/dist/{NMGNQVTG-BgAqqGOq.js → NMGNQVTG-DRO2uXZT.js} +6 -6
- package/dist/{OE2EFRVA-DkdhQLJL.js → OE2EFRVA-Dg1R6gaC.js} +186 -170
- package/dist/{OLVWQA7U-wHytlFYu.js → OLVWQA7U-Dia3UUnG.js} +36 -36
- package/dist/Pagination.js +39 -37
- package/dist/PasswordInput.js +20 -17
- package/dist/Popover.js +89 -72
- package/dist/{RTNCFSKZ-LcIdBwa8.js → RTNCFSKZ-BywELldk.js} +42 -42
- package/dist/Radio.js +20 -19
- package/dist/RadioGroup.js +29 -27
- package/dist/RadioTab.js +2 -1
- package/dist/{SBSPVDDI-BoxPz2JY.js → SBSPVDDI-CmtnvvUX.js} +46 -46
- package/dist/SQZLCNLX-Dg4KKdNJ.js +83 -0
- package/dist/Search.css +1 -1
- package/dist/Search.js +62 -60
- package/dist/Select.css +1 -1
- package/dist/Select.js +204 -202
- package/dist/Slider.js +66 -61
- package/dist/Stepper.js +34 -27
- package/dist/StickyNote.css +1 -0
- package/dist/StickyNote.js +49 -0
- package/dist/Swiper.js +52 -50
- package/dist/{T22PY7TE-CzEDuEn1.js → T22PY7TE-gLuJpoOm.js} +46 -46
- package/dist/Table.js +34 -21
- package/dist/Tabs.js +161 -152
- package/dist/Tag.css +1 -1
- package/dist/Tag.js +66 -61
- package/dist/Text.js +4 -2
- package/dist/Textarea.js +10 -8
- package/dist/TimePicker.js +22 -21
- package/dist/Toast.js +186 -177
- package/dist/Toggle.js +16 -14
- package/dist/Tooltip.js +29 -27
- package/dist/VariantIcon.js +7 -5
- package/dist/VisuallyHidden.js +8 -6
- package/dist/WelcomeLoader.js +3 -2
- package/dist/XCKGTAUF-CJwwVibW.js +25 -0
- package/dist/{Y67KZUMI-BDyUNSJw.js → Y67KZUMI-BwLWwpNF.js} +2 -2
- package/dist/{ZTXFEM5L-CjFLRObi.js → ZTXFEM5L-WGHY_jqg.js} +3 -3
- package/dist/theme.css +1 -1
- package/dist/theme.js +1 -0
- package/dist/types/components/Alert/components/Buttons.d.ts +3 -0
- package/dist/types/components/Alert/components/Title.d.ts +5 -0
- package/dist/types/components/Alert/index.d.ts +7 -3
- package/dist/types/components/Alert/types.d.ts +3 -9
- package/dist/types/components/Card/Body.d.ts +2 -3
- package/dist/types/components/Card/Footer.d.ts +6 -0
- package/dist/types/components/Card/Header.d.ts +5 -0
- package/dist/types/components/Card/index.d.ts +7 -8
- package/dist/types/components/Card/types.d.ts +16 -3
- package/dist/types/components/Checkbox/index.d.ts +1 -2
- package/dist/types/components/Checkbox/types.d.ts +3 -1
- package/dist/types/components/DateTimePickerCommon/CustomHeader.d.ts +4 -1
- package/dist/types/components/DateTimePickerCommon/CustomPopper.d.ts +6 -3
- package/dist/types/components/Drawer/AssetDrawer/Header.d.ts +4 -1
- package/dist/types/components/Drawer/AssetDrawer/IconBlock.d.ts +4 -1
- package/dist/types/components/Drawer/components/Close.d.ts +4 -1
- package/dist/types/components/Drawer/components/Title.d.ts +4 -1
- package/dist/types/components/Drawer/index.d.ts +12 -3
- package/dist/types/components/DropdownMenu/Action.d.ts +2 -0
- package/dist/types/components/DropdownMenu/Group.d.ts +4 -0
- package/dist/types/components/DropdownMenu/Item.d.ts +7 -0
- package/dist/types/components/DropdownMenu/Search.d.ts +2 -0
- package/dist/types/components/DropdownMenu/Submenu.d.ts +4 -0
- package/dist/types/components/DropdownMenu/index.d.ts +11 -0
- package/dist/types/components/DropdownMenu/types.d.ts +26 -5
- package/dist/types/components/FileDrop/components/FilePreview.d.ts +4 -1
- package/dist/types/components/FileDrop/components/Message.d.ts +4 -1
- package/dist/types/components/Loader/index.d.ts +4 -1
- package/dist/types/components/Modal/Assets/AssetContent.d.ts +4 -1
- package/dist/types/components/Modal/Assets/AssetTitle.d.ts +4 -1
- package/dist/types/components/Modal/Assets/CloseButton.d.ts +4 -1
- package/dist/types/components/Modal/Assets/Dialog.d.ts +4 -1
- package/dist/types/components/Modal/Assets/Iframe.d.ts +4 -1
- package/dist/types/components/Modal/Assets/index.d.ts +16 -4
- package/dist/types/components/Modal/components/Close.d.ts +4 -1
- package/dist/types/components/Modal/index.d.ts +16 -4
- package/dist/types/components/PasswordInput/ToggleButton.d.ts +4 -1
- package/dist/types/components/Popover/Arrow.d.ts +4 -1
- package/dist/types/components/Popover/ContentWrapper.d.ts +4 -1
- package/dist/types/components/RadioGroup/index.d.ts +4 -1
- package/dist/types/components/Stepper/index.d.ts +8 -2
- package/dist/types/components/StickyNote/components/Button.d.ts +5 -0
- package/dist/types/components/StickyNote/components/Title.d.ts +5 -0
- package/dist/types/components/StickyNote/index.d.ts +11 -0
- package/dist/types/components/StickyNote/index.test.d.ts +1 -0
- package/dist/types/components/StickyNote/types.d.ts +15 -0
- package/dist/types/components/Swiper/index.d.ts +4 -1
- package/dist/types/components/Table/index.d.ts +20 -5
- package/dist/types/components/Tabs/components/ActiveBar/index.d.ts +4 -1
- package/dist/types/components/Tag/types.d.ts +4 -2
- package/dist/types/components/Toast/index.d.ts +4 -1
- package/dist/types/theme/types.d.ts +233 -218
- package/dist/utils.js +1 -0
- package/package.json +2 -2
- package/dist/2W3RN7C5-uG7eBeTQ.js +0 -61
- package/dist/SQZLCNLX-CUlXoT69.js +0 -82
- package/dist/XCKGTAUF-CahZE721.js +0 -25
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { i as ot,
|
|
2
|
+
import { i as ot, x as C, S as st, T as at, U as ut, V as F, N as it, A as ct, B as ft, W as lt, X as dt, m as G, d as St, a as P, u as pt, Y as vt } from "./OE2EFRVA-Dg1R6gaC.js";
|
|
3
3
|
import * as I from "react";
|
|
4
|
-
import
|
|
4
|
+
import Q from "react";
|
|
5
5
|
import { g as _t } from "./index-PAaZGbyz.js";
|
|
6
|
-
function
|
|
6
|
+
function A(t, n) {
|
|
7
7
|
const e = t.__unstableInternals;
|
|
8
8
|
return ot(e, "Invalid store"), e[n];
|
|
9
9
|
}
|
|
@@ -33,24 +33,24 @@ function W(t, ...n) {
|
|
|
33
33
|
});
|
|
34
34
|
})
|
|
35
35
|
)
|
|
36
|
-
),
|
|
36
|
+
), T = [];
|
|
37
37
|
for (const L of v)
|
|
38
|
-
|
|
39
|
-
const
|
|
40
|
-
return o = F(...w, ...
|
|
38
|
+
T.push(L());
|
|
39
|
+
const q = n.map(Z);
|
|
40
|
+
return o = F(...w, ...T, ...q), b;
|
|
41
41
|
}, E = (s, r, b = m) => (b.add(r), d.set(r, s), () => {
|
|
42
42
|
var w;
|
|
43
43
|
(w = i.get(r)) == null || w(), i.delete(r), d.delete(r), b.delete(r);
|
|
44
|
-
}), R = (s, r) => E(s, r),
|
|
44
|
+
}), R = (s, r) => E(s, r), B = (s, r) => (i.set(r, r(e, e)), E(s, r)), N = (s, r) => (i.set(r, r(e, l)), E(s, r, _)), S = (s) => W(at(e, s), y), f = (s) => W(st(e, s), y), O = () => e, p = (s, r, b = !1) => {
|
|
45
45
|
var w;
|
|
46
46
|
if (!C(e, s)) return;
|
|
47
|
-
const
|
|
48
|
-
if (
|
|
47
|
+
const T = it(r, e[s]);
|
|
48
|
+
if (T === e[s]) return;
|
|
49
49
|
if (!b)
|
|
50
50
|
for (const h of n)
|
|
51
|
-
(w = h == null ? void 0 : h.setState) == null || w.call(h, s,
|
|
52
|
-
const
|
|
53
|
-
e = ct(ft({}, e), { [s]:
|
|
51
|
+
(w = h == null ? void 0 : h.setState) == null || w.call(h, s, T);
|
|
52
|
+
const q = e;
|
|
53
|
+
e = ct(ft({}, e), { [s]: T });
|
|
54
54
|
const L = Symbol();
|
|
55
55
|
a = L, c.add(s);
|
|
56
56
|
const V = (h, D, U) => {
|
|
@@ -59,7 +59,7 @@ function W(t, ...n) {
|
|
|
59
59
|
(!$ || $.some(rt)) && ((H = i.get(h)) == null || H(), i.set(h, h(e, D)));
|
|
60
60
|
};
|
|
61
61
|
for (const h of m)
|
|
62
|
-
V(h,
|
|
62
|
+
V(h, q);
|
|
63
63
|
queueMicrotask(() => {
|
|
64
64
|
if (a !== L) return;
|
|
65
65
|
const h = e;
|
|
@@ -74,8 +74,8 @@ function W(t, ...n) {
|
|
|
74
74
|
setup: g,
|
|
75
75
|
init: x,
|
|
76
76
|
subscribe: R,
|
|
77
|
-
sync:
|
|
78
|
-
batch:
|
|
77
|
+
sync: B,
|
|
78
|
+
batch: N,
|
|
79
79
|
pick: S,
|
|
80
80
|
omit: f
|
|
81
81
|
}
|
|
@@ -84,33 +84,33 @@ function W(t, ...n) {
|
|
|
84
84
|
}
|
|
85
85
|
function Rt(t, ...n) {
|
|
86
86
|
if (t)
|
|
87
|
-
return
|
|
87
|
+
return A(t, "setup")(...n);
|
|
88
88
|
}
|
|
89
89
|
function Z(t, ...n) {
|
|
90
90
|
if (t)
|
|
91
|
-
return
|
|
91
|
+
return A(t, "init")(...n);
|
|
92
92
|
}
|
|
93
93
|
function k(t, ...n) {
|
|
94
94
|
if (t)
|
|
95
|
-
return
|
|
95
|
+
return A(t, "subscribe")(...n);
|
|
96
96
|
}
|
|
97
97
|
function tt(t, ...n) {
|
|
98
98
|
if (t)
|
|
99
|
-
return
|
|
99
|
+
return A(t, "sync")(...n);
|
|
100
100
|
}
|
|
101
101
|
function ht(t, ...n) {
|
|
102
102
|
if (t)
|
|
103
|
-
return
|
|
103
|
+
return A(t, "batch")(...n);
|
|
104
104
|
}
|
|
105
105
|
function Vt(t, ...n) {
|
|
106
106
|
if (t)
|
|
107
|
-
return
|
|
107
|
+
return A(t, "omit")(...n);
|
|
108
108
|
}
|
|
109
|
-
function
|
|
109
|
+
function At(t, ...n) {
|
|
110
110
|
if (t)
|
|
111
|
-
return
|
|
111
|
+
return A(t, "pick")(...n);
|
|
112
112
|
}
|
|
113
|
-
function
|
|
113
|
+
function Tt(...t) {
|
|
114
114
|
var n;
|
|
115
115
|
const e = {};
|
|
116
116
|
for (const a of t) {
|
|
@@ -154,7 +154,7 @@ var j = { exports: {} }, K = {}, Y;
|
|
|
154
154
|
function mt() {
|
|
155
155
|
if (Y) return K;
|
|
156
156
|
Y = 1;
|
|
157
|
-
var t =
|
|
157
|
+
var t = Q;
|
|
158
158
|
function n(i, d) {
|
|
159
159
|
return i === d && (i !== 0 || 1 / i === 1 / d) || i !== i && d !== d;
|
|
160
160
|
}
|
|
@@ -185,11 +185,11 @@ function mt() {
|
|
|
185
185
|
var _ = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? m : c;
|
|
186
186
|
return K.useSyncExternalStore = t.useSyncExternalStore !== void 0 ? t.useSyncExternalStore : _, K;
|
|
187
187
|
}
|
|
188
|
-
var M = {},
|
|
188
|
+
var M = {}, X;
|
|
189
189
|
function Et() {
|
|
190
|
-
return
|
|
190
|
+
return X || (X = 1, process.env.NODE_ENV !== "production" && function() {
|
|
191
191
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
|
|
192
|
-
var t =
|
|
192
|
+
var t = Q, n = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
193
193
|
function e(S) {
|
|
194
194
|
{
|
|
195
195
|
for (var f = arguments.length, O = new Array(f > 1 ? f - 1 : 0), p = 1; p < f; p++)
|
|
@@ -252,13 +252,13 @@ function Et() {
|
|
|
252
252
|
function x(S, f, O) {
|
|
253
253
|
return f();
|
|
254
254
|
}
|
|
255
|
-
var E = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", R = !E,
|
|
256
|
-
M.useSyncExternalStore =
|
|
255
|
+
var E = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", R = !E, B = R ? x : d, N = t.useSyncExternalStore !== void 0 ? t.useSyncExternalStore : B;
|
|
256
|
+
M.useSyncExternalStore = N, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
|
|
257
257
|
}()), M;
|
|
258
258
|
}
|
|
259
|
-
var
|
|
259
|
+
var J;
|
|
260
260
|
function gt() {
|
|
261
|
-
return
|
|
261
|
+
return J || (J = 1, process.env.NODE_ENV === "production" ? j.exports = mt() : j.exports = Et()), j.exports;
|
|
262
262
|
}
|
|
263
263
|
var Ot = gt();
|
|
264
264
|
const bt = /* @__PURE__ */ _t(Ot);
|
|
@@ -304,10 +304,10 @@ function It(t, n) {
|
|
|
304
304
|
}
|
|
305
305
|
function Ct(t, n, e, l) {
|
|
306
306
|
const a = C(n, e) ? n[e] : void 0, o = l ? n[l] : void 0, u = vt({ value: a, setValue: o });
|
|
307
|
-
|
|
307
|
+
G(() => tt(t, [e], (c, v) => {
|
|
308
308
|
const { value: m, setValue: _ } = u.current;
|
|
309
309
|
_ && c[e] !== v[e] && c[e] !== m && _(c[e]);
|
|
310
|
-
}), [t, e]),
|
|
310
|
+
}), [t, e]), G(() => {
|
|
311
311
|
if (a !== void 0)
|
|
312
312
|
return t.setState(e, a), ht(t, [e], () => {
|
|
313
313
|
a !== void 0 && t.setState(e, a);
|
|
@@ -316,7 +316,7 @@ function Ct(t, n, e, l) {
|
|
|
316
316
|
}
|
|
317
317
|
function Ut(t, n) {
|
|
318
318
|
const [e, l] = I.useState(() => t(n));
|
|
319
|
-
|
|
319
|
+
G(() => Z(e), [e]);
|
|
320
320
|
const a = I.useCallback(
|
|
321
321
|
(c) => yt(e, c),
|
|
322
322
|
[e]
|
|
@@ -329,18 +329,18 @@ function Ut(t, n) {
|
|
|
329
329
|
return [o, u];
|
|
330
330
|
}
|
|
331
331
|
export {
|
|
332
|
-
|
|
333
|
-
|
|
332
|
+
Ct as a,
|
|
333
|
+
yt as b,
|
|
334
334
|
W as c,
|
|
335
|
-
|
|
335
|
+
tt as d,
|
|
336
336
|
k as e,
|
|
337
337
|
ht as f,
|
|
338
338
|
It as g,
|
|
339
339
|
Z as i,
|
|
340
|
-
|
|
340
|
+
Tt as m,
|
|
341
341
|
Vt as o,
|
|
342
|
-
|
|
342
|
+
At as p,
|
|
343
343
|
Rt as s,
|
|
344
344
|
Dt as t,
|
|
345
|
-
|
|
345
|
+
Ut as u
|
|
346
346
|
};
|
package/dist/Radio.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import './Radio.css';
|
|
2
3
|
import { jsxs as d, jsx as t } from "react/jsx-runtime";
|
|
3
|
-
import { R as b } from "./SQZLCNLX-
|
|
4
|
+
import { R as b } from "./SQZLCNLX-Dg4KKdNJ.js";
|
|
4
5
|
import { forwardRef as h } from "react";
|
|
5
6
|
import { Hint as w } from "./Hint.js";
|
|
6
7
|
import { Label as v } from "./Label.js";
|
|
@@ -18,42 +19,42 @@ const R = "_root_b4f3u_2", g = "_input_b4f3u_8", x = "_disabled_b4f3u_34", $ = "
|
|
|
18
19
|
({
|
|
19
20
|
className: _,
|
|
20
21
|
dataTestId: i,
|
|
21
|
-
disabled:
|
|
22
|
-
hint:
|
|
23
|
-
label:
|
|
22
|
+
disabled: o,
|
|
23
|
+
hint: s,
|
|
24
|
+
label: r,
|
|
24
25
|
onChange: l,
|
|
25
26
|
onClick: e,
|
|
26
27
|
value: c,
|
|
27
28
|
variant: p = "default",
|
|
28
|
-
...
|
|
29
|
-
},
|
|
30
|
-
const
|
|
31
|
-
|
|
29
|
+
...u
|
|
30
|
+
}, f) => {
|
|
31
|
+
const m = (n) => {
|
|
32
|
+
n.stopPropagation(), e && e(n), l && l(n);
|
|
32
33
|
};
|
|
33
|
-
return /* @__PURE__ */ d(v, { className: a("root", _), onClick:
|
|
34
|
+
return /* @__PURE__ */ d(v, { className: a("root", _), onClick: m, children: [
|
|
34
35
|
/* @__PURE__ */ t("div", { className: a("input-wrapper"), children: /* @__PURE__ */ t(
|
|
35
36
|
b,
|
|
36
37
|
{
|
|
37
|
-
"aria-label":
|
|
38
|
-
className: a("input", `variant-${p}`,
|
|
38
|
+
"aria-label": r,
|
|
39
|
+
className: a("input", `variant-${p}`, o && "disabled"),
|
|
39
40
|
"data-testid": i,
|
|
40
|
-
disabled:
|
|
41
|
-
ref:
|
|
41
|
+
disabled: o,
|
|
42
|
+
ref: f,
|
|
42
43
|
value: c,
|
|
43
|
-
...
|
|
44
|
+
...u
|
|
44
45
|
}
|
|
45
46
|
) }),
|
|
46
|
-
/* @__PURE__ */ d("div", { className: a("label-with-hint"), children: [
|
|
47
|
-
/* @__PURE__ */ t("div", { "data-testid": i ? `${i}-label` : void 0, children:
|
|
48
|
-
|
|
47
|
+
r ? /* @__PURE__ */ d("div", { className: a("label-with-hint"), children: [
|
|
48
|
+
/* @__PURE__ */ t("div", { "data-testid": i ? `${i}-label` : void 0, children: r }),
|
|
49
|
+
s ? /* @__PURE__ */ t(
|
|
49
50
|
w,
|
|
50
51
|
{
|
|
51
52
|
className: a("hint"),
|
|
52
53
|
"data-testid": i ? `${i}-hint` : void 0,
|
|
53
|
-
children:
|
|
54
|
+
children: s
|
|
54
55
|
}
|
|
55
56
|
) : null
|
|
56
|
-
] })
|
|
57
|
+
] }) : null
|
|
57
58
|
] });
|
|
58
59
|
}
|
|
59
60
|
);
|
package/dist/RadioGroup.js
CHANGED
|
@@ -1,56 +1,57 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import './RadioGroup.css';
|
|
2
3
|
import { jsx as n } from "react/jsx-runtime";
|
|
3
|
-
import { c as G, u as P } from "./B7UTNDHN-
|
|
4
|
-
import { c as $, b,
|
|
5
|
-
import {
|
|
6
|
-
import { FieldGroup as
|
|
7
|
-
import { Radio as
|
|
8
|
-
import { c as
|
|
4
|
+
import { c as G, u as P } from "./B7UTNDHN-BghjolIs.js";
|
|
5
|
+
import { c as $, u as b, a as x, b as y } from "./RTNCFSKZ-BywELldk.js";
|
|
6
|
+
import { M as L, A as d, z as p, B as i } from "./OE2EFRVA-Dg1R6gaC.js";
|
|
7
|
+
import { FieldGroup as N } from "./FieldGroup.js";
|
|
8
|
+
import { Radio as j } from "./Radio.js";
|
|
9
|
+
import { c as k } from "./index-PAaZGbyz.js";
|
|
9
10
|
import "react";
|
|
10
|
-
function
|
|
11
|
-
var e =
|
|
12
|
-
const r = (a = e.store) == null ? void 0 : a.getState(), s = G(d(
|
|
13
|
-
focusLoop:
|
|
14
|
-
})),
|
|
15
|
-
value:
|
|
11
|
+
function z(t = {}) {
|
|
12
|
+
var e = L(t, []), a;
|
|
13
|
+
const r = (a = e.store) == null ? void 0 : a.getState(), s = G(d(i({}, e), {
|
|
14
|
+
focusLoop: p(e.focusLoop, r == null ? void 0 : r.focusLoop, !0)
|
|
15
|
+
})), c = d(i({}, s.getState()), {
|
|
16
|
+
value: p(
|
|
16
17
|
e.value,
|
|
17
18
|
r == null ? void 0 : r.value,
|
|
18
19
|
e.defaultValue,
|
|
19
20
|
null
|
|
20
21
|
)
|
|
21
|
-
}), u = $(
|
|
22
|
-
return d(
|
|
22
|
+
}), u = $(c, s, e.store);
|
|
23
|
+
return d(i(i({}, s), u), {
|
|
23
24
|
setValue: (l) => u.setState("value", l)
|
|
24
25
|
});
|
|
25
26
|
}
|
|
26
|
-
function
|
|
27
|
+
function A(t, e, a) {
|
|
27
28
|
return t = P(t, e, a), x(t, a, "value", "setValue"), t;
|
|
28
29
|
}
|
|
29
|
-
function
|
|
30
|
-
const [e, a] = b(
|
|
31
|
-
return
|
|
30
|
+
function B(t = {}) {
|
|
31
|
+
const [e, a] = b(z, t);
|
|
32
|
+
return A(e, a, t);
|
|
32
33
|
}
|
|
33
|
-
const
|
|
34
|
-
root:
|
|
35
|
-
},
|
|
34
|
+
const F = "_root_17iu3_2", M = {
|
|
35
|
+
root: F
|
|
36
|
+
}, O = k(M), g = ({
|
|
36
37
|
className: t,
|
|
37
38
|
dataTestId: e,
|
|
38
39
|
disabled: a,
|
|
39
40
|
hideLabel: r,
|
|
40
41
|
id: s,
|
|
41
|
-
label:
|
|
42
|
+
label: c,
|
|
42
43
|
name: u,
|
|
43
44
|
onChange: l,
|
|
44
|
-
options:
|
|
45
|
-
renderOption: f =
|
|
45
|
+
options: v = [],
|
|
46
|
+
renderOption: f = j,
|
|
46
47
|
required: S,
|
|
47
48
|
value: _,
|
|
48
49
|
...V
|
|
49
50
|
}) => {
|
|
50
|
-
const m =
|
|
51
|
+
const m = B({ defaultValue: _ }), R = y(m, "value"), h = (o) => {
|
|
51
52
|
a || (m.setValue(o), l == null || l(o));
|
|
52
53
|
};
|
|
53
|
-
return /* @__PURE__ */ n(
|
|
54
|
+
return /* @__PURE__ */ n(N, { "data-testid": e, hideLabel: r, label: c, required: S, children: /* @__PURE__ */ n("div", { className: O("root", t), children: v.map((o) => /* @__PURE__ */ n(
|
|
54
55
|
f,
|
|
55
56
|
{
|
|
56
57
|
checked: o.value === R,
|
|
@@ -67,6 +68,7 @@ const g = "_root_17iu3_2", q = {
|
|
|
67
68
|
o.value
|
|
68
69
|
)) }) });
|
|
69
70
|
};
|
|
71
|
+
g.displayName = "RadioGroup";
|
|
70
72
|
export {
|
|
71
|
-
|
|
73
|
+
g as RadioGroup
|
|
72
74
|
};
|
package/dist/RadioTab.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import './RadioTab.css';
|
|
2
3
|
import { jsxs as u, jsx as a } from "react/jsx-runtime";
|
|
3
|
-
import { R as _ } from "./SQZLCNLX-
|
|
4
|
+
import { R as _ } from "./SQZLCNLX-Dg4KKdNJ.js";
|
|
4
5
|
import { forwardRef as d } from "react";
|
|
5
6
|
import { Button as y } from "./Button.js";
|
|
6
7
|
import { c as f } from "./index-PAaZGbyz.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { e as Y, h as $, g as Ce, c as q,
|
|
3
|
-
import { createContext as te, useRef as
|
|
4
|
-
import { u as ke } from "./2W3RN7C5-
|
|
5
|
-
import { g as ze } from "./RTNCFSKZ-
|
|
2
|
+
import { e as Y, h as $, g as Ce, c as q, X as xe, _ as G, l as X, d as S, v as J, a as P, r as Q, f as Z, b as ee, F as Se, u as D, aq as Pe, ar as F, j as O, al as we, p as j, as as he, at as Ee, k as ye, R as Te, au as Re, y as De } from "./OE2EFRVA-Dg1R6gaC.js";
|
|
3
|
+
import { createContext as te, useRef as _, useEffect as Fe, useContext as Oe, useCallback as _e, useMemo as Ae } from "react";
|
|
4
|
+
import { u as ke } from "./2W3RN7C5-DMC82gDP.js";
|
|
5
|
+
import { g as ze } from "./RTNCFSKZ-BywELldk.js";
|
|
6
6
|
import { jsx as Ke } from "react/jsx-runtime";
|
|
7
7
|
var w = Y(), Le = w.useContext;
|
|
8
8
|
w.useScopedContext;
|
|
@@ -14,21 +14,21 @@ var Ne = w.ContextProvider, Be = w.ScopedContextProvider, h = Y(
|
|
|
14
14
|
h.useScopedContext;
|
|
15
15
|
var at = h.useProviderContext, ut = h.ContextProvider, lt = h.ScopedContextProvider, He = te(
|
|
16
16
|
void 0
|
|
17
|
-
),
|
|
17
|
+
), Ue = te(
|
|
18
18
|
void 0
|
|
19
|
-
),
|
|
19
|
+
), Ve = { id: null };
|
|
20
20
|
function ct(r, n, o = !1) {
|
|
21
21
|
const t = r.findIndex((u) => u.id === n);
|
|
22
22
|
return [
|
|
23
23
|
...r.slice(t + 1),
|
|
24
|
-
...o ? [
|
|
24
|
+
...o ? [Ve] : [],
|
|
25
25
|
...r.slice(0, t)
|
|
26
26
|
];
|
|
27
27
|
}
|
|
28
28
|
function ft(r, n) {
|
|
29
29
|
return r.find((o) => !o.disabled);
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function je(r, n) {
|
|
32
32
|
return n && r.item(n) || null;
|
|
33
33
|
}
|
|
34
34
|
function dt(r) {
|
|
@@ -53,13 +53,13 @@ function We(r, n = !1) {
|
|
|
53
53
|
o == null || o.selectAllChildren(r), n && (o == null || o.collapseToEnd());
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
|
-
var
|
|
56
|
+
var A = Symbol("FOCUS_SILENTLY");
|
|
57
57
|
function Ye(r) {
|
|
58
|
-
r[
|
|
58
|
+
r[A] = !0, r.focus({ preventScroll: !0 });
|
|
59
59
|
}
|
|
60
60
|
function mt(r) {
|
|
61
|
-
const n = r[
|
|
62
|
-
return delete r[
|
|
61
|
+
const n = r[A];
|
|
62
|
+
return delete r[A], n;
|
|
63
63
|
}
|
|
64
64
|
function re(r, n, o) {
|
|
65
65
|
return !(!n || n === o || !r.item(n.id));
|
|
@@ -80,15 +80,15 @@ var $e = "div", ne = q(
|
|
|
80
80
|
]);
|
|
81
81
|
const c = Le();
|
|
82
82
|
t = t || c;
|
|
83
|
-
const m =
|
|
84
|
-
return
|
|
83
|
+
const m = X(v.id), p = _(g);
|
|
84
|
+
return Fe(() => {
|
|
85
85
|
const i = p.current;
|
|
86
86
|
if (!m || !i || !u) return;
|
|
87
87
|
const b = d({ id: m, element: i });
|
|
88
88
|
return t == null ? void 0 : t.renderItem(b);
|
|
89
89
|
}, [m, u, d, t]), v = S(P({}, v), {
|
|
90
|
-
ref:
|
|
91
|
-
}),
|
|
90
|
+
ref: J(p, v.ref)
|
|
91
|
+
}), Q(v);
|
|
92
92
|
}
|
|
93
93
|
);
|
|
94
94
|
Z(function(n) {
|
|
@@ -97,30 +97,30 @@ Z(function(n) {
|
|
|
97
97
|
});
|
|
98
98
|
var qe = "button";
|
|
99
99
|
function Ge(r) {
|
|
100
|
-
return
|
|
100
|
+
return F(r) ? !0 : r.tagName === "INPUT" && !Te(r);
|
|
101
101
|
}
|
|
102
|
-
function
|
|
102
|
+
function Xe(r, n = !1) {
|
|
103
103
|
const o = r.clientHeight, { top: t } = r.getBoundingClientRect(), u = Math.max(o * 0.875, o - 40) * 1.5, d = n ? o - u + t : u + t;
|
|
104
104
|
return r.tagName === "HTML" ? d + r.scrollTop : d;
|
|
105
105
|
}
|
|
106
|
-
function
|
|
106
|
+
function Je(r, n = !1) {
|
|
107
107
|
const { top: o } = r.getBoundingClientRect();
|
|
108
108
|
return n ? o + r.clientHeight : o;
|
|
109
109
|
}
|
|
110
110
|
function W(r, n, o, t = !1) {
|
|
111
111
|
var u;
|
|
112
112
|
if (!n || !o) return;
|
|
113
|
-
const { renderedItems: d } = n.getState(), g =
|
|
113
|
+
const { renderedItems: d } = n.getState(), g = Re(r);
|
|
114
114
|
if (!g) return;
|
|
115
|
-
const v =
|
|
115
|
+
const v = Xe(g, t);
|
|
116
116
|
let c, m;
|
|
117
117
|
for (let p = 0; p < d.length; p += 1) {
|
|
118
118
|
const i = c;
|
|
119
119
|
if (c = o(p), !c) break;
|
|
120
120
|
if (c === i) continue;
|
|
121
|
-
const b = (u =
|
|
121
|
+
const b = (u = je(n, c)) == null ? void 0 : u.element;
|
|
122
122
|
if (!b) continue;
|
|
123
|
-
const C =
|
|
123
|
+
const C = Je(b, t) - v, l = Math.abs(C);
|
|
124
124
|
if (t && C <= 0 || !t && C >= 0) {
|
|
125
125
|
m !== void 0 && m < l && (c = i);
|
|
126
126
|
break;
|
|
@@ -129,8 +129,8 @@ function W(r, n, o, t = !1) {
|
|
|
129
129
|
}
|
|
130
130
|
return c;
|
|
131
131
|
}
|
|
132
|
-
function
|
|
133
|
-
return
|
|
132
|
+
function Qe(r, n) {
|
|
133
|
+
return O(r) ? !1 : re(n, r.target);
|
|
134
134
|
}
|
|
135
135
|
var Ze = q(
|
|
136
136
|
function(n) {
|
|
@@ -155,7 +155,7 @@ var Ze = q(
|
|
|
155
155
|
]);
|
|
156
156
|
const b = Me();
|
|
157
157
|
t = t || b;
|
|
158
|
-
const f =
|
|
158
|
+
const f = X(i.id), C = _(null), l = Oe(Ue), k = Se(i) && !i.accessibleWhenDisabled, {
|
|
159
159
|
rowId: y,
|
|
160
160
|
baseElement: z,
|
|
161
161
|
isActiveItem: oe,
|
|
@@ -195,7 +195,7 @@ var Ze = q(
|
|
|
195
195
|
const s = t == null ? void 0 : t.item(e.activeId);
|
|
196
196
|
return s != null && s.disabled || !(s != null && s.element) ? !0 : e.activeId === f;
|
|
197
197
|
}
|
|
198
|
-
}), ue =
|
|
198
|
+
}), ue = _e(
|
|
199
199
|
(e) => {
|
|
200
200
|
var s;
|
|
201
201
|
const a = S(P({}, e), {
|
|
@@ -207,21 +207,21 @@ var Ze = q(
|
|
|
207
207
|
return c ? c(a) : a;
|
|
208
208
|
},
|
|
209
209
|
[f, y, k, c]
|
|
210
|
-
), K = i.onFocus, T =
|
|
211
|
-
if (K == null || K(e), e.defaultPrevented || Pe(e) || !f || !t ||
|
|
210
|
+
), K = i.onFocus, T = _(!1), le = D((e) => {
|
|
211
|
+
if (K == null || K(e), e.defaultPrevented || Pe(e) || !f || !t || Qe(e, t)) return;
|
|
212
212
|
const { virtualFocus: s, baseElement: a } = t.getState();
|
|
213
|
-
if (t.setActiveId(f),
|
|
213
|
+
if (t.setActiveId(f), F(e.currentTarget) && We(e.currentTarget), !s || !O(e) || Ge(e.currentTarget) || !(a != null && a.isConnected)) return;
|
|
214
214
|
we() && e.currentTarget.hasAttribute("data-autofocus") && e.currentTarget.scrollIntoView({
|
|
215
215
|
block: "nearest",
|
|
216
216
|
inline: "nearest"
|
|
217
217
|
}), T.current = !0, e.relatedTarget === a || re(t, e.relatedTarget) ? Ye(a) : a.focus();
|
|
218
|
-
}), L = i.onBlurCapture, ce =
|
|
218
|
+
}), L = i.onBlurCapture, ce = D((e) => {
|
|
219
219
|
if (L == null || L(e), e.defaultPrevented) return;
|
|
220
220
|
const s = t == null ? void 0 : t.getState();
|
|
221
221
|
s != null && s.virtualFocus && T.current && (T.current = !1, e.preventDefault(), e.stopPropagation());
|
|
222
|
-
}), N = i.onKeyDown, fe =
|
|
223
|
-
if (N == null || N(e), e.defaultPrevented || !
|
|
224
|
-
const { currentTarget: s } = e, a = t.getState(),
|
|
222
|
+
}), N = i.onKeyDown, fe = j(d), de = j(g), me = D((e) => {
|
|
223
|
+
if (N == null || N(e), e.defaultPrevented || !O(e) || !t) return;
|
|
224
|
+
const { currentTarget: s } = e, a = t.getState(), R = t.item(f), I = !!(R != null && R.rowId), E = a.orientation !== "horizontal", x = a.orientation !== "vertical", M = () => !!(I || x || !a.baseElement || !$(a.baseElement)), H = {
|
|
225
225
|
ArrowUp: (I || E) && t.up,
|
|
226
226
|
ArrowRight: (I || x) && t.next,
|
|
227
227
|
ArrowDown: (I || E) && t.down,
|
|
@@ -238,20 +238,20 @@ var Ze = q(
|
|
|
238
238
|
PageDown: () => W(s, t, t == null ? void 0 : t.down)
|
|
239
239
|
}[e.key];
|
|
240
240
|
if (H) {
|
|
241
|
-
if (
|
|
242
|
-
const
|
|
241
|
+
if (F(s)) {
|
|
242
|
+
const V = he(s), ve = x && e.key === "ArrowLeft", pe = x && e.key === "ArrowRight", Ie = E && e.key === "ArrowUp", ge = E && e.key === "ArrowDown";
|
|
243
243
|
if (pe || ge) {
|
|
244
244
|
const { length: be } = Ee(s);
|
|
245
|
-
if (
|
|
246
|
-
} else if ((ve || Ie) &&
|
|
245
|
+
if (V.end !== be) return;
|
|
246
|
+
} else if ((ve || Ie) && V.start !== 0) return;
|
|
247
247
|
}
|
|
248
|
-
const
|
|
249
|
-
if (fe(e) ||
|
|
248
|
+
const U = H();
|
|
249
|
+
if (fe(e) || U !== void 0) {
|
|
250
250
|
if (!de(e)) return;
|
|
251
|
-
e.preventDefault(), t.move(
|
|
251
|
+
e.preventDefault(), t.move(U);
|
|
252
252
|
}
|
|
253
253
|
}
|
|
254
|
-
}), B =
|
|
254
|
+
}), B = Ae(
|
|
255
255
|
() => ({ id: f, baseElement: z }),
|
|
256
256
|
[f, z]
|
|
257
257
|
);
|
|
@@ -263,7 +263,7 @@ var Ze = q(
|
|
|
263
263
|
id: f,
|
|
264
264
|
"data-active-item": oe || void 0
|
|
265
265
|
}, i), {
|
|
266
|
-
ref:
|
|
266
|
+
ref: J(C, i.ref),
|
|
267
267
|
tabIndex: ae ? i.tabIndex : -1,
|
|
268
268
|
onFocus: le,
|
|
269
269
|
onBlurCapture: ce,
|
|
@@ -273,12 +273,12 @@ var Ze = q(
|
|
|
273
273
|
}, i), {
|
|
274
274
|
getItem: ue,
|
|
275
275
|
shouldRegisterItem: f ? i.shouldRegisterItem : !1
|
|
276
|
-
})),
|
|
276
|
+
})), Q(S(P({}, i), {
|
|
277
277
|
"aria-setsize": ie,
|
|
278
278
|
"aria-posinset": se
|
|
279
279
|
}));
|
|
280
280
|
}
|
|
281
|
-
), vt =
|
|
281
|
+
), vt = De(
|
|
282
282
|
Z(function(n) {
|
|
283
283
|
const o = Ze(n);
|
|
284
284
|
return ee(qe, o);
|
|
@@ -292,7 +292,7 @@ export {
|
|
|
292
292
|
ft as d,
|
|
293
293
|
dt as e,
|
|
294
294
|
ct as f,
|
|
295
|
-
|
|
295
|
+
je as g,
|
|
296
296
|
vt as h,
|
|
297
297
|
re as i,
|
|
298
298
|
ne as j,
|