asma-ui-core 3.28.0 → 3.30.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,52 +1,54 @@
1
- import { resolveToolbarActionWidth as U } from "./planToolbarActions.js";
2
- var l = 8, y = 12, w = 168, C = 44, G = 92, H = 44, Y = 148, D = 44, V = 168, J = 11, K = 96, B = 360, j = 12;
3
- function m(t) {
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 ?? C,
6
- search: t?.searchWidthPx ?? w,
7
- selectionIndicator: t?.selectionIndicatorWidthPx ?? V,
8
- filter: (i) => i ? t?.filterIconWidthPx ?? H : t?.filterLabelWidthPx ?? G,
9
- trailing: (i) => i ? t?.trailingIconWidthPx ?? D : t?.trailingLabelWidthPx ?? Y
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 q(t) {
13
- return t ? typeof t == "string" ? t.length : j : 0;
12
+ function Q(t) {
13
+ return t ? typeof t == "string" ? t.length : z : 0;
14
14
  }
15
- function z(t) {
16
- const i = q(t), e = i > 0 ? i * J + 24 : 0;
17
- return Math.min(B, Math.max(K, e));
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 Q(t, i) {
20
- return i != null && i > 0 ? Math.min(B, i) : z(t);
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 v(t, i, e) {
24
+ function T(t, i, e) {
23
25
  const n = t.filter((r) => !r.hidden);
24
- return n.length ? n.reduce((r, c) => r + U(c, i, e) + l, 0) - l : 0;
26
+ return n.length ? n.reduce((r, c) => r + C(c, i, e) + l, 0) - l : 0;
25
27
  }
26
- function E(t, i, e) {
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 = v(r, !0, e);
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 tt(t, i, e, n = 3) {
33
- return t > 0 ? t : E(i, n, e);
34
+ function it(t, i, e, n = 3) {
35
+ return t > 0 ? t : F(i, n, e);
34
36
  }
35
- function S(t) {
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: g } = t, d = m(g);
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 it(t) {
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: g, maxVisibleBulkActions: d = 2, measured: o } = t, f = i > 0 ? i : Number.POSITIVE_INFINITY, p = !n, F = n, M = n ? 0 : c, b = m(o), _ = Q(s, o?.titleWidthPx), P = v(W, !0, o?.actionWidthPx), L = v(W, !1, o?.actionWidthPx), k = E(g, d, o?.actionWidthPx), A = (a) => S({
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: F,
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
- }), T = (x) => n ? !0 : x;
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: T(!1)
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: L
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 = (R) => S({
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: R,
99
+ filterIconOnly: w,
98
100
  trailingIconOnly: !0,
99
101
  pageActionsWidthPx: 0,
100
102
  bulkActionsWidthPx: 0,
101
103
  measured: o
102
- });
103
- if (f >= _ + b.selectionIndicator + A({
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: k
108
- }) + y) return {
109
+ bulkActionsWidthPx: S
110
+ }) + g) return {
109
111
  mode: "inline",
110
112
  filterIconOnly: !1,
111
113
  trailingIconOnly: !0
112
114
  };
113
- const T = _ + a(!1) + y, x = b.selectionIndicator + k + y;
114
- return f >= Math.max(T, x) ? {
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) + y,
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 N = (a) => f >= _ + A(a) + M + y, X = [
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: L
140
+ pageActionsWidthPx: P
144
141
  }
145
142
  ];
146
- for (const a of X) if (N(a)) return {
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: L,
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, hasFilter: c, hasSearch: s, measured: u } = t, h = m(u), I = (c ? h.filter(r) + l : 0) + (s ? h.search + l : 0);
181
- return i === "inline" ? Math.max(120, e - n - h.selectionIndicator - I - y * 2) : Math.max(120, e - h.selectionIndicator - y);
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
- et as resolveBulkActionsAvailableWidth,
185
- nt as resolvePageActionsAvailableWidth,
186
- tt as resolveReserveBulkActionsWidthPx,
187
- Q as resolveTitleAreaWidth,
188
- it as resolveToolbarLayout
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 t from "./StyledWidgetTitle.module.js";
2
- import { jsx as i } from "react/jsx-runtime";
3
- var o = function(e) {
4
- return /* @__PURE__ */ i("div", {
5
- className: t["styled-widget-title"],
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
- o as StyledWidgetTitle
13
+ n as StyledWidgetTitle
11
14
  };
@@ -1,20 +1,41 @@
1
- import { getSvgIconStyle as l } from "../iconStyle.js";
2
- import { jsx as c } from "react/jsx-runtime";
3
- var m = ({ width: h = 20, height: r = 20, className: e = "", onClick: s, color: v }) => /* @__PURE__ */ c("svg", {
4
- xmlns: "http://www.w3.org/2000/svg",
5
- width: h,
6
- height: r,
7
- viewBox: "0 0 512 512",
8
- className: e,
9
- onClick: s,
10
- style: l(v, !1),
11
- "aria-hidden": "true",
12
- focusable: "false",
13
- children: /* @__PURE__ */ c("path", {
14
- fill: "currentColor",
15
- d: "M64 464h48v48H64c-35.3 0-64-28.7-64-64V64C0 28.7 28.7 0 64 0h165.5c17 0 33.3 6.7 45.3 18.7l90.5 90.5c12 12 18.7 28.3 18.7 45.3V304h-48V160h-80c-17.7 0-32-14.3-32-32V48H64c-8.8 0-16 7.2-16 16v384c0 8.8 7.2 16 16 16m112-112h32c30.9 0 56 25.1 56 56s-25.1 56-56 56h-16v32c0 8.8-7.2 16-16 16s-16-7.2-16-16V368c0-8.8 7.2-16 16-16m32 80c13.3 0 24-10.7 24-24s-10.7-24-24-24h-16v48zm96-80h32c26.5 0 48 21.5 48 48v64c0 26.5-21.5 48-48 48h-32c-8.8 0-16-7.2-16-16V368c0-8.8 7.2-16 16-16m32 128c8.8 0 16-7.2 16-16v-64c0-8.8-7.2-16-16-16h-16v96zm80-112c0-8.8 7.2-16 16-16h48c8.8 0 16 7.2 16 16s-7.2 16-16 16h-32v32h32c8.8 0 16 7.2 16 16s-7.2 16-16 16h-32v48c0 8.8-7.2 16-16 16s-16-7.2-16-16z"
16
- })
17
- });
1
+ import { jsx as C, jsxs as r } from "react/jsx-runtime";
2
+ function o(l) {
3
+ return /* @__PURE__ */ r("svg", {
4
+ xmlns: "http://www.w3.org/2000/svg",
5
+ width: "1em",
6
+ height: "1em",
7
+ viewBox: "0 0 24 24",
8
+ color: "var(--colors-error-500)",
9
+ fill: "none",
10
+ ...l,
11
+ children: [
12
+ /* @__PURE__ */ C("path", {
13
+ d: "M6 22C5.45 22 4.97917 21.8042 4.5875 21.4125C4.19583 21.0208 4 20.55 4 20V19H6V20H18V19H20V20C20 20.55 19.8042 21.0208 19.4125 21.4125C19.0208 21.8042 18.55 22 18 22H6Z",
14
+ fill: "currentColor"
15
+ }),
16
+ /* @__PURE__ */ C("path", {
17
+ d: "M4 4V9H6V4H13V9H20V8L14 2H6C5.45 2 4.97917 2.19583 4.5875 2.5875C4.19583 2.97917 4 3.45 4 4Z",
18
+ fill: "currentColor"
19
+ }),
20
+ /* @__PURE__ */ C("path", {
21
+ fillRule: "evenodd",
22
+ clipRule: "evenodd",
23
+ d: "M6.52246 15.1748H5.43262V17.3984H4V11H6.52246C7.03223 11 7.46875 11.0923 7.83203 11.2769C8.19824 11.4614 8.47803 11.7148 8.67139 12.0371C8.86768 12.3564 8.96582 12.7227 8.96582 13.1357C8.96582 13.5488 8.86768 13.9077 8.67139 14.2124C8.47803 14.5171 8.19824 14.7544 7.83203 14.9243C7.46875 15.0913 7.03223 15.1748 6.52246 15.1748ZM5.43262 12.1118V14.063H6.52246C6.75977 14.063 6.9502 14.0234 7.09375 13.9443C7.24023 13.8652 7.34717 13.7568 7.41455 13.6191C7.48486 13.4785 7.52002 13.3203 7.52002 13.1445C7.52002 12.9629 7.48486 12.7944 7.41455 12.6392C7.34717 12.481 7.24023 12.3535 7.09375 12.2568C6.9502 12.1602 6.75977 12.1118 6.52246 12.1118H5.43262Z",
24
+ fill: "currentColor"
25
+ }),
26
+ /* @__PURE__ */ C("path", {
27
+ fillRule: "evenodd",
28
+ clipRule: "evenodd",
29
+ d: "M12.0418 17.3984H10.0159V11H12.033C12.4666 11 12.8621 11.0732 13.2196 11.2197C13.5799 11.3662 13.8904 11.5757 14.1512 11.8481C14.4149 12.1206 14.6185 12.4429 14.762 12.8149C14.9056 13.187 14.9774 13.6016 14.9774 14.0586V14.3442C14.9774 14.7983 14.9056 15.2129 14.762 15.5879C14.6185 15.96 14.4149 16.2822 14.1512 16.5547C13.8904 16.8242 13.5814 17.0322 13.2239 17.1787C12.8665 17.3252 12.4725 17.3984 12.0418 17.3984ZM12.0418 16.291H11.4486V12.1118H12.033C12.2733 12.1118 12.4857 12.1528 12.6702 12.2349C12.8577 12.3169 13.0145 12.4399 13.1404 12.604C13.2664 12.7681 13.3616 12.9717 13.4261 13.2148C13.4905 13.4551 13.5228 13.7334 13.5228 14.0498V14.3442C13.5228 14.7632 13.4656 15.1191 13.3514 15.4121C13.2371 15.7021 13.0701 15.9219 12.8504 16.0713C12.6307 16.2178 12.3612 16.291 12.0418 16.291Z",
30
+ fill: "currentColor"
31
+ }),
32
+ /* @__PURE__ */ C("path", {
33
+ d: "M17.4645 13.6982V12.1118H20.2638V11H16.0319V17.3984H17.4645V14.8057H19.9826V13.6982H17.4645Z",
34
+ fill: "currentColor"
35
+ })
36
+ ]
37
+ });
38
+ }
18
39
  export {
19
- m as FilePdfIcon
40
+ o as FilePdfIcon
20
41
  };
@@ -1 +1,5 @@
1
- export declare const StyledWidgetTitle: React.FC<React.PropsWithChildren>;
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>>;
@@ -1,2 +1,2 @@
1
- import { IIcon } from '../Icons.types';
2
- export declare const FilePdfIcon: React.FC<IIcon>;
1
+ import { SVGProps } from 'react';
2
+ export declare function FilePdfIcon(props: SVGProps<SVGSVGElement>): JSX.Element;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "3.28.0",
6
+ "version": "3.30.0",
7
7
  "type": "module",
8
8
  "sideEffects": [
9
9
  "**/*.css",