@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.
- package/dist/{Button-DiLqcAJG.js → Button-BAljjMv3.js} +2 -2
- package/dist/{ClickAwayListener-BaJ-OV_7.js → ClickAwayListener-DbEYZpyh.js} +3 -3
- package/dist/Dialog.module-W7UCXlf3.js +29 -0
- package/dist/Group-DspH8hyO.js +30 -0
- package/dist/Popover.module-B4boCutS.js +10 -0
- package/dist/{Popup-lLWZt2wk.js → Popup-Ck3XlWMq.js} +3 -3
- package/dist/{Portal-B_Es6eUL.js → Portal-oY3enyAm.js} +2 -2
- package/dist/SelectButton-B38avP9u.js +75 -0
- package/dist/{Tabs.module-jkH1Qjn7.js → Tabs.module-BGGTkDc5.js} +7 -7
- package/dist/Toggle-MfR7l8Wn.js +190 -0
- package/dist/assets/Alert.css +1 -0
- package/dist/assets/Autocomplete.css +1 -1
- package/dist/assets/Avatar.css +1 -0
- package/dist/assets/Description.css +1 -0
- package/dist/assets/Dialog.css +1 -1
- package/dist/assets/EllipsisTooltip.css +1 -1
- package/dist/assets/Group.css +1 -1
- package/dist/assets/Input.css +1 -1
- package/dist/assets/PageHeader.css +1 -1
- package/dist/assets/Popover.css +1 -0
- package/dist/assets/RadioButton.css +1 -0
- package/dist/assets/ResultWithChips.css +1 -0
- package/dist/assets/SelectButton.css +1 -1
- package/dist/assets/Skeleton.css +1 -1
- package/dist/assets/Snackbar.css +1 -1
- package/dist/assets/StepperNavigator.css +1 -0
- package/dist/assets/Table.css +1 -1
- package/dist/assets/Tabs.css +1 -1
- package/dist/assets/Toggle2.css +1 -1
- package/dist/{combineHooksSlotProps-BtBYUV_B.js → combineHooksSlotProps-C-zYvfnF.js} +1 -1
- package/dist/components/Adornment/Adornment.d.ts +11 -2
- package/dist/components/Adornment/Adornment.js +6 -6
- package/dist/components/Adornment/Adornment.stories.d.ts +14 -0
- package/dist/components/Adornment/adornment.test.d.ts +1 -0
- package/dist/components/Advice/Advice.d.ts +2 -2
- package/dist/components/Alert/Alert.d.ts +11 -0
- package/dist/components/Alert/Alert.js +46 -0
- package/dist/components/Alert/Alert.stories.d.ts +24 -0
- package/dist/components/Alert/Alert.test.d.ts +1 -0
- package/dist/components/Autocomplete/Autocomplete.d.ts +12 -42
- package/dist/components/Autocomplete/Autocomplete.js +422 -432
- package/dist/components/Autocomplete/Autocomplete.stories.d.ts +3 -25
- package/dist/components/Avatar/Avatar.d.ts +15 -0
- package/dist/components/Avatar/Avatar.js +51 -0
- package/dist/components/Avatar/Avatar.stories.d.ts +25 -0
- package/dist/components/Button/Button.d.ts +2 -0
- package/dist/components/Button/Button.js +23 -21
- package/dist/components/Chip/Chip.d.ts +6 -4
- package/dist/components/Chip/Chip.js +10 -6
- package/dist/components/Chip/Chip.stories.d.ts +5 -14
- package/dist/components/ConfirmationDialog/ConfirmationDialog.d.ts +14 -0
- package/dist/components/ConfirmationDialog/ConfirmationDialog.js +37 -0
- package/dist/components/ConfirmationDialog/ConfirmationDialog.stories.d.ts +23 -0
- package/dist/components/ConfirmationDialog/ConfirmationModal.test.d.ts +1 -0
- package/dist/components/Description/Description.d.ts +21 -0
- package/dist/components/Description/Description.js +66 -0
- package/dist/components/Description/Description.stories.d.ts +22 -0
- package/dist/components/Description/Description.test.d.ts +1 -0
- package/dist/components/Dialog/Actions.js +1 -1
- package/dist/components/Dialog/Backdrop.d.ts +3 -3
- package/dist/components/Dialog/Backdrop.js +8 -7
- package/dist/components/Dialog/CloseIconButton.d.ts +1 -2
- package/dist/components/Dialog/CloseIconButton.js +15 -18
- package/dist/components/Dialog/Dialog.d.ts +16 -10
- package/dist/components/Dialog/Dialog.js +167 -167
- package/dist/components/Dialog/Dialog.stories.d.ts +73 -67
- package/dist/components/Dialog/DialogTitle.d.ts +5 -2
- package/dist/components/Dialog/DialogTitle.js +22 -16
- package/dist/components/EllipsisTooltip/EllipsisTooltip.js +30 -17
- package/dist/components/EllipsisTooltip/EllipsisTooltip.stories.d.ts +1 -0
- package/dist/components/Icon/Icon.js +331 -51
- package/dist/components/Icon/types.d.ts +1 -1
- package/dist/components/IconButton/IconButton.js +1 -1
- package/dist/components/Input/Input.d.ts +26 -5
- package/dist/components/Input/Input.js +514 -102
- package/dist/components/Input/Input.stories.d.ts +2 -21
- package/dist/components/InputSearch/InputSearch.d.ts +37 -7
- package/dist/components/InputSearch/InputSearch.js +27 -29
- package/dist/components/InputSearch/InputSearch.stories.d.ts +15 -3
- package/dist/components/PageHeader/PageHeader.d.ts +6 -2
- package/dist/components/PageHeader/PageHeader.js +77 -70
- package/dist/components/PageHeader/PageHeader.stories.d.ts +3 -1
- package/dist/components/PageHeader/PageHeader.test.d.ts +1 -0
- package/dist/components/Pagination/Pagination.d.ts +5 -1
- package/dist/components/Pagination/Pagination.js +45 -46
- package/dist/components/Pagination/Pagination.stories.d.ts +1 -1
- package/dist/components/Popover/Popover.d.ts +32 -0
- package/dist/components/Popover/Popover.js +24 -0
- package/dist/components/Popover/Popover.stories.d.ts +34 -0
- package/dist/components/Popover/PopoverBody.d.ts +6 -0
- package/dist/components/Popover/PopoverBody.js +6 -0
- package/dist/components/Popover/PopoverFooter.d.ts +6 -0
- package/dist/components/Popover/PopoverFooter.js +6 -0
- package/dist/components/Popover/PopoverHeader.d.ts +6 -0
- package/dist/components/Popover/PopoverHeader.js +6 -0
- package/dist/components/RadioButton/RadioButton.d.ts +19 -0
- package/dist/components/RadioButton/RadioButton.js +37 -0
- package/dist/components/RadioButton/RadioButton.stories.d.ts +24 -0
- package/dist/components/RadioButton/RadioButton.test.d.ts +1 -0
- package/dist/components/ResultWithChips/ResultWithChips.d.ts +12 -0
- package/dist/components/ResultWithChips/ResultWithChips.js +33 -0
- package/dist/components/RowItem/RowItem.d.ts +2 -2
- package/dist/components/RowItem/RowItem.js +9 -5
- package/dist/components/RowItem/RowItem.stories.d.ts +17 -0
- package/dist/components/RowItem/rowItem.test.d.ts +1 -0
- package/dist/components/Select/Select.d.ts +22 -0
- package/dist/components/Select/Select.js +476 -414
- package/dist/components/Select/SelectButton.d.ts +2 -0
- package/dist/components/Select/SelectButton.js +3 -2
- package/dist/components/Skeleton/Skeleton.d.ts +3 -1
- package/dist/components/Skeleton/Skeleton.js +20 -14
- package/dist/components/Skeleton/SkeletonTable.stories.d.ts +1 -1
- package/dist/components/Snackbar/Snackbar.js +119 -134
- package/dist/components/StepperNavigator/StepperNavigator.d.ts +58 -0
- package/dist/components/StepperNavigator/StepperNavigator.js +115 -0
- package/dist/components/StepperNavigator/StepperNavigator.stories.d.ts +18 -0
- package/dist/components/StepperNavigator/StepperNavigator.test.d.ts +1 -0
- package/dist/components/Table/Table.d.ts +3 -1
- package/dist/components/Table/Table.js +89 -101
- package/dist/components/Table/Table.stories.d.ts +1 -1
- package/dist/components/Tabs/Tab.d.ts +5 -3
- package/dist/components/Tabs/Tab.js +36 -35
- package/dist/components/Tabs/TabPanel.d.ts +4 -2
- package/dist/components/Tabs/TabPanel.js +48 -38
- package/dist/components/Tabs/Tabs.d.ts +6 -4
- package/dist/components/Tabs/Tabs.js +115 -112
- package/dist/components/TextDisplay/TextDisplay.d.ts +7 -3
- package/dist/components/TextDisplay/TextDisplay.js +44 -37
- package/dist/components/TextDisplay/TextDisplay.stories.d.ts +2 -1
- package/dist/components/Toggle/Toggle.js +1 -1
- package/dist/components/ToggleGroup/Group.d.ts +2 -0
- package/dist/components/ToggleGroup/Group.js +4 -2
- package/dist/components/ToggleGroup/Toggle.d.ts +2 -0
- package/dist/components/ToggleGroup/Toggle.js +8 -4
- package/dist/components/ToggleGroup/ToggleGroup.js +2 -2
- package/dist/components/ToggleGroup/ToggleGroup.stories.d.ts +2 -0
- package/dist/components/Tooltip/Tooltip.d.ts +3 -1
- package/dist/components/Tooltip/Tooltip.js +4 -4
- package/dist/components/Tooltip/Tooltip.stories.d.ts +1 -0
- package/dist/contexts/SnackbarProvider/SnackbarProvider.d.ts +2 -2
- package/dist/contexts/SnackbarProvider/SnackbarProvider.js +35 -30
- package/dist/contexts/SnackbarProvider/SnackbarProvider.stories.d.ts +1 -1
- package/dist/{index-D3Wj0eid.js → index-bQFToy-I.js} +1 -1
- package/dist/main.d.ts +8 -0
- package/dist/main.js +95 -79
- package/dist/marola.css +1 -1
- package/dist/{ownerDocument-B61GUaFs.js → ownerDocument-YGhwAnr1.js} +1 -1
- package/dist/test-utils/assertStyles.d.ts +1 -1
- package/dist/{useButton-Bn3MNH8I.js → useButton-DcihopJG.js} +1 -1
- package/dist/{useList-BpJT77u3.js → useList-B9C55YB7.js} +2 -2
- package/dist/{useSlotProps-kRhf7Gil.js → useSlotProps-C_I1kEHr.js} +73 -72
- package/package.json +22 -13
- package/dist/Dialog.module-DFcZsVAd.js +0 -30
- package/dist/Group-B3p31ftp.js +0 -26
- package/dist/Input.module-ZTRZRcNt.js +0 -405
- package/dist/SelectButton-CoOT2txy.js +0 -61
- package/dist/Toggle-f5brSwAI.js +0 -175
|
@@ -8,5 +8,7 @@ export interface SelectButtonProps {
|
|
|
8
8
|
prefix?: string;
|
|
9
9
|
'data-testid'?: string;
|
|
10
10
|
onClick: () => void;
|
|
11
|
+
fullWidth?: boolean;
|
|
12
|
+
placeholder?: string;
|
|
11
13
|
}
|
|
12
14
|
export declare const SelectButton: import('react').ForwardRefExoticComponent<SelectButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
3
|
import "../../clsx-DB4S2d7J.js";
|
|
4
|
+
import "../Icon/Icon.js";
|
|
4
5
|
import "../Typography/Typography.js";
|
|
5
|
-
import { S
|
|
6
|
+
import { S } from "../../SelectButton-B38avP9u.js";
|
|
6
7
|
export {
|
|
7
|
-
|
|
8
|
+
S as SelectButton
|
|
8
9
|
};
|
|
@@ -20,6 +20,8 @@ export type SkeletonTableProps = SkeletonProps & {
|
|
|
20
20
|
rows?: number;
|
|
21
21
|
/** Controls if the with of the cells should be automatically defined */
|
|
22
22
|
autoWidth?: boolean;
|
|
23
|
+
/** Controls if show or not the skeleton of the table header */
|
|
24
|
+
showHeader?: boolean;
|
|
23
25
|
};
|
|
24
|
-
declare const SkeletonTable: ({ columns, rows, autoWidth, ...props }: SkeletonTableProps) => import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
declare const SkeletonTable: ({ columns, rows, autoWidth, showHeader, ...props }: SkeletonTableProps) => import("react/jsx-runtime").JSX.Element;
|
|
25
27
|
export { Skeleton, SkeletonCircle, SkeletonTable };
|
|
@@ -1,23 +1,29 @@
|
|
|
1
1
|
import '../../assets/Skeleton.css';
|
|
2
|
-
import { jsx as t, jsxs as
|
|
2
|
+
import { jsx as t, jsxs as N } from "react/jsx-runtime";
|
|
3
3
|
import { c as r } from "../../clsx-DB4S2d7J.js";
|
|
4
|
-
const
|
|
5
|
-
skeleton:
|
|
4
|
+
const u = "_skeleton_mst8q_1", b = "_skeletonLoading_mst8q_1", o = {
|
|
5
|
+
skeleton: u,
|
|
6
6
|
skeletonLoading: b,
|
|
7
|
-
"skeleton--circle-type": "_skeleton--circle-
|
|
8
|
-
"skeleton--table-type": "_skeleton--table-
|
|
9
|
-
},
|
|
7
|
+
"skeleton--circle-type": "_skeleton--circle-type_mst8q_13",
|
|
8
|
+
"skeleton--table-type": "_skeleton--table-type_mst8q_17"
|
|
9
|
+
}, d = (e) => /* @__PURE__ */ t("div", { ...e, className: r(o.skeleton, e.className) }), C = ({ size: e = "4rem", ...l }) => {
|
|
10
10
|
const s = r(o.skeleton, o["skeleton--circle-type"], l.className);
|
|
11
11
|
return /* @__PURE__ */ t("div", { ...l, style: { width: e, height: e }, className: s });
|
|
12
|
-
},
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
}, m = (e = 30) => `${Math.floor(Math.random() * (100 - e + 1) + e)}%`, L = ({
|
|
13
|
+
columns: e = 5,
|
|
14
|
+
rows: l = 5,
|
|
15
|
+
autoWidth: s = !0,
|
|
16
|
+
showHeader: c = !0,
|
|
17
|
+
...a
|
|
18
|
+
}) => {
|
|
19
|
+
const k = r(o["skeleton--table-type"], a.className), i = `${100 / e}%`, h = c && /* @__PURE__ */ t("tr", { children: new Array(e).fill(null).map((_, n) => /* @__PURE__ */ t("th", { style: { width: i }, children: /* @__PURE__ */ t(d, { style: { width: s ? m(50) : "100%" } }) }, `row-columns-${n}`)) }), y = new Array(l).fill(null).map((_, n) => /* @__PURE__ */ t("tr", { children: new Array(e).fill(null).map((f, w) => /* @__PURE__ */ t("td", { style: { width: i }, children: /* @__PURE__ */ t(d, { style: { width: s ? m() : "100%" } }) }, `row-${n}-cell-${w}`)) }, `row-${n}`));
|
|
20
|
+
return /* @__PURE__ */ N("table", { ...a, className: k, children: [
|
|
21
|
+
c && /* @__PURE__ */ t("thead", { children: h }),
|
|
22
|
+
/* @__PURE__ */ t("tbody", { children: y })
|
|
17
23
|
] });
|
|
18
24
|
};
|
|
19
25
|
export {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
26
|
+
d as Skeleton,
|
|
27
|
+
C as SkeletonCircle,
|
|
28
|
+
L as SkeletonTable
|
|
23
29
|
};
|
|
@@ -2,7 +2,7 @@ import { StoryObj } from '@storybook/react';
|
|
|
2
2
|
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component: ({ columns, rows, autoWidth, ...props }: import('./Skeleton').SkeletonTableProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
component: ({ columns, rows, autoWidth, showHeader, ...props }: import('./Skeleton').SkeletonTableProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
tags: string[];
|
|
7
7
|
parameters: {
|
|
8
8
|
layout: string;
|
|
@@ -1,28 +1,29 @@
|
|
|
1
1
|
import '../../assets/Snackbar.css';
|
|
2
|
-
import { jsx as
|
|
3
|
-
import * as
|
|
2
|
+
import { jsx as h, jsxs as Y } from "react/jsx-runtime";
|
|
3
|
+
import * as w from "react";
|
|
4
4
|
import C, { useState as V, useRef as X } from "react";
|
|
5
|
-
import { c as
|
|
5
|
+
import { c as S } from "../../clsx-DB4S2d7J.js";
|
|
6
6
|
import { Icon as K } from "../Icon/Icon.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { Text as $ } from "../Typography/Typography.js";
|
|
8
|
+
import { g as z, a as J, b as R, f as H, _ as j, c as U, P as n, d as Q, e as Z } from "../../useSlotProps-C_I1kEHr.js";
|
|
9
|
+
import { u as ee } from "../../useTimeout-DxF9kiZL.js";
|
|
9
10
|
import { u as I } from "../../useEventCallback-BAQJJ3ye.js";
|
|
10
|
-
import { C as B } from "../../ClickAwayListener-
|
|
11
|
-
import { R as P } from "../../index-
|
|
11
|
+
import { C as B } from "../../ClickAwayListener-DbEYZpyh.js";
|
|
12
|
+
import { R as P } from "../../index-bQFToy-I.js";
|
|
12
13
|
const W = "Snackbar";
|
|
13
|
-
function
|
|
14
|
-
return
|
|
14
|
+
function te(u) {
|
|
15
|
+
return z(W, u);
|
|
15
16
|
}
|
|
16
|
-
|
|
17
|
-
function
|
|
17
|
+
J(W, ["root"]);
|
|
18
|
+
function ne(u = {}) {
|
|
18
19
|
const {
|
|
19
20
|
autoHideDuration: s = null,
|
|
20
21
|
disableWindowBlurListener: i = !1,
|
|
21
22
|
onClose: r,
|
|
22
23
|
open: t,
|
|
23
24
|
resumeHideDuration: e
|
|
24
|
-
} = u, o =
|
|
25
|
-
|
|
25
|
+
} = u, o = ee();
|
|
26
|
+
w.useEffect(() => {
|
|
26
27
|
if (!t)
|
|
27
28
|
return;
|
|
28
29
|
function l(c) {
|
|
@@ -34,35 +35,35 @@ function te(u = {}) {
|
|
|
34
35
|
}, [t, r]);
|
|
35
36
|
const a = I((l, c) => {
|
|
36
37
|
r == null || r(l, c);
|
|
37
|
-
}),
|
|
38
|
+
}), d = I((l) => {
|
|
38
39
|
!r || l == null || o.start(l, () => {
|
|
39
40
|
a(null, "timeout");
|
|
40
41
|
});
|
|
41
42
|
});
|
|
42
|
-
|
|
43
|
-
const
|
|
43
|
+
w.useEffect(() => (t && d(s), o.clear), [t, s, d, o]);
|
|
44
|
+
const m = (l) => {
|
|
44
45
|
r == null || r(l, "clickaway");
|
|
45
|
-
},
|
|
46
|
-
s != null &&
|
|
47
|
-
}, [s, e,
|
|
48
|
-
const
|
|
49
|
-
|
|
46
|
+
}, p = o.clear, E = w.useCallback(() => {
|
|
47
|
+
s != null && d(e ?? s * 0.5);
|
|
48
|
+
}, [s, e, d]), x = (l) => (c) => {
|
|
49
|
+
const f = l.onBlur;
|
|
50
|
+
f == null || f(c), E();
|
|
50
51
|
}, O = (l) => (c) => {
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
},
|
|
54
|
-
const
|
|
55
|
-
|
|
52
|
+
const f = l.onFocus;
|
|
53
|
+
f == null || f(c), p();
|
|
54
|
+
}, T = (l) => (c) => {
|
|
55
|
+
const f = l.onMouseEnter;
|
|
56
|
+
f == null || f(c), p();
|
|
56
57
|
}, N = (l) => (c) => {
|
|
57
|
-
const
|
|
58
|
-
|
|
58
|
+
const f = l.onMouseLeave;
|
|
59
|
+
f == null || f(c), E();
|
|
59
60
|
};
|
|
60
|
-
return
|
|
61
|
+
return w.useEffect(() => {
|
|
61
62
|
if (!i && t)
|
|
62
|
-
return window.addEventListener("focus",
|
|
63
|
-
window.removeEventListener("focus",
|
|
63
|
+
return window.addEventListener("focus", E), window.addEventListener("blur", p), () => {
|
|
64
|
+
window.removeEventListener("focus", E), window.removeEventListener("blur", p);
|
|
64
65
|
};
|
|
65
|
-
}, [i, t,
|
|
66
|
+
}, [i, t, E, p]), {
|
|
66
67
|
getRootProps: (l = {}) => {
|
|
67
68
|
const c = R({}, H(u), H(l));
|
|
68
69
|
return R({
|
|
@@ -70,57 +71,57 @@ function te(u = {}) {
|
|
|
70
71
|
// See https://github.com/mui/material-ui/issues/29080
|
|
71
72
|
role: "presentation"
|
|
72
73
|
}, l, c, {
|
|
73
|
-
onBlur:
|
|
74
|
+
onBlur: x(c),
|
|
74
75
|
onFocus: O(c),
|
|
75
|
-
onMouseEnter:
|
|
76
|
+
onMouseEnter: T(c),
|
|
76
77
|
onMouseLeave: N(c)
|
|
77
78
|
});
|
|
78
79
|
},
|
|
79
|
-
onClickAway:
|
|
80
|
+
onClickAway: m
|
|
80
81
|
};
|
|
81
82
|
}
|
|
82
|
-
const
|
|
83
|
+
const oe = ["autoHideDuration", "children", "disableWindowBlurListener", "exited", "onBlur", "onClose", "onFocus", "onMouseEnter", "onMouseLeave", "open", "resumeHideDuration", "slotProps", "slots"], re = () => Q({
|
|
83
84
|
root: ["root"]
|
|
84
|
-
},
|
|
85
|
+
}, Z(te)), q = /* @__PURE__ */ w.forwardRef(function(s, i) {
|
|
85
86
|
const {
|
|
86
87
|
autoHideDuration: r = null,
|
|
87
88
|
children: t,
|
|
88
89
|
disableWindowBlurListener: e = !1,
|
|
89
90
|
exited: o = !0,
|
|
90
91
|
onClose: a,
|
|
91
|
-
open:
|
|
92
|
-
resumeHideDuration:
|
|
93
|
-
slotProps:
|
|
94
|
-
slots:
|
|
95
|
-
} = s,
|
|
96
|
-
getRootProps:
|
|
92
|
+
open: d,
|
|
93
|
+
resumeHideDuration: m,
|
|
94
|
+
slotProps: p = {},
|
|
95
|
+
slots: E = {}
|
|
96
|
+
} = s, x = j(s, oe), O = re(), {
|
|
97
|
+
getRootProps: T,
|
|
97
98
|
onClickAway: N
|
|
98
|
-
} =
|
|
99
|
+
} = ne(R({}, s, {
|
|
99
100
|
autoHideDuration: r,
|
|
100
101
|
disableWindowBlurListener: e,
|
|
101
102
|
onClose: a,
|
|
102
|
-
open:
|
|
103
|
-
resumeHideDuration:
|
|
104
|
-
})), L = s, l =
|
|
103
|
+
open: d,
|
|
104
|
+
resumeHideDuration: m
|
|
105
|
+
})), L = s, l = E.root || "div", c = U({
|
|
105
106
|
elementType: l,
|
|
106
|
-
getSlotProps:
|
|
107
|
-
externalForwardedProps:
|
|
108
|
-
externalSlotProps:
|
|
107
|
+
getSlotProps: T,
|
|
108
|
+
externalForwardedProps: x,
|
|
109
|
+
externalSlotProps: p.root,
|
|
109
110
|
additionalProps: {
|
|
110
111
|
ref: i
|
|
111
112
|
},
|
|
112
113
|
ownerState: L,
|
|
113
114
|
className: O.root
|
|
114
|
-
}),
|
|
115
|
+
}), f = U({
|
|
115
116
|
elementType: B,
|
|
116
|
-
externalSlotProps:
|
|
117
|
+
externalSlotProps: p.clickAwayListener,
|
|
117
118
|
additionalProps: {
|
|
118
119
|
onClickAway: N
|
|
119
120
|
},
|
|
120
121
|
ownerState: L
|
|
121
122
|
});
|
|
122
|
-
return delete
|
|
123
|
-
children: /* @__PURE__ */
|
|
123
|
+
return delete f.ownerState, !d && o ? null : /* @__PURE__ */ h(B, R({}, f, {
|
|
124
|
+
children: /* @__PURE__ */ h(l, R({}, c, {
|
|
124
125
|
children: t
|
|
125
126
|
}))
|
|
126
127
|
}));
|
|
@@ -202,13 +203,13 @@ function M(u, s) {
|
|
|
202
203
|
return r.__proto__ = t, r;
|
|
203
204
|
}, M(u, s);
|
|
204
205
|
}
|
|
205
|
-
function
|
|
206
|
+
function se(u, s) {
|
|
206
207
|
u.prototype = Object.create(s.prototype), u.prototype.constructor = u, M(u, s);
|
|
207
208
|
}
|
|
208
209
|
const F = {
|
|
209
210
|
disabled: !1
|
|
210
211
|
};
|
|
211
|
-
var
|
|
212
|
+
var ae = process.env.NODE_ENV !== "production" ? n.oneOfType([n.number, n.shape({
|
|
212
213
|
enter: n.number,
|
|
213
214
|
exit: n.number,
|
|
214
215
|
appear: n.number
|
|
@@ -226,22 +227,22 @@ process.env.NODE_ENV !== "production" && n.oneOfType([n.string, n.shape({
|
|
|
226
227
|
exitActive: n.string
|
|
227
228
|
})]);
|
|
228
229
|
const G = C.createContext(null);
|
|
229
|
-
var
|
|
230
|
+
var ie = function(s) {
|
|
230
231
|
return s.scrollTop;
|
|
231
|
-
}, D = "unmounted",
|
|
232
|
-
|
|
232
|
+
}, D = "unmounted", v = "exited", k = "entering", g = "entered", A = "exiting", b = /* @__PURE__ */ function(u) {
|
|
233
|
+
se(s, u);
|
|
233
234
|
function s(r, t) {
|
|
234
235
|
var e;
|
|
235
236
|
e = u.call(this, r, t) || this;
|
|
236
|
-
var o = t, a = o && !o.isMounting ? r.enter : r.appear,
|
|
237
|
-
return e.appearStatus = null, r.in ? a ? (
|
|
238
|
-
status:
|
|
237
|
+
var o = t, a = o && !o.isMounting ? r.enter : r.appear, d;
|
|
238
|
+
return e.appearStatus = null, r.in ? a ? (d = v, e.appearStatus = k) : d = g : r.unmountOnExit || r.mountOnEnter ? d = D : d = v, e.state = {
|
|
239
|
+
status: d
|
|
239
240
|
}, e.nextCallback = null, e;
|
|
240
241
|
}
|
|
241
242
|
s.getDerivedStateFromProps = function(t, e) {
|
|
242
243
|
var o = t.in;
|
|
243
244
|
return o && e.status === D ? {
|
|
244
|
-
status:
|
|
245
|
+
status: v
|
|
245
246
|
} : null;
|
|
246
247
|
};
|
|
247
248
|
var i = s.prototype;
|
|
@@ -251,7 +252,7 @@ var ae = function(s) {
|
|
|
251
252
|
var e = null;
|
|
252
253
|
if (t !== this.props) {
|
|
253
254
|
var o = this.state.status;
|
|
254
|
-
this.props.in ? o !==
|
|
255
|
+
this.props.in ? o !== k && o !== g && (e = k) : (o === k || o === g) && (e = A);
|
|
255
256
|
}
|
|
256
257
|
this.updateStatus(!1, e);
|
|
257
258
|
}, i.componentWillUnmount = function() {
|
|
@@ -265,36 +266,36 @@ var ae = function(s) {
|
|
|
265
266
|
};
|
|
266
267
|
}, i.updateStatus = function(t, e) {
|
|
267
268
|
if (t === void 0 && (t = !1), e !== null)
|
|
268
|
-
if (this.cancelNextCallback(), e ===
|
|
269
|
+
if (this.cancelNextCallback(), e === k) {
|
|
269
270
|
if (this.props.unmountOnExit || this.props.mountOnEnter) {
|
|
270
271
|
var o = this.props.nodeRef ? this.props.nodeRef.current : P.findDOMNode(this);
|
|
271
|
-
o &&
|
|
272
|
+
o && ie(o);
|
|
272
273
|
}
|
|
273
274
|
this.performEnter(t);
|
|
274
275
|
} else
|
|
275
276
|
this.performExit();
|
|
276
277
|
else
|
|
277
|
-
this.props.unmountOnExit && this.state.status ===
|
|
278
|
+
this.props.unmountOnExit && this.state.status === v && this.setState({
|
|
278
279
|
status: D
|
|
279
280
|
});
|
|
280
281
|
}, i.performEnter = function(t) {
|
|
281
|
-
var e = this, o = this.props.enter, a = this.context ? this.context.isMounting : t,
|
|
282
|
+
var e = this, o = this.props.enter, a = this.context ? this.context.isMounting : t, d = this.props.nodeRef ? [a] : [P.findDOMNode(this), a], m = d[0], p = d[1], E = this.getTimeouts(), x = a ? E.appear : E.enter;
|
|
282
283
|
if (!t && !o || F.disabled) {
|
|
283
284
|
this.safeSetState({
|
|
284
|
-
status:
|
|
285
|
+
status: g
|
|
285
286
|
}, function() {
|
|
286
|
-
e.props.onEntered(
|
|
287
|
+
e.props.onEntered(m);
|
|
287
288
|
});
|
|
288
289
|
return;
|
|
289
290
|
}
|
|
290
|
-
this.props.onEnter(
|
|
291
|
-
status:
|
|
291
|
+
this.props.onEnter(m, p), this.safeSetState({
|
|
292
|
+
status: k
|
|
292
293
|
}, function() {
|
|
293
|
-
e.props.onEntering(
|
|
294
|
+
e.props.onEntering(m, p), e.onTransitionEnd(x, function() {
|
|
294
295
|
e.safeSetState({
|
|
295
|
-
status:
|
|
296
|
+
status: g
|
|
296
297
|
}, function() {
|
|
297
|
-
e.props.onEntered(
|
|
298
|
+
e.props.onEntered(m, p);
|
|
298
299
|
});
|
|
299
300
|
});
|
|
300
301
|
});
|
|
@@ -302,7 +303,7 @@ var ae = function(s) {
|
|
|
302
303
|
var t = this, e = this.props.exit, o = this.getTimeouts(), a = this.props.nodeRef ? void 0 : P.findDOMNode(this);
|
|
303
304
|
if (!e || F.disabled) {
|
|
304
305
|
this.safeSetState({
|
|
305
|
-
status:
|
|
306
|
+
status: v
|
|
306
307
|
}, function() {
|
|
307
308
|
t.props.onExited(a);
|
|
308
309
|
});
|
|
@@ -313,7 +314,7 @@ var ae = function(s) {
|
|
|
313
314
|
}, function() {
|
|
314
315
|
t.props.onExiting(a), t.onTransitionEnd(o.exit, function() {
|
|
315
316
|
t.safeSetState({
|
|
316
|
-
status:
|
|
317
|
+
status: v
|
|
317
318
|
}, function() {
|
|
318
319
|
t.props.onExited(a);
|
|
319
320
|
});
|
|
@@ -338,8 +339,8 @@ var ae = function(s) {
|
|
|
338
339
|
return;
|
|
339
340
|
}
|
|
340
341
|
if (this.props.addEndListener) {
|
|
341
|
-
var
|
|
342
|
-
this.props.addEndListener(
|
|
342
|
+
var d = this.props.nodeRef ? [this.nextCallback] : [o, this.nextCallback], m = d[0], p = d[1];
|
|
343
|
+
this.props.addEndListener(m, p);
|
|
343
344
|
}
|
|
344
345
|
t != null && setTimeout(this.nextCallback, t);
|
|
345
346
|
}, i.render = function() {
|
|
@@ -454,7 +455,7 @@ b.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
454
455
|
* @type {number | { enter?: number, exit?: number, appear?: number }}
|
|
455
456
|
*/
|
|
456
457
|
timeout: function(s) {
|
|
457
|
-
var i =
|
|
458
|
+
var i = ae;
|
|
458
459
|
s.addEndListener || (i = i.isRequired);
|
|
459
460
|
for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), e = 1; e < r; e++)
|
|
460
461
|
t[e - 1] = arguments[e];
|
|
@@ -527,7 +528,7 @@ b.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
527
528
|
*/
|
|
528
529
|
onExited: n.func
|
|
529
530
|
} : {};
|
|
530
|
-
function
|
|
531
|
+
function y() {
|
|
531
532
|
}
|
|
532
533
|
b.defaultProps = {
|
|
533
534
|
in: !1,
|
|
@@ -536,44 +537,28 @@ b.defaultProps = {
|
|
|
536
537
|
appear: !1,
|
|
537
538
|
enter: !0,
|
|
538
539
|
exit: !0,
|
|
539
|
-
onEnter:
|
|
540
|
-
onEntering:
|
|
541
|
-
onEntered:
|
|
542
|
-
onExit:
|
|
543
|
-
onExiting:
|
|
544
|
-
onExited:
|
|
540
|
+
onEnter: y,
|
|
541
|
+
onEntering: y,
|
|
542
|
+
onEntered: y,
|
|
543
|
+
onExit: y,
|
|
544
|
+
onExiting: y,
|
|
545
|
+
onExited: y
|
|
545
546
|
};
|
|
546
547
|
b.UNMOUNTED = D;
|
|
547
|
-
b.EXITED =
|
|
548
|
-
b.ENTERING =
|
|
549
|
-
b.ENTERED =
|
|
548
|
+
b.EXITED = v;
|
|
549
|
+
b.ENTERING = k;
|
|
550
|
+
b.ENTERED = g;
|
|
550
551
|
b.EXITING = A;
|
|
551
|
-
const
|
|
552
|
-
|
|
553
|
-
"
|
|
554
|
-
"
|
|
555
|
-
"
|
|
556
|
-
"
|
|
557
|
-
"
|
|
558
|
-
"
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
"u-typography-base--lg": "_u-typography-base--lg_8hhue_57",
|
|
562
|
-
"snackbar--message": "_snackbar--message_8hhue_57",
|
|
563
|
-
"u-typography-base--sm": "_u-typography-base--sm_8hhue_61",
|
|
564
|
-
"u-typography-base--bold": "_u-typography-base--bold_8hhue_65",
|
|
565
|
-
"u-typography-base--strikethrough": "_u-typography-base--strikethrough_8hhue_68",
|
|
566
|
-
"u-typography-base--underlined": "_u-typography-base--underlined_8hhue_71",
|
|
567
|
-
"u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-underlined_8hhue_74",
|
|
568
|
-
snackbar: ie,
|
|
569
|
-
"snackbar__snackbar-el-wrapper": "_snackbar__snackbar-el-wrapper_8hhue_91",
|
|
570
|
-
"snackbar--content": "_snackbar--content_8hhue_96",
|
|
571
|
-
"snackbar--success": "_snackbar--success_8hhue_106",
|
|
572
|
-
"snackbar--error": "_snackbar--error_8hhue_109",
|
|
573
|
-
"snackbar--warning": "_snackbar--warning_8hhue_112",
|
|
574
|
-
"snackbar--action": "_snackbar--action_8hhue_122",
|
|
575
|
-
bottomToTop: ue
|
|
576
|
-
}, ye = ({
|
|
552
|
+
const ue = "_snackbar_8unab_2", le = "_bottomToTop_8unab_1", _ = {
|
|
553
|
+
snackbar: ue,
|
|
554
|
+
"snackbar__snackbar-el-wrapper": "_snackbar__snackbar-el-wrapper_8unab_15",
|
|
555
|
+
"snackbar--content": "_snackbar--content_8unab_20",
|
|
556
|
+
"snackbar--success": "_snackbar--success_8unab_32",
|
|
557
|
+
"snackbar--error": "_snackbar--error_8unab_36",
|
|
558
|
+
"snackbar--warning": "_snackbar--warning_8unab_40",
|
|
559
|
+
"snackbar--action": "_snackbar--action_8unab_44",
|
|
560
|
+
bottomToTop: le
|
|
561
|
+
}, ke = ({
|
|
577
562
|
snackbarMessage: u,
|
|
578
563
|
variant: s,
|
|
579
564
|
autoHideDuration: i = 5e3,
|
|
@@ -583,49 +568,49 @@ const ie = "_snackbar_8hhue_57", ue = "_bottomToTop_8hhue_1", k = {
|
|
|
583
568
|
classNameWrapper: o,
|
|
584
569
|
"data-testid": a
|
|
585
570
|
}) => {
|
|
586
|
-
const [
|
|
571
|
+
const [d, m] = V(!0), p = X(null), E = {
|
|
587
572
|
entering: "translateY(0)",
|
|
588
573
|
entered: "translateY(0)",
|
|
589
574
|
exiting: "translateY(80px)",
|
|
590
575
|
exited: "translateY(80px)",
|
|
591
576
|
unmounted: "translateY(80px)"
|
|
592
|
-
},
|
|
593
|
-
|
|
577
|
+
}, x = () => {
|
|
578
|
+
m(!1);
|
|
594
579
|
}, O = () => {
|
|
595
|
-
|
|
580
|
+
m(!0);
|
|
596
581
|
};
|
|
597
|
-
return /* @__PURE__ */
|
|
582
|
+
return /* @__PURE__ */ h("div", { className: S(_.snackbar, o), children: /* @__PURE__ */ h(
|
|
598
583
|
q,
|
|
599
584
|
{
|
|
600
585
|
autoHideDuration: i,
|
|
601
586
|
open: r,
|
|
602
|
-
onClose: (
|
|
603
|
-
exited:
|
|
604
|
-
className:
|
|
605
|
-
children: /* @__PURE__ */
|
|
587
|
+
onClose: (T, N) => N !== "clickaway" && (t == null ? void 0 : t()),
|
|
588
|
+
exited: d,
|
|
589
|
+
className: S(_["snackbar__snackbar-el-wrapper"]),
|
|
590
|
+
children: /* @__PURE__ */ h(
|
|
606
591
|
b,
|
|
607
592
|
{
|
|
608
593
|
timeout: { enter: 400, exit: 400 },
|
|
609
594
|
in: r,
|
|
610
595
|
appear: !0,
|
|
611
596
|
unmountOnExit: !0,
|
|
612
|
-
onEnter:
|
|
597
|
+
onEnter: x,
|
|
613
598
|
onExited: O,
|
|
614
599
|
onExit: e,
|
|
615
|
-
nodeRef:
|
|
616
|
-
children: (
|
|
600
|
+
nodeRef: p,
|
|
601
|
+
children: (T) => /* @__PURE__ */ Y(
|
|
617
602
|
"div",
|
|
618
603
|
{
|
|
619
|
-
className:
|
|
604
|
+
className: S(_["snackbar--content"], _[`snackbar--${s}`]),
|
|
620
605
|
style: {
|
|
621
|
-
transform:
|
|
606
|
+
transform: E[T],
|
|
622
607
|
transition: "transform 300ms ease"
|
|
623
608
|
},
|
|
624
|
-
ref:
|
|
609
|
+
ref: p,
|
|
625
610
|
"data-testid": a,
|
|
626
611
|
children: [
|
|
627
|
-
/* @__PURE__ */
|
|
628
|
-
/* @__PURE__ */
|
|
612
|
+
/* @__PURE__ */ h("div", { className: S(_["snackbar--message"]), children: /* @__PURE__ */ h($, { variant: "base-lg", bold: !0, color: "var(--colors-neutral-text-color-text)", children: u }) }),
|
|
613
|
+
/* @__PURE__ */ h("div", { className: S(_["snackbar--action"]), children: /* @__PURE__ */ h("a", { onClick: t, children: /* @__PURE__ */ h(K, { icon: "circle-xmark", color: "var(--colors-neutral-text-color-text)", size: "1.5rem" }) }) })
|
|
629
614
|
]
|
|
630
615
|
}
|
|
631
616
|
)
|
|
@@ -635,5 +620,5 @@ const ie = "_snackbar_8hhue_57", ue = "_bottomToTop_8hhue_1", k = {
|
|
|
635
620
|
) });
|
|
636
621
|
};
|
|
637
622
|
export {
|
|
638
|
-
|
|
623
|
+
ke as Snackbar
|
|
639
624
|
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
type StepperNavigatorLang = 'en' | 'pt';
|
|
3
|
+
export type StepperNavigatorButtonProps = {
|
|
4
|
+
leftIcon?: React.ReactNode;
|
|
5
|
+
rightIcon?: React.ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
'data-testid'?: string;
|
|
8
|
+
};
|
|
9
|
+
export type StepperNavigatorProps = {
|
|
10
|
+
/** Hides the "previous" button */
|
|
11
|
+
hidePrevious?: boolean;
|
|
12
|
+
/** Hides the "cancel" button */
|
|
13
|
+
hideCancel?: boolean;
|
|
14
|
+
/** Hides the "next" button */
|
|
15
|
+
hideNext?: boolean;
|
|
16
|
+
/** Hides the "finish" button */
|
|
17
|
+
hideFinish?: boolean;
|
|
18
|
+
/** Disables the "previous" button */
|
|
19
|
+
disablePrevious?: boolean;
|
|
20
|
+
/** Disables the "cancel" button */
|
|
21
|
+
disableCancel?: boolean;
|
|
22
|
+
/** Disables the "next" button */
|
|
23
|
+
disableNext?: boolean;
|
|
24
|
+
/** Disables the "finish" button */
|
|
25
|
+
disableFinish?: boolean;
|
|
26
|
+
/** Label to be used for the "previous" button */
|
|
27
|
+
labelPrevious?: string;
|
|
28
|
+
/** Label to be used for the "cancel" button */
|
|
29
|
+
labelCancel?: string;
|
|
30
|
+
/** Label to be used for the "next" button */
|
|
31
|
+
labelNext?: string;
|
|
32
|
+
/** Label to be used for the "finish" button */
|
|
33
|
+
labelFinish?: string;
|
|
34
|
+
/** Language to be used for the button labels. Default "en" */
|
|
35
|
+
lang?: StepperNavigatorLang;
|
|
36
|
+
/** CSS classes to be applied on the container element */
|
|
37
|
+
className?: string;
|
|
38
|
+
/** Id to be applied as `data-testid` on the container element */
|
|
39
|
+
'data-testid'?: string;
|
|
40
|
+
/** Previous button props */
|
|
41
|
+
previousButtonProps?: StepperNavigatorButtonProps;
|
|
42
|
+
/** Cancel button props */
|
|
43
|
+
cancelButtonProps?: StepperNavigatorButtonProps;
|
|
44
|
+
/** Next button props */
|
|
45
|
+
nextButtonProps?: StepperNavigatorButtonProps;
|
|
46
|
+
/** Finish button props */
|
|
47
|
+
finishButtonProps?: StepperNavigatorButtonProps;
|
|
48
|
+
/** Callback to be called when the "previous" button is clicked */
|
|
49
|
+
onPrevious?: () => void;
|
|
50
|
+
/** Callback to be called when the "cancel" button is clicked */
|
|
51
|
+
onCancel?: () => void;
|
|
52
|
+
/** Callback to be called when the "next" button is clicked */
|
|
53
|
+
onNext?: () => void;
|
|
54
|
+
/** Callback to be called when the "finish" button is clicked */
|
|
55
|
+
onFinish?: () => void;
|
|
56
|
+
};
|
|
57
|
+
export declare const StepperNavigator: ({ hideNext, hidePrevious, hideCancel, hideFinish, disableNext, disablePrevious, disableCancel, disableFinish, lang, labelNext, labelPrevious, labelCancel, labelFinish, className, "data-testid": dataTestId, previousButtonProps, cancelButtonProps, nextButtonProps, finishButtonProps, onNext, onPrevious, onCancel, onFinish, }: StepperNavigatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
58
|
+
export {};
|