@stackone/malachite 2.84.1 → 2.85.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 +2 -2
- package/dist/components/BaseFormComponent.js +63 -59
- package/dist/components/BaseFormComponent.js.map +1 -1
- package/dist/components/DatePickerField.js +131 -129
- package/dist/components/DatePickerField.js.map +1 -1
- package/dist/components/Dropdown.js +444 -434
- package/dist/components/Dropdown.js.map +1 -1
- package/dist/components/Input/Input.js +126 -124
- package/dist/components/Input/Input.js.map +1 -1
- package/dist/components/MultiSelect.js +85 -83
- package/dist/components/MultiSelect.js.map +1 -1
- package/dist/components/Sidebar.js +152 -122
- package/dist/components/Sidebar.js.map +1 -1
- package/dist/components/TextArea/TextArea.js +73 -71
- package/dist/components/TextArea/TextArea.js.map +1 -1
- package/dist/components/overlayBehaviour.js +159 -143
- package/dist/components/overlayBehaviour.js.map +1 -1
- package/dist/components/sidebarContext.js +7 -6
- package/dist/components/sidebarContext.js.map +1 -1
- package/dist/index.d.ts +28 -1
- package/dist/index.js +320 -319
- package/package.json +1 -1
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
import { jsx as r, jsxs as w, Fragment as
|
|
2
|
-
import fe, { useId as
|
|
3
|
-
import { createPortal as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
1
|
+
import { jsx as r, jsxs as w, Fragment as pt } from "react/jsx-runtime";
|
|
2
|
+
import fe, { useId as ht, useState as P, useRef as T, useMemo as H, useCallback as h, useEffect as We, useLayoutEffect as gt, useInsertionEffect as bt } from "react";
|
|
3
|
+
import { createPortal as vt } from "react-dom";
|
|
4
|
+
import xt, { useFormFieldIds as yt } from "./BaseFormComponent.js";
|
|
5
|
+
import wt from "./CustomIcons/CaretDownIcon.js";
|
|
6
|
+
import Et from "./CustomIcons/InfoFilledIcon.js";
|
|
7
|
+
import It from "./CustomIcons/SearchIcon.js";
|
|
8
8
|
import $e from "./LoadingInput.js";
|
|
9
|
-
import
|
|
10
|
-
import { Tag as
|
|
9
|
+
import St from "./Spinner.js";
|
|
10
|
+
import { Tag as Tt } from "./Tag.js";
|
|
11
11
|
import Be from "./Tooltip.js";
|
|
12
|
-
import { getDeepActiveElement as
|
|
13
|
-
import { CONTROL_TEXT_SIZE_CLASS as ue, CONTROL_TEXT_SIZE as
|
|
12
|
+
import { getDeepActiveElement as kt } from "./activeElement.js";
|
|
13
|
+
import { CONTROL_TEXT_SIZE_CLASS as ue, CONTROL_TEXT_SIZE as Lt } from "./controlTextSize.js";
|
|
14
14
|
import { controlWidthStyle as Ge } from "./controlWidth.js";
|
|
15
|
-
import { getTriggerVisual as
|
|
16
|
-
import { pushEscapeLayer as
|
|
17
|
-
import { measureMenuGeometry as
|
|
18
|
-
import { FOCUS_RING as
|
|
19
|
-
import { hasBadge as
|
|
20
|
-
import { ensureMultiSelectPanelStyles as
|
|
21
|
-
import { usePopupLayer as
|
|
22
|
-
import { useTopLayer as
|
|
23
|
-
import { tooltipLines as
|
|
24
|
-
const
|
|
15
|
+
import { getTriggerVisual as Rt, DROPDOWN_TRIGGER_ATTR as Ot } from "./dropdownTriggerStyle.js";
|
|
16
|
+
import { pushEscapeLayer as _t } from "./escapeLayers.js";
|
|
17
|
+
import { measureMenuGeometry as Nt, MENU_MAX_HEIGHT_PX as Ct, MENU_SPECS as z } from "./floatingMenuGeometry.js";
|
|
18
|
+
import { FOCUS_RING as At } from "./focusRing.js";
|
|
19
|
+
import { hasBadge as Dt } from "./hasBadge.js";
|
|
20
|
+
import { ensureMultiSelectPanelStyles as Ht } from "./optionRowStyles.js";
|
|
21
|
+
import { usePopupLayer as Pt } from "./overlayLayers.js";
|
|
22
|
+
import { useTopLayer as Mt } from "./topLayer.js";
|
|
23
|
+
import { tooltipLines as Wt, isCut as $t, isClamped as Bt } from "./truncatedLines.js";
|
|
24
|
+
const Gt = fe.lazy(() => import("./ActionMenuTagHost.js")), zt = {
|
|
25
25
|
padding: "8px 10px",
|
|
26
26
|
color: "var(--malachite-text-secondary, rgb(123, 123, 123))"
|
|
27
27
|
}, F = {
|
|
28
28
|
small: "h-[var(--malachite-control-height-small,28px)]",
|
|
29
29
|
medium: "h-[var(--malachite-control-height-medium,32px)]",
|
|
30
30
|
large: "h-[var(--malachite-control-height-large,42px)]"
|
|
31
|
-
},
|
|
31
|
+
}, Ft = {
|
|
32
32
|
small: `${F.small} gap-[6px] px-2.5 ${ue.small} rounded-[var(--malachite-radius-10,10px)]`,
|
|
33
33
|
medium: `${F.medium} gap-[8px] px-3 ${ue.medium} rounded-xl`,
|
|
34
34
|
large: `${F.large} gap-[10px] px-4 ${ue.large} rounded-[var(--malachite-radius-xxl,14px)]`
|
|
35
|
-
},
|
|
35
|
+
}, Kt = 10, Ke = "ArrowDown", Ye = "ArrowUp", Ue = "Enter", Yt = "Backspace", Ut = /* @__PURE__ */ new Set([Ke, Ye, Ue]), Ve = fe.forwardRef(
|
|
36
36
|
({ triggerRole: n, disabled: k, children: R, ...u }, b) => n !== "button" ? /* @__PURE__ */ r(
|
|
37
37
|
"div",
|
|
38
38
|
{
|
|
@@ -54,14 +54,14 @@ const Bt = fe.lazy(() => import("./ActionMenuTagHost.js")), Gt = {
|
|
|
54
54
|
)
|
|
55
55
|
);
|
|
56
56
|
Ve.displayName = "TriggerElement";
|
|
57
|
-
const ze = 0.6, Fe = 420,
|
|
57
|
+
const ze = 0.6, Fe = 420, Vt = ({ option: n }) => {
|
|
58
58
|
const k = T(null), R = T(null), u = n.description ? n.descriptionMode ?? "icon" : null, b = u === "subtitle", [N, Z] = P({ label: !0, subtitle: !0 }), C = () => {
|
|
59
|
-
const E =
|
|
59
|
+
const E = $t(k.current), f = Bt(R.current);
|
|
60
60
|
return !E && !f && u !== "hover" ? !1 : (Z({ label: E, subtitle: f }), !0);
|
|
61
61
|
}, M = u === "hover" || b && N.subtitle, W = (E) => /* @__PURE__ */ r(
|
|
62
62
|
Be,
|
|
63
63
|
{
|
|
64
|
-
text:
|
|
64
|
+
text: Wt([
|
|
65
65
|
["label", N.label && n.label],
|
|
66
66
|
["description", M && n.description]
|
|
67
67
|
]),
|
|
@@ -149,7 +149,7 @@ const ze = 0.6, Fe = 420, Ut = ({ option: n }) => {
|
|
|
149
149
|
},
|
|
150
150
|
"aria-label": "More information",
|
|
151
151
|
onClick: (E) => E.stopPropagation(),
|
|
152
|
-
children: n.descriptionIcon ?? /* @__PURE__ */ r(
|
|
152
|
+
children: n.descriptionIcon ?? /* @__PURE__ */ r(Et, { size: 14 })
|
|
153
153
|
}
|
|
154
154
|
)
|
|
155
155
|
}
|
|
@@ -157,7 +157,7 @@ const ze = 0.6, Fe = 420, Ut = ({ option: n }) => {
|
|
|
157
157
|
]
|
|
158
158
|
}
|
|
159
159
|
);
|
|
160
|
-
},
|
|
160
|
+
}, br = ({
|
|
161
161
|
options: n,
|
|
162
162
|
value: k,
|
|
163
163
|
defaultValue: R,
|
|
@@ -176,9 +176,10 @@ const ze = 0.6, Fe = 420, Ut = ({ option: n }) => {
|
|
|
176
176
|
description: q,
|
|
177
177
|
tooltip: pe,
|
|
178
178
|
hint: J,
|
|
179
|
+
hintIcon: Xe,
|
|
179
180
|
rightSideContent: he,
|
|
180
181
|
required: Q = !1,
|
|
181
|
-
requiredIndicator:
|
|
182
|
+
requiredIndicator: je,
|
|
182
183
|
formControl: ge,
|
|
183
184
|
chips: ee = !1,
|
|
184
185
|
chipsRemovable: te = !0,
|
|
@@ -186,20 +187,20 @@ const ze = 0.6, Fe = 420, Ut = ({ option: n }) => {
|
|
|
186
187
|
inlineSearch: v = !1,
|
|
187
188
|
onSearchChange: $,
|
|
188
189
|
localFilter: ve = !0,
|
|
189
|
-
className:
|
|
190
|
-
style:
|
|
191
|
-
id:
|
|
190
|
+
className: Ze = "",
|
|
191
|
+
style: qe,
|
|
192
|
+
id: Je,
|
|
192
193
|
"aria-label": xe,
|
|
193
|
-
"aria-labelledby":
|
|
194
|
+
"aria-labelledby": Qe
|
|
194
195
|
}) => {
|
|
195
|
-
const ye =
|
|
196
|
-
id:
|
|
196
|
+
const ye = ht(), we = `${ye}-listbox`, Ee = (e) => `${ye}-option-${e}`, { controlId: Ie, labelId: Se, descriptionId: et, hintId: tt, describedBy: rt } = yt({
|
|
197
|
+
id: Je,
|
|
197
198
|
label: K,
|
|
198
199
|
description: q,
|
|
199
200
|
hint: J
|
|
200
|
-
}), [
|
|
201
|
-
|
|
202
|
-
const
|
|
201
|
+
}), [nt, at] = P(() => R ?? []), re = k !== void 0, m = re ? k : nt, [o, ne] = P(!1), [c, Te] = P(null), [L, ot] = P(""), [x, A] = P(-1), Y = T(null), B = T(null), O = T(null), ke = T(null);
|
|
202
|
+
Mt(O, o);
|
|
203
|
+
const lt = Pt("multiselect", o, O), Le = T([]), ae = H(() => new Set(m), [m]), s = H(
|
|
203
204
|
() => n.filter((e) => ae.has(e.value)),
|
|
204
205
|
[n, ae]
|
|
205
206
|
), oe = typeof be == "number" ? be : void 0, _ = H(() => {
|
|
@@ -208,7 +209,7 @@ const ze = 0.6, Fe = 420, Ut = ({ option: n }) => {
|
|
|
208
209
|
return e ? n.filter((t) => (t.searchText ?? (typeof t.label == "string" ? t.label : "")).toLowerCase().includes(e)) : n;
|
|
209
210
|
}, [n, L, ve]), le = T(!1), Re = T(""), U = h(
|
|
210
211
|
(e, t) => {
|
|
211
|
-
Re.current !== e && (Re.current = e, t && (le.current = !0),
|
|
212
|
+
Re.current !== e && (Re.current = e, t && (le.current = !0), ot(e), $ == null || $(e));
|
|
212
213
|
},
|
|
213
214
|
[$]
|
|
214
215
|
), se = h(
|
|
@@ -218,13 +219,13 @@ const ze = 0.6, Fe = 420, Ut = ({ option: n }) => {
|
|
|
218
219
|
We(() => {
|
|
219
220
|
le.current && (A(-1), le.current = !1);
|
|
220
221
|
}, [L]);
|
|
221
|
-
const
|
|
222
|
+
const st = Z ?? ($ !== void 0 || n.length > Kt), Oe = v ? !1 : st, ie = h(() => {
|
|
222
223
|
var e, t;
|
|
223
|
-
ne(!1), (e = O.current) != null && e.contains(
|
|
224
|
+
ne(!1), (e = O.current) != null && e.contains(kt()) && ((t = Y.current) == null || t.focus());
|
|
224
225
|
}, []), D = h(() => {
|
|
225
226
|
const e = Y.current;
|
|
226
227
|
if (!e) return;
|
|
227
|
-
const t =
|
|
228
|
+
const t = Nt(O.current, {
|
|
228
229
|
triggerRect: e.getBoundingClientRect(),
|
|
229
230
|
preset: "standard",
|
|
230
231
|
minWidth: W,
|
|
@@ -243,11 +244,11 @@ const ze = 0.6, Fe = 420, Ut = ({ option: n }) => {
|
|
|
243
244
|
const e = () => D(), t = (y) => {
|
|
244
245
|
const d = y.composedPath(), a = Y.current, i = O.current;
|
|
245
246
|
(!a || !d.includes(a)) && (!i || !d.includes(i)) && ie();
|
|
246
|
-
}, l =
|
|
247
|
+
}, l = _t(ie);
|
|
247
248
|
return window.addEventListener("scroll", e, !0), window.addEventListener("resize", e), document.addEventListener("mousedown", t), () => {
|
|
248
249
|
window.removeEventListener("scroll", e, !0), window.removeEventListener("resize", e), document.removeEventListener("mousedown", t), l();
|
|
249
250
|
};
|
|
250
|
-
}, [o, D, v, G, ie]),
|
|
251
|
+
}, [o, D, v, G, ie]), gt(() => {
|
|
251
252
|
if (!o)
|
|
252
253
|
return;
|
|
253
254
|
D();
|
|
@@ -259,7 +260,7 @@ const ze = 0.6, Fe = 420, Ut = ({ option: n }) => {
|
|
|
259
260
|
}, [o, D]);
|
|
260
261
|
const I = h(
|
|
261
262
|
(e) => {
|
|
262
|
-
re ||
|
|
263
|
+
re || at(e), u == null || u(e);
|
|
263
264
|
},
|
|
264
265
|
[re, u]
|
|
265
266
|
), V = h(
|
|
@@ -275,7 +276,7 @@ const ze = 0.6, Fe = 420, Ut = ({ option: n }) => {
|
|
|
275
276
|
for (const t of n)
|
|
276
277
|
t.disabled && e.add(t.value);
|
|
277
278
|
return e;
|
|
278
|
-
}, [n]),
|
|
279
|
+
}, [n]), it = h(
|
|
279
280
|
(e) => {
|
|
280
281
|
e.stopPropagation();
|
|
281
282
|
const t = m.filter((l) => X.has(l));
|
|
@@ -289,7 +290,7 @@ const ze = 0.6, Fe = 420, Ut = ({ option: n }) => {
|
|
|
289
290
|
[m, I, V]
|
|
290
291
|
), j = h(
|
|
291
292
|
(e) => {
|
|
292
|
-
if (!
|
|
293
|
+
if (!Ut.has(e.key)) return;
|
|
293
294
|
if (e.preventDefault(), e.stopPropagation(), !o) {
|
|
294
295
|
ne(!0);
|
|
295
296
|
return;
|
|
@@ -300,8 +301,8 @@ const ze = 0.6, Fe = 420, Ut = ({ option: n }) => {
|
|
|
300
301
|
requestAnimationFrame(() => {
|
|
301
302
|
const a = Le.current[d], i = ke.current;
|
|
302
303
|
if (!a || !i) return;
|
|
303
|
-
const g = a.offsetTop, Pe = g + a.offsetHeight, Me = i.scrollTop,
|
|
304
|
-
Pe >
|
|
304
|
+
const g = a.offsetTop, Pe = g + a.offsetHeight, Me = i.scrollTop, mt = Me + i.clientHeight;
|
|
305
|
+
Pe > mt ? i.scrollTo({
|
|
305
306
|
top: Pe - i.clientHeight,
|
|
306
307
|
behavior: "smooth"
|
|
307
308
|
}) : g < Me && i.scrollTo({ top: g, behavior: "smooth" });
|
|
@@ -340,7 +341,7 @@ const ze = 0.6, Fe = 420, Ut = ({ option: n }) => {
|
|
|
340
341
|
[o, _, x, ce, n, G]
|
|
341
342
|
), Ne = h(
|
|
342
343
|
(e) => {
|
|
343
|
-
if (e.key ===
|
|
344
|
+
if (e.key === Yt && L === "" && m.length > 0) {
|
|
344
345
|
e.preventDefault(), I(m.slice(0, -1)), requestAnimationFrame(() => {
|
|
345
346
|
var t;
|
|
346
347
|
return (t = B.current) == null ? void 0 : t.focus();
|
|
@@ -350,7 +351,7 @@ const ze = 0.6, Fe = 420, Ut = ({ option: n }) => {
|
|
|
350
351
|
j(e);
|
|
351
352
|
},
|
|
352
353
|
[j, L, m, I]
|
|
353
|
-
), Ce = s.length > 0 && !p && !f,
|
|
354
|
+
), Ce = s.length > 0 && !p && !f, ct = Rt({
|
|
354
355
|
disabled: p,
|
|
355
356
|
error: E,
|
|
356
357
|
open: o,
|
|
@@ -380,7 +381,7 @@ const ze = 0.6, Fe = 420, Ut = ({ option: n }) => {
|
|
|
380
381
|
f,
|
|
381
382
|
s.length,
|
|
382
383
|
b
|
|
383
|
-
]),
|
|
384
|
+
]), dt = H(() => {
|
|
384
385
|
if (N && s.length > 0)
|
|
385
386
|
return N(s);
|
|
386
387
|
if (ee && s.length > 0) {
|
|
@@ -394,7 +395,7 @@ const ze = 0.6, Fe = 420, Ut = ({ option: n }) => {
|
|
|
394
395
|
e.map((l) => {
|
|
395
396
|
const S = X.has(l.value);
|
|
396
397
|
return /* @__PURE__ */ r(
|
|
397
|
-
|
|
398
|
+
Tt,
|
|
398
399
|
{
|
|
399
400
|
value: l.label,
|
|
400
401
|
type: "default",
|
|
@@ -427,11 +428,11 @@ const ze = 0.6, Fe = 420, Ut = ({ option: n }) => {
|
|
|
427
428
|
de,
|
|
428
429
|
b,
|
|
429
430
|
X
|
|
430
|
-
]),
|
|
431
|
-
|
|
432
|
-
o &&
|
|
431
|
+
]), ut = n.length === 0 ? "No options available" : "No results found";
|
|
432
|
+
bt(() => {
|
|
433
|
+
o && Ht();
|
|
433
434
|
}, [o]);
|
|
434
|
-
const
|
|
435
|
+
const ft = {
|
|
435
436
|
position: "fixed",
|
|
436
437
|
top: (c == null ? void 0 : c.top) ?? 0,
|
|
437
438
|
left: (c == null ? void 0 : c.left) ?? 0,
|
|
@@ -444,11 +445,11 @@ const ze = 0.6, Fe = 420, Ut = ({ option: n }) => {
|
|
|
444
445
|
display: "flex",
|
|
445
446
|
flexDirection: "column",
|
|
446
447
|
gap: 4,
|
|
447
|
-
maxHeight: (c == null ? void 0 : c.maxHeight) ??
|
|
448
|
-
fontSize:
|
|
448
|
+
maxHeight: (c == null ? void 0 : c.maxHeight) ?? Ct,
|
|
449
|
+
fontSize: Lt[C],
|
|
449
450
|
visibility: c ? "visible" : "hidden",
|
|
450
451
|
opacity: c ? 1 : 0
|
|
451
|
-
}, Ae = !!(q || pe || J || he || me || ge || Q), De = Ae && !!K, He = /* @__PURE__ */ w(
|
|
452
|
+
}, Ae = !!(q || pe || J || he || me || ge || Q), De = Ae && !!K, He = /* @__PURE__ */ w(pt, { children: [
|
|
452
453
|
/* @__PURE__ */ w("div", { className: "relative", style: Ge(M), children: [
|
|
453
454
|
/* @__PURE__ */ w(
|
|
454
455
|
Ve,
|
|
@@ -457,17 +458,17 @@ const ze = 0.6, Fe = 420, Ut = ({ option: n }) => {
|
|
|
457
458
|
id: Ie,
|
|
458
459
|
triggerRole: v ? "combobox" : ee && te ? "group" : "button",
|
|
459
460
|
disabled: p || f,
|
|
460
|
-
[
|
|
461
|
+
[Ot]: "",
|
|
461
462
|
"data-open": o || void 0,
|
|
462
463
|
"aria-haspopup": "listbox",
|
|
463
464
|
"aria-expanded": o,
|
|
464
465
|
"aria-controls": o ? we : void 0,
|
|
465
466
|
"aria-activedescendant": v && o && x >= 0 ? Ee(x) : void 0,
|
|
466
|
-
"aria-labelledby":
|
|
467
|
+
"aria-labelledby": Qe ?? (De && !xe ? Se : void 0),
|
|
467
468
|
"aria-label": xe ?? (De ? void 0 : K),
|
|
468
469
|
"aria-invalid": E || void 0,
|
|
469
470
|
"aria-required": Q || void 0,
|
|
470
|
-
"aria-describedby":
|
|
471
|
+
"aria-describedby": rt,
|
|
471
472
|
"aria-busy": f || void 0,
|
|
472
473
|
onClick: () => {
|
|
473
474
|
p || f || ne((e) => !e);
|
|
@@ -475,20 +476,20 @@ const ze = 0.6, Fe = 420, Ut = ({ option: n }) => {
|
|
|
475
476
|
onKeyDown: j,
|
|
476
477
|
style: {
|
|
477
478
|
transition: "border-color 0.15s ease, box-shadow 0.15s ease",
|
|
478
|
-
...
|
|
479
|
-
...
|
|
479
|
+
...ct,
|
|
480
|
+
...qe
|
|
480
481
|
},
|
|
481
|
-
className: `w-full ${
|
|
482
|
+
className: `w-full ${Ft[C]} border border-solid flex items-center font-normal text-[var(--malachite-text-primary)] ${p || f ? "cursor-not-allowed" : "cursor-pointer"} ${At} ${Ze}`,
|
|
482
483
|
children: [
|
|
483
484
|
/* @__PURE__ */ r(
|
|
484
485
|
"span",
|
|
485
486
|
{
|
|
486
487
|
className: `flex-1 min-w-0 text-left ${v ? "flex" : "truncate"} ${Ce ? "pr-[18px]" : ""}`,
|
|
487
|
-
children:
|
|
488
|
+
children: dt
|
|
488
489
|
}
|
|
489
490
|
),
|
|
490
|
-
f ? /* @__PURE__ */ r("span", { className: "flex items-center justify-center shrink-0 size-[14px]", children: /* @__PURE__ */ r(
|
|
491
|
-
|
|
491
|
+
f ? /* @__PURE__ */ r("span", { className: "flex items-center justify-center shrink-0 size-[14px]", children: /* @__PURE__ */ r(St, { size: "xxxsmall" }) }) : /* @__PURE__ */ r(
|
|
492
|
+
wt,
|
|
492
493
|
{
|
|
493
494
|
size: 13,
|
|
494
495
|
className: "shrink-0",
|
|
@@ -507,13 +508,13 @@ const ze = 0.6, Fe = 420, Ut = ({ option: n }) => {
|
|
|
507
508
|
{
|
|
508
509
|
type: "button",
|
|
509
510
|
"aria-label": "Clear selection",
|
|
510
|
-
onClick:
|
|
511
|
+
onClick: it,
|
|
511
512
|
className: "absolute top-0 bottom-0 right-[28px] flex items-center justify-center px-[2px] leading-none bg-transparent border-none text-[var(--malachite-text-placeholder)] hover:text-[var(--malachite-text-primary)] cursor-pointer",
|
|
512
513
|
children: "×"
|
|
513
514
|
}
|
|
514
515
|
)
|
|
515
516
|
] }),
|
|
516
|
-
o &&
|
|
517
|
+
o && vt(
|
|
517
518
|
/* @__PURE__ */ w(
|
|
518
519
|
"div",
|
|
519
520
|
{
|
|
@@ -521,8 +522,8 @@ const ze = 0.6, Fe = 420, Ut = ({ option: n }) => {
|
|
|
521
522
|
id: we,
|
|
522
523
|
role: "listbox",
|
|
523
524
|
"aria-multiselectable": "true",
|
|
524
|
-
...
|
|
525
|
-
style:
|
|
525
|
+
...lt,
|
|
526
|
+
style: ft,
|
|
526
527
|
children: [
|
|
527
528
|
Oe && /* @__PURE__ */ w(
|
|
528
529
|
"div",
|
|
@@ -539,7 +540,7 @@ const ze = 0.6, Fe = 420, Ut = ({ option: n }) => {
|
|
|
539
540
|
},
|
|
540
541
|
children: [
|
|
541
542
|
/* @__PURE__ */ r(
|
|
542
|
-
|
|
543
|
+
It,
|
|
543
544
|
{
|
|
544
545
|
size: 13,
|
|
545
546
|
style: {
|
|
@@ -601,7 +602,7 @@ const ze = 0.6, Fe = 420, Ut = ({ option: n }) => {
|
|
|
601
602
|
},
|
|
602
603
|
children: _.length === 0 ? (
|
|
603
604
|
// `role="listbox"` admits only option/group children.
|
|
604
|
-
/* @__PURE__ */ r("div", { role: "presentation", style:
|
|
605
|
+
/* @__PURE__ */ r("div", { role: "presentation", style: zt, children: ut })
|
|
605
606
|
) : _.map((e, t) => {
|
|
606
607
|
const l = ae.has(e.value), S = t === x, y = !!e.disabled;
|
|
607
608
|
return /* @__PURE__ */ w(
|
|
@@ -643,8 +644,8 @@ const ze = 0.6, Fe = 420, Ut = ({ option: n }) => {
|
|
|
643
644
|
color: l ? "var(--malachite-accent-foreground, rgb(2, 122, 66))" : "var(--malachite-text-primary, rgb(10, 10, 10))"
|
|
644
645
|
},
|
|
645
646
|
children: [
|
|
646
|
-
/* @__PURE__ */ r(
|
|
647
|
-
|
|
647
|
+
/* @__PURE__ */ r(Vt, { option: e }),
|
|
648
|
+
Dt(e.badge) && /* @__PURE__ */ r(
|
|
648
649
|
"span",
|
|
649
650
|
{
|
|
650
651
|
style: {
|
|
@@ -652,7 +653,7 @@ const ze = 0.6, Fe = 420, Ut = ({ option: n }) => {
|
|
|
652
653
|
flexShrink: 0,
|
|
653
654
|
paddingLeft: 8
|
|
654
655
|
},
|
|
655
|
-
children: /* @__PURE__ */ r(fe.Suspense, { fallback: null, children: /* @__PURE__ */ r(
|
|
656
|
+
children: /* @__PURE__ */ r(fe.Suspense, { fallback: null, children: /* @__PURE__ */ r(Gt, { children: e.badge }) })
|
|
656
657
|
}
|
|
657
658
|
)
|
|
658
659
|
]
|
|
@@ -669,28 +670,29 @@ const ze = 0.6, Fe = 420, Ut = ({ option: n }) => {
|
|
|
669
670
|
)
|
|
670
671
|
] });
|
|
671
672
|
return Ae ? /* @__PURE__ */ r(
|
|
672
|
-
|
|
673
|
+
xt,
|
|
673
674
|
{
|
|
674
675
|
label: K,
|
|
675
676
|
hint: J,
|
|
677
|
+
hintIcon: Xe,
|
|
676
678
|
rightSideContent: he,
|
|
677
679
|
tooltip: pe,
|
|
678
680
|
name: me ?? "",
|
|
679
681
|
required: Q,
|
|
680
|
-
requiredIndicator:
|
|
682
|
+
requiredIndicator: je,
|
|
681
683
|
loading: f,
|
|
682
684
|
formControl: ge,
|
|
683
685
|
description: q,
|
|
684
686
|
controlId: Ie,
|
|
685
687
|
labelId: Se,
|
|
686
|
-
descriptionId:
|
|
687
|
-
hintId:
|
|
688
|
+
descriptionId: et,
|
|
689
|
+
hintId: tt,
|
|
688
690
|
loadingComponent: M === void 0 ? /* @__PURE__ */ r($e, { heightClass: F[C] }) : /* @__PURE__ */ r("div", { style: Ge(M), children: /* @__PURE__ */ r($e, { heightClass: F[C] }) }),
|
|
689
691
|
children: He
|
|
690
692
|
}
|
|
691
693
|
) : He;
|
|
692
694
|
};
|
|
693
695
|
export {
|
|
694
|
-
|
|
696
|
+
br as default
|
|
695
697
|
};
|
|
696
698
|
//# sourceMappingURL=MultiSelect.js.map
|