@hybridcore/ui 1.6.1 → 1.6.2
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/CATALOG.md +179 -0
- package/README.md +1 -2
- package/dist/AccordionSummary-CJppWeqF.js +781 -0
- package/dist/Add-CqcD1PWb.js +403 -0
- package/dist/Box-DqUMmZjL.js +31 -0
- package/dist/Button-C5yquWAB.js +357 -0
- package/dist/ButtonBase-BEF7oTOe.js +887 -0
- package/dist/{Delete-fBLhTHbF.js → Delete-BdyYpINH.js} +9 -8
- package/dist/{DialogContent-CGJ7alb8.js → DialogContent-BvVjD9z3.js} +127 -122
- package/dist/FormGroup-CpBsIyYR.js +89 -0
- package/dist/{IconButton-_opV1iNK.js → IconButton-BoGwbvrP.js} +26 -26
- package/dist/{InputLabel-rEwwnD4_.js → InputLabel-Dd8RrneV.js} +140 -153
- package/dist/{MenuItem-DrE50M_p.js → MenuItem-DwqJqzuM.js} +65 -89
- package/dist/Modal-MUZygjmQ.js +1158 -0
- package/dist/Paper-BkQLdsCI.js +582 -0
- package/dist/Select-DHUl_uG3.js +3916 -0
- package/dist/SwitchBase-DTndTqI8.js +235 -0
- package/dist/TextField-e2oKaUN1.js +669 -0
- package/dist/TransitionGroupContext-BDAp2T0O.js +96 -0
- package/dist/{Typography-B-Z5Y0Xq.js → Typography-DgsSLCFC.js} +28 -26
- package/dist/assertThisInitialized-C1dAyb4j.js +7 -0
- package/dist/assets/index4.css +1 -0
- package/dist/clsx-OuTLNxxd.js +16 -0
- package/dist/components/access/helpers.js +1 -1
- package/dist/components/access/logic.js +1 -1
- package/dist/components/button/index.js +10 -0
- package/dist/components/button/logic.js +26 -0
- package/dist/components/button/styled.js +9 -0
- package/dist/components/charts/_common/chart-error.js +19 -0
- package/dist/components/charts/candlestick/index.js +3 -3
- package/dist/components/charts/candlestick/logic.js +123 -113
- package/dist/components/charts/chart-wrapper/index.js +5 -5
- package/dist/components/charts/column-line-mix/index.js +9 -8
- package/dist/components/charts/column-line-mix/logic.js +68 -71
- package/dist/components/charts/drill-down-treemap/index.js +8 -7
- package/dist/components/charts/drill-down-treemap/logic.js +138 -144
- package/dist/components/charts/drill-down-voronoi-treemap/index.js +9 -8
- package/dist/components/charts/drill-down-voronoi-treemap/logic.js +222 -228
- package/dist/components/charts/heatmap/index.js +9 -8
- package/dist/components/charts/heatmap/logic.js +167 -173
- package/dist/components/charts/highlighting-line-data/index.js +3 -3
- package/dist/components/charts/line/index.js +9 -8
- package/dist/components/charts/line/logic.js +74 -79
- package/dist/components/charts/logaritmic-scale/index.js +9 -8
- package/dist/components/charts/logaritmic-scale/logic.js +63 -69
- package/dist/components/charts/multiple-value-axes/index.js +9 -8
- package/dist/components/charts/multiple-value-axes/logic.js +101 -107
- package/dist/components/charts/nested-pie/index.js +9 -8
- package/dist/components/charts/nested-pie/logic.js +62 -68
- package/dist/components/charts/packed-circles/index.js +7 -6
- package/dist/components/charts/packed-circles/logic.js +50 -56
- package/dist/components/charts/pie-chart/index.js +9 -8
- package/dist/components/charts/pie-chart/logic.js +49 -54
- package/dist/components/charts/stacked-area-radar/index.js +8 -7
- package/dist/components/charts/stacked-area-radar/logic.js +113 -118
- package/dist/components/charts/stacked-column-chart/index.js +9 -8
- package/dist/components/charts/stacked-column-chart/logic.js +78 -84
- package/dist/components/charts/xy-chart/index.js +9 -8
- package/dist/components/charts/xy-chart/logic.js +56 -60
- package/dist/components/collapsible-card/index.js +11 -10
- package/dist/components/collapsible-card/styled.js +1 -1
- package/dist/components/color-picker/index.js +7120 -0
- package/dist/components/color-picker/logic.js +18 -0
- package/dist/components/color-picker/styled.js +7 -0
- package/dist/components/confirm/dialog.js +3 -3
- package/dist/components/confirm/index.js +1 -1
- package/dist/components/data-grid/index.js +22 -0
- package/dist/components/data-grid/logic.js +15 -0
- package/dist/components/data-grid/styled.js +20 -0
- package/dist/components/data-map/components/controls/index.js +4 -6
- package/dist/components/data-map/index.js +11 -11
- package/dist/components/data-security-selectors/dissemination-list/index.js +192 -191
- package/dist/components/data-security-selectors/dissemination-list/styled.js +12 -12
- package/dist/components/data-security-selectors/security-level/index.js +18 -15
- package/dist/components/data-security-selectors/security-level/logic.js +18 -63
- package/dist/components/data-security-selectors/security-level/styled.js +23 -17
- package/dist/components/date-picker-with-custom-range/index.js +1 -1
- package/dist/components/date-range-picker/index.js +2748 -0
- package/dist/components/date-range-picker/styled.js +14 -0
- package/dist/components/date-time-picker/index.js +45 -46
- package/dist/components/divider/index.js +11 -11
- package/dist/components/document-viewer/components/action-buttons/index.js +15 -15
- package/dist/components/document-viewer/components/navigation/index.js +9 -9
- package/dist/components/document-viewer/components/viewer/index.js +31 -35
- package/dist/components/document-viewer/index.js +31 -39
- package/dist/components/document-viewer/logic.js +41 -34
- package/dist/components/document-viewer/styled.js +115 -27
- package/dist/components/duration-select/index.js +27 -0
- package/dist/components/duration-select/logic.js +21 -0
- package/dist/components/duration-select/styled.js +26 -0
- package/dist/components/editable-text/index.js +20 -0
- package/dist/components/editable-text/logic.js +18 -0
- package/dist/components/editable-text/styled.js +22 -0
- package/dist/components/geometry-picker/coordinate/index.js +29 -29
- package/dist/components/geometry-picker/edit/index.js +18 -18
- package/dist/components/geometry-picker/geometry/index.js +67 -67
- package/dist/components/geometry-picker/geometry/map-overlay.js +6 -6
- package/dist/components/geometry-picker/index.js +69 -86
- package/dist/components/geometry-picker/kml/index.js +16 -16
- package/dist/components/geometry-picker/logic.js +50 -57
- package/dist/components/geometry-picker/map/index.js +8 -8
- package/dist/components/geometry-picker/parser/coordinate-input/index.js +4 -4
- package/dist/components/geometry-picker/parser/index.js +46 -50
- package/dist/components/geometry-picker/parser/styled.js +22 -4
- package/dist/components/geometry-picker/styled.js +97 -37
- package/dist/components/geometry-picker/wkt/index.js +13 -13
- package/dist/components/heat-map/components/controls/index.js +4 -6
- package/dist/components/heat-map/components/legend/index.js +15 -17
- package/dist/components/heat-map/index.js +7 -7
- package/dist/components/instance-form/components/TopLabelWrapper.js +8 -48
- package/dist/components/instance-form/components/composite-list/index.js +5 -3
- package/dist/components/instance-form/components/composite-matrix/components/editable-table/index.js +83 -74
- package/dist/components/instance-form/components/composite-matrix/components/editor/index.js +45 -66
- package/dist/components/instance-form/components/composite-matrix/components/form/index.js +60 -75
- package/dist/components/instance-form/components/composite-matrix/components/json-editor/index.js +2425 -2422
- package/dist/components/instance-form/components/composite-matrix/components/table/index.js +33 -52
- package/dist/components/instance-form/components/composite-matrix/index.js +30 -36
- package/dist/components/instance-form/components/policy-list/index.js +47 -81
- package/dist/components/instance-form/components/variable/index.js +6 -9
- package/dist/components/instance-form/components/variables/index.js +48 -55
- package/dist/components/instance-form/helpers.js +9 -0
- package/dist/components/instance-form/index.js +402 -518
- package/dist/components/instance-form/logic.js +115 -0
- package/dist/components/instance-form/styled.js +487 -0
- package/dist/components/instance-hierarchy-table/styled.js +1 -1
- package/dist/components/instance-variable-list/index.js +11 -11
- package/dist/components/map/index.js +28 -6
- package/dist/components/map/styled.js +1 -1
- package/dist/components/notification/index.js +67 -0
- package/dist/components/notification/logic.js +30 -0
- package/dist/components/notification/store.js +23 -0
- package/dist/components/notification/styled.js +52 -0
- package/dist/components/object-profile-card/components/avatar/index.js +9 -10
- package/dist/components/object-profile-card/index.js +19 -20
- package/dist/components/paginated-list/index.js +2 -3
- package/dist/components/placeholder/index.js +10 -0
- package/dist/components/placeholder/logic.js +12 -0
- package/dist/components/placeholder/styled.js +32 -0
- package/dist/components/positional-tooltip/index.js +24 -0
- package/dist/components/positional-tooltip/styled.js +17 -0
- package/dist/components/property-mapping/index.js +204 -423
- package/dist/components/property-mapping/logic.js +156 -0
- package/dist/components/property-mapping/styled.js +199 -0
- package/dist/components/prr-map/components/controls/index.js +4 -6
- package/dist/components/prr-map/components/legend/index.js +26 -28
- package/dist/components/prr-map/index.js +5 -5
- package/dist/components/range-selector/styled.js +1106 -1034
- package/dist/components/raster-grid-map/components/controls/index.js +4 -6
- package/dist/components/raster-grid-map/components/legend/index.js +4 -6
- package/dist/components/raster-grid-map/index.js +5 -5
- package/dist/components/scroll-drag/index.js +22 -0
- package/dist/components/scroll-drag/logic.js +39 -0
- package/dist/components/scroll-drag/styled.js +17 -0
- package/dist/components/search-input/logic.js +35 -33
- package/dist/components/simple-pivot-table/index.js +12 -12
- package/dist/components/sortable-list/index.js +599 -0
- package/dist/components/sortable-list/logic.js +18 -0
- package/dist/components/sortable-list/styled.js +38 -0
- package/dist/components/static-text/index.js +6 -6
- package/dist/components/stats-box/index.js +12 -0
- package/dist/components/stats-box/styled.js +36 -0
- package/dist/components/template-form/components/property-list/index.js +27 -26
- package/dist/components/template-form/components/property-list/property-list-columns.js +3 -3
- package/dist/components/template-form/components/property-list/property-list-form.js +758 -12
- package/dist/components/template-form/components/recognition-property-list/index.js +11 -11
- package/dist/components/template-form/components/recognition-property-list/recognition-property-list-columns.js +2 -2
- package/dist/components/template-form/components/recognition-property-list/recognition-property-list-form.js +24 -22
- package/dist/components/template-form/components/select-icon/index.js +24 -24
- package/dist/components/template-form/helpers.js +17 -0
- package/dist/components/template-form/index.js +270 -308
- package/dist/components/template-form/logic.js +69 -0
- package/dist/components/template-form/styled.js +84 -0
- package/dist/components/text-overflow/index.js +6 -0
- package/dist/components/text-overflow/styled.js +13 -0
- package/dist/components/timeline/index.js +12 -12
- package/dist/components/toggle-view-button/index.js +35 -0
- package/dist/components/toggle-view-button/logic.js +22 -0
- package/dist/components/toggle-view-button/styled.js +11 -0
- package/dist/components/tree-select/index.js +1 -1
- package/dist/components/visually-hidden-input/index.js +4 -0
- package/dist/components/visually-hidden-input/styled.js +18 -0
- package/dist/createChainedFunction-C0nujS3O.js +9 -0
- package/dist/{createSvgIcon-DX-SqL8M.js → createSvgIcon-Ch_cT8az.js} +68 -65
- package/dist/createSvgIcon-DuDuASu1.js +62 -0
- package/dist/debounce-46wSf_lW.js +15 -0
- package/dist/{dialog-cf4HUXXl.js → dialog-BYRnCztH.js} +30 -29
- package/dist/formControlState-vgaj2ksH.js +10 -0
- package/dist/generateUtilityClasses-C3ivN9Ie.js +2973 -0
- package/dist/{helpers-B4UL9NMD.js → helpers-D4uXfBfO.js} +2 -2
- package/dist/index-BtlzPygz.js +470 -0
- package/dist/index-DH6qsPBn.js +153 -0
- package/dist/{index-C8C3YXle.js → index-e9xTIYWt.js} +139 -137
- package/dist/main.d.ts +1054 -330
- package/dist/main.js +163 -130
- package/dist/ownerWindow-wg6foiOE.js +10 -0
- package/dist/setPrototypeOf-NPgp4cYc.js +8 -0
- package/dist/styled-Db1RdcPA.js +323 -0
- package/dist/unsupportedProp-DuqR2hj9.js +36 -0
- package/dist/useFormControl-CatNKXAi.js +10 -0
- package/dist/useId-BW-oWmul.js +19 -0
- package/dist/{useMobilePicker-B-M3dnTn.js → useMobilePicker-CY8ndYRL.js} +4777 -4491
- package/dist/useSlot-B_Q4vnX5.js +42 -0
- package/package.json +15 -7
- package/dist/AccordionSummary-CMg08YSA.js +0 -739
- package/dist/Add-DuVVJeQU.js +0 -380
- package/dist/ButtonBase-sObABYY2.js +0 -965
- package/dist/FormControl-BCurCxRj.js +0 -1294
- package/dist/FormControlLabel-BkRfrhNy.js +0 -601
- package/dist/InputAdornment-C7PEvvYr.js +0 -155
- package/dist/Modal-DlB6GH-f.js +0 -1659
- package/dist/Paper-q9kKjAKx.js +0 -527
- package/dist/TextField-DSDIEEKu.js +0 -3161
- package/dist/assertThisInitialized-BUtkG-md.js +0 -13
- package/dist/capitalize-quqpGCFu.js +0 -9
- package/dist/components/instance-form/components/composite-list/styled.js +0 -73
- package/dist/components/instance-form/components/composite-matrix/components/editor/styled.js +0 -1
- package/dist/components/instance-form/components/composite-matrix/styled.js +0 -69
- package/dist/components/key-protection/index.js +0 -47
- package/dist/components/key-protection/logic.js +0 -40
- package/dist/components/key-protection/styled.js +0 -45
- package/dist/components/key-protection/utils.js +0 -10
- package/dist/createSvgIcon-BM3-TsGy.js +0 -70
- package/dist/index-BMS1Otro.js +0 -183
- package/dist/index-DPKUmQnz.js +0 -501
- package/dist/index-kCJ_Zvl8.js +0 -34
- package/dist/isMuiElement-BkJ72LB3.js +0 -26
- package/dist/property-list-form-DL_dEoNn.js +0 -381
- package/dist/styled-Bsjp3kFh.js +0 -668
- package/dist/unsupportedProp-BND8AB6O.js +0 -25
- package/dist/useId-B4-oF9Mq.js +0 -34
- package/dist/utils-Cxu-fHjQ.js +0 -115
|
@@ -0,0 +1,887 @@
|
|
|
1
|
+
import { a as X, _ as ae } from "./objectWithoutPropertiesLoose-DJteAcBH.js";
|
|
2
|
+
import * as c from "react";
|
|
3
|
+
import W, { Children as Ye, isValidElement as G, cloneElement as J } from "react";
|
|
4
|
+
import { P as t } from "./index-C__OZmYy.js";
|
|
5
|
+
import { c as v } from "./clsx-OuTLNxxd.js";
|
|
6
|
+
import { g as Ee, s as ue, u as Ce, a as qe, c as We } from "./generateUtilityClasses-C3ivN9Ie.js";
|
|
7
|
+
import { keyframes as le } from "@mui/system";
|
|
8
|
+
import { jsx as U, jsxs as He } from "react/jsx-runtime";
|
|
9
|
+
import { T as Ge, _ as Je, d as be, e as Qe, u as ge, b as H, r as Ze, f as et } from "./TransitionGroupContext-BDAp2T0O.js";
|
|
10
|
+
import { _ as tt } from "./assertThisInitialized-C1dAyb4j.js";
|
|
11
|
+
let Q = !0, ie = !1;
|
|
12
|
+
const nt = new Ge(), ot = {
|
|
13
|
+
text: !0,
|
|
14
|
+
search: !0,
|
|
15
|
+
url: !0,
|
|
16
|
+
tel: !0,
|
|
17
|
+
email: !0,
|
|
18
|
+
password: !0,
|
|
19
|
+
number: !0,
|
|
20
|
+
date: !0,
|
|
21
|
+
month: !0,
|
|
22
|
+
week: !0,
|
|
23
|
+
time: !0,
|
|
24
|
+
datetime: !0,
|
|
25
|
+
"datetime-local": !0
|
|
26
|
+
};
|
|
27
|
+
function rt(e) {
|
|
28
|
+
const {
|
|
29
|
+
type: n,
|
|
30
|
+
tagName: i
|
|
31
|
+
} = e;
|
|
32
|
+
return !!(i === "INPUT" && ot[n] && !e.readOnly || i === "TEXTAREA" && !e.readOnly || e.isContentEditable);
|
|
33
|
+
}
|
|
34
|
+
function it(e) {
|
|
35
|
+
e.metaKey || e.altKey || e.ctrlKey || (Q = !0);
|
|
36
|
+
}
|
|
37
|
+
function re() {
|
|
38
|
+
Q = !1;
|
|
39
|
+
}
|
|
40
|
+
function st() {
|
|
41
|
+
this.visibilityState === "hidden" && ie && (Q = !0);
|
|
42
|
+
}
|
|
43
|
+
function at(e) {
|
|
44
|
+
e.addEventListener("keydown", it, !0), e.addEventListener("mousedown", re, !0), e.addEventListener("pointerdown", re, !0), e.addEventListener("touchstart", re, !0), e.addEventListener("visibilitychange", st, !0);
|
|
45
|
+
}
|
|
46
|
+
function ut(e) {
|
|
47
|
+
const {
|
|
48
|
+
target: n
|
|
49
|
+
} = e;
|
|
50
|
+
try {
|
|
51
|
+
return n.matches(":focus-visible");
|
|
52
|
+
} catch {
|
|
53
|
+
}
|
|
54
|
+
return Q || rt(n);
|
|
55
|
+
}
|
|
56
|
+
function lt() {
|
|
57
|
+
const e = c.useCallback((o) => {
|
|
58
|
+
o != null && at(o.ownerDocument);
|
|
59
|
+
}, []), n = c.useRef(!1);
|
|
60
|
+
function i() {
|
|
61
|
+
return n.current ? (ie = !0, nt.start(100, () => {
|
|
62
|
+
ie = !1;
|
|
63
|
+
}), n.current = !1, !0) : !1;
|
|
64
|
+
}
|
|
65
|
+
function u(o) {
|
|
66
|
+
return ut(o) ? (n.current = !0, !0) : !1;
|
|
67
|
+
}
|
|
68
|
+
return {
|
|
69
|
+
isFocusVisibleRef: n,
|
|
70
|
+
onFocus: u,
|
|
71
|
+
onBlur: i,
|
|
72
|
+
ref: e
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
function ce(e, n) {
|
|
76
|
+
var i = function(r) {
|
|
77
|
+
return n && G(r) ? n(r) : r;
|
|
78
|
+
}, u = /* @__PURE__ */ Object.create(null);
|
|
79
|
+
return e && Ye.map(e, function(o) {
|
|
80
|
+
return o;
|
|
81
|
+
}).forEach(function(o) {
|
|
82
|
+
u[o.key] = i(o);
|
|
83
|
+
}), u;
|
|
84
|
+
}
|
|
85
|
+
function ct(e, n) {
|
|
86
|
+
e = e || {}, n = n || {};
|
|
87
|
+
function i(h) {
|
|
88
|
+
return h in n ? n[h] : e[h];
|
|
89
|
+
}
|
|
90
|
+
var u = /* @__PURE__ */ Object.create(null), o = [];
|
|
91
|
+
for (var r in e)
|
|
92
|
+
r in n ? o.length && (u[r] = o, o = []) : o.push(r);
|
|
93
|
+
var s, p = {};
|
|
94
|
+
for (var l in n) {
|
|
95
|
+
if (u[l])
|
|
96
|
+
for (s = 0; s < u[l].length; s++) {
|
|
97
|
+
var f = u[l][s];
|
|
98
|
+
p[u[l][s]] = i(f);
|
|
99
|
+
}
|
|
100
|
+
p[l] = i(l);
|
|
101
|
+
}
|
|
102
|
+
for (s = 0; s < o.length; s++)
|
|
103
|
+
p[o[s]] = i(o[s]);
|
|
104
|
+
return p;
|
|
105
|
+
}
|
|
106
|
+
function S(e, n, i) {
|
|
107
|
+
return i[n] != null ? i[n] : e.props[n];
|
|
108
|
+
}
|
|
109
|
+
function pt(e, n) {
|
|
110
|
+
return ce(e.children, function(i) {
|
|
111
|
+
return J(i, {
|
|
112
|
+
onExited: n.bind(null, i),
|
|
113
|
+
in: !0,
|
|
114
|
+
appear: S(i, "appear", e),
|
|
115
|
+
enter: S(i, "enter", e),
|
|
116
|
+
exit: S(i, "exit", e)
|
|
117
|
+
});
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
function ft(e, n, i) {
|
|
121
|
+
var u = ce(e.children), o = ct(n, u);
|
|
122
|
+
return Object.keys(o).forEach(function(r) {
|
|
123
|
+
var s = o[r];
|
|
124
|
+
if (G(s)) {
|
|
125
|
+
var p = r in n, l = r in u, f = n[r], h = G(f) && !f.props.in;
|
|
126
|
+
l && (!p || h) ? o[r] = J(s, {
|
|
127
|
+
onExited: i.bind(null, s),
|
|
128
|
+
in: !0,
|
|
129
|
+
exit: S(s, "exit", e),
|
|
130
|
+
enter: S(s, "enter", e)
|
|
131
|
+
}) : !l && p && !h ? o[r] = J(s, {
|
|
132
|
+
in: !1
|
|
133
|
+
}) : l && p && G(f) && (o[r] = J(s, {
|
|
134
|
+
onExited: i.bind(null, s),
|
|
135
|
+
in: f.props.in,
|
|
136
|
+
exit: S(s, "exit", e),
|
|
137
|
+
enter: S(s, "enter", e)
|
|
138
|
+
}));
|
|
139
|
+
}
|
|
140
|
+
}), o;
|
|
141
|
+
}
|
|
142
|
+
var dt = Object.values || function(e) {
|
|
143
|
+
return Object.keys(e).map(function(n) {
|
|
144
|
+
return e[n];
|
|
145
|
+
});
|
|
146
|
+
}, ht = {
|
|
147
|
+
component: "div",
|
|
148
|
+
childFactory: function(n) {
|
|
149
|
+
return n;
|
|
150
|
+
}
|
|
151
|
+
}, pe = /* @__PURE__ */ function(e) {
|
|
152
|
+
Je(n, e);
|
|
153
|
+
function n(u, o) {
|
|
154
|
+
var r;
|
|
155
|
+
r = e.call(this, u, o) || this;
|
|
156
|
+
var s = r.handleExited.bind(tt(r));
|
|
157
|
+
return r.state = {
|
|
158
|
+
contextValue: {
|
|
159
|
+
isMounting: !0
|
|
160
|
+
},
|
|
161
|
+
handleExited: s,
|
|
162
|
+
firstRender: !0
|
|
163
|
+
}, r;
|
|
164
|
+
}
|
|
165
|
+
var i = n.prototype;
|
|
166
|
+
return i.componentDidMount = function() {
|
|
167
|
+
this.mounted = !0, this.setState({
|
|
168
|
+
contextValue: {
|
|
169
|
+
isMounting: !1
|
|
170
|
+
}
|
|
171
|
+
});
|
|
172
|
+
}, i.componentWillUnmount = function() {
|
|
173
|
+
this.mounted = !1;
|
|
174
|
+
}, n.getDerivedStateFromProps = function(o, r) {
|
|
175
|
+
var s = r.children, p = r.handleExited, l = r.firstRender;
|
|
176
|
+
return {
|
|
177
|
+
children: l ? pt(o, p) : ft(o, s, p),
|
|
178
|
+
firstRender: !1
|
|
179
|
+
};
|
|
180
|
+
}, i.handleExited = function(o, r) {
|
|
181
|
+
var s = ce(this.props.children);
|
|
182
|
+
o.key in s || (o.props.onExited && o.props.onExited(r), this.mounted && this.setState(function(p) {
|
|
183
|
+
var l = X({}, p.children);
|
|
184
|
+
return delete l[o.key], {
|
|
185
|
+
children: l
|
|
186
|
+
};
|
|
187
|
+
}));
|
|
188
|
+
}, i.render = function() {
|
|
189
|
+
var o = this.props, r = o.component, s = o.childFactory, p = ae(o, ["component", "childFactory"]), l = this.state.contextValue, f = dt(this.state.children).map(s);
|
|
190
|
+
return delete p.appear, delete p.enter, delete p.exit, r === null ? /* @__PURE__ */ W.createElement(be.Provider, {
|
|
191
|
+
value: l
|
|
192
|
+
}, f) : /* @__PURE__ */ W.createElement(be.Provider, {
|
|
193
|
+
value: l
|
|
194
|
+
}, /* @__PURE__ */ W.createElement(r, p, f));
|
|
195
|
+
}, n;
|
|
196
|
+
}(W.Component);
|
|
197
|
+
pe.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
198
|
+
/**
|
|
199
|
+
* `<TransitionGroup>` renders a `<div>` by default. You can change this
|
|
200
|
+
* behavior by providing a `component` prop.
|
|
201
|
+
* If you use React v16+ and would like to avoid a wrapping `<div>` element
|
|
202
|
+
* you can pass in `component={null}`. This is useful if the wrapping div
|
|
203
|
+
* borks your css styles.
|
|
204
|
+
*/
|
|
205
|
+
component: t.any,
|
|
206
|
+
/**
|
|
207
|
+
* A set of `<Transition>` components, that are toggled `in` and out as they
|
|
208
|
+
* leave. the `<TransitionGroup>` will inject specific transition props, so
|
|
209
|
+
* remember to spread them through if you are wrapping the `<Transition>` as
|
|
210
|
+
* with our `<Fade>` example.
|
|
211
|
+
*
|
|
212
|
+
* While this component is meant for multiple `Transition` or `CSSTransition`
|
|
213
|
+
* children, sometimes you may want to have a single transition child with
|
|
214
|
+
* content that you want to be transitioned out and in when you change it
|
|
215
|
+
* (e.g. routes, images etc.) In that case you can change the `key` prop of
|
|
216
|
+
* the transition child as you change its content, this will cause
|
|
217
|
+
* `TransitionGroup` to transition the child out and back in.
|
|
218
|
+
*/
|
|
219
|
+
children: t.node,
|
|
220
|
+
/**
|
|
221
|
+
* A convenience prop that enables or disables appear animations
|
|
222
|
+
* for all children. Note that specifying this will override any defaults set
|
|
223
|
+
* on individual children Transitions.
|
|
224
|
+
*/
|
|
225
|
+
appear: t.bool,
|
|
226
|
+
/**
|
|
227
|
+
* A convenience prop that enables or disables enter animations
|
|
228
|
+
* for all children. Note that specifying this will override any defaults set
|
|
229
|
+
* on individual children Transitions.
|
|
230
|
+
*/
|
|
231
|
+
enter: t.bool,
|
|
232
|
+
/**
|
|
233
|
+
* A convenience prop that enables or disables exit animations
|
|
234
|
+
* for all children. Note that specifying this will override any defaults set
|
|
235
|
+
* on individual children Transitions.
|
|
236
|
+
*/
|
|
237
|
+
exit: t.bool,
|
|
238
|
+
/**
|
|
239
|
+
* You may need to apply reactive updates to a child as it is exiting.
|
|
240
|
+
* This is generally done by using `cloneElement` however in the case of an exiting
|
|
241
|
+
* child the element has already been removed and not accessible to the consumer.
|
|
242
|
+
*
|
|
243
|
+
* If you do need to update a child as it leaves you can provide a `childFactory`
|
|
244
|
+
* to wrap every child, even the ones that are leaving.
|
|
245
|
+
*
|
|
246
|
+
* @type Function(child: ReactElement) -> ReactElement
|
|
247
|
+
*/
|
|
248
|
+
childFactory: t.func
|
|
249
|
+
} : {};
|
|
250
|
+
pe.defaultProps = ht;
|
|
251
|
+
function ve(e) {
|
|
252
|
+
const {
|
|
253
|
+
className: n,
|
|
254
|
+
classes: i,
|
|
255
|
+
pulsate: u = !1,
|
|
256
|
+
rippleX: o,
|
|
257
|
+
rippleY: r,
|
|
258
|
+
rippleSize: s,
|
|
259
|
+
in: p,
|
|
260
|
+
onExited: l,
|
|
261
|
+
timeout: f
|
|
262
|
+
} = e, [h, R] = c.useState(!1), g = v(n, i.ripple, i.rippleVisible, u && i.ripplePulsate), x = {
|
|
263
|
+
width: s,
|
|
264
|
+
height: s,
|
|
265
|
+
top: -(s / 2) + r,
|
|
266
|
+
left: -(s / 2) + o
|
|
267
|
+
}, m = v(i.child, h && i.childLeaving, u && i.childPulsate);
|
|
268
|
+
return !p && !h && R(!0), c.useEffect(() => {
|
|
269
|
+
if (!p && l != null) {
|
|
270
|
+
const T = setTimeout(l, f);
|
|
271
|
+
return () => {
|
|
272
|
+
clearTimeout(T);
|
|
273
|
+
};
|
|
274
|
+
}
|
|
275
|
+
}, [l, p, f]), /* @__PURE__ */ U("span", {
|
|
276
|
+
className: g,
|
|
277
|
+
style: x,
|
|
278
|
+
children: /* @__PURE__ */ U("span", {
|
|
279
|
+
className: m
|
|
280
|
+
})
|
|
281
|
+
});
|
|
282
|
+
}
|
|
283
|
+
process.env.NODE_ENV !== "production" && (ve.propTypes = {
|
|
284
|
+
/**
|
|
285
|
+
* Override or extend the styles applied to the component.
|
|
286
|
+
*/
|
|
287
|
+
classes: t.object.isRequired,
|
|
288
|
+
className: t.string,
|
|
289
|
+
/**
|
|
290
|
+
* @ignore - injected from TransitionGroup
|
|
291
|
+
*/
|
|
292
|
+
in: t.bool,
|
|
293
|
+
/**
|
|
294
|
+
* @ignore - injected from TransitionGroup
|
|
295
|
+
*/
|
|
296
|
+
onExited: t.func,
|
|
297
|
+
/**
|
|
298
|
+
* If `true`, the ripple pulsates, typically indicating the keyboard focus state of an element.
|
|
299
|
+
*/
|
|
300
|
+
pulsate: t.bool,
|
|
301
|
+
/**
|
|
302
|
+
* Diameter of the ripple.
|
|
303
|
+
*/
|
|
304
|
+
rippleSize: t.number,
|
|
305
|
+
/**
|
|
306
|
+
* Horizontal position of the ripple center.
|
|
307
|
+
*/
|
|
308
|
+
rippleX: t.number,
|
|
309
|
+
/**
|
|
310
|
+
* Vertical position of the ripple center.
|
|
311
|
+
*/
|
|
312
|
+
rippleY: t.number,
|
|
313
|
+
/**
|
|
314
|
+
* exit delay
|
|
315
|
+
*/
|
|
316
|
+
timeout: t.number.isRequired
|
|
317
|
+
});
|
|
318
|
+
const b = Ee("MuiTouchRipple", ["root", "ripple", "rippleVisible", "ripplePulsate", "child", "childLeaving", "childPulsate"]), mt = ["center", "classes", "className"];
|
|
319
|
+
let Z = (e) => e, ye, Re, Te, Me;
|
|
320
|
+
const se = 550, bt = 80, gt = le(ye || (ye = Z`
|
|
321
|
+
0% {
|
|
322
|
+
transform: scale(0);
|
|
323
|
+
opacity: 0.1;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
100% {
|
|
327
|
+
transform: scale(1);
|
|
328
|
+
opacity: 0.3;
|
|
329
|
+
}
|
|
330
|
+
`)), yt = le(Re || (Re = Z`
|
|
331
|
+
0% {
|
|
332
|
+
opacity: 1;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
100% {
|
|
336
|
+
opacity: 0;
|
|
337
|
+
}
|
|
338
|
+
`)), Rt = le(Te || (Te = Z`
|
|
339
|
+
0% {
|
|
340
|
+
transform: scale(1);
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
50% {
|
|
344
|
+
transform: scale(0.92);
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
100% {
|
|
348
|
+
transform: scale(1);
|
|
349
|
+
}
|
|
350
|
+
`)), Tt = ue("span", {
|
|
351
|
+
name: "MuiTouchRipple",
|
|
352
|
+
slot: "Root"
|
|
353
|
+
})({
|
|
354
|
+
overflow: "hidden",
|
|
355
|
+
pointerEvents: "none",
|
|
356
|
+
position: "absolute",
|
|
357
|
+
zIndex: 0,
|
|
358
|
+
top: 0,
|
|
359
|
+
right: 0,
|
|
360
|
+
bottom: 0,
|
|
361
|
+
left: 0,
|
|
362
|
+
borderRadius: "inherit"
|
|
363
|
+
}), Mt = ue(ve, {
|
|
364
|
+
name: "MuiTouchRipple",
|
|
365
|
+
slot: "Ripple"
|
|
366
|
+
})(Me || (Me = Z`
|
|
367
|
+
opacity: 0;
|
|
368
|
+
position: absolute;
|
|
369
|
+
|
|
370
|
+
&.${0} {
|
|
371
|
+
opacity: 0.3;
|
|
372
|
+
transform: scale(1);
|
|
373
|
+
animation-name: ${0};
|
|
374
|
+
animation-duration: ${0}ms;
|
|
375
|
+
animation-timing-function: ${0};
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
&.${0} {
|
|
379
|
+
animation-duration: ${0}ms;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
& .${0} {
|
|
383
|
+
opacity: 1;
|
|
384
|
+
display: block;
|
|
385
|
+
width: 100%;
|
|
386
|
+
height: 100%;
|
|
387
|
+
border-radius: 50%;
|
|
388
|
+
background-color: currentColor;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
& .${0} {
|
|
392
|
+
opacity: 0;
|
|
393
|
+
animation-name: ${0};
|
|
394
|
+
animation-duration: ${0}ms;
|
|
395
|
+
animation-timing-function: ${0};
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
& .${0} {
|
|
399
|
+
position: absolute;
|
|
400
|
+
/* @noflip */
|
|
401
|
+
left: 0px;
|
|
402
|
+
top: 0;
|
|
403
|
+
animation-name: ${0};
|
|
404
|
+
animation-duration: 2500ms;
|
|
405
|
+
animation-timing-function: ${0};
|
|
406
|
+
animation-iteration-count: infinite;
|
|
407
|
+
animation-delay: 200ms;
|
|
408
|
+
}
|
|
409
|
+
`), b.rippleVisible, gt, se, ({
|
|
410
|
+
theme: e
|
|
411
|
+
}) => e.transitions.easing.easeInOut, b.ripplePulsate, ({
|
|
412
|
+
theme: e
|
|
413
|
+
}) => e.transitions.duration.shorter, b.child, b.childLeaving, yt, se, ({
|
|
414
|
+
theme: e
|
|
415
|
+
}) => e.transitions.easing.easeInOut, b.childPulsate, Rt, ({
|
|
416
|
+
theme: e
|
|
417
|
+
}) => e.transitions.easing.easeInOut), xe = /* @__PURE__ */ c.forwardRef(function(n, i) {
|
|
418
|
+
const u = Ce({
|
|
419
|
+
props: n,
|
|
420
|
+
name: "MuiTouchRipple"
|
|
421
|
+
}), {
|
|
422
|
+
center: o = !1,
|
|
423
|
+
classes: r = {},
|
|
424
|
+
className: s
|
|
425
|
+
} = u, p = ae(u, mt), [l, f] = c.useState([]), h = c.useRef(0), R = c.useRef(null);
|
|
426
|
+
c.useEffect(() => {
|
|
427
|
+
R.current && (R.current(), R.current = null);
|
|
428
|
+
}, [l]);
|
|
429
|
+
const g = c.useRef(!1), x = Qe(), m = c.useRef(null), T = c.useRef(null), $ = c.useCallback((d) => {
|
|
430
|
+
const {
|
|
431
|
+
pulsate: M,
|
|
432
|
+
rippleX: E,
|
|
433
|
+
rippleY: L,
|
|
434
|
+
rippleSize: I,
|
|
435
|
+
cb: K
|
|
436
|
+
} = d;
|
|
437
|
+
f((C) => [...C, /* @__PURE__ */ U(Mt, {
|
|
438
|
+
classes: {
|
|
439
|
+
ripple: v(r.ripple, b.ripple),
|
|
440
|
+
rippleVisible: v(r.rippleVisible, b.rippleVisible),
|
|
441
|
+
ripplePulsate: v(r.ripplePulsate, b.ripplePulsate),
|
|
442
|
+
child: v(r.child, b.child),
|
|
443
|
+
childLeaving: v(r.childLeaving, b.childLeaving),
|
|
444
|
+
childPulsate: v(r.childPulsate, b.childPulsate)
|
|
445
|
+
},
|
|
446
|
+
timeout: se,
|
|
447
|
+
pulsate: M,
|
|
448
|
+
rippleX: E,
|
|
449
|
+
rippleY: L,
|
|
450
|
+
rippleSize: I
|
|
451
|
+
}, h.current)]), h.current += 1, R.current = K;
|
|
452
|
+
}, [r]), O = c.useCallback((d = {}, M = {}, E = () => {
|
|
453
|
+
}) => {
|
|
454
|
+
const {
|
|
455
|
+
pulsate: L = !1,
|
|
456
|
+
center: I = o || M.pulsate,
|
|
457
|
+
fakeElement: K = !1
|
|
458
|
+
// For test purposes
|
|
459
|
+
} = M;
|
|
460
|
+
if ((d == null ? void 0 : d.type) === "mousedown" && g.current) {
|
|
461
|
+
g.current = !1;
|
|
462
|
+
return;
|
|
463
|
+
}
|
|
464
|
+
(d == null ? void 0 : d.type) === "touchstart" && (g.current = !0);
|
|
465
|
+
const C = K ? null : T.current, P = C ? C.getBoundingClientRect() : {
|
|
466
|
+
width: 0,
|
|
467
|
+
height: 0,
|
|
468
|
+
left: 0,
|
|
469
|
+
top: 0
|
|
470
|
+
};
|
|
471
|
+
let V, w, B;
|
|
472
|
+
if (I || d === void 0 || d.clientX === 0 && d.clientY === 0 || !d.clientX && !d.touches)
|
|
473
|
+
V = Math.round(P.width / 2), w = Math.round(P.height / 2);
|
|
474
|
+
else {
|
|
475
|
+
const {
|
|
476
|
+
clientX: F,
|
|
477
|
+
clientY: D
|
|
478
|
+
} = d.touches && d.touches.length > 0 ? d.touches[0] : d;
|
|
479
|
+
V = Math.round(F - P.left), w = Math.round(D - P.top);
|
|
480
|
+
}
|
|
481
|
+
if (I)
|
|
482
|
+
B = Math.sqrt((2 * P.width ** 2 + P.height ** 2) / 3), B % 2 === 0 && (B += 1);
|
|
483
|
+
else {
|
|
484
|
+
const F = Math.max(Math.abs((C ? C.clientWidth : 0) - V), V) * 2 + 2, D = Math.max(Math.abs((C ? C.clientHeight : 0) - w), w) * 2 + 2;
|
|
485
|
+
B = Math.sqrt(F ** 2 + D ** 2);
|
|
486
|
+
}
|
|
487
|
+
d != null && d.touches ? m.current === null && (m.current = () => {
|
|
488
|
+
$({
|
|
489
|
+
pulsate: L,
|
|
490
|
+
rippleX: V,
|
|
491
|
+
rippleY: w,
|
|
492
|
+
rippleSize: B,
|
|
493
|
+
cb: E
|
|
494
|
+
});
|
|
495
|
+
}, x.start(bt, () => {
|
|
496
|
+
m.current && (m.current(), m.current = null);
|
|
497
|
+
})) : $({
|
|
498
|
+
pulsate: L,
|
|
499
|
+
rippleX: V,
|
|
500
|
+
rippleY: w,
|
|
501
|
+
rippleSize: B,
|
|
502
|
+
cb: E
|
|
503
|
+
});
|
|
504
|
+
}, [o, $, x]), j = c.useCallback(() => {
|
|
505
|
+
O({}, {
|
|
506
|
+
pulsate: !0
|
|
507
|
+
});
|
|
508
|
+
}, [O]), _ = c.useCallback((d, M) => {
|
|
509
|
+
if (x.clear(), (d == null ? void 0 : d.type) === "touchend" && m.current) {
|
|
510
|
+
m.current(), m.current = null, x.start(0, () => {
|
|
511
|
+
_(d, M);
|
|
512
|
+
});
|
|
513
|
+
return;
|
|
514
|
+
}
|
|
515
|
+
m.current = null, f((E) => E.length > 0 ? E.slice(1) : E), R.current = M;
|
|
516
|
+
}, [x]);
|
|
517
|
+
return c.useImperativeHandle(i, () => ({
|
|
518
|
+
pulsate: j,
|
|
519
|
+
start: O,
|
|
520
|
+
stop: _
|
|
521
|
+
}), [j, O, _]), /* @__PURE__ */ U(Tt, X({
|
|
522
|
+
className: v(b.root, r.root, s),
|
|
523
|
+
ref: T
|
|
524
|
+
}, p, {
|
|
525
|
+
children: /* @__PURE__ */ U(pe, {
|
|
526
|
+
component: null,
|
|
527
|
+
exit: !0,
|
|
528
|
+
children: l
|
|
529
|
+
})
|
|
530
|
+
}));
|
|
531
|
+
});
|
|
532
|
+
process.env.NODE_ENV !== "production" && (xe.propTypes = {
|
|
533
|
+
/**
|
|
534
|
+
* If `true`, the ripple starts at the center of the component
|
|
535
|
+
* rather than at the point of interaction.
|
|
536
|
+
*/
|
|
537
|
+
center: t.bool,
|
|
538
|
+
/**
|
|
539
|
+
* Override or extend the styles applied to the component.
|
|
540
|
+
*/
|
|
541
|
+
classes: t.object,
|
|
542
|
+
/**
|
|
543
|
+
* @ignore
|
|
544
|
+
*/
|
|
545
|
+
className: t.string
|
|
546
|
+
});
|
|
547
|
+
function Et(e) {
|
|
548
|
+
return qe("MuiButtonBase", e);
|
|
549
|
+
}
|
|
550
|
+
const Ct = Ee("MuiButtonBase", ["root", "disabled", "focusVisible"]), vt = ["action", "centerRipple", "children", "className", "component", "disabled", "disableRipple", "disableTouchRipple", "focusRipple", "focusVisibleClassName", "LinkComponent", "onBlur", "onClick", "onContextMenu", "onDragLeave", "onFocus", "onFocusVisible", "onKeyDown", "onKeyUp", "onMouseDown", "onMouseLeave", "onMouseUp", "onTouchEnd", "onTouchMove", "onTouchStart", "tabIndex", "TouchRippleProps", "touchRippleRef", "type"], xt = (e) => {
|
|
551
|
+
const {
|
|
552
|
+
disabled: n,
|
|
553
|
+
focusVisible: i,
|
|
554
|
+
focusVisibleClassName: u,
|
|
555
|
+
classes: o
|
|
556
|
+
} = e, s = We({
|
|
557
|
+
root: ["root", n && "disabled", i && "focusVisible"]
|
|
558
|
+
}, Et, o);
|
|
559
|
+
return i && u && (s.root += ` ${u}`), s;
|
|
560
|
+
}, Vt = ue("button", {
|
|
561
|
+
name: "MuiButtonBase",
|
|
562
|
+
slot: "Root",
|
|
563
|
+
overridesResolver: (e, n) => n.root
|
|
564
|
+
})({
|
|
565
|
+
display: "inline-flex",
|
|
566
|
+
alignItems: "center",
|
|
567
|
+
justifyContent: "center",
|
|
568
|
+
position: "relative",
|
|
569
|
+
boxSizing: "border-box",
|
|
570
|
+
WebkitTapHighlightColor: "transparent",
|
|
571
|
+
backgroundColor: "transparent",
|
|
572
|
+
// Reset default value
|
|
573
|
+
// We disable the focus ring for mouse, touch and keyboard users.
|
|
574
|
+
outline: 0,
|
|
575
|
+
border: 0,
|
|
576
|
+
margin: 0,
|
|
577
|
+
// Remove the margin in Safari
|
|
578
|
+
borderRadius: 0,
|
|
579
|
+
padding: 0,
|
|
580
|
+
// Remove the padding in Firefox
|
|
581
|
+
cursor: "pointer",
|
|
582
|
+
userSelect: "none",
|
|
583
|
+
verticalAlign: "middle",
|
|
584
|
+
MozAppearance: "none",
|
|
585
|
+
// Reset
|
|
586
|
+
WebkitAppearance: "none",
|
|
587
|
+
// Reset
|
|
588
|
+
textDecoration: "none",
|
|
589
|
+
// So we take precedent over the style of a native <a /> element.
|
|
590
|
+
color: "inherit",
|
|
591
|
+
"&::-moz-focus-inner": {
|
|
592
|
+
borderStyle: "none"
|
|
593
|
+
// Remove Firefox dotted outline.
|
|
594
|
+
},
|
|
595
|
+
[`&.${Ct.disabled}`]: {
|
|
596
|
+
pointerEvents: "none",
|
|
597
|
+
// Disable link interactions
|
|
598
|
+
cursor: "default"
|
|
599
|
+
},
|
|
600
|
+
"@media print": {
|
|
601
|
+
colorAdjust: "exact"
|
|
602
|
+
}
|
|
603
|
+
}), Dt = /* @__PURE__ */ c.forwardRef(function(n, i) {
|
|
604
|
+
const u = Ce({
|
|
605
|
+
props: n,
|
|
606
|
+
name: "MuiButtonBase"
|
|
607
|
+
}), {
|
|
608
|
+
action: o,
|
|
609
|
+
centerRipple: r = !1,
|
|
610
|
+
children: s,
|
|
611
|
+
className: p,
|
|
612
|
+
component: l = "button",
|
|
613
|
+
disabled: f = !1,
|
|
614
|
+
disableRipple: h = !1,
|
|
615
|
+
disableTouchRipple: R = !1,
|
|
616
|
+
focusRipple: g = !1,
|
|
617
|
+
LinkComponent: x = "a",
|
|
618
|
+
onBlur: m,
|
|
619
|
+
onClick: T,
|
|
620
|
+
onContextMenu: $,
|
|
621
|
+
onDragLeave: O,
|
|
622
|
+
onFocus: j,
|
|
623
|
+
onFocusVisible: _,
|
|
624
|
+
onKeyDown: d,
|
|
625
|
+
onKeyUp: M,
|
|
626
|
+
onMouseDown: E,
|
|
627
|
+
onMouseLeave: L,
|
|
628
|
+
onMouseUp: I,
|
|
629
|
+
onTouchEnd: K,
|
|
630
|
+
onTouchMove: C,
|
|
631
|
+
onTouchStart: P,
|
|
632
|
+
tabIndex: V = 0,
|
|
633
|
+
TouchRippleProps: w,
|
|
634
|
+
touchRippleRef: B,
|
|
635
|
+
type: F
|
|
636
|
+
} = u, D = ae(u, vt), z = c.useRef(null), y = c.useRef(null), Ve = ge(y, B), {
|
|
637
|
+
isFocusVisibleRef: fe,
|
|
638
|
+
onFocus: De,
|
|
639
|
+
onBlur: Ne,
|
|
640
|
+
ref: Pe
|
|
641
|
+
} = lt(), [k, Y] = c.useState(!1);
|
|
642
|
+
f && k && Y(!1), c.useImperativeHandle(o, () => ({
|
|
643
|
+
focusVisible: () => {
|
|
644
|
+
Y(!0), z.current.focus();
|
|
645
|
+
}
|
|
646
|
+
}), []);
|
|
647
|
+
const [ee, we] = c.useState(!1);
|
|
648
|
+
c.useEffect(() => {
|
|
649
|
+
we(!0);
|
|
650
|
+
}, []);
|
|
651
|
+
const te = ee && !h && !f;
|
|
652
|
+
c.useEffect(() => {
|
|
653
|
+
k && g && !h && ee && y.current.pulsate();
|
|
654
|
+
}, [h, g, k, ee]);
|
|
655
|
+
function N(a, he, Xe = R) {
|
|
656
|
+
return H((me) => (he && he(me), !Xe && y.current && y.current[a](me), !0));
|
|
657
|
+
}
|
|
658
|
+
const Be = N("start", E), Le = N("stop", $), Fe = N("stop", O), ke = N("stop", I), Se = N("stop", (a) => {
|
|
659
|
+
k && a.preventDefault(), L && L(a);
|
|
660
|
+
}), Oe = N("start", P), _e = N("stop", K), Ie = N("stop", C), Ue = N("stop", (a) => {
|
|
661
|
+
Ne(a), fe.current === !1 && Y(!1), m && m(a);
|
|
662
|
+
}, !1), $e = H((a) => {
|
|
663
|
+
z.current || (z.current = a.currentTarget), De(a), fe.current === !0 && (Y(!0), _ && _(a)), j && j(a);
|
|
664
|
+
}), ne = () => {
|
|
665
|
+
const a = z.current;
|
|
666
|
+
return l && l !== "button" && !(a.tagName === "A" && a.href);
|
|
667
|
+
}, oe = c.useRef(!1), je = H((a) => {
|
|
668
|
+
g && !oe.current && k && y.current && a.key === " " && (oe.current = !0, y.current.stop(a, () => {
|
|
669
|
+
y.current.start(a);
|
|
670
|
+
})), a.target === a.currentTarget && ne() && a.key === " " && a.preventDefault(), d && d(a), a.target === a.currentTarget && ne() && a.key === "Enter" && !f && (a.preventDefault(), T && T(a));
|
|
671
|
+
}), Ke = H((a) => {
|
|
672
|
+
g && a.key === " " && y.current && k && !a.defaultPrevented && (oe.current = !1, y.current.stop(a, () => {
|
|
673
|
+
y.current.pulsate(a);
|
|
674
|
+
})), M && M(a), T && a.target === a.currentTarget && ne() && a.key === " " && !a.defaultPrevented && T(a);
|
|
675
|
+
});
|
|
676
|
+
let q = l;
|
|
677
|
+
q === "button" && (D.href || D.to) && (q = x);
|
|
678
|
+
const A = {};
|
|
679
|
+
q === "button" ? (A.type = F === void 0 ? "button" : F, A.disabled = f) : (!D.href && !D.to && (A.role = "button"), f && (A["aria-disabled"] = f));
|
|
680
|
+
const ze = ge(i, Pe, z);
|
|
681
|
+
process.env.NODE_ENV !== "production" && c.useEffect(() => {
|
|
682
|
+
te && !y.current && console.error(["MUI: The `component` prop provided to ButtonBase is invalid.", "Please make sure the children prop is rendered in this custom component."].join(`
|
|
683
|
+
`));
|
|
684
|
+
}, [te]);
|
|
685
|
+
const de = X({}, u, {
|
|
686
|
+
centerRipple: r,
|
|
687
|
+
component: l,
|
|
688
|
+
disabled: f,
|
|
689
|
+
disableRipple: h,
|
|
690
|
+
disableTouchRipple: R,
|
|
691
|
+
focusRipple: g,
|
|
692
|
+
tabIndex: V,
|
|
693
|
+
focusVisible: k
|
|
694
|
+
}), Ae = xt(de);
|
|
695
|
+
return /* @__PURE__ */ He(Vt, X({
|
|
696
|
+
as: q,
|
|
697
|
+
className: v(Ae.root, p),
|
|
698
|
+
ownerState: de,
|
|
699
|
+
onBlur: Ue,
|
|
700
|
+
onClick: T,
|
|
701
|
+
onContextMenu: Le,
|
|
702
|
+
onFocus: $e,
|
|
703
|
+
onKeyDown: je,
|
|
704
|
+
onKeyUp: Ke,
|
|
705
|
+
onMouseDown: Be,
|
|
706
|
+
onMouseLeave: Se,
|
|
707
|
+
onMouseUp: ke,
|
|
708
|
+
onDragLeave: Fe,
|
|
709
|
+
onTouchEnd: _e,
|
|
710
|
+
onTouchMove: Ie,
|
|
711
|
+
onTouchStart: Oe,
|
|
712
|
+
ref: ze,
|
|
713
|
+
tabIndex: f ? -1 : V,
|
|
714
|
+
type: F
|
|
715
|
+
}, A, D, {
|
|
716
|
+
children: [s, te ? (
|
|
717
|
+
/* TouchRipple is only needed client-side, x2 boost on the server. */
|
|
718
|
+
/* @__PURE__ */ U(xe, X({
|
|
719
|
+
ref: Ve,
|
|
720
|
+
center: r
|
|
721
|
+
}, w))
|
|
722
|
+
) : null]
|
|
723
|
+
}));
|
|
724
|
+
});
|
|
725
|
+
process.env.NODE_ENV !== "production" && (Dt.propTypes = {
|
|
726
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
727
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
728
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
729
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
730
|
+
/**
|
|
731
|
+
* A ref for imperative actions.
|
|
732
|
+
* It currently only supports `focusVisible()` action.
|
|
733
|
+
*/
|
|
734
|
+
action: Ze,
|
|
735
|
+
/**
|
|
736
|
+
* If `true`, the ripples are centered.
|
|
737
|
+
* They won't start at the cursor interaction position.
|
|
738
|
+
* @default false
|
|
739
|
+
*/
|
|
740
|
+
centerRipple: t.bool,
|
|
741
|
+
/**
|
|
742
|
+
* The content of the component.
|
|
743
|
+
*/
|
|
744
|
+
children: t.node,
|
|
745
|
+
/**
|
|
746
|
+
* Override or extend the styles applied to the component.
|
|
747
|
+
*/
|
|
748
|
+
classes: t.object,
|
|
749
|
+
/**
|
|
750
|
+
* @ignore
|
|
751
|
+
*/
|
|
752
|
+
className: t.string,
|
|
753
|
+
/**
|
|
754
|
+
* The component used for the root node.
|
|
755
|
+
* Either a string to use a HTML element or a component.
|
|
756
|
+
*/
|
|
757
|
+
component: et,
|
|
758
|
+
/**
|
|
759
|
+
* If `true`, the component is disabled.
|
|
760
|
+
* @default false
|
|
761
|
+
*/
|
|
762
|
+
disabled: t.bool,
|
|
763
|
+
/**
|
|
764
|
+
* If `true`, the ripple effect is disabled.
|
|
765
|
+
*
|
|
766
|
+
* ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure
|
|
767
|
+
* to highlight the element by applying separate styles with the `.Mui-focusVisible` class.
|
|
768
|
+
* @default false
|
|
769
|
+
*/
|
|
770
|
+
disableRipple: t.bool,
|
|
771
|
+
/**
|
|
772
|
+
* If `true`, the touch ripple effect is disabled.
|
|
773
|
+
* @default false
|
|
774
|
+
*/
|
|
775
|
+
disableTouchRipple: t.bool,
|
|
776
|
+
/**
|
|
777
|
+
* If `true`, the base button will have a keyboard focus ripple.
|
|
778
|
+
* @default false
|
|
779
|
+
*/
|
|
780
|
+
focusRipple: t.bool,
|
|
781
|
+
/**
|
|
782
|
+
* This prop can help identify which element has keyboard focus.
|
|
783
|
+
* The class name will be applied when the element gains the focus through keyboard interaction.
|
|
784
|
+
* It's a polyfill for the [CSS :focus-visible selector](https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo).
|
|
785
|
+
* The rationale for using this feature [is explained here](https://github.com/WICG/focus-visible/blob/HEAD/explainer.md).
|
|
786
|
+
* A [polyfill can be used](https://github.com/WICG/focus-visible) to apply a `focus-visible` class to other components
|
|
787
|
+
* if needed.
|
|
788
|
+
*/
|
|
789
|
+
focusVisibleClassName: t.string,
|
|
790
|
+
/**
|
|
791
|
+
* @ignore
|
|
792
|
+
*/
|
|
793
|
+
href: t.any,
|
|
794
|
+
/**
|
|
795
|
+
* The component used to render a link when the `href` prop is provided.
|
|
796
|
+
* @default 'a'
|
|
797
|
+
*/
|
|
798
|
+
LinkComponent: t.elementType,
|
|
799
|
+
/**
|
|
800
|
+
* @ignore
|
|
801
|
+
*/
|
|
802
|
+
onBlur: t.func,
|
|
803
|
+
/**
|
|
804
|
+
* @ignore
|
|
805
|
+
*/
|
|
806
|
+
onClick: t.func,
|
|
807
|
+
/**
|
|
808
|
+
* @ignore
|
|
809
|
+
*/
|
|
810
|
+
onContextMenu: t.func,
|
|
811
|
+
/**
|
|
812
|
+
* @ignore
|
|
813
|
+
*/
|
|
814
|
+
onDragLeave: t.func,
|
|
815
|
+
/**
|
|
816
|
+
* @ignore
|
|
817
|
+
*/
|
|
818
|
+
onFocus: t.func,
|
|
819
|
+
/**
|
|
820
|
+
* Callback fired when the component is focused with a keyboard.
|
|
821
|
+
* We trigger a `onFocus` callback too.
|
|
822
|
+
*/
|
|
823
|
+
onFocusVisible: t.func,
|
|
824
|
+
/**
|
|
825
|
+
* @ignore
|
|
826
|
+
*/
|
|
827
|
+
onKeyDown: t.func,
|
|
828
|
+
/**
|
|
829
|
+
* @ignore
|
|
830
|
+
*/
|
|
831
|
+
onKeyUp: t.func,
|
|
832
|
+
/**
|
|
833
|
+
* @ignore
|
|
834
|
+
*/
|
|
835
|
+
onMouseDown: t.func,
|
|
836
|
+
/**
|
|
837
|
+
* @ignore
|
|
838
|
+
*/
|
|
839
|
+
onMouseLeave: t.func,
|
|
840
|
+
/**
|
|
841
|
+
* @ignore
|
|
842
|
+
*/
|
|
843
|
+
onMouseUp: t.func,
|
|
844
|
+
/**
|
|
845
|
+
* @ignore
|
|
846
|
+
*/
|
|
847
|
+
onTouchEnd: t.func,
|
|
848
|
+
/**
|
|
849
|
+
* @ignore
|
|
850
|
+
*/
|
|
851
|
+
onTouchMove: t.func,
|
|
852
|
+
/**
|
|
853
|
+
* @ignore
|
|
854
|
+
*/
|
|
855
|
+
onTouchStart: t.func,
|
|
856
|
+
/**
|
|
857
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
858
|
+
*/
|
|
859
|
+
sx: t.oneOfType([t.arrayOf(t.oneOfType([t.func, t.object, t.bool])), t.func, t.object]),
|
|
860
|
+
/**
|
|
861
|
+
* @default 0
|
|
862
|
+
*/
|
|
863
|
+
tabIndex: t.number,
|
|
864
|
+
/**
|
|
865
|
+
* Props applied to the `TouchRipple` element.
|
|
866
|
+
*/
|
|
867
|
+
TouchRippleProps: t.object,
|
|
868
|
+
/**
|
|
869
|
+
* A ref that points to the `TouchRipple` element.
|
|
870
|
+
*/
|
|
871
|
+
touchRippleRef: t.oneOfType([t.func, t.shape({
|
|
872
|
+
current: t.shape({
|
|
873
|
+
pulsate: t.func.isRequired,
|
|
874
|
+
start: t.func.isRequired,
|
|
875
|
+
stop: t.func.isRequired
|
|
876
|
+
})
|
|
877
|
+
})]),
|
|
878
|
+
/**
|
|
879
|
+
* @ignore
|
|
880
|
+
*/
|
|
881
|
+
type: t.oneOfType([t.oneOf(["button", "reset", "submit"]), t.string])
|
|
882
|
+
});
|
|
883
|
+
export {
|
|
884
|
+
Dt as B,
|
|
885
|
+
pe as T,
|
|
886
|
+
lt as u
|
|
887
|
+
};
|