asma-ui-core 3.121.6 → 3.123.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 (65) hide show
  1. package/dist/asma-ui-core.css +1 -1
  2. package/dist/components/custom/module/header-layout/ToolbarRows.js +64 -60
  3. package/dist/components/custom/widget/widget/StyledWidget.js +44 -37
  4. package/dist/components/custom/widget/widget-header/StyledWidgetHeader.js +7 -7
  5. package/dist/components/custom/widget/widget-title/StyledWidgetTitle.js +8 -8
  6. package/dist/components/data-display/chip/StyledChip.js +42 -42
  7. package/dist/components/data-display/form-label/components/StyledFormLabel.js +15 -15
  8. package/dist/components/feedback/dialog/StyledDialog.js +75 -75
  9. package/dist/components/feedback/dialog/StyledDialogActions.js +4 -4
  10. package/dist/components/feedback/dialog/StyledDialogTitle.js +13 -13
  11. package/dist/components/feedback/dialog/dialog-footer/StyledDialogFooter.js +70 -69
  12. package/dist/components/feedback/minimizable-dialog/MinimizableDialog.js +69 -69
  13. package/dist/components/feedback/minimizable-dialog/v2/MinimizableDialogV2.js +81 -81
  14. package/dist/components/feedback/snack-bar/StyledAlert.js +16 -16
  15. package/dist/components/inputs/button/StyledButton.js +36 -35
  16. package/dist/components/inputs/input-field/StyledInputField.js +38 -38
  17. package/dist/components/inputs/search-field/StyledSearchField.js +18 -17
  18. package/dist/components/miscellaneous/StyledFormControlLabel.js +13 -13
  19. package/dist/components/navigation/link/StyledLink.js +44 -44
  20. package/dist/components/navigation/title-chevron/StyledTitleChevron.js +13 -13
  21. package/dist/components/utils/bottom-sheet/StyledBottomSheet.js +45 -45
  22. package/dist/components/utils/popover/PopoverAnatomy.js +23 -23
  23. package/dist/hooks/useMediaQuery.hook.js +3 -2
  24. package/dist/index.js +66 -63
  25. package/dist/src/components/custom/module/header-layout/ToolbarRows.d.ts +3 -1
  26. package/dist/src/hooks/useMediaQuery.hook.d.ts +2 -0
  27. package/dist/src/table/components/table-header/SortIndicator.d.ts +12 -0
  28. package/dist/src/table/custom-features/order-columns/columnLayout.d.ts +24 -0
  29. package/dist/src/table/custom-features/order-columns/columnLayout.test.d.ts +1 -0
  30. package/dist/src/table/custom-features/order-columns/types.d.ts +8 -0
  31. package/dist/src/table/custom-features/order-columns/usePersistColumnOrder.d.ts +5 -0
  32. package/dist/src/table/helpers/columnIds.d.ts +27 -0
  33. package/dist/src/table/helpers/columnIds.test.d.ts +1 -0
  34. package/dist/src/table/helpers/tableStorage.d.ts +12 -0
  35. package/dist/src/table/helpers/tableStorage.test.d.ts +1 -0
  36. package/dist/src/table/hooks/useColumnSizingPersistence.d.ts +16 -3
  37. package/dist/src/table/hooks/useColumnSizingPersistence.test.d.ts +1 -0
  38. package/dist/src/table/hooks/usePersistedSorting.d.ts +54 -0
  39. package/dist/src/table/hooks/usePersistedSorting.test.d.ts +1 -0
  40. package/dist/src/table/hooks/usePersistedStateWriter.d.ts +30 -0
  41. package/dist/src/table/hooks/useTranslations.d.ts +6 -4
  42. package/dist/src/table/index.d.ts +1 -0
  43. package/dist/src/table/types.d.ts +9 -2
  44. package/dist/table/components/StyledTable.module.js +59 -56
  45. package/dist/table/components/columns/action-column/components/HeaderActionMenu.js +61 -54
  46. package/dist/table/components/columns/action-column/components/TableActions.module.js +4 -4
  47. package/dist/table/components/table-header/SortIndicator.js +23 -0
  48. package/dist/table/components/table-header/TableHeader.js +30 -30
  49. package/dist/table/components/table-header/TableHeaderCell.js +30 -31
  50. package/dist/table/custom-features/order-columns/OrderColumnsFeature.js +7 -8
  51. package/dist/table/custom-features/order-columns/columnLayout.js +9 -0
  52. package/dist/table/custom-features/order-columns/usePersistColumnOrder.js +12 -11
  53. package/dist/table/custom-features/order-columns/usePersistedColumnOrder.js +7 -12
  54. package/dist/table/helpers/columnIds.js +28 -0
  55. package/dist/table/helpers/tableStorage.js +33 -0
  56. package/dist/table/hooks/useColumnSizingPersistence.js +16 -34
  57. package/dist/table/hooks/usePersistedPageSize.js +11 -16
  58. package/dist/table/hooks/usePersistedSorting.js +58 -0
  59. package/dist/table/hooks/usePersistedStateWriter.js +36 -0
  60. package/dist/table/hooks/useStyledTable.js +90 -60
  61. package/dist/table/hooks/useTranslations.js +13 -11
  62. package/dist/table/index.js +3 -2
  63. package/dist/table/shared-components/DropDownIcon.js +4 -2
  64. package/dist/table/shared-components/DropUpIcon.js +5 -3
  65. package/package.json +1 -1
@@ -1,14 +1,14 @@
1
1
  import { StyledTooltip as L } from "../../data-display/tooltip/StyledTooltip.js";
2
- import { LoadingIcon as N } from "../../icons/loading-icon/LoadingIcon.js";
2
+ import { LoadingIcon as O } from "../../icons/loading-icon/LoadingIcon.js";
3
3
  import e from "./StyledButton.module.js";
4
- import { useReportDialogBusy as O } from "../../feedback/dialog/DialogBusyContext.js";
5
- import W from "clsx";
4
+ import { useReportDialogBusy as W } from "../../feedback/dialog/DialogBusyContext.js";
5
+ import y from "clsx";
6
6
  import "react";
7
- import { Fragment as _, jsx as r, jsxs as f } from "react/jsx-runtime";
7
+ import { Fragment as _, jsx as o, jsxs as f } from "react/jsx-runtime";
8
8
  var F = {
9
9
  en: "In progress",
10
10
  no: "Pågår"
11
- }, c = {
11
+ }, x = {
12
12
  contained: e.contained,
13
13
  outlined: e.outlined,
14
14
  text: e.text,
@@ -19,37 +19,38 @@ var F = {
19
19
  medium: e.medium,
20
20
  error: e.error,
21
21
  common: e.common
22
- }, M = ({ variant: x = "contained", className: h = "", size: a = "medium", children: s, refLink: v, startIcon: B, endIcon: b, dataTest: g, error: S, style: w, disabled: p, disabledReason: d, loading: t, holdsDialog: I = !0, loadingAnnouncement: j, locale: k = "en", onClick: C, ...l }) => {
23
- O(!!t && I);
24
- const i = a === "large" || a === "medium", D = S ? "error" : "common", n = !!p && !!d, m = n || !!t, u = i ? 20 : 16, y = (o) => t && o ? /* @__PURE__ */ r("span", {
22
+ }, M = ({ variant: h = "contained", className: v = "", size: r = "medium", children: i, refLink: w, startIcon: B, endIcon: b, dataTest: g, error: S, style: k, disabled: c, disabledReason: p, loading: t, holdsDialog: I = !0, loadingAnnouncement: j, locale: C = "en", onClick: D, ...l }) => {
23
+ W(!!t && I);
24
+ const n = r === "large" || r === "medium", N = S ? "error" : "common", s = !!c && !!p, m = s || !!t, d = n ? 20 : 16, u = (a) => t && a ? /* @__PURE__ */ o("span", {
25
25
  style: {
26
26
  display: "inline-flex",
27
27
  opacity: 0
28
28
  },
29
- children: o
30
- }) : o, R = (o) => {
29
+ children: a
30
+ }) : a, R = (a) => {
31
31
  if (m) {
32
- o.preventDefault();
32
+ a.preventDefault();
33
33
  return;
34
34
  }
35
- C?.(o);
35
+ D?.(a);
36
36
  }, G = /* @__PURE__ */ f("button", {
37
37
  ...l,
38
- disabled: !!p && !m,
38
+ disabled: !!c && !m,
39
39
  "aria-disabled": m ? !0 : l["aria-disabled"],
40
40
  "aria-busy": t ? !0 : l["aria-busy"],
41
41
  onClick: R,
42
- className: W("asma-touch-ready", e["asma-ui-core-button"], c[x], c[D], c[a], h),
42
+ className: y("asma-touch-ready", e["asma-ui-core-button"], x[h], x[N], x[r], "max-xs:h-auto max-xs:max-w-full max-xs:py-1 max-xs:[&>:not(div)]:shrink-0", r === "small" ? "max-xs:min-h-8" : "max-xs:min-h-10", v),
43
43
  style: {
44
- ...s ? { flexShrink: 0 } : {},
44
+ ...i ? { flexShrink: 0 } : {},
45
45
  ...t ? { position: "relative" } : {},
46
- ...w
46
+ ...k
47
47
  },
48
- ref: v,
48
+ ref: w,
49
49
  "data-testid": g,
50
50
  children: [
51
- y(B),
52
- s && /* @__PURE__ */ r("div", {
51
+ u(B),
52
+ i && /* @__PURE__ */ o("div", {
53
+ className: y("max-xs:hyphens-auto max-xs:whitespace-normal max-xs:![overflow-wrap:anywhere]", "max-xs:text-center"),
53
54
  style: {
54
55
  opacity: t ? 0 : void 0,
55
56
  overflow: "hidden",
@@ -58,14 +59,14 @@ var F = {
58
59
  display: "flex",
59
60
  alignItems: "center",
60
61
  justifyContent: "center",
61
- gap: i ? "8px" : "4px",
62
- paddingLeft: i ? "8px" : "4px",
63
- paddingRight: i ? "8px" : "4px"
62
+ gap: n ? "8px" : "4px",
63
+ paddingLeft: n ? "8px" : "4px",
64
+ paddingRight: n ? "8px" : "4px"
64
65
  },
65
- children: s
66
+ children: i
66
67
  }),
67
- y(b),
68
- t && /* @__PURE__ */ r("span", {
68
+ u(b),
69
+ t && /* @__PURE__ */ o("span", {
69
70
  "aria-hidden": "true",
70
71
  style: {
71
72
  position: "absolute",
@@ -74,24 +75,24 @@ var F = {
74
75
  alignItems: "center",
75
76
  justifyContent: "center"
76
77
  },
77
- children: /* @__PURE__ */ r(N, {
78
- width: u,
79
- height: u
78
+ children: /* @__PURE__ */ o(O, {
79
+ width: d,
80
+ height: d
80
81
  })
81
82
  })
82
83
  ]
83
84
  });
84
- return /* @__PURE__ */ f(_, { children: [/* @__PURE__ */ r(L, {
85
+ return /* @__PURE__ */ f(_, { children: [/* @__PURE__ */ o(L, {
85
86
  arrow: !0,
86
- title: d,
87
- open: n ? void 0 : !1,
88
- openOnTap: n,
89
- persistentDescription: n,
87
+ title: p,
88
+ open: s ? void 0 : !1,
89
+ openOnTap: s,
90
+ persistentDescription: s,
90
91
  children: G
91
- }), t !== void 0 && /* @__PURE__ */ r("span", {
92
+ }), t !== void 0 && /* @__PURE__ */ o("span", {
92
93
  role: "status",
93
94
  className: "sr-only",
94
- children: t ? j ?? F[k] : ""
95
+ children: t ? j ?? F[C] : ""
95
96
  })] });
96
97
  };
97
98
  export {
@@ -10,17 +10,17 @@ import x from "./StyledInputField.module.js";
10
10
  import { Children as At, useCallback as re, useId as Ct, useLayoutEffect as _, useRef as U, useState as B } from "react";
11
11
  import { jsx as o, jsxs as b } from "react/jsx-runtime";
12
12
  import { useMergeRefs as de } from "@floating-ui/react";
13
- var Ot = ({ dataTest: y, label: r, labelPlacement: ce = "above", value: m, defaultValue: L, onChange: ue, onBlur: he, onFocus: me, error: p, helperText: K, reserveHelperText: pe, expandHelperText: ge = !0, maxLength: fe, counter: xe, locale: be, disabled: d, readOnly: n, required: v, allowClear: ye, onClear: Le, type: Se = "text", placeholder: ve, name: He, id: Ie, autoComplete: Ae, autoFocus: Ce, multiline: i, rows: H, minRows: M, maxRows: k, size: Ne = "medium", width: Y = "full", fullWidth: Nt, className: Re, style: we, sx: Fe, inputRef: _e, slotProps: t, InputProps: G, onKeyDown: J, onClick: Be, variant: Rt }) => {
14
- const Me = Ct(), E = Ie ?? Me, Q = `${E}-helper-text`, T = U(null), D = U(0), V = U(null), [ke, Ee] = B(void 0), [I, X] = B(!1), [Te, Z] = B(L != null && L !== ""), [De, We] = B(String(L ?? "").length), A = m !== void 0, q = A ? m !== "" && m != null : Te, $e = !!d || !!n, W = t?.input?.startAdornment ?? G?.startAdornment, S = At.count(W) > 0, u = S && Array.isArray(W), g = t?.input?.endAdornment ?? G?.endAdornment, C = !!(ye && q && !$e), { ref: ze, ...l } = t?.htmlInput ?? {}, je = _e ?? ze, { className: Pe, style: $, ref: Ue } = t?.input ?? {}, Ke = de([Ue]), Ye = t?.input?.onMouseDown, O = t?.input?.onClick, Ge = O ? { onClick: O } : {}, Je = Ae ?? l.autoComplete, Qe = He ?? l.name, z = l.id ?? E, N = fe ?? l.maxLength, ee = `${E}-counter`, te = xe !== !1 && !!N, Ve = A ? String(m ?? "").length : De, R = ce === "floating" && !!r, w = I || q || S, h = re(() => {
13
+ var Ot = ({ dataTest: y, label: r, labelPlacement: ce = "above", value: p, defaultValue: L, onChange: ue, onBlur: he, onFocus: me, error: g, helperText: K, reserveHelperText: pe, expandHelperText: ge = !0, maxLength: fe, counter: xe, locale: be, disabled: d, readOnly: n, required: H, allowClear: ye, onClear: Le, type: Se = "text", placeholder: ve, name: He, id: Ie, autoComplete: Ae, autoFocus: Ce, multiline: i, rows: I, minRows: M, maxRows: k, size: Ne = "medium", width: Y = "full", fullWidth: Nt, className: Re, style: we, sx: Fe, inputRef: _e, slotProps: t, InputProps: G, onKeyDown: J, onClick: Be, variant: Rt }) => {
14
+ const Me = Ct(), E = Ie ?? Me, Q = `${E}-helper-text`, T = U(null), D = U(0), V = U(null), [ke, Ee] = B(void 0), [A, X] = B(!1), [Te, Z] = B(L != null && L !== ""), [De, We] = B(String(L ?? "").length), C = p !== void 0, q = C ? p !== "" && p != null : Te, $e = !!d || !!n, W = t?.input?.startAdornment ?? G?.startAdornment, S = At.count(W) > 0, u = S && Array.isArray(W), h = t?.input?.endAdornment ?? G?.endAdornment, v = !!(ye && q && !$e), { ref: ze, ...l } = t?.htmlInput ?? {}, je = _e ?? ze, { className: Pe, style: $, ref: Ue } = t?.input ?? {}, Ke = de([Ue]), Ye = t?.input?.onMouseDown, O = t?.input?.onClick, Ge = O ? { onClick: O } : {}, Je = Ae ?? l.autoComplete, Qe = He ?? l.name, z = l.id ?? E, N = fe ?? l.maxLength, ee = `${E}-counter`, te = xe !== !1 && !!N, Ve = C ? String(p ?? "").length : De, R = ce === "floating" && !!r, w = A || q || S, m = re(() => {
15
15
  const e = T.current;
16
16
  if (!(!i || !e) && (D.current = e.offsetWidth, D.current !== 0)) {
17
- if (e.removeAttribute("data-scrollable"), H != null && !n) e.style.height = "";
17
+ if (e.removeAttribute("data-scrollable"), I != null && !n) e.style.height = "";
18
18
  else {
19
19
  if (e.style.height = "auto", e.scrollHeight === 0) {
20
20
  e.style.height = "";
21
21
  return;
22
22
  }
23
- const a = getComputedStyle(e), c = Number.parseFloat(a.lineHeight) || 24, le = Number.parseFloat(a.paddingTop) + Number.parseFloat(a.paddingBottom), ae = H ?? M, ut = ae ? ae * c + le : 0, ht = n || !k ? Number.POSITIVE_INFINITY : k * c + le;
23
+ const a = getComputedStyle(e), c = Number.parseFloat(a.lineHeight) || 24, le = Number.parseFloat(a.paddingTop) + Number.parseFloat(a.paddingBottom), ae = I ?? M, ut = ae ? ae * c + le : 0, ht = n || !k ? Number.POSITIVE_INFINITY : k * c + le;
24
24
  e.style.height = `${Math.min(ht, Math.max(ut, e.scrollHeight))}px`;
25
25
  }
26
26
  e.scrollHeight > e.clientHeight + 1 && e.setAttribute("data-scrollable", "true");
@@ -30,35 +30,35 @@ var Ot = ({ dataTest: y, label: r, labelPlacement: ce = "above", value: m, defau
30
30
  M,
31
31
  i,
32
32
  n,
33
- H
33
+ I
34
34
  ]), Xe = (e) => {
35
- n || (A || (Z(e.target.value !== ""), We(e.target.value.length), h()), ue?.(e));
35
+ n || (C || (Z(e.target.value !== ""), We(e.target.value.length), m()), ue?.(e));
36
36
  }, Ze = (e) => {
37
37
  !d && !n && X(!0), me?.(e);
38
38
  }, qe = (e) => {
39
39
  !d && !n && X(!1), he?.(e);
40
40
  };
41
41
  _(() => {
42
- h();
42
+ m();
43
43
  }, [
44
- h,
44
+ m,
45
45
  L,
46
- m
46
+ p
47
47
  ]), _(() => {
48
48
  if (!i || !document.fonts) return;
49
- const e = () => h();
49
+ const e = () => m();
50
50
  return document.fonts.addEventListener("loadingdone", e), () => document.fonts.removeEventListener("loadingdone", e);
51
- }, [i, h]), _(() => {
51
+ }, [i, m]), _(() => {
52
52
  const e = T.current;
53
53
  if (!i || !e || typeof ResizeObserver > "u") return;
54
54
  let a = 0;
55
55
  const c = new ResizeObserver(() => {
56
- e.offsetWidth !== D.current && (cancelAnimationFrame(a), a = requestAnimationFrame(h));
56
+ e.offsetWidth !== D.current && (cancelAnimationFrame(a), a = requestAnimationFrame(m));
57
57
  });
58
58
  return c.observe(e), () => {
59
59
  cancelAnimationFrame(a), c.disconnect();
60
60
  };
61
- }, [i, h]);
61
+ }, [i, m]);
62
62
  const ne = de([je, re((e) => {
63
63
  T.current = e instanceof HTMLTextAreaElement ? e : null;
64
64
  }, [])]), { style: j, ...Oe } = l, f = !i && !u, { height: wt, minHeight: Ft, maxHeight: _t, paddingTop: Bt, paddingBottom: Mt, ...et } = $ ?? {}, tt = f ? {
@@ -72,7 +72,7 @@ var Ot = ({ dataTest: y, label: r, labelPlacement: ce = "above", value: m, defau
72
72
  ...ot,
73
73
  ...Ht({
74
74
  paddingLeft: S ? 40 : 14,
75
- paddingRight: nt ?? ke ?? (C || g ? 40 : 14)
75
+ paddingRight: nt ?? ke ?? (v || h ? 40 : 14)
76
76
  })
77
77
  } : j;
78
78
  _(() => {
@@ -81,10 +81,10 @@ var Ot = ({ dataTest: y, label: r, labelPlacement: ce = "above", value: m, defau
81
81
  Ee((c) => c === a ? c : a);
82
82
  }, [
83
83
  f,
84
- C,
85
- g
84
+ v,
85
+ h
86
86
  ]);
87
- const lt = w || !R, { show: P, role: at } = xt("StyledInputField", p, K, pe, n), { fieldRef: st, rowRef: rt, rowStyle: dt } = ft(ge && P), oe = {
87
+ const lt = w || !R, { show: P, role: at } = xt("StyledInputField", g, K, pe, n), { fieldRef: st, rowRef: rt, rowStyle: dt } = ft(ge && P), oe = {
88
88
  ...Oe,
89
89
  style: f ? it : j,
90
90
  id: z,
@@ -93,12 +93,12 @@ var Ot = ({ dataTest: y, label: r, labelPlacement: ce = "above", value: m, defau
93
93
  placeholder: lt ? ve : void 0,
94
94
  disabled: d,
95
95
  readOnly: n,
96
- required: v,
96
+ required: H,
97
97
  autoComplete: Je,
98
98
  autoFocus: Ce,
99
- value: m,
99
+ value: p,
100
100
  defaultValue: L,
101
- "aria-invalid": p ? !0 : void 0,
101
+ "aria-invalid": g ? !0 : void 0,
102
102
  "aria-label": l["aria-label"] ?? (l["aria-labelledby"] ? void 0 : typeof r == "string" && r !== "" ? r : void 0),
103
103
  "aria-describedby": [P ? Q : l["aria-describedby"], te ? ee : void 0].filter(Boolean).join(" ") || void 0,
104
104
  onChange: Xe,
@@ -107,9 +107,9 @@ var Ot = ({ dataTest: y, label: r, labelPlacement: ce = "above", value: m, defau
107
107
  onKeyDown: l.onKeyDown || J ? (e) => {
108
108
  J?.(e), e.defaultPrevented || l.onKeyDown?.(e);
109
109
  } : void 0
110
- }, ie = s(x.Input, "peer border-0 bg-transparent text-base tracking-[0.00938em] text-delta-800 outline-none placeholder:text-delta-500", u ? "box-border h-8 min-w-[60px] flex-1 py-0 pl-0 pr-0 leading-[23px]" : i ? s("w-full resize-none p-0 pl-0 pr-0 leading-[23px]", x["Input--multiline"]) : s("w-full", x["Input--singleLine"]), "disabled:text-delta-300", n && "text-delta-800", Pe), ct = !i && !u ? {
110
+ }, ie = s(x.Input, "peer border-0 bg-transparent text-base tracking-[0.00938em] text-delta-800 outline-none placeholder:text-delta-500", u ? "box-border h-8 min-w-[60px] flex-1 py-0 pl-0 pr-0 leading-[23px]" : i ? s("w-full resize-none p-0 pl-0 pr-0 leading-[23px]", x["Input--multiline"]) : s("w-full", x["Input--singleLine"], !v && !h && "max-xs:pr-1.5"), "disabled:text-delta-300", n && "text-delta-800", Pe), ct = !i && !u ? {
111
111
  "data-start-adornment": S ? "true" : void 0,
112
- "data-end-adornment": C || g ? "true" : void 0
112
+ "data-end-adornment": v || h ? "true" : void 0
113
113
  } : {};
114
114
  return /* @__PURE__ */ b("div", {
115
115
  ref: st,
@@ -133,7 +133,7 @@ var Ot = ({ dataTest: y, label: r, labelPlacement: ce = "above", value: m, defau
133
133
  },
134
134
  children: /* @__PURE__ */ b("label", {
135
135
  htmlFor: z,
136
- children: [r, v && /* @__PURE__ */ o("span", {
136
+ children: [r, H && /* @__PURE__ */ o("span", {
137
137
  "aria-hidden": "true",
138
138
  children: " *"
139
139
  })]
@@ -142,7 +142,7 @@ var Ot = ({ dataTest: y, label: r, labelPlacement: ce = "above", value: m, defau
142
142
  /* @__PURE__ */ b("div", {
143
143
  className: "relative overflow-visible",
144
144
  children: [/* @__PURE__ */ b("div", {
145
- className: s("relative flex", f && x.InputShell, i && "box-border items-center px-[14px] py-[16.5px]", u && s(x.AdornmentList, g && x["AdornmentList--endAdornment"]), n && "rounded bg-delta-50"),
145
+ className: s("relative flex", f && x.InputShell, i && "box-border items-center px-[14px] py-[16.5px]", u && s(x.AdornmentList, h && x["AdornmentList--endAdornment"]), n && "rounded bg-delta-50"),
146
146
  ref: Ke,
147
147
  onMouseDown: Ye,
148
148
  ...Ge,
@@ -157,7 +157,7 @@ var Ot = ({ dataTest: y, label: r, labelPlacement: ce = "above", value: m, defau
157
157
  ...oe,
158
158
  ref: ne,
159
159
  "data-testid": y,
160
- rows: H ?? M ?? 2,
160
+ rows: I ?? M ?? 2,
161
161
  className: ie
162
162
  }) : /* @__PURE__ */ o("input", {
163
163
  ...oe,
@@ -167,29 +167,29 @@ var Ot = ({ dataTest: y, label: r, labelPlacement: ce = "above", value: m, defau
167
167
  type: Se,
168
168
  className: ie
169
169
  }),
170
- C ? /* @__PURE__ */ o("button", {
170
+ v ? /* @__PURE__ */ o("button", {
171
171
  type: "button",
172
172
  tabIndex: -1,
173
173
  "aria-label": "Clear",
174
174
  "data-testid": `${y}-clear`,
175
175
  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",
176
176
  onClick: (e) => {
177
- e.stopPropagation(), e.preventDefault(), A || Z(!1), Le?.();
177
+ e.stopPropagation(), e.preventDefault(), C || Z(!1), Le?.();
178
178
  },
179
179
  children: /* @__PURE__ */ o(mt, {
180
180
  width: 18,
181
181
  height: 18
182
182
  })
183
- }) : g && /* @__PURE__ */ o("span", {
183
+ }) : h && /* @__PURE__ */ o("span", {
184
184
  ref: V,
185
185
  className: "absolute inset-y-0 right-[14px] flex max-w-[calc(100%-28px)] items-center gap-1",
186
- children: g
186
+ children: h
187
187
  }),
188
188
  R ? /* @__PURE__ */ o("fieldset", {
189
189
  "aria-hidden": !0,
190
190
  className: se({
191
- focused: I,
192
- error: p,
191
+ focused: A,
192
+ error: g,
193
193
  disabled: d,
194
194
  readOnly: n,
195
195
  notched: !0
@@ -198,14 +198,14 @@ var Ot = ({ dataTest: y, label: r, labelPlacement: ce = "above", value: m, defau
198
198
  className: vt(w),
199
199
  children: /* @__PURE__ */ b("span", {
200
200
  className: "inline-block px-[5px]",
201
- children: [r, v && " *"]
201
+ children: [r, H && " *"]
202
202
  })
203
203
  })
204
204
  }) : /* @__PURE__ */ o("div", {
205
205
  "aria-hidden": !0,
206
206
  className: se({
207
- focused: I,
208
- error: p,
207
+ focused: A,
208
+ error: g,
209
209
  disabled: d,
210
210
  readOnly: n,
211
211
  notched: !1
@@ -216,8 +216,8 @@ var Ot = ({ dataTest: y, label: r, labelPlacement: ce = "above", value: m, defau
216
216
  htmlFor: z,
217
217
  className: s(Lt({
218
218
  shrink: w,
219
- focused: I,
220
- error: p,
219
+ focused: A,
220
+ error: g,
221
221
  disabled: d,
222
222
  readOnly: n,
223
223
  size: Ne
@@ -227,14 +227,14 @@ var Ot = ({ dataTest: y, label: r, labelPlacement: ce = "above", value: m, defau
227
227
  ...t?.inputLabel?.style,
228
228
  ...St(w)
229
229
  },
230
- children: [r, v && " *"]
230
+ children: [r, H && " *"]
231
231
  })]
232
232
  }),
233
233
  P && /* @__PURE__ */ o(gt, {
234
234
  ref: rt,
235
235
  id: Q,
236
236
  role: at,
237
- error: p,
237
+ error: g,
238
238
  message: K,
239
239
  hideErrorIcon: t?.formHelperText?.hideErrorIcon,
240
240
  className: s("mr-[14px] box-border items-start", t?.formHelperText?.className),
@@ -1,23 +1,23 @@
1
- import { cn as p } from "../../../helpers/cn.js";
1
+ import { cn as d } from "../../../helpers/cn.js";
2
2
  import { SearchIcon as u } from "../../icons/search-icon/SearchIcon.js";
3
3
  import { CloseIcon as f } from "../../icons/close-icon/CloseIcon.js";
4
- import { StyledInputField as v } from "../input-field/StyledInputField.js";
5
- import { useState as x } from "react";
4
+ import { StyledInputField as x } from "../input-field/StyledInputField.js";
5
+ import { useState as v } from "react";
6
6
  import { jsx as t } from "react/jsx-runtime";
7
- var F = ({ value: a, onClear: d, label: l, onFocus: c, onBlur: h, slotProps: n, ...r }) => {
8
- const [m, i] = x(!1), o = m || a, s = typeof l == "string" ? l : void 0;
7
+ var S = ({ value: a, onClear: c, label: o, onFocus: m, onBlur: h, slotProps: n, ...l }) => {
8
+ const [p, i] = v(!1), r = p || a, s = typeof o == "string" ? o : void 0;
9
9
  return /* @__PURE__ */ t("div", {
10
10
  className: "relative w-full",
11
- children: /* @__PURE__ */ t(v, {
11
+ children: /* @__PURE__ */ t(x, {
12
12
  size: "small",
13
13
  variant: "outlined",
14
14
  labelPlacement: "floating",
15
15
  value: a,
16
16
  reserveHelperText: !1,
17
- label: o ? l : void 0,
18
- placeholder: o ? void 0 : s,
17
+ label: r ? o : void 0,
18
+ placeholder: r ? void 0 : s,
19
19
  onFocus: (e) => {
20
- i(!0), c?.(e);
20
+ i(!0), m?.(e);
21
21
  },
22
22
  onBlur: (e) => {
23
23
  i(!1), h?.(e);
@@ -25,7 +25,7 @@ var F = ({ value: a, onClear: d, label: l, onFocus: c, onBlur: h, slotProps: n,
25
25
  slotProps: {
26
26
  ...n,
27
27
  htmlInput: {
28
- "aria-label": o ? void 0 : s,
28
+ "aria-label": r ? void 0 : s,
29
29
  ...n?.htmlInput,
30
30
  style: {
31
31
  overflow: "hidden",
@@ -40,14 +40,14 @@ var F = ({ value: a, onClear: d, label: l, onFocus: c, onBlur: h, slotProps: n,
40
40
  type: "button",
41
41
  "aria-label": "Clear",
42
42
  "data-testid": "styled-search-clear-icon",
43
- className: p("asma-pressable", "cursor-pointer rounded-full border-0 bg-delta-50", "flex items-center justify-center", "transform-gpu transition-all duration-300 ease-in-out", a ? "scale-100 opacity-100" : "pointer-events-none scale-75 opacity-0", r.readOnly && "-translate-x-[6.5px]"),
43
+ className: d("asma-pressable", "cursor-pointer rounded-full border-0 bg-delta-50", "flex items-center justify-center", "transform-gpu transition-all duration-300 ease-in-out", a ? "scale-100 opacity-100" : "pointer-events-none scale-75 opacity-0", l.readOnly && "-translate-x-[6.5px]"),
44
44
  style: {
45
45
  width: 24,
46
46
  height: 24,
47
47
  flexShrink: 0
48
48
  },
49
49
  onClick: (e) => {
50
- e.preventDefault(), e.stopPropagation(), d?.();
50
+ e.preventDefault(), e.stopPropagation(), c?.();
51
51
  },
52
52
  children: /* @__PURE__ */ t(f, {
53
53
  width: 20,
@@ -56,7 +56,7 @@ var F = ({ value: a, onClear: d, label: l, onFocus: c, onBlur: h, slotProps: n,
56
56
  className: "pointer-events-none"
57
57
  })
58
58
  }) : null,
59
- startAdornment: o ? void 0 : /* @__PURE__ */ t("span", {
59
+ startAdornment: r ? void 0 : /* @__PURE__ */ t("span", {
60
60
  "data-testid": "styled-search-icon",
61
61
  className: "flex items-center",
62
62
  children: /* @__PURE__ */ t(u, {
@@ -69,15 +69,16 @@ var F = ({ value: a, onClear: d, label: l, onFocus: c, onBlur: h, slotProps: n,
69
69
  ...n?.input
70
70
  }
71
71
  },
72
- ...r,
72
+ ...l,
73
+ className: d("max-xs:max-w-full", l.className),
73
74
  sx: {
74
- width: r.fullWidth ? "100%" : "var(--dynamic-toolbar-search-width, 160px)",
75
+ width: l.fullWidth ? "100%" : "var(--dynamic-toolbar-search-width, 160px)",
75
76
  maxWidth: "none",
76
- ...r.sx
77
+ ...l.sx
77
78
  }
78
79
  })
79
80
  });
80
81
  };
81
82
  export {
82
- F as StyledSearchField
83
+ S as StyledSearchField
83
84
  };
@@ -1,34 +1,34 @@
1
1
  import { cn as o } from "../../helpers/cn.js";
2
2
  import { resolveSx as g } from "../../helpers/sx.js";
3
- import { cloneElement as y, isValidElement as s, useId as C } from "react";
4
- import { jsx as L, jsxs as A } from "react/jsx-runtime";
5
- var E = {
3
+ import { cloneElement as y, isValidElement as t, useId as w } from "react";
4
+ import { jsx as C, jsxs as L } from "react/jsx-runtime";
5
+ var A = {
6
6
  end: "flex-row",
7
7
  start: "flex-row-reverse",
8
8
  top: "flex-col-reverse",
9
9
  bottom: "flex-col"
10
- }, w = ({ control: l, label: a, checked: i, disabled: d, name: m, value: c, labelPlacement: f = "end", className: x, sx: p, onChange: b }) => {
11
- const e = s(l) ? l.props : {}, t = d ?? e.disabled ?? !1, n = C(), u = e["aria-label"] != null || e["aria-labelledby"] != null, h = typeof a == "string" ? a.trim().length > 0 : a != null, r = s(l) && h && !u, v = s(l) ? y(l, {
10
+ }, k = ({ control: l, label: a, checked: i, disabled: m, name: d, value: c, labelPlacement: x = "end", className: f, sx: p, onChange: h }) => {
11
+ const e = t(l) ? l.props : {}, s = m ?? e.disabled ?? !1, n = w(), u = e["aria-label"] != null || e["aria-labelledby"] != null, b = typeof a == "string" ? a.trim().length > 0 : a != null, r = t(l) && b && !u, v = t(l) ? y(l, {
12
12
  checked: e.checked ?? i,
13
- onChange: e.onChange ?? b,
14
- disabled: t,
15
- name: e.name ?? m,
13
+ onChange: e.onChange ?? h,
14
+ disabled: s,
15
+ name: e.name ?? d,
16
16
  value: e.value ?? c,
17
17
  ...r ? { "aria-labelledby": n } : {}
18
18
  }) : l;
19
- return /* @__PURE__ */ A("label", {
20
- className: o("m-0 inline-flex items-center gap-2 align-middle text-delta-800", t ? "cursor-default" : "cursor-pointer", E[f], x),
19
+ return /* @__PURE__ */ L("label", {
20
+ className: o("m-0 inline-flex items-center gap-2 align-middle text-delta-800", s ? "cursor-default" : "cursor-pointer", A[x], f),
21
21
  style: {
22
22
  fontFamily: "Roboto, Helvetica, Arial, sans-serif",
23
23
  ...g(p)
24
24
  },
25
- children: [v, a != null && /* @__PURE__ */ L("span", {
25
+ children: [v, a != null && /* @__PURE__ */ C("span", {
26
26
  id: r ? n : void 0,
27
- className: o("text-sm leading-5 tracking-[0.00938em]", t && "text-delta-300"),
27
+ className: o("text-sm leading-5 tracking-[0.00938em]", "max-xs:min-w-0 max-xs:hyphens-auto max-xs:![overflow-wrap:anywhere]", s && "text-delta-300"),
28
28
  children: a
29
29
  })]
30
30
  });
31
31
  };
32
32
  export {
33
- w as StyledFormControlLabel
33
+ k as StyledFormControlLabel
34
34
  };
@@ -1,67 +1,67 @@
1
- import { StyledTooltip as D } from "../../data-display/tooltip/StyledTooltip.js";
2
- import e from "./StyledLink.module.js";
3
- import k from "clsx";
1
+ import { StyledTooltip as w } from "../../data-display/tooltip/StyledTooltip.js";
2
+ import a from "./StyledLink.module.js";
3
+ import o from "clsx";
4
4
  import "react";
5
- import { jsx as g, jsxs as o } from "react/jsx-runtime";
6
- var v = ({ href: y, disabled: l, disabledReason: d, size: p = "large", dataTest: m, reflink: u, className: r, content: n, contentNode: s, onClick: x, ...i }) => {
7
- let a = e["styled-link-large"];
5
+ import { jsx as h, jsxs as y } from "react/jsx-runtime";
6
+ var j = ({ href: m, disabled: e, disabledReason: x, size: p = "large", dataTest: k, reflink: u, className: n, content: i, contentNode: s, onClick: c, ...t }) => {
7
+ let r = a["styled-link-large"];
8
8
  switch (p) {
9
9
  case "large":
10
- a = e["styled-link-large"];
10
+ r = a["styled-link-large"];
11
11
  break;
12
12
  case "small":
13
- a = e["styled-link-small"];
13
+ r = a["styled-link-small"];
14
14
  break;
15
15
  case "xs":
16
- a = e["styled-link-xs"];
16
+ r = a["styled-link-xs"];
17
17
  break;
18
18
  }
19
- if (l && !d) return /* @__PURE__ */ o("span", {
20
- className: k(e["styled-link"], e["styled-link-disabled"], a, r),
21
- children: [n, s]
19
+ if (e && !x) return /* @__PURE__ */ y("span", {
20
+ className: o(a["styled-link"], "max-xs:hyphens-auto max-xs:![overflow-wrap:anywhere]", a["styled-link-disabled"], r, n),
21
+ children: [i, s]
22
22
  });
23
- const c = (t) => /* @__PURE__ */ g(D, {
24
- title: d,
25
- open: l ? void 0 : !1,
26
- openOnTap: !!l,
27
- persistentDescription: !!l,
28
- children: t
29
- }), f = (t) => {
30
- if (l) {
31
- t.preventDefault();
23
+ const f = (l) => /* @__PURE__ */ h(w, {
24
+ title: x,
25
+ open: e ? void 0 : !1,
26
+ openOnTap: !!e,
27
+ persistentDescription: !!e,
28
+ children: l
29
+ }), d = (l) => {
30
+ if (e) {
31
+ l.preventDefault();
32
32
  return;
33
33
  }
34
- x?.(t);
34
+ c?.(l);
35
35
  };
36
- return c(y ? /* @__PURE__ */ o("a", {
37
- ...i,
38
- "data-testid": m,
36
+ return f(m ? /* @__PURE__ */ y("a", {
37
+ ...t,
38
+ "data-testid": k,
39
39
  ref: u,
40
- href: l ? void 0 : y,
41
- role: l ? "link" : i.role,
42
- "aria-disabled": l ? !0 : i["aria-disabled"],
43
- tabIndex: l ? 0 : i.tabIndex,
44
- onClick: f,
45
- onKeyDown: (t) => {
46
- if (l && t.key === "Enter") {
47
- t.preventDefault();
40
+ href: e ? void 0 : m,
41
+ role: e ? "link" : t.role,
42
+ "aria-disabled": e ? !0 : t["aria-disabled"],
43
+ tabIndex: e ? 0 : t.tabIndex,
44
+ onClick: d,
45
+ onKeyDown: (l) => {
46
+ if (e && l.key === "Enter") {
47
+ l.preventDefault();
48
48
  return;
49
49
  }
50
- i.onKeyDown?.(t);
50
+ t.onKeyDown?.(l);
51
51
  },
52
- className: k(e["styled-link"], l ? e["styled-link-disabled"] : "asma-touch-ready", a, r),
53
- children: [n, s]
54
- }) : /* @__PURE__ */ o("button", {
55
- ...i,
56
- "data-testid": m,
52
+ className: o(a["styled-link"], "max-xs:hyphens-auto max-xs:![overflow-wrap:anywhere]", e ? a["styled-link-disabled"] : "asma-touch-ready", r, n),
53
+ children: [i, s]
54
+ }) : /* @__PURE__ */ y("button", {
55
+ ...t,
56
+ "data-testid": k,
57
57
  ref: u,
58
58
  type: "button",
59
- "aria-disabled": l ? !0 : i["aria-disabled"],
60
- onClick: f,
61
- className: k(e["styled-link"], e["styled-link-button"], l ? e["styled-link-disabled"] : "asma-touch-ready", a, r),
62
- children: [n, s]
59
+ "aria-disabled": e ? !0 : t["aria-disabled"],
60
+ onClick: d,
61
+ className: o(a["styled-link"], "max-xs:hyphens-auto max-xs:![overflow-wrap:anywhere]", a["styled-link-button"], e ? a["styled-link-disabled"] : "asma-touch-ready", r, n),
62
+ children: [i, s]
63
63
  }));
64
64
  };
65
65
  export {
66
- v as StyledLink
66
+ j as StyledLink
67
67
  };