@pismo/marola 0.0.1-alpha.19 → 0.0.1-alpha.20
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/Dialog.module-DFEmFdYT.js +30 -0
- package/dist/SelectButton-C8JQKaf4.js +61 -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/Chip.css +1 -1
- package/dist/assets/Dialog.css +1 -1
- package/dist/assets/IconButton.css +1 -1
- package/dist/assets/Input.css +1 -1
- package/dist/assets/PageHeader.css +1 -1
- package/dist/assets/Pagination.css +1 -1
- package/dist/assets/SelectButton.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/Toggle.css +1 -1
- package/dist/assets/Typography.css +1 -1
- package/dist/components/Advice/Advice.js +32 -17
- package/dist/components/Button/Button.js +56 -85
- package/dist/components/Checkbox/Checkbox.js +57 -42
- package/dist/components/Chip/Chip.js +81 -111
- package/dist/components/Dialog/Actions.js +1 -1
- package/dist/components/Dialog/Backdrop.js +1 -1
- package/dist/components/Dialog/CloseIconButton.js +1 -1
- package/dist/components/Dialog/Dialog.d.ts +1 -1
- package/dist/components/Dialog/Dialog.js +2 -2
- package/dist/components/Dialog/{Title.d.ts → DialogTitle.d.ts} +3 -3
- package/dist/components/Dialog/DialogTitle.js +29 -0
- package/dist/components/Icon/Icon.d.ts +1 -1
- package/dist/components/Icon/Icon.js +31 -25
- package/dist/components/IconButton/IconButton.js +34 -64
- package/dist/components/Input/Input.js +241 -229
- package/dist/components/PageHeader/PageHeader.js +52 -37
- package/dist/components/Pagination/Pagination.js +127 -113
- package/dist/components/Select/Select.js +2 -2
- package/dist/components/Select/SelectButton.js +1 -1
- package/dist/components/Snackbar/Snackbar.js +176 -161
- package/dist/components/SortTooltip/SortTooltip.js +53 -38
- package/dist/components/Stepper/Stepper.js +37 -22
- package/dist/components/Table/Table.d.ts +33 -16
- package/dist/components/Table/Table.js +98 -81
- 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/TextDisplay/TextDisplay.js +13 -13
- package/dist/components/Toggle/Toggle.js +138 -123
- package/dist/components/Typography/Typography.d.ts +1 -1
- package/dist/components/Typography/Typography.js +54 -84
- package/dist/main.js +42 -37
- package/dist/marola.css +1 -1
- package/dist/utils/styleStrings.d.ts +1 -1
- package/dist/utils/styleStrings.js +7 -7
- package/package.json +1 -1
- package/dist/Dialog.module-B8COssqi.js +0 -15
- package/dist/SelectButton-pciwIWcj.js +0 -46
- package/dist/components/Dialog/Title.js +0 -29
|
@@ -1,8 +1,8 @@
|
|
|
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 N from "react";
|
|
4
4
|
import S, { useState as V, useRef as X } from "react";
|
|
5
|
-
import { c as
|
|
5
|
+
import { c as O } from "../../clsx-DB4S2d7J.js";
|
|
6
6
|
import { Icon as K } from "../Icon/Icon.js";
|
|
7
7
|
import { g as $, a as z, b as D, f as H, _ as j, c as U, P as n, d as J, e as Q } from "../../index-CH45lKw7.js";
|
|
8
8
|
import { u as Z } from "../../useTimeout-DxF9kiZL.js";
|
|
@@ -17,110 +17,110 @@ 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
22
|
open: t,
|
|
23
23
|
resumeHideDuration: e
|
|
24
24
|
} = u, o = Z();
|
|
25
|
-
|
|
25
|
+
N.useEffect(() => {
|
|
26
26
|
if (!t)
|
|
27
27
|
return;
|
|
28
|
-
function
|
|
29
|
-
|
|
28
|
+
function l(p) {
|
|
29
|
+
p.defaultPrevented || (p.key === "Escape" || p.key === "Esc") && (r == null || r(p, "escapeKeyDown"));
|
|
30
30
|
}
|
|
31
|
-
return document.addEventListener("keydown",
|
|
32
|
-
document.removeEventListener("keydown",
|
|
31
|
+
return document.addEventListener("keydown", l), () => {
|
|
32
|
+
document.removeEventListener("keydown", l);
|
|
33
33
|
};
|
|
34
34
|
}, [t, r]);
|
|
35
|
-
const
|
|
36
|
-
r == null || r(
|
|
37
|
-
}),
|
|
38
|
-
!r ||
|
|
39
|
-
|
|
35
|
+
const a = I((l, p) => {
|
|
36
|
+
r == null || r(l, p);
|
|
37
|
+
}), c = I((l) => {
|
|
38
|
+
!r || l == null || o.start(l, () => {
|
|
39
|
+
a(null, "timeout");
|
|
40
40
|
});
|
|
41
41
|
});
|
|
42
|
-
|
|
43
|
-
const
|
|
44
|
-
r == null || r(
|
|
45
|
-
},
|
|
46
|
-
s != null &&
|
|
47
|
-
}, [s, e,
|
|
48
|
-
const f =
|
|
49
|
-
f == null || f(
|
|
50
|
-
},
|
|
51
|
-
const f =
|
|
52
|
-
f == null || f(
|
|
53
|
-
},
|
|
54
|
-
const f =
|
|
55
|
-
f == null || f(
|
|
56
|
-
}, P = (
|
|
57
|
-
const f =
|
|
58
|
-
f == null || f(
|
|
42
|
+
N.useEffect(() => (t && c(s), o.clear), [t, s, c, o]);
|
|
43
|
+
const h = (l) => {
|
|
44
|
+
r == null || r(l, "clickaway");
|
|
45
|
+
}, d = o.clear, m = N.useCallback(() => {
|
|
46
|
+
s != null && c(e ?? s * 0.5);
|
|
47
|
+
}, [s, e, c]), y = (l) => (p) => {
|
|
48
|
+
const f = l.onBlur;
|
|
49
|
+
f == null || f(p), m();
|
|
50
|
+
}, k = (l) => (p) => {
|
|
51
|
+
const f = l.onFocus;
|
|
52
|
+
f == null || f(p), d();
|
|
53
|
+
}, T = (l) => (p) => {
|
|
54
|
+
const f = l.onMouseEnter;
|
|
55
|
+
f == null || f(p), d();
|
|
56
|
+
}, P = (l) => (p) => {
|
|
57
|
+
const f = l.onMouseLeave;
|
|
58
|
+
f == null || f(p), m();
|
|
59
59
|
};
|
|
60
|
-
return
|
|
61
|
-
if (!
|
|
62
|
-
return window.addEventListener("focus",
|
|
63
|
-
window.removeEventListener("focus",
|
|
60
|
+
return N.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
|
-
}, [
|
|
66
|
-
getRootProps: (
|
|
67
|
-
const
|
|
65
|
+
}, [i, t, m, d]), {
|
|
66
|
+
getRootProps: (l = {}) => {
|
|
67
|
+
const p = D({}, H(u), H(l));
|
|
68
68
|
return D({
|
|
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
|
-
},
|
|
73
|
-
onBlur:
|
|
74
|
-
onFocus:
|
|
75
|
-
onMouseEnter:
|
|
76
|
-
onMouseLeave: P(
|
|
72
|
+
}, l, p, {
|
|
73
|
+
onBlur: y(p),
|
|
74
|
+
onFocus: k(p),
|
|
75
|
+
onMouseEnter: T(p),
|
|
76
|
+
onMouseLeave: P(p)
|
|
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__ */ N.forwardRef(function(s, i) {
|
|
85
85
|
const {
|
|
86
86
|
autoHideDuration: r = null,
|
|
87
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:
|
|
90
|
+
onClose: a,
|
|
91
|
+
open: c,
|
|
92
|
+
resumeHideDuration: h,
|
|
93
|
+
slotProps: d = {},
|
|
94
|
+
slots: m = {}
|
|
95
|
+
} = s, y = j(s, ne), k = oe(), {
|
|
96
|
+
getRootProps: T,
|
|
97
97
|
onClickAway: P
|
|
98
98
|
} = te(D({}, s, {
|
|
99
99
|
autoHideDuration: r,
|
|
100
100
|
disableWindowBlurListener: e,
|
|
101
|
-
onClose:
|
|
102
|
-
open:
|
|
103
|
-
resumeHideDuration:
|
|
104
|
-
})), L = s,
|
|
105
|
-
elementType:
|
|
106
|
-
getSlotProps:
|
|
107
|
-
externalForwardedProps:
|
|
108
|
-
externalSlotProps:
|
|
101
|
+
onClose: a,
|
|
102
|
+
open: c,
|
|
103
|
+
resumeHideDuration: h
|
|
104
|
+
})), L = s, l = m.root || "div", p = U({
|
|
105
|
+
elementType: l,
|
|
106
|
+
getSlotProps: T,
|
|
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: k.root
|
|
114
114
|
}), f = U({
|
|
115
115
|
elementType: B,
|
|
116
|
-
externalSlotProps:
|
|
116
|
+
externalSlotProps: d.clickAwayListener,
|
|
117
117
|
additionalProps: {
|
|
118
118
|
onClickAway: P
|
|
119
119
|
},
|
|
120
120
|
ownerState: L
|
|
121
121
|
});
|
|
122
|
-
return delete f.ownerState, !
|
|
123
|
-
children: /* @__PURE__ */
|
|
122
|
+
return delete f.ownerState, !c && o ? null : /* @__PURE__ */ E(B, D({}, f, {
|
|
123
|
+
children: /* @__PURE__ */ E(l, D({}, p, {
|
|
124
124
|
children: t
|
|
125
125
|
}))
|
|
126
126
|
}));
|
|
@@ -226,134 +226,134 @@ process.env.NODE_ENV !== "production" && n.oneOfType([n.string, n.shape({
|
|
|
226
226
|
exitActive: n.string
|
|
227
227
|
})]);
|
|
228
228
|
const G = S.createContext(null);
|
|
229
|
-
var
|
|
229
|
+
var ae = function(s) {
|
|
230
230
|
return s.scrollTop;
|
|
231
|
-
}, C = "unmounted",
|
|
231
|
+
}, C = "unmounted", g = "exited", x = "entering", w = "entered", A = "exiting", b = /* @__PURE__ */ function(u) {
|
|
232
232
|
re(s, u);
|
|
233
233
|
function s(r, t) {
|
|
234
234
|
var e;
|
|
235
235
|
e = u.call(this, r, t) || this;
|
|
236
|
-
var o = t,
|
|
237
|
-
return e.appearStatus = null, r.in ?
|
|
238
|
-
status:
|
|
236
|
+
var o = t, a = o && !o.isMounting ? r.enter : r.appear, c;
|
|
237
|
+
return e.appearStatus = null, r.in ? a ? (c = g, e.appearStatus = x) : c = w : r.unmountOnExit || r.mountOnEnter ? c = C : c = g, e.state = {
|
|
238
|
+
status: c
|
|
239
239
|
}, e.nextCallback = null, e;
|
|
240
240
|
}
|
|
241
241
|
s.getDerivedStateFromProps = function(t, e) {
|
|
242
242
|
var o = t.in;
|
|
243
243
|
return o && e.status === C ? {
|
|
244
|
-
status:
|
|
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
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 t = this.props.timeout, e, o,
|
|
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
|
-
},
|
|
266
|
+
}, i.updateStatus = function(t, e) {
|
|
267
267
|
if (t === void 0 && (t = !1), e !== null)
|
|
268
|
-
if (this.cancelNextCallback(), e ===
|
|
268
|
+
if (this.cancelNextCallback(), e === x) {
|
|
269
269
|
if (this.props.unmountOnExit || this.props.mountOnEnter) {
|
|
270
270
|
var o = this.props.nodeRef ? this.props.nodeRef.current : R.findDOMNode(this);
|
|
271
|
-
o &&
|
|
271
|
+
o && ae(o);
|
|
272
272
|
}
|
|
273
273
|
this.performEnter(t);
|
|
274
274
|
} else
|
|
275
275
|
this.performExit();
|
|
276
276
|
else
|
|
277
|
-
this.props.unmountOnExit && this.state.status ===
|
|
277
|
+
this.props.unmountOnExit && this.state.status === g && this.setState({
|
|
278
278
|
status: C
|
|
279
279
|
});
|
|
280
|
-
},
|
|
281
|
-
var e = this, o = this.props.enter,
|
|
280
|
+
}, i.performEnter = function(t) {
|
|
281
|
+
var e = this, o = this.props.enter, a = this.context ? this.context.isMounting : t, c = this.props.nodeRef ? [a] : [R.findDOMNode(this), a], h = c[0], d = c[1], m = this.getTimeouts(), y = a ? m.appear : m.enter;
|
|
282
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 t = this, e = this.props.exit, o = this.getTimeouts(),
|
|
301
|
+
}, i.performExit = function() {
|
|
302
|
+
var t = this, e = this.props.exit, o = this.getTimeouts(), a = this.props.nodeRef ? void 0 : R.findDOMNode(this);
|
|
303
303
|
if (!e || F.disabled) {
|
|
304
304
|
this.safeSetState({
|
|
305
|
-
status:
|
|
305
|
+
status: g
|
|
306
306
|
}, function() {
|
|
307
|
-
t.props.onExited(
|
|
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
|
-
t.props.onExiting(
|
|
314
|
+
t.props.onExiting(a), t.onTransitionEnd(o.exit, function() {
|
|
315
315
|
t.safeSetState({
|
|
316
|
-
status:
|
|
316
|
+
status: g
|
|
317
317
|
}, function() {
|
|
318
|
-
t.props.onExited(
|
|
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
|
-
},
|
|
324
|
+
}, i.safeSetState = function(t, e) {
|
|
325
325
|
e = this.setNextCallback(e), this.setState(t, e);
|
|
326
|
-
},
|
|
326
|
+
}, i.setNextCallback = function(t) {
|
|
327
327
|
var e = this, o = !0;
|
|
328
|
-
return this.nextCallback = function(
|
|
329
|
-
o && (o = !1, e.nextCallback = null, t(
|
|
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 : R.findDOMNode(this),
|
|
336
|
-
if (!o ||
|
|
335
|
+
var o = this.props.nodeRef ? this.props.nodeRef.current : R.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 c = this.props.nodeRef ? [this.nextCallback] : [o, this.nextCallback], h = c[0], d = c[1];
|
|
342
|
+
this.props.addEndListener(h, d);
|
|
343
343
|
}
|
|
344
344
|
t != null && setTimeout(this.nextCallback, t);
|
|
345
|
-
},
|
|
345
|
+
}, i.render = function() {
|
|
346
346
|
var t = this.state.status;
|
|
347
347
|
if (t === C)
|
|
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__ */ S.createElement(G.Provider, {
|
|
355
355
|
value: null
|
|
356
|
-
}, typeof o == "function" ? o(t,
|
|
356
|
+
}, typeof o == "function" ? o(t, a) : S.cloneElement(S.Children.only(o), a))
|
|
357
357
|
);
|
|
358
358
|
}, s;
|
|
359
359
|
}(S.Component);
|
|
@@ -371,9 +371,9 @@ b.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
371
371
|
* [test/CSSTransition-test.js](https://github.com/reactjs/react-transition-group/blob/13435f897b3ab71f6e19d724f145596f5910581c/test/CSSTransition-test.js#L362-L437)).
|
|
372
372
|
*/
|
|
373
373
|
nodeRef: n.shape({
|
|
374
|
-
current: typeof Element > "u" ? n.any : function(u, s,
|
|
374
|
+
current: typeof Element > "u" ? n.any : function(u, s, i, r, t, e) {
|
|
375
375
|
var o = u[s];
|
|
376
|
-
return n.instanceOf(o && "ownerDocument" in o ? o.ownerDocument.defaultView.Element : Element)(u, s,
|
|
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
|
/**
|
|
@@ -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 || (
|
|
457
|
+
var i = se;
|
|
458
|
+
s.addEndListener || (i = i.isRequired);
|
|
459
459
|
for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), e = 1; e < r; e++)
|
|
460
460
|
t[e - 1] = arguments[e];
|
|
461
|
-
return
|
|
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
|
|
@@ -527,7 +527,7 @@ b.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
527
527
|
*/
|
|
528
528
|
onExited: n.func
|
|
529
529
|
} : {};
|
|
530
|
-
function
|
|
530
|
+
function _() {
|
|
531
531
|
}
|
|
532
532
|
b.defaultProps = {
|
|
533
533
|
in: !1,
|
|
@@ -536,79 +536,94 @@ b.defaultProps = {
|
|
|
536
536
|
appear: !1,
|
|
537
537
|
enter: !0,
|
|
538
538
|
exit: !0,
|
|
539
|
-
onEnter:
|
|
540
|
-
onEntering:
|
|
541
|
-
onEntered:
|
|
542
|
-
onExit:
|
|
543
|
-
onExiting:
|
|
544
|
-
onExited:
|
|
539
|
+
onEnter: _,
|
|
540
|
+
onEntering: _,
|
|
541
|
+
onEntered: _,
|
|
542
|
+
onExit: _,
|
|
543
|
+
onExiting: _,
|
|
544
|
+
onExited: _
|
|
545
545
|
};
|
|
546
546
|
b.UNMOUNTED = C;
|
|
547
|
-
b.EXITED =
|
|
548
|
-
b.ENTERING =
|
|
549
|
-
b.ENTERED =
|
|
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
578
|
variant: s,
|
|
564
|
-
autoHideDuration:
|
|
579
|
+
autoHideDuration: i = 5e3,
|
|
565
580
|
open: r = !0,
|
|
566
581
|
onClose: t,
|
|
567
582
|
classNameWrapper: e,
|
|
568
583
|
"data-testid": o
|
|
569
584
|
}) => {
|
|
570
|
-
const [
|
|
585
|
+
const [a, c] = V(!0), h = X(null), d = {
|
|
571
586
|
entering: "translateY(0)",
|
|
572
587
|
entered: "translateY(0)",
|
|
573
588
|
exiting: "translateY(80px)",
|
|
574
589
|
exited: "translateY(80px)",
|
|
575
590
|
unmounted: "translateY(80px)"
|
|
576
|
-
},
|
|
577
|
-
|
|
578
|
-
},
|
|
579
|
-
|
|
591
|
+
}, m = () => {
|
|
592
|
+
c(!1);
|
|
593
|
+
}, y = () => {
|
|
594
|
+
c(!0);
|
|
580
595
|
};
|
|
581
|
-
return /* @__PURE__ */
|
|
596
|
+
return /* @__PURE__ */ E("div", { className: O(v.snackbar, e), children: /* @__PURE__ */ E(
|
|
582
597
|
q,
|
|
583
598
|
{
|
|
584
|
-
autoHideDuration:
|
|
599
|
+
autoHideDuration: i,
|
|
585
600
|
open: r,
|
|
586
|
-
onClose: (
|
|
587
|
-
exited:
|
|
588
|
-
className:
|
|
589
|
-
children: /* @__PURE__ */
|
|
601
|
+
onClose: (k, T) => T !== "clickaway" && (t == null ? void 0 : t()),
|
|
602
|
+
exited: a,
|
|
603
|
+
className: O(v["snackbar__snackbar-el-wrapper"]),
|
|
604
|
+
children: /* @__PURE__ */ E(
|
|
590
605
|
b,
|
|
591
606
|
{
|
|
592
607
|
timeout: { enter: 400, exit: 400 },
|
|
593
608
|
in: r,
|
|
594
609
|
appear: !0,
|
|
595
610
|
unmountOnExit: !0,
|
|
596
|
-
onEnter:
|
|
597
|
-
onExited:
|
|
598
|
-
nodeRef:
|
|
599
|
-
children: (
|
|
611
|
+
onEnter: m,
|
|
612
|
+
onExited: y,
|
|
613
|
+
nodeRef: h,
|
|
614
|
+
children: (k) => /* @__PURE__ */ Y(
|
|
600
615
|
"div",
|
|
601
616
|
{
|
|
602
|
-
className:
|
|
617
|
+
className: O(v["snackbar--content"], v[`snackbar--${s}`]),
|
|
603
618
|
style: {
|
|
604
|
-
transform:
|
|
619
|
+
transform: d[k],
|
|
605
620
|
transition: "transform 300ms ease"
|
|
606
621
|
},
|
|
607
|
-
ref:
|
|
622
|
+
ref: h,
|
|
608
623
|
"data-testid": o,
|
|
609
624
|
children: [
|
|
610
|
-
/* @__PURE__ */
|
|
611
|
-
/* @__PURE__ */
|
|
625
|
+
/* @__PURE__ */ E("div", { className: O(v["snackbar--message"]), children: /* @__PURE__ */ E("p", { children: u }) }),
|
|
626
|
+
/* @__PURE__ */ E("div", { className: O(v["snackbar--action"]), children: /* @__PURE__ */ E("a", { onClick: t, children: /* @__PURE__ */ E(K, { icon: "xmark", color: "var(--white-100)", size: "1.5rem" }) }) })
|
|
612
627
|
]
|
|
613
628
|
}
|
|
614
629
|
)
|
|
@@ -618,5 +633,5 @@ const ae = "_snackbar_13dfh_1", ue = "_bottomToTop_13dfh_1", y = {
|
|
|
618
633
|
) });
|
|
619
634
|
};
|
|
620
635
|
export {
|
|
621
|
-
|
|
636
|
+
ye as Snackbar
|
|
622
637
|
};
|