@alixpartners/ui-components 2.5.6 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/RichTextEditor-JH6YBGiw.js +541 -0
- package/dist/{ToastProvider-D5LImZ-Q.js → ToastProvider-DVycF0zU.js} +26 -26
- package/dist/assets/CorusHeader.css +1 -1
- package/dist/assets/Tab.css +1 -1
- package/dist/assets/Tag.css +1 -1
- package/dist/assets/ap-icons-types.d.ts +1 -1
- package/dist/assets/ap-icons.d.ts +1 -1
- package/dist/assets/main.css +1 -1
- 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 +45 -44
- package/dist/components/CorusHeader/CorusHeader.types.d.ts +1 -0
- package/dist/components/CorusHeader/DropdownItemContent.d.ts +1 -1
- package/dist/components/CorusHeader/DropdownMenu.d.ts +2 -1
- package/dist/components/CorusHeader/DropdownMenu.js +6 -5
- package/dist/components/CorusHeader/MegaMenuContent.d.ts +2 -1
- package/dist/components/CorusHeader/MegaMenuContent.js +11 -10
- 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 +188 -214
- 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 +3 -1
- package/dist/components/Dropdown/Dropdown.js +179 -172
- 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/Icons/IconsGallery.js +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 +5 -1
- package/dist/components/Tab/Tab.js +28 -24
- package/dist/components/TabNavigation/TabNavigation.d.ts +1 -1
- package/dist/components/Tag/Tag.d.ts +1 -1
- package/dist/components/Tag/Tag.js +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 +2 -1
- 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 +211 -126
- package/dist/components/Toggle/Toggle.test.js +1 -1
- package/dist/components/Tooltip/Tooltip.d.ts +1 -1
- package/dist/components/Tooltip/Tooltip.js +60 -61
- package/dist/{index-C2s_VtSb.js → index-6DGSlWJb.js} +3 -3
- package/dist/{index-Nyh2Wa71.js → index-6j3vTf--.js} +5 -5
- package/dist/index-B4szHVNJ.js +248 -0
- package/dist/{index-CFqDEbIR.js → index-BVZdJVFB.js} +192 -191
- package/dist/index-Bq1FiX6B.js +93 -0
- package/dist/index-CE9NpYQR.js +604 -0
- package/dist/index-CHy8gqvu.js +353 -0
- package/dist/index-CarlZuEo.js +1610 -0
- package/dist/{index-CCFDXH-J.js → index-CcsZYEYy.js} +29 -28
- package/dist/index-DH9SO8qV.js +221 -0
- package/dist/{index-D_L0ncPJ.js → index-IR8HlW5P.js} +4 -4
- package/dist/{index-DkTDHhag.js → index-banDzeKa.js} +1 -1
- package/dist/index-kgC_DL6e.js +216 -0
- package/dist/main.js +3 -3
- package/dist/storybook-docs-page.d.ts +1 -1
- package/dist/{useToast-Cz5MGKnw.js → useToast-CpwrYPvx.js} +1 -1
- package/dist/{vi.bdSIJ99Y-017e_Pkz.js → vi.bdSIJ99Y-DWCVXj6K.js} +3 -3
- package/package.json +1 -1
- package/dist/RichTextEditor-cvtLFe4t.js +0 -443
- package/dist/index-C8H9A55g.js +0 -222
- package/dist/index-CCnm5-ML.js +0 -230
- package/dist/index-CfIcUHKK.js +0 -70
- package/dist/index-ChQc_Cm6.js +0 -1544
- package/dist/index-CmGGeUr0.js +0 -142
- package/dist/index-Ii4UOx3H.js +0 -599
- package/dist/index-z_kiwVc3.js +0 -237
|
@@ -1,242 +1,216 @@
|
|
|
1
|
-
import { jsx as r,
|
|
2
|
-
import * as
|
|
3
|
-
import { useState as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { u as
|
|
7
|
-
import { u as
|
|
8
|
-
import { P as Pe, D as
|
|
9
|
-
import { R as
|
|
10
|
-
import { P as
|
|
11
|
-
import '../../assets/Dialog.css';var
|
|
1
|
+
import { jsx as r, Fragment as De, jsxs as m } from "react/jsx-runtime";
|
|
2
|
+
import * as s from "react";
|
|
3
|
+
import { useState as me } from "react";
|
|
4
|
+
import S from "../Button/Button.js";
|
|
5
|
+
import ve from "../Icon/Icon.js";
|
|
6
|
+
import { u as he, a as C, P as h, c as v, b as Re, e as ye } from "../../index-B4szHVNJ.js";
|
|
7
|
+
import { u as E } from "../../index-6DGSlWJb.js";
|
|
8
|
+
import { P as Pe, u as Oe, D as Ne } from "../../index-kgC_DL6e.js";
|
|
9
|
+
import { R as be, h as Ie, u as Ee, F as Ce } from "../../index-BVZdJVFB.js";
|
|
10
|
+
import { P as x } from "../../index-Bq1FiX6B.js";
|
|
11
|
+
import '../../assets/Dialog.css';var P = "Dialog", [k] = Re(P), [xe, d] = k(P), L = (e) => {
|
|
12
12
|
const {
|
|
13
|
-
__scopeDialog:
|
|
13
|
+
__scopeDialog: n,
|
|
14
14
|
children: i,
|
|
15
|
-
open:
|
|
16
|
-
defaultOpen:
|
|
17
|
-
onOpenChange:
|
|
18
|
-
modal:
|
|
19
|
-
} = e, c =
|
|
20
|
-
prop:
|
|
21
|
-
defaultProp:
|
|
22
|
-
onChange:
|
|
23
|
-
caller:
|
|
15
|
+
open: o,
|
|
16
|
+
defaultOpen: a,
|
|
17
|
+
onOpenChange: t,
|
|
18
|
+
modal: l = !0
|
|
19
|
+
} = e, c = s.useRef(null), g = s.useRef(null), [p, D] = he({
|
|
20
|
+
prop: o,
|
|
21
|
+
defaultProp: a ?? !1,
|
|
22
|
+
onChange: t,
|
|
23
|
+
caller: P
|
|
24
24
|
});
|
|
25
25
|
return /* @__PURE__ */ r(
|
|
26
|
-
|
|
26
|
+
xe,
|
|
27
27
|
{
|
|
28
|
-
scope:
|
|
28
|
+
scope: n,
|
|
29
29
|
triggerRef: c,
|
|
30
|
-
contentRef:
|
|
31
|
-
contentId:
|
|
32
|
-
titleId:
|
|
33
|
-
descriptionId:
|
|
34
|
-
open:
|
|
30
|
+
contentRef: g,
|
|
31
|
+
contentId: E(),
|
|
32
|
+
titleId: E(),
|
|
33
|
+
descriptionId: E(),
|
|
34
|
+
open: p,
|
|
35
35
|
onOpenChange: D,
|
|
36
|
-
onOpenToggle:
|
|
37
|
-
modal:
|
|
36
|
+
onOpenToggle: s.useCallback(() => D((O) => !O), [D]),
|
|
37
|
+
modal: l,
|
|
38
38
|
children: i
|
|
39
39
|
}
|
|
40
40
|
);
|
|
41
41
|
};
|
|
42
|
-
L.displayName =
|
|
43
|
-
var
|
|
44
|
-
(e,
|
|
45
|
-
const { __scopeDialog: i, ...
|
|
42
|
+
L.displayName = P;
|
|
43
|
+
var G = "DialogTrigger", z = s.forwardRef(
|
|
44
|
+
(e, n) => {
|
|
45
|
+
const { __scopeDialog: i, ...o } = e, a = d(G, i), t = C(n, a.triggerRef);
|
|
46
46
|
return /* @__PURE__ */ r(
|
|
47
47
|
h.button,
|
|
48
48
|
{
|
|
49
49
|
type: "button",
|
|
50
50
|
"aria-haspopup": "dialog",
|
|
51
|
-
"aria-expanded":
|
|
52
|
-
"aria-controls":
|
|
53
|
-
"data-state": M(
|
|
54
|
-
...
|
|
55
|
-
ref:
|
|
56
|
-
onClick: v(e.onClick,
|
|
51
|
+
"aria-expanded": a.open,
|
|
52
|
+
"aria-controls": a.open ? a.contentId : void 0,
|
|
53
|
+
"data-state": M(a.open),
|
|
54
|
+
...o,
|
|
55
|
+
ref: t,
|
|
56
|
+
onClick: v(e.onClick, a.onOpenToggle)
|
|
57
57
|
}
|
|
58
58
|
);
|
|
59
59
|
}
|
|
60
60
|
);
|
|
61
|
-
z.displayName =
|
|
62
|
-
var
|
|
61
|
+
z.displayName = G;
|
|
62
|
+
var A = "DialogPortal", [Ae, K] = k(A, {
|
|
63
63
|
forceMount: void 0
|
|
64
|
-
}),
|
|
65
|
-
const { __scopeDialog:
|
|
66
|
-
return /* @__PURE__ */ r(
|
|
64
|
+
}), j = (e) => {
|
|
65
|
+
const { __scopeDialog: n, forceMount: i, children: o, container: a } = e, t = d(A, n);
|
|
66
|
+
return /* @__PURE__ */ r(Ae, { scope: n, forceMount: i, children: s.Children.map(o, (l) => /* @__PURE__ */ r(x, { present: i || t.open, children: /* @__PURE__ */ r(Pe, { asChild: !0, container: a, children: l }) })) });
|
|
67
67
|
};
|
|
68
|
-
|
|
69
|
-
var y = "DialogOverlay",
|
|
70
|
-
(e,
|
|
71
|
-
const i =
|
|
72
|
-
return
|
|
68
|
+
j.displayName = A;
|
|
69
|
+
var y = "DialogOverlay", H = s.forwardRef(
|
|
70
|
+
(e, n) => {
|
|
71
|
+
const i = K(y, e.__scopeDialog), { forceMount: o = i.forceMount, ...a } = e, t = d(y, e.__scopeDialog);
|
|
72
|
+
return t.modal ? /* @__PURE__ */ r(x, { present: o || t.open, children: /* @__PURE__ */ r(Fe, { ...a, ref: n }) }) : null;
|
|
73
73
|
}
|
|
74
74
|
);
|
|
75
|
-
|
|
76
|
-
var
|
|
77
|
-
(e,
|
|
78
|
-
const { __scopeDialog: i, ...
|
|
75
|
+
H.displayName = y;
|
|
76
|
+
var Me = ye("DialogOverlay.RemoveScroll"), Fe = s.forwardRef(
|
|
77
|
+
(e, n) => {
|
|
78
|
+
const { __scopeDialog: i, ...o } = e, a = d(y, i), t = Oe(), l = C(n, t);
|
|
79
79
|
return (
|
|
80
80
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
81
81
|
// ie. when `Overlay` and `Content` are siblings
|
|
82
|
-
/* @__PURE__ */ r(
|
|
82
|
+
/* @__PURE__ */ r(be, { as: Me, allowPinchZoom: !0, shards: [a.contentRef], children: /* @__PURE__ */ r(
|
|
83
83
|
h.div,
|
|
84
84
|
{
|
|
85
|
-
"data-state": M(
|
|
86
|
-
...
|
|
87
|
-
ref:
|
|
88
|
-
style: { pointerEvents: "auto", ...
|
|
85
|
+
"data-state": M(a.open),
|
|
86
|
+
...o,
|
|
87
|
+
ref: l,
|
|
88
|
+
style: { pointerEvents: "auto", ...o.style }
|
|
89
89
|
}
|
|
90
90
|
) })
|
|
91
91
|
);
|
|
92
92
|
}
|
|
93
|
-
), _ = "DialogContent",
|
|
94
|
-
(e,
|
|
95
|
-
const i =
|
|
96
|
-
return /* @__PURE__ */ r(
|
|
93
|
+
), _ = "DialogContent", B = s.forwardRef(
|
|
94
|
+
(e, n) => {
|
|
95
|
+
const i = K(_, e.__scopeDialog), { forceMount: o = i.forceMount, ...a } = e, t = d(_, e.__scopeDialog);
|
|
96
|
+
return /* @__PURE__ */ r(x, { present: o || t.open, children: t.modal ? /* @__PURE__ */ r(we, { ...a, ref: n }) : /* @__PURE__ */ r(Te, { ...a, ref: n }) });
|
|
97
97
|
}
|
|
98
98
|
);
|
|
99
|
-
|
|
100
|
-
var
|
|
101
|
-
(e,
|
|
102
|
-
const i = d(_, e.__scopeDialog),
|
|
103
|
-
return
|
|
104
|
-
const
|
|
105
|
-
if (
|
|
99
|
+
B.displayName = _;
|
|
100
|
+
var we = s.forwardRef(
|
|
101
|
+
(e, n) => {
|
|
102
|
+
const i = d(_, e.__scopeDialog), o = s.useRef(null), a = C(n, i.contentRef, o);
|
|
103
|
+
return s.useEffect(() => {
|
|
104
|
+
const t = o.current;
|
|
105
|
+
if (t) return Ie(t);
|
|
106
106
|
}, []), /* @__PURE__ */ r(
|
|
107
|
-
|
|
107
|
+
J,
|
|
108
108
|
{
|
|
109
109
|
...e,
|
|
110
|
-
ref:
|
|
110
|
+
ref: a,
|
|
111
111
|
trapFocus: i.open,
|
|
112
|
-
disableOutsidePointerEvents:
|
|
113
|
-
onCloseAutoFocus: v(e.onCloseAutoFocus, (
|
|
114
|
-
var
|
|
115
|
-
|
|
112
|
+
disableOutsidePointerEvents: i.open,
|
|
113
|
+
onCloseAutoFocus: v(e.onCloseAutoFocus, (t) => {
|
|
114
|
+
var l;
|
|
115
|
+
t.preventDefault(), (l = i.triggerRef.current) == null || l.focus();
|
|
116
116
|
}),
|
|
117
|
-
onPointerDownOutside: v(e.onPointerDownOutside, (
|
|
118
|
-
const
|
|
119
|
-
(
|
|
117
|
+
onPointerDownOutside: v(e.onPointerDownOutside, (t) => {
|
|
118
|
+
const l = t.detail.originalEvent, c = l.button === 0 && l.ctrlKey === !0;
|
|
119
|
+
(l.button === 2 || c) && t.preventDefault();
|
|
120
120
|
}),
|
|
121
121
|
onFocusOutside: v(
|
|
122
122
|
e.onFocusOutside,
|
|
123
|
-
(
|
|
123
|
+
(t) => t.preventDefault()
|
|
124
124
|
)
|
|
125
125
|
}
|
|
126
126
|
);
|
|
127
127
|
}
|
|
128
|
-
),
|
|
129
|
-
(e,
|
|
130
|
-
const i = d(_, e.__scopeDialog),
|
|
128
|
+
), Te = s.forwardRef(
|
|
129
|
+
(e, n) => {
|
|
130
|
+
const i = d(_, e.__scopeDialog), o = s.useRef(!1), a = s.useRef(!1);
|
|
131
131
|
return /* @__PURE__ */ r(
|
|
132
|
-
|
|
132
|
+
J,
|
|
133
133
|
{
|
|
134
134
|
...e,
|
|
135
|
-
ref:
|
|
135
|
+
ref: n,
|
|
136
136
|
trapFocus: !1,
|
|
137
137
|
disableOutsidePointerEvents: !1,
|
|
138
|
-
onCloseAutoFocus: (
|
|
139
|
-
var
|
|
140
|
-
(
|
|
138
|
+
onCloseAutoFocus: (t) => {
|
|
139
|
+
var l, c;
|
|
140
|
+
(l = e.onCloseAutoFocus) == null || l.call(e, t), t.defaultPrevented || (o.current || (c = i.triggerRef.current) == null || c.focus(), t.preventDefault()), o.current = !1, a.current = !1;
|
|
141
141
|
},
|
|
142
|
-
onInteractOutside: (
|
|
143
|
-
var
|
|
144
|
-
(
|
|
145
|
-
const
|
|
146
|
-
((
|
|
142
|
+
onInteractOutside: (t) => {
|
|
143
|
+
var g, p;
|
|
144
|
+
(g = e.onInteractOutside) == null || g.call(e, t), t.defaultPrevented || (o.current = !0, t.detail.originalEvent.type === "pointerdown" && (a.current = !0));
|
|
145
|
+
const l = t.target;
|
|
146
|
+
((p = i.triggerRef.current) == null ? void 0 : p.contains(l)) && t.preventDefault(), t.detail.originalEvent.type === "focusin" && a.current && t.preventDefault();
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
149
|
);
|
|
150
150
|
}
|
|
151
|
-
),
|
|
152
|
-
(e,
|
|
153
|
-
const { __scopeDialog: i, trapFocus:
|
|
154
|
-
return
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
/* @__PURE__ */ m(W, { children: [
|
|
179
|
-
/* @__PURE__ */ r(ke, { titleId: c.titleId }),
|
|
180
|
-
/* @__PURE__ */ r(Le, { contentRef: u, descriptionId: c.descriptionId })
|
|
181
|
-
] })
|
|
182
|
-
] });
|
|
151
|
+
), J = s.forwardRef(
|
|
152
|
+
(e, n) => {
|
|
153
|
+
const { __scopeDialog: i, trapFocus: o, onOpenAutoFocus: a, onCloseAutoFocus: t, ...l } = e, c = d(_, i);
|
|
154
|
+
return Ee(), /* @__PURE__ */ r(De, { children: /* @__PURE__ */ r(
|
|
155
|
+
Ce,
|
|
156
|
+
{
|
|
157
|
+
asChild: !0,
|
|
158
|
+
loop: !0,
|
|
159
|
+
trapped: o,
|
|
160
|
+
onMountAutoFocus: a,
|
|
161
|
+
onUnmountAutoFocus: t,
|
|
162
|
+
children: /* @__PURE__ */ r(
|
|
163
|
+
Ne,
|
|
164
|
+
{
|
|
165
|
+
role: "dialog",
|
|
166
|
+
id: c.contentId,
|
|
167
|
+
"aria-describedby": c.descriptionId,
|
|
168
|
+
"aria-labelledby": c.titleId,
|
|
169
|
+
"data-state": M(c.open),
|
|
170
|
+
...l,
|
|
171
|
+
ref: n,
|
|
172
|
+
deferPointerDownOutside: !0,
|
|
173
|
+
onDismiss: () => c.onOpenChange(!1)
|
|
174
|
+
}
|
|
175
|
+
)
|
|
176
|
+
}
|
|
177
|
+
) });
|
|
183
178
|
}
|
|
184
|
-
),
|
|
185
|
-
(e,
|
|
186
|
-
const { __scopeDialog: i, ...
|
|
187
|
-
return /* @__PURE__ */ r(h.h2, { id:
|
|
179
|
+
), Q = "DialogTitle", U = s.forwardRef(
|
|
180
|
+
(e, n) => {
|
|
181
|
+
const { __scopeDialog: i, ...o } = e, a = d(Q, i);
|
|
182
|
+
return /* @__PURE__ */ r(h.h2, { id: a.titleId, ...o, ref: n });
|
|
188
183
|
}
|
|
189
184
|
);
|
|
190
|
-
|
|
191
|
-
var
|
|
192
|
-
(e,
|
|
193
|
-
const { __scopeDialog: i, ...
|
|
194
|
-
return /* @__PURE__ */ r(h.p, { id:
|
|
185
|
+
U.displayName = Q;
|
|
186
|
+
var V = "DialogDescription", Y = s.forwardRef(
|
|
187
|
+
(e, n) => {
|
|
188
|
+
const { __scopeDialog: i, ...o } = e, a = d(V, i);
|
|
189
|
+
return /* @__PURE__ */ r(h.p, { id: a.descriptionId, ...o, ref: n });
|
|
195
190
|
}
|
|
196
191
|
);
|
|
197
|
-
|
|
198
|
-
var
|
|
199
|
-
(e,
|
|
200
|
-
const { __scopeDialog: i, ...
|
|
192
|
+
Y.displayName = V;
|
|
193
|
+
var Z = "DialogClose", $ = s.forwardRef(
|
|
194
|
+
(e, n) => {
|
|
195
|
+
const { __scopeDialog: i, ...o } = e, a = d(Z, i);
|
|
201
196
|
return /* @__PURE__ */ r(
|
|
202
197
|
h.button,
|
|
203
198
|
{
|
|
204
199
|
type: "button",
|
|
205
|
-
...
|
|
206
|
-
ref:
|
|
207
|
-
onClick: v(e.onClick, () =>
|
|
200
|
+
...o,
|
|
201
|
+
ref: n,
|
|
202
|
+
onClick: v(e.onClick, () => a.onOpenChange(!1))
|
|
208
203
|
}
|
|
209
204
|
);
|
|
210
205
|
}
|
|
211
206
|
);
|
|
212
|
-
|
|
207
|
+
$.displayName = Z;
|
|
213
208
|
function M(e) {
|
|
214
209
|
return e ? "open" : "closed";
|
|
215
210
|
}
|
|
216
|
-
|
|
217
|
-
contentName: _,
|
|
218
|
-
titleName: T,
|
|
219
|
-
docsSlug: "dialog"
|
|
220
|
-
}), ke = ({ titleId: e }) => {
|
|
221
|
-
const a = X(Z), i = `\`${a.contentName}\` requires a \`${a.titleName}\` for the component to be accessible for screen reader users.
|
|
222
|
-
|
|
223
|
-
If you want to hide the \`${a.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
224
|
-
|
|
225
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${a.docsSlug}`;
|
|
226
|
-
return l.useEffect(() => {
|
|
227
|
-
e && (document.getElementById(e) || console.error(i));
|
|
228
|
-
}, [i, e]), null;
|
|
229
|
-
}, Ge = "DialogDescriptionWarning", Le = ({ contentRef: e, descriptionId: a }) => {
|
|
230
|
-
const t = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${X(Ge).contentName}}.`;
|
|
231
|
-
return l.useEffect(() => {
|
|
232
|
-
var o;
|
|
233
|
-
const n = (o = e.current) == null ? void 0 : o.getAttribute("aria-describedby");
|
|
234
|
-
a && n && (document.getElementById(a) || console.warn(t));
|
|
235
|
-
}, [t, e, a]), null;
|
|
236
|
-
}, $e = L, ze = z, Be = K, Ke = j, je = H, He = q, Ve = Q, qe = Y;
|
|
237
|
-
const Je = "Dialog-module__dialog___r4ljx", g = {
|
|
211
|
+
const Se = "Dialog-module__dialog___r4ljx", u = {
|
|
238
212
|
"dialog-overlay": "Dialog-module__dialog-overlay___mgT2B",
|
|
239
|
-
dialog:
|
|
213
|
+
dialog: Se,
|
|
240
214
|
"dialog-illustration": "Dialog-module__dialog-illustration___IHiQl",
|
|
241
215
|
"dialog-content": "Dialog-module__dialog-content___3hOGc",
|
|
242
216
|
"dialog-title": "Dialog-module__dialog-title___KACAJ",
|
|
@@ -245,65 +219,65 @@ const Je = "Dialog-module__dialog___r4ljx", g = {
|
|
|
245
219
|
"dialog-close-button": "Dialog-module__dialog-close-button___-PzEz",
|
|
246
220
|
"dialog-close-button-icon": "Dialog-module__dialog-close-button-icon___BeGg2"
|
|
247
221
|
};
|
|
248
|
-
function
|
|
222
|
+
function Qe({
|
|
249
223
|
children: e,
|
|
250
|
-
isOpen:
|
|
224
|
+
isOpen: n,
|
|
251
225
|
defaultOpen: i = !1,
|
|
252
|
-
onClose:
|
|
253
|
-
onOpenChange:
|
|
254
|
-
showCloseButton:
|
|
255
|
-
closeOnOverlayClick:
|
|
226
|
+
onClose: o,
|
|
227
|
+
onOpenChange: a,
|
|
228
|
+
showCloseButton: t,
|
|
229
|
+
closeOnOverlayClick: l = !0,
|
|
256
230
|
closeOnEscape: c = !0,
|
|
257
|
-
modal:
|
|
258
|
-
container:
|
|
231
|
+
modal: g = !0,
|
|
232
|
+
container: p,
|
|
259
233
|
title: D,
|
|
260
|
-
description:
|
|
261
|
-
illustrationSrc:
|
|
262
|
-
confirmButtonText:
|
|
263
|
-
cancelButtonText:
|
|
264
|
-
confirmButtonType:
|
|
265
|
-
cancelButtonType:
|
|
266
|
-
confirmButtonVariant:
|
|
267
|
-
cancelButtonVariant:
|
|
268
|
-
confirmButtonSize:
|
|
269
|
-
cancelButtonSize:
|
|
270
|
-
confirmButtonIcon:
|
|
271
|
-
cancelButtonIcon:
|
|
272
|
-
onConfirm:
|
|
273
|
-
onCancel:
|
|
274
|
-
className:
|
|
275
|
-
...
|
|
234
|
+
description: O,
|
|
235
|
+
illustrationSrc: F,
|
|
236
|
+
confirmButtonText: w,
|
|
237
|
+
cancelButtonText: T,
|
|
238
|
+
confirmButtonType: q = "primary",
|
|
239
|
+
cancelButtonType: W = "primary",
|
|
240
|
+
confirmButtonVariant: X = "default",
|
|
241
|
+
cancelButtonVariant: ee = "cancel",
|
|
242
|
+
confirmButtonSize: te = "md",
|
|
243
|
+
cancelButtonSize: oe = "md",
|
|
244
|
+
confirmButtonIcon: ae,
|
|
245
|
+
cancelButtonIcon: re,
|
|
246
|
+
onConfirm: N,
|
|
247
|
+
onCancel: b,
|
|
248
|
+
className: ie,
|
|
249
|
+
...ne
|
|
276
250
|
}) {
|
|
277
|
-
const [
|
|
278
|
-
R ||
|
|
279
|
-
},
|
|
280
|
-
c ||
|
|
281
|
-
},
|
|
282
|
-
|
|
283
|
-
},
|
|
284
|
-
|
|
285
|
-
},
|
|
286
|
-
|
|
287
|
-
},
|
|
288
|
-
e && /* @__PURE__ */ r(
|
|
289
|
-
/* @__PURE__ */ m(
|
|
290
|
-
/* @__PURE__ */ r(
|
|
291
|
-
/* @__PURE__ */ m(
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
/* @__PURE__ */ m("div", { className:
|
|
295
|
-
/* @__PURE__ */ r(
|
|
296
|
-
/* @__PURE__ */ r(
|
|
251
|
+
const [le, I] = me(i), R = n !== void 0, se = R ? n : le, ce = t !== void 0 ? t : o !== void 0, de = (f) => {
|
|
252
|
+
R || I(f), a == null || a(f), f || o == null || o();
|
|
253
|
+
}, ue = (f) => {
|
|
254
|
+
c || f.preventDefault();
|
|
255
|
+
}, ge = (f) => {
|
|
256
|
+
l || f.preventDefault();
|
|
257
|
+
}, fe = () => {
|
|
258
|
+
N == null || N(), R || I(!1), o == null || o();
|
|
259
|
+
}, pe = () => {
|
|
260
|
+
b == null || b(), R || I(!1), o == null || o();
|
|
261
|
+
}, _e = /* @__PURE__ */ m(L, { open: se, onOpenChange: de, modal: g, children: [
|
|
262
|
+
e && /* @__PURE__ */ r(z, { asChild: !0, children: /* @__PURE__ */ r("div", { children: e }) }),
|
|
263
|
+
/* @__PURE__ */ m(j, { container: p, children: [
|
|
264
|
+
/* @__PURE__ */ r(H, { className: u["dialog-overlay"] }),
|
|
265
|
+
/* @__PURE__ */ m(B, { className: u.dialog, onEscapeKeyDown: ue, onInteractOutside: ge, children: [
|
|
266
|
+
ce && /* @__PURE__ */ r($, { className: u["dialog-close-button"], "aria-label": "Close dialog", children: /* @__PURE__ */ r(ve, { className: u["dialog-close-button-icon"], icon: "ap-icon-close" }) }),
|
|
267
|
+
F && /* @__PURE__ */ r("div", { className: u["dialog-illustration"], children: /* @__PURE__ */ r("img", { src: F, alt: "Dialog illustration" }) }),
|
|
268
|
+
/* @__PURE__ */ m("div", { className: u["dialog-content"], children: [
|
|
269
|
+
/* @__PURE__ */ r(U, { className: u["dialog-title"], children: D }),
|
|
270
|
+
/* @__PURE__ */ r(Y, { asChild: !0, children: /* @__PURE__ */ r("div", { className: u["dialog-description"], children: O }) })
|
|
297
271
|
] }),
|
|
298
|
-
/* @__PURE__ */ m("div", { className:
|
|
299
|
-
|
|
300
|
-
|
|
272
|
+
/* @__PURE__ */ m("div", { className: u["dialog-buttons"], children: [
|
|
273
|
+
T && /* @__PURE__ */ r(S, { type: W, variant: ee, size: oe, onClick: pe, icon: re, children: T }),
|
|
274
|
+
w && /* @__PURE__ */ r(S, { type: q, variant: X, size: te, onClick: fe, icon: ae, children: w })
|
|
301
275
|
] })
|
|
302
276
|
] })
|
|
303
277
|
] })
|
|
304
278
|
] });
|
|
305
|
-
return /* @__PURE__ */ r("div", { className:
|
|
279
|
+
return /* @__PURE__ */ r("div", { className: ie, ...ne, children: _e });
|
|
306
280
|
}
|
|
307
281
|
export {
|
|
308
|
-
|
|
282
|
+
Qe as default
|
|
309
283
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as i, jsxs as B } from "react/jsx-runtime";
|
|
2
|
-
import { d as T, i as c, r as l, s as o, g as t, v as d, f as r } from "../../vi.bdSIJ99Y-
|
|
2
|
+
import { d as T, i as c, r as l, s as o, g as t, v as d, f as r } from "../../vi.bdSIJ99Y-DWCVXj6K.js";
|
|
3
3
|
import s from "./Dialog.js";
|
|
4
4
|
import p from "../Button/Button.js";
|
|
5
5
|
T("Dialog", () => {
|
|
@@ -96,5 +96,5 @@ type DragAndDropProps = {
|
|
|
96
96
|
* @param {boolean} [props.queueFiles] - When true, newly selected files are appended to the existing list
|
|
97
97
|
* @returns {JSX.Element} The rendered DragAndDrop component
|
|
98
98
|
*/
|
|
99
|
-
export default function DragAndDrop({ label, type, disabled, required, errorMessage, fileExtensionsAllowed, maxSize, constraintsText, maxFiles, value, onUpload, onRemoveFile, queueFiles, className, maxSizeErrorMessage, fileExtensionInvalidErrorMessage, texts, fileIcon, errorIcon, deleteIcon, browseButtonIcon, renderFileItem, fileSizeFormatter, browseButtonProps, validator, errors: externalErrors, ...props }: DragAndDropProps): import("react
|
|
99
|
+
export default function DragAndDrop({ label, type, disabled, required, errorMessage, fileExtensionsAllowed, maxSize, constraintsText, maxFiles, value, onUpload, onRemoveFile, queueFiles, className, maxSizeErrorMessage, fileExtensionInvalidErrorMessage, texts, fileIcon, errorIcon, deleteIcon, browseButtonIcon, renderFileItem, fileSizeFormatter, browseButtonProps, validator, errors: externalErrors, ...props }: DragAndDropProps): import("react").JSX.Element;
|
|
100
100
|
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs as v, jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import { d as y, i as d, r, g as e, s as o, v as c, w as f, f as B } from "../../vi.bdSIJ99Y-
|
|
2
|
+
import { d as y, i as d, r, g as e, s as o, v as c, w as f, f as B } from "../../vi.bdSIJ99Y-DWCVXj6K.js";
|
|
3
3
|
import l from "./DragAndDrop.js";
|
|
4
4
|
import { c as h, d as I } from "../../DragAndDrop.utils-D3xTV9EK.js";
|
|
5
|
-
import { u as w } from "../../index-
|
|
5
|
+
import { u as w } from "../../index-banDzeKa.js";
|
|
6
6
|
y("DragAndDrop", () => {
|
|
7
7
|
y("Rendering", () => {
|
|
8
8
|
y("Basic rendering", () => {
|
|
@@ -38,6 +38,7 @@ type DropdownProps = {
|
|
|
38
38
|
selectedOptionsLabel?: string;
|
|
39
39
|
allOptionsSelectedLabel?: string;
|
|
40
40
|
caseSensitive?: boolean;
|
|
41
|
+
maxCount?: number;
|
|
41
42
|
} & DataAttributes & InteractiveEventHandlers;
|
|
42
43
|
/**
|
|
43
44
|
* A flexible dropdown component that supports single and multi-select functionality with search, categorization, and keyboard navigation.
|
|
@@ -67,7 +68,8 @@ type DropdownProps = {
|
|
|
67
68
|
* @param {LabelTooltipProps} [props.labelTooltip] - Tooltip to display next to the label
|
|
68
69
|
* @param {boolean} [props.unselect] - Whether single select dropdown allows deselection of selected items (defaults to false)
|
|
69
70
|
* @param {boolean} [props.caseSensitive] - Whether to perform case-sensitive matching when checking for existing options in creatable mode (defaults to false)
|
|
71
|
+
* @param {number} [props.maxCount] - Maximum number of options that can be selected in multi-select mode. Unselected options are disabled when the limit is reached and "Select all" is disabled.
|
|
70
72
|
* @returns {JSX.Element} The rendered Dropdown component
|
|
71
73
|
*/
|
|
72
|
-
export default function Dropdown({ className, label, options, value, placeholder, disabled, required, searchable, searchPlaceholder, errorMessage, helpText, helpLink, helpLinkText, onChange, onSearch, multiSelect, grouped, align, onToggleChange, toggleLabel, dropdownTriggerClassName, dropdownMenuClassName, hideSelectedItems, labelTooltip, unselect, selectedOptionLabel, selectedOptionsLabel, allOptionsSelectedLabel, caseSensitive, ...props }: DropdownProps): import("react
|
|
74
|
+
export default function Dropdown({ className, label, options, value, placeholder, disabled, required, searchable, searchPlaceholder, errorMessage, helpText, helpLink, helpLinkText, onChange, onSearch, multiSelect, grouped, align, onToggleChange, toggleLabel, dropdownTriggerClassName, dropdownMenuClassName, hideSelectedItems, labelTooltip, unselect, selectedOptionLabel, selectedOptionsLabel, allOptionsSelectedLabel, caseSensitive, maxCount, ...props }: DropdownProps): import("react").JSX.Element;
|
|
73
75
|
export {};
|