@pismo/marola 1.0.29 → 1.1.1
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/Dialog.module-BlXtafuW.js +28 -0
- package/dist/assets/BankCard.css +1 -1
- package/dist/assets/Button.css +1 -1
- package/dist/assets/Calendar.css +1 -1
- package/dist/assets/Description.css +1 -1
- package/dist/assets/Dialog.css +1 -1
- package/dist/assets/PageHeader.css +1 -1
- package/dist/assets/Pagination.css +1 -1
- package/dist/assets/StepperNavigator.css +1 -1
- package/dist/assets/Tag.css +1 -1
- package/dist/components/BankCard/BankCard.js +57 -57
- package/dist/components/Button/Button.d.ts +9 -1
- package/dist/components/Button/Button.js +80 -56
- package/dist/components/Button/Button.stories.d.ts +13 -5
- package/dist/components/Button/Button.test.d.ts +1 -0
- package/dist/components/Calendar/Calendar.js +19 -19
- package/dist/components/Description/Description.js +37 -37
- package/dist/components/Dialog/Actions.js +1 -1
- package/dist/components/Dialog/Backdrop.js +1 -1
- package/dist/components/Dialog/CloseIconButton.js +1 -1
- package/dist/components/Dialog/Dialog.js +1 -1
- package/dist/components/Dialog/DialogTitle.js +1 -1
- package/dist/components/PageHeader/PageHeader.js +110 -89
- package/dist/components/PageHeader/PageHeader.stories.d.ts +6 -3
- package/dist/components/Pagination/Pagination.js +62 -62
- package/dist/components/StepperNavigator/StepperNavigator.js +79 -72
- package/dist/components/StepperNavigator/StepperNavigator.stories.d.ts +0 -1
- package/dist/components/Tag/Tag.js +54 -54
- package/dist/marola.css +1 -1
- package/package.json +2 -2
- package/dist/Dialog.module-BFRHcF1J.js +0 -28
|
@@ -1,66 +1,90 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { c as
|
|
4
|
-
import { LoadingSpinner as
|
|
5
|
-
import { B as
|
|
6
|
-
import '../../assets/Button.css';const
|
|
7
|
-
"u-typography-h1": "_u-typography-
|
|
8
|
-
"u-typography-h2": "_u-typography-
|
|
9
|
-
"u-typography-h3": "_u-typography-
|
|
10
|
-
"u-typography-h4": "_u-typography-
|
|
11
|
-
"u-typography-h5": "_u-typography-
|
|
12
|
-
"u-typography-h6": "_u-typography-
|
|
13
|
-
"u-typography-base": "_u-typography-
|
|
14
|
-
|
|
15
|
-
"u-typography-base--
|
|
16
|
-
"u-typography-base--
|
|
17
|
-
|
|
18
|
-
"
|
|
19
|
-
"u-typography-base--
|
|
20
|
-
"u-typography-base--
|
|
21
|
-
"u-typography-base--
|
|
22
|
-
"u-typography-base--
|
|
23
|
-
"
|
|
24
|
-
"button--
|
|
25
|
-
"button--
|
|
26
|
-
"
|
|
27
|
-
|
|
1
|
+
import { jsx as _, jsxs as m } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as c, useMemo as f } from "react";
|
|
3
|
+
import { c as k } from "../../clsx-DB4S2d7J.js";
|
|
4
|
+
import { LoadingSpinner as x } from "../LoadingSpinner/LoadingSpinner.js";
|
|
5
|
+
import { B as q } from "../../Button-BAljjMv3.js";
|
|
6
|
+
import '../../assets/Button.css';const B = "_button_1wddv_43", d = {
|
|
7
|
+
"u-typography-h1": "_u-typography-h1_1wddv_1",
|
|
8
|
+
"u-typography-h2": "_u-typography-h2_1wddv_8",
|
|
9
|
+
"u-typography-h3": "_u-typography-h3_1wddv_15",
|
|
10
|
+
"u-typography-h4": "_u-typography-h4_1wddv_22",
|
|
11
|
+
"u-typography-h5": "_u-typography-h5_1wddv_29",
|
|
12
|
+
"u-typography-h6": "_u-typography-h6_1wddv_36",
|
|
13
|
+
"u-typography-base": "_u-typography-base_1wddv_43",
|
|
14
|
+
button: B,
|
|
15
|
+
"u-typography-base--xxl": "_u-typography-base--xxl_1wddv_49",
|
|
16
|
+
"u-typography-base--xl": "_u-typography-base--xl_1wddv_53",
|
|
17
|
+
"u-typography-base--lg": "_u-typography-base--lg_1wddv_57",
|
|
18
|
+
"button--large": "_button--large_1wddv_57",
|
|
19
|
+
"u-typography-base--sm": "_u-typography-base--sm_1wddv_61",
|
|
20
|
+
"u-typography-base--bold": "_u-typography-base--bold_1wddv_65",
|
|
21
|
+
"u-typography-base--strikethrough": "_u-typography-base--strikethrough_1wddv_68",
|
|
22
|
+
"u-typography-base--underlined": "_u-typography-base--underlined_1wddv_71",
|
|
23
|
+
"u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-underlined_1wddv_74",
|
|
24
|
+
"button--small": "_button--small_1wddv_93",
|
|
25
|
+
"button--round": "_button--round_1wddv_96",
|
|
26
|
+
"button--primary": "_button--primary_1wddv_99",
|
|
27
|
+
"button--primary--danger": "_button--primary--danger_1wddv_118",
|
|
28
|
+
"button--default": "_button--default_1wddv_130",
|
|
29
|
+
"button--default--danger": "_button--default--danger_1wddv_151",
|
|
30
|
+
"button--dashed": "_button--dashed_1wddv_163",
|
|
31
|
+
"button--dashed--danger": "_button--dashed--danger_1wddv_184",
|
|
32
|
+
"button--link": "_button--link_1wddv_196",
|
|
33
|
+
"button--link--danger": "_button--link--danger_1wddv_213",
|
|
34
|
+
"button--text": "_button--text_1wddv_223",
|
|
35
|
+
"button--text--danger": "_button--text--danger_1wddv_239",
|
|
36
|
+
"button--secondary": "_button--secondary_1wddv_254",
|
|
37
|
+
"button--quick": "_button--quick_1wddv_271",
|
|
38
|
+
"button__loading-container": "_button__loading-container_1wddv_291"
|
|
39
|
+
}, P = c((e, p) => {
|
|
28
40
|
const {
|
|
29
|
-
onClick:
|
|
30
|
-
link:
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
type: s = "button",
|
|
41
|
+
onClick: s,
|
|
42
|
+
link: y,
|
|
43
|
+
children: o,
|
|
44
|
+
type: b = "button",
|
|
34
45
|
disabled: h,
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
"
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
46
|
+
loading: g,
|
|
47
|
+
className: a,
|
|
48
|
+
size: n = "medium",
|
|
49
|
+
variant: t = "default",
|
|
50
|
+
shape: r = "square",
|
|
51
|
+
danger: u,
|
|
52
|
+
muiButtonBaseProps: i,
|
|
53
|
+
"data-testid": l
|
|
54
|
+
} = e, v = {
|
|
55
|
+
invert: t !== "primary"
|
|
56
|
+
};
|
|
57
|
+
(t === "quick" || t === "secondary") && (r !== "square" || n !== "medium" || u) && console.error("Secondary and Quick variants do not support shape, size or danger props");
|
|
58
|
+
const w = f(
|
|
59
|
+
() => k([
|
|
60
|
+
d.button,
|
|
61
|
+
d[`button--${t}`],
|
|
62
|
+
d[`button--${n}`],
|
|
63
|
+
d[`button--${r}`],
|
|
64
|
+
u && d[`button--${t}--danger`],
|
|
65
|
+
a
|
|
66
|
+
]),
|
|
67
|
+
[a, t]
|
|
44
68
|
);
|
|
45
|
-
return /* @__PURE__ */
|
|
46
|
-
|
|
69
|
+
return /* @__PURE__ */ _(
|
|
70
|
+
q,
|
|
47
71
|
{
|
|
48
|
-
type:
|
|
49
|
-
href:
|
|
50
|
-
onClick:
|
|
72
|
+
type: b,
|
|
73
|
+
href: y,
|
|
74
|
+
onClick: s,
|
|
51
75
|
disabled: h,
|
|
52
|
-
className:
|
|
53
|
-
ref:
|
|
54
|
-
"data-testid":
|
|
55
|
-
...
|
|
56
|
-
children:
|
|
57
|
-
/* @__PURE__ */
|
|
58
|
-
|
|
59
|
-
] }) :
|
|
76
|
+
className: w,
|
|
77
|
+
ref: p,
|
|
78
|
+
"data-testid": l,
|
|
79
|
+
...i ?? {},
|
|
80
|
+
children: g ? /* @__PURE__ */ m("div", { className: d["button__loading-container"], children: [
|
|
81
|
+
/* @__PURE__ */ _(x, { ...v }),
|
|
82
|
+
o
|
|
83
|
+
] }) : o
|
|
60
84
|
}
|
|
61
85
|
);
|
|
62
86
|
});
|
|
63
87
|
export {
|
|
64
|
-
|
|
65
|
-
|
|
88
|
+
P as Button,
|
|
89
|
+
P as default
|
|
66
90
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { ButtonProps } from '../../main';
|
|
1
2
|
import { StoryObj } from '@storybook/react';
|
|
2
3
|
|
|
3
4
|
declare const meta: {
|
|
4
5
|
title: string;
|
|
5
|
-
component: import('react').ForwardRefExoticComponent<
|
|
6
|
+
component: import('react').ForwardRefExoticComponent<ButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
6
7
|
tags: string[];
|
|
7
8
|
parameters: {
|
|
8
9
|
layout: string;
|
|
@@ -11,8 +12,15 @@ declare const meta: {
|
|
|
11
12
|
export default meta;
|
|
12
13
|
type Story = StoryObj<typeof meta>;
|
|
13
14
|
export declare const Primary: Story;
|
|
14
|
-
export declare const
|
|
15
|
-
export declare const
|
|
16
|
-
export declare const
|
|
15
|
+
export declare const Default: Story;
|
|
16
|
+
export declare const Dashed: Story;
|
|
17
|
+
export declare const Text: Story;
|
|
18
|
+
export declare const Link: Story;
|
|
17
19
|
export declare const Quick: Story;
|
|
18
|
-
export declare const
|
|
20
|
+
export declare const Secondary: Story;
|
|
21
|
+
export declare const Danger: Story;
|
|
22
|
+
export declare const Disabled: Story;
|
|
23
|
+
export declare const WithIcon: Story;
|
|
24
|
+
export declare const WithIconDanger: Story;
|
|
25
|
+
export declare const WithAction: Story;
|
|
26
|
+
export declare const Loading: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
import { jsx as s, jsxs as k } from "react/jsx-runtime";
|
|
2
2
|
import { c as v } from "../../clsx-DB4S2d7J.js";
|
|
3
|
-
import '../../assets/Calendar.css';const
|
|
4
|
-
"calendar-wrapper": "_calendar-
|
|
5
|
-
"mode-view": "_mode-
|
|
6
|
-
"calendar-day": "_calendar-
|
|
7
|
-
"day-number": "_day-
|
|
8
|
-
"day-id": "_day-
|
|
9
|
-
"day-active": "_day-
|
|
10
|
-
"mode-edit": "_mode-
|
|
11
|
-
"day-checkbox": "_day-
|
|
12
|
-
},
|
|
3
|
+
import '../../assets/Calendar.css';const c = {
|
|
4
|
+
"calendar-wrapper": "_calendar-wrapper_1cyku_1",
|
|
5
|
+
"mode-view": "_mode-view_1cyku_1",
|
|
6
|
+
"calendar-day": "_calendar-day_1cyku_7",
|
|
7
|
+
"day-number": "_day-number_1cyku_12",
|
|
8
|
+
"day-id": "_day-id_1cyku_18",
|
|
9
|
+
"day-active": "_day-active_1cyku_28",
|
|
10
|
+
"mode-edit": "_mode-edit_1cyku_33",
|
|
11
|
+
"day-checkbox": "_day-checkbox_1cyku_51"
|
|
12
|
+
}, b = ({ days: t = [], onChangeDay: l, mode: o = "view", totalDays: e = 28, className: m, ...p }) => {
|
|
13
13
|
const u = (a, d) => {
|
|
14
14
|
let r = [...t];
|
|
15
|
-
d !== void 0 ? a.active || a.id ? r[d] = a : r.splice(d, 1) : a.active && r.push(a), r = r.sort((
|
|
15
|
+
d !== void 0 ? a.active || a.id ? r[d] = a : r.splice(d, 1) : a.active && r.push(a), r = r.sort((_, i) => _.day - i.day), l == null || l({
|
|
16
16
|
changedDay: a,
|
|
17
17
|
changedDayIndex: d,
|
|
18
18
|
selectedDays: r
|
|
19
19
|
});
|
|
20
20
|
};
|
|
21
|
-
return /* @__PURE__ */ s("div", { className: v(
|
|
22
|
-
const r = d + 1,
|
|
21
|
+
return /* @__PURE__ */ s("div", { className: v(c["calendar-wrapper"], c[`mode-${o}`], m), ...p, children: new Array(e).fill(null).map((a, d) => {
|
|
22
|
+
const r = d + 1, _ = t.findIndex((n) => n.day === r), i = _ >= 0 ? t[_] : void 0;
|
|
23
23
|
return /* @__PURE__ */ k(
|
|
24
24
|
"div",
|
|
25
25
|
{
|
|
26
|
-
className: v(
|
|
26
|
+
className: v(c["calendar-day"], (i == null ? void 0 : i.active) && c["day-active"]),
|
|
27
27
|
onClick: o === "edit" ? () => u(
|
|
28
28
|
{ day: r, id: i == null ? void 0 : i.id, active: !(i != null && i.active) },
|
|
29
|
-
|
|
29
|
+
_ >= 0 ? _ : void 0
|
|
30
30
|
) : void 0,
|
|
31
31
|
children: [
|
|
32
|
-
/* @__PURE__ */ s("span", { className:
|
|
33
|
-
/* @__PURE__ */ s("span", { className:
|
|
34
|
-
o === "view" && /* @__PURE__ */ s("span", { className:
|
|
32
|
+
/* @__PURE__ */ s("span", { className: c["day-checkbox"] }),
|
|
33
|
+
/* @__PURE__ */ s("span", { className: c["day-number"], children: String(r).padStart(2, "0") }),
|
|
34
|
+
o === "view" && /* @__PURE__ */ s("span", { className: c["day-id"], children: i != null && i.id && (i != null && i.active) ? `ID: ${i == null ? void 0 : i.id}` : "" })
|
|
35
35
|
]
|
|
36
36
|
},
|
|
37
37
|
d
|
|
@@ -39,5 +39,5 @@ import '../../assets/Calendar.css';const _ = {
|
|
|
39
39
|
}) });
|
|
40
40
|
};
|
|
41
41
|
export {
|
|
42
|
-
|
|
42
|
+
b as Calendar
|
|
43
43
|
};
|
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { c as
|
|
1
|
+
import { jsxs as i, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { c as u } from "../../clsx-DB4S2d7J.js";
|
|
3
3
|
import { Skeleton as y } from "../Skeleton/Skeleton.js";
|
|
4
4
|
import { Typography as _ } from "../Typography/Typography.js";
|
|
5
|
-
import '../../assets/Description.css';const
|
|
6
|
-
"u-typography-h1": "_u-typography-
|
|
7
|
-
"u-typography-h2": "_u-typography-
|
|
8
|
-
"u-typography-h3": "_u-typography-
|
|
9
|
-
"u-typography-h4": "_u-typography-
|
|
10
|
-
"u-typography-h5": "_u-typography-
|
|
11
|
-
"u-typography-h6": "_u-typography-
|
|
12
|
-
"u-typography-base": "_u-typography-
|
|
13
|
-
"u-typography-base--xxl": "_u-typography-base--
|
|
14
|
-
"u-typography-base--xl": "_u-typography-base--
|
|
15
|
-
"u-typography-base--lg": "_u-typography-base--
|
|
16
|
-
"u-typography-base--sm": "_u-typography-base--
|
|
17
|
-
"u-typography-base--bold": "_u-typography-base--
|
|
18
|
-
"u-typography-base--strikethrough": "_u-typography-base--
|
|
19
|
-
"u-typography-base--underlined": "_u-typography-base--
|
|
20
|
-
"u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-
|
|
21
|
-
container:
|
|
22
|
-
"container--text": "_container--
|
|
23
|
-
"container--inline": "_container--
|
|
5
|
+
import '../../assets/Description.css';const g = "_container_1hzzl_78", e = {
|
|
6
|
+
"u-typography-h1": "_u-typography-h1_1hzzl_1",
|
|
7
|
+
"u-typography-h2": "_u-typography-h2_1hzzl_8",
|
|
8
|
+
"u-typography-h3": "_u-typography-h3_1hzzl_15",
|
|
9
|
+
"u-typography-h4": "_u-typography-h4_1hzzl_22",
|
|
10
|
+
"u-typography-h5": "_u-typography-h5_1hzzl_29",
|
|
11
|
+
"u-typography-h6": "_u-typography-h6_1hzzl_36",
|
|
12
|
+
"u-typography-base": "_u-typography-base_1hzzl_43",
|
|
13
|
+
"u-typography-base--xxl": "_u-typography-base--xxl_1hzzl_49",
|
|
14
|
+
"u-typography-base--xl": "_u-typography-base--xl_1hzzl_53",
|
|
15
|
+
"u-typography-base--lg": "_u-typography-base--lg_1hzzl_57",
|
|
16
|
+
"u-typography-base--sm": "_u-typography-base--sm_1hzzl_61",
|
|
17
|
+
"u-typography-base--bold": "_u-typography-base--bold_1hzzl_65",
|
|
18
|
+
"u-typography-base--strikethrough": "_u-typography-base--strikethrough_1hzzl_68",
|
|
19
|
+
"u-typography-base--underlined": "_u-typography-base--underlined_1hzzl_71",
|
|
20
|
+
"u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-underlined_1hzzl_74",
|
|
21
|
+
container: g,
|
|
22
|
+
"container--text": "_container--text_1hzzl_82",
|
|
23
|
+
"container--inline": "_container--inline_1hzzl_85"
|
|
24
24
|
}, m = ({
|
|
25
|
-
label:
|
|
26
|
-
value:
|
|
25
|
+
label: l,
|
|
26
|
+
value: s,
|
|
27
27
|
isLoading: r,
|
|
28
28
|
color: h = "var(--gray-95)",
|
|
29
|
-
"data-testid":
|
|
29
|
+
"data-testid": t = "Description",
|
|
30
30
|
inline: p,
|
|
31
|
-
labelVariant:
|
|
31
|
+
labelVariant: n = "base",
|
|
32
32
|
valueVariant: o
|
|
33
|
-
}) => /* @__PURE__ */
|
|
33
|
+
}) => /* @__PURE__ */ i(
|
|
34
34
|
"div",
|
|
35
35
|
{
|
|
36
|
-
className:
|
|
37
|
-
"data-testid": `${
|
|
36
|
+
className: u([e.container, { [e["container--inline"]]: p }]),
|
|
37
|
+
"data-testid": `${t}-container`,
|
|
38
38
|
children: [
|
|
39
|
-
/* @__PURE__ */
|
|
39
|
+
/* @__PURE__ */ a(
|
|
40
40
|
_,
|
|
41
41
|
{
|
|
42
42
|
color: h,
|
|
43
|
-
className:
|
|
44
|
-
variant:
|
|
45
|
-
"data-testid": `${
|
|
46
|
-
children: r ? /* @__PURE__ */
|
|
43
|
+
className: e["container--text"],
|
|
44
|
+
variant: n,
|
|
45
|
+
"data-testid": `${t}-label`,
|
|
46
|
+
children: r ? /* @__PURE__ */ a(y, { style: { width: 70, marginBottom: 2 }, "data-testid": `${t}-skeletonLabel` }) : l
|
|
47
47
|
}
|
|
48
48
|
),
|
|
49
|
-
/* @__PURE__ */
|
|
49
|
+
/* @__PURE__ */ a(
|
|
50
50
|
_,
|
|
51
51
|
{
|
|
52
|
-
className:
|
|
52
|
+
className: e["container--text"],
|
|
53
53
|
bold: !0,
|
|
54
54
|
color: h,
|
|
55
55
|
variant: o || (p ? "base" : "base-lg"),
|
|
56
|
-
"data-testid": `${
|
|
57
|
-
children: r ? /* @__PURE__ */
|
|
56
|
+
"data-testid": `${t}-value`,
|
|
57
|
+
children: r ? /* @__PURE__ */ a(y, { style: { width: 100 }, "data-testid": `${t}-skeletonValue` }) : s || "-"
|
|
58
58
|
}
|
|
59
59
|
)
|
|
60
60
|
]
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { s as t } from "../../Dialog.module-
|
|
2
|
+
import { s as t } from "../../Dialog.module-BlXtafuW.js";
|
|
3
3
|
const i = ({ children: s }) => /* @__PURE__ */ o("div", { className: t.dialog__actions, children: s });
|
|
4
4
|
export {
|
|
5
5
|
i as default
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as s } from "react";
|
|
3
3
|
import { c as t } from "../../clsx-DB4S2d7J.js";
|
|
4
|
-
import { s as m } from "../../Dialog.module-
|
|
4
|
+
import { s as m } from "../../Dialog.module-BlXtafuW.js";
|
|
5
5
|
const l = s(
|
|
6
6
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
7
7
|
({ ownerState: e, ...r }, o) => /* @__PURE__ */ a("div", { ...r, className: t(m.dialog__backdrop, r.className), ref: o })
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { Icon as i } from "../Icon/Icon.js";
|
|
3
|
-
import { s as r } from "../../Dialog.module-
|
|
3
|
+
import { s as r } from "../../Dialog.module-BlXtafuW.js";
|
|
4
4
|
import { B as s } from "../../Button-BAljjMv3.js";
|
|
5
5
|
const n = ({ handleOnClose: t }) => /* @__PURE__ */ o(
|
|
6
6
|
s,
|
|
@@ -4,7 +4,7 @@ import ie from "./Actions.js";
|
|
|
4
4
|
import ae from "./Backdrop.js";
|
|
5
5
|
import le from "./CloseIconButton.js";
|
|
6
6
|
import ce from "./Content.js";
|
|
7
|
-
import { s as z } from "../../Dialog.module-
|
|
7
|
+
import { s as z } from "../../Dialog.module-BlXtafuW.js";
|
|
8
8
|
import ee from "./DialogTitle.js";
|
|
9
9
|
import { u as te, P as i, f as de, b as C, g as ue, a as fe, _ as pe, c as G, d as be, e as he } from "../../useSlotProps-C_I1kEHr.js";
|
|
10
10
|
import * as f from "react";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as l, Fragment as s, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { Icon as d } from "../Icon/Icon.js";
|
|
3
3
|
import { Typography as i } from "../Typography/Typography.js";
|
|
4
|
-
import { s as r } from "../../Dialog.module-
|
|
4
|
+
import { s as r } from "../../Dialog.module-BlXtafuW.js";
|
|
5
5
|
const g = ({ title: o, subTitle: t, icon: a }) => /* @__PURE__ */ l(s, { children: [
|
|
6
6
|
/* @__PURE__ */ l(
|
|
7
7
|
i,
|
|
@@ -1,103 +1,124 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx as e, jsxs as _, Fragment as h } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo as I } from "react";
|
|
3
|
-
import { c as
|
|
4
|
-
import { Icon as
|
|
3
|
+
import { c as g } from "../../clsx-DB4S2d7J.js";
|
|
4
|
+
import { Icon as P } from "../Icon/Icon.js";
|
|
5
5
|
import { IconButton as $ } from "../IconButton/IconButton.js";
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
"u-typography-
|
|
9
|
-
"u-typography-
|
|
10
|
-
"u-typography-
|
|
11
|
-
"
|
|
12
|
-
|
|
13
|
-
"u-typography-
|
|
14
|
-
"u-typography-
|
|
15
|
-
"u-typography-base": "_u-typography-
|
|
16
|
-
|
|
17
|
-
"u-typography-base--
|
|
18
|
-
"u-typography-base--
|
|
19
|
-
"u-typography-base--
|
|
20
|
-
"u-typography-base--
|
|
21
|
-
"u-typography-base--
|
|
22
|
-
"u-typography-base--strikethrough": "_u-typography-base--
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"page-
|
|
26
|
-
"page-
|
|
27
|
-
"page-
|
|
28
|
-
"page-
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"header-bubble": "_header-
|
|
32
|
-
"header-bubble
|
|
33
|
-
"header-bubble--container--full": "_header-bubble--container--full_7yb9o_152",
|
|
34
|
-
"page-header__main-right-content": "_page-header__main-right-content_7yb9o_155",
|
|
35
|
-
"header-bubble-margin": "_header-bubble-margin_7yb9o_163"
|
|
6
|
+
import { Text as y } from "../Typography/Typography.js";
|
|
7
|
+
import '../../assets/PageHeader.css';const a = {
|
|
8
|
+
"u-typography-h1": "_u-typography-h1_bamb5_1",
|
|
9
|
+
"u-typography-h2": "_u-typography-h2_bamb5_8",
|
|
10
|
+
"u-typography-h3": "_u-typography-h3_bamb5_15",
|
|
11
|
+
"u-typography-h4": "_u-typography-h4_bamb5_22",
|
|
12
|
+
"u-typography-h5": "_u-typography-h5_bamb5_29",
|
|
13
|
+
"u-typography-h6": "_u-typography-h6_bamb5_36",
|
|
14
|
+
"u-typography-base": "_u-typography-base_bamb5_43",
|
|
15
|
+
"u-typography-base--xxl": "_u-typography-base--xxl_bamb5_49",
|
|
16
|
+
"u-typography-base--xl": "_u-typography-base--xl_bamb5_53",
|
|
17
|
+
"u-typography-base--lg": "_u-typography-base--lg_bamb5_57",
|
|
18
|
+
"u-typography-base--sm": "_u-typography-base--sm_bamb5_61",
|
|
19
|
+
"u-typography-base--bold": "_u-typography-base--bold_bamb5_65",
|
|
20
|
+
"u-typography-base--strikethrough": "_u-typography-base--strikethrough_bamb5_68",
|
|
21
|
+
"u-typography-base--underlined": "_u-typography-base--underlined_bamb5_71",
|
|
22
|
+
"u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-underlined_bamb5_74",
|
|
23
|
+
"page-header": "_page-header_bamb5_78",
|
|
24
|
+
"page-header__main-content": "_page-header__main-content_bamb5_82",
|
|
25
|
+
"page-header__bottom-content": "_page-header__bottom-content_bamb5_89",
|
|
26
|
+
"page-header__breadcrumb": "_page-header__breadcrumb_bamb5_94",
|
|
27
|
+
"page-header__breadcrumb__separator": "_page-header__breadcrumb__separator_bamb5_122",
|
|
28
|
+
"page-header__right-children-wrapper": "_page-header__right-children-wrapper_bamb5_128",
|
|
29
|
+
"header-bubble": "_header-bubble_bamb5_134",
|
|
30
|
+
"header-bubble--container": "_header-bubble--container_bamb5_137",
|
|
31
|
+
"header-bubble--container--full": "_header-bubble--container--full_bamb5_145",
|
|
32
|
+
"header-bubble-margin": "_header-bubble-margin_bamb5_149"
|
|
36
33
|
}, E = ({
|
|
37
34
|
title: n,
|
|
38
|
-
subtitle:
|
|
39
|
-
rightChildren:
|
|
40
|
-
bottomChildren:
|
|
41
|
-
classNameWrapper:
|
|
42
|
-
classNameTitle:
|
|
43
|
-
classNameSubtitle:
|
|
44
|
-
headerBubble:
|
|
45
|
-
fullWidthHeaderBubble:
|
|
35
|
+
subtitle: i,
|
|
36
|
+
rightChildren: p,
|
|
37
|
+
bottomChildren: l,
|
|
38
|
+
classNameWrapper: k,
|
|
39
|
+
classNameTitle: N,
|
|
40
|
+
classNameSubtitle: f,
|
|
41
|
+
headerBubble: b,
|
|
42
|
+
fullWidthHeaderBubble: x,
|
|
46
43
|
"data-testid-wrapper": v,
|
|
47
|
-
"data-testid-title":
|
|
48
|
-
"data-testid-subtitle":
|
|
49
|
-
"data-testid-header-bubble":
|
|
50
|
-
...
|
|
44
|
+
"data-testid-title": w,
|
|
45
|
+
"data-testid-subtitle": L,
|
|
46
|
+
"data-testid-header-bubble": C,
|
|
47
|
+
...T
|
|
51
48
|
}) => {
|
|
52
49
|
const {
|
|
53
|
-
breadcrumb:
|
|
54
|
-
backLinkText:
|
|
55
|
-
onBackLinkClick:
|
|
50
|
+
breadcrumb: r,
|
|
51
|
+
backLinkText: s,
|
|
52
|
+
onBackLinkClick: d,
|
|
56
53
|
classNameBackLink: u,
|
|
57
|
-
"data-testid-backLink":
|
|
58
|
-
...
|
|
59
|
-
} =
|
|
60
|
-
|
|
61
|
-
const
|
|
54
|
+
"data-testid-backLink": m,
|
|
55
|
+
...B
|
|
56
|
+
} = T;
|
|
57
|
+
b && (n || i || l) && console.error("headerBubble prop can not be used with title, subtitle or bottomChildren"), !b && !n && console.error("title prop is required when not using headerBubble"), (s || d) && console.error("backLinkText and onBackLinkClick props are deprecated. Please use breadcrumb instead");
|
|
58
|
+
const j = g([a["page-header"], k]), H = I(() => {
|
|
62
59
|
const o = [];
|
|
63
|
-
return
|
|
64
|
-
label:
|
|
60
|
+
return s && d && o.push({
|
|
61
|
+
label: s,
|
|
65
62
|
className: u,
|
|
66
|
-
"data-testid":
|
|
67
|
-
onClick:
|
|
68
|
-
}),
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
{
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
"div",
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
63
|
+
"data-testid": m,
|
|
64
|
+
onClick: d
|
|
65
|
+
}), r && o.push(...r), /* @__PURE__ */ e("div", { className: a["page-header__breadcrumb"], children: o.map((t, c) => /* @__PURE__ */ e(
|
|
66
|
+
$,
|
|
67
|
+
{
|
|
68
|
+
icon: c === 0 ? /* @__PURE__ */ e(P, { icon: "house-blank" }) : /* @__PURE__ */ e("span", { className: a["page-header__breadcrumb__separator"], children: "/" }),
|
|
69
|
+
onClick: () => t.onClick && t.onClick(),
|
|
70
|
+
className: t.className,
|
|
71
|
+
"data-testid": t["data-testid"],
|
|
72
|
+
disabled: o.length === 1 ? !1 : c === o.length - 1,
|
|
73
|
+
children: t.label
|
|
74
|
+
},
|
|
75
|
+
`${t.label}_${c}`
|
|
76
|
+
)) });
|
|
77
|
+
}, [r, s, u, m, d]);
|
|
78
|
+
return /* @__PURE__ */ _(h, { children: [
|
|
79
|
+
/* @__PURE__ */ _("div", { className: j, "data-testid": v, ...B, children: [
|
|
80
|
+
/* @__PURE__ */ _("div", { className: a["page-header__main-content"], children: [
|
|
81
|
+
/* @__PURE__ */ _("div", { className: a["page-header__right-children-wrapper"], children: [
|
|
82
|
+
r && H,
|
|
83
|
+
r && p && /* @__PURE__ */ e(h, { children: p })
|
|
84
|
+
] }),
|
|
85
|
+
/* @__PURE__ */ _("div", { className: a["page-header__right-children-wrapper"], children: [
|
|
86
|
+
/* @__PURE__ */ e(
|
|
87
|
+
y,
|
|
88
|
+
{
|
|
89
|
+
variant: "h4",
|
|
90
|
+
element: "h1",
|
|
91
|
+
color: "var(--colors-neutral-text-color-text)",
|
|
92
|
+
className: N,
|
|
93
|
+
"data-testid": w,
|
|
94
|
+
children: n
|
|
95
|
+
}
|
|
96
|
+
),
|
|
97
|
+
!r && p && /* @__PURE__ */ e(h, { children: p })
|
|
98
|
+
] }),
|
|
99
|
+
/* @__PURE__ */ e(
|
|
100
|
+
y,
|
|
101
|
+
{
|
|
102
|
+
variant: "base",
|
|
103
|
+
element: "p",
|
|
104
|
+
color: "var(--colors-neutral-text-color-text)",
|
|
105
|
+
className: f,
|
|
106
|
+
"data-testid": L,
|
|
107
|
+
children: i
|
|
108
|
+
}
|
|
109
|
+
),
|
|
110
|
+
b && /* @__PURE__ */ e(h, { children: /* @__PURE__ */ e("div", { className: a["header-bubble"], children: /* @__PURE__ */ e(
|
|
111
|
+
"div",
|
|
112
|
+
{
|
|
113
|
+
className: x ? g(a["header-bubble--container"], a["header-bubble--container--full"]) : a["header-bubble--container"],
|
|
114
|
+
"data-testid": C,
|
|
115
|
+
children: b
|
|
116
|
+
}
|
|
117
|
+
) }) })
|
|
118
|
+
] }),
|
|
119
|
+
l && /* @__PURE__ */ e("div", { className: a["page-header__bottom-content"], children: l })
|
|
99
120
|
] }),
|
|
100
|
-
|
|
121
|
+
b && /* @__PURE__ */ e("div", { className: a["header-bubble-margin"] })
|
|
101
122
|
] });
|
|
102
123
|
};
|
|
103
124
|
export {
|