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