asma-ui-core 3.135.1 → 3.135.3
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/widget/widget/StyledWidget.js +30 -31
- package/dist/components/feedback/dialog/StyledDialog.js +1 -1
- package/dist/components/feedback/dialog/StyledDialogContent.js +7 -6
- package/dist/components/feedback/dialog/dialogHeaderStyles.js +1 -1
- package/dist/src/components/feedback/dialog/StyledDialog.d.ts +2 -2
- package/dist/src/components/feedback/dialog/dialogHeaderStyles.d.ts +6 -5
- package/package.json +1 -1
|
@@ -1,49 +1,48 @@
|
|
|
1
|
-
import { cn as
|
|
1
|
+
import { cn as o } from "../../../../helpers/cn.js";
|
|
2
2
|
import { StyledButton as N } from "../../../inputs/button/StyledButton.js";
|
|
3
3
|
import b from "../icons/ChevronDownIcon.js";
|
|
4
|
-
import { StyledEmptyPage as
|
|
5
|
-
import { StyledLoading as
|
|
6
|
-
import { StyledLink as
|
|
4
|
+
import { StyledEmptyPage as v } from "../../../feedback/empty-page/StyledEmptyPage.js";
|
|
5
|
+
import { StyledLoading as C } from "../../../feedback/loading/StyledLoading.js";
|
|
6
|
+
import { StyledLink as I } from "../../../navigation/link/StyledLink.js";
|
|
7
7
|
import { StyledWidgetTitle as T } from "../widget-title/StyledWidgetTitle.js";
|
|
8
8
|
import a from "./StyledWidget.module.js";
|
|
9
9
|
import k from "../icons/ChevronUpIcon.js";
|
|
10
10
|
import { useState as L } from "react";
|
|
11
|
-
import { Fragment as R, jsx as e, jsxs as
|
|
12
|
-
var V = ({ children: m, title: c, titleNode: h, icon:
|
|
13
|
-
const [d, w] = L(() =>
|
|
14
|
-
return /* @__PURE__ */
|
|
11
|
+
import { Fragment as R, jsx as e, jsxs as l } from "react/jsx-runtime";
|
|
12
|
+
var V = ({ children: m, title: c, titleNode: h, icon: s, link: i, viewMore: t, persistKey: n, isLoading: g, isEmpty: r, emptyText: f, headerRight: p, headerRightClassName: x }) => {
|
|
13
|
+
const [d, w] = L(() => n ? localStorage.getItem(n) === "true" : !1), u = !!i && !i.hide, S = !!t && !t.hide, y = !!t?.disabled && !d && t?.disabledReason != null;
|
|
14
|
+
return /* @__PURE__ */ l("div", {
|
|
15
15
|
className: `${a["asma-ui-core-styled-widget"]} ${r ? a["empty-state"] : ""}`,
|
|
16
16
|
children: [
|
|
17
|
-
/* @__PURE__ */
|
|
18
|
-
className:
|
|
19
|
-
children: [
|
|
20
|
-
|
|
17
|
+
/* @__PURE__ */ l("div", {
|
|
18
|
+
className: o(a["widget-header-left"], "flex-wrap gap-y-2"),
|
|
19
|
+
children: [/* @__PURE__ */ l("div", {
|
|
20
|
+
className: "flex min-w-0 items-center gap-2.5 max-xs:contents",
|
|
21
|
+
children: [s && /* @__PURE__ */ e("span", {
|
|
21
22
|
className: "flex shrink-0",
|
|
22
|
-
children:
|
|
23
|
-
}),
|
|
24
|
-
h ?? /* @__PURE__ */ e(T, {
|
|
23
|
+
children: s
|
|
24
|
+
}), h ?? /* @__PURE__ */ e(T, {
|
|
25
25
|
className: "min-w-min",
|
|
26
26
|
children: c
|
|
27
|
-
})
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
]
|
|
27
|
+
})]
|
|
28
|
+
}), /* @__PURE__ */ e("div", {
|
|
29
|
+
className: o(a["widget-header-right"], "empty:hidden max-xs:flex-wrap max-xs:gap-y-2", x),
|
|
30
|
+
children: p
|
|
31
|
+
})]
|
|
33
32
|
}),
|
|
34
33
|
/* @__PURE__ */ e("div", {
|
|
35
34
|
className: a["widget-content"],
|
|
36
|
-
children: /* @__PURE__ */
|
|
35
|
+
children: /* @__PURE__ */ l(R, { children: [
|
|
37
36
|
m,
|
|
38
|
-
/* @__PURE__ */ e(
|
|
39
|
-
/* @__PURE__ */ e(
|
|
37
|
+
/* @__PURE__ */ e(C, { isLoading: g }),
|
|
38
|
+
/* @__PURE__ */ e(v, {
|
|
40
39
|
isEmpty: r,
|
|
41
40
|
emptyText: f
|
|
42
41
|
})
|
|
43
42
|
] })
|
|
44
43
|
}),
|
|
45
|
-
S && /* @__PURE__ */
|
|
46
|
-
className:
|
|
44
|
+
S && /* @__PURE__ */ l("div", {
|
|
45
|
+
className: o(a["widget-footer"], "max-xs:flex-wrap max-xs:gap-y-2"),
|
|
47
46
|
children: [y ? /* @__PURE__ */ e("p", {
|
|
48
47
|
className: a["widget-all-shown"],
|
|
49
48
|
"data-testid": "all-items-shown",
|
|
@@ -61,16 +60,16 @@ var V = ({ children: m, title: c, titleNode: h, icon: n, link: l, viewMore: t, p
|
|
|
61
60
|
height: 20
|
|
62
61
|
}),
|
|
63
62
|
onClick: () => {
|
|
64
|
-
w(!d),
|
|
63
|
+
w(!d), n && localStorage.setItem(n, String(!d)), t.onClick?.();
|
|
65
64
|
},
|
|
66
65
|
children: d ? t.viewLessText : t.viewMoreText
|
|
67
|
-
}), u ? /* @__PURE__ */ e(
|
|
66
|
+
}), u ? /* @__PURE__ */ e(I, {
|
|
68
67
|
dataTest: "go-to-button",
|
|
69
68
|
className: a["widget-link"],
|
|
70
69
|
size: "large",
|
|
71
|
-
href:
|
|
72
|
-
onClick:
|
|
73
|
-
content:
|
|
70
|
+
href: i.href,
|
|
71
|
+
onClick: i.onClick,
|
|
72
|
+
content: i.content
|
|
74
73
|
}) : /* @__PURE__ */ e("div", {})]
|
|
75
74
|
})
|
|
76
75
|
]
|
|
@@ -204,7 +204,7 @@ var Te = {
|
|
|
204
204
|
}),
|
|
205
205
|
h && /* @__PURE__ */ o("div", {
|
|
206
206
|
id: p,
|
|
207
|
-
className: "my-0 block min-w-0 whitespace-normal text-[20px] font-bold leading-[26px] text-delta-800 [overflow-wrap:anywhere] hyphens-auto min-[744px]:text-
|
|
207
|
+
className: "my-0 block min-w-0 whitespace-normal text-[20px] font-bold leading-[26px] text-delta-800 [overflow-wrap:anywhere] hyphens-auto min-[744px]:text-2xl min-[744px]:leading-8",
|
|
208
208
|
children: h
|
|
209
209
|
}),
|
|
210
210
|
/* @__PURE__ */ o("div", {
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { resolveSx as d } from "../../../helpers/sx.js";
|
|
2
|
-
import
|
|
3
|
-
import { jsx as
|
|
4
|
-
var p = ({ children: e, className: o, sx: t, style: r, dividers:
|
|
2
|
+
import i from "clsx";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
+
var p = ({ children: e, className: o, sx: t, style: r, dividers: a, classes: m, ...l }) => {
|
|
5
5
|
const s = {
|
|
6
|
+
"--dialog-header-offset": "0px",
|
|
6
7
|
...d(t),
|
|
7
8
|
...r
|
|
8
9
|
};
|
|
9
|
-
return /* @__PURE__ */
|
|
10
|
+
return /* @__PURE__ */ n("div", {
|
|
10
11
|
"data-test": "styled-dialog-content",
|
|
11
12
|
tabIndex: 0,
|
|
12
|
-
className:
|
|
13
|
+
className: i("min-h-0 w-full min-w-0 flex-auto overflow-auto px-6 py-4", a && "border-y border-solid border-[rgba(0,0,0,0.12)]", o),
|
|
13
14
|
style: s,
|
|
14
|
-
...
|
|
15
|
+
...l,
|
|
15
16
|
"data-dialog-content": "",
|
|
16
17
|
children: e
|
|
17
18
|
});
|
|
@@ -3,7 +3,7 @@ var x = "box-border w-full min-w-0 max-w-full shrink-0 bg-white px-4 pb-3 pt-4",
|
|
|
3
3
|
scrollPaddingBottom: l,
|
|
4
4
|
"--dialog-header-offset": `${e}px`,
|
|
5
5
|
"--dialog-footer-offset": `${l}px`
|
|
6
|
-
}), o = "flex min-h-11 w-full min-w-0 items-center justify-between gap-x-2 max-xs:flex-wrap max-xs:gap-y-1", i = "my-0 block min-w-0 whitespace-normal text-[20px] font-bold leading-[26px] text-delta-800 [overflow-wrap:anywhere] hyphens-auto min-[744px]:text-
|
|
6
|
+
}), o = "flex min-h-11 w-full min-w-0 items-center justify-between gap-x-2 max-xs:flex-wrap max-xs:gap-y-1", i = "my-0 block min-w-0 whitespace-normal text-[20px] font-bold leading-[26px] text-delta-800 [overflow-wrap:anywhere] hyphens-auto min-[744px]:text-2xl min-[744px]:leading-8";
|
|
7
7
|
export {
|
|
8
8
|
o as DIALOG_HEADER_ACTIONS_ROW_CLASSES,
|
|
9
9
|
x as DIALOG_HEADER_CLASSES,
|
|
@@ -12,7 +12,7 @@ interface DialogPaperProps {
|
|
|
12
12
|
* @figmaNode wXrXt5uKNNzV2DnQCgyYZH#15820-18954
|
|
13
13
|
* Figma "Dialog": white paper radius 8 with the Dialogue-popup shadow (#22213366, 0 4 40) over a
|
|
14
14
|
* bg/modal #626e7eb2 overlay. Header = actions row (optional label, Helper delta-600, + close button)
|
|
15
|
-
* over the full-width title (ASMA-8737:
|
|
15
|
+
* over the full-width title (ASMA-8737: 24/32 Bold, 20/26 Bold below 744 px, delta-800, never
|
|
16
16
|
* truncated). `fullScreen`/mobile drops the radius and fills the viewport.
|
|
17
17
|
*/
|
|
18
18
|
export interface IStyledDialogProps {
|
|
@@ -64,7 +64,7 @@ export interface IStyledDialogProps {
|
|
|
64
64
|
showCloseIcon?: boolean;
|
|
65
65
|
/** @figmaProp header Label (Helper 14, delta-600) */
|
|
66
66
|
dialogLabel?: ReactNode;
|
|
67
|
-
/** @figmaProp header Title (
|
|
67
|
+
/** @figmaProp header Title (24/32 Bold, 20/26 Bold on mobile, delta-800), on its own full-width row */
|
|
68
68
|
dialogTitle?: ReactNode;
|
|
69
69
|
dialogHeaderNode?: ReactNode;
|
|
70
70
|
/**
|
|
@@ -2,8 +2,8 @@ import { CSSProperties } from 'react';
|
|
|
2
2
|
/**
|
|
3
3
|
* The one dialog header layout (ASMA-8737), shared by `StyledDialog`, `MinimizableDialog` and
|
|
4
4
|
* `MinimizableDialogV2`: the actions row on top, then the title on a row of its own across the full
|
|
5
|
-
* width. Geometry
|
|
6
|
-
*
|
|
5
|
+
* width. Geometry: 44 px actions row, 28 px vertical padding (16 + 12), title lines of 26 px
|
|
6
|
+
* below 744 px wide and 32 px from there up.
|
|
7
7
|
*/
|
|
8
8
|
export declare const DIALOG_HEADER_CLASSES = "box-border w-full min-w-0 max-w-full shrink-0 bg-white px-4 pb-3 pt-4";
|
|
9
9
|
/**
|
|
@@ -33,7 +33,8 @@ export declare const dialogScrollerStyle: (scrollPaddingTop: number, scrollPaddi
|
|
|
33
33
|
/** Label (if any) on the left, the header actions on the right. Wraps rather than overflowing at 320 px. */
|
|
34
34
|
export declare const DIALOG_HEADER_ACTIONS_ROW_CLASSES = "flex min-h-11 w-full min-w-0 items-center justify-between gap-x-2 max-xs:flex-wrap max-xs:gap-y-1";
|
|
35
35
|
/**
|
|
36
|
-
* Title type: 20/26 Bold below 744 px,
|
|
37
|
-
* to as many lines as it needs, breaking an
|
|
36
|
+
* Title type: 20/26 Bold below 744 px, 24/32 Bold from 744 px (the desktop size from before
|
|
37
|
+
* ASMA-8737). Never truncated or clamped: it wraps to as many lines as it needs, breaking an
|
|
38
|
+
* over-long word rather than scrolling sideways (WCAG 1.4.10).
|
|
38
39
|
*/
|
|
39
|
-
export declare const DIALOG_TITLE_CLASSES = "my-0 block min-w-0 whitespace-normal text-[20px] font-bold leading-[26px] text-delta-800 [overflow-wrap:anywhere] hyphens-auto min-[744px]:text-
|
|
40
|
+
export declare const DIALOG_TITLE_CLASSES = "my-0 block min-w-0 whitespace-normal text-[20px] font-bold leading-[26px] text-delta-800 [overflow-wrap:anywhere] hyphens-auto min-[744px]:text-2xl min-[744px]:leading-8";
|