jcicl 0.0.57 → 0.0.58
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/.chunks/ButtonBase.js +202 -209
- package/.chunks/Input.js +6722 -0
- package/.chunks/Portal.js +824 -0
- package/.chunks/TransitionGroupContext.js +60 -78
- package/.chunks/elementTypeAcceptingRef.js +23 -0
- package/.chunks/isFocusVisible.js +12 -0
- package/animation/Spin/Spin.d.ts +5 -0
- package/animation/Spin/Spin.js +22 -0
- package/animation/Spin/index.d.ts +1 -0
- package/animation/Spin/index.js +4 -0
- package/animation/index.d.ts +1 -0
- package/animation/index.js +4 -2
- package/base/Button/Button.d.ts +1 -1
- package/base/Button/Button.js +66 -64
- package/base/Input/Input.d.ts +4 -1
- package/base/Input/Input.js +6 -7486
- package/base/Input/index.d.ts +1 -1
- package/base/Input/index.js +2 -2
- package/base/LabeledValue/LabeledValue.js +23 -12
- package/base/index.js +6 -6
- package/composite/Accordion/Accordion.d.ts +15 -0
- package/composite/Accordion/Accordion.js +65 -0
- package/composite/Accordion/index.d.ts +1 -0
- package/composite/Accordion/index.js +4 -0
- package/composite/InfoCard/InfoCard.d.ts +3 -0
- package/composite/InfoCard/InfoCard.js +13 -11
- package/composite/LabeledInput/LabeledInput.d.ts +9 -0
- package/composite/LabeledInput/LabeledInput.js +35 -0
- package/composite/LabeledInput/index.d.ts +1 -0
- package/composite/LabeledInput/index.js +4 -0
- package/composite/Tooltip/Tooltip.d.ts +7 -0
- package/composite/Tooltip/Tooltip.js +2092 -0
- package/composite/Tooltip/index.d.ts +1 -0
- package/composite/Tooltip/index.js +4 -0
- package/composite/index.d.ts +3 -0
- package/composite/index.js +16 -10
- package/index.d.ts +3 -3
- package/index.js +50 -40
- package/package.json +1 -1
- package/supercomposite/AppHeader/AppHeader.js +1 -1
- package/supercomposite/EditableInfoCard/EditableInfoCard.d.ts +29 -0
- package/supercomposite/EditableInfoCard/EditableInfoCard.js +223 -0
- package/supercomposite/EditableInfoCard/index.d.ts +1 -0
- package/supercomposite/EditableInfoCard/index.js +4 -0
- package/supercomposite/index.d.ts +1 -0
- package/supercomposite/index.js +6 -4
package/.chunks/ButtonBase.js
CHANGED
|
@@ -1,25 +1,18 @@
|
|
|
1
1
|
var Le = Object.defineProperty;
|
|
2
|
-
var ke = (
|
|
3
|
-
var
|
|
2
|
+
var ke = (o, t, n) => t in o ? Le(o, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : o[t] = n;
|
|
3
|
+
var le = (o, t, n) => ke(o, typeof t != "symbol" ? t + "" : t, n);
|
|
4
4
|
import * as d from "react";
|
|
5
5
|
import W, { Children as Oe, isValidElement as G, cloneElement as J } from "react";
|
|
6
6
|
import { P as e, b as E, a as fe, s as te, u as de, g as je, d as Fe } from "./DefaultPropsProvider.js";
|
|
7
|
-
import { jsx as
|
|
7
|
+
import { jsx as I, jsxs as $e } from "react/jsx-runtime";
|
|
8
8
|
import { k as ne } from "./emotion-react.browser.esm.js";
|
|
9
|
-
import { u as
|
|
9
|
+
import { u as Ie, _ as Ue, a as ze, T as ue, b as _e, c as ce, d as H, r as Xe } from "./TransitionGroupContext.js";
|
|
10
10
|
import { _ as Ye } from "./emotion-styled.browser.esm.js";
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
return n.matches(":focus-visible");
|
|
14
|
-
} catch {
|
|
15
|
-
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(`
|
|
16
|
-
`));
|
|
17
|
-
}
|
|
18
|
-
return !1;
|
|
19
|
-
}
|
|
11
|
+
import { e as Ae } from "./elementTypeAcceptingRef.js";
|
|
12
|
+
import { i as pe } from "./isFocusVisible.js";
|
|
20
13
|
class Q {
|
|
21
14
|
constructor() {
|
|
22
|
-
|
|
15
|
+
le(this, "mountEffect", () => {
|
|
23
16
|
this.shouldMount && !this.didMount && this.ref.current !== null && (this.didMount = !0, this.mounted.resolve());
|
|
24
17
|
});
|
|
25
18
|
this.ref = {
|
|
@@ -35,8 +28,8 @@ class Q {
|
|
|
35
28
|
return new Q();
|
|
36
29
|
}
|
|
37
30
|
static use() {
|
|
38
|
-
const t =
|
|
39
|
-
return t.shouldMount =
|
|
31
|
+
const t = Ie(Q.create).current, [n, l] = d.useState(!1);
|
|
32
|
+
return t.shouldMount = n, t.setShouldMount = l, d.useEffect(t.mountEffect, [n]), t;
|
|
40
33
|
}
|
|
41
34
|
mount() {
|
|
42
35
|
return this.mounted || (this.mounted = qe(), this.shouldMount = !0, this.setShouldMount(this.shouldMount)), this.mounted;
|
|
@@ -44,20 +37,20 @@ class Q {
|
|
|
44
37
|
/* Ripple API */
|
|
45
38
|
start(...t) {
|
|
46
39
|
this.mount().then(() => {
|
|
47
|
-
var
|
|
48
|
-
return (
|
|
40
|
+
var n;
|
|
41
|
+
return (n = this.ref.current) == null ? void 0 : n.start(...t);
|
|
49
42
|
});
|
|
50
43
|
}
|
|
51
44
|
stop(...t) {
|
|
52
45
|
this.mount().then(() => {
|
|
53
|
-
var
|
|
54
|
-
return (
|
|
46
|
+
var n;
|
|
47
|
+
return (n = this.ref.current) == null ? void 0 : n.stop(...t);
|
|
55
48
|
});
|
|
56
49
|
}
|
|
57
50
|
pulsate(...t) {
|
|
58
51
|
this.mount().then(() => {
|
|
59
|
-
var
|
|
60
|
-
return (
|
|
52
|
+
var n;
|
|
53
|
+
return (n = this.ref.current) == null ? void 0 : n.pulsate(...t);
|
|
61
54
|
});
|
|
62
55
|
}
|
|
63
56
|
}
|
|
@@ -65,97 +58,97 @@ function Ke() {
|
|
|
65
58
|
return Q.use();
|
|
66
59
|
}
|
|
67
60
|
function qe() {
|
|
68
|
-
let
|
|
69
|
-
const
|
|
70
|
-
|
|
61
|
+
let o, t;
|
|
62
|
+
const n = new Promise((l, i) => {
|
|
63
|
+
o = l, t = i;
|
|
71
64
|
});
|
|
72
|
-
return
|
|
65
|
+
return n.resolve = o, n.reject = t, n;
|
|
73
66
|
}
|
|
74
|
-
function We(
|
|
75
|
-
if (
|
|
76
|
-
return
|
|
67
|
+
function We(o) {
|
|
68
|
+
if (o === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
69
|
+
return o;
|
|
77
70
|
}
|
|
78
|
-
function oe(
|
|
79
|
-
var
|
|
71
|
+
function oe(o, t) {
|
|
72
|
+
var n = function(s) {
|
|
80
73
|
return t && G(s) ? t(s) : s;
|
|
81
|
-
},
|
|
82
|
-
return
|
|
74
|
+
}, l = /* @__PURE__ */ Object.create(null);
|
|
75
|
+
return o && Oe.map(o, function(i) {
|
|
83
76
|
return i;
|
|
84
77
|
}).forEach(function(i) {
|
|
85
|
-
|
|
86
|
-
}),
|
|
78
|
+
l[i.key] = n(i);
|
|
79
|
+
}), l;
|
|
87
80
|
}
|
|
88
|
-
function He(
|
|
89
|
-
|
|
90
|
-
function
|
|
91
|
-
return h in t ? t[h] :
|
|
81
|
+
function He(o, t) {
|
|
82
|
+
o = o || {}, t = t || {};
|
|
83
|
+
function n(h) {
|
|
84
|
+
return h in t ? t[h] : o[h];
|
|
92
85
|
}
|
|
93
|
-
var
|
|
94
|
-
for (var s in
|
|
95
|
-
s in t ? i.length && (
|
|
86
|
+
var l = /* @__PURE__ */ Object.create(null), i = [];
|
|
87
|
+
for (var s in o)
|
|
88
|
+
s in t ? i.length && (l[s] = i, i = []) : i.push(s);
|
|
96
89
|
var r, p = {};
|
|
97
|
-
for (var
|
|
98
|
-
if (u
|
|
99
|
-
for (r = 0; r < u
|
|
100
|
-
var f = u
|
|
101
|
-
p[u
|
|
90
|
+
for (var u in t) {
|
|
91
|
+
if (l[u])
|
|
92
|
+
for (r = 0; r < l[u].length; r++) {
|
|
93
|
+
var f = l[u][r];
|
|
94
|
+
p[l[u][r]] = n(f);
|
|
102
95
|
}
|
|
103
|
-
p[
|
|
96
|
+
p[u] = n(u);
|
|
104
97
|
}
|
|
105
98
|
for (r = 0; r < i.length; r++)
|
|
106
|
-
p[i[r]] =
|
|
99
|
+
p[i[r]] = n(i[r]);
|
|
107
100
|
return p;
|
|
108
101
|
}
|
|
109
|
-
function O(
|
|
110
|
-
return
|
|
102
|
+
function O(o, t, n) {
|
|
103
|
+
return n[t] != null ? n[t] : o.props[t];
|
|
111
104
|
}
|
|
112
|
-
function Ge(
|
|
113
|
-
return oe(
|
|
114
|
-
return J(
|
|
115
|
-
onExited: t.bind(null,
|
|
105
|
+
function Ge(o, t) {
|
|
106
|
+
return oe(o.children, function(n) {
|
|
107
|
+
return J(n, {
|
|
108
|
+
onExited: t.bind(null, n),
|
|
116
109
|
in: !0,
|
|
117
|
-
appear: O(
|
|
118
|
-
enter: O(
|
|
119
|
-
exit: O(
|
|
110
|
+
appear: O(n, "appear", o),
|
|
111
|
+
enter: O(n, "enter", o),
|
|
112
|
+
exit: O(n, "exit", o)
|
|
120
113
|
});
|
|
121
114
|
});
|
|
122
115
|
}
|
|
123
|
-
function Je(
|
|
124
|
-
var
|
|
116
|
+
function Je(o, t, n) {
|
|
117
|
+
var l = oe(o.children), i = He(t, l);
|
|
125
118
|
return Object.keys(i).forEach(function(s) {
|
|
126
119
|
var r = i[s];
|
|
127
120
|
if (G(r)) {
|
|
128
|
-
var p = s in t,
|
|
129
|
-
|
|
130
|
-
onExited:
|
|
121
|
+
var p = s in t, u = s in l, f = t[s], h = G(f) && !f.props.in;
|
|
122
|
+
u && (!p || h) ? i[s] = J(r, {
|
|
123
|
+
onExited: n.bind(null, r),
|
|
131
124
|
in: !0,
|
|
132
|
-
exit: O(r, "exit",
|
|
133
|
-
enter: O(r, "enter",
|
|
134
|
-
}) : !
|
|
125
|
+
exit: O(r, "exit", o),
|
|
126
|
+
enter: O(r, "enter", o)
|
|
127
|
+
}) : !u && p && !h ? i[s] = J(r, {
|
|
135
128
|
in: !1
|
|
136
|
-
}) :
|
|
137
|
-
onExited:
|
|
129
|
+
}) : u && p && G(f) && (i[s] = J(r, {
|
|
130
|
+
onExited: n.bind(null, r),
|
|
138
131
|
in: f.props.in,
|
|
139
|
-
exit: O(r, "exit",
|
|
140
|
-
enter: O(r, "enter",
|
|
132
|
+
exit: O(r, "exit", o),
|
|
133
|
+
enter: O(r, "enter", o)
|
|
141
134
|
}));
|
|
142
135
|
}
|
|
143
136
|
}), i;
|
|
144
137
|
}
|
|
145
|
-
var Qe = Object.values || function(
|
|
146
|
-
return Object.keys(
|
|
147
|
-
return
|
|
138
|
+
var Qe = Object.values || function(o) {
|
|
139
|
+
return Object.keys(o).map(function(t) {
|
|
140
|
+
return o[t];
|
|
148
141
|
});
|
|
149
142
|
}, Ze = {
|
|
150
143
|
component: "div",
|
|
151
144
|
childFactory: function(t) {
|
|
152
145
|
return t;
|
|
153
146
|
}
|
|
154
|
-
}, ie = /* @__PURE__ */ function(
|
|
155
|
-
|
|
156
|
-
function t(
|
|
147
|
+
}, ie = /* @__PURE__ */ function(o) {
|
|
148
|
+
Ue(t, o);
|
|
149
|
+
function t(l, i) {
|
|
157
150
|
var s;
|
|
158
|
-
s =
|
|
151
|
+
s = o.call(this, l, i) || this;
|
|
159
152
|
var r = s.handleExited.bind(We(s));
|
|
160
153
|
return s.state = {
|
|
161
154
|
contextValue: {
|
|
@@ -165,35 +158,35 @@ var Qe = Object.values || function(n) {
|
|
|
165
158
|
firstRender: !0
|
|
166
159
|
}, s;
|
|
167
160
|
}
|
|
168
|
-
var
|
|
169
|
-
return
|
|
161
|
+
var n = t.prototype;
|
|
162
|
+
return n.componentDidMount = function() {
|
|
170
163
|
this.mounted = !0, this.setState({
|
|
171
164
|
contextValue: {
|
|
172
165
|
isMounting: !1
|
|
173
166
|
}
|
|
174
167
|
});
|
|
175
|
-
},
|
|
168
|
+
}, n.componentWillUnmount = function() {
|
|
176
169
|
this.mounted = !1;
|
|
177
170
|
}, t.getDerivedStateFromProps = function(i, s) {
|
|
178
|
-
var r = s.children, p = s.handleExited,
|
|
171
|
+
var r = s.children, p = s.handleExited, u = s.firstRender;
|
|
179
172
|
return {
|
|
180
|
-
children:
|
|
173
|
+
children: u ? Ge(i, p) : Je(i, r, p),
|
|
181
174
|
firstRender: !1
|
|
182
175
|
};
|
|
183
|
-
},
|
|
176
|
+
}, n.handleExited = function(i, s) {
|
|
184
177
|
var r = oe(this.props.children);
|
|
185
178
|
i.key in r || (i.props.onExited && i.props.onExited(s), this.mounted && this.setState(function(p) {
|
|
186
|
-
var
|
|
187
|
-
return delete
|
|
188
|
-
children:
|
|
179
|
+
var u = Ye({}, p.children);
|
|
180
|
+
return delete u[i.key], {
|
|
181
|
+
children: u
|
|
189
182
|
};
|
|
190
183
|
}));
|
|
191
|
-
},
|
|
192
|
-
var i = this.props, s = i.component, r = i.childFactory, p = ze(i, ["component", "childFactory"]),
|
|
193
|
-
return delete p.appear, delete p.enter, delete p.exit, s === null ? /* @__PURE__ */ W.createElement(
|
|
194
|
-
value:
|
|
195
|
-
}, f) : /* @__PURE__ */ W.createElement(
|
|
196
|
-
value:
|
|
184
|
+
}, n.render = function() {
|
|
185
|
+
var i = this.props, s = i.component, r = i.childFactory, p = ze(i, ["component", "childFactory"]), u = this.state.contextValue, f = Qe(this.state.children).map(r);
|
|
186
|
+
return delete p.appear, delete p.enter, delete p.exit, s === null ? /* @__PURE__ */ W.createElement(ue.Provider, {
|
|
187
|
+
value: u
|
|
188
|
+
}, f) : /* @__PURE__ */ W.createElement(ue.Provider, {
|
|
189
|
+
value: u
|
|
197
190
|
}, /* @__PURE__ */ W.createElement(s, p, f));
|
|
198
191
|
}, t;
|
|
199
192
|
}(W.Component);
|
|
@@ -251,34 +244,34 @@ ie.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
251
244
|
childFactory: e.func
|
|
252
245
|
} : {};
|
|
253
246
|
ie.defaultProps = Ze;
|
|
254
|
-
function he(
|
|
247
|
+
function he(o) {
|
|
255
248
|
const {
|
|
256
249
|
className: t,
|
|
257
|
-
classes:
|
|
258
|
-
pulsate:
|
|
250
|
+
classes: n,
|
|
251
|
+
pulsate: l = !1,
|
|
259
252
|
rippleX: i,
|
|
260
253
|
rippleY: s,
|
|
261
254
|
rippleSize: r,
|
|
262
255
|
in: p,
|
|
263
|
-
onExited:
|
|
256
|
+
onExited: u,
|
|
264
257
|
timeout: f
|
|
265
|
-
} =
|
|
258
|
+
} = o, [h, R] = d.useState(!1), g = E(t, n.ripple, n.rippleVisible, l && n.ripplePulsate), D = {
|
|
266
259
|
width: r,
|
|
267
260
|
height: r,
|
|
268
261
|
top: -(r / 2) + s,
|
|
269
262
|
left: -(r / 2) + i
|
|
270
|
-
}, m = E(
|
|
271
|
-
return !p && !h &&
|
|
272
|
-
if (!p &&
|
|
273
|
-
const
|
|
263
|
+
}, m = E(n.child, h && n.childLeaving, l && n.childPulsate);
|
|
264
|
+
return !p && !h && R(!0), d.useEffect(() => {
|
|
265
|
+
if (!p && u != null) {
|
|
266
|
+
const w = setTimeout(u, f);
|
|
274
267
|
return () => {
|
|
275
|
-
clearTimeout(
|
|
268
|
+
clearTimeout(w);
|
|
276
269
|
};
|
|
277
270
|
}
|
|
278
|
-
}, [
|
|
271
|
+
}, [u, p, f]), /* @__PURE__ */ I("span", {
|
|
279
272
|
className: g,
|
|
280
|
-
style:
|
|
281
|
-
children: /* @__PURE__ */
|
|
273
|
+
style: D,
|
|
274
|
+
children: /* @__PURE__ */ I("span", {
|
|
282
275
|
className: m
|
|
283
276
|
})
|
|
284
277
|
});
|
|
@@ -374,14 +367,14 @@ const b = fe("MuiTouchRipple", ["root", "ripple", "rippleVisible", "ripplePulsat
|
|
|
374
367
|
animation-name: ${tt};
|
|
375
368
|
animation-duration: ${ee}ms;
|
|
376
369
|
animation-timing-function: ${({
|
|
377
|
-
theme:
|
|
378
|
-
}) =>
|
|
370
|
+
theme: o
|
|
371
|
+
}) => o.transitions.easing.easeInOut};
|
|
379
372
|
}
|
|
380
373
|
|
|
381
374
|
&.${b.ripplePulsate} {
|
|
382
375
|
animation-duration: ${({
|
|
383
|
-
theme:
|
|
384
|
-
}) =>
|
|
376
|
+
theme: o
|
|
377
|
+
}) => o.transitions.duration.shorter}ms;
|
|
385
378
|
}
|
|
386
379
|
|
|
387
380
|
& .${b.child} {
|
|
@@ -398,8 +391,8 @@ const b = fe("MuiTouchRipple", ["root", "ripple", "rippleVisible", "ripplePulsat
|
|
|
398
391
|
animation-name: ${nt};
|
|
399
392
|
animation-duration: ${ee}ms;
|
|
400
393
|
animation-timing-function: ${({
|
|
401
|
-
theme:
|
|
402
|
-
}) =>
|
|
394
|
+
theme: o
|
|
395
|
+
}) => o.transitions.easing.easeInOut};
|
|
403
396
|
}
|
|
404
397
|
|
|
405
398
|
& .${b.childPulsate} {
|
|
@@ -410,13 +403,13 @@ const b = fe("MuiTouchRipple", ["root", "ripple", "rippleVisible", "ripplePulsat
|
|
|
410
403
|
animation-name: ${ot};
|
|
411
404
|
animation-duration: 2500ms;
|
|
412
405
|
animation-timing-function: ${({
|
|
413
|
-
theme:
|
|
414
|
-
}) =>
|
|
406
|
+
theme: o
|
|
407
|
+
}) => o.transitions.easing.easeInOut};
|
|
415
408
|
animation-iteration-count: infinite;
|
|
416
409
|
animation-delay: 200ms;
|
|
417
410
|
}
|
|
418
|
-
`, me = /* @__PURE__ */ d.forwardRef(function(t,
|
|
419
|
-
const
|
|
411
|
+
`, me = /* @__PURE__ */ d.forwardRef(function(t, n) {
|
|
412
|
+
const l = de({
|
|
420
413
|
props: t,
|
|
421
414
|
name: "MuiTouchRipple"
|
|
422
415
|
}), {
|
|
@@ -424,19 +417,19 @@ const b = fe("MuiTouchRipple", ["root", "ripple", "rippleVisible", "ripplePulsat
|
|
|
424
417
|
classes: s = {},
|
|
425
418
|
className: r,
|
|
426
419
|
...p
|
|
427
|
-
} =
|
|
420
|
+
} = l, [u, f] = d.useState([]), h = d.useRef(0), R = d.useRef(null);
|
|
428
421
|
d.useEffect(() => {
|
|
429
|
-
|
|
430
|
-
}, [
|
|
431
|
-
const g = d.useRef(!1),
|
|
422
|
+
R.current && (R.current(), R.current = null);
|
|
423
|
+
}, [u]);
|
|
424
|
+
const g = d.useRef(!1), D = _e(), m = d.useRef(null), w = d.useRef(null), C = d.useCallback((c) => {
|
|
432
425
|
const {
|
|
433
|
-
pulsate:
|
|
426
|
+
pulsate: y,
|
|
434
427
|
rippleX: M,
|
|
435
|
-
rippleY:
|
|
428
|
+
rippleY: $,
|
|
436
429
|
rippleSize: B,
|
|
437
|
-
cb:
|
|
430
|
+
cb: U
|
|
438
431
|
} = c;
|
|
439
|
-
f((T) => [...T, /* @__PURE__ */
|
|
432
|
+
f((T) => [...T, /* @__PURE__ */ I(st, {
|
|
440
433
|
classes: {
|
|
441
434
|
ripple: E(s.ripple, b.ripple),
|
|
442
435
|
rippleVisible: E(s.rippleVisible, b.rippleVisible),
|
|
@@ -446,88 +439,88 @@ const b = fe("MuiTouchRipple", ["root", "ripple", "rippleVisible", "ripplePulsat
|
|
|
446
439
|
childPulsate: E(s.childPulsate, b.childPulsate)
|
|
447
440
|
},
|
|
448
441
|
timeout: ee,
|
|
449
|
-
pulsate:
|
|
442
|
+
pulsate: y,
|
|
450
443
|
rippleX: M,
|
|
451
|
-
rippleY:
|
|
444
|
+
rippleY: $,
|
|
452
445
|
rippleSize: B
|
|
453
|
-
}, h.current)]), h.current += 1,
|
|
454
|
-
}, [s]), j = d.useCallback((c = {},
|
|
446
|
+
}, h.current)]), h.current += 1, R.current = U;
|
|
447
|
+
}, [s]), j = d.useCallback((c = {}, y = {}, M = () => {
|
|
455
448
|
}) => {
|
|
456
449
|
const {
|
|
457
|
-
pulsate:
|
|
458
|
-
center: B = i ||
|
|
459
|
-
fakeElement:
|
|
450
|
+
pulsate: $ = !1,
|
|
451
|
+
center: B = i || y.pulsate,
|
|
452
|
+
fakeElement: U = !1
|
|
460
453
|
// For test purposes
|
|
461
|
-
} =
|
|
454
|
+
} = y;
|
|
462
455
|
if ((c == null ? void 0 : c.type) === "mousedown" && g.current) {
|
|
463
456
|
g.current = !1;
|
|
464
457
|
return;
|
|
465
458
|
}
|
|
466
459
|
(c == null ? void 0 : c.type) === "touchstart" && (g.current = !0);
|
|
467
|
-
const T =
|
|
460
|
+
const T = U ? null : w.current, V = T ? T.getBoundingClientRect() : {
|
|
468
461
|
width: 0,
|
|
469
462
|
height: 0,
|
|
470
463
|
left: 0,
|
|
471
464
|
top: 0
|
|
472
465
|
};
|
|
473
|
-
let
|
|
466
|
+
let S, x, v;
|
|
474
467
|
if (B || c === void 0 || c.clientX === 0 && c.clientY === 0 || !c.clientX && !c.touches)
|
|
475
|
-
|
|
468
|
+
S = Math.round(V.width / 2), x = Math.round(V.height / 2);
|
|
476
469
|
else {
|
|
477
470
|
const {
|
|
478
471
|
clientX: z,
|
|
479
472
|
clientY: L
|
|
480
473
|
} = c.touches && c.touches.length > 0 ? c.touches[0] : c;
|
|
481
|
-
|
|
474
|
+
S = Math.round(z - V.left), x = Math.round(L - V.top);
|
|
482
475
|
}
|
|
483
476
|
if (B)
|
|
484
|
-
v = Math.sqrt((2 *
|
|
477
|
+
v = Math.sqrt((2 * V.width ** 2 + V.height ** 2) / 3), v % 2 === 0 && (v += 1);
|
|
485
478
|
else {
|
|
486
|
-
const z = Math.max(Math.abs((T ? T.clientWidth : 0) -
|
|
479
|
+
const z = Math.max(Math.abs((T ? T.clientWidth : 0) - S), S) * 2 + 2, L = Math.max(Math.abs((T ? T.clientHeight : 0) - x), x) * 2 + 2;
|
|
487
480
|
v = Math.sqrt(z ** 2 + L ** 2);
|
|
488
481
|
}
|
|
489
482
|
c != null && c.touches ? m.current === null && (m.current = () => {
|
|
490
483
|
C({
|
|
491
|
-
pulsate:
|
|
492
|
-
rippleX:
|
|
484
|
+
pulsate: $,
|
|
485
|
+
rippleX: S,
|
|
493
486
|
rippleY: x,
|
|
494
487
|
rippleSize: v,
|
|
495
488
|
cb: M
|
|
496
489
|
});
|
|
497
|
-
},
|
|
490
|
+
}, D.start(et, () => {
|
|
498
491
|
m.current && (m.current(), m.current = null);
|
|
499
492
|
})) : C({
|
|
500
|
-
pulsate:
|
|
501
|
-
rippleX:
|
|
493
|
+
pulsate: $,
|
|
494
|
+
rippleX: S,
|
|
502
495
|
rippleY: x,
|
|
503
496
|
rippleSize: v,
|
|
504
497
|
cb: M
|
|
505
498
|
});
|
|
506
|
-
}, [i, C,
|
|
499
|
+
}, [i, C, D]), A = d.useCallback(() => {
|
|
507
500
|
j({}, {
|
|
508
501
|
pulsate: !0
|
|
509
502
|
});
|
|
510
|
-
}, [j]), F = d.useCallback((c,
|
|
511
|
-
if (
|
|
512
|
-
m.current(), m.current = null,
|
|
513
|
-
F(c,
|
|
503
|
+
}, [j]), F = d.useCallback((c, y) => {
|
|
504
|
+
if (D.clear(), (c == null ? void 0 : c.type) === "touchend" && m.current) {
|
|
505
|
+
m.current(), m.current = null, D.start(0, () => {
|
|
506
|
+
F(c, y);
|
|
514
507
|
});
|
|
515
508
|
return;
|
|
516
509
|
}
|
|
517
|
-
m.current = null, f((M) => M.length > 0 ? M.slice(1) : M),
|
|
518
|
-
}, [
|
|
519
|
-
return d.useImperativeHandle(
|
|
520
|
-
pulsate:
|
|
510
|
+
m.current = null, f((M) => M.length > 0 ? M.slice(1) : M), R.current = y;
|
|
511
|
+
}, [D]);
|
|
512
|
+
return d.useImperativeHandle(n, () => ({
|
|
513
|
+
pulsate: A,
|
|
521
514
|
start: j,
|
|
522
515
|
stop: F
|
|
523
|
-
}), [
|
|
516
|
+
}), [A, j, F]), /* @__PURE__ */ I(it, {
|
|
524
517
|
className: E(b.root, s.root, r),
|
|
525
|
-
ref:
|
|
518
|
+
ref: w,
|
|
526
519
|
...p,
|
|
527
|
-
children: /* @__PURE__ */
|
|
520
|
+
children: /* @__PURE__ */ I(ie, {
|
|
528
521
|
component: null,
|
|
529
522
|
exit: !0,
|
|
530
|
-
children:
|
|
523
|
+
children: u
|
|
531
524
|
})
|
|
532
525
|
});
|
|
533
526
|
});
|
|
@@ -546,23 +539,23 @@ process.env.NODE_ENV !== "production" && (me.propTypes = {
|
|
|
546
539
|
*/
|
|
547
540
|
className: e.string
|
|
548
541
|
});
|
|
549
|
-
function rt(
|
|
550
|
-
return je("MuiButtonBase",
|
|
542
|
+
function rt(o) {
|
|
543
|
+
return je("MuiButtonBase", o);
|
|
551
544
|
}
|
|
552
|
-
const at = fe("MuiButtonBase", ["root", "disabled", "focusVisible"]),
|
|
545
|
+
const at = fe("MuiButtonBase", ["root", "disabled", "focusVisible"]), lt = (o) => {
|
|
553
546
|
const {
|
|
554
547
|
disabled: t,
|
|
555
|
-
focusVisible:
|
|
556
|
-
focusVisibleClassName:
|
|
548
|
+
focusVisible: n,
|
|
549
|
+
focusVisibleClassName: l,
|
|
557
550
|
classes: i
|
|
558
|
-
} =
|
|
559
|
-
root: ["root", t && "disabled",
|
|
551
|
+
} = o, r = Fe({
|
|
552
|
+
root: ["root", t && "disabled", n && "focusVisible"]
|
|
560
553
|
}, rt, i);
|
|
561
|
-
return
|
|
562
|
-
},
|
|
554
|
+
return n && l && (r.root += ` ${l}`), r;
|
|
555
|
+
}, ut = te("button", {
|
|
563
556
|
name: "MuiButtonBase",
|
|
564
557
|
slot: "Root",
|
|
565
|
-
overridesResolver: (
|
|
558
|
+
overridesResolver: (o, t) => t.root
|
|
566
559
|
})({
|
|
567
560
|
display: "inline-flex",
|
|
568
561
|
alignItems: "center",
|
|
@@ -602,8 +595,8 @@ const at = fe("MuiButtonBase", ["root", "disabled", "focusVisible"]), ut = (n) =
|
|
|
602
595
|
"@media print": {
|
|
603
596
|
colorAdjust: "exact"
|
|
604
597
|
}
|
|
605
|
-
}), ct = /* @__PURE__ */ d.forwardRef(function(t,
|
|
606
|
-
const
|
|
598
|
+
}), ct = /* @__PURE__ */ d.forwardRef(function(t, n) {
|
|
599
|
+
const l = de({
|
|
607
600
|
props: t,
|
|
608
601
|
name: "MuiButtonBase"
|
|
609
602
|
}), {
|
|
@@ -611,101 +604,101 @@ const at = fe("MuiButtonBase", ["root", "disabled", "focusVisible"]), ut = (n) =
|
|
|
611
604
|
centerRipple: s = !1,
|
|
612
605
|
children: r,
|
|
613
606
|
className: p,
|
|
614
|
-
component:
|
|
607
|
+
component: u = "button",
|
|
615
608
|
disabled: f = !1,
|
|
616
609
|
disableRipple: h = !1,
|
|
617
|
-
disableTouchRipple:
|
|
610
|
+
disableTouchRipple: R = !1,
|
|
618
611
|
focusRipple: g = !1,
|
|
619
|
-
focusVisibleClassName:
|
|
612
|
+
focusVisibleClassName: D,
|
|
620
613
|
LinkComponent: m = "a",
|
|
621
|
-
onBlur:
|
|
614
|
+
onBlur: w,
|
|
622
615
|
onClick: C,
|
|
623
616
|
onContextMenu: j,
|
|
624
|
-
onDragLeave:
|
|
617
|
+
onDragLeave: A,
|
|
625
618
|
onFocus: F,
|
|
626
619
|
onFocusVisible: c,
|
|
627
|
-
onKeyDown:
|
|
620
|
+
onKeyDown: y,
|
|
628
621
|
onKeyUp: M,
|
|
629
|
-
onMouseDown:
|
|
622
|
+
onMouseDown: $,
|
|
630
623
|
onMouseLeave: B,
|
|
631
|
-
onMouseUp:
|
|
624
|
+
onMouseUp: U,
|
|
632
625
|
onTouchEnd: T,
|
|
633
|
-
onTouchMove:
|
|
634
|
-
onTouchStart:
|
|
626
|
+
onTouchMove: V,
|
|
627
|
+
onTouchStart: S,
|
|
635
628
|
tabIndex: x = 0,
|
|
636
629
|
TouchRippleProps: v,
|
|
637
630
|
touchRippleRef: z,
|
|
638
631
|
type: L,
|
|
639
632
|
..._
|
|
640
|
-
} =
|
|
633
|
+
} = l, X = d.useRef(null), P = Ke(), be = ce(P.ref, z), [k, K] = d.useState(!1);
|
|
641
634
|
f && k && K(!1), d.useImperativeHandle(i, () => ({
|
|
642
635
|
focusVisible: () => {
|
|
643
|
-
K(!0),
|
|
636
|
+
K(!0), X.current.focus();
|
|
644
637
|
}
|
|
645
638
|
}), []);
|
|
646
639
|
const ge = P.shouldMount && !h && !f;
|
|
647
640
|
d.useEffect(() => {
|
|
648
641
|
k && g && !h && P.pulsate();
|
|
649
642
|
}, [h, g, k, P]);
|
|
650
|
-
function N(a, re, Be =
|
|
643
|
+
function N(a, re, Be = R) {
|
|
651
644
|
return H((ae) => (re && re(ae), Be || P[a](ae), !0));
|
|
652
645
|
}
|
|
653
|
-
const Me = N("start",
|
|
646
|
+
const Me = N("start", $), Re = N("stop", j), ye = N("stop", A), Te = N("stop", U), Ee = N("stop", (a) => {
|
|
654
647
|
k && a.preventDefault(), B && B(a);
|
|
655
|
-
}), Ce = N("start",
|
|
656
|
-
pe(a.target) || K(!1),
|
|
657
|
-
}, !1),
|
|
658
|
-
|
|
648
|
+
}), Ce = N("start", S), xe = N("stop", T), Pe = N("stop", V), Ne = N("stop", (a) => {
|
|
649
|
+
pe(a.target) || K(!1), w && w(a);
|
|
650
|
+
}, !1), De = H((a) => {
|
|
651
|
+
X.current || (X.current = a.currentTarget), pe(a.target) && (K(!0), c && c(a)), F && F(a);
|
|
659
652
|
}), Z = () => {
|
|
660
|
-
const a =
|
|
661
|
-
return
|
|
662
|
-
},
|
|
653
|
+
const a = X.current;
|
|
654
|
+
return u && u !== "button" && !(a.tagName === "A" && a.href);
|
|
655
|
+
}, Ve = H((a) => {
|
|
663
656
|
g && !a.repeat && k && a.key === " " && P.stop(a, () => {
|
|
664
657
|
P.start(a);
|
|
665
|
-
}), a.target === a.currentTarget && Z() && a.key === " " && a.preventDefault(),
|
|
666
|
-
}),
|
|
658
|
+
}), a.target === a.currentTarget && Z() && a.key === " " && a.preventDefault(), y && y(a), a.target === a.currentTarget && Z() && a.key === "Enter" && !f && (a.preventDefault(), C && C(a));
|
|
659
|
+
}), Se = H((a) => {
|
|
667
660
|
g && a.key === " " && k && !a.defaultPrevented && P.stop(a, () => {
|
|
668
661
|
P.pulsate(a);
|
|
669
662
|
}), M && M(a), C && a.target === a.currentTarget && Z() && a.key === " " && !a.defaultPrevented && C(a);
|
|
670
663
|
});
|
|
671
|
-
let q =
|
|
664
|
+
let q = u;
|
|
672
665
|
q === "button" && (_.href || _.to) && (q = m);
|
|
673
|
-
const
|
|
674
|
-
q === "button" ? (
|
|
675
|
-
const ve = ce(
|
|
676
|
-
...
|
|
666
|
+
const Y = {};
|
|
667
|
+
q === "button" ? (Y.type = L === void 0 ? "button" : L, Y.disabled = f) : (!_.href && !_.to && (Y.role = "button"), f && (Y["aria-disabled"] = f));
|
|
668
|
+
const ve = ce(n, X), se = {
|
|
669
|
+
...l,
|
|
677
670
|
centerRipple: s,
|
|
678
|
-
component:
|
|
671
|
+
component: u,
|
|
679
672
|
disabled: f,
|
|
680
673
|
disableRipple: h,
|
|
681
|
-
disableTouchRipple:
|
|
674
|
+
disableTouchRipple: R,
|
|
682
675
|
focusRipple: g,
|
|
683
676
|
tabIndex: x,
|
|
684
677
|
focusVisible: k
|
|
685
|
-
},
|
|
686
|
-
return /* @__PURE__ */
|
|
678
|
+
}, we = lt(se);
|
|
679
|
+
return /* @__PURE__ */ $e(ut, {
|
|
687
680
|
as: q,
|
|
688
|
-
className: E(
|
|
681
|
+
className: E(we.root, p),
|
|
689
682
|
ownerState: se,
|
|
690
683
|
onBlur: Ne,
|
|
691
684
|
onClick: C,
|
|
692
|
-
onContextMenu:
|
|
693
|
-
onFocus:
|
|
694
|
-
onKeyDown:
|
|
695
|
-
onKeyUp:
|
|
685
|
+
onContextMenu: Re,
|
|
686
|
+
onFocus: De,
|
|
687
|
+
onKeyDown: Ve,
|
|
688
|
+
onKeyUp: Se,
|
|
696
689
|
onMouseDown: Me,
|
|
697
690
|
onMouseLeave: Ee,
|
|
698
691
|
onMouseUp: Te,
|
|
699
|
-
onDragLeave:
|
|
692
|
+
onDragLeave: ye,
|
|
700
693
|
onTouchEnd: xe,
|
|
701
694
|
onTouchMove: Pe,
|
|
702
695
|
onTouchStart: Ce,
|
|
703
696
|
ref: ve,
|
|
704
697
|
tabIndex: f ? -1 : x,
|
|
705
698
|
type: L,
|
|
706
|
-
...
|
|
699
|
+
...Y,
|
|
707
700
|
..._,
|
|
708
|
-
children: [r, ge ? /* @__PURE__ */
|
|
701
|
+
children: [r, ge ? /* @__PURE__ */ I(me, {
|
|
709
702
|
ref: be,
|
|
710
703
|
center: s,
|
|
711
704
|
...v
|
|
@@ -721,7 +714,7 @@ process.env.NODE_ENV !== "production" && (ct.propTypes = {
|
|
|
721
714
|
* A ref for imperative actions.
|
|
722
715
|
* It currently only supports `focusVisible()` action.
|
|
723
716
|
*/
|
|
724
|
-
action:
|
|
717
|
+
action: Xe,
|
|
725
718
|
/**
|
|
726
719
|
* If `true`, the ripples are centered.
|
|
727
720
|
* They won't start at the cursor interaction position.
|
|
@@ -744,7 +737,7 @@ process.env.NODE_ENV !== "production" && (ct.propTypes = {
|
|
|
744
737
|
* The component used for the root node.
|
|
745
738
|
* Either a string to use a HTML element or a component.
|
|
746
739
|
*/
|
|
747
|
-
component:
|
|
740
|
+
component: Ae,
|
|
748
741
|
/**
|
|
749
742
|
* If `true`, the component is disabled.
|
|
750
743
|
* @default false
|