@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.
Files changed (31) hide show
  1. package/dist/Dialog.module-BlXtafuW.js +28 -0
  2. package/dist/assets/BankCard.css +1 -1
  3. package/dist/assets/Button.css +1 -1
  4. package/dist/assets/Calendar.css +1 -1
  5. package/dist/assets/Description.css +1 -1
  6. package/dist/assets/Dialog.css +1 -1
  7. package/dist/assets/PageHeader.css +1 -1
  8. package/dist/assets/Pagination.css +1 -1
  9. package/dist/assets/StepperNavigator.css +1 -1
  10. package/dist/assets/Tag.css +1 -1
  11. package/dist/components/BankCard/BankCard.js +57 -57
  12. package/dist/components/Button/Button.d.ts +9 -1
  13. package/dist/components/Button/Button.js +80 -56
  14. package/dist/components/Button/Button.stories.d.ts +13 -5
  15. package/dist/components/Button/Button.test.d.ts +1 -0
  16. package/dist/components/Calendar/Calendar.js +19 -19
  17. package/dist/components/Description/Description.js +37 -37
  18. package/dist/components/Dialog/Actions.js +1 -1
  19. package/dist/components/Dialog/Backdrop.js +1 -1
  20. package/dist/components/Dialog/CloseIconButton.js +1 -1
  21. package/dist/components/Dialog/Dialog.js +1 -1
  22. package/dist/components/Dialog/DialogTitle.js +1 -1
  23. package/dist/components/PageHeader/PageHeader.js +110 -89
  24. package/dist/components/PageHeader/PageHeader.stories.d.ts +6 -3
  25. package/dist/components/Pagination/Pagination.js +62 -62
  26. package/dist/components/StepperNavigator/StepperNavigator.js +79 -72
  27. package/dist/components/StepperNavigator/StepperNavigator.stories.d.ts +0 -1
  28. package/dist/components/Tag/Tag.js +54 -54
  29. package/dist/marola.css +1 -1
  30. package/package.json +2 -2
  31. package/dist/Dialog.module-BFRHcF1J.js +0 -28
@@ -1,66 +1,90 @@
1
- import { jsx as p, jsxs as l } from "react/jsx-runtime";
2
- import { forwardRef as x, useMemo as c } from "react";
3
- import { c as v } from "../../clsx-DB4S2d7J.js";
4
- import { LoadingSpinner as m } from "../LoadingSpinner/LoadingSpinner.js";
5
- import { B as f } from "../../Button-BAljjMv3.js";
6
- import '../../assets/Button.css';const k = "_button_dxo5v_57", t = {
7
- "u-typography-h1": "_u-typography-h1_dxo5v_1",
8
- "u-typography-h2": "_u-typography-h2_dxo5v_8",
9
- "u-typography-h3": "_u-typography-h3_dxo5v_15",
10
- "u-typography-h4": "_u-typography-h4_dxo5v_22",
11
- "u-typography-h5": "_u-typography-h5_dxo5v_29",
12
- "u-typography-h6": "_u-typography-h6_dxo5v_36",
13
- "u-typography-base": "_u-typography-base_dxo5v_43",
14
- "u-typography-base--xxl": "_u-typography-base--xxl_dxo5v_49",
15
- "u-typography-base--xl": "_u-typography-base--xl_dxo5v_53",
16
- "u-typography-base--lg": "_u-typography-base--lg_dxo5v_57",
17
- button: k,
18
- "u-typography-base--sm": "_u-typography-base--sm_dxo5v_61",
19
- "u-typography-base--bold": "_u-typography-base--bold_dxo5v_65",
20
- "u-typography-base--strikethrough": "_u-typography-base--strikethrough_dxo5v_68",
21
- "u-typography-base--underlined": "_u-typography-base--underlined_dxo5v_71",
22
- "u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-underlined_dxo5v_74",
23
- "button--primary": "_button--primary_dxo5v_86",
24
- "button--secondary": "_button--secondary_dxo5v_101",
25
- "button--quick": "_button--quick_dxo5v_118",
26
- "button__loading-container": "_button__loading-container_dxo5v_138"
27
- }, S = x((y, _) => {
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: u,
30
- link: e,
31
- loading: n,
32
- children: a,
33
- type: s = "button",
41
+ onClick: s,
42
+ link: y,
43
+ children: o,
44
+ type: b = "button",
34
45
  disabled: h,
35
- className: r,
36
- variant: o = "primary",
37
- muiButtonBaseProps: d,
38
- "data-testid": g
39
- } = y, i = {
40
- invert: o === "secondary" || o === "quick"
41
- }, b = c(
42
- () => v([t.button, t[`button--${o}`], r]),
43
- [r, o]
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__ */ p(
46
- f,
69
+ return /* @__PURE__ */ _(
70
+ q,
47
71
  {
48
- type: s,
49
- href: e,
50
- onClick: u,
72
+ type: b,
73
+ href: y,
74
+ onClick: s,
51
75
  disabled: h,
52
- className: b,
53
- ref: _,
54
- "data-testid": g,
55
- ...d ?? {},
56
- children: n ? /* @__PURE__ */ l("div", { className: t["button__loading-container"], children: [
57
- /* @__PURE__ */ p(m, { ...i }),
58
- a
59
- ] }) : a
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
- S as Button,
65
- S as default
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<import('./Button').ButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
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 PrimaryDisabled: Story;
15
- export declare const Secondary: Story;
16
- export declare const SecondaryDisabled: Story;
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 QuickDisabled: Story;
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-wrapper_1ku17_1",
5
- "mode-view": "_mode-view_1ku17_1",
6
- "calendar-day": "_calendar-day_1ku17_7",
7
- "day-number": "_day-number_1ku17_12",
8
- "day-id": "_day-id_1ku17_18",
9
- "day-active": "_day-active_1ku17_28",
10
- "mode-edit": "_mode-edit_1ku17_33",
11
- "day-checkbox": "_day-checkbox_1ku17_51"
12
- }, f = ({ days: t = [], onChangeDay: l, mode: o = "view", totalDays: e = 28, className: m, ...p }) => {
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((c, i) => c.day - i.day), l == null || l({
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(_["calendar-wrapper"], _[`mode-${o}`], m), ...p, children: new Array(e).fill(null).map((a, d) => {
22
- const r = d + 1, c = t.findIndex((n) => n.day === r), i = c >= 0 ? t[c] : void 0;
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(_["calendar-day"], (i == null ? void 0 : i.active) && _["day-active"]),
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
- c >= 0 ? c : void 0
29
+ _ >= 0 ? _ : void 0
30
30
  ) : void 0,
31
31
  children: [
32
- /* @__PURE__ */ s("span", { className: _["day-checkbox"] }),
33
- /* @__PURE__ */ s("span", { className: _["day-number"], children: String(r).padStart(2, "0") }),
34
- o === "view" && /* @__PURE__ */ s("span", { className: _["day-id"], children: i != null && i.id && (i != null && i.active) ? `ID: ${i == null ? void 0 : i.id}` : "" })
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
- f as Calendar
42
+ b as Calendar
43
43
  };
@@ -1,60 +1,60 @@
1
- import { jsxs as u, jsx as t } from "react/jsx-runtime";
2
- import { c as g } from "../../clsx-DB4S2d7J.js";
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 l = "_container_he0z3_78", a = {
6
- "u-typography-h1": "_u-typography-h1_he0z3_1",
7
- "u-typography-h2": "_u-typography-h2_he0z3_8",
8
- "u-typography-h3": "_u-typography-h3_he0z3_15",
9
- "u-typography-h4": "_u-typography-h4_he0z3_22",
10
- "u-typography-h5": "_u-typography-h5_he0z3_29",
11
- "u-typography-h6": "_u-typography-h6_he0z3_36",
12
- "u-typography-base": "_u-typography-base_he0z3_43",
13
- "u-typography-base--xxl": "_u-typography-base--xxl_he0z3_49",
14
- "u-typography-base--xl": "_u-typography-base--xl_he0z3_53",
15
- "u-typography-base--lg": "_u-typography-base--lg_he0z3_57",
16
- "u-typography-base--sm": "_u-typography-base--sm_he0z3_61",
17
- "u-typography-base--bold": "_u-typography-base--bold_he0z3_65",
18
- "u-typography-base--strikethrough": "_u-typography-base--strikethrough_he0z3_68",
19
- "u-typography-base--underlined": "_u-typography-base--underlined_he0z3_71",
20
- "u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-underlined_he0z3_74",
21
- container: l,
22
- "container--text": "_container--text_he0z3_82",
23
- "container--inline": "_container--inline_he0z3_85"
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: s,
26
- value: n,
25
+ label: l,
26
+ value: s,
27
27
  isLoading: r,
28
28
  color: h = "var(--gray-95)",
29
- "data-testid": e = "Description",
29
+ "data-testid": t = "Description",
30
30
  inline: p,
31
- labelVariant: i = "base",
31
+ labelVariant: n = "base",
32
32
  valueVariant: o
33
- }) => /* @__PURE__ */ u(
33
+ }) => /* @__PURE__ */ i(
34
34
  "div",
35
35
  {
36
- className: g([a.container, { [a["container--inline"]]: p }]),
37
- "data-testid": `${e}-container`,
36
+ className: u([e.container, { [e["container--inline"]]: p }]),
37
+ "data-testid": `${t}-container`,
38
38
  children: [
39
- /* @__PURE__ */ t(
39
+ /* @__PURE__ */ a(
40
40
  _,
41
41
  {
42
42
  color: h,
43
- className: a["container--text"],
44
- variant: i,
45
- "data-testid": `${e}-label`,
46
- children: r ? /* @__PURE__ */ t(y, { style: { width: 70, marginBottom: 2 }, "data-testid": `${e}-skeletonLabel` }) : s
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__ */ t(
49
+ /* @__PURE__ */ a(
50
50
  _,
51
51
  {
52
- className: a["container--text"],
52
+ className: e["container--text"],
53
53
  bold: !0,
54
54
  color: h,
55
55
  variant: o || (p ? "base" : "base-lg"),
56
- "data-testid": `${e}-value`,
57
- children: r ? /* @__PURE__ */ t(y, { style: { width: 100 }, "data-testid": `${e}-skeletonValue` }) : n || "-"
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-BFRHcF1J.js";
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-BFRHcF1J.js";
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-BFRHcF1J.js";
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-BFRHcF1J.js";
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-BFRHcF1J.js";
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 { jsxs as _, jsx as a, Fragment as l } from "react/jsx-runtime";
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 b } from "../../clsx-DB4S2d7J.js";
4
- import { Icon as T } from "../Icon/Icon.js";
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 '../../assets/PageHeader.css';const q = "_title_7yb9o_22", F = "_subtitle_7yb9o_43", e = {
7
- "u-typography-h1": "_u-typography-h1_7yb9o_1",
8
- "u-typography-h2": "_u-typography-h2_7yb9o_8",
9
- "u-typography-h3": "_u-typography-h3_7yb9o_15",
10
- "u-typography-h4": "_u-typography-h4_7yb9o_22",
11
- "page-header__main-left-content": "_page-header__main-left-content_7yb9o_22",
12
- title: q,
13
- "u-typography-h5": "_u-typography-h5_7yb9o_29",
14
- "u-typography-h6": "_u-typography-h6_7yb9o_36",
15
- "u-typography-base": "_u-typography-base_7yb9o_43",
16
- subtitle: F,
17
- "u-typography-base--xxl": "_u-typography-base--xxl_7yb9o_49",
18
- "u-typography-base--xl": "_u-typography-base--xl_7yb9o_53",
19
- "u-typography-base--lg": "_u-typography-base--lg_7yb9o_57",
20
- "u-typography-base--sm": "_u-typography-base--sm_7yb9o_61",
21
- "u-typography-base--bold": "_u-typography-base--bold_7yb9o_65",
22
- "u-typography-base--strikethrough": "_u-typography-base--strikethrough_7yb9o_68",
23
- "u-typography-base--underlined": "_u-typography-base--underlined_7yb9o_71",
24
- "u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-underlined_7yb9o_74",
25
- "page-header": "_page-header_7yb9o_22",
26
- "page-header__top-content": "_page-header__top-content_7yb9o_87",
27
- "page-header__main-content": "_page-header__main-content_7yb9o_90",
28
- "page-header__bottom-content": "_page-header__bottom-content_7yb9o_90",
29
- "page-header__breadcrumb": "_page-header__breadcrumb_7yb9o_107",
30
- "page-header__breadcrumb__separator": "_page-header__breadcrumb__separator_7yb9o_118",
31
- "header-bubble": "_header-bubble_7yb9o_141",
32
- "header-bubble--container": "_header-bubble--container_7yb9o_144",
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: c,
39
- rightChildren: y,
40
- bottomChildren: h,
41
- classNameWrapper: m,
42
- classNameTitle: k,
43
- classNameSubtitle: N,
44
- headerBubble: r,
45
- fullWidthHeaderBubble: f,
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": x,
48
- "data-testid-subtitle": C,
49
- "data-testid-header-bubble": L,
50
- ...w
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: s,
54
- backLinkText: d,
55
- onBackLinkClick: p,
50
+ breadcrumb: r,
51
+ backLinkText: s,
52
+ onBackLinkClick: d,
56
53
  classNameBackLink: u,
57
- "data-testid-backLink": g,
58
- ...j
59
- } = w;
60
- r && (n || c || h) && console.error("headerBubble prop can not be used with title, subtitle or bottomChildren"), !r && !n && console.error("title prop is required when not using headerBubble");
61
- const B = b([e["page-header"], m]), H = I(() => {
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 d && p && o.push({
64
- label: d,
60
+ return s && d && o.push({
61
+ label: s,
65
62
  className: u,
66
- "data-testid": g,
67
- onClick: p
68
- }), s && o.push(...s), /* @__PURE__ */ _("div", { className: e["page-header__top-content"], children: [
69
- /* @__PURE__ */ a("div", { className: e["page-header__breadcrumb"], children: o.map((t, i) => /* @__PURE__ */ a(
70
- $,
71
- {
72
- icon: i === 0 ? /* @__PURE__ */ a(T, { icon: "house-blank" }) : /* @__PURE__ */ a("span", { className: e["page-header__breadcrumb__separator"], children: "/" }),
73
- onClick: () => t.onClick && t.onClick(),
74
- className: t.className,
75
- "data-testid": t["data-testid"],
76
- disabled: o.length === 1 ? !1 : i === o.length - 1,
77
- children: t.label
78
- },
79
- `${t.label}_${i}`
80
- )) }),
81
- y && /* @__PURE__ */ a("div", { className: e["page-header__main-right-content"], children: y })
82
- ] });
83
- }, [s, d, u, g, p]);
84
- return /* @__PURE__ */ _(l, { children: [
85
- /* @__PURE__ */ _("div", { className: B, "data-testid": v, ...j, children: [
86
- H,
87
- /* @__PURE__ */ a("div", { className: e["page-header__main-content"], children: /* @__PURE__ */ a("div", { className: e["page-header__main-left-content"], children: r ? /* @__PURE__ */ a(l, { children: /* @__PURE__ */ a("div", { className: e["header-bubble"], children: /* @__PURE__ */ a(
88
- "div",
89
- {
90
- className: f ? b(e["header-bubble--container"], e["header-bubble--container--full"]) : e["header-bubble--container"],
91
- "data-testid": L,
92
- children: r
93
- }
94
- ) }) }) : /* @__PURE__ */ _(l, { children: [
95
- /* @__PURE__ */ a("h1", { className: b(e.title, k), "data-testid": x, children: n }),
96
- /* @__PURE__ */ a("h2", { className: b(e.subtitle, N), "data-testid": C, children: c })
97
- ] }) }) }),
98
- h && /* @__PURE__ */ a("div", { className: e["page-header__bottom-content"], children: h })
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
- r && /* @__PURE__ */ a("div", { className: e["header-bubble-margin"] })
121
+ b && /* @__PURE__ */ e("div", { className: a["header-bubble-margin"] })
101
122
  ] });
102
123
  };
103
124
  export {