asma-ui-core 3.78.11 → 3.79.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 (44) hide show
  1. package/dist/asma-ui-core.css +1 -1
  2. package/dist/components/data-display/chip/StyledChip.js +41 -41
  3. package/dist/components/inputs/button/StyledButton.module.js +8 -8
  4. package/dist/components/inputs/checkbox/base-ui/StyledCheckbox.js +45 -42
  5. package/dist/components/inputs/checkbox/base-ui/StyledCheckbox.module.js +8 -8
  6. package/dist/components/inputs/dynamic-select/components/DynamicSelectAutocomplete.js +25 -17
  7. package/dist/components/inputs/field-styles.js +3 -3
  8. package/dist/components/inputs/radio-button/base-ui/StyledRadio.js +34 -31
  9. package/dist/components/inputs/radio-button/base-ui/StyledRadio.module.js +10 -10
  10. package/dist/components/inputs/select/StyledSelect.js +147 -135
  11. package/dist/components/inputs/select/StyledSelectItem.js +29 -19
  12. package/dist/components/inputs/select-autocomplete/StyledSelectAutocomplete.js +195 -162
  13. package/dist/components/inputs/switch/base-ui/StyledSwitch.module.js +4 -4
  14. package/dist/components/inputs/textarea/StyledTextarea.module.js +4 -4
  15. package/dist/components/navigation/link/StyledLink.js +11 -10
  16. package/dist/components/navigation/link/StyledLink.module.js +5 -5
  17. package/dist/components/navigation/menu/StyledMenuList.js +27 -19
  18. package/dist/components/navigation/tabs/StyledTab.js +7 -7
  19. package/dist/components/utils/accordion/base-ui/StyledAccordion.module.js +3 -3
  20. package/dist/datetime/shared-components/button/StyledButton.module.js +12 -12
  21. package/dist/src/components/inputs/select/StyledSelectItem.d.ts +3 -1
  22. package/dist/src/components/navigation/menu/StyledMenuList.d.ts +3 -1
  23. package/dist/src/table/components/TableRow.d.ts +2 -1
  24. package/dist/src/table/custom-features/focus-rows/types.d.ts +2 -2
  25. package/dist/src/table/hooks/useToggleMenuVisibility.hook.d.ts +14 -1
  26. package/dist/table/components/StyledTable.module.js +52 -52
  27. package/dist/table/components/TableRow.js +92 -80
  28. package/dist/table/components/TableRows.js +10 -8
  29. package/dist/table/components/table-footer/TablePagination.js +77 -64
  30. package/dist/table/components/table-footer/TableRowCountSelect.js +63 -44
  31. package/dist/table/components/table-header/TableHeader.js +72 -64
  32. package/dist/table/custom-features/focus-rows/FocusRowsFeature.js +4 -4
  33. package/dist/table/hooks/useToggleMenuVisibility.hook.js +77 -11
  34. package/dist/table/shared-components/button/StyledButton.module.js +9 -9
  35. package/dist/tailwind.config.d.ts +1 -0
  36. package/package.json +1 -1
  37. package/src/styles/_focus.scss +23 -0
  38. package/src/styles/color-variables/defaultTokens.css +2 -4
  39. package/src/styles/color-variables/fretexTokens.css +6 -7
  40. package/src/styles/color-variables/jadeTokens.css +2 -4
  41. package/src/styles/components-colors/inputVariables.css +2 -2
  42. package/tw-configs/twConfigs.json +1 -0
  43. package/dist/table/shared-components/CheckIcon.js +0 -12
  44. package/dist/table/shared-components/menu-item/index.js +0 -22
@@ -1,250 +1,283 @@
1
- import { cn as A } from "../../../helpers/cn.js";
2
- import { ChevronDownIcon as Oe } from "../../icons/chevron-down-icon/ChevronDownIcon.js";
3
- import { CloseIcon as Be } from "../../icons/close-icon/CloseIcon.js";
4
- import { CheckIcon as qe } from "../../icons/check-icon/CheckIcon.js";
5
- import { PlusIconCircle as Ge } from "../../icons/plus-icon-circle/PlusIconCircle.js";
6
- import { StyledChip as Je } from "../../data-display/chip/StyledChip.js";
7
- import { StyledCheckbox as Q } from "../checkbox/base-ui/StyledCheckbox.js";
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
- import { LoadingIcon as tt } from "../../../table/shared-components/LoadingIcon.js";
10
- import _ from "./StyledSelectAutocomplete.module.js";
11
- import { useEffect as lt, useMemo as E, useRef as X, useState as w } from "react";
12
- import { jsx as o, jsxs as y } from "react/jsx-runtime";
13
- import { FloatingPortal as rt, autoUpdate as ot, flip as st, 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: C, isOptionEqualToValue: j, renderOption: z, renderValue: F, filterOptions: L, loading: W, loadingText: le = "Loading…", noOptionsText: re = "No options", disabled: D, readOnly: m, error: oe, helperText: se, size: ae = "small", disableClearable: ne, disableCloseOnSelect: ce, popupIcon: ie, autoHeight: de, multiple: ue, allowSelectAll: pe, selectAllLabel: U = "Select all", fullWidth: me, classes: fe, inputValue: R, onInputChange: he, open: T, onOpen: ge, onClose: be, className: xe, wrapperClassName: we, getOptionDisabled: ye, slotProps: V }) {
16
- const s = ue === !0, n = te ?? mt, S = (e, t) => j ? j(e, t) : e === t, [ve, Ne] = w(!1), a = T ?? ve, f = (e) => {
17
- e && (m || D) || (T === void 0 && Ne(e), e ? ge?.() : be?.());
18
- }, [Ce, H] = w(""), h = R ?? Ce, P = (e, t, l) => {
19
- R === void 0 && H(t), he?.(e, t, l);
20
- }, [b, $] = w(null), De = X([]), Y = X(null), [Re, Se] = w(null), [Pe, ke] = w(null), c = s ? Array.isArray(v) ? v : [] : [], g = s ? null : v ?? null, O = !s && g !== null ? n(g) : "";
21
- lt(() => {
22
- R !== void 0 || s || H(O);
1
+ import { cn as E } from "../../../helpers/cn.js";
2
+ import { ChevronDownIcon as Qe } from "../../icons/chevron-down-icon/ChevronDownIcon.js";
3
+ import { CloseIcon as Xe } from "../../icons/close-icon/CloseIcon.js";
4
+ import { CheckIcon as Ze } from "../../icons/check-icon/CheckIcon.js";
5
+ import { PlusIconCircle as Ke } from "../../icons/plus-icon-circle/PlusIconCircle.js";
6
+ import { StyledChip as et } from "../../data-display/chip/StyledChip.js";
7
+ import { StyledCheckbox as te } from "../checkbox/base-ui/StyledCheckbox.js";
8
+ import { TOP_LAYER_PROPS as tt, TOP_LAYER_RESET_STYLE as lt, getOpenModalDialogAncestor as rt, shouldUsePopoverTopLayer as ot, useTopLayerRef as st } from "../../../hooks/useTopLayer.hook.js";
9
+ import { LoadingIcon as nt } from "../../../table/shared-components/LoadingIcon.js";
10
+ import O from "./StyledSelectAutocomplete.module.js";
11
+ import { useEffect as le, useMemo as z, useRef as re, useState as D } from "react";
12
+ import { jsx as o, jsxs as v } from "react/jsx-runtime";
13
+ import { FloatingPortal as at, autoUpdate as it, flip as ct, offset as dt, shift as ut, size as pt, useDismiss as ft, useFloating as mt, useInteractions as ht, useMergeRefs as oe, useRole as bt } from "@floating-ui/react";
14
+ var gt = (l) => typeof l == "object" && l !== null && "label" in l ? String(l.label) : String(l), xt = (l) => typeof l == "object" && l !== null && "disabled" in l && !!l.disabled;
15
+ function Lt({ dataTest: l, options: h, renderInput: se, value: I, onChange: N, getOptionLabel: ne, getOptionKey: A, isOptionEqualToValue: W, renderOption: H, renderValue: T, filterOptions: _, loading: U, loadingText: ae = "Loading…", noOptionsText: ie = "No options", disabled: C, readOnly: b, error: ce, helperText: de, size: ue = "small", disableClearable: pe, disableCloseOnSelect: fe, popupIcon: me, autoHeight: he, multiple: be, allowSelectAll: ge, selectAllLabel: V = "Select all", fullWidth: xe, classes: we, inputValue: R, onInputChange: ye, open: Y, onOpen: ke, onClose: De, className: ve, wrapperClassName: Ie, getOptionDisabled: Ne, slotProps: q }) {
16
+ const s = be === !0, c = ne ?? gt, S = (e, t) => W ? W(e, t) : e === t, [Ae, Ce] = D(!1), n = Y ?? Ae, d = (e) => {
17
+ e && (b || C) || (Y === void 0 && Ce(e), e ? ke?.() : (y(null), De?.()));
18
+ }, [Re, B] = D(""), g = R ?? Re, P = (e, t, r) => {
19
+ R === void 0 && B(t), ye?.(e, t, r);
20
+ }, [a, y] = D(null), G = re([]), J = re(null), [Se, Pe] = D(null), [Q, Me] = D(null), u = s ? Array.isArray(I) ? I : [] : [], x = s ? null : I ?? null, X = !s && x !== null ? c(x) : "";
21
+ le(() => {
22
+ R !== void 0 || s || B(X);
23
23
  }, [
24
24
  R,
25
25
  s,
26
- O
26
+ X
27
27
  ]);
28
- const B = (e) => s ? c.some((t) => S(e, t)) : g !== null && S(e, g), q = E(() => {
29
- const e = [...p];
30
- if (L) return L(e, { inputValue: h });
31
- const t = !s && g !== null ? n(g).toLowerCase() : null;
32
- if (!h || h.toLowerCase() === t) return e;
33
- const l = h.toLowerCase();
34
- return e.filter((d) => n(d).toLowerCase().includes(l));
28
+ const F = (e) => s ? u.some((t) => S(e, t)) : x !== null && S(e, x), M = (e) => Ne?.(e) ?? xt(e), Z = z(() => {
29
+ const e = [...h];
30
+ if (_) return _(e, { inputValue: g });
31
+ const t = !s && x !== null ? c(x).toLowerCase() : null;
32
+ if (!g || g.toLowerCase() === t) return e;
33
+ const r = g.toLowerCase();
34
+ return e.filter((p) => c(p).toLowerCase().includes(r));
35
35
  }, [
36
- p,
37
36
  h,
38
- L,
39
- v
40
- ]), i = E(() => q.slice(0, 100), [q]), { refs: k, floatingStyles: Ae, context: G } = dt({
41
- open: a,
42
- onOpenChange: f,
37
+ g,
38
+ _,
39
+ I
40
+ ]), m = z(() => Z.slice(0, 100), [Z]), i = m.flatMap((e, t) => M(e) ? [] : [t]), k = m.findIndex(F);
41
+ le(() => {
42
+ if (!n) return;
43
+ const e = a ?? k;
44
+ if (e < 0) return;
45
+ const t = requestAnimationFrame(() => G.current[e]?.scrollIntoView({ block: "nearest" }));
46
+ return () => cancelAnimationFrame(t);
47
+ }, [
48
+ a,
49
+ n,
50
+ Q,
51
+ k
52
+ ]);
53
+ const { refs: L, floatingStyles: Le, context: K } = mt({
54
+ open: n,
55
+ onOpenChange: d,
43
56
  placement: "bottom-start",
44
57
  strategy: "fixed",
45
- whileElementsMounted: ot,
58
+ whileElementsMounted: it,
46
59
  middleware: [
47
- at(0),
48
- st({ padding: 8 }),
49
- nt({ padding: 8 }),
50
- ct({ apply({ rects: e, availableHeight: t }) {
51
- Se(e.reference.width), ke(de ? t - 8 : Math.min(t - 8, 320));
60
+ dt(0),
61
+ ct({ padding: 8 }),
62
+ ut({ padding: 8 }),
63
+ pt({ apply({ rects: e, availableHeight: t }) {
64
+ Pe(e.reference.width), Me(he ? t - 8 : Math.min(t - 8, 320));
52
65
  } })
53
66
  ]
54
- }), { getReferenceProps: Le, getFloatingProps: $e, getItemProps: Ie } = ut([it(G), pt(G, { role: "listbox" })]), Me = Z([k.setReference]), J = E(() => a ? Ze(k.reference.current) : void 0, [a, k]), I = Ke(J), _e = Z([et(k.setFloating, I)]), M = (e, t) => {
67
+ }), { getReferenceProps: $e, getFloatingProps: Ee, getItemProps: _e } = ht([ft(K), bt(K, { role: "listbox" })]), Fe = oe([L.setReference]), ee = z(() => n ? rt(L.reference.current) : void 0, [n, L]), j = ot(ee), je = oe([st(L.setFloating, j)]), Oe = (e) => i.includes(k) ? k : i[e === 1 ? 0 : i.length - 1] ?? null, ze = (e) => {
68
+ i.length !== 0 && y((t) => {
69
+ const r = i.indexOf(t ?? k);
70
+ return r === -1 ? i[e === 1 ? 0 : i.length - 1] ?? null : i[Math.min(Math.max(r + e, 0), i.length - 1)] ?? null;
71
+ });
72
+ }, $ = (e, t, r = !s || !fe) => {
55
73
  if (s) {
56
- const l = c.some((u) => S(t, u)), d = l ? c.filter((u) => !S(t, u)) : [...c, t];
57
- N?.(e, d, l ? "removeOption" : "selectOption", { option: t }), P(e, "", "reset"), ce || f(!1);
74
+ const p = u.some((f) => S(t, f)), w = p ? u.filter((f) => !S(t, f)) : [...u, t];
75
+ N?.(e, w, p ? "removeOption" : "selectOption", { option: t }), P(e, "", "reset"), r && d(!1);
58
76
  } else
59
- N?.(e, t, "selectOption", { option: t }), P(e, n(t), "reset"), f(!1);
60
- }, Ee = (e) => {
77
+ N?.(e, t, "selectOption", { option: t }), P(e, c(t), "reset"), r && d(!1);
78
+ }, We = (e) => {
61
79
  N?.(e, s ? [] : null, "clear", void 0), P(e, "", "clear");
62
- }, je = (e) => {
63
- if (e.key === "Enter" && a && b != null && i[b] != null) {
80
+ }, He = (e) => {
81
+ if (e.key === "Enter" && !n)
82
+ e.preventDefault(), d(!0);
83
+ else if (e.key === "Enter" && a != null && m[a] != null) {
64
84
  e.preventDefault();
65
- const t = i[b];
66
- K(t) || M(e, t);
85
+ const t = m[a];
86
+ M(t) || $(e, t, !0);
67
87
  } else if (e.key === "ArrowDown" || e.key === "ArrowUp") {
68
- if (e.preventDefault(), !a) {
69
- $(null), f(!0);
88
+ if (e.preventDefault(), !n) {
89
+ y(Oe(e.key === "ArrowDown" ? 1 : -1)), d(!0);
70
90
  return;
71
91
  }
72
- if (i.length === 0) return;
73
- const t = e.key === "ArrowDown" ? 1 : -1;
74
- $((l) => l == null ? t > 0 ? 0 : i.length - 1 : (l + t + i.length) % i.length);
75
- }
76
- }, ze = !ne && !m && !D && (s ? c.length > 0 : g !== null), Fe = (e) => {
77
- e.preventDefault(), !(D || m) && (Y.current?.focus(), f(!a));
78
- }, We = s ? F ? F(c, ({ index: e }) => ({ "data-index": e })) : c.map((e, t) => /* @__PURE__ */ o(Je, {
79
- dataTest: `selected-chip-${n(e)}`,
80
- label: n(e),
81
- readOnly: m,
82
- onDelete: m ? void 0 : (l) => M(l, e)
83
- }, C ? C(e) : `${n(e)}-${t}`)) : void 0, Ue = /* @__PURE__ */ y("span", {
92
+ ze(e.key === "ArrowDown" ? 1 : -1);
93
+ } else if (e.key === "Home" || e.key === "End")
94
+ e.preventDefault(), y(i[e.key === "Home" ? 0 : i.length - 1] ?? null);
95
+ else if (e.key === " " && a != null && m[a] != null) {
96
+ e.preventDefault();
97
+ const t = m[a];
98
+ M(t) || $(e, t, !1);
99
+ } else e.key === "Escape" ? (e.preventDefault(), d(!1)) : e.key === "Tab" && d(!1);
100
+ }, Te = !pe && !b && !C && (s ? u.length > 0 : x !== null), Ue = (e) => {
101
+ e.preventDefault(), !(C || b) && (J.current?.focus(), d(!n));
102
+ }, Ve = s ? T ? T(u, ({ index: e }) => ({ "data-index": e })) : u.map((e, t) => /* @__PURE__ */ o(et, {
103
+ dataTest: `selected-chip-${c(e)}`,
104
+ label: c(e),
105
+ readOnly: b,
106
+ onDelete: b ? void 0 : (r) => $(r, e)
107
+ }, A ? A(e) : `${c(e)}-${t}`)) : void 0, Ye = /* @__PURE__ */ v("span", {
84
108
  className: "flex items-center gap-1",
85
109
  children: [
86
- W && /* @__PURE__ */ o(tt, {
110
+ U && /* @__PURE__ */ o(nt, {
87
111
  width: 20,
88
112
  height: 20,
89
113
  className: "animate-spin"
90
114
  }),
91
- ze && /* @__PURE__ */ o("button", {
115
+ Te && /* @__PURE__ */ o("button", {
92
116
  type: "button",
117
+ tabIndex: -1,
93
118
  "aria-label": "Clear",
94
- "data-testid": `${r}-clear`,
119
+ "data-testid": `${l}-clear`,
95
120
  className: "flex min-h-6 min-w-6 cursor-pointer items-center justify-center rounded-full border-0 bg-delta-50",
96
121
  onMouseDown: (e) => e.preventDefault(),
97
- onClick: Ee,
98
- children: /* @__PURE__ */ o(Be, {
122
+ onClick: We,
123
+ children: /* @__PURE__ */ o(Xe, {
99
124
  width: 20,
100
125
  height: 20,
101
126
  className: "text-delta-700"
102
127
  })
103
128
  }),
104
- m ? null : /* @__PURE__ */ o("button", {
129
+ b ? null : /* @__PURE__ */ o("button", {
105
130
  type: "button",
131
+ tabIndex: -1,
106
132
  "aria-label": "Toggle options",
107
- "aria-expanded": a,
108
- "data-testid": `${r}-popup-indicator`,
133
+ "aria-expanded": n,
134
+ "data-testid": `${l}-popup-indicator`,
109
135
  className: "flex cursor-pointer items-center border-0 bg-transparent",
110
136
  onMouseDown: (e) => e.preventDefault(),
111
- onClick: Fe,
112
- children: ie ?? (s ? /* @__PURE__ */ o(Ge, {
137
+ onClick: Ue,
138
+ children: me ?? (s ? /* @__PURE__ */ o(Ke, {
113
139
  width: 24,
114
140
  height: 24,
115
141
  className: "text-delta-700"
116
- }) : /* @__PURE__ */ o(Oe, {
142
+ }) : /* @__PURE__ */ o(Qe, {
117
143
  width: 24,
118
144
  height: 24,
119
- className: A(_["select-custom-icon"], a && _["select-custom-icon-open"], "text-delta-700")
145
+ className: E(O["select-custom-icon"], n && O["select-custom-icon-open"], "text-delta-700")
120
146
  }))
121
147
  })
122
148
  ]
123
- }), Te = {
124
- disabled: D,
125
- size: ae,
149
+ }), qe = {
150
+ disabled: C,
151
+ size: ue,
126
152
  fullWidth: !0,
127
- error: oe,
128
- helperText: se,
129
- value: h,
153
+ error: ce,
154
+ helperText: de,
155
+ value: g,
130
156
  onChange: (e) => {
131
- P(e, e.target.value, "input"), a || f(!0);
157
+ P(e, e.target.value, "input"), n || d(!0);
132
158
  },
133
- onKeyDown: je,
159
+ onKeyDown: He,
134
160
  slotProps: {
135
161
  htmlInput: {
136
- ...Le(),
137
- ref: Y,
138
- onClick: () => f(!0),
162
+ ...$e(),
163
+ ref: J,
164
+ onClick: () => d(!0),
139
165
  role: "combobox",
140
166
  "aria-autocomplete": "list",
141
- "aria-expanded": a,
142
- "aria-activedescendant": a && b != null ? `${r}-option-${b}` : void 0,
167
+ "aria-expanded": n,
168
+ "aria-activedescendant": n && a != null ? `${l}-option-${a}` : void 0,
143
169
  autoComplete: "off",
144
- readOnly: m
170
+ readOnly: b
145
171
  },
146
172
  input: {
147
- ref: Me,
148
- startAdornment: We,
149
- endAdornment: Ue
173
+ ref: Fe,
174
+ startAdornment: Ve,
175
+ endAdornment: Ye
150
176
  }
151
177
  }
152
- }, Ve = A("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"), He = (e, t, l) => {
153
- const { key: d, ...u } = e;
154
- return /* @__PURE__ */ y("li", {
155
- ...u,
156
- children: [s ? /* @__PURE__ */ o(Q, {
157
- dataTest: `${r}-${n(t)}-checkbox`,
158
- checked: l.selected,
159
- size: "small",
160
- hideWrapper: !0,
161
- decorative: !0
162
- }) : /* @__PURE__ */ o("span", {
163
- className: "w-5",
164
- children: l.selected && /* @__PURE__ */ o(qe, {
165
- width: 20,
166
- height: 20,
167
- className: "text-gama-500"
178
+ }, Be = E("relative 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 hover:bg-delta-50", "aria-disabled:cursor-default aria-disabled:!bg-transparent aria-disabled:text-delta-300"), Ge = (e, t, r) => {
179
+ const { key: p, ...w } = e;
180
+ return /* @__PURE__ */ v("li", {
181
+ ...w,
182
+ children: [
183
+ e["data-active"] !== void 0 && /* @__PURE__ */ o("span", {
184
+ "aria-hidden": "true",
185
+ className: "pointer-events-none absolute inset-y-0 left-0 border-l border-solid border-focus-ring"
186
+ }),
187
+ s ? /* @__PURE__ */ o(te, {
188
+ dataTest: `${l}-${c(t)}-checkbox`,
189
+ checked: r.selected,
190
+ size: "small",
191
+ hideWrapper: !0,
192
+ decorative: !0
193
+ }) : /* @__PURE__ */ o("span", {
194
+ className: "w-5",
195
+ children: r.selected && /* @__PURE__ */ o(Ze, {
196
+ width: 20,
197
+ height: 20,
198
+ className: "text-gama-500"
199
+ })
200
+ }),
201
+ /* @__PURE__ */ o("span", {
202
+ className: "line-clamp-2 min-w-0 flex-1 break-words",
203
+ children: c(t)
168
204
  })
169
- }), /* @__PURE__ */ o("span", {
170
- className: "line-clamp-2 min-w-0 flex-1 break-words",
171
- children: n(t)
172
- })]
173
- }, d);
174
- }, Ye = (e, t) => {
175
- const l = ye?.(e) ?? K(e), d = {
176
- ...Ie({
177
- onMouseDown: (x) => x.preventDefault(),
178
- onClick: (x) => {
179
- l || M(x, e);
205
+ ]
206
+ }, p);
207
+ }, Je = (e, t) => {
208
+ const r = M(e), p = {
209
+ ..._e({
210
+ onMouseDown: (f) => f.preventDefault(),
211
+ onClick: (f) => {
212
+ r || $(f, e);
180
213
  },
181
- onMouseMove: () => $(l ? null : t)
214
+ onMouseMove: () => y(null)
182
215
  }),
183
- key: C ? String(C(e)) : `${n(e)}-${t}`,
184
- ref: (x) => {
185
- De.current[t] = x;
216
+ key: A ? String(A(e)) : `${c(e)}-${t}`,
217
+ ref: (f) => {
218
+ G.current[t] = f;
186
219
  },
187
220
  role: "option",
188
- id: `${r}-option-${t}`,
189
- "aria-selected": B(e),
190
- "aria-disabled": l || void 0,
191
- "data-active": b === t ? "" : void 0,
192
- className: Ve
193
- }, u = {
194
- selected: B(e),
221
+ id: `${l}-option-${t}`,
222
+ "aria-selected": F(e),
223
+ "aria-disabled": r || void 0,
224
+ "data-active": a === t ? "" : void 0,
225
+ className: Be
226
+ }, w = {
227
+ selected: F(e),
195
228
  index: t,
196
- inputValue: h
229
+ inputValue: g
197
230
  };
198
- return z ? z(d, e, u) : He(d, e, u);
231
+ return H ? H(p, e, w) : Ge(p, e, w);
199
232
  };
200
- return /* @__PURE__ */ y("div", {
201
- className: A(_.styledSelectAutocompleteWrapper, !me && "w-auto", we, xe),
202
- children: [ee(Te), a && /* @__PURE__ */ o(rt, {
203
- root: J,
204
- children: /* @__PURE__ */ y("ul", {
205
- ref: _e,
206
- ...I ? Qe : {},
233
+ return /* @__PURE__ */ v("div", {
234
+ className: E(O.styledSelectAutocompleteWrapper, !xe && "w-auto", Ie, ve),
235
+ children: [se(qe), n && /* @__PURE__ */ o(at, {
236
+ root: ee,
237
+ children: /* @__PURE__ */ v("ul", {
238
+ ref: je,
239
+ ...j ? tt : {},
207
240
  style: {
208
- ...I ? Xe : {},
209
- ...Ae,
210
- width: Re ?? void 0,
211
- maxHeight: Pe ?? void 0,
241
+ ...j ? lt : {},
242
+ ...Le,
243
+ width: Se ?? void 0,
244
+ maxHeight: Q ?? void 0,
212
245
  fontFamily: "Roboto, Helvetica, Arial, sans-serif",
213
- ...V?.popper?.style
246
+ ...q?.popper?.style
214
247
  },
215
- ...$e(),
216
- className: A("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)]", "[&>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", fe?.listbox, V?.popper?.className),
217
- children: [pe && s && /* @__PURE__ */ y("div", {
248
+ ...Ee(),
249
+ className: E("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)]", "[&>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", we?.listbox, q?.popper?.className),
250
+ children: [ge && s && /* @__PURE__ */ v("div", {
218
251
  role: "group",
219
252
  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
- children: [/* @__PURE__ */ o(Q, {
221
- dataTest: `${r}-select-all`,
222
- "aria-label": U,
223
- checked: p.length > 0 && c.length === p.length,
253
+ children: [/* @__PURE__ */ o(te, {
254
+ dataTest: `${l}-select-all`,
255
+ "aria-label": V,
256
+ checked: h.length > 0 && u.length === h.length,
224
257
  size: "small",
225
258
  hideWrapper: !0,
226
259
  onChange: (e) => {
227
260
  e.stopPropagation();
228
- const t = p.length > 0 && c.length === p.length;
229
- N?.(e, t ? [] : p, t ? "clear" : "selectOption", void 0);
261
+ const t = h.length > 0 && u.length === h.length;
262
+ N?.(e, t ? [] : h, t ? "clear" : "selectOption", void 0);
230
263
  }
231
264
  }), /* @__PURE__ */ o("span", {
232
265
  className: "flex-1 truncate py-2",
233
- children: U
266
+ children: V
234
267
  })]
235
- }), W ? /* @__PURE__ */ o("li", {
268
+ }), U ? /* @__PURE__ */ o("li", {
236
269
  role: "presentation",
237
270
  className: "px-3 py-2 text-sm text-delta-600",
238
- children: le
239
- }) : i.length === 0 ? /* @__PURE__ */ o("li", {
271
+ children: ae
272
+ }) : m.length === 0 ? /* @__PURE__ */ o("li", {
240
273
  role: "presentation",
241
274
  className: "px-3 py-2 text-sm text-delta-600",
242
- children: re
243
- }) : i.map(Ye)]
275
+ children: ie
276
+ }) : m.map(Je)]
244
277
  })
245
278
  })]
246
279
  });
247
280
  }
248
281
  export {
249
- Pt as StyledSelectAutocomplete
282
+ Lt as StyledSelectAutocomplete
250
283
  };
@@ -1,9 +1,9 @@
1
- var _ = "_iconContent_18hf2_30", t = "_thumb_18hf2_68", h = "_icon_18hf2_30", n = {
2
- switch: "_switch_18hf2_1",
1
+ var _ = "_iconContent_5wqb6_30", t = "_thumb_5wqb6_68", n = "_icon_5wqb6_30", o = {
2
+ switch: "_switch_5wqb6_1",
3
3
  iconContent: _,
4
4
  thumb: t,
5
- icon: h
5
+ icon: n
6
6
  };
7
7
  export {
8
- n as default
8
+ o as default
9
9
  };
@@ -1,11 +1,11 @@
1
- var a = "_textarea_1wlak_1", e = "_active_1wlak_1", _ = "_error_1wlak_40", r = "_label_1wlak_80", l = "_disabled_1wlak_88", t = "_description_1wlak_93", d = {
1
+ var a = "_textarea_11htn_1", e = "_active_11htn_1", _ = "_error_11htn_40", r = "_label_11htn_80", t = "_disabled_11htn_88", d = "_description_11htn_93", l = {
2
2
  textarea: a,
3
3
  active: e,
4
4
  error: _,
5
5
  label: r,
6
- disabled: l,
7
- description: t
6
+ disabled: t,
7
+ description: d
8
8
  };
9
9
  export {
10
- d as default
10
+ l as default
11
11
  };
@@ -1,30 +1,31 @@
1
- import l from "./StyledLink.module.js";
1
+ import e from "./StyledLink.module.js";
2
2
  import t from "clsx";
3
3
  import "react";
4
4
  import { jsxs as i } from "react/jsx-runtime";
5
- var g = ({ href: d, disabled: k, size: m = "large", dataTest: n, reflink: y, className: r, content: s, contentNode: a, ...c }) => {
6
- let e = l["styled-link-large"];
5
+ var g = ({ href: d, disabled: k, size: m = "large", dataTest: n, reflink: y, className: r, content: a, contentNode: s, ...c }) => {
6
+ let l = e["styled-link-large"];
7
7
  switch (m) {
8
8
  case "large":
9
- e = l["styled-link-large"];
9
+ l = e["styled-link-large"];
10
10
  break;
11
11
  case "small":
12
- e = l["styled-link-small"];
12
+ l = e["styled-link-small"];
13
13
  break;
14
14
  case "xs":
15
- e = l["styled-link-xs"];
15
+ l = e["styled-link-xs"];
16
16
  break;
17
17
  }
18
18
  return k ? /* @__PURE__ */ i("span", {
19
- className: t(l["styled-link"], l["styled-link-disabled"], e, r),
20
- children: [s, a]
19
+ className: t(e["styled-link"], e["styled-link-disabled"], l, r),
20
+ children: [a, s]
21
21
  }) : /* @__PURE__ */ i("a", {
22
22
  ...c,
23
23
  "data-testid": n,
24
24
  ref: y,
25
25
  href: d,
26
- className: t(l["styled-link"], e, r),
27
- children: [s, a]
26
+ tabIndex: 0,
27
+ className: t(e["styled-link"], l, r),
28
+ children: [a, s]
28
29
  });
29
30
  };
30
31
  export {
@@ -1,9 +1,9 @@
1
1
  var l = {
2
- "styled-link": "_styled-link_f4qlz_1",
3
- "styled-link-disabled": "_styled-link-disabled_f4qlz_16",
4
- "styled-link-xs": "_styled-link-xs_f4qlz_32",
5
- "styled-link-small": "_styled-link-small_f4qlz_37",
6
- "styled-link-large": "_styled-link-large_f4qlz_42"
2
+ "styled-link": "_styled-link_1mhky_1",
3
+ "styled-link-disabled": "_styled-link-disabled_1mhky_14",
4
+ "styled-link-xs": "_styled-link-xs_1mhky_30",
5
+ "styled-link-small": "_styled-link-small_1mhky_35",
6
+ "styled-link-large": "_styled-link-large_1mhky_40"
7
7
  };
8
8
  export {
9
9
  l as default
@@ -1,36 +1,44 @@
1
- import { cn as p } from "../../../helpers/cn.js";
2
- import { consumerOverrides as w } from "../../../helpers/classOverride.js";
3
- import { useEffect as g, useRef as h } from "react";
4
- import { jsx as x } from "react/jsx-runtime";
5
- var m = (o) => o ? Array.from(o.querySelectorAll('[role="menuitem"]:not([aria-disabled="true"])')) : [], I = ({ children: o, className: i, autoFocus: s, disablePadding: u, onClick: c, onKeyDown: a }) => {
6
- const t = h(null), f = w(i, "padding");
7
- g(() => {
8
- s && m(t.current)[0]?.focus();
9
- }, [s]);
10
- const d = (e) => {
11
- if (a?.(e), ![
1
+ import { cn as A } from "../../../helpers/cn.js";
2
+ import { consumerOverrides as h } from "../../../helpers/classOverride.js";
3
+ import { useEffect as b, useRef as k } from "react";
4
+ import { jsx as u } from "react/jsx-runtime";
5
+ var c = (o) => o ? Array.from(o.querySelectorAll('[role="menuitem"]:not([aria-disabled="true"])')) : [], R = ({ children: o, id: a, role: d = "menu", className: s, autoFocus: i, disablePadding: y, onClick: p, onKeyDown: x }) => {
6
+ const t = k(null), f = h(s, "padding");
7
+ b(() => {
8
+ i && c(t.current)[0]?.focus();
9
+ }, [i]);
10
+ const w = (e) => {
11
+ if (x?.(e), ![
12
12
  "ArrowDown",
13
13
  "ArrowUp",
14
14
  "Home",
15
15
  "End"
16
16
  ].includes(e.key)) return;
17
17
  e.preventDefault();
18
- const r = m(t.current);
18
+ const r = c(t.current);
19
19
  if (r.length === 0) return;
20
- const l = r.findIndex((y) => y === document.activeElement);
20
+ const l = r.findIndex((g) => g === document.activeElement);
21
21
  let n = l;
22
22
  e.key === "ArrowDown" ? n = (l + 1) % r.length : e.key === "ArrowUp" ? n = (l - 1 + r.length) % r.length : e.key === "Home" ? n = 0 : e.key === "End" && (n = r.length - 1), r[n]?.focus();
23
+ }, m = {
24
+ id: a,
25
+ className: A("m-0 list-none outline-none", !f && "px-0", !f && (y ? "py-0" : "py-2"), s),
26
+ style: { fontFamily: "Roboto, Helvetica, Arial, sans-serif" },
27
+ onClick: p,
28
+ onKeyDown: w
23
29
  };
24
- return /* @__PURE__ */ x("ul", {
30
+ return d === "listbox" ? /* @__PURE__ */ u("ul", {
31
+ ref: t,
32
+ ...m,
33
+ role: "listbox",
34
+ children: o
35
+ }) : /* @__PURE__ */ u("ul", {
25
36
  ref: t,
37
+ ...m,
26
38
  role: "menu",
27
- className: p("m-0 list-none outline-none", !f && "px-0", !f && (u ? "py-0" : "py-2"), i),
28
- style: { fontFamily: "Roboto, Helvetica, Arial, sans-serif" },
29
- onClick: c,
30
- onKeyDown: d,
31
39
  children: o
32
40
  });
33
41
  };
34
42
  export {
35
- I as StyledMenuList
43
+ R as StyledMenuList
36
44
  };