asma-ui-core 3.86.1 → 3.86.2

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 (42) hide show
  1. package/dist/asma-ui-core.css +1 -1
  2. package/dist/components/data-display/chip/StyledChip.js +28 -27
  3. package/dist/components/data-display/tooltip/StyledTooltip.js +76 -47
  4. package/dist/components/feedback/dialog/StyledDialog.js +62 -58
  5. package/dist/components/feedback/minimizable-dialog/MinimizableDialog.js +113 -105
  6. package/dist/components/feedback/minimizable-dialog/components/FullscreenBtn.js +10 -12
  7. package/dist/components/feedback/minimizable-dialog/v2/MinimizableDialogV2.js +75 -67
  8. package/dist/components/feedback/snack-bar/StyledSnackbar.js +12 -10
  9. package/dist/components/inputs/dynamic-select/components/DynamicSelectAutocomplete.js +69 -71
  10. package/dist/components/inputs/input-field/StyledInputField.js +10 -9
  11. package/dist/components/inputs/phone-field/CountryCodeOptions.js +16 -15
  12. package/dist/components/inputs/phone-field/CountryCodeSelect.js +98 -85
  13. package/dist/components/inputs/phone-field/useCountryPicker.js +44 -24
  14. package/dist/components/inputs/select/StyledSelect.js +15 -14
  15. package/dist/components/inputs/select/StyledSelectItem.js +4 -4
  16. package/dist/components/inputs/select-autocomplete/StyledSelectAutocomplete.js +199 -172
  17. package/dist/components/navigation/listbox/Listbox.js +104 -54
  18. package/dist/components/navigation/menu/StyledMenu.js +22 -18
  19. package/dist/components/navigation/menu/StyledMenuItem.js +6 -6
  20. package/dist/components/utils/accordion/base-ui/StyledAccordionDetails.js +26 -22
  21. package/dist/components/utils/copy-wrapper/CopyWrapper.module.js +2 -2
  22. package/dist/components/utils/popover/StyledPopover.js +102 -52
  23. package/dist/datetime/components/date-picker/StyledDatePicker.js +40 -34
  24. package/dist/datetime/components/date-picker/components/StyledCalendarPicker.js +5 -4
  25. package/dist/datetime/components/time-picker/StyledTimePicker.js +69 -56
  26. package/dist/helpers/focusable.js +5 -0
  27. package/dist/hooks/useFocusTrap.hook.js +24 -19
  28. package/dist/src/components/data-display/chip/StyledChip.d.ts +2 -0
  29. package/dist/src/components/inputs/dynamic-select/StyledDynamicSelect.d.ts +3 -4
  30. package/dist/src/components/inputs/dynamic-select/components/DynamicSelectAutocomplete.test.d.ts +1 -0
  31. package/dist/src/components/inputs/phone-field/CountryCodeOptions.d.ts +1 -1
  32. package/dist/src/components/inputs/phone-field/useCountryPicker.d.ts +5 -2
  33. package/dist/src/components/navigation/listbox/Listbox.d.ts +3 -2
  34. package/dist/src/components/navigation/menu/StyledMenu.d.ts +3 -2
  35. package/dist/src/components/utils/accordion/base-ui/StyledAccordionDetails.d.ts +2 -1
  36. package/dist/src/components/utils/popover/StyledPopover.d.ts +9 -2
  37. package/dist/src/helpers/focusable.d.ts +8 -0
  38. package/dist/src/hooks/useFocusTrap.hook.d.ts +2 -1
  39. package/dist/table/components/columns/action-column/components/RowActionMenu.js +30 -34
  40. package/dist/table/components/table-footer/TablePagination.js +18 -17
  41. package/dist/table/components/table-footer/TableRowCountSelect.js +5 -4
  42. package/package.json +1 -1
@@ -10,35 +10,37 @@ var z = {
10
10
  "bottom-left": "bottom-6 left-6",
11
11
  "bottom-center": "bottom-6 left-1/2 -translate-x-1/2",
12
12
  "bottom-right": "bottom-6 right-6"
13
- }, y = ({ open: e = !1, autoHideDuration: o = 3e3, onClose: f, anchorOrigin: i = {
13
+ }, y = ({ open: e = !1, autoHideDuration: o = 3e3, onClose: i, anchorOrigin: f = {
14
14
  vertical: "bottom",
15
15
  horizontal: "left"
16
16
  }, message: c, action: u, children: p, className: d }) => {
17
- const g = b(), [r, l] = n(!1), [s, a] = n(!1);
17
+ const g = b(), [r, l] = n(!1), [a, s] = n(!1);
18
18
  if (v(() => {
19
- if (!e || o == null || r || s) return;
20
- const t = setTimeout(() => f?.(null, "timeout"), o);
19
+ if (!e || o == null || r || a) return;
20
+ const t = setTimeout(() => i?.(null, "timeout"), o);
21
21
  return () => clearTimeout(t);
22
22
  }, [
23
23
  e,
24
24
  o,
25
- f,
25
+ i,
26
26
  r,
27
- s
27
+ a
28
28
  ]), !e)
29
- return r && l(!1), s && a(!1), null;
30
- const h = z[`${i.vertical}-${i.horizontal}`];
29
+ return r && l(!1), a && s(!1), null;
30
+ const h = z[`${f.vertical}-${f.horizontal}`];
31
31
  return /* @__PURE__ */ m(T, {
32
32
  root: g,
33
33
  children: /* @__PURE__ */ m("div", {
34
34
  className: x("fixed z-[1400] flex items-center gap-2", h, d),
35
35
  onMouseEnter: () => l(!0),
36
36
  onMouseLeave: () => l(!1),
37
- onFocusCapture: () => a(!0),
37
+ onFocusCapture: () => s(!0),
38
38
  onBlurCapture: (t) => {
39
- t.currentTarget.contains(t.relatedTarget) || a(!1);
39
+ t.currentTarget.contains(t.relatedTarget) || s(!1);
40
40
  },
41
41
  children: p ?? /* @__PURE__ */ S("div", {
42
+ role: "status",
43
+ "aria-atomic": "true",
42
44
  className: "flex items-center gap-2 rounded bg-delta-800 px-4 py-3 text-sm text-white shadow-lg",
43
45
  children: [c, u]
44
46
  })
@@ -1,51 +1,51 @@
1
- import { cn as j } from "../../../../helpers/cn.js";
2
- import { LoadingIcon as Y } from "../../../icons/loading-icon/LoadingIcon.js";
3
- import { CheckIcon as Z } from "../../../icons/check-icon/CheckIcon.js";
4
- import { PlusIconCircle as ee } from "../../../icons/plus-icon-circle/PlusIconCircle.js";
5
- import { StyledChip as B } from "../../../data-display/chip/StyledChip.js";
6
- import { StyledCheckbox as te } from "../../checkbox/base-ui/StyledCheckbox.js";
7
- import { StyledTooltip as L } from "../../../data-display/tooltip/StyledTooltip.js";
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 f, useState as ne } from "react";
12
- import { Fragment as E, jsx as l, jsxs as O } from "react/jsx-runtime";
13
- var ye = oe((k, F) => {
14
- const [K, S] = ne(!1), { options: h, dataTest: g, value: x, readOnly: u, multiple: o, required: z, onChange: y, size: H, title: v, noOptionsText: _, placeholder: R, disabled: N, helperText: G, disableHelperText: I, error: A, valueKey: P = "value", labelKey: W = "label", renderLabel: i, getOptionTooltip: D, 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() ?? "", p = f((e) => typeof e == "object" ? e?.[P] : e, [P]), V = f((e, t) => p(e) === p(t), [p]), C = (e) => {
1
+ import { cn as $ } from "../../../../helpers/cn.js";
2
+ import { LoadingIcon as X } from "../../../icons/loading-icon/LoadingIcon.js";
3
+ import { CheckIcon as Y } from "../../../icons/check-icon/CheckIcon.js";
4
+ import { PlusIconCircle as Z } from "../../../icons/plus-icon-circle/PlusIconCircle.js";
5
+ import { StyledChip as j } from "../../../data-display/chip/StyledChip.js";
6
+ import { StyledCheckbox as ee } from "../../checkbox/base-ui/StyledCheckbox.js";
7
+ import { StyledTooltip as D } from "../../../data-display/tooltip/StyledTooltip.js";
8
+ import { StyledInputField as te } from "../../input-field/StyledInputField.js";
9
+ import { StyledSelectAutocomplete as le } from "../../select-autocomplete/StyledSelectAutocomplete.js";
10
+ import { DynamicInteractiveChipGroup as ae } from "./DynamicInteractiveChipGroup.js";
11
+ import { createElement as L, forwardRef as re, useCallback as f, useState as oe } from "react";
12
+ import { Fragment as q, jsx as l, jsxs as C } from "react/jsx-runtime";
13
+ var xe = re((T, E) => {
14
+ const [F, O] = oe(!1), { options: k, dataTest: h, value: g, readOnly: u, multiple: o, required: K, onChange: x, size: z, title: v, noOptionsText: H, placeholder: _, disabled: S, helperText: R, disableHelperText: I, error: N, valueKey: A = "value", labelKey: G = "label", renderLabel: i, getOptionTooltip: P, startAdornment: W, autocompleteProps: n, loading: m, maxTags: J, onFocus: M, onBlur: Q } = T, s = (e) => typeof e == "object" ? e?.[G]?.toString() ?? "" : e?.toString() ?? "", p = f((e) => typeof e == "object" ? e?.[A] : e, [A]), V = f((e, t) => p(e) === p(t), [p]), y = (e) => {
15
15
  const t = p(e);
16
16
  return t == null ? "" : typeof t == "string" || typeof t == "number" || typeof t == "boolean" ? String(t) : e == null ? "" : s(e);
17
- }, $ = f((e) => {
18
- S(!0), n?.onOpen?.(e);
19
- }, [n]), X = f((e, t) => {
20
- S(!1), n?.onClose?.(e, t);
17
+ }, B = f((e) => {
18
+ O(!0), n?.onOpen?.(e);
19
+ }, [n]), U = f((e, t) => {
20
+ O(!1), n?.onClose?.(e, t);
21
21
  }, [n]);
22
- if (o && u) return /* @__PURE__ */ l(re, { ...k });
23
- const T = v ? `${g}-title` : void 0;
24
- return /* @__PURE__ */ O("div", {
22
+ if (o && u) return /* @__PURE__ */ l(ae, { ...T });
23
+ const w = v ? `${h}-title` : void 0;
24
+ return /* @__PURE__ */ C("div", {
25
25
  className: "flex w-full flex-col gap-y-1",
26
26
  children: [v && /* @__PURE__ */ l("span", {
27
- id: T,
27
+ id: w,
28
28
  className: "text-base font-semibold text-delta-800",
29
29
  children: v
30
- }), /* @__PURE__ */ l(ae, {
31
- open: K,
32
- onOpen: $,
33
- onClose: X,
30
+ }), /* @__PURE__ */ l(le, {
31
+ open: F,
32
+ onOpen: B,
33
+ onClose: U,
34
34
  disableCloseOnSelect: o,
35
- dataTest: g,
36
- disabled: !!N || !!m,
37
- noOptionsText: _,
35
+ dataTest: h,
36
+ disabled: !!S || !!m,
37
+ noOptionsText: H,
38
38
  loading: m,
39
39
  readOnly: u,
40
- value: x,
41
- size: H,
42
- disableClearable: z,
43
- options: h,
40
+ value: g,
41
+ size: z,
42
+ disableClearable: K,
43
+ options: k,
44
44
  fullWidth: !0,
45
45
  classes: { listbox: "max-h-[300px]" },
46
46
  getOptionLabel: n?.getOptionLabel ?? s,
47
47
  onChange: (e, t) => {
48
- y(t);
48
+ x(t);
49
49
  },
50
50
  filterSelectedOptions: !1,
51
51
  isOptionEqualToValue: n?.isOptionEqualToValue ?? V,
@@ -53,9 +53,9 @@ var ye = oe((k, F) => {
53
53
  multiple: o,
54
54
  renderValue: o ? (e) => {
55
55
  if (!Array.isArray(e)) return null;
56
- const t = e, d = M ?? h.length, a = t.slice(0, d), c = t.length - d;
57
- return [...a.map((r) => /* @__PURE__ */ l(B, {
58
- dataTest: `${C(r)}-chip`,
56
+ const t = e, d = J ?? k.length, a = t.slice(0, d), c = t.length - d;
57
+ return [...a.map((r) => /* @__PURE__ */ l(j, {
58
+ dataTest: `${y(r)}-chip`,
59
59
  readOnly: u,
60
60
  variant: "outlined",
61
61
  label: i ? i(r) : s(r),
@@ -63,45 +63,47 @@ var ye = oe((k, F) => {
63
63
  root: "h-fit w-fit min-h-[32px]",
64
64
  label: "block whitespace-normal"
65
65
  },
66
- disabled: !!N || !!m,
66
+ disabled: !!S || !!m,
67
+ deleteButtonTabIndex: -1,
67
68
  onDelete: () => {
68
- Array.isArray(x) && y(x.filter((b) => !V(b, r)));
69
+ Array.isArray(g) && x(g.filter((b) => !V(b, r)));
69
70
  }
70
- }, C(r))), c > 0 ? /* @__PURE__ */ l(B, {
71
+ }, y(r))), c > 0 ? /* @__PURE__ */ l(j, {
71
72
  dataTest: "remaining-count-tag-chip",
72
73
  label: `+${c}`,
73
74
  variant: "outlined",
74
- onClick: $
75
+ tabIndex: -1,
76
+ onClick: B
75
77
  }, "remaining-count") : null];
76
78
  } : void 0,
77
- popupIcon: m ? /* @__PURE__ */ l(Y, {
79
+ popupIcon: m ? /* @__PURE__ */ l(X, {
78
80
  height: 24,
79
81
  width: 24
80
- }) : o ? /* @__PURE__ */ l(ee, {
82
+ }) : o ? /* @__PURE__ */ l(Z, {
81
83
  height: 24,
82
84
  width: 24
83
85
  }) : void 0,
84
86
  renderOption: (e, t, d) => {
85
- const a = typeof t == "object" ? !!t?.disabled : !1, c = D ? D(t) : null;
87
+ const a = typeof t == "object" ? !!t?.disabled : !1, c = P ? P(t) : null;
86
88
  if (o) {
87
89
  const b = d.selected;
88
- return /* @__PURE__ */ q("li", {
90
+ return /* @__PURE__ */ L("li", {
89
91
  ...e,
90
92
  role: "option",
91
93
  "aria-selected": b,
92
94
  key: e.id,
93
95
  onClick: a ? void 0 : e.onClick,
94
- className: j("relative flex min-h-10 cursor-pointer items-center gap-x-1 bg-white px-2 text-base aria-selected:bg-gama-50 hover:bg-delta-50", a && "cursor-not-allowed bg-delta-50 aria-selected:!bg-delta-50 hover:!bg-delta-50 [&_*]:cursor-not-allowed"),
96
+ className: $("relative flex min-h-10 cursor-pointer items-center gap-x-1 bg-white px-2 text-base aria-selected:bg-gama-50 hover:bg-delta-50", a && "cursor-not-allowed bg-delta-50 aria-selected:!bg-delta-50 hover:!bg-delta-50 [&_*]:cursor-not-allowed"),
95
97
  "aria-disabled": a
96
98
  }, e["data-active"] !== void 0 && /* @__PURE__ */ l("span", {
97
99
  "aria-hidden": "true",
98
100
  className: "border-l-solid pointer-events-none absolute inset-y-0 left-0 border-l-[3px] border-focus-ring"
99
- }), /* @__PURE__ */ l(L, {
101
+ }), /* @__PURE__ */ l(D, {
100
102
  arrow: !0,
101
103
  title: c,
102
- children: /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ l(te, {
104
+ children: /* @__PURE__ */ C(q, { children: [/* @__PURE__ */ l(ee, {
103
105
  disabled: a,
104
- dataTest: `${C(t)}-checkbox`,
106
+ dataTest: `${y(t)}-checkbox`,
105
107
  size: "small",
106
108
  decorative: !0,
107
109
  className: "min-w-[36px]",
@@ -113,23 +115,23 @@ var ye = oe((k, F) => {
113
115
  }));
114
116
  }
115
117
  const r = d.selected;
116
- return /* @__PURE__ */ q("li", {
118
+ return /* @__PURE__ */ L("li", {
117
119
  ...e,
118
120
  role: "option",
119
121
  "aria-selected": r,
120
122
  key: e.id,
121
- className: j("relative flex min-h-10 cursor-pointer items-center gap-x-1 px-2 text-base aria-selected:bg-gama-50 hover:bg-delta-50", a && "cursor-not-allowed bg-delta-50 aria-selected:!bg-delta-50 hover:!bg-delta-50 [&_*]:cursor-not-allowed"),
123
+ className: $("relative flex min-h-10 cursor-pointer items-center gap-x-1 px-2 text-base aria-selected:bg-gama-50 hover:bg-delta-50", a && "cursor-not-allowed bg-delta-50 aria-selected:!bg-delta-50 hover:!bg-delta-50 [&_*]:cursor-not-allowed"),
122
124
  onClick: a ? void 0 : e.onClick,
123
125
  "aria-disabled": a
124
126
  }, e["data-active"] !== void 0 && /* @__PURE__ */ l("span", {
125
127
  "aria-hidden": "true",
126
128
  className: "border-l-solid pointer-events-none absolute inset-y-0 left-0 border-l-[3px] border-focus-ring"
127
- }), /* @__PURE__ */ l(L, {
129
+ }), /* @__PURE__ */ l(D, {
128
130
  arrow: !0,
129
131
  title: c,
130
- children: /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ l("span", {
132
+ children: /* @__PURE__ */ C(q, { children: [/* @__PURE__ */ l("span", {
131
133
  className: "w-5 min-w-5",
132
- children: r && /* @__PURE__ */ l(Z, {
134
+ children: r && /* @__PURE__ */ l(Y, {
133
135
  className: "size-5 min-h-5 min-w-5 text-gama-500",
134
136
  height: 20,
135
137
  width: 20
@@ -140,34 +142,30 @@ var ye = oe((k, F) => {
140
142
  })] })
141
143
  }));
142
144
  },
143
- renderInput: (e) => /* @__PURE__ */ l(le, {
144
- dataTest: `${g}-input-field`,
145
+ renderInput: (e) => /* @__PURE__ */ l(te, {
146
+ dataTest: `${h}-input-field`,
145
147
  ...e,
146
- inputRef: F,
147
- error: A,
148
- helperText: I ? void 0 : G,
149
- reserveHelperText: I ? !1 : A !== void 0,
148
+ inputRef: E,
149
+ error: N,
150
+ helperText: I ? void 0 : R,
151
+ reserveHelperText: I ? !1 : N !== void 0,
150
152
  variant: "outlined",
151
153
  label: "",
152
- placeholder: R,
154
+ placeholder: _,
153
155
  readOnly: u,
154
- onFocus: Q,
155
- onBlur: U,
156
- onKeyDown: (t) => {
157
- e.onKeyDown(t), w && !t.defaultPrevented && t.key.length === 1 && t.preventDefault();
158
- },
156
+ onFocus: M,
157
+ onBlur: Q,
158
+ onKeyDown: e.onKeyDown,
159
159
  autoComplete: "off",
160
160
  slotProps: {
161
161
  ...e.slotProps,
162
162
  input: {
163
163
  ...e.slotProps?.input ?? {},
164
- startAdornment: J ?? e.slotProps?.input?.startAdornment,
165
- style: w ? { caretColor: "transparent" } : {}
164
+ startAdornment: W ?? e.slotProps?.input?.startAdornment
166
165
  },
167
166
  htmlInput: {
168
167
  ...e.slotProps?.htmlInput ?? {},
169
- ...T ? { "aria-labelledby": T } : {},
170
- style: w ? { caretColor: "transparent" } : {}
168
+ ...w ? { "aria-labelledby": w } : {}
171
169
  }
172
170
  }
173
171
  }),
@@ -176,5 +174,5 @@ var ye = oe((k, F) => {
176
174
  });
177
175
  });
178
176
  export {
179
- ye as DynamicSelectAutocomplete
177
+ xe as DynamicSelectAutocomplete
180
178
  };
@@ -10,7 +10,7 @@ import { Children as at, useCallback as st, useId as rt, useLayoutEffect as Z, u
10
10
  import { jsx as o, jsxs as y } from "react/jsx-runtime";
11
11
  import { useMergeRefs as O } from "@floating-ui/react";
12
12
  var Mt = ({ dataTest: u, label: l, value: h, defaultValue: b, onChange: ee, onBlur: te, onFocus: ne, error: c, helperText: E, reserveHelperText: oe, expandHelperText: ie = !0, disabled: s, readOnly: n, required: v, allowClear: le, onClear: ae, type: se = "text", placeholder: re, name: de, id: ce, autoComplete: pe, autoFocus: ue, multiline: r, rows: N, minRows: H, maxRows: C, size: he = "medium", fullWidth: me, className: ge, style: fe, sx: xe, inputRef: Se, slotProps: t, InputProps: P, onKeyDown: T, onClick: ye, variant: dt }) => {
13
- const be = rt(), R = ce ?? be, $ = `${R}-helper-text`, j = q(null), z = q(null), [He, Le] = D(void 0), [L, K] = D(!1), [Ie, U] = D(b != null && b !== ""), A = h !== void 0, V = A ? h !== "" && h != null : Ie, ve = !!s || !!n, w = t?.input?.startAdornment ?? P?.startAdornment, m = at.count(w) > 0, d = m && Array.isArray(w), g = t?.input?.endAdornment ?? P?.endAdornment, _ = !!(le && V && !ve), { ref: Ne, ...i } = t?.htmlInput ?? {}, Ce = Se ?? Ne, { className: Re, style: B, ref: Ae } = t?.input ?? {}, we = O([Ae]), _e = t?.input?.onMouseDown, W = t?.input?.onClick, Be = W ? { onClick: W } : {}, Fe = pe ?? i.autoComplete, Me = de ?? i.name, I = L || V || m, ke = (e) => {
13
+ const be = rt(), R = ce ?? be, $ = `${R}-helper-text`, j = q(null), z = q(null), [He, Ie] = D(void 0), [I, K] = D(!1), [Le, U] = D(b != null && b !== ""), A = h !== void 0, V = A ? h !== "" && h != null : Le, ve = !!s || !!n, w = t?.input?.startAdornment ?? P?.startAdornment, m = at.count(w) > 0, d = m && Array.isArray(w), g = t?.input?.endAdornment ?? P?.endAdornment, _ = !!(le && V && !ve), { ref: Ne, ...i } = t?.htmlInput ?? {}, Ce = Se ?? Ne, { className: Re, style: B, ref: Ae } = t?.input ?? {}, we = O([Ae]), _e = t?.input?.onMouseDown, W = t?.input?.onClick, Be = W ? { onClick: W } : {}, Fe = pe ?? i.autoComplete, Me = de ?? i.name, L = I || V || m, ke = (e) => {
14
14
  n || (A || U(e.target.value !== ""), ee?.(e));
15
15
  }, De = (e) => {
16
16
  !s && !n && K(!0), ne?.(e);
@@ -50,9 +50,9 @@ var Mt = ({ dataTest: u, label: l, value: h, defaultValue: b, onChange: ee, onBl
50
50
  Z(() => {
51
51
  if (!f) return;
52
52
  const e = z.current, p = e ? Math.ceil(e.getBoundingClientRect().width) + 20 : void 0;
53
- Le((x) => x === p ? x : p);
53
+ Ie((x) => x === p ? x : p);
54
54
  });
55
- const Ue = I || !l, { show: M, role: Ve } = et("StyledInputField", c, E, oe, n), { fieldRef: We, rowRef: Ye, rowStyle: Ge } = Oe(ie && M), G = {
55
+ const Ue = L || !l, { show: M, role: Ve } = et("StyledInputField", c, E, oe, n), { fieldRef: We, rowRef: Ye, rowStyle: Ge } = Oe(ie && M), G = {
56
56
  ...Pe,
57
57
  style: f ? Ke : F,
58
58
  id: i.id ?? R,
@@ -119,6 +119,7 @@ var Mt = ({ dataTest: u, label: l, value: h, defaultValue: b, onChange: ee, onBl
119
119
  }),
120
120
  _ ? /* @__PURE__ */ o("button", {
121
121
  type: "button",
122
+ tabIndex: -1,
122
123
  "aria-label": "Clear",
123
124
  "data-testid": `${u}-clear`,
124
125
  className: "absolute right-4 z-40 flex items-center justify-center rounded-full border-0 bg-transparent p-[2px] duration-300 hover:bg-gama-100",
@@ -137,14 +138,14 @@ var Mt = ({ dataTest: u, label: l, value: h, defaultValue: b, onChange: ee, onBl
137
138
  l ? /* @__PURE__ */ o("fieldset", {
138
139
  "aria-hidden": !0,
139
140
  className: X({
140
- focused: L,
141
+ focused: I,
141
142
  error: c,
142
143
  disabled: s,
143
144
  readOnly: n,
144
145
  notched: !0
145
146
  }),
146
147
  children: /* @__PURE__ */ o("legend", {
147
- className: ot(I),
148
+ className: ot(L),
148
149
  children: /* @__PURE__ */ y("span", {
149
150
  className: "inline-block px-[5px]",
150
151
  children: [l, v && " *"]
@@ -153,7 +154,7 @@ var Mt = ({ dataTest: u, label: l, value: h, defaultValue: b, onChange: ee, onBl
153
154
  }) : /* @__PURE__ */ o("div", {
154
155
  "aria-hidden": !0,
155
156
  className: X({
156
- focused: L,
157
+ focused: I,
157
158
  error: c,
158
159
  disabled: s,
159
160
  readOnly: n,
@@ -164,8 +165,8 @@ var Mt = ({ dataTest: u, label: l, value: h, defaultValue: b, onChange: ee, onBl
164
165
  }), l && /* @__PURE__ */ y("label", {
165
166
  htmlFor: R,
166
167
  className: a(tt({
167
- shrink: I,
168
- focused: L,
168
+ shrink: L,
169
+ focused: I,
169
170
  error: c,
170
171
  disabled: s,
171
172
  readOnly: n,
@@ -174,7 +175,7 @@ var Mt = ({ dataTest: u, label: l, value: h, defaultValue: b, onChange: ee, onBl
174
175
  style: {
175
176
  ...k(t?.inputLabel?.sx),
176
177
  ...t?.inputLabel?.style,
177
- ...nt(I)
178
+ ...nt(L)
178
179
  },
179
180
  children: [l, v && " *"]
180
181
  })]
@@ -1,28 +1,29 @@
1
- import { cn as i } from "../../../helpers/cn.js";
2
- import { StyledSelectItem as u } from "../select/StyledSelectItem.js";
1
+ import { cn as u } from "../../../helpers/cn.js";
2
+ import { StyledSelectItem as h } from "../select/StyledSelectItem.js";
3
3
  import { useEffect as x, useRef as N } from "react";
4
- import { jsx as l, jsxs as o } from "react/jsx-runtime";
5
- var j = ({ dataTest: m, visible: n, selectedIso2: d, activeIndex: s, optionId: r, onSelect: c, listId: f, label: p, renderFlag: b, className: h }) => {
4
+ import { jsx as l, jsxs as i } from "react/jsx-runtime";
5
+ var j = ({ dataTest: o, visible: m, selectedIso2: n, activeIndex: s, optionId: r, onSelect: c, listId: d, label: f, renderFlag: p, className: b }) => {
6
6
  const a = N(null);
7
7
  return x(() => {
8
- a.current?.querySelector(`#${CSS.escape(r(s))}`)?.scrollIntoView({ block: "nearest" });
8
+ s !== null && a.current?.querySelector(`#${CSS.escape(r(s))}`)?.scrollIntoView({ block: "nearest" });
9
9
  }), /* @__PURE__ */ l("ul", {
10
10
  ref: a,
11
- id: f,
11
+ id: d,
12
12
  role: "listbox",
13
- "aria-label": p,
14
- "data-testid": `${m}-listbox`,
15
- className: i("m-0 min-h-0 flex-1 list-none overflow-y-auto p-0", h),
16
- children: n.map((e, t) => /* @__PURE__ */ l(u, {
13
+ "aria-label": f,
14
+ "data-testid": `${o}-listbox`,
15
+ className: u("m-0 min-h-0 flex-1 list-none overflow-y-auto p-0", b),
16
+ children: m.map((e, t) => /* @__PURE__ */ l(h, {
17
17
  id: r(t),
18
- selected: e.iso2 === d,
18
+ selected: e.iso2 === n,
19
+ active: t === s,
19
20
  onClick: () => c(e.iso2),
20
- className: i("border-0 border-b border-solid border-delta-100", t === s && "bg-delta-50"),
21
- children: /* @__PURE__ */ o("span", {
21
+ className: "border-0 border-b border-solid border-delta-100",
22
+ children: /* @__PURE__ */ i("span", {
22
23
  className: "flex w-full items-center justify-between gap-2",
23
- children: [/* @__PURE__ */ o("span", {
24
+ children: [/* @__PURE__ */ i("span", {
24
25
  className: "flex min-w-0 items-center gap-2",
25
- children: [b?.(e.iso2, "eager"), /* @__PURE__ */ l("span", {
26
+ children: [p?.(e.iso2, "eager"), /* @__PURE__ */ l("span", {
26
27
  className: "truncate",
27
28
  children: e.name
28
29
  })]