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,52 +1,54 @@
|
|
|
1
|
-
import { resolveToolbarActionWidth as
|
|
2
|
-
var l = 8,
|
|
3
|
-
function
|
|
1
|
+
import { resolveToolbarActionWidth as C } from "./planToolbarActions.js";
|
|
2
|
+
var l = 8, g = 12, G = 160, H = 44, Y = 92, D = 44, V = 148, J = 44, K = 168, j = 9, q = 56, E = 360, z = 12;
|
|
3
|
+
function L(t) {
|
|
4
4
|
return {
|
|
5
|
-
leading: t?.leadingUtilityWidthPx ??
|
|
6
|
-
search: t?.searchWidthPx ??
|
|
7
|
-
selectionIndicator: t?.selectionIndicatorWidthPx ??
|
|
8
|
-
filter: (i) => i ? t?.filterIconWidthPx ??
|
|
9
|
-
trailing: (i) => i ? t?.trailingIconWidthPx ??
|
|
5
|
+
leading: t?.leadingUtilityWidthPx ?? H,
|
|
6
|
+
search: t?.searchWidthPx ?? G,
|
|
7
|
+
selectionIndicator: t?.selectionIndicatorWidthPx ?? K,
|
|
8
|
+
filter: (i) => i ? t?.filterIconWidthPx ?? D : t?.filterLabelWidthPx ?? Y,
|
|
9
|
+
trailing: (i) => i ? t?.trailingIconWidthPx ?? J : t?.trailingLabelWidthPx ?? V
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
|
-
function
|
|
13
|
-
return t ? typeof t == "string" ? t.length :
|
|
12
|
+
function Q(t) {
|
|
13
|
+
return t ? typeof t == "string" ? t.length : z : 0;
|
|
14
14
|
}
|
|
15
|
-
function
|
|
16
|
-
const i =
|
|
17
|
-
|
|
15
|
+
function k(t) {
|
|
16
|
+
const i = Q(t);
|
|
17
|
+
if (i === 0) return 0;
|
|
18
|
+
const e = i > 0 ? i * j + 24 : 0;
|
|
19
|
+
return Math.min(E, Math.max(q, e));
|
|
18
20
|
}
|
|
19
|
-
function
|
|
20
|
-
return i != null && i > 0 ? Math.min(
|
|
21
|
+
function Z(t, i) {
|
|
22
|
+
return typeof t == "string" ? k(t) : i != null && i > 0 ? Math.min(E, i) : k(t);
|
|
21
23
|
}
|
|
22
|
-
function
|
|
24
|
+
function T(t, i, e) {
|
|
23
25
|
const n = t.filter((r) => !r.hidden);
|
|
24
|
-
return n.length ? n.reduce((r, c) => r +
|
|
26
|
+
return n.length ? n.reduce((r, c) => r + C(c, i, e) + l, 0) - l : 0;
|
|
25
27
|
}
|
|
26
|
-
function
|
|
28
|
+
function F(t, i, e) {
|
|
27
29
|
const n = t.filter((s) => !s.hidden).sort((s, u) => (u.priority ?? 0) - (s.priority ?? 0));
|
|
28
30
|
if (!n.length) return 0;
|
|
29
|
-
const r = n.slice(0, i), c =
|
|
31
|
+
const r = n.slice(0, i), c = T(r, !0, e);
|
|
30
32
|
return n.length === r.length ? c : c + (r.length ? l : 0) + 40;
|
|
31
33
|
}
|
|
32
|
-
function
|
|
33
|
-
return t > 0 ? t :
|
|
34
|
+
function it(t, i, e, n = 3) {
|
|
35
|
+
return t > 0 ? t : F(i, n, e);
|
|
34
36
|
}
|
|
35
|
-
function
|
|
36
|
-
const { hasLeadingUtility: i, hasFilter: e, hasSearch: n, hasTrailingUtility: r, showPageActions: c, showBulkActions: s, filterIconOnly: u, trailingIconOnly: h, pageActionsWidthPx: I, bulkActionsWidthPx: O, searchBeforeFilter: W = !1, measured:
|
|
37
|
+
function B(t) {
|
|
38
|
+
const { hasLeadingUtility: i, hasFilter: e, hasSearch: n, hasTrailingUtility: r, showPageActions: c, showBulkActions: s, filterIconOnly: u, trailingIconOnly: h, pageActionsWidthPx: I, bulkActionsWidthPx: O, searchBeforeFilter: W = !1, measured: y } = t, d = L(y);
|
|
37
39
|
let o = 0;
|
|
38
40
|
c && i && (o += d.leading + l);
|
|
39
41
|
const f = e ? d.filter(u) + l : 0, p = n ? d.search + l : 0;
|
|
40
42
|
return W ? o += p + f : o += f + p, c && (I > 0 && (o += I + l), r && (o += d.trailing(h) + l)), s && O > 0 && (o += O + l), Math.max(0, o - l);
|
|
41
43
|
}
|
|
42
|
-
function
|
|
43
|
-
const { containerWidth: i, isMobile: e, isSelectionMode: n, compactBreakpointPx: r, reserveBulkActionsWidthPx: c, title: s, hasLeadingUtility: u, hasFilter: h, hasSearch: I, hasTrailingUtility: O, pageActions: W, bulkActions:
|
|
44
|
+
function nt(t) {
|
|
45
|
+
const { containerWidth: i, isMobile: e, isSelectionMode: n, compactBreakpointPx: r, reserveBulkActionsWidthPx: c, title: s, hasLeadingUtility: u, hasFilter: h, hasSearch: I, hasTrailingUtility: O, pageActions: W, bulkActions: y, maxVisibleBulkActions: d = 2, measured: o } = t, f = i > 0 ? i : Number.POSITIVE_INFINITY, p = !n, M = n, N = n ? 0 : c, v = L(o), _ = Z(s, o?.titleWidthPx), P = T(W, !0, o?.actionWidthPx), b = T(W, !1, o?.actionWidthPx), S = F(y, d, o?.actionWidthPx), A = (a) => B({
|
|
44
46
|
hasLeadingUtility: u,
|
|
45
47
|
hasFilter: h,
|
|
46
48
|
hasSearch: I,
|
|
47
49
|
hasTrailingUtility: O,
|
|
48
50
|
showPageActions: p,
|
|
49
|
-
showBulkActions:
|
|
51
|
+
showBulkActions: M,
|
|
50
52
|
bulkActionsWidthPx: 0,
|
|
51
53
|
measured: o,
|
|
52
54
|
...a
|
|
@@ -55,7 +57,7 @@ function it(t) {
|
|
|
55
57
|
const a = (x) => f >= A({
|
|
56
58
|
...x,
|
|
57
59
|
searchBeforeFilter: !0
|
|
58
|
-
}),
|
|
60
|
+
}), m = (x) => n ? !0 : x;
|
|
59
61
|
return a({
|
|
60
62
|
filterIconOnly: !1,
|
|
61
63
|
trailingIconOnly: !1,
|
|
@@ -63,7 +65,7 @@ function it(t) {
|
|
|
63
65
|
}) ? {
|
|
64
66
|
mode: "compact",
|
|
65
67
|
filterIconOnly: !1,
|
|
66
|
-
trailingIconOnly:
|
|
68
|
+
trailingIconOnly: m(!1)
|
|
67
69
|
} : a({
|
|
68
70
|
filterIconOnly: !1,
|
|
69
71
|
trailingIconOnly: !0,
|
|
@@ -75,7 +77,7 @@ function it(t) {
|
|
|
75
77
|
} : a({
|
|
76
78
|
filterIconOnly: !1,
|
|
77
79
|
trailingIconOnly: !0,
|
|
78
|
-
pageActionsWidthPx:
|
|
80
|
+
pageActionsWidthPx: b
|
|
79
81
|
}) ? {
|
|
80
82
|
mode: "compact",
|
|
81
83
|
filterIconOnly: !1,
|
|
@@ -87,33 +89,33 @@ function it(t) {
|
|
|
87
89
|
};
|
|
88
90
|
}
|
|
89
91
|
if (n) {
|
|
90
|
-
const a = (
|
|
92
|
+
const a = (w) => B({
|
|
91
93
|
hasLeadingUtility: !1,
|
|
92
94
|
hasFilter: h,
|
|
93
95
|
hasSearch: I,
|
|
94
96
|
hasTrailingUtility: !1,
|
|
95
97
|
showPageActions: !1,
|
|
96
98
|
showBulkActions: !1,
|
|
97
|
-
filterIconOnly:
|
|
99
|
+
filterIconOnly: w,
|
|
98
100
|
trailingIconOnly: !0,
|
|
99
101
|
pageActionsWidthPx: 0,
|
|
100
102
|
bulkActionsWidthPx: 0,
|
|
101
103
|
measured: o
|
|
102
|
-
});
|
|
103
|
-
if (f >= _ +
|
|
104
|
+
}), m = s ? g : 0;
|
|
105
|
+
if (f >= _ + v.selectionIndicator + m + A({
|
|
104
106
|
filterIconOnly: !1,
|
|
105
107
|
trailingIconOnly: !0,
|
|
106
108
|
pageActionsWidthPx: 0,
|
|
107
|
-
bulkActionsWidthPx:
|
|
108
|
-
}) +
|
|
109
|
+
bulkActionsWidthPx: S
|
|
110
|
+
}) + g) return {
|
|
109
111
|
mode: "inline",
|
|
110
112
|
filterIconOnly: !1,
|
|
111
113
|
trailingIconOnly: !0
|
|
112
114
|
};
|
|
113
|
-
const
|
|
114
|
-
return f >= Math.max(
|
|
115
|
+
const x = _ + a(!1) + g, U = v.selectionIndicator + S + g;
|
|
116
|
+
return f >= Math.max(x, U) ? {
|
|
115
117
|
mode: "selection-split",
|
|
116
|
-
filterIconOnly: f < _ + a(!0) +
|
|
118
|
+
filterIconOnly: f < _ + a(!0) + g,
|
|
117
119
|
trailingIconOnly: !0
|
|
118
120
|
} : {
|
|
119
121
|
mode: "compact",
|
|
@@ -121,7 +123,7 @@ function it(t) {
|
|
|
121
123
|
trailingIconOnly: !0
|
|
122
124
|
};
|
|
123
125
|
}
|
|
124
|
-
const
|
|
126
|
+
const X = (a) => f >= _ + A(a) + N + g, R = [
|
|
125
127
|
{
|
|
126
128
|
filterIconOnly: !1,
|
|
127
129
|
trailingIconOnly: !1,
|
|
@@ -132,18 +134,13 @@ function it(t) {
|
|
|
132
134
|
trailingIconOnly: !0,
|
|
133
135
|
pageActionsWidthPx: P
|
|
134
136
|
},
|
|
135
|
-
{
|
|
136
|
-
filterIconOnly: !1,
|
|
137
|
-
trailingIconOnly: !0,
|
|
138
|
-
pageActionsWidthPx: L
|
|
139
|
-
},
|
|
140
137
|
{
|
|
141
138
|
filterIconOnly: !0,
|
|
142
139
|
trailingIconOnly: !0,
|
|
143
|
-
pageActionsWidthPx:
|
|
140
|
+
pageActionsWidthPx: P
|
|
144
141
|
}
|
|
145
142
|
];
|
|
146
|
-
for (const a of
|
|
143
|
+
for (const a of R) if (X(a)) return {
|
|
147
144
|
mode: "inline",
|
|
148
145
|
filterIconOnly: a.filterIconOnly,
|
|
149
146
|
trailingIconOnly: a.trailingIconOnly
|
|
@@ -160,7 +157,7 @@ function it(t) {
|
|
|
160
157
|
} : f >= A({
|
|
161
158
|
filterIconOnly: !0,
|
|
162
159
|
trailingIconOnly: !0,
|
|
163
|
-
pageActionsWidthPx:
|
|
160
|
+
pageActionsWidthPx: b,
|
|
164
161
|
searchBeforeFilter: !0
|
|
165
162
|
}) ? {
|
|
166
163
|
mode: "stacked",
|
|
@@ -172,18 +169,18 @@ function it(t) {
|
|
|
172
169
|
trailingIconOnly: !0
|
|
173
170
|
};
|
|
174
171
|
}
|
|
175
|
-
function nt(t) {
|
|
176
|
-
const { layoutMode: i, containerWidth: e, titleWidth: n, filterIconOnly: r, trailingIconOnly: c, hasFilter: s, hasSearch: u, hasLeadingUtility: h, hasTrailingUtility: I, reserveBulkActionsWidthPx: O, measured: W } = t, g = m(W), d = (h ? g.leading + l : 0) + (s ? g.filter(r) + l : 0) + (u ? g.search + l : 0) + (I ? g.trailing(c) + l : 0);
|
|
177
|
-
return i === "stacked" || i === "compact" ? Math.max(80, e - d) : Math.max(80, e - n - d - y - O);
|
|
178
|
-
}
|
|
179
172
|
function et(t) {
|
|
180
|
-
const { layoutMode: i, containerWidth: e, titleWidth: n, filterIconOnly: r,
|
|
181
|
-
return i === "
|
|
173
|
+
const { layoutMode: i, containerWidth: e, titleWidth: n, filterIconOnly: r, trailingIconOnly: c, hasFilter: s, hasSearch: u, hasLeadingUtility: h, hasTrailingUtility: I, reserveBulkActionsWidthPx: O, measured: W } = t, y = L(W), d = (h ? y.leading + l : 0) + (s ? y.filter(r) + l : 0) + (u ? y.search + l : 0) + (I ? y.trailing(c) + l : 0);
|
|
174
|
+
return i === "stacked" || i === "compact" ? Math.max(80, e - d) : Math.max(80, e - n - d - g - O);
|
|
175
|
+
}
|
|
176
|
+
function lt(t) {
|
|
177
|
+
const { layoutMode: i, containerWidth: e, titleWidth: n, filterIconOnly: r, hasFilter: c, hasSearch: s, measured: u } = t, h = L(u), I = (c ? h.filter(r) + l : 0) + (s ? h.search + l : 0);
|
|
178
|
+
return i === "inline" ? Math.max(120, e - n - h.selectionIndicator - I - g * 2) : Math.max(120, e - h.selectionIndicator - g);
|
|
182
179
|
}
|
|
183
180
|
export {
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
181
|
+
lt as resolveBulkActionsAvailableWidth,
|
|
182
|
+
et as resolvePageActionsAvailableWidth,
|
|
183
|
+
it as resolveReserveBulkActionsWidthPx,
|
|
184
|
+
Z as resolveTitleAreaWidth,
|
|
185
|
+
nt as resolveToolbarLayout
|
|
189
186
|
};
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { cn as i } from "../../../../helpers/cn.js";
|
|
2
|
+
import r from "./StyledWidgetTitle.module.js";
|
|
3
|
+
import { forwardRef as d } from "react";
|
|
4
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
5
|
+
var n = d(function(e, t) {
|
|
6
|
+
return /* @__PURE__ */ l("div", {
|
|
7
|
+
ref: t,
|
|
8
|
+
className: i(r["styled-widget-title"], e.className),
|
|
6
9
|
children: e.children
|
|
7
10
|
});
|
|
8
|
-
};
|
|
11
|
+
});
|
|
9
12
|
export {
|
|
10
|
-
|
|
13
|
+
n as StyledWidgetTitle
|
|
11
14
|
};
|
|
@@ -1,34 +1,37 @@
|
|
|
1
1
|
import { CloseIcon as m } from "../../icons/close-icon/CloseIcon.js";
|
|
2
2
|
import { ErrorOutlineIcon as b } from "../../icons/error-outline-icon/ErrorOutlineIcon.js";
|
|
3
3
|
import { TextField as M } from "@mui/material";
|
|
4
|
-
import { jsx as
|
|
5
|
-
var
|
|
4
|
+
import { jsx as r, jsxs as f } from "react/jsx-runtime";
|
|
5
|
+
var x = ({ allowClear: u, onClear: s, readOnly: t, disabled: d, error: e, helperText: a, dataTest: p, slotProps: i, ...o }) => {
|
|
6
6
|
const c = (d ?? !1) || (t ?? !1), l = i?.input;
|
|
7
|
-
return /* @__PURE__ */
|
|
8
|
-
...
|
|
7
|
+
return /* @__PURE__ */ r(M, {
|
|
8
|
+
...o,
|
|
9
9
|
"data-testid": p,
|
|
10
10
|
disabled: c,
|
|
11
11
|
error: e,
|
|
12
12
|
helperText: t ? null : e ? /* @__PURE__ */ f("span", {
|
|
13
|
-
className: "
|
|
14
|
-
children: [/* @__PURE__ */
|
|
13
|
+
className: "flex items-start gap-1",
|
|
14
|
+
children: [/* @__PURE__ */ r(b, {
|
|
15
15
|
width: 20,
|
|
16
16
|
height: 20,
|
|
17
|
-
className: "min-w-5"
|
|
18
|
-
}),
|
|
17
|
+
className: "min-w-5 shrink-0 translate-y-[2px]"
|
|
18
|
+
}), /* @__PURE__ */ r("span", {
|
|
19
|
+
className: "min-w-0 flex-1",
|
|
20
|
+
children: a ?? "Required"
|
|
21
|
+
})]
|
|
19
22
|
}) : a,
|
|
20
|
-
type:
|
|
23
|
+
type: o.type ?? "mui-input",
|
|
21
24
|
slotProps: {
|
|
22
25
|
...i,
|
|
23
26
|
input: {
|
|
24
27
|
...l,
|
|
25
|
-
endAdornment: u &&
|
|
28
|
+
endAdornment: u && o.value ? /* @__PURE__ */ r("div", {
|
|
26
29
|
role: "button",
|
|
27
30
|
className: "absolute right-4 z-40 flex items-center justify-center rounded-full p-[2px] duration-300 hover:bg-gama-100",
|
|
28
31
|
onClick: (n) => {
|
|
29
32
|
n.stopPropagation(), n.preventDefault(), s?.();
|
|
30
33
|
},
|
|
31
|
-
children: /* @__PURE__ */
|
|
34
|
+
children: /* @__PURE__ */ r(m, {
|
|
32
35
|
width: 18,
|
|
33
36
|
height: 18
|
|
34
37
|
})
|
|
@@ -52,7 +55,11 @@ var y = ({ allowClear: u, onClear: s, readOnly: t, disabled: d, error: e, helper
|
|
|
52
55
|
"& .MuiInputBase-colorPrimary.Mui-error:hover fieldset": { borderColor: "var(--colors-error-500) !important" },
|
|
53
56
|
"& .MuiFormHelperText-root": {
|
|
54
57
|
fontSize: "14px",
|
|
55
|
-
|
|
58
|
+
lineHeight: "24px",
|
|
59
|
+
minHeight: "24px",
|
|
60
|
+
marginLeft: 0,
|
|
61
|
+
whiteSpace: "normal",
|
|
62
|
+
wordBreak: "break-word"
|
|
56
63
|
},
|
|
57
64
|
"& .MuiFormHelperText-root.Mui-error": { color: "var(--colors-error-500) !important" },
|
|
58
65
|
"& .MuiInputBase-colorPrimary.Mui-disabled fieldset": { borderColor: "var(--colors-delta-300) !important" },
|
|
@@ -74,10 +81,10 @@ var y = ({ allowClear: u, onClear: s, readOnly: t, disabled: d, error: e, helper
|
|
|
74
81
|
"& .MuiInputBase-colorPrimary.Mui-disabled fieldset": { borderColor: "var(--colors-delta-200) !important" },
|
|
75
82
|
"& label.Mui-disabled": { color: "var(--colors-gray-800) !important" }
|
|
76
83
|
},
|
|
77
|
-
...
|
|
84
|
+
...o.sx
|
|
78
85
|
}
|
|
79
86
|
});
|
|
80
87
|
};
|
|
81
88
|
export {
|
|
82
|
-
|
|
89
|
+
x as StyledInputField
|
|
83
90
|
};
|
|
@@ -3,6 +3,7 @@ import { jsx as a } from "react/jsx-runtime";
|
|
|
3
3
|
var i = (r) => /* @__PURE__ */ a(o, {
|
|
4
4
|
...r,
|
|
5
5
|
sx: {
|
|
6
|
+
textTransform: "capitalize",
|
|
6
7
|
letterSpacing: "normal",
|
|
7
8
|
"&.MuiTab-textColorPrimary.Mui-selected": { color: "var(--colors-gama-500)" },
|
|
8
9
|
"&.MuiTab-textColorPrimary": { color: "var(--colors-gray-600)" },
|
|
@@ -1 +1,5 @@
|
|
|
1
|
-
export declare const StyledWidgetTitle:
|
|
1
|
+
export declare const StyledWidgetTitle: import('node_modules/@types/react').ForwardRefExoticComponent<{
|
|
2
|
+
className?: string;
|
|
3
|
+
} & {
|
|
4
|
+
children?: import('node_modules/@types/react').ReactNode | undefined;
|
|
5
|
+
} & import('node_modules/@types/react').RefAttributes<HTMLDivElement>>;
|