asma-ui-core 3.74.0 → 3.74.1

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.
@@ -6,20 +6,20 @@ import { StyledChip as B } from "../../../data-display/chip/StyledChip.js";
6
6
  import { StyledCheckbox as te } from "../../checkbox/base-ui/StyledCheckbox.js";
7
7
  import { StyledTooltip as L } from "../../../data-display/tooltip/StyledTooltip.js";
8
8
  import { StyledInputField as le } from "../../input-field/StyledInputField.js";
9
- import { StyledSelectAutocomplete as ae } from "../../select-autocomplete/StyledSelectAutocomplete.js";
10
- import { DynamicInteractiveChipGroup as re } from "./DynamicInteractiveChipGroup.js";
11
- import { createElement as q, forwardRef as oe, useCallback as b, useState as ne } from "react";
9
+ import { StyledSelectAutocomplete as re } from "../../select-autocomplete/StyledSelectAutocomplete.js";
10
+ import { DynamicInteractiveChipGroup as ae } from "./DynamicInteractiveChipGroup.js";
11
+ import { createElement as q, forwardRef as oe, useCallback as f, useState as ne } from "react";
12
12
  import { Fragment as E, jsx as l, jsxs as O } from "react/jsx-runtime";
13
- var ye = oe((S, F) => {
14
- const [z, k] = ne(!1), { options: f, dataTest: g, value: x, readOnly: u, multiple: o, required: H, onChange: y, size: K, title: v, noOptionsText: _, placeholder: R, disabled: I, helperText: G, disableHelperText: A, error: N, valueKey: P = "value", labelKey: W = "label", renderLabel: i, getOptionTooltip: V, startAdornment: J, autocompleteProps: n, loading: m, maxTags: M, onFocus: Q, onBlur: U } = S, C = f.length < 11, s = (e) => typeof e == "object" ? e?.[W]?.toString() ?? "" : e?.toString() ?? "", p = b((e) => typeof e == "object" ? e?.[P] : e, [P]), D = b((e, t) => p(e) === p(t), [p]), w = (e) => {
15
- const t = p(e);
13
+ var ye = oe((k, F) => {
14
+ const [z, S] = ne(!1), { options: h, dataTest: g, value: x, readOnly: u, multiple: o, required: H, onChange: y, size: K, title: v, noOptionsText: _, placeholder: R, disabled: I, helperText: G, disableHelperText: A, error: N, valueKey: P = "value", labelKey: W = "label", renderLabel: i, getOptionTooltip: V, startAdornment: J, autocompleteProps: n, loading: m, maxTags: M, onFocus: Q, onBlur: U } = k, w = h.length < 11, s = (e) => typeof e == "object" ? e?.[W]?.toString() ?? "" : e?.toString() ?? "", b = f((e) => typeof e == "object" ? e?.[P] : e, [P]), D = f((e, t) => b(e) === b(t), [b]), C = (e) => {
15
+ const t = b(e);
16
16
  return t == null ? "" : typeof t == "string" || typeof t == "number" || typeof t == "boolean" ? String(t) : e == null ? "" : s(e);
17
- }, $ = b((e) => {
18
- k(!0), n?.onOpen?.(e);
19
- }, [n]), X = b((e, t) => {
20
- k(!1), n?.onClose?.(e, t);
17
+ }, $ = f((e) => {
18
+ S(!0), n?.onOpen?.(e);
19
+ }, [n]), X = f((e, t) => {
20
+ S(!1), n?.onClose?.(e, t);
21
21
  }, [n]);
22
- if (o && u) return /* @__PURE__ */ l(re, { ...S });
22
+ if (o && u) return /* @__PURE__ */ l(ae, { ...k });
23
23
  const T = v ? `${g}-title` : void 0;
24
24
  return /* @__PURE__ */ O("div", {
25
25
  className: "flex w-full flex-col gap-y-1",
@@ -27,7 +27,7 @@ var ye = oe((S, F) => {
27
27
  id: T,
28
28
  className: "text-base font-semibold text-delta-800",
29
29
  children: v
30
- }), /* @__PURE__ */ l(ae, {
30
+ }), /* @__PURE__ */ l(re, {
31
31
  open: z,
32
32
  onOpen: $,
33
33
  onClose: X,
@@ -40,7 +40,7 @@ var ye = oe((S, F) => {
40
40
  value: x,
41
41
  size: K,
42
42
  disableClearable: H,
43
- options: f,
43
+ options: h,
44
44
  fullWidth: !0,
45
45
  classes: { listbox: "max-h-[300px]" },
46
46
  getOptionLabel: n?.getOptionLabel ?? s,
@@ -53,21 +53,21 @@ var ye = oe((S, F) => {
53
53
  multiple: o,
54
54
  renderValue: o ? (e) => {
55
55
  if (!Array.isArray(e)) return null;
56
- const t = e, d = M ?? f.length, a = t.slice(0, d), c = t.length - d;
57
- return [...a.map((r) => /* @__PURE__ */ l(B, {
58
- dataTest: `${w(r)}-chip`,
56
+ const t = e, d = M ?? h.length, r = t.slice(0, d), c = t.length - d;
57
+ return [...r.map((a) => /* @__PURE__ */ l(B, {
58
+ dataTest: `${C(a)}-chip`,
59
59
  readOnly: u,
60
60
  variant: "outlined",
61
- label: i ? i(r) : s(r),
61
+ label: i ? i(a) : s(a),
62
62
  classes: {
63
63
  root: "h-fit w-fit min-h-[32px]",
64
64
  label: "block whitespace-normal"
65
65
  },
66
66
  disabled: !!I || !!m,
67
67
  onDelete: () => {
68
- Array.isArray(x) && y(x.filter((h) => !D(h, r)));
68
+ Array.isArray(x) && y(x.filter((p) => !D(p, a)));
69
69
  }
70
- }, w(r))), c > 0 ? /* @__PURE__ */ l(B, {
70
+ }, C(a))), c > 0 ? /* @__PURE__ */ l(B, {
71
71
  dataTest: "remaining-count-tag-chip",
72
72
  label: `+${c}`,
73
73
  variant: "outlined",
@@ -82,54 +82,54 @@ var ye = oe((S, F) => {
82
82
  width: 24
83
83
  }) : void 0,
84
84
  renderOption: (e, t, d) => {
85
- const a = typeof t == "object" ? !!t?.disabled : !1, c = V ? V(t) : null;
85
+ const r = typeof t == "object" ? !!t?.disabled : !1, c = V ? V(t) : null;
86
86
  if (o) {
87
- const h = d.selected;
87
+ const p = d.selected;
88
88
  return /* @__PURE__ */ q("li", {
89
89
  ...e,
90
90
  role: "option",
91
- "aria-selected": h,
91
+ "aria-selected": p,
92
92
  key: e.id,
93
- onClick: a ? void 0 : e.onClick,
94
- className: j("flex min-h-10 cursor-pointer items-center gap-x-1 bg-white px-2 text-base aria-selected:bg-gama-50 hover:bg-gama-50", a && "cursor-not-allowed bg-delta-50 aria-selected:!bg-delta-50 hover:!bg-delta-50 [&_*]:cursor-not-allowed"),
95
- "aria-disabled": a
93
+ onClick: r ? void 0 : e.onClick,
94
+ className: j("flex min-h-10 cursor-pointer items-center gap-x-1 bg-white px-2 text-base aria-selected:bg-gama-50 hover:bg-gama-50", "border-0 border-b border-solid border-delta-200 last:border-b-0", r && "cursor-not-allowed bg-delta-50 aria-selected:!bg-delta-50 hover:!bg-delta-50 [&_*]:cursor-not-allowed"),
95
+ "aria-disabled": r
96
96
  }, /* @__PURE__ */ l(L, {
97
97
  arrow: !0,
98
98
  title: c,
99
99
  children: /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ l(te, {
100
- disabled: a,
101
- dataTest: `${w(t)}-checkbox`,
100
+ disabled: r,
101
+ dataTest: `${C(t)}-checkbox`,
102
102
  size: "small",
103
103
  decorative: !0,
104
104
  className: "min-w-[36px]",
105
- checked: h
105
+ checked: p
106
106
  }), i ? i(t) : /* @__PURE__ */ l("span", {
107
- className: "h-fit text-base text-delta-800",
107
+ className: "line-clamp-2 h-fit min-w-0 flex-1 break-words text-base text-delta-800",
108
108
  children: s(t)
109
109
  })] })
110
110
  }));
111
111
  }
112
- const r = d.selected;
112
+ const a = d.selected;
113
113
  return /* @__PURE__ */ q("li", {
114
114
  ...e,
115
115
  role: "option",
116
- "aria-selected": r,
116
+ "aria-selected": a,
117
117
  key: e.id,
118
- className: j("flex min-h-10 cursor-pointer items-center gap-x-1 px-2 text-base aria-selected:bg-gama-50 hover:bg-gama-50", a && "cursor-not-allowed bg-delta-50 aria-selected:!bg-delta-50 hover:!bg-delta-50 [&_*]:cursor-not-allowed"),
119
- onClick: a ? void 0 : e.onClick,
120
- "aria-disabled": a
118
+ className: j("flex min-h-10 cursor-pointer items-center gap-x-1 px-2 text-base aria-selected:bg-gama-50 hover:bg-gama-50", "border-0 border-b border-solid border-delta-200 last:border-b-0", r && "cursor-not-allowed bg-delta-50 aria-selected:!bg-delta-50 hover:!bg-delta-50 [&_*]:cursor-not-allowed"),
119
+ onClick: r ? void 0 : e.onClick,
120
+ "aria-disabled": r
121
121
  }, /* @__PURE__ */ l(L, {
122
122
  arrow: !0,
123
123
  title: c,
124
124
  children: /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ l("span", {
125
125
  className: "w-5 min-w-5",
126
- children: r && /* @__PURE__ */ l(Z, {
126
+ children: a && /* @__PURE__ */ l(Z, {
127
127
  className: "size-5 min-h-5 min-w-5 text-gama-500",
128
128
  height: 20,
129
129
  width: 20
130
130
  })
131
131
  }), i ? i(t) : /* @__PURE__ */ l("span", {
132
- className: "text-base text-delta-800",
132
+ className: "line-clamp-2 min-w-0 flex-1 break-words text-base text-delta-800",
133
133
  children: s(t)
134
134
  })] })
135
135
  }));
@@ -147,19 +147,19 @@ var ye = oe((S, F) => {
147
147
  readOnly: u,
148
148
  onFocus: Q,
149
149
  onBlur: U,
150
- onKeyDown: C ? (t) => t.preventDefault() : void 0,
150
+ onKeyDown: w ? (t) => t.preventDefault() : void 0,
151
151
  autoComplete: "off",
152
152
  slotProps: {
153
153
  ...e.slotProps,
154
154
  input: {
155
155
  ...e.slotProps?.input ?? {},
156
156
  startAdornment: J ?? e.slotProps?.input?.startAdornment,
157
- style: C ? { caretColor: "transparent" } : {}
157
+ style: w ? { caretColor: "transparent" } : {}
158
158
  },
159
159
  htmlInput: {
160
160
  ...e.slotProps?.htmlInput ?? {},
161
161
  ...T ? { "aria-labelledby": T } : {},
162
- style: C ? { caretColor: "transparent" } : {}
162
+ style: w ? { caretColor: "transparent" } : {}
163
163
  }
164
164
  }
165
165
  }),
@@ -171,7 +171,7 @@ var gt = ({ dataTest: H, value: I, defaultValue: J, onChange: L, error: Q, error
171
171
  },
172
172
  ...he(),
173
173
  onKeyDown: De,
174
- className: p("z-[1300] m-0 max-h-72 list-none overflow-auto rounded-lg border border-solid border-delta-300 bg-white px-0 py-1 shadow-[0px_2px_4px_0px_rgba(34,33,51,0.15)]", ae?.className),
174
+ className: p("z-[1300] m-0 max-h-72 list-none overflow-auto rounded-lg border border-solid border-delta-300 bg-white px-0 py-2 shadow-[0px_2px_4px_0px_rgba(34,33,51,0.15)]", ae?.className),
175
175
  children: ve
176
176
  })
177
177
  }),
@@ -1,23 +1,23 @@
1
- import { cn as l } from "../../../helpers/cn.js";
2
- import { CheckIcon as n } from "../../icons/check-icon/CheckIcon.js";
3
- import { jsx as a, jsxs as s } from "react/jsx-runtime";
4
- var p = ({ children: r, selected: e, disabled: t, className: o, onClick: i }) => /* @__PURE__ */ s("li", {
1
+ import { cn as i } from "../../../helpers/cn.js";
2
+ import { CheckIcon as s } from "../../icons/check-icon/CheckIcon.js";
3
+ import { jsx as t, jsxs as n } from "react/jsx-runtime";
4
+ var p = ({ children: o, selected: e, disabled: r, className: a, onClick: l }) => /* @__PURE__ */ n("li", {
5
5
  role: "option",
6
6
  "aria-selected": e ? !0 : void 0,
7
- "aria-disabled": t ? !0 : void 0,
7
+ "aria-disabled": r ? !0 : void 0,
8
8
  tabIndex: -1,
9
- onClick: t ? void 0 : i,
10
- className: l("flex items-center gap-1 px-2 py-2.5 text-base outline-none", t ? "cursor-not-allowed text-delta-300" : "cursor-pointer text-delta-800 hover:bg-delta-50", e && "bg-gama-50", o),
11
- children: [/* @__PURE__ */ a("span", {
9
+ onClick: r ? void 0 : l,
10
+ className: i("flex items-center gap-1 px-2 py-2.5 text-base outline-none", "border-0 border-b border-solid border-delta-200 last:border-b-0", r ? "cursor-not-allowed text-delta-300" : "cursor-pointer text-delta-800 hover:bg-delta-50", e && "bg-gama-50", a),
11
+ children: [/* @__PURE__ */ t("span", {
12
12
  className: "flex w-6 justify-center",
13
- children: e && /* @__PURE__ */ a(n, {
13
+ children: e && /* @__PURE__ */ t(s, {
14
14
  width: 22,
15
15
  height: 22,
16
16
  className: "text-gama-500"
17
17
  })
18
- }), /* @__PURE__ */ a("span", {
19
- className: "min-w-0 flex-1 truncate",
20
- children: r
18
+ }), /* @__PURE__ */ t("span", {
19
+ className: "line-clamp-2 min-w-0 flex-1 break-words",
20
+ children: o
21
21
  })]
22
22
  });
23
23
  export {
@@ -1,4 +1,4 @@
1
- import { cn as L } from "../../../helpers/cn.js";
1
+ import { cn as k } from "../../../helpers/cn.js";
2
2
  import { ChevronDownIcon as Oe } from "../../icons/chevron-down-icon/ChevronDownIcon.js";
3
3
  import { CloseIcon as Be } from "../../icons/close-icon/CloseIcon.js";
4
4
  import { CheckIcon as qe } from "../../icons/check-icon/CheckIcon.js";
@@ -8,17 +8,17 @@ import { StyledCheckbox as Q } from "../checkbox/base-ui/StyledCheckbox.js";
8
8
  import { TOP_LAYER_PROPS as Qe, TOP_LAYER_RESET_STYLE as Xe, getOpenModalDialogAncestor as Ze, shouldUsePopoverTopLayer as Ke, useTopLayerRef as et } from "../../../hooks/useTopLayer.hook.js";
9
9
  import { LoadingIcon as tt } from "../../../table/shared-components/LoadingIcon.js";
10
10
  import _ from "./StyledSelectAutocomplete.module.js";
11
- import { useEffect as rt, useMemo as E, useRef as X, useState as w } from "react";
11
+ import { useEffect as lt, useMemo as E, useRef as X, useState as w } from "react";
12
12
  import { jsx as s, jsxs as y } from "react/jsx-runtime";
13
- import { FloatingPortal as lt, autoUpdate as st, flip as ot, offset as at, shift as nt, size as ct, useDismiss as it, useFloating as dt, useInteractions as ut, useMergeRefs as Z, useRole as pt } from "@floating-ui/react";
14
- var mt = (l) => typeof l == "object" && l !== null && "label" in l ? String(l.label) : String(l), K = (l) => typeof l == "object" && l !== null && "disabled" in l && !!l.disabled;
15
- function Pt({ dataTest: l, options: p, renderInput: ee, value: v, onChange: N, getOptionLabel: te, getOptionKey: R, isOptionEqualToValue: j, renderOption: z, renderValue: F, filterOptions: $, loading: W, loadingText: re = "Loading…", noOptionsText: le = "No options", disabled: D, readOnly: m, error: se, helperText: oe, size: ae = "small", disableClearable: ne, disableCloseOnSelect: ce, popupIcon: ie, autoHeight: de, multiple: ue, allowSelectAll: pe, selectAllLabel: U = "Select all", fullWidth: me, classes: fe, inputValue: S, onInputChange: he, open: T, onOpen: ge, onClose: be, className: xe, wrapperClassName: we, getOptionDisabled: ye, slotProps: V }) {
13
+ import { FloatingPortal as rt, autoUpdate as st, flip as ot, offset as at, shift as nt, size as ct, useDismiss as it, useFloating as dt, useInteractions as ut, useMergeRefs as Z, useRole as pt } from "@floating-ui/react";
14
+ var mt = (r) => typeof r == "object" && r !== null && "label" in r ? String(r.label) : String(r), K = (r) => typeof r == "object" && r !== null && "disabled" in r && !!r.disabled;
15
+ function Pt({ dataTest: r, options: p, renderInput: ee, value: v, onChange: N, getOptionLabel: te, getOptionKey: R, isOptionEqualToValue: j, renderOption: z, renderValue: F, filterOptions: L, loading: W, loadingText: le = "Loading…", noOptionsText: re = "No options", disabled: D, readOnly: m, error: se, helperText: oe, size: ae = "small", disableClearable: ne, disableCloseOnSelect: ce, popupIcon: ie, autoHeight: de, multiple: ue, allowSelectAll: pe, selectAllLabel: U = "Select all", fullWidth: me, classes: fe, inputValue: S, onInputChange: he, open: T, onOpen: ge, onClose: be, className: xe, wrapperClassName: we, getOptionDisabled: ye, slotProps: V }) {
16
16
  const o = ue === !0, n = te ?? mt, C = (e, t) => j ? j(e, t) : e === t, [ve, Ne] = w(!1), a = T ?? ve, f = (e) => {
17
17
  e && (m || D) || (T === void 0 && Ne(e), e ? ge?.() : be?.());
18
- }, [Re, H] = w(""), h = S ?? Re, P = (e, t, r) => {
19
- S === void 0 && H(t), he?.(e, t, r);
20
- }, [b, k] = w(null), De = X([]), Y = X(null), [Se, Ce] = w(null), [Pe, Ae] = w(null), c = o ? Array.isArray(v) ? v : [] : [], g = o ? null : v ?? null, O = !o && g !== null ? n(g) : "";
21
- rt(() => {
18
+ }, [Re, H] = w(""), h = S ?? Re, P = (e, t, l) => {
19
+ S === void 0 && H(t), he?.(e, t, l);
20
+ }, [b, $] = w(null), De = X([]), Y = X(null), [Se, Ce] = w(null), [Pe, Ae] = w(null), c = o ? Array.isArray(v) ? v : [] : [], g = o ? null : v ?? null, O = !o && g !== null ? n(g) : "";
21
+ lt(() => {
22
22
  S !== void 0 || o || H(O);
23
23
  }, [
24
24
  S,
@@ -27,17 +27,17 @@ function Pt({ dataTest: l, options: p, renderInput: ee, value: v, onChange: N, g
27
27
  ]);
28
28
  const B = (e) => o ? c.some((t) => C(e, t)) : g !== null && C(e, g), q = E(() => {
29
29
  const e = [...p];
30
- if ($) return $(e, { inputValue: h });
30
+ if (L) return L(e, { inputValue: h });
31
31
  const t = !o && g !== null ? n(g).toLowerCase() : null;
32
32
  if (!h || h.toLowerCase() === t) return e;
33
- const r = h.toLowerCase();
34
- return e.filter((d) => n(d).toLowerCase().includes(r));
33
+ const l = h.toLowerCase();
34
+ return e.filter((d) => n(d).toLowerCase().includes(l));
35
35
  }, [
36
36
  p,
37
37
  h,
38
- $,
38
+ L,
39
39
  v
40
- ]), i = E(() => q.slice(0, 100), [q]), { refs: A, floatingStyles: Le, context: G } = dt({
40
+ ]), i = E(() => q.slice(0, 100), [q]), { refs: A, floatingStyles: ke, context: G } = dt({
41
41
  open: a,
42
42
  onOpenChange: f,
43
43
  placement: "bottom-start",
@@ -51,10 +51,10 @@ function Pt({ dataTest: l, options: p, renderInput: ee, value: v, onChange: N, g
51
51
  Ce(e.reference.width), Ae(de ? t - 8 : Math.min(t - 8, 320));
52
52
  } })
53
53
  ]
54
- }), { getReferenceProps: $e, getFloatingProps: ke, getItemProps: Ie } = ut([it(G), pt(G, { role: "listbox" })]), Me = Z([A.setReference]), J = E(() => a ? Ze(A.reference.current) : void 0, [a, A]), I = Ke(J), _e = Z([et(A.setFloating, I)]), M = (e, t) => {
54
+ }), { getReferenceProps: Le, getFloatingProps: $e, getItemProps: Ie } = ut([it(G), pt(G, { role: "listbox" })]), Me = Z([A.setReference]), J = E(() => a ? Ze(A.reference.current) : void 0, [a, A]), I = Ke(J), _e = Z([et(A.setFloating, I)]), M = (e, t) => {
55
55
  if (o) {
56
- const r = c.some((u) => C(t, u)), d = r ? c.filter((u) => !C(t, u)) : [...c, t];
57
- N?.(e, d, r ? "removeOption" : "selectOption", { option: t }), P(e, "", "reset"), ce || f(!1);
56
+ const l = c.some((u) => C(t, u)), d = l ? c.filter((u) => !C(t, u)) : [...c, t];
57
+ N?.(e, d, l ? "removeOption" : "selectOption", { option: t }), P(e, "", "reset"), ce || f(!1);
58
58
  } else
59
59
  N?.(e, t, "selectOption", { option: t }), P(e, n(t), "reset"), f(!1);
60
60
  }, Ee = (e) => {
@@ -66,12 +66,12 @@ function Pt({ dataTest: l, options: p, renderInput: ee, value: v, onChange: N, g
66
66
  K(t) || M(e, t);
67
67
  } else if (e.key === "ArrowDown" || e.key === "ArrowUp") {
68
68
  if (e.preventDefault(), !a) {
69
- k(null), f(!0);
69
+ $(null), f(!0);
70
70
  return;
71
71
  }
72
72
  if (i.length === 0) return;
73
73
  const t = e.key === "ArrowDown" ? 1 : -1;
74
- k((r) => r == null ? t > 0 ? 0 : i.length - 1 : (r + t + i.length) % i.length);
74
+ $((l) => l == null ? t > 0 ? 0 : i.length - 1 : (l + t + i.length) % i.length);
75
75
  }
76
76
  }, ze = !ne && !m && !D && (o ? c.length > 0 : g !== null), Fe = (e) => {
77
77
  e.preventDefault(), !(D || m) && (Y.current?.focus(), f(!a));
@@ -79,7 +79,7 @@ function Pt({ dataTest: l, options: p, renderInput: ee, value: v, onChange: N, g
79
79
  dataTest: `selected-chip-${n(e)}`,
80
80
  label: n(e),
81
81
  readOnly: m,
82
- onDelete: m ? void 0 : (r) => M(r, e)
82
+ onDelete: m ? void 0 : (l) => M(l, e)
83
83
  }, R ? R(e) : `${n(e)}-${t}`)) : void 0, Ue = /* @__PURE__ */ y("span", {
84
84
  className: "flex items-center gap-1",
85
85
  children: [
@@ -91,7 +91,7 @@ function Pt({ dataTest: l, options: p, renderInput: ee, value: v, onChange: N, g
91
91
  ze && /* @__PURE__ */ s("button", {
92
92
  type: "button",
93
93
  "aria-label": "Clear",
94
- "data-testid": `${l}-clear`,
94
+ "data-testid": `${r}-clear`,
95
95
  className: "flex min-h-6 min-w-6 cursor-pointer items-center justify-center rounded-full border-0 bg-delta-50",
96
96
  onMouseDown: (e) => {
97
97
  e.preventDefault(), Ee(e);
@@ -106,7 +106,7 @@ function Pt({ dataTest: l, options: p, renderInput: ee, value: v, onChange: N, g
106
106
  type: "button",
107
107
  "aria-label": "Toggle options",
108
108
  "aria-expanded": a,
109
- "data-testid": `${l}-popup-indicator`,
109
+ "data-testid": `${r}-popup-indicator`,
110
110
  className: "flex cursor-pointer items-center border-0 bg-transparent",
111
111
  onMouseDown: Fe,
112
112
  children: ie ?? (o ? /* @__PURE__ */ s(Ge, {
@@ -116,7 +116,7 @@ function Pt({ dataTest: l, options: p, renderInput: ee, value: v, onChange: N, g
116
116
  }) : /* @__PURE__ */ s(Oe, {
117
117
  width: 24,
118
118
  height: 24,
119
- className: L(_["select-custom-icon"], a && _["select-custom-icon-open"], "text-delta-700")
119
+ className: k(_["select-custom-icon"], a && _["select-custom-icon-open"], "text-delta-700")
120
120
  }))
121
121
  })
122
122
  ]
@@ -133,13 +133,13 @@ function Pt({ dataTest: l, options: p, renderInput: ee, value: v, onChange: N, g
133
133
  onKeyDown: je,
134
134
  slotProps: {
135
135
  htmlInput: {
136
- ...$e(),
136
+ ...Le(),
137
137
  ref: Y,
138
138
  onClick: () => f(!0),
139
139
  role: "combobox",
140
140
  "aria-autocomplete": "list",
141
141
  "aria-expanded": a,
142
- "aria-activedescendant": a && b != null ? `${l}-option-${b}` : void 0,
142
+ "aria-activedescendant": a && b != null ? `${r}-option-${b}` : void 0,
143
143
  autoComplete: "off",
144
144
  readOnly: m
145
145
  },
@@ -149,45 +149,45 @@ function Pt({ dataTest: l, options: p, renderInput: ee, value: v, onChange: N, g
149
149
  endAdornment: Ue
150
150
  }
151
151
  }
152
- }, Ve = L("box-border flex min-h-10 cursor-pointer items-center gap-x-3 px-3 py-1.5 text-base text-delta-800 first:-mt-1", "aria-selected:bg-gama-50 data-[active]:bg-gama-50 data-[active]:text-delta-800", "aria-disabled:cursor-default aria-disabled:!bg-transparent aria-disabled:text-delta-300", o && "border-0 border-b border-solid border-delta-200"), He = (e, t, r) => {
152
+ }, Ve = k("box-border flex min-h-10 cursor-pointer items-center gap-x-3 px-3 py-1.5 text-base text-delta-800", "aria-selected:bg-gama-50 data-[active]:bg-gama-50 data-[active]:text-delta-800", "aria-disabled:cursor-default aria-disabled:!bg-transparent aria-disabled:text-delta-300", "border-0 border-b border-solid border-delta-200 last:border-b-0"), He = (e, t, l) => {
153
153
  const { key: d, ...u } = e;
154
154
  return /* @__PURE__ */ y("li", {
155
155
  ...u,
156
156
  children: [o ? /* @__PURE__ */ s(Q, {
157
- dataTest: `${l}-${n(t)}-checkbox`,
158
- checked: r.selected,
157
+ dataTest: `${r}-${n(t)}-checkbox`,
158
+ checked: l.selected,
159
159
  size: "small",
160
160
  hideWrapper: !0,
161
161
  decorative: !0
162
162
  }) : /* @__PURE__ */ s("span", {
163
163
  className: "w-5",
164
- children: r.selected && /* @__PURE__ */ s(qe, {
164
+ children: l.selected && /* @__PURE__ */ s(qe, {
165
165
  width: 20,
166
166
  height: 20,
167
167
  className: "text-gama-500"
168
168
  })
169
169
  }), /* @__PURE__ */ s("span", {
170
- className: "flex-1 truncate",
170
+ className: "line-clamp-2 min-w-0 flex-1 break-words",
171
171
  children: n(t)
172
172
  })]
173
173
  }, d);
174
174
  }, Ye = (e, t) => {
175
- const r = ye?.(e) ?? K(e), d = {
175
+ const l = ye?.(e) ?? K(e), d = {
176
176
  ...Ie({
177
177
  onMouseDown: (x) => x.preventDefault(),
178
178
  onClick: (x) => {
179
- r || M(x, e);
179
+ l || M(x, e);
180
180
  },
181
- onMouseMove: () => k(r ? null : t)
181
+ onMouseMove: () => $(l ? null : t)
182
182
  }),
183
183
  key: R ? String(R(e)) : `${n(e)}-${t}`,
184
184
  ref: (x) => {
185
185
  De.current[t] = x;
186
186
  },
187
187
  role: "option",
188
- id: `${l}-option-${t}`,
188
+ id: `${r}-option-${t}`,
189
189
  "aria-selected": B(e),
190
- "aria-disabled": r || void 0,
190
+ "aria-disabled": l || void 0,
191
191
  "data-active": b === t ? "" : void 0,
192
192
  className: Ve
193
193
  }, u = {
@@ -198,27 +198,27 @@ function Pt({ dataTest: l, options: p, renderInput: ee, value: v, onChange: N, g
198
198
  return z ? z(d, e, u) : He(d, e, u);
199
199
  };
200
200
  return /* @__PURE__ */ y("div", {
201
- className: L(_.styledSelectAutocompleteWrapper, !me && "w-auto", we, xe),
202
- children: [ee(Te), a && /* @__PURE__ */ s(lt, {
201
+ className: k(_.styledSelectAutocompleteWrapper, !me && "w-auto", we, xe),
202
+ children: [ee(Te), a && /* @__PURE__ */ s(rt, {
203
203
  root: J,
204
204
  children: /* @__PURE__ */ y("ul", {
205
205
  ref: _e,
206
206
  ...I ? Qe : {},
207
207
  style: {
208
208
  ...I ? Xe : {},
209
- ...Le,
209
+ ...ke,
210
210
  width: Se ?? void 0,
211
211
  maxHeight: Pe ?? void 0,
212
212
  fontFamily: "Roboto, Helvetica, Arial, sans-serif",
213
213
  ...V?.popper?.style
214
214
  },
215
- ...ke(),
216
- className: L("z-[1300] m-0 list-none overflow-auto rounded-lg border border-solid border-delta-300 bg-white p-0 shadow-[0px_2px_4px_0px_rgba(34,33,51,0.15)]", fe?.listbox, V?.popper?.className),
215
+ ...$e(),
216
+ className: k("z-[1300] m-0 list-none overflow-auto rounded-lg border border-solid border-delta-300 bg-white px-0 py-2 shadow-[0px_2px_4px_0px_rgba(34,33,51,0.15)]", fe?.listbox, V?.popper?.className),
217
217
  children: [pe && o && /* @__PURE__ */ y("div", {
218
218
  role: "group",
219
219
  className: "flex min-h-12 items-center gap-x-1 border-0 border-b border-solid border-delta-200 px-4 text-sm text-delta-700",
220
220
  children: [/* @__PURE__ */ s(Q, {
221
- dataTest: `${l}-select-all`,
221
+ dataTest: `${r}-select-all`,
222
222
  "aria-label": U,
223
223
  checked: p.length > 0 && c.length === p.length,
224
224
  size: "small",
@@ -235,11 +235,11 @@ function Pt({ dataTest: l, options: p, renderInput: ee, value: v, onChange: N, g
235
235
  }), W ? /* @__PURE__ */ s("li", {
236
236
  role: "presentation",
237
237
  className: "px-3 py-2 text-sm text-delta-600",
238
- children: re
238
+ children: le
239
239
  }) : i.length === 0 ? /* @__PURE__ */ s("li", {
240
240
  role: "presentation",
241
241
  className: "px-3 py-2 text-sm text-delta-600",
242
- children: le
242
+ children: re
243
243
  }) : i.map(Ye)]
244
244
  })
245
245
  })]
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "3.74.0",
6
+ "version": "3.74.1",
7
7
  "type": "module",
8
8
  "sideEffects": [
9
9
  "**/*.css",