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,59 +1,59 @@
1
1
  import { cn as i } from "../../../helpers/cn.js";
2
- import { resolveSx as $ } from "../../../helpers/sx.js";
3
- import { CloseIcon as E } from "../../icons/close-icon/CloseIcon.js";
4
- import { consumerOverrides as x } from "../../../helpers/classOverride.js";
5
- import { getChipPadding as L } from "./chipPadding.js";
6
- import { forwardRef as U } from "react";
7
- import { jsx as m, jsxs as q } from "react/jsx-runtime";
8
- var Y = U(({ dataTest: f, label: c, size: e = "medium", disabled: t, readOnly: o, clickable: b, icon: w, avatar: u, deleteIcon: _, onDelete: s, onClick: l, onMouseDown: k, onMouseUp: y, className: p, classes: r, sx: S, tabIndex: v, "aria-label": j, role: h, "aria-checked": R, "aria-readonly": B, "data-hovered": C, "data-focus": D, variant: A, color: F }, M) => {
9
- const n = !o && !t && (!!b || !!l), g = u ?? w, d = L(e, !!g, !!(s && !o)), N = {
2
+ import { resolveSx as E } from "../../../helpers/sx.js";
3
+ import { CloseIcon as L } from "../../icons/close-icon/CloseIcon.js";
4
+ import { consumerOverrides as w } from "../../../helpers/classOverride.js";
5
+ import { getChipPadding as U } from "./chipPadding.js";
6
+ import { forwardRef as q } from "react";
7
+ import { jsx as s, jsxs as A } from "react/jsx-runtime";
8
+ var Z = q(({ dataTest: u, label: c, size: r = "medium", disabled: t, readOnly: o, clickable: x, icon: _, avatar: g, deleteIcon: k, onDelete: m, onClick: l, onMouseDown: y, onMouseUp: S, className: h, classes: a, sx: j, tabIndex: v, "aria-label": D, role: p, "aria-checked": R, "aria-readonly": B, "data-hovered": C, "data-focus": M, variant: F, color: G }, N) => {
9
+ const n = !o && !t && (!!x || !!l), f = g ?? _, b = !!(m && !o), d = U(r, !!f, b), I = {
10
10
  paddingTop: d.top,
11
11
  paddingRight: d.right,
12
12
  paddingBottom: d.bottom,
13
13
  paddingLeft: d.left
14
- }, I = (a) => {
15
- a.stopPropagation(), s?.(a);
16
- }, K = (a) => {
17
- n && (a.key === "Enter" || a.key === " ") && (a.preventDefault(), l?.(a));
18
- }, P = x(p, "width"), W = x(p, "max-width");
19
- return /* @__PURE__ */ q("div", {
20
- ref: M,
21
- "data-testid": f,
22
- "aria-label": j,
14
+ }, K = (e) => {
15
+ e.stopPropagation(), m?.(e);
16
+ }, P = (e) => {
17
+ n && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), l?.(e));
18
+ }, W = w(h, "width"), $ = w(h, "max-width");
19
+ return /* @__PURE__ */ A("div", {
20
+ ref: N,
21
+ "data-testid": u,
22
+ "aria-label": D,
23
23
  "data-hovered": C,
24
- "data-focus": D,
25
- role: h ?? (n ? "button" : void 0),
26
- "aria-checked": h ? R : void 0,
27
- "aria-readonly": h ? B : void 0,
28
- tabIndex: n ? v ?? 0 : v,
24
+ "data-focus": M,
25
+ role: p ?? (n ? "button" : void 0),
26
+ "aria-checked": p ? R : void 0,
27
+ "aria-readonly": p ? B : void 0,
28
+ tabIndex: o ? void 0 : n ? v ?? 0 : v,
29
29
  onClick: t || o ? void 0 : l,
30
- onKeyDown: t || o ? void 0 : K,
31
- onMouseDown: t || o ? void 0 : k,
32
- onMouseUp: t || o ? void 0 : y,
33
- className: i("box-border inline-flex items-center gap-1 rounded-[25px] border border-solid border-delta-300 bg-white text-base text-delta-700", !P && "w-fit", !W && "max-w-full", e === "small" ? "h-6" : "h-8", o && "pointer-events-none", t && "pointer-events-none opacity-[0.38]", n && i("cursor-pointer outline-none", "data-[hovered]:border-gama-200 data-[hovered]:bg-gama-25 hover:border-gama-200 hover:bg-gama-25", "focus:!border-gama-400 focus:bg-gama-25 focus:shadow-[0_0_0_1px_var(--colors-gama-400)]", "data-[focus]:!border-gama-400 data-[focus]:bg-gama-25 data-[focus]:shadow-[0_0_0_1px_var(--colors-gama-400)]", "active:!border-gama-400 active:bg-gama-25 active:shadow-[0_0_0_2px_var(--colors-gama-400)]"), r?.root, p),
30
+ onKeyDown: t || o ? void 0 : P,
31
+ onMouseDown: t || o ? void 0 : y,
32
+ onMouseUp: t || o ? void 0 : S,
33
+ className: i("box-border inline-flex items-center gap-1 rounded-[25px] border border-solid border-delta-300 bg-white text-base text-delta-700", !W && "w-fit", !$ && "max-w-full", r === "small" ? "h-6" : "h-8", o && "pointer-events-none", t && "pointer-events-none opacity-[0.38]", "data-[focus]:!border-focus-ring data-[focus]:bg-gama-25 data-[focus]:shadow-[inset_0_0_0_2px_var(--colors-focus-ring)]", b && "focus-within:!border-focus-ring focus-within:bg-gama-25 focus-within:shadow-[inset_0_0_0_2px_var(--colors-focus-ring)]", n && i("cursor-pointer outline-none", "data-[hovered]:border-gama-200 data-[hovered]:bg-gama-25 hover:border-gama-200 hover:bg-gama-25", "focus-visible:!border-focus-ring focus-visible:bg-gama-25 focus-visible:shadow-[inset_0_0_0_2px_var(--colors-focus-ring)]", "active:!border-gama-400 active:bg-gama-25 active:shadow-[0_0_0_2px_var(--colors-gama-400)]"), a?.root, h),
34
34
  style: {
35
- ...N,
36
- ...$(S)
35
+ ...I,
36
+ ...E(j)
37
37
  },
38
38
  children: [
39
- g && /* @__PURE__ */ m("span", {
40
- className: i("flex shrink-0 items-center justify-center", e === "small" ? "h-[18px] w-[18px]" : "h-6 w-6", u ? r?.avatar : r?.icon),
41
- children: g
39
+ f && /* @__PURE__ */ s("span", {
40
+ className: i("flex shrink-0 items-center justify-center", r === "small" ? "h-[18px] w-[18px]" : "h-6 w-6", g ? a?.avatar : a?.icon),
41
+ children: f
42
42
  }),
43
- /* @__PURE__ */ m("span", {
44
- className: i("min-w-0 truncate", r?.label),
43
+ /* @__PURE__ */ s("span", {
44
+ className: i("min-w-0 truncate", a?.label),
45
45
  children: c
46
46
  }),
47
- s && !o && /* @__PURE__ */ m("button", {
47
+ m && !o && /* @__PURE__ */ s("button", {
48
48
  type: "button",
49
- "data-testid": `${f}-delete`,
49
+ "data-testid": `${u}-delete`,
50
50
  "aria-label": typeof c == "string" ? `Remove ${c}` : "Remove",
51
- onClick: I,
51
+ onClick: K,
52
52
  disabled: t,
53
- className: i("flex shrink-0 items-center justify-center rounded-full border border-solid border-delta-100 bg-delta-50 p-0 text-delta-700", e === "small" ? "h-[18px] w-[18px]" : "h-5 w-5", r?.deleteIcon),
54
- children: _ ?? /* @__PURE__ */ m(E, {
55
- height: e === "small" ? 14 : 16,
56
- width: e === "small" ? 14 : 16,
53
+ className: i("flex shrink-0 items-center justify-center rounded-full border border-solid border-delta-100 bg-delta-50 p-0 text-delta-700 [outline:none]", r === "small" ? "h-[18px] w-[18px]" : "h-5 w-5", a?.deleteIcon),
54
+ children: k ?? /* @__PURE__ */ s(L, {
55
+ height: r === "small" ? 14 : 16,
56
+ width: r === "small" ? 14 : 16,
57
57
  className: "min-w-0 shrink-0"
58
58
  })
59
59
  })
@@ -61,5 +61,5 @@ var Y = U(({ dataTest: f, label: c, size: e = "medium", disabled: t, readOnly: o
61
61
  });
62
62
  });
63
63
  export {
64
- Y as StyledChip
64
+ Z as StyledChip
65
65
  };
@@ -1,16 +1,16 @@
1
- var _ = "_contained_2qc3y_6", t = "_common_2qc3y_6", a = "_medium_2qc3y_44", e = "_small_2qc3y_51", r = "_large_2qc3y_58", c = "_error_2qc3y_70", o = "_outlined_2qc3y_134", y = "_text_2qc3y_262", m = "_textGray_2qc3y_388", l = "_textWhite_2qc3y_451", u = {
2
- "asma-ui-core-button": "_asma-ui-core-button_2qc3y_1",
1
+ var _ = "_contained_lpch6_6", t = "_common_lpch6_6", a = "_medium_lpch6_55", e = "_small_lpch6_62", r = "_large_lpch6_69", l = "_error_lpch6_81", c = "_outlined_lpch6_156", o = "_text_lpch6_306", h = "_textGray_lpch6_456", m = "_textWhite_lpch6_531", p = {
2
+ "asma-ui-core-button": "_asma-ui-core-button_lpch6_1",
3
3
  contained: _,
4
4
  common: t,
5
5
  medium: a,
6
6
  small: e,
7
7
  large: r,
8
- error: c,
9
- outlined: o,
10
- text: y,
11
- textGray: m,
12
- textWhite: l
8
+ error: l,
9
+ outlined: c,
10
+ text: o,
11
+ textGray: h,
12
+ textWhite: m
13
13
  };
14
14
  export {
15
- u as default
15
+ p as default
16
16
  };
@@ -1,21 +1,21 @@
1
1
  import { cn as C } from "../../../../helpers/cn.js";
2
2
  import e from "./StyledCheckbox.module.js";
3
- import B, { useEffect as x, useRef as v } from "react";
4
- import { Fragment as D, jsx as r, jsxs as b } from "react/jsx-runtime";
5
- var F = (n) => /* @__PURE__ */ r("svg", {
3
+ import F, { useEffect as x, useRef as b } from "react";
4
+ import { Fragment as K, jsx as t, jsxs as v } from "react/jsx-runtime";
5
+ var M = (o) => /* @__PURE__ */ t("svg", {
6
6
  "aria-hidden": "true",
7
7
  viewBox: "0 0 24 24",
8
8
  width: "100%",
9
9
  height: "100%",
10
10
  fill: "none",
11
- ...n,
12
- children: /* @__PURE__ */ r("path", {
11
+ ...o,
12
+ children: /* @__PURE__ */ t("path", {
13
13
  d: "M6 12H18",
14
14
  stroke: "currentColor",
15
- strokeWidth: n.strokeWidth ?? 3,
15
+ strokeWidth: o.strokeWidth ?? 3,
16
16
  strokeLinecap: "round"
17
17
  })
18
- }), M = (n) => /* @__PURE__ */ r("svg", {
18
+ }), S = (o) => /* @__PURE__ */ t("svg", {
19
19
  "aria-hidden": "true",
20
20
  viewBox: "0 0 24 24",
21
21
  width: "100%",
@@ -25,63 +25,66 @@ var F = (n) => /* @__PURE__ */ r("svg", {
25
25
  strokeWidth: 2,
26
26
  strokeLinecap: "round",
27
27
  strokeLinejoin: "round",
28
- ...n,
29
- children: /* @__PURE__ */ r("path", { d: "M4 12l5 5L20 6" })
30
- }), z = ({ dataTest: n, size: l = "medium", disabled: d, readOnly: a, error: g, indeterminate: t = !1, checked: p, disableRipple: R, hideWrapper: N, className: w, checkboxClassName: I, onChange: W, onClick: E, decorative: L, ...H }) => {
31
- const s = !!N, c = !R && !s && !d && !a, h = v(null), u = v(null);
28
+ ...o,
29
+ children: /* @__PURE__ */ t("path", { d: "M4 12l5 5L20 6" })
30
+ }), G = ({ dataTest: o, size: l = "small", disabled: d, readOnly: a, error: g, indeterminate: n = !1, checked: p, disableRipple: w, hideWrapper: R, className: N, checkboxClassName: I, onChange: W, onClick: E, onKeyDown: D, decorative: L, ...y }) => {
31
+ const c = !!R, s = !w && !c && !d && !a, h = b(null), u = b(null);
32
32
  x(() => {
33
- h.current && (h.current.indeterminate = t);
34
- }, [t]);
35
- const k = C(e.CheckboxWrapper, !s && e[`size-${l}`], s && e.HideWrapper, t && e.Indeterminate, a && e.ReadOnly, g && e.Error, c && e.CheckboxHover, w), j = C(e.Checkbox, e[`size-${l}`], t && e.Indeterminate, I), P = t ? F : M, $ = B.useCallback((o) => {
36
- if (o.stopPropagation(), !c) return;
33
+ h.current && (h.current.indeterminate = n);
34
+ }, [n]);
35
+ const k = C(e.CheckboxWrapper, !c && e[`size-${l}`], c && e.HideWrapper, n && e.Indeterminate, a && e.ReadOnly, g && e.Error, s && e.CheckboxHover, N), H = C(e.Checkbox, e[`size-${l}`], n && e.Indeterminate, I), P = n ? M : S, j = F.useCallback((r) => {
36
+ if (r.stopPropagation(), !s) return;
37
37
  const i = document.createElement("span");
38
38
  e.CheckboxRipple && (i.className = e.CheckboxRipple), i.addEventListener("animationend", () => i.remove(), { once: !0 }), u.current?.appendChild(i);
39
- }, [c]);
39
+ }, [s]);
40
40
  x(() => {
41
- const o = u.current;
42
- return () => o?.replaceChildren();
41
+ const r = u.current;
42
+ return () => r?.replaceChildren();
43
43
  }, []);
44
- const y = (o) => {
45
- a || W?.(o, o.target.checked);
46
- }, m = {
47
- "data-checked": p && !t ? "" : void 0,
48
- "data-unchecked": !p && !t ? "" : void 0,
49
- "data-indeterminate": t ? "" : void 0,
44
+ const $ = (r) => {
45
+ a || W?.(r, r.target.checked);
46
+ }, B = (r) => {
47
+ D?.(r), !(r.defaultPrevented || r.key !== "Enter" || a) && (r.preventDefault(), r.currentTarget.click());
48
+ }, f = {
49
+ "data-checked": p && !n ? "" : void 0,
50
+ "data-unchecked": !p && !n ? "" : void 0,
51
+ "data-indeterminate": n ? "" : void 0,
50
52
  "data-disabled": d ? "" : void 0
51
- }, f = /* @__PURE__ */ b(D, { children: [!s && c && /* @__PURE__ */ r("span", {
53
+ }, m = /* @__PURE__ */ v(K, { children: [!c && s && /* @__PURE__ */ t("span", {
52
54
  ref: u,
53
55
  className: e.CheckboxRippleContainer
54
- }), /* @__PURE__ */ r("span", {
55
- className: j,
56
- children: /* @__PURE__ */ r("span", {
56
+ }), /* @__PURE__ */ t("span", {
57
+ className: H,
58
+ children: /* @__PURE__ */ t("span", {
57
59
  className: e.Indicator,
58
- children: /* @__PURE__ */ r(P, { strokeWidth: l === "small" ? 3 : 2 })
60
+ children: /* @__PURE__ */ t(P, { strokeWidth: l === "small" ? 3 : 2 })
59
61
  })
60
62
  })] });
61
- return L ? /* @__PURE__ */ r("span", {
63
+ return L ? /* @__PURE__ */ t("span", {
62
64
  "aria-hidden": "true",
63
65
  className: k,
64
- "data-testid": n,
65
- ...m,
66
- children: f
67
- }) : /* @__PURE__ */ b("label", {
66
+ "data-testid": o,
67
+ ...f,
68
+ children: m
69
+ }) : /* @__PURE__ */ v("label", {
68
70
  className: k,
69
- "data-testid": n,
70
- onPointerDown: $,
71
+ "data-testid": o,
72
+ onPointerDown: j,
71
73
  onClick: E,
72
- ...m,
73
- children: [/* @__PURE__ */ r("input", {
74
+ ...f,
75
+ children: [/* @__PURE__ */ t("input", {
74
76
  ref: h,
75
77
  type: "checkbox",
76
78
  className: "sr-only",
77
79
  checked: p,
78
80
  disabled: d,
79
81
  readOnly: a,
80
- onChange: y,
81
- ...H
82
- }), f]
82
+ onChange: $,
83
+ onKeyDown: B,
84
+ ...y
85
+ }), m]
83
86
  });
84
87
  };
85
88
  export {
86
- z as StyledCheckbox
89
+ G as StyledCheckbox
87
90
  };
@@ -1,18 +1,18 @@
1
- var e = "_CheckboxWrapper_1kkew_1", _ = "_Checkbox_1kkew_1", k = "_Indeterminate_1kkew_28", r = "_ReadOnly_1kkew_63", a = "_Indicator_1kkew_72", o = "_HideWrapper_1kkew_76", p = "_CheckboxHover_1kkew_83", i = "_CheckboxRippleContainer_1kkew_83", l = "_CheckboxRipple_1kkew_83", d = "_ripple_1kkew_1", c = {
1
+ var e = "_CheckboxWrapper_b3bys_1", _ = "_Checkbox_b3bys_1", b = "_Indeterminate_b3bys_34", r = "_ReadOnly_b3bys_114", a = "_Indicator_b3bys_123", o = "_HideWrapper_b3bys_127", p = "_CheckboxHover_b3bys_134", i = "_CheckboxRippleContainer_b3bys_134", s = "_CheckboxRipple_b3bys_134", l = "_ripple_b3bys_1", y = {
2
2
  CheckboxWrapper: e,
3
- "size-small": "_size-small_1kkew_11",
4
- "size-medium": "_size-medium_1kkew_15",
3
+ "size-small": "_size-small_b3bys_15",
4
+ "size-medium": "_size-medium_b3bys_21",
5
5
  Checkbox: _,
6
- Indeterminate: k,
7
- Error: "_Error_1kkew_55",
6
+ Indeterminate: b,
7
+ Error: "_Error_b3bys_61",
8
8
  ReadOnly: r,
9
9
  Indicator: a,
10
10
  HideWrapper: o,
11
11
  CheckboxHover: p,
12
12
  CheckboxRippleContainer: i,
13
- CheckboxRipple: l,
14
- ripple: d
13
+ CheckboxRipple: s,
14
+ ripple: l
15
15
  };
16
16
  export {
17
- c as default
17
+ y as default
18
18
  };
@@ -11,7 +11,7 @@ import { DynamicInteractiveChipGroup as re } from "./DynamicInteractiveChipGroup
11
11
  import { createElement as q, forwardRef as oe, useCallback as f, useState as ne } from "react";
12
12
  import { Fragment as E, jsx as l, jsxs as O } from "react/jsx-runtime";
13
13
  var ye = oe((k, F) => {
14
- const [z, S] = ne(!1), { options: h, dataTest: g, value: x, readOnly: u, multiple: o, required: H, onChange: y, size: K, title: v, noOptionsText: _, placeholder: R, disabled: I, helperText: G, disableHelperText: A, error: N, valueKey: P = "value", labelKey: W = "label", renderLabel: i, getOptionTooltip: V, startAdornment: J, autocompleteProps: n, loading: m, maxTags: M, onFocus: Q, onBlur: U } = k, w = h.length < 11, s = (e) => typeof e == "object" ? e?.[W]?.toString() ?? "" : e?.toString() ?? "", p = f((e) => typeof e == "object" ? e?.[P] : e, [P]), D = f((e, t) => p(e) === p(t), [p]), C = (e) => {
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) => {
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
17
  }, $ = f((e) => {
@@ -28,18 +28,18 @@ var ye = oe((k, F) => {
28
28
  className: "text-base font-semibold text-delta-800",
29
29
  children: v
30
30
  }), /* @__PURE__ */ l(ae, {
31
- open: z,
31
+ open: K,
32
32
  onOpen: $,
33
33
  onClose: X,
34
34
  disableCloseOnSelect: o,
35
35
  dataTest: g,
36
- disabled: !!I || !!m,
36
+ disabled: !!N || !!m,
37
37
  noOptionsText: _,
38
38
  loading: m,
39
39
  readOnly: u,
40
40
  value: x,
41
- size: K,
42
- disableClearable: H,
41
+ size: H,
42
+ disableClearable: z,
43
43
  options: h,
44
44
  fullWidth: !0,
45
45
  classes: { listbox: "max-h-[300px]" },
@@ -48,7 +48,7 @@ var ye = oe((k, F) => {
48
48
  y(t);
49
49
  },
50
50
  filterSelectedOptions: !1,
51
- isOptionEqualToValue: n?.isOptionEqualToValue ?? D,
51
+ isOptionEqualToValue: n?.isOptionEqualToValue ?? V,
52
52
  autoHeight: !0,
53
53
  multiple: o,
54
54
  renderValue: o ? (e) => {
@@ -63,9 +63,9 @@ 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: !!I || !!m,
66
+ disabled: !!N || !!m,
67
67
  onDelete: () => {
68
- Array.isArray(x) && y(x.filter((b) => !D(b, r)));
68
+ Array.isArray(x) && y(x.filter((b) => !V(b, r)));
69
69
  }
70
70
  }, C(r))), c > 0 ? /* @__PURE__ */ l(B, {
71
71
  dataTest: "remaining-count-tag-chip",
@@ -82,7 +82,7 @@ var ye = oe((k, F) => {
82
82
  width: 24
83
83
  }) : void 0,
84
84
  renderOption: (e, t, d) => {
85
- const a = typeof t == "object" ? !!t?.disabled : !1, c = V ? V(t) : null;
85
+ const a = typeof t == "object" ? !!t?.disabled : !1, c = D ? D(t) : null;
86
86
  if (o) {
87
87
  const b = d.selected;
88
88
  return /* @__PURE__ */ q("li", {
@@ -91,9 +91,12 @@ var ye = oe((k, F) => {
91
91
  "aria-selected": b,
92
92
  key: e.id,
93
93
  onClick: a ? void 0 : e.onClick,
94
- className: j("flex min-h-10 cursor-pointer items-center gap-x-1 bg-white px-2 text-base aria-selected:bg-gama-50 hover:bg-gama-50", a && "cursor-not-allowed bg-delta-50 aria-selected:!bg-delta-50 hover:!bg-delta-50 [&_*]:cursor-not-allowed"),
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"),
95
95
  "aria-disabled": a
96
- }, /* @__PURE__ */ l(L, {
96
+ }, e["data-active"] !== void 0 && /* @__PURE__ */ l("span", {
97
+ "aria-hidden": "true",
98
+ className: "pointer-events-none absolute inset-y-0 left-0 border-l border-solid border-focus-ring"
99
+ }), /* @__PURE__ */ l(L, {
97
100
  arrow: !0,
98
101
  title: c,
99
102
  children: /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ l(te, {
@@ -115,10 +118,13 @@ var ye = oe((k, F) => {
115
118
  role: "option",
116
119
  "aria-selected": r,
117
120
  key: e.id,
118
- className: j("flex min-h-10 cursor-pointer items-center gap-x-1 px-2 text-base aria-selected:bg-gama-50 hover:bg-gama-50", a && "cursor-not-allowed bg-delta-50 aria-selected:!bg-delta-50 hover:!bg-delta-50 [&_*]:cursor-not-allowed"),
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"),
119
122
  onClick: a ? void 0 : e.onClick,
120
123
  "aria-disabled": a
121
- }, /* @__PURE__ */ l(L, {
124
+ }, e["data-active"] !== void 0 && /* @__PURE__ */ l("span", {
125
+ "aria-hidden": "true",
126
+ className: "pointer-events-none absolute inset-y-0 left-0 border-l border-solid border-focus-ring"
127
+ }), /* @__PURE__ */ l(L, {
122
128
  arrow: !0,
123
129
  title: c,
124
130
  children: /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ l("span", {
@@ -138,16 +144,18 @@ var ye = oe((k, F) => {
138
144
  dataTest: `${g}-input-field`,
139
145
  ...e,
140
146
  inputRef: F,
141
- error: N,
142
- helperText: A ? void 0 : G,
143
- reserveHelperText: A ? !1 : N !== void 0,
147
+ error: A,
148
+ helperText: I ? void 0 : G,
149
+ reserveHelperText: I ? !1 : A !== void 0,
144
150
  variant: "outlined",
145
151
  label: "",
146
152
  placeholder: R,
147
153
  readOnly: u,
148
154
  onFocus: Q,
149
155
  onBlur: U,
150
- onKeyDown: w ? (t) => t.preventDefault() : void 0,
156
+ onKeyDown: (t) => {
157
+ e.onKeyDown(t), w && !t.defaultPrevented && t.key.length === 1 && t.preventDefault();
158
+ },
151
159
  autoComplete: "off",
152
160
  slotProps: {
153
161
  ...e.slotProps,
@@ -22,13 +22,13 @@ var d = () => ({
22
22
  } : {
23
23
  top: "50%",
24
24
  transform: "translateY(-50%)"
25
- }, x = ({ focused: e, error: r, disabled: t, readOnly: o, borderless: a }) => n("pointer-events-none absolute inset-0 rounded border border-solid transition-colors", a && !e ? "border-transparent" : t ? "border-delta-300" : o ? "border-delta-200" : r ? "border-error-500" : e ? "border-[3px] border-gama-400" : "border-delta-500 group-hover:border-2 group-hover:border-gama-300"), s = ({ focused: e, error: r, disabled: t, readOnly: o, notched: a = !0 }) => n("pointer-events-none absolute z-0 m-0 box-border min-w-0 overflow-hidden rounded border border-solid transition-colors", a ? "inset-x-0 bottom-0 top-[-5px] px-2 py-0" : "inset-0", t ? "border-delta-300" : o ? "border-delta-200" : r ? "border-error-500" : e ? "border-[3px] border-gama-400" : "border-delta-500 group-hover:border-2 group-hover:border-gama-300"), g = (e) => n("invisible block h-[11px] overflow-hidden p-0 text-xs leading-[23px] transition-[max-width] duration-150", e ? "max-w-full" : "max-w-[0.01px]"), p = ({ shrink: e, focused: r, error: t, disabled: o, readOnly: a }) => n("pointer-events-none absolute left-[14px] z-10 max-w-[calc(100%-1.75rem)] truncate transition-colors duration-150", o ? "text-delta-300" : a ? "text-delta-800" : t ? "text-error-500" : r ? "text-gama-500" : e ? "text-delta-800" : "text-delta-500", e ? "bg-white px-1 text-xs leading-[16px] tracking-[0.24px]" : "text-base leading-[23px] tracking-[0.00938em]");
25
+ }, s = ({ focused: e, error: r, disabled: t, readOnly: o, borderless: a }) => n("pointer-events-none absolute inset-0 rounded border border-solid transition-colors", a && !e ? "border-transparent" : t ? "border-delta-300" : o ? "border-delta-200" : r ? "border-error-500" : e ? "border-[3px] border-focus-ring" : "border-delta-500 group-hover:border-2 group-hover:border-gama-300"), x = ({ focused: e, error: r, disabled: t, readOnly: o, notched: a = !0 }) => n("pointer-events-none absolute z-0 m-0 box-border min-w-0 overflow-hidden rounded border border-solid transition-colors", a ? "inset-x-0 bottom-0 top-[-5px] px-2 py-0" : "inset-0", t ? "border-delta-300" : o ? "border-delta-200" : r ? "border-error-500" : e ? "border-[3px] border-focus-ring" : "border-delta-500 group-hover:border-2 group-hover:border-gama-300"), g = (e) => n("invisible block h-[11px] overflow-hidden p-0 text-xs leading-[23px] transition-[max-width] duration-150", e ? "max-w-full" : "max-w-[0.01px]"), p = ({ shrink: e, focused: r, error: t, disabled: o, readOnly: a }) => n("pointer-events-none absolute left-[14px] z-10 max-w-[calc(100%-1.75rem)] truncate transition-colors duration-150", o ? "text-delta-300" : a ? "text-delta-800" : t ? "text-error-500" : r ? "text-gama-500" : e ? "text-delta-800" : "text-delta-500", e ? "bg-white px-1 text-xs leading-[16px] tracking-[0.24px]" : "text-base leading-[23px] tracking-[0.00938em]");
26
26
  export {
27
27
  p as floatingLabelClass,
28
28
  b as floatingLabelLayoutStyle,
29
29
  g as notchedLegendClass,
30
- s as notchedOutlineClass,
31
- x as outlineClass,
30
+ x as notchedOutlineClass,
31
+ s as outlineClass,
32
32
  l as singleLineInputLayoutStyle,
33
33
  d as singleLineShellLayoutStyle
34
34
  };
@@ -1,50 +1,53 @@
1
1
  import { cn as h } from "../../../../helpers/cn.js";
2
2
  import e from "./StyledRadio.module.js";
3
- import { useRadioGroupContext as D } from "./RadioGroupContext.js";
4
- import { forwardRef as E, useCallback as P, useRef as j } from "react";
5
- import { Fragment as F, jsx as o, jsxs as R } from "react/jsx-runtime";
6
- var W = E(({ value: d, dataTest: l, className: v, size: c = "medium", error: C, disabled: g, readOnly: m, checked: k, onChange: b, decorative: N, ...p }, w) => {
7
- const a = D(), n = a ? a.value === d : !!k, s = g ?? a?.disabled ?? !1, u = h(e.RadioWrapper, e.RadioHover, c === "small" && e["size-small"], v, C && e.Error, m && e.ReadOnly), x = h(e.Radio, c === "small" && e["size-small"]), t = j(null), y = P((i) => {
8
- if (i.stopPropagation(), !t.current) return;
9
- const r = document.createElement("span");
10
- e.RadioRipple && (r.className = e.RadioRipple), r.addEventListener("animationend", () => r.remove(), { once: !0 }), t.current.appendChild(r);
11
- }, []), S = (i) => {
12
- m || (a && a.onSelect(d ?? null), b?.(i, i.target.checked));
13
- }, f = /* @__PURE__ */ R(F, { children: [/* @__PURE__ */ o("span", {
3
+ import { useRadioGroupContext as S } from "./RadioGroupContext.js";
4
+ import { forwardRef as j, useCallback as F, useRef as K } from "react";
5
+ import { Fragment as _, jsx as r, jsxs as R } from "react/jsx-runtime";
6
+ var $ = j(({ value: o, dataTest: c, className: k, size: p = "medium", error: g, disabled: C, readOnly: t, checked: v, onChange: b, onKeyDown: N, decorative: w, ...m }, y) => {
7
+ const n = S(), d = n ? n.value === o : !!v, s = C ?? n?.disabled ?? !1, u = h(e.RadioWrapper, e.RadioHover, p === "small" && e["size-small"], k, g && e.Error, t && e.ReadOnly), D = h(e.Radio, p === "small" && e["size-small"]), l = K(null), x = F((a) => {
8
+ if (a.stopPropagation(), !l.current) return;
9
+ const i = document.createElement("span");
10
+ e.RadioRipple && (i.className = e.RadioRipple), i.addEventListener("animationend", () => i.remove(), { once: !0 }), l.current.appendChild(i);
11
+ }, []), E = (a) => {
12
+ t || (n && n.onSelect(o ?? null), b?.(a, a.target.checked));
13
+ }, P = (a) => {
14
+ N?.(a), !(a.defaultPrevented || a.key !== "Enter" || t) && (a.preventDefault(), a.currentTarget.click());
15
+ }, f = /* @__PURE__ */ R(_, { children: [/* @__PURE__ */ r("span", {
14
16
  className: e.RadioRippleContainer,
15
- ref: t
16
- }), /* @__PURE__ */ o("span", {
17
- className: x,
18
- children: /* @__PURE__ */ o("span", { className: e.Indicator })
17
+ ref: l
18
+ }), /* @__PURE__ */ r("span", {
19
+ className: D,
20
+ children: /* @__PURE__ */ r("span", { className: e.Indicator })
19
21
  })] });
20
- return N ? /* @__PURE__ */ o("span", {
22
+ return w ? /* @__PURE__ */ r("span", {
21
23
  "aria-hidden": "true",
22
24
  className: u,
23
- "data-testid": l,
24
- "data-checked": n ? "" : void 0,
25
- "data-unchecked": n ? void 0 : "",
25
+ "data-testid": c,
26
+ "data-checked": d ? "" : void 0,
27
+ "data-unchecked": d ? void 0 : "",
26
28
  "data-disabled": s ? "" : void 0,
27
29
  children: f
28
30
  }) : /* @__PURE__ */ R("label", {
29
31
  className: u,
30
- "data-testid": l,
31
- onPointerDown: y,
32
- "data-checked": n ? "" : void 0,
33
- "data-unchecked": n ? void 0 : "",
32
+ "data-testid": c,
33
+ onPointerDown: x,
34
+ "data-checked": d ? "" : void 0,
35
+ "data-unchecked": d ? void 0 : "",
34
36
  "data-disabled": s ? "" : void 0,
35
- children: [/* @__PURE__ */ o("input", {
36
- ...p,
37
- ref: w,
37
+ children: [/* @__PURE__ */ r("input", {
38
+ ...m,
39
+ ref: y,
38
40
  type: "radio",
39
41
  className: "sr-only",
40
- name: a?.name ?? p.name,
41
- value: d == null ? void 0 : String(d),
42
- checked: n,
42
+ name: n?.name ?? m.name,
43
+ value: o == null ? void 0 : String(o),
44
+ checked: d,
43
45
  disabled: s,
44
- onChange: S
46
+ onChange: E,
47
+ onKeyDown: P
45
48
  }), f]
46
49
  });
47
50
  });
48
51
  export {
49
- W as StyledRadio
52
+ $ as StyledRadio
50
53
  };
@@ -1,15 +1,15 @@
1
- var a = "_RadioWrapper_1s69x_1", _ = "_Radio_1s69x_1", r = "_RadioRippleContainer_1s69x_36", i = "_RadioRipple_1s69x_36", e = "_ripple_1s69x_1", o = "_RadioHover_1s69x_70", d = "_Indicator_1s69x_122", p = "_ReadOnly_1s69x_149", R = {
1
+ var a = "_RadioWrapper_1fno0_1", _ = "_RadioRippleContainer_1fno0_27", o = "_RadioRipple_1fno0_27", r = "_ripple_1fno0_1", i = "_RadioHover_1fno0_61", e = "_Radio_1fno0_1", d = "_Indicator_1fno0_113", n = "_ReadOnly_1fno0_154", p = {
2
2
  RadioWrapper: a,
3
- "size-small": "_size-small_1s69x_14",
4
- Radio: _,
5
- RadioRippleContainer: r,
6
- RadioRipple: i,
7
- ripple: e,
8
- RadioHover: o,
3
+ "size-small": "_size-small_1fno0_14",
4
+ RadioRippleContainer: _,
5
+ RadioRipple: o,
6
+ ripple: r,
7
+ RadioHover: i,
8
+ Radio: e,
9
9
  Indicator: d,
10
- Error: "_Error_1s69x_143",
11
- ReadOnly: p
10
+ Error: "_Error_1fno0_134",
11
+ ReadOnly: n
12
12
  };
13
13
  export {
14
- R as default
14
+ p as default
15
15
  };