@pismo/marola 1.0.0-beta.39 → 1.0.0-beta.4

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 (134) hide show
  1. package/dist/{Button-BAljjMv3.js → Button-2b1peDFT.js} +2 -2
  2. package/dist/{ClickAwayListener-DbEYZpyh.js → ClickAwayListener-BSW-Nd-y.js} +3 -4
  3. package/dist/Dialog.module-DFEmFdYT.js +30 -0
  4. package/dist/Group-B3p31ftp.js +26 -0
  5. package/dist/{Popup-Ck3XlWMq.js → Popup-B6ZSGIEI.js} +3 -3
  6. package/dist/{Portal-oY3enyAm.js → Portal-DIeBsWdL.js} +2 -2
  7. package/dist/SelectButton-K3OIfR5m.js +61 -0
  8. package/dist/{Tabs.module-BGGTkDc5.js → Tabs.module-jkH1Qjn7.js} +7 -7
  9. package/dist/Toggle-BCgIItCc.js +142 -0
  10. package/dist/assets/Advice.css +1 -1
  11. package/dist/assets/Button.css +1 -1
  12. package/dist/assets/Checkbox.css +1 -1
  13. package/dist/assets/Dialog.css +1 -1
  14. package/dist/assets/EllipsisTooltip.css +1 -1
  15. package/dist/assets/Group.css +1 -1
  16. package/dist/assets/IconButton.css +1 -1
  17. package/dist/assets/Input.css +1 -1
  18. package/dist/assets/PageHeader.css +1 -1
  19. package/dist/assets/Pagination.css +1 -1
  20. package/dist/assets/SelectButton.css +1 -1
  21. package/dist/assets/Skeleton.css +1 -1
  22. package/dist/assets/Snackbar.css +1 -1
  23. package/dist/assets/SortTooltip.css +1 -1
  24. package/dist/assets/Stepper.css +1 -1
  25. package/dist/assets/Table.css +1 -1
  26. package/dist/assets/Tabs.css +1 -1
  27. package/dist/assets/TextDisplay.css +1 -1
  28. package/dist/assets/Toggle.css +1 -1
  29. package/dist/assets/Toggle2.css +1 -1
  30. package/dist/assets/Typography.css +1 -1
  31. package/dist/{combineHooksSlotProps-C-zYvfnF.js → combineHooksSlotProps-DVjg9PRh.js} +1 -1
  32. package/dist/components/Advice/Advice.d.ts +17 -32
  33. package/dist/components/Advice/Advice.js +40 -39
  34. package/dist/components/Advice/Advice.stories.d.ts +3 -4
  35. package/dist/components/Button/Button.d.ts +0 -2
  36. package/dist/components/Button/Button.js +49 -51
  37. package/dist/components/Checkbox/Checkbox.js +52 -52
  38. package/dist/components/Chip/Chip.d.ts +12 -6
  39. package/dist/components/Chip/Chip.js +6 -8
  40. package/dist/components/Chip/Chip.stories.d.ts +14 -5
  41. package/dist/components/Dialog/Actions.js +1 -1
  42. package/dist/components/Dialog/Backdrop.d.ts +3 -3
  43. package/dist/components/Dialog/Backdrop.js +7 -8
  44. package/dist/components/Dialog/CloseIconButton.d.ts +2 -1
  45. package/dist/components/Dialog/CloseIconButton.js +18 -15
  46. package/dist/components/Dialog/Dialog.d.ts +6 -9
  47. package/dist/components/Dialog/Dialog.js +139 -139
  48. package/dist/components/Dialog/Dialog.stories.d.ts +46 -50
  49. package/dist/components/Dialog/DialogTitle.js +1 -1
  50. package/dist/components/EllipsisTooltip/EllipsisTooltip.js +17 -30
  51. package/dist/components/EllipsisTooltip/EllipsisTooltip.stories.d.ts +1 -2
  52. package/dist/components/Icon/Icon.js +47 -141
  53. package/dist/components/Icon/types.d.ts +1 -1
  54. package/dist/components/IconButton/IconButton.js +42 -42
  55. package/dist/components/Input/Input.d.ts +5 -24
  56. package/dist/components/Input/Input.js +278 -291
  57. package/dist/components/Input/Input.stories.d.ts +21 -2
  58. package/dist/components/InputSearch/InputSearch.stories.d.ts +21 -1
  59. package/dist/components/PageHeader/PageHeader.js +57 -57
  60. package/dist/components/Pagination/Pagination.d.ts +1 -5
  61. package/dist/components/Pagination/Pagination.js +185 -87
  62. package/dist/components/Pagination/Pagination.stories.d.ts +1 -1
  63. package/dist/components/Select/Select.d.ts +0 -7
  64. package/dist/components/Select/Select.js +365 -409
  65. package/dist/components/Select/SelectButton.d.ts +0 -1
  66. package/dist/components/Select/SelectButton.js +1 -1
  67. package/dist/components/Skeleton/Skeleton.d.ts +1 -3
  68. package/dist/components/Skeleton/Skeleton.js +14 -20
  69. package/dist/components/Skeleton/SkeletonTable.stories.d.ts +1 -1
  70. package/dist/components/Snackbar/Snackbar.js +94 -94
  71. package/dist/components/Snackbar/Snackbar.stories.d.ts +3 -3
  72. package/dist/components/SortTooltip/SortTooltip.js +46 -46
  73. package/dist/components/Stepper/Stepper.js +35 -35
  74. package/dist/components/Table/Table.d.ts +1 -3
  75. package/dist/components/Table/Table.js +99 -87
  76. package/dist/components/Table/Table.stories.d.ts +1 -1
  77. package/dist/components/Tabs/Tab.d.ts +3 -5
  78. package/dist/components/Tabs/Tab.js +36 -38
  79. package/dist/components/Tabs/TabPanel.d.ts +2 -4
  80. package/dist/components/Tabs/TabPanel.js +40 -51
  81. package/dist/components/Tabs/Tabs.d.ts +4 -6
  82. package/dist/components/Tabs/Tabs.js +128 -131
  83. package/dist/components/TextDisplay/TextDisplay.d.ts +3 -9
  84. package/dist/components/TextDisplay/TextDisplay.js +31 -45
  85. package/dist/components/TextDisplay/TextDisplay.stories.d.ts +1 -2
  86. package/dist/components/Toggle/Toggle.js +56 -56
  87. package/dist/components/ToggleGroup/Group.js +1 -1
  88. package/dist/components/ToggleGroup/Toggle.d.ts +0 -1
  89. package/dist/components/ToggleGroup/Toggle.js +5 -6
  90. package/dist/components/ToggleGroup/ToggleGroup.js +2 -2
  91. package/dist/components/Tooltip/Tooltip.d.ts +1 -3
  92. package/dist/components/Tooltip/Tooltip.js +4 -4
  93. package/dist/components/Tooltip/Tooltip.stories.d.ts +0 -1
  94. package/dist/components/Typography/Typography.js +47 -47
  95. package/dist/{useSlotProps-C_I1kEHr.js → index-CH45lKw7.js} +99 -99
  96. package/dist/{index-bQFToy-I.js → index-CjW42-M-.js} +1 -1
  97. package/dist/main.d.ts +0 -5
  98. package/dist/main.js +76 -85
  99. package/dist/{useButton-DcihopJG.js → useButton-DNk3wrQp.js} +1 -1
  100. package/dist/useCompoundItem-D1iRfg8D.js +84 -0
  101. package/dist/useEventCallback-xTG9piMa.js +45 -0
  102. package/dist/{useList-B9C55YB7.js → useList-B0hog_3-.js} +2 -2
  103. package/package.json +13 -22
  104. package/dist/Dialog.module-D9e4RsKo.js +0 -30
  105. package/dist/Group-B80_u5Q1.js +0 -27
  106. package/dist/SelectButton-BlVl6pJn.js +0 -70
  107. package/dist/Toggle-Dl-yPy8S.js +0 -187
  108. package/dist/assets/Adornment.css +0 -1
  109. package/dist/assets/Autocomplete.css +0 -1
  110. package/dist/assets/ResultWithChips.css +0 -1
  111. package/dist/assets/StepperNavigator.css +0 -1
  112. package/dist/components/Adornment/Adornment.d.ts +0 -20
  113. package/dist/components/Adornment/Adornment.js +0 -13
  114. package/dist/components/Adornment/Adornment.stories.d.ts +0 -14
  115. package/dist/components/Adornment/adornment.test.d.ts +0 -1
  116. package/dist/components/Autocomplete/Autocomplete.d.ts +0 -20
  117. package/dist/components/Autocomplete/Autocomplete.js +0 -679
  118. package/dist/components/Autocomplete/Autocomplete.stories.d.ts +0 -23
  119. package/dist/components/Pagination/usePagination.d.ts +0 -90
  120. package/dist/components/Pagination/usePagination.js +0 -79
  121. package/dist/components/ResultWithChips/ResultWithChips.d.ts +0 -12
  122. package/dist/components/ResultWithChips/ResultWithChips.js +0 -33
  123. package/dist/components/RowItem/RowItem.d.ts +0 -25
  124. package/dist/components/RowItem/RowItem.js +0 -20
  125. package/dist/components/RowItem/RowItem.stories.d.ts +0 -17
  126. package/dist/components/RowItem/rowItem.test.d.ts +0 -1
  127. package/dist/components/StepperNavigator/StepperNavigator.d.ts +0 -43
  128. package/dist/components/StepperNavigator/StepperNavigator.js +0 -56
  129. package/dist/components/StepperNavigator/StepperNavigator.stories.d.ts +0 -16
  130. package/dist/components/StepperNavigator/StepperNavigator.test.d.ts +0 -1
  131. package/dist/ownerDocument-YGhwAnr1.js +0 -33
  132. package/dist/useCompoundItem-B7Eo_qZk.js +0 -68
  133. package/dist/useEventCallback-BAQJJ3ye.js +0 -14
  134. package/dist/useId-BW-oWmul.js +0 -19
@@ -1,90 +0,0 @@
1
- /**
2
- * FOR WORKING WELL I NEEDED TO REMOVE ALL `useControlled` REFERENCES IN `usePagination.js` CODE.
3
- * import useControlled from '@mui/utils/useControlled';
4
-
5
- * TO AVOID THE CONSOLE ERROR:
6
-
7
- MUI: A component is changing the uncontrolled page state of usePagination to be controlled.
8
- Elements should not switch from uncontrolled to controlled (or vice versa).
9
- Decide between using a controlled or uncontrolled usePagination element for the lifetime of the component.
10
- The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.
11
- More info: https://fb.me/react-controlled-components
12
-
13
- * I WAS ABLE TO IDENTIFY THIS PROBLEM BUT I WAS NOT ABLE TO SOLVE IT.
14
- * THIS BUG HAPPENS IN A SPECIFIC SITUATION THAT `usePagination` HOOK TRY TO USE CONTROLLED WAY, BUT IN THE WRONG WAY.
15
-
16
- */
17
- import * as React from 'react';
18
- export interface UsePaginationProps {
19
- /**
20
- * Number of always visible pages at the beginning and end.
21
- * @default 1
22
- */
23
- boundaryCount?: number;
24
- /**
25
- * The name of the component where this hook is used.
26
- */
27
- componentName?: string;
28
- /**
29
- * The total number of pages.
30
- * @default 1
31
- */
32
- count?: number;
33
- /**
34
- * The page selected by default when the component is uncontrolled.
35
- * @default 1
36
- */
37
- defaultPage?: number;
38
- /**
39
- * If `true`, the component is disabled.
40
- * @default false
41
- */
42
- disabled?: boolean;
43
- /**
44
- * If `true`, hide the next-page button.
45
- * @default false
46
- */
47
- hideNextButton?: boolean;
48
- /**
49
- * If `true`, hide the previous-page button.
50
- * @default false
51
- */
52
- hidePrevButton?: boolean;
53
- /**
54
- * Callback fired when the page is changed.
55
- *
56
- * @param {React.ChangeEvent<unknown>} event The event source of the callback.
57
- * @param {number} page The page selected.
58
- */
59
- onChange?: (event: React.ChangeEvent<unknown>, page: number) => void;
60
- /**
61
- * The current page. Unlike `TablePagination`, which starts numbering from `0`, this pagination starts from `1`.
62
- */
63
- page?: number;
64
- /**
65
- * If `true`, show the first-page button.
66
- * @default false
67
- */
68
- showFirstButton?: boolean;
69
- /**
70
- * If `true`, show the last-page button.
71
- * @default false
72
- */
73
- showLastButton?: boolean;
74
- /**
75
- * Number of always visible pages before and after the current page.
76
- * @default 1
77
- */
78
- siblingCount?: number;
79
- }
80
- export interface UsePaginationItem {
81
- onClick: React.ReactEventHandler;
82
- type: 'page' | 'first' | 'last' | 'next' | 'previous' | 'start-ellipsis' | 'end-ellipsis';
83
- page: number | null;
84
- selected: boolean;
85
- disabled: boolean;
86
- }
87
- export interface UsePaginationResult {
88
- items: UsePaginationItem[];
89
- }
90
- export default function usePagination(props?: UsePaginationProps): UsePaginationResult;
@@ -1,79 +0,0 @@
1
- function w(l = {}) {
2
- const {
3
- boundaryCount: t = 1,
4
- count: s = 1,
5
- disabled: i = !1,
6
- hideNextButton: d = !1,
7
- hidePrevButton: g = !1,
8
- page: n = l.page || 1,
9
- showFirstButton: f = !1,
10
- showLastButton: h = !1,
11
- siblingCount: a = 1,
12
- ...p
13
- } = l, r = (e, y) => {
14
- const P = y - e + 1;
15
- return Array.from({ length: P }, (B, m) => e + m);
16
- }, x = r(1, Math.min(t, s)), o = r(Math.max(s - t + 1, t + 1), s), u = Math.max(
17
- Math.min(
18
- // Natural start
19
- n - a,
20
- // Lower boundary when page is high
21
- s - t - a * 2 - 1
22
- ),
23
- // Greater than startPages
24
- t + 2
25
- ), c = Math.min(
26
- Math.max(
27
- // Natural end
28
- n + a,
29
- // Upper boundary when page is low
30
- t + a * 2 + 2
31
- ),
32
- // Less than endPages
33
- o.length > 0 ? o[0] - 2 : s - 1
34
- ), b = [
35
- ...f ? ["first"] : [],
36
- ...g ? [] : ["previous"],
37
- ...x,
38
- // Start ellipsis
39
- ...u > t + 2 ? ["start-ellipsis"] : t + 1 < s - t ? [t + 1] : [],
40
- // Sibling pages
41
- ...r(u, c),
42
- // End ellipsis
43
- ...c < s - t - 1 ? ["end-ellipsis"] : s - t > t ? [s - t] : [],
44
- ...o,
45
- ...d ? [] : ["next"],
46
- ...h ? ["last"] : []
47
- ], M = (e) => {
48
- switch (e) {
49
- case "first":
50
- return 1;
51
- case "previous":
52
- return n - 1;
53
- case "next":
54
- return n + 1;
55
- case "last":
56
- return s;
57
- default:
58
- return null;
59
- }
60
- };
61
- return {
62
- items: b.map((e) => typeof e == "number" ? {
63
- type: "page",
64
- page: e,
65
- selected: e === n,
66
- disabled: i,
67
- "aria-current": e === n ? "true" : void 0
68
- } : {
69
- type: e,
70
- page: M(e),
71
- selected: !1,
72
- disabled: i || e.indexOf("ellipsis") === -1 && (e === "next" || e === "last" ? n >= s : n <= 1)
73
- }),
74
- ...p
75
- };
76
- }
77
- export {
78
- w as default
79
- };
@@ -1,12 +0,0 @@
1
- import { ChipProps } from '../Chip/Chip';
2
-
3
- type ResultWithChipsProps = {
4
- chips: Array<Partial<ChipProps> & {
5
- joinLabel?: string | React.ReactNode;
6
- key?: string;
7
- }>;
8
- title: string;
9
- className?: string;
10
- };
11
- declare const ResultWithChips: ({ chips, title, className, ...rest }: ResultWithChipsProps) => import("react/jsx-runtime").JSX.Element;
12
- export { ResultWithChips };
@@ -1,33 +0,0 @@
1
- import '../../assets/ResultWithChips.css';
2
- import { jsxs as i, jsx as e } from "react/jsx-runtime";
3
- import { C as t } from "../../Toggle-Dl-yPy8S.js";
4
- const r = "_container_hgp0p_1", o = "_label_hgp0p_17", a = {
5
- container: r,
6
- "chip-item-wrapper": "_chip-item-wrapper_hgp0p_8",
7
- label: o,
8
- "chips-container": "_chips-container_hgp0p_35",
9
- "chip-content": "_chip-content_hgp0p_42",
10
- "chip-label": "_chip-label_hgp0p_51"
11
- }, b = ({ chips: c, title: p, className: s, ...h }) => /* @__PURE__ */ i("div", { ...h, className: [a.container, s || ""].join(" ").trim(), children: [
12
- /* @__PURE__ */ e("span", { className: a.label, children: p }),
13
- /* @__PURE__ */ e("div", { className: a["chips-container"], "data-testid": "chips-container", children: c.map((l, n) => /* @__PURE__ */ i("span", { className: a["chip-item-wrapper"], children: [
14
- /* @__PURE__ */ e(
15
- t,
16
- {
17
- ...l,
18
- label: /* @__PURE__ */ e("span", { className: a["chip-content"], children: typeof l.label == "string" ? /* @__PURE__ */ e("strong", { className: a["chip-label"], children: l.label }) : l.label })
19
- },
20
- `chip-${n}`
21
- ),
22
- l.joinLabel && n < c.length - 1 && /* @__PURE__ */ e(
23
- t,
24
- {
25
- label: /* @__PURE__ */ e("span", { className: a["chip-content"], children: /* @__PURE__ */ e("strong", { className: a["chip-label"], children: l.joinLabel }) })
26
- },
27
- `join-${n}`
28
- )
29
- ] }, `full-chip-${n}`)) })
30
- ] });
31
- export {
32
- b as ResultWithChips
33
- };
@@ -1,25 +0,0 @@
1
- import { RequireAllOrNone } from '../../types/helpers';
2
- import { AdornmentProps } from '../../main';
3
- import { KeyboardEvent, MouseEvent, ReactNode } from 'react';
4
-
5
- export type RowItemBaseProps = {
6
- /** Items to display as main content of the row */
7
- children: ReactNode;
8
- /** Buttons to render */
9
- buttons?: ReactNode;
10
- /** Left adornment */
11
- leftAdornment?: AdornmentProps;
12
- /** Whether the row is disabled (not interactable */
13
- disabled?: boolean;
14
- /** Space seperated list of CSS classes to apply */
15
- className?: string;
16
- /** Callback for when the row is clicked, required when ariaLabel is provided */
17
- onClick?: (event?: MouseEvent<HTMLDivElement> | KeyboardEvent<HTMLDivElement> | undefined) => void;
18
- /** An accessible name for the row, required when onClick is provided */
19
- ariaLabel?: string;
20
- /** ID to use in tests*/
21
- 'data-testid'?: string;
22
- };
23
- export type RowItemProps = RequireAllOrNone<RowItemBaseProps, 'onClick' | 'ariaLabel'>;
24
- export declare const RowItem: import('react').ForwardRefExoticComponent<RowItemProps & import('react').RefAttributes<HTMLDivElement>>;
25
- export default RowItem;
@@ -1,20 +0,0 @@
1
- import "react/jsx-runtime";
2
- import "react";
3
- import "../../clsx-DB4S2d7J.js";
4
- import "../Adornment/Adornment.js";
5
- import "../Icon/Icon.js";
6
- import "../Typography/Typography.js";
7
- import "../Input/Input.js";
8
- import "../Button/Button.js";
9
- import { R as b, R as c } from "../../Toggle-Dl-yPy8S.js";
10
- import "../Dialog/Dialog.js";
11
- import "../IconButton/IconButton.js";
12
- import "../Select/Select.js";
13
- import "../Table/Table.js";
14
- import "../Tabs/Tabs.js";
15
- import "../../Group-B80_u5Q1.js";
16
- import "../../contexts/SnackbarProvider/SnackbarProvider.js";
17
- export {
18
- b as RowItem,
19
- c as default
20
- };
@@ -1,17 +0,0 @@
1
- import { StoryObj } from '@storybook/react';
2
-
3
- declare const meta: {
4
- title: string;
5
- component: import('react').ForwardRefExoticComponent<import('./RowItem').RowItemProps & import('react').RefAttributes<HTMLDivElement>>;
6
- tags: string[];
7
- parameters: {
8
- layout: string;
9
- };
10
- };
11
- export default meta;
12
- type Story = StoryObj<typeof meta>;
13
- export declare const Simple: Story;
14
- export declare const Clickable: Story;
15
- export declare const WithAdornement: Story;
16
- export declare const WithButtons: Story;
17
- export declare const WithButtonsAndAdornementDisabled: Story;
@@ -1 +0,0 @@
1
- export {};
@@ -1,43 +0,0 @@
1
- type StepperNavigatorLang = 'en' | 'pt';
2
- export type StepperNavigatorProps = {
3
- /** Hides the "previous" button */
4
- hidePrevious?: boolean;
5
- /** Hides the "cancel" button */
6
- hideCancel?: boolean;
7
- /** Hides the "next" button */
8
- hideNext?: boolean;
9
- /** Hides the "finish" button */
10
- hideFinish?: boolean;
11
- /** Disables the "previous" button */
12
- disablePrevious?: boolean;
13
- /** Disables the "cancel" button */
14
- disableCancel?: boolean;
15
- /** Disables the "next" button */
16
- disableNext?: boolean;
17
- /** Disables the "finish" button */
18
- disableFinish?: boolean;
19
- /** Label to be used for the "previous" button */
20
- labelPrevious?: string;
21
- /** Label to be used for the "cancel" button */
22
- labelCancel?: string;
23
- /** Label to be used for the "next" button */
24
- labelNext?: string;
25
- /** Label to be used for the "finish" button */
26
- labelFinish?: string;
27
- /** Language to be used for the button labels. Default "en" */
28
- lang?: StepperNavigatorLang;
29
- /** Callback to be called when the "previous" button is clicked */
30
- onPrevious?: () => void;
31
- /** Callback to be called when the "cancel" button is clicked */
32
- onCancel?: () => void;
33
- /** Callback to be called when the "next" button is clicked */
34
- onNext?: () => void;
35
- /** Callback to be called when the "finish" button is clicked */
36
- onFinish?: () => void;
37
- /** CSS classes to be applied on the container element */
38
- className?: string;
39
- /** Id to be applied as `data-testid` on the container element */
40
- 'data-testid'?: string;
41
- };
42
- export declare const StepperNavigator: ({ hideNext, hidePrevious, hideCancel, hideFinish, disableNext, disablePrevious, disableCancel, disableFinish, lang, labelNext, labelPrevious, labelCancel, labelFinish, className, "data-testid": dataTestId, onNext, onPrevious, onCancel, onFinish, }: StepperNavigatorProps) => import("react/jsx-runtime").JSX.Element;
43
- export {};
@@ -1,56 +0,0 @@
1
- import '../../assets/StepperNavigator.css';
2
- import { jsxs as p, jsx as e } from "react/jsx-runtime";
3
- import { c as g } from "../../clsx-DB4S2d7J.js";
4
- import { Button as t } from "../Button/Button.js";
5
- const c = {
6
- "stepper-navigator": "_stepper-navigator_1ouny_1",
7
- "cancel-button": "_cancel-button_1ouny_11",
8
- "previous-button": "_previous-button_1ouny_20"
9
- }, n = {
10
- en: {
11
- previous: "Previous",
12
- cancel: "Cancel",
13
- next: "Next",
14
- finish: "Finish"
15
- },
16
- pt: {
17
- previous: "Anterior",
18
- cancel: "Cancelar",
19
- next: "Próximo",
20
- finish: "Finalizar"
21
- }
22
- }, B = ({
23
- hideNext: d = !1,
24
- hidePrevious: l = !1,
25
- hideCancel: u = !1,
26
- hideFinish: f = !1,
27
- disableNext: v = !1,
28
- disablePrevious: m = !1,
29
- disableCancel: _ = !1,
30
- disableFinish: h = !1,
31
- lang: s = "en",
32
- labelNext: i,
33
- labelPrevious: o,
34
- labelCancel: r,
35
- labelFinish: a,
36
- className: x,
37
- "data-testid": k = "stepper-navigator",
38
- onNext: y = () => {
39
- },
40
- onPrevious: C = () => {
41
- },
42
- onCancel: b = () => {
43
- },
44
- onFinish: N = () => {
45
- }
46
- }) => (r = r || n[s].cancel, o = o || n[s].previous, i = i || n[s].next, a = a || n[s].finish, /* @__PURE__ */ p("div", { className: g(c["stepper-navigator"], x), "data-testid": k, children: [
47
- l ? /* @__PURE__ */ e("span", {}) : /* @__PURE__ */ e(t, { className: c["previous-button"], disabled: m, onClick: C, children: o }),
48
- /* @__PURE__ */ p("span", { children: [
49
- !u && /* @__PURE__ */ e(t, { className: c["cancel-button"], disabled: _, onClick: b, children: r }),
50
- !d && /* @__PURE__ */ e(t, { disabled: v, onClick: y, children: i }),
51
- !f && /* @__PURE__ */ e(t, { disabled: h, onClick: N, children: a })
52
- ] })
53
- ] }));
54
- export {
55
- B as StepperNavigator
56
- };
@@ -1,16 +0,0 @@
1
- import { StoryObj } from '@storybook/react';
2
-
3
- declare const meta: {
4
- title: string;
5
- component: ({ hideNext, hidePrevious, hideCancel, hideFinish, disableNext, disablePrevious, disableCancel, disableFinish, lang, labelNext, labelPrevious, labelCancel, labelFinish, className, "data-testid": dataTestId, onNext, onPrevious, onCancel, onFinish, }: import('./StepperNavigator').StepperNavigatorProps) => import("react/jsx-runtime").JSX.Element;
6
- tags: string[];
7
- parameters: {
8
- layout: string;
9
- };
10
- };
11
- export default meta;
12
- type Story = StoryObj<typeof meta>;
13
- export declare const Simple: Story;
14
- export declare const WithCustomLanguage: Story;
15
- export declare const WithCustomLabels: Story;
16
- export declare const Disabled: Story;
@@ -1,33 +0,0 @@
1
- import { P as c } from "./useSlotProps-C_I1kEHr.js";
2
- function a(e, n) {
3
- return process.env.NODE_ENV === "production" ? () => null : function(...t) {
4
- return e(...t) || n(...t);
5
- };
6
- }
7
- function p(e) {
8
- const {
9
- prototype: n = {}
10
- } = e;
11
- return !!n.isReactComponent;
12
- }
13
- function l(e, n, i, t, s) {
14
- const r = e[n], f = s || n;
15
- if (r == null || // When server-side rendering React doesn't warn either.
16
- // This is not an accurate check for SSR.
17
- // This is only in place for Emotion compat.
18
- // TODO: Revisit once https://github.com/facebook/react/issues/20047 is resolved.
19
- typeof window > "u")
20
- return null;
21
- let o;
22
- const u = r.type;
23
- return typeof u == "function" && !p(u) && (o = "Did you accidentally use a plain function component for an element instead?"), o !== void 0 ? new Error(`Invalid ${t} \`${f}\` supplied to \`${i}\`. Expected an element that can hold a ref. ${o} For more information see https://mui.com/r/caveat-with-refs-guide`) : null;
24
- }
25
- const m = a(c.element, l);
26
- m.isRequired = a(c.element.isRequired, l);
27
- function y(e) {
28
- return e && e.ownerDocument || document;
29
- }
30
- export {
31
- m as e,
32
- y as o
33
- };
@@ -1,68 +0,0 @@
1
- import * as o from "react";
2
- import { u as I } from "./useEnhancedEffect-CJGo-L3B.js";
3
- const p = /* @__PURE__ */ o.createContext(null);
4
- process.env.NODE_ENV !== "production" && (p.displayName = "CompoundComponentContext");
5
- function b(t) {
6
- const c = Array.from(t.keys()).map((e) => {
7
- const r = t.get(e);
8
- return {
9
- key: e,
10
- subitem: r
11
- };
12
- });
13
- return c.sort((e, r) => {
14
- const n = e.subitem.ref.current, s = r.subitem.ref.current;
15
- return n === null || s === null || n === s ? 0 : n.compareDocumentPosition(s) & Node.DOCUMENT_POSITION_PRECEDING ? 1 : -1;
16
- }), new Map(c.map((e) => [e.key, e.subitem]));
17
- }
18
- function x() {
19
- const [t, c] = o.useState(/* @__PURE__ */ new Map()), e = o.useRef(/* @__PURE__ */ new Set()), r = o.useCallback(function(i) {
20
- e.current.delete(i), c((a) => {
21
- const u = new Map(a);
22
- return u.delete(i), u;
23
- });
24
- }, []), n = o.useCallback(function(i, a) {
25
- let u;
26
- return typeof i == "function" ? u = i(e.current) : u = i, e.current.add(u), c((C) => {
27
- const l = new Map(C);
28
- return l.set(u, a), l;
29
- }), {
30
- id: u,
31
- deregister: () => r(u)
32
- };
33
- }, [r]), s = o.useMemo(() => b(t), [t]), m = o.useCallback(function(i) {
34
- return Array.from(s.keys()).indexOf(i);
35
- }, [s]);
36
- return {
37
- contextValue: o.useMemo(() => ({
38
- getItemIndex: m,
39
- registerItem: n,
40
- totalSubitemCount: t.size
41
- }), [m, n, t.size]),
42
- subitems: s
43
- };
44
- }
45
- function S(t, c) {
46
- const e = o.useContext(p);
47
- if (e === null)
48
- throw new Error("useCompoundItem must be used within a useCompoundParent");
49
- const {
50
- registerItem: r
51
- } = e, [n, s] = o.useState(typeof t == "function" ? void 0 : t);
52
- return I(() => {
53
- const {
54
- id: m,
55
- deregister: d
56
- } = r(t, c);
57
- return s(m), d;
58
- }, [r, c, t]), {
59
- id: n,
60
- index: n !== void 0 ? e.getItemIndex(n) : -1,
61
- totalItemCount: e.totalSubitemCount
62
- };
63
- }
64
- export {
65
- p as C,
66
- x as a,
67
- S as u
68
- };
@@ -1,14 +0,0 @@
1
- import * as t from "react";
2
- import { u as c } from "./useEnhancedEffect-CJGo-L3B.js";
3
- function s(e) {
4
- const r = t.useRef(e);
5
- return c(() => {
6
- r.current = e;
7
- }), t.useRef((...u) => (
8
- // @ts-expect-error hide `this`
9
- (0, r.current)(...u)
10
- )).current;
11
- }
12
- export {
13
- s as u
14
- };
@@ -1,19 +0,0 @@
1
- import * as e from "react";
2
- let n = 0;
3
- function l(t) {
4
- const [u, o] = e.useState(t), a = t || u;
5
- return e.useEffect(() => {
6
- u == null && (n += 1, o(`mui-${n}`));
7
- }, [u]), a;
8
- }
9
- const s = e.useId;
10
- function c(t) {
11
- if (s !== void 0) {
12
- const u = s();
13
- return t ?? u;
14
- }
15
- return l(t);
16
- }
17
- export {
18
- c as u
19
- };