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