asma-ui-core 3.86.1 → 3.87.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 (50) hide show
  1. package/dist/asma-ui-core.css +1 -1
  2. package/dist/components/custom/pathfinder-card/PathfinderCard.js +28 -28
  3. package/dist/components/data-display/chip/StyledChip.js +33 -32
  4. package/dist/components/data-display/tooltip/StyledTooltip.js +76 -47
  5. package/dist/components/feedback/dialog/StyledDialog.js +62 -58
  6. package/dist/components/feedback/minimizable-dialog/MinimizableDialog.js +113 -105
  7. package/dist/components/feedback/minimizable-dialog/components/FullscreenBtn.js +10 -12
  8. package/dist/components/feedback/minimizable-dialog/v2/MinimizableDialogV2.js +75 -67
  9. package/dist/components/feedback/snack-bar/StyledSnackbar.js +12 -10
  10. package/dist/components/feedback/snack-bar/components/StyledInfoSnackbar.js +10 -10
  11. package/dist/components/inputs/dynamic-select/components/DynamicSelectAutocomplete.js +69 -71
  12. package/dist/components/inputs/input-field/StyledInputField.js +25 -24
  13. package/dist/components/inputs/phone-field/CountryCodeOptions.js +16 -15
  14. package/dist/components/inputs/phone-field/CountryCodeSelect.js +98 -85
  15. package/dist/components/inputs/phone-field/useCountryPicker.js +44 -24
  16. package/dist/components/inputs/search-field/StyledSearchField.js +10 -10
  17. package/dist/components/inputs/select/StyledSelect.js +16 -15
  18. package/dist/components/inputs/select/StyledSelectItem.js +9 -9
  19. package/dist/components/inputs/select-autocomplete/StyledSelectAutocomplete.js +202 -175
  20. package/dist/components/inputs/switch/base-ui/StyledSwitch.js +22 -22
  21. package/dist/components/navigation/link/StyledLink.js +8 -8
  22. package/dist/components/navigation/listbox/Listbox.js +105 -54
  23. package/dist/components/navigation/menu/StyledMenu.js +22 -18
  24. package/dist/components/navigation/menu/StyledMenuItem.js +6 -6
  25. package/dist/components/navigation/title-chevron/StyledTitleChevron.js +7 -7
  26. package/dist/components/utils/accordion/base-ui/StyledAccordionDetails.js +26 -22
  27. package/dist/components/utils/accordion/base-ui/StyledAccordionSummary.js +14 -14
  28. package/dist/components/utils/copy-wrapper/CopyWrapper.module.js +2 -2
  29. package/dist/components/utils/popover/StyledPopover.js +102 -52
  30. package/dist/datetime/components/date-picker/StyledDatePicker.js +40 -34
  31. package/dist/datetime/components/date-picker/components/StyledCalendarPicker.js +5 -4
  32. package/dist/datetime/components/time-picker/StyledTimePicker.js +69 -56
  33. package/dist/helpers/focusable.js +5 -0
  34. package/dist/hooks/useFocusTrap.hook.js +24 -19
  35. package/dist/src/components/data-display/chip/StyledChip.d.ts +2 -0
  36. package/dist/src/components/inputs/dynamic-select/StyledDynamicSelect.d.ts +3 -4
  37. package/dist/src/components/inputs/dynamic-select/components/DynamicSelectAutocomplete.test.d.ts +1 -0
  38. package/dist/src/components/inputs/phone-field/CountryCodeOptions.d.ts +1 -1
  39. package/dist/src/components/inputs/phone-field/useCountryPicker.d.ts +5 -2
  40. package/dist/src/components/navigation/listbox/Listbox.d.ts +3 -2
  41. package/dist/src/components/navigation/menu/StyledMenu.d.ts +3 -2
  42. package/dist/src/components/utils/accordion/base-ui/StyledAccordionDetails.d.ts +2 -1
  43. package/dist/src/components/utils/popover/StyledPopover.d.ts +9 -2
  44. package/dist/src/helpers/focusable.d.ts +8 -0
  45. package/dist/src/hooks/useFocusTrap.hook.d.ts +2 -1
  46. package/dist/table/components/columns/action-column/components/RowActionMenu.js +30 -34
  47. package/dist/table/components/table-footer/TablePagination.js +18 -17
  48. package/dist/table/components/table-footer/TableRowCountSelect.js +5 -4
  49. package/package.json +1 -1
  50. package/src/styles/touchHardening.interaction.test.tsx +269 -0
@@ -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
  })
@@ -2,22 +2,22 @@ import { omit as m } from "../../../../helpers/omit.js";
2
2
  import { LoadingIcon as d } from "../../../icons/loading-icon/LoadingIcon.js";
3
3
  import { CloseIcon as p } from "../../../icons/close-icon/CloseIcon.js";
4
4
  import u from "clsx";
5
- import { forwardRef as f } from "react";
6
- import { jsx as r, jsxs as g } from "react/jsx-runtime";
7
- import { SnackbarContent as h, useSnackbar as b } from "notistack";
8
- var I = f((t, e) => {
9
- const { id: i, message: o, closeButton: n, type: a, ...s } = m(t, [
5
+ import { forwardRef as h } from "react";
6
+ import { jsx as r, jsxs as f } from "react/jsx-runtime";
7
+ import { SnackbarContent as g, useSnackbar as b } from "notistack";
8
+ var I = h((t, e) => {
9
+ const { id: i, message: o, closeButton: a, type: n, ...s } = m(t, [
10
10
  "anchorOrigin",
11
11
  "autoHideDuration",
12
12
  "hideIconVariant",
13
13
  "iconVariant",
14
14
  "persist"
15
- ]), { closeSnackbar: c } = b(), l = a === "loading";
16
- return /* @__PURE__ */ r(h, {
15
+ ]), { closeSnackbar: c } = b(), l = n === "loading";
16
+ return /* @__PURE__ */ r(g, {
17
17
  ref: e,
18
18
  role: "alert",
19
19
  ...s,
20
- children: /* @__PURE__ */ g("div", {
20
+ children: /* @__PURE__ */ f("div", {
21
21
  className: u("flex w-full items-center justify-center gap-1"),
22
22
  children: [
23
23
  l ? /* @__PURE__ */ r(d, {
@@ -28,9 +28,9 @@ var I = f((t, e) => {
28
28
  className: typeof o == "string" || typeof o == "number" ? "pl-1 pr-2" : void 0,
29
29
  children: o
30
30
  }),
31
- n ? /* @__PURE__ */ r("button", {
31
+ a ? /* @__PURE__ */ r("button", {
32
32
  "aria-label": "Close",
33
- className: "grid size-8 cursor-pointer place-items-center rounded border-0 bg-transparent text-white transition-colors duration-300 ease-in-out hover:bg-gama-500 active:bg-gama-500",
33
+ className: "asma-touch-ready grid size-8 cursor-pointer place-items-center rounded border-0 bg-transparent text-white transition-colors duration-300 ease-in-out hover:bg-gama-500 active:bg-gama-500",
34
34
  onClick: () => c(i),
35
35
  type: "button",
36
36
  children: /* @__PURE__ */ r(p, {
@@ -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
  };
@@ -9,8 +9,8 @@ import S from "./StyledInputField.module.js";
9
9
  import { Children as at, useCallback as st, useId as rt, useLayoutEffect as Z, useRef as q, useState as D } from "react";
10
10
  import { jsx as o, jsxs as y } from "react/jsx-runtime";
11
11
  import { useMergeRefs as O } from "@floating-ui/react";
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) => {
12
+ var Mt = ({ dataTest: m, label: l, value: u, 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: me, multiline: r, rows: N, minRows: H, maxRows: C, size: ue = "medium", fullWidth: he, 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, Ie] = D(void 0), [I, K] = D(!1), [Le, U] = D(b != null && b !== ""), A = u !== void 0, V = A ? u !== "" && u != null : Le, ve = !!s || !!n, w = t?.input?.startAdornment ?? P?.startAdornment, h = at.count(w) > 0, d = h && 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 || h, ke = (e) => {
14
14
  n || (A || U(e.target.value !== ""), ee?.(e));
15
15
  }, De = (e) => {
16
16
  !s && !n && K(!0), ne?.(e);
@@ -29,11 +29,11 @@ var Mt = ({ dataTest: u, label: l, value: h, defaultValue: b, onChange: ee, onBl
29
29
  H,
30
30
  r,
31
31
  N,
32
- h
32
+ u
33
33
  ]);
34
34
  const Y = O([Ce, st((e) => {
35
35
  j.current = e instanceof HTMLTextAreaElement ? e : null;
36
- }, [])]), { style: F, ...Pe } = i, f = !r && !d, { height: ct, minHeight: pt, maxHeight: ut, paddingTop: ht, paddingBottom: mt, ...Te } = B ?? {}, $e = f ? {
36
+ }, [])]), { style: F, ...Pe } = i, f = !r && !d, { height: ct, minHeight: pt, maxHeight: mt, paddingTop: ut, paddingBottom: ht, ...Te } = B ?? {}, $e = f ? {
37
37
  ...Te,
38
38
  ...lt()
39
39
  } : d ? {
@@ -43,16 +43,16 @@ var Mt = ({ dataTest: u, label: l, value: h, defaultValue: b, onChange: ee, onBl
43
43
  } : B, { height: gt, minHeight: ft, maxHeight: xt, paddingTop: St, paddingBottom: yt, paddingLeft: bt, paddingRight: je, ...ze } = F ?? {}, Ke = f ? {
44
44
  ...ze,
45
45
  ...it({
46
- paddingLeft: m ? 40 : 14,
46
+ paddingLeft: h ? 40 : 14,
47
47
  paddingRight: je ?? He ?? (_ || g ? 40 : 14)
48
48
  })
49
49
  } : F;
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,
@@ -62,8 +62,8 @@ var Mt = ({ dataTest: u, label: l, value: h, defaultValue: b, onChange: ee, onBl
62
62
  readOnly: n,
63
63
  required: v,
64
64
  autoComplete: Fe,
65
- autoFocus: ue,
66
- value: h,
65
+ autoFocus: me,
66
+ value: u,
67
67
  defaultValue: b,
68
68
  "aria-invalid": c ? !0 : void 0,
69
69
  "aria-label": i["aria-label"] ?? (i["aria-labelledby"] ? void 0 : typeof l == "string" && l !== "" ? l : void 0),
@@ -75,7 +75,7 @@ var Mt = ({ dataTest: u, label: l, value: h, defaultValue: b, onChange: ee, onBl
75
75
  T?.(e), e.defaultPrevented || i.onKeyDown?.(e);
76
76
  } : void 0
77
77
  }, J = a(S.Input, "peer border-0 bg-transparent text-base tracking-[0.00938em] text-delta-800 outline-none placeholder:text-delta-500", d ? "box-border h-8 min-w-[60px] flex-1 py-0 pl-0 pr-0 leading-[23px]" : r ? "w-full resize-none overflow-hidden p-0 pl-0 pr-0 leading-[23px]" : a("w-full", S["Input--singleLine"]), "disabled:text-delta-300", n && "text-delta-800", Re), Je = !r && !d ? {
78
- "data-start-adornment": m ? "true" : void 0,
78
+ "data-start-adornment": h ? "true" : void 0,
79
79
  "data-end-adornment": _ || g ? "true" : void 0
80
80
  } : {};
81
81
  return /* @__PURE__ */ y("div", {
@@ -83,7 +83,7 @@ var Mt = ({ dataTest: u, label: l, value: h, defaultValue: b, onChange: ee, onBl
83
83
  className: a("group relative inline-flex flex-col", ge),
84
84
  onClick: ye,
85
85
  style: {
86
- width: me ? "100%" : 235,
86
+ width: he ? "100%" : 235,
87
87
  fontFamily: "Roboto, Helvetica, Arial, sans-serif",
88
88
  letterSpacing: "0.00938em",
89
89
  ...k(xe),
@@ -97,31 +97,32 @@ var Mt = ({ dataTest: u, label: l, value: h, defaultValue: b, onChange: ee, onBl
97
97
  onMouseDown: _e,
98
98
  ...Be,
99
99
  style: $e,
100
- "data-testid": d ? `${u}-adornment-list` : `${u}-shell`,
100
+ "data-testid": d ? `${m}-adornment-list` : `${m}-shell`,
101
101
  children: [
102
- m && /* @__PURE__ */ o("span", {
102
+ h && /* @__PURE__ */ o("span", {
103
103
  className: a("items-center text-delta-500", d ? "contents" : "absolute left-3 flex"),
104
104
  children: w
105
105
  }),
106
106
  r ? /* @__PURE__ */ o("textarea", {
107
107
  ...G,
108
108
  ref: Y,
109
- "data-testid": u,
109
+ "data-testid": m,
110
110
  rows: N ?? H ?? 2,
111
111
  className: J
112
112
  }) : /* @__PURE__ */ o("input", {
113
113
  ...G,
114
114
  ...Je,
115
115
  ref: Y,
116
- "data-testid": u,
116
+ "data-testid": m,
117
117
  type: se,
118
118
  className: J
119
119
  }),
120
120
  _ ? /* @__PURE__ */ o("button", {
121
121
  type: "button",
122
+ tabIndex: -1,
122
123
  "aria-label": "Clear",
123
- "data-testid": `${u}-clear`,
124
- 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",
124
+ "data-testid": `${m}-clear`,
125
+ className: "asma-pressable absolute right-4 z-40 flex items-center justify-center rounded-full border-0 bg-transparent p-[2px] duration-300 hover:bg-gama-100",
125
126
  onClick: (e) => {
126
127
  e.stopPropagation(), e.preventDefault(), A || U(!1), ae?.();
127
128
  },
@@ -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,17 +165,17 @@ 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,
172
- size: he
173
+ size: ue
173
174
  }), t?.inputLabel?.className),
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
  })]