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

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 (84) hide show
  1. package/README.md +13 -2
  2. package/dist/{Button-D--uN90N.js → Button-W6tM-_IT.js} +3 -3
  3. package/dist/Dialog.module-CGVM5V_D.js +15 -0
  4. package/dist/Portal-P3fPvS3-.js +19695 -0
  5. package/dist/{Tabs.module-BKlNuSPH.js → Tabs.module-BA-PC7fA.js} +13 -13
  6. package/dist/_commonjsHelpers-CT_km90n.js +30 -0
  7. package/dist/assets/Advice.css +1 -0
  8. package/dist/assets/Button.css +1 -1
  9. package/dist/assets/Checkbox.css +1 -0
  10. package/dist/assets/Dialog.css +1 -1
  11. package/dist/assets/IconButton.css +1 -1
  12. package/dist/assets/Pagination.css +1 -1
  13. package/dist/assets/Skeleton.css +1 -0
  14. package/dist/assets/SortTooltip.css +1 -0
  15. package/dist/assets/Stepper.css +1 -0
  16. package/dist/assets/Table.css +1 -0
  17. package/dist/assets/Tabs.css +1 -1
  18. package/dist/assets/Tooltip.css +1 -0
  19. package/dist/assets/Typography.css +1 -1
  20. package/dist/assets/{main.css → global.css} +1 -1
  21. package/dist/components/Advice/Advice.d.ts +13 -0
  22. package/dist/components/Advice/Advice.js +25 -0
  23. package/dist/components/Button/Button.d.ts +1 -1
  24. package/dist/components/Button/Button.js +54 -38
  25. package/dist/components/Checkbox/Checkbox.d.ts +17 -0
  26. package/dist/components/Checkbox/Checkbox.js +48 -0
  27. package/dist/components/Dialog/Actions.js +1 -1
  28. package/dist/components/Dialog/Backdrop.d.ts +1 -1
  29. package/dist/components/Dialog/Backdrop.js +1 -1
  30. package/dist/components/Dialog/CloseIconButton.js +12 -124
  31. package/dist/components/Dialog/Dialog.js +417 -20072
  32. package/dist/components/Dialog/Title.js +1 -1
  33. package/dist/components/Icon/Icon.d.ts +7 -0
  34. package/dist/components/Icon/Icon.js +9 -0
  35. package/dist/components/IconButton/IconButton.d.ts +3 -3
  36. package/dist/components/IconButton/IconButton.js +54 -65
  37. package/dist/components/PageHeader/PageHeader.d.ts +25 -15
  38. package/dist/components/PageHeader/PageHeader.js +32 -50
  39. package/dist/components/PageHeader/PageHeader.stories.d.ts +43 -0
  40. package/dist/components/PageHeader/PageHeader.stories.js +49 -0
  41. package/dist/components/Pagination/Pagination.js +38 -38
  42. package/dist/components/Skeleton/Skeleton.d.ts +18 -0
  43. package/dist/components/Skeleton/Skeleton.js +26 -0
  44. package/dist/components/SortTooltip/SortTooltip.d.ts +26 -0
  45. package/dist/components/SortTooltip/SortTooltip.js +67 -1
  46. package/dist/components/Stepper/Stepper.d.ts +16 -0
  47. package/dist/components/Stepper/Stepper.js +33 -0
  48. package/dist/components/Table/Table.d.ts +39 -0
  49. package/dist/components/Table/Table.js +122 -1
  50. package/dist/components/Table/TableContext.d.ts +19 -0
  51. package/dist/components/Table/TableContext.js +21 -1
  52. package/dist/components/Tabs/Tab.d.ts +1 -1
  53. package/dist/components/Tabs/Tab.js +5 -5
  54. package/dist/components/Tabs/TabPanel.d.ts +1 -1
  55. package/dist/components/Tabs/TabPanel.js +4 -4
  56. package/dist/components/Tabs/Tabs.d.ts +1 -1
  57. package/dist/components/Tabs/Tabs.js +3 -3
  58. package/dist/components/Tooltip/Tooltip.d.ts +17 -0
  59. package/dist/components/Tooltip/Tooltip.js +1463 -1
  60. package/dist/components/Typography/Typography.d.ts +13 -4
  61. package/dist/components/Typography/Typography.js +76 -59
  62. package/dist/components/Typography/Typography.stories.d.ts +18 -0
  63. package/dist/components/Typography/Typography.stories.js +30 -0
  64. package/dist/components/Typography/typography.test.d.ts +1 -0
  65. package/dist/components/Typography/typography.test.js +11360 -0
  66. package/dist/{index-BvA1HyDs.js → index-D2P7y2mE.js} +90 -95
  67. package/dist/magic-string.es-O_8lTkE3.js +738 -0
  68. package/dist/main.d.ts +1 -0
  69. package/dist/main.js +30 -28
  70. package/dist/objectWithoutPropertiesLoose-D7Cp0Pg_.js +26 -0
  71. package/dist/react-CGNQ6M5x.js +117 -0
  72. package/dist/test-utils/assertStyles.d.ts +1 -0
  73. package/dist/test-utils/assertStyles.js +11 -0
  74. package/dist/types/helpers.d.ts +8 -0
  75. package/dist/{useButton-abQpo0za.js → useButton-JpyBo5M4.js} +2 -2
  76. package/dist/{useCompoundItem-wTwXbURC.js → useCompoundItem-CTYi5M_E.js} +1 -1
  77. package/dist/utils/styleStrings.d.ts +6 -0
  78. package/dist/utils/styleStrings.js +10 -0
  79. package/dist/utils/styleStrings.test.d.ts +1 -0
  80. package/dist/utils/styleStrings.test.js +41 -0
  81. package/dist/vi.Y_w82WR8-Df0JUamG.js +9860 -0
  82. package/package.json +26 -6
  83. package/dist/Dialog.module-BKWFakxu.js +0 -15
  84. package/dist/objectWithoutPropertiesLoose-ClNcje2_.js +0 -22
@@ -1,6 +1,6 @@
1
1
  import { jsxs as l, Fragment as s, jsx as e } from "react/jsx-runtime";
2
2
  import { Typography as a } from "../Typography/Typography.js";
3
- import { s as r } from "../../Dialog.module-BKWFakxu.js";
3
+ import { s as r } from "../../Dialog.module-CGVM5V_D.js";
4
4
  const n = ({ title: i, subTitle: t }) => /* @__PURE__ */ l(s, { children: [
5
5
  /* @__PURE__ */ e(
6
6
  a,
@@ -0,0 +1,7 @@
1
+ export type IconProps = {
2
+ iconFamily?: string;
3
+ icon: string;
4
+ size?: number | string;
5
+ color?: string;
6
+ };
7
+ export declare const Icon: ({ iconFamily, icon, size, color }: IconProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,9 @@
1
+ import { jsx as s } from "react/jsx-runtime";
2
+ import { W as e } from "../../react-CGNQ6M5x.js";
3
+ const m = ({ iconFamily: o, icon: n, size: r, color: t }) => {
4
+ const c = `${o ?? "fa/duotone"}/${n}`;
5
+ return /* @__PURE__ */ s(e, { icon: c, color: t || "", size: r || "" });
6
+ };
7
+ export {
8
+ m as Icon
9
+ };
@@ -1,7 +1,7 @@
1
1
  import { Either } from '../../types/helpers';
2
2
  import { ReactNode } from 'react';
3
3
 
4
- type variant = "primary" | "square";
4
+ type variant = 'primary' | 'square';
5
5
  type IconButtonCoreProps = {
6
6
  icon: ReactNode;
7
7
  loading?: boolean;
@@ -15,8 +15,8 @@ interface IconButtonPropsWithLink extends IconButtonCoreProps {
15
15
  }
16
16
  interface IconButtonPropsWithOnClick extends IconButtonCoreProps {
17
17
  onClick: () => void;
18
- type?: HTMLButtonElement["type"];
18
+ type?: HTMLButtonElement['type'];
19
19
  }
20
20
  export type IconButtonProps = Either<IconButtonPropsWithLink, IconButtonPropsWithOnClick>;
21
- export declare const IconButton: import('react').ForwardRefExoticComponent<IconButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
21
+ export declare const IconButton: import('react').ForwardRefExoticComponent<IconButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
22
22
  export default IconButton;
@@ -1,78 +1,67 @@
1
1
  import '../../assets/IconButton.css';
2
- import { jsx as n, jsxs as q } from "react/jsx-runtime";
3
- import { forwardRef as h, useMemo as k } from "react";
2
+ import { jsx as e, jsxs as s } from "react/jsx-runtime";
3
+ import { forwardRef as q, useMemo as a } from "react";
4
+ import { c } from "../../clsx-DB4S2d7J.js";
4
5
  import { LoadingSpinner as m } from "../LoadingSpinner/LoadingSpinner.js";
5
- import { c as v } from "../../clsx-DB4S2d7J.js";
6
- import { B as y } from "../../Button-D--uN90N.js";
7
- const f = "_h1_1v5kq_1", p = "_h2_1v5kq_11", g = "_h3_1v5kq_21", w = "_h4_1v5kq_31", x = "_body_1v5kq_41", N = "_quote_1v5kq_75", B = "_form__input_1v5kq_86", j = "_form__hint_1v5kq_91", C = "_form__label_1v5kq_96", I = "_form__dropdown_1v5kq_101", L = "_table__header_1v5kq_107", M = "_table__body_1v5kq_112", R = "_button_1v5kq_123", o = {
8
- h1: f,
9
- "h1--bold": "_h1--bold_1v5kq_7",
6
+ import { B as g } from "../../Button-W6tM-_IT.js";
7
+ const k = "_h1_8qiyf_1", p = "_h2_8qiyf_11", w = "_h3_8qiyf_21", x = "_h4_8qiyf_31", N = "_body_8qiyf_41", v = "_quote_8qiyf_75", B = "_form__input_8qiyf_98", j = "_form__hint_8qiyf_103", C = "_form__label_8qiyf_108", I = "_form__dropdown_8qiyf_113", L = "_table__header_8qiyf_131", M = "_table__body_8qiyf_136", R = "_button_8qiyf_159", o = {
8
+ h1: k,
9
+ "h1--bold": "_h1--bold_8qiyf_7",
10
10
  h2: p,
11
- "h2--bold": "_h2--bold_1v5kq_17",
12
- h3: g,
13
- "h3--bold": "_h3--bold_1v5kq_27",
14
- h4: w,
15
- "h4--bold": "_h4--bold_1v5kq_37",
16
- body: x,
17
- "body--large": "_body--large_1v5kq_46",
18
- "body--medium": "_body--medium_1v5kq_50",
19
- "body--small": "_body--small_1v5kq_54",
20
- "body--tiny": "_body--tiny_1v5kq_58",
21
- "body--bold": "_body--bold_1v5kq_62",
22
- "body--strikethrough": "_body--strikethrough_1v5kq_65",
23
- "body--underlined": "_body--underlined_1v5kq_68",
24
- "body--strikethrough-underlined": "_body--strikethrough-underlined_1v5kq_71",
25
- quote: N,
26
- "quote--large": "_quote--large_1v5kq_80",
11
+ "h2--bold": "_h2--bold_8qiyf_17",
12
+ h3: w,
13
+ "h3--bold": "_h3--bold_8qiyf_27",
14
+ h4: x,
15
+ "h4--bold": "_h4--bold_8qiyf_37",
16
+ body: N,
17
+ "body--large": "_body--large_8qiyf_46",
18
+ "body--medium": "_body--medium_8qiyf_50",
19
+ "body--small": "_body--small_8qiyf_54",
20
+ "body--tiny": "_body--tiny_8qiyf_58",
21
+ "body--bold": "_body--bold_8qiyf_62",
22
+ "body--strikethrough": "_body--strikethrough_8qiyf_65",
23
+ "body--underlined": "_body--underlined_8qiyf_68",
24
+ "body--strikethrough-underlined": "_body--strikethrough-underlined_8qiyf_71",
25
+ quote: v,
26
+ "quote--large": "_quote--large_8qiyf_80",
27
+ "quote--bold": "_quote--bold_8qiyf_85",
28
+ "quote--strikethrough": "_quote--strikethrough_8qiyf_88",
29
+ "quote--underlined": "_quote--underlined_8qiyf_91",
30
+ "quote--strikethrough-underlined": "_quote--strikethrough-underlined_8qiyf_94",
27
31
  form__input: B,
28
32
  form__hint: j,
29
33
  form__label: C,
30
34
  form__dropdown: I,
35
+ "form--bold": "_form--bold_8qiyf_118",
36
+ "form--strikethrough": "_form--strikethrough_8qiyf_121",
37
+ "form--underlined": "_form--underlined_8qiyf_124",
38
+ "form--strikethrough-underlined": "_form--strikethrough-underlined_8qiyf_127",
31
39
  table__header: L,
32
40
  table__body: M,
33
- "table__body--secondary": "_table__body--secondary_1v5kq_117",
41
+ "table__body--secondary": "_table__body--secondary_8qiyf_141",
42
+ "table--bold": "_table--bold_8qiyf_146",
43
+ "table--strikethrough": "_table--strikethrough_8qiyf_149",
44
+ "table--underlined": "_table--underlined_8qiyf_152",
45
+ "table--strikethrough-underlined": "_table--strikethrough-underlined_8qiyf_155",
34
46
  button: R,
35
- "icon-button": "_icon-button_1v5kq_130",
36
- "icon-button--primary": "_icon-button--primary_1v5kq_142",
37
- "icon-button--square": "_icon-button--square_1v5kq_164",
38
- "icon-button__container": "_icon-button__container_1v5kq_180"
39
- }, E = h(
40
- (r, e) => {
41
- const {
42
- onClick: d,
43
- icon: b,
44
- link: i,
45
- loading: l,
46
- children: a,
47
- type: s = "button",
48
- disabled: c,
49
- className: t,
50
- variant: _ = "primary"
51
- } = r, u = k(
52
- () => v([
53
- o["icon-button"],
54
- o[`icon-button--${_}`],
55
- t
56
- ]),
57
- [t, _]
58
- );
59
- return /* @__PURE__ */ n(
60
- y,
61
- {
62
- type: s,
63
- href: i,
64
- onClick: d,
65
- disabled: c,
66
- className: u,
67
- ref: e,
68
- children: /* @__PURE__ */ q("div", { className: o["icon-button__container"], children: [
69
- l ? /* @__PURE__ */ n(m, { invert: !0 }) : b,
70
- _ !== "square" && a
71
- ] })
72
- }
73
- );
74
- }
75
- );
47
+ "button--bold": "_button--bold_8qiyf_165",
48
+ "button--strikethrough": "_button--strikethrough_8qiyf_168",
49
+ "button--underlined": "_button--underlined_8qiyf_171",
50
+ "button--strikethrough-underlined": "_button--strikethrough-underlined_8qiyf_174",
51
+ "icon-button": "_icon-button_8qiyf_178",
52
+ "icon-button--primary": "_icon-button--primary_8qiyf_190",
53
+ "icon-button--square": "_icon-button--square_8qiyf_212",
54
+ "icon-button__container": "_icon-button__container_8qiyf_228"
55
+ }, E = q((i, r) => {
56
+ const { onClick: n, icon: d, link: u, loading: b, children: l, type: y = "button", disabled: f, className: t, variant: _ = "primary" } = i, h = a(
57
+ () => c([o["icon-button"], o[`icon-button--${_}`], t]),
58
+ [t, _]
59
+ );
60
+ return /* @__PURE__ */ e(g, { type: y, href: u, onClick: n, disabled: f, className: h, ref: r, children: /* @__PURE__ */ s("div", { className: o["icon-button__container"], children: [
61
+ b ? /* @__PURE__ */ e(m, { invert: !0 }) : d,
62
+ _ !== "square" && l
63
+ ] }) });
64
+ });
76
65
  export {
77
66
  E as IconButton,
78
67
  E as default
@@ -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
+ };
@@ -1,7 +1,7 @@
1
1
  import '../../assets/Pagination.css';
2
- import { jsxs as P, jsx as i, Fragment as M } from "react/jsx-runtime";
2
+ import { jsxs as x, jsx as i, Fragment as M } from "react/jsx-runtime";
3
3
  import { c as C } from "../../clsx-DB4S2d7J.js";
4
- import { _ as S, a as A } from "../../objectWithoutPropertiesLoose-ClNcje2_.js";
4
+ import { _ as S, a as A } from "../../objectWithoutPropertiesLoose-D7Cp0Pg_.js";
5
5
  import { u as D } from "../../useControlled-CCMYYdCM.js";
6
6
  const E = ["boundaryCount", "componentName", "count", "defaultPage", "disabled", "hideNextButton", "hidePrevButton", "onChange", "page", "showFirstButton", "showLastButton", "siblingCount"];
7
7
  function $(e = {}) {
@@ -11,12 +11,12 @@ function $(e = {}) {
11
11
  count: s = 1,
12
12
  defaultPage: b = 1,
13
13
  disabled: h = !1,
14
- hideNextButton: g = !1,
14
+ hideNextButton: c = !1,
15
15
  hidePrevButton: m = !1,
16
16
  onChange: t,
17
17
  page: o,
18
18
  showFirstButton: p = !1,
19
- showLastButton: x = !1,
19
+ showLastButton: f = !1,
20
20
  siblingCount: u = 1
21
21
  } = e, d = S(e, E), [r, k] = D({
22
22
  controlled: o,
@@ -30,7 +30,7 @@ function $(e = {}) {
30
30
  return Array.from({
31
31
  length: I
32
32
  }, (W, O) => n + O);
33
- }, j = v(1, Math.min(a, s)), f = v(Math.max(s - a + 1, a + 1), s), y = Math.max(
33
+ }, j = v(1, Math.min(a, s)), P = v(Math.max(s - a + 1, a + 1), s), w = Math.max(
34
34
  Math.min(
35
35
  // Natural start
36
36
  r - u,
@@ -47,23 +47,23 @@ function $(e = {}) {
47
47
  a + u * 2 + 2
48
48
  ),
49
49
  // Less than endPages
50
- f.length > 0 ? f[0] - 2 : s - 1
50
+ P.length > 0 ? P[0] - 2 : s - 1
51
51
  ), L = [
52
52
  ...p ? ["first"] : [],
53
53
  ...m ? [] : ["previous"],
54
54
  ...j,
55
55
  // Start ellipsis
56
56
  // eslint-disable-next-line no-nested-ternary
57
- ...y > a + 2 ? ["start-ellipsis"] : a + 1 < s - a ? [a + 1] : [],
57
+ ...w > a + 2 ? ["start-ellipsis"] : a + 1 < s - a ? [a + 1] : [],
58
58
  // Sibling pages
59
- ...v(y, B),
59
+ ...v(w, B),
60
60
  // End ellipsis
61
61
  // eslint-disable-next-line no-nested-ternary
62
62
  ...B < s - a - 1 ? ["end-ellipsis"] : s - a > a ? [s - a] : [],
63
- ...f,
64
- ...g ? [] : ["next"],
65
- ...x ? ["last"] : []
66
- ], w = (n) => {
63
+ ...P,
64
+ ...c ? [] : ["next"],
65
+ ...f ? ["last"] : []
66
+ ], y = (n) => {
67
67
  switch (n) {
68
68
  case "first":
69
69
  return 1;
@@ -87,10 +87,10 @@ function $(e = {}) {
87
87
  "aria-current": n === r ? "true" : void 0
88
88
  } : {
89
89
  onClick: (l) => {
90
- N(l, w(n));
90
+ N(l, y(n));
91
91
  },
92
92
  type: n,
93
- page: w(n),
93
+ page: y(n),
94
94
  selected: !1,
95
95
  disabled: h || n.indexOf("ellipsis") === -1 && (n === "next" || n === "last" ? r >= s : r <= 1)
96
96
  });
@@ -98,14 +98,14 @@ function $(e = {}) {
98
98
  items: F
99
99
  }, d);
100
100
  }
101
- const R = "_pagination_1exye_1", c = {
101
+ const R = "_pagination_9gf1w_1", g = {
102
102
  pagination: R,
103
- "per-page-container": "_per-page-container_1exye_8",
104
- "pages-navigator-container": "_pages-navigator-container_1exye_20",
105
- "pages-navigator-container__label": "_pages-navigator-container__label_1exye_31",
106
- "page-number__btn": "_page-number__btn_1exye_31",
107
- "pages-navigator-container__previous-next-btn": "_pages-navigator-container__previous-next-btn_1exye_44",
108
- "page-number__btn--selected": "_page-number__btn--selected_1exye_69"
103
+ "per-page-container": "_per-page-container_9gf1w_8",
104
+ "pages-navigator-container": "_pages-navigator-container_9gf1w_20",
105
+ "pages-navigator-container__label": "_pages-navigator-container__label_9gf1w_31",
106
+ "page-number__btn": "_page-number__btn_9gf1w_31",
107
+ "pages-navigator-container__previous-next-btn": "_pages-navigator-container__previous-next-btn_9gf1w_44",
108
+ "page-number__btn--selected": "_page-number__btn--selected_9gf1w_69"
109
109
  }, T = {
110
110
  pt: {
111
111
  showing: "Exibindo",
@@ -122,7 +122,7 @@ const R = "_pagination_1exye_1", c = {
122
122
  next: "Next"
123
123
  }
124
124
  }, J = (e) => {
125
- const a = e.perPageOptions || [5, 10, 25, 50, 100], _ = Math.ceil(e.totalItems / e.perPage), s = e.currentPage <= 1, b = e.currentPage >= _, h = e.t || T[e.language || "en"], g = (t) => h[t], { items: m } = $({
125
+ const a = e.perPageOptions || [5, 10, 25, 50, 100], _ = Math.ceil(e.totalItems / e.perPage), s = e.currentPage <= 1, b = e.currentPage >= _, h = e.t || T[e.language || "en"], c = (t) => h[t], { items: m } = $({
126
126
  count: _,
127
127
  hideNextButton: !0,
128
128
  hidePrevButton: !0,
@@ -131,14 +131,14 @@ const R = "_pagination_1exye_1", c = {
131
131
  siblingCount: 1,
132
132
  boundaryCount: 2
133
133
  });
134
- return /* @__PURE__ */ P("div", { className: C(c.pagination, e.className), "data-testid": e["data-testid"], children: [
134
+ return /* @__PURE__ */ x("div", { className: C(g.pagination, e.className), "data-testid": e["data-testid"], children: [
135
135
  /* @__PURE__ */ i(
136
136
  "div",
137
137
  {
138
- className: C(c["per-page-container"], e.classNamePerPage),
138
+ className: C(g["per-page-container"], e.classNamePerPage),
139
139
  "data-testid": e["data-testid__per-page"],
140
- children: a && /* @__PURE__ */ P(M, { children: [
141
- g`showing`,
140
+ children: a && /* @__PURE__ */ x(M, { children: [
141
+ c`showing`,
142
142
  /* @__PURE__ */ i(
143
143
  "select",
144
144
  {
@@ -159,52 +159,52 @@ const R = "_pagination_1exye_1", c = {
159
159
  })
160
160
  }
161
161
  ),
162
- g`of`,
162
+ c`of`,
163
163
  " ",
164
164
  /* @__PURE__ */ i("strong", { children: e.totalItems }),
165
165
  " ",
166
- g`results`
166
+ c`results`
167
167
  ] })
168
168
  }
169
169
  ),
170
- /* @__PURE__ */ P(
170
+ /* @__PURE__ */ x(
171
171
  "div",
172
172
  {
173
- className: C(c["pages-navigator-container"], e.classNamePagesNav),
173
+ className: C(g["pages-navigator-container"], e.classNamePagesNav),
174
174
  "data-testid": e["data-testid__per-page"],
175
175
  children: [
176
176
  /* @__PURE__ */ i(
177
177
  "button",
178
178
  {
179
- className: c["pages-navigator-container__previous-next-btn"],
179
+ className: g["pages-navigator-container__previous-next-btn"],
180
180
  disabled: s,
181
181
  onClick: () => e.onPageChange(e.currentPage - 1),
182
182
  type: "button",
183
- children: g`previous`
183
+ children: c`previous`
184
184
  },
185
185
  "page__previous"
186
186
  ),
187
- m.map(({ page: t, type: o, selected: p, ...x }, u) => {
187
+ m.map(({ page: t, type: o, selected: p, ...f }, u) => {
188
188
  let d = /* @__PURE__ */ i(M, {});
189
- return o === "start-ellipsis" || o === "end-ellipsis" ? d = /* @__PURE__ */ i("span", { className: c["pages-navigator-container__label"], children: "..." }) : o === "page" ? d = /* @__PURE__ */ i(
189
+ return o === "start-ellipsis" || o === "end-ellipsis" ? d = /* @__PURE__ */ i("span", { className: g["pages-navigator-container__label"], children: "..." }) : o === "page" ? d = /* @__PURE__ */ i(
190
190
  "button",
191
191
  {
192
- className: [c["page-number__btn"], p ? c["page-number__btn--selected"] : ""].join(" ").trim(),
192
+ className: [g["page-number__btn"], p ? g["page-number__btn--selected"] : ""].join(" ").trim(),
193
193
  onClick: () => e.onPageChange(t || 0),
194
194
  type: "button",
195
195
  children: t
196
196
  },
197
197
  `page__${u}`
198
- ) : d = /* @__PURE__ */ i("button", { type: "button", ...x, children: o }), /* @__PURE__ */ i("li", { children: d }, u);
198
+ ) : d = /* @__PURE__ */ i("button", { type: "button", ...f, children: o }), /* @__PURE__ */ i("li", { children: d }, u);
199
199
  }),
200
200
  /* @__PURE__ */ i(
201
201
  "button",
202
202
  {
203
- className: c["pages-navigator-container__previous-next-btn"],
203
+ className: g["pages-navigator-container__previous-next-btn"],
204
204
  disabled: b,
205
205
  onClick: () => e.onPageChange(e.currentPage + 1),
206
206
  type: "button",
207
- children: g`next`
207
+ children: c`next`
208
208
  },
209
209
  "page__next"
210
210
  )
@@ -0,0 +1,18 @@
1
+ /// <reference types="react" />
2
+ type SkeletonProps = {
3
+ style?: React.CSSProperties | undefined;
4
+ className?: string;
5
+ 'data-testid'?: string;
6
+ };
7
+ declare const Skeleton: (props: SkeletonProps) => import("react/jsx-runtime").JSX.Element;
8
+ type SkeletonCircleProps = SkeletonProps & {
9
+ size?: string | number;
10
+ };
11
+ declare const SkeletonCircle: ({ size, ...props }: SkeletonCircleProps) => import("react/jsx-runtime").JSX.Element;
12
+ type SkeletonTableProps = SkeletonProps & {
13
+ columns?: number;
14
+ rows?: number;
15
+ autoWidth?: boolean;
16
+ };
17
+ declare const SkeletonTable: ({ columns, rows, autoWidth, ...props }: SkeletonTableProps) => import("react/jsx-runtime").JSX.Element;
18
+ export { Skeleton, SkeletonCircle, SkeletonTable };