@stackone/malachite 2.34.0 → 2.36.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/COMPONENTS.md +3 -3
- package/dist/components/Alert.js +75 -61
- package/dist/components/Alert.js.map +1 -1
- package/dist/components/Dropdown.js +254 -236
- package/dist/components/Dropdown.js.map +1 -1
- package/dist/components/Typography/MarkdownBlock.js +146 -119
- package/dist/components/Typography/MarkdownBlock.js.map +1 -1
- package/dist/components/Typography/index.js.map +1 -1
- package/dist/components/Typography/inlineMarkdown.js +23 -0
- package/dist/components/Typography/inlineMarkdown.js.map +1 -0
- package/dist/index.d.ts +10 -2
- package/dist/tailwind.css.js +1 -1
- package/package.json +2 -1
|
@@ -1,75 +1,87 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { createPortal as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { FieldMessage as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
|
|
1
|
+
import { jsx as t, jsxs as y, Fragment as we } from "react/jsx-runtime";
|
|
2
|
+
import je, { useState as j, useRef as g, useEffect as Le, useCallback as Ne, useLayoutEffect as Je, useInsertionEffect as et, useId as tt } from "react";
|
|
3
|
+
import { createPortal as rt } from "react-dom";
|
|
4
|
+
import nt, { useFormFieldIds as it } from "./BaseFormComponent.js";
|
|
5
|
+
import Me from "./CustomIcons/CaretDownIcon.js";
|
|
6
|
+
import Ze from "./CustomIcons/CloseIcon.js";
|
|
7
|
+
import { FieldMessage as at } from "./FieldMessage.js";
|
|
8
|
+
import We from "./LoadingInput.js";
|
|
9
|
+
import ot from "./Spinner.js";
|
|
10
|
+
import ye from "./Tooltip.js";
|
|
11
|
+
import lt from "./Typography/MarkdownBlock.js";
|
|
12
|
+
import { inlineMarkdownText as st } from "./Typography/inlineMarkdown.js";
|
|
13
|
+
import { CONTROL_TEXT_SIZE_CLASS as Q, CONTROL_TEXT_SIZE as ct } from "./controlTextSize.js";
|
|
14
|
+
import { controlWidthStyle as Pe } from "./controlWidth.js";
|
|
15
|
+
import { getTriggerVisual as dt, DROPDOWN_TRIGGER_ATTR as Fe } from "./dropdownTriggerStyle.js";
|
|
16
|
+
import { pushEscapeLayer as ut } from "./escapeLayers.js";
|
|
17
|
+
import { measureMenuGeometry as pt, isTriggerOffscreen as ft, rectSignature as ht, MENU_MAX_HEIGHT_PX as gt, MENU_SPECS as oe } from "./floatingMenuGeometry.js";
|
|
18
|
+
import { ensureDropdownPanelStyles as mt } from "./optionRowStyles.js";
|
|
19
|
+
import { overlayIdentity as xt } from "./portalOverlay.js";
|
|
20
|
+
import { useTopLayer as vt } from "./topLayer.js";
|
|
21
|
+
import { tooltipLines as Ie, isCut as le } from "./truncatedLines.js";
|
|
22
|
+
const Ke = /[*`[<&\\]/, se = ({ text: e }) => Ke.test(e) ? /* @__PURE__ */ t(
|
|
23
|
+
lt,
|
|
24
|
+
{
|
|
25
|
+
text: e,
|
|
26
|
+
variant: "inline",
|
|
27
|
+
color: "inherit",
|
|
28
|
+
size: "inherit",
|
|
29
|
+
links: "inert",
|
|
30
|
+
omitMargin: !0
|
|
31
|
+
}
|
|
32
|
+
) : e, Ge = {
|
|
21
33
|
display: "flex",
|
|
22
34
|
alignItems: "center",
|
|
23
35
|
justifyContent: "center",
|
|
24
36
|
gap: 8,
|
|
25
37
|
padding: "24px 16px",
|
|
26
38
|
color: "var(--malachite-text-dimmed, rgb(161, 161, 161))"
|
|
27
|
-
}, Re = "var(--malachite-font-size-xsmall, 11px)",
|
|
28
|
-
const r = i.toLowerCase(), m = e.label.toLowerCase().includes(r), c = e.subtitle ? e.subtitle.toLowerCase().includes(r) : !1,
|
|
29
|
-
return m || c ||
|
|
30
|
-
},
|
|
39
|
+
}, Re = "var(--malachite-font-size-xsmall, 11px)", bt = "[data-dropdown-option]", _e = (e) => Array.from((e == null ? void 0 : e.querySelectorAll(bt)) ?? []), yt = (e) => Ke.test(e) ? st(e) : e.replace(/\s+/g, " "), wt = (e, i) => {
|
|
40
|
+
const r = i.toLowerCase(), m = e.label.toLowerCase().includes(r), c = e.subtitle ? yt(e.subtitle).toLowerCase().includes(r) : !1, w = e.rightSideText ? e.rightSideText.toLowerCase().includes(r) : !1;
|
|
41
|
+
return m || c || w;
|
|
42
|
+
}, ce = {
|
|
31
43
|
small: "h-[var(--malachite-control-height-small,28px)]",
|
|
32
44
|
medium: "h-[var(--malachite-control-height-medium,32px)]",
|
|
33
45
|
large: "h-[var(--malachite-control-height-large,42px)]"
|
|
34
|
-
},
|
|
35
|
-
small: `${
|
|
36
|
-
medium: `${
|
|
37
|
-
large: `${
|
|
38
|
-
},
|
|
39
|
-
small: `min-h-[var(--malachite-control-height-small,28px)] px-2.5 py-1.5 ${
|
|
40
|
-
medium: `min-h-[var(--malachite-control-height-medium,32px)] px-3 py-1.5 ${
|
|
41
|
-
large: `min-h-[var(--malachite-control-height-large,42px)] px-4 py-2.5 ${
|
|
42
|
-
},
|
|
46
|
+
}, St = {
|
|
47
|
+
small: `${ce.small} px-2.5 py-1.5 ${Q.small}`,
|
|
48
|
+
medium: `${ce.medium} px-3 py-1.5 ${Q.medium}`,
|
|
49
|
+
large: `${ce.large} px-4 py-2.5 ${Q.large}`
|
|
50
|
+
}, Tt = {
|
|
51
|
+
small: `min-h-[var(--malachite-control-height-small,28px)] px-2.5 py-1.5 ${Q.small}`,
|
|
52
|
+
medium: `min-h-[var(--malachite-control-height-medium,32px)] px-3 py-1.5 ${Q.medium}`,
|
|
53
|
+
large: `min-h-[var(--malachite-control-height-large,42px)] px-4 py-2.5 ${Q.large}`
|
|
54
|
+
}, Et = {
|
|
43
55
|
small: "right-[26px] size-4",
|
|
44
56
|
medium: "right-[30px] size-4",
|
|
45
57
|
large: "right-[38px] size-4"
|
|
46
|
-
},
|
|
58
|
+
}, Ct = {
|
|
47
59
|
small: "top-[calc(var(--malachite-control-height-small,28px)/2)] -translate-y-1/2",
|
|
48
60
|
medium: "top-[calc(var(--malachite-control-height-medium,32px)/2)] -translate-y-1/2",
|
|
49
61
|
large: "top-[calc(var(--malachite-control-height-large,42px)/2)] -translate-y-1/2"
|
|
50
|
-
},
|
|
62
|
+
}, Nt = {
|
|
51
63
|
small: "rounded-[var(--malachite-radius-10,10px)]",
|
|
52
64
|
medium: "rounded-xl",
|
|
53
65
|
large: "rounded-[var(--malachite-radius-xxl,14px)]"
|
|
54
|
-
},
|
|
66
|
+
}, He = () => !1, Rt = ({
|
|
55
67
|
wrap: e,
|
|
56
68
|
id: i,
|
|
57
69
|
children: r
|
|
58
|
-
}) => e ? /* @__PURE__ */ t("span", { id: i, className: "min-w-0 flex items-center gap-2", children: r }) : /* @__PURE__ */ t(
|
|
70
|
+
}) => e ? /* @__PURE__ */ t("span", { id: i, className: "min-w-0 flex items-center gap-2", children: r }) : /* @__PURE__ */ t(we, { children: r }), Lt = ({ row: e, children: i }) => e ? /* @__PURE__ */ t("span", { style: { display: "flex", alignItems: "center", gap: 8, minWidth: 0 }, children: i }) : /* @__PURE__ */ t(we, { children: i }), Be = je.forwardRef(
|
|
59
71
|
({
|
|
60
72
|
isOpen: e,
|
|
61
73
|
onClick: i,
|
|
62
74
|
selectedItem: r,
|
|
63
75
|
disabled: m = !1,
|
|
64
76
|
error: c = !1,
|
|
65
|
-
tone:
|
|
66
|
-
placeholder:
|
|
77
|
+
tone: w,
|
|
78
|
+
placeholder: L,
|
|
67
79
|
search: x = !1,
|
|
68
|
-
showSubtitleInTrigger:
|
|
80
|
+
showSubtitleInTrigger: S = !1,
|
|
69
81
|
searchQuery: k = "",
|
|
70
82
|
onSearchChange: E,
|
|
71
|
-
onFocusOpen:
|
|
72
|
-
onArrowDown:
|
|
83
|
+
onFocusOpen: N,
|
|
84
|
+
onArrowDown: T,
|
|
73
85
|
size: v = "large",
|
|
74
86
|
hasClear: $ = !1,
|
|
75
87
|
onClear: a,
|
|
@@ -79,33 +91,33 @@ const Fe = {
|
|
|
79
91
|
describedBy: C,
|
|
80
92
|
required: l = !1,
|
|
81
93
|
ariaLabel: D,
|
|
82
|
-
ariaLabelledBy:
|
|
83
|
-
hasCallerId:
|
|
94
|
+
ariaLabelledBy: de,
|
|
95
|
+
hasCallerId: Se = !1
|
|
84
96
|
}, _) => {
|
|
85
|
-
const Z =
|
|
86
|
-
d.key === "ArrowDown" && (d.preventDefault(),
|
|
87
|
-
},
|
|
97
|
+
const Z = S && !x && !!(r != null && r.subtitle), I = Z ? Tt[v] : St[v], J = Nt[v], O = `${s}-value`, ue = `${s}-subtitle`, Te = !o && !D && !Se && Z, pe = de ?? (o && !D ? `${o} ${O}` : void 0) ?? (Te ? O : void 0), ee = (d) => {
|
|
98
|
+
d.key === "ArrowDown" && (d.preventDefault(), T == null || T());
|
|
99
|
+
}, K = g(null), te = g(null), B = dt({ disabled: m, error: c, tone: w, open: e }), R = !e && !!r, h = (r == null ? void 0 : r.triggerLabel) ?? (r == null ? void 0 : r.label), b = Z ? r == null ? void 0 : r.subtitle : void 0, z = () => le(K.current), [q, M] = j({ value: !1, subtitle: !0 }), fe = () => {
|
|
88
100
|
const d = z(), re = le(te.current);
|
|
89
|
-
return !d && !re ? !1 : (
|
|
101
|
+
return !d && !re ? !1 : (M({ value: d, subtitle: re }), !0);
|
|
90
102
|
};
|
|
91
103
|
if (x && !m)
|
|
92
|
-
return /* @__PURE__ */
|
|
104
|
+
return /* @__PURE__ */ y(
|
|
93
105
|
"div",
|
|
94
106
|
{
|
|
95
107
|
ref: _,
|
|
96
108
|
className: `
|
|
97
|
-
relative w-full ${
|
|
109
|
+
relative w-full ${I} ${J}
|
|
98
110
|
border border-solid
|
|
99
111
|
transition-all duration-200
|
|
100
112
|
flex items-center
|
|
101
113
|
`,
|
|
102
114
|
style: B,
|
|
103
|
-
[
|
|
115
|
+
[Fe]: "",
|
|
104
116
|
onClick: (d) => d.stopPropagation(),
|
|
105
117
|
children: [
|
|
106
118
|
(r == null ? void 0 : r.icon) && /* @__PURE__ */ t("span", { className: "flex shrink-0 items-center justify-center pr-2", children: r.icon }),
|
|
107
|
-
/* @__PURE__ */ t(
|
|
108
|
-
|
|
119
|
+
/* @__PURE__ */ t(ye, { text: h, shouldShow: z, isShrinkable: !0, fill: !0, children: /* @__PURE__ */ y("div", { className: "relative flex-1 flex items-center min-w-0", children: [
|
|
120
|
+
R && /* @__PURE__ */ t(
|
|
109
121
|
"span",
|
|
110
122
|
{
|
|
111
123
|
"aria-hidden": "true",
|
|
@@ -113,7 +125,7 @@ const Fe = {
|
|
|
113
125
|
children: /* @__PURE__ */ t(
|
|
114
126
|
"span",
|
|
115
127
|
{
|
|
116
|
-
ref:
|
|
128
|
+
ref: K,
|
|
117
129
|
className: `min-w-0 block truncate text-[length:inherit]
|
|
118
130
|
text-[var(--malachite-text-primary)]`,
|
|
119
131
|
children: h
|
|
@@ -127,7 +139,7 @@ const Fe = {
|
|
|
127
139
|
id: s,
|
|
128
140
|
type: "text",
|
|
129
141
|
"aria-label": D,
|
|
130
|
-
"aria-labelledby":
|
|
142
|
+
"aria-labelledby": de,
|
|
131
143
|
"aria-invalid": c || void 0,
|
|
132
144
|
"aria-required": l || void 0,
|
|
133
145
|
"aria-describedby": C,
|
|
@@ -136,13 +148,13 @@ const Fe = {
|
|
|
136
148
|
d.stopPropagation(), E == null || E(d.target.value), e || i();
|
|
137
149
|
},
|
|
138
150
|
onFocus: () => {
|
|
139
|
-
|
|
151
|
+
N == null || N();
|
|
140
152
|
},
|
|
141
153
|
onKeyDown: ee,
|
|
142
|
-
placeholder:
|
|
154
|
+
placeholder: L ?? "Select Field",
|
|
143
155
|
className: `flex-1 min-w-0 bg-transparent outline-none
|
|
144
156
|
text-[length:inherit] font-normal
|
|
145
|
-
placeholder:text-[var(--malachite-text-dimmed)] ${
|
|
157
|
+
placeholder:text-[var(--malachite-text-dimmed)] ${R ? "text-transparent" : "text-[var(--malachite-text-primary)]"}`
|
|
146
158
|
}
|
|
147
159
|
)
|
|
148
160
|
] }) }),
|
|
@@ -156,7 +168,7 @@ const Fe = {
|
|
|
156
168
|
bg-transparent border-none p-0 text-[var(--malachite-text-placeholder)]
|
|
157
169
|
hover:text-[var(--malachite-text-primary)] transition-colors
|
|
158
170
|
rounded-full focus-visible:[outline:2px_solid_var(--malachite-text-primary)] focus-visible:outline-offset-2`,
|
|
159
|
-
children: /* @__PURE__ */ t(
|
|
171
|
+
children: /* @__PURE__ */ t(Ze, { size: 13 })
|
|
160
172
|
}
|
|
161
173
|
),
|
|
162
174
|
/* @__PURE__ */ t("div", { className: "flex items-center justify-center pl-2", children: /* @__PURE__ */ t(
|
|
@@ -170,7 +182,7 @@ const Fe = {
|
|
|
170
182
|
},
|
|
171
183
|
className: "flex items-center justify-center cursor-pointer bg-transparent border-none p-0",
|
|
172
184
|
children: /* @__PURE__ */ t(
|
|
173
|
-
|
|
185
|
+
Me,
|
|
174
186
|
{
|
|
175
187
|
size: 13,
|
|
176
188
|
style: {
|
|
@@ -185,26 +197,26 @@ const Fe = {
|
|
|
185
197
|
]
|
|
186
198
|
}
|
|
187
199
|
);
|
|
188
|
-
const
|
|
200
|
+
const he = /* @__PURE__ */ y(
|
|
189
201
|
"button",
|
|
190
202
|
{
|
|
191
203
|
ref: _,
|
|
192
204
|
id: s,
|
|
193
205
|
type: "button",
|
|
194
206
|
"aria-label": D,
|
|
195
|
-
"aria-labelledby":
|
|
207
|
+
"aria-labelledby": pe,
|
|
196
208
|
"aria-invalid": c || void 0,
|
|
197
209
|
"aria-required": l || void 0,
|
|
198
|
-
"aria-describedby": [C,
|
|
210
|
+
"aria-describedby": [C, b ? ue : void 0].filter(Boolean).join(" ") || void 0,
|
|
199
211
|
onClick: (d) => {
|
|
200
212
|
d.stopPropagation(), i();
|
|
201
213
|
},
|
|
202
214
|
onKeyDown: ee,
|
|
203
215
|
disabled: m,
|
|
204
216
|
style: B,
|
|
205
|
-
[
|
|
217
|
+
[Fe]: "",
|
|
206
218
|
className: `
|
|
207
|
-
relative w-full ${
|
|
219
|
+
relative w-full ${I} ${J}
|
|
208
220
|
border border-solid
|
|
209
221
|
transition-all duration-200
|
|
210
222
|
flex ${Z ? "items-start" : "items-center"} gap-3
|
|
@@ -215,22 +227,22 @@ const Fe = {
|
|
|
215
227
|
/* @__PURE__ */ t(
|
|
216
228
|
"span",
|
|
217
229
|
{
|
|
218
|
-
id:
|
|
219
|
-
className: `text-left flex-1 min-w-0 flex ${
|
|
220
|
-
children: r ? /* @__PURE__ */
|
|
221
|
-
/* @__PURE__ */
|
|
230
|
+
id: b ? void 0 : O,
|
|
231
|
+
className: `text-left flex-1 min-w-0 flex ${b ? "flex-col gap-1" : "items-center gap-2"}`,
|
|
232
|
+
children: r ? /* @__PURE__ */ y(we, { children: [
|
|
233
|
+
/* @__PURE__ */ y(Rt, { wrap: !!b, id: O, children: [
|
|
222
234
|
r.icon && /* @__PURE__ */ t("span", { className: "flex items-center justify-center shrink-0", children: r.icon }),
|
|
223
235
|
/* @__PURE__ */ t(
|
|
224
|
-
|
|
236
|
+
ye,
|
|
225
237
|
{
|
|
226
238
|
text: h,
|
|
227
|
-
shouldShow:
|
|
228
|
-
triggerAs:
|
|
239
|
+
shouldShow: b ? He : z,
|
|
240
|
+
triggerAs: b ? "span" : "div",
|
|
229
241
|
isShrinkable: !0,
|
|
230
242
|
children: /* @__PURE__ */ t(
|
|
231
243
|
"span",
|
|
232
244
|
{
|
|
233
|
-
ref:
|
|
245
|
+
ref: K,
|
|
234
246
|
className: `min-w-0 block truncate text-[length:inherit] ${m ? "text-[var(--malachite-text-placeholder)]" : "text-[var(--malachite-text-primary)]"}`,
|
|
235
247
|
children: h
|
|
236
248
|
}
|
|
@@ -238,27 +250,27 @@ const Fe = {
|
|
|
238
250
|
}
|
|
239
251
|
)
|
|
240
252
|
] }),
|
|
241
|
-
|
|
253
|
+
b && /* @__PURE__ */ t(
|
|
242
254
|
"span",
|
|
243
255
|
{
|
|
244
|
-
id:
|
|
256
|
+
id: ue,
|
|
245
257
|
ref: te,
|
|
246
258
|
className: "min-w-0 block truncate text-[length:var(--malachite-font-size-xsmall,11px)] text-[var(--malachite-text-secondary,rgb(123,123,123))] leading-normal",
|
|
247
|
-
children:
|
|
259
|
+
children: /* @__PURE__ */ t(se, { text: b })
|
|
248
260
|
}
|
|
249
261
|
)
|
|
250
262
|
] }) : /* @__PURE__ */ t(
|
|
251
263
|
"span",
|
|
252
264
|
{
|
|
253
265
|
className: `flex-1 min-w-0 truncate text-[length:inherit] ${m ? "text-[var(--malachite-text-placeholder)]" : "text-[var(--malachite-text-dimmed)]"}`,
|
|
254
|
-
children:
|
|
266
|
+
children: L ?? "Select Field"
|
|
255
267
|
}
|
|
256
268
|
)
|
|
257
269
|
}
|
|
258
270
|
),
|
|
259
271
|
$ && /* @__PURE__ */ t("span", { "aria-hidden": "true", className: "shrink-0 w-4" }),
|
|
260
272
|
/* @__PURE__ */ t("span", { className: "flex items-center justify-center shrink-0", children: /* @__PURE__ */ t(
|
|
261
|
-
|
|
273
|
+
Me,
|
|
262
274
|
{
|
|
263
275
|
size: 13,
|
|
264
276
|
style: {
|
|
@@ -271,30 +283,33 @@ const Fe = {
|
|
|
271
283
|
]
|
|
272
284
|
}
|
|
273
285
|
);
|
|
274
|
-
return
|
|
275
|
-
|
|
286
|
+
return S && !x ? /* @__PURE__ */ t(
|
|
287
|
+
ye,
|
|
276
288
|
{
|
|
277
|
-
text:
|
|
278
|
-
["value",
|
|
279
|
-
[
|
|
289
|
+
text: Ie([
|
|
290
|
+
["value", q.value && h],
|
|
291
|
+
[
|
|
292
|
+
"subtitle",
|
|
293
|
+
q.subtitle && b && /* @__PURE__ */ t(se, { text: b })
|
|
294
|
+
]
|
|
280
295
|
]),
|
|
281
|
-
shouldShow:
|
|
296
|
+
shouldShow: b ? fe : He,
|
|
282
297
|
fill: !0,
|
|
283
298
|
describesTrigger: !1,
|
|
284
|
-
children:
|
|
299
|
+
children: he
|
|
285
300
|
}
|
|
286
|
-
) :
|
|
301
|
+
) : he;
|
|
287
302
|
}
|
|
288
303
|
);
|
|
289
|
-
|
|
290
|
-
const
|
|
304
|
+
Be.displayName = "DropdownTrigger";
|
|
305
|
+
const _t = ({
|
|
291
306
|
item: e,
|
|
292
307
|
selected: i,
|
|
293
308
|
subtitleLayout: r,
|
|
294
309
|
onItemSelected: m
|
|
295
310
|
}) => {
|
|
296
|
-
const c = i ? "var(--malachite-accent-foreground, rgb(2, 122, 66))" : "var(--malachite-text-primary, rgb(10, 10, 10))",
|
|
297
|
-
const o = le(k.current), C = le(E.current), l = le(
|
|
311
|
+
const c = i ? "var(--malachite-accent-foreground, rgb(2, 122, 66))" : "var(--malachite-text-primary, rgb(10, 10, 10))", w = r === "stacked" && !!e.subtitle, L = `mal-${tt().replace(/[^a-zA-Z0-9_-]/g, "")}`, x = `${L}-label`, S = `${L}-subtitle`, k = g(null), E = g(null), N = g(null), [T, v] = j({ label: !0, subtitle: !0, rightSide: !0 }), $ = () => {
|
|
312
|
+
const o = le(k.current), C = le(E.current), l = le(N.current);
|
|
298
313
|
return !o && !C && !l ? !1 : (v({ label: o, subtitle: C, rightSide: l }), !0);
|
|
299
314
|
}, a = e.rightSideTextVariant === "primary" ? "var(--malachite-text-right-side-text-primary, rgb(10, 10, 10))" : "var(--malachite-text-right-side-text-muted, rgb(123, 123, 123))", f = e.rightSideTextAlignment === "left" ? "flex-start" : "flex-end", s = (
|
|
300
315
|
// `role="option"` would be invalid — nothing here declares a `listbox`, and an
|
|
@@ -310,7 +325,7 @@ const Et = ({
|
|
|
310
325
|
"data-selected": i,
|
|
311
326
|
"aria-current": i || void 0,
|
|
312
327
|
"aria-labelledby": e.subtitle ? x : void 0,
|
|
313
|
-
"aria-describedby": e.subtitle ?
|
|
328
|
+
"aria-describedby": e.subtitle ? S : void 0,
|
|
314
329
|
tabIndex: -1,
|
|
315
330
|
onClick: (o) => {
|
|
316
331
|
o.stopPropagation(), m(e);
|
|
@@ -332,7 +347,7 @@ const Et = ({
|
|
|
332
347
|
font: "inherit",
|
|
333
348
|
color: "inherit"
|
|
334
349
|
},
|
|
335
|
-
children: /* @__PURE__ */
|
|
350
|
+
children: /* @__PURE__ */ y(
|
|
336
351
|
"span",
|
|
337
352
|
{
|
|
338
353
|
style: {
|
|
@@ -343,12 +358,12 @@ const Et = ({
|
|
|
343
358
|
minWidth: 0
|
|
344
359
|
},
|
|
345
360
|
children: [
|
|
346
|
-
/* @__PURE__ */ t("span", { style: { flex: "1 1 auto", display: "block", minWidth: 0 }, children: /* @__PURE__ */
|
|
361
|
+
/* @__PURE__ */ t("span", { style: { flex: "1 1 auto", display: "block", minWidth: 0 }, children: /* @__PURE__ */ y(
|
|
347
362
|
"span",
|
|
348
363
|
{
|
|
349
|
-
style:
|
|
364
|
+
style: w ? { display: "flex", flexDirection: "column", gap: 2 } : { display: "flex", alignItems: "center", gap: 8 },
|
|
350
365
|
children: [
|
|
351
|
-
/* @__PURE__ */
|
|
366
|
+
/* @__PURE__ */ y(Lt, { row: w && !!e.icon, children: [
|
|
352
367
|
e.icon && /* @__PURE__ */ t(
|
|
353
368
|
"span",
|
|
354
369
|
{
|
|
@@ -378,10 +393,10 @@ const Et = ({
|
|
|
378
393
|
}
|
|
379
394
|
)
|
|
380
395
|
] }),
|
|
381
|
-
e.subtitle && (
|
|
396
|
+
e.subtitle && (w ? /* @__PURE__ */ t(
|
|
382
397
|
"span",
|
|
383
398
|
{
|
|
384
|
-
id:
|
|
399
|
+
id: S,
|
|
385
400
|
ref: E,
|
|
386
401
|
style: {
|
|
387
402
|
fontSize: Re,
|
|
@@ -392,9 +407,9 @@ const Et = ({
|
|
|
392
407
|
overflow: "hidden",
|
|
393
408
|
textOverflow: "ellipsis"
|
|
394
409
|
},
|
|
395
|
-
children: e.subtitle
|
|
410
|
+
children: /* @__PURE__ */ t(se, { text: e.subtitle })
|
|
396
411
|
}
|
|
397
|
-
) : /* @__PURE__ */
|
|
412
|
+
) : /* @__PURE__ */ y(
|
|
398
413
|
"span",
|
|
399
414
|
{
|
|
400
415
|
style: {
|
|
@@ -423,7 +438,7 @@ const Et = ({
|
|
|
423
438
|
/* @__PURE__ */ t(
|
|
424
439
|
"span",
|
|
425
440
|
{
|
|
426
|
-
id:
|
|
441
|
+
id: S,
|
|
427
442
|
ref: E,
|
|
428
443
|
style: {
|
|
429
444
|
fontSize: Re,
|
|
@@ -434,7 +449,7 @@ const Et = ({
|
|
|
434
449
|
textOverflow: "ellipsis",
|
|
435
450
|
minWidth: 0
|
|
436
451
|
},
|
|
437
|
-
children: e.subtitle
|
|
452
|
+
children: /* @__PURE__ */ t(se, { text: e.subtitle })
|
|
438
453
|
}
|
|
439
454
|
)
|
|
440
455
|
]
|
|
@@ -457,7 +472,7 @@ const Et = ({
|
|
|
457
472
|
children: e.rightSideText && /* @__PURE__ */ t(
|
|
458
473
|
"span",
|
|
459
474
|
{
|
|
460
|
-
ref:
|
|
475
|
+
ref: N,
|
|
461
476
|
style: {
|
|
462
477
|
fontSize: "var(--malachite-text-right-side-text-font-size, 12px)",
|
|
463
478
|
fontWeight: 400,
|
|
@@ -479,12 +494,15 @@ const Et = ({
|
|
|
479
494
|
)
|
|
480
495
|
);
|
|
481
496
|
return /* @__PURE__ */ t(
|
|
482
|
-
|
|
497
|
+
ye,
|
|
483
498
|
{
|
|
484
|
-
text:
|
|
485
|
-
["label",
|
|
486
|
-
[
|
|
487
|
-
|
|
499
|
+
text: Ie([
|
|
500
|
+
["label", T.label && e.label],
|
|
501
|
+
[
|
|
502
|
+
"subtitle",
|
|
503
|
+
T.subtitle && e.subtitle && /* @__PURE__ */ t(se, { text: e.subtitle })
|
|
504
|
+
],
|
|
505
|
+
["rightSide", T.rightSide && e.rightSideText]
|
|
488
506
|
]),
|
|
489
507
|
shouldShow: $,
|
|
490
508
|
isShrinkable: !0,
|
|
@@ -492,36 +510,36 @@ const Et = ({
|
|
|
492
510
|
children: s
|
|
493
511
|
}
|
|
494
512
|
);
|
|
495
|
-
}, qe =
|
|
513
|
+
}, qe = je.forwardRef((e, i) => {
|
|
496
514
|
const {
|
|
497
515
|
items: r,
|
|
498
516
|
onItemSelected: m,
|
|
499
517
|
selectedItem: c,
|
|
500
|
-
menuLoading:
|
|
501
|
-
emptyMessage:
|
|
518
|
+
menuLoading: w,
|
|
519
|
+
emptyMessage: L,
|
|
502
520
|
autoFocus: x,
|
|
503
|
-
positioned:
|
|
521
|
+
positioned: S,
|
|
504
522
|
onDismiss: k,
|
|
505
523
|
subtitleLayout: E,
|
|
506
|
-
size:
|
|
507
|
-
style:
|
|
524
|
+
size: N,
|
|
525
|
+
style: T
|
|
508
526
|
} = e, v = g(null);
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
}, []),
|
|
527
|
+
et(() => {
|
|
528
|
+
mt();
|
|
529
|
+
}, []), vt(v, !0), Le(() => {
|
|
512
530
|
var s;
|
|
513
|
-
if (!x || !
|
|
531
|
+
if (!x || !S)
|
|
514
532
|
return;
|
|
515
|
-
const a =
|
|
533
|
+
const a = _e(v.current);
|
|
516
534
|
(s = a.find((o) => o.dataset.selected === "true") ?? a[0] ?? v.current) == null || s.focus();
|
|
517
|
-
}, [x,
|
|
535
|
+
}, [x, S]);
|
|
518
536
|
const $ = (a) => {
|
|
519
537
|
var C;
|
|
520
538
|
if (a.key === "Tab") {
|
|
521
539
|
k();
|
|
522
540
|
return;
|
|
523
541
|
}
|
|
524
|
-
const f =
|
|
542
|
+
const f = _e(v.current);
|
|
525
543
|
if (f.length === 0)
|
|
526
544
|
return;
|
|
527
545
|
const s = f.indexOf(document.activeElement), o = {
|
|
@@ -538,7 +556,7 @@ const Et = ({
|
|
|
538
556
|
ref: (a) => {
|
|
539
557
|
v.current = a, typeof i == "function" ? i(a) : i && (i.current = a);
|
|
540
558
|
},
|
|
541
|
-
...
|
|
559
|
+
...xt("dropdown"),
|
|
542
560
|
tabIndex: -1,
|
|
543
561
|
onKeyDown: $,
|
|
544
562
|
style: {
|
|
@@ -546,17 +564,17 @@ const Et = ({
|
|
|
546
564
|
border: oe.standard.border,
|
|
547
565
|
borderRadius: oe.standard.radius,
|
|
548
566
|
boxShadow: oe.standard.shadow,
|
|
549
|
-
maxHeight:
|
|
567
|
+
maxHeight: gt,
|
|
550
568
|
overflow: "hidden",
|
|
551
569
|
display: "flex",
|
|
552
570
|
flexDirection: "column",
|
|
553
|
-
fontSize:
|
|
554
|
-
...
|
|
571
|
+
fontSize: ct[N],
|
|
572
|
+
...T
|
|
555
573
|
},
|
|
556
|
-
children:
|
|
557
|
-
/* @__PURE__ */ t(
|
|
574
|
+
children: w ? /* @__PURE__ */ y("div", { style: Ge, children: [
|
|
575
|
+
/* @__PURE__ */ t(ot, { size: "xxxsmall" }),
|
|
558
576
|
/* @__PURE__ */ t("span", { children: "Loading…" })
|
|
559
|
-
] }) : r.length === 0 ? /* @__PURE__ */ t("div", { style:
|
|
577
|
+
] }) : r.length === 0 ? /* @__PURE__ */ t("div", { style: Ge, children: L }) : /* @__PURE__ */ t(
|
|
560
578
|
"div",
|
|
561
579
|
{
|
|
562
580
|
style: {
|
|
@@ -570,7 +588,7 @@ const Et = ({
|
|
|
570
588
|
},
|
|
571
589
|
children: r.map((a, f) => {
|
|
572
590
|
const s = r[f - 1], o = !!a.group && (!s || s.group !== a.group);
|
|
573
|
-
return /* @__PURE__ */
|
|
591
|
+
return /* @__PURE__ */ y("div", { style: { flexShrink: 0 }, children: [
|
|
574
592
|
o && /* @__PURE__ */ t(
|
|
575
593
|
"div",
|
|
576
594
|
{
|
|
@@ -586,7 +604,7 @@ const Et = ({
|
|
|
586
604
|
}
|
|
587
605
|
),
|
|
588
606
|
/* @__PURE__ */ t(
|
|
589
|
-
|
|
607
|
+
_t,
|
|
590
608
|
{
|
|
591
609
|
item: a,
|
|
592
610
|
onItemSelected: m,
|
|
@@ -602,20 +620,20 @@ const Et = ({
|
|
|
602
620
|
);
|
|
603
621
|
});
|
|
604
622
|
qe.displayName = "DropdownPanel";
|
|
605
|
-
const
|
|
623
|
+
const Yt = ({
|
|
606
624
|
items: e,
|
|
607
625
|
onItemSelected: i,
|
|
608
626
|
defaultValue: r,
|
|
609
627
|
value: m,
|
|
610
628
|
disabled: c = !1,
|
|
611
|
-
error:
|
|
612
|
-
tone:
|
|
629
|
+
error: w,
|
|
630
|
+
tone: L,
|
|
613
631
|
label: x,
|
|
614
|
-
hint:
|
|
632
|
+
hint: S,
|
|
615
633
|
rightSideContent: k,
|
|
616
634
|
tooltip: E,
|
|
617
|
-
name:
|
|
618
|
-
required:
|
|
635
|
+
name: N,
|
|
636
|
+
required: T = !1,
|
|
619
637
|
requiredIndicator: v,
|
|
620
638
|
loading: $,
|
|
621
639
|
menuLoading: a,
|
|
@@ -625,40 +643,40 @@ const Kt = ({
|
|
|
625
643
|
placeholder: C,
|
|
626
644
|
search: l = !1,
|
|
627
645
|
showSubtitleInTrigger: D = !1,
|
|
628
|
-
subtitleLayout:
|
|
629
|
-
clearable:
|
|
646
|
+
subtitleLayout: de = "inline",
|
|
647
|
+
clearable: Se = !1,
|
|
630
648
|
size: _ = "large",
|
|
631
649
|
fullWidth: Z = !1,
|
|
632
|
-
width:
|
|
650
|
+
width: I,
|
|
633
651
|
minWidth: J,
|
|
634
652
|
id: O,
|
|
635
|
-
"aria-label":
|
|
636
|
-
"aria-labelledby":
|
|
653
|
+
"aria-label": ue,
|
|
654
|
+
"aria-labelledby": Te
|
|
637
655
|
}) => {
|
|
638
|
-
const { controlId:
|
|
656
|
+
const { controlId: pe, labelId: ee, descriptionId: K, hintId: te, helperTextId: B } = it({
|
|
639
657
|
id: O,
|
|
640
658
|
label: x,
|
|
641
659
|
description: s,
|
|
642
|
-
hint:
|
|
660
|
+
hint: S,
|
|
643
661
|
helperText: !0
|
|
644
|
-
}), [
|
|
662
|
+
}), [R, h] = j(!1), [b, z] = j(r), q = m ?? b, M = e.find((n) => n.id === q), fe = Se && q !== void 0 && q !== "" && !c, he = D && !l && !!(M != null && M.subtitle), d = `Clear ${x ?? C ?? "selection"}`, re = g(r);
|
|
645
663
|
Le(() => {
|
|
646
664
|
re.current !== r && (re.current = r, z(r));
|
|
647
665
|
}, [r]);
|
|
648
|
-
const [
|
|
666
|
+
const [Ee, V] = j(""), [Ve, ke] = j(!1), $e = g(null), ge = g(null), X = g(null), [u, Ae] = j(null), me = g(!0), U = Ne(() => {
|
|
649
667
|
var p;
|
|
650
|
-
const n =
|
|
668
|
+
const n = ge.current;
|
|
651
669
|
n && ((p = n instanceof HTMLButtonElement ? n : n.querySelector("input")) == null || p.focus());
|
|
652
|
-
}, []),
|
|
670
|
+
}, []), De = Ne(
|
|
653
671
|
(n) => {
|
|
654
672
|
var p;
|
|
655
|
-
n.stopPropagation(), z(void 0), (p =
|
|
673
|
+
n.stopPropagation(), z(void 0), (p = P.current) == null || p.call(P, Ce.current), i == null || i(void 0), l && (me.current = !1), U();
|
|
656
674
|
},
|
|
657
|
-
[i, l,
|
|
658
|
-
), W =
|
|
659
|
-
const n =
|
|
660
|
-
n &&
|
|
661
|
-
|
|
675
|
+
[i, l, U]
|
|
676
|
+
), W = Ne(() => {
|
|
677
|
+
const n = ge.current;
|
|
678
|
+
n && Ae(
|
|
679
|
+
pt(X.current, {
|
|
662
680
|
triggerRect: n.getBoundingClientRect(),
|
|
663
681
|
preset: "standard",
|
|
664
682
|
minWidth: J,
|
|
@@ -668,168 +686,168 @@ const Kt = ({
|
|
|
668
686
|
);
|
|
669
687
|
}, [J]);
|
|
670
688
|
Le(() => {
|
|
671
|
-
if (!
|
|
672
|
-
|
|
689
|
+
if (!R) {
|
|
690
|
+
Ae(null), ke(!1);
|
|
673
691
|
return;
|
|
674
692
|
}
|
|
675
693
|
W();
|
|
676
694
|
const n = (G) => {
|
|
677
695
|
var ae;
|
|
678
|
-
const A = G.composedPath(), H =
|
|
679
|
-
!
|
|
680
|
-
}, p =
|
|
681
|
-
h(!1), l &&
|
|
682
|
-
}),
|
|
683
|
-
let ne = 0,
|
|
684
|
-
const
|
|
685
|
-
const G =
|
|
696
|
+
const A = G.composedPath(), H = $e.current, ie = X.current, be = !!H && A.includes(H), Oe = !!ie && A.includes(ie);
|
|
697
|
+
!be && !Oe && (h(!1), l && V(""), (ae = F.current) == null || ae.call(F));
|
|
698
|
+
}, p = ut(() => {
|
|
699
|
+
h(!1), l && V(""), U();
|
|
700
|
+
}), Y = () => W();
|
|
701
|
+
let ne = 0, xe = "";
|
|
702
|
+
const ve = () => {
|
|
703
|
+
const G = ge.current;
|
|
686
704
|
if (G) {
|
|
687
705
|
const A = G.getBoundingClientRect();
|
|
688
|
-
if (
|
|
689
|
-
h(!1), l &&
|
|
706
|
+
if (ft(A, window.innerWidth, window.innerHeight)) {
|
|
707
|
+
h(!1), l && V("");
|
|
690
708
|
return;
|
|
691
709
|
}
|
|
692
|
-
const H =
|
|
693
|
-
H !==
|
|
710
|
+
const H = ht(A);
|
|
711
|
+
H !== xe && (xe = H, W());
|
|
694
712
|
}
|
|
695
|
-
ne = requestAnimationFrame(
|
|
713
|
+
ne = requestAnimationFrame(ve);
|
|
696
714
|
};
|
|
697
|
-
return ne = requestAnimationFrame(
|
|
698
|
-
cancelAnimationFrame(ne), document.removeEventListener("mousedown", n), p(), window.removeEventListener("scroll",
|
|
715
|
+
return ne = requestAnimationFrame(ve), document.addEventListener("mousedown", n), window.addEventListener("scroll", Y, !0), window.addEventListener("resize", Y), () => {
|
|
716
|
+
cancelAnimationFrame(ne), document.removeEventListener("mousedown", n), p(), window.removeEventListener("scroll", Y, !0), window.removeEventListener("resize", Y);
|
|
699
717
|
};
|
|
700
|
-
}, [
|
|
701
|
-
if (!
|
|
718
|
+
}, [R, l, W, U]), Je(() => {
|
|
719
|
+
if (!R)
|
|
702
720
|
return;
|
|
703
721
|
W();
|
|
704
|
-
const n =
|
|
722
|
+
const n = X.current;
|
|
705
723
|
if (!n || typeof ResizeObserver > "u")
|
|
706
724
|
return;
|
|
707
725
|
const p = new ResizeObserver(() => W());
|
|
708
726
|
return p.observe(n), () => p.disconnect();
|
|
709
|
-
}, [
|
|
710
|
-
const
|
|
727
|
+
}, [R, W]);
|
|
728
|
+
const P = g(void 0), F = g(void 0), Ce = g(""), Xe = (n) => {
|
|
711
729
|
var p;
|
|
712
|
-
z(n == null ? void 0 : n.id), (p =
|
|
713
|
-
}, Ie = () => {
|
|
714
|
-
h(!1), l && I(""), X();
|
|
730
|
+
z(n == null ? void 0 : n.id), (p = P.current) == null || p.call(P, (n == null ? void 0 : n.id) ?? Ce.current), h(!1), l && (V(""), me.current = !1), i == null || i(n == null ? void 0 : n.id), U();
|
|
715
731
|
}, Ue = () => {
|
|
716
|
-
|
|
732
|
+
h(!1), l && V(""), U();
|
|
733
|
+
}, Ye = () => {
|
|
734
|
+
const n = _e(X.current)[0];
|
|
717
735
|
if (n) {
|
|
718
736
|
n.focus();
|
|
719
737
|
return;
|
|
720
738
|
}
|
|
721
|
-
|
|
722
|
-
},
|
|
739
|
+
ke(!0), h(!0);
|
|
740
|
+
}, Qe = l && Ee ? e.filter((n) => wt(n, Ee)) : e;
|
|
723
741
|
return /* @__PURE__ */ t(
|
|
724
|
-
|
|
742
|
+
nt,
|
|
725
743
|
{
|
|
726
744
|
fullWidth: Z,
|
|
727
745
|
label: x,
|
|
728
|
-
hint:
|
|
746
|
+
hint: S,
|
|
729
747
|
rightSideContent: k,
|
|
730
748
|
tooltip: E,
|
|
731
|
-
name:
|
|
732
|
-
required:
|
|
749
|
+
name: N,
|
|
750
|
+
required: T,
|
|
733
751
|
requiredIndicator: v,
|
|
734
752
|
loading: $,
|
|
735
753
|
formControl: f,
|
|
736
754
|
description: s,
|
|
737
|
-
controlId:
|
|
755
|
+
controlId: pe,
|
|
738
756
|
labelId: ee,
|
|
739
|
-
descriptionId:
|
|
757
|
+
descriptionId: K,
|
|
740
758
|
hintId: te,
|
|
741
|
-
loadingComponent:
|
|
742
|
-
|
|
759
|
+
loadingComponent: I === void 0 ? /* @__PURE__ */ t(
|
|
760
|
+
We,
|
|
743
761
|
{
|
|
744
|
-
heightClass:
|
|
762
|
+
heightClass: ce[_],
|
|
745
763
|
helperText: !!o,
|
|
746
764
|
helperTextMarginTop: !0
|
|
747
765
|
}
|
|
748
|
-
) : /* @__PURE__ */ t("div", { style:
|
|
749
|
-
|
|
766
|
+
) : /* @__PURE__ */ t("div", { style: Pe(I), children: /* @__PURE__ */ t(
|
|
767
|
+
We,
|
|
750
768
|
{
|
|
751
|
-
heightClass:
|
|
769
|
+
heightClass: ce[_],
|
|
752
770
|
helperText: !!o,
|
|
753
771
|
helperTextMarginTop: !0
|
|
754
772
|
}
|
|
755
773
|
) }),
|
|
756
|
-
children: ({ error: n, message: p, onFieldChange:
|
|
757
|
-
|
|
758
|
-
const
|
|
759
|
-
|
|
774
|
+
children: ({ error: n, message: p, onFieldChange: Y, onFieldBlur: ne, emptyValue: xe }) => {
|
|
775
|
+
P.current = Y, F.current = ne, Ce.current = xe;
|
|
776
|
+
const ve = w ?? n, G = w === !1 ? void 0 : p, A = `${B}-error`, H = [
|
|
777
|
+
K,
|
|
760
778
|
te,
|
|
761
779
|
o ? B : void 0,
|
|
762
780
|
G ? A : void 0
|
|
763
781
|
].filter(Boolean).join(" ") || void 0;
|
|
764
|
-
return /* @__PURE__ */
|
|
765
|
-
/* @__PURE__ */
|
|
782
|
+
return /* @__PURE__ */ y(we, { children: [
|
|
783
|
+
/* @__PURE__ */ y(
|
|
766
784
|
"div",
|
|
767
785
|
{
|
|
768
|
-
ref:
|
|
786
|
+
ref: $e,
|
|
769
787
|
className: "relative w-full",
|
|
770
|
-
style:
|
|
788
|
+
style: Pe(I),
|
|
771
789
|
onBlur: (ie) => {
|
|
772
|
-
var ae,
|
|
773
|
-
const
|
|
774
|
-
ie.currentTarget.contains(
|
|
790
|
+
var ae, ze;
|
|
791
|
+
const be = ie.relatedTarget;
|
|
792
|
+
ie.currentTarget.contains(be) || ((ae = X.current) == null ? void 0 : ae.contains(be)) === !0 || (ze = F.current) == null || ze.call(F);
|
|
775
793
|
},
|
|
776
794
|
children: [
|
|
777
|
-
|
|
795
|
+
fe && !l && /* @__PURE__ */ t(
|
|
778
796
|
"button",
|
|
779
797
|
{
|
|
780
798
|
type: "button",
|
|
781
|
-
onClick:
|
|
799
|
+
onClick: De,
|
|
782
800
|
"aria-label": d,
|
|
783
|
-
className: `absolute ${
|
|
801
|
+
className: `absolute ${he ? Ct[_] : "top-1/2 -translate-y-1/2"} z-10 flex items-center
|
|
784
802
|
justify-center rounded-full text-[var(--malachite-text-placeholder)]
|
|
785
803
|
hover:text-[var(--malachite-text-primary)] transition-colors
|
|
786
|
-
focus-visible:[outline:2px_solid_var(--malachite-text-primary)] focus-visible:outline-offset-2 ${
|
|
787
|
-
children: /* @__PURE__ */ t(
|
|
804
|
+
focus-visible:[outline:2px_solid_var(--malachite-text-primary)] focus-visible:outline-offset-2 ${Et[_]}`,
|
|
805
|
+
children: /* @__PURE__ */ t(Ze, { size: 13 })
|
|
788
806
|
}
|
|
789
807
|
),
|
|
790
808
|
/* @__PURE__ */ t(
|
|
791
|
-
|
|
809
|
+
Be,
|
|
792
810
|
{
|
|
793
|
-
hasClear:
|
|
794
|
-
onClear:
|
|
811
|
+
hasClear: fe,
|
|
812
|
+
onClear: De,
|
|
795
813
|
clearLabel: d,
|
|
796
|
-
ref:
|
|
797
|
-
isOpen:
|
|
798
|
-
onClick: () => !c && h(!
|
|
799
|
-
selectedItem:
|
|
814
|
+
ref: ge,
|
|
815
|
+
isOpen: R,
|
|
816
|
+
onClick: () => !c && h(!R),
|
|
817
|
+
selectedItem: M,
|
|
800
818
|
disabled: c,
|
|
801
|
-
error:
|
|
802
|
-
tone:
|
|
819
|
+
error: ve,
|
|
820
|
+
tone: L,
|
|
803
821
|
placeholder: C,
|
|
804
822
|
search: l,
|
|
805
823
|
showSubtitleInTrigger: D,
|
|
806
|
-
searchQuery:
|
|
807
|
-
onSearchChange:
|
|
824
|
+
searchQuery: Ee,
|
|
825
|
+
onSearchChange: V,
|
|
808
826
|
onFocusOpen: () => {
|
|
809
|
-
if (!
|
|
810
|
-
|
|
827
|
+
if (!me.current) {
|
|
828
|
+
me.current = !0;
|
|
811
829
|
return;
|
|
812
830
|
}
|
|
813
831
|
h(!0);
|
|
814
832
|
},
|
|
815
833
|
onArrowDown: () => {
|
|
816
|
-
c ||
|
|
834
|
+
c || Ye();
|
|
817
835
|
},
|
|
818
836
|
size: _,
|
|
819
|
-
controlId:
|
|
837
|
+
controlId: pe,
|
|
820
838
|
hasCallerId: !!O,
|
|
821
839
|
labelId: ee,
|
|
822
840
|
describedBy: H,
|
|
823
|
-
required:
|
|
824
|
-
ariaLabel:
|
|
825
|
-
ariaLabelledBy:
|
|
841
|
+
required: T,
|
|
842
|
+
ariaLabel: ue,
|
|
843
|
+
ariaLabelledBy: Te
|
|
826
844
|
}
|
|
827
845
|
),
|
|
828
|
-
|
|
846
|
+
R && rt(
|
|
829
847
|
/* @__PURE__ */ t(
|
|
830
848
|
qe,
|
|
831
849
|
{
|
|
832
|
-
ref:
|
|
850
|
+
ref: X,
|
|
833
851
|
style: {
|
|
834
852
|
position: "fixed",
|
|
835
853
|
top: (u == null ? void 0 : u.top) ?? 0,
|
|
@@ -839,16 +857,16 @@ const Kt = ({
|
|
|
839
857
|
visibility: u ? "visible" : "hidden",
|
|
840
858
|
opacity: u ? 1 : 0
|
|
841
859
|
},
|
|
842
|
-
items:
|
|
843
|
-
onItemSelected:
|
|
844
|
-
selectedItem:
|
|
860
|
+
items: Qe,
|
|
861
|
+
onItemSelected: Xe,
|
|
862
|
+
selectedItem: M,
|
|
845
863
|
menuLoading: a,
|
|
846
864
|
emptyMessage: e.length === 0 ? "No options available" : "No results found",
|
|
847
|
-
subtitleLayout:
|
|
865
|
+
subtitleLayout: de,
|
|
848
866
|
size: _,
|
|
849
|
-
autoFocus: !l ||
|
|
867
|
+
autoFocus: !l || Ve,
|
|
850
868
|
positioned: u !== null,
|
|
851
|
-
onDismiss:
|
|
869
|
+
onDismiss: Ue
|
|
852
870
|
}
|
|
853
871
|
),
|
|
854
872
|
document.body
|
|
@@ -864,13 +882,13 @@ const Kt = ({
|
|
|
864
882
|
children: o
|
|
865
883
|
}
|
|
866
884
|
),
|
|
867
|
-
/* @__PURE__ */ t(
|
|
885
|
+
/* @__PURE__ */ t(at, { id: A, message: G, spaced: !0 })
|
|
868
886
|
] });
|
|
869
887
|
}
|
|
870
888
|
}
|
|
871
889
|
);
|
|
872
890
|
};
|
|
873
891
|
export {
|
|
874
|
-
|
|
892
|
+
Yt as Dropdown
|
|
875
893
|
};
|
|
876
894
|
//# sourceMappingURL=Dropdown.js.map
|