@cgi-learning-hub/ui 0.0.1-dev.1709567324 → 0.0.1-dev.1709569189
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/Box-CjHm9A9L.cjs +1 -0
- package/dist/{Box-C0qXdJzV.js → Box-erN4AuKs.js} +8 -8
- package/dist/ButtonBase-BybMkBUd.cjs +75 -0
- package/dist/ButtonBase-CGcs8Gbj.cjs +75 -0
- package/dist/ButtonBase-V1pwsMMs.js +649 -0
- package/dist/ButtonBase-aujiNoUb.js +649 -0
- package/dist/DefaultButton-Cg4tPCgf.cjs +28 -0
- package/dist/{DefaultButton-B-2UppUm.js → DefaultButton-DbpZOb47.js} +355 -146
- package/dist/FileListItem-ChKTjDnV.js +254 -0
- package/dist/FileListItem-CjFIZgYg.cjs +28 -0
- package/dist/IconButton-CHXclgOn.cjs +2 -0
- package/dist/{IconButton-1URziYlU.js → IconButton-DE5JOshS.js} +8 -8
- package/dist/{InputBase-Dc0v-Ihf.js → InputBase-C8AzQJJ9.js} +161 -174
- package/dist/InputBase-D6eXzDaz.cjs +4 -0
- package/dist/LocalizationProvider-42pD7VmS.cjs +5 -0
- package/dist/{LocalizationProvider-BD64DNxF.js → LocalizationProvider-Cov62Xe0.js} +4 -3
- package/dist/Tabs-DiWeNGD4.js +1167 -0
- package/dist/Tabs-DoxP7EMA.cjs +4 -0
- package/dist/TextInput-BbSyyuvO.cjs +12 -0
- package/dist/{TextInput-DsSFDlNR.js → TextInput-DmMk4i-V.js} +1892 -1650
- package/dist/TimePicker-B5MjZCK0.cjs +89 -0
- package/dist/TimePicker-BmxG3a2D.js +28354 -0
- package/dist/TransitionGroup-COuDopJ-.js +188 -0
- package/dist/TransitionGroup-X90dkobW.cjs +1 -0
- package/dist/Typography-B90UzlQW.js +179 -0
- package/dist/Typography-KFjBz5Hm.cjs +1 -0
- package/dist/clamp-0LjYbpE_.cjs +23 -0
- package/dist/clamp-BGJvJ0FN.js +1641 -0
- package/dist/components/Dropzone/Dropzone.cjs.js +5 -5
- package/dist/components/Dropzone/Dropzone.es.js +12 -11
- package/dist/components/LocalizationProvider/LocalizationProvider.cjs.js +1 -1
- package/dist/components/LocalizationProvider/LocalizationProvider.es.js +1 -1
- package/dist/components/LocalizationProvider/index.cjs.js +1 -1
- package/dist/components/LocalizationProvider/index.es.js +1 -1
- package/dist/components/buttons/DefaultButton/DefaultButton.cjs.js +1 -1
- package/dist/components/buttons/DefaultButton/DefaultButton.es.js +3 -3
- package/dist/components/buttons/DefaultButton/DefaultButtonIcon.cjs.js +1 -1
- package/dist/components/buttons/DefaultButton/DefaultButtonIcon.es.js +6 -6
- package/dist/components/buttons/DefaultButton/index.cjs.js +1 -1
- package/dist/components/buttons/DefaultButton/index.es.js +1 -1
- package/dist/components/buttons/IconButton.stories.cjs.js +1 -1
- package/dist/components/buttons/IconButton.stories.es.js +10 -9
- package/dist/components/buttons/PrimaryButton/PrimaryButton.cjs.js +1 -1
- package/dist/components/buttons/PrimaryButton/PrimaryButton.es.js +2 -2
- package/dist/components/buttons/PrimaryButton/PrimaryButton.stories.cjs.js +1 -1
- package/dist/components/buttons/PrimaryButton/PrimaryButton.stories.es.js +1 -1
- package/dist/components/buttons/SecondaryButton/SecondaryButton.cjs.js +1 -1
- package/dist/components/buttons/SecondaryButton/SecondaryButton.es.js +2 -2
- package/dist/components/buttons/SecondaryButton/SecondaryButton.stories.cjs.js +1 -1
- package/dist/components/buttons/SecondaryButton/SecondaryButton.stories.es.js +1 -1
- package/dist/components/buttons/index.cjs.js +1 -1
- package/dist/components/buttons/index.es.js +1 -1
- package/dist/components/index.cjs.js +1 -1
- package/dist/components/index.es.js +90 -91
- package/dist/components/inputs/SearchInput/SearchInput.cjs.js +1 -1
- package/dist/components/inputs/SearchInput/SearchInput.es.js +174 -6
- package/dist/components/inputs/SearchInput/SearchInput.stories.cjs.js +1 -1
- package/dist/components/inputs/SearchInput/SearchInput.stories.es.js +4 -4
- package/dist/components/inputs/SearchInput/index.cjs.js +1 -1
- package/dist/components/inputs/SearchInput/index.es.js +2 -2
- package/dist/components/inputs/TextInput/TextInput.cjs.js +1 -1
- package/dist/components/inputs/TextInput/TextInput.es.js +2 -2
- package/dist/components/inputs/TextInput/TextInput.stories.cjs.js +1 -1
- package/dist/components/inputs/TextInput/TextInput.stories.es.js +1 -1
- package/dist/components/inputs/TextInput/index.cjs.js +1 -1
- package/dist/components/inputs/TextInput/index.es.js +1 -1
- package/dist/components/inputs/index.cjs.js +1 -1
- package/dist/components/inputs/index.es.js +4 -4
- package/dist/components/lists/FileList/FileList.cjs.js +1 -1
- package/dist/components/lists/FileList/FileList.es.js +2 -2
- package/dist/components/lists/FileList/FileListItem.cjs.js +1 -1
- package/dist/components/lists/FileList/FileListItem.es.js +7 -39
- package/dist/components/lists/FileList/index.cjs.js +1 -1
- package/dist/components/lists/FileList/index.es.js +4 -4
- package/dist/components/lists/TabList.stories.cjs.js +1 -1
- package/dist/components/lists/TabList.stories.es.js +18 -16
- package/dist/components/lists/index.cjs.js +1 -1
- package/dist/components/lists/index.es.js +4 -4
- package/dist/createSvgIcon-BSYat4nx.js +74 -0
- package/dist/createSvgIcon-BqRWmIPG.cjs +1 -0
- package/dist/{createSvgIcon-Dspfpz-l.js → createSvgIcon-DeRU4e-L.js} +20 -18
- package/dist/createSvgIcon-doNQ5emq.cjs +2 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +93 -94
- package/dist/refType-Bt58K9Sk.cjs +1 -0
- package/dist/{refType-BBFUe6fu.js → refType-CoCfCK--.js} +1 -1
- package/dist/styled-BU8dAebc.js +1751 -0
- package/dist/styled-DGjsLYEN.cjs +45 -0
- package/dist/styled-DP6LeBLQ.js +261 -0
- package/dist/styled-Dkd1VGM-.cjs +1 -0
- package/dist/useTheme-C132tQV-.js +10 -0
- package/dist/useTheme-CliHZTkE.cjs +1 -0
- package/dist/useThemeProps-63SNG58r.js +753 -0
- package/dist/useThemeProps-CVatCXfo.cjs +20 -0
- package/package.json +6 -7
- package/dist/Box-DjRIKMD0.cjs +0 -1
- package/dist/ButtonBase-BvllyU4w.cjs +0 -75
- package/dist/ButtonBase-C14ZYs6z.js +0 -833
- package/dist/CircularProgress-Bf46-VRs.js +0 -217
- package/dist/CircularProgress-DjSMBYnK.cjs +0 -28
- package/dist/DefaultButton-DPZOltN5.cjs +0 -1
- package/dist/IconButton-X6l-U-im.cjs +0 -2
- package/dist/InputBase-CzupOzjh.cjs +0 -4
- package/dist/LocalizationProvider-DqwEOZOd.cjs +0 -5
- package/dist/SearchInput-Bb3sCx3k.cjs +0 -1
- package/dist/SearchInput-DRjmNW6W.js +0 -177
- package/dist/Tabs-B9BPJaDx.js +0 -1090
- package/dist/Tabs-Dx8YJT4c.cjs +0 -4
- package/dist/TextInput-BFguMDSu.cjs +0 -12
- package/dist/TimePicker-B0HOzxHh.cjs +0 -69
- package/dist/TimePicker-OBZs04Z8.js +0 -19694
- package/dist/Typography-CRt6WSxo.js +0 -204
- package/dist/Typography-DsPQABF2.cjs +0 -1
- package/dist/createSvgIcon-BOQCM03y.cjs +0 -2
- package/dist/createSvgIcon-C2VxBqzG.cjs +0 -1
- package/dist/createSvgIcon-xJp3_zwo.js +0 -84
- package/dist/isHostComponent-PydJW4A4.cjs +0 -1
- package/dist/isHostComponent-kiaBvYVo.js +0 -6
- package/dist/refType-5EEBZL5_.cjs +0 -1
- package/dist/styled-D8lXwcQy.js +0 -423
- package/dist/styled-DFoJwRxe.cjs +0 -24
- package/dist/useSlotProps-BoMYRJkF.js +0 -72
- package/dist/useSlotProps-EKKRQjEn.cjs +0 -1
- package/dist/useTheme-BkW5nNsn.cjs +0 -1
- package/dist/useTheme-Bo1inEHN.js +0 -9
- package/dist/useThemeProps-BRWSvuZw.cjs +0 -42
- package/dist/useThemeProps-CZzcR_pm.js +0 -2288
|
@@ -0,0 +1,649 @@
|
|
|
1
|
+
import { P as e, a as pe, _ as v, g as _e } from "./clamp-BGJvJ0FN.js";
|
|
2
|
+
import * as o from "react";
|
|
3
|
+
import { c as M, g as fe, s as ee, u as de, b as Fe } from "./styled-BU8dAebc.js";
|
|
4
|
+
import { jsx as F, jsxs as Ke } from "react/jsx-runtime";
|
|
5
|
+
import { u as Oe, a as q } from "./useTimeout-C7IkLqZ9.js";
|
|
6
|
+
import { T as je } from "./TransitionGroup-COuDopJ-.js";
|
|
7
|
+
import { keyframes as te } from "@emotion/react";
|
|
8
|
+
import { a as re } from "./useForkRef-CQ5u1_mH.js";
|
|
9
|
+
import { u as ze } from "./useIsFocusVisible-B88all80.js";
|
|
10
|
+
import { r as Xe, e as Ye } from "./refType-CoCfCK--.js";
|
|
11
|
+
function he(s) {
|
|
12
|
+
const {
|
|
13
|
+
className: C,
|
|
14
|
+
classes: a,
|
|
15
|
+
pulsate: u = !1,
|
|
16
|
+
rippleX: k,
|
|
17
|
+
rippleY: i,
|
|
18
|
+
rippleSize: p,
|
|
19
|
+
in: w,
|
|
20
|
+
onExited: f,
|
|
21
|
+
timeout: r
|
|
22
|
+
} = s, [m, b] = o.useState(!1), d = M(C, a.ripple, a.rippleVisible, u && a.ripplePulsate), x = {
|
|
23
|
+
width: p,
|
|
24
|
+
height: p,
|
|
25
|
+
top: -(p / 2) + i,
|
|
26
|
+
left: -(p / 2) + k
|
|
27
|
+
}, l = M(a.child, m && a.childLeaving, u && a.childPulsate);
|
|
28
|
+
return !w && !m && b(!0), o.useEffect(() => {
|
|
29
|
+
if (!w && f != null) {
|
|
30
|
+
const R = setTimeout(f, r);
|
|
31
|
+
return () => {
|
|
32
|
+
clearTimeout(R);
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
}, [f, w, r]), /* @__PURE__ */ F("span", {
|
|
36
|
+
className: d,
|
|
37
|
+
style: x,
|
|
38
|
+
children: /* @__PURE__ */ F("span", {
|
|
39
|
+
className: l
|
|
40
|
+
})
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
process.env.NODE_ENV !== "production" && (he.propTypes = {
|
|
44
|
+
/**
|
|
45
|
+
* Override or extend the styles applied to the component.
|
|
46
|
+
* See [CSS API](#css) below for more details.
|
|
47
|
+
*/
|
|
48
|
+
classes: e.object.isRequired,
|
|
49
|
+
className: e.string,
|
|
50
|
+
/**
|
|
51
|
+
* @ignore - injected from TransitionGroup
|
|
52
|
+
*/
|
|
53
|
+
in: e.bool,
|
|
54
|
+
/**
|
|
55
|
+
* @ignore - injected from TransitionGroup
|
|
56
|
+
*/
|
|
57
|
+
onExited: e.func,
|
|
58
|
+
/**
|
|
59
|
+
* If `true`, the ripple pulsates, typically indicating the keyboard focus state of an element.
|
|
60
|
+
*/
|
|
61
|
+
pulsate: e.bool,
|
|
62
|
+
/**
|
|
63
|
+
* Diameter of the ripple.
|
|
64
|
+
*/
|
|
65
|
+
rippleSize: e.number,
|
|
66
|
+
/**
|
|
67
|
+
* Horizontal position of the ripple center.
|
|
68
|
+
*/
|
|
69
|
+
rippleX: e.number,
|
|
70
|
+
/**
|
|
71
|
+
* Vertical position of the ripple center.
|
|
72
|
+
*/
|
|
73
|
+
rippleY: e.number,
|
|
74
|
+
/**
|
|
75
|
+
* exit delay
|
|
76
|
+
*/
|
|
77
|
+
timeout: e.number.isRequired
|
|
78
|
+
});
|
|
79
|
+
const c = fe("MuiTouchRipple", ["root", "ripple", "rippleVisible", "ripplePulsate", "child", "childLeaving", "childPulsate"]), Ae = ["center", "classes", "className"];
|
|
80
|
+
let H = (s) => s, le, ae, ue, ce;
|
|
81
|
+
const Z = 550, qe = 80, ve = te(le || (le = H`
|
|
82
|
+
0% {
|
|
83
|
+
transform: scale(0);
|
|
84
|
+
opacity: 0.1;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
100% {
|
|
88
|
+
transform: scale(1);
|
|
89
|
+
opacity: 0.3;
|
|
90
|
+
}
|
|
91
|
+
`)), He = te(ae || (ae = H`
|
|
92
|
+
0% {
|
|
93
|
+
opacity: 1;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
100% {
|
|
97
|
+
opacity: 0;
|
|
98
|
+
}
|
|
99
|
+
`)), We = te(ue || (ue = H`
|
|
100
|
+
0% {
|
|
101
|
+
transform: scale(1);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
50% {
|
|
105
|
+
transform: scale(0.92);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
100% {
|
|
109
|
+
transform: scale(1);
|
|
110
|
+
}
|
|
111
|
+
`)), Ge = ee("span", {
|
|
112
|
+
name: "MuiTouchRipple",
|
|
113
|
+
slot: "Root"
|
|
114
|
+
})({
|
|
115
|
+
overflow: "hidden",
|
|
116
|
+
pointerEvents: "none",
|
|
117
|
+
position: "absolute",
|
|
118
|
+
zIndex: 0,
|
|
119
|
+
top: 0,
|
|
120
|
+
right: 0,
|
|
121
|
+
bottom: 0,
|
|
122
|
+
left: 0,
|
|
123
|
+
borderRadius: "inherit"
|
|
124
|
+
}), Je = ee(he, {
|
|
125
|
+
name: "MuiTouchRipple",
|
|
126
|
+
slot: "Ripple"
|
|
127
|
+
})(ce || (ce = H`
|
|
128
|
+
opacity: 0;
|
|
129
|
+
position: absolute;
|
|
130
|
+
|
|
131
|
+
&.${0} {
|
|
132
|
+
opacity: 0.3;
|
|
133
|
+
transform: scale(1);
|
|
134
|
+
animation-name: ${0};
|
|
135
|
+
animation-duration: ${0}ms;
|
|
136
|
+
animation-timing-function: ${0};
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
&.${0} {
|
|
140
|
+
animation-duration: ${0}ms;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
& .${0} {
|
|
144
|
+
opacity: 1;
|
|
145
|
+
display: block;
|
|
146
|
+
width: 100%;
|
|
147
|
+
height: 100%;
|
|
148
|
+
border-radius: 50%;
|
|
149
|
+
background-color: currentColor;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
& .${0} {
|
|
153
|
+
opacity: 0;
|
|
154
|
+
animation-name: ${0};
|
|
155
|
+
animation-duration: ${0}ms;
|
|
156
|
+
animation-timing-function: ${0};
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
& .${0} {
|
|
160
|
+
position: absolute;
|
|
161
|
+
/* @noflip */
|
|
162
|
+
left: 0px;
|
|
163
|
+
top: 0;
|
|
164
|
+
animation-name: ${0};
|
|
165
|
+
animation-duration: 2500ms;
|
|
166
|
+
animation-timing-function: ${0};
|
|
167
|
+
animation-iteration-count: infinite;
|
|
168
|
+
animation-delay: 200ms;
|
|
169
|
+
}
|
|
170
|
+
`), c.rippleVisible, ve, Z, ({
|
|
171
|
+
theme: s
|
|
172
|
+
}) => s.transitions.easing.easeInOut, c.ripplePulsate, ({
|
|
173
|
+
theme: s
|
|
174
|
+
}) => s.transitions.duration.shorter, c.child, c.childLeaving, He, Z, ({
|
|
175
|
+
theme: s
|
|
176
|
+
}) => s.transitions.easing.easeInOut, c.childPulsate, We, ({
|
|
177
|
+
theme: s
|
|
178
|
+
}) => s.transitions.easing.easeInOut), me = /* @__PURE__ */ o.forwardRef(function(C, a) {
|
|
179
|
+
const u = de({
|
|
180
|
+
props: C,
|
|
181
|
+
name: "MuiTouchRipple"
|
|
182
|
+
}), {
|
|
183
|
+
center: k = !1,
|
|
184
|
+
classes: i = {},
|
|
185
|
+
className: p
|
|
186
|
+
} = u, w = pe(u, Ae), [f, r] = o.useState([]), m = o.useRef(0), b = o.useRef(null);
|
|
187
|
+
o.useEffect(() => {
|
|
188
|
+
b.current && (b.current(), b.current = null);
|
|
189
|
+
}, [f]);
|
|
190
|
+
const d = o.useRef(!1), x = Oe(), l = o.useRef(null), R = o.useRef(null), K = o.useCallback((n) => {
|
|
191
|
+
const {
|
|
192
|
+
pulsate: g,
|
|
193
|
+
rippleX: y,
|
|
194
|
+
rippleY: L,
|
|
195
|
+
rippleSize: _,
|
|
196
|
+
cb: j
|
|
197
|
+
} = n;
|
|
198
|
+
r((T) => [...T, /* @__PURE__ */ F(Je, {
|
|
199
|
+
classes: {
|
|
200
|
+
ripple: M(i.ripple, c.ripple),
|
|
201
|
+
rippleVisible: M(i.rippleVisible, c.rippleVisible),
|
|
202
|
+
ripplePulsate: M(i.ripplePulsate, c.ripplePulsate),
|
|
203
|
+
child: M(i.child, c.child),
|
|
204
|
+
childLeaving: M(i.childLeaving, c.childLeaving),
|
|
205
|
+
childPulsate: M(i.childPulsate, c.childPulsate)
|
|
206
|
+
},
|
|
207
|
+
timeout: Z,
|
|
208
|
+
pulsate: g,
|
|
209
|
+
rippleX: y,
|
|
210
|
+
rippleY: L,
|
|
211
|
+
rippleSize: _
|
|
212
|
+
}, m.current)]), m.current += 1, b.current = j;
|
|
213
|
+
}, [i]), I = o.useCallback((n = {}, g = {}, y = () => {
|
|
214
|
+
}) => {
|
|
215
|
+
const {
|
|
216
|
+
pulsate: L = !1,
|
|
217
|
+
center: _ = k || g.pulsate,
|
|
218
|
+
fakeElement: j = !1
|
|
219
|
+
// For test purposes
|
|
220
|
+
} = g;
|
|
221
|
+
if ((n == null ? void 0 : n.type) === "mousedown" && d.current) {
|
|
222
|
+
d.current = !1;
|
|
223
|
+
return;
|
|
224
|
+
}
|
|
225
|
+
(n == null ? void 0 : n.type) === "touchstart" && (d.current = !0);
|
|
226
|
+
const T = j ? null : R.current, E = T ? T.getBoundingClientRect() : {
|
|
227
|
+
width: 0,
|
|
228
|
+
height: 0,
|
|
229
|
+
left: 0,
|
|
230
|
+
top: 0
|
|
231
|
+
};
|
|
232
|
+
let B, V, D;
|
|
233
|
+
if (_ || n === void 0 || n.clientX === 0 && n.clientY === 0 || !n.clientX && !n.touches)
|
|
234
|
+
B = Math.round(E.width / 2), V = Math.round(E.height / 2);
|
|
235
|
+
else {
|
|
236
|
+
const {
|
|
237
|
+
clientX: S,
|
|
238
|
+
clientY: N
|
|
239
|
+
} = n.touches && n.touches.length > 0 ? n.touches[0] : n;
|
|
240
|
+
B = Math.round(S - E.left), V = Math.round(N - E.top);
|
|
241
|
+
}
|
|
242
|
+
if (_)
|
|
243
|
+
D = Math.sqrt((2 * E.width ** 2 + E.height ** 2) / 3), D % 2 === 0 && (D += 1);
|
|
244
|
+
else {
|
|
245
|
+
const S = Math.max(Math.abs((T ? T.clientWidth : 0) - B), B) * 2 + 2, N = Math.max(Math.abs((T ? T.clientHeight : 0) - V), V) * 2 + 2;
|
|
246
|
+
D = Math.sqrt(S ** 2 + N ** 2);
|
|
247
|
+
}
|
|
248
|
+
n != null && n.touches ? l.current === null && (l.current = () => {
|
|
249
|
+
K({
|
|
250
|
+
pulsate: L,
|
|
251
|
+
rippleX: B,
|
|
252
|
+
rippleY: V,
|
|
253
|
+
rippleSize: D,
|
|
254
|
+
cb: y
|
|
255
|
+
});
|
|
256
|
+
}, x.start(qe, () => {
|
|
257
|
+
l.current && (l.current(), l.current = null);
|
|
258
|
+
})) : K({
|
|
259
|
+
pulsate: L,
|
|
260
|
+
rippleX: B,
|
|
261
|
+
rippleY: V,
|
|
262
|
+
rippleSize: D,
|
|
263
|
+
cb: y
|
|
264
|
+
});
|
|
265
|
+
}, [k, K, x]), O = o.useCallback(() => {
|
|
266
|
+
I({}, {
|
|
267
|
+
pulsate: !0
|
|
268
|
+
});
|
|
269
|
+
}, [I]), U = o.useCallback((n, g) => {
|
|
270
|
+
if (x.clear(), (n == null ? void 0 : n.type) === "touchend" && l.current) {
|
|
271
|
+
l.current(), l.current = null, x.start(0, () => {
|
|
272
|
+
U(n, g);
|
|
273
|
+
});
|
|
274
|
+
return;
|
|
275
|
+
}
|
|
276
|
+
l.current = null, r((y) => y.length > 0 ? y.slice(1) : y), b.current = g;
|
|
277
|
+
}, [x]);
|
|
278
|
+
return o.useImperativeHandle(a, () => ({
|
|
279
|
+
pulsate: O,
|
|
280
|
+
start: I,
|
|
281
|
+
stop: U
|
|
282
|
+
}), [O, I, U]), /* @__PURE__ */ F(Ge, v({
|
|
283
|
+
className: M(c.root, i.root, p),
|
|
284
|
+
ref: R
|
|
285
|
+
}, w, {
|
|
286
|
+
children: /* @__PURE__ */ F(je, {
|
|
287
|
+
component: null,
|
|
288
|
+
exit: !0,
|
|
289
|
+
children: f
|
|
290
|
+
})
|
|
291
|
+
}));
|
|
292
|
+
});
|
|
293
|
+
process.env.NODE_ENV !== "production" && (me.propTypes = {
|
|
294
|
+
/**
|
|
295
|
+
* If `true`, the ripple starts at the center of the component
|
|
296
|
+
* rather than at the point of interaction.
|
|
297
|
+
*/
|
|
298
|
+
center: e.bool,
|
|
299
|
+
/**
|
|
300
|
+
* Override or extend the styles applied to the component.
|
|
301
|
+
* See [CSS API](#css) below for more details.
|
|
302
|
+
*/
|
|
303
|
+
classes: e.object,
|
|
304
|
+
/**
|
|
305
|
+
* @ignore
|
|
306
|
+
*/
|
|
307
|
+
className: e.string
|
|
308
|
+
});
|
|
309
|
+
const Qe = me;
|
|
310
|
+
function Ze(s) {
|
|
311
|
+
return _e("MuiButtonBase", s);
|
|
312
|
+
}
|
|
313
|
+
const et = fe("MuiButtonBase", ["root", "disabled", "focusVisible"]), tt = ["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"], ot = (s) => {
|
|
314
|
+
const {
|
|
315
|
+
disabled: C,
|
|
316
|
+
focusVisible: a,
|
|
317
|
+
focusVisibleClassName: u,
|
|
318
|
+
classes: k
|
|
319
|
+
} = s, p = Fe({
|
|
320
|
+
root: ["root", C && "disabled", a && "focusVisible"]
|
|
321
|
+
}, Ze, k);
|
|
322
|
+
return a && u && (p.root += ` ${u}`), p;
|
|
323
|
+
}, nt = ee("button", {
|
|
324
|
+
name: "MuiButtonBase",
|
|
325
|
+
slot: "Root",
|
|
326
|
+
overridesResolver: (s, C) => C.root
|
|
327
|
+
})({
|
|
328
|
+
display: "inline-flex",
|
|
329
|
+
alignItems: "center",
|
|
330
|
+
justifyContent: "center",
|
|
331
|
+
position: "relative",
|
|
332
|
+
boxSizing: "border-box",
|
|
333
|
+
WebkitTapHighlightColor: "transparent",
|
|
334
|
+
backgroundColor: "transparent",
|
|
335
|
+
// Reset default value
|
|
336
|
+
// We disable the focus ring for mouse, touch and keyboard users.
|
|
337
|
+
outline: 0,
|
|
338
|
+
border: 0,
|
|
339
|
+
margin: 0,
|
|
340
|
+
// Remove the margin in Safari
|
|
341
|
+
borderRadius: 0,
|
|
342
|
+
padding: 0,
|
|
343
|
+
// Remove the padding in Firefox
|
|
344
|
+
cursor: "pointer",
|
|
345
|
+
userSelect: "none",
|
|
346
|
+
verticalAlign: "middle",
|
|
347
|
+
MozAppearance: "none",
|
|
348
|
+
// Reset
|
|
349
|
+
WebkitAppearance: "none",
|
|
350
|
+
// Reset
|
|
351
|
+
textDecoration: "none",
|
|
352
|
+
// So we take precedent over the style of a native <a /> element.
|
|
353
|
+
color: "inherit",
|
|
354
|
+
"&::-moz-focus-inner": {
|
|
355
|
+
borderStyle: "none"
|
|
356
|
+
// Remove Firefox dotted outline.
|
|
357
|
+
},
|
|
358
|
+
[`&.${et.disabled}`]: {
|
|
359
|
+
pointerEvents: "none",
|
|
360
|
+
// Disable link interactions
|
|
361
|
+
cursor: "default"
|
|
362
|
+
},
|
|
363
|
+
"@media print": {
|
|
364
|
+
colorAdjust: "exact"
|
|
365
|
+
}
|
|
366
|
+
}), be = /* @__PURE__ */ o.forwardRef(function(C, a) {
|
|
367
|
+
const u = de({
|
|
368
|
+
props: C,
|
|
369
|
+
name: "MuiButtonBase"
|
|
370
|
+
}), {
|
|
371
|
+
action: k,
|
|
372
|
+
centerRipple: i = !1,
|
|
373
|
+
children: p,
|
|
374
|
+
className: w,
|
|
375
|
+
component: f = "button",
|
|
376
|
+
disabled: r = !1,
|
|
377
|
+
disableRipple: m = !1,
|
|
378
|
+
disableTouchRipple: b = !1,
|
|
379
|
+
focusRipple: d = !1,
|
|
380
|
+
LinkComponent: x = "a",
|
|
381
|
+
onBlur: l,
|
|
382
|
+
onClick: R,
|
|
383
|
+
onContextMenu: K,
|
|
384
|
+
onDragLeave: I,
|
|
385
|
+
onFocus: O,
|
|
386
|
+
onFocusVisible: U,
|
|
387
|
+
onKeyDown: n,
|
|
388
|
+
onKeyUp: g,
|
|
389
|
+
onMouseDown: y,
|
|
390
|
+
onMouseLeave: L,
|
|
391
|
+
onMouseUp: _,
|
|
392
|
+
onTouchEnd: j,
|
|
393
|
+
onTouchMove: T,
|
|
394
|
+
onTouchStart: E,
|
|
395
|
+
tabIndex: B = 0,
|
|
396
|
+
TouchRippleProps: V,
|
|
397
|
+
touchRippleRef: D,
|
|
398
|
+
type: S
|
|
399
|
+
} = u, N = pe(u, tt), z = o.useRef(null), h = o.useRef(null), Re = re(h, D), {
|
|
400
|
+
isFocusVisibleRef: oe,
|
|
401
|
+
onFocus: ge,
|
|
402
|
+
onBlur: ye,
|
|
403
|
+
ref: Te
|
|
404
|
+
} = ze(), [$, Y] = o.useState(!1);
|
|
405
|
+
r && $ && Y(!1), o.useImperativeHandle(k, () => ({
|
|
406
|
+
focusVisible: () => {
|
|
407
|
+
Y(!0), z.current.focus();
|
|
408
|
+
}
|
|
409
|
+
}), []);
|
|
410
|
+
const [W, Me] = o.useState(!1);
|
|
411
|
+
o.useEffect(() => {
|
|
412
|
+
Me(!0);
|
|
413
|
+
}, []);
|
|
414
|
+
const G = W && !m && !r;
|
|
415
|
+
o.useEffect(() => {
|
|
416
|
+
$ && d && !m && W && h.current.pulsate();
|
|
417
|
+
}, [m, d, $, W]);
|
|
418
|
+
function P(t, se, Ue = b) {
|
|
419
|
+
return q((ie) => (se && se(ie), !Ue && h.current && h.current[t](ie), !0));
|
|
420
|
+
}
|
|
421
|
+
const Ce = P("start", y), xe = P("stop", K), Be = P("stop", I), Ne = P("stop", _), Pe = P("stop", (t) => {
|
|
422
|
+
$ && t.preventDefault(), L && L(t);
|
|
423
|
+
}), ke = P("start", E), Ee = P("stop", j), Ve = P("stop", T), De = P("stop", (t) => {
|
|
424
|
+
ye(t), oe.current === !1 && Y(!1), l && l(t);
|
|
425
|
+
}, !1), we = q((t) => {
|
|
426
|
+
z.current || (z.current = t.currentTarget), ge(t), oe.current === !0 && (Y(!0), U && U(t)), O && O(t);
|
|
427
|
+
}), J = () => {
|
|
428
|
+
const t = z.current;
|
|
429
|
+
return f && f !== "button" && !(t.tagName === "A" && t.href);
|
|
430
|
+
}, Q = o.useRef(!1), Le = q((t) => {
|
|
431
|
+
d && !Q.current && $ && h.current && t.key === " " && (Q.current = !0, h.current.stop(t, () => {
|
|
432
|
+
h.current.start(t);
|
|
433
|
+
})), t.target === t.currentTarget && J() && t.key === " " && t.preventDefault(), n && n(t), t.target === t.currentTarget && J() && t.key === "Enter" && !r && (t.preventDefault(), R && R(t));
|
|
434
|
+
}), Se = q((t) => {
|
|
435
|
+
d && t.key === " " && h.current && $ && !t.defaultPrevented && (Q.current = !1, h.current.stop(t, () => {
|
|
436
|
+
h.current.pulsate(t);
|
|
437
|
+
})), g && g(t), R && t.target === t.currentTarget && J() && t.key === " " && !t.defaultPrevented && R(t);
|
|
438
|
+
});
|
|
439
|
+
let A = f;
|
|
440
|
+
A === "button" && (N.href || N.to) && (A = x);
|
|
441
|
+
const X = {};
|
|
442
|
+
A === "button" ? (X.type = S === void 0 ? "button" : S, X.disabled = r) : (!N.href && !N.to && (X.role = "button"), r && (X["aria-disabled"] = r));
|
|
443
|
+
const $e = re(a, Te, z);
|
|
444
|
+
process.env.NODE_ENV !== "production" && o.useEffect(() => {
|
|
445
|
+
G && !h.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(`
|
|
446
|
+
`));
|
|
447
|
+
}, [G]);
|
|
448
|
+
const ne = v({}, u, {
|
|
449
|
+
centerRipple: i,
|
|
450
|
+
component: f,
|
|
451
|
+
disabled: r,
|
|
452
|
+
disableRipple: m,
|
|
453
|
+
disableTouchRipple: b,
|
|
454
|
+
focusRipple: d,
|
|
455
|
+
tabIndex: B,
|
|
456
|
+
focusVisible: $
|
|
457
|
+
}), Ie = ot(ne);
|
|
458
|
+
return /* @__PURE__ */ Ke(nt, v({
|
|
459
|
+
as: A,
|
|
460
|
+
className: M(Ie.root, w),
|
|
461
|
+
ownerState: ne,
|
|
462
|
+
onBlur: De,
|
|
463
|
+
onClick: R,
|
|
464
|
+
onContextMenu: xe,
|
|
465
|
+
onFocus: we,
|
|
466
|
+
onKeyDown: Le,
|
|
467
|
+
onKeyUp: Se,
|
|
468
|
+
onMouseDown: Ce,
|
|
469
|
+
onMouseLeave: Pe,
|
|
470
|
+
onMouseUp: Ne,
|
|
471
|
+
onDragLeave: Be,
|
|
472
|
+
onTouchEnd: Ee,
|
|
473
|
+
onTouchMove: Ve,
|
|
474
|
+
onTouchStart: ke,
|
|
475
|
+
ref: $e,
|
|
476
|
+
tabIndex: r ? -1 : B,
|
|
477
|
+
type: S
|
|
478
|
+
}, X, N, {
|
|
479
|
+
children: [p, G ? (
|
|
480
|
+
/* TouchRipple is only needed client-side, x2 boost on the server. */
|
|
481
|
+
/* @__PURE__ */ F(Qe, v({
|
|
482
|
+
ref: Re,
|
|
483
|
+
center: i
|
|
484
|
+
}, V))
|
|
485
|
+
) : null]
|
|
486
|
+
}));
|
|
487
|
+
});
|
|
488
|
+
process.env.NODE_ENV !== "production" && (be.propTypes = {
|
|
489
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
490
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
491
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
492
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
493
|
+
/**
|
|
494
|
+
* A ref for imperative actions.
|
|
495
|
+
* It currently only supports `focusVisible()` action.
|
|
496
|
+
*/
|
|
497
|
+
action: Xe,
|
|
498
|
+
/**
|
|
499
|
+
* If `true`, the ripples are centered.
|
|
500
|
+
* They won't start at the cursor interaction position.
|
|
501
|
+
* @default false
|
|
502
|
+
*/
|
|
503
|
+
centerRipple: e.bool,
|
|
504
|
+
/**
|
|
505
|
+
* The content of the component.
|
|
506
|
+
*/
|
|
507
|
+
children: e.node,
|
|
508
|
+
/**
|
|
509
|
+
* Override or extend the styles applied to the component.
|
|
510
|
+
*/
|
|
511
|
+
classes: e.object,
|
|
512
|
+
/**
|
|
513
|
+
* @ignore
|
|
514
|
+
*/
|
|
515
|
+
className: e.string,
|
|
516
|
+
/**
|
|
517
|
+
* The component used for the root node.
|
|
518
|
+
* Either a string to use a HTML element or a component.
|
|
519
|
+
*/
|
|
520
|
+
component: Ye,
|
|
521
|
+
/**
|
|
522
|
+
* If `true`, the component is disabled.
|
|
523
|
+
* @default false
|
|
524
|
+
*/
|
|
525
|
+
disabled: e.bool,
|
|
526
|
+
/**
|
|
527
|
+
* If `true`, the ripple effect is disabled.
|
|
528
|
+
*
|
|
529
|
+
* ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure
|
|
530
|
+
* to highlight the element by applying separate styles with the `.Mui-focusVisible` class.
|
|
531
|
+
* @default false
|
|
532
|
+
*/
|
|
533
|
+
disableRipple: e.bool,
|
|
534
|
+
/**
|
|
535
|
+
* If `true`, the touch ripple effect is disabled.
|
|
536
|
+
* @default false
|
|
537
|
+
*/
|
|
538
|
+
disableTouchRipple: e.bool,
|
|
539
|
+
/**
|
|
540
|
+
* If `true`, the base button will have a keyboard focus ripple.
|
|
541
|
+
* @default false
|
|
542
|
+
*/
|
|
543
|
+
focusRipple: e.bool,
|
|
544
|
+
/**
|
|
545
|
+
* This prop can help identify which element has keyboard focus.
|
|
546
|
+
* The class name will be applied when the element gains the focus through keyboard interaction.
|
|
547
|
+
* It's a polyfill for the [CSS :focus-visible selector](https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo).
|
|
548
|
+
* The rationale for using this feature [is explained here](https://github.com/WICG/focus-visible/blob/HEAD/explainer.md).
|
|
549
|
+
* A [polyfill can be used](https://github.com/WICG/focus-visible) to apply a `focus-visible` class to other components
|
|
550
|
+
* if needed.
|
|
551
|
+
*/
|
|
552
|
+
focusVisibleClassName: e.string,
|
|
553
|
+
/**
|
|
554
|
+
* @ignore
|
|
555
|
+
*/
|
|
556
|
+
href: e.any,
|
|
557
|
+
/**
|
|
558
|
+
* The component used to render a link when the `href` prop is provided.
|
|
559
|
+
* @default 'a'
|
|
560
|
+
*/
|
|
561
|
+
LinkComponent: e.elementType,
|
|
562
|
+
/**
|
|
563
|
+
* @ignore
|
|
564
|
+
*/
|
|
565
|
+
onBlur: e.func,
|
|
566
|
+
/**
|
|
567
|
+
* @ignore
|
|
568
|
+
*/
|
|
569
|
+
onClick: e.func,
|
|
570
|
+
/**
|
|
571
|
+
* @ignore
|
|
572
|
+
*/
|
|
573
|
+
onContextMenu: e.func,
|
|
574
|
+
/**
|
|
575
|
+
* @ignore
|
|
576
|
+
*/
|
|
577
|
+
onDragLeave: e.func,
|
|
578
|
+
/**
|
|
579
|
+
* @ignore
|
|
580
|
+
*/
|
|
581
|
+
onFocus: e.func,
|
|
582
|
+
/**
|
|
583
|
+
* Callback fired when the component is focused with a keyboard.
|
|
584
|
+
* We trigger a `onFocus` callback too.
|
|
585
|
+
*/
|
|
586
|
+
onFocusVisible: e.func,
|
|
587
|
+
/**
|
|
588
|
+
* @ignore
|
|
589
|
+
*/
|
|
590
|
+
onKeyDown: e.func,
|
|
591
|
+
/**
|
|
592
|
+
* @ignore
|
|
593
|
+
*/
|
|
594
|
+
onKeyUp: e.func,
|
|
595
|
+
/**
|
|
596
|
+
* @ignore
|
|
597
|
+
*/
|
|
598
|
+
onMouseDown: e.func,
|
|
599
|
+
/**
|
|
600
|
+
* @ignore
|
|
601
|
+
*/
|
|
602
|
+
onMouseLeave: e.func,
|
|
603
|
+
/**
|
|
604
|
+
* @ignore
|
|
605
|
+
*/
|
|
606
|
+
onMouseUp: e.func,
|
|
607
|
+
/**
|
|
608
|
+
* @ignore
|
|
609
|
+
*/
|
|
610
|
+
onTouchEnd: e.func,
|
|
611
|
+
/**
|
|
612
|
+
* @ignore
|
|
613
|
+
*/
|
|
614
|
+
onTouchMove: e.func,
|
|
615
|
+
/**
|
|
616
|
+
* @ignore
|
|
617
|
+
*/
|
|
618
|
+
onTouchStart: e.func,
|
|
619
|
+
/**
|
|
620
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
621
|
+
*/
|
|
622
|
+
sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
|
|
623
|
+
/**
|
|
624
|
+
* @default 0
|
|
625
|
+
*/
|
|
626
|
+
tabIndex: e.number,
|
|
627
|
+
/**
|
|
628
|
+
* Props applied to the `TouchRipple` element.
|
|
629
|
+
*/
|
|
630
|
+
TouchRippleProps: e.object,
|
|
631
|
+
/**
|
|
632
|
+
* A ref that points to the `TouchRipple` element.
|
|
633
|
+
*/
|
|
634
|
+
touchRippleRef: e.oneOfType([e.func, e.shape({
|
|
635
|
+
current: e.shape({
|
|
636
|
+
pulsate: e.func.isRequired,
|
|
637
|
+
start: e.func.isRequired,
|
|
638
|
+
stop: e.func.isRequired
|
|
639
|
+
})
|
|
640
|
+
})]),
|
|
641
|
+
/**
|
|
642
|
+
* @ignore
|
|
643
|
+
*/
|
|
644
|
+
type: e.oneOfType([e.oneOf(["button", "reset", "submit"]), e.string])
|
|
645
|
+
});
|
|
646
|
+
const ht = be;
|
|
647
|
+
export {
|
|
648
|
+
ht as B
|
|
649
|
+
};
|