asma-ui-core 3.105.0 → 3.107.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 (72) hide show
  1. package/dist/asma-ui-core.css +1 -1
  2. package/dist/components/custom/module/header-layout/DynamicToolbar.js +99 -97
  3. package/dist/components/custom/module/header-layout/ToolbarActionGroup.js +60 -41
  4. package/dist/components/custom/module/header-layout/ToolbarRows.js +51 -47
  5. package/dist/components/custom/module/header-layout/useTranslations.js +12 -10
  6. package/dist/components/custom/page/page-header/PageHeader.js +41 -40
  7. package/dist/components/custom/widget/widget/StyledWidget.js +21 -20
  8. package/dist/components/data-display/chip/StyledChip.js +70 -53
  9. package/dist/components/data-display/tooltip/StyledTooltip.js +116 -73
  10. package/dist/components/feedback/dialog/DialogBusyContext.js +32 -0
  11. package/dist/components/feedback/dialog/StyledDialog.js +81 -72
  12. package/dist/components/feedback/dialog/dialog-footer/StyledDialogFooter.js +76 -71
  13. package/dist/components/feedback/minimizable-dialog/MinimizableDialog.js +133 -137
  14. package/dist/components/feedback/minimizable-dialog/components/CloseBtn.js +11 -8
  15. package/dist/components/feedback/minimizable-dialog/components/FullscreenBtn.js +6 -6
  16. package/dist/components/feedback/minimizable-dialog/components/MinimizeBtn.js +1 -1
  17. package/dist/components/feedback/minimizable-dialog/v2/MinimizableDialogV2.js +108 -88
  18. package/dist/components/feedback/minimizable-dialog/v2/useTranslations.js +6 -4
  19. package/dist/components/inputs/button/StyledButton.js +83 -33
  20. package/dist/components/inputs/button/StyledButton.module.js +13 -13
  21. package/dist/components/inputs/dynamic-select/components/DynamicInteractiveChipGroup.js +32 -32
  22. package/dist/components/inputs/dynamic-select/components/DynamicSelectAutocomplete.js +6 -6
  23. package/dist/components/inputs/select/StyledSelect.js +8 -8
  24. package/dist/components/inputs/select-autocomplete/StyledSelectAutocomplete.js +14 -14
  25. package/dist/components/navigation/link/StyledLink.js +53 -26
  26. package/dist/components/navigation/link/StyledLink.module.js +6 -6
  27. package/dist/components/navigation/menu/StyledMenuItem.js +35 -30
  28. package/dist/components/navigation/tabs/StyledTab.js +23 -25
  29. package/dist/components/utils/bottom-sheet/StyledBottomSheet.js +6 -6
  30. package/dist/components/utils/copy-wrapper/CopyButton.js +4 -4
  31. package/dist/components/utils/copy-wrapper/CopyWrapper.js +4 -4
  32. package/dist/datetime/components/date-picker/components/BaseDatePickerInput.js +66 -56
  33. package/dist/datetime/components/date-picker/components/DatePickerInputSingle.js +13 -12
  34. package/dist/datetime/components/time-picker/TimePickerInput.js +47 -39
  35. package/dist/datetime/helpers/getTitleLabelling.js +10 -0
  36. package/dist/datetime/shared-components/button/StyledButton.module.js +11 -11
  37. package/dist/helpers/focusable.js +2 -2
  38. package/dist/index.js +589 -585
  39. package/dist/src/components/custom/module/header-layout/ToolbarActionGroup.d.ts +13 -2
  40. package/dist/src/components/custom/module/header-layout/ToolbarRows.d.ts +2 -1
  41. package/dist/src/components/custom/module/header-layout/planToolbarActions.d.ts +18 -1
  42. package/dist/src/components/custom/module/header-layout/useTranslations.d.ts +2 -0
  43. package/dist/src/components/custom/widget/widget/StyledWidget.d.ts +5 -0
  44. package/dist/src/components/data-display/chip/StyledChip.d.ts +6 -0
  45. package/dist/src/components/data-display/interactive-chip/StyledInteractiveChip.d.ts +7 -1
  46. package/dist/src/components/data-display/tooltip/StyledTooltip.d.ts +16 -2
  47. package/dist/src/components/feedback/dialog/DialogBusy.test.d.ts +1 -0
  48. package/dist/src/components/feedback/dialog/DialogBusyContext.d.ts +28 -0
  49. package/dist/src/components/feedback/dialog/StyledDialog.d.ts +5 -0
  50. package/dist/src/components/feedback/dialog/dialog-footer/StyledDialogFooter.d.ts +9 -8
  51. package/dist/src/components/feedback/dialog/index.d.ts +1 -0
  52. package/dist/src/components/feedback/minimizable-dialog/components/CloseBtn.d.ts +2 -0
  53. package/dist/src/components/feedback/minimizable-dialog/types.d.ts +11 -0
  54. package/dist/src/components/feedback/minimizable-dialog/v2/types.d.ts +2 -0
  55. package/dist/src/components/feedback/minimizable-dialog/v2/useTranslations.d.ts +2 -0
  56. package/dist/src/components/inputs/button/StyledButton.d.ts +25 -1
  57. package/dist/src/components/inputs/button/StyledButtonBusy.test.d.ts +1 -0
  58. package/dist/src/components/navigation/link/StyledLink.d.ts +6 -0
  59. package/dist/src/components/navigation/menu/StyledMenuItem.d.ts +8 -1
  60. package/dist/src/components/navigation/tabs/StyledTab.d.ts +6 -0
  61. package/dist/src/datetime/components/date-picker/components/BaseDatePickerInput.d.ts +2 -0
  62. package/dist/src/datetime/components/date-picker/types.d.ts +6 -0
  63. package/dist/src/datetime/components/time-picker/types.d.ts +6 -1
  64. package/dist/src/datetime/helpers/getTitleLabelling.d.ts +12 -0
  65. package/dist/src/forms/submitChanged.d.ts +3 -0
  66. package/dist/src/helpers/focusable.d.ts +8 -0
  67. package/dist/src/helpers/index.d.ts +1 -0
  68. package/dist/src/helpers/uiCoreLocale.d.ts +1 -0
  69. package/dist/src/table/shared-components/StyledMenuItem.d.ts +5 -1
  70. package/dist/table/components/columns/action-column/components/RowActionMenu.js +63 -69
  71. package/dist/table/shared-components/StyledMenuItem.js +28 -16
  72. package/package.json +1 -1
@@ -6,11 +6,11 @@ import { planBulkToolbarActions as me, planToolbarActions as he } from "./planTo
6
6
  import { useToolbarTranslations as ue } from "./useTranslations.js";
7
7
  import { DynamicToolbarLayoutContext as fe } from "./DynamicToolbarLayoutContext.js";
8
8
  import { resolveBulkActionsAvailableWidth as Ae, resolvePageActionsAvailableWidth as xe, resolveReserveBulkActionsWidthPx as ve, resolveTitleAreaWidth as be, resolveToolbarLayout as pe } from "./estimateToolbarLayout.js";
9
- import { SearchSlot as we, SelectionIndicator as Pe, SelectionRow as Te, TitleBlock as H, TitleText as We, UtilityCluster as Q } from "./ToolbarRows.js";
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";
9
+ import { SearchSlot as Pe, SelectionIndicator as we, SelectionRow as Te, TitleBlock as H, TitleText as We, UtilityCluster as Q } from "./ToolbarRows.js";
10
+ import { KEY_MORE_BUTTON as Me, KEY_SEARCH as $, KEY_SELECTION_INDICATOR as ge, KEY_TITLE as q, ToolbarMeasurementStrip as Be, actionKey as ye, filterKey as R } from "./ToolbarMeasurement.js";
11
11
  import { useCallback as Se, useMemo as o } from "react";
12
- import { Fragment as z, jsx as t, jsxs as u } from "react/jsx-runtime";
13
- var G = 744, ke = 0, _e = 2, Ie = [
12
+ import { Fragment as z, jsx as t, jsxs as f } from "react/jsx-runtime";
13
+ var G = 744, ke = 0, Le = 2, _e = [
14
14
  {
15
15
  minWidth: 361,
16
16
  maxVisible: 2
@@ -24,37 +24,37 @@ var G = 744, ke = 0, _e = 2, Ie = [
24
24
  maxVisible: 0
25
25
  }
26
26
  ];
27
- function Ne(g, l) {
28
- const A = Ie.find((x) => g >= x.minWidth);
29
- return Math.min(A?.maxVisible ?? 0, l);
27
+ function Ie(y, n) {
28
+ const x = _e.find((v) => y >= v.minWidth);
29
+ return Math.min(x?.maxVisible ?? 0, n);
30
30
  }
31
31
  var J = {
32
32
  inlineActions: [],
33
33
  overflowActions: [],
34
34
  showMoreMenu: !1
35
35
  };
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 = 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(() => ({
36
+ function He(y) {
37
+ const { title: n, helperText: x, beforeFilterActions: v = [], filter: b, search: c, afterSearchActions: C = [], selectedCount: T = 0, onClearSelection: S, bulkActions: d = [], maxVisibleBulkActions: w = Le, locale: Z = "en", className: ee, style: te, dataTest: ie = "dynamic-toolbar" } = y, m = ue(Z), { ref: oe, widthPx: l } = ce(), { register: W, widths: s } = de(), k = re(), L = o(() => Ie(l, w), [l, w]), M = !k && l >= G ? w : L, h = T > 0, O = !h, p = o(() => [...v, ...C], [v, C]), u = Se((e, i) => s[ye(e.id, i)], [s]), a = o(() => ({
38
38
  titleWidthPx: s[q],
39
39
  searchWidthPx: s[$],
40
40
  filterLabelWidthPx: s[R(!1)],
41
41
  filterIconWidthPx: s[R(!0)],
42
- selectionIndicatorWidthPx: s[Be],
42
+ selectionIndicatorWidthPx: s[ge],
43
43
  moreButtonWidthPx: s[Me],
44
- actionWidthPx: h
45
- }), [s, h]), I = o(() => ve(ke, d, h, M), [
44
+ actionWidthPx: u
45
+ }), [s, u]), _ = o(() => ve(ke, d, u, M), [
46
46
  d,
47
- h,
47
+ u,
48
48
  M
49
- ]), { mode: r, filterIconOnly: w, trailingIconOnly: B } = o(() => pe({
50
- containerWidth: n,
49
+ ]), { mode: r, filterIconOnly: P, trailingIconOnly: g } = o(() => pe({
50
+ containerWidth: l,
51
51
  isMobile: k,
52
- isSelectionMode: m,
52
+ isSelectionMode: h,
53
53
  compactBreakpointPx: G,
54
- reserveBulkActionsWidthPx: I,
55
- title: l,
54
+ reserveBulkActionsWidthPx: _,
55
+ title: n,
56
56
  hasLeadingUtility: !1,
57
- hasFilter: v != null,
57
+ hasFilter: b != null,
58
58
  hasSearch: c != null,
59
59
  hasTrailingUtility: !1,
60
60
  pageActions: p,
@@ -63,182 +63,184 @@ function He(g) {
63
63
  measured: a
64
64
  }), [
65
65
  d,
66
- n,
67
- I,
68
- v,
66
+ l,
67
+ _,
68
+ b,
69
69
  k,
70
- m,
70
+ h,
71
71
  M,
72
72
  a,
73
73
  p,
74
74
  c,
75
- l
76
- ]), le = o(() => ({
77
- containerWidth: n,
78
- filterIconOnly: w,
79
- trailingIconOnly: B
75
+ n
76
+ ]), ne = o(() => ({
77
+ containerWidth: l,
78
+ filterIconOnly: P,
79
+ trailingIconOnly: g
80
80
  }), [
81
- n,
82
- w,
83
- B
84
- ]), V = be(l, a.titleWidthPx), U = xe({
81
+ l,
82
+ P,
83
+ g
84
+ ]), V = be(n, a.titleWidthPx), U = xe({
85
85
  layoutMode: r,
86
- containerWidth: n,
86
+ containerWidth: l,
87
87
  titleWidth: V,
88
- filterIconOnly: w,
89
- trailingIconOnly: B,
90
- hasFilter: v != null,
88
+ filterIconOnly: P,
89
+ trailingIconOnly: g,
90
+ hasFilter: b != null,
91
91
  hasSearch: c != null,
92
92
  hasLeadingUtility: !1,
93
93
  hasTrailingUtility: !1,
94
- reserveBulkActionsWidthPx: m ? 0 : I,
94
+ reserveBulkActionsWidthPx: h ? 0 : _,
95
95
  measured: a
96
96
  }), F = Ae({
97
97
  layoutMode: r,
98
- containerWidth: n,
98
+ containerWidth: l,
99
99
  titleWidth: V,
100
- filterIconOnly: w,
101
- hasFilter: v != null,
100
+ filterIconOnly: P,
101
+ hasFilter: b != null,
102
102
  hasSearch: c != null,
103
103
  measured: a
104
- }), f = o(() => he({
104
+ }), A = o(() => he({
105
105
  actions: p,
106
106
  availableWidth: U,
107
107
  collapseLabels: !0,
108
- resolveActionWidth: h,
108
+ resolveActionWidth: u,
109
109
  moreButtonWidthPx: a.moreButtonWidthPx
110
110
  }), [
111
111
  p,
112
112
  U,
113
- h,
113
+ u,
114
114
  a.moreButtonWidthPx
115
- ]), y = o(() => new Set(x.map((e) => e.id)), [x]), K = o(() => {
116
- const e = f.inlineActions.filter((i) => y.has(i.action.id));
115
+ ]), B = o(() => new Set(v.map((e) => e.id)), [v]), K = o(() => {
116
+ const e = A.inlineActions.filter((i) => B.has(i.action.id));
117
117
  return e.length ? {
118
118
  inlineActions: e,
119
119
  overflowActions: [],
120
120
  showMoreMenu: !1
121
121
  } : J;
122
- }, [y, f]), D = o(() => {
123
- const e = f.inlineActions.filter((i) => !y.has(i.action.id));
124
- return !e.length && !f.showMoreMenu ? J : {
122
+ }, [B, A]), D = o(() => {
123
+ const e = A.inlineActions.filter((i) => !B.has(i.action.id));
124
+ return !e.length && !A.showMoreMenu ? J : {
125
125
  inlineActions: e,
126
- overflowActions: f.overflowActions,
127
- showMoreMenu: f.showMoreMenu
126
+ overflowActions: A.overflowActions,
127
+ showMoreMenu: A.showMoreMenu
128
128
  };
129
- }, [y, f]), Y = o(() => me({
129
+ }, [B, A]), Y = o(() => me({
130
130
  actions: d,
131
131
  availableWidth: F,
132
- maxVisibleBulkActions: r === "compact" ? _ : P,
133
- resolveActionWidth: h,
132
+ maxVisibleBulkActions: r === "compact" ? L : w,
133
+ resolveActionWidth: u,
134
134
  moreButtonWidthPx: a.moreButtonWidthPx
135
135
  }), [
136
136
  d,
137
137
  F,
138
- _,
138
+ L,
139
139
  r,
140
- P,
141
- h,
140
+ w,
141
+ u,
142
142
  a.moreButtonWidthPx
143
- ]), ne = o(() => {
143
+ ]), le = o(() => {
144
144
  const e = /* @__PURE__ */ new Map();
145
145
  for (const i of [...p, ...d]) !i.hidden && !e.has(i.id) && e.set(i.id, i);
146
146
  return [...e.values()];
147
- }, [p, d]), N = W(q, "scroll"), j = W($), E = v != null ? /* @__PURE__ */ t("span", {
148
- ref: W(R(w)),
147
+ }, [p, d]), I = W(q, "scroll"), j = W($), N = b != null ? /* @__PURE__ */ t("span", {
148
+ ref: W(R(P)),
149
149
  className: "inline-flex shrink-0 items-center",
150
- children: v
151
- }) : void 0, se = /* @__PURE__ */ t(ye, {
152
- actions: ne,
150
+ children: b
151
+ }) : void 0, se = /* @__PURE__ */ t(Be, {
152
+ actions: le,
153
153
  register: W,
154
- overflowMenuLabel: b.more,
155
- selectionIndicator: m ? {
154
+ overflowMenuLabel: m.more,
155
+ selectionIndicator: h ? {
156
156
  selectedCount: T,
157
157
  hasClear: S != null,
158
- translations: b
158
+ translations: m
159
159
  } : void 0
160
160
  }), X = /* @__PURE__ */ t(Te, {
161
161
  selectedCount: T,
162
162
  onClearSelection: S,
163
- translations: b,
163
+ translations: m,
164
164
  bulkActionsPlan: Y
165
- }), L = (e, i) => /* @__PURE__ */ t(fe.Provider, {
166
- value: le,
167
- children: /* @__PURE__ */ u("div", {
165
+ }), E = (e, i) => /* @__PURE__ */ t(fe.Provider, {
166
+ value: ne,
167
+ children: /* @__PURE__ */ f("div", {
168
168
  ref: oe,
169
169
  "data-testid": ie,
170
170
  "data-layout": i,
171
- "data-filter-icon-only": w ? "true" : "false",
172
- "data-trailing-icon-only": B ? "true" : "false",
171
+ "data-filter-icon-only": P ? "true" : "false",
172
+ "data-trailing-icon-only": g ? "true" : "false",
173
173
  className: ae("relative flex w-full flex-col gap-2", ee),
174
174
  style: te,
175
175
  children: [se, e]
176
176
  })
177
177
  });
178
- return r === "compact" || r === "stacked" ? L(/* @__PURE__ */ u(z, { children: [
178
+ return r === "compact" || r === "stacked" ? E(/* @__PURE__ */ f(z, { children: [
179
179
  /* @__PURE__ */ t(H, {
180
- title: l,
181
- helperText: A,
182
- titleMeasureRef: N
180
+ title: n,
181
+ helperText: x,
182
+ titleMeasureRef: I
183
183
  }),
184
184
  /* @__PURE__ */ t(Q, {
185
185
  variant: "utility-row",
186
186
  beforeFilterActionsPlan: K,
187
- filter: E,
187
+ filter: N,
188
188
  search: c,
189
189
  afterSearchActionsPlan: D,
190
190
  showPageActions: O,
191
- overflowMenuLabel: b.more,
191
+ overflowMenuLabel: m.more,
192
+ inProgressLabel: m.inProgress,
192
193
  align: r === "compact" ? "start" : "end"
193
194
  }),
194
- m && X
195
- ] }), r) : r === "selection-split" ? L(/* @__PURE__ */ u(z, { children: [/* @__PURE__ */ u("div", {
195
+ h && X
196
+ ] }), r) : r === "selection-split" ? E(/* @__PURE__ */ f(z, { children: [/* @__PURE__ */ f("div", {
196
197
  className: "flex w-full min-w-0 flex-nowrap items-center justify-between gap-3",
197
198
  children: [/* @__PURE__ */ t("div", {
198
199
  className: "min-w-0 flex-1 overflow-hidden",
199
200
  children: /* @__PURE__ */ t(H, {
200
- title: l,
201
- helperText: A,
202
- titleMeasureRef: N
201
+ title: n,
202
+ helperText: x,
203
+ titleMeasureRef: I
203
204
  })
204
- }), /* @__PURE__ */ u("div", {
205
+ }), /* @__PURE__ */ f("div", {
205
206
  className: "flex shrink-0 flex-nowrap items-center gap-2",
206
- children: [E, c != null && /* @__PURE__ */ t(we, {
207
+ children: [N, c != null && /* @__PURE__ */ t(Pe, {
207
208
  search: c,
208
209
  measureRef: j
209
210
  })]
210
211
  })]
211
- }), X] }), "selection-split") : L(/* @__PURE__ */ u("div", {
212
+ }), X] }), "selection-split") : E(/* @__PURE__ */ f("div", {
212
213
  className: "flex w-full min-w-0 flex-col gap-1",
213
- children: [/* @__PURE__ */ u("div", {
214
+ children: [/* @__PURE__ */ f("div", {
214
215
  className: "flex w-full min-w-0 flex-nowrap items-center gap-3",
215
- children: [/* @__PURE__ */ u("div", {
216
+ children: [/* @__PURE__ */ f("div", {
216
217
  className: "flex min-w-0 flex-1 items-center gap-3",
217
- children: [l && /* @__PURE__ */ t(We, {
218
- title: l,
219
- measureRef: N
220
- }), m && /* @__PURE__ */ t(Pe, {
218
+ children: [n && /* @__PURE__ */ t(We, {
219
+ title: n,
220
+ measureRef: I
221
+ }), h && /* @__PURE__ */ t(we, {
221
222
  selectedCount: T,
222
223
  onClearSelection: S,
223
- translations: b
224
+ translations: m
224
225
  })]
225
226
  }), /* @__PURE__ */ t("div", {
226
227
  className: "min-w-0 shrink-0",
227
228
  children: /* @__PURE__ */ t(Q, {
228
- variant: m ? "inline-selection" : "inline-normal",
229
+ variant: h ? "inline-selection" : "inline-normal",
229
230
  beforeFilterActionsPlan: K,
230
- filter: E,
231
+ filter: N,
231
232
  search: c,
232
233
  afterSearchActionsPlan: D,
233
234
  bulkActionsPlan: Y,
234
235
  showPageActions: O,
235
- overflowMenuLabel: b.more,
236
+ overflowMenuLabel: m.more,
237
+ inProgressLabel: m.inProgress,
236
238
  searchMeasureRef: j
237
239
  })
238
240
  })]
239
- }), A && /* @__PURE__ */ t("div", {
241
+ }), x && /* @__PURE__ */ t("div", {
240
242
  className: "text-sm text-delta-700",
241
- children: A
243
+ children: x
242
244
  })]
243
245
  }), "inline");
244
246
  }
@@ -1,67 +1,85 @@
1
- import { cn as h } from "../../../../helpers/cn.js";
2
- import { DotsVerticalIcon as g } from "../../../icons/dots-vertical-icon/DotsVerticalIcon.js";
3
- import { StyledButton as p } from "../../../inputs/button/StyledButton.js";
4
- import { StyledMenu as v } from "../../../navigation/menu/StyledMenu.js";
5
- import { StyledMenuItem as x } from "../../../navigation/menu/StyledMenuItem.js";
6
- import { useState as k } from "react";
7
- import { Fragment as y, jsx as n, jsxs as s } from "react/jsx-runtime";
8
- function O(e) {
1
+ import { cn as p } from "../../../../helpers/cn.js";
2
+ import { DotsVerticalIcon as x } from "../../../icons/dots-vertical-icon/DotsVerticalIcon.js";
3
+ import { useReportDialogBusy as y } from "../../../feedback/dialog/DialogBusyContext.js";
4
+ import { StyledButton as c } from "../../../inputs/button/StyledButton.js";
5
+ import { StyledMenu as R } from "../../../navigation/menu/StyledMenu.js";
6
+ import { StyledMenuItem as A } from "../../../navigation/menu/StyledMenuItem.js";
7
+ import { useState as B } from "react";
8
+ import { Fragment as I, jsx as n, jsxs as u } from "react/jsx-runtime";
9
+ var v = "In progress";
10
+ function S(e, l = v) {
11
+ return e.loading ? {
12
+ disabled: !0,
13
+ disabledReason: l,
14
+ "aria-busy": !0
15
+ } : {
16
+ disabled: e.disabled,
17
+ disabledReason: e.disabledReason
18
+ };
19
+ }
20
+ function F(e) {
9
21
  return e != null && (e.inlineActions.length > 0 || e.showMoreMenu);
10
22
  }
11
- function T({ action: e, showLabel: l, selectionTone: t = !1 }) {
23
+ function T({ action: e, showLabel: l, selectionTone: o = !1, inProgressLabel: a }) {
12
24
  if (e.render) return e.render({ showLabel: l });
13
- const o = e.ariaLabel ?? e.label;
14
- return /* @__PURE__ */ n(p, {
25
+ const i = e.ariaLabel ?? e.label;
26
+ return /* @__PURE__ */ n(c, {
15
27
  dataTest: e.dataTest ?? `dynamic-toolbar-action-${e.id}`,
16
- variant: e.variant ?? (t ? "text" : "outlined"),
28
+ variant: e.variant ?? (o ? "text" : "outlined"),
17
29
  error: e.tone === "danger",
18
30
  size: e.size ?? "large",
19
31
  type: "button",
32
+ disabled: !!e.disabled && !!e.disabledReason,
20
33
  "aria-disabled": e.disabled ? !0 : void 0,
34
+ disabledReason: e.disabledReason,
35
+ loading: e.loading,
36
+ holdsDialog: e.holdsDialog,
37
+ loadingAnnouncement: a,
21
38
  startIcon: e.icon,
22
39
  onClick: e.disabled ? void 0 : e.onClick,
23
- "aria-label": l && e.ariaLabel == null ? void 0 : o,
40
+ "aria-label": l && e.ariaLabel == null ? void 0 : i,
24
41
  children: l ? e.label : void 0
25
42
  });
26
43
  }
27
- function A({ overflowMenuLabel: e, onOpen: l }) {
28
- return /* @__PURE__ */ n(p, {
44
+ function k({ overflowMenuLabel: e, onOpen: l }) {
45
+ return /* @__PURE__ */ n(c, {
29
46
  dataTest: "dynamic-toolbar-overflow-actions",
30
47
  variant: "text",
31
48
  size: "large",
32
49
  type: "button",
33
- endIcon: /* @__PURE__ */ n(g, {
50
+ endIcon: /* @__PURE__ */ n(x, {
34
51
  width: 20,
35
52
  height: 20
36
53
  }),
37
- onClick: (t) => l?.(t.currentTarget),
54
+ onClick: (o) => l?.(o.currentTarget),
38
55
  "aria-label": e,
39
56
  "aria-haspopup": "menu",
40
57
  children: e
41
58
  });
42
59
  }
43
- function j({ plan: e, overflowMenuLabel: l, className: t, selectionTone: o = !1, registerActionWidth: d }) {
44
- const [u, a] = k(null), { inlineActions: m, overflowActions: b, showMoreMenu: c } = e;
45
- return !m.length && !c ? null : /* @__PURE__ */ s("div", {
46
- className: h("flex shrink-0 flex-nowrap items-center gap-2", t),
47
- children: [m.map(({ action: r, showLabel: i }) => {
48
- const f = /* @__PURE__ */ n(T, {
60
+ function j({ plan: e, overflowMenuLabel: l, className: o, selectionTone: a = !1, registerActionWidth: i, inProgressLabel: m = v }) {
61
+ const [f, d] = B(null), { inlineActions: b, overflowActions: g, showMoreMenu: s } = e;
62
+ return y(s && g.some((r) => !!r.loading && r.holdsDialog !== !1)), !b.length && !s ? null : /* @__PURE__ */ u("div", {
63
+ className: p("flex shrink-0 flex-nowrap items-center gap-2", o),
64
+ children: [b.map(({ action: r, showLabel: t }) => {
65
+ const h = /* @__PURE__ */ n(T, {
49
66
  action: r,
50
- showLabel: i,
51
- selectionTone: o
67
+ showLabel: t,
68
+ selectionTone: a,
69
+ inProgressLabel: m
52
70
  }, r.id);
53
- return d == null || r.measureInStrip !== !1 ? f : /* @__PURE__ */ n("span", {
54
- ref: d(r.id, i),
71
+ return i == null || r.measureInStrip !== !1 ? h : /* @__PURE__ */ n("span", {
72
+ ref: i(r.id, t),
55
73
  className: "inline-flex shrink-0",
56
- children: f
74
+ children: h
57
75
  }, r.id);
58
- }), c && /* @__PURE__ */ s(y, { children: [/* @__PURE__ */ n(A, {
76
+ }), s && /* @__PURE__ */ u(I, { children: [/* @__PURE__ */ n(k, {
59
77
  overflowMenuLabel: l,
60
- onOpen: (r) => a((i) => i ? null : r)
61
- }), /* @__PURE__ */ n(v, {
62
- anchorEl: u,
63
- open: !!u,
64
- onClose: () => a(null),
78
+ onOpen: (r) => d((t) => t ? null : r)
79
+ }), /* @__PURE__ */ n(R, {
80
+ anchorEl: f,
81
+ open: !!f,
82
+ onClose: () => d(null),
65
83
  anchorOrigin: {
66
84
  vertical: "bottom",
67
85
  horizontal: "right"
@@ -70,13 +88,13 @@ function j({ plan: e, overflowMenuLabel: l, className: t, selectionTone: o = !1,
70
88
  vertical: "top",
71
89
  horizontal: "right"
72
90
  },
73
- children: b.map((r) => /* @__PURE__ */ n(x, {
74
- disabled: r.disabled,
91
+ children: g.map((r) => /* @__PURE__ */ n(A, {
92
+ ...S(r, m),
75
93
  onClick: () => {
76
- a(null), r.onClick();
94
+ d(null), r.onClick();
77
95
  },
78
- children: /* @__PURE__ */ s("div", {
79
- className: h("flex items-center gap-2", r.tone === "danger" ? "text-beta-500" : "text-delta-700"),
96
+ children: /* @__PURE__ */ u("div", {
97
+ className: p("flex items-center gap-2", r.tone === "danger" ? "text-beta-500" : "text-delta-700"),
80
98
  children: [r.icon, /* @__PURE__ */ n("span", { children: r.label })]
81
99
  })
82
100
  }, r.id))
@@ -84,8 +102,9 @@ function j({ plan: e, overflowMenuLabel: l, className: t, selectionTone: o = !1,
84
102
  });
85
103
  }
86
104
  export {
87
- A as MoreTriggerButton,
105
+ k as MoreTriggerButton,
88
106
  T as ToolbarActionButton,
89
107
  j as ToolbarActionGroup,
90
- O as hasPlannedActions
108
+ F as hasPlannedActions,
109
+ S as overflowItemState
91
110
  };