@alixpartners/ui-components 2.6.1 → 2.6.2
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/{RichTextEditor-JH6YBGiw.js → RichTextEditor-xCakhho7.js} +1 -1
- package/dist/{ToastProvider-DVycF0zU.js → ToastProvider-D5LImZ-Q.js} +26 -26
- package/dist/components/Banner/Banner.d.ts +1 -1
- package/dist/components/Banner/Banner.test.js +1 -1
- package/dist/components/Button/Button.d.ts +1 -1
- package/dist/components/Button/Button.test.js +2 -2
- package/dist/components/Checkbox/Checkbox.d.ts +1 -1
- package/dist/components/Checkbox/Checkbox.js +3 -3
- package/dist/components/Checkbox/Checkbox.test.js +1 -1
- package/dist/components/CorusHeader/CorusHeader.d.ts +1 -1
- package/dist/components/CorusHeader/CorusHeader.js +1 -1
- package/dist/components/CorusHeader/DropdownItemContent.d.ts +1 -1
- package/dist/components/CorusHeader/DropdownItemContent.js +5 -5
- package/dist/components/CorusHeader/DropdownMenu.d.ts +1 -1
- package/dist/components/CorusHeader/DropdownMenu.js +1 -1
- package/dist/components/CorusHeader/MegaMenuContent.d.ts +1 -1
- package/dist/components/CorusHeader/MegaMenuContent.js +14 -14
- package/dist/components/CorusHeader/UserProfileIcon.d.ts +1 -1
- package/dist/components/Creatable/Creatable.d.ts +1 -1
- package/dist/components/Creatable/Creatable.js +1 -1
- package/dist/components/Datepicker/Datepicker.d.ts +1 -1
- package/dist/components/Datepicker/Datepicker.js +1 -1
- package/dist/components/Datepicker/Datepicker.test.js +1 -1
- package/dist/components/Dialog/Dialog.d.ts +1 -1
- package/dist/components/Dialog/Dialog.js +204 -178
- package/dist/components/Dialog/Dialog.test.js +1 -1
- package/dist/components/DragAndDrop/DragAndDrop.d.ts +1 -1
- package/dist/components/DragAndDrop/DragAndDrop.test.js +2 -2
- package/dist/components/Dropdown/Dropdown.d.ts +1 -1
- package/dist/components/Dropdown/Dropdown.js +1 -1
- package/dist/components/FilePicker/FilePicker.d.ts +9 -9
- package/dist/components/FilePicker/FilePicker.test.js +2 -2
- package/dist/components/Ghost/Ghost.d.ts +1 -1
- package/dist/components/Ghost/Ghost.test.js +1 -1
- package/dist/components/Icon/Icon.d.ts +1 -1
- package/dist/components/Icons/IconsGallery.d.ts +1 -1
- package/dist/components/Illustration/Illustration.d.ts +1 -1
- package/dist/components/Illustration/Illustration.test.js +1 -1
- package/dist/components/Input/Input.test.js +1 -1
- package/dist/components/Logo/Logo.d.ts +1 -1
- package/dist/components/Logos/LogosGallery.d.ts +1 -1
- package/dist/components/NavBar/NavBar.d.ts +1 -1
- package/dist/components/NavBar/NavBar.js +1 -1
- package/dist/components/Radio/Radio.d.ts +1 -1
- package/dist/components/Radio/Radio.js +9 -9
- package/dist/components/RadioGroup/RadioGroup.d.ts +1 -1
- package/dist/components/RadioGroup/RadioGroup.js +11 -11
- package/dist/components/RadioGroup/RadioGroup.test.js +1 -1
- package/dist/components/RichTextEditor/RichTextEditor.d.ts +1 -1
- package/dist/components/RichTextEditor/RichTextEditor.js +2 -2
- package/dist/components/RichTextEditor/RichTextEditor.test.js +2 -2
- package/dist/components/Search/Search.d.ts +1 -1
- package/dist/components/Search/Search.test.js +1 -1
- package/dist/components/Spinner/Spinner.d.ts +1 -1
- package/dist/components/SplitButton/SplitButton.d.ts +1 -1
- package/dist/components/SplitButton/SplitButton.js +3 -3
- package/dist/components/SplitButton/SplitButton.test.js +1 -1
- package/dist/components/Tab/Tab.d.ts +1 -1
- package/dist/components/TabNavigation/TabNavigation.d.ts +1 -1
- package/dist/components/Tag/Tag.d.ts +1 -1
- package/dist/components/Tag/Tag.test.js +1 -1
- package/dist/components/TagsFields/TagsFields.d.ts +1 -1
- package/dist/components/TagsFields/TagsFields.js +1 -1
- package/dist/components/Textarea/Textarea.d.ts +1 -1
- package/dist/components/Textarea/Textarea.test.js +1 -1
- package/dist/components/Toast/Toast.test.js +1 -1
- package/dist/components/ToastProvider/ToastProvider.d.ts +1 -2
- package/dist/components/ToastProvider/ToastProvider.js +1 -1
- package/dist/components/ToastProvider/ToastProvider.test.js +4 -4
- package/dist/components/Toggle/Toggle.d.ts +1 -1
- package/dist/components/Toggle/Toggle.js +126 -211
- package/dist/components/Toggle/Toggle.test.js +1 -1
- package/dist/components/Tooltip/Tooltip.d.ts +1 -1
- package/dist/components/Tooltip/Tooltip.js +61 -60
- package/dist/{index-6DGSlWJb.js → index-C2s_VtSb.js} +3 -3
- package/dist/index-C8H9A55g.js +222 -0
- package/dist/{index-CcsZYEYy.js → index-CCFDXH-J.js} +28 -29
- package/dist/index-CCnm5-ML.js +230 -0
- package/dist/{index-BVZdJVFB.js → index-CFqDEbIR.js} +191 -192
- package/dist/index-CfIcUHKK.js +70 -0
- package/dist/index-ChQc_Cm6.js +1544 -0
- package/dist/index-CmGGeUr0.js +142 -0
- package/dist/{index-IR8HlW5P.js → index-D_L0ncPJ.js} +4 -4
- package/dist/{index-banDzeKa.js → index-DkTDHhag.js} +1 -1
- package/dist/index-Ii4UOx3H.js +599 -0
- package/dist/{index-6j3vTf--.js → index-Nyh2Wa71.js} +5 -5
- package/dist/index-z_kiwVc3.js +237 -0
- package/dist/main.js +3 -3
- package/dist/storybook-docs-page.d.ts +1 -1
- package/dist/{useToast-CpwrYPvx.js → useToast-Cz5MGKnw.js} +1 -1
- package/dist/{vi.bdSIJ99Y-DWCVXj6K.js → vi.bdSIJ99Y-017e_Pkz.js} +3 -3
- package/package.json +1 -1
- package/dist/index-B4szHVNJ.js +0 -248
- package/dist/index-Bq1FiX6B.js +0 -93
- package/dist/index-CE9NpYQR.js +0 -604
- package/dist/index-CHy8gqvu.js +0 -353
- package/dist/index-CarlZuEo.js +0 -1610
- package/dist/index-DH9SO8qV.js +0 -221
- package/dist/index-kgC_DL6e.js +0 -216
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as i from "react";
|
|
2
|
-
import { u as G,
|
|
3
|
-
import { P as $, D as j } from "./index-
|
|
4
|
-
import { h as U, R as V, u as W, F as Z } from "./index-
|
|
5
|
-
import { u as q } from "./index-
|
|
6
|
-
import { R as z, A as x, c as w, C as B, a as J } from "./index-
|
|
7
|
-
import { P as E } from "./index-
|
|
8
|
-
import { jsx as
|
|
2
|
+
import { u as G, d as O, P as _, c as P, b as H, e as K } from "./index-z_kiwVc3.js";
|
|
3
|
+
import { P as $, D as j } from "./index-CmGGeUr0.js";
|
|
4
|
+
import { h as U, R as V, u as W, F as Z } from "./index-CFqDEbIR.js";
|
|
5
|
+
import { u as q } from "./index-C2s_VtSb.js";
|
|
6
|
+
import { R as z, A as x, c as w, C as B, a as J } from "./index-ChQc_Cm6.js";
|
|
7
|
+
import { P as E } from "./index-CfIcUHKK.js";
|
|
8
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
9
9
|
var m = "Popover", [b] = H(m, [
|
|
10
10
|
w
|
|
11
11
|
]), g = w(), [Q, d] = b(m), F = (e) => {
|
|
@@ -16,18 +16,18 @@ var m = "Popover", [b] = H(m, [
|
|
|
16
16
|
defaultOpen: o,
|
|
17
17
|
onOpenChange: r,
|
|
18
18
|
modal: s = !1
|
|
19
|
-
} = e, c = g(n),
|
|
19
|
+
} = e, c = g(n), u = i.useRef(null), [l, h] = i.useState(!1), [C, f] = G({
|
|
20
20
|
prop: a,
|
|
21
21
|
defaultProp: o ?? !1,
|
|
22
22
|
onChange: r,
|
|
23
23
|
caller: m
|
|
24
24
|
});
|
|
25
|
-
return /* @__PURE__ */
|
|
25
|
+
return /* @__PURE__ */ p(z, { ...c, children: /* @__PURE__ */ p(
|
|
26
26
|
Q,
|
|
27
27
|
{
|
|
28
28
|
scope: n,
|
|
29
29
|
contentId: q(),
|
|
30
|
-
triggerRef:
|
|
30
|
+
triggerRef: u,
|
|
31
31
|
open: C,
|
|
32
32
|
onOpenChange: f,
|
|
33
33
|
onOpenToggle: i.useCallback(() => f((R) => !R), [f]),
|
|
@@ -43,26 +43,26 @@ F.displayName = m;
|
|
|
43
43
|
var N = "PopoverAnchor", S = i.forwardRef(
|
|
44
44
|
(e, n) => {
|
|
45
45
|
const { __scopePopover: t, ...a } = e, o = d(N, t), r = g(t), { onCustomAnchorAdd: s, onCustomAnchorRemove: c } = o;
|
|
46
|
-
return i.useEffect(() => (s(), () => c()), [s, c]), /* @__PURE__ */
|
|
46
|
+
return i.useEffect(() => (s(), () => c()), [s, c]), /* @__PURE__ */ p(x, { ...r, ...a, ref: n });
|
|
47
47
|
}
|
|
48
48
|
);
|
|
49
49
|
S.displayName = N;
|
|
50
50
|
var y = "PopoverTrigger", D = i.forwardRef(
|
|
51
51
|
(e, n) => {
|
|
52
|
-
const { __scopePopover: t, ...a } = e, o = d(y, t), r = g(t), s = O(n, o.triggerRef), c = /* @__PURE__ */
|
|
52
|
+
const { __scopePopover: t, ...a } = e, o = d(y, t), r = g(t), s = O(n, o.triggerRef), c = /* @__PURE__ */ p(
|
|
53
53
|
_.button,
|
|
54
54
|
{
|
|
55
55
|
type: "button",
|
|
56
56
|
"aria-haspopup": "dialog",
|
|
57
57
|
"aria-expanded": o.open,
|
|
58
|
-
"aria-controls": o.
|
|
58
|
+
"aria-controls": o.contentId,
|
|
59
59
|
"data-state": L(o.open),
|
|
60
60
|
...a,
|
|
61
61
|
ref: s,
|
|
62
62
|
onClick: P(e.onClick, o.onOpenToggle)
|
|
63
63
|
}
|
|
64
64
|
);
|
|
65
|
-
return o.hasCustomAnchor ? c : /* @__PURE__ */
|
|
65
|
+
return o.hasCustomAnchor ? c : /* @__PURE__ */ p(x, { asChild: !0, ...r, children: c });
|
|
66
66
|
}
|
|
67
67
|
);
|
|
68
68
|
D.displayName = y;
|
|
@@ -70,13 +70,13 @@ var A = "PopoverPortal", [X, Y] = b(A, {
|
|
|
70
70
|
forceMount: void 0
|
|
71
71
|
}), M = (e) => {
|
|
72
72
|
const { __scopePopover: n, forceMount: t, children: a, container: o } = e, r = d(A, n);
|
|
73
|
-
return /* @__PURE__ */
|
|
73
|
+
return /* @__PURE__ */ p(X, { scope: n, forceMount: t, children: /* @__PURE__ */ p(E, { present: t || r.open, children: /* @__PURE__ */ p($, { asChild: !0, container: o, children: a }) }) });
|
|
74
74
|
};
|
|
75
75
|
M.displayName = A;
|
|
76
76
|
var v = "PopoverContent", T = i.forwardRef(
|
|
77
77
|
(e, n) => {
|
|
78
78
|
const t = Y(v, e.__scopePopover), { forceMount: a = t.forceMount, ...o } = e, r = d(v, e.__scopePopover);
|
|
79
|
-
return /* @__PURE__ */
|
|
79
|
+
return /* @__PURE__ */ p(E, { present: a || r.open, children: r.modal ? /* @__PURE__ */ p(oe, { ...o, ref: n }) : /* @__PURE__ */ p(re, { ...o, ref: n }) });
|
|
80
80
|
}
|
|
81
81
|
);
|
|
82
82
|
T.displayName = v;
|
|
@@ -86,7 +86,7 @@ var ee = K("PopoverContent.RemoveScroll"), oe = i.forwardRef(
|
|
|
86
86
|
return i.useEffect(() => {
|
|
87
87
|
const s = a.current;
|
|
88
88
|
if (s) return U(s);
|
|
89
|
-
}, []), /* @__PURE__ */
|
|
89
|
+
}, []), /* @__PURE__ */ p(V, { as: ee, allowPinchZoom: !0, children: /* @__PURE__ */ p(
|
|
90
90
|
k,
|
|
91
91
|
{
|
|
92
92
|
...e,
|
|
@@ -100,7 +100,7 @@ var ee = K("PopoverContent.RemoveScroll"), oe = i.forwardRef(
|
|
|
100
100
|
onPointerDownOutside: P(
|
|
101
101
|
e.onPointerDownOutside,
|
|
102
102
|
(s) => {
|
|
103
|
-
const c = s.detail.originalEvent,
|
|
103
|
+
const c = s.detail.originalEvent, u = c.button === 0 && c.ctrlKey === !0, l = c.button === 2 || u;
|
|
104
104
|
r.current = l;
|
|
105
105
|
},
|
|
106
106
|
{ checkForDefaultPrevented: !1 }
|
|
@@ -116,7 +116,7 @@ var ee = K("PopoverContent.RemoveScroll"), oe = i.forwardRef(
|
|
|
116
116
|
), re = i.forwardRef(
|
|
117
117
|
(e, n) => {
|
|
118
118
|
const t = d(v, e.__scopePopover), a = i.useRef(!1), o = i.useRef(!1);
|
|
119
|
-
return /* @__PURE__ */
|
|
119
|
+
return /* @__PURE__ */ p(
|
|
120
120
|
k,
|
|
121
121
|
{
|
|
122
122
|
...e,
|
|
@@ -128,8 +128,8 @@ var ee = K("PopoverContent.RemoveScroll"), oe = i.forwardRef(
|
|
|
128
128
|
(s = e.onCloseAutoFocus) == null || s.call(e, r), r.defaultPrevented || (a.current || (c = t.triggerRef.current) == null || c.focus(), r.preventDefault()), a.current = !1, o.current = !1;
|
|
129
129
|
},
|
|
130
130
|
onInteractOutside: (r) => {
|
|
131
|
-
var
|
|
132
|
-
(
|
|
131
|
+
var u, l;
|
|
132
|
+
(u = e.onInteractOutside) == null || u.call(e, r), r.defaultPrevented || (a.current = !0, r.detail.originalEvent.type === "pointerdown" && (o.current = !0));
|
|
133
133
|
const s = r.target;
|
|
134
134
|
((l = t.triggerRef.current) == null ? void 0 : l.contains(s)) && r.preventDefault(), r.detail.originalEvent.type === "focusin" && o.current && r.preventDefault();
|
|
135
135
|
}
|
|
@@ -145,12 +145,12 @@ var ee = K("PopoverContent.RemoveScroll"), oe = i.forwardRef(
|
|
|
145
145
|
onCloseAutoFocus: r,
|
|
146
146
|
disableOutsidePointerEvents: s,
|
|
147
147
|
onEscapeKeyDown: c,
|
|
148
|
-
onPointerDownOutside:
|
|
148
|
+
onPointerDownOutside: u,
|
|
149
149
|
onFocusOutside: l,
|
|
150
150
|
onInteractOutside: h,
|
|
151
151
|
...C
|
|
152
152
|
} = e, f = d(v, t), R = g(t);
|
|
153
|
-
return W(), /* @__PURE__ */
|
|
153
|
+
return W(), /* @__PURE__ */ p(
|
|
154
154
|
Z,
|
|
155
155
|
{
|
|
156
156
|
asChild: !0,
|
|
@@ -158,18 +158,17 @@ var ee = K("PopoverContent.RemoveScroll"), oe = i.forwardRef(
|
|
|
158
158
|
trapped: a,
|
|
159
159
|
onMountAutoFocus: o,
|
|
160
160
|
onUnmountAutoFocus: r,
|
|
161
|
-
children: /* @__PURE__ */
|
|
161
|
+
children: /* @__PURE__ */ p(
|
|
162
162
|
j,
|
|
163
163
|
{
|
|
164
164
|
asChild: !0,
|
|
165
165
|
disableOutsidePointerEvents: s,
|
|
166
166
|
onInteractOutside: h,
|
|
167
167
|
onEscapeKeyDown: c,
|
|
168
|
-
onPointerDownOutside:
|
|
168
|
+
onPointerDownOutside: u,
|
|
169
169
|
onFocusOutside: l,
|
|
170
170
|
onDismiss: () => f.onOpenChange(!1),
|
|
171
|
-
|
|
172
|
-
children: /* @__PURE__ */ u(
|
|
171
|
+
children: /* @__PURE__ */ p(
|
|
173
172
|
B,
|
|
174
173
|
{
|
|
175
174
|
"data-state": L(f.open),
|
|
@@ -196,7 +195,7 @@ var ee = K("PopoverContent.RemoveScroll"), oe = i.forwardRef(
|
|
|
196
195
|
), I = "PopoverClose", te = i.forwardRef(
|
|
197
196
|
(e, n) => {
|
|
198
197
|
const { __scopePopover: t, ...a } = e, o = d(I, t);
|
|
199
|
-
return /* @__PURE__ */
|
|
198
|
+
return /* @__PURE__ */ p(
|
|
200
199
|
_.button,
|
|
201
200
|
{
|
|
202
201
|
type: "button",
|
|
@@ -211,7 +210,7 @@ te.displayName = I;
|
|
|
211
210
|
var ne = "PopoverArrow", ae = i.forwardRef(
|
|
212
211
|
(e, n) => {
|
|
213
212
|
const { __scopePopover: t, ...a } = e, o = g(t);
|
|
214
|
-
return /* @__PURE__ */
|
|
213
|
+
return /* @__PURE__ */ p(J, { ...o, ...a, ref: n });
|
|
215
214
|
}
|
|
216
215
|
);
|
|
217
216
|
ae.displayName = ne;
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
import * as s from "react";
|
|
2
|
+
import { d as P, c as C, u as B, P as b, b as _ } from "./index-z_kiwVc3.js";
|
|
3
|
+
import { I as q, u as K, R as T, c as w } from "./index-C8H9A55g.js";
|
|
4
|
+
import { u as U } from "./index-Nyh2Wa71.js";
|
|
5
|
+
import { u as V } from "./index-BZPx6jYI.js";
|
|
6
|
+
import { P as j } from "./index-CfIcUHKK.js";
|
|
7
|
+
import { jsx as p, jsxs as z } from "react/jsx-runtime";
|
|
8
|
+
var E = "Radio", [H, g] = _(E), [W, X] = H(E), k = s.forwardRef(
|
|
9
|
+
(a, d) => {
|
|
10
|
+
const {
|
|
11
|
+
__scopeRadio: o,
|
|
12
|
+
name: i,
|
|
13
|
+
checked: e = !1,
|
|
14
|
+
required: r,
|
|
15
|
+
disabled: n,
|
|
16
|
+
value: f = "on",
|
|
17
|
+
onCheck: c,
|
|
18
|
+
form: R,
|
|
19
|
+
...v
|
|
20
|
+
} = a, [l, m] = s.useState(null), t = P(d, (y) => m(y)), u = s.useRef(!1), h = l ? R || !!l.closest("form") : !0;
|
|
21
|
+
return /* @__PURE__ */ z(W, { scope: o, checked: e, disabled: n, children: [
|
|
22
|
+
/* @__PURE__ */ p(
|
|
23
|
+
b.button,
|
|
24
|
+
{
|
|
25
|
+
type: "button",
|
|
26
|
+
role: "radio",
|
|
27
|
+
"aria-checked": e,
|
|
28
|
+
"data-state": N(e),
|
|
29
|
+
"data-disabled": n ? "" : void 0,
|
|
30
|
+
disabled: n,
|
|
31
|
+
value: f,
|
|
32
|
+
...v,
|
|
33
|
+
ref: t,
|
|
34
|
+
onClick: C(a.onClick, (y) => {
|
|
35
|
+
e || c == null || c(), h && (u.current = y.isPropagationStopped(), u.current || y.stopPropagation());
|
|
36
|
+
})
|
|
37
|
+
}
|
|
38
|
+
),
|
|
39
|
+
h && /* @__PURE__ */ p(
|
|
40
|
+
A,
|
|
41
|
+
{
|
|
42
|
+
control: l,
|
|
43
|
+
bubbles: !u.current,
|
|
44
|
+
name: i,
|
|
45
|
+
value: f,
|
|
46
|
+
checked: e,
|
|
47
|
+
required: r,
|
|
48
|
+
disabled: n,
|
|
49
|
+
form: R,
|
|
50
|
+
style: { transform: "translateX(-100%)" }
|
|
51
|
+
}
|
|
52
|
+
)
|
|
53
|
+
] });
|
|
54
|
+
}
|
|
55
|
+
);
|
|
56
|
+
k.displayName = E;
|
|
57
|
+
var G = "RadioIndicator", S = s.forwardRef(
|
|
58
|
+
(a, d) => {
|
|
59
|
+
const { __scopeRadio: o, forceMount: i, ...e } = a, r = X(G, o);
|
|
60
|
+
return /* @__PURE__ */ p(j, { present: i || r.checked, children: /* @__PURE__ */ p(
|
|
61
|
+
b.span,
|
|
62
|
+
{
|
|
63
|
+
"data-state": N(r.checked),
|
|
64
|
+
"data-disabled": r.disabled ? "" : void 0,
|
|
65
|
+
...e,
|
|
66
|
+
ref: d
|
|
67
|
+
}
|
|
68
|
+
) });
|
|
69
|
+
}
|
|
70
|
+
);
|
|
71
|
+
S.displayName = G;
|
|
72
|
+
var Y = "RadioBubbleInput", A = s.forwardRef(
|
|
73
|
+
({
|
|
74
|
+
__scopeRadio: a,
|
|
75
|
+
control: d,
|
|
76
|
+
checked: o,
|
|
77
|
+
bubbles: i = !0,
|
|
78
|
+
...e
|
|
79
|
+
}, r) => {
|
|
80
|
+
const n = s.useRef(null), f = P(n, r), c = V(o), R = U(d);
|
|
81
|
+
return s.useEffect(() => {
|
|
82
|
+
const v = n.current;
|
|
83
|
+
if (!v) return;
|
|
84
|
+
const l = window.HTMLInputElement.prototype, t = Object.getOwnPropertyDescriptor(
|
|
85
|
+
l,
|
|
86
|
+
"checked"
|
|
87
|
+
).set;
|
|
88
|
+
if (c !== o && t) {
|
|
89
|
+
const u = new Event("click", { bubbles: i });
|
|
90
|
+
t.call(v, o), v.dispatchEvent(u);
|
|
91
|
+
}
|
|
92
|
+
}, [c, o, i]), /* @__PURE__ */ p(
|
|
93
|
+
b.input,
|
|
94
|
+
{
|
|
95
|
+
type: "radio",
|
|
96
|
+
"aria-hidden": !0,
|
|
97
|
+
defaultChecked: o,
|
|
98
|
+
...e,
|
|
99
|
+
tabIndex: -1,
|
|
100
|
+
ref: f,
|
|
101
|
+
style: {
|
|
102
|
+
...e.style,
|
|
103
|
+
...R,
|
|
104
|
+
position: "absolute",
|
|
105
|
+
pointerEvents: "none",
|
|
106
|
+
opacity: 0,
|
|
107
|
+
margin: 0
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
);
|
|
111
|
+
}
|
|
112
|
+
);
|
|
113
|
+
A.displayName = Y;
|
|
114
|
+
function N(a) {
|
|
115
|
+
return a ? "checked" : "unchecked";
|
|
116
|
+
}
|
|
117
|
+
var J = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], I = "RadioGroup", [Q] = _(I, [
|
|
118
|
+
w,
|
|
119
|
+
g
|
|
120
|
+
]), x = w(), D = g(), [Z, $] = Q(I), M = s.forwardRef(
|
|
121
|
+
(a, d) => {
|
|
122
|
+
const {
|
|
123
|
+
__scopeRadioGroup: o,
|
|
124
|
+
name: i,
|
|
125
|
+
defaultValue: e,
|
|
126
|
+
value: r,
|
|
127
|
+
required: n = !1,
|
|
128
|
+
disabled: f = !1,
|
|
129
|
+
orientation: c,
|
|
130
|
+
dir: R,
|
|
131
|
+
loop: v = !0,
|
|
132
|
+
onValueChange: l,
|
|
133
|
+
...m
|
|
134
|
+
} = a, t = x(o), u = K(R), [h, y] = B({
|
|
135
|
+
prop: r,
|
|
136
|
+
defaultProp: e ?? null,
|
|
137
|
+
onChange: l,
|
|
138
|
+
caller: I
|
|
139
|
+
});
|
|
140
|
+
return /* @__PURE__ */ p(
|
|
141
|
+
Z,
|
|
142
|
+
{
|
|
143
|
+
scope: o,
|
|
144
|
+
name: i,
|
|
145
|
+
required: n,
|
|
146
|
+
disabled: f,
|
|
147
|
+
value: h,
|
|
148
|
+
onValueChange: y,
|
|
149
|
+
children: /* @__PURE__ */ p(
|
|
150
|
+
T,
|
|
151
|
+
{
|
|
152
|
+
asChild: !0,
|
|
153
|
+
...t,
|
|
154
|
+
orientation: c,
|
|
155
|
+
dir: u,
|
|
156
|
+
loop: v,
|
|
157
|
+
children: /* @__PURE__ */ p(
|
|
158
|
+
b.div,
|
|
159
|
+
{
|
|
160
|
+
role: "radiogroup",
|
|
161
|
+
"aria-required": n,
|
|
162
|
+
"aria-orientation": c,
|
|
163
|
+
"data-disabled": f ? "" : void 0,
|
|
164
|
+
dir: u,
|
|
165
|
+
...m,
|
|
166
|
+
ref: d
|
|
167
|
+
}
|
|
168
|
+
)
|
|
169
|
+
}
|
|
170
|
+
)
|
|
171
|
+
}
|
|
172
|
+
);
|
|
173
|
+
}
|
|
174
|
+
);
|
|
175
|
+
M.displayName = I;
|
|
176
|
+
var O = "RadioGroupItem", F = s.forwardRef(
|
|
177
|
+
(a, d) => {
|
|
178
|
+
const { __scopeRadioGroup: o, disabled: i, ...e } = a, r = $(O, o), n = r.disabled || i, f = x(o), c = D(o), R = s.useRef(null), v = P(d, R), l = r.value === e.value, m = s.useRef(!1);
|
|
179
|
+
return s.useEffect(() => {
|
|
180
|
+
const t = (h) => {
|
|
181
|
+
J.includes(h.key) && (m.current = !0);
|
|
182
|
+
}, u = () => m.current = !1;
|
|
183
|
+
return document.addEventListener("keydown", t), document.addEventListener("keyup", u), () => {
|
|
184
|
+
document.removeEventListener("keydown", t), document.removeEventListener("keyup", u);
|
|
185
|
+
};
|
|
186
|
+
}, []), /* @__PURE__ */ p(
|
|
187
|
+
q,
|
|
188
|
+
{
|
|
189
|
+
asChild: !0,
|
|
190
|
+
...f,
|
|
191
|
+
focusable: !n,
|
|
192
|
+
active: l,
|
|
193
|
+
children: /* @__PURE__ */ p(
|
|
194
|
+
k,
|
|
195
|
+
{
|
|
196
|
+
disabled: n,
|
|
197
|
+
required: r.required,
|
|
198
|
+
checked: l,
|
|
199
|
+
...c,
|
|
200
|
+
...e,
|
|
201
|
+
name: r.name,
|
|
202
|
+
ref: v,
|
|
203
|
+
onCheck: () => r.onValueChange(e.value),
|
|
204
|
+
onKeyDown: C((t) => {
|
|
205
|
+
t.key === "Enter" && t.preventDefault();
|
|
206
|
+
}),
|
|
207
|
+
onFocus: C(e.onFocus, () => {
|
|
208
|
+
var t;
|
|
209
|
+
m.current && ((t = R.current) == null || t.click());
|
|
210
|
+
})
|
|
211
|
+
}
|
|
212
|
+
)
|
|
213
|
+
}
|
|
214
|
+
);
|
|
215
|
+
}
|
|
216
|
+
);
|
|
217
|
+
F.displayName = O;
|
|
218
|
+
var ee = "RadioGroupIndicator", L = s.forwardRef(
|
|
219
|
+
(a, d) => {
|
|
220
|
+
const { __scopeRadioGroup: o, ...i } = a, e = D(o);
|
|
221
|
+
return /* @__PURE__ */ p(S, { ...e, ...i, ref: d });
|
|
222
|
+
}
|
|
223
|
+
);
|
|
224
|
+
L.displayName = ee;
|
|
225
|
+
var ie = M, de = F, ce = L;
|
|
226
|
+
export {
|
|
227
|
+
de as I,
|
|
228
|
+
ie as R,
|
|
229
|
+
ce as a
|
|
230
|
+
};
|