asma-ui-core 3.103.1 → 3.105.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.
Files changed (25) hide show
  1. package/dist/asma-ui-core.css +1 -1
  2. package/dist/components/custom/module/header-layout/ToolbarActionGroup.js +6 -6
  3. package/dist/components/data-display/chip/StyledChip.js +48 -47
  4. package/dist/components/data-display/tooltip/StyledTooltip.js +62 -60
  5. package/dist/components/feedback/dialog/StyledDialog.js +94 -79
  6. package/dist/components/feedback/dialog/dialog-footer/StyledDialogFooter.js +51 -51
  7. package/dist/components/inputs/button/StyledButton.module.js +13 -13
  8. package/dist/components/inputs/dynamic-select/components/DynamicSelectAutocomplete.js +91 -82
  9. package/dist/components/inputs/select-autocomplete/StyledSelectAutocomplete.js +152 -152
  10. package/dist/components/navigation/menu/StyledMenu.js +17 -16
  11. package/dist/components/navigation/menu/StyledMenu.module.js +5 -2
  12. package/dist/components/navigation/menu/StyledMenuList.js +50 -36
  13. package/dist/components/navigation/tabs/StyledTab.js +28 -19
  14. package/dist/components/navigation/tabs/StyledTabs.js +33 -33
  15. package/dist/helpers/focusable.js +3 -2
  16. package/dist/helpers/warnUnnamedDialog.js +6 -0
  17. package/dist/src/components/feedback/dialog/StyledDialog.d.ts +10 -2
  18. package/dist/src/components/feedback/dialog/dialog-footer/StyledDialogFooter.d.ts +5 -3
  19. package/dist/src/components/navigation/menu/StyledMenuList.d.ts +2 -1
  20. package/dist/src/components/navigation/tabs/StyledTab.d.ts +11 -1
  21. package/dist/src/helpers/focusable.d.ts +1 -0
  22. package/dist/src/helpers/warnUnnamedDialog.d.ts +5 -0
  23. package/dist/table/components/columns/action-column/components/RowActionMenu.js +60 -47
  24. package/dist/table/shared-components/button/StyledButton.module.js +11 -11
  25. package/package.json +1 -1
@@ -1,140 +1,140 @@
1
- import { cn as E } from "../../../helpers/cn.js";
2
- import { ChevronDownIcon as ot } from "../../icons/chevron-down-icon/ChevronDownIcon.js";
3
- import { CloseIcon as st } from "../../icons/close-icon/CloseIcon.js";
4
- import { CheckIcon as nt } from "../../icons/check-icon/CheckIcon.js";
5
- import { PlusIconCircle as at } from "../../icons/plus-icon-circle/PlusIconCircle.js";
6
- import { StyledChip as it } from "../../data-display/chip/StyledChip.js";
7
- import { StyledCheckbox as ie } from "../checkbox/base-ui/StyledCheckbox.js";
8
- import { TOP_LAYER_PROPS as ct, TOP_LAYER_RESET_STYLE as dt, getOpenModalDialogAncestor as ut, shouldUsePopoverTopLayer as pt, useTopLayerRef as ft } from "../../../hooks/useTopLayer.hook.js";
9
- import { LoadingIcon as mt } from "../../../table/shared-components/LoadingIcon.js";
10
- import W from "./StyledSelectAutocomplete.module.js";
11
- import { useEffect as ce, useMemo as U, useRef as de, useState as D } from "react";
1
+ import { cn as _ } from "../../../helpers/cn.js";
2
+ import { ChevronDownIcon as nt } from "../../icons/chevron-down-icon/ChevronDownIcon.js";
3
+ import { CloseIcon as at } from "../../icons/close-icon/CloseIcon.js";
4
+ import { CheckIcon as it } from "../../icons/check-icon/CheckIcon.js";
5
+ import { PlusIconCircle as ct } from "../../icons/plus-icon-circle/PlusIconCircle.js";
6
+ import { StyledChip as dt } from "../../data-display/chip/StyledChip.js";
7
+ import { StyledCheckbox as de } from "../checkbox/base-ui/StyledCheckbox.js";
8
+ import { TOP_LAYER_PROPS as ut, TOP_LAYER_RESET_STYLE as pt, getOpenModalDialogAncestor as ft, shouldUsePopoverTopLayer as mt, useTopLayerRef as ht } from "../../../hooks/useTopLayer.hook.js";
9
+ import { LoadingIcon as bt } from "../../../table/shared-components/LoadingIcon.js";
10
+ import U from "./StyledSelectAutocomplete.module.js";
11
+ import { useEffect as ue, useMemo as V, useRef as pe, useState as D } from "react";
12
12
  import { jsx as s, jsxs as I } from "react/jsx-runtime";
13
- import { FloatingPortal as ht, autoUpdate as bt, flip as gt, offset as xt, shift as wt, size as yt, useDismiss as kt, useFloating as vt, useInteractions as Dt, useMergeRefs as ue, useRole as It } from "@floating-ui/react";
14
- var Nt = (l) => typeof l == "object" && l !== null && "label" in l ? String(l.label) : String(l), At = (l) => typeof l == "object" && l !== null && "disabled" in l && !!l.disabled;
15
- function Ht({ dataTest: l, options: b, renderInput: pe, value: N, onChange: A, getOptionLabel: fe, getOptionKey: C, isOptionEqualToValue: V, renderOption: B, renderValue: T, filterOptions: _, loading: Y, loadingText: me = "Loading…", noOptionsText: he = "No options", disabled: S, readOnly: g, error: be, helperText: ge, size: xe = "small", rowSize: we = "compact", disableClearable: ye, disableCloseOnSelect: ke, popupIcon: ve, autoHeight: De, multiple: Ie, allowSelectAll: F, selectAllLabel: Ne = "Select all", fullWidth: Ae, classes: Ce, inputValue: M, onInputChange: Se, open: q, onOpen: Me, onClose: Re, className: Pe, wrapperClassName: $e, getOptionDisabled: Le, slotProps: G }) {
16
- const r = Ie === !0, d = fe ?? Nt, R = (e, t) => V ? V(e, t) : e === t, [Ee, _e] = D(!1), a = q ?? Ee, u = (e) => {
17
- e && (g || S) || (q === void 0 && _e(e), e ? Me?.() : (x(null), Re?.()));
18
- }, [Fe, J] = D(""), h = M ?? Fe, P = (e, t, n) => {
19
- M === void 0 && J(t), Se?.(e, t, n);
20
- }, [o, x] = D(null), Q = `${l}-listbox`, X = de([]), Z = de(null), [Oe, je] = D(null), [K, ze] = D(null), i = r ? Array.isArray(N) ? N : [] : [], w = r ? null : N ?? null, ee = !r && w !== null ? d(w) : "";
21
- ce(() => {
22
- M !== void 0 || r || J(ee);
13
+ import { FloatingPortal as gt, autoUpdate as xt, flip as yt, offset as wt, shift as kt, size as vt, useDismiss as Dt, useFloating as It, useInteractions as Nt, useMergeRefs as fe, useRole as At } from "@floating-ui/react";
14
+ var Ct = (l) => typeof l == "object" && l !== null && "label" in l ? String(l.label) : String(l), St = (l) => typeof l == "object" && l !== null && "disabled" in l && !!l.disabled;
15
+ function Ut({ dataTest: l, options: b, renderInput: me, value: N, onChange: A, getOptionLabel: he, getOptionKey: C, isOptionEqualToValue: B, renderOption: T, renderValue: Y, filterOptions: O, loading: q, loadingText: be = "Loading…", noOptionsText: ge = "No options", disabled: S, readOnly: g, error: xe, helperText: ye, size: we = "small", rowSize: ke = "compact", disableClearable: ve, disableCloseOnSelect: De, popupIcon: Ie, autoHeight: Ne, multiple: Ae, allowSelectAll: M, selectAllLabel: Ce = "Select all", fullWidth: Se, classes: Me, inputValue: R, onInputChange: Re, open: G, onOpen: Pe, onClose: $e, className: Le, wrapperClassName: Ee, getOptionDisabled: _e, slotProps: J }) {
16
+ const r = Ae === !0, c = he ?? Ct, P = (e, t) => B ? B(e, t) : e === t, [Oe, Fe] = D(!1), a = G ?? Oe, d = (e) => {
17
+ e && (g || S) || (G === void 0 && Fe(e), e ? Pe?.() : (x(null), $e?.()));
18
+ }, [je, Q] = D(""), m = R ?? je, $ = (e, t, n) => {
19
+ R === void 0 && Q(t), Re?.(e, t, n);
20
+ }, [o, x] = D(null), X = `${l}-listbox`, Z = pe([]), K = pe(null), [ze, He] = D(null), [ee, We] = D(null), i = r ? Array.isArray(N) ? N : [] : [], y = r ? null : N ?? null, te = !r && y !== null ? c(y) : "";
21
+ ue(() => {
22
+ R !== void 0 || r || Q(te);
23
23
  }, [
24
- M,
24
+ R,
25
25
  r,
26
- ee
26
+ te
27
27
  ]);
28
- const O = (e) => r ? i.some((t) => R(e, t)) : w !== null && R(e, w), $ = (e) => Le?.(e) ?? At(e), te = U(() => {
28
+ const F = (e) => r ? i.some((t) => P(e, t)) : y !== null && P(e, y), L = (e) => _e?.(e) ?? St(e), le = V(() => {
29
29
  const e = [...b];
30
- if (_) return _(e, { inputValue: h });
31
- const t = !r && w !== null ? d(w).toLowerCase() : null;
32
- if (!h || h.toLowerCase() === t) return e;
33
- const n = h.toLowerCase();
34
- return e.filter((f) => d(f).toLowerCase().includes(n));
30
+ if (O) return O(e, { inputValue: m });
31
+ const t = !r && y !== null ? c(y).toLowerCase() : null;
32
+ if (!m || m.toLowerCase() === t) return e;
33
+ const n = m.toLowerCase();
34
+ return e.filter((p) => c(p).toLowerCase().includes(n));
35
35
  }, [
36
36
  b,
37
- h,
38
- _,
37
+ m,
38
+ O,
39
39
  N
40
- ]), p = U(() => te.slice(0, 100), [te]), le = p.flatMap((e, t) => $(e) ? [] : [t]), c = F && r ? [-1, ...le] : le, k = p.findIndex(O);
41
- ce(() => {
40
+ ]), u = V(() => le.slice(0, 100), [le]), re = u.flatMap((e, t) => L(e) ? [] : [t]), j = M && r ? [-1, ...re] : re, oe = u.map((e, t) => t), h = M && r ? [-1, ...oe] : oe, k = u.findIndex(F);
41
+ ue(() => {
42
42
  if (!a) return;
43
43
  const e = o ?? k;
44
44
  if (e < 0) return;
45
- const t = requestAnimationFrame(() => X.current[e]?.scrollIntoView({ block: "nearest" }));
45
+ const t = requestAnimationFrame(() => Z.current[e]?.scrollIntoView({ block: "nearest" }));
46
46
  return () => cancelAnimationFrame(t);
47
47
  }, [
48
48
  o,
49
49
  a,
50
- K,
50
+ ee,
51
51
  k
52
52
  ]);
53
- const { refs: L, floatingStyles: He, context: re } = vt({
53
+ const { refs: E, floatingStyles: Ue, context: se } = It({
54
54
  open: a,
55
- onOpenChange: u,
55
+ onOpenChange: d,
56
56
  placement: "bottom-start",
57
57
  strategy: "fixed",
58
- whileElementsMounted: bt,
58
+ whileElementsMounted: xt,
59
59
  middleware: [
60
- xt(0),
61
- gt({ padding: 8 }),
62
- wt({ padding: 8 }),
63
- yt({ apply({ rects: e, availableHeight: t }) {
64
- je(e.reference.width), ze(De ? t - 8 : Math.min(t - 8, 320));
60
+ wt(0),
61
+ yt({ padding: 8 }),
62
+ kt({ padding: 8 }),
63
+ vt({ apply({ rects: e, availableHeight: t }) {
64
+ He(e.reference.width), We(Ne ? t - 8 : Math.min(t - 8, 320));
65
65
  } })
66
66
  ]
67
- }), { getReferenceProps: We, getFloatingProps: Ue, getItemProps: Ve } = Dt([kt(re), It(re, { role: "listbox" })]), Be = ue([L.setReference]), oe = U(() => a ? ut(L.reference.current) : void 0, [a, L]), j = pt(oe), Te = ue([ft(L.setFloating, j)]), Ye = (e) => c.includes(k) ? k : c[e === 1 ? 0 : c.length - 1] ?? null, qe = (e) => {
68
- c.length !== 0 && x((t) => {
69
- const n = c.indexOf(t ?? k);
70
- return n === -1 ? c[e === 1 ? 0 : c.length - 1] ?? null : c[Math.min(Math.max(n + e, 0), c.length - 1)] ?? null;
67
+ }), { getReferenceProps: Ve, getFloatingProps: Be, getItemProps: Te } = Nt([Dt(se), At(se, { role: "listbox" })]), Ye = fe([E.setReference]), ne = V(() => a ? ft(E.reference.current) : void 0, [a, E]), z = mt(ne), qe = fe([ht(E.setFloating, z)]), Ge = (e) => j.includes(k) ? k : j[e === 1 ? 0 : j.length - 1] ?? null, Je = (e) => {
68
+ h.length !== 0 && x((t) => {
69
+ const n = h.indexOf(t ?? k);
70
+ return n === -1 ? h[e === 1 ? 0 : h.length - 1] ?? null : h[Math.min(Math.max(n + e, 0), h.length - 1)] ?? null;
71
71
  });
72
- }, v = (e, t, n = !r || !ke) => {
72
+ }, v = (e, t, n = !r || !De) => {
73
73
  if (r) {
74
- const f = i.some((m) => R(t, m)), y = f ? i.filter((m) => !R(t, m)) : [...i, t];
75
- A?.(e, y, f ? "removeOption" : "selectOption", { option: t }), P(e, "", "reset"), n && u(!1);
74
+ const p = i.some((f) => P(t, f)), w = p ? i.filter((f) => !P(t, f)) : [...i, t];
75
+ A?.(e, w, p ? "removeOption" : "selectOption", { option: t }), $(e, "", "reset"), n && d(!1);
76
76
  } else
77
- A?.(e, t, "selectOption", { option: t }), P(e, d(t), "reset"), n && u(!1);
78
- }, se = (e) => {
79
- A?.(e, r ? [] : null, "clear", void 0), P(e, "", "clear");
80
- }, z = (e) => {
77
+ A?.(e, t, "selectOption", { option: t }), $(e, c(t), "reset"), n && d(!1);
78
+ }, ae = (e) => {
79
+ A?.(e, r ? [] : null, "clear", void 0), $(e, "", "clear");
80
+ }, H = (e) => {
81
81
  const t = b.length > 0 && i.length === b.length;
82
82
  A?.(e, t ? [] : b, t ? "clear" : "selectOption", void 0);
83
- }, Ge = (e) => {
84
- if (e.key === "Backspace" && h === "" && ne) {
83
+ }, Qe = (e) => {
84
+ if (e.key === "Backspace" && m === "" && ie) {
85
85
  const t = i[i.length - 1];
86
- r ? t !== void 0 && v(e, t, !1) : se(e);
86
+ r ? t !== void 0 && v(e, t, !1) : ae(e);
87
87
  } else if (e.key === "Enter" && !a)
88
- e.preventDefault(), u(!0);
88
+ e.preventDefault(), d(!0);
89
89
  else if (e.key === "Enter" && o === -1)
90
- e.preventDefault(), z(e);
91
- else if (e.key === "Enter" && o != null && p[o] != null) {
90
+ e.preventDefault(), H(e);
91
+ else if (e.key === "Enter" && o != null && u[o] != null) {
92
92
  e.preventDefault();
93
- const t = p[o];
94
- $(t) || v(e, t, !0);
93
+ const t = u[o];
94
+ L(t) || v(e, t, !0);
95
95
  } else if (e.key === "ArrowDown" || e.key === "ArrowUp") {
96
96
  if (e.preventDefault(), !a) {
97
- x(Ye(e.key === "ArrowDown" ? 1 : -1)), u(!0);
97
+ x(Ge(e.key === "ArrowDown" ? 1 : -1)), d(!0);
98
98
  return;
99
99
  }
100
- qe(e.key === "ArrowDown" ? 1 : -1);
100
+ Je(e.key === "ArrowDown" ? 1 : -1);
101
101
  } else if (e.key === "Home" || e.key === "End")
102
- e.preventDefault(), x(c[e.key === "Home" ? 0 : c.length - 1] ?? null);
102
+ e.preventDefault(), x(h[e.key === "Home" ? 0 : h.length - 1] ?? null);
103
103
  else if (e.key === " " && o === -1)
104
- e.preventDefault(), z(e);
105
- else if (e.key === " " && o != null && p[o] != null) {
104
+ e.preventDefault(), H(e);
105
+ else if (e.key === " " && o != null && u[o] != null) {
106
106
  e.preventDefault();
107
- const t = p[o];
108
- $(t) || v(e, t, !1);
109
- } else e.key === "Escape" && a ? (e.preventDefault(), e.stopPropagation(), u(!1)) : e.key === "Tab" && u(!1);
110
- }, ne = !ye && !g && !S && (r ? i.length > 0 : w !== null);
111
- let ae;
112
- a && o != null && (o === -1 || p[o] !== void 0) && (ae = o === -1 ? `${l}-select-all` : `${l}-option-${o}`);
113
- const Je = (e) => {
114
- e.preventDefault(), !(S || g) && (Z.current?.focus(), u(!a));
115
- }, Qe = r ? T ? T(i, ({ index: e }) => ({ "data-index": e })) : i.map((e, t) => /* @__PURE__ */ s(it, {
116
- dataTest: `selected-chip-${d(e)}`,
117
- label: d(e),
107
+ const t = u[o];
108
+ L(t) || v(e, t, !1);
109
+ } else e.key === "Escape" && a ? (e.preventDefault(), e.stopPropagation(), d(!1)) : e.key === "Tab" && d(!1);
110
+ }, ie = !ve && !g && !S && (r ? i.length > 0 : y !== null);
111
+ let ce;
112
+ a && o != null && (o === -1 || u[o] !== void 0) && (ce = o === -1 ? `${l}-select-all` : `${l}-option-${o}`);
113
+ const Xe = (e) => {
114
+ e.preventDefault(), !(S || g) && (K.current?.focus(), d(!a));
115
+ }, Ze = r ? Y ? Y(i, ({ index: e }) => ({ "data-index": e })) : i.map((e, t) => /* @__PURE__ */ s(dt, {
116
+ dataTest: `selected-chip-${c(e)}`,
117
+ label: c(e),
118
118
  readOnly: g,
119
119
  deleteButtonTabIndex: -1,
120
120
  onDelete: g ? void 0 : (n) => v(n, e)
121
- }, C ? C(e) : `${d(e)}-${t}`)) : void 0, Xe = /* @__PURE__ */ I("span", {
121
+ }, C ? C(e) : `${c(e)}-${t}`)) : void 0, Ke = /* @__PURE__ */ I("span", {
122
122
  className: "flex items-center gap-1",
123
123
  children: [
124
- Y && /* @__PURE__ */ s(mt, {
124
+ q && /* @__PURE__ */ s(bt, {
125
125
  width: 20,
126
126
  height: 20,
127
127
  className: "animate-spin"
128
128
  }),
129
- ne && /* @__PURE__ */ s("button", {
129
+ ie && /* @__PURE__ */ s("button", {
130
130
  type: "button",
131
131
  tabIndex: -1,
132
132
  "aria-label": "Clear",
133
133
  "data-testid": `${l}-clear`,
134
134
  className: "invisible flex min-h-6 min-w-6 cursor-pointer items-center justify-center rounded-full border-0 bg-delta-50 group-focus-within:visible",
135
135
  onMouseDown: (e) => e.preventDefault(),
136
- onClick: se,
137
- children: /* @__PURE__ */ s(st, {
136
+ onClick: ae,
137
+ children: /* @__PURE__ */ s(at, {
138
138
  width: 20,
139
139
  height: 20,
140
140
  className: "text-delta-700"
@@ -148,59 +148,59 @@ function Ht({ dataTest: l, options: b, renderInput: pe, value: N, onChange: A, g
148
148
  "data-testid": `${l}-popup-indicator`,
149
149
  className: "flex cursor-pointer items-center border-0 bg-transparent",
150
150
  onMouseDown: (e) => e.preventDefault(),
151
- onClick: Je,
152
- children: ve ?? (r ? /* @__PURE__ */ s(at, {
151
+ onClick: Xe,
152
+ children: Ie ?? (r ? /* @__PURE__ */ s(ct, {
153
153
  width: 24,
154
154
  height: 24,
155
155
  className: "text-delta-700"
156
- }) : /* @__PURE__ */ s(ot, {
156
+ }) : /* @__PURE__ */ s(nt, {
157
157
  width: 24,
158
158
  height: 24,
159
- className: E(W["select-custom-icon"], a && W["select-custom-icon-open"], "text-delta-700")
159
+ className: _(U["select-custom-icon"], a && U["select-custom-icon-open"], "text-delta-700")
160
160
  }))
161
161
  })
162
162
  ]
163
- }), Ze = {
163
+ }), et = {
164
164
  disabled: S,
165
- size: xe,
165
+ size: we,
166
166
  fullWidth: !0,
167
- error: be,
168
- helperText: ge,
169
- value: h,
167
+ error: xe,
168
+ helperText: ye,
169
+ value: m,
170
170
  onChange: (e) => {
171
- x(null), P(e, e.target.value, "input"), a || u(!0);
171
+ x(null), $(e, e.target.value, "input"), a || d(!0);
172
172
  },
173
- onKeyDown: Ge,
173
+ onKeyDown: Qe,
174
174
  slotProps: {
175
175
  htmlInput: {
176
- ...We(),
177
- ref: Z,
178
- onClick: () => u(!0),
176
+ ...Ve(),
177
+ ref: K,
178
+ onClick: () => d(!0),
179
179
  role: "combobox",
180
180
  "aria-autocomplete": "list",
181
181
  "aria-expanded": a,
182
- "aria-controls": a ? Q : void 0,
183
- "aria-activedescendant": ae,
182
+ "aria-controls": a ? X : void 0,
183
+ "aria-activedescendant": ce,
184
184
  autoComplete: "off",
185
185
  readOnly: g
186
186
  },
187
187
  input: {
188
- ref: Be,
189
- startAdornment: Qe,
190
- endAdornment: Xe
188
+ ref: Ye,
189
+ startAdornment: Ze,
190
+ endAdornment: Ke
191
191
  }
192
192
  }
193
- }, Ke = E("asma-pressable", "relative box-border flex cursor-pointer items-center gap-x-3 px-3 py-1.5 text-base text-delta-800", we === "regular" ? "min-h-12" : "min-h-10", "aria-selected:bg-gama-50 hover:bg-delta-50", "aria-disabled:cursor-default aria-disabled:!bg-transparent aria-disabled:text-delta-300"), et = (e, t, n) => {
194
- const { key: f, ...y } = e;
193
+ }, tt = _("asma-pressable", "relative box-border flex cursor-pointer items-center gap-x-3 px-3 py-1.5 text-base text-delta-800", ke === "regular" ? "min-h-12" : "min-h-10", "aria-selected:bg-gama-50 hover:bg-delta-50", "aria-disabled:cursor-default aria-disabled:!bg-transparent aria-disabled:text-delta-300"), lt = (e, t, n) => {
194
+ const { key: p, ...w } = e;
195
195
  return /* @__PURE__ */ I("li", {
196
- ...y,
196
+ ...w,
197
197
  children: [
198
198
  e["data-active"] !== void 0 && /* @__PURE__ */ s("span", {
199
199
  "aria-hidden": "true",
200
200
  className: "border-l-solid pointer-events-none absolute inset-y-0 left-0 border-l-[3px] border-focus-ring"
201
201
  }),
202
- r ? /* @__PURE__ */ s(ie, {
203
- dataTest: `${l}-${d(t)}-checkbox`,
202
+ r ? /* @__PURE__ */ s(de, {
203
+ dataTest: `${l}-${c(t)}-checkbox`,
204
204
  checked: n.selected,
205
205
  size: "medium",
206
206
  checkboxClassName: "!h-4 !w-4",
@@ -208,7 +208,7 @@ function Ht({ dataTest: l, options: b, renderInput: pe, value: N, onChange: A, g
208
208
  decorative: !0
209
209
  }) : /* @__PURE__ */ s("span", {
210
210
  className: "w-5",
211
- children: n.selected && /* @__PURE__ */ s(nt, {
211
+ children: n.selected && /* @__PURE__ */ s(it, {
212
212
  width: 20,
213
213
  height: 20,
214
214
  className: "text-gama-500"
@@ -216,64 +216,64 @@ function Ht({ dataTest: l, options: b, renderInput: pe, value: N, onChange: A, g
216
216
  }),
217
217
  /* @__PURE__ */ s("span", {
218
218
  className: "line-clamp-2 min-w-0 flex-1 break-words",
219
- children: d(t)
219
+ children: c(t)
220
220
  })
221
221
  ]
222
- }, f);
223
- }, tt = (e, t) => {
224
- const n = $(e), f = {
225
- ...Ve({
226
- onMouseDown: (m) => m.preventDefault(),
227
- onClick: (m) => {
228
- n || v(m, e);
222
+ }, p);
223
+ }, rt = (e, t) => {
224
+ const n = L(e), p = {
225
+ ...Te({
226
+ onMouseDown: (f) => f.preventDefault(),
227
+ onClick: (f) => {
228
+ n || v(f, e);
229
229
  },
230
230
  onMouseMove: () => x(null)
231
231
  }),
232
- key: C ? String(C(e)) : `${d(e)}-${t}`,
233
- ref: (m) => {
234
- X.current[t] = m;
232
+ key: C ? String(C(e)) : `${c(e)}-${t}`,
233
+ ref: (f) => {
234
+ Z.current[t] = f;
235
235
  },
236
236
  role: "option",
237
237
  id: `${l}-option-${t}`,
238
- "aria-selected": O(e),
238
+ "aria-selected": F(e),
239
239
  "aria-disabled": n || void 0,
240
240
  "data-active": o === t ? "" : void 0,
241
- className: Ke
242
- }, y = {
243
- selected: O(e),
241
+ className: tt
242
+ }, w = {
243
+ selected: F(e),
244
244
  index: t,
245
- inputValue: h
245
+ inputValue: m
246
246
  };
247
- return B ? B(f, e, y) : et(f, e, y);
248
- }, lt = !!(F && r), H = b.length > 0 && i.length === b.length, rt = i.length > 0 && !H;
247
+ return T ? T(p, e, w) : lt(p, e, w);
248
+ }, ot = !!(M && r), W = b.length > 0 && i.length === b.length, st = i.length > 0 && !W;
249
249
  return /* @__PURE__ */ I("div", {
250
- className: E(W.styledSelectAutocompleteWrapper, !Ae && "w-auto", $e, Pe),
251
- children: [pe(Ze), a && /* @__PURE__ */ s(ht, {
252
- root: oe,
250
+ className: _(U.styledSelectAutocompleteWrapper, !Se && "w-auto", Ee, Le),
251
+ children: [me(et), a && /* @__PURE__ */ s(gt, {
252
+ root: ne,
253
253
  children: /* @__PURE__ */ I("ul", {
254
- ref: Te,
255
- ...j ? ct : {},
254
+ ref: qe,
255
+ ...z ? ut : {},
256
256
  style: {
257
- ...j ? dt : {},
258
- ...He,
259
- width: Oe ?? void 0,
260
- maxHeight: K ?? void 0,
257
+ ...z ? pt : {},
258
+ ...Ue,
259
+ width: ze ?? void 0,
260
+ maxHeight: ee ?? void 0,
261
261
  fontFamily: "Roboto, Helvetica, Arial, sans-serif",
262
- ...G?.popper?.style
262
+ ...J?.popper?.style
263
263
  },
264
- ...Ue(),
265
- id: Q,
264
+ ...Be(),
265
+ id: X,
266
266
  role: "listbox",
267
267
  "aria-multiselectable": r ? !0 : void 0,
268
- className: E("z-[1300] m-0 list-none overflow-auto rounded border border-solid border-delta-300 bg-white px-0 py-2 shadow-[0px_2px_4px_0px_rgba(34,33,51,0.15)]", lt && "py-0", "[&>li:not(:last-child)]:border-0 [&>li:not(:last-child)]:border-b", "[&>li:not(:last-child)]:border-solid [&>li:not(:last-child)]:border-delta-200", Ce?.listbox, G?.popper?.className),
269
- children: [F && r && /* @__PURE__ */ I("li", {
268
+ className: _("z-[1300] m-0 list-none overflow-auto rounded border border-solid border-delta-300 bg-white px-0 py-2 shadow-[0px_2px_4px_0px_rgba(34,33,51,0.15)]", ot && "py-0", "[&>li:not(:last-child)]:border-0 [&>li:not(:last-child)]:border-b", "[&>li:not(:last-child)]:border-solid [&>li:not(:last-child)]:border-delta-200", Me?.listbox, J?.popper?.className),
269
+ children: [M && r && /* @__PURE__ */ I("li", {
270
270
  id: `${l}-select-all`,
271
271
  role: "option",
272
- "aria-selected": H,
272
+ "aria-selected": W,
273
273
  "data-active": o === -1 ? "" : void 0,
274
274
  tabIndex: -1,
275
275
  onMouseDown: (e) => e.preventDefault(),
276
- onClick: z,
276
+ onClick: H,
277
277
  onMouseMove: () => x(null),
278
278
  className: "relative flex h-8 cursor-pointer items-center gap-x-3 border-0 border-b border-solid border-delta-200 bg-[var(--colors-gray-10)] px-3 text-xs font-semibold uppercase tracking-[0.2px] text-delta-600 hover:bg-delta-50",
279
279
  children: [
@@ -281,10 +281,10 @@ function Ht({ dataTest: l, options: b, renderInput: pe, value: N, onChange: A, g
281
281
  "aria-hidden": "true",
282
282
  className: "border-l-solid pointer-events-none absolute inset-y-0 left-0 border-l-[3px] border-focus-ring"
283
283
  }),
284
- /* @__PURE__ */ s(ie, {
284
+ /* @__PURE__ */ s(de, {
285
285
  dataTest: `${l}-select-all`,
286
- checked: H,
287
- indeterminate: rt,
286
+ checked: W,
287
+ indeterminate: st,
288
288
  size: "medium",
289
289
  checkboxClassName: "!h-4 !w-4",
290
290
  hideWrapper: !0,
@@ -292,22 +292,22 @@ function Ht({ dataTest: l, options: b, renderInput: pe, value: N, onChange: A, g
292
292
  }),
293
293
  /* @__PURE__ */ s("span", {
294
294
  className: "flex-1 truncate",
295
- children: Ne
295
+ children: Ce
296
296
  })
297
297
  ]
298
- }), Y ? /* @__PURE__ */ s("li", {
298
+ }), q ? /* @__PURE__ */ s("li", {
299
299
  role: "presentation",
300
300
  className: "px-3 py-2 text-sm text-delta-600",
301
- children: me
302
- }) : p.length === 0 ? /* @__PURE__ */ s("li", {
301
+ children: be
302
+ }) : u.length === 0 ? /* @__PURE__ */ s("li", {
303
303
  role: "presentation",
304
304
  className: "px-3 py-2 text-sm text-delta-600",
305
- children: he
306
- }) : p.map(tt)]
305
+ children: ge
306
+ }) : u.map(rt)]
307
307
  })
308
308
  })]
309
309
  });
310
310
  }
311
311
  export {
312
- Ht as StyledSelectAutocomplete
312
+ Ut as StyledSelectAutocomplete
313
313
  };
@@ -1,33 +1,34 @@
1
- import { cn as c } from "../../../helpers/cn.js";
1
+ import { cn as a } from "../../../helpers/cn.js";
2
2
  import { StyledPopover as x } from "../../utils/popover/StyledPopover.js";
3
- import { StyledMenuList as N } from "./StyledMenuList.js";
4
- import { jsx as o } from "react/jsx-runtime";
5
- var S = { border: "1px solid var(--colors-delta-300)" }, w = ({ open: p, anchorEl: m, onClose: t, anchorOrigin: l, transformOrigin: i, id: s, className: d, sx: n, classes: a, slotProps: e, autoFocus: y = !0, onClick: f, children: u, keepMounted: b }) => /* @__PURE__ */ o(x, {
6
- open: p,
7
- anchorEl: m,
3
+ import S from "./StyledMenu.module.js";
4
+ import { StyledMenuList as M } from "./StyledMenuList.js";
5
+ import { jsx as p } from "react/jsx-runtime";
6
+ var N = { border: "1px solid var(--colors-delta-300)" }, v = ({ open: m, anchorEl: l, onClose: t, anchorOrigin: d, transformOrigin: i, id: n, className: s, sx: u, classes: o, slotProps: e, autoFocus: y = !0, onClick: f, children: c, keepMounted: b }) => /* @__PURE__ */ p(x, {
7
+ open: m,
8
+ anchorEl: l,
8
9
  onClose: t,
9
10
  tabIntoContent: !1,
10
- anchorOrigin: l,
11
+ anchorOrigin: d,
11
12
  transformOrigin: i,
12
- id: s,
13
- className: d,
14
- sx: n,
13
+ id: n,
14
+ className: s,
15
+ sx: u,
15
16
  keepMounted: b,
16
17
  slotProps: { paper: {
17
- className: c("rounded", a?.paper, e?.paper?.className),
18
- sx: [S, e?.paper?.sx],
18
+ className: a("rounded", o?.paper, e?.paper?.className),
19
+ sx: [N, e?.paper?.sx],
19
20
  style: e?.paper?.style
20
21
  } },
21
- children: /* @__PURE__ */ o(N, {
22
+ children: /* @__PURE__ */ p(M, {
22
23
  autoFocus: y,
23
- className: a?.list,
24
+ className: a(S.anchoredList, o?.list),
24
25
  onClick: f,
25
26
  onKeyDown: (r) => {
26
27
  r.key === "Tab" && r.target.getAttribute("role") === "menuitem" && t?.(r, "tabKeyDown");
27
28
  },
28
- children: u
29
+ children: c
29
30
  })
30
31
  });
31
32
  export {
32
- w as StyledMenu
33
+ v as StyledMenu
33
34
  };
@@ -1,4 +1,7 @@
1
- var t = "_list_1t3hh_1", e = { list: t };
1
+ var a = "_list_6z23v_1", e = "_anchoredList_6z23v_16", t = {
2
+ list: a,
3
+ anchoredList: e
4
+ };
2
5
  export {
3
- e as default
6
+ t as default
4
7
  };