@pismo/marola 0.0.1-alpha.9 → 1.0.0-beta.1
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/README.md +1 -1
- package/dist/{Button-B1umG8kJ.js → Button-2b1peDFT.js} +25 -26
- package/dist/{ClickAwayListener-BKznXF1d.js → ClickAwayListener-BSW-Nd-y.js} +3 -2
- package/dist/Dialog.module-DFEmFdYT.js +30 -0
- package/dist/Group-B3p31ftp.js +26 -0
- package/dist/Popup-B6ZSGIEI.js +1248 -0
- package/dist/{Portal-BcdMtRGF.js → Portal-DIeBsWdL.js} +2 -2
- package/dist/SelectButton-C8JQKaf4.js +61 -0
- package/dist/Tabs.module-jkH1Qjn7.js +22 -0
- package/dist/Toggle-BCgIItCc.js +142 -0
- package/dist/assets/Advice.css +1 -1
- package/dist/assets/Button.css +1 -1
- package/dist/assets/Checkbox.css +1 -1
- package/dist/assets/Dialog.css +1 -1
- package/dist/assets/EllipsisTooltip.css +1 -0
- package/dist/assets/Group.css +1 -0
- package/dist/assets/IconButton.css +1 -1
- package/dist/assets/Input.css +1 -1
- package/dist/assets/InputSearch.css +1 -1
- package/dist/assets/PageHeader.css +1 -1
- package/dist/assets/Pagination.css +1 -1
- package/dist/assets/SelectButton.css +1 -0
- package/dist/assets/Skeleton.css +1 -1
- package/dist/assets/Snackbar.css +1 -1
- package/dist/assets/SortTooltip.css +1 -1
- package/dist/assets/Stepper.css +1 -1
- package/dist/assets/Table.css +1 -1
- package/dist/assets/TextDisplay.css +1 -0
- package/dist/assets/Toggle.css +1 -1
- package/dist/assets/Toggle2.css +1 -0
- package/dist/assets/Typography.css +1 -1
- package/dist/combineHooksSlotProps-DVjg9PRh.js +80 -0
- package/dist/components/Advice/Advice.d.ts +17 -3
- package/dist/components/Advice/Advice.js +39 -17
- package/dist/components/Advice/Advice.stories.d.ts +18 -0
- package/dist/components/Button/Button.d.ts +6 -3
- package/dist/components/Button/Button.js +60 -65
- package/dist/components/Button/Button.stories.d.ts +3 -1
- package/dist/components/Checkbox/Checkbox.d.ts +19 -2
- package/dist/components/Checkbox/Checkbox.js +63 -40
- package/dist/components/Checkbox/Checkbox.stories.d.ts +31 -0
- package/dist/components/Chip/Chip.d.ts +39 -0
- package/dist/components/Chip/Chip.js +19 -0
- package/dist/components/Chip/Chip.stories.d.ts +42 -0
- package/dist/components/Chip/chip.test.d.ts +1 -0
- package/dist/components/Dialog/Actions.js +1 -1
- package/dist/components/Dialog/Backdrop.js +1 -1
- package/dist/components/Dialog/CloseIconButton.js +2 -2
- package/dist/components/Dialog/Dialog.d.ts +1 -1
- package/dist/components/Dialog/Dialog.js +13 -13
- package/dist/components/Dialog/Dialog.stories.d.ts +10 -10
- package/dist/components/Dialog/{Title.d.ts → DialogTitle.d.ts} +3 -3
- package/dist/components/Dialog/DialogTitle.js +29 -0
- package/dist/components/EllipsisTooltip/EllipsisTooltip.d.ts +7 -0
- package/dist/components/EllipsisTooltip/EllipsisTooltip.js +23 -0
- package/dist/components/EllipsisTooltip/EllipsisTooltip.stories.d.ts +31 -0
- package/dist/components/Icon/Icon.d.ts +8 -15
- package/dist/components/Icon/Icon.js +108 -57
- package/dist/components/Icon/Icon.stories.d.ts +14 -0
- package/dist/components/Icon/types.d.ts +5 -0
- package/dist/components/Icon/types.js +1 -0
- package/dist/components/IconButton/Icon.stories.d.ts +15 -0
- package/dist/components/IconButton/IconButton.d.ts +18 -2
- package/dist/components/IconButton/IconButton.js +58 -63
- package/dist/components/Input/Input.d.ts +1 -1
- package/dist/components/Input/Input.js +241 -230
- package/dist/components/InputSearch/InputSearch.d.ts +7 -9
- package/dist/components/InputSearch/InputSearch.js +30 -25
- package/dist/components/InputSearch/InputSearch.stories.d.ts +21 -4
- package/dist/components/LoadingSpinner/LoadingSpinner.d.ts +1 -1
- package/dist/components/PageHeader/PageHeader.d.ts +36 -6
- package/dist/components/PageHeader/PageHeader.js +83 -47
- package/dist/components/PageHeader/PageHeader.stories.d.ts +2 -31
- package/dist/components/Pagination/Pagination.d.ts +24 -5
- package/dist/components/Pagination/Pagination.js +127 -109
- package/dist/components/Pagination/Pagination.stories.d.ts +17 -0
- package/dist/components/Select/Select.d.ts +26 -0
- package/dist/components/Select/Select.js +857 -0
- package/dist/components/Select/Select.stories.d.ts +22 -0
- package/dist/components/Select/SelectButton.d.ts +12 -0
- package/dist/components/Select/SelectButton.js +8 -0
- package/dist/components/Skeleton/Skeleton.d.ts +10 -3
- package/dist/components/Skeleton/Skeleton.js +16 -19
- package/dist/components/Skeleton/Skeleton.stories.d.ts +14 -0
- package/dist/components/Skeleton/SkeletonCircle.stories.d.ts +14 -0
- package/dist/components/Skeleton/SkeletonTable.stories.d.ts +16 -0
- package/dist/components/Snackbar/Snackbar.d.ts +19 -5
- package/dist/components/Snackbar/Snackbar.js +247 -230
- package/dist/components/Snackbar/Snackbar.stories.d.ts +319 -0
- package/dist/components/SortTooltip/SortTooltip.d.ts +3 -1
- package/dist/components/SortTooltip/SortTooltip.js +55 -29
- package/dist/components/Stepper/Stepper.d.ts +11 -1
- package/dist/components/Stepper/Stepper.js +37 -22
- package/dist/components/Stepper/Stepper.stories.d.ts +16 -0
- package/dist/components/Table/Table.d.ts +33 -16
- package/dist/components/Table/Table.js +106 -91
- package/dist/components/Table/Table.stories.d.ts +29 -0
- package/dist/components/Table/_Table.TBody.stories.d.ts +14 -0
- package/dist/components/Table/_Table.THead.stories.d.ts +14 -0
- package/dist/components/Table/_Table.Td.stories.d.ts +16 -0
- package/dist/components/Table/_Table.Th.stories.d.ts +15 -0
- package/dist/components/Table/_Table.Tr.stories.d.ts +15 -0
- package/dist/components/Tabs/Tab.d.ts +5 -0
- package/dist/components/Tabs/Tab.js +179 -6
- package/dist/components/Tabs/Tab.stories.d.ts +15 -0
- package/dist/components/Tabs/TabPanel.d.ts +4 -0
- package/dist/components/Tabs/TabPanel.js +12 -12
- package/dist/components/Tabs/TabPanel.stories.d.ts +14 -0
- package/dist/components/Tabs/Tabs.d.ts +5 -1
- package/dist/components/Tabs/Tabs.js +242 -668
- package/dist/components/Tabs/Tabs.stories.d.ts +14 -0
- package/dist/components/TextDisplay/TextDisplay.d.ts +23 -0
- package/dist/components/TextDisplay/TextDisplay.js +37 -0
- package/dist/components/TextDisplay/TextDisplay.stories.d.ts +13 -0
- package/dist/components/TextDisplay/textDisplay.test.d.ts +1 -0
- package/dist/components/Toggle/Toggle.js +143 -129
- package/dist/components/ToggleGroup/Group.d.ts +18 -0
- package/dist/components/ToggleGroup/Group.js +7 -0
- package/dist/components/ToggleGroup/Group.test.d.ts +1 -0
- package/dist/components/ToggleGroup/Toggle.d.ts +15 -0
- package/dist/components/ToggleGroup/Toggle.js +17 -0
- package/dist/components/ToggleGroup/Toggle.test.d.ts +1 -0
- package/dist/components/ToggleGroup/ToggleGroup.d.ts +2 -0
- package/dist/components/ToggleGroup/ToggleGroup.js +6 -0
- package/dist/components/ToggleGroup/ToggleGroup.stories.d.ts +25 -0
- package/dist/components/Tooltip/Tooltip.d.ts +22 -6
- package/dist/components/Tooltip/Tooltip.js +114 -1339
- package/dist/components/Tooltip/Tooltip.stories.d.ts +35 -0
- package/dist/components/Typography/Typography.d.ts +5 -2
- package/dist/components/Typography/Typography.js +58 -74
- package/dist/components/Typography/Typography.stories.d.ts +1 -0
- package/dist/contexts/SnackbarProvider/SnackbarProvider.d.ts +11 -0
- package/dist/contexts/SnackbarProvider/SnackbarProvider.js +50 -0
- package/dist/contexts/SnackbarProvider/SnackbarProvider.stories.d.ts +21 -0
- package/dist/{index-CqjC7P5Y.js → index-CH45lKw7.js} +333 -307
- package/dist/{index-BNWbc5Kh.js → index-CjW42-M-.js} +3108 -3152
- package/dist/main.d.ts +10 -1
- package/dist/main.js +74 -55
- package/dist/marola.css +1 -0
- package/dist/{useButton-Bc8IAgyk.js → useButton-DNk3wrQp.js} +3 -4
- package/dist/useCompoundItem-D1iRfg8D.js +84 -0
- package/dist/useEventCallback-xTG9piMa.js +45 -0
- package/dist/useList-B0hog_3-.js +436 -0
- package/dist/utils/styleStrings.d.ts +1 -1
- package/dist/utils/styleStrings.js +7 -7
- package/package.json +4 -4
- package/dist/Dialog.module-CGVM5V_D.js +0 -15
- package/dist/Tab-CRwnhsj5.js +0 -254
- package/dist/Tabs.module-yYcTJnj6.js +0 -103
- package/dist/_commonjsHelpers-CT_km90n.js +0 -30
- package/dist/assets/global.css +0 -1
- package/dist/components/Button/Button.stories.js +0 -40
- package/dist/components/Dialog/Dialog.stories.js +0 -59
- package/dist/components/Dialog/Title.js +0 -29
- package/dist/components/Input/Input.stories.js +0 -106
- package/dist/components/InputSearch/InputSearch.stories.js +0 -36
- package/dist/components/LoadingSpinner/LoadingSpinner.stories.js +0 -38
- package/dist/components/PageHeader/PageHeader.stories.js +0 -49
- package/dist/components/Toggle/Toggle.stories.js +0 -33
- package/dist/components/Typography/Typography.stories.js +0 -30
- package/dist/components/Typography/typography.test.js +0 -11357
- package/dist/magic-string.es-O_8lTkE3.js +0 -738
- package/dist/objectWithoutPropertiesLoose-D7Cp0Pg_.js +0 -26
- package/dist/utils/styleStrings.test.js +0 -41
- package/dist/vi.Y_w82WR8-Df0JUamG.js +0 -9860
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import '../../assets/Snackbar.css';
|
|
2
|
-
import { jsx as
|
|
3
|
-
import * as
|
|
2
|
+
import { jsx as E, jsxs as Y } from "react/jsx-runtime";
|
|
3
|
+
import * as S from "react";
|
|
4
4
|
import C, { useState as V, useRef as X } from "react";
|
|
5
|
-
import { c as
|
|
5
|
+
import { c as N } from "../../clsx-DB4S2d7J.js";
|
|
6
6
|
import { Icon as K } from "../Icon/Icon.js";
|
|
7
|
-
import { a as
|
|
8
|
-
import { g as $, a as z, e as H, b as U, P as t, c as J, d as Q } from "../../index-CqjC7P5Y.js";
|
|
7
|
+
import { g as $, a as z, b as R, f as H, _ as j, c as U, P as n, d as J, e as Q } from "../../index-CH45lKw7.js";
|
|
9
8
|
import { u as Z } from "../../useTimeout-DxF9kiZL.js";
|
|
10
|
-
import { u as I
|
|
11
|
-
import { C as B } from "../../ClickAwayListener-
|
|
9
|
+
import { u as I } from "../../useEventCallback-xTG9piMa.js";
|
|
10
|
+
import { C as B } from "../../ClickAwayListener-BSW-Nd-y.js";
|
|
11
|
+
import { R as P } from "../../index-CjW42-M-.js";
|
|
12
12
|
const W = "Snackbar";
|
|
13
13
|
function ee(u) {
|
|
14
14
|
return $(W, u);
|
|
@@ -17,111 +17,111 @@ z(W, ["root"]);
|
|
|
17
17
|
function te(u = {}) {
|
|
18
18
|
const {
|
|
19
19
|
autoHideDuration: s = null,
|
|
20
|
-
disableWindowBlurListener:
|
|
20
|
+
disableWindowBlurListener: i = !1,
|
|
21
21
|
onClose: r,
|
|
22
|
-
open:
|
|
22
|
+
open: t,
|
|
23
23
|
resumeHideDuration: e
|
|
24
24
|
} = u, o = Z();
|
|
25
|
-
|
|
26
|
-
if (!
|
|
25
|
+
S.useEffect(() => {
|
|
26
|
+
if (!t)
|
|
27
27
|
return;
|
|
28
|
-
function l(
|
|
29
|
-
|
|
28
|
+
function l(c) {
|
|
29
|
+
c.defaultPrevented || (c.key === "Escape" || c.key === "Esc") && (r == null || r(c, "escapeKeyDown"));
|
|
30
30
|
}
|
|
31
31
|
return document.addEventListener("keydown", l), () => {
|
|
32
32
|
document.removeEventListener("keydown", l);
|
|
33
33
|
};
|
|
34
|
-
}, [
|
|
35
|
-
const
|
|
36
|
-
r == null || r(l,
|
|
37
|
-
}),
|
|
34
|
+
}, [t, r]);
|
|
35
|
+
const a = I((l, c) => {
|
|
36
|
+
r == null || r(l, c);
|
|
37
|
+
}), p = I((l) => {
|
|
38
38
|
!r || l == null || o.start(l, () => {
|
|
39
|
-
|
|
39
|
+
a(null, "timeout");
|
|
40
40
|
});
|
|
41
41
|
});
|
|
42
|
-
|
|
43
|
-
const
|
|
42
|
+
S.useEffect(() => (t && p(s), o.clear), [t, s, p, o]);
|
|
43
|
+
const h = (l) => {
|
|
44
44
|
r == null || r(l, "clickaway");
|
|
45
|
-
},
|
|
46
|
-
s != null &&
|
|
47
|
-
}, [s, e,
|
|
45
|
+
}, d = o.clear, m = S.useCallback(() => {
|
|
46
|
+
s != null && p(e ?? s * 0.5);
|
|
47
|
+
}, [s, e, p]), y = (l) => (c) => {
|
|
48
48
|
const f = l.onBlur;
|
|
49
|
-
f == null || f(
|
|
50
|
-
},
|
|
49
|
+
f == null || f(c), m();
|
|
50
|
+
}, T = (l) => (c) => {
|
|
51
51
|
const f = l.onFocus;
|
|
52
|
-
f == null || f(
|
|
53
|
-
},
|
|
52
|
+
f == null || f(c), d();
|
|
53
|
+
}, k = (l) => (c) => {
|
|
54
54
|
const f = l.onMouseEnter;
|
|
55
|
-
f == null || f(
|
|
56
|
-
},
|
|
55
|
+
f == null || f(c), d();
|
|
56
|
+
}, O = (l) => (c) => {
|
|
57
57
|
const f = l.onMouseLeave;
|
|
58
|
-
f == null || f(
|
|
58
|
+
f == null || f(c), m();
|
|
59
59
|
};
|
|
60
|
-
return
|
|
61
|
-
if (!
|
|
62
|
-
return window.addEventListener("focus",
|
|
63
|
-
window.removeEventListener("focus",
|
|
60
|
+
return S.useEffect(() => {
|
|
61
|
+
if (!i && t)
|
|
62
|
+
return window.addEventListener("focus", m), window.addEventListener("blur", d), () => {
|
|
63
|
+
window.removeEventListener("focus", m), window.removeEventListener("blur", d);
|
|
64
64
|
};
|
|
65
|
-
}, [
|
|
65
|
+
}, [i, t, m, d]), {
|
|
66
66
|
getRootProps: (l = {}) => {
|
|
67
|
-
const
|
|
68
|
-
return
|
|
67
|
+
const c = R({}, H(u), H(l));
|
|
68
|
+
return R({
|
|
69
69
|
// ClickAwayListener adds an `onClick` prop which results in the alert not being announced.
|
|
70
70
|
// See https://github.com/mui/material-ui/issues/29080
|
|
71
71
|
role: "presentation"
|
|
72
|
-
}, l,
|
|
73
|
-
onBlur:
|
|
74
|
-
onFocus:
|
|
75
|
-
onMouseEnter:
|
|
76
|
-
onMouseLeave:
|
|
72
|
+
}, l, c, {
|
|
73
|
+
onBlur: y(c),
|
|
74
|
+
onFocus: T(c),
|
|
75
|
+
onMouseEnter: k(c),
|
|
76
|
+
onMouseLeave: O(c)
|
|
77
77
|
});
|
|
78
78
|
},
|
|
79
|
-
onClickAway:
|
|
79
|
+
onClickAway: h
|
|
80
80
|
};
|
|
81
81
|
}
|
|
82
82
|
const ne = ["autoHideDuration", "children", "disableWindowBlurListener", "exited", "onBlur", "onClose", "onFocus", "onMouseEnter", "onMouseLeave", "open", "resumeHideDuration", "slotProps", "slots"], oe = () => J({
|
|
83
83
|
root: ["root"]
|
|
84
|
-
}, Q(ee)), q = /* @__PURE__ */
|
|
84
|
+
}, Q(ee)), q = /* @__PURE__ */ S.forwardRef(function(s, i) {
|
|
85
85
|
const {
|
|
86
86
|
autoHideDuration: r = null,
|
|
87
|
-
children:
|
|
87
|
+
children: t,
|
|
88
88
|
disableWindowBlurListener: e = !1,
|
|
89
89
|
exited: o = !0,
|
|
90
|
-
onClose:
|
|
91
|
-
open:
|
|
92
|
-
resumeHideDuration:
|
|
93
|
-
slotProps:
|
|
94
|
-
slots:
|
|
95
|
-
} = s,
|
|
96
|
-
getRootProps:
|
|
97
|
-
onClickAway:
|
|
98
|
-
} = te(
|
|
90
|
+
onClose: a,
|
|
91
|
+
open: p,
|
|
92
|
+
resumeHideDuration: h,
|
|
93
|
+
slotProps: d = {},
|
|
94
|
+
slots: m = {}
|
|
95
|
+
} = s, y = j(s, ne), T = oe(), {
|
|
96
|
+
getRootProps: k,
|
|
97
|
+
onClickAway: O
|
|
98
|
+
} = te(R({}, s, {
|
|
99
99
|
autoHideDuration: r,
|
|
100
100
|
disableWindowBlurListener: e,
|
|
101
|
-
onClose:
|
|
102
|
-
open:
|
|
103
|
-
resumeHideDuration:
|
|
104
|
-
})), L = s, l =
|
|
101
|
+
onClose: a,
|
|
102
|
+
open: p,
|
|
103
|
+
resumeHideDuration: h
|
|
104
|
+
})), L = s, l = m.root || "div", c = U({
|
|
105
105
|
elementType: l,
|
|
106
|
-
getSlotProps:
|
|
107
|
-
externalForwardedProps:
|
|
108
|
-
externalSlotProps:
|
|
106
|
+
getSlotProps: k,
|
|
107
|
+
externalForwardedProps: y,
|
|
108
|
+
externalSlotProps: d.root,
|
|
109
109
|
additionalProps: {
|
|
110
|
-
ref:
|
|
110
|
+
ref: i
|
|
111
111
|
},
|
|
112
112
|
ownerState: L,
|
|
113
|
-
className:
|
|
113
|
+
className: T.root
|
|
114
114
|
}), f = U({
|
|
115
115
|
elementType: B,
|
|
116
|
-
externalSlotProps:
|
|
116
|
+
externalSlotProps: d.clickAwayListener,
|
|
117
117
|
additionalProps: {
|
|
118
|
-
onClickAway:
|
|
118
|
+
onClickAway: O
|
|
119
119
|
},
|
|
120
120
|
ownerState: L
|
|
121
121
|
});
|
|
122
|
-
return delete f.ownerState, !
|
|
123
|
-
children: /* @__PURE__ */
|
|
124
|
-
children:
|
|
122
|
+
return delete f.ownerState, !p && o ? null : /* @__PURE__ */ E(B, R({}, f, {
|
|
123
|
+
children: /* @__PURE__ */ E(l, R({}, c, {
|
|
124
|
+
children: t
|
|
125
125
|
}))
|
|
126
126
|
}));
|
|
127
127
|
});
|
|
@@ -137,21 +137,21 @@ process.env.NODE_ENV !== "production" && (q.propTypes = {
|
|
|
137
137
|
* the `null` value.
|
|
138
138
|
* @default null
|
|
139
139
|
*/
|
|
140
|
-
autoHideDuration:
|
|
140
|
+
autoHideDuration: n.number,
|
|
141
141
|
/**
|
|
142
142
|
* @ignore
|
|
143
143
|
*/
|
|
144
|
-
children:
|
|
144
|
+
children: n.node,
|
|
145
145
|
/**
|
|
146
146
|
* If `true`, the `autoHideDuration` timer will expire even if the window is not focused.
|
|
147
147
|
* @default false
|
|
148
148
|
*/
|
|
149
|
-
disableWindowBlurListener:
|
|
149
|
+
disableWindowBlurListener: n.bool,
|
|
150
150
|
/**
|
|
151
151
|
* The prop used to handle exited transition and unmount the component.
|
|
152
152
|
* @default true
|
|
153
153
|
*/
|
|
154
|
-
exited:
|
|
154
|
+
exited: n.bool,
|
|
155
155
|
/**
|
|
156
156
|
* Callback fired when the component requests to be closed.
|
|
157
157
|
* Typically `onClose` is used to set state in the parent component,
|
|
@@ -162,44 +162,44 @@ process.env.NODE_ENV !== "production" && (q.propTypes = {
|
|
|
162
162
|
* @param {React.SyntheticEvent<any> | Event} event The event source of the callback.
|
|
163
163
|
* @param {string} reason Can be: `"timeout"` (`autoHideDuration` expired), `"clickaway"`, or `"escapeKeyDown"`.
|
|
164
164
|
*/
|
|
165
|
-
onClose:
|
|
165
|
+
onClose: n.func,
|
|
166
166
|
/**
|
|
167
167
|
* If `true`, the component is shown.
|
|
168
168
|
*/
|
|
169
|
-
open:
|
|
169
|
+
open: n.bool,
|
|
170
170
|
/**
|
|
171
171
|
* The number of milliseconds to wait before dismissing after user interaction.
|
|
172
172
|
* If `autoHideDuration` prop isn't specified, it does nothing.
|
|
173
173
|
* If `autoHideDuration` prop is specified but `resumeHideDuration` isn't,
|
|
174
174
|
* we default to `autoHideDuration / 2` ms.
|
|
175
175
|
*/
|
|
176
|
-
resumeHideDuration:
|
|
176
|
+
resumeHideDuration: n.number,
|
|
177
177
|
/**
|
|
178
178
|
* The props used for each slot inside the Snackbar.
|
|
179
179
|
* @default {}
|
|
180
180
|
*/
|
|
181
|
-
slotProps:
|
|
182
|
-
clickAwayListener:
|
|
183
|
-
children:
|
|
184
|
-
disableReactTree:
|
|
185
|
-
mouseEvent:
|
|
186
|
-
onClickAway:
|
|
187
|
-
touchEvent:
|
|
181
|
+
slotProps: n.shape({
|
|
182
|
+
clickAwayListener: n.oneOfType([n.func, n.shape({
|
|
183
|
+
children: n.element.isRequired,
|
|
184
|
+
disableReactTree: n.bool,
|
|
185
|
+
mouseEvent: n.oneOf(["onClick", "onMouseDown", "onMouseUp", "onPointerDown", "onPointerUp", !1]),
|
|
186
|
+
onClickAway: n.func,
|
|
187
|
+
touchEvent: n.oneOf(["onTouchEnd", "onTouchStart", !1])
|
|
188
188
|
})]),
|
|
189
|
-
root:
|
|
189
|
+
root: n.oneOfType([n.func, n.object])
|
|
190
190
|
}),
|
|
191
191
|
/**
|
|
192
192
|
* The components used for each slot inside the Snackbar.
|
|
193
193
|
* Either a string to use a HTML element or a component.
|
|
194
194
|
* @default {}
|
|
195
195
|
*/
|
|
196
|
-
slots:
|
|
197
|
-
root:
|
|
196
|
+
slots: n.shape({
|
|
197
|
+
root: n.elementType
|
|
198
198
|
})
|
|
199
199
|
});
|
|
200
200
|
function M(u, s) {
|
|
201
|
-
return M = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r,
|
|
202
|
-
return r.__proto__ =
|
|
201
|
+
return M = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, t) {
|
|
202
|
+
return r.__proto__ = t, r;
|
|
203
203
|
}, M(u, s);
|
|
204
204
|
}
|
|
205
205
|
function re(u, s) {
|
|
@@ -208,152 +208,152 @@ function re(u, s) {
|
|
|
208
208
|
const F = {
|
|
209
209
|
disabled: !1
|
|
210
210
|
};
|
|
211
|
-
var se = process.env.NODE_ENV !== "production" ?
|
|
212
|
-
enter:
|
|
213
|
-
exit:
|
|
214
|
-
appear:
|
|
211
|
+
var se = process.env.NODE_ENV !== "production" ? n.oneOfType([n.number, n.shape({
|
|
212
|
+
enter: n.number,
|
|
213
|
+
exit: n.number,
|
|
214
|
+
appear: n.number
|
|
215
215
|
}).isRequired]) : null;
|
|
216
|
-
process.env.NODE_ENV !== "production" &&
|
|
217
|
-
enter:
|
|
218
|
-
exit:
|
|
219
|
-
active:
|
|
220
|
-
}),
|
|
221
|
-
enter:
|
|
222
|
-
enterDone:
|
|
223
|
-
enterActive:
|
|
224
|
-
exit:
|
|
225
|
-
exitDone:
|
|
226
|
-
exitActive:
|
|
216
|
+
process.env.NODE_ENV !== "production" && n.oneOfType([n.string, n.shape({
|
|
217
|
+
enter: n.string,
|
|
218
|
+
exit: n.string,
|
|
219
|
+
active: n.string
|
|
220
|
+
}), n.shape({
|
|
221
|
+
enter: n.string,
|
|
222
|
+
enterDone: n.string,
|
|
223
|
+
enterActive: n.string,
|
|
224
|
+
exit: n.string,
|
|
225
|
+
exitDone: n.string,
|
|
226
|
+
exitActive: n.string
|
|
227
227
|
})]);
|
|
228
228
|
const G = C.createContext(null);
|
|
229
|
-
var
|
|
229
|
+
var ae = function(s) {
|
|
230
230
|
return s.scrollTop;
|
|
231
|
-
},
|
|
231
|
+
}, D = "unmounted", g = "exited", x = "entering", w = "entered", A = "exiting", b = /* @__PURE__ */ function(u) {
|
|
232
232
|
re(s, u);
|
|
233
|
-
function s(r,
|
|
233
|
+
function s(r, t) {
|
|
234
234
|
var e;
|
|
235
|
-
e = u.call(this, r,
|
|
236
|
-
var o =
|
|
237
|
-
return e.appearStatus = null, r.in ?
|
|
238
|
-
status:
|
|
235
|
+
e = u.call(this, r, t) || this;
|
|
236
|
+
var o = t, a = o && !o.isMounting ? r.enter : r.appear, p;
|
|
237
|
+
return e.appearStatus = null, r.in ? a ? (p = g, e.appearStatus = x) : p = w : r.unmountOnExit || r.mountOnEnter ? p = D : p = g, e.state = {
|
|
238
|
+
status: p
|
|
239
239
|
}, e.nextCallback = null, e;
|
|
240
240
|
}
|
|
241
|
-
s.getDerivedStateFromProps = function(
|
|
242
|
-
var o =
|
|
243
|
-
return o && e.status ===
|
|
244
|
-
status:
|
|
241
|
+
s.getDerivedStateFromProps = function(t, e) {
|
|
242
|
+
var o = t.in;
|
|
243
|
+
return o && e.status === D ? {
|
|
244
|
+
status: g
|
|
245
245
|
} : null;
|
|
246
246
|
};
|
|
247
|
-
var
|
|
248
|
-
return
|
|
247
|
+
var i = s.prototype;
|
|
248
|
+
return i.componentDidMount = function() {
|
|
249
249
|
this.updateStatus(!0, this.appearStatus);
|
|
250
|
-
},
|
|
250
|
+
}, i.componentDidUpdate = function(t) {
|
|
251
251
|
var e = null;
|
|
252
|
-
if (
|
|
252
|
+
if (t !== this.props) {
|
|
253
253
|
var o = this.state.status;
|
|
254
|
-
this.props.in ? o !==
|
|
254
|
+
this.props.in ? o !== x && o !== w && (e = x) : (o === x || o === w) && (e = A);
|
|
255
255
|
}
|
|
256
256
|
this.updateStatus(!1, e);
|
|
257
|
-
},
|
|
257
|
+
}, i.componentWillUnmount = function() {
|
|
258
258
|
this.cancelNextCallback();
|
|
259
|
-
},
|
|
260
|
-
var
|
|
261
|
-
return e = o =
|
|
259
|
+
}, i.getTimeouts = function() {
|
|
260
|
+
var t = this.props.timeout, e, o, a;
|
|
261
|
+
return e = o = a = t, t != null && typeof t != "number" && (e = t.exit, o = t.enter, a = t.appear !== void 0 ? t.appear : o), {
|
|
262
262
|
exit: e,
|
|
263
263
|
enter: o,
|
|
264
|
-
appear:
|
|
264
|
+
appear: a
|
|
265
265
|
};
|
|
266
|
-
},
|
|
267
|
-
if (
|
|
268
|
-
if (this.cancelNextCallback(), e ===
|
|
266
|
+
}, i.updateStatus = function(t, e) {
|
|
267
|
+
if (t === void 0 && (t = !1), e !== null)
|
|
268
|
+
if (this.cancelNextCallback(), e === x) {
|
|
269
269
|
if (this.props.unmountOnExit || this.props.mountOnEnter) {
|
|
270
|
-
var o = this.props.nodeRef ? this.props.nodeRef.current :
|
|
271
|
-
o &&
|
|
270
|
+
var o = this.props.nodeRef ? this.props.nodeRef.current : P.findDOMNode(this);
|
|
271
|
+
o && ae(o);
|
|
272
272
|
}
|
|
273
|
-
this.performEnter(
|
|
273
|
+
this.performEnter(t);
|
|
274
274
|
} else
|
|
275
275
|
this.performExit();
|
|
276
276
|
else
|
|
277
|
-
this.props.unmountOnExit && this.state.status ===
|
|
278
|
-
status:
|
|
277
|
+
this.props.unmountOnExit && this.state.status === g && this.setState({
|
|
278
|
+
status: D
|
|
279
279
|
});
|
|
280
|
-
},
|
|
281
|
-
var e = this, o = this.props.enter,
|
|
282
|
-
if (!
|
|
280
|
+
}, i.performEnter = function(t) {
|
|
281
|
+
var e = this, o = this.props.enter, a = this.context ? this.context.isMounting : t, p = this.props.nodeRef ? [a] : [P.findDOMNode(this), a], h = p[0], d = p[1], m = this.getTimeouts(), y = a ? m.appear : m.enter;
|
|
282
|
+
if (!t && !o || F.disabled) {
|
|
283
283
|
this.safeSetState({
|
|
284
|
-
status:
|
|
284
|
+
status: w
|
|
285
285
|
}, function() {
|
|
286
|
-
e.props.onEntered(
|
|
286
|
+
e.props.onEntered(h);
|
|
287
287
|
});
|
|
288
288
|
return;
|
|
289
289
|
}
|
|
290
|
-
this.props.onEnter(
|
|
291
|
-
status:
|
|
290
|
+
this.props.onEnter(h, d), this.safeSetState({
|
|
291
|
+
status: x
|
|
292
292
|
}, function() {
|
|
293
|
-
e.props.onEntering(
|
|
293
|
+
e.props.onEntering(h, d), e.onTransitionEnd(y, function() {
|
|
294
294
|
e.safeSetState({
|
|
295
|
-
status:
|
|
295
|
+
status: w
|
|
296
296
|
}, function() {
|
|
297
|
-
e.props.onEntered(
|
|
297
|
+
e.props.onEntered(h, d);
|
|
298
298
|
});
|
|
299
299
|
});
|
|
300
300
|
});
|
|
301
|
-
},
|
|
302
|
-
var
|
|
301
|
+
}, i.performExit = function() {
|
|
302
|
+
var t = this, e = this.props.exit, o = this.getTimeouts(), a = this.props.nodeRef ? void 0 : P.findDOMNode(this);
|
|
303
303
|
if (!e || F.disabled) {
|
|
304
304
|
this.safeSetState({
|
|
305
|
-
status:
|
|
305
|
+
status: g
|
|
306
306
|
}, function() {
|
|
307
|
-
|
|
307
|
+
t.props.onExited(a);
|
|
308
308
|
});
|
|
309
309
|
return;
|
|
310
310
|
}
|
|
311
|
-
this.props.onExit(
|
|
311
|
+
this.props.onExit(a), this.safeSetState({
|
|
312
312
|
status: A
|
|
313
313
|
}, function() {
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
status:
|
|
314
|
+
t.props.onExiting(a), t.onTransitionEnd(o.exit, function() {
|
|
315
|
+
t.safeSetState({
|
|
316
|
+
status: g
|
|
317
317
|
}, function() {
|
|
318
|
-
|
|
318
|
+
t.props.onExited(a);
|
|
319
319
|
});
|
|
320
320
|
});
|
|
321
321
|
});
|
|
322
|
-
},
|
|
322
|
+
}, i.cancelNextCallback = function() {
|
|
323
323
|
this.nextCallback !== null && (this.nextCallback.cancel(), this.nextCallback = null);
|
|
324
|
-
},
|
|
325
|
-
e = this.setNextCallback(e), this.setState(
|
|
326
|
-
},
|
|
324
|
+
}, i.safeSetState = function(t, e) {
|
|
325
|
+
e = this.setNextCallback(e), this.setState(t, e);
|
|
326
|
+
}, i.setNextCallback = function(t) {
|
|
327
327
|
var e = this, o = !0;
|
|
328
|
-
return this.nextCallback = function(
|
|
329
|
-
o && (o = !1, e.nextCallback = null,
|
|
328
|
+
return this.nextCallback = function(a) {
|
|
329
|
+
o && (o = !1, e.nextCallback = null, t(a));
|
|
330
330
|
}, this.nextCallback.cancel = function() {
|
|
331
331
|
o = !1;
|
|
332
332
|
}, this.nextCallback;
|
|
333
|
-
},
|
|
333
|
+
}, i.onTransitionEnd = function(t, e) {
|
|
334
334
|
this.setNextCallback(e);
|
|
335
|
-
var o = this.props.nodeRef ? this.props.nodeRef.current :
|
|
336
|
-
if (!o ||
|
|
335
|
+
var o = this.props.nodeRef ? this.props.nodeRef.current : P.findDOMNode(this), a = t == null && !this.props.addEndListener;
|
|
336
|
+
if (!o || a) {
|
|
337
337
|
setTimeout(this.nextCallback, 0);
|
|
338
338
|
return;
|
|
339
339
|
}
|
|
340
340
|
if (this.props.addEndListener) {
|
|
341
|
-
var
|
|
342
|
-
this.props.addEndListener(
|
|
341
|
+
var p = this.props.nodeRef ? [this.nextCallback] : [o, this.nextCallback], h = p[0], d = p[1];
|
|
342
|
+
this.props.addEndListener(h, d);
|
|
343
343
|
}
|
|
344
|
-
|
|
345
|
-
},
|
|
346
|
-
var
|
|
347
|
-
if (
|
|
344
|
+
t != null && setTimeout(this.nextCallback, t);
|
|
345
|
+
}, i.render = function() {
|
|
346
|
+
var t = this.state.status;
|
|
347
|
+
if (t === D)
|
|
348
348
|
return null;
|
|
349
349
|
var e = this.props, o = e.children;
|
|
350
350
|
e.in, e.mountOnEnter, e.unmountOnExit, e.appear, e.enter, e.exit, e.timeout, e.addEndListener, e.onEnter, e.onEntering, e.onEntered, e.onExit, e.onExiting, e.onExited, e.nodeRef;
|
|
351
|
-
var
|
|
351
|
+
var a = j(e, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]);
|
|
352
352
|
return (
|
|
353
353
|
// allows for nested Transitions
|
|
354
354
|
/* @__PURE__ */ C.createElement(G.Provider, {
|
|
355
355
|
value: null
|
|
356
|
-
}, typeof o == "function" ? o(
|
|
356
|
+
}, typeof o == "function" ? o(t, a) : C.cloneElement(C.Children.only(o), a))
|
|
357
357
|
);
|
|
358
358
|
}, s;
|
|
359
359
|
}(C.Component);
|
|
@@ -370,10 +370,10 @@ b.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
370
370
|
* (see
|
|
371
371
|
* [test/CSSTransition-test.js](https://github.com/reactjs/react-transition-group/blob/13435f897b3ab71f6e19d724f145596f5910581c/test/CSSTransition-test.js#L362-L437)).
|
|
372
372
|
*/
|
|
373
|
-
nodeRef:
|
|
374
|
-
current: typeof Element > "u" ?
|
|
373
|
+
nodeRef: n.shape({
|
|
374
|
+
current: typeof Element > "u" ? n.any : function(u, s, i, r, t, e) {
|
|
375
375
|
var o = u[s];
|
|
376
|
-
return
|
|
376
|
+
return n.instanceOf(o && "ownerDocument" in o ? o.ownerDocument.defaultView.Element : Element)(u, s, i, r, t, e);
|
|
377
377
|
}
|
|
378
378
|
}),
|
|
379
379
|
/**
|
|
@@ -390,23 +390,23 @@ b.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
390
390
|
* </Transition>
|
|
391
391
|
* ```
|
|
392
392
|
*/
|
|
393
|
-
children:
|
|
393
|
+
children: n.oneOfType([n.func.isRequired, n.element.isRequired]).isRequired,
|
|
394
394
|
/**
|
|
395
395
|
* Show the component; triggers the enter or exit states
|
|
396
396
|
*/
|
|
397
|
-
in:
|
|
397
|
+
in: n.bool,
|
|
398
398
|
/**
|
|
399
399
|
* By default the child component is mounted immediately along with
|
|
400
400
|
* the parent `Transition` component. If you want to "lazy mount" the component on the
|
|
401
401
|
* first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay
|
|
402
402
|
* mounted, even on "exited", unless you also specify `unmountOnExit`.
|
|
403
403
|
*/
|
|
404
|
-
mountOnEnter:
|
|
404
|
+
mountOnEnter: n.bool,
|
|
405
405
|
/**
|
|
406
406
|
* By default the child component stays mounted after it reaches the `'exited'` state.
|
|
407
407
|
* Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting.
|
|
408
408
|
*/
|
|
409
|
-
unmountOnExit:
|
|
409
|
+
unmountOnExit: n.bool,
|
|
410
410
|
/**
|
|
411
411
|
* By default the child component does not perform the enter transition when
|
|
412
412
|
* it first mounts, regardless of the value of `in`. If you want this
|
|
@@ -418,15 +418,15 @@ b.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
418
418
|
* > additional `.appear-*` classes, that way you can choose to style it
|
|
419
419
|
* > differently.
|
|
420
420
|
*/
|
|
421
|
-
appear:
|
|
421
|
+
appear: n.bool,
|
|
422
422
|
/**
|
|
423
423
|
* Enable or disable enter transitions.
|
|
424
424
|
*/
|
|
425
|
-
enter:
|
|
425
|
+
enter: n.bool,
|
|
426
426
|
/**
|
|
427
427
|
* Enable or disable exit transitions.
|
|
428
428
|
*/
|
|
429
|
-
exit:
|
|
429
|
+
exit: n.bool,
|
|
430
430
|
/**
|
|
431
431
|
* The duration of the transition, in milliseconds.
|
|
432
432
|
* Required unless `addEndListener` is provided.
|
|
@@ -454,11 +454,11 @@ b.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
454
454
|
* @type {number | { enter?: number, exit?: number, appear?: number }}
|
|
455
455
|
*/
|
|
456
456
|
timeout: function(s) {
|
|
457
|
-
var
|
|
458
|
-
s.addEndListener || (
|
|
459
|
-
for (var r = arguments.length,
|
|
460
|
-
|
|
461
|
-
return
|
|
457
|
+
var i = se;
|
|
458
|
+
s.addEndListener || (i = i.isRequired);
|
|
459
|
+
for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), e = 1; e < r; e++)
|
|
460
|
+
t[e - 1] = arguments[e];
|
|
461
|
+
return i.apply(void 0, [s].concat(t));
|
|
462
462
|
},
|
|
463
463
|
/**
|
|
464
464
|
* Add a custom transition end trigger. Called with the transitioning
|
|
@@ -474,7 +474,7 @@ b.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
474
474
|
* }}
|
|
475
475
|
* ```
|
|
476
476
|
*/
|
|
477
|
-
addEndListener:
|
|
477
|
+
addEndListener: n.func,
|
|
478
478
|
/**
|
|
479
479
|
* Callback fired before the "entering" status is applied. An extra parameter
|
|
480
480
|
* `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
|
|
@@ -483,7 +483,7 @@ b.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
483
483
|
*
|
|
484
484
|
* @type Function(node: HtmlElement, isAppearing: bool) -> void
|
|
485
485
|
*/
|
|
486
|
-
onEnter:
|
|
486
|
+
onEnter: n.func,
|
|
487
487
|
/**
|
|
488
488
|
* Callback fired after the "entering" status is applied. An extra parameter
|
|
489
489
|
* `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
|
|
@@ -492,7 +492,7 @@ b.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
492
492
|
*
|
|
493
493
|
* @type Function(node: HtmlElement, isAppearing: bool)
|
|
494
494
|
*/
|
|
495
|
-
onEntering:
|
|
495
|
+
onEntering: n.func,
|
|
496
496
|
/**
|
|
497
497
|
* Callback fired after the "entered" status is applied. An extra parameter
|
|
498
498
|
* `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
|
|
@@ -501,7 +501,7 @@ b.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
501
501
|
*
|
|
502
502
|
* @type Function(node: HtmlElement, isAppearing: bool) -> void
|
|
503
503
|
*/
|
|
504
|
-
onEntered:
|
|
504
|
+
onEntered: n.func,
|
|
505
505
|
/**
|
|
506
506
|
* Callback fired before the "exiting" status is applied.
|
|
507
507
|
*
|
|
@@ -509,7 +509,7 @@ b.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
509
509
|
*
|
|
510
510
|
* @type Function(node: HtmlElement) -> void
|
|
511
511
|
*/
|
|
512
|
-
onExit:
|
|
512
|
+
onExit: n.func,
|
|
513
513
|
/**
|
|
514
514
|
* Callback fired after the "exiting" status is applied.
|
|
515
515
|
*
|
|
@@ -517,7 +517,7 @@ b.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
517
517
|
*
|
|
518
518
|
* @type Function(node: HtmlElement) -> void
|
|
519
519
|
*/
|
|
520
|
-
onExiting:
|
|
520
|
+
onExiting: n.func,
|
|
521
521
|
/**
|
|
522
522
|
* Callback fired after the "exited" status is applied.
|
|
523
523
|
*
|
|
@@ -525,7 +525,7 @@ b.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
525
525
|
*
|
|
526
526
|
* @type Function(node: HtmlElement) -> void
|
|
527
527
|
*/
|
|
528
|
-
onExited:
|
|
528
|
+
onExited: n.func
|
|
529
529
|
} : {};
|
|
530
530
|
function _() {
|
|
531
531
|
}
|
|
@@ -543,72 +543,89 @@ b.defaultProps = {
|
|
|
543
543
|
onExiting: _,
|
|
544
544
|
onExited: _
|
|
545
545
|
};
|
|
546
|
-
b.UNMOUNTED =
|
|
547
|
-
b.EXITED =
|
|
548
|
-
b.ENTERING =
|
|
549
|
-
b.ENTERED =
|
|
546
|
+
b.UNMOUNTED = D;
|
|
547
|
+
b.EXITED = g;
|
|
548
|
+
b.ENTERING = x;
|
|
549
|
+
b.ENTERED = w;
|
|
550
550
|
b.EXITING = A;
|
|
551
|
-
const
|
|
552
|
-
|
|
553
|
-
"
|
|
554
|
-
"
|
|
555
|
-
"
|
|
556
|
-
"
|
|
557
|
-
"
|
|
558
|
-
"
|
|
559
|
-
"
|
|
551
|
+
const ie = "_snackbar_1w4kg_56", ue = "_bottomToTop_1w4kg_1", v = {
|
|
552
|
+
"u-typography-h1": "_u-typography-h1_1w4kg_1",
|
|
553
|
+
"u-typography-h2": "_u-typography-h2_1w4kg_8",
|
|
554
|
+
"u-typography-h3": "_u-typography-h3_1w4kg_15",
|
|
555
|
+
"u-typography-h4": "_u-typography-h4_1w4kg_22",
|
|
556
|
+
"u-typography-h5": "_u-typography-h5_1w4kg_29",
|
|
557
|
+
"u-typography-h6": "_u-typography-h6_1w4kg_36",
|
|
558
|
+
"u-typography-base": "_u-typography-base_1w4kg_43",
|
|
559
|
+
"u-typography-base--xxl": "_u-typography-base--xxl_1w4kg_48",
|
|
560
|
+
"u-typography-base--xl": "_u-typography-base--xl_1w4kg_52",
|
|
561
|
+
"u-typography-base--lg": "_u-typography-base--lg_1w4kg_56",
|
|
562
|
+
"snackbar--message": "_snackbar--message_1w4kg_56",
|
|
563
|
+
"u-typography-base--sm": "_u-typography-base--sm_1w4kg_60",
|
|
564
|
+
"u-typography-base--bold": "_u-typography-base--bold_1w4kg_64",
|
|
565
|
+
"u-typography-base--strikethrough": "_u-typography-base--strikethrough_1w4kg_67",
|
|
566
|
+
"u-typography-base--underlined": "_u-typography-base--underlined_1w4kg_70",
|
|
567
|
+
"u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-underlined_1w4kg_73",
|
|
568
|
+
snackbar: ie,
|
|
569
|
+
"snackbar__snackbar-el-wrapper": "_snackbar__snackbar-el-wrapper_1w4kg_90",
|
|
570
|
+
"snackbar--content": "_snackbar--content_1w4kg_95",
|
|
571
|
+
"snackbar--success": "_snackbar--success_1w4kg_105",
|
|
572
|
+
"snackbar--error": "_snackbar--error_1w4kg_108",
|
|
573
|
+
"snackbar--warning": "_snackbar--warning_1w4kg_111",
|
|
574
|
+
"snackbar--action": "_snackbar--action_1w4kg_121",
|
|
560
575
|
bottomToTop: ue
|
|
561
|
-
},
|
|
576
|
+
}, ye = ({
|
|
562
577
|
snackbarMessage: u,
|
|
563
|
-
|
|
564
|
-
autoHideDuration:
|
|
578
|
+
variant: s,
|
|
579
|
+
autoHideDuration: i = 5e3,
|
|
565
580
|
open: r = !0,
|
|
566
|
-
onClose:
|
|
567
|
-
|
|
568
|
-
|
|
581
|
+
onClose: t,
|
|
582
|
+
onClosed: e,
|
|
583
|
+
classNameWrapper: o,
|
|
584
|
+
"data-testid": a
|
|
569
585
|
}) => {
|
|
570
|
-
const [
|
|
586
|
+
const [p, h] = V(!0), d = X(null), m = {
|
|
571
587
|
entering: "translateY(0)",
|
|
572
588
|
entered: "translateY(0)",
|
|
573
589
|
exiting: "translateY(80px)",
|
|
574
590
|
exited: "translateY(80px)",
|
|
575
591
|
unmounted: "translateY(80px)"
|
|
576
|
-
},
|
|
577
|
-
|
|
578
|
-
},
|
|
579
|
-
|
|
592
|
+
}, y = () => {
|
|
593
|
+
h(!1);
|
|
594
|
+
}, T = () => {
|
|
595
|
+
h(!0);
|
|
580
596
|
};
|
|
581
|
-
return /* @__PURE__ */
|
|
597
|
+
return /* @__PURE__ */ E("div", { className: N(v.snackbar, o), children: /* @__PURE__ */ E(
|
|
582
598
|
q,
|
|
583
599
|
{
|
|
584
|
-
autoHideDuration:
|
|
600
|
+
autoHideDuration: i,
|
|
585
601
|
open: r,
|
|
586
|
-
onClose:
|
|
587
|
-
exited:
|
|
588
|
-
className:
|
|
589
|
-
children: /* @__PURE__ */
|
|
602
|
+
onClose: (k, O) => O !== "clickaway" && (t == null ? void 0 : t()),
|
|
603
|
+
exited: p,
|
|
604
|
+
className: N(v["snackbar__snackbar-el-wrapper"]),
|
|
605
|
+
children: /* @__PURE__ */ E(
|
|
590
606
|
b,
|
|
591
607
|
{
|
|
592
608
|
timeout: { enter: 400, exit: 400 },
|
|
593
609
|
in: r,
|
|
594
610
|
appear: !0,
|
|
595
611
|
unmountOnExit: !0,
|
|
596
|
-
onEnter:
|
|
597
|
-
onExited:
|
|
598
|
-
|
|
599
|
-
|
|
612
|
+
onEnter: y,
|
|
613
|
+
onExited: T,
|
|
614
|
+
onExit: e,
|
|
615
|
+
nodeRef: d,
|
|
616
|
+
children: (k) => /* @__PURE__ */ Y(
|
|
600
617
|
"div",
|
|
601
618
|
{
|
|
602
|
-
className:
|
|
619
|
+
className: N(v["snackbar--content"], v[`snackbar--${s}`]),
|
|
603
620
|
style: {
|
|
604
|
-
transform:
|
|
621
|
+
transform: m[k],
|
|
605
622
|
transition: "transform 300ms ease"
|
|
606
623
|
},
|
|
607
|
-
ref:
|
|
608
|
-
"data-testid":
|
|
624
|
+
ref: d,
|
|
625
|
+
"data-testid": a,
|
|
609
626
|
children: [
|
|
610
|
-
/* @__PURE__ */
|
|
611
|
-
/* @__PURE__ */
|
|
627
|
+
/* @__PURE__ */ E("div", { className: N(v["snackbar--message"]), children: /* @__PURE__ */ E("p", { children: u }) }),
|
|
628
|
+
/* @__PURE__ */ E("div", { className: N(v["snackbar--action"]), children: /* @__PURE__ */ E("a", { onClick: t, children: /* @__PURE__ */ E(K, { icon: "xmark", color: "var(--white-100)", size: "1.5rem" }) }) })
|
|
612
629
|
]
|
|
613
630
|
}
|
|
614
631
|
)
|
|
@@ -618,5 +635,5 @@ const ae = "_snackbar_kt3bd_1", ue = "_bottomToTop_kt3bd_1", T = {
|
|
|
618
635
|
) });
|
|
619
636
|
};
|
|
620
637
|
export {
|
|
621
|
-
|
|
638
|
+
ye as Snackbar
|
|
622
639
|
};
|