@notificationapi/react 0.0.37 → 1.0.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/dist/assets/Badge.js +456 -0
- package/dist/assets/Box.js +57 -0
- package/dist/assets/ButtonBase.js +1224 -0
- package/dist/assets/DefaultPropsProvider.js +4368 -0
- package/dist/assets/Divider.js +343 -0
- package/dist/assets/IconButton.js +225 -0
- package/dist/assets/Inbox.js +3051 -0
- package/dist/assets/InboxHeader.js +2338 -0
- package/dist/assets/Notification.js +5349 -7150
- package/dist/assets/NotificationPreferencesPopup.js +1694 -0
- package/dist/assets/Paper.js +154 -0
- package/dist/assets/Popover.js +451 -0
- package/dist/assets/Portal.js +110 -0
- package/dist/assets/PreferenceInput.js +1545 -1366
- package/dist/assets/Typography.js +292 -0
- package/dist/assets/WebPushOptInMessage.js +794 -407
- package/dist/assets/channelUtils.js +33 -65
- package/dist/assets/createSimplePaletteValueFilter.js +17 -0
- package/dist/assets/createSvgIcon.js +248 -0
- package/dist/assets/integerPropType.js +31 -0
- package/dist/assets/resolveComponentProps.js +93 -0
- package/dist/assets/style.css +1 -0
- package/dist/assets/useSlotProps.js +24 -0
- package/dist/assets/useTheme.js +10 -0
- package/dist/assets/useTheme2.js +16 -0
- package/dist/assets/utils.js +743 -0
- package/dist/components/Notifications/DefaultEmpty.d.ts +3 -0
- package/dist/components/Notifications/DefaultEmpty.js +7 -0
- package/dist/components/Notifications/Inbox.d.ts +4 -4
- package/dist/components/Notifications/Inbox.js +9 -6450
- package/dist/components/Notifications/InboxHeader.d.ts +1 -1
- package/dist/components/Notifications/InboxHeader.js +7 -53
- package/dist/components/Notifications/Notification.d.ts +3 -4
- package/dist/components/Notifications/Notification.js +6 -5
- package/dist/components/Notifications/NotificationCounter.js +16 -6
- package/dist/components/Notifications/NotificationFeed.d.ts +1 -2
- package/dist/components/Notifications/NotificationFeed.js +41 -38
- package/dist/components/Notifications/NotificationLauncher.d.ts +1 -0
- package/dist/components/Notifications/NotificationLauncher.js +100 -114
- package/dist/components/Notifications/NotificationPopup.d.ts +3 -4
- package/dist/components/Notifications/NotificationPopup.js +86 -88
- package/dist/components/Notifications/UnreadBadge.d.ts +7 -4
- package/dist/components/Notifications/UnreadBadge.js +28 -20
- package/dist/components/Notifications/interface.d.ts +0 -4
- package/dist/components/Notifications/interface.js +4 -5
- package/dist/components/Preferences/NotificationPreferencesInline.js +14 -14
- package/dist/components/Preferences/NotificationPreferencesPopup.js +7 -2068
- package/dist/components/Preferences/PreferenceInput.js +4 -3
- package/dist/components/Preferences/Preferences.js +1042 -547
- package/dist/components/Preferences/channelUtils.js +3 -4
- package/dist/components/Preferences/index.js +1 -1
- package/dist/components/Provider/context.d.ts +27 -0
- package/dist/components/Provider/context.js +7 -0
- package/dist/components/Provider/index.d.ts +2 -25
- package/dist/components/Provider/index.js +22 -24
- package/dist/components/WebPush/WebPushOptInMessage.js +3 -4
- package/dist/main.d.ts +1 -0
- package/dist/main.js +4 -4
- package/package.json +14 -12
- package/dist/assets/AntdIcon.js +0 -200
- package/dist/assets/CloseOutlined.js +0 -13
- package/dist/assets/PurePanel.js +0 -59
- package/dist/assets/RightOutlined.js +0 -13
- package/dist/assets/button.js +0 -1660
- package/dist/assets/colors.js +0 -36
- package/dist/assets/compact-item.js +0 -860
- package/dist/assets/index.js +0 -271
- package/dist/assets/index2.js +0 -647
- package/dist/assets/index3.js +0 -7527
- package/dist/assets/pickAttrs.js +0 -42
- package/dist/assets/presets.js +0 -810
- package/dist/assets/reactNode.js +0 -20821
|
@@ -0,0 +1,1224 @@
|
|
|
1
|
+
var ze = Object.defineProperty;
|
|
2
|
+
var ke = (e, t, n) => t in e ? ze(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var Z = (e, t, n) => ke(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { r as Ue, m as Xe, u as ye, a as qe } from "./resolveComponentProps.js";
|
|
5
|
+
import * as b from "react";
|
|
6
|
+
import Q, { Children as Ke, isValidElement as re, cloneElement as oe } from "react";
|
|
7
|
+
import { G as We, H as He, I as Ge, J as Je, P as o, _ as Ze, c as F, g as Oe, s as Re, u as Ne, a as Qe, f as et } from "./DefaultPropsProvider.js";
|
|
8
|
+
import { jsx as H, jsxs as tt } from "react/jsx-runtime";
|
|
9
|
+
var be = { exports: {} }, h = {};
|
|
10
|
+
/** @license React v16.13.1
|
|
11
|
+
* react-is.production.min.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/
|
|
18
|
+
var Pe;
|
|
19
|
+
function nt() {
|
|
20
|
+
if (Pe) return h;
|
|
21
|
+
Pe = 1;
|
|
22
|
+
var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, a = e ? Symbol.for("react.fragment") : 60107, s = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, u = e ? Symbol.for("react.provider") : 60109, f = e ? Symbol.for("react.context") : 60110, p = e ? Symbol.for("react.async_mode") : 60111, m = e ? Symbol.for("react.concurrent_mode") : 60111, E = e ? Symbol.for("react.forward_ref") : 60112, T = e ? Symbol.for("react.suspense") : 60113, M = e ? Symbol.for("react.suspense_list") : 60120, S = e ? Symbol.for("react.memo") : 60115, R = e ? Symbol.for("react.lazy") : 60116, x = e ? Symbol.for("react.block") : 60121, P = e ? Symbol.for("react.fundamental") : 60117, _ = e ? Symbol.for("react.responder") : 60118, A = e ? Symbol.for("react.scope") : 60119;
|
|
23
|
+
function g(r) {
|
|
24
|
+
if (typeof r == "object" && r !== null) {
|
|
25
|
+
var C = r.$$typeof;
|
|
26
|
+
switch (C) {
|
|
27
|
+
case t:
|
|
28
|
+
switch (r = r.type, r) {
|
|
29
|
+
case p:
|
|
30
|
+
case m:
|
|
31
|
+
case a:
|
|
32
|
+
case i:
|
|
33
|
+
case s:
|
|
34
|
+
case T:
|
|
35
|
+
return r;
|
|
36
|
+
default:
|
|
37
|
+
switch (r = r && r.$$typeof, r) {
|
|
38
|
+
case f:
|
|
39
|
+
case E:
|
|
40
|
+
case R:
|
|
41
|
+
case S:
|
|
42
|
+
case u:
|
|
43
|
+
return r;
|
|
44
|
+
default:
|
|
45
|
+
return C;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
case n:
|
|
49
|
+
return C;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
function l(r) {
|
|
54
|
+
return g(r) === m;
|
|
55
|
+
}
|
|
56
|
+
return h.AsyncMode = p, h.ConcurrentMode = m, h.ContextConsumer = f, h.ContextProvider = u, h.Element = t, h.ForwardRef = E, h.Fragment = a, h.Lazy = R, h.Memo = S, h.Portal = n, h.Profiler = i, h.StrictMode = s, h.Suspense = T, h.isAsyncMode = function(r) {
|
|
57
|
+
return l(r) || g(r) === p;
|
|
58
|
+
}, h.isConcurrentMode = l, h.isContextConsumer = function(r) {
|
|
59
|
+
return g(r) === f;
|
|
60
|
+
}, h.isContextProvider = function(r) {
|
|
61
|
+
return g(r) === u;
|
|
62
|
+
}, h.isElement = function(r) {
|
|
63
|
+
return typeof r == "object" && r !== null && r.$$typeof === t;
|
|
64
|
+
}, h.isForwardRef = function(r) {
|
|
65
|
+
return g(r) === E;
|
|
66
|
+
}, h.isFragment = function(r) {
|
|
67
|
+
return g(r) === a;
|
|
68
|
+
}, h.isLazy = function(r) {
|
|
69
|
+
return g(r) === R;
|
|
70
|
+
}, h.isMemo = function(r) {
|
|
71
|
+
return g(r) === S;
|
|
72
|
+
}, h.isPortal = function(r) {
|
|
73
|
+
return g(r) === n;
|
|
74
|
+
}, h.isProfiler = function(r) {
|
|
75
|
+
return g(r) === i;
|
|
76
|
+
}, h.isStrictMode = function(r) {
|
|
77
|
+
return g(r) === s;
|
|
78
|
+
}, h.isSuspense = function(r) {
|
|
79
|
+
return g(r) === T;
|
|
80
|
+
}, h.isValidElementType = function(r) {
|
|
81
|
+
return typeof r == "string" || typeof r == "function" || r === a || r === m || r === i || r === s || r === T || r === M || typeof r == "object" && r !== null && (r.$$typeof === R || r.$$typeof === S || r.$$typeof === u || r.$$typeof === f || r.$$typeof === E || r.$$typeof === P || r.$$typeof === _ || r.$$typeof === A || r.$$typeof === x);
|
|
82
|
+
}, h.typeOf = g, h;
|
|
83
|
+
}
|
|
84
|
+
var y = {};
|
|
85
|
+
/** @license React v16.13.1
|
|
86
|
+
* react-is.development.js
|
|
87
|
+
*
|
|
88
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
89
|
+
*
|
|
90
|
+
* This source code is licensed under the MIT license found in the
|
|
91
|
+
* LICENSE file in the root directory of this source tree.
|
|
92
|
+
*/
|
|
93
|
+
var xe;
|
|
94
|
+
function rt() {
|
|
95
|
+
return xe || (xe = 1, process.env.NODE_ENV !== "production" && function() {
|
|
96
|
+
var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, a = e ? Symbol.for("react.fragment") : 60107, s = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, u = e ? Symbol.for("react.provider") : 60109, f = e ? Symbol.for("react.context") : 60110, p = e ? Symbol.for("react.async_mode") : 60111, m = e ? Symbol.for("react.concurrent_mode") : 60111, E = e ? Symbol.for("react.forward_ref") : 60112, T = e ? Symbol.for("react.suspense") : 60113, M = e ? Symbol.for("react.suspense_list") : 60120, S = e ? Symbol.for("react.memo") : 60115, R = e ? Symbol.for("react.lazy") : 60116, x = e ? Symbol.for("react.block") : 60121, P = e ? Symbol.for("react.fundamental") : 60117, _ = e ? Symbol.for("react.responder") : 60118, A = e ? Symbol.for("react.scope") : 60119;
|
|
97
|
+
function g(c) {
|
|
98
|
+
return typeof c == "string" || typeof c == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
99
|
+
c === a || c === m || c === i || c === s || c === T || c === M || typeof c == "object" && c !== null && (c.$$typeof === R || c.$$typeof === S || c.$$typeof === u || c.$$typeof === f || c.$$typeof === E || c.$$typeof === P || c.$$typeof === _ || c.$$typeof === A || c.$$typeof === x);
|
|
100
|
+
}
|
|
101
|
+
function l(c) {
|
|
102
|
+
if (typeof c == "object" && c !== null) {
|
|
103
|
+
var G = c.$$typeof;
|
|
104
|
+
switch (G) {
|
|
105
|
+
case t:
|
|
106
|
+
var k = c.type;
|
|
107
|
+
switch (k) {
|
|
108
|
+
case p:
|
|
109
|
+
case m:
|
|
110
|
+
case a:
|
|
111
|
+
case i:
|
|
112
|
+
case s:
|
|
113
|
+
case T:
|
|
114
|
+
return k;
|
|
115
|
+
default:
|
|
116
|
+
var te = k && k.$$typeof;
|
|
117
|
+
switch (te) {
|
|
118
|
+
case f:
|
|
119
|
+
case E:
|
|
120
|
+
case R:
|
|
121
|
+
case S:
|
|
122
|
+
case u:
|
|
123
|
+
return te;
|
|
124
|
+
default:
|
|
125
|
+
return G;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
case n:
|
|
129
|
+
return G;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
var r = p, C = m, B = f, L = u, U = t, $ = E, N = a, I = R, O = S, D = n, X = i, V = s, q = T, z = !1;
|
|
134
|
+
function v(c) {
|
|
135
|
+
return z || (z = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), ee(c) || l(c) === p;
|
|
136
|
+
}
|
|
137
|
+
function ee(c) {
|
|
138
|
+
return l(c) === m;
|
|
139
|
+
}
|
|
140
|
+
function Y(c) {
|
|
141
|
+
return l(c) === f;
|
|
142
|
+
}
|
|
143
|
+
function W(c) {
|
|
144
|
+
return l(c) === u;
|
|
145
|
+
}
|
|
146
|
+
function ae(c) {
|
|
147
|
+
return typeof c == "object" && c !== null && c.$$typeof === t;
|
|
148
|
+
}
|
|
149
|
+
function ue(c) {
|
|
150
|
+
return l(c) === E;
|
|
151
|
+
}
|
|
152
|
+
function ce(c) {
|
|
153
|
+
return l(c) === a;
|
|
154
|
+
}
|
|
155
|
+
function le(c) {
|
|
156
|
+
return l(c) === R;
|
|
157
|
+
}
|
|
158
|
+
function fe(c) {
|
|
159
|
+
return l(c) === S;
|
|
160
|
+
}
|
|
161
|
+
function pe(c) {
|
|
162
|
+
return l(c) === n;
|
|
163
|
+
}
|
|
164
|
+
function de(c) {
|
|
165
|
+
return l(c) === i;
|
|
166
|
+
}
|
|
167
|
+
function me(c) {
|
|
168
|
+
return l(c) === s;
|
|
169
|
+
}
|
|
170
|
+
function he(c) {
|
|
171
|
+
return l(c) === T;
|
|
172
|
+
}
|
|
173
|
+
y.AsyncMode = r, y.ConcurrentMode = C, y.ContextConsumer = B, y.ContextProvider = L, y.Element = U, y.ForwardRef = $, y.Fragment = N, y.Lazy = I, y.Memo = O, y.Portal = D, y.Profiler = X, y.StrictMode = V, y.Suspense = q, y.isAsyncMode = v, y.isConcurrentMode = ee, y.isContextConsumer = Y, y.isContextProvider = W, y.isElement = ae, y.isForwardRef = ue, y.isFragment = ce, y.isLazy = le, y.isMemo = fe, y.isPortal = pe, y.isProfiler = de, y.isStrictMode = me, y.isSuspense = he, y.isValidElementType = g, y.typeOf = l;
|
|
174
|
+
}()), y;
|
|
175
|
+
}
|
|
176
|
+
process.env.NODE_ENV === "production" ? be.exports = nt() : be.exports = rt();
|
|
177
|
+
var ot = be.exports, Ie = ot, st = {
|
|
178
|
+
$$typeof: !0,
|
|
179
|
+
render: !0,
|
|
180
|
+
defaultProps: !0,
|
|
181
|
+
displayName: !0,
|
|
182
|
+
propTypes: !0
|
|
183
|
+
}, it = {
|
|
184
|
+
$$typeof: !0,
|
|
185
|
+
compare: !0,
|
|
186
|
+
defaultProps: !0,
|
|
187
|
+
displayName: !0,
|
|
188
|
+
propTypes: !0,
|
|
189
|
+
type: !0
|
|
190
|
+
}, De = {};
|
|
191
|
+
De[Ie.ForwardRef] = st;
|
|
192
|
+
De[Ie.Memo] = it;
|
|
193
|
+
var _e = function(t, n) {
|
|
194
|
+
var a = arguments;
|
|
195
|
+
if (n == null || !We.call(n, "css"))
|
|
196
|
+
return b.createElement.apply(void 0, a);
|
|
197
|
+
var s = a.length, i = new Array(s);
|
|
198
|
+
i[0] = He, i[1] = Ge(t, n);
|
|
199
|
+
for (var u = 2; u < s; u++)
|
|
200
|
+
i[u] = a[u];
|
|
201
|
+
return b.createElement.apply(null, i);
|
|
202
|
+
};
|
|
203
|
+
(function(e) {
|
|
204
|
+
var t;
|
|
205
|
+
t || (t = e.JSX || (e.JSX = {}));
|
|
206
|
+
})(_e || (_e = {}));
|
|
207
|
+
function at() {
|
|
208
|
+
for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
|
|
209
|
+
t[n] = arguments[n];
|
|
210
|
+
return Je(t);
|
|
211
|
+
}
|
|
212
|
+
function ge() {
|
|
213
|
+
var e = at.apply(void 0, arguments), t = "animation-" + e.name;
|
|
214
|
+
return {
|
|
215
|
+
name: t,
|
|
216
|
+
styles: "@keyframes " + t + "{" + e.styles + "}",
|
|
217
|
+
anim: 1,
|
|
218
|
+
toString: function() {
|
|
219
|
+
return "_EMO_" + this.name + "_" + this.styles + "_EMO_";
|
|
220
|
+
}
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
const ut = typeof window < "u" ? b.useLayoutEffect : b.useEffect;
|
|
224
|
+
function ct(e, t) {
|
|
225
|
+
return process.env.NODE_ENV === "production" ? () => null : function(...a) {
|
|
226
|
+
return e(...a) || t(...a);
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
function lt(e) {
|
|
230
|
+
const {
|
|
231
|
+
prototype: t = {}
|
|
232
|
+
} = e;
|
|
233
|
+
return !!t.isReactComponent;
|
|
234
|
+
}
|
|
235
|
+
function ft(e, t, n, a, s) {
|
|
236
|
+
const i = e[t], u = s || t;
|
|
237
|
+
if (i == null || // When server-side rendering React doesn't warn either.
|
|
238
|
+
// This is not an accurate check for SSR.
|
|
239
|
+
// This is only in place for emotion compat.
|
|
240
|
+
// TODO: Revisit once https://github.com/facebook/react/issues/20047 is resolved.
|
|
241
|
+
typeof window > "u")
|
|
242
|
+
return null;
|
|
243
|
+
let f;
|
|
244
|
+
return typeof i == "function" && !lt(i) && (f = "Did you accidentally provide a plain function component instead?"), f !== void 0 ? new Error(`Invalid ${a} \`${u}\` supplied to \`${n}\`. Expected an element type that can hold a ref. ${f} For more information see https://mui.com/r/caveat-with-refs-guide`) : null;
|
|
245
|
+
}
|
|
246
|
+
const pt = ct(o.elementType, ft), dt = o.oneOfType([o.func, o.object]);
|
|
247
|
+
function se(e) {
|
|
248
|
+
const t = b.useRef(e);
|
|
249
|
+
return ut(() => {
|
|
250
|
+
t.current = e;
|
|
251
|
+
}), b.useRef((...n) => (
|
|
252
|
+
// @ts-expect-error hide `this`
|
|
253
|
+
(0, t.current)(...n)
|
|
254
|
+
)).current;
|
|
255
|
+
}
|
|
256
|
+
const $e = {};
|
|
257
|
+
function Fe(e, t) {
|
|
258
|
+
const n = b.useRef($e);
|
|
259
|
+
return n.current === $e && (n.current = e(t)), n;
|
|
260
|
+
}
|
|
261
|
+
const mt = [];
|
|
262
|
+
function ht(e) {
|
|
263
|
+
b.useEffect(e, mt);
|
|
264
|
+
}
|
|
265
|
+
class Se {
|
|
266
|
+
constructor() {
|
|
267
|
+
Z(this, "currentId", null);
|
|
268
|
+
Z(this, "clear", () => {
|
|
269
|
+
this.currentId !== null && (clearTimeout(this.currentId), this.currentId = null);
|
|
270
|
+
});
|
|
271
|
+
Z(this, "disposeEffect", () => this.clear);
|
|
272
|
+
}
|
|
273
|
+
static create() {
|
|
274
|
+
return new Se();
|
|
275
|
+
}
|
|
276
|
+
/**
|
|
277
|
+
* Executes `fn` after `delay`, clearing any previously scheduled call.
|
|
278
|
+
*/
|
|
279
|
+
start(t, n) {
|
|
280
|
+
this.clear(), this.currentId = setTimeout(() => {
|
|
281
|
+
this.currentId = null, n();
|
|
282
|
+
}, t);
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
function yt() {
|
|
286
|
+
const e = Fe(Se.create).current;
|
|
287
|
+
return ht(e.disposeEffect), e;
|
|
288
|
+
}
|
|
289
|
+
function we(e) {
|
|
290
|
+
try {
|
|
291
|
+
return e.matches(":focus-visible");
|
|
292
|
+
} catch {
|
|
293
|
+
process.env.NODE_ENV !== "production" && !/jsdom/.test(window.navigator.userAgent) && console.warn(["MUI: The `:focus-visible` pseudo class is not supported in this browser.", "Some components rely on this feature to work properly."].join(`
|
|
294
|
+
`));
|
|
295
|
+
}
|
|
296
|
+
return !1;
|
|
297
|
+
}
|
|
298
|
+
function bt(e, t) {
|
|
299
|
+
if (e == null) return {};
|
|
300
|
+
var n = {};
|
|
301
|
+
for (var a in e) if ({}.hasOwnProperty.call(e, a)) {
|
|
302
|
+
if (t.includes(a)) continue;
|
|
303
|
+
n[a] = e[a];
|
|
304
|
+
}
|
|
305
|
+
return n;
|
|
306
|
+
}
|
|
307
|
+
function Ee(e, t) {
|
|
308
|
+
return Ee = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, a) {
|
|
309
|
+
return n.__proto__ = a, n;
|
|
310
|
+
}, Ee(e, t);
|
|
311
|
+
}
|
|
312
|
+
function Et(e, t) {
|
|
313
|
+
e.prototype = Object.create(t.prototype), e.prototype.constructor = e, Ee(e, t);
|
|
314
|
+
}
|
|
315
|
+
const Ae = Q.createContext(null);
|
|
316
|
+
function Tt(e) {
|
|
317
|
+
if (e === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
318
|
+
return e;
|
|
319
|
+
}
|
|
320
|
+
function ve(e, t) {
|
|
321
|
+
var n = function(i) {
|
|
322
|
+
return t && re(i) ? t(i) : i;
|
|
323
|
+
}, a = /* @__PURE__ */ Object.create(null);
|
|
324
|
+
return e && Ke.map(e, function(s) {
|
|
325
|
+
return s;
|
|
326
|
+
}).forEach(function(s) {
|
|
327
|
+
a[s.key] = n(s);
|
|
328
|
+
}), a;
|
|
329
|
+
}
|
|
330
|
+
function Rt(e, t) {
|
|
331
|
+
e = e || {}, t = t || {};
|
|
332
|
+
function n(E) {
|
|
333
|
+
return E in t ? t[E] : e[E];
|
|
334
|
+
}
|
|
335
|
+
var a = /* @__PURE__ */ Object.create(null), s = [];
|
|
336
|
+
for (var i in e)
|
|
337
|
+
i in t ? s.length && (a[i] = s, s = []) : s.push(i);
|
|
338
|
+
var u, f = {};
|
|
339
|
+
for (var p in t) {
|
|
340
|
+
if (a[p])
|
|
341
|
+
for (u = 0; u < a[p].length; u++) {
|
|
342
|
+
var m = a[p][u];
|
|
343
|
+
f[a[p][u]] = n(m);
|
|
344
|
+
}
|
|
345
|
+
f[p] = n(p);
|
|
346
|
+
}
|
|
347
|
+
for (u = 0; u < s.length; u++)
|
|
348
|
+
f[s[u]] = n(s[u]);
|
|
349
|
+
return f;
|
|
350
|
+
}
|
|
351
|
+
function K(e, t, n) {
|
|
352
|
+
return n[t] != null ? n[t] : e.props[t];
|
|
353
|
+
}
|
|
354
|
+
function gt(e, t) {
|
|
355
|
+
return ve(e.children, function(n) {
|
|
356
|
+
return oe(n, {
|
|
357
|
+
onExited: t.bind(null, n),
|
|
358
|
+
in: !0,
|
|
359
|
+
appear: K(n, "appear", e),
|
|
360
|
+
enter: K(n, "enter", e),
|
|
361
|
+
exit: K(n, "exit", e)
|
|
362
|
+
});
|
|
363
|
+
});
|
|
364
|
+
}
|
|
365
|
+
function St(e, t, n) {
|
|
366
|
+
var a = ve(e.children), s = Rt(t, a);
|
|
367
|
+
return Object.keys(s).forEach(function(i) {
|
|
368
|
+
var u = s[i];
|
|
369
|
+
if (re(u)) {
|
|
370
|
+
var f = i in t, p = i in a, m = t[i], E = re(m) && !m.props.in;
|
|
371
|
+
p && (!f || E) ? s[i] = oe(u, {
|
|
372
|
+
onExited: n.bind(null, u),
|
|
373
|
+
in: !0,
|
|
374
|
+
exit: K(u, "exit", e),
|
|
375
|
+
enter: K(u, "enter", e)
|
|
376
|
+
}) : !p && f && !E ? s[i] = oe(u, {
|
|
377
|
+
in: !1
|
|
378
|
+
}) : p && f && re(m) && (s[i] = oe(u, {
|
|
379
|
+
onExited: n.bind(null, u),
|
|
380
|
+
in: m.props.in,
|
|
381
|
+
exit: K(u, "exit", e),
|
|
382
|
+
enter: K(u, "enter", e)
|
|
383
|
+
}));
|
|
384
|
+
}
|
|
385
|
+
}), s;
|
|
386
|
+
}
|
|
387
|
+
var vt = Object.values || function(e) {
|
|
388
|
+
return Object.keys(e).map(function(t) {
|
|
389
|
+
return e[t];
|
|
390
|
+
});
|
|
391
|
+
}, Mt = {
|
|
392
|
+
component: "div",
|
|
393
|
+
childFactory: function(t) {
|
|
394
|
+
return t;
|
|
395
|
+
}
|
|
396
|
+
}, Me = /* @__PURE__ */ function(e) {
|
|
397
|
+
Et(t, e);
|
|
398
|
+
function t(a, s) {
|
|
399
|
+
var i;
|
|
400
|
+
i = e.call(this, a, s) || this;
|
|
401
|
+
var u = i.handleExited.bind(Tt(i));
|
|
402
|
+
return i.state = {
|
|
403
|
+
contextValue: {
|
|
404
|
+
isMounting: !0
|
|
405
|
+
},
|
|
406
|
+
handleExited: u,
|
|
407
|
+
firstRender: !0
|
|
408
|
+
}, i;
|
|
409
|
+
}
|
|
410
|
+
var n = t.prototype;
|
|
411
|
+
return n.componentDidMount = function() {
|
|
412
|
+
this.mounted = !0, this.setState({
|
|
413
|
+
contextValue: {
|
|
414
|
+
isMounting: !1
|
|
415
|
+
}
|
|
416
|
+
});
|
|
417
|
+
}, n.componentWillUnmount = function() {
|
|
418
|
+
this.mounted = !1;
|
|
419
|
+
}, t.getDerivedStateFromProps = function(s, i) {
|
|
420
|
+
var u = i.children, f = i.handleExited, p = i.firstRender;
|
|
421
|
+
return {
|
|
422
|
+
children: p ? gt(s, f) : St(s, u, f),
|
|
423
|
+
firstRender: !1
|
|
424
|
+
};
|
|
425
|
+
}, n.handleExited = function(s, i) {
|
|
426
|
+
var u = ve(this.props.children);
|
|
427
|
+
s.key in u || (s.props.onExited && s.props.onExited(i), this.mounted && this.setState(function(f) {
|
|
428
|
+
var p = Ze({}, f.children);
|
|
429
|
+
return delete p[s.key], {
|
|
430
|
+
children: p
|
|
431
|
+
};
|
|
432
|
+
}));
|
|
433
|
+
}, n.render = function() {
|
|
434
|
+
var s = this.props, i = s.component, u = s.childFactory, f = bt(s, ["component", "childFactory"]), p = this.state.contextValue, m = vt(this.state.children).map(u);
|
|
435
|
+
return delete f.appear, delete f.enter, delete f.exit, i === null ? /* @__PURE__ */ Q.createElement(Ae.Provider, {
|
|
436
|
+
value: p
|
|
437
|
+
}, m) : /* @__PURE__ */ Q.createElement(Ae.Provider, {
|
|
438
|
+
value: p
|
|
439
|
+
}, /* @__PURE__ */ Q.createElement(i, f, m));
|
|
440
|
+
}, t;
|
|
441
|
+
}(Q.Component);
|
|
442
|
+
Me.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
443
|
+
/**
|
|
444
|
+
* `<TransitionGroup>` renders a `<div>` by default. You can change this
|
|
445
|
+
* behavior by providing a `component` prop.
|
|
446
|
+
* If you use React v16+ and would like to avoid a wrapping `<div>` element
|
|
447
|
+
* you can pass in `component={null}`. This is useful if the wrapping div
|
|
448
|
+
* borks your css styles.
|
|
449
|
+
*/
|
|
450
|
+
component: o.any,
|
|
451
|
+
/**
|
|
452
|
+
* A set of `<Transition>` components, that are toggled `in` and out as they
|
|
453
|
+
* leave. the `<TransitionGroup>` will inject specific transition props, so
|
|
454
|
+
* remember to spread them through if you are wrapping the `<Transition>` as
|
|
455
|
+
* with our `<Fade>` example.
|
|
456
|
+
*
|
|
457
|
+
* While this component is meant for multiple `Transition` or `CSSTransition`
|
|
458
|
+
* children, sometimes you may want to have a single transition child with
|
|
459
|
+
* content that you want to be transitioned out and in when you change it
|
|
460
|
+
* (e.g. routes, images etc.) In that case you can change the `key` prop of
|
|
461
|
+
* the transition child as you change its content, this will cause
|
|
462
|
+
* `TransitionGroup` to transition the child out and back in.
|
|
463
|
+
*/
|
|
464
|
+
children: o.node,
|
|
465
|
+
/**
|
|
466
|
+
* A convenience prop that enables or disables appear animations
|
|
467
|
+
* for all children. Note that specifying this will override any defaults set
|
|
468
|
+
* on individual children Transitions.
|
|
469
|
+
*/
|
|
470
|
+
appear: o.bool,
|
|
471
|
+
/**
|
|
472
|
+
* A convenience prop that enables or disables enter animations
|
|
473
|
+
* for all children. Note that specifying this will override any defaults set
|
|
474
|
+
* on individual children Transitions.
|
|
475
|
+
*/
|
|
476
|
+
enter: o.bool,
|
|
477
|
+
/**
|
|
478
|
+
* A convenience prop that enables or disables exit animations
|
|
479
|
+
* for all children. Note that specifying this will override any defaults set
|
|
480
|
+
* on individual children Transitions.
|
|
481
|
+
*/
|
|
482
|
+
exit: o.bool,
|
|
483
|
+
/**
|
|
484
|
+
* You may need to apply reactive updates to a child as it is exiting.
|
|
485
|
+
* This is generally done by using `cloneElement` however in the case of an exiting
|
|
486
|
+
* child the element has already been removed and not accessible to the consumer.
|
|
487
|
+
*
|
|
488
|
+
* If you do need to update a child as it leaves you can provide a `childFactory`
|
|
489
|
+
* to wrap every child, even the ones that are leaving.
|
|
490
|
+
*
|
|
491
|
+
* @type Function(child: ReactElement) -> ReactElement
|
|
492
|
+
*/
|
|
493
|
+
childFactory: o.func
|
|
494
|
+
} : {};
|
|
495
|
+
Me.defaultProps = Mt;
|
|
496
|
+
function kt(e, t) {
|
|
497
|
+
const {
|
|
498
|
+
className: n,
|
|
499
|
+
elementType: a,
|
|
500
|
+
ownerState: s,
|
|
501
|
+
externalForwardedProps: i,
|
|
502
|
+
internalForwardedProps: u,
|
|
503
|
+
...f
|
|
504
|
+
} = t, {
|
|
505
|
+
component: p,
|
|
506
|
+
slots: m = {
|
|
507
|
+
[e]: void 0
|
|
508
|
+
},
|
|
509
|
+
slotProps: E = {
|
|
510
|
+
[e]: void 0
|
|
511
|
+
},
|
|
512
|
+
...T
|
|
513
|
+
} = i, M = m[e] || a, S = Ue(E[e], s), {
|
|
514
|
+
props: {
|
|
515
|
+
component: R,
|
|
516
|
+
...x
|
|
517
|
+
},
|
|
518
|
+
internalRef: P
|
|
519
|
+
} = Xe({
|
|
520
|
+
className: n,
|
|
521
|
+
...f,
|
|
522
|
+
externalForwardedProps: e === "root" ? T : void 0,
|
|
523
|
+
externalSlotProps: S
|
|
524
|
+
}), _ = ye(P, S == null ? void 0 : S.ref, t.ref), A = e === "root" ? R || p : R, g = qe(M, {
|
|
525
|
+
...e === "root" && !p && !m[e] && u,
|
|
526
|
+
...e !== "root" && !m[e] && u,
|
|
527
|
+
...x,
|
|
528
|
+
...A && {
|
|
529
|
+
as: A
|
|
530
|
+
},
|
|
531
|
+
ref: _
|
|
532
|
+
}, s);
|
|
533
|
+
return [M, g];
|
|
534
|
+
}
|
|
535
|
+
class ie {
|
|
536
|
+
constructor() {
|
|
537
|
+
Z(this, "mountEffect", () => {
|
|
538
|
+
this.shouldMount && !this.didMount && this.ref.current !== null && (this.didMount = !0, this.mounted.resolve());
|
|
539
|
+
});
|
|
540
|
+
this.ref = {
|
|
541
|
+
current: null
|
|
542
|
+
}, this.mounted = null, this.didMount = !1, this.shouldMount = !1, this.setShouldMount = null;
|
|
543
|
+
}
|
|
544
|
+
/** React ref to the ripple instance */
|
|
545
|
+
/** If the ripple component should be mounted */
|
|
546
|
+
/** Promise that resolves when the ripple component is mounted */
|
|
547
|
+
/** If the ripple component has been mounted */
|
|
548
|
+
/** React state hook setter */
|
|
549
|
+
static create() {
|
|
550
|
+
return new ie();
|
|
551
|
+
}
|
|
552
|
+
static use() {
|
|
553
|
+
const t = Fe(ie.create).current, [n, a] = b.useState(!1);
|
|
554
|
+
return t.shouldMount = n, t.setShouldMount = a, b.useEffect(t.mountEffect, [n]), t;
|
|
555
|
+
}
|
|
556
|
+
mount() {
|
|
557
|
+
return this.mounted || (this.mounted = Pt(), this.shouldMount = !0, this.setShouldMount(this.shouldMount)), this.mounted;
|
|
558
|
+
}
|
|
559
|
+
/* Ripple API */
|
|
560
|
+
start(...t) {
|
|
561
|
+
this.mount().then(() => {
|
|
562
|
+
var n;
|
|
563
|
+
return (n = this.ref.current) == null ? void 0 : n.start(...t);
|
|
564
|
+
});
|
|
565
|
+
}
|
|
566
|
+
stop(...t) {
|
|
567
|
+
this.mount().then(() => {
|
|
568
|
+
var n;
|
|
569
|
+
return (n = this.ref.current) == null ? void 0 : n.stop(...t);
|
|
570
|
+
});
|
|
571
|
+
}
|
|
572
|
+
pulsate(...t) {
|
|
573
|
+
this.mount().then(() => {
|
|
574
|
+
var n;
|
|
575
|
+
return (n = this.ref.current) == null ? void 0 : n.pulsate(...t);
|
|
576
|
+
});
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
function Ct() {
|
|
580
|
+
return ie.use();
|
|
581
|
+
}
|
|
582
|
+
function Pt() {
|
|
583
|
+
let e, t;
|
|
584
|
+
const n = new Promise((a, s) => {
|
|
585
|
+
e = a, t = s;
|
|
586
|
+
});
|
|
587
|
+
return n.resolve = e, n.reject = t, n;
|
|
588
|
+
}
|
|
589
|
+
function Le(e) {
|
|
590
|
+
const {
|
|
591
|
+
className: t,
|
|
592
|
+
classes: n,
|
|
593
|
+
pulsate: a = !1,
|
|
594
|
+
rippleX: s,
|
|
595
|
+
rippleY: i,
|
|
596
|
+
rippleSize: u,
|
|
597
|
+
in: f,
|
|
598
|
+
onExited: p,
|
|
599
|
+
timeout: m
|
|
600
|
+
} = e, [E, T] = b.useState(!1), M = F(t, n.ripple, n.rippleVisible, a && n.ripplePulsate), S = {
|
|
601
|
+
width: u,
|
|
602
|
+
height: u,
|
|
603
|
+
top: -(u / 2) + i,
|
|
604
|
+
left: -(u / 2) + s
|
|
605
|
+
}, R = F(n.child, E && n.childLeaving, a && n.childPulsate);
|
|
606
|
+
return !f && !E && T(!0), b.useEffect(() => {
|
|
607
|
+
if (!f && p != null) {
|
|
608
|
+
const x = setTimeout(p, m);
|
|
609
|
+
return () => {
|
|
610
|
+
clearTimeout(x);
|
|
611
|
+
};
|
|
612
|
+
}
|
|
613
|
+
}, [p, f, m]), /* @__PURE__ */ H("span", {
|
|
614
|
+
className: M,
|
|
615
|
+
style: S,
|
|
616
|
+
children: /* @__PURE__ */ H("span", {
|
|
617
|
+
className: R
|
|
618
|
+
})
|
|
619
|
+
});
|
|
620
|
+
}
|
|
621
|
+
process.env.NODE_ENV !== "production" && (Le.propTypes = {
|
|
622
|
+
/**
|
|
623
|
+
* Override or extend the styles applied to the component.
|
|
624
|
+
*/
|
|
625
|
+
classes: o.object.isRequired,
|
|
626
|
+
className: o.string,
|
|
627
|
+
/**
|
|
628
|
+
* @ignore - injected from TransitionGroup
|
|
629
|
+
*/
|
|
630
|
+
in: o.bool,
|
|
631
|
+
/**
|
|
632
|
+
* @ignore - injected from TransitionGroup
|
|
633
|
+
*/
|
|
634
|
+
onExited: o.func,
|
|
635
|
+
/**
|
|
636
|
+
* If `true`, the ripple pulsates, typically indicating the keyboard focus state of an element.
|
|
637
|
+
*/
|
|
638
|
+
pulsate: o.bool,
|
|
639
|
+
/**
|
|
640
|
+
* Diameter of the ripple.
|
|
641
|
+
*/
|
|
642
|
+
rippleSize: o.number,
|
|
643
|
+
/**
|
|
644
|
+
* Horizontal position of the ripple center.
|
|
645
|
+
*/
|
|
646
|
+
rippleX: o.number,
|
|
647
|
+
/**
|
|
648
|
+
* Vertical position of the ripple center.
|
|
649
|
+
*/
|
|
650
|
+
rippleY: o.number,
|
|
651
|
+
/**
|
|
652
|
+
* exit delay
|
|
653
|
+
*/
|
|
654
|
+
timeout: o.number.isRequired
|
|
655
|
+
});
|
|
656
|
+
const w = Oe("MuiTouchRipple", ["root", "ripple", "rippleVisible", "ripplePulsate", "child", "childLeaving", "childPulsate"]), Te = 550, xt = 80, _t = ge`
|
|
657
|
+
0% {
|
|
658
|
+
transform: scale(0);
|
|
659
|
+
opacity: 0.1;
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
100% {
|
|
663
|
+
transform: scale(1);
|
|
664
|
+
opacity: 0.3;
|
|
665
|
+
}
|
|
666
|
+
`, $t = ge`
|
|
667
|
+
0% {
|
|
668
|
+
opacity: 1;
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
100% {
|
|
672
|
+
opacity: 0;
|
|
673
|
+
}
|
|
674
|
+
`, wt = ge`
|
|
675
|
+
0% {
|
|
676
|
+
transform: scale(1);
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
50% {
|
|
680
|
+
transform: scale(0.92);
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
100% {
|
|
684
|
+
transform: scale(1);
|
|
685
|
+
}
|
|
686
|
+
`, At = Re("span", {
|
|
687
|
+
name: "MuiTouchRipple",
|
|
688
|
+
slot: "Root"
|
|
689
|
+
})({
|
|
690
|
+
overflow: "hidden",
|
|
691
|
+
pointerEvents: "none",
|
|
692
|
+
position: "absolute",
|
|
693
|
+
zIndex: 0,
|
|
694
|
+
top: 0,
|
|
695
|
+
right: 0,
|
|
696
|
+
bottom: 0,
|
|
697
|
+
left: 0,
|
|
698
|
+
borderRadius: "inherit"
|
|
699
|
+
}), Ot = Re(Le, {
|
|
700
|
+
name: "MuiTouchRipple",
|
|
701
|
+
slot: "Ripple"
|
|
702
|
+
})`
|
|
703
|
+
opacity: 0;
|
|
704
|
+
position: absolute;
|
|
705
|
+
|
|
706
|
+
&.${w.rippleVisible} {
|
|
707
|
+
opacity: 0.3;
|
|
708
|
+
transform: scale(1);
|
|
709
|
+
animation-name: ${_t};
|
|
710
|
+
animation-duration: ${Te}ms;
|
|
711
|
+
animation-timing-function: ${({
|
|
712
|
+
theme: e
|
|
713
|
+
}) => e.transitions.easing.easeInOut};
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
&.${w.ripplePulsate} {
|
|
717
|
+
animation-duration: ${({
|
|
718
|
+
theme: e
|
|
719
|
+
}) => e.transitions.duration.shorter}ms;
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
& .${w.child} {
|
|
723
|
+
opacity: 1;
|
|
724
|
+
display: block;
|
|
725
|
+
width: 100%;
|
|
726
|
+
height: 100%;
|
|
727
|
+
border-radius: 50%;
|
|
728
|
+
background-color: currentColor;
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
& .${w.childLeaving} {
|
|
732
|
+
opacity: 0;
|
|
733
|
+
animation-name: ${$t};
|
|
734
|
+
animation-duration: ${Te}ms;
|
|
735
|
+
animation-timing-function: ${({
|
|
736
|
+
theme: e
|
|
737
|
+
}) => e.transitions.easing.easeInOut};
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
& .${w.childPulsate} {
|
|
741
|
+
position: absolute;
|
|
742
|
+
/* @noflip */
|
|
743
|
+
left: 0px;
|
|
744
|
+
top: 0;
|
|
745
|
+
animation-name: ${wt};
|
|
746
|
+
animation-duration: 2500ms;
|
|
747
|
+
animation-timing-function: ${({
|
|
748
|
+
theme: e
|
|
749
|
+
}) => e.transitions.easing.easeInOut};
|
|
750
|
+
animation-iteration-count: infinite;
|
|
751
|
+
animation-delay: 200ms;
|
|
752
|
+
}
|
|
753
|
+
`, Ve = /* @__PURE__ */ b.forwardRef(function(t, n) {
|
|
754
|
+
const a = Ne({
|
|
755
|
+
props: t,
|
|
756
|
+
name: "MuiTouchRipple"
|
|
757
|
+
}), {
|
|
758
|
+
center: s = !1,
|
|
759
|
+
classes: i = {},
|
|
760
|
+
className: u,
|
|
761
|
+
...f
|
|
762
|
+
} = a, [p, m] = b.useState([]), E = b.useRef(0), T = b.useRef(null);
|
|
763
|
+
b.useEffect(() => {
|
|
764
|
+
T.current && (T.current(), T.current = null);
|
|
765
|
+
}, [p]);
|
|
766
|
+
const M = b.useRef(!1), S = yt(), R = b.useRef(null), x = b.useRef(null), P = b.useCallback((l) => {
|
|
767
|
+
const {
|
|
768
|
+
pulsate: r,
|
|
769
|
+
rippleX: C,
|
|
770
|
+
rippleY: B,
|
|
771
|
+
rippleSize: L,
|
|
772
|
+
cb: U
|
|
773
|
+
} = l;
|
|
774
|
+
m(($) => [...$, /* @__PURE__ */ H(Ot, {
|
|
775
|
+
classes: {
|
|
776
|
+
ripple: F(i.ripple, w.ripple),
|
|
777
|
+
rippleVisible: F(i.rippleVisible, w.rippleVisible),
|
|
778
|
+
ripplePulsate: F(i.ripplePulsate, w.ripplePulsate),
|
|
779
|
+
child: F(i.child, w.child),
|
|
780
|
+
childLeaving: F(i.childLeaving, w.childLeaving),
|
|
781
|
+
childPulsate: F(i.childPulsate, w.childPulsate)
|
|
782
|
+
},
|
|
783
|
+
timeout: Te,
|
|
784
|
+
pulsate: r,
|
|
785
|
+
rippleX: C,
|
|
786
|
+
rippleY: B,
|
|
787
|
+
rippleSize: L
|
|
788
|
+
}, E.current)]), E.current += 1, T.current = U;
|
|
789
|
+
}, [i]), _ = b.useCallback((l = {}, r = {}, C = () => {
|
|
790
|
+
}) => {
|
|
791
|
+
const {
|
|
792
|
+
pulsate: B = !1,
|
|
793
|
+
center: L = s || r.pulsate,
|
|
794
|
+
fakeElement: U = !1
|
|
795
|
+
// For test purposes
|
|
796
|
+
} = r;
|
|
797
|
+
if ((l == null ? void 0 : l.type) === "mousedown" && M.current) {
|
|
798
|
+
M.current = !1;
|
|
799
|
+
return;
|
|
800
|
+
}
|
|
801
|
+
(l == null ? void 0 : l.type) === "touchstart" && (M.current = !0);
|
|
802
|
+
const $ = U ? null : x.current, N = $ ? $.getBoundingClientRect() : {
|
|
803
|
+
width: 0,
|
|
804
|
+
height: 0,
|
|
805
|
+
left: 0,
|
|
806
|
+
top: 0
|
|
807
|
+
};
|
|
808
|
+
let I, O, D;
|
|
809
|
+
if (L || l === void 0 || l.clientX === 0 && l.clientY === 0 || !l.clientX && !l.touches)
|
|
810
|
+
I = Math.round(N.width / 2), O = Math.round(N.height / 2);
|
|
811
|
+
else {
|
|
812
|
+
const {
|
|
813
|
+
clientX: X,
|
|
814
|
+
clientY: V
|
|
815
|
+
} = l.touches && l.touches.length > 0 ? l.touches[0] : l;
|
|
816
|
+
I = Math.round(X - N.left), O = Math.round(V - N.top);
|
|
817
|
+
}
|
|
818
|
+
if (L)
|
|
819
|
+
D = Math.sqrt((2 * N.width ** 2 + N.height ** 2) / 3), D % 2 === 0 && (D += 1);
|
|
820
|
+
else {
|
|
821
|
+
const X = Math.max(Math.abs(($ ? $.clientWidth : 0) - I), I) * 2 + 2, V = Math.max(Math.abs(($ ? $.clientHeight : 0) - O), O) * 2 + 2;
|
|
822
|
+
D = Math.sqrt(X ** 2 + V ** 2);
|
|
823
|
+
}
|
|
824
|
+
l != null && l.touches ? R.current === null && (R.current = () => {
|
|
825
|
+
P({
|
|
826
|
+
pulsate: B,
|
|
827
|
+
rippleX: I,
|
|
828
|
+
rippleY: O,
|
|
829
|
+
rippleSize: D,
|
|
830
|
+
cb: C
|
|
831
|
+
});
|
|
832
|
+
}, S.start(xt, () => {
|
|
833
|
+
R.current && (R.current(), R.current = null);
|
|
834
|
+
})) : P({
|
|
835
|
+
pulsate: B,
|
|
836
|
+
rippleX: I,
|
|
837
|
+
rippleY: O,
|
|
838
|
+
rippleSize: D,
|
|
839
|
+
cb: C
|
|
840
|
+
});
|
|
841
|
+
}, [s, P, S]), A = b.useCallback(() => {
|
|
842
|
+
_({}, {
|
|
843
|
+
pulsate: !0
|
|
844
|
+
});
|
|
845
|
+
}, [_]), g = b.useCallback((l, r) => {
|
|
846
|
+
if (S.clear(), (l == null ? void 0 : l.type) === "touchend" && R.current) {
|
|
847
|
+
R.current(), R.current = null, S.start(0, () => {
|
|
848
|
+
g(l, r);
|
|
849
|
+
});
|
|
850
|
+
return;
|
|
851
|
+
}
|
|
852
|
+
R.current = null, m((C) => C.length > 0 ? C.slice(1) : C), T.current = r;
|
|
853
|
+
}, [S]);
|
|
854
|
+
return b.useImperativeHandle(n, () => ({
|
|
855
|
+
pulsate: A,
|
|
856
|
+
start: _,
|
|
857
|
+
stop: g
|
|
858
|
+
}), [A, _, g]), /* @__PURE__ */ H(At, {
|
|
859
|
+
className: F(w.root, i.root, u),
|
|
860
|
+
ref: x,
|
|
861
|
+
...f,
|
|
862
|
+
children: /* @__PURE__ */ H(Me, {
|
|
863
|
+
component: null,
|
|
864
|
+
exit: !0,
|
|
865
|
+
children: p
|
|
866
|
+
})
|
|
867
|
+
});
|
|
868
|
+
});
|
|
869
|
+
process.env.NODE_ENV !== "production" && (Ve.propTypes = {
|
|
870
|
+
/**
|
|
871
|
+
* If `true`, the ripple starts at the center of the component
|
|
872
|
+
* rather than at the point of interaction.
|
|
873
|
+
*/
|
|
874
|
+
center: o.bool,
|
|
875
|
+
/**
|
|
876
|
+
* Override or extend the styles applied to the component.
|
|
877
|
+
*/
|
|
878
|
+
classes: o.object,
|
|
879
|
+
/**
|
|
880
|
+
* @ignore
|
|
881
|
+
*/
|
|
882
|
+
className: o.string
|
|
883
|
+
});
|
|
884
|
+
function Nt(e) {
|
|
885
|
+
return Qe("MuiButtonBase", e);
|
|
886
|
+
}
|
|
887
|
+
const It = Oe("MuiButtonBase", ["root", "disabled", "focusVisible"]), Dt = (e) => {
|
|
888
|
+
const {
|
|
889
|
+
disabled: t,
|
|
890
|
+
focusVisible: n,
|
|
891
|
+
focusVisibleClassName: a,
|
|
892
|
+
classes: s
|
|
893
|
+
} = e, u = et({
|
|
894
|
+
root: ["root", t && "disabled", n && "focusVisible"]
|
|
895
|
+
}, Nt, s);
|
|
896
|
+
return n && a && (u.root += ` ${a}`), u;
|
|
897
|
+
}, Ft = Re("button", {
|
|
898
|
+
name: "MuiButtonBase",
|
|
899
|
+
slot: "Root",
|
|
900
|
+
overridesResolver: (e, t) => t.root
|
|
901
|
+
})({
|
|
902
|
+
display: "inline-flex",
|
|
903
|
+
alignItems: "center",
|
|
904
|
+
justifyContent: "center",
|
|
905
|
+
position: "relative",
|
|
906
|
+
boxSizing: "border-box",
|
|
907
|
+
WebkitTapHighlightColor: "transparent",
|
|
908
|
+
backgroundColor: "transparent",
|
|
909
|
+
// Reset default value
|
|
910
|
+
// We disable the focus ring for mouse, touch and keyboard users.
|
|
911
|
+
outline: 0,
|
|
912
|
+
border: 0,
|
|
913
|
+
margin: 0,
|
|
914
|
+
// Remove the margin in Safari
|
|
915
|
+
borderRadius: 0,
|
|
916
|
+
padding: 0,
|
|
917
|
+
// Remove the padding in Firefox
|
|
918
|
+
cursor: "pointer",
|
|
919
|
+
userSelect: "none",
|
|
920
|
+
verticalAlign: "middle",
|
|
921
|
+
MozAppearance: "none",
|
|
922
|
+
// Reset
|
|
923
|
+
WebkitAppearance: "none",
|
|
924
|
+
// Reset
|
|
925
|
+
textDecoration: "none",
|
|
926
|
+
// So we take precedent over the style of a native <a /> element.
|
|
927
|
+
color: "inherit",
|
|
928
|
+
"&::-moz-focus-inner": {
|
|
929
|
+
borderStyle: "none"
|
|
930
|
+
// Remove Firefox dotted outline.
|
|
931
|
+
},
|
|
932
|
+
[`&.${It.disabled}`]: {
|
|
933
|
+
pointerEvents: "none",
|
|
934
|
+
// Disable link interactions
|
|
935
|
+
cursor: "default"
|
|
936
|
+
},
|
|
937
|
+
"@media print": {
|
|
938
|
+
colorAdjust: "exact"
|
|
939
|
+
}
|
|
940
|
+
}), Lt = /* @__PURE__ */ b.forwardRef(function(t, n) {
|
|
941
|
+
const a = Ne({
|
|
942
|
+
props: t,
|
|
943
|
+
name: "MuiButtonBase"
|
|
944
|
+
}), {
|
|
945
|
+
action: s,
|
|
946
|
+
centerRipple: i = !1,
|
|
947
|
+
children: u,
|
|
948
|
+
className: f,
|
|
949
|
+
component: p = "button",
|
|
950
|
+
disabled: m = !1,
|
|
951
|
+
disableRipple: E = !1,
|
|
952
|
+
disableTouchRipple: T = !1,
|
|
953
|
+
focusRipple: M = !1,
|
|
954
|
+
focusVisibleClassName: S,
|
|
955
|
+
LinkComponent: R = "a",
|
|
956
|
+
onBlur: x,
|
|
957
|
+
onClick: P,
|
|
958
|
+
onContextMenu: _,
|
|
959
|
+
onDragLeave: A,
|
|
960
|
+
onFocus: g,
|
|
961
|
+
onFocusVisible: l,
|
|
962
|
+
onKeyDown: r,
|
|
963
|
+
onKeyUp: C,
|
|
964
|
+
onMouseDown: B,
|
|
965
|
+
onMouseLeave: L,
|
|
966
|
+
onMouseUp: U,
|
|
967
|
+
onTouchEnd: $,
|
|
968
|
+
onTouchMove: N,
|
|
969
|
+
onTouchStart: I,
|
|
970
|
+
tabIndex: O = 0,
|
|
971
|
+
TouchRippleProps: D,
|
|
972
|
+
touchRippleRef: X,
|
|
973
|
+
type: V,
|
|
974
|
+
...q
|
|
975
|
+
} = a, z = b.useRef(null), v = Ct(), ee = ye(v.ref, X), [Y, W] = b.useState(!1);
|
|
976
|
+
m && Y && W(!1), b.useImperativeHandle(s, () => ({
|
|
977
|
+
focusVisible: () => {
|
|
978
|
+
W(!0), z.current.focus();
|
|
979
|
+
}
|
|
980
|
+
}), []);
|
|
981
|
+
const ae = v.shouldMount && !E && !m;
|
|
982
|
+
b.useEffect(() => {
|
|
983
|
+
Y && M && !E && v.pulsate();
|
|
984
|
+
}, [E, M, Y, v]);
|
|
985
|
+
const ue = j(v, "start", B, T), ce = j(v, "stop", _, T), le = j(v, "stop", A, T), fe = j(v, "stop", U, T), pe = j(v, "stop", (d) => {
|
|
986
|
+
Y && d.preventDefault(), L && L(d);
|
|
987
|
+
}, T), de = j(v, "start", I, T), me = j(v, "stop", $, T), he = j(v, "stop", N, T), c = j(v, "stop", (d) => {
|
|
988
|
+
we(d.target) || W(!1), x && x(d);
|
|
989
|
+
}, !1), G = se((d) => {
|
|
990
|
+
z.current || (z.current = d.currentTarget), we(d.target) && (W(!0), l && l(d)), g && g(d);
|
|
991
|
+
}), k = () => {
|
|
992
|
+
const d = z.current;
|
|
993
|
+
return p && p !== "button" && !(d.tagName === "A" && d.href);
|
|
994
|
+
}, te = se((d) => {
|
|
995
|
+
M && !d.repeat && Y && d.key === " " && v.stop(d, () => {
|
|
996
|
+
v.start(d);
|
|
997
|
+
}), d.target === d.currentTarget && k() && d.key === " " && d.preventDefault(), r && r(d), d.target === d.currentTarget && k() && d.key === "Enter" && !m && (d.preventDefault(), P && P(d));
|
|
998
|
+
}), Ye = se((d) => {
|
|
999
|
+
M && d.key === " " && Y && !d.defaultPrevented && v.stop(d, () => {
|
|
1000
|
+
v.pulsate(d);
|
|
1001
|
+
}), C && C(d), P && d.target === d.currentTarget && k() && d.key === " " && !d.defaultPrevented && P(d);
|
|
1002
|
+
});
|
|
1003
|
+
let ne = p;
|
|
1004
|
+
ne === "button" && (q.href || q.to) && (ne = R);
|
|
1005
|
+
const J = {};
|
|
1006
|
+
ne === "button" ? (J.type = V === void 0 ? "button" : V, J.disabled = m) : (!q.href && !q.to && (J.role = "button"), m && (J["aria-disabled"] = m));
|
|
1007
|
+
const je = ye(n, z), Ce = {
|
|
1008
|
+
...a,
|
|
1009
|
+
centerRipple: i,
|
|
1010
|
+
component: p,
|
|
1011
|
+
disabled: m,
|
|
1012
|
+
disableRipple: E,
|
|
1013
|
+
disableTouchRipple: T,
|
|
1014
|
+
focusRipple: M,
|
|
1015
|
+
tabIndex: O,
|
|
1016
|
+
focusVisible: Y
|
|
1017
|
+
}, Be = Dt(Ce);
|
|
1018
|
+
return /* @__PURE__ */ tt(Ft, {
|
|
1019
|
+
as: ne,
|
|
1020
|
+
className: F(Be.root, f),
|
|
1021
|
+
ownerState: Ce,
|
|
1022
|
+
onBlur: c,
|
|
1023
|
+
onClick: P,
|
|
1024
|
+
onContextMenu: ce,
|
|
1025
|
+
onFocus: G,
|
|
1026
|
+
onKeyDown: te,
|
|
1027
|
+
onKeyUp: Ye,
|
|
1028
|
+
onMouseDown: ue,
|
|
1029
|
+
onMouseLeave: pe,
|
|
1030
|
+
onMouseUp: fe,
|
|
1031
|
+
onDragLeave: le,
|
|
1032
|
+
onTouchEnd: me,
|
|
1033
|
+
onTouchMove: he,
|
|
1034
|
+
onTouchStart: de,
|
|
1035
|
+
ref: je,
|
|
1036
|
+
tabIndex: m ? -1 : O,
|
|
1037
|
+
type: V,
|
|
1038
|
+
...J,
|
|
1039
|
+
...q,
|
|
1040
|
+
children: [u, ae ? /* @__PURE__ */ H(Ve, {
|
|
1041
|
+
ref: ee,
|
|
1042
|
+
center: i,
|
|
1043
|
+
...D
|
|
1044
|
+
}) : null]
|
|
1045
|
+
});
|
|
1046
|
+
});
|
|
1047
|
+
function j(e, t, n, a = !1) {
|
|
1048
|
+
return se((s) => (n && n(s), a || e[t](s), !0));
|
|
1049
|
+
}
|
|
1050
|
+
process.env.NODE_ENV !== "production" && (Lt.propTypes = {
|
|
1051
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
1052
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
1053
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
1054
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
1055
|
+
/**
|
|
1056
|
+
* A ref for imperative actions.
|
|
1057
|
+
* It currently only supports `focusVisible()` action.
|
|
1058
|
+
*/
|
|
1059
|
+
action: dt,
|
|
1060
|
+
/**
|
|
1061
|
+
* If `true`, the ripples are centered.
|
|
1062
|
+
* They won't start at the cursor interaction position.
|
|
1063
|
+
* @default false
|
|
1064
|
+
*/
|
|
1065
|
+
centerRipple: o.bool,
|
|
1066
|
+
/**
|
|
1067
|
+
* The content of the component.
|
|
1068
|
+
*/
|
|
1069
|
+
children: o.node,
|
|
1070
|
+
/**
|
|
1071
|
+
* Override or extend the styles applied to the component.
|
|
1072
|
+
*/
|
|
1073
|
+
classes: o.object,
|
|
1074
|
+
/**
|
|
1075
|
+
* @ignore
|
|
1076
|
+
*/
|
|
1077
|
+
className: o.string,
|
|
1078
|
+
/**
|
|
1079
|
+
* The component used for the root node.
|
|
1080
|
+
* Either a string to use a HTML element or a component.
|
|
1081
|
+
*/
|
|
1082
|
+
component: pt,
|
|
1083
|
+
/**
|
|
1084
|
+
* If `true`, the component is disabled.
|
|
1085
|
+
* @default false
|
|
1086
|
+
*/
|
|
1087
|
+
disabled: o.bool,
|
|
1088
|
+
/**
|
|
1089
|
+
* If `true`, the ripple effect is disabled.
|
|
1090
|
+
*
|
|
1091
|
+
* ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure
|
|
1092
|
+
* to highlight the element by applying separate styles with the `.Mui-focusVisible` class.
|
|
1093
|
+
* @default false
|
|
1094
|
+
*/
|
|
1095
|
+
disableRipple: o.bool,
|
|
1096
|
+
/**
|
|
1097
|
+
* If `true`, the touch ripple effect is disabled.
|
|
1098
|
+
* @default false
|
|
1099
|
+
*/
|
|
1100
|
+
disableTouchRipple: o.bool,
|
|
1101
|
+
/**
|
|
1102
|
+
* If `true`, the base button will have a keyboard focus ripple.
|
|
1103
|
+
* @default false
|
|
1104
|
+
*/
|
|
1105
|
+
focusRipple: o.bool,
|
|
1106
|
+
/**
|
|
1107
|
+
* This prop can help identify which element has keyboard focus.
|
|
1108
|
+
* The class name will be applied when the element gains the focus through keyboard interaction.
|
|
1109
|
+
* It's a polyfill for the [CSS :focus-visible selector](https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo).
|
|
1110
|
+
* The rationale for using this feature [is explained here](https://github.com/WICG/focus-visible/blob/HEAD/explainer.md).
|
|
1111
|
+
* A [polyfill can be used](https://github.com/WICG/focus-visible) to apply a `focus-visible` class to other components
|
|
1112
|
+
* if needed.
|
|
1113
|
+
*/
|
|
1114
|
+
focusVisibleClassName: o.string,
|
|
1115
|
+
/**
|
|
1116
|
+
* @ignore
|
|
1117
|
+
*/
|
|
1118
|
+
href: o.any,
|
|
1119
|
+
/**
|
|
1120
|
+
* The component used to render a link when the `href` prop is provided.
|
|
1121
|
+
* @default 'a'
|
|
1122
|
+
*/
|
|
1123
|
+
LinkComponent: o.elementType,
|
|
1124
|
+
/**
|
|
1125
|
+
* @ignore
|
|
1126
|
+
*/
|
|
1127
|
+
onBlur: o.func,
|
|
1128
|
+
/**
|
|
1129
|
+
* @ignore
|
|
1130
|
+
*/
|
|
1131
|
+
onClick: o.func,
|
|
1132
|
+
/**
|
|
1133
|
+
* @ignore
|
|
1134
|
+
*/
|
|
1135
|
+
onContextMenu: o.func,
|
|
1136
|
+
/**
|
|
1137
|
+
* @ignore
|
|
1138
|
+
*/
|
|
1139
|
+
onDragLeave: o.func,
|
|
1140
|
+
/**
|
|
1141
|
+
* @ignore
|
|
1142
|
+
*/
|
|
1143
|
+
onFocus: o.func,
|
|
1144
|
+
/**
|
|
1145
|
+
* Callback fired when the component is focused with a keyboard.
|
|
1146
|
+
* We trigger a `onFocus` callback too.
|
|
1147
|
+
*/
|
|
1148
|
+
onFocusVisible: o.func,
|
|
1149
|
+
/**
|
|
1150
|
+
* @ignore
|
|
1151
|
+
*/
|
|
1152
|
+
onKeyDown: o.func,
|
|
1153
|
+
/**
|
|
1154
|
+
* @ignore
|
|
1155
|
+
*/
|
|
1156
|
+
onKeyUp: o.func,
|
|
1157
|
+
/**
|
|
1158
|
+
* @ignore
|
|
1159
|
+
*/
|
|
1160
|
+
onMouseDown: o.func,
|
|
1161
|
+
/**
|
|
1162
|
+
* @ignore
|
|
1163
|
+
*/
|
|
1164
|
+
onMouseLeave: o.func,
|
|
1165
|
+
/**
|
|
1166
|
+
* @ignore
|
|
1167
|
+
*/
|
|
1168
|
+
onMouseUp: o.func,
|
|
1169
|
+
/**
|
|
1170
|
+
* @ignore
|
|
1171
|
+
*/
|
|
1172
|
+
onTouchEnd: o.func,
|
|
1173
|
+
/**
|
|
1174
|
+
* @ignore
|
|
1175
|
+
*/
|
|
1176
|
+
onTouchMove: o.func,
|
|
1177
|
+
/**
|
|
1178
|
+
* @ignore
|
|
1179
|
+
*/
|
|
1180
|
+
onTouchStart: o.func,
|
|
1181
|
+
/**
|
|
1182
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
1183
|
+
*/
|
|
1184
|
+
sx: o.oneOfType([o.arrayOf(o.oneOfType([o.func, o.object, o.bool])), o.func, o.object]),
|
|
1185
|
+
/**
|
|
1186
|
+
* @default 0
|
|
1187
|
+
*/
|
|
1188
|
+
tabIndex: o.number,
|
|
1189
|
+
/**
|
|
1190
|
+
* Props applied to the `TouchRipple` element.
|
|
1191
|
+
*/
|
|
1192
|
+
TouchRippleProps: o.object,
|
|
1193
|
+
/**
|
|
1194
|
+
* A ref that points to the `TouchRipple` element.
|
|
1195
|
+
*/
|
|
1196
|
+
touchRippleRef: o.oneOfType([o.func, o.shape({
|
|
1197
|
+
current: o.shape({
|
|
1198
|
+
pulsate: o.func.isRequired,
|
|
1199
|
+
start: o.func.isRequired,
|
|
1200
|
+
stop: o.func.isRequired
|
|
1201
|
+
})
|
|
1202
|
+
})]),
|
|
1203
|
+
/**
|
|
1204
|
+
* @ignore
|
|
1205
|
+
*/
|
|
1206
|
+
type: o.oneOfType([o.oneOf(["button", "reset", "submit"]), o.string])
|
|
1207
|
+
});
|
|
1208
|
+
export {
|
|
1209
|
+
Lt as B,
|
|
1210
|
+
Ae as T,
|
|
1211
|
+
Et as _,
|
|
1212
|
+
ut as a,
|
|
1213
|
+
bt as b,
|
|
1214
|
+
ct as c,
|
|
1215
|
+
yt as d,
|
|
1216
|
+
pt as e,
|
|
1217
|
+
se as f,
|
|
1218
|
+
Se as g,
|
|
1219
|
+
Ee as h,
|
|
1220
|
+
we as i,
|
|
1221
|
+
Tt as j,
|
|
1222
|
+
dt as r,
|
|
1223
|
+
kt as u
|
|
1224
|
+
};
|