asma-ui-core 3.121.6 → 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 (26) 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/src/components/custom/module/header-layout/ToolbarRows.d.ts +3 -1
  25. package/dist/src/hooks/useMediaQuery.hook.d.ts +2 -0
  26. 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,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
  };
@@ -7,77 +7,77 @@ import { getChipPadding as J } from "./chipPadding.js";
7
7
  import Q from "./StyledChip.module.js";
8
8
  import { forwardRef as V } from "react";
9
9
  import { jsx as p, jsxs as X } from "react/jsx-runtime";
10
- var Y = ({ readOnly: m, disabled: a, interactive: e, focusableDisabled: o, tabIndex: n }) => {
11
- if (o) return n ?? 0;
12
- if (!(m || a))
13
- return e ? n ?? 0 : n;
14
- }, lo = V(({ dataTest: m, label: a, size: e = "medium", disabled: o, disabledReason: n, readOnly: t, clickable: _, icon: k, avatar: w, deleteIcon: D, onDelete: h, onClick: f, onMouseDown: B, onMouseUp: C, className: u, classes: i, sx: j, tabIndex: I, deleteButtonTabIndex: M, "aria-label": N, role: v, "aria-checked": R, "aria-readonly": T, "data-hovered": K, "data-focus": P, variant: Z, color: z }, W) => {
15
- const b = !t && (!!_ || !!f), d = b && !o, c = b && !!o, g = c && !!n, x = w ?? k, y = !!(h && !t), s = J(e, !!x, y), $ = {
16
- paddingTop: s.top,
17
- paddingRight: s.right,
18
- paddingBottom: s.bottom,
19
- paddingLeft: s.left
20
- }, E = (r) => {
21
- r.stopPropagation(), h?.(r);
22
- }, L = (r) => {
23
- d && (r.key === "Enter" || r.key === " ") && (r.preventDefault(), f?.(r));
10
+ var Y = ({ readOnly: s, disabled: n, interactive: t, focusableDisabled: o, tabIndex: r }) => {
11
+ if (o) return r ?? 0;
12
+ if (!(s || n))
13
+ return t ? r ?? 0 : r;
14
+ }, lo = V(({ dataTest: s, label: n, size: t = "medium", disabled: o, disabledReason: r, readOnly: e, clickable: _, icon: k, avatar: w, deleteIcon: D, onDelete: h, onClick: x, onMouseDown: B, onMouseUp: C, className: u, classes: i, sx: j, tabIndex: I, deleteButtonTabIndex: M, "aria-label": N, role: f, "aria-checked": R, "aria-readonly": T, "data-hovered": K, "data-focus": P, variant: Z, color: z }, W) => {
15
+ const b = !e && (!!_ || !!x), m = b && !o, d = b && !!o, v = d && !!r, g = w ?? k, y = !!(h && !e), c = J(t, !!g, y), $ = {
16
+ paddingTop: c.top,
17
+ paddingRight: c.right,
18
+ paddingBottom: c.bottom,
19
+ paddingLeft: c.left
20
+ }, E = (a) => {
21
+ a.stopPropagation(), h?.(a);
22
+ }, L = (a) => {
23
+ m && (a.key === "Enter" || a.key === " ") && (a.preventDefault(), x?.(a));
24
24
  }, U = S(u, "width"), q = S(u, "max-width"), A = /* @__PURE__ */ X("div", {
25
25
  ref: W,
26
- "data-testid": m,
26
+ "data-testid": s,
27
27
  "data-chip": "",
28
28
  "aria-label": N,
29
29
  "data-hovered": K,
30
30
  "data-focus": P,
31
- role: v ?? (d || c ? "button" : void 0),
32
- "aria-disabled": c || void 0,
33
- "aria-checked": v ? R : void 0,
34
- "aria-readonly": v ? T : void 0,
31
+ role: f ?? (m || d ? "button" : void 0),
32
+ "aria-disabled": d || void 0,
33
+ "aria-checked": f ? R : void 0,
34
+ "aria-readonly": f ? T : void 0,
35
35
  tabIndex: Y({
36
- readOnly: t,
36
+ readOnly: e,
37
37
  disabled: o,
38
- interactive: d,
39
- focusableDisabled: c,
38
+ interactive: m,
39
+ focusableDisabled: d,
40
40
  tabIndex: I
41
41
  }),
42
- onClick: o || t ? void 0 : f,
43
- onKeyDown: o || t ? void 0 : L,
44
- onMouseDown: o || t ? void 0 : B,
45
- onMouseUp: o || t ? void 0 : C,
46
- className: l("box-border inline-flex items-center gap-1 rounded-[25px] border border-solid border-delta-300 bg-white text-base text-delta-700", !U && "w-fit", !q && "max-w-full", e === "small" ? "h-6" : "h-8", t && "pointer-events-none", o && "opacity-[0.38]", o && (c ? "cursor-not-allowed" : "pointer-events-none"), d && l("cursor-pointer outline-none", "asma-touch-ready", "active:!border-gama-400 active:bg-gama-25 active:shadow-[0_0_0_2px_var(--colors-gama-400)]"), (d || y && !o) && "data-[hovered]:bg-delta-50 hover:bg-delta-50", Q["focus-ring"], i?.root, u),
42
+ onClick: o || e ? void 0 : x,
43
+ onKeyDown: o || e ? void 0 : L,
44
+ onMouseDown: o || e ? void 0 : B,
45
+ onMouseUp: o || e ? void 0 : C,
46
+ className: l("box-border inline-flex items-center gap-1 rounded-[25px] border border-solid border-delta-300 bg-white text-base text-delta-700", !U && "w-fit", !q && "max-w-full", t === "small" ? "h-6" : "h-8", "max-xs:h-auto max-xs:py-0", t === "small" ? "max-xs:min-h-6" : "max-xs:min-h-8", e && "pointer-events-none", o && "opacity-[0.38]", o && (d ? "cursor-not-allowed" : "pointer-events-none"), m && l("cursor-pointer outline-none", "asma-touch-ready", "active:!border-gama-400 active:bg-gama-25 active:shadow-[0_0_0_2px_var(--colors-gama-400)]"), (m || y && !o) && "data-[hovered]:bg-delta-50 hover:bg-delta-50", Q["focus-ring"], i?.root, u),
47
47
  style: {
48
48
  ...$,
49
49
  ...F(j)
50
50
  },
51
51
  children: [
52
- x && /* @__PURE__ */ p("span", {
53
- className: l("flex shrink-0 items-center justify-center", e === "small" ? "h-[18px] w-[18px]" : "h-6 w-6", w ? i?.avatar : i?.icon),
54
- children: x
52
+ g && /* @__PURE__ */ p("span", {
53
+ className: l("flex shrink-0 items-center justify-center", t === "small" ? "h-[18px] w-[18px]" : "h-6 w-6", w ? i?.avatar : i?.icon),
54
+ children: g
55
55
  }),
56
56
  /* @__PURE__ */ p("span", {
57
- className: l("min-w-0 truncate", i?.label),
58
- children: a
57
+ className: l("min-w-0 truncate", "max-xs:hyphens-auto max-xs:whitespace-normal max-xs:![overflow-wrap:anywhere]", t === "small" ? "max-xs:-my-px" : "max-xs:py-[3px]", i?.label),
58
+ children: n
59
59
  }),
60
- h && !t && /* @__PURE__ */ p("button", {
60
+ h && !e && /* @__PURE__ */ p("button", {
61
61
  type: "button",
62
62
  tabIndex: M,
63
- "data-testid": `${m}-delete`,
64
- "aria-label": typeof a == "string" ? `Remove ${a}` : "Remove",
63
+ "data-testid": `${s}-delete`,
64
+ "aria-label": typeof n == "string" ? `Remove ${n}` : "Remove",
65
65
  onClick: E,
66
66
  disabled: o,
67
- className: l("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]", e === "small" ? "h-[18px] w-[18px]" : "h-5 w-5", i?.deleteIcon),
67
+ className: l("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]", t === "small" ? "h-[18px] w-[18px]" : "h-5 w-5", i?.deleteIcon),
68
68
  children: D ?? /* @__PURE__ */ p(H, {
69
- height: e === "small" ? 14 : 16,
70
- width: e === "small" ? 14 : 16,
69
+ height: t === "small" ? 14 : 16,
70
+ width: t === "small" ? 14 : 16,
71
71
  className: "min-w-0 shrink-0"
72
72
  })
73
73
  })
74
74
  ]
75
75
  });
76
76
  return /* @__PURE__ */ p(G, {
77
- title: n,
78
- open: g ? void 0 : !1,
79
- openOnTap: g,
80
- persistentDescription: g,
77
+ title: r,
78
+ open: v ? void 0 : !1,
79
+ openOnTap: v,
80
+ persistentDescription: v,
81
81
  children: A
82
82
  });
83
83
  });
@@ -1,20 +1,20 @@
1
- import { getStyles as y } from "../helpers/getStyles.js";
2
- import i from "clsx";
3
- import { jsx as l } from "react/jsx-runtime";
4
- var b = ({ title: r, onClick: t, className: o, dataTest: s, size: a = "base" }) => {
5
- const d = y({ size: a }), m = t ? (e) => {
6
- (e.key === "Enter" || e.key === " ") && (e.preventDefault(), t(e));
1
+ import { getStyles as x } from "../helpers/getStyles.js";
2
+ import y from "clsx";
3
+ import { jsx as n } from "react/jsx-runtime";
4
+ var f = ({ title: t, onClick: e, className: o, dataTest: a, size: s = "base" }) => {
5
+ const m = x({ size: s }), d = e ? (r) => {
6
+ (r.key === "Enter" || r.key === " ") && (r.preventDefault(), e(r));
7
7
  } : void 0;
8
- return /* @__PURE__ */ l("div", {
9
- className: i(d, o),
10
- onClick: t,
11
- onKeyDown: m,
12
- role: t ? "button" : void 0,
13
- tabIndex: t ? 0 : void 0,
14
- "data-testid": s,
15
- children: r
8
+ return /* @__PURE__ */ n("div", {
9
+ className: y(m, "max-xs:min-w-0 max-xs:hyphens-auto max-xs:![overflow-wrap:anywhere]", o),
10
+ onClick: e,
11
+ onKeyDown: d,
12
+ role: e ? "button" : void 0,
13
+ tabIndex: e ? 0 : void 0,
14
+ "data-testid": a,
15
+ children: t
16
16
  });
17
17
  };
18
18
  export {
19
- b as StyledFormLabel
19
+ f as StyledFormLabel
20
20
  };