asma-ui-core 3.27.2 → 3.29.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.
- package/dist/asma-ui-core.css +1 -1
- package/dist/components/custom/module/header-layout/DynamicToolbar.js +156 -154
- package/dist/components/custom/module/header-layout/ToolbarRows.js +38 -33
- package/dist/components/custom/module/header-layout/estimateToolbarLayout.js +55 -58
- package/dist/components/custom/widget/widget-title/StyledWidgetTitle.js +10 -7
- package/dist/components/inputs/input-field/StyledInputField.js +21 -14
- package/dist/components/navigation/tabs/StyledTab.js +1 -0
- package/dist/src/components/custom/widget/widget-title/StyledWidgetTitle.d.ts +5 -1
- package/package.json +1 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { cn as
|
|
2
|
-
import { useMobileMediaQuery as
|
|
3
|
-
import { DynamicToolbarLayoutContext as
|
|
4
|
-
import { useElementWidthPx as
|
|
5
|
-
import { useWidthRegistry as
|
|
6
|
-
import { planBulkToolbarActions as
|
|
7
|
-
import { resolveBulkActionsAvailableWidth as
|
|
8
|
-
import { useToolbarTranslations as
|
|
9
|
-
import { SearchSlot as
|
|
10
|
-
import { KEY_MORE_BUTTON as
|
|
11
|
-
import { useCallback as
|
|
12
|
-
import { Fragment as
|
|
13
|
-
var
|
|
1
|
+
import { cn as ae } from "../../../../helpers/cn.js";
|
|
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";
|
|
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";
|
|
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 = [
|
|
14
14
|
{
|
|
15
15
|
minWidth: 361,
|
|
16
16
|
maxVisible: 2
|
|
@@ -24,214 +24,216 @@ var ge = 744, Se = 0, _e = 3, ke = [
|
|
|
24
24
|
maxVisible: 0
|
|
25
25
|
}
|
|
26
26
|
];
|
|
27
|
-
function
|
|
28
|
-
const A =
|
|
29
|
-
return Math.min(A?.maxVisible ?? 0,
|
|
27
|
+
function Ne(g, l) {
|
|
28
|
+
const A = Ie.find((x) => g >= x.minWidth);
|
|
29
|
+
return Math.min(A?.maxVisible ?? 0, l);
|
|
30
30
|
}
|
|
31
|
-
var
|
|
31
|
+
var J = {
|
|
32
32
|
inlineActions: [],
|
|
33
33
|
overflowActions: [],
|
|
34
34
|
showMoreMenu: !1
|
|
35
35
|
};
|
|
36
|
-
function
|
|
37
|
-
const { title:
|
|
38
|
-
titleWidthPx:
|
|
39
|
-
searchWidthPx:
|
|
40
|
-
filterLabelWidthPx:
|
|
41
|
-
filterIconWidthPx:
|
|
42
|
-
selectionIndicatorWidthPx:
|
|
43
|
-
moreButtonWidthPx:
|
|
44
|
-
actionWidthPx:
|
|
45
|
-
}), [
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
]), { mode:
|
|
50
|
-
containerWidth:
|
|
51
|
-
isMobile:
|
|
52
|
-
isSelectionMode:
|
|
53
|
-
compactBreakpointPx:
|
|
54
|
-
reserveBulkActionsWidthPx:
|
|
55
|
-
title:
|
|
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(() => ({
|
|
38
|
+
titleWidthPx: s[q],
|
|
39
|
+
searchWidthPx: s[$],
|
|
40
|
+
filterLabelWidthPx: s[R(!1)],
|
|
41
|
+
filterIconWidthPx: s[R(!0)],
|
|
42
|
+
selectionIndicatorWidthPx: s[Be],
|
|
43
|
+
moreButtonWidthPx: s[Me],
|
|
44
|
+
actionWidthPx: h
|
|
45
|
+
}), [s, h]), I = o(() => xe(ke, d, h, M), [
|
|
46
|
+
d,
|
|
47
|
+
h,
|
|
48
|
+
M
|
|
49
|
+
]), { mode: r, filterIconOnly: w, trailingIconOnly: B } = o(() => be({
|
|
50
|
+
containerWidth: n,
|
|
51
|
+
isMobile: k,
|
|
52
|
+
isSelectionMode: m,
|
|
53
|
+
compactBreakpointPx: G,
|
|
54
|
+
reserveBulkActionsWidthPx: I,
|
|
55
|
+
title: l,
|
|
56
56
|
hasLeadingUtility: !1,
|
|
57
57
|
hasFilter: v != null,
|
|
58
|
-
hasSearch:
|
|
58
|
+
hasSearch: c != null,
|
|
59
59
|
hasTrailingUtility: !1,
|
|
60
|
-
pageActions:
|
|
61
|
-
bulkActions:
|
|
62
|
-
maxVisibleBulkActions:
|
|
63
|
-
measured:
|
|
60
|
+
pageActions: p,
|
|
61
|
+
bulkActions: d,
|
|
62
|
+
maxVisibleBulkActions: M,
|
|
63
|
+
measured: a
|
|
64
64
|
}), [
|
|
65
|
-
r,
|
|
66
|
-
c,
|
|
67
|
-
S,
|
|
68
|
-
v,
|
|
69
|
-
R,
|
|
70
65
|
d,
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
66
|
+
n,
|
|
67
|
+
I,
|
|
68
|
+
v,
|
|
69
|
+
k,
|
|
70
|
+
m,
|
|
71
|
+
M,
|
|
74
72
|
a,
|
|
75
|
-
|
|
76
|
-
]), ie = o(() => ({
|
|
77
|
-
containerWidth: c,
|
|
78
|
-
filterIconOnly: P,
|
|
79
|
-
trailingIconOnly: M
|
|
80
|
-
}), [
|
|
73
|
+
p,
|
|
81
74
|
c,
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
75
|
+
l
|
|
76
|
+
]), le = o(() => ({
|
|
77
|
+
containerWidth: n,
|
|
78
|
+
filterIconOnly: w,
|
|
79
|
+
trailingIconOnly: B
|
|
80
|
+
}), [
|
|
81
|
+
n,
|
|
82
|
+
w,
|
|
83
|
+
B
|
|
84
|
+
]), V = ve(l, a.titleWidthPx), U = Ae({
|
|
85
|
+
layoutMode: r,
|
|
86
|
+
containerWidth: n,
|
|
87
|
+
titleWidth: V,
|
|
88
|
+
filterIconOnly: w,
|
|
89
|
+
trailingIconOnly: B,
|
|
90
90
|
hasFilter: v != null,
|
|
91
|
-
hasSearch:
|
|
91
|
+
hasSearch: c != null,
|
|
92
92
|
hasLeadingUtility: !1,
|
|
93
93
|
hasTrailingUtility: !1,
|
|
94
|
-
reserveBulkActionsWidthPx:
|
|
95
|
-
measured:
|
|
96
|
-
}),
|
|
97
|
-
layoutMode:
|
|
98
|
-
containerWidth:
|
|
99
|
-
titleWidth:
|
|
100
|
-
filterIconOnly:
|
|
94
|
+
reserveBulkActionsWidthPx: m ? 0 : I,
|
|
95
|
+
measured: a
|
|
96
|
+
}), F = fe({
|
|
97
|
+
layoutMode: r,
|
|
98
|
+
containerWidth: n,
|
|
99
|
+
titleWidth: V,
|
|
100
|
+
filterIconOnly: w,
|
|
101
101
|
hasFilter: v != null,
|
|
102
|
-
hasSearch:
|
|
103
|
-
measured:
|
|
104
|
-
}), f = o(() =>
|
|
105
|
-
actions:
|
|
102
|
+
hasSearch: c != null,
|
|
103
|
+
measured: a
|
|
104
|
+
}), f = o(() => ue({
|
|
105
|
+
actions: p,
|
|
106
106
|
availableWidth: U,
|
|
107
107
|
collapseLabels: !0,
|
|
108
|
-
resolveActionWidth:
|
|
109
|
-
moreButtonWidthPx:
|
|
108
|
+
resolveActionWidth: h,
|
|
109
|
+
moreButtonWidthPx: a.moreButtonWidthPx
|
|
110
110
|
}), [
|
|
111
|
-
|
|
111
|
+
p,
|
|
112
112
|
U,
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
]), y = o(() => new Set(x.map((e) => e.id)), [x]),
|
|
113
|
+
h,
|
|
114
|
+
a.moreButtonWidthPx
|
|
115
|
+
]), y = o(() => new Set(x.map((e) => e.id)), [x]), K = o(() => {
|
|
116
116
|
const e = f.inlineActions.filter((i) => y.has(i.action.id));
|
|
117
117
|
return e.length ? {
|
|
118
118
|
inlineActions: e,
|
|
119
119
|
overflowActions: [],
|
|
120
120
|
showMoreMenu: !1
|
|
121
|
-
} :
|
|
122
|
-
}, [y, f]),
|
|
121
|
+
} : J;
|
|
122
|
+
}, [y, f]), D = o(() => {
|
|
123
123
|
const e = f.inlineActions.filter((i) => !y.has(i.action.id));
|
|
124
|
-
return !e.length && !f.showMoreMenu ?
|
|
124
|
+
return !e.length && !f.showMoreMenu ? J : {
|
|
125
125
|
inlineActions: e,
|
|
126
126
|
overflowActions: f.overflowActions,
|
|
127
127
|
showMoreMenu: f.showMoreMenu
|
|
128
128
|
};
|
|
129
|
-
}, [y, f]),
|
|
130
|
-
actions:
|
|
131
|
-
availableWidth:
|
|
132
|
-
maxVisibleBulkActions:
|
|
133
|
-
resolveActionWidth:
|
|
134
|
-
moreButtonWidthPx:
|
|
129
|
+
}, [y, f]), Y = o(() => he({
|
|
130
|
+
actions: d,
|
|
131
|
+
availableWidth: F,
|
|
132
|
+
maxVisibleBulkActions: r === "compact" ? _ : P,
|
|
133
|
+
resolveActionWidth: h,
|
|
134
|
+
moreButtonWidthPx: a.moreButtonWidthPx
|
|
135
135
|
}), [
|
|
136
|
+
d,
|
|
137
|
+
F,
|
|
138
|
+
_,
|
|
136
139
|
r,
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
]), oe = o(() => {
|
|
140
|
+
P,
|
|
141
|
+
h,
|
|
142
|
+
a.moreButtonWidthPx
|
|
143
|
+
]), ne = o(() => {
|
|
142
144
|
const e = /* @__PURE__ */ new Map();
|
|
143
|
-
for (const i of [...
|
|
145
|
+
for (const i of [...p, ...d]) !i.hidden && !e.has(i.id) && e.set(i.id, i);
|
|
144
146
|
return [...e.values()];
|
|
145
|
-
}, [
|
|
146
|
-
ref: W(
|
|
147
|
+
}, [p, d]), N = W(q, "scroll"), j = W($), E = v != null ? /* @__PURE__ */ t("span", {
|
|
148
|
+
ref: W(R(w)),
|
|
147
149
|
className: "inline-flex shrink-0 items-center",
|
|
148
150
|
children: v
|
|
149
|
-
}) : void 0,
|
|
150
|
-
actions:
|
|
151
|
+
}) : void 0, se = /* @__PURE__ */ t(ye, {
|
|
152
|
+
actions: ne,
|
|
151
153
|
register: W,
|
|
152
154
|
overflowMenuLabel: b.more,
|
|
153
|
-
selectionIndicator:
|
|
155
|
+
selectionIndicator: m ? {
|
|
154
156
|
selectedCount: T,
|
|
155
|
-
hasClear:
|
|
157
|
+
hasClear: S != null,
|
|
156
158
|
translations: b
|
|
157
159
|
} : void 0
|
|
158
|
-
}),
|
|
160
|
+
}), X = /* @__PURE__ */ t(Te, {
|
|
159
161
|
selectedCount: T,
|
|
160
|
-
onClearSelection:
|
|
162
|
+
onClearSelection: S,
|
|
161
163
|
translations: b,
|
|
162
|
-
bulkActionsPlan:
|
|
163
|
-
}),
|
|
164
|
-
value:
|
|
165
|
-
children: /* @__PURE__ */
|
|
166
|
-
ref:
|
|
167
|
-
"data-testid":
|
|
164
|
+
bulkActionsPlan: Y
|
|
165
|
+
}), L = (e, i) => /* @__PURE__ */ t(ce.Provider, {
|
|
166
|
+
value: le,
|
|
167
|
+
children: /* @__PURE__ */ u("div", {
|
|
168
|
+
ref: oe,
|
|
169
|
+
"data-testid": ie,
|
|
168
170
|
"data-layout": i,
|
|
169
|
-
"data-filter-icon-only":
|
|
170
|
-
"data-trailing-icon-only":
|
|
171
|
-
className:
|
|
172
|
-
style:
|
|
173
|
-
children: [
|
|
171
|
+
"data-filter-icon-only": w ? "true" : "false",
|
|
172
|
+
"data-trailing-icon-only": B ? "true" : "false",
|
|
173
|
+
className: ae("relative flex w-full flex-col gap-2", ee),
|
|
174
|
+
style: te,
|
|
175
|
+
children: [se, e]
|
|
174
176
|
})
|
|
175
177
|
});
|
|
176
|
-
return
|
|
177
|
-
/* @__PURE__ */ t(
|
|
178
|
-
title:
|
|
178
|
+
return r === "compact" || r === "stacked" ? L(/* @__PURE__ */ u(z, { children: [
|
|
179
|
+
/* @__PURE__ */ t(H, {
|
|
180
|
+
title: l,
|
|
179
181
|
helperText: A,
|
|
180
|
-
titleMeasureRef:
|
|
182
|
+
titleMeasureRef: N
|
|
181
183
|
}),
|
|
182
|
-
/* @__PURE__ */ t(
|
|
184
|
+
/* @__PURE__ */ t(Q, {
|
|
183
185
|
variant: "utility-row",
|
|
184
|
-
beforeFilterActionsPlan:
|
|
185
|
-
filter:
|
|
186
|
-
search:
|
|
187
|
-
afterSearchActionsPlan:
|
|
188
|
-
showPageActions:
|
|
186
|
+
beforeFilterActionsPlan: K,
|
|
187
|
+
filter: E,
|
|
188
|
+
search: c,
|
|
189
|
+
afterSearchActionsPlan: D,
|
|
190
|
+
showPageActions: O,
|
|
189
191
|
overflowMenuLabel: b.more,
|
|
190
|
-
align:
|
|
192
|
+
align: r === "compact" ? "start" : "end"
|
|
191
193
|
}),
|
|
192
|
-
|
|
193
|
-
] }),
|
|
194
|
+
m && X
|
|
195
|
+
] }), r) : r === "selection-split" ? L(/* @__PURE__ */ u(z, { children: [/* @__PURE__ */ u("div", {
|
|
194
196
|
className: "flex w-full min-w-0 flex-nowrap items-center justify-between gap-3",
|
|
195
197
|
children: [/* @__PURE__ */ t("div", {
|
|
196
198
|
className: "min-w-0 flex-1 overflow-hidden",
|
|
197
|
-
children: /* @__PURE__ */ t(
|
|
198
|
-
title:
|
|
199
|
+
children: /* @__PURE__ */ t(H, {
|
|
200
|
+
title: l,
|
|
199
201
|
helperText: A,
|
|
200
|
-
titleMeasureRef:
|
|
202
|
+
titleMeasureRef: N
|
|
201
203
|
})
|
|
202
|
-
}), /* @__PURE__ */
|
|
204
|
+
}), /* @__PURE__ */ u("div", {
|
|
203
205
|
className: "flex shrink-0 flex-nowrap items-center gap-2",
|
|
204
|
-
children: [
|
|
205
|
-
search:
|
|
206
|
-
measureRef:
|
|
206
|
+
children: [E, c != null && /* @__PURE__ */ t(we, {
|
|
207
|
+
search: c,
|
|
208
|
+
measureRef: j
|
|
207
209
|
})]
|
|
208
210
|
})]
|
|
209
|
-
}),
|
|
211
|
+
}), X] }), "selection-split") : L(/* @__PURE__ */ u("div", {
|
|
210
212
|
className: "flex w-full min-w-0 flex-col gap-1",
|
|
211
|
-
children: [/* @__PURE__ */
|
|
213
|
+
children: [/* @__PURE__ */ u("div", {
|
|
212
214
|
className: "flex w-full min-w-0 flex-nowrap items-center gap-3",
|
|
213
|
-
children: [/* @__PURE__ */
|
|
215
|
+
children: [/* @__PURE__ */ u("div", {
|
|
214
216
|
className: "flex min-w-0 flex-1 items-center gap-3",
|
|
215
|
-
children: [
|
|
216
|
-
title:
|
|
217
|
-
measureRef:
|
|
218
|
-
}),
|
|
217
|
+
children: [l && /* @__PURE__ */ t(We, {
|
|
218
|
+
title: l,
|
|
219
|
+
measureRef: N
|
|
220
|
+
}), m && /* @__PURE__ */ t(Pe, {
|
|
219
221
|
selectedCount: T,
|
|
220
|
-
onClearSelection:
|
|
222
|
+
onClearSelection: S,
|
|
221
223
|
translations: b
|
|
222
224
|
})]
|
|
223
225
|
}), /* @__PURE__ */ t("div", {
|
|
224
226
|
className: "min-w-0 shrink-0",
|
|
225
|
-
children: /* @__PURE__ */ t(
|
|
226
|
-
variant:
|
|
227
|
-
beforeFilterActionsPlan:
|
|
228
|
-
filter:
|
|
229
|
-
search:
|
|
230
|
-
afterSearchActionsPlan:
|
|
231
|
-
bulkActionsPlan:
|
|
232
|
-
showPageActions:
|
|
227
|
+
children: /* @__PURE__ */ t(Q, {
|
|
228
|
+
variant: m ? "inline-selection" : "inline-normal",
|
|
229
|
+
beforeFilterActionsPlan: K,
|
|
230
|
+
filter: E,
|
|
231
|
+
search: c,
|
|
232
|
+
afterSearchActionsPlan: D,
|
|
233
|
+
bulkActionsPlan: Y,
|
|
234
|
+
showPageActions: O,
|
|
233
235
|
overflowMenuLabel: b.more,
|
|
234
|
-
searchMeasureRef:
|
|
236
|
+
searchMeasureRef: j
|
|
235
237
|
})
|
|
236
238
|
})]
|
|
237
239
|
}), A && /* @__PURE__ */ t("div", {
|
|
@@ -241,5 +243,5 @@ function Xe(B) {
|
|
|
241
243
|
}), "inline");
|
|
242
244
|
}
|
|
243
245
|
export {
|
|
244
|
-
|
|
246
|
+
He as DynamicToolbar
|
|
245
247
|
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { cn as f } from "../../../../helpers/cn.js";
|
|
2
|
-
import { CloseIcon as
|
|
2
|
+
import { CloseIcon as T } from "../../../icons/close-icon/CloseIcon.js";
|
|
3
3
|
import { StyledButton as j } from "../../../inputs/button/StyledButton.js";
|
|
4
|
+
import { StyledWidgetTitle as k } from "../../widget/widget-title/StyledWidgetTitle.js";
|
|
4
5
|
import { ToolbarActionGroup as c, hasPlannedActions as u } from "./ToolbarActionGroup.js";
|
|
5
|
-
import { formatSelectionLabel as
|
|
6
|
+
import { formatSelectionLabel as F } from "./useTranslations.js";
|
|
6
7
|
import { Fragment as o, jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
7
|
-
function
|
|
8
|
+
function b({ selectedCount: e, onClearSelection: i, translations: t }) {
|
|
8
9
|
return /* @__PURE__ */ n("div", {
|
|
9
10
|
className: "flex shrink-0 items-center whitespace-nowrap",
|
|
10
11
|
"aria-live": "polite",
|
|
@@ -14,20 +15,20 @@ function F({ selectedCount: e, onClearSelection: i, translations: t }) {
|
|
|
14
15
|
variant: "text",
|
|
15
16
|
size: "small",
|
|
16
17
|
className: "!min-w-0 !px-1 !font-semibold",
|
|
17
|
-
startIcon: i ? /* @__PURE__ */ n(
|
|
18
|
+
startIcon: i ? /* @__PURE__ */ n(T, {
|
|
18
19
|
width: 20,
|
|
19
20
|
height: 20
|
|
20
21
|
}) : void 0,
|
|
21
22
|
onClick: i,
|
|
22
23
|
"aria-label": t.clearSelection,
|
|
23
|
-
children:
|
|
24
|
+
children: F(e, t)
|
|
24
25
|
})
|
|
25
26
|
});
|
|
26
27
|
}
|
|
27
|
-
function
|
|
28
|
+
function U({ selectedCount: e, onClearSelection: i, translations: t, bulkActionsPlan: l }) {
|
|
28
29
|
return /* @__PURE__ */ r("div", {
|
|
29
30
|
className: "flex w-full min-w-0 flex-nowrap items-center justify-between gap-3",
|
|
30
|
-
children: [/* @__PURE__ */ n(
|
|
31
|
+
children: [/* @__PURE__ */ n(b, {
|
|
31
32
|
selectedCount: e,
|
|
32
33
|
onClearSelection: i,
|
|
33
34
|
translations: t
|
|
@@ -38,10 +39,10 @@ function G({ selectedCount: e, onClearSelection: i, translations: t, bulkActions
|
|
|
38
39
|
})]
|
|
39
40
|
});
|
|
40
41
|
}
|
|
41
|
-
function
|
|
42
|
+
function N({ search: e, expanded: i, measureRef: t }) {
|
|
42
43
|
return /* @__PURE__ */ n("div", {
|
|
43
44
|
ref: i ? void 0 : t,
|
|
44
|
-
className: f("[&_.MuiFormControl-root]:w-full", i ? "min-w-0 flex-1 [&_.MuiFormControl-root]:max-w-none" : "w-
|
|
45
|
+
className: f("[&_.MuiFormControl-root]:w-full", i ? "min-w-0 flex-1 [&_.MuiFormControl-root]:max-w-none" : "w-40 shrink-0"),
|
|
45
46
|
children: e
|
|
46
47
|
});
|
|
47
48
|
}
|
|
@@ -55,17 +56,21 @@ function S({ visible: e, children: i }) {
|
|
|
55
56
|
})
|
|
56
57
|
});
|
|
57
58
|
}
|
|
58
|
-
function
|
|
59
|
-
return /* @__PURE__ */ n(
|
|
59
|
+
function C({ title: e, measureRef: i }) {
|
|
60
|
+
return typeof e == "string" ? /* @__PURE__ */ n(k, {
|
|
61
|
+
ref: i,
|
|
62
|
+
className: "!min-w-0 truncate",
|
|
63
|
+
children: e
|
|
64
|
+
}) : /* @__PURE__ */ n("div", {
|
|
60
65
|
ref: i,
|
|
61
|
-
className: "min-w-0 truncate
|
|
66
|
+
className: "min-w-0 truncate",
|
|
62
67
|
children: e
|
|
63
68
|
});
|
|
64
69
|
}
|
|
65
|
-
function
|
|
70
|
+
function W({ title: e, helperText: i, titleMeasureRef: t }) {
|
|
66
71
|
return !e && !i ? null : /* @__PURE__ */ r("div", {
|
|
67
72
|
className: "min-w-0 max-w-full",
|
|
68
|
-
children: [e && /* @__PURE__ */ n(
|
|
73
|
+
children: [e && /* @__PURE__ */ n(C, {
|
|
69
74
|
title: e,
|
|
70
75
|
measureRef: t
|
|
71
76
|
}), i && /* @__PURE__ */ n("div", {
|
|
@@ -74,10 +79,10 @@ function M({ title: e, helperText: i, titleMeasureRef: t }) {
|
|
|
74
79
|
})]
|
|
75
80
|
});
|
|
76
81
|
}
|
|
77
|
-
function
|
|
78
|
-
const m =
|
|
79
|
-
if (!(t != null || l != null) && !m && !d && !
|
|
80
|
-
const
|
|
82
|
+
function q({ variant: e, beforeFilterActionsPlan: i, filter: t, search: l, afterSearchActionsPlan: p, bulkActionsPlan: a, showPageActions: h, overflowMenuLabel: s, searchMeasureRef: g, align: B = "end" }) {
|
|
83
|
+
const m = h && u(i), d = h && u(p), w = e === "inline-selection" && u(a);
|
|
84
|
+
if (!(t != null || l != null) && !m && !d && !w) return null;
|
|
85
|
+
const x = m ? /* @__PURE__ */ n(S, {
|
|
81
86
|
visible: m,
|
|
82
87
|
children: /* @__PURE__ */ n(c, {
|
|
83
88
|
plan: i,
|
|
@@ -92,26 +97,26 @@ function U({ variant: e, beforeFilterActionsPlan: i, filter: t, search: l, after
|
|
|
92
97
|
overflowMenuLabel: s
|
|
93
98
|
})
|
|
94
99
|
})
|
|
95
|
-
}) : null,
|
|
100
|
+
}) : null, y = /* @__PURE__ */ r(o, { children: [t, l != null && /* @__PURE__ */ n(N, {
|
|
96
101
|
search: l,
|
|
97
|
-
measureRef:
|
|
102
|
+
measureRef: g
|
|
98
103
|
})] });
|
|
99
104
|
return /* @__PURE__ */ r("div", {
|
|
100
|
-
className: f("flex w-full min-w-0 flex-nowrap items-center gap-2",
|
|
105
|
+
className: f("flex w-full min-w-0 flex-nowrap items-center gap-2", B === "end" ? "justify-end" : "justify-start"),
|
|
101
106
|
children: [
|
|
102
|
-
e === "inline-selection" && /* @__PURE__ */ r(o, { children: [
|
|
107
|
+
e === "inline-selection" && /* @__PURE__ */ r(o, { children: [w && a && /* @__PURE__ */ n(c, {
|
|
103
108
|
plan: a,
|
|
104
109
|
overflowMenuLabel: s,
|
|
105
110
|
selectionTone: !0
|
|
106
|
-
}),
|
|
111
|
+
}), y] }),
|
|
107
112
|
e === "inline-normal" && /* @__PURE__ */ r(o, { children: [
|
|
108
|
-
|
|
109
|
-
|
|
113
|
+
x,
|
|
114
|
+
y,
|
|
110
115
|
v
|
|
111
116
|
] }),
|
|
112
117
|
e === "utility-row" && /* @__PURE__ */ r(o, { children: [
|
|
113
|
-
|
|
114
|
-
l != null && /* @__PURE__ */ n(
|
|
118
|
+
x,
|
|
119
|
+
l != null && /* @__PURE__ */ n(N, {
|
|
115
120
|
search: l,
|
|
116
121
|
expanded: !0
|
|
117
122
|
}),
|
|
@@ -122,10 +127,10 @@ function U({ variant: e, beforeFilterActionsPlan: i, filter: t, search: l, after
|
|
|
122
127
|
});
|
|
123
128
|
}
|
|
124
129
|
export {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
130
|
+
N as SearchSlot,
|
|
131
|
+
b as SelectionIndicator,
|
|
132
|
+
U as SelectionRow,
|
|
133
|
+
W as TitleBlock,
|
|
134
|
+
C as TitleText,
|
|
135
|
+
q as UtilityCluster
|
|
131
136
|
};
|