@pismo/marola 0.0.1-alpha.5 → 0.0.1-alpha.7

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 (108) hide show
  1. package/README.md +13 -2
  2. package/dist/{Button-D--uN90N.js → Button-B1umG8kJ.js} +3 -3
  3. package/dist/ClickAwayListener-BKznXF1d.js +106 -0
  4. package/dist/Dialog.module-CGVM5V_D.js +15 -0
  5. package/dist/Portal-BcdMtRGF.js +73 -0
  6. package/dist/{Tabs.module-BKlNuSPH.js → Tabs.module-BA-PC7fA.js} +13 -13
  7. package/dist/_commonjsHelpers-CT_km90n.js +30 -0
  8. package/dist/assets/Advice.css +1 -0
  9. package/dist/assets/Button.css +1 -1
  10. package/dist/assets/Checkbox.css +1 -0
  11. package/dist/assets/Dialog.css +1 -1
  12. package/dist/assets/IconButton.css +1 -1
  13. package/dist/assets/Input.css +1 -0
  14. package/dist/assets/Pagination.css +1 -1
  15. package/dist/assets/Skeleton.css +1 -0
  16. package/dist/assets/Snackbar.css +1 -0
  17. package/dist/assets/SortTooltip.css +1 -0
  18. package/dist/assets/Stepper.css +1 -0
  19. package/dist/assets/Table.css +1 -0
  20. package/dist/assets/Tabs.css +1 -1
  21. package/dist/assets/Toggle.css +1 -0
  22. package/dist/assets/Tooltip.css +1 -0
  23. package/dist/assets/Typography.css +1 -1
  24. package/dist/assets/{main.css → global.css} +1 -1
  25. package/dist/components/Advice/Advice.d.ts +16 -0
  26. package/dist/components/Advice/Advice.js +25 -0
  27. package/dist/components/Button/Button.d.ts +9 -1
  28. package/dist/components/Button/Button.js +54 -38
  29. package/dist/components/Button/Button.stories.d.ts +60 -0
  30. package/dist/components/Button/Button.stories.js +40 -0
  31. package/dist/components/Checkbox/Checkbox.d.ts +17 -0
  32. package/dist/components/Checkbox/Checkbox.js +48 -0
  33. package/dist/components/Dialog/Actions.js +1 -1
  34. package/dist/components/Dialog/Backdrop.d.ts +1 -1
  35. package/dist/components/Dialog/Backdrop.js +1 -1
  36. package/dist/components/Dialog/CloseIconButton.js +12 -124
  37. package/dist/components/Dialog/Dialog.d.ts +3 -2
  38. package/dist/components/Dialog/Dialog.js +418 -20072
  39. package/dist/components/Dialog/Dialog.stories.d.ts +343 -0
  40. package/dist/components/Dialog/Dialog.stories.js +59 -0
  41. package/dist/components/Dialog/Title.js +1 -1
  42. package/dist/components/Icon/Icon.d.ts +18 -0
  43. package/dist/components/Icon/Icon.js +95 -0
  44. package/dist/components/IconButton/IconButton.d.ts +3 -3
  45. package/dist/components/IconButton/IconButton.js +54 -65
  46. package/dist/components/Input/Input.d.ts +44 -0
  47. package/dist/components/Input/Input.js +497 -0
  48. package/dist/components/Input/Input.stories.d.ts +43 -0
  49. package/dist/components/Input/Input.stories.js +106 -0
  50. package/dist/components/LoadingSpinner/LoadingSpinner.d.ts +2 -0
  51. package/dist/components/LoadingSpinner/LoadingSpinner.stories.d.ts +14 -0
  52. package/dist/components/LoadingSpinner/LoadingSpinner.stories.js +38 -0
  53. package/dist/components/PageHeader/PageHeader.d.ts +25 -15
  54. package/dist/components/PageHeader/PageHeader.js +32 -50
  55. package/dist/components/PageHeader/PageHeader.stories.d.ts +43 -0
  56. package/dist/components/PageHeader/PageHeader.stories.js +49 -0
  57. package/dist/components/Pagination/Pagination.d.ts +1 -1
  58. package/dist/components/Pagination/Pagination.js +47 -47
  59. package/dist/components/Skeleton/Skeleton.d.ts +18 -0
  60. package/dist/components/Skeleton/Skeleton.js +26 -0
  61. package/dist/components/Snackbar/Snackbar.d.ts +13 -0
  62. package/dist/components/Snackbar/Snackbar.js +622 -0
  63. package/dist/components/SortTooltip/SortTooltip.d.ts +26 -0
  64. package/dist/components/SortTooltip/SortTooltip.js +67 -1
  65. package/dist/components/Stepper/Stepper.d.ts +16 -0
  66. package/dist/components/Stepper/Stepper.js +33 -0
  67. package/dist/components/Table/Table.d.ts +39 -0
  68. package/dist/components/Table/Table.js +122 -1
  69. package/dist/components/Table/TableContext.d.ts +19 -0
  70. package/dist/components/Table/TableContext.js +21 -1
  71. package/dist/components/Tabs/Tab.d.ts +1 -1
  72. package/dist/components/Tabs/Tab.js +5 -5
  73. package/dist/components/Tabs/TabPanel.d.ts +1 -1
  74. package/dist/components/Tabs/TabPanel.js +4 -4
  75. package/dist/components/Tabs/Tabs.d.ts +1 -1
  76. package/dist/components/Tabs/Tabs.js +3 -3
  77. package/dist/components/Toggle/Toggle.d.ts +14 -0
  78. package/dist/components/Toggle/Toggle.js +256 -0
  79. package/dist/components/Tooltip/Tooltip.d.ts +17 -0
  80. package/dist/components/Tooltip/Tooltip.js +1366 -1
  81. package/dist/components/Typography/Typography.d.ts +14 -5
  82. package/dist/components/Typography/Typography.js +76 -59
  83. package/dist/components/Typography/Typography.stories.d.ts +31 -0
  84. package/dist/components/Typography/Typography.stories.js +30 -0
  85. package/dist/components/Typography/typography.test.d.ts +1 -0
  86. package/dist/components/Typography/typography.test.js +11357 -0
  87. package/dist/index-BNWbc5Kh.js +19628 -0
  88. package/dist/{index-BvA1HyDs.js → index-CqjC7P5Y.js} +91 -95
  89. package/dist/magic-string.es-O_8lTkE3.js +738 -0
  90. package/dist/main.d.ts +16 -7
  91. package/dist/main.js +50 -28
  92. package/dist/objectWithoutPropertiesLoose-D7Cp0Pg_.js +26 -0
  93. package/dist/test-utils/assertStyles.d.ts +1 -0
  94. package/dist/test-utils/assertStyles.js +11 -0
  95. package/dist/types/helpers.d.ts +8 -0
  96. package/dist/useButton-Bc8IAgyk.js +106 -0
  97. package/dist/{useCompoundItem-wTwXbURC.js → useCompoundItem-CTYi5M_E.js} +1 -1
  98. package/dist/useIsFocusVisible-BH4IAdcw.js +69 -0
  99. package/dist/useTimeout-DxF9kiZL.js +36 -0
  100. package/dist/utils/styleStrings.d.ts +6 -0
  101. package/dist/utils/styleStrings.js +10 -0
  102. package/dist/utils/styleStrings.test.d.ts +1 -0
  103. package/dist/utils/styleStrings.test.js +41 -0
  104. package/dist/vi.Y_w82WR8-Df0JUamG.js +9860 -0
  105. package/package.json +30 -9
  106. package/dist/Dialog.module-BKWFakxu.js +0 -15
  107. package/dist/objectWithoutPropertiesLoose-ClNcje2_.js +0 -22
  108. package/dist/useButton-abQpo0za.js +0 -187
@@ -0,0 +1,43 @@
1
+ import { StoryObj } from '@storybook/react';
2
+
3
+ declare const meta: {
4
+ title: string;
5
+ component: ({ label, infoMessage, errorMessage, leftIcon, rightIcon, id, disabled, type, maxLength, hideCharsCounter, onChange, classNameWrapper, classNameLabel, classNameInput, classNameInfoMessage, classNameErrorMessage, classNameCharsCounter, "data-testid-wrapper": testIdWrapper, "data-testid-label": testIdLabel, "data-testid-input": testIdInput, "data-testid-infoMessage": testIdInfoMessage, "data-testid-errorMessage": testIdErrorMessage, "data-testid-charsCounter": testIdCharsCounter, ...rest }: import('react').InputHTMLAttributes<HTMLInputElement> & {
6
+ label?: string | undefined;
7
+ infoMessage?: string | undefined;
8
+ errorMessage?: string | undefined;
9
+ leftIcon?: import('react').ReactNode;
10
+ rightIcon?: import('react').ReactNode;
11
+ type?: "text" | "password" | undefined;
12
+ hideCharsCounter?: boolean | undefined;
13
+ classNameWrapper?: string | undefined;
14
+ classNameLabel?: string | undefined;
15
+ classNameInput?: string | undefined;
16
+ classNameInfoMessage?: string | undefined;
17
+ classNameErrorMessage?: string | undefined;
18
+ classNameCharsCounter?: string | undefined;
19
+ 'data-testid-wrapper'?: string | undefined;
20
+ 'data-testid-label'?: string | undefined;
21
+ 'data-testid-input'?: string | undefined;
22
+ 'data-testid-infoMessage'?: string | undefined;
23
+ 'data-testid-errorMessage'?: string | undefined;
24
+ 'data-testid-charsCounter'?: string | undefined;
25
+ }) => import("react/jsx-runtime").JSX.Element;
26
+ tags: string[];
27
+ parameters: {
28
+ layout: string;
29
+ };
30
+ };
31
+ export default meta;
32
+ type Story = StoryObj<typeof meta>;
33
+ export declare const Simple: Story;
34
+ export declare const WithLabel: Story;
35
+ export declare const WithPlaceholder: Story;
36
+ export declare const Disabled: Story;
37
+ export declare const WithMaxLength: Story;
38
+ export declare const WithMaxLengthAndHideCharsCounter: Story;
39
+ export declare const WithLeftIcon: Story;
40
+ export declare const WithRightIconAndClickEvent: Story;
41
+ export declare const WithBothIcons: Story;
42
+ export declare const WithInfoMessage: Story;
43
+ export declare const WithErrorMessage: Story;
@@ -0,0 +1,106 @@
1
+ import { jsx as a } from "react/jsx-runtime";
2
+ import { useState as t } from "react";
3
+ import { Input as n } from "./Input.js";
4
+ const m = {
5
+ title: "Components/Input",
6
+ component: n,
7
+ tags: ["autodocs"],
8
+ parameters: {
9
+ layout: "padded"
10
+ }
11
+ }, g = {
12
+ args: {}
13
+ }, u = {
14
+ name: "With label",
15
+ args: {
16
+ label: "What is your name?"
17
+ }
18
+ }, W = {
19
+ name: "With placeholder",
20
+ args: {
21
+ label: "What is your name?",
22
+ placeholder: "What is your name?"
23
+ }
24
+ }, d = {
25
+ args: {
26
+ label: "What is your name?",
27
+ value: "Marola DS",
28
+ disabled: !0
29
+ }
30
+ }, p = {
31
+ name: "With max length",
32
+ args: {
33
+ label: "What is your name?",
34
+ infoMessage: "Text length counter",
35
+ maxLength: 10
36
+ }
37
+ }, y = {
38
+ name: "With max length and no chars counter",
39
+ args: {
40
+ label: "What is your name?",
41
+ infoMessage: "Text length counter",
42
+ maxLength: 10,
43
+ hideCharsCounter: !0
44
+ }
45
+ }, f = {
46
+ name: "With left icon",
47
+ args: {
48
+ label: "What is your name?",
49
+ placeholder: "Hey, I have an icon!",
50
+ leftIcon: "😁"
51
+ }
52
+ }, b = {
53
+ name: "With right icon and click event",
54
+ render: () => {
55
+ const [o, s] = t(""), [r, h] = t(!1);
56
+ return /* @__PURE__ */ a(
57
+ n,
58
+ {
59
+ label: "What is your name?",
60
+ placeholder: "What is your name?",
61
+ type: r ? "text" : "password",
62
+ rightIcon: /* @__PURE__ */ a("span", { style: { cursor: "pointer" }, onClick: () => h((e) => !e), children: "😁" }),
63
+ value: o,
64
+ onChange: (e) => s(e.target.value),
65
+ infoMessage: "Type something and click on the icon"
66
+ }
67
+ );
68
+ }
69
+ }, x = {
70
+ name: "With both icons",
71
+ args: {
72
+ label: "What is your name?",
73
+ placeholder: "Hey, I have icons!",
74
+ leftIcon: "😁",
75
+ rightIcon: "😁"
76
+ }
77
+ }, I = {
78
+ name: "With info message",
79
+ args: {
80
+ label: "What is your name?",
81
+ placeholder: "What is your name?",
82
+ infoMessage: "The name must have less than 50 chars"
83
+ }
84
+ }, M = {
85
+ name: "With error message",
86
+ args: {
87
+ label: "What is your name?",
88
+ placeholder: "What is your name?",
89
+ infoMessage: "The name must have less than 50 chars",
90
+ errorMessage: "Invalid name"
91
+ }
92
+ };
93
+ export {
94
+ d as Disabled,
95
+ g as Simple,
96
+ x as WithBothIcons,
97
+ M as WithErrorMessage,
98
+ I as WithInfoMessage,
99
+ u as WithLabel,
100
+ f as WithLeftIcon,
101
+ p as WithMaxLength,
102
+ y as WithMaxLengthAndHideCharsCounter,
103
+ W as WithPlaceholder,
104
+ b as WithRightIconAndClickEvent,
105
+ m as default
106
+ };
@@ -1,5 +1,7 @@
1
1
  export interface LoadingSpinnerProps {
2
+ /** Whether to invert colours or not */
2
3
  invert?: boolean;
4
+ /** Space seperated list of CSS classes to apply */
3
5
  classNames?: string;
4
6
  }
5
7
  export declare const LoadingSpinner: ({ invert, classNames }: LoadingSpinnerProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,14 @@
1
+ import { StoryObj } from '@storybook/react';
2
+
3
+ declare const meta: {
4
+ title: string;
5
+ component: ({ invert, classNames }: import('./LoadingSpinner').LoadingSpinnerProps) => import("react/jsx-runtime").JSX.Element;
6
+ tags: string[];
7
+ decorators: ((Story: import('@storybook/types').PartialStoryFn<import('@storybook/react').ReactRenderer, {
8
+ invert?: boolean | undefined;
9
+ classNames?: string | undefined;
10
+ }>) => import("react/jsx-runtime").JSX.Element)[];
11
+ };
12
+ export default meta;
13
+ type Story = StoryObj<typeof meta>;
14
+ export declare const Simple: Story;
@@ -0,0 +1,38 @@
1
+ import '../../assets/global.css';
2
+ import { jsx as t } from "react/jsx-runtime";
3
+ /* empty css */
4
+ import "../Button/Button.js";
5
+ import "react";
6
+ import "../Dialog/Backdrop.js";
7
+ import "../Typography/Typography.js";
8
+ import "../IconButton/IconButton.js";
9
+ import { LoadingSpinner as i } from "./LoadingSpinner.js";
10
+ import "../Table/Table.js";
11
+ import "../Tabs/Tabs.js";
12
+ const g = {
13
+ title: "Components/LoadingSpinner",
14
+ component: i,
15
+ tags: ["autodocs"],
16
+ decorators: [
17
+ (o) => /* @__PURE__ */ t(
18
+ "div",
19
+ {
20
+ style: {
21
+ backgroundColor: "#423755",
22
+ width: "5em",
23
+ height: "5em",
24
+ display: "flex",
25
+ justifyContent: "center",
26
+ alignItems: "center"
27
+ },
28
+ children: /* @__PURE__ */ t(o, {})
29
+ }
30
+ )
31
+ ]
32
+ }, f = {
33
+ args: {}
34
+ };
35
+ export {
36
+ f as Simple,
37
+ g as default
38
+ };
@@ -2,25 +2,35 @@ import { RequireAllOrNone } from '../../types/helpers';
2
2
  import { ReactNode } from 'react';
3
3
 
4
4
  type PageHeaderCommonProps = {
5
+ /** Title text */
5
6
  title: string;
7
+ /** Subtitle text */
6
8
  subtitle?: string;
7
- rightChildren?: ReactNode;
8
- bottomChildren?: ReactNode;
9
+ /** Back link text */
9
10
  backLinkText?: string;
11
+ /** Callback called when `back link` is clicked */
10
12
  onBackLinkClick?: () => void;
11
- wrapperClassName?: string;
12
- backLinkClassName?: string;
13
- titleClassName?: string;
14
- subtitleClassName?: string;
15
- rightChildrenClassName?: string;
16
- bottomChildrenClassName?: string;
17
- wrapperTestId?: string;
18
- backLinkTestId?: string;
19
- titleTestId?: string;
20
- subtitleTestId?: string;
21
- rightChildrenTestId?: string;
22
- bottomChildrenTestId?: string;
13
+ /** Element to be rendered on the right slot of the component */
14
+ rightChildren?: ReactNode;
15
+ /** Element to be rendered on the bottom slot of the component */
16
+ bottomChildren?: ReactNode;
17
+ /** CSS classes to be applied on the container element */
18
+ classNameWrapper?: string;
19
+ /** CSS classes to be applied on the back link element */
20
+ classNameBackLink?: string;
21
+ /** CSS classes to be applied on the title element */
22
+ classNameTitle?: string;
23
+ /** CSS classes to be applied on the subtitle element */
24
+ classNameSubtitle?: string;
25
+ /** Id to be applied as `data-testid` on the container element */
26
+ 'data-testid-wrapper'?: string;
27
+ /** Id to be applied as `data-testid` on the back link element */
28
+ 'data-testid-backLink'?: string;
29
+ /** Id to be applied as `data-testid` on the title element */
30
+ 'data-testid-title'?: string;
31
+ /** Id to be applied as `data-testid` on the subtitle element */
32
+ 'data-testid-subtitle'?: string;
23
33
  };
24
34
  type PageHeaderProps = RequireAllOrNone<PageHeaderCommonProps, 'backLinkText' | 'onBackLinkClick'>;
25
- export declare const PageHeader: ({ title, subtitle, backLinkText, onBackLinkClick, rightChildren, bottomChildren, wrapperClassName, backLinkClassName, titleClassName, subtitleClassName, rightChildrenClassName, bottomChildrenClassName, wrapperTestId, backLinkTestId, titleTestId, subtitleTestId, rightChildrenTestId, bottomChildrenTestId, ...rest }: PageHeaderProps) => import("react/jsx-runtime").JSX.Element;
35
+ export declare const PageHeader: ({ title, subtitle, backLinkText, onBackLinkClick, rightChildren, bottomChildren, classNameWrapper, classNameBackLink, classNameTitle, classNameSubtitle, "data-testid-wrapper": wrapperTestId, "data-testid-backLink": backLinkTestId, "data-testid-title": titleTestId, "data-testid-subtitle": subtitleTestId, ...rest }: PageHeaderProps) => import("react/jsx-runtime").JSX.Element;
26
36
  export {};
@@ -1,69 +1,51 @@
1
1
  import '../../assets/PageHeader.css';
2
- import { jsxs as c, jsx as t } from "react/jsx-runtime";
3
- import { c as a } from "../../clsx-DB4S2d7J.js";
4
- import * as i from "react";
5
- const C = (n) => /* @__PURE__ */ i.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 448 512", "data-waves-icon": "fa/solid/arrow-left", fill: "currentColor", color: "currentColor", width: "1em", height: "1em", style: {
2
+ import { jsxs as a, jsx as t } from "react/jsx-runtime";
3
+ import { c as n } from "../../clsx-DB4S2d7J.js";
4
+ import * as _ from "react";
5
+ const w = (c) => /* @__PURE__ */ _.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 448 512", "data-waves-icon": "fa/solid/arrow-left", fill: "currentColor", color: "currentColor", width: "1em", height: "1em", style: {
6
6
  fill: "currentcolor",
7
7
  color: "currentcolor",
8
8
  width: "1em",
9
9
  height: "1em"
10
- }, ...n }, /* @__PURE__ */ i.createElement("path", { d: "M447.1 256C447.1 273.7 433.7 288 416 288H109.3l105.4 105.4c12.5 12.5 12.5 32.75 0 45.25C208.4 444.9 200.2 448 192 448s-16.38-3.125-22.62-9.375l-160-160c-12.5-12.5-12.5-32.75 0-45.25l160-160c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25L109.3 224H416C433.7 224 447.1 238.3 447.1 256z" })), y = C, H = "_title_cz9x0_46", j = "_subtitle_cz9x0_47", e = {
10
+ }, ...c }, /* @__PURE__ */ _.createElement("path", { d: "M447.1 256C447.1 273.7 433.7 288 416 288H109.3l105.4 105.4c12.5 12.5 12.5 32.75 0 45.25C208.4 444.9 200.2 448 192 448s-16.38-3.125-22.62-9.375l-160-160c-12.5-12.5-12.5-32.75 0-45.25l160-160c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25L109.3 224H416C433.7 224 447.1 238.3 447.1 256z" })), z = "_title_cz9x0_46", b = "_subtitle_cz9x0_47", e = {
11
11
  "page-header": "_page-header_cz9x0_1",
12
12
  "page-header__top-content": "_page-header__top-content_cz9x0_10",
13
13
  "page-header__main-content": "_page-header__main-content_cz9x0_13",
14
14
  "page-header__bottom-content": "_page-header__bottom-content_cz9x0_13",
15
15
  "page-header__main-left-content": "_page-header__main-left-content_cz9x0_40",
16
- title: H,
17
- subtitle: j,
16
+ title: z,
17
+ subtitle: b,
18
18
  "page-header__main-right-content": "_page-header__main-right-content_cz9x0_64"
19
- }, L = ({
20
- title: n,
21
- subtitle: s,
19
+ }, y = ({
20
+ title: c,
21
+ subtitle: d,
22
22
  backLinkText: r,
23
- onBackLinkClick: d,
24
- rightChildren: o,
25
- bottomChildren: _,
26
- wrapperClassName: l,
27
- backLinkClassName: h,
28
- titleClassName: m,
29
- subtitleClassName: p,
30
- rightChildrenClassName: g,
31
- bottomChildrenClassName: f,
32
- wrapperTestId: x,
33
- backLinkTestId: u,
34
- titleTestId: v,
35
- subtitleTestId: w,
36
- rightChildrenTestId: z,
37
- bottomChildrenTestId: N,
38
- ...b
39
- }) => /* @__PURE__ */ c("div", { className: a([e["page-header"], l]), "data-testid": x, ...b, children: [
40
- r && /* @__PURE__ */ t("div", { className: e["page-header__top-content"], children: /* @__PURE__ */ c("button", { type: "button", onClick: d, className: h, "data-testid": u, children: [
41
- /* @__PURE__ */ t(y, { fontSize: 16 }),
23
+ onBackLinkClick: s,
24
+ rightChildren: i,
25
+ bottomChildren: o,
26
+ classNameWrapper: l,
27
+ classNameBackLink: h,
28
+ classNameTitle: m,
29
+ classNameSubtitle: p,
30
+ "data-testid-wrapper": g,
31
+ "data-testid-backLink": x,
32
+ "data-testid-title": f,
33
+ "data-testid-subtitle": u,
34
+ ...v
35
+ }) => /* @__PURE__ */ a("div", { className: n([e["page-header"], l]), "data-testid": g, ...v, children: [
36
+ r && /* @__PURE__ */ t("div", { className: e["page-header__top-content"], children: /* @__PURE__ */ a("button", { type: "button", onClick: s, className: h, "data-testid": x, children: [
37
+ /* @__PURE__ */ t(w, { fontSize: 16 }),
42
38
  r
43
39
  ] }) }),
44
- /* @__PURE__ */ c("div", { className: e["page-header__main-content"], children: [
45
- /* @__PURE__ */ c("div", { className: e["page-header__main-left-content"], children: [
46
- /* @__PURE__ */ t("h1", { className: a(e.title, m), "data-testid": v, children: n }),
47
- /* @__PURE__ */ t("h3", { className: a(e.subtitle, p), "data-testid": w, children: s })
40
+ /* @__PURE__ */ a("div", { className: e["page-header__main-content"], children: [
41
+ /* @__PURE__ */ a("div", { className: e["page-header__main-left-content"], children: [
42
+ /* @__PURE__ */ t("h1", { className: n(e.title, m), "data-testid": f, children: c }),
43
+ /* @__PURE__ */ t("h2", { className: n(e.subtitle, p), "data-testid": u, children: d })
48
44
  ] }),
49
- o && /* @__PURE__ */ t(
50
- "div",
51
- {
52
- className: a(e["page-header__main-right-content"], g),
53
- "data-testid": z,
54
- children: o
55
- }
56
- )
45
+ i && /* @__PURE__ */ t("div", { className: e["page-header__main-right-content"], children: i })
57
46
  ] }),
58
- _ && /* @__PURE__ */ t(
59
- "div",
60
- {
61
- className: a(e["page-header__bottom-content"], f),
62
- "data-testid": N,
63
- children: _
64
- }
65
- )
47
+ o && /* @__PURE__ */ t("div", { className: e["page-header__bottom-content"], children: o })
66
48
  ] });
67
49
  export {
68
- L as PageHeader
50
+ y as PageHeader
69
51
  };
@@ -0,0 +1,43 @@
1
+ import { StoryObj } from '@storybook/react';
2
+
3
+ declare const meta: {
4
+ title: string;
5
+ component: ({ title, subtitle, backLinkText, onBackLinkClick, rightChildren, bottomChildren, classNameWrapper, classNameBackLink, classNameTitle, classNameSubtitle, "data-testid-wrapper": wrapperTestId, "data-testid-backLink": backLinkTestId, "data-testid-title": titleTestId, "data-testid-subtitle": subtitleTestId, ...rest }: (Required<Pick<{
6
+ title: string;
7
+ subtitle?: string | undefined;
8
+ backLinkText?: string | undefined;
9
+ onBackLinkClick?: (() => void) | undefined;
10
+ rightChildren?: import('react').ReactNode;
11
+ bottomChildren?: import('react').ReactNode;
12
+ classNameWrapper?: string | undefined;
13
+ classNameBackLink?: string | undefined;
14
+ classNameTitle?: string | undefined;
15
+ classNameSubtitle?: string | undefined;
16
+ 'data-testid-wrapper'?: string | undefined;
17
+ 'data-testid-backLink'?: string | undefined;
18
+ 'data-testid-title'?: string | undefined;
19
+ 'data-testid-subtitle'?: string | undefined;
20
+ }, "backLinkText" | "onBackLinkClick">> | Partial<Record<"backLinkText" | "onBackLinkClick", never>>) & Omit<{
21
+ title: string;
22
+ subtitle?: string | undefined;
23
+ backLinkText?: string | undefined;
24
+ onBackLinkClick?: (() => void) | undefined;
25
+ rightChildren?: import('react').ReactNode;
26
+ bottomChildren?: import('react').ReactNode;
27
+ classNameWrapper?: string | undefined;
28
+ classNameBackLink?: string | undefined;
29
+ classNameTitle?: string | undefined;
30
+ classNameSubtitle?: string | undefined;
31
+ 'data-testid-wrapper'?: string | undefined;
32
+ 'data-testid-backLink'?: string | undefined;
33
+ 'data-testid-title'?: string | undefined;
34
+ 'data-testid-subtitle'?: string | undefined;
35
+ }, "backLinkText" | "onBackLinkClick">) => import("react/jsx-runtime").JSX.Element;
36
+ tags: string[];
37
+ };
38
+ export default meta;
39
+ type Story = StoryObj<typeof meta>;
40
+ export declare const Simple: Story;
41
+ export declare const WithBackLink: Story;
42
+ export declare const WithRightChildren: Story;
43
+ export declare const WithBottomChildren: Story;
@@ -0,0 +1,49 @@
1
+ import { jsx as t, jsxs as n } from "react/jsx-runtime";
2
+ import { Button as r } from "../Button/Button.js";
3
+ import { Tab as e } from "../Tabs/Tab.js";
4
+ import { TabPanel as a } from "../Tabs/TabPanel.js";
5
+ import { Tabs as o } from "../Tabs/Tabs.js";
6
+ import { PageHeader as l } from "./PageHeader.js";
7
+ const g = {
8
+ title: "Components/PageHeader",
9
+ component: l,
10
+ tags: ["autodocs"]
11
+ }, c = {
12
+ args: {
13
+ title: "Marola Design System",
14
+ subtitle: "A Pismo design system"
15
+ }
16
+ }, i = {
17
+ name: "With back link",
18
+ args: {
19
+ ...c.args,
20
+ backLinkText: "Back",
21
+ onBackLinkClick: () => alert("Back button clicked!")
22
+ }
23
+ }, u = {
24
+ name: "With right children",
25
+ args: {
26
+ ...i.args,
27
+ rightChildren: /* @__PURE__ */ t(r, { variant: "quick", onClick: () => alert("button clicked"), children: "Click me!" })
28
+ }
29
+ }, p = {
30
+ name: "With bottom children",
31
+ args: {
32
+ ...i.args,
33
+ bottomChildren: /* @__PURE__ */ n(o, { children: [
34
+ /* @__PURE__ */ t(e, { value: "1", children: "Tab 1" }),
35
+ /* @__PURE__ */ t(e, { value: "2", children: "Tab 2" }),
36
+ /* @__PURE__ */ t(e, { value: "3", children: "Tab 3" }),
37
+ /* @__PURE__ */ t(a, { value: "1", children: "Tab 1 content" }),
38
+ /* @__PURE__ */ t(a, { value: "2", children: "Tab 2 content" }),
39
+ /* @__PURE__ */ t(a, { value: "3", children: "Tab 3 content" })
40
+ ] })
41
+ }
42
+ };
43
+ export {
44
+ c as Simple,
45
+ i as WithBackLink,
46
+ p as WithBottomChildren,
47
+ u as WithRightChildren,
48
+ g as default
49
+ };
@@ -29,7 +29,7 @@ export type PaginationProps = {
29
29
  language?: PaginationLanguages;
30
30
  t?: PaginationTranslations;
31
31
  } & PaginationParams & PaginationCommonProps;
32
- export declare const defaultTranslations: {
32
+ export declare const paginationDefaultTranslations: {
33
33
  [key in PaginationLanguages]: PaginationTranslations;
34
34
  };
35
35
  export declare const Pagination: (props: PaginationProps) => import("react/jsx-runtime").JSX.Element;