@stackone/malachite 2.134.2 → 2.136.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.
@@ -1,50 +1,74 @@
1
- import { jsx as r, jsxs as I, Fragment as je } from "react/jsx-runtime";
2
- import pe, { useId as Ve, useState as $, useRef as k, useMemo as W, useCallback as x, useEffect as Be, useLayoutEffect as It, useInsertionEffect as Et } from "react";
3
- import { createPortal as St } from "react-dom";
4
- import Tt, { useFormFieldIds as kt } from "./BaseFormComponent.js";
5
- import Rt from "./CustomIcons/CaretDownIcon.js";
6
- import _t from "./CustomIcons/InfoFilledIcon.js";
7
- import Lt from "./CustomIcons/SearchIcon.js";
8
- import { FieldMessage as Ot } from "./FieldMessage.js";
9
- import { FormItem as Nt } from "./FormItem.js";
10
- import Ge from "./LoadingInput.js";
11
- import { Spinner as At } from "./Spinner.js";
12
- import { Tag as Mt } from "./Tag.js";
13
- import ze from "./Tooltip.js";
14
- import { getDeepActiveNode as Ke } from "./activeElement.js";
15
- import { CONTROL_TEXT_SIZE_CLASS as me, CONTROL_TEXT_SIZE as Dt } from "./controlTextSize.js";
16
- import { controlWidthStyle as Ye } from "./controlWidth.js";
17
- import { getTriggerVisual as Ht, DROPDOWN_TRIGGER_ATTR as Ct } from "./dropdownTriggerStyle.js";
18
- import { pushEscapeLayer as Pt } from "./escapeLayers.js";
19
- import { measureMenuGeometry as Wt, MENU_MAX_HEIGHT_PX as $t, MENU_SPECS as F } from "./floatingMenuGeometry.js";
20
- import { FOCUS_RING as Bt } from "./focusRing.js";
21
- import { hasBadge as Gt } from "./hasBadge.js";
22
- import { ensureMultiSelectPanelStyles as zt } from "./optionRowStyles.js";
23
- import { usePopupLayer as Kt } from "./overlayLayers.js";
24
- import { useTopLayer as Yt } from "./topLayer.js";
25
- import { tooltipLines as Ft, isCut as Ut, isClamped as jt } from "./truncatedLines.js";
26
- import { useFollowTrigger as Vt } from "./useFollowTrigger.js";
27
- import { useLatestRef as Xt } from "./useLatestRef.js";
28
- const qt = pe.lazy(() => import("./ActionMenuTagHost.js")), Zt = {
1
+ import { jsx as r, jsxs as g, Fragment as ye } from "react/jsx-runtime";
2
+ import we, { useId as tt, useState as Y, useRef as _, useMemo as U, useCallback as h, useEffect as Ve, useLayoutEffect as Ot, useInsertionEffect as Nt } from "react";
3
+ import { createPortal as Rt } from "react-dom";
4
+ import Mt, { useFormFieldIds as Ct } from "./BaseFormComponent.js";
5
+ import Dt from "./CustomIcons/CaretDownIcon.js";
6
+ import At from "./CustomIcons/InfoFilledIcon.js";
7
+ import Ht from "./CustomIcons/SearchIcon.js";
8
+ import { FieldMessage as Pt } from "./FieldMessage.js";
9
+ import { FormItem as Wt } from "./FormItem.js";
10
+ import je from "./LoadingInput.js";
11
+ import { Spinner as $t } from "./Spinner.js";
12
+ import { Tag as Bt } from "./Tag.js";
13
+ import Xe from "./Tooltip.js";
14
+ import { getDeepActiveNode as qe } from "./activeElement.js";
15
+ import { CONTROL_TEXT_SIZE_CLASS as ve, CONTROL_TEXT_SIZE as Yt } from "./controlTextSize.js";
16
+ import { controlWidthStyle as Ze } from "./controlWidth.js";
17
+ import { getTriggerVisual as Gt, DROPDOWN_TRIGGER_ATTR as Ut } from "./dropdownTriggerStyle.js";
18
+ import { pushEscapeLayer as zt } from "./escapeLayers.js";
19
+ import { measureMenuGeometry as Kt, MENU_MAX_HEIGHT_PX as Ft, MENU_SPECS as q } from "./floatingMenuGeometry.js";
20
+ import { FOCUS_RING as Vt } from "./focusRing.js";
21
+ import { hasBadge as jt } from "./hasBadge.js";
22
+ import { ensureMultiSelectPanelStyles as Xt } from "./optionRowStyles.js";
23
+ import { usePopupLayer as qt } from "./overlayLayers.js";
24
+ import { useTopLayer as Zt } from "./topLayer.js";
25
+ import { tooltipLines as Jt, isCut as Qt, isClamped as er } from "./truncatedLines.js";
26
+ import { useFollowTrigger as tr } from "./useFollowTrigger.js";
27
+ import { useLatestRef as rr } from "./useLatestRef.js";
28
+ const nr = we.lazy(() => import("./ActionMenuTagHost.js")), or = {
29
29
  padding: "8px 10px",
30
30
  color: "var(--malachite-text-secondary, rgb(123, 123, 123))"
31
- }, U = {
31
+ }, Je = {
32
+ height: 1,
33
+ width: "100%",
34
+ background: "var(--malachite-card-border, rgb(232, 232, 232))",
35
+ flexShrink: 0
36
+ }, lr = {
37
+ display: "flex",
38
+ alignItems: "center",
39
+ gap: 8,
40
+ width: "100%",
41
+ flexShrink: 0,
42
+ border: "none",
43
+ textAlign: "left",
44
+ borderRadius: "var(--malachite-radius-lg, 8px)",
45
+ padding: "8px 10px",
46
+ font: "inherit",
47
+ cursor: "pointer",
48
+ color: "var(--malachite-accent-foreground, rgb(2, 122, 66))"
49
+ }, ar = {
50
+ flex: 1,
51
+ minWidth: 0,
52
+ overflow: "hidden",
53
+ textOverflow: "ellipsis",
54
+ whiteSpace: "nowrap"
55
+ }, sr = { display: "flex", flexShrink: 0 }, Z = {
32
56
  small: "h-[var(--malachite-control-height-small,28px)]",
33
57
  medium: "h-[var(--malachite-control-height-medium,32px)]",
34
58
  large: "h-[var(--malachite-control-height-large,42px)]"
35
- }, Jt = {
36
- small: `${U.small} gap-[6px] px-2.5 ${me.small} rounded-[var(--malachite-radius-10,10px)]`,
37
- medium: `${U.medium} gap-[8px] px-3 ${me.medium} rounded-xl`,
38
- large: `${U.large} gap-[10px] px-4 ${me.large} rounded-[var(--malachite-radius-xxl,14px)]`
39
- }, Qt = 10, Xe = "ArrowDown", qe = "ArrowUp", Ze = "Enter", er = "Backspace", tr = /* @__PURE__ */ new Set([Xe, qe, Ze]), Je = pe.forwardRef(
40
- ({ triggerRole: n, disabled: y, children: E, ...s }, b) => n !== "button" ? /* @__PURE__ */ r(
59
+ }, ir = {
60
+ small: `${Z.small} gap-[6px] px-2.5 ${ve.small} rounded-[var(--malachite-radius-10,10px)]`,
61
+ medium: `${Z.medium} gap-[8px] px-3 ${ve.medium} rounded-xl`,
62
+ large: `${Z.large} gap-[10px] px-4 ${ve.large} rounded-[var(--malachite-radius-xxl,14px)]`
63
+ }, cr = 10, rt = "ArrowDown", nt = "ArrowUp", ot = "Enter", dr = "Backspace", ur = /* @__PURE__ */ new Set([rt, nt, ot]), lt = we.forwardRef(
64
+ ({ triggerRole: n, disabled: y, children: I, ...s }, b) => n !== "button" ? /* @__PURE__ */ r(
41
65
  "div",
42
66
  {
43
67
  ref: b,
44
68
  role: n,
45
69
  tabIndex: y ? -1 : 0,
46
70
  ...s,
47
- children: E
71
+ children: I
48
72
  }
49
73
  ) : /* @__PURE__ */ r(
50
74
  "button",
@@ -53,29 +77,29 @@ const qt = pe.lazy(() => import("./ActionMenuTagHost.js")), Zt = {
53
77
  type: "button",
54
78
  disabled: y,
55
79
  ...s,
56
- children: E
80
+ children: I
57
81
  }
58
82
  )
59
83
  );
60
- Je.displayName = "TriggerElement";
61
- const Fe = 0.2, Ue = 420, rr = ({ option: n }) => {
62
- const y = k(null), E = k(null), s = n.description ? n.descriptionMode ?? "icon" : null, b = s === "subtitle", [R, B] = $({ label: !0, subtitle: !0 }), O = () => {
63
- const v = Ut(y.current), i = jt(E.current);
64
- return !v && !i && s !== "hover" ? !1 : (B({ label: v, subtitle: i }), !0);
65
- }, _ = s === "hover" || b && R.subtitle, M = (v) => /* @__PURE__ */ r(
66
- ze,
84
+ lt.displayName = "TriggerElement";
85
+ const Qe = 0.2, et = 420, fr = ({ option: n }) => {
86
+ const y = _(null), I = _(null), s = n.description ? n.descriptionMode ?? "icon" : null, b = s === "subtitle", [k, z] = Y({ label: !0, subtitle: !0 }), M = () => {
87
+ const x = Qt(y.current), i = er(I.current);
88
+ return !x && !i && s !== "hover" ? !1 : (z({ label: x, subtitle: i }), !0);
89
+ }, L = s === "hover" || b && k.subtitle, H = (x) => /* @__PURE__ */ r(
90
+ Xe,
67
91
  {
68
- text: Ft([
69
- ["label", R.label && n.label],
70
- ["description", _ && n.description]
92
+ text: Jt([
93
+ ["label", k.label && n.label],
94
+ ["description", L && n.description]
71
95
  ]),
72
- shouldShow: O,
73
- delay: Fe,
74
- maxWidth: Ue,
96
+ shouldShow: M,
97
+ delay: Qe,
98
+ maxWidth: et,
75
99
  triggerAs: "span",
76
100
  isShrinkable: !0,
77
101
  describesTrigger: s === "hover",
78
- children: v
102
+ children: x
79
103
  }
80
104
  ), d = /* @__PURE__ */ r(
81
105
  "span",
@@ -90,8 +114,8 @@ const Fe = 0.2, Ue = 420, rr = ({ option: n }) => {
90
114
  children: n.label
91
115
  }
92
116
  );
93
- return b ? M(
94
- /* @__PURE__ */ I(
117
+ return b ? H(
118
+ /* @__PURE__ */ g(
95
119
  "span",
96
120
  {
97
121
  style: {
@@ -107,7 +131,7 @@ const Fe = 0.2, Ue = 420, rr = ({ option: n }) => {
107
131
  /* @__PURE__ */ r(
108
132
  "span",
109
133
  {
110
- ref: E,
134
+ ref: I,
111
135
  style: {
112
136
  fontSize: 12,
113
137
  color: "var(--malachite-text-secondary, rgb(123, 123, 123))",
@@ -126,7 +150,7 @@ const Fe = 0.2, Ue = 420, rr = ({ option: n }) => {
126
150
  ]
127
151
  }
128
152
  )
129
- ) : /* @__PURE__ */ I(
153
+ ) : /* @__PURE__ */ g(
130
154
  "span",
131
155
  {
132
156
  style: {
@@ -137,13 +161,13 @@ const Fe = 0.2, Ue = 420, rr = ({ option: n }) => {
137
161
  gap: 6
138
162
  },
139
163
  children: [
140
- M(d),
164
+ H(d),
141
165
  s === "icon" && /* @__PURE__ */ r(
142
- ze,
166
+ Xe,
143
167
  {
144
168
  text: n.description,
145
- delay: Fe,
146
- maxWidth: Ue,
169
+ delay: Qe,
170
+ maxWidth: et,
147
171
  children: /* @__PURE__ */ r(
148
172
  "span",
149
173
  {
@@ -152,8 +176,8 @@ const Fe = 0.2, Ue = 420, rr = ({ option: n }) => {
152
176
  color: "var(--malachite-text-placeholder, rgb(187, 187, 187))"
153
177
  },
154
178
  "aria-label": "More information",
155
- onClick: (v) => v.stopPropagation(),
156
- children: n.descriptionIcon ?? /* @__PURE__ */ r(_t, { size: 14 })
179
+ onClick: (x) => x.stopPropagation(),
180
+ children: n.descriptionIcon ?? /* @__PURE__ */ r(At, { size: 14 })
157
181
  }
158
182
  )
159
183
  }
@@ -161,216 +185,238 @@ const Fe = 0.2, Ue = 420, rr = ({ option: n }) => {
161
185
  ]
162
186
  }
163
187
  );
164
- }, Qe = ({
188
+ }, at = ({
165
189
  options: n,
166
190
  value: y,
167
- defaultValue: E,
191
+ defaultValue: I,
168
192
  onChange: s,
169
193
  placeholder: b = "Select",
170
- renderTrigger: R,
171
- searchable: B,
172
- size: O = "large",
173
- width: _ = "auto",
174
- minWidth: M,
194
+ renderTrigger: k,
195
+ searchable: z,
196
+ size: M = "large",
197
+ width: L = "auto",
198
+ minWidth: H,
175
199
  disabled: d = !1,
176
- error: v = !1,
200
+ error: x = !1,
177
201
  loading: i = !1,
178
- label: j,
179
- name: he,
180
- description: Q,
181
- tooltip: ge,
182
- hint: ee,
183
- hintIcon: et,
184
- rightSideContent: be,
185
- required: te = !1,
186
- requiredIndicator: tt,
187
- formControl: ve,
188
- chips: re = !1,
189
- chipsRemovable: ne = !0,
190
- chipsMax: xe = "auto",
191
- inlineSearch: S = !1,
192
- onSearchChange: G,
193
- localFilter: ye = !0,
194
- className: rt = "",
195
- style: nt,
196
- id: ot,
197
- "aria-label": we,
198
- "aria-labelledby": at,
199
- errorMessageId: lt,
200
- onFieldLeave: st
202
+ label: J,
203
+ name: Ee,
204
+ description: ne,
205
+ tooltip: Ie,
206
+ hint: oe,
207
+ hintIcon: st,
208
+ rightSideContent: Se,
209
+ required: le = !1,
210
+ requiredIndicator: it,
211
+ formControl: Te,
212
+ chips: ae = !1,
213
+ chipsRemovable: se = !0,
214
+ chipsMax: _e = "auto",
215
+ inlineSearch: w = !1,
216
+ onSearchChange: K,
217
+ localFilter: ke = !0,
218
+ menuAction: S,
219
+ className: ct = "",
220
+ style: dt,
221
+ id: ut,
222
+ "aria-label": Le,
223
+ "aria-labelledby": ft,
224
+ errorMessageId: pt,
225
+ onFieldLeave: mt
201
226
  }) => {
202
- const Ie = Ve(), Ee = `${Ie}-listbox`, Se = (e) => `${Ie}-option-${e}`, { controlId: Te, labelId: ke, descriptionId: it, hintId: ct, describedBy: dt } = kt({
203
- id: ot,
204
- label: j,
205
- description: Q,
206
- hint: ee
207
- }), [ut, ft] = $(() => E ?? []), oe = y !== void 0, h = oe ? y : ut, [l, ae] = $(!1), [m, Re] = $(null), [N, mt] = $(""), [T, P] = $(-1), z = k(null), le = k(null), D = Xt(st), K = k(null), A = k(null), _e = k(null);
208
- Yt(A, l);
209
- const pt = Kt("multiselect", l, A), Le = k([]), se = W(() => new Set(h), [h]), c = W(
210
- () => n.filter((e) => se.has(e.value)),
211
- [n, se]
212
- ), ie = typeof xe == "number" ? xe : void 0, H = W(() => {
213
- if (!ye) return n;
214
- const e = N.trim().toLowerCase();
227
+ const ie = tt(), Oe = `${ie}-listbox`, Ne = (e) => `${ie}-option-${e}`, Re = `${ie}-menu-action`, { controlId: Me, labelId: Ce, descriptionId: ht, hintId: gt, describedBy: bt } = Ct({
228
+ id: ut,
229
+ label: J,
230
+ description: ne,
231
+ hint: oe
232
+ }), [xt, vt] = Y(() => I ?? []), ce = y !== void 0, m = ce ? y : xt, [a, de] = Y(!1), [f, De] = Y(null), [C, yt] = Y(""), [T, D] = Y(-1), [F, P] = Y(!1), V = _(null), ue = _(null), W = rr(mt), j = _(null), A = _(null), Ae = _(null);
233
+ Zt(A, a);
234
+ const wt = qt("multiselect", a, A), He = _([]), fe = U(() => new Set(m), [m]), c = U(
235
+ () => n.filter((e) => fe.has(e.value)),
236
+ [n, fe]
237
+ ), pe = typeof _e == "number" ? _e : void 0, $ = U(() => {
238
+ if (!ke) return n;
239
+ const e = C.trim().toLowerCase();
215
240
  return e ? n.filter((t) => (t.searchText ?? (typeof t.label == "string" ? t.label : "")).toLowerCase().includes(e)) : n;
216
- }, [n, N, ye]), ce = k(!1), Oe = k(""), V = x(
241
+ }, [n, C, ke]), me = _(!1), Pe = _(""), Q = h(
217
242
  (e, t) => {
218
- Oe.current !== e && (Oe.current = e, t && (ce.current = !0), mt(e), G == null || G(e));
243
+ Pe.current !== e && (Pe.current = e, t && (me.current = !0), yt(e), K == null || K(e));
219
244
  },
220
- [G]
221
- ), de = x(
222
- (e) => V(e, !0),
223
- [V]
224
- ), Y = x(() => V("", !1), [V]);
225
- Be(() => {
226
- ce.current && (P(-1), ce.current = !1);
227
- }, [N]);
228
- const ht = B ?? (G !== void 0 || n.length > Qt), Ne = S ? !1 : ht, X = x(() => {
245
+ [K]
246
+ ), he = h(
247
+ (e) => Q(e, !0),
248
+ [Q]
249
+ ), X = h(() => Q("", !1), [Q]);
250
+ Ve(() => {
251
+ me.current && (D(-1), P(!1), me.current = !1);
252
+ }, [C]);
253
+ const Et = z ?? (K !== void 0 || n.length > cr), We = w ? !1 : Et, G = h(() => {
229
254
  var e, t, o, u;
230
- ae(!1), (e = A.current) != null && e.contains(Ke()) && ((t = z.current) == null || t.focus({ preventScroll: !0 })), (o = le.current) != null && o.contains(Ke()) || (u = D.current) == null || u.call(D);
231
- }, [D]), C = x(() => {
232
- const e = z.current;
255
+ de(!1), (e = A.current) != null && e.contains(qe()) && ((t = V.current) == null || t.focus({ preventScroll: !0 })), (o = ue.current) != null && o.contains(qe()) || (u = W.current) == null || u.call(W);
256
+ }, [W]), B = h(() => {
257
+ const e = V.current;
233
258
  if (!e) return;
234
- const t = Wt(A.current, {
259
+ const t = Kt(A.current, {
235
260
  triggerRect: e.getBoundingClientRect(),
236
261
  preset: "standard",
237
- minWidth: M,
262
+ minWidth: H,
238
263
  viewportWidth: window.innerWidth,
239
264
  viewportHeight: window.innerHeight
240
265
  });
241
- Re(t);
242
- }, [M]);
243
- Vt(l, z, C, X), Be(() => {
266
+ De(t);
267
+ }, [H]);
268
+ tr(a, V, B, G), Ve(() => {
244
269
  var u;
245
- if (!l) {
246
- Y(), P(-1), Re(null);
270
+ if (!a) {
271
+ X(), D(-1), P(!1), De(null);
247
272
  return;
248
273
  }
249
- C(), S && ((u = K.current) == null || u.focus());
250
- const e = () => C(), t = (g) => {
251
- const p = g.composedPath(), a = z.current, f = A.current;
252
- (!a || !p.includes(a)) && (!f || !p.includes(f)) && X();
253
- }, o = Pt(X);
274
+ B(), w && ((u = j.current) == null || u.focus());
275
+ const e = () => B(), t = (p) => {
276
+ const N = p.composedPath(), R = V.current, l = A.current;
277
+ (!R || !N.includes(R)) && (!l || !N.includes(l)) && G();
278
+ }, o = zt(G);
254
279
  return window.addEventListener("resize", e), document.addEventListener("mousedown", t), () => {
255
280
  window.removeEventListener("resize", e), document.removeEventListener("mousedown", t), o();
256
281
  };
257
- }, [l, C, S, Y, X]), It(() => {
258
- if (!l)
282
+ }, [a, B, w, X, G]), Ot(() => {
283
+ if (!a)
259
284
  return;
260
- C();
285
+ B();
261
286
  const e = A.current;
262
287
  if (!e || typeof ResizeObserver > "u")
263
288
  return;
264
- const t = new ResizeObserver(() => C());
289
+ const t = new ResizeObserver(() => B());
265
290
  return t.observe(e), () => t.disconnect();
266
- }, [l, C]);
267
- const L = x(
291
+ }, [a, B]);
292
+ const ge = h(() => {
293
+ G(), S == null || S.onSelect();
294
+ }, [G, S]), O = h(
268
295
  (e) => {
269
- oe || ft(e), s == null || s(e);
296
+ ce || vt(e), s == null || s(e);
270
297
  },
271
- [oe, s]
272
- ), q = x(
298
+ [ce, s]
299
+ ), ee = h(
273
300
  (e) => n.some((t) => t.value === e && t.disabled),
274
301
  [n]
275
- ), ue = x(
302
+ ), be = h(
276
303
  (e) => {
277
- q(e) || (h.includes(e) ? L(h.filter((t) => t !== e)) : L([...h, e]));
304
+ ee(e) || (m.includes(e) ? O(m.filter((t) => t !== e)) : O([...m, e]));
278
305
  },
279
- [h, L, q]
280
- ), Z = W(() => {
306
+ [m, O, ee]
307
+ ), te = U(() => {
281
308
  const e = /* @__PURE__ */ new Set();
282
309
  for (const t of n)
283
310
  t.disabled && e.add(t.value);
284
311
  return e;
285
- }, [n]), gt = x(
312
+ }, [n]), It = h(
286
313
  (e) => {
287
314
  e.stopPropagation();
288
- const t = h.filter((o) => Z.has(o));
289
- L(t);
315
+ const t = m.filter((o) => te.has(o));
316
+ O(t);
290
317
  },
291
- [L, h, Z]
292
- ), Ae = x(
318
+ [O, m, te]
319
+ ), $e = h(
293
320
  (e, t) => {
294
- t.stopPropagation(), !q(e) && L(h.filter((o) => o !== e));
321
+ t.stopPropagation(), !ee(e) && O(m.filter((o) => o !== e));
295
322
  },
296
- [h, L, q]
297
- ), J = x(
323
+ [m, O, ee]
324
+ ), re = h(
298
325
  (e) => {
299
- if (!tr.has(e.key)) return;
300
- if (e.preventDefault(), e.stopPropagation(), !l) {
301
- ae(!0);
326
+ if (!ur.has(e.key)) return;
327
+ if (e.preventDefault(), e.stopPropagation(), !a) {
328
+ de(!0);
302
329
  return;
303
330
  }
304
- const t = H.length;
305
- if (t === 0) return;
306
- const o = (p) => {
331
+ const t = $.length, o = t + (S ? 1 : 0);
332
+ if (o === 0) return;
333
+ const u = (R) => {
307
334
  requestAnimationFrame(() => {
308
- const a = Le.current[p], f = _e.current;
309
- if (!a || !f) return;
310
- const w = a.offsetTop, We = w + a.offsetHeight, $e = f.scrollTop, wt = $e + f.clientHeight;
311
- We > wt ? f.scrollTo({
312
- top: We - f.clientHeight,
335
+ const l = He.current[R], v = Ae.current;
336
+ if (!l || !v) return;
337
+ const E = l.offsetTop, Ke = E + l.offsetHeight, Fe = v.scrollTop, Lt = Fe + v.clientHeight;
338
+ Ke > Lt ? v.scrollTo({
339
+ top: Ke - v.clientHeight,
313
340
  behavior: "smooth"
314
- }) : w < $e && f.scrollTo({ top: w, behavior: "smooth" });
341
+ }) : E < Fe && v.scrollTo({ top: E, behavior: "smooth" });
315
342
  });
316
- }, u = (p) => {
317
- var f;
318
- let a = T;
319
- for (let w = 0; w < t; w++)
320
- if (a = p === 1 ? a < t - 1 ? a + 1 : 0 : a > 0 ? a - 1 : t - 1, !((f = H[a]) != null && f.disabled)) {
321
- o(a), P(a);
343
+ }, p = (R) => {
344
+ var v;
345
+ let l = F ? t : T;
346
+ for (let E = 0; E < o; E++) {
347
+ if (l = R === 1 ? l < o - 1 ? l + 1 : 0 : l > 0 ? l - 1 : o - 1, l === t) {
348
+ D(-1), P(!0);
349
+ return;
350
+ }
351
+ if (!((v = $[l]) != null && v.disabled)) {
352
+ u(l), P(!1), D(l);
322
353
  return;
323
354
  }
324
- }, g = () => {
325
- var f;
326
- if (T < 0 || T >= t || (f = H[T]) != null && f.disabled) return;
327
- const p = H[T].value;
328
- ue(p), Y();
329
- const a = n.findIndex((w) => w.value === p);
330
- P(a >= 0 ? a : -1), o(a >= 0 ? a : 0), requestAnimationFrame(() => {
331
- var w;
332
- return (w = K.current) == null ? void 0 : w.focus();
355
+ }
356
+ }, N = () => {
357
+ var v;
358
+ if (F) {
359
+ ge();
360
+ return;
361
+ }
362
+ if (T < 0 || T >= t || (v = $[T]) != null && v.disabled) return;
363
+ const R = $[T].value;
364
+ be(R), X();
365
+ const l = n.findIndex((E) => E.value === R);
366
+ D(l >= 0 ? l : -1), u(l >= 0 ? l : 0), requestAnimationFrame(() => {
367
+ var E;
368
+ return (E = j.current) == null ? void 0 : E.focus();
333
369
  });
334
370
  };
335
371
  switch (e.key) {
336
- case Xe:
337
- u(1);
372
+ case rt:
373
+ p(1);
338
374
  break;
339
- case qe:
340
- u(-1);
375
+ case nt:
376
+ p(-1);
341
377
  break;
342
- case Ze:
343
- g();
378
+ case ot:
379
+ N();
344
380
  break;
345
381
  }
346
382
  },
347
- [l, H, T, ue, n, Y]
348
- ), Me = x(
383
+ [
384
+ a,
385
+ $,
386
+ T,
387
+ be,
388
+ n,
389
+ X,
390
+ S,
391
+ F,
392
+ ge
393
+ ]
394
+ ), Be = h(
349
395
  (e) => {
350
- if (e.key === er && N === "" && h.length > 0) {
351
- e.preventDefault(), L(h.slice(0, -1)), requestAnimationFrame(() => {
396
+ if (e.key === dr && C === "" && m.length > 0) {
397
+ e.preventDefault(), O(m.slice(0, -1)), requestAnimationFrame(() => {
352
398
  var t;
353
- return (t = K.current) == null ? void 0 : t.focus();
399
+ return (t = j.current) == null ? void 0 : t.focus();
354
400
  });
355
401
  return;
356
402
  }
357
- J(e);
403
+ re(e);
358
404
  },
359
- [J, N, h, L]
360
- ), De = c.length > 0 && !d && !i, bt = Ht({
405
+ [re, C, m, O]
406
+ ), Ye = c.length > 0 && !d && !i, St = Gt({
361
407
  disabled: d,
362
- error: v,
363
- open: l,
408
+ error: x,
409
+ open: a,
364
410
  loading: i,
365
411
  hasSelection: c.length > 0
366
- }), fe = W(() => S ? /* @__PURE__ */ r(
412
+ }), xe = U(() => w ? /* @__PURE__ */ r(
367
413
  "input",
368
414
  {
369
- ref: K,
415
+ ref: j,
370
416
  type: "text",
371
- value: N,
372
- onChange: (e) => de(e.target.value),
373
- onKeyDown: Me,
417
+ value: C,
418
+ onChange: (e) => he(e.target.value),
419
+ onKeyDown: Be,
374
420
  disabled: d || i,
375
421
  placeholder: c.length === 0 ? b : "",
376
422
  className: "flex-1 w-full min-w-[40px] border-none outline-none bg-transparent text-[length:inherit] p-0 text-[var(--malachite-text-primary,rgb(10,10,10))]",
@@ -379,156 +425,156 @@ const Fe = 0.2, Ue = 420, rr = ({ option: n }) => {
379
425
  }
380
426
  }
381
427
  ) : null, [
382
- S,
383
- N,
384
- de,
385
- Me,
428
+ w,
429
+ C,
430
+ he,
431
+ Be,
386
432
  d,
387
433
  i,
388
434
  c.length,
389
435
  b
390
- ]), vt = W(() => {
391
- if (R && c.length > 0)
392
- return R(c);
393
- if (re && c.length > 0) {
394
- const e = ie != null ? c.slice(0, ie) : c, t = c.length - e.length;
395
- return /* @__PURE__ */ I(
436
+ ]), Tt = U(() => {
437
+ if (k && c.length > 0)
438
+ return k(c);
439
+ if (ae && c.length > 0) {
440
+ const e = pe != null ? c.slice(0, pe) : c, t = c.length - e.length;
441
+ return /* @__PURE__ */ g(
396
442
  "div",
397
443
  {
398
444
  className: "flex items-center gap-1 overflow-hidden min-w-0 flex-1",
399
445
  style: { flexWrap: "nowrap" },
400
446
  children: [
401
447
  e.map((o) => {
402
- const u = Z.has(o.value);
448
+ const u = te.has(o.value);
403
449
  return /* @__PURE__ */ r(
404
- Mt,
450
+ Bt,
405
451
  {
406
452
  value: o.label,
407
453
  type: "default",
408
454
  textTransform: "none",
409
- onRemove: ne && !d && !u ? (g) => Ae(o.value, g) : void 0,
455
+ onRemove: se && !d && !u ? (p) => $e(o.value, p) : void 0,
410
456
  className: "shrink-0"
411
457
  },
412
458
  o.value
413
459
  );
414
460
  }),
415
- t > 0 && /* @__PURE__ */ I("span", { className: "shrink-0 text-xs text-[var(--malachite-text-secondary,rgb(123,123,123))]", children: [
461
+ t > 0 && /* @__PURE__ */ g("span", { className: "shrink-0 text-xs text-[var(--malachite-text-secondary,rgb(123,123,123))]", children: [
416
462
  "+",
417
463
  t
418
464
  ] }),
419
- fe
465
+ xe
420
466
  ]
421
467
  }
422
468
  );
423
469
  }
424
- return S && c.length === 0 ? fe : c.length === 0 ? /* @__PURE__ */ r("span", { className: "text-[var(--malachite-text-placeholder)]", children: b }) : c.length === 1 ? /* @__PURE__ */ r("span", { children: c[0].label }) : /* @__PURE__ */ r("span", { children: `${c.length} selected` });
470
+ return w && c.length === 0 ? xe : c.length === 0 ? /* @__PURE__ */ r("span", { className: "text-[var(--malachite-text-placeholder)]", children: b }) : c.length === 1 ? /* @__PURE__ */ r("span", { children: c[0].label }) : /* @__PURE__ */ r("span", { children: `${c.length} selected` });
425
471
  }, [
426
472
  c,
427
- R,
428
- re,
429
- ie,
430
- ne,
473
+ k,
474
+ ae,
475
+ pe,
476
+ se,
431
477
  d,
432
- Ae,
433
- S,
434
- fe,
478
+ $e,
479
+ w,
480
+ xe,
435
481
  b,
436
- Z
437
- ]), xt = n.length === 0 ? "No options available" : "No results found";
438
- Et(() => {
439
- l && zt();
440
- }, [l]);
441
- const yt = {
482
+ te
483
+ ]), _t = n.length === 0 ? "No options available" : "No results found";
484
+ Nt(() => {
485
+ a && Xt();
486
+ }, [a]);
487
+ const kt = {
442
488
  position: "fixed",
443
- top: (m == null ? void 0 : m.top) ?? 0,
444
- left: (m == null ? void 0 : m.left) ?? 0,
445
- width: m == null ? void 0 : m.width,
446
- background: F.standard.background,
447
- border: F.standard.border,
448
- borderRadius: F.standard.radius,
449
- boxShadow: F.standard.shadow,
450
- padding: F.standard.padding,
489
+ top: (f == null ? void 0 : f.top) ?? 0,
490
+ left: (f == null ? void 0 : f.left) ?? 0,
491
+ width: f == null ? void 0 : f.width,
492
+ background: q.standard.background,
493
+ border: q.standard.border,
494
+ borderRadius: q.standard.radius,
495
+ boxShadow: q.standard.shadow,
496
+ padding: q.standard.padding,
451
497
  display: "flex",
452
498
  flexDirection: "column",
453
499
  gap: 4,
454
- maxHeight: (m == null ? void 0 : m.maxHeight) ?? $t,
455
- fontSize: Dt[O],
456
- visibility: m ? "visible" : "hidden",
457
- opacity: m ? 1 : 0
458
- }, He = !!(Q || ge || ee || be || he || ve || te), Ce = He && !!j, Pe = /* @__PURE__ */ I(je, { children: [
459
- /* @__PURE__ */ I(
500
+ maxHeight: (f == null ? void 0 : f.maxHeight) ?? Ft,
501
+ fontSize: Yt[M],
502
+ visibility: f ? "visible" : "hidden",
503
+ opacity: f ? 1 : 0
504
+ }, Ge = !!(ne || Ie || oe || Se || Ee || Te || le), Ue = Ge && !!J, ze = /* @__PURE__ */ g(ye, { children: [
505
+ /* @__PURE__ */ g(
460
506
  "div",
461
507
  {
462
- ref: le,
508
+ ref: ue,
463
509
  className: "relative",
464
- style: Ye(_),
510
+ style: Ze(L),
465
511
  onBlur: (e) => {
466
512
  var o;
467
513
  const t = e.relatedTarget;
468
- t && ((o = le.current) != null && o.contains(t)) || queueMicrotask(() => {
469
- var u, g;
470
- t && ((u = A.current) != null && u.contains(t)) || (g = D.current) == null || g.call(D);
514
+ t && ((o = ue.current) != null && o.contains(t)) || queueMicrotask(() => {
515
+ var u, p;
516
+ t && ((u = A.current) != null && u.contains(t)) || (p = W.current) == null || p.call(W);
471
517
  });
472
518
  },
473
519
  children: [
474
- /* @__PURE__ */ I(
475
- Je,
520
+ /* @__PURE__ */ g(
521
+ lt,
476
522
  {
477
- ref: z,
478
- id: Te,
479
- triggerRole: S ? "combobox" : re && ne ? "group" : "button",
523
+ ref: V,
524
+ id: Me,
525
+ triggerRole: w ? "combobox" : ae && se ? "group" : "button",
480
526
  disabled: d || i,
481
- [Ct]: "",
482
- "data-open": l || void 0,
527
+ [Ut]: "",
528
+ "data-open": a || void 0,
483
529
  "aria-haspopup": "listbox",
484
- "aria-expanded": l,
485
- "aria-controls": l ? Ee : void 0,
486
- "aria-activedescendant": S && l && T >= 0 ? Se(T) : void 0,
487
- "aria-labelledby": at ?? (Ce && !we ? ke : void 0),
488
- "aria-label": we ?? (Ce ? void 0 : j),
489
- "aria-invalid": v || void 0,
490
- "aria-required": te || void 0,
491
- "aria-describedby": [dt, lt].filter(Boolean).join(" ") || void 0,
530
+ "aria-expanded": a,
531
+ "aria-controls": a ? Oe : void 0,
532
+ "aria-activedescendant": w && a && F ? Re : w && a && T >= 0 ? Ne(T) : void 0,
533
+ "aria-labelledby": ft ?? (Ue && !Le ? Ce : void 0),
534
+ "aria-label": Le ?? (Ue ? void 0 : J),
535
+ "aria-invalid": x || void 0,
536
+ "aria-required": le || void 0,
537
+ "aria-describedby": [bt, pt].filter(Boolean).join(" ") || void 0,
492
538
  "aria-busy": i || void 0,
493
539
  onClick: () => {
494
- d || i || ae((e) => !e);
540
+ d || i || de((e) => !e);
495
541
  },
496
- onKeyDown: J,
542
+ onKeyDown: re,
497
543
  style: {
498
544
  transition: "border-color 0.15s ease, box-shadow 0.15s ease",
499
- ...bt,
500
- ...nt
545
+ ...St,
546
+ ...dt
501
547
  },
502
- className: `w-full ${Jt[O]} border border-solid flex items-center font-normal text-[var(--malachite-text-primary)] ${d || i ? "cursor-not-allowed" : "cursor-pointer"} ${Bt} ${rt}`,
548
+ className: `w-full ${ir[M]} border border-solid flex items-center font-normal text-[var(--malachite-text-primary)] ${d || i ? "cursor-not-allowed" : "cursor-pointer"} ${Vt} ${ct}`,
503
549
  children: [
504
550
  /* @__PURE__ */ r(
505
551
  "span",
506
552
  {
507
- className: `flex-1 min-w-0 text-left ${S ? "flex" : "truncate"} ${De ? "pr-[18px]" : ""}`,
508
- children: vt
553
+ className: `flex-1 min-w-0 text-left ${w ? "flex" : "truncate"} ${Ye ? "pr-[18px]" : ""}`,
554
+ children: Tt
509
555
  }
510
556
  ),
511
- i ? /* @__PURE__ */ r("span", { className: "flex items-center justify-center shrink-0 size-[14px]", children: /* @__PURE__ */ r(At, { size: "xxxsmall" }) }) : /* @__PURE__ */ r(
512
- Rt,
557
+ i ? /* @__PURE__ */ r("span", { className: "flex items-center justify-center shrink-0 size-[14px]", children: /* @__PURE__ */ r($t, { size: "xxxsmall" }) }) : /* @__PURE__ */ r(
558
+ Dt,
513
559
  {
514
560
  size: 13,
515
561
  className: "shrink-0",
516
562
  style: {
517
- color: l ? "var(--malachite-text-primary, rgb(10, 10, 10))" : "var(--malachite-text-placeholder, rgb(187, 187, 187))",
563
+ color: a ? "var(--malachite-text-primary, rgb(10, 10, 10))" : "var(--malachite-text-placeholder, rgb(187, 187, 187))",
518
564
  transition: "transform 0.2s ease, color 0.2s ease",
519
- transform: l ? "rotate(180deg)" : "rotate(0deg)"
565
+ transform: a ? "rotate(180deg)" : "rotate(0deg)"
520
566
  }
521
567
  }
522
568
  )
523
569
  ]
524
570
  }
525
571
  ),
526
- De && /* @__PURE__ */ r(
572
+ Ye && /* @__PURE__ */ r(
527
573
  "button",
528
574
  {
529
575
  type: "button",
530
576
  "aria-label": "Clear selection",
531
- onClick: gt,
577
+ onClick: It,
532
578
  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",
533
579
  children: "×"
534
580
  }
@@ -536,18 +582,18 @@ const Fe = 0.2, Ue = 420, rr = ({ option: n }) => {
536
582
  ]
537
583
  }
538
584
  ),
539
- l && St(
540
- /* @__PURE__ */ I(
585
+ a && Rt(
586
+ /* @__PURE__ */ g(
541
587
  "div",
542
588
  {
543
589
  ref: A,
544
- id: Ee,
590
+ id: Oe,
545
591
  role: "listbox",
546
592
  "aria-multiselectable": "true",
547
- ...pt,
548
- style: yt,
593
+ ...wt,
594
+ style: kt,
549
595
  children: [
550
- Ne && /* @__PURE__ */ I(
596
+ We && /* @__PURE__ */ g(
551
597
  "div",
552
598
  {
553
599
  style: {
@@ -562,7 +608,7 @@ const Fe = 0.2, Ue = 420, rr = ({ option: n }) => {
562
608
  },
563
609
  children: [
564
610
  /* @__PURE__ */ r(
565
- Lt,
611
+ Ht,
566
612
  {
567
613
  size: 13,
568
614
  style: {
@@ -575,9 +621,9 @@ const Fe = 0.2, Ue = 420, rr = ({ option: n }) => {
575
621
  "input",
576
622
  {
577
623
  type: "text",
578
- value: N,
579
- onChange: (e) => de(e.target.value),
580
- onKeyDown: J,
624
+ value: C,
625
+ onChange: (e) => he(e.target.value),
626
+ onKeyDown: re,
581
627
  placeholder: "Search",
582
628
  "aria-label": "Search options",
583
629
  autoFocus: !0,
@@ -595,22 +641,11 @@ const Fe = 0.2, Ue = 420, rr = ({ option: n }) => {
595
641
  ]
596
642
  }
597
643
  ),
598
- Ne && /* @__PURE__ */ r(
599
- "div",
600
- {
601
- "aria-hidden": "true",
602
- style: {
603
- height: 1,
604
- width: "100%",
605
- background: "var(--malachite-card-border, rgb(232, 232, 232))",
606
- flexShrink: 0
607
- }
608
- }
609
- ),
644
+ We && /* @__PURE__ */ r("div", { "aria-hidden": "true", style: Je }),
610
645
  /* @__PURE__ */ r(
611
646
  "div",
612
647
  {
613
- ref: _e,
648
+ ref: Ae,
614
649
  style: {
615
650
  display: "flex",
616
651
  flexDirection: "column",
@@ -622,34 +657,36 @@ const Fe = 0.2, Ue = 420, rr = ({ option: n }) => {
622
657
  scrollbarWidth: "thin",
623
658
  scrollbarColor: "var(--malachite-text-placeholder, rgb(187, 187, 187)) transparent"
624
659
  },
625
- children: H.length === 0 ? (
660
+ children: $.length === 0 ? (
626
661
  // `role="listbox"` admits only option/group children.
627
- /* @__PURE__ */ r("div", { role: "presentation", style: Zt, children: xt })
628
- ) : H.map((e, t) => {
629
- const o = se.has(e.value), u = t === T, g = !!e.disabled;
630
- return /* @__PURE__ */ I(
662
+ /* @__PURE__ */ r("div", { role: "presentation", style: or, children: _t })
663
+ ) : $.map((e, t) => {
664
+ const o = fe.has(e.value), u = t === T, p = !!e.disabled;
665
+ return /* @__PURE__ */ g(
631
666
  "button",
632
667
  {
633
- id: Se(t),
634
- ref: (p) => {
635
- Le.current[t] = p;
668
+ id: Ne(t),
669
+ ref: (N) => {
670
+ He.current[t] = N;
636
671
  },
637
672
  type: "button",
638
673
  role: "option",
639
674
  "aria-selected": o,
640
- "aria-disabled": g || void 0,
675
+ "aria-disabled": p || void 0,
641
676
  onClick: () => {
642
- var p;
643
- ue(e.value), Y(), (p = K.current) == null || p.focus();
677
+ var N;
678
+ be(e.value), X(), (N = j.current) == null || N.focus();
679
+ },
680
+ onMouseEnter: () => {
681
+ P(!1), D(t);
644
682
  },
645
- onMouseEnter: () => P(t),
646
683
  onMouseLeave: () => {
647
- T === t && P(-1);
684
+ T === t && D(-1);
648
685
  },
649
686
  className: "malachite-multiselect-option",
650
687
  "data-checked": o,
651
688
  "data-highlighted": u,
652
- "data-disabled": g,
689
+ "data-disabled": p,
653
690
  style: {
654
691
  display: "flex",
655
692
  alignItems: "center",
@@ -658,16 +695,16 @@ const Fe = 0.2, Ue = 420, rr = ({ option: n }) => {
658
695
  flexShrink: 0,
659
696
  border: "none",
660
697
  textAlign: "left",
661
- borderRadius: 8,
698
+ borderRadius: "var(--malachite-radius-lg, 8px)",
662
699
  padding: "8px 10px",
663
700
  font: "inherit",
664
- cursor: g ? "not-allowed" : "pointer",
665
- opacity: g ? 0.6 : 1,
701
+ cursor: p ? "not-allowed" : "pointer",
702
+ opacity: p ? 0.6 : 1,
666
703
  color: o ? "var(--malachite-accent-foreground, rgb(2, 122, 66))" : "var(--malachite-text-primary, rgb(10, 10, 10))"
667
704
  },
668
705
  children: [
669
- /* @__PURE__ */ r(rr, { option: e }),
670
- Gt(e.badge) && /* @__PURE__ */ r(
706
+ /* @__PURE__ */ r(fr, { option: e }),
707
+ jt(e.badge) && /* @__PURE__ */ r(
671
708
  "span",
672
709
  {
673
710
  style: {
@@ -675,7 +712,7 @@ const Fe = 0.2, Ue = 420, rr = ({ option: n }) => {
675
712
  flexShrink: 0,
676
713
  paddingLeft: 8
677
714
  },
678
- children: /* @__PURE__ */ r(pe.Suspense, { fallback: null, children: /* @__PURE__ */ r(qt, { children: e.badge }) })
715
+ children: /* @__PURE__ */ r(we.Suspense, { fallback: null, children: /* @__PURE__ */ r(nr, { children: e.badge }) })
679
716
  }
680
717
  )
681
718
  ]
@@ -684,65 +721,89 @@ const Fe = 0.2, Ue = 420, rr = ({ option: n }) => {
684
721
  );
685
722
  })
686
723
  }
687
- )
724
+ ),
725
+ S && /* @__PURE__ */ g(ye, { children: [
726
+ /* @__PURE__ */ r("div", { "aria-hidden": "true", style: Je }),
727
+ /* @__PURE__ */ g(
728
+ "button",
729
+ {
730
+ id: Re,
731
+ type: "button",
732
+ role: "option",
733
+ "aria-selected": !1,
734
+ onClick: ge,
735
+ onMouseEnter: () => {
736
+ D(-1), P(!0);
737
+ },
738
+ onMouseLeave: () => P(!1),
739
+ className: "malachite-multiselect-option",
740
+ "data-highlighted": F,
741
+ style: lr,
742
+ children: [
743
+ /* @__PURE__ */ r("span", { style: ar, children: S.label }),
744
+ S.icon && /* @__PURE__ */ r("span", { "aria-hidden": "true", style: sr, children: S.icon })
745
+ ]
746
+ }
747
+ )
748
+ ] })
688
749
  ]
689
750
  }
690
751
  ),
691
752
  document.body
692
753
  )
693
754
  ] });
694
- return He ? /* @__PURE__ */ r(
695
- Tt,
755
+ return Ge ? /* @__PURE__ */ r(
756
+ Mt,
696
757
  {
697
- label: j,
698
- hint: ee,
699
- hintIcon: et,
700
- rightSideContent: be,
701
- tooltip: ge,
702
- name: he ?? "",
703
- required: te,
704
- requiredIndicator: tt,
758
+ label: J,
759
+ hint: oe,
760
+ hintIcon: st,
761
+ rightSideContent: Se,
762
+ tooltip: Ie,
763
+ name: Ee ?? "",
764
+ required: le,
765
+ requiredIndicator: it,
705
766
  loading: i,
706
- formControl: ve,
707
- description: Q,
708
- controlId: Te,
709
- labelId: ke,
710
- descriptionId: it,
711
- hintId: ct,
712
- loadingComponent: _ === void 0 ? /* @__PURE__ */ r(Ge, { heightClass: U[O] }) : /* @__PURE__ */ r("div", { style: Ye(_), children: /* @__PURE__ */ r(Ge, { heightClass: U[O] }) }),
713
- children: Pe
767
+ formControl: Te,
768
+ description: ne,
769
+ controlId: Me,
770
+ labelId: Ce,
771
+ descriptionId: ht,
772
+ hintId: gt,
773
+ loadingComponent: L === void 0 ? /* @__PURE__ */ r(je, { heightClass: Z[M] }) : /* @__PURE__ */ r("div", { style: Ze(L), children: /* @__PURE__ */ r(je, { heightClass: Z[M] }) }),
774
+ children: ze
714
775
  }
715
- ) : Pe;
716
- }, nr = ({
776
+ ) : ze;
777
+ }, pr = ({
717
778
  formControl: n,
718
779
  name: y,
719
- error: E,
780
+ error: I,
720
781
  onChange: s,
721
782
  ...b
722
783
  }) => {
723
- const R = `${Ve()}-error`;
724
- return /* @__PURE__ */ r(Nt, { control: n, name: y, children: ({ error: B, message: O, onFieldChange: _, onFieldBlur: M, value: d }) => {
725
- const v = E === !1 ? void 0 : O;
726
- return /* @__PURE__ */ I(je, { children: [
784
+ const k = `${tt()}-error`;
785
+ return /* @__PURE__ */ r(Wt, { control: n, name: y, children: ({ error: z, message: M, onFieldChange: L, onFieldBlur: H, value: d }) => {
786
+ const x = I === !1 ? void 0 : M;
787
+ return /* @__PURE__ */ g(ye, { children: [
727
788
  /* @__PURE__ */ r(
728
- Qe,
789
+ at,
729
790
  {
730
791
  ...b,
731
792
  name: y,
732
793
  value: Array.isArray(d) ? d : [],
733
- error: E ?? B,
734
- errorMessageId: v ? R : void 0,
735
- onFieldLeave: M,
794
+ error: I ?? z,
795
+ errorMessageId: x ? k : void 0,
796
+ onFieldLeave: H,
736
797
  onChange: (i) => {
737
- _ == null || _(i), s == null || s(i);
798
+ L == null || L(i), s == null || s(i);
738
799
  }
739
800
  }
740
801
  ),
741
- /* @__PURE__ */ r(Ot, { id: R, message: v, spaced: !0 })
802
+ /* @__PURE__ */ r(Pt, { id: k, message: x, spaced: !0 })
742
803
  ] });
743
804
  } });
744
- }, Nr = (n) => n.formControl ? /* @__PURE__ */ r(nr, { ...n }) : /* @__PURE__ */ r(Qe, { ...n });
805
+ }, Yr = (n) => n.formControl ? /* @__PURE__ */ r(pr, { ...n }) : /* @__PURE__ */ r(at, { ...n });
745
806
  export {
746
- Nr as default
807
+ Yr as default
747
808
  };
748
809
  //# sourceMappingURL=MultiSelect.js.map