asma-ui-core 3.78.12 → 3.79.1

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 (56) hide show
  1. package/dist/asma-ui-core.css +1 -1
  2. package/dist/components/custom/module/header-layout/DynamicToolbar.js +14 -14
  3. package/dist/components/custom/module/header-layout/ToolbarActionGroup.js +23 -21
  4. package/dist/components/custom/module/header-layout/ToolbarRows.js +4 -4
  5. package/dist/components/data-display/chip/StyledChip.js +41 -41
  6. package/dist/components/feedback/dialog/dialog-footer/StyledDialogFooter.js +105 -0
  7. package/dist/components/feedback/minimizable-dialog/MinimizableDialog.js +6 -6
  8. package/dist/components/inputs/button/StyledButton.module.js +8 -8
  9. package/dist/components/inputs/checkbox/base-ui/StyledCheckbox.js +45 -42
  10. package/dist/components/inputs/checkbox/base-ui/StyledCheckbox.module.js +8 -8
  11. package/dist/components/inputs/dynamic-select/components/DynamicSelectAutocomplete.js +25 -17
  12. package/dist/components/inputs/field-styles.js +3 -3
  13. package/dist/components/inputs/radio-button/base-ui/StyledRadio.js +34 -31
  14. package/dist/components/inputs/radio-button/base-ui/StyledRadio.module.js +10 -10
  15. package/dist/components/inputs/select/StyledSelect.js +147 -135
  16. package/dist/components/inputs/select/StyledSelectItem.js +29 -19
  17. package/dist/components/inputs/select-autocomplete/StyledSelectAutocomplete.js +195 -162
  18. package/dist/components/inputs/switch/base-ui/StyledSwitch.module.js +4 -4
  19. package/dist/components/inputs/textarea/StyledTextarea.module.js +4 -4
  20. package/dist/components/navigation/link/StyledLink.js +11 -10
  21. package/dist/components/navigation/link/StyledLink.module.js +5 -5
  22. package/dist/components/navigation/menu/StyledMenuList.js +27 -19
  23. package/dist/components/navigation/tabs/StyledTab.js +7 -7
  24. package/dist/components/utils/accordion/base-ui/StyledAccordion.module.js +3 -3
  25. package/dist/datetime/shared-components/button/StyledButton.module.js +12 -12
  26. package/dist/index.js +176 -174
  27. package/dist/src/components/feedback/dialog/dialog-footer/StyledDialogFooter.d.ts +62 -0
  28. package/dist/src/components/feedback/dialog/dialog-footer/StyledDialogFooter.test.d.ts +1 -0
  29. package/dist/src/components/feedback/dialog/dialog-footer/index.d.ts +2 -0
  30. package/dist/src/components/feedback/dialog/index.d.ts +1 -0
  31. package/dist/src/components/inputs/select/StyledSelectItem.d.ts +3 -1
  32. package/dist/src/components/inputs/select-autocomplete/StyledSelectAutocomplete.d.ts +1 -1
  33. package/dist/src/components/navigation/menu/StyledMenuList.d.ts +3 -1
  34. package/dist/src/table/components/TableRow.d.ts +2 -1
  35. package/dist/src/table/custom-features/focus-rows/types.d.ts +2 -2
  36. package/dist/src/table/hooks/useToggleMenuVisibility.hook.d.ts +14 -1
  37. package/dist/table/components/StyledTable.module.js +52 -52
  38. package/dist/table/components/TableRow.js +92 -80
  39. package/dist/table/components/TableRows.js +10 -8
  40. package/dist/table/components/columns/action-column/components/HeaderActionMenu.js +4 -4
  41. package/dist/table/components/table-footer/TablePagination.js +77 -64
  42. package/dist/table/components/table-footer/TableRowCountSelect.js +63 -44
  43. package/dist/table/components/table-header/TableHeader.js +72 -64
  44. package/dist/table/custom-features/focus-rows/FocusRowsFeature.js +4 -4
  45. package/dist/table/hooks/useToggleMenuVisibility.hook.js +77 -11
  46. package/dist/table/shared-components/button/StyledButton.module.js +9 -9
  47. package/dist/tailwind.config.d.ts +1 -0
  48. package/package.json +1 -1
  49. package/src/styles/_focus.scss +23 -0
  50. package/src/styles/color-variables/defaultTokens.css +2 -4
  51. package/src/styles/color-variables/fretexTokens.css +6 -7
  52. package/src/styles/color-variables/jadeTokens.css +2 -4
  53. package/src/styles/components-colors/inputVariables.css +2 -2
  54. package/tw-configs/twConfigs.json +1 -0
  55. package/dist/table/shared-components/CheckIcon.js +0 -12
  56. package/dist/table/shared-components/menu-item/index.js +0 -22
@@ -1,11 +1,11 @@
1
1
  import { cn as ae } from "../../../../helpers/cn.js";
2
2
  import { useMobileMediaQuery as re } from "../../../../hooks/useMediaQuery.hook.js";
3
- import { DynamicToolbarLayoutContext as ce } from "./DynamicToolbarLayoutContext.js";
4
- import { useElementWidthPx as de } from "../../../../hooks/useElementWidthPx.js";
5
- import { useWidthRegistry as me } from "../../../../hooks/useWidthRegistry.js";
6
- import { planBulkToolbarActions as he, planToolbarActions as ue } from "./planToolbarActions.js";
7
- import { resolveBulkActionsAvailableWidth as fe, resolvePageActionsAvailableWidth as Ae, resolveReserveBulkActionsWidthPx as xe, resolveTitleAreaWidth as ve, resolveToolbarLayout as be } from "./estimateToolbarLayout.js";
8
- import { useToolbarTranslations as pe } from "./useTranslations.js";
3
+ import { useElementWidthPx as ce } from "../../../../hooks/useElementWidthPx.js";
4
+ import { useWidthRegistry as de } from "../../../../hooks/useWidthRegistry.js";
5
+ import { planBulkToolbarActions as me, planToolbarActions as he } from "./planToolbarActions.js";
6
+ import { useToolbarTranslations as ue } from "./useTranslations.js";
7
+ import { DynamicToolbarLayoutContext as fe } from "./DynamicToolbarLayoutContext.js";
8
+ import { resolveBulkActionsAvailableWidth as Ae, resolvePageActionsAvailableWidth as xe, resolveReserveBulkActionsWidthPx as ve, resolveTitleAreaWidth as be, resolveToolbarLayout as pe } from "./estimateToolbarLayout.js";
9
9
  import { SearchSlot as we, SelectionIndicator as Pe, SelectionRow as Te, TitleBlock as H, TitleText as We, UtilityCluster as Q } from "./ToolbarRows.js";
10
10
  import { KEY_MORE_BUTTON as Me, KEY_SEARCH as $, KEY_SELECTION_INDICATOR as Be, KEY_TITLE as q, ToolbarMeasurementStrip as ye, actionKey as ge, filterKey as R } from "./ToolbarMeasurement.js";
11
11
  import { useCallback as Se, useMemo as o } from "react";
@@ -34,7 +34,7 @@ var J = {
34
34
  showMoreMenu: !1
35
35
  };
36
36
  function He(g) {
37
- const { title: l, helperText: A, beforeFilterActions: x = [], filter: v, search: c, afterSearchActions: C = [], selectedCount: T = 0, onClearSelection: S, bulkActions: d = [], maxVisibleBulkActions: P = _e, locale: Z = "en", className: ee, style: te, dataTest: ie = "dynamic-toolbar" } = g, b = pe(Z), { ref: oe, widthPx: n } = de(), { register: W, widths: s } = me(), k = re(), _ = o(() => Ne(n, P), [n, P]), M = !k && n >= G ? P : _, m = T > 0, O = !m, p = o(() => [...x, ...C], [x, C]), h = Se((e, i) => s[ge(e.id, i)], [s]), a = o(() => ({
37
+ const { title: l, helperText: A, beforeFilterActions: x = [], filter: v, search: c, afterSearchActions: C = [], selectedCount: T = 0, onClearSelection: S, bulkActions: d = [], maxVisibleBulkActions: P = _e, locale: Z = "en", className: ee, style: te, dataTest: ie = "dynamic-toolbar" } = g, b = ue(Z), { ref: oe, widthPx: n } = ce(), { register: W, widths: s } = de(), k = re(), _ = o(() => Ne(n, P), [n, P]), M = !k && n >= G ? P : _, m = T > 0, O = !m, p = o(() => [...x, ...C], [x, C]), h = Se((e, i) => s[ge(e.id, i)], [s]), a = o(() => ({
38
38
  titleWidthPx: s[q],
39
39
  searchWidthPx: s[$],
40
40
  filterLabelWidthPx: s[R(!1)],
@@ -42,11 +42,11 @@ function He(g) {
42
42
  selectionIndicatorWidthPx: s[Be],
43
43
  moreButtonWidthPx: s[Me],
44
44
  actionWidthPx: h
45
- }), [s, h]), I = o(() => xe(ke, d, h, M), [
45
+ }), [s, h]), I = o(() => ve(ke, d, h, M), [
46
46
  d,
47
47
  h,
48
48
  M
49
- ]), { mode: r, filterIconOnly: w, trailingIconOnly: B } = o(() => be({
49
+ ]), { mode: r, filterIconOnly: w, trailingIconOnly: B } = o(() => pe({
50
50
  containerWidth: n,
51
51
  isMobile: k,
52
52
  isSelectionMode: m,
@@ -81,7 +81,7 @@ function He(g) {
81
81
  n,
82
82
  w,
83
83
  B
84
- ]), V = ve(l, a.titleWidthPx), U = Ae({
84
+ ]), V = be(l, a.titleWidthPx), U = xe({
85
85
  layoutMode: r,
86
86
  containerWidth: n,
87
87
  titleWidth: V,
@@ -93,7 +93,7 @@ function He(g) {
93
93
  hasTrailingUtility: !1,
94
94
  reserveBulkActionsWidthPx: m ? 0 : I,
95
95
  measured: a
96
- }), F = fe({
96
+ }), F = Ae({
97
97
  layoutMode: r,
98
98
  containerWidth: n,
99
99
  titleWidth: V,
@@ -101,7 +101,7 @@ function He(g) {
101
101
  hasFilter: v != null,
102
102
  hasSearch: c != null,
103
103
  measured: a
104
- }), f = o(() => ue({
104
+ }), f = o(() => he({
105
105
  actions: p,
106
106
  availableWidth: U,
107
107
  collapseLabels: !0,
@@ -126,7 +126,7 @@ function He(g) {
126
126
  overflowActions: f.overflowActions,
127
127
  showMoreMenu: f.showMoreMenu
128
128
  };
129
- }, [y, f]), Y = o(() => he({
129
+ }, [y, f]), Y = o(() => me({
130
130
  actions: d,
131
131
  availableWidth: F,
132
132
  maxVisibleBulkActions: r === "compact" ? _ : P,
@@ -162,7 +162,7 @@ function He(g) {
162
162
  onClearSelection: S,
163
163
  translations: b,
164
164
  bulkActionsPlan: Y
165
- }), L = (e, i) => /* @__PURE__ */ t(ce.Provider, {
165
+ }), L = (e, i) => /* @__PURE__ */ t(fe.Provider, {
166
166
  value: le,
167
167
  children: /* @__PURE__ */ u("div", {
168
168
  ref: oe,
@@ -3,47 +3,49 @@ import { DotsVerticalIcon as g } from "../../../icons/dots-vertical-icon/DotsVer
3
3
  import { StyledButton as p } from "../../../inputs/button/StyledButton.js";
4
4
  import { StyledMenu as x } from "../../../navigation/menu/StyledMenu.js";
5
5
  import { StyledMenuItem as v } from "../../../navigation/menu/StyledMenuItem.js";
6
- import { Fragment as k, useState as T } from "react";
7
- import { Fragment as A, jsx as n, jsxs as o } from "react/jsx-runtime";
6
+ import { Fragment as k, useState as y } from "react";
7
+ import { Fragment as T, jsx as n, jsxs as o } from "react/jsx-runtime";
8
8
  function O(e) {
9
9
  return e != null && (e.inlineActions.length > 0 || e.showMoreMenu);
10
10
  }
11
- function C({ action: e, showLabel: l, selectionTone: t = !1 }) {
12
- if (e.render) return e.render({ showLabel: l });
11
+ function A({ action: e, showLabel: t, selectionTone: l = !1 }) {
12
+ if (e.render) return e.render({ showLabel: t });
13
13
  const a = e.ariaLabel ?? e.label;
14
14
  return /* @__PURE__ */ n(p, {
15
15
  dataTest: e.dataTest ?? `dynamic-toolbar-action-${e.id}`,
16
- variant: e.variant ?? (t ? "text" : "outlined"),
16
+ variant: e.variant ?? (l ? "text" : "outlined"),
17
17
  error: e.tone === "danger",
18
18
  size: e.size ?? "large",
19
+ type: "button",
19
20
  disabled: e.disabled,
20
21
  startIcon: e.icon,
21
22
  onClick: e.onClick,
22
- "aria-label": l && e.ariaLabel == null ? void 0 : a,
23
- children: l ? e.label : void 0
23
+ "aria-label": t && e.ariaLabel == null ? void 0 : a,
24
+ children: t ? e.label : void 0
24
25
  });
25
26
  }
26
- function M({ overflowMenuLabel: e, onOpen: l }) {
27
+ function C({ overflowMenuLabel: e, onOpen: t }) {
27
28
  return /* @__PURE__ */ n(p, {
28
29
  dataTest: "dynamic-toolbar-overflow-actions",
29
30
  variant: "text",
30
31
  size: "large",
32
+ type: "button",
31
33
  endIcon: /* @__PURE__ */ n(g, {
32
34
  width: 20,
33
35
  height: 20
34
36
  }),
35
- onClick: (t) => l?.(t.currentTarget),
37
+ onClick: (l) => t?.(l.currentTarget),
36
38
  "aria-label": e,
37
39
  "aria-haspopup": "menu",
38
40
  children: e
39
41
  });
40
42
  }
41
- function j({ plan: e, overflowMenuLabel: l, className: t, selectionTone: a = !1, registerActionWidth: d }) {
42
- const [m, s] = T(null), { inlineActions: u, overflowActions: b, showMoreMenu: c } = e;
43
- return !u.length && !c ? null : /* @__PURE__ */ o("div", {
44
- className: f("flex shrink-0 flex-nowrap items-center gap-2", t),
45
- children: [u.map(({ action: r, showLabel: i }) => {
46
- const h = /* @__PURE__ */ n(C, {
43
+ function j({ plan: e, overflowMenuLabel: t, className: l, selectionTone: a = !1, registerActionWidth: d }) {
44
+ const [u, s] = y(null), { inlineActions: m, overflowActions: b, showMoreMenu: c } = e;
45
+ return !m.length && !c ? null : /* @__PURE__ */ o("div", {
46
+ className: f("flex shrink-0 flex-nowrap items-center gap-2", l),
47
+ children: [m.map(({ action: r, showLabel: i }) => {
48
+ const h = /* @__PURE__ */ n(A, {
47
49
  action: r,
48
50
  showLabel: i,
49
51
  selectionTone: a
@@ -53,12 +55,12 @@ function j({ plan: e, overflowMenuLabel: l, className: t, selectionTone: a = !1,
53
55
  className: "inline-flex shrink-0",
54
56
  children: h
55
57
  }, r.id);
56
- }), c && /* @__PURE__ */ o(A, { children: [/* @__PURE__ */ n(M, {
57
- overflowMenuLabel: l,
58
+ }), c && /* @__PURE__ */ o(T, { children: [/* @__PURE__ */ n(C, {
59
+ overflowMenuLabel: t,
58
60
  onOpen: s
59
61
  }), /* @__PURE__ */ n(x, {
60
- anchorEl: m,
61
- open: !!m,
62
+ anchorEl: u,
63
+ open: !!u,
62
64
  onClose: () => s(null),
63
65
  anchorOrigin: {
64
66
  vertical: "bottom",
@@ -82,8 +84,8 @@ function j({ plan: e, overflowMenuLabel: l, className: t, selectionTone: a = !1,
82
84
  });
83
85
  }
84
86
  export {
85
- M as MoreTriggerButton,
86
- C as ToolbarActionButton,
87
+ C as MoreTriggerButton,
88
+ A as ToolbarActionButton,
87
89
  j as ToolbarActionGroup,
88
90
  O as hasPlannedActions
89
91
  };
@@ -1,9 +1,9 @@
1
1
  import { cn as f } from "../../../../helpers/cn.js";
2
2
  import { CloseIcon as T } from "../../../icons/close-icon/CloseIcon.js";
3
3
  import { StyledButton as b } from "../../../inputs/button/StyledButton.js";
4
- import { StyledWidgetTitle as j } from "../../widget/widget-title/StyledWidgetTitle.js";
5
4
  import { ToolbarActionGroup as c, hasPlannedActions as u } from "./ToolbarActionGroup.js";
6
- import { formatSelectionLabel as k } from "./useTranslations.js";
5
+ import { formatSelectionLabel as j } from "./useTranslations.js";
6
+ import { StyledWidgetTitle as k } from "../../widget/widget-title/StyledWidgetTitle.js";
7
7
  import { Fragment as o, jsx as i, jsxs as r } from "react/jsx-runtime";
8
8
  function I({ selectedCount: e, onClearSelection: n, translations: t }) {
9
9
  return /* @__PURE__ */ i("div", {
@@ -20,7 +20,7 @@ function I({ selectedCount: e, onClearSelection: n, translations: t }) {
20
20
  }) : void 0,
21
21
  onClick: n,
22
22
  "aria-label": t.clearSelection,
23
- children: k(e, t)
23
+ children: j(e, t)
24
24
  })
25
25
  });
26
26
  }
@@ -57,7 +57,7 @@ function S({ visible: e, children: n }) {
57
57
  });
58
58
  }
59
59
  function F({ title: e, measureRef: n }) {
60
- return typeof e == "string" ? /* @__PURE__ */ i(j, {
60
+ return typeof e == "string" ? /* @__PURE__ */ i(k, {
61
61
  ref: n,
62
62
  className: "!min-w-0 truncate",
63
63
  children: e
@@ -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
  };
@@ -0,0 +1,105 @@
1
+ import { cn as T } from "../../../../helpers/cn.js";
2
+ import { DotsVerticalIcon as S } from "../../../icons/dots-vertical-icon/DotsVerticalIcon.js";
3
+ import { StyledButton as y } from "../../../inputs/button/StyledButton.js";
4
+ import { StyledMenu as $ } from "../../../navigation/menu/StyledMenu.js";
5
+ import { StyledMenuItem as z } from "../../../navigation/menu/StyledMenuItem.js";
6
+ import { useElementWidthPx as L } from "../../../../hooks/useElementWidthPx.js";
7
+ import { useWidthRegistry as j } from "../../../../hooks/useWidthRegistry.js";
8
+ import { planToolbarActions as K } from "../../../custom/module/header-layout/planToolbarActions.js";
9
+ import { ToolbarActionButton as F } from "../../../custom/module/header-layout/ToolbarActionGroup.js";
10
+ import { useToolbarTranslations as H } from "../../../custom/module/header-layout/useTranslations.js";
11
+ import { useMemo as C, useState as D } from "react";
12
+ import { Fragment as _, jsx as r, jsxs as t } from "react/jsx-runtime";
13
+ var G = 470, U = 8, k = "dialog-footer-right", w = "dialog-footer-more", N = (i, n) => `dialog-footer-action:${i}:${n ? "label" : "icon"}`;
14
+ function ae({ leftActions: i = [], leadingSlot: n, secondaryAction: o, primaryAction: s, fixed: P = !1, rounded: E = !0, locale: M = "en", className: W, dataTest: d = "styled-dialog-footer" }) {
15
+ const R = H(M), { ref: A, widthPx: c } = L(), { register: m, widths: a } = j(), [p, f] = D(null), u = c > 0 && c < G, B = u ? 8 : 16, g = C(() => i.filter((e) => !e.hidden).map((e) => e.icon == null && e.canHideLabel == null ? {
16
+ ...e,
17
+ canHideLabel: !1
18
+ } : e), [i]), I = a[k] ?? 0, x = o != null || s != null, b = Math.max(0, c - B * 2 - I - (x ? U : 0)), h = C(() => K({
19
+ actions: g,
20
+ availableWidth: b,
21
+ collapseLabels: !0,
22
+ resolveActionWidth: (e, l) => a[N(e.id, l)],
23
+ moreButtonWidthPx: a[w]
24
+ }), [
25
+ g,
26
+ b,
27
+ a
28
+ ]), v = (e, l, O) => /* @__PURE__ */ r(y, {
29
+ dataTest: e.dataTest ?? `${d}-${O}`,
30
+ variant: e.variant ?? l,
31
+ error: e.tone === "danger",
32
+ size: "medium",
33
+ type: e.type ?? "button",
34
+ disabled: e.disabled,
35
+ startIcon: e.icon,
36
+ onClick: e.onClick,
37
+ "aria-label": e.ariaLabel,
38
+ children: e.label
39
+ });
40
+ return /* @__PURE__ */ t("div", {
41
+ ref: A,
42
+ "data-testid": d,
43
+ className: T("flex items-center justify-end border-0 border-t border-solid border-delta-200 bg-white", u ? "gap-2 p-2" : "gap-4 p-4", E && "rounded-b-lg", P && "sticky bottom-0 z-[1] shadow-[0_0_16px_0_rgba(34,33,51,0.2)]", W),
44
+ children: [/* @__PURE__ */ r("div", {
45
+ className: "flex shrink-0 flex-nowrap items-center gap-2",
46
+ children: n ?? /* @__PURE__ */ t(_, { children: [h.inlineActions.map(({ action: e, showLabel: l }) => /* @__PURE__ */ r("span", {
47
+ ref: m(N(e.id, l)),
48
+ className: "inline-flex shrink-0",
49
+ children: /* @__PURE__ */ r(F, {
50
+ action: e,
51
+ showLabel: l
52
+ })
53
+ }, e.id)), h.showMoreMenu && /* @__PURE__ */ t(_, { children: [/* @__PURE__ */ r("span", {
54
+ ref: m(w),
55
+ className: "inline-flex shrink-0",
56
+ children: /* @__PURE__ */ r(y, {
57
+ dataTest: `${d}-more`,
58
+ variant: "outlined",
59
+ size: "medium",
60
+ type: "button",
61
+ onClick: (e) => f(e.currentTarget),
62
+ "aria-label": R.more,
63
+ "aria-haspopup": "menu",
64
+ "aria-expanded": p != null,
65
+ startIcon: /* @__PURE__ */ r(S, {
66
+ width: 24,
67
+ height: 24
68
+ })
69
+ })
70
+ }), /* @__PURE__ */ r($, {
71
+ anchorEl: p,
72
+ open: p != null,
73
+ onClose: () => f(null),
74
+ anchorOrigin: {
75
+ vertical: "top",
76
+ horizontal: "left"
77
+ },
78
+ transformOrigin: {
79
+ vertical: "bottom",
80
+ horizontal: "left"
81
+ },
82
+ children: h.overflowActions.map((e) => /* @__PURE__ */ r(z, {
83
+ disabled: e.disabled,
84
+ onClick: () => {
85
+ f(null), e.onClick();
86
+ },
87
+ children: /* @__PURE__ */ t("div", {
88
+ className: T("flex items-center gap-2", e.tone === "danger" ? "text-beta-500" : "text-delta-700"),
89
+ children: [e.icon, /* @__PURE__ */ r("span", { children: e.label })]
90
+ })
91
+ }, e.id))
92
+ })] })] })
93
+ }), x && /* @__PURE__ */ r("span", {
94
+ className: "flex min-w-px flex-1 flex-nowrap items-center justify-end",
95
+ children: /* @__PURE__ */ t("span", {
96
+ ref: m(k),
97
+ className: "flex shrink-0 flex-nowrap items-center gap-2",
98
+ children: [o && v(o, "outlined", "secondary"), s && v(s, "contained", "primary")]
99
+ })
100
+ })]
101
+ });
102
+ }
103
+ export {
104
+ ae as StyledDialogFooter
105
+ };
@@ -8,9 +8,9 @@ import { ArrowExpandIcon as ne } from "../../icons/arrow-expand-icon/ArrowExpand
8
8
  import { ArrowShrinkIcon as oe } from "../../icons/arrow-shrink-icon/ArrowShrinkIcon.js";
9
9
  import { StyledTooltip as f } from "../../data-display/tooltip/StyledTooltip.js";
10
10
  import { StyledButton as t } from "../../inputs/button/StyledButton.js";
11
- import { useFocusTrap as se } from "../../../hooks/useFocusTrap.hook.js";
12
- import { StyledMenu as ce } from "../../navigation/menu/StyledMenu.js";
13
- import { StyledMenuItem as me } from "../../navigation/menu/StyledMenuItem.js";
11
+ import { StyledMenu as se } from "../../navigation/menu/StyledMenu.js";
12
+ import { StyledMenuItem as ce } from "../../navigation/menu/StyledMenuItem.js";
13
+ import { useFocusTrap as me } from "../../../hooks/useFocusTrap.hook.js";
14
14
  import q from "./MinimizableDialog.module.js";
15
15
  import { useToggleMenuVisibility as he } from "../../../hooks/useToggleMenuVisibility.hook.js";
16
16
  import H from "clsx";
@@ -18,7 +18,7 @@ import { useRef as fe, useState as J } from "react";
18
18
  import { Fragment as z, jsx as e, jsxs as i } from "react/jsx-runtime";
19
19
  var Ee = ({ onCloseText: u = "", onMinimizeText: N = "", onExpandText: I = "", onFullScreenText: M = "", showCloseIcon: j = !0, showMinimizeIcon: Q = !0, showExpandIcon: T = !0, showFullScreenIcon: W = !0, title: s, label: b, children: g, open: C, onClose: x, className: _ = "", primaryButtonText: w, primaryButtonLoading: k = !1, secondaryButtonText: c, onPrimaryButtonClick: v, onSecondaryButtonClick: p, dataTest: F, actionNode: X, extraActions: r, extraActionsText: m, btnContainerClassName: G, footerClassName: Y, footerInfo: D, locale: l = "en", enableFullscreen: Z = !0, fullScreenState: E, handleFullScreenState: L }) => {
20
20
  const [d, A] = J(!1), [R, P] = J(!1), { open: B, anchorEl: ee, handleOpen: ie, handleClose: te } = he(), S = fe(null), a = E ?? R, n = a && !d;
21
- if (se(C && n, S, x), !C) return null;
21
+ if (me(C && n, S, x), !C) return null;
22
22
  const le = n ? {
23
23
  right: "auto",
24
24
  bottom: "auto",
@@ -176,11 +176,11 @@ var Ee = ({ onCloseText: u = "", onMinimizeText: N = "", onExpandText: I = "", o
176
176
  }),
177
177
  onClick: ie,
178
178
  children: m
179
- }), /* @__PURE__ */ e(ce, {
179
+ }), /* @__PURE__ */ e(se, {
180
180
  open: B,
181
181
  anchorEl: ee,
182
182
  onClose: te,
183
- children: r.map((o) => /* @__PURE__ */ e(me, {
183
+ children: r.map((o) => /* @__PURE__ */ e(ce, {
184
184
  className: o.className,
185
185
  onClick: o.onClick,
186
186
  children: o.label
@@ -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
  };