asma-ui-core 3.121.5 → 3.122.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 (30) 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/pathfinder-card/Pathfinder.module.js +14 -13
  4. package/dist/components/custom/pathfinder-card/PathfinderCard.js +64 -64
  5. package/dist/components/custom/widget/widget/StyledWidget.js +44 -37
  6. package/dist/components/custom/widget/widget-header/StyledWidgetHeader.js +7 -7
  7. package/dist/components/custom/widget/widget-title/StyledWidgetTitle.js +8 -8
  8. package/dist/components/data-display/chip/StyledChip.js +42 -42
  9. package/dist/components/data-display/form-label/components/StyledFormLabel.js +15 -15
  10. package/dist/components/feedback/dialog/StyledDialog.js +75 -75
  11. package/dist/components/feedback/dialog/StyledDialogActions.js +4 -4
  12. package/dist/components/feedback/dialog/StyledDialogTitle.js +13 -13
  13. package/dist/components/feedback/dialog/dialog-footer/StyledDialogFooter.js +70 -69
  14. package/dist/components/feedback/minimizable-dialog/MinimizableDialog.js +69 -69
  15. package/dist/components/feedback/minimizable-dialog/v2/MinimizableDialogV2.js +81 -81
  16. package/dist/components/feedback/snack-bar/StyledAlert.js +16 -16
  17. package/dist/components/inputs/button/StyledButton.js +36 -35
  18. package/dist/components/inputs/input-field/StyledInputField.js +38 -38
  19. package/dist/components/inputs/search-field/StyledSearchField.js +18 -17
  20. package/dist/components/miscellaneous/StyledFormControlLabel.js +13 -13
  21. package/dist/components/navigation/link/StyledLink.js +44 -44
  22. package/dist/components/navigation/title-chevron/StyledTitleChevron.js +13 -13
  23. package/dist/components/utils/bottom-sheet/StyledBottomSheet.js +45 -45
  24. package/dist/components/utils/popover/PopoverAnatomy.js +23 -23
  25. package/dist/hooks/useMediaQuery.hook.js +3 -2
  26. package/dist/src/components/custom/module/header-layout/ToolbarRows.d.ts +3 -1
  27. package/dist/src/hooks/useMediaQuery.hook.d.ts +2 -0
  28. package/dist/src/table/types.d.ts +8 -0
  29. package/dist/table/components/TableRow.js +89 -87
  30. package/package.json +1 -1
@@ -1,37 +1,37 @@
1
- import { cn as h } from "../../../../helpers/cn.js";
2
- import { CloseIcon as j } from "../../../icons/close-icon/CloseIcon.js";
3
- import { StyledButton as k } from "../../../inputs/button/StyledButton.js";
4
- import { ToolbarActionGroup as c, hasPlannedActions as f } from "./ToolbarActionGroup.js";
5
- import { formatSelectionLabel as b } from "./useTranslations.js";
6
- import { StyledWidgetTitle as I } from "../../widget/widget-title/StyledWidgetTitle.js";
1
+ import { cn as a } from "../../../../helpers/cn.js";
2
+ import { CloseIcon as F } from "../../../icons/close-icon/CloseIcon.js";
3
+ import { StyledButton as I } from "../../../inputs/button/StyledButton.js";
4
+ import { ToolbarActionGroup as s, hasPlannedActions as p } from "./ToolbarActionGroup.js";
5
+ import { formatSelectionLabel as C } from "./useTranslations.js";
6
+ import { StyledWidgetTitle as G } from "../../widget/widget-title/StyledWidgetTitle.js";
7
7
  import { Fragment as o, jsx as i, jsxs as r } from "react/jsx-runtime";
8
- function F({ selectedCount: e, onClearSelection: n, translations: t }) {
8
+ function R({ selectedCount: e, onClearSelection: n, translations: t }) {
9
9
  return /* @__PURE__ */ i("div", {
10
10
  className: "flex shrink-0 items-center whitespace-nowrap",
11
11
  "aria-live": "polite",
12
12
  "aria-atomic": "true",
13
- children: /* @__PURE__ */ i(k, {
13
+ children: /* @__PURE__ */ i(I, {
14
14
  dataTest: "dynamic-toolbar-clear-selection",
15
15
  variant: "text",
16
16
  className: "!min-w-0 !px-1 !font-semibold",
17
- startIcon: n ? /* @__PURE__ */ i(j, {
17
+ startIcon: n ? /* @__PURE__ */ i(F, {
18
18
  width: 20,
19
19
  height: 20
20
20
  }) : void 0,
21
21
  onClick: n,
22
22
  "aria-label": t.clearSelection,
23
- children: b(e, t)
23
+ children: C(e, t)
24
24
  })
25
25
  });
26
26
  }
27
- function D({ selectedCount: e, onClearSelection: n, translations: t, bulkActionsPlan: l }) {
27
+ function H({ selectedCount: e, onClearSelection: n, translations: t, bulkActionsPlan: l }) {
28
28
  return /* @__PURE__ */ r("div", {
29
- className: "flex w-full min-w-0 flex-nowrap items-center justify-between gap-3",
30
- children: [/* @__PURE__ */ i(F, {
29
+ className: "flex w-full min-w-0 flex-nowrap items-center justify-between gap-3 max-xs:flex-wrap max-xs:gap-y-2",
30
+ children: [/* @__PURE__ */ i(R, {
31
31
  selectedCount: e,
32
32
  onClearSelection: n,
33
33
  translations: t
34
- }), /* @__PURE__ */ i(c, {
34
+ }), /* @__PURE__ */ i(s, {
35
35
  plan: l,
36
36
  overflowMenuLabel: t.more,
37
37
  inProgressLabel: t.inProgress,
@@ -39,39 +39,39 @@ function D({ selectedCount: e, onClearSelection: n, translations: t, bulkActions
39
39
  })]
40
40
  });
41
41
  }
42
- function S({ search: e, expanded: n, measureRef: t }) {
42
+ function B({ search: e, expanded: n, measureRef: t }) {
43
43
  return /* @__PURE__ */ i("div", {
44
44
  ref: n ? void 0 : t,
45
45
  style: n ? { "--dynamic-toolbar-search-width": "100%" } : void 0,
46
- className: h(n ? "min-w-0 flex-1" : "w-40 shrink-0"),
46
+ className: a(n ? "min-w-0 flex-1 max-xs:basis-full" : "w-40 shrink-0"),
47
47
  children: e
48
48
  });
49
49
  }
50
- function g({ visible: e, children: n }) {
50
+ function T({ visible: e, flattenBelowXs: n = !1, children: t }) {
51
51
  return /* @__PURE__ */ i("div", {
52
- className: h("overflow-hidden whitespace-nowrap transition-[max-width,opacity] duration-200 ease-in-out", e ? "max-w-[2000px] opacity-100" : "pointer-events-none max-w-0 opacity-0"),
52
+ className: a("overflow-hidden whitespace-nowrap transition-[max-width,opacity] duration-200 ease-in-out", e ? "max-w-[2000px] opacity-100" : "pointer-events-none max-w-0 opacity-0", n && "max-xs:contents"),
53
53
  "aria-hidden": !e,
54
54
  children: /* @__PURE__ */ i("div", {
55
- className: "inline-flex items-center gap-2",
56
- children: n
55
+ className: a("inline-flex items-center gap-2", n && "max-xs:contents"),
56
+ children: t
57
57
  })
58
58
  });
59
59
  }
60
- function C({ title: e, measureRef: n }) {
61
- return typeof e == "string" ? /* @__PURE__ */ i(I, {
60
+ function A({ title: e, measureRef: n }) {
61
+ return typeof e == "string" ? /* @__PURE__ */ i(G, {
62
62
  ref: n,
63
- className: "!min-w-0 truncate",
63
+ className: a("!min-w-0 truncate", "max-xs:hyphens-auto max-xs:whitespace-normal max-xs:![overflow-wrap:anywhere]"),
64
64
  children: e
65
65
  }) : /* @__PURE__ */ i("div", {
66
66
  ref: n,
67
- className: "min-w-0 truncate",
67
+ className: a("min-w-0 truncate", "max-xs:hyphens-auto max-xs:whitespace-normal max-xs:![overflow-wrap:anywhere]"),
68
68
  children: e
69
69
  });
70
70
  }
71
- function E({ title: e, helperText: n, titleMeasureRef: t }) {
71
+ function J({ title: e, helperText: n, titleMeasureRef: t }) {
72
72
  return !e && !n ? null : /* @__PURE__ */ r("div", {
73
73
  className: "min-w-0 max-w-full",
74
- children: [e && /* @__PURE__ */ i(C, {
74
+ children: [e && /* @__PURE__ */ i(A, {
75
75
  title: e,
76
76
  measureRef: t
77
77
  }), n && /* @__PURE__ */ i("div", {
@@ -80,61 +80,65 @@ function E({ title: e, helperText: n, titleMeasureRef: t }) {
80
80
  })]
81
81
  });
82
82
  }
83
- function H({ variant: e, beforeFilterActionsPlan: n, filter: t, search: l, afterSearchActionsPlan: p, bulkActionsPlan: a, showPageActions: w, overflowMenuLabel: s, inProgressLabel: m, searchMeasureRef: B, align: T = "end" }) {
84
- const d = w && f(n), u = w && f(p), x = e === "inline-selection" && f(a);
85
- if (!(t != null || l != null) && !d && !u && !x) return null;
86
- const v = d ? /* @__PURE__ */ i(g, {
87
- visible: d,
88
- children: /* @__PURE__ */ i(c, {
83
+ function K({ variant: e, beforeFilterActionsPlan: n, filter: t, search: l, afterSearchActionsPlan: w, bulkActionsPlan: c, showPageActions: y, overflowMenuLabel: m, inProgressLabel: d, searchMeasureRef: b, align: j = "end" }) {
84
+ const u = y && p(n), x = y && p(w), v = e === "inline-selection" && p(c), k = t != null || l != null, f = e === "utility-row", h = f ? "max-xs:contents" : void 0;
85
+ if (!k && !u && !x && !v) return null;
86
+ const N = u ? /* @__PURE__ */ i(T, {
87
+ visible: u,
88
+ flattenBelowXs: f,
89
+ children: /* @__PURE__ */ i(s, {
89
90
  plan: n,
90
- overflowMenuLabel: s,
91
- inProgressLabel: m
91
+ className: h,
92
+ overflowMenuLabel: m,
93
+ inProgressLabel: d
92
94
  })
93
- }) : null, y = u ? /* @__PURE__ */ i(g, {
94
- visible: u,
95
+ }) : null, S = x ? /* @__PURE__ */ i(T, {
96
+ visible: x,
97
+ flattenBelowXs: f,
95
98
  children: /* @__PURE__ */ i("div", {
96
- className: "flex flex-nowrap items-center gap-2",
97
- children: /* @__PURE__ */ i(c, {
98
- plan: p,
99
- overflowMenuLabel: s,
100
- inProgressLabel: m
99
+ className: a("flex flex-nowrap items-center gap-2", h),
100
+ children: /* @__PURE__ */ i(s, {
101
+ plan: w,
102
+ className: h,
103
+ overflowMenuLabel: m,
104
+ inProgressLabel: d
101
105
  })
102
106
  })
103
- }) : null, N = /* @__PURE__ */ r(o, { children: [t, l != null && /* @__PURE__ */ i(S, {
107
+ }) : null, g = /* @__PURE__ */ r(o, { children: [t, l != null && /* @__PURE__ */ i(B, {
104
108
  search: l,
105
- measureRef: B
109
+ measureRef: b
106
110
  })] });
107
111
  return /* @__PURE__ */ r("div", {
108
- className: h("flex w-full min-w-0 flex-nowrap items-center gap-2", T === "end" ? "justify-end" : "justify-start"),
112
+ className: a("flex w-full min-w-0 flex-nowrap items-center gap-2", j === "end" ? "justify-end" : "justify-start", e === "utility-row" && "max-xs:flex-wrap"),
109
113
  children: [
110
- e === "inline-selection" && /* @__PURE__ */ r(o, { children: [x && a && /* @__PURE__ */ i(c, {
111
- plan: a,
112
- overflowMenuLabel: s,
113
- inProgressLabel: m,
114
+ e === "inline-selection" && /* @__PURE__ */ r(o, { children: [v && c && /* @__PURE__ */ i(s, {
115
+ plan: c,
116
+ overflowMenuLabel: m,
117
+ inProgressLabel: d,
114
118
  selectionTone: !0
115
- }), N] }),
119
+ }), g] }),
116
120
  e === "inline-normal" && /* @__PURE__ */ r(o, { children: [
117
- v,
118
121
  N,
119
- y
122
+ g,
123
+ S
120
124
  ] }),
121
125
  e === "utility-row" && /* @__PURE__ */ r(o, { children: [
122
- v,
123
- l != null && /* @__PURE__ */ i(S, {
126
+ N,
127
+ l != null && /* @__PURE__ */ i(B, {
124
128
  search: l,
125
129
  expanded: !0
126
130
  }),
127
131
  t,
128
- y
132
+ S
129
133
  ] })
130
134
  ]
131
135
  });
132
136
  }
133
137
  export {
134
- S as SearchSlot,
135
- F as SelectionIndicator,
136
- D as SelectionRow,
137
- E as TitleBlock,
138
- C as TitleText,
139
- H as UtilityCluster
138
+ B as SearchSlot,
139
+ R as SelectionIndicator,
140
+ H as SelectionRow,
141
+ J as TitleBlock,
142
+ A as TitleText,
143
+ K as UtilityCluster
140
144
  };
@@ -1,16 +1,17 @@
1
- var e = "_root_wse1z_1", _ = "_shell_wse1z_5", a = "_shellCompact_wse1z_9", s = "_shellExpanded_wse1z_13", r = "_content_wse1z_17", t = "_compactItems_wse1z_21", o = "_compactItemsStacked_wse1z_25", m = "_expandedItems_wse1z_29", c = "_measureRow_wse1z_33", l = "_measureLayer_wse1z_37", d = "_chevron_wse1z_41", v = {
2
- root: e,
3
- shell: _,
4
- shellCompact: a,
5
- shellExpanded: s,
6
- content: r,
7
- compactItems: t,
8
- compactItemsStacked: o,
9
- expandedItems: m,
10
- measureRow: c,
11
- measureLayer: l,
12
- chevron: d
1
+ var t = "_root_6jgtc_2", e = "_shell_6jgtc_6", _ = "_shellCompact_6jgtc_10", a = "_shellExpanded_6jgtc_14", c = "_content_6jgtc_18", r = "_contentCompact_6jgtc_26", o = "_compactItems_6jgtc_30", m = "_compactItemsStacked_6jgtc_34", s = "_expandedItems_6jgtc_38", l = "_measureRow_6jgtc_42", n = "_measureLayer_6jgtc_46", v = "_chevron_6jgtc_50", d = {
2
+ root: t,
3
+ shell: e,
4
+ shellCompact: _,
5
+ shellExpanded: a,
6
+ content: c,
7
+ contentCompact: r,
8
+ compactItems: o,
9
+ compactItemsStacked: m,
10
+ expandedItems: s,
11
+ measureRow: l,
12
+ measureLayer: n,
13
+ chevron: v
13
14
  };
14
15
  export {
15
- v as default
16
+ d as default
16
17
  };
@@ -1,25 +1,25 @@
1
- import { cn as b } from "../../../helpers/cn.js";
1
+ import { cn as g } from "../../../helpers/cn.js";
2
2
  import { ChevronDownIcon as j } from "../../icons/chevron-down-icon/ChevronDownIcon.js";
3
3
  import { ChevronUpIcon as z } from "../../icons/chevron-up-icon/ChevronUpIcon.js";
4
- import h from "./Pathfinder.module.js";
5
- import { useCallback as R, useEffect as M, useLayoutEffect as O, useMemo as y, useRef as k, useState as x, useSyncExternalStore as P } from "react";
6
- import { Fragment as D, jsx as e, jsxs as I } from "react/jsx-runtime";
4
+ import o from "./Pathfinder.module.js";
5
+ import { useCallback as C, useEffect as M, useLayoutEffect as O, useMemo as y, useRef as I, useState as x, useSyncExternalStore as P } from "react";
6
+ import { Fragment as D, jsx as e, jsxs as R } from "react/jsx-runtime";
7
7
  var _ = typeof window < "u" ? O : M;
8
8
  function q() {
9
- const [i, n] = x(null), a = R((t) => {
9
+ const [i, n] = x(null), a = C((t) => {
10
10
  n(t);
11
- }, []), s = R(() => i ? Math.floor(i.getBoundingClientRect().width) : 0, [i]);
11
+ }, []), s = C(() => i ? Math.floor(i.getBoundingClientRect().width) : 0, [i]);
12
12
  return {
13
13
  ref: a,
14
- width: P(R((t) => {
14
+ width: P(C((t) => {
15
15
  if (!i || typeof ResizeObserver > "u") return () => {
16
16
  };
17
17
  let d = 0;
18
- const o = new ResizeObserver(() => {
18
+ const l = new ResizeObserver(() => {
19
19
  cancelAnimationFrame(d), d = requestAnimationFrame(t);
20
20
  });
21
- return o.observe(i), () => {
22
- cancelAnimationFrame(d), o.disconnect();
21
+ return l.observe(i), () => {
22
+ cancelAnimationFrame(d), l.disconnect();
23
23
  };
24
24
  }, [i]), s, () => 0)
25
25
  };
@@ -31,80 +31,80 @@ function A(i) {
31
31
  });
32
32
  }
33
33
  function K(i) {
34
- const { items: n, leadSlot: a, actionSlot: s } = i, t = k({}), d = k(null), o = k(null), [l, v] = x({
34
+ const { items: n, leadSlot: a, actionSlot: s } = i, t = I({}), d = I(null), l = I(null), [m, v] = x({
35
35
  itemWidths: {},
36
36
  leadWidth: 0,
37
37
  actionWidth: 0
38
- }), f = k(l);
38
+ }), p = I(m);
39
39
  M(() => {
40
- f.current = l;
41
- }, [l]);
42
- const p = R((r) => (m) => {
43
- t.current[r] = m;
40
+ p.current = m;
41
+ }, [m]);
42
+ const h = C((r) => (u) => {
43
+ t.current[r] = u;
44
44
  }, []);
45
45
  return _(() => {
46
46
  const r = {};
47
- for (const u of n) {
48
- const w = t.current[u.id], N = Math.ceil(w?.getBoundingClientRect().width ?? u.estimatedWidth ?? 0);
49
- r[u.id] = N;
47
+ for (const f of n) {
48
+ const k = t.current[f.id], w = Math.ceil(k?.getBoundingClientRect().width ?? f.estimatedWidth ?? 0);
49
+ r[f.id] = w;
50
50
  }
51
- const m = a ? Math.ceil(d.current?.getBoundingClientRect().width ?? 0) : 0, g = s ? Math.ceil(o.current?.getBoundingClientRect().width ?? 0) : 0, W = f.current;
52
- (!(Object.keys(W.itemWidths).length === Object.keys(r).length && n.every((u) => W.itemWidths[u.id] === r[u.id])) || W.leadWidth !== m || W.actionWidth !== g) && v({
51
+ const u = a ? Math.ceil(d.current?.getBoundingClientRect().width ?? 0) : 0, N = s ? Math.ceil(l.current?.getBoundingClientRect().width ?? 0) : 0, W = p.current;
52
+ (!(Object.keys(W.itemWidths).length === Object.keys(r).length && n.every((f) => W.itemWidths[f.id] === r[f.id])) || W.leadWidth !== u || W.actionWidth !== N) && v({
53
53
  itemWidths: r,
54
- leadWidth: m,
55
- actionWidth: g
54
+ leadWidth: u,
55
+ actionWidth: N
56
56
  });
57
57
  }, [
58
58
  n,
59
59
  a,
60
60
  s
61
61
  ]), {
62
- measurements: l,
63
- registerItemRef: p,
62
+ measurements: m,
63
+ registerItemRef: h,
64
64
  leadRef: d,
65
- actionRef: o
65
+ actionRef: l
66
66
  };
67
67
  }
68
68
  function U(i) {
69
69
  const { items: n, availableWidth: a, gapPx: s, itemWidths: t } = i, d = [];
70
- let o = 0;
71
- for (const l of A(n)) {
72
- const v = Math.max(0, t[l.id] ?? l.estimatedWidth ?? 0), f = d.length === 0 ? v : o + s + v;
73
- if (f > a) break;
74
- d.push(l), o = f;
70
+ let l = 0;
71
+ for (const m of A(n)) {
72
+ const v = Math.max(0, t[m.id] ?? m.estimatedWidth ?? 0), p = d.length === 0 ? v : l + s + v;
73
+ if (p > a) break;
74
+ d.push(m), l = p;
75
75
  }
76
76
  return d;
77
77
  }
78
- function C({ item: i, compact: n }) {
78
+ function b({ item: i, compact: n }) {
79
79
  return /* @__PURE__ */ e(D, { children: i.render({ compact: n }) });
80
80
  }
81
- function Y({ items: i, expanded: n, onToggleExpanded: a, leadSlot: s, actionSlot: t, className: d, leadReservePx: o = 140, actionReservePx: l = 44 }) {
82
- const { ref: v, width: f } = q(), p = !n, r = y(() => A(i), [i]), { measurements: m, registerItemRef: g, leadRef: W, actionRef: u } = K({
81
+ function Y({ items: i, expanded: n, onToggleExpanded: a, leadSlot: s, actionSlot: t, className: d, leadReservePx: l = 140, actionReservePx: m = 44 }) {
82
+ const { ref: v, width: p } = q(), h = !n, r = y(() => A(i), [i]), { measurements: u, registerItemRef: N, leadRef: W, actionRef: f } = K({
83
83
  items: r,
84
84
  leadSlot: s,
85
85
  actionSlot: t
86
- }), w = y(() => {
86
+ }), k = y(() => {
87
87
  if (n) return r;
88
- const c = 24, L = 24, B = s ? Math.max(o, m.leadWidth + 12) : 0, F = t ? Math.max(l, m.actionWidth) : 0;
88
+ const c = 24, L = 48, B = s ? Math.max(l, u.leadWidth + 12) : 0, F = t ? Math.max(m, u.actionWidth) : 0;
89
89
  return U({
90
90
  items: r,
91
- availableWidth: Math.max(0, f - c - L - B - F - 24),
91
+ availableWidth: Math.max(0, p - c - L - B - F),
92
92
  gapPx: 12,
93
- itemWidths: m.itemWidths
93
+ itemWidths: u.itemWidths
94
94
  });
95
95
  }, [
96
96
  n,
97
97
  r,
98
- f,
98
+ p,
99
99
  s,
100
100
  t,
101
- o,
102
101
  l,
103
- m
104
- ]), N = p && w.length < Math.min(2, r.length), E = N ? r.slice(0, 2) : w;
105
- return /* @__PURE__ */ I("div", {
102
+ m,
103
+ u
104
+ ]), w = h && k.length < Math.min(2, r.length), E = w ? r.slice(0, 2) : k;
105
+ return /* @__PURE__ */ R("div", {
106
106
  ref: v,
107
- className: b(h.root, "asma-pressable", p ? "overflow-hidden" : "overflow-visible", d),
107
+ className: g(o.root, "asma-pressable", h ? "overflow-hidden" : "overflow-visible", d),
108
108
  "aria-expanded": n,
109
109
  role: "button",
110
110
  tabIndex: 0,
@@ -113,34 +113,34 @@ function Y({ items: i, expanded: n, onToggleExpanded: a, leadSlot: s, actionSlot
113
113
  (c.key === "Enter" || c.key === " ") && (c.preventDefault(), a());
114
114
  },
115
115
  children: [
116
- /* @__PURE__ */ I("div", {
117
- className: b(h.shell, p ? h.shellCompact : h.shellExpanded),
116
+ /* @__PURE__ */ R("div", {
117
+ className: g(o.shell, h ? o.shellCompact : o.shellExpanded),
118
118
  children: [s ? /* @__PURE__ */ e("div", {
119
119
  className: "shrink-0",
120
120
  children: s
121
121
  }) : null, /* @__PURE__ */ e("div", {
122
- className: h.content,
123
- children: p ? /* @__PURE__ */ e("div", {
124
- className: b(h.compactItems, N && h.compactItemsStacked),
122
+ className: g(o.content, h && o.contentCompact),
123
+ children: h ? /* @__PURE__ */ e("div", {
124
+ className: g(o.compactItems, w && o.compactItemsStacked),
125
125
  children: E.map((c) => /* @__PURE__ */ e("div", {
126
- className: "shrink-0 whitespace-nowrap",
127
- children: /* @__PURE__ */ e(C, {
126
+ className: g("min-w-0 whitespace-nowrap", w ? "w-full" : "shrink"),
127
+ children: /* @__PURE__ */ e(b, {
128
128
  item: c,
129
- compact: p
129
+ compact: h
130
130
  })
131
131
  }, c.id))
132
- }) : /* @__PURE__ */ I("div", {
133
- className: h.expandedItems,
132
+ }) : /* @__PURE__ */ R("div", {
133
+ className: o.expandedItems,
134
134
  children: [r.map((c) => /* @__PURE__ */ e("div", {
135
135
  className: "shrink-0 whitespace-nowrap",
136
- children: /* @__PURE__ */ e(C, {
136
+ children: /* @__PURE__ */ e(b, {
137
137
  item: c,
138
- compact: p
138
+ compact: h
139
139
  })
140
140
  }, c.id)), t ? /* @__PURE__ */ e("div", {
141
141
  className: "shrink-0",
142
142
  children: /* @__PURE__ */ e("div", {
143
- ref: u,
143
+ ref: f,
144
144
  children: t
145
145
  })
146
146
  }) : null]
@@ -148,15 +148,15 @@ function Y({ items: i, expanded: n, onToggleExpanded: a, leadSlot: s, actionSlot
148
148
  })]
149
149
  }),
150
150
  /* @__PURE__ */ e("div", {
151
- className: h.chevron,
151
+ className: o.chevron,
152
152
  children: n ? /* @__PURE__ */ e(z, { className: "size-6" }) : /* @__PURE__ */ e(j, { className: "size-6" })
153
153
  }),
154
154
  /* @__PURE__ */ e("div", {
155
155
  "aria-hidden": !0,
156
156
  inert: "true",
157
- className: h.measureLayer,
158
- children: /* @__PURE__ */ I("div", {
159
- className: h.measureRow,
157
+ className: o.measureLayer,
158
+ children: /* @__PURE__ */ R("div", {
159
+ className: o.measureRow,
160
160
  children: [
161
161
  s ? /* @__PURE__ */ e("div", {
162
162
  className: "shrink-0",
@@ -166,9 +166,9 @@ function Y({ items: i, expanded: n, onToggleExpanded: a, leadSlot: s, actionSlot
166
166
  })
167
167
  }) : null,
168
168
  r.map((c) => /* @__PURE__ */ e("div", {
169
- ref: g(c.id),
169
+ ref: N(c.id),
170
170
  className: "shrink-0 whitespace-nowrap",
171
- children: /* @__PURE__ */ e(C, {
171
+ children: /* @__PURE__ */ e(b, {
172
172
  item: c,
173
173
  compact: !0
174
174
  })
@@ -176,7 +176,7 @@ function Y({ items: i, expanded: n, onToggleExpanded: a, leadSlot: s, actionSlot
176
176
  t ? /* @__PURE__ */ e("div", {
177
177
  className: "shrink-0",
178
178
  children: /* @__PURE__ */ e("div", {
179
- ref: u,
179
+ ref: f,
180
180
  children: t
181
181
  })
182
182
  }) : null
@@ -1,70 +1,77 @@
1
- import x from "../icons/ChevronDownIcon.js";
2
- import { StyledButton as v } from "../../../inputs/button/StyledButton.js";
3
- import { StyledEmptyPage as y } from "../../../feedback/empty-page/StyledEmptyPage.js";
1
+ import { cn as m } from "../../../../helpers/cn.js";
2
+ import y from "../icons/ChevronDownIcon.js";
3
+ import { StyledButton as N } from "../../../inputs/button/StyledButton.js";
4
+ import { StyledEmptyPage as v } from "../../../feedback/empty-page/StyledEmptyPage.js";
4
5
  import { StyledLoading as C } from "../../../feedback/loading/StyledLoading.js";
5
- import { StyledLink as N } from "../../../navigation/link/StyledLink.js";
6
- import { StyledWidgetTitle as b } from "../widget-title/StyledWidgetTitle.js";
7
- import d from "./StyledWidget.module.js";
8
- import I from "../icons/ChevronUpIcon.js";
9
- import { useState as T } from "react";
10
- import { Fragment as $, jsx as e, jsxs as r } from "react/jsx-runtime";
11
- var E = ({ children: l, title: m, titleNode: s, icon: c, link: i, viewMore: t, persistKey: o, isLoading: h, isEmpty: n, emptyText: g, headerRight: f, headerRightClassName: p }) => {
12
- const [a, u] = T(() => o ? localStorage.getItem(o) === "true" : !1), S = !!i && !i.hide, w = !!t && !t.hide;
13
- return /* @__PURE__ */ r("div", {
14
- className: `${d["asma-ui-core-styled-widget"]} ${n ? d["empty-state"] : ""}`,
6
+ import { StyledLink as b } from "../../../navigation/link/StyledLink.js";
7
+ import { StyledWidgetTitle as I } from "../widget-title/StyledWidgetTitle.js";
8
+ import a from "./StyledWidget.module.js";
9
+ import T from "../icons/ChevronUpIcon.js";
10
+ import { useState as k } from "react";
11
+ import { Fragment as L, jsx as e, jsxs as o } from "react/jsx-runtime";
12
+ var U = ({ children: s, title: c, titleNode: h, icon: l, link: d, viewMore: t, persistKey: i, isLoading: f, isEmpty: n, emptyText: g, headerRight: x, headerRightClassName: p }) => {
13
+ const [r, w] = k(() => i ? localStorage.getItem(i) === "true" : !1), u = !!d && !d.hide, S = !!t && !t.hide;
14
+ return /* @__PURE__ */ o("div", {
15
+ className: `${a["asma-ui-core-styled-widget"]} ${n ? a["empty-state"] : ""}`,
15
16
  children: [
16
- /* @__PURE__ */ r("div", {
17
- className: d["widget-header-left"],
17
+ /* @__PURE__ */ o("div", {
18
+ className: m(a["widget-header-left"], "max-xs:flex-wrap max-xs:gap-y-2"),
18
19
  children: [
19
- c,
20
- s ?? /* @__PURE__ */ e(b, { children: m }),
20
+ l && /* @__PURE__ */ e("span", {
21
+ className: "flex shrink-0",
22
+ children: l
23
+ }),
24
+ h ?? /* @__PURE__ */ e(I, {
25
+ className: "min-w-min",
26
+ children: c
27
+ }),
21
28
  /* @__PURE__ */ e("div", {
22
- className: `${d["widget-header-right"]} ${p ?? ""}`,
23
- children: f
29
+ className: m(a["widget-header-right"], "max-xs:flex-wrap max-xs:gap-y-2", p),
30
+ children: x
24
31
  })
25
32
  ]
26
33
  }),
27
34
  /* @__PURE__ */ e("div", {
28
- className: d["widget-content"],
29
- children: /* @__PURE__ */ r($, { children: [
30
- l,
31
- /* @__PURE__ */ e(C, { isLoading: h }),
32
- /* @__PURE__ */ e(y, {
35
+ className: a["widget-content"],
36
+ children: /* @__PURE__ */ o(L, { children: [
37
+ s,
38
+ /* @__PURE__ */ e(C, { isLoading: f }),
39
+ /* @__PURE__ */ e(v, {
33
40
  isEmpty: n,
34
41
  emptyText: g
35
42
  })
36
43
  ] })
37
44
  }),
38
- w && /* @__PURE__ */ r("div", {
39
- className: d["widget-footer"],
40
- children: [t.hide ? /* @__PURE__ */ e("div", {}) : /* @__PURE__ */ e(v, {
45
+ S && /* @__PURE__ */ o("div", {
46
+ className: m(a["widget-footer"], "max-xs:flex-wrap max-xs:gap-y-2"),
47
+ children: [t.hide ? /* @__PURE__ */ e("div", {}) : /* @__PURE__ */ e(N, {
41
48
  disabled: t.disabled,
42
49
  disabledReason: t.disabledReason,
43
50
  dataTest: "view-more",
44
51
  variant: "text",
45
- endIcon: a ? /* @__PURE__ */ e(I, {
52
+ endIcon: r ? /* @__PURE__ */ e(T, {
46
53
  width: 20,
47
54
  height: 20
48
- }) : /* @__PURE__ */ e(x, {
55
+ }) : /* @__PURE__ */ e(y, {
49
56
  width: 20,
50
57
  height: 20
51
58
  }),
52
59
  onClick: () => {
53
- u(!a), o && localStorage.setItem(o, String(!a)), t.onClick?.();
60
+ w(!r), i && localStorage.setItem(i, String(!r)), t.onClick?.();
54
61
  },
55
- children: a ? t.viewLessText : t.viewMoreText
56
- }), S ? /* @__PURE__ */ e(N, {
62
+ children: r ? t.viewLessText : t.viewMoreText
63
+ }), u ? /* @__PURE__ */ e(b, {
57
64
  dataTest: "go-to-button",
58
- className: d["widget-link"],
65
+ className: a["widget-link"],
59
66
  size: "small",
60
- href: i.href,
61
- onClick: i.onClick,
62
- content: i.content
67
+ href: d.href,
68
+ onClick: d.onClick,
69
+ content: d.content
63
70
  }) : /* @__PURE__ */ e("div", {})]
64
71
  })
65
72
  ]
66
73
  });
67
74
  };
68
75
  export {
69
- E as StyledWidget
76
+ U as StyledWidget
70
77
  };
@@ -2,17 +2,17 @@ import { cn as l } from "../../../../helpers/cn.js";
2
2
  import { StyledWidgetTitle as o } from "../widget-title/StyledWidgetTitle.js";
3
3
  import a from "./StyledWidgetHeader.module.js";
4
4
  import "react";
5
- import { jsx as t, jsxs as s } from "react/jsx-runtime";
6
- var g = ({ actions: d, title: e, containerClassname: i, actionsClassname: m }) => {
7
- const r = e != null && e !== "";
5
+ import { jsx as i, jsxs as s } from "react/jsx-runtime";
6
+ var y = ({ actions: d, title: r, containerClassname: t, actionsClassname: m }) => {
7
+ const e = r != null && r !== "";
8
8
  return /* @__PURE__ */ s("div", {
9
- className: l(a["styled-widget-header"], i, !r && d && "!block"),
10
- children: [r && /* @__PURE__ */ t(o, { children: e }), /* @__PURE__ */ t("div", {
11
- className: l(m, !r && "w-full"),
9
+ className: l(a["styled-widget-header"], "flex-wrap gap-y-2", t, !e && d && "!block"),
10
+ children: [e && /* @__PURE__ */ i(o, { children: r }), /* @__PURE__ */ i("div", {
11
+ className: l(e && "flex min-w-fit grow basis-0 justify-end", m, !e && "w-full"),
12
12
  children: d
13
13
  })]
14
14
  });
15
15
  };
16
16
  export {
17
- g as StyledWidgetHeader
17
+ y as StyledWidgetHeader
18
18
  };
@@ -1,14 +1,14 @@
1
- import { cn as i } from "../../../../helpers/cn.js";
2
- import l from "./StyledWidgetTitle.module.js";
3
- import { forwardRef as r } from "react";
4
- import { jsx as d } from "react/jsx-runtime";
5
- var c = r(function(e, t) {
6
- return /* @__PURE__ */ d(e.component ?? "h2", {
1
+ import { cn as r } from "../../../../helpers/cn.js";
2
+ import i from "./StyledWidgetTitle.module.js";
3
+ import { forwardRef as m } from "react";
4
+ import { jsx as l } from "react/jsx-runtime";
5
+ var s = m(function(e, t) {
6
+ return /* @__PURE__ */ l(e.component ?? "h2", {
7
7
  ref: t,
8
- className: i(l["styled-widget-title"], e.className),
8
+ className: r(i["styled-widget-title"], "max-xs:min-w-0 max-xs:hyphens-auto max-xs:![overflow-wrap:anywhere]", e.className),
9
9
  children: e.children
10
10
  });
11
11
  });
12
12
  export {
13
- c as StyledWidgetTitle
13
+ s as StyledWidgetTitle
14
14
  };