asma-ui-core 3.65.0 → 3.66.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.
@@ -1,17 +1,17 @@
1
- import { cn as m } from "../../../../helpers/cn.js";
2
- import { DotsVerticalIcon as p } from "../../../icons/dots-vertical-icon/DotsVerticalIcon.js";
3
- import { StyledButton as u } from "../../../inputs/button/StyledButton.js";
1
+ import { cn as u } from "../../../../helpers/cn.js";
2
+ import { DotsVerticalIcon as b } from "../../../icons/dots-vertical-icon/DotsVerticalIcon.js";
3
+ import { StyledButton as h } from "../../../inputs/button/StyledButton.js";
4
4
  import { StyledMenu as g } from "../../../navigation/menu/StyledMenu.js";
5
- import { StyledMenuItem as b } from "../../../navigation/menu/StyledMenuItem.js";
6
- import { useState as v } from "react";
7
- import { Fragment as x, jsx as n, jsxs as a } from "react/jsx-runtime";
8
- function S(e) {
5
+ import { StyledMenuItem as p } from "../../../navigation/menu/StyledMenuItem.js";
6
+ import { Fragment as v, useState as x } from "react";
7
+ import { Fragment as A, jsx as n, jsxs as o } from "react/jsx-runtime";
8
+ function w(e) {
9
9
  return e != null && (e.inlineActions.length > 0 || e.showMoreMenu);
10
10
  }
11
- function A({ action: e, showLabel: t, selectionTone: l = !1 }) {
11
+ function T({ action: e, showLabel: t, selectionTone: l = !1 }) {
12
12
  if (e.render) return e.render({ showLabel: t });
13
- const o = e.ariaLabel ?? e.label;
14
- return /* @__PURE__ */ n(u, {
13
+ const i = e.ariaLabel ?? e.label;
14
+ return /* @__PURE__ */ n(h, {
15
15
  dataTest: e.dataTest ?? `dynamic-toolbar-action-${e.id}`,
16
16
  variant: e.variant ?? (l ? "text" : "outlined"),
17
17
  error: e.tone === "danger",
@@ -19,16 +19,16 @@ function A({ action: e, showLabel: t, selectionTone: l = !1 }) {
19
19
  disabled: e.disabled,
20
20
  startIcon: e.icon,
21
21
  onClick: e.onClick,
22
- "aria-label": t ? void 0 : o,
22
+ "aria-label": t ? void 0 : i,
23
23
  children: t ? e.label : void 0
24
24
  });
25
25
  }
26
- function T({ overflowMenuLabel: e, onOpen: t }) {
27
- return /* @__PURE__ */ n(u, {
26
+ function k({ overflowMenuLabel: e, onOpen: t }) {
27
+ return /* @__PURE__ */ n(h, {
28
28
  dataTest: "dynamic-toolbar-overflow-actions",
29
29
  variant: "text",
30
30
  size: "large",
31
- endIcon: /* @__PURE__ */ n(p, {
31
+ endIcon: /* @__PURE__ */ n(b, {
32
32
  width: 20,
33
33
  height: 20
34
34
  }),
@@ -38,21 +38,21 @@ function T({ overflowMenuLabel: e, onOpen: t }) {
38
38
  children: e
39
39
  });
40
40
  }
41
- function w({ plan: e, overflowMenuLabel: t, className: l, selectionTone: o = !1 }) {
42
- const [s, i] = v(null), { inlineActions: d, overflowActions: h, showMoreMenu: c } = e;
43
- return !d.length && !c ? null : /* @__PURE__ */ a("div", {
44
- className: m("flex shrink-0 flex-nowrap items-center gap-2", l),
45
- children: [d.map(({ action: r, showLabel: f }) => /* @__PURE__ */ n(A, {
41
+ function F({ plan: e, overflowMenuLabel: t, className: l, selectionTone: i = !1 }) {
42
+ const [s, a] = x(null), { inlineActions: c, overflowActions: f, showMoreMenu: m } = e;
43
+ return !c.length && !m ? null : /* @__PURE__ */ o("div", {
44
+ className: u("flex shrink-0 flex-nowrap items-center gap-2", l),
45
+ children: [c.map(({ action: r, showLabel: d }) => /* @__PURE__ */ n(T, {
46
46
  action: r,
47
- showLabel: f,
48
- selectionTone: o
49
- }, r.id)), c && /* @__PURE__ */ a(x, { children: [/* @__PURE__ */ n(T, {
47
+ showLabel: d,
48
+ selectionTone: i
49
+ }, r.id)), m && /* @__PURE__ */ o(A, { children: [/* @__PURE__ */ n(k, {
50
50
  overflowMenuLabel: t,
51
- onOpen: i
51
+ onOpen: a
52
52
  }), /* @__PURE__ */ n(g, {
53
53
  anchorEl: s,
54
54
  open: !!s,
55
- onClose: () => i(null),
55
+ onClose: () => a(null),
56
56
  anchorOrigin: {
57
57
  vertical: "bottom",
58
58
  horizontal: "right"
@@ -61,22 +61,22 @@ function w({ plan: e, overflowMenuLabel: t, className: l, selectionTone: o = !1
61
61
  vertical: "top",
62
62
  horizontal: "right"
63
63
  },
64
- children: h.map((r) => /* @__PURE__ */ n(b, {
64
+ children: f.map((r, d) => /* @__PURE__ */ o(v, { children: [d > 0 && /* @__PURE__ */ n("hr", { className: "m-0 border-0 border-t border-solid border-delta-200" }), /* @__PURE__ */ n(p, {
65
65
  disabled: r.disabled,
66
66
  onClick: () => {
67
- i(null), r.onClick();
67
+ a(null), r.onClick();
68
68
  },
69
- children: /* @__PURE__ */ a("div", {
70
- className: m("flex items-center gap-2", r.tone === "danger" ? "text-beta-500" : "text-delta-700"),
69
+ children: /* @__PURE__ */ o("div", {
70
+ className: u("flex items-center gap-2", r.tone === "danger" ? "text-beta-500" : "text-delta-700"),
71
71
  children: [r.icon, /* @__PURE__ */ n("span", { children: r.label })]
72
72
  })
73
- }, r.id))
73
+ })] }, r.id))
74
74
  })] })]
75
75
  });
76
76
  }
77
77
  export {
78
- T as MoreTriggerButton,
79
- A as ToolbarActionButton,
80
- w as ToolbarActionGroup,
81
- S as hasPlannedActions
78
+ k as MoreTriggerButton,
79
+ T as ToolbarActionButton,
80
+ F as ToolbarActionGroup,
81
+ w as hasPlannedActions
82
82
  };
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "3.65.0",
6
+ "version": "3.66.0",
7
7
  "type": "module",
8
8
  "sideEffects": [
9
9
  "**/*.css",