@pismo/marola 0.0.1-alpha.1 → 0.0.1-alpha.11

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 (124) hide show
  1. package/README.md +17 -5
  2. package/dist/Button-B1umG8kJ.js +131 -0
  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/Tab-CRwnhsj5.js +254 -0
  7. package/dist/Tabs.module-yYcTJnj6.js +103 -0
  8. package/dist/_commonjsHelpers-CT_km90n.js +30 -0
  9. package/dist/assets/Advice.css +1 -0
  10. package/dist/assets/Button.css +1 -0
  11. package/dist/assets/Checkbox.css +1 -0
  12. package/dist/assets/Dialog.css +1 -1
  13. package/dist/assets/IconButton.css +1 -0
  14. package/dist/assets/Input.css +1 -0
  15. package/dist/assets/InputSearch.css +1 -0
  16. package/dist/assets/LoadingSpinner.css +1 -1
  17. package/dist/assets/PageHeader.css +1 -0
  18. package/dist/assets/Pagination.css +1 -0
  19. package/dist/assets/Skeleton.css +1 -0
  20. package/dist/assets/Snackbar.css +1 -0
  21. package/dist/assets/SortTooltip.css +1 -0
  22. package/dist/assets/Stepper.css +1 -0
  23. package/dist/assets/Table.css +1 -0
  24. package/dist/assets/Tabs.css +1 -0
  25. package/dist/assets/Toggle.css +1 -0
  26. package/dist/assets/Tooltip.css +1 -0
  27. package/dist/assets/Typography.css +1 -1
  28. package/dist/assets/global.css +1 -0
  29. package/dist/components/Advice/Advice.d.ts +16 -0
  30. package/dist/components/Advice/Advice.js +25 -0
  31. package/dist/components/Button/Button.d.ts +29 -0
  32. package/dist/components/Button/Button.js +70 -0
  33. package/dist/components/Button/Button.stories.d.ts +60 -0
  34. package/dist/components/Button/Button.stories.js +40 -0
  35. package/dist/components/Checkbox/Checkbox.d.ts +19 -0
  36. package/dist/components/Checkbox/Checkbox.js +56 -0
  37. package/dist/components/Dialog/Actions.js +1 -1
  38. package/dist/components/Dialog/Backdrop.d.ts +1 -1
  39. package/dist/components/Dialog/Backdrop.js +2 -9
  40. package/dist/components/Dialog/CloseIconButton.js +11 -10
  41. package/dist/components/Dialog/Dialog.d.ts +5 -4
  42. package/dist/components/Dialog/Dialog.js +419 -20077
  43. package/dist/components/Dialog/Dialog.stories.d.ts +343 -0
  44. package/dist/components/Dialog/Dialog.stories.js +59 -0
  45. package/dist/components/Dialog/Title.js +22 -7
  46. package/dist/components/Icon/Icon.d.ts +18 -0
  47. package/dist/components/Icon/Icon.js +95 -0
  48. package/dist/components/IconButton/IconButton.d.ts +22 -0
  49. package/dist/components/IconButton/IconButton.js +68 -0
  50. package/dist/components/Input/Input.d.ts +44 -0
  51. package/dist/components/Input/Input.js +497 -0
  52. package/dist/components/Input/Input.stories.d.ts +43 -0
  53. package/dist/components/Input/Input.stories.js +106 -0
  54. package/dist/components/InputSearch/InputSearch.d.ts +11 -0
  55. package/dist/components/InputSearch/InputSearch.js +29 -0
  56. package/dist/components/InputSearch/InputSearch.stories.d.ts +22 -0
  57. package/dist/components/InputSearch/InputSearch.stories.js +36 -0
  58. package/dist/components/LoadingSpinner/LoadingSpinner.d.ts +2 -0
  59. package/dist/components/LoadingSpinner/LoadingSpinner.js +12 -13
  60. package/dist/components/LoadingSpinner/LoadingSpinner.stories.d.ts +14 -0
  61. package/dist/components/LoadingSpinner/LoadingSpinner.stories.js +38 -0
  62. package/dist/components/PageHeader/PageHeader.d.ts +36 -0
  63. package/dist/components/PageHeader/PageHeader.js +51 -0
  64. package/dist/components/PageHeader/PageHeader.stories.d.ts +43 -0
  65. package/dist/components/PageHeader/PageHeader.stories.js +49 -0
  66. package/dist/components/Pagination/Pagination.d.ts +36 -0
  67. package/dist/components/Pagination/Pagination.js +219 -0
  68. package/dist/components/Skeleton/Skeleton.d.ts +18 -0
  69. package/dist/components/Skeleton/Skeleton.js +26 -0
  70. package/dist/components/Snackbar/Snackbar.d.ts +13 -0
  71. package/dist/components/Snackbar/Snackbar.js +622 -0
  72. package/dist/components/SortTooltip/SortTooltip.d.ts +26 -0
  73. package/dist/components/SortTooltip/SortTooltip.js +67 -0
  74. package/dist/components/Stepper/Stepper.d.ts +16 -0
  75. package/dist/components/Stepper/Stepper.js +33 -0
  76. package/dist/components/Table/Table.d.ts +39 -0
  77. package/dist/components/Table/Table.js +122 -0
  78. package/dist/components/Table/TableContext.d.ts +19 -0
  79. package/dist/components/Table/TableContext.js +21 -0
  80. package/dist/components/Tabs/Tab.d.ts +9 -0
  81. package/dist/components/Tabs/Tab.js +8 -0
  82. package/dist/components/Tabs/TabPanel.d.ts +8 -0
  83. package/dist/components/Tabs/TabPanel.js +118 -0
  84. package/dist/components/Tabs/Tabs.d.ts +11 -0
  85. package/dist/components/Tabs/Tabs.js +827 -0
  86. package/dist/components/Toggle/Toggle.d.ts +11 -0
  87. package/dist/components/Toggle/Toggle.js +252 -0
  88. package/dist/components/Toggle/Toggle.stories.d.ts +21 -0
  89. package/dist/components/Toggle/Toggle.stories.js +33 -0
  90. package/dist/components/Tooltip/Tooltip.d.ts +17 -0
  91. package/dist/components/Tooltip/Tooltip.js +1366 -0
  92. package/dist/components/Typography/Typography.d.ts +15 -6
  93. package/dist/components/Typography/Typography.js +75 -67
  94. package/dist/components/Typography/Typography.stories.d.ts +31 -0
  95. package/dist/components/Typography/Typography.stories.js +30 -0
  96. package/dist/components/Typography/typography.test.d.ts +1 -0
  97. package/dist/components/Typography/typography.test.js +11357 -0
  98. package/dist/index-BNWbc5Kh.js +19628 -0
  99. package/dist/index-CqjC7P5Y.js +814 -0
  100. package/dist/magic-string.es-O_8lTkE3.js +738 -0
  101. package/dist/main.d.ts +18 -2
  102. package/dist/main.js +57 -15
  103. package/dist/objectWithoutPropertiesLoose-D7Cp0Pg_.js +26 -0
  104. package/dist/test-utils/assertStyles.d.ts +1 -0
  105. package/dist/test-utils/assertStyles.js +11 -0
  106. package/dist/types/helpers.d.ts +14 -7
  107. package/dist/useButton-Bc8IAgyk.js +106 -0
  108. package/dist/useControlled-CCMYYdCM.js +31 -0
  109. package/dist/useEnhancedEffect-CJGo-L3B.js +5 -0
  110. package/dist/useIsFocusVisible-BH4IAdcw.js +69 -0
  111. package/dist/useTimeout-DxF9kiZL.js +36 -0
  112. package/dist/utils/styleStrings.d.ts +6 -0
  113. package/dist/utils/styleStrings.js +10 -0
  114. package/dist/utils/styleStrings.test.d.ts +1 -0
  115. package/dist/utils/styleStrings.test.js +41 -0
  116. package/dist/vi.Y_w82WR8-Df0JUamG.js +9860 -0
  117. package/package.json +53 -10
  118. package/dist/Button-REznN-RP.js +0 -1139
  119. package/dist/Dialog.module-BO0mdB7d.js +0 -15
  120. package/dist/assets/CallToActionButton.css +0 -1
  121. package/dist/assets/main.css +0 -1
  122. package/dist/components/CallToActionButton/CallToActionButton.d.ts +0 -23
  123. package/dist/components/CallToActionButton/CallToActionButton.js +0 -57
  124. package/src/playground/Playground.tsx +0 -58
@@ -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
+ };
@@ -0,0 +1,11 @@
1
+ import { InputHTMLAttributes } from 'react';
2
+
3
+ type InputSearchProps = InputHTMLAttributes<HTMLInputElement> & {
4
+ label?: string;
5
+ placeholder?: string;
6
+ classNameWrapper?: string;
7
+ classNameInputSearch?: string;
8
+ 'data-testid'?: string;
9
+ };
10
+ export declare const InputSearch: ({ label, placeholder, classNameWrapper, classNameInputSearch, disabled, "data-testid": dataTestId, }: InputSearchProps) => import("react/jsx-runtime").JSX.Element;
11
+ export {};
@@ -0,0 +1,29 @@
1
+ import '../../assets/InputSearch.css';
2
+ import { jsx as t } from "react/jsx-runtime";
3
+ import { c as r } from "../../clsx-DB4S2d7J.js";
4
+ import { Icon as p } from "../Icon/Icon.js";
5
+ import { Input as m } from "../Input/Input.js";
6
+ const u = "_inputSearch_8ayrz_1", a = {
7
+ inputSearch: u
8
+ }, I = ({
9
+ label: n,
10
+ placeholder: c,
11
+ classNameWrapper: s,
12
+ classNameInputSearch: e,
13
+ disabled: i,
14
+ "data-testid": o
15
+ }) => /* @__PURE__ */ t("div", { className: r(a.inputSearch, s), children: /* @__PURE__ */ t(
16
+ m,
17
+ {
18
+ label: n,
19
+ type: "search",
20
+ placeholder: c,
21
+ leftIcon: /* @__PURE__ */ t(p, { icon: "magnifying-glass" }),
22
+ "data-testid": o,
23
+ disabled: i,
24
+ classNameInput: r(a.input, e)
25
+ }
26
+ ) });
27
+ export {
28
+ I as InputSearch
29
+ };
@@ -0,0 +1,22 @@
1
+ import { StoryObj } from '@storybook/react';
2
+
3
+ declare const meta: {
4
+ title: string;
5
+ component: ({ label, placeholder, classNameWrapper, classNameInputSearch, disabled, "data-testid": dataTestId, }: import('react').InputHTMLAttributes<HTMLInputElement> & {
6
+ label?: string | undefined;
7
+ placeholder?: string | undefined;
8
+ classNameWrapper?: string | undefined;
9
+ classNameInputSearch?: string | undefined;
10
+ 'data-testid'?: string | undefined;
11
+ }) => import("react/jsx-runtime").JSX.Element;
12
+ tags: string[];
13
+ parameters: {
14
+ layout: string;
15
+ };
16
+ };
17
+ export default meta;
18
+ type Story = StoryObj<typeof meta>;
19
+ export declare const Simple: Story;
20
+ export declare const WithLabel: Story;
21
+ export declare const WithPlaceholder: Story;
22
+ export declare const Disabled: Story;
@@ -0,0 +1,36 @@
1
+ import { InputSearch as a } from "./InputSearch.js";
2
+ const l = {
3
+ title: "Components/InputSearch",
4
+ component: a,
5
+ tags: ["autodocs"],
6
+ parameters: {
7
+ layout: "padded"
8
+ }
9
+ }, r = {
10
+ args: {}
11
+ }, t = {
12
+ name: "With label",
13
+ args: {
14
+ label: "Search by name or id"
15
+ }
16
+ }, o = {
17
+ name: "With placeholder",
18
+ args: {
19
+ label: "Search",
20
+ placeholder: "Search by name or id"
21
+ }
22
+ }, c = {
23
+ args: {
24
+ label: "Search",
25
+ placeholder: "Search by name or id",
26
+ value: "Marola DS",
27
+ disabled: !0
28
+ }
29
+ };
30
+ export {
31
+ c as Disabled,
32
+ r as Simple,
33
+ t as WithLabel,
34
+ o as WithPlaceholder,
35
+ l as default
36
+ };
@@ -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;
@@ -1,17 +1,16 @@
1
1
  import '../../assets/LoadingSpinner.css';
2
- import { jsxs as o, jsx as s } from "react/jsx-runtime";
3
- import { useMemo as e } from "react";
2
+ import { jsxs as e, jsx as s } from "react/jsx-runtime";
3
+ import { useMemo as o } from "react";
4
4
  import { c as t } from "../../clsx-DB4S2d7J.js";
5
5
  const n = {
6
- "ls-ring": "_ls-ring_19dsy_1",
7
- "ls-ring--invert": "_ls-ring--invert_19dsy_34"
8
- }, c = ({ invert: i = !1, classNames: r }) => {
9
- const l = e(() => t(
10
- [n["ls-ring"]],
11
- { [n["ls-ring--invert"]]: i },
12
- r
13
- ), [r, i]);
14
- return /* @__PURE__ */ o("div", { className: l, children: [
6
+ "ls-ring": "_ls-ring_elvjz_1",
7
+ "ls-ring--invert": "_ls-ring--invert_elvjz_34"
8
+ }, a = ({ invert: i = !1, classNames: r }) => {
9
+ const l = o(
10
+ () => t([n["ls-ring"]], { [n["ls-ring--invert"]]: i }, r),
11
+ [r, i]
12
+ );
13
+ return /* @__PURE__ */ e("div", { className: l, children: [
15
14
  /* @__PURE__ */ s("div", {}),
16
15
  /* @__PURE__ */ s("div", {}),
17
16
  /* @__PURE__ */ s("div", {}),
@@ -19,6 +18,6 @@ const n = {
19
18
  ] });
20
19
  };
21
20
  export {
22
- c as LoadingSpinner,
23
- c as default
21
+ a as LoadingSpinner,
22
+ a as default
24
23
  };
@@ -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
+ };
@@ -0,0 +1,36 @@
1
+ import { RequireAllOrNone } from '../../types/helpers';
2
+ import { ReactNode } from 'react';
3
+
4
+ type PageHeaderCommonProps = {
5
+ /** Title text */
6
+ title: string;
7
+ /** Subtitle text */
8
+ subtitle?: string;
9
+ /** Back link text */
10
+ backLinkText?: string;
11
+ /** Callback called when `back link` is clicked */
12
+ onBackLinkClick?: () => void;
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;
33
+ };
34
+ type PageHeaderProps = RequireAllOrNone<PageHeaderCommonProps, 'backLinkText' | 'onBackLinkClick'>;
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;
36
+ export {};
@@ -0,0 +1,51 @@
1
+ import '../../assets/PageHeader.css';
2
+ import { jsxs as a, jsx as t } from "react/jsx-runtime";
3
+ import { c as r } from "../../clsx-DB4S2d7J.js";
4
+ import * as _ from "react";
5
+ const z = (n) => /* @__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
+ fill: "currentcolor",
7
+ color: "currentcolor",
8
+ width: "1em",
9
+ height: "1em"
10
+ }, ...n }, /* @__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" })), b = "_title_157kz_45", k = "_subtitle_157kz_46", e = {
11
+ "page-header": "_page-header_157kz_1",
12
+ "page-header__top-content": "_page-header__top-content_157kz_9",
13
+ "page-header__main-content": "_page-header__main-content_157kz_12",
14
+ "page-header__bottom-content": "_page-header__bottom-content_157kz_12",
15
+ "page-header__main-left-content": "_page-header__main-left-content_157kz_39",
16
+ title: b,
17
+ subtitle: k,
18
+ "page-header__main-right-content": "_page-header__main-right-content_157kz_63"
19
+ }, C = ({
20
+ title: n,
21
+ subtitle: d,
22
+ backLinkText: c,
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": f,
32
+ "data-testid-title": u,
33
+ "data-testid-subtitle": v,
34
+ ...w
35
+ }) => /* @__PURE__ */ a("div", { className: r([e["page-header"], l]), "data-testid": g, ...w, children: [
36
+ c && /* @__PURE__ */ t("div", { className: e["page-header__top-content"], children: /* @__PURE__ */ a("button", { type: "button", onClick: s, className: h, "data-testid": f, children: [
37
+ /* @__PURE__ */ t(z, { fontSize: 16 }),
38
+ c
39
+ ] }) }),
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: r(e.title, m), "data-testid": u, children: n }),
43
+ /* @__PURE__ */ t("h2", { className: r(e.subtitle, p), "data-testid": v, children: d })
44
+ ] }),
45
+ i && /* @__PURE__ */ t("div", { className: e["page-header__main-right-content"], children: i })
46
+ ] }),
47
+ o && /* @__PURE__ */ t("div", { className: e["page-header__bottom-content"], children: o })
48
+ ] });
49
+ export {
50
+ C as PageHeader
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 { T as e } from "../../Tab-CRwnhsj5.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
+ }, T = {
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
+ T as WithBottomChildren,
47
+ u as WithRightChildren,
48
+ g as default
49
+ };
@@ -0,0 +1,36 @@
1
+ export type PaginationParams = {
2
+ totalItems: number;
3
+ perPage: number;
4
+ currentPage: number;
5
+ };
6
+ export type PaginationTranslations = {
7
+ showing: string;
8
+ of: string;
9
+ results: string;
10
+ previous: string;
11
+ next: string;
12
+ };
13
+ type PaginationLanguages = 'pt' | 'en';
14
+ type PaginationCommonProps = {
15
+ className?: string;
16
+ 'data-testid'?: string;
17
+ classNamePerPage?: string;
18
+ 'data-testid__per-page'?: string;
19
+ classNamePagesNav?: string;
20
+ 'data-testid__pages-nav'?: string;
21
+ };
22
+ export type PaginationProps = {
23
+ perPageOptions?: (number | {
24
+ value: number;
25
+ label: string;
26
+ })[] | undefined;
27
+ onPageChange: (page: number) => void;
28
+ onRowsPerPageChange: (perPage: number | string) => void;
29
+ language?: PaginationLanguages;
30
+ t?: PaginationTranslations;
31
+ } & PaginationParams & PaginationCommonProps;
32
+ export declare const paginationDefaultTranslations: {
33
+ [key in PaginationLanguages]: PaginationTranslations;
34
+ };
35
+ export declare const Pagination: (props: PaginationProps) => import("react/jsx-runtime").JSX.Element;
36
+ export {};