@epam/ai-dial-ui-kit 0.14.0-dev.32 → 0.14.0-dev.33
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/CHANGELOG.md +9 -0
- package/dist/DateCellRenderer-B41xNX7a.cjs +1 -0
- package/dist/components/New/Dropdown/Dropdown.js +170 -189
- package/dist/components/New/Dropdown/DropdownSubMenuItem.js +62 -104
- package/dist/components/New/Dropdown/constants.js +19 -26
- package/dist/components/New/Dropdown/item-mark.js +6 -0
- package/dist/components/New/MenuItem/MenuItem.js +108 -0
- package/dist/components/New/MenuItem/constants.js +16 -0
- package/dist/components/New/Select/Select.js +218 -229
- package/dist/components/New/Select/SelectSubMenuItem.js +54 -71
- package/dist/components/New/Select/constants.js +22 -37
- package/dist/components/New/constants/overlay.js +11 -7
- package/dist/components-manifest.json +143 -4
- package/dist/dial-ui-kit.cjs +2 -2
- package/dist/dial-ui-kit.js +247 -243
- package/dist/grid.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/src/components/New/Dropdown/Dropdown.d.ts +10 -0
- package/dist/src/components/New/Dropdown/constants.d.ts +5 -4
- package/dist/src/components/New/Dropdown/item-mark.d.ts +15 -0
- package/dist/src/components/New/MenuItem/MenuItem.d.ts +68 -0
- package/dist/src/components/New/MenuItem/constants.d.ts +5 -0
- package/dist/src/components/New/Select/Select.d.ts +14 -2
- package/dist/src/components/New/Select/SelectSubMenuItem.d.ts +3 -0
- package/dist/src/components/New/Select/constants.d.ts +12 -5
- package/dist/src/components/New/constants/overlay.d.ts +7 -0
- package/dist/src/index.d.ts +3 -0
- package/dist/src/models/dropdown.d.ts +17 -1
- package/dist/src/models/select.d.ts +6 -0
- package/dist/src/types/menu-item.d.ts +21 -0
- package/dist/types/menu-item.js +4 -0
- package/package.json +1 -1
- package/dist/DateCellRenderer-CKFfW-Hf.cjs +0 -1
|
@@ -1,233 +1,243 @@
|
|
|
1
|
-
import { jsx as l, jsxs as
|
|
2
|
-
import { IconChevronDown as
|
|
3
|
-
import { useId as
|
|
1
|
+
import { jsx as l, jsxs as S, Fragment as Be } from "react/jsx-runtime";
|
|
2
|
+
import { IconChevronDown as _e } from "@tabler/icons-react";
|
|
3
|
+
import { useId as je, useState as _, useCallback as f, useMemo as m, useEffect as Ke, useImperativeHandle as ze } from "react";
|
|
4
4
|
import { Checkbox as Ue } from "../Checkbox/Checkbox.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import { ElementSize as
|
|
17
|
-
import { resolveAccessibleName as
|
|
18
|
-
import { mergeClasses as
|
|
19
|
-
import { MultiSelectTags as
|
|
20
|
-
import { SelectSubMenuItem as
|
|
21
|
-
import {
|
|
22
|
-
const
|
|
23
|
-
options:
|
|
5
|
+
import { Dropdown as Ve } from "../Dropdown/Dropdown.js";
|
|
6
|
+
import { EllipsisTooltip as qe } from "../EllipsisTooltip/EllipsisTooltip.js";
|
|
7
|
+
import { ErrorText as Ge, CaptionText as He } from "../CaptionText/CaptionText.js";
|
|
8
|
+
import { GhostIconButton as Qe } from "../IconButton/IconButtonWrappers.js";
|
|
9
|
+
import { Input as te } from "../Input/Input.js";
|
|
10
|
+
import { Label as Re } from "../Label/Label.js";
|
|
11
|
+
import { DialNoDataContent as We } from "../../NoDataContent/NoDataContent.js";
|
|
12
|
+
import { DIAL_KIT_ICON_STROKE as Ze } from "../constants/icon.js";
|
|
13
|
+
import { DIAL_ICON_SIZE as ne } from "../../../constants/icon.js";
|
|
14
|
+
import { MenuItem as re } from "../MenuItem/MenuItem.js";
|
|
15
|
+
import { MenuItemMark as j } from "../../../types/menu-item.js";
|
|
16
|
+
import { ElementSize as O } from "../../../types/size.js";
|
|
17
|
+
import { resolveAccessibleName as ae } from "../../../utils/accessible-name.js";
|
|
18
|
+
import { mergeClasses as p } from "../../../utils/merge-classes.js";
|
|
19
|
+
import { MultiSelectTags as Je } from "./MultiSelectTags.js";
|
|
20
|
+
import { SelectSubMenuItem as Xe } from "./SelectSubMenuItem.js";
|
|
21
|
+
import { selectFieldIconClassName as Ye, selectListWidthClassName as Pe, selectOverlayBaseClassName as el, selectSearchThreshold as ll, selectSearchIcon as tl, selectCloseIcon as nl, selectOptionBaseClassName as rl, selectOptionsScrollClassName as al, selectEmptyStateIcon as il } from "./constants.js";
|
|
22
|
+
const Al = ({
|
|
23
|
+
options: a,
|
|
24
24
|
multiple: n = !1,
|
|
25
25
|
id: ie,
|
|
26
26
|
value: A,
|
|
27
|
-
defaultValue:
|
|
28
|
-
size:
|
|
29
|
-
prefix:
|
|
27
|
+
defaultValue: se,
|
|
28
|
+
size: K = O.Standard,
|
|
29
|
+
prefix: z,
|
|
30
30
|
customSelectedValue: U,
|
|
31
|
-
placeholder:
|
|
31
|
+
placeholder: oe = "Select...",
|
|
32
32
|
labelProps: g,
|
|
33
33
|
error: V,
|
|
34
|
-
caption:
|
|
34
|
+
caption: ce,
|
|
35
35
|
ariaLabel: q,
|
|
36
|
-
searchable:
|
|
37
|
-
searchSize:
|
|
38
|
-
searchPlaceholder:
|
|
39
|
-
selectAll:
|
|
40
|
-
invalid:
|
|
41
|
-
selectAllLabel:
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
36
|
+
searchable: G = !1,
|
|
37
|
+
searchSize: de = O.Standard,
|
|
38
|
+
searchPlaceholder: H,
|
|
39
|
+
selectAll: fe = !1,
|
|
40
|
+
invalid: me,
|
|
41
|
+
selectAllLabel: ue = "Select all",
|
|
42
|
+
selectedOptionMark: Q = j.Tint,
|
|
43
|
+
emptyStateTitle: he = "No options available",
|
|
44
|
+
emptyStateDescription: pe,
|
|
45
|
+
emptyStateIcon: be,
|
|
46
|
+
disabled: b = !1,
|
|
47
|
+
className: ve,
|
|
48
|
+
fieldClassName: Ce,
|
|
49
|
+
listClassName: Ne,
|
|
50
|
+
closable: D = !1,
|
|
51
|
+
header: x,
|
|
52
|
+
footer: I,
|
|
53
|
+
onClose: R,
|
|
54
|
+
onChange: W,
|
|
55
|
+
dismissRef: Se,
|
|
56
|
+
onFooterClick: Z,
|
|
57
|
+
open: J,
|
|
58
|
+
onOpenChange: X,
|
|
59
|
+
onSearchQueryChange: Y,
|
|
60
|
+
customMultiSelectTagsRenderer: P
|
|
60
61
|
}) => {
|
|
61
|
-
const
|
|
62
|
+
const ge = je(), u = ie || ge, ee = `list-${u}`, le = K === O.Small, [xe, Ie] = _(!1), T = J !== void 0, d = T ? !!J : xe, c = f(
|
|
62
63
|
(e) => {
|
|
63
|
-
T || Ie(e),
|
|
64
|
+
T || Ie(e), X?.(e);
|
|
64
65
|
},
|
|
65
|
-
[T,
|
|
66
|
-
), [
|
|
66
|
+
[T, X]
|
|
67
|
+
), [h, we] = _(""), F = f(
|
|
67
68
|
(e) => {
|
|
68
|
-
e !==
|
|
69
|
+
e !== h && (we(e || ""), Y?.(e || ""));
|
|
69
70
|
},
|
|
70
|
-
[
|
|
71
|
-
), L = A !== void 0, [
|
|
72
|
-
const e =
|
|
73
|
-
return e ?
|
|
74
|
-
}, [
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
}, [
|
|
78
|
-
const o =
|
|
71
|
+
[Y, h]
|
|
72
|
+
), L = A !== void 0, [ye, ke] = _(se), v = L ? A : ye, r = m(() => n ? Array.isArray(v) ? v : [] : typeof v == "string" ? [v] : [], [v, n]), w = m(() => {
|
|
73
|
+
const e = h.trim().toLowerCase();
|
|
74
|
+
return e ? a.filter((t) => t.label.toLowerCase().includes(e)) : a;
|
|
75
|
+
}, [a, h]);
|
|
76
|
+
Ke(() => {
|
|
77
|
+
d || F("");
|
|
78
|
+
}, [d, F]);
|
|
79
|
+
const o = f(
|
|
79
80
|
(e) => {
|
|
80
|
-
L ||
|
|
81
|
+
L || ke(e), W?.(e);
|
|
81
82
|
},
|
|
82
|
-
[L,
|
|
83
|
-
),
|
|
83
|
+
[L, W]
|
|
84
|
+
), E = f(
|
|
84
85
|
(e) => {
|
|
85
86
|
if (n) {
|
|
86
|
-
const t = new Set(
|
|
87
|
+
const t = new Set(r);
|
|
87
88
|
t.has(e) ? t.delete(e) : t.add(e), o(Array.from(t));
|
|
88
89
|
return;
|
|
89
90
|
}
|
|
90
91
|
o(e), c(!1);
|
|
91
92
|
},
|
|
92
|
-
[n, o, c,
|
|
93
|
-
), M =
|
|
93
|
+
[n, o, c, r]
|
|
94
|
+
), M = f(
|
|
94
95
|
(e, t) => {
|
|
95
96
|
if (e.stopPropagation(), !n) {
|
|
96
97
|
o("");
|
|
97
98
|
return;
|
|
98
99
|
}
|
|
99
|
-
const Me =
|
|
100
|
+
const Me = r.filter(($e) => $e !== t);
|
|
100
101
|
o(Me);
|
|
101
102
|
},
|
|
102
|
-
[n,
|
|
103
|
-
),
|
|
104
|
-
() =>
|
|
105
|
-
[
|
|
106
|
-
), $ =
|
|
107
|
-
() =>
|
|
108
|
-
[
|
|
109
|
-
), { allSelectedInFiltered:
|
|
110
|
-
const e =
|
|
103
|
+
[n, r, o]
|
|
104
|
+
), s = m(
|
|
105
|
+
() => w.filter((e) => !e.disabled),
|
|
106
|
+
[w]
|
|
107
|
+
), $ = m(
|
|
108
|
+
() => s.filter((e) => r.includes(e.value)).length,
|
|
109
|
+
[s, r]
|
|
110
|
+
), { allSelectedInFiltered: B, someSelectedInFiltered: Oe } = m(() => {
|
|
111
|
+
const e = s.length > 0 && $ === s.length;
|
|
111
112
|
return {
|
|
112
113
|
allSelectedInFiltered: e,
|
|
113
114
|
someSelectedInFiltered: $ > 0 && !e
|
|
114
115
|
};
|
|
115
|
-
}, [
|
|
116
|
-
if (!(!n ||
|
|
117
|
-
if (
|
|
118
|
-
const e = new Set(
|
|
119
|
-
o(
|
|
116
|
+
}, [s, $]), Ae = f(() => {
|
|
117
|
+
if (!(!n || s.length === 0))
|
|
118
|
+
if (B) {
|
|
119
|
+
const e = new Set(s.map((t) => t.value));
|
|
120
|
+
o(r.filter((t) => !e.has(t)));
|
|
120
121
|
} else {
|
|
121
|
-
const e = new Set(
|
|
122
|
-
|
|
122
|
+
const e = new Set(r);
|
|
123
|
+
s.forEach((t) => e.add(t.value)), o(Array.from(e));
|
|
123
124
|
}
|
|
124
125
|
}, [
|
|
125
|
-
|
|
126
|
+
B,
|
|
126
127
|
n,
|
|
127
|
-
i,
|
|
128
|
-
a,
|
|
129
|
-
o
|
|
130
|
-
]), y = a.length > 0, O = !n && y ? a[0] : void 0, r = h(
|
|
131
|
-
() => O ? s.find((e) => e.value === O) ?? s.flatMap((e) => e.children ?? []).find((e) => e.value === O) : void 0,
|
|
132
|
-
[s, O]
|
|
133
|
-
), v = r ? H ? `${H} ${r.label}` : r.label : void 0, S = h(() => n ? y ? /* @__PURE__ */ l("span", { className: "flex min-w-0 flex-1 flex-wrap items-center gap-1", children: Y?.(
|
|
134
128
|
s,
|
|
129
|
+
r,
|
|
130
|
+
o
|
|
131
|
+
]), y = r.length > 0, k = !n && y ? r[0] : void 0, i = m(
|
|
132
|
+
() => k ? a.find((e) => e.value === k) ?? a.flatMap((e) => e.children ?? []).find((e) => e.value === k) : void 0,
|
|
133
|
+
[a, k]
|
|
134
|
+
), C = i ? z ? `${z} ${i.label}` : i.label : void 0, N = m(() => n ? y ? /* @__PURE__ */ l("span", { className: "flex min-w-0 flex-1 flex-wrap items-center gap-1", children: P?.(
|
|
135
135
|
a,
|
|
136
|
+
r,
|
|
136
137
|
M
|
|
137
138
|
) ?? /* @__PURE__ */ l(
|
|
138
|
-
|
|
139
|
+
Je,
|
|
139
140
|
{
|
|
140
|
-
options:
|
|
141
|
-
selectedValues:
|
|
141
|
+
options: a,
|
|
142
|
+
selectedValues: r,
|
|
142
143
|
handleRemoveTag: M
|
|
143
144
|
}
|
|
144
|
-
) }) : null : !
|
|
145
|
+
) }) : null : !i || !i.labelNode && !i.description ? null : /* @__PURE__ */ S("span", { className: "flex min-w-0 flex-1 items-center gap-2", children: [
|
|
145
146
|
/* @__PURE__ */ l(
|
|
146
|
-
|
|
147
|
+
qe,
|
|
147
148
|
{
|
|
148
|
-
text:
|
|
149
|
+
text: i.labelNode ?? C
|
|
149
150
|
}
|
|
150
151
|
),
|
|
151
|
-
|
|
152
|
+
i.description && /* @__PURE__ */ l("span", { className: "truncate text-secondary dial-tiny-text", children: i.description })
|
|
152
153
|
] }), [
|
|
153
|
-
|
|
154
|
+
P,
|
|
154
155
|
M,
|
|
155
156
|
y,
|
|
156
157
|
n,
|
|
157
|
-
s,
|
|
158
|
-
v,
|
|
159
158
|
a,
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
159
|
+
C,
|
|
160
|
+
r,
|
|
161
|
+
i
|
|
162
|
+
]), De = n || N ? "" : C || (U && A ? U : ""), Te = typeof g?.label == "string" ? g.label : void 0, Fe = N ? [
|
|
163
|
+
ae(q, Te),
|
|
164
|
+
n ? r.map((e) => a.find((t) => t.value === e)?.label ?? e).join(", ") : C
|
|
165
|
+
].filter(Boolean).join(", ") || void 0 : ae(q);
|
|
166
|
+
ze(Se, () => ({
|
|
166
167
|
dismiss: () => {
|
|
167
168
|
c(!1);
|
|
168
169
|
}
|
|
169
170
|
}));
|
|
170
|
-
const Le =
|
|
171
|
+
const Le = f(
|
|
171
172
|
(e) => {
|
|
172
|
-
|
|
173
|
+
b || (e.key === "ArrowDown" || e.key === "ArrowUp") && (e.preventDefault(), d || c(!0));
|
|
173
174
|
},
|
|
174
|
-
[
|
|
175
|
-
),
|
|
175
|
+
[b, d, c]
|
|
176
|
+
), Ee = () => /* @__PURE__ */ S(
|
|
176
177
|
"div",
|
|
177
178
|
{
|
|
178
|
-
id:
|
|
179
|
+
id: ee,
|
|
179
180
|
role: "listbox",
|
|
180
181
|
"aria-multiselectable": n || void 0,
|
|
181
|
-
className:
|
|
182
|
+
className: el,
|
|
182
183
|
children: [
|
|
183
|
-
|
|
184
|
-
(
|
|
185
|
-
|
|
186
|
-
|
|
184
|
+
x && /* @__PURE__ */ l(Be, { children: typeof x == "function" ? x() : x }),
|
|
185
|
+
(G || D) && (a.length > ll || !!h) && /* @__PURE__ */ S("div", { className: "flex items-center gap-2 px-2 pt-2", children: [
|
|
186
|
+
G && /* @__PURE__ */ l(
|
|
187
|
+
te,
|
|
187
188
|
{
|
|
188
|
-
id: `search-${
|
|
189
|
-
size:
|
|
190
|
-
placeholder:
|
|
191
|
-
"aria-label":
|
|
192
|
-
onChange: (e) =>
|
|
193
|
-
value:
|
|
194
|
-
iconBefore:
|
|
189
|
+
id: `search-${u}`,
|
|
190
|
+
size: de,
|
|
191
|
+
placeholder: H,
|
|
192
|
+
"aria-label": H || "Search options",
|
|
193
|
+
onChange: (e) => F(e),
|
|
194
|
+
value: h,
|
|
195
|
+
iconBefore: tl,
|
|
195
196
|
containerClassName: "w-full"
|
|
196
197
|
}
|
|
197
198
|
),
|
|
198
|
-
|
|
199
|
-
|
|
199
|
+
D && /* @__PURE__ */ l(
|
|
200
|
+
Qe,
|
|
200
201
|
{
|
|
201
202
|
"aria-label": "Close select",
|
|
202
203
|
className: "shrink-0",
|
|
203
|
-
size:
|
|
204
|
-
icon:
|
|
204
|
+
size: O.Small,
|
|
205
|
+
icon: nl,
|
|
205
206
|
onClick: (e) => {
|
|
206
|
-
|
|
207
|
+
R?.(e), c(!1);
|
|
207
208
|
}
|
|
208
209
|
}
|
|
209
210
|
)
|
|
210
211
|
] }),
|
|
211
|
-
n &&
|
|
212
|
+
n && fe && s.length > 0 && /* @__PURE__ */ l("div", { className: p(rl, "mt-2"), children: /* @__PURE__ */ l(
|
|
212
213
|
Ue,
|
|
213
214
|
{
|
|
214
|
-
id: `${
|
|
215
|
-
labelProps: { label:
|
|
216
|
-
isSelected:
|
|
217
|
-
isIndeterminate:
|
|
218
|
-
onChange:
|
|
215
|
+
id: `${u}-selectAll`,
|
|
216
|
+
labelProps: { label: ue },
|
|
217
|
+
isSelected: B,
|
|
218
|
+
isIndeterminate: Oe,
|
|
219
|
+
onChange: Ae
|
|
219
220
|
}
|
|
220
221
|
) }),
|
|
221
|
-
|
|
222
|
-
|
|
222
|
+
/* @__PURE__ */ l("div", { role: "none", className: al, children: w.length === 0 ? /* @__PURE__ */ l("div", { className: "px-2 py-3", children: /* @__PURE__ */ l(
|
|
223
|
+
We,
|
|
223
224
|
{
|
|
224
|
-
icon:
|
|
225
|
-
title:
|
|
226
|
-
description:
|
|
225
|
+
icon: be ?? il,
|
|
226
|
+
title: he,
|
|
227
|
+
description: pe
|
|
227
228
|
}
|
|
228
|
-
) }) :
|
|
229
|
-
const t =
|
|
230
|
-
return
|
|
229
|
+
) }) : w.map((e) => {
|
|
230
|
+
const t = r.includes(e.value);
|
|
231
|
+
return e.children?.length ? /* @__PURE__ */ l(
|
|
232
|
+
Xe,
|
|
233
|
+
{
|
|
234
|
+
opt: e,
|
|
235
|
+
selectedValues: r,
|
|
236
|
+
mark: n ? j.Checkbox : Q,
|
|
237
|
+
onSelect: E
|
|
238
|
+
},
|
|
239
|
+
e.value
|
|
240
|
+
) : n ? (
|
|
231
241
|
/*
|
|
232
242
|
The row itself is the control: one `option` whose state rides on
|
|
233
243
|
`aria-selected`, with a decorative box drawing the check. A real
|
|
@@ -235,145 +245,124 @@ const Fl = ({
|
|
|
235
245
|
would leave the rest of the 40px rectangle inert — the design
|
|
236
246
|
has the whole row selecting the option.
|
|
237
247
|
*/
|
|
238
|
-
/* @__PURE__ */
|
|
239
|
-
|
|
248
|
+
/* @__PURE__ */ l(
|
|
249
|
+
re,
|
|
240
250
|
{
|
|
241
|
-
id: `${
|
|
242
|
-
type: "button",
|
|
251
|
+
id: `${u}-${e.value}`,
|
|
243
252
|
role: "option",
|
|
244
253
|
"aria-selected": t,
|
|
245
254
|
"aria-disabled": !!e.disabled,
|
|
246
255
|
disabled: e.disabled,
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
/* @__PURE__ */ l(Ve, { isSelected: t, disabled: e.disabled }),
|
|
255
|
-
e.icon && /* @__PURE__ */ l(te, { icon: e.icon }),
|
|
256
|
-
/* @__PURE__ */ l("span", { className: "min-w-0 flex-1 truncate text-start", children: e.labelNode ?? e.label }),
|
|
257
|
-
e.description && /* @__PURE__ */ l("span", { className: "shrink-0 text-secondary dial-small-text", children: e.description })
|
|
258
|
-
]
|
|
256
|
+
mark: j.Checkbox,
|
|
257
|
+
selected: t,
|
|
258
|
+
icon: e.icon,
|
|
259
|
+
label: e.labelNode ?? e.label,
|
|
260
|
+
description: e.description,
|
|
261
|
+
rightControl: e.rightControl,
|
|
262
|
+
onClick: () => E(e.value)
|
|
259
263
|
},
|
|
260
264
|
e.value
|
|
261
265
|
)
|
|
262
|
-
) :
|
|
263
|
-
|
|
264
|
-
{
|
|
265
|
-
opt: e,
|
|
266
|
-
selectedValues: a,
|
|
267
|
-
onSelect: B
|
|
268
|
-
},
|
|
269
|
-
e.value
|
|
270
|
-
) : /* @__PURE__ */ d(
|
|
271
|
-
"button",
|
|
266
|
+
) : /* @__PURE__ */ l(
|
|
267
|
+
re,
|
|
272
268
|
{
|
|
273
269
|
role: "option",
|
|
274
|
-
type: "button",
|
|
275
270
|
"aria-selected": t,
|
|
276
271
|
"aria-disabled": !!e.disabled,
|
|
277
272
|
disabled: e.disabled,
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
/* @__PURE__ */ l(le, { text: e.labelNode ?? e.label }),
|
|
287
|
-
e.description && /* @__PURE__ */ l("div", { className: "text-secondary dial-small-text", children: e.description })
|
|
288
|
-
] }),
|
|
289
|
-
t && ol
|
|
290
|
-
]
|
|
273
|
+
mark: Q,
|
|
274
|
+
selected: t,
|
|
275
|
+
ellipsisLabel: !0,
|
|
276
|
+
icon: e.icon,
|
|
277
|
+
label: e.labelNode ?? e.label,
|
|
278
|
+
description: e.description,
|
|
279
|
+
rightControl: e.rightControl,
|
|
280
|
+
onClick: () => !e.disabled && E(e.value)
|
|
291
281
|
},
|
|
292
282
|
e.value
|
|
293
283
|
);
|
|
294
|
-
}),
|
|
295
|
-
|
|
284
|
+
}) }),
|
|
285
|
+
I && /* @__PURE__ */ l(
|
|
296
286
|
"div",
|
|
297
287
|
{
|
|
298
288
|
onClick: (e) => {
|
|
299
|
-
|
|
289
|
+
Z?.(e), Z && c(!1);
|
|
300
290
|
},
|
|
301
|
-
children: typeof
|
|
291
|
+
children: typeof I == "function" ? I() : I
|
|
302
292
|
}
|
|
303
293
|
)
|
|
304
294
|
]
|
|
305
295
|
}
|
|
306
296
|
);
|
|
307
|
-
return /* @__PURE__ */
|
|
308
|
-
g && /* @__PURE__ */ l(
|
|
309
|
-
/* @__PURE__ */
|
|
297
|
+
return /* @__PURE__ */ S("div", { className: p("flex w-full flex-col gap-2", ve), children: [
|
|
298
|
+
g && /* @__PURE__ */ l(Re, { ...g, htmlFor: u }),
|
|
299
|
+
/* @__PURE__ */ S("div", { className: "flex flex-col gap-1", children: [
|
|
310
300
|
/* @__PURE__ */ l(
|
|
311
|
-
|
|
301
|
+
Ve,
|
|
312
302
|
{
|
|
313
|
-
open:
|
|
303
|
+
open: d,
|
|
314
304
|
onOpenChange: c,
|
|
315
|
-
disabled:
|
|
316
|
-
closable:
|
|
317
|
-
onClose:
|
|
305
|
+
disabled: b,
|
|
306
|
+
closable: D,
|
|
307
|
+
onClose: R,
|
|
318
308
|
placement: "bottom-start",
|
|
319
309
|
allowedPlacements: ["bottom-start", "top-start"],
|
|
320
|
-
|
|
321
|
-
listClassName: f(ll, Se),
|
|
310
|
+
listClassName: p(Pe, Ne),
|
|
322
311
|
className: "w-full",
|
|
323
|
-
renderOverlay:
|
|
312
|
+
renderOverlay: Ee,
|
|
324
313
|
children: /* @__PURE__ */ l(
|
|
325
|
-
|
|
314
|
+
te,
|
|
326
315
|
{
|
|
327
|
-
id:
|
|
328
|
-
size:
|
|
329
|
-
disabled:
|
|
330
|
-
invalid:
|
|
331
|
-
value:
|
|
332
|
-
placeholder:
|
|
316
|
+
id: u,
|
|
317
|
+
size: K,
|
|
318
|
+
disabled: b,
|
|
319
|
+
invalid: me,
|
|
320
|
+
value: De,
|
|
321
|
+
placeholder: N ? void 0 : oe,
|
|
333
322
|
readOnly: !0,
|
|
334
|
-
iconBefore: n ? void 0 :
|
|
323
|
+
iconBefore: n ? void 0 : i?.icon,
|
|
335
324
|
iconAfter: /* @__PURE__ */ l(
|
|
336
|
-
|
|
325
|
+
_e,
|
|
337
326
|
{
|
|
338
|
-
size:
|
|
339
|
-
stroke:
|
|
327
|
+
size: le ? ne.SM : ne.MD,
|
|
328
|
+
stroke: Ze,
|
|
340
329
|
"aria-hidden": "true",
|
|
341
|
-
className:
|
|
342
|
-
|
|
343
|
-
|
|
330
|
+
className: p(
|
|
331
|
+
Ye,
|
|
332
|
+
d && "rotate-180"
|
|
344
333
|
)
|
|
345
334
|
}
|
|
346
335
|
),
|
|
347
336
|
role: "combobox",
|
|
348
337
|
"aria-haspopup": "listbox",
|
|
349
|
-
"aria-expanded":
|
|
350
|
-
"aria-controls":
|
|
338
|
+
"aria-expanded": d,
|
|
339
|
+
"aria-controls": ee,
|
|
351
340
|
"aria-autocomplete": "none",
|
|
352
|
-
"aria-label":
|
|
341
|
+
"aria-label": Fe,
|
|
353
342
|
containerClassName: "w-full",
|
|
354
|
-
wrapperClassName:
|
|
355
|
-
!
|
|
343
|
+
wrapperClassName: p(
|
|
344
|
+
!b && "cursor-pointer",
|
|
356
345
|
n && y && [
|
|
357
346
|
"!h-auto flex-wrap py-1.5",
|
|
358
|
-
|
|
347
|
+
le ? "min-h-[24px]" : "min-h-[40px]"
|
|
359
348
|
],
|
|
360
|
-
|
|
349
|
+
Ce
|
|
361
350
|
),
|
|
362
|
-
className:
|
|
351
|
+
className: p(
|
|
363
352
|
"cursor-pointer",
|
|
364
|
-
|
|
353
|
+
N && "w-0 min-w-0 flex-none p-0"
|
|
365
354
|
),
|
|
366
355
|
onKeyDown: Le,
|
|
367
|
-
children:
|
|
356
|
+
children: N
|
|
368
357
|
}
|
|
369
358
|
)
|
|
370
359
|
}
|
|
371
360
|
),
|
|
372
361
|
/* @__PURE__ */ l(Ge, { text: V }),
|
|
373
|
-
!V && /* @__PURE__ */ l(
|
|
362
|
+
!V && /* @__PURE__ */ l(He, { text: ce })
|
|
374
363
|
] })
|
|
375
364
|
] });
|
|
376
365
|
};
|
|
377
366
|
export {
|
|
378
|
-
|
|
367
|
+
Al as Select
|
|
379
368
|
};
|