@pismo/marola 1.0.0-beta.9 → 1.0.0

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 (157) hide show
  1. package/dist/{Button-DiLqcAJG.js → Button-BAljjMv3.js} +2 -2
  2. package/dist/{ClickAwayListener-BaJ-OV_7.js → ClickAwayListener-DbEYZpyh.js} +3 -3
  3. package/dist/Dialog.module-W7UCXlf3.js +29 -0
  4. package/dist/Group-DspH8hyO.js +30 -0
  5. package/dist/Popover.module-B4boCutS.js +10 -0
  6. package/dist/{Popup-lLWZt2wk.js → Popup-Ck3XlWMq.js} +3 -3
  7. package/dist/{Portal-B_Es6eUL.js → Portal-oY3enyAm.js} +2 -2
  8. package/dist/SelectButton-B38avP9u.js +75 -0
  9. package/dist/{Tabs.module-jkH1Qjn7.js → Tabs.module-BGGTkDc5.js} +7 -7
  10. package/dist/Toggle-MfR7l8Wn.js +190 -0
  11. package/dist/assets/Alert.css +1 -0
  12. package/dist/assets/Autocomplete.css +1 -1
  13. package/dist/assets/Avatar.css +1 -0
  14. package/dist/assets/Description.css +1 -0
  15. package/dist/assets/Dialog.css +1 -1
  16. package/dist/assets/EllipsisTooltip.css +1 -1
  17. package/dist/assets/Group.css +1 -1
  18. package/dist/assets/Input.css +1 -1
  19. package/dist/assets/PageHeader.css +1 -1
  20. package/dist/assets/Popover.css +1 -0
  21. package/dist/assets/RadioButton.css +1 -0
  22. package/dist/assets/ResultWithChips.css +1 -0
  23. package/dist/assets/SelectButton.css +1 -1
  24. package/dist/assets/Skeleton.css +1 -1
  25. package/dist/assets/Snackbar.css +1 -1
  26. package/dist/assets/StepperNavigator.css +1 -0
  27. package/dist/assets/Table.css +1 -1
  28. package/dist/assets/Tabs.css +1 -1
  29. package/dist/assets/Toggle2.css +1 -1
  30. package/dist/{combineHooksSlotProps-BtBYUV_B.js → combineHooksSlotProps-C-zYvfnF.js} +1 -1
  31. package/dist/components/Adornment/Adornment.d.ts +11 -2
  32. package/dist/components/Adornment/Adornment.js +6 -6
  33. package/dist/components/Adornment/Adornment.stories.d.ts +14 -0
  34. package/dist/components/Adornment/adornment.test.d.ts +1 -0
  35. package/dist/components/Advice/Advice.d.ts +2 -2
  36. package/dist/components/Alert/Alert.d.ts +11 -0
  37. package/dist/components/Alert/Alert.js +46 -0
  38. package/dist/components/Alert/Alert.stories.d.ts +24 -0
  39. package/dist/components/Alert/Alert.test.d.ts +1 -0
  40. package/dist/components/Autocomplete/Autocomplete.d.ts +12 -42
  41. package/dist/components/Autocomplete/Autocomplete.js +422 -432
  42. package/dist/components/Autocomplete/Autocomplete.stories.d.ts +3 -25
  43. package/dist/components/Avatar/Avatar.d.ts +15 -0
  44. package/dist/components/Avatar/Avatar.js +51 -0
  45. package/dist/components/Avatar/Avatar.stories.d.ts +25 -0
  46. package/dist/components/Button/Button.d.ts +2 -0
  47. package/dist/components/Button/Button.js +23 -21
  48. package/dist/components/Chip/Chip.d.ts +6 -4
  49. package/dist/components/Chip/Chip.js +10 -6
  50. package/dist/components/Chip/Chip.stories.d.ts +5 -14
  51. package/dist/components/ConfirmationDialog/ConfirmationDialog.d.ts +14 -0
  52. package/dist/components/ConfirmationDialog/ConfirmationDialog.js +37 -0
  53. package/dist/components/ConfirmationDialog/ConfirmationDialog.stories.d.ts +23 -0
  54. package/dist/components/ConfirmationDialog/ConfirmationModal.test.d.ts +1 -0
  55. package/dist/components/Description/Description.d.ts +21 -0
  56. package/dist/components/Description/Description.js +66 -0
  57. package/dist/components/Description/Description.stories.d.ts +22 -0
  58. package/dist/components/Description/Description.test.d.ts +1 -0
  59. package/dist/components/Dialog/Actions.js +1 -1
  60. package/dist/components/Dialog/Backdrop.d.ts +3 -3
  61. package/dist/components/Dialog/Backdrop.js +8 -7
  62. package/dist/components/Dialog/CloseIconButton.d.ts +1 -2
  63. package/dist/components/Dialog/CloseIconButton.js +15 -18
  64. package/dist/components/Dialog/Dialog.d.ts +16 -10
  65. package/dist/components/Dialog/Dialog.js +167 -167
  66. package/dist/components/Dialog/Dialog.stories.d.ts +73 -67
  67. package/dist/components/Dialog/DialogTitle.d.ts +5 -2
  68. package/dist/components/Dialog/DialogTitle.js +22 -16
  69. package/dist/components/EllipsisTooltip/EllipsisTooltip.js +30 -17
  70. package/dist/components/EllipsisTooltip/EllipsisTooltip.stories.d.ts +1 -0
  71. package/dist/components/Icon/Icon.js +331 -51
  72. package/dist/components/Icon/types.d.ts +1 -1
  73. package/dist/components/IconButton/IconButton.js +1 -1
  74. package/dist/components/Input/Input.d.ts +26 -5
  75. package/dist/components/Input/Input.js +514 -102
  76. package/dist/components/Input/Input.stories.d.ts +2 -21
  77. package/dist/components/InputSearch/InputSearch.d.ts +37 -7
  78. package/dist/components/InputSearch/InputSearch.js +27 -29
  79. package/dist/components/InputSearch/InputSearch.stories.d.ts +15 -3
  80. package/dist/components/PageHeader/PageHeader.d.ts +6 -2
  81. package/dist/components/PageHeader/PageHeader.js +77 -70
  82. package/dist/components/PageHeader/PageHeader.stories.d.ts +3 -1
  83. package/dist/components/PageHeader/PageHeader.test.d.ts +1 -0
  84. package/dist/components/Pagination/Pagination.d.ts +5 -1
  85. package/dist/components/Pagination/Pagination.js +45 -46
  86. package/dist/components/Pagination/Pagination.stories.d.ts +1 -1
  87. package/dist/components/Popover/Popover.d.ts +32 -0
  88. package/dist/components/Popover/Popover.js +24 -0
  89. package/dist/components/Popover/Popover.stories.d.ts +34 -0
  90. package/dist/components/Popover/PopoverBody.d.ts +6 -0
  91. package/dist/components/Popover/PopoverBody.js +6 -0
  92. package/dist/components/Popover/PopoverFooter.d.ts +6 -0
  93. package/dist/components/Popover/PopoverFooter.js +6 -0
  94. package/dist/components/Popover/PopoverHeader.d.ts +6 -0
  95. package/dist/components/Popover/PopoverHeader.js +6 -0
  96. package/dist/components/RadioButton/RadioButton.d.ts +19 -0
  97. package/dist/components/RadioButton/RadioButton.js +37 -0
  98. package/dist/components/RadioButton/RadioButton.stories.d.ts +24 -0
  99. package/dist/components/RadioButton/RadioButton.test.d.ts +1 -0
  100. package/dist/components/ResultWithChips/ResultWithChips.d.ts +12 -0
  101. package/dist/components/ResultWithChips/ResultWithChips.js +33 -0
  102. package/dist/components/RowItem/RowItem.d.ts +2 -2
  103. package/dist/components/RowItem/RowItem.js +9 -5
  104. package/dist/components/RowItem/RowItem.stories.d.ts +17 -0
  105. package/dist/components/RowItem/rowItem.test.d.ts +1 -0
  106. package/dist/components/Select/Select.d.ts +22 -0
  107. package/dist/components/Select/Select.js +476 -414
  108. package/dist/components/Select/SelectButton.d.ts +2 -0
  109. package/dist/components/Select/SelectButton.js +3 -2
  110. package/dist/components/Skeleton/Skeleton.d.ts +3 -1
  111. package/dist/components/Skeleton/Skeleton.js +20 -14
  112. package/dist/components/Skeleton/SkeletonTable.stories.d.ts +1 -1
  113. package/dist/components/Snackbar/Snackbar.js +119 -134
  114. package/dist/components/StepperNavigator/StepperNavigator.d.ts +58 -0
  115. package/dist/components/StepperNavigator/StepperNavigator.js +115 -0
  116. package/dist/components/StepperNavigator/StepperNavigator.stories.d.ts +18 -0
  117. package/dist/components/StepperNavigator/StepperNavigator.test.d.ts +1 -0
  118. package/dist/components/Table/Table.d.ts +3 -1
  119. package/dist/components/Table/Table.js +89 -101
  120. package/dist/components/Table/Table.stories.d.ts +1 -1
  121. package/dist/components/Tabs/Tab.d.ts +5 -3
  122. package/dist/components/Tabs/Tab.js +36 -35
  123. package/dist/components/Tabs/TabPanel.d.ts +4 -2
  124. package/dist/components/Tabs/TabPanel.js +48 -38
  125. package/dist/components/Tabs/Tabs.d.ts +6 -4
  126. package/dist/components/Tabs/Tabs.js +115 -112
  127. package/dist/components/TextDisplay/TextDisplay.d.ts +7 -3
  128. package/dist/components/TextDisplay/TextDisplay.js +44 -37
  129. package/dist/components/TextDisplay/TextDisplay.stories.d.ts +2 -1
  130. package/dist/components/Toggle/Toggle.js +1 -1
  131. package/dist/components/ToggleGroup/Group.d.ts +2 -0
  132. package/dist/components/ToggleGroup/Group.js +4 -2
  133. package/dist/components/ToggleGroup/Toggle.d.ts +2 -0
  134. package/dist/components/ToggleGroup/Toggle.js +8 -4
  135. package/dist/components/ToggleGroup/ToggleGroup.js +2 -2
  136. package/dist/components/ToggleGroup/ToggleGroup.stories.d.ts +2 -0
  137. package/dist/components/Tooltip/Tooltip.d.ts +3 -1
  138. package/dist/components/Tooltip/Tooltip.js +4 -4
  139. package/dist/components/Tooltip/Tooltip.stories.d.ts +1 -0
  140. package/dist/contexts/SnackbarProvider/SnackbarProvider.d.ts +2 -2
  141. package/dist/contexts/SnackbarProvider/SnackbarProvider.js +35 -30
  142. package/dist/contexts/SnackbarProvider/SnackbarProvider.stories.d.ts +1 -1
  143. package/dist/{index-D3Wj0eid.js → index-bQFToy-I.js} +1 -1
  144. package/dist/main.d.ts +8 -0
  145. package/dist/main.js +95 -79
  146. package/dist/marola.css +1 -1
  147. package/dist/{ownerDocument-B61GUaFs.js → ownerDocument-YGhwAnr1.js} +1 -1
  148. package/dist/test-utils/assertStyles.d.ts +1 -1
  149. package/dist/{useButton-Bn3MNH8I.js → useButton-DcihopJG.js} +1 -1
  150. package/dist/{useList-BpJT77u3.js → useList-B9C55YB7.js} +2 -2
  151. package/dist/{useSlotProps-kRhf7Gil.js → useSlotProps-C_I1kEHr.js} +73 -72
  152. package/package.json +22 -13
  153. package/dist/Dialog.module-DFcZsVAd.js +0 -30
  154. package/dist/Group-B3p31ftp.js +0 -26
  155. package/dist/Input.module-ZTRZRcNt.js +0 -405
  156. package/dist/SelectButton-CoOT2txy.js +0 -61
  157. package/dist/Toggle-f5brSwAI.js +0 -175
@@ -1,9 +1,39 @@
1
- import { Input } from '../Input/Input';
2
- import { ComponentProps } from 'react';
1
+ import { ForwardedRef } from 'react';
3
2
 
4
- type InputSearchProps = {
3
+ export declare const InputSearch: import('react').ForwardRefExoticComponent<(Omit<{
5
4
  /** How many milliseconds to wait before trigger the onChange event */
6
- triggerDelay?: number;
7
- } & ComponentProps<typeof Input>;
8
- export declare const InputSearch: ({ classNameWrapper, triggerDelay, value, onChange, ...rest }: InputSearchProps) => import("react/jsx-runtime").JSX.Element;
9
- export {};
5
+ triggerDelay?: number | undefined;
6
+ ref?: ForwardedRef<HTMLInputElement> | undefined;
7
+ } & import('react').InputHTMLAttributes<HTMLInputElement> & {
8
+ label?: string | undefined;
9
+ infoMessage?: string | undefined;
10
+ error?: boolean | undefined;
11
+ errorMessage?: string | undefined;
12
+ multiline?: false | undefined;
13
+ leftIcon?: import('react').ReactNode;
14
+ rightIcon?: import('react').ReactNode;
15
+ type?: ("number" | "url" | "file" | "color" | "search" | (string & {}) | "button" | "time" | "image" | "text" | "reset" | "tel" | "email" | "date" | "hidden" | "range" | "datetime-local" | "month" | "password" | "week") | undefined;
16
+ decimalLength?: number | undefined;
17
+ hideCharsCounter?: boolean | undefined;
18
+ classNameWrapper?: string | undefined;
19
+ classNameLabel?: string | undefined;
20
+ classNameInput?: string | undefined;
21
+ classNameInfoMessage?: string | undefined;
22
+ classNameErrorMessage?: string | undefined;
23
+ classNameCharsCounter?: string | undefined;
24
+ 'data-testid-wrapper'?: string | undefined;
25
+ 'data-testid-label'?: string | undefined;
26
+ 'data-testid-input'?: string | undefined;
27
+ 'data-testid-infoMessage'?: string | undefined;
28
+ 'data-testid-errorMessage'?: string | undefined;
29
+ 'data-testid-charsCounter'?: string | undefined;
30
+ } & import('react').RefAttributes<HTMLInputElement>, "ref"> | Omit<{
31
+ /** How many milliseconds to wait before trigger the onChange event */
32
+ triggerDelay?: number | undefined;
33
+ ref?: ForwardedRef<HTMLInputElement> | undefined;
34
+ } & Omit<import('../Input/Input').SingleInputProps, "multiline"> & {
35
+ multiline: true;
36
+ minRows?: number | undefined;
37
+ maxRows?: number | undefined;
38
+ rows?: number | undefined;
39
+ } & import('react').RefAttributes<HTMLInputElement>, "ref">) & import('react').RefAttributes<HTMLInputElement>>;
@@ -1,34 +1,32 @@
1
1
  import '../../assets/InputSearch.css';
2
2
  import { jsx as e } from "react/jsx-runtime";
3
- import { c as m } from "../../clsx-DB4S2d7J.js";
4
- import { Icon as p } from "../Icon/Icon.js";
5
- import { Input as u } from "../Input/Input.js";
6
- const l = "_inputSearch_114e1_1", h = {
7
- inputSearch: l
8
- };
9
- let n;
10
- const d = ({
11
- classNameWrapper: r,
12
- triggerDelay: o = 500,
13
- value: c,
14
- onChange: i = () => {
15
- },
16
- ...a
17
- }) => {
18
- const s = (t) => {
19
- n && clearTimeout(n), n = setTimeout(() => i(t), o);
20
- };
21
- return /* @__PURE__ */ e("div", { className: m(h.inputSearch, r), children: /* @__PURE__ */ e(
22
- u,
23
- {
24
- type: "search",
25
- ...a,
26
- leftIcon: /* @__PURE__ */ e(p, { icon: "magnifying-glass" }),
27
- defaultValue: c,
28
- onChange: (t) => s(t)
29
- }
30
- ) });
3
+ import { forwardRef as p } from "react";
4
+ import { c as u } from "../../clsx-DB4S2d7J.js";
5
+ import { Icon as f } from "../Icon/Icon.js";
6
+ import { Input as l } from "../Input/Input.js";
7
+ const h = "_inputSearch_114e1_1", g = {
8
+ inputSearch: h
31
9
  };
10
+ let r;
11
+ const _ = p(
12
+ ({ classNameWrapper: n, triggerDelay: o = 500, value: c, onChange: i = () => {
13
+ }, ...a }, s) => {
14
+ const m = (t) => {
15
+ r && clearTimeout(r), r = setTimeout(() => i(t), o);
16
+ };
17
+ return /* @__PURE__ */ e("div", { className: u(g.inputSearch, n), children: /* @__PURE__ */ e(
18
+ l,
19
+ {
20
+ type: "search",
21
+ ref: s,
22
+ ...a,
23
+ leftIcon: /* @__PURE__ */ e(f, { icon: "magnifying-glass" }),
24
+ defaultValue: c,
25
+ onChange: (t) => m(t)
26
+ }
27
+ ) });
28
+ }
29
+ );
32
30
  export {
33
- d as InputSearch
31
+ _ as InputSearch
34
32
  };
@@ -2,15 +2,19 @@ import { StoryObj } from '@storybook/react';
2
2
 
3
3
  declare const meta: {
4
4
  title: string;
5
- component: ({ classNameWrapper, triggerDelay, value, onChange, ...rest }: {
5
+ component: import('react').ForwardRefExoticComponent<(Omit<{
6
6
  triggerDelay?: number | undefined;
7
+ ref?: import('react').ForwardedRef<HTMLInputElement> | undefined;
7
8
  } & import('react').InputHTMLAttributes<HTMLInputElement> & {
8
9
  label?: string | undefined;
9
10
  infoMessage?: string | undefined;
11
+ error?: boolean | undefined;
10
12
  errorMessage?: string | undefined;
13
+ multiline?: false | undefined;
11
14
  leftIcon?: import('react').ReactNode;
12
15
  rightIcon?: import('react').ReactNode;
13
- type?: "search" | "text" | "password" | undefined;
16
+ type?: ("number" | "url" | "file" | "color" | "search" | (string & {}) | "button" | "time" | "image" | "text" | "reset" | "tel" | "email" | "date" | "hidden" | "range" | "datetime-local" | "month" | "password" | "week") | undefined;
17
+ decimalLength?: number | undefined;
14
18
  hideCharsCounter?: boolean | undefined;
15
19
  classNameWrapper?: string | undefined;
16
20
  classNameLabel?: string | undefined;
@@ -24,7 +28,15 @@ declare const meta: {
24
28
  'data-testid-infoMessage'?: string | undefined;
25
29
  'data-testid-errorMessage'?: string | undefined;
26
30
  'data-testid-charsCounter'?: string | undefined;
27
- }) => import("react/jsx-runtime").JSX.Element;
31
+ } & import('react').RefAttributes<HTMLInputElement>, "ref"> | Omit<{
32
+ triggerDelay?: number | undefined;
33
+ ref?: import('react').ForwardedRef<HTMLInputElement> | undefined;
34
+ } & Omit<import('../Input/Input').SingleInputProps, "multiline"> & {
35
+ multiline: true;
36
+ minRows?: number | undefined;
37
+ maxRows?: number | undefined;
38
+ rows?: number | undefined;
39
+ } & import('react').RefAttributes<HTMLInputElement>, "ref">) & import('react').RefAttributes<HTMLInputElement>>;
28
40
  tags: string[];
29
41
  parameters: {
30
42
  layout: string;
@@ -17,9 +17,11 @@ type LastBreadcrumbItem = Omit<BreadcrumbItem, 'onClick'> & {
17
17
  };
18
18
  type PageHeaderCommonProps = {
19
19
  /** Title text */
20
- title: string;
20
+ title?: string;
21
21
  /** Subtitle text */
22
22
  subtitle?: string;
23
+ /** component to be rendered in the place of title and subtitle */
24
+ headerBubble?: ReactNode;
23
25
  /** Back link text
24
26
  * @deprecated Use breadcrumb prop instead.
25
27
  */
@@ -55,6 +57,8 @@ type PageHeaderCommonProps = {
55
57
  'data-testid-title'?: string;
56
58
  /** Id to be applied as `data-testid` on the subtitle element */
57
59
  'data-testid-subtitle'?: string;
60
+ /** Id to be applied as `data-testid` on the headerBubble element */
61
+ 'data-testid-account-header'?: string;
58
62
  breadcrumb?: never;
59
63
  };
60
64
  type PageHeaderWithBreadcrumb = Omit<PageHeaderCommonProps, 'backLinkText' | 'onBackLinkClick' | 'classNameBackLink' | 'data-testid-backLink' | 'breadcrumb'> & {
@@ -62,5 +66,5 @@ type PageHeaderWithBreadcrumb = Omit<PageHeaderCommonProps, 'backLinkText' | 'on
62
66
  breadcrumb?: [...BreadcrumbItem[], LastBreadcrumbItem];
63
67
  };
64
68
  export type PageHeaderProps = RequireAllOrNone<PageHeaderCommonProps, 'backLinkText' | 'onBackLinkClick'> | PageHeaderWithBreadcrumb;
65
- export declare const PageHeader: ({ title, subtitle, rightChildren, bottomChildren, classNameWrapper, classNameTitle, classNameSubtitle, "data-testid-wrapper": wrapperTestId, "data-testid-title": titleTestId, "data-testid-subtitle": subtitleTestId, ...props }: PageHeaderProps) => import("react/jsx-runtime").JSX.Element;
69
+ export declare const PageHeader: ({ title, subtitle, rightChildren, bottomChildren, classNameWrapper, classNameTitle, classNameSubtitle, headerBubble, "data-testid-wrapper": wrapperTestId, "data-testid-title": titleTestId, "data-testid-subtitle": subtitleTestId, "data-testid-account-header": headerBubbleTestId, ...props }: PageHeaderProps) => import("react/jsx-runtime").JSX.Element;
66
70
  export {};
@@ -1,87 +1,94 @@
1
1
  import '../../assets/PageHeader.css';
2
- import { jsx as a, jsxs as o } from "react/jsx-runtime";
3
- import { useMemo as L } from "react";
4
- import { c as h } from "../../clsx-DB4S2d7J.js";
5
- import { Icon as B } from "../Icon/Icon.js";
6
- import { IconButton as C } from "../IconButton/IconButton.js";
7
- const j = "_title_1qpkd_22", w = "_subtitle_1qpkd_43", e = {
8
- "u-typography-h1": "_u-typography-h1_1qpkd_1",
9
- "u-typography-h2": "_u-typography-h2_1qpkd_8",
10
- "u-typography-h3": "_u-typography-h3_1qpkd_15",
11
- "u-typography-h4": "_u-typography-h4_1qpkd_22",
12
- "page-header__main-left-content": "_page-header__main-left-content_1qpkd_22",
13
- title: j,
14
- "u-typography-h5": "_u-typography-h5_1qpkd_29",
15
- "u-typography-h6": "_u-typography-h6_1qpkd_36",
16
- "u-typography-base": "_u-typography-base_1qpkd_43",
17
- subtitle: w,
18
- "u-typography-base--xxl": "_u-typography-base--xxl_1qpkd_49",
19
- "u-typography-base--xl": "_u-typography-base--xl_1qpkd_53",
20
- "u-typography-base--lg": "_u-typography-base--lg_1qpkd_57",
21
- "u-typography-base--sm": "_u-typography-base--sm_1qpkd_61",
22
- "u-typography-base--bold": "_u-typography-base--bold_1qpkd_65",
23
- "u-typography-base--strikethrough": "_u-typography-base--strikethrough_1qpkd_68",
24
- "u-typography-base--underlined": "_u-typography-base--underlined_1qpkd_71",
25
- "u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-underlined_1qpkd_74",
26
- "page-header": "_page-header_1qpkd_22",
27
- "page-header__top-content": "_page-header__top-content_1qpkd_87",
28
- "page-header__main-content": "_page-header__main-content_1qpkd_90",
29
- "page-header__bottom-content": "_page-header__bottom-content_1qpkd_90",
30
- "page-header__breadcrumb": "_page-header__breadcrumb_1qpkd_104",
31
- "page-header__breadcrumb__separator": "_page-header__breadcrumb__separator_1qpkd_109",
32
- "page-header__main-right-content": "_page-header__main-right-content_1qpkd_132"
33
- }, P = ({
34
- title: g,
2
+ import { jsx as e, Fragment as l, jsxs as i } from "react/jsx-runtime";
3
+ import { useMemo as H } from "react";
4
+ import { c as _ } from "../../clsx-DB4S2d7J.js";
5
+ import { Icon as I } from "../Icon/Icon.js";
6
+ import { IconButton as T } from "../IconButton/IconButton.js";
7
+ const $ = "_title_1loyf_22", q = "_subtitle_1loyf_43", a = {
8
+ "u-typography-h1": "_u-typography-h1_1loyf_1",
9
+ "u-typography-h2": "_u-typography-h2_1loyf_8",
10
+ "u-typography-h3": "_u-typography-h3_1loyf_15",
11
+ "u-typography-h4": "_u-typography-h4_1loyf_22",
12
+ "page-header__main-left-content": "_page-header__main-left-content_1loyf_22",
13
+ title: $,
14
+ "u-typography-h5": "_u-typography-h5_1loyf_29",
15
+ "u-typography-h6": "_u-typography-h6_1loyf_36",
16
+ "u-typography-base": "_u-typography-base_1loyf_43",
17
+ subtitle: q,
18
+ "u-typography-base--xxl": "_u-typography-base--xxl_1loyf_49",
19
+ "u-typography-base--xl": "_u-typography-base--xl_1loyf_53",
20
+ "u-typography-base--lg": "_u-typography-base--lg_1loyf_57",
21
+ "u-typography-base--sm": "_u-typography-base--sm_1loyf_61",
22
+ "u-typography-base--bold": "_u-typography-base--bold_1loyf_65",
23
+ "u-typography-base--strikethrough": "_u-typography-base--strikethrough_1loyf_68",
24
+ "u-typography-base--underlined": "_u-typography-base--underlined_1loyf_71",
25
+ "u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-underlined_1loyf_74",
26
+ "page-header": "_page-header_1loyf_22",
27
+ "page-header__top-content": "_page-header__top-content_1loyf_87",
28
+ "page-header__main-content": "_page-header__main-content_1loyf_90",
29
+ "page-header__bottom-content": "_page-header__bottom-content_1loyf_90",
30
+ "page-header__breadcrumb": "_page-header__breadcrumb_1loyf_104",
31
+ "page-header__breadcrumb__separator": "_page-header__breadcrumb__separator_1loyf_115",
32
+ "account-header": "_account-header_1loyf_139",
33
+ "account-header--container": "_account-header--container_1loyf_142",
34
+ "page-header__main-right-content": "_page-header__main-right-content_1loyf_150",
35
+ "account-header-margin": "_account-header-margin_1loyf_159"
36
+ }, D = ({
37
+ title: n,
35
38
  subtitle: y,
36
- rightChildren: n,
37
- bottomChildren: c,
39
+ rightChildren: g,
40
+ bottomChildren: h,
38
41
  classNameWrapper: u,
39
- classNameTitle: b,
42
+ classNameTitle: f,
40
43
  classNameSubtitle: k,
41
- "data-testid-wrapper": m,
42
- "data-testid-title": q,
43
- "data-testid-subtitle": N,
44
- ...f
44
+ headerBubble: r,
45
+ "data-testid-wrapper": N,
46
+ "data-testid-title": v,
47
+ "data-testid-subtitle": x,
48
+ "data-testid-account-header": C,
49
+ ...L
45
50
  }) => {
46
51
  const {
47
- breadcrumb: _,
48
- backLinkText: r,
49
- onBackLinkClick: d,
50
- classNameBackLink: i,
51
- "data-testid-backLink": l,
52
- ...x
53
- } = f, v = L(() => {
54
- const p = [];
55
- return r && d && p.push({
56
- label: r,
57
- className: i,
58
- "data-testid": l,
59
- onClick: d
60
- }), _ && p.push(..._), /* @__PURE__ */ a("div", { className: e["page-header__top-content"], children: /* @__PURE__ */ a("div", { className: e["page-header__breadcrumb"], children: p.map((t, s) => /* @__PURE__ */ a(
61
- C,
52
+ breadcrumb: s,
53
+ backLinkText: p,
54
+ onBackLinkClick: c,
55
+ classNameBackLink: m,
56
+ "data-testid-backLink": b,
57
+ ...w
58
+ } = L;
59
+ r && (n || y || 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");
60
+ const j = r ? _([a["page-header"], u, a["account-header-margin"]]) : _([a["page-header"], u]), B = H(() => {
61
+ const o = [];
62
+ return p && c && o.push({
63
+ label: p,
64
+ className: m,
65
+ "data-testid": b,
66
+ onClick: c
67
+ }), s && o.push(...s), /* @__PURE__ */ e("div", { className: a["page-header__top-content"], children: /* @__PURE__ */ e("div", { className: a["page-header__breadcrumb"], children: o.map((t, d) => /* @__PURE__ */ e(
68
+ T,
62
69
  {
63
- icon: s === 0 ? /* @__PURE__ */ a(B, { icon: "arrow-left" }) : /* @__PURE__ */ a("span", { className: e["page-header__breadcrumb__separator"], children: "/" }),
70
+ icon: d === 0 ? /* @__PURE__ */ e(I, { icon: "house-blank" }) : /* @__PURE__ */ e("span", { className: a["page-header__breadcrumb__separator"], children: "/" }),
64
71
  onClick: () => t.onClick && t.onClick(),
65
72
  className: t.className,
66
73
  "data-testid": t["data-testid"],
67
- disabled: p.length === 1 ? !1 : s === p.length - 1,
74
+ disabled: o.length === 1 ? !1 : d === o.length - 1,
68
75
  children: t.label
69
76
  },
70
- `${t.label}_${s}`
77
+ `${t.label}_${d}`
71
78
  )) }) });
72
- }, [_, r, i, l, d]);
73
- return /* @__PURE__ */ o("div", { className: h([e["page-header"], u]), "data-testid": m, ...x, children: [
74
- v,
75
- /* @__PURE__ */ o("div", { className: e["page-header__main-content"], children: [
76
- /* @__PURE__ */ o("div", { className: e["page-header__main-left-content"], children: [
77
- /* @__PURE__ */ a("h1", { className: h(e.title, b), "data-testid": q, children: g }),
78
- /* @__PURE__ */ a("h2", { className: h(e.subtitle, k), "data-testid": N, children: y })
79
- ] }),
80
- n && /* @__PURE__ */ a("div", { className: e["page-header__main-right-content"], children: n })
79
+ }, [s, p, m, b, c]);
80
+ return /* @__PURE__ */ e(l, { children: /* @__PURE__ */ i("div", { className: j, "data-testid": N, ...w, children: [
81
+ B,
82
+ /* @__PURE__ */ i("div", { className: a["page-header__main-content"], children: [
83
+ /* @__PURE__ */ e("div", { className: a["page-header__main-left-content"], children: r ? /* @__PURE__ */ e(l, { children: /* @__PURE__ */ e("div", { className: a["account-header"], children: /* @__PURE__ */ e("div", { className: a["account-header--container"], "data-testid": C, children: r }) }) }) : /* @__PURE__ */ i(l, { children: [
84
+ /* @__PURE__ */ e("h1", { className: _(a.title, f), "data-testid": v, children: n }),
85
+ /* @__PURE__ */ e("h2", { className: _(a.subtitle, k), "data-testid": x, children: y })
86
+ ] }) }),
87
+ g && /* @__PURE__ */ e("div", { className: a["page-header__main-right-content"], children: g })
81
88
  ] }),
82
- c && /* @__PURE__ */ a("div", { className: e["page-header__bottom-content"], children: c })
83
- ] });
89
+ h && /* @__PURE__ */ e("div", { className: a["page-header__bottom-content"], children: h })
90
+ ] }) });
84
91
  };
85
92
  export {
86
- P as PageHeader
93
+ D as PageHeader
87
94
  };
@@ -2,7 +2,7 @@ import { StoryObj } from '@storybook/react';
2
2
 
3
3
  declare const meta: {
4
4
  title: string;
5
- component: ({ title, subtitle, rightChildren, bottomChildren, classNameWrapper, classNameTitle, classNameSubtitle, "data-testid-wrapper": wrapperTestId, "data-testid-title": titleTestId, "data-testid-subtitle": subtitleTestId, ...props }: import('./PageHeader').PageHeaderProps) => import("react/jsx-runtime").JSX.Element;
5
+ component: ({ title, subtitle, rightChildren, bottomChildren, classNameWrapper, classNameTitle, classNameSubtitle, headerBubble, "data-testid-wrapper": wrapperTestId, "data-testid-title": titleTestId, "data-testid-subtitle": subtitleTestId, "data-testid-account-header": headerBubbleTestId, ...props }: import('./PageHeader').PageHeaderProps) => import("react/jsx-runtime").JSX.Element;
6
6
  tags: string[];
7
7
  };
8
8
  export default meta;
@@ -12,3 +12,5 @@ export declare const WithBackLink: Story;
12
12
  export declare const WithBreadcrumb: Story;
13
13
  export declare const WithRightChildren: Story;
14
14
  export declare const WithBottomChildren: Story;
15
+ export declare const WithHeaderBubble: Story;
16
+ export declare const WithLargeHeaderBubble: Story;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,3 +1,5 @@
1
+ import { UsePaginationProps } from './usePagination';
2
+
1
3
  export type PaginationParams = {
2
4
  /** Total number of items to paginate */
3
5
  totalItems: number;
@@ -53,9 +55,11 @@ export type PaginationProps = {
53
55
  language?: PaginationLanguages;
54
56
  /** Custom translation object to be used for texts. */
55
57
  t?: Partial<PaginationTranslations>;
58
+ /** usePagination hook props */
59
+ usePaginationProps?: UsePaginationProps;
56
60
  } & PaginationParams & PaginationCommonProps;
57
61
  export declare const paginationDefaultTranslations: {
58
62
  [key in PaginationLanguages]: PaginationTranslations;
59
63
  };
60
- export declare const Pagination: ({ perPageOptions, language, ...props }: PaginationProps) => import("react/jsx-runtime").JSX.Element;
64
+ export declare const Pagination: ({ perPageOptions, language, usePaginationProps, ...props }: PaginationProps) => import("react/jsx-runtime").JSX.Element;
61
65
  export {};
@@ -1,9 +1,9 @@
1
1
  import '../../assets/Pagination.css';
2
2
  import { jsxs as s, Fragment as p, jsx as t } from "react/jsx-runtime";
3
- import { c as o } from "../../clsx-DB4S2d7J.js";
3
+ import { c as _ } from "../../clsx-DB4S2d7J.js";
4
4
  import { Select as d } from "../Select/Select.js";
5
- import I from "./usePagination.js";
6
- const C = "_pagination_2n0nk_43", a = {
5
+ import C from "./usePagination.js";
6
+ const w = "_pagination_2n0nk_43", a = {
7
7
  "u-typography-h1": "_u-typography-h1_2n0nk_1",
8
8
  "u-typography-h2": "_u-typography-h2_2n0nk_8",
9
9
  "u-typography-h3": "_u-typography-h3_2n0nk_15",
@@ -11,7 +11,7 @@ const C = "_pagination_2n0nk_43", a = {
11
11
  "u-typography-h5": "_u-typography-h5_2n0nk_29",
12
12
  "u-typography-h6": "_u-typography-h6_2n0nk_36",
13
13
  "u-typography-base": "_u-typography-base_2n0nk_43",
14
- pagination: C,
14
+ pagination: w,
15
15
  "per-page-container": "_per-page-container_2n0nk_43",
16
16
  "u-typography-base--xxl": "_u-typography-base--xxl_2n0nk_49",
17
17
  "u-typography-base--xl": "_u-typography-base--xl_2n0nk_53",
@@ -27,7 +27,7 @@ const C = "_pagination_2n0nk_43", a = {
27
27
  "page-number__btn": "_page-number__btn_2n0nk_115",
28
28
  "pages-navigator-container__previous-next-btn": "_pages-navigator-container__previous-next-btn_2n0nk_134",
29
29
  "page-number__btn--selected": "_page-number__btn--selected_2n0nk_159"
30
- }, w = {
30
+ }, B = {
31
31
  pt: {
32
32
  showing: "Exibindo",
33
33
  of: "de",
@@ -44,23 +44,29 @@ const C = "_pagination_2n0nk_43", a = {
44
44
  next: "Next",
45
45
  perPage: "Items per page"
46
46
  }
47
- }, j = ({ perPageOptions: g = [5, 10, 25, 50, 100], language: y = "en", ...e }) => {
48
- const l = Math.ceil(e.totalItems / e.perPage), b = e.currentPage <= 1, m = e.currentPage >= l, k = { ...w[y], ...e.t || {} }, i = (n) => k[n], { items: v } = I({
47
+ }, $ = ({
48
+ perPageOptions: o = [5, 10, 25, 50, 100],
49
+ language: y = "en",
50
+ usePaginationProps: b = {},
51
+ ...e
52
+ }) => {
53
+ const l = Math.ceil(e.totalItems / e.perPage), m = e.currentPage <= 1, k = e.currentPage >= l, v = { ...B[y], ...e.t || {} }, i = (n) => v[n], { items: x } = C({
49
54
  count: l,
55
+ page: e.currentPage,
50
56
  hideNextButton: !0,
51
57
  hidePrevButton: !0,
52
- page: e.currentPage,
53
58
  siblingCount: 1,
54
- boundaryCount: 2
55
- }), c = e.perPage * (e.currentPage - 1) + 1, u = c + e.perPage - 1, x = u > e.totalItems ? u - e.totalItems : 0, P = u - x;
56
- return /* @__PURE__ */ s("div", { className: o(a.pagination, e.className), "data-testid": e["data-testid"], children: [
59
+ boundaryCount: 2,
60
+ ...b
61
+ }), c = e.perPage * (e.currentPage - 1) + 1, u = c + e.perPage - 1, P = u > e.totalItems ? u - e.totalItems : 0, N = u - P;
62
+ return /* @__PURE__ */ s("div", { className: _(a.pagination, e.className), "data-testid": e["data-testid"], children: [
57
63
  /* @__PURE__ */ s(
58
64
  "div",
59
65
  {
60
- className: o(a["per-page-container"], e.classNamePerPage),
66
+ className: _(a["per-page-container"], e.classNamePerPage),
61
67
  "data-testid": e["data-testid-per-page"],
62
68
  children: [
63
- g && /* @__PURE__ */ s(p, { children: [
69
+ o && /* @__PURE__ */ s(p, { children: [
64
70
  /* @__PURE__ */ t("span", { children: i`perPage` }),
65
71
  /* @__PURE__ */ t(
66
72
  d,
@@ -68,7 +74,7 @@ const C = "_pagination_2n0nk_43", a = {
68
74
  className: a["per-page-container__select"],
69
75
  value: String(e.perPage),
70
76
  onChange: (n) => e.onRowsPerPageChange(Number(n)),
71
- children: g == null ? void 0 : g.map((n) => {
77
+ children: o == null ? void 0 : o.map((n) => {
72
78
  const r = typeof n == "number";
73
79
  return /* @__PURE__ */ t(
74
80
  d.Option,
@@ -82,66 +88,59 @@ const C = "_pagination_2n0nk_43", a = {
82
88
  }
83
89
  )
84
90
  ] }),
85
- /* @__PURE__ */ s(
86
- "div",
87
- {
88
- className: o(a["page-infos"], e.classNamePagesInfo),
89
- "data-testid": e["data-testid-pages-info"],
90
- children: [
91
- /* @__PURE__ */ s("span", { children: [
92
- c,
93
- " - ",
94
- P
95
- ] }),
96
- " ",
97
- /* @__PURE__ */ s("span", { children: [
98
- i`of`,
99
- " ",
100
- /* @__PURE__ */ t("strong", { children: e.totalItems }),
101
- " ",
102
- i`results`
103
- ] })
104
- ]
105
- }
106
- )
91
+ /* @__PURE__ */ s("div", { className: e.classNamePagesInfo, "data-testid": e["data-testid-pages-info"], children: [
92
+ /* @__PURE__ */ s("span", { children: [
93
+ c,
94
+ " - ",
95
+ N
96
+ ] }),
97
+ " ",
98
+ /* @__PURE__ */ s("span", { children: [
99
+ i`of`,
100
+ " ",
101
+ /* @__PURE__ */ t("strong", { children: e.totalItems }),
102
+ " ",
103
+ i`results`
104
+ ] })
105
+ ] })
107
106
  ]
108
107
  }
109
108
  ),
110
109
  /* @__PURE__ */ s(
111
110
  "div",
112
111
  {
113
- className: o(a["pages-navigator-container"], e.classNamePagesNav),
112
+ className: _(a["pages-navigator-container"], e.classNamePagesNav),
114
113
  "data-testid": e["data-testid-pages-nav"],
115
114
  children: [
116
115
  /* @__PURE__ */ t(
117
116
  "button",
118
117
  {
119
118
  className: a["pages-navigator-container__previous-next-btn"],
120
- disabled: b,
119
+ disabled: m,
121
120
  onClick: () => e.onPageChange(e.currentPage - 1),
122
121
  type: "button",
123
122
  children: i`previous`
124
123
  },
125
124
  "page__previous"
126
125
  ),
127
- /* @__PURE__ */ t("ul", { children: v.map(({ page: n, type: r, selected: N, ...f }, h) => {
128
- let _ = /* @__PURE__ */ t(p, {});
129
- return r === "start-ellipsis" || r === "end-ellipsis" ? _ = /* @__PURE__ */ t("span", { className: a["page-item"], children: "..." }) : r === "page" ? _ = /* @__PURE__ */ t(
126
+ /* @__PURE__ */ t("ul", { children: x.map(({ page: n, type: r, selected: f, ...I }, h) => {
127
+ let g = /* @__PURE__ */ t(p, {});
128
+ return r === "start-ellipsis" || r === "end-ellipsis" ? g = /* @__PURE__ */ t("span", { className: a["page-item"], children: "..." }) : r === "page" ? g = /* @__PURE__ */ t(
130
129
  "button",
131
130
  {
132
- className: o(a["page-number__btn"], N && a["page-number__btn--selected"]),
131
+ className: _(a["page-number__btn"], f && a["page-number__btn--selected"]),
133
132
  onClick: () => e.onPageChange(n || 0),
134
133
  type: "button",
135
134
  children: n
136
135
  },
137
136
  `page__${h}`
138
- ) : _ = /* @__PURE__ */ t("button", { type: "button", ...f, children: r }), /* @__PURE__ */ t("li", { children: _ }, h);
137
+ ) : g = /* @__PURE__ */ t("button", { type: "button", ...I, children: r }), /* @__PURE__ */ t("li", { children: g }, h);
139
138
  }) }),
140
139
  /* @__PURE__ */ t(
141
140
  "button",
142
141
  {
143
142
  className: a["pages-navigator-container__previous-next-btn"],
144
- disabled: m,
143
+ disabled: k,
145
144
  onClick: () => e.onPageChange(e.currentPage + 1),
146
145
  type: "button",
147
146
  children: i`next`
@@ -154,6 +153,6 @@ const C = "_pagination_2n0nk_43", a = {
154
153
  ] });
155
154
  };
156
155
  export {
157
- j as Pagination,
158
- w as paginationDefaultTranslations
156
+ $ as Pagination,
157
+ B as paginationDefaultTranslations
159
158
  };
@@ -3,7 +3,7 @@ import { StoryObj } from '@storybook/react';
3
3
 
4
4
  declare const meta: {
5
5
  title: string;
6
- component: ({ perPageOptions, language, ...props }: PaginationProps) => import("react/jsx-runtime").JSX.Element;
6
+ component: ({ perPageOptions, language, usePaginationProps, ...props }: PaginationProps) => import("react/jsx-runtime").JSX.Element;
7
7
  tags: string[];
8
8
  parameters: {
9
9
  layout: string;
@@ -0,0 +1,32 @@
1
+ import { PopupOffsetOptions, PopupPlacement } from '@mui/base/Unstable_Popup';
2
+
3
+ export type PopoverProps = {
4
+ /** An HTML element or a function that returns either. */
5
+ anchorRef?: Element;
6
+ /** Boolean to open. */
7
+ open?: boolean;
8
+ /** React Node. */
9
+ children: React.ReactNode;
10
+ /** Determines where to place the popup relative to the trigger element. */
11
+ placement?: PopupPlacement;
12
+ /** Distance between a popup and the trigger element */
13
+ offset?: PopupOffsetOptions;
14
+ /** Class name */
15
+ className?: string;
16
+ /** Id to be applied as `data-testid` on the root element */
17
+ 'data-testid'?: string;
18
+ /** Callback fired when a "click away" event is detected. */
19
+ onClickAway?: (event: MouseEvent | TouchEvent) => void;
20
+ };
21
+ export declare const Popover: {
22
+ ({ anchorRef, open, children, placement, className, offset, "data-testid": dataTestId, onClickAway, }: PopoverProps): import("react/jsx-runtime").JSX.Element;
23
+ Header: ({ children }: {
24
+ children: import('react').ReactNode;
25
+ }) => import("react/jsx-runtime").JSX.Element;
26
+ Footer: ({ children }: {
27
+ children: import('react').ReactNode;
28
+ }) => import("react/jsx-runtime").JSX.Element;
29
+ Body: ({ children }: {
30
+ children: import('react').ReactNode;
31
+ }) => import("react/jsx-runtime").JSX.Element;
32
+ };
@@ -0,0 +1,24 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { c as f } from "../../clsx-DB4S2d7J.js";
3
+ import { s as v } from "../../Popover.module-B4boCutS.js";
4
+ import { PopoverBody as l } from "./PopoverBody.js";
5
+ import { PopoverFooter as n } from "./PopoverFooter.js";
6
+ import { PopoverHeader as P } from "./PopoverHeader.js";
7
+ import { P as y } from "../../Popup-Ck3XlWMq.js";
8
+ import { C as h } from "../../ClickAwayListener-DbEYZpyh.js";
9
+ const r = ({
10
+ anchorRef: t,
11
+ open: m,
12
+ children: p,
13
+ placement: i,
14
+ className: s,
15
+ offset: a,
16
+ "data-testid": d,
17
+ onClickAway: e
18
+ }) => /* @__PURE__ */ o(h, { onClickAway: (c) => e ? e(c) : void 0, children: /* @__PURE__ */ o(y, { offset: a, placement: i, open: m, anchor: t, children: /* @__PURE__ */ o("div", { "data-testid": d, className: f(v.popover, s), children: p }) }) });
19
+ r.Header = P;
20
+ r.Footer = n;
21
+ r.Body = l;
22
+ export {
23
+ r as Popover
24
+ };