asma-ui-core 3.92.0 → 3.92.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.
@@ -1,8 +1,8 @@
1
- import { cn as w } from "../../../../helpers/cn.js";
1
+ import { cn as L } from "../../../../helpers/cn.js";
2
2
  import { DotsVerticalIcon as S } from "../../../icons/dots-vertical-icon/DotsVerticalIcon.js";
3
3
  import { LoadingIcon as $ } from "../../../icons/loading-icon/LoadingIcon.js";
4
4
  import { StyledTooltip as z } from "../../../data-display/tooltip/StyledTooltip.js";
5
- import { StyledButton as _ } from "../../../inputs/button/StyledButton.js";
5
+ import { StyledButton as w } from "../../../inputs/button/StyledButton.js";
6
6
  import { StyledMenu as F } from "../../../navigation/menu/StyledMenu.js";
7
7
  import { StyledMenuItem as j } from "../../../navigation/menu/StyledMenuItem.js";
8
8
  import { useElementWidthPx as K } from "../../../../hooks/useElementWidthPx.js";
@@ -10,30 +10,30 @@ import { useWidthRegistry as H } from "../../../../hooks/useWidthRegistry.js";
10
10
  import { planToolbarActions as U } from "../../../custom/module/header-layout/planToolbarActions.js";
11
11
  import { ToolbarActionButton as D } from "../../../custom/module/header-layout/ToolbarActionGroup.js";
12
12
  import { useToolbarTranslations as G } from "../../../custom/module/header-layout/useTranslations.js";
13
- import { useMemo as y, useState as V } from "react";
14
- import { Fragment as C, jsx as r, jsxs as l } from "react/jsx-runtime";
15
- var X = 2, Y = 470, q = 8, N = "dialog-footer-right", M = "dialog-footer-more", O = (n, a) => `dialog-footer-action:${n}:${a ? "label" : "icon"}`;
16
- function me({ leftActions: n = [], leadingSlot: a, secondaryAction: s, primaryAction: d, fixed: k = !1, rounded: I = !0, locale: A = "en", className: E, dataTest: c = "styled-dialog-footer" }) {
17
- const P = G(A), { ref: R, widthPx: m } = K(), { register: h, widths: t } = H(), [p, f] = V(null), u = m > 0 && m < Y, W = u ? 8 : 16, o = y(() => n.filter((e) => !e.hidden).map((e) => e.icon == null && e.canHideLabel == null ? {
13
+ import { useMemo as _, useState as V } from "react";
14
+ import { Fragment as y, jsx as r, jsxs as n } from "react/jsx-runtime";
15
+ var X = 2, Y = 470, q = 8, C = "dialog-footer-right", N = "dialog-footer-more", M = (l, a) => `dialog-footer-action:${l}:${a ? "label" : "icon"}`;
16
+ function me({ leftActions: l = [], leadingSlot: a, secondaryAction: s, primaryAction: d, fixed: O = !1, rounded: k = !0, locale: I = "en", className: A, dataTest: c = "styled-dialog-footer" }) {
17
+ const E = G(I), { ref: P, widthPx: m } = K(), { register: h, widths: o } = H(), [p, f] = V(null), g = m > 0 && m < Y, R = g ? 8 : 16, t = _(() => l.filter((e) => !e.hidden).map((e) => e.icon == null && e.canHideLabel == null ? {
18
18
  ...e,
19
19
  canHideLabel: !1
20
- } : e), [n]), B = t[N] ?? 0, x = s != null || d != null, v = Math.max(0, m - W * 2 - B - (x ? q : 0)), g = y(() => o.length >= X ? {
20
+ } : e), [l]), W = o[C] ?? 0, x = s != null || d != null, v = Math.max(0, m - R * 2 - W - (x ? q : 0)), u = _(() => t.length >= X ? {
21
21
  inlineActions: [],
22
- overflowActions: o,
22
+ overflowActions: t,
23
23
  showMoreMenu: !0
24
24
  } : U({
25
- actions: o,
25
+ actions: t,
26
26
  availableWidth: v,
27
27
  collapseLabels: !0,
28
- resolveActionWidth: (e, i) => t[O(e.id, i)],
29
- moreButtonWidthPx: t[M]
28
+ resolveActionWidth: (e, i) => o[M(e.id, i)],
29
+ moreButtonWidthPx: o[N]
30
30
  }), [
31
- o,
31
+ t,
32
32
  v,
33
- t
34
- ]), b = (e, i, L) => {
35
- const T = /* @__PURE__ */ r(_, {
36
- dataTest: e.dataTest ?? `${c}-${L}`,
33
+ o
34
+ ]), b = (e, i, B) => {
35
+ const T = /* @__PURE__ */ r(w, {
36
+ dataTest: e.dataTest ?? `${c}-${B}`,
37
37
  variant: e.variant ?? i,
38
38
  error: e.tone === "danger",
39
39
  size: "medium",
@@ -58,29 +58,29 @@ function me({ leftActions: n = [], leadingSlot: a, secondaryAction: s, primaryAc
58
58
  })
59
59
  }) : T;
60
60
  };
61
- return /* @__PURE__ */ l("div", {
62
- ref: R,
61
+ return /* @__PURE__ */ n("div", {
62
+ ref: P,
63
63
  "data-testid": c,
64
- className: w("flex items-center justify-end self-stretch border-0 border-t border-solid border-delta-200 bg-white", u ? "gap-2 p-2" : "gap-4 p-4", I && "rounded-b-lg", k && "sticky bottom-0 z-[1] shadow-[0_0_16px_0_rgba(34,33,51,0.2)]", E),
64
+ className: L("flex items-center justify-end self-stretch border-0 border-t border-solid border-delta-200 bg-white", g ? "gap-2 p-2" : "gap-4 p-4", k && "rounded-b-lg", O && "sticky bottom-0 z-[1] shadow-[0_0_16px_0_rgba(34,33,51,0.2)]", A),
65
65
  children: [/* @__PURE__ */ r("div", {
66
66
  className: "flex shrink-0 flex-nowrap items-center gap-2",
67
- children: a ?? /* @__PURE__ */ l(C, { children: [g.inlineActions.map(({ action: e, showLabel: i }) => /* @__PURE__ */ r("span", {
68
- ref: h(O(e.id, i)),
67
+ children: a ?? /* @__PURE__ */ n(y, { children: [u.inlineActions.map(({ action: e, showLabel: i }) => /* @__PURE__ */ r("span", {
68
+ ref: h(M(e.id, i)),
69
69
  className: "inline-flex shrink-0",
70
70
  children: /* @__PURE__ */ r(D, {
71
71
  action: e,
72
72
  showLabel: i
73
73
  })
74
- }, e.id)), g.showMoreMenu && /* @__PURE__ */ l(C, { children: [/* @__PURE__ */ r("span", {
75
- ref: h(M),
74
+ }, e.id)), u.showMoreMenu && /* @__PURE__ */ n(y, { children: [/* @__PURE__ */ r("span", {
75
+ ref: h(N),
76
76
  className: "inline-flex shrink-0",
77
- children: /* @__PURE__ */ r(_, {
77
+ children: /* @__PURE__ */ r(w, {
78
78
  dataTest: `${c}-more`,
79
79
  variant: "outlined",
80
80
  size: "medium",
81
81
  type: "button",
82
82
  onClick: (e) => f(e.currentTarget),
83
- "aria-label": P.more,
83
+ "aria-label": E.more,
84
84
  "aria-haspopup": "menu",
85
85
  "aria-expanded": p != null,
86
86
  startIcon: /* @__PURE__ */ r(S, {
@@ -100,21 +100,21 @@ function me({ leftActions: n = [], leadingSlot: a, secondaryAction: s, primaryAc
100
100
  vertical: "bottom",
101
101
  horizontal: "left"
102
102
  },
103
- children: g.overflowActions.map((e) => /* @__PURE__ */ r(j, {
103
+ children: u.overflowActions.map((e) => /* @__PURE__ */ r(j, {
104
104
  disabled: e.disabled,
105
105
  onClick: () => {
106
106
  f(null), e.onClick();
107
107
  },
108
- children: /* @__PURE__ */ l("div", {
109
- className: w("flex items-center gap-2", e.tone === "danger" ? "text-beta-500" : "text-delta-700"),
110
- children: [e.icon, /* @__PURE__ */ r("span", { children: e.label })]
108
+ children: /* @__PURE__ */ r("span", {
109
+ className: e.tone === "danger" ? "text-beta-500" : "text-delta-700",
110
+ children: e.label
111
111
  })
112
112
  }, e.id))
113
113
  })] })] })
114
114
  }), x && /* @__PURE__ */ r("span", {
115
115
  className: "flex min-w-px flex-1 flex-nowrap items-center justify-end",
116
- children: /* @__PURE__ */ l("span", {
117
- ref: h(N),
116
+ children: /* @__PURE__ */ n("span", {
117
+ ref: h(C),
118
118
  className: "flex shrink-0 flex-nowrap items-center gap-2",
119
119
  children: [s && b(s, "outlined", "secondary"), d && b(d, "contained", "primary")]
120
120
  })
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "3.92.0",
6
+ "version": "3.92.1",
7
7
  "type": "module",
8
8
  "sideEffects": [
9
9
  "**/*.css",