@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,53 +1,53 @@
|
|
|
1
|
-
import { jsxs as S, Fragment as R, jsx as
|
|
2
|
-
import { useFloatingNodeId as
|
|
3
|
-
import { useState as b, useRef as
|
|
4
|
-
import { InteractiveTooltip as
|
|
1
|
+
import { jsxs as S, Fragment as R, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { useFloatingNodeId as $e, useFloating as Be, autoUpdate as He, offset as Ye, autoPlacement as Ke, flip as Ue, shift as We, size as je, useClick as ze, useHover as Qe, safePolygon as qe, useDismiss as Xe, useRole as Ge, useInteractions as Je, FloatingTree as Ze, FloatingNode as Ve, FloatingPortal as eo, FloatingFocusManager as oo } from "@floating-ui/react";
|
|
3
|
+
import { useState as b, useRef as to, useCallback as g, useId as no, useEffect as ie, useMemo as le, Fragment as ro, isValidElement as so, cloneElement as io } from "react";
|
|
4
|
+
import { InteractiveTooltip as lo } from "../InteractiveTooltip/InteractiveTooltip.js";
|
|
5
5
|
import { DIAL_KIT_CLASS as _ } from "../../../constants/public-class-names.js";
|
|
6
|
-
import { DropdownTrigger as
|
|
7
|
-
import { MenuItemMark as
|
|
8
|
-
import { dropdownGap as
|
|
9
|
-
import { CloseButton as
|
|
10
|
-
import { MenuItem as
|
|
11
|
-
import { Search as
|
|
12
|
-
import { useThemeScope as
|
|
13
|
-
import { ElementSize as
|
|
14
|
-
import { mergeClasses as
|
|
15
|
-
import { DropdownSubMenuItem as
|
|
16
|
-
import { resolveItemMark as
|
|
17
|
-
import { highlightDropdownItems as
|
|
18
|
-
const
|
|
19
|
-
if (
|
|
20
|
-
if (
|
|
21
|
-
const u =
|
|
6
|
+
import { DropdownTrigger as y, DropdownItemType as ae } from "../../../types/dropdown.js";
|
|
7
|
+
import { MenuItemMark as ao } from "../../../types/menu-item.js";
|
|
8
|
+
import { dropdownGap as k, dropdownSearchClassName as co, dropdownNoResultsClassName as uo, dropdownDividerClassName as fo, getDropdownListHeight as po, dropdownItemListClassName as mo, dropdownBaseClassName as ho, dropdownListBaseClassName as go } from "./constants.js";
|
|
9
|
+
import { CloseButton as wo } from "../CloseButton/CloseButton.js";
|
|
10
|
+
import { MenuItem as yo } from "../MenuItem/MenuItem.js";
|
|
11
|
+
import { Search as vo } from "../Search/Search.js";
|
|
12
|
+
import { useThemeScope as xo } from "../ThemeScope/ThemeScope.js";
|
|
13
|
+
import { ElementSize as Co } from "../../../types/size.js";
|
|
14
|
+
import { mergeClasses as v } from "../../../utils/merge-classes.js";
|
|
15
|
+
import { DropdownSubMenuItem as No } from "./DropdownSubMenuItem.js";
|
|
16
|
+
import { resolveItemMark as ko, getItemRole as Eo } from "./item-mark.js";
|
|
17
|
+
import { highlightDropdownItems as Do, filterDropdownItems as Io } from "./search.js";
|
|
18
|
+
const Mo = '[role="menuitem"], [role="menuitemcheckbox"], [role="menuitemradio"], [role="option"]', Po = (t) => !t.hasAttribute("disabled") && t.getAttribute("aria-disabled") !== "true", Ao = ["ArrowDown", "ArrowUp", "Home", "End"], So = (t, d, f) => {
|
|
19
|
+
if (t === "Home") return 0;
|
|
20
|
+
if (t === "End") return f - 1;
|
|
21
|
+
const u = t === "ArrowDown" ? 1 : -1;
|
|
22
22
|
return d === -1 ? u === 1 ? 0 : f - 1 : (d + u + f) % f;
|
|
23
|
-
},
|
|
24
|
-
children:
|
|
23
|
+
}, Fo = (t) => "clientWidth" in t ? t.clientWidth : t.getBoundingClientRect?.()?.width ?? 0, Xo = ({
|
|
24
|
+
children: t,
|
|
25
25
|
items: d,
|
|
26
26
|
onItemClick: f,
|
|
27
27
|
menuHeader: u,
|
|
28
|
-
menuFooter:
|
|
28
|
+
menuFooter: x,
|
|
29
29
|
renderOverlay: E,
|
|
30
|
-
trigger:
|
|
30
|
+
trigger: p = [y.Click],
|
|
31
31
|
placement: $,
|
|
32
|
-
disabled:
|
|
32
|
+
disabled: a = !1,
|
|
33
33
|
open: B,
|
|
34
|
-
defaultOpen:
|
|
35
|
-
onOpenChange:
|
|
36
|
-
closable:
|
|
37
|
-
onClose:
|
|
38
|
-
className:
|
|
39
|
-
overlayContentClassName:
|
|
34
|
+
defaultOpen: ce = !1,
|
|
35
|
+
onOpenChange: H,
|
|
36
|
+
closable: de = !1,
|
|
37
|
+
onClose: ue,
|
|
38
|
+
className: fe,
|
|
39
|
+
overlayContentClassName: Y,
|
|
40
40
|
separatorClassName: K,
|
|
41
|
-
listClassName:
|
|
41
|
+
listClassName: pe,
|
|
42
42
|
listStyle: U,
|
|
43
43
|
outsidePressIgnoreRef: W,
|
|
44
|
-
outsideClosable:
|
|
45
|
-
allowedPlacements:
|
|
44
|
+
outsideClosable: me = !0,
|
|
45
|
+
allowedPlacements: he,
|
|
46
46
|
anchorToMouse: D = !1,
|
|
47
47
|
matchReferenceWidth: F = !0,
|
|
48
48
|
maxDropdownHeight: j,
|
|
49
49
|
initialFocus: z,
|
|
50
|
-
searchable:
|
|
50
|
+
searchable: l = !1,
|
|
51
51
|
searchValue: T,
|
|
52
52
|
onSearchChange: Q,
|
|
53
53
|
searchPlaceholder: L = "Search",
|
|
@@ -56,148 +56,148 @@ const yt = '[role="menuitem"], [role="menuitemcheckbox"], [role="menuitemradio"]
|
|
|
56
56
|
filterItem: G,
|
|
57
57
|
maxVisibleItems: C
|
|
58
58
|
}) => {
|
|
59
|
-
const
|
|
60
|
-
(
|
|
61
|
-
T === void 0 &&
|
|
59
|
+
const ge = xo(), [we, ye] = b(ce), O = B !== void 0, c = O ? !!B : we, I = to(null), [ve, xe] = b(""), m = T ?? ve, M = g(
|
|
60
|
+
(o) => {
|
|
61
|
+
T === void 0 && xe(o), Q?.(o);
|
|
62
62
|
},
|
|
63
63
|
[T, Q]
|
|
64
|
-
), [
|
|
65
|
-
(
|
|
66
|
-
|
|
64
|
+
), [Ce, Ne] = b(!0), r = g(
|
|
65
|
+
(o, e, s) => {
|
|
66
|
+
o ? Ne(s !== "hover" && s !== "safe-polygon") : l && m && M(""), O || ye(o), H?.(o);
|
|
67
67
|
},
|
|
68
|
-
[O,
|
|
69
|
-
), J =
|
|
68
|
+
[O, H, l, m, M]
|
|
69
|
+
), J = no(), ke = $ === void 0, Z = $e(), { refs: w, floatingStyles: V, context: N } = Be({
|
|
70
70
|
nodeId: Z,
|
|
71
71
|
placement: $,
|
|
72
|
-
open:
|
|
73
|
-
onOpenChange:
|
|
74
|
-
whileElementsMounted:
|
|
72
|
+
open: c,
|
|
73
|
+
onOpenChange: r,
|
|
74
|
+
whileElementsMounted: He,
|
|
75
75
|
middleware: [
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
Ye({ mainAxis: k, crossAxis: 0 }),
|
|
77
|
+
ke ? Ke({
|
|
78
78
|
alignment: "start",
|
|
79
79
|
crossAxis: !0,
|
|
80
|
-
padding:
|
|
81
|
-
allowedPlacements:
|
|
82
|
-
}) :
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
padding:
|
|
86
|
-
apply({ availableWidth:
|
|
87
|
-
const
|
|
88
|
-
|
|
80
|
+
padding: k,
|
|
81
|
+
allowedPlacements: he
|
|
82
|
+
}) : Ue({ padding: k }),
|
|
83
|
+
We({ padding: k }),
|
|
84
|
+
je({
|
|
85
|
+
padding: k,
|
|
86
|
+
apply({ availableWidth: o, availableHeight: e, elements: s }) {
|
|
87
|
+
const i = s.floating, h = Fo(s.reference);
|
|
88
|
+
i.style.setProperty(
|
|
89
89
|
"--fui-available-height",
|
|
90
90
|
`${Math.floor(e)}px`
|
|
91
|
-
),
|
|
91
|
+
), i.style.setProperty(
|
|
92
92
|
"--reference-width",
|
|
93
|
-
F ? `${Math.round(
|
|
94
|
-
), F ?
|
|
95
|
-
const
|
|
96
|
-
|
|
93
|
+
F ? `${Math.round(h)}px` : "0px"
|
|
94
|
+
), F ? i.style.minWidth = `${Math.round(h)}px` : i.style.removeProperty("min-width"), i.style.maxWidth = `${Math.floor(o)}px`;
|
|
95
|
+
const se = Math.floor(e);
|
|
96
|
+
i.style.maxHeight = `${j ? Math.min(se, j) : se}px`;
|
|
97
97
|
}
|
|
98
98
|
})
|
|
99
99
|
]
|
|
100
|
-
}),
|
|
101
|
-
enabled:
|
|
102
|
-
}),
|
|
103
|
-
enabled:
|
|
100
|
+
}), Ee = ze(N, {
|
|
101
|
+
enabled: p.includes(y.Click) && !a
|
|
102
|
+
}), De = Qe(N, {
|
|
103
|
+
enabled: p.includes(y.Hover) && !a,
|
|
104
104
|
move: !1,
|
|
105
105
|
restMs: 40,
|
|
106
|
-
handleClose:
|
|
106
|
+
handleClose: qe(),
|
|
107
107
|
delay: { open: 80, close: 80 }
|
|
108
|
-
}),
|
|
108
|
+
}), Ie = Xe(N, {
|
|
109
109
|
bubbles: !0,
|
|
110
110
|
referencePress: !1,
|
|
111
|
-
outsidePress: (
|
|
112
|
-
if (!
|
|
113
|
-
const e =
|
|
111
|
+
outsidePress: (o) => {
|
|
112
|
+
if (!me) return !1;
|
|
113
|
+
const e = o.target;
|
|
114
114
|
return !(W?.current && e instanceof Node && W.current.contains(e));
|
|
115
115
|
}
|
|
116
|
-
}),
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
]), P =
|
|
122
|
-
(
|
|
116
|
+
}), Me = Ge(N, { role: "menu" }), { getReferenceProps: Pe, getFloatingProps: Ae } = Je([
|
|
117
|
+
Ee,
|
|
118
|
+
De,
|
|
119
|
+
Ie,
|
|
120
|
+
Me
|
|
121
|
+
]), P = g(
|
|
122
|
+
(o, e) => {
|
|
123
123
|
w.setPositionReference({
|
|
124
124
|
getBoundingClientRect: () => ({
|
|
125
125
|
width: 0,
|
|
126
126
|
height: 0,
|
|
127
|
-
x:
|
|
127
|
+
x: o,
|
|
128
128
|
y: e,
|
|
129
129
|
top: e,
|
|
130
|
-
left:
|
|
131
|
-
right:
|
|
130
|
+
left: o,
|
|
131
|
+
right: o,
|
|
132
132
|
bottom: e
|
|
133
133
|
})
|
|
134
134
|
});
|
|
135
135
|
},
|
|
136
136
|
[w]
|
|
137
|
-
),
|
|
138
|
-
(
|
|
139
|
-
!
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
)),
|
|
137
|
+
), Se = g(
|
|
138
|
+
(o) => {
|
|
139
|
+
!p.includes(y.ContextMenu) || a || (o.preventDefault(), D && (P(o.clientX, o.clientY), I.current = document.elementFromPoint(
|
|
140
|
+
o.clientX,
|
|
141
|
+
o.clientY
|
|
142
|
+
)), r(!0));
|
|
143
143
|
},
|
|
144
|
-
[D,
|
|
145
|
-
),
|
|
146
|
-
(
|
|
147
|
-
!D ||
|
|
148
|
-
|
|
149
|
-
|
|
144
|
+
[D, a, r, P, p]
|
|
145
|
+
), Fe = g(
|
|
146
|
+
(o) => {
|
|
147
|
+
!D || a || (p.includes(y.ContextMenu) && c && r(!1), P(o.clientX, o.clientY), I.current = document.elementFromPoint(
|
|
148
|
+
o.clientX,
|
|
149
|
+
o.clientY
|
|
150
150
|
));
|
|
151
151
|
},
|
|
152
|
-
[D,
|
|
152
|
+
[D, a, P, c, p, r]
|
|
153
153
|
);
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
}, [
|
|
157
|
-
const
|
|
158
|
-
(
|
|
159
|
-
if (
|
|
154
|
+
ie(() => {
|
|
155
|
+
a && c && r(!1);
|
|
156
|
+
}, [a, c, r]);
|
|
157
|
+
const Te = g(
|
|
158
|
+
(o) => {
|
|
159
|
+
if (o.defaultPrevented || !Ao.includes(o.key) || !o.currentTarget.contains(o.target) || o.target instanceof HTMLInputElement && (o.key === "Home" || o.key === "End"))
|
|
160
160
|
return;
|
|
161
161
|
const e = Array.from(
|
|
162
|
-
|
|
163
|
-
|
|
162
|
+
o.currentTarget.querySelectorAll(
|
|
163
|
+
Mo
|
|
164
164
|
)
|
|
165
|
-
).filter(
|
|
165
|
+
).filter(Po);
|
|
166
166
|
if (e.length === 0) return;
|
|
167
|
-
|
|
168
|
-
const
|
|
169
|
-
e[
|
|
167
|
+
o.preventDefault();
|
|
168
|
+
const s = o.currentTarget.ownerDocument.activeElement, i = e.findIndex((h) => h === s);
|
|
169
|
+
e[So(o.key, i, e.length)]?.focus();
|
|
170
170
|
},
|
|
171
171
|
[]
|
|
172
|
-
), ee =
|
|
173
|
-
(
|
|
174
|
-
|
|
172
|
+
), ee = g(
|
|
173
|
+
(o) => (e) => {
|
|
174
|
+
o.disabled || (o.onClick?.({ key: o.key, domEvent: e }), f?.({ key: o.key, domEvent: e }), o.selectable || r(!1));
|
|
175
175
|
},
|
|
176
|
-
[f,
|
|
177
|
-
), A =
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
), [d,
|
|
176
|
+
[f, r]
|
|
177
|
+
), A = le(() => !d || !l ? d : Do(
|
|
178
|
+
Io(d, m, G),
|
|
179
|
+
m
|
|
180
|
+
), [d, l, m, G]), Le = le(() => {
|
|
181
181
|
if (E) return E();
|
|
182
182
|
if (!A) return null;
|
|
183
|
-
const
|
|
183
|
+
const o = l && A.length === 0;
|
|
184
184
|
return /* @__PURE__ */ S(R, { children: [
|
|
185
|
-
u && /* @__PURE__ */
|
|
186
|
-
|
|
185
|
+
u && /* @__PURE__ */ n(R, { children: typeof u == "function" ? u() : u }),
|
|
186
|
+
l && /* @__PURE__ */ n(
|
|
187
187
|
"div",
|
|
188
188
|
{
|
|
189
|
-
className:
|
|
190
|
-
|
|
189
|
+
className: v(
|
|
190
|
+
co,
|
|
191
191
|
_.dropdownSearch
|
|
192
192
|
),
|
|
193
|
-
children: /* @__PURE__ */
|
|
194
|
-
|
|
193
|
+
children: /* @__PURE__ */ n(
|
|
194
|
+
vo,
|
|
195
195
|
{
|
|
196
|
-
value:
|
|
196
|
+
value: m,
|
|
197
197
|
placeholder: L,
|
|
198
198
|
"aria-label": L,
|
|
199
199
|
clearLabel: q,
|
|
200
|
-
size:
|
|
200
|
+
size: Co.Small,
|
|
201
201
|
onChange: (e) => M(e ?? "")
|
|
202
202
|
}
|
|
203
203
|
)
|
|
@@ -207,46 +207,46 @@ const yt = '[role="menuitem"], [role="menuitemcheckbox"], [role="menuitemradio"]
|
|
|
207
207
|
"div",
|
|
208
208
|
{
|
|
209
209
|
role: "none",
|
|
210
|
-
className:
|
|
211
|
-
|
|
210
|
+
className: v(
|
|
211
|
+
mo,
|
|
212
212
|
/* Under a search field or a row cap the list scrolls by itself,
|
|
213
213
|
so the field stays in view; the panel's own height cap still
|
|
214
214
|
shrinks it through `min-h-0`. */
|
|
215
|
-
(
|
|
216
|
-
|
|
215
|
+
(l || C != null) && "min-h-0 flex-1 overflow-auto",
|
|
216
|
+
Y,
|
|
217
217
|
_.dropdownList
|
|
218
218
|
),
|
|
219
|
-
style: C != null ? { maxHeight:
|
|
219
|
+
style: C != null ? { maxHeight: po(C) } : void 0,
|
|
220
220
|
"aria-label": "dropdown",
|
|
221
221
|
children: [
|
|
222
|
-
|
|
222
|
+
l && /* Always mounted, so a screen reader announces the text when a
|
|
223
223
|
query empties the list rather than missing a fresh region. */
|
|
224
|
-
/* @__PURE__ */
|
|
224
|
+
/* @__PURE__ */ n(
|
|
225
225
|
"div",
|
|
226
226
|
{
|
|
227
227
|
role: "status",
|
|
228
|
-
className:
|
|
229
|
-
children:
|
|
228
|
+
className: o ? uo : "sr-only",
|
|
229
|
+
children: o ? X : ""
|
|
230
230
|
}
|
|
231
231
|
),
|
|
232
232
|
A.map((e) => {
|
|
233
|
-
if (e.type ===
|
|
234
|
-
return /* @__PURE__ */
|
|
233
|
+
if (e.type === ae.Divider)
|
|
234
|
+
return /* @__PURE__ */ n(
|
|
235
235
|
"div",
|
|
236
236
|
{
|
|
237
237
|
role: "separator",
|
|
238
|
-
className:
|
|
239
|
-
|
|
238
|
+
className: v(
|
|
239
|
+
fo,
|
|
240
240
|
K
|
|
241
241
|
)
|
|
242
242
|
},
|
|
243
243
|
e.key
|
|
244
244
|
);
|
|
245
|
-
if (e.type ===
|
|
246
|
-
return /* @__PURE__ */
|
|
245
|
+
if (e.type === ae.PlainText)
|
|
246
|
+
return /* @__PURE__ */ n(
|
|
247
247
|
"div",
|
|
248
248
|
{
|
|
249
|
-
className:
|
|
249
|
+
className: v(
|
|
250
250
|
"px-3 py-2 text-secondary dial-caption-text",
|
|
251
251
|
e.className
|
|
252
252
|
),
|
|
@@ -255,23 +255,23 @@ const yt = '[role="menuitem"], [role="menuitemcheckbox"], [role="menuitemradio"]
|
|
|
255
255
|
e.key
|
|
256
256
|
);
|
|
257
257
|
if (e.children?.length)
|
|
258
|
-
return /* @__PURE__ */
|
|
259
|
-
|
|
258
|
+
return /* @__PURE__ */ n(
|
|
259
|
+
No,
|
|
260
260
|
{
|
|
261
261
|
item: e,
|
|
262
|
-
onRootClose: () =>
|
|
262
|
+
onRootClose: () => r(!1)
|
|
263
263
|
},
|
|
264
264
|
e.key
|
|
265
265
|
);
|
|
266
|
-
const
|
|
267
|
-
|
|
266
|
+
const s = ko(e), i = Eo(e), h = /* @__PURE__ */ n(
|
|
267
|
+
yo,
|
|
268
268
|
{
|
|
269
|
-
role:
|
|
270
|
-
"aria-checked":
|
|
271
|
-
"aria-current":
|
|
269
|
+
role: i,
|
|
270
|
+
"aria-checked": i === "menuitem" ? void 0 : !!e.checked,
|
|
271
|
+
"aria-current": s === ao.Highlight && e.checked ? !0 : void 0,
|
|
272
272
|
"aria-disabled": !!e.disabled,
|
|
273
273
|
disabled: e.disabled,
|
|
274
|
-
mark:
|
|
274
|
+
mark: s,
|
|
275
275
|
selected: !!e.checked,
|
|
276
276
|
danger: e.danger,
|
|
277
277
|
icon: e.icon,
|
|
@@ -282,78 +282,89 @@ const yt = '[role="menuitem"], [role="menuitemcheckbox"], [role="menuitemradio"]
|
|
|
282
282
|
children: e.renderItem?.(e)
|
|
283
283
|
}
|
|
284
284
|
);
|
|
285
|
-
return /* @__PURE__ */
|
|
286
|
-
|
|
285
|
+
return /* @__PURE__ */ n(ro, { children: e.interactiveTooltip ? /* @__PURE__ */ n(
|
|
286
|
+
lo,
|
|
287
287
|
{
|
|
288
288
|
asChild: !0,
|
|
289
289
|
placement: e.interactiveTooltip.placement,
|
|
290
290
|
content: e.interactiveTooltip.content,
|
|
291
291
|
contentClassName: e.interactiveTooltip.contentClassName,
|
|
292
|
-
children:
|
|
292
|
+
children: h
|
|
293
293
|
}
|
|
294
|
-
) :
|
|
294
|
+
) : h }, e.key);
|
|
295
295
|
})
|
|
296
296
|
]
|
|
297
297
|
}
|
|
298
298
|
),
|
|
299
|
-
|
|
299
|
+
x && /* @__PURE__ */ n(R, { children: typeof x == "function" ? x() : x })
|
|
300
300
|
] });
|
|
301
301
|
}, [
|
|
302
302
|
ee,
|
|
303
303
|
A,
|
|
304
|
-
|
|
304
|
+
x,
|
|
305
305
|
u,
|
|
306
306
|
E,
|
|
307
|
-
|
|
308
|
-
|
|
307
|
+
r,
|
|
308
|
+
Y,
|
|
309
309
|
K,
|
|
310
|
-
|
|
311
|
-
|
|
310
|
+
l,
|
|
311
|
+
m,
|
|
312
312
|
M,
|
|
313
313
|
L,
|
|
314
314
|
q,
|
|
315
315
|
X,
|
|
316
316
|
C
|
|
317
|
-
]),
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
317
|
+
]), Oe = !E && (l || C != null), {
|
|
318
|
+
"aria-haspopup": oe = "menu",
|
|
319
|
+
"aria-expanded": te = c,
|
|
320
|
+
"aria-controls": ne = J,
|
|
321
|
+
...Re
|
|
322
|
+
} = Pe({
|
|
323
|
+
onContextMenu: Se,
|
|
324
|
+
onMouseDown: Fe
|
|
325
|
+
}), be = {
|
|
326
|
+
"aria-haspopup": oe,
|
|
327
|
+
"aria-expanded": te,
|
|
328
|
+
"aria-controls": ne
|
|
329
|
+
}, re = so(t) && p.some((o) => o !== y.ContextMenu), _e = re ? io(t, {
|
|
330
|
+
"aria-haspopup": t.props["aria-haspopup"] ?? oe,
|
|
331
|
+
"aria-expanded": t.props["aria-expanded"] ?? te,
|
|
332
|
+
"aria-controls": t.props["aria-controls"] ?? ne
|
|
333
|
+
}) : t;
|
|
334
|
+
return ie(() => {
|
|
335
|
+
if (!c) return;
|
|
336
|
+
const o = w.reference.current;
|
|
324
337
|
let e = null;
|
|
325
|
-
if (
|
|
326
|
-
const
|
|
327
|
-
([
|
|
328
|
-
|
|
338
|
+
if (o instanceof Element ? e = o : I.current instanceof Element && (e = I.current), !e) return;
|
|
339
|
+
const s = new IntersectionObserver(
|
|
340
|
+
([i]) => {
|
|
341
|
+
i.isIntersecting || r(!1);
|
|
329
342
|
},
|
|
330
343
|
{ root: null, threshold: 0 }
|
|
331
344
|
);
|
|
332
|
-
return
|
|
333
|
-
}, [
|
|
334
|
-
/* @__PURE__ */
|
|
345
|
+
return s.observe(e), () => s.disconnect();
|
|
346
|
+
}, [c, w.reference, r]), /* @__PURE__ */ n(Ze, { children: /* @__PURE__ */ S(Ve, { id: Z, children: [
|
|
347
|
+
/* @__PURE__ */ n(
|
|
335
348
|
"span",
|
|
336
349
|
{
|
|
337
350
|
ref: w.setReference,
|
|
338
|
-
className:
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
351
|
+
className: v(
|
|
352
|
+
ho,
|
|
353
|
+
a && "!cursor-not-allowed opacity-75",
|
|
354
|
+
fe,
|
|
342
355
|
_.dropdown
|
|
343
356
|
),
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
...Fe,
|
|
348
|
-
children: l
|
|
357
|
+
...re ? void 0 : be,
|
|
358
|
+
...Re,
|
|
359
|
+
children: _e
|
|
349
360
|
}
|
|
350
361
|
),
|
|
351
|
-
|
|
352
|
-
|
|
362
|
+
c && /* @__PURE__ */ n(eo, { children: /* @__PURE__ */ n(
|
|
363
|
+
oo,
|
|
353
364
|
{
|
|
354
|
-
context:
|
|
365
|
+
context: N,
|
|
355
366
|
modal: !1,
|
|
356
|
-
initialFocus: z !== void 0 ? z :
|
|
367
|
+
initialFocus: z !== void 0 ? z : Ce ? 0 : -1,
|
|
357
368
|
returnFocus: !0,
|
|
358
369
|
children: /* @__PURE__ */ S(
|
|
359
370
|
"div",
|
|
@@ -361,25 +372,25 @@ const yt = '[role="menuitem"], [role="menuitemcheckbox"], [role="menuitemradio"]
|
|
|
361
372
|
id: J,
|
|
362
373
|
ref: w.setFloating,
|
|
363
374
|
style: U ? { ...U, ...V } : V,
|
|
364
|
-
className:
|
|
365
|
-
|
|
375
|
+
className: v(
|
|
376
|
+
go,
|
|
366
377
|
!F && "w-max",
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
378
|
+
Oe ? "flex flex-col overflow-hidden" : "overflow-auto",
|
|
379
|
+
ge,
|
|
380
|
+
pe
|
|
370
381
|
),
|
|
371
|
-
...
|
|
382
|
+
...Ae({ onKeyDown: Te }),
|
|
372
383
|
children: [
|
|
373
|
-
|
|
374
|
-
|
|
384
|
+
de && /* @__PURE__ */ n("div", { className: "flex items-center justify-between px-2 pt-2", children: /* @__PURE__ */ n(
|
|
385
|
+
wo,
|
|
375
386
|
{
|
|
376
387
|
ariaLabel: "Close dropdown",
|
|
377
|
-
onClose: (
|
|
378
|
-
|
|
388
|
+
onClose: (o) => {
|
|
389
|
+
ue?.(o), r(!1);
|
|
379
390
|
}
|
|
380
391
|
}
|
|
381
392
|
) }),
|
|
382
|
-
|
|
393
|
+
Le
|
|
383
394
|
]
|
|
384
395
|
}
|
|
385
396
|
)
|
|
@@ -388,5 +399,5 @@ const yt = '[role="menuitem"], [role="menuitemcheckbox"], [role="menuitemradio"]
|
|
|
388
399
|
] }) });
|
|
389
400
|
};
|
|
390
401
|
export {
|
|
391
|
-
|
|
402
|
+
Xo as Dropdown
|
|
392
403
|
};
|