@loopr-ai/craft 0.2.0 → 0.3.0
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/ButtonBase-750a4103.js +832 -0
- package/dist/{TransitionGroupContext-ee5b34c9.js → TransitionGroupContext-e16207d6.js} +47 -52
- package/dist/chainPropTypes-004bf492.js +8 -0
- package/dist/components/cell/AvatarGroup/index.d.ts +31 -0
- package/dist/components/cell/AvatarGroup/index.js +390 -0
- package/dist/components/cell/Button/index.js +207 -1033
- package/dist/components/cell/Chip/index.d.ts +27 -0
- package/dist/components/cell/Chip/index.js +483 -0
- package/dist/components/cell/ProgressBar/index.js +4 -3
- package/dist/components/cell/Search/index.js +5743 -5924
- package/dist/components/cell/Typography/index.js +2 -2
- package/dist/createSvgIcon-5dcb7caa.js +184 -0
- package/dist/{createTheme-eb26b87a.js → createTheme-95c30431.js} +2 -2
- package/dist/{exactProp-0925aa6f.js → exactProp-a28c53c1.js} +1 -1
- package/dist/global/theme.js +1 -1
- package/dist/main.d.ts +3 -1
- package/dist/main.js +14 -10
- package/dist/providers/CraftThemeProvider.d.ts +3 -3
- package/dist/providers/CraftThemeProvider.js +60 -53
- package/dist/{styled-b8bfdd6b.js → styled-05df7dc6.js} +1 -1
- package/dist/unsupportedProp-3dbf01f6.js +9 -0
- package/dist/{useTheme-a9e2b32c.js → useTheme-462e5dc6.js} +1 -1
- package/package.json +1 -1
|
@@ -1,1087 +1,263 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { getColorToHex as
|
|
3
|
-
import {
|
|
4
|
-
import * as
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
function lo(e) {
|
|
10
|
-
if (e === void 0)
|
|
11
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
12
|
-
return e;
|
|
1
|
+
import { jsx as C, jsxs as F } from "react/jsx-runtime";
|
|
2
|
+
import { getColorToHex as v } from "../../../global/colors.js";
|
|
3
|
+
import { g as U, c as e, _ as t, e as b, a as D, P as a } from "../../../createTheme-95c30431.js";
|
|
4
|
+
import * as p from "react";
|
|
5
|
+
import { g as H, s as y, r as A, e as q, a as J, c as R, b as K } from "../../../styled-05df7dc6.js";
|
|
6
|
+
import { B as Q } from "../../../ButtonBase-750a4103.js";
|
|
7
|
+
function X(o) {
|
|
8
|
+
return U("MuiButton", o);
|
|
13
9
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
return i;
|
|
20
|
-
}).forEach(function(i) {
|
|
21
|
-
s[i.key] = t(i);
|
|
22
|
-
}), s;
|
|
23
|
-
}
|
|
24
|
-
function co(e, o) {
|
|
25
|
-
e = e || {}, o = o || {};
|
|
26
|
-
function t(b) {
|
|
27
|
-
return b in o ? o[b] : e[b];
|
|
28
|
-
}
|
|
29
|
-
var s = /* @__PURE__ */ Object.create(null), i = [];
|
|
30
|
-
for (var r in e)
|
|
31
|
-
r in o ? i.length && (s[r] = i, i = []) : i.push(r);
|
|
32
|
-
var a, p = {};
|
|
33
|
-
for (var c in o) {
|
|
34
|
-
if (s[c])
|
|
35
|
-
for (a = 0; a < s[c].length; a++) {
|
|
36
|
-
var d = s[c][a];
|
|
37
|
-
p[s[c][a]] = t(d);
|
|
38
|
-
}
|
|
39
|
-
p[c] = t(c);
|
|
40
|
-
}
|
|
41
|
-
for (a = 0; a < i.length; a++)
|
|
42
|
-
p[i[a]] = t(i[a]);
|
|
43
|
-
return p;
|
|
44
|
-
}
|
|
45
|
-
function K(e, o, t) {
|
|
46
|
-
return t[o] != null ? t[o] : e.props[o];
|
|
47
|
-
}
|
|
48
|
-
function uo(e, o) {
|
|
49
|
-
return fe(e.children, function(t) {
|
|
50
|
-
return ne(t, {
|
|
51
|
-
onExited: o.bind(null, t),
|
|
52
|
-
in: !0,
|
|
53
|
-
appear: K(t, "appear", e),
|
|
54
|
-
enter: K(t, "enter", e),
|
|
55
|
-
exit: K(t, "exit", e)
|
|
56
|
-
});
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
function po(e, o, t) {
|
|
60
|
-
var s = fe(e.children), i = co(o, s);
|
|
61
|
-
return Object.keys(i).forEach(function(r) {
|
|
62
|
-
var a = i[r];
|
|
63
|
-
if (oe(a)) {
|
|
64
|
-
var p = r in o, c = r in s, d = o[r], b = oe(d) && !d.props.in;
|
|
65
|
-
c && (!p || b) ? i[r] = ne(a, {
|
|
66
|
-
onExited: t.bind(null, a),
|
|
67
|
-
in: !0,
|
|
68
|
-
exit: K(a, "exit", e),
|
|
69
|
-
enter: K(a, "enter", e)
|
|
70
|
-
}) : !c && p && !b ? i[r] = ne(a, {
|
|
71
|
-
in: !1
|
|
72
|
-
}) : c && p && oe(d) && (i[r] = ne(a, {
|
|
73
|
-
onExited: t.bind(null, a),
|
|
74
|
-
in: d.props.in,
|
|
75
|
-
exit: K(a, "exit", e),
|
|
76
|
-
enter: K(a, "enter", e)
|
|
77
|
-
}));
|
|
78
|
-
}
|
|
79
|
-
}), i;
|
|
80
|
-
}
|
|
81
|
-
var fo = Object.values || function(e) {
|
|
82
|
-
return Object.keys(e).map(function(o) {
|
|
83
|
-
return e[o];
|
|
84
|
-
});
|
|
85
|
-
}, bo = {
|
|
86
|
-
component: "div",
|
|
87
|
-
childFactory: function(o) {
|
|
88
|
-
return o;
|
|
89
|
-
}
|
|
90
|
-
}, be = /* @__PURE__ */ function(e) {
|
|
91
|
-
io(o, e);
|
|
92
|
-
function o(s, i) {
|
|
93
|
-
var r;
|
|
94
|
-
r = e.call(this, s, i) || this;
|
|
95
|
-
var a = r.handleExited.bind(lo(r));
|
|
96
|
-
return r.state = {
|
|
97
|
-
contextValue: {
|
|
98
|
-
isMounting: !0
|
|
99
|
-
},
|
|
100
|
-
handleExited: a,
|
|
101
|
-
firstRender: !0
|
|
102
|
-
}, r;
|
|
103
|
-
}
|
|
104
|
-
var t = o.prototype;
|
|
105
|
-
return t.componentDidMount = function() {
|
|
106
|
-
this.mounted = !0, this.setState({
|
|
107
|
-
contextValue: {
|
|
108
|
-
isMounting: !1
|
|
109
|
-
}
|
|
110
|
-
});
|
|
111
|
-
}, t.componentWillUnmount = function() {
|
|
112
|
-
this.mounted = !1;
|
|
113
|
-
}, o.getDerivedStateFromProps = function(i, r) {
|
|
114
|
-
var a = r.children, p = r.handleExited, c = r.firstRender;
|
|
115
|
-
return {
|
|
116
|
-
children: c ? uo(i, p) : po(i, a, p),
|
|
117
|
-
firstRender: !1
|
|
118
|
-
};
|
|
119
|
-
}, t.handleExited = function(i, r) {
|
|
120
|
-
var a = fe(this.props.children);
|
|
121
|
-
i.key in a || (i.props.onExited && i.props.onExited(r), this.mounted && this.setState(function(p) {
|
|
122
|
-
var c = m({}, p.children);
|
|
123
|
-
return delete c[i.key], {
|
|
124
|
-
children: c
|
|
125
|
-
};
|
|
126
|
-
}));
|
|
127
|
-
}, t.render = function() {
|
|
128
|
-
var i = this.props, r = i.component, a = i.childFactory, p = te(i, ["component", "childFactory"]), c = this.state.contextValue, d = fo(this.state.children).map(a);
|
|
129
|
-
return delete p.appear, delete p.enter, delete p.exit, r === null ? /* @__PURE__ */ Q.createElement(xe.Provider, {
|
|
130
|
-
value: c
|
|
131
|
-
}, d) : /* @__PURE__ */ Q.createElement(xe.Provider, {
|
|
132
|
-
value: c
|
|
133
|
-
}, /* @__PURE__ */ Q.createElement(r, p, d));
|
|
134
|
-
}, o;
|
|
135
|
-
}(Q.Component);
|
|
136
|
-
be.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
137
|
-
/**
|
|
138
|
-
* `<TransitionGroup>` renders a `<div>` by default. You can change this
|
|
139
|
-
* behavior by providing a `component` prop.
|
|
140
|
-
* If you use React v16+ and would like to avoid a wrapping `<div>` element
|
|
141
|
-
* you can pass in `component={null}`. This is useful if the wrapping div
|
|
142
|
-
* borks your css styles.
|
|
143
|
-
*/
|
|
144
|
-
component: n.any,
|
|
145
|
-
/**
|
|
146
|
-
* A set of `<Transition>` components, that are toggled `in` and out as they
|
|
147
|
-
* leave. the `<TransitionGroup>` will inject specific transition props, so
|
|
148
|
-
* remember to spread them through if you are wrapping the `<Transition>` as
|
|
149
|
-
* with our `<Fade>` example.
|
|
150
|
-
*
|
|
151
|
-
* While this component is meant for multiple `Transition` or `CSSTransition`
|
|
152
|
-
* children, sometimes you may want to have a single transition child with
|
|
153
|
-
* content that you want to be transitioned out and in when you change it
|
|
154
|
-
* (e.g. routes, images etc.) In that case you can change the `key` prop of
|
|
155
|
-
* the transition child as you change its content, this will cause
|
|
156
|
-
* `TransitionGroup` to transition the child out and back in.
|
|
157
|
-
*/
|
|
158
|
-
children: n.node,
|
|
159
|
-
/**
|
|
160
|
-
* A convenience prop that enables or disables appear animations
|
|
161
|
-
* for all children. Note that specifying this will override any defaults set
|
|
162
|
-
* on individual children Transitions.
|
|
163
|
-
*/
|
|
164
|
-
appear: n.bool,
|
|
165
|
-
/**
|
|
166
|
-
* A convenience prop that enables or disables enter animations
|
|
167
|
-
* for all children. Note that specifying this will override any defaults set
|
|
168
|
-
* on individual children Transitions.
|
|
169
|
-
*/
|
|
170
|
-
enter: n.bool,
|
|
171
|
-
/**
|
|
172
|
-
* A convenience prop that enables or disables exit animations
|
|
173
|
-
* for all children. Note that specifying this will override any defaults set
|
|
174
|
-
* on individual children Transitions.
|
|
175
|
-
*/
|
|
176
|
-
exit: n.bool,
|
|
177
|
-
/**
|
|
178
|
-
* You may need to apply reactive updates to a child as it is exiting.
|
|
179
|
-
* This is generally done by using `cloneElement` however in the case of an exiting
|
|
180
|
-
* child the element has already been removed and not accessible to the consumer.
|
|
181
|
-
*
|
|
182
|
-
* If you do need to update a child as it leaves you can provide a `childFactory`
|
|
183
|
-
* to wrap every child, even the ones that are leaving.
|
|
184
|
-
*
|
|
185
|
-
* @type Function(child: ReactElement) -> ReactElement
|
|
186
|
-
*/
|
|
187
|
-
childFactory: n.func
|
|
188
|
-
} : {};
|
|
189
|
-
be.defaultProps = bo;
|
|
190
|
-
const ho = be;
|
|
191
|
-
function $e(e) {
|
|
192
|
-
const {
|
|
193
|
-
className: o,
|
|
194
|
-
classes: t,
|
|
195
|
-
pulsate: s = !1,
|
|
196
|
-
rippleX: i,
|
|
197
|
-
rippleY: r,
|
|
198
|
-
rippleSize: a,
|
|
199
|
-
in: p,
|
|
200
|
-
onExited: c,
|
|
201
|
-
timeout: d
|
|
202
|
-
} = e, [b, v] = u.useState(!1), x = M(o, t.ripple, t.rippleVisible, s && t.ripplePulsate), C = {
|
|
203
|
-
width: a,
|
|
204
|
-
height: a,
|
|
205
|
-
top: -(a / 2) + r,
|
|
206
|
-
left: -(a / 2) + i
|
|
207
|
-
}, h = M(t.child, b && t.childLeaving, s && t.childPulsate);
|
|
208
|
-
return !p && !b && v(!0), u.useEffect(() => {
|
|
209
|
-
if (!p && c != null) {
|
|
210
|
-
const R = setTimeout(c, d);
|
|
211
|
-
return () => {
|
|
212
|
-
clearTimeout(R);
|
|
213
|
-
};
|
|
214
|
-
}
|
|
215
|
-
}, [c, p, d]), /* @__PURE__ */ P("span", {
|
|
216
|
-
className: x,
|
|
217
|
-
style: C,
|
|
218
|
-
children: /* @__PURE__ */ P("span", {
|
|
219
|
-
className: h
|
|
220
|
-
})
|
|
221
|
-
});
|
|
222
|
-
}
|
|
223
|
-
process.env.NODE_ENV !== "production" && ($e.propTypes = {
|
|
224
|
-
/**
|
|
225
|
-
* Override or extend the styles applied to the component.
|
|
226
|
-
* See [CSS API](#css) below for more details.
|
|
227
|
-
*/
|
|
228
|
-
classes: n.object.isRequired,
|
|
229
|
-
className: n.string,
|
|
230
|
-
/**
|
|
231
|
-
* @ignore - injected from TransitionGroup
|
|
232
|
-
*/
|
|
233
|
-
in: n.bool,
|
|
234
|
-
/**
|
|
235
|
-
* @ignore - injected from TransitionGroup
|
|
236
|
-
*/
|
|
237
|
-
onExited: n.func,
|
|
238
|
-
/**
|
|
239
|
-
* If `true`, the ripple pulsates, typically indicating the keyboard focus state of an element.
|
|
240
|
-
*/
|
|
241
|
-
pulsate: n.bool,
|
|
242
|
-
/**
|
|
243
|
-
* Diameter of the ripple.
|
|
244
|
-
*/
|
|
245
|
-
rippleSize: n.number,
|
|
246
|
-
/**
|
|
247
|
-
* Horizontal position of the ripple center.
|
|
248
|
-
*/
|
|
249
|
-
rippleX: n.number,
|
|
250
|
-
/**
|
|
251
|
-
* Vertical position of the ripple center.
|
|
252
|
-
*/
|
|
253
|
-
rippleY: n.number,
|
|
254
|
-
/**
|
|
255
|
-
* exit delay
|
|
256
|
-
*/
|
|
257
|
-
timeout: n.number.isRequired
|
|
258
|
-
});
|
|
259
|
-
const mo = ue("MuiTouchRipple", ["root", "ripple", "rippleVisible", "ripplePulsate", "child", "childLeaving", "childPulsate"]), z = mo, go = ["center", "classes", "className"];
|
|
260
|
-
let ie = (e) => e, Ce, Re, Te, Ee;
|
|
261
|
-
const ce = 550, vo = 80, xo = de(Ce || (Ce = ie`
|
|
262
|
-
0% {
|
|
263
|
-
transform: scale(0);
|
|
264
|
-
opacity: 0.1;
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
100% {
|
|
268
|
-
transform: scale(1);
|
|
269
|
-
opacity: 0.3;
|
|
270
|
-
}
|
|
271
|
-
`)), yo = de(Re || (Re = ie`
|
|
272
|
-
0% {
|
|
273
|
-
opacity: 1;
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
100% {
|
|
277
|
-
opacity: 0;
|
|
278
|
-
}
|
|
279
|
-
`)), Co = de(Te || (Te = ie`
|
|
280
|
-
0% {
|
|
281
|
-
transform: scale(1);
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
50% {
|
|
285
|
-
transform: scale(0.92);
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
100% {
|
|
289
|
-
transform: scale(1);
|
|
290
|
-
}
|
|
291
|
-
`)), Ro = A("span", {
|
|
292
|
-
name: "MuiTouchRipple",
|
|
293
|
-
slot: "Root"
|
|
294
|
-
})({
|
|
295
|
-
overflow: "hidden",
|
|
296
|
-
pointerEvents: "none",
|
|
297
|
-
position: "absolute",
|
|
298
|
-
zIndex: 0,
|
|
299
|
-
top: 0,
|
|
300
|
-
right: 0,
|
|
301
|
-
bottom: 0,
|
|
302
|
-
left: 0,
|
|
303
|
-
borderRadius: "inherit"
|
|
304
|
-
}), To = A($e, {
|
|
305
|
-
name: "MuiTouchRipple",
|
|
306
|
-
slot: "Ripple"
|
|
307
|
-
})(Ee || (Ee = ie`
|
|
308
|
-
opacity: 0;
|
|
309
|
-
position: absolute;
|
|
310
|
-
|
|
311
|
-
&.${0} {
|
|
312
|
-
opacity: 0.3;
|
|
313
|
-
transform: scale(1);
|
|
314
|
-
animation-name: ${0};
|
|
315
|
-
animation-duration: ${0}ms;
|
|
316
|
-
animation-timing-function: ${0};
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
&.${0} {
|
|
320
|
-
animation-duration: ${0}ms;
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
& .${0} {
|
|
324
|
-
opacity: 1;
|
|
325
|
-
display: block;
|
|
326
|
-
width: 100%;
|
|
327
|
-
height: 100%;
|
|
328
|
-
border-radius: 50%;
|
|
329
|
-
background-color: currentColor;
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
& .${0} {
|
|
333
|
-
opacity: 0;
|
|
334
|
-
animation-name: ${0};
|
|
335
|
-
animation-duration: ${0}ms;
|
|
336
|
-
animation-timing-function: ${0};
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
& .${0} {
|
|
340
|
-
position: absolute;
|
|
341
|
-
/* @noflip */
|
|
342
|
-
left: 0px;
|
|
343
|
-
top: 0;
|
|
344
|
-
animation-name: ${0};
|
|
345
|
-
animation-duration: 2500ms;
|
|
346
|
-
animation-timing-function: ${0};
|
|
347
|
-
animation-iteration-count: infinite;
|
|
348
|
-
animation-delay: 200ms;
|
|
349
|
-
}
|
|
350
|
-
`), z.rippleVisible, xo, ce, ({
|
|
351
|
-
theme: e
|
|
352
|
-
}) => e.transitions.easing.easeInOut, z.ripplePulsate, ({
|
|
353
|
-
theme: e
|
|
354
|
-
}) => e.transitions.duration.shorter, z.child, z.childLeaving, yo, ce, ({
|
|
355
|
-
theme: e
|
|
356
|
-
}) => e.transitions.easing.easeInOut, z.childPulsate, Co, ({
|
|
357
|
-
theme: e
|
|
358
|
-
}) => e.transitions.easing.easeInOut), Ne = /* @__PURE__ */ u.forwardRef(function(o, t) {
|
|
359
|
-
const s = pe({
|
|
360
|
-
props: o,
|
|
361
|
-
name: "MuiTouchRipple"
|
|
362
|
-
}), {
|
|
363
|
-
center: i = !1,
|
|
364
|
-
classes: r = {},
|
|
365
|
-
className: a
|
|
366
|
-
} = s, p = te(s, go), [c, d] = u.useState([]), b = u.useRef(0), v = u.useRef(null);
|
|
367
|
-
u.useEffect(() => {
|
|
368
|
-
v.current && (v.current(), v.current = null);
|
|
369
|
-
}, [c]);
|
|
370
|
-
const x = u.useRef(!1), C = u.useRef(0), h = u.useRef(null), R = u.useRef(null);
|
|
371
|
-
u.useEffect(() => () => {
|
|
372
|
-
C.current && clearTimeout(C.current);
|
|
373
|
-
}, []);
|
|
374
|
-
const U = u.useCallback((f) => {
|
|
375
|
-
const {
|
|
376
|
-
pulsate: T,
|
|
377
|
-
rippleX: g,
|
|
378
|
-
rippleY: y,
|
|
379
|
-
rippleSize: D,
|
|
380
|
-
cb: j
|
|
381
|
-
} = f;
|
|
382
|
-
d((E) => [...E, /* @__PURE__ */ P(To, {
|
|
383
|
-
classes: {
|
|
384
|
-
ripple: M(r.ripple, z.ripple),
|
|
385
|
-
rippleVisible: M(r.rippleVisible, z.rippleVisible),
|
|
386
|
-
ripplePulsate: M(r.ripplePulsate, z.ripplePulsate),
|
|
387
|
-
child: M(r.child, z.child),
|
|
388
|
-
childLeaving: M(r.childLeaving, z.childLeaving),
|
|
389
|
-
childPulsate: M(r.childPulsate, z.childPulsate)
|
|
390
|
-
},
|
|
391
|
-
timeout: ce,
|
|
392
|
-
pulsate: T,
|
|
393
|
-
rippleX: g,
|
|
394
|
-
rippleY: y,
|
|
395
|
-
rippleSize: D
|
|
396
|
-
}, b.current)]), b.current += 1, v.current = j;
|
|
397
|
-
}, [r]), O = u.useCallback((f = {}, T = {}, g = () => {
|
|
398
|
-
}) => {
|
|
399
|
-
const {
|
|
400
|
-
pulsate: y = !1,
|
|
401
|
-
center: D = i || T.pulsate,
|
|
402
|
-
fakeElement: j = !1
|
|
403
|
-
// For test purposes
|
|
404
|
-
} = T;
|
|
405
|
-
if ((f == null ? void 0 : f.type) === "mousedown" && x.current) {
|
|
406
|
-
x.current = !1;
|
|
407
|
-
return;
|
|
408
|
-
}
|
|
409
|
-
(f == null ? void 0 : f.type) === "touchstart" && (x.current = !0);
|
|
410
|
-
const E = j ? null : R.current, L = E ? E.getBoundingClientRect() : {
|
|
411
|
-
width: 0,
|
|
412
|
-
height: 0,
|
|
413
|
-
left: 0,
|
|
414
|
-
top: 0
|
|
415
|
-
};
|
|
416
|
-
let I, F, _;
|
|
417
|
-
if (D || f === void 0 || f.clientX === 0 && f.clientY === 0 || !f.clientX && !f.touches)
|
|
418
|
-
I = Math.round(L.width / 2), F = Math.round(L.height / 2);
|
|
419
|
-
else {
|
|
420
|
-
const {
|
|
421
|
-
clientX: W,
|
|
422
|
-
clientY: k
|
|
423
|
-
} = f.touches && f.touches.length > 0 ? f.touches[0] : f;
|
|
424
|
-
I = Math.round(W - L.left), F = Math.round(k - L.top);
|
|
425
|
-
}
|
|
426
|
-
if (D)
|
|
427
|
-
_ = Math.sqrt((2 * L.width ** 2 + L.height ** 2) / 3), _ % 2 === 0 && (_ += 1);
|
|
428
|
-
else {
|
|
429
|
-
const W = Math.max(Math.abs((E ? E.clientWidth : 0) - I), I) * 2 + 2, k = Math.max(Math.abs((E ? E.clientHeight : 0) - F), F) * 2 + 2;
|
|
430
|
-
_ = Math.sqrt(W ** 2 + k ** 2);
|
|
431
|
-
}
|
|
432
|
-
f != null && f.touches ? h.current === null && (h.current = () => {
|
|
433
|
-
U({
|
|
434
|
-
pulsate: y,
|
|
435
|
-
rippleX: I,
|
|
436
|
-
rippleY: F,
|
|
437
|
-
rippleSize: _,
|
|
438
|
-
cb: g
|
|
439
|
-
});
|
|
440
|
-
}, C.current = setTimeout(() => {
|
|
441
|
-
h.current && (h.current(), h.current = null);
|
|
442
|
-
}, vo)) : U({
|
|
443
|
-
pulsate: y,
|
|
444
|
-
rippleX: I,
|
|
445
|
-
rippleY: F,
|
|
446
|
-
rippleSize: _,
|
|
447
|
-
cb: g
|
|
448
|
-
});
|
|
449
|
-
}, [i, U]), S = u.useCallback(() => {
|
|
450
|
-
O({}, {
|
|
451
|
-
pulsate: !0
|
|
452
|
-
});
|
|
453
|
-
}, [O]), N = u.useCallback((f, T) => {
|
|
454
|
-
if (clearTimeout(C.current), (f == null ? void 0 : f.type) === "touchend" && h.current) {
|
|
455
|
-
h.current(), h.current = null, C.current = setTimeout(() => {
|
|
456
|
-
N(f, T);
|
|
457
|
-
});
|
|
458
|
-
return;
|
|
459
|
-
}
|
|
460
|
-
h.current = null, d((g) => g.length > 0 ? g.slice(1) : g), v.current = T;
|
|
461
|
-
}, []);
|
|
462
|
-
return u.useImperativeHandle(t, () => ({
|
|
463
|
-
pulsate: S,
|
|
464
|
-
start: O,
|
|
465
|
-
stop: N
|
|
466
|
-
}), [S, O, N]), /* @__PURE__ */ P(Ro, m({
|
|
467
|
-
className: M(z.root, r.root, a),
|
|
468
|
-
ref: R
|
|
469
|
-
}, p, {
|
|
470
|
-
children: /* @__PURE__ */ P(ho, {
|
|
471
|
-
component: null,
|
|
472
|
-
exit: !0,
|
|
473
|
-
children: c
|
|
474
|
-
})
|
|
475
|
-
}));
|
|
476
|
-
});
|
|
477
|
-
process.env.NODE_ENV !== "production" && (Ne.propTypes = {
|
|
478
|
-
/**
|
|
479
|
-
* If `true`, the ripple starts at the center of the component
|
|
480
|
-
* rather than at the point of interaction.
|
|
481
|
-
*/
|
|
482
|
-
center: n.bool,
|
|
483
|
-
/**
|
|
484
|
-
* Override or extend the styles applied to the component.
|
|
485
|
-
* See [CSS API](#css) below for more details.
|
|
486
|
-
*/
|
|
487
|
-
classes: n.object,
|
|
488
|
-
/**
|
|
489
|
-
* @ignore
|
|
490
|
-
*/
|
|
491
|
-
className: n.string
|
|
492
|
-
});
|
|
493
|
-
const Eo = Ne;
|
|
494
|
-
function Mo(e) {
|
|
495
|
-
return ze("MuiButtonBase", e);
|
|
496
|
-
}
|
|
497
|
-
const zo = ue("MuiButtonBase", ["root", "disabled", "focusVisible"]), Bo = zo, $o = ["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"], No = (e) => {
|
|
498
|
-
const {
|
|
499
|
-
disabled: o,
|
|
500
|
-
focusVisible: t,
|
|
501
|
-
focusVisibleClassName: s,
|
|
502
|
-
classes: i
|
|
503
|
-
} = e, a = Be({
|
|
504
|
-
root: ["root", o && "disabled", t && "focusVisible"]
|
|
505
|
-
}, Mo, i);
|
|
506
|
-
return t && s && (a.root += ` ${s}`), a;
|
|
507
|
-
}, Io = A("button", {
|
|
508
|
-
name: "MuiButtonBase",
|
|
509
|
-
slot: "Root",
|
|
510
|
-
overridesResolver: (e, o) => o.root
|
|
511
|
-
})({
|
|
512
|
-
display: "inline-flex",
|
|
513
|
-
alignItems: "center",
|
|
514
|
-
justifyContent: "center",
|
|
515
|
-
position: "relative",
|
|
516
|
-
boxSizing: "border-box",
|
|
517
|
-
WebkitTapHighlightColor: "transparent",
|
|
518
|
-
backgroundColor: "transparent",
|
|
519
|
-
// Reset default value
|
|
520
|
-
// We disable the focus ring for mouse, touch and keyboard users.
|
|
521
|
-
outline: 0,
|
|
522
|
-
border: 0,
|
|
523
|
-
margin: 0,
|
|
524
|
-
// Remove the margin in Safari
|
|
525
|
-
borderRadius: 0,
|
|
526
|
-
padding: 0,
|
|
527
|
-
// Remove the padding in Firefox
|
|
528
|
-
cursor: "pointer",
|
|
529
|
-
userSelect: "none",
|
|
530
|
-
verticalAlign: "middle",
|
|
531
|
-
MozAppearance: "none",
|
|
532
|
-
// Reset
|
|
533
|
-
WebkitAppearance: "none",
|
|
534
|
-
// Reset
|
|
535
|
-
textDecoration: "none",
|
|
536
|
-
// So we take precedent over the style of a native <a /> element.
|
|
537
|
-
color: "inherit",
|
|
538
|
-
"&::-moz-focus-inner": {
|
|
539
|
-
borderStyle: "none"
|
|
540
|
-
// Remove Firefox dotted outline.
|
|
541
|
-
},
|
|
542
|
-
[`&.${Bo.disabled}`]: {
|
|
543
|
-
pointerEvents: "none",
|
|
544
|
-
// Disable link interactions
|
|
545
|
-
cursor: "default"
|
|
546
|
-
},
|
|
547
|
-
"@media print": {
|
|
548
|
-
colorAdjust: "exact"
|
|
549
|
-
}
|
|
550
|
-
}), Ie = /* @__PURE__ */ u.forwardRef(function(o, t) {
|
|
551
|
-
const s = pe({
|
|
552
|
-
props: o,
|
|
553
|
-
name: "MuiButtonBase"
|
|
554
|
-
}), {
|
|
555
|
-
action: i,
|
|
556
|
-
centerRipple: r = !1,
|
|
557
|
-
children: a,
|
|
558
|
-
className: p,
|
|
559
|
-
component: c = "button",
|
|
560
|
-
disabled: d = !1,
|
|
561
|
-
disableRipple: b = !1,
|
|
562
|
-
disableTouchRipple: v = !1,
|
|
563
|
-
focusRipple: x = !1,
|
|
564
|
-
LinkComponent: C = "a",
|
|
565
|
-
onBlur: h,
|
|
566
|
-
onClick: R,
|
|
567
|
-
onContextMenu: U,
|
|
568
|
-
onDragLeave: O,
|
|
569
|
-
onFocus: S,
|
|
570
|
-
onFocusVisible: N,
|
|
571
|
-
onKeyDown: f,
|
|
572
|
-
onKeyUp: T,
|
|
573
|
-
onMouseDown: g,
|
|
574
|
-
onMouseLeave: y,
|
|
575
|
-
onMouseUp: D,
|
|
576
|
-
onTouchEnd: j,
|
|
577
|
-
onTouchMove: E,
|
|
578
|
-
onTouchStart: L,
|
|
579
|
-
tabIndex: I = 0,
|
|
580
|
-
TouchRippleProps: F,
|
|
581
|
-
touchRippleRef: _,
|
|
582
|
-
type: W
|
|
583
|
-
} = s, k = te(s, $o), X = u.useRef(null), B = u.useRef(null), Se = ye(B, _), {
|
|
584
|
-
isFocusVisibleRef: he,
|
|
585
|
-
onFocus: De,
|
|
586
|
-
onBlur: Le,
|
|
587
|
-
ref: Fe
|
|
588
|
-
} = ro(), [G, H] = u.useState(!1);
|
|
589
|
-
d && G && H(!1), u.useImperativeHandle(i, () => ({
|
|
590
|
-
focusVisible: () => {
|
|
591
|
-
H(!0), X.current.focus();
|
|
592
|
-
}
|
|
593
|
-
}), []);
|
|
594
|
-
const [re, _e] = u.useState(!1);
|
|
595
|
-
u.useEffect(() => {
|
|
596
|
-
_e(!0);
|
|
597
|
-
}, []);
|
|
598
|
-
const ae = re && !b && !d;
|
|
599
|
-
u.useEffect(() => {
|
|
600
|
-
G && x && !b && re && B.current.pulsate();
|
|
601
|
-
}, [b, x, G, re]);
|
|
602
|
-
function V(l, ge, eo = v) {
|
|
603
|
-
return Z((ve) => (ge && ge(ve), !eo && B.current && B.current[l](ve), !0));
|
|
604
|
-
}
|
|
605
|
-
const Ue = V("start", g), je = V("stop", U), We = V("stop", O), Ge = V("stop", D), Ke = V("stop", (l) => {
|
|
606
|
-
G && l.preventDefault(), y && y(l);
|
|
607
|
-
}), Ae = V("start", L), Xe = V("stop", j), Ye = V("stop", E), He = V("stop", (l) => {
|
|
608
|
-
Le(l), he.current === !1 && H(!1), h && h(l);
|
|
609
|
-
}, !1), qe = Z((l) => {
|
|
610
|
-
X.current || (X.current = l.currentTarget), De(l), he.current === !0 && (H(!0), N && N(l)), S && S(l);
|
|
611
|
-
}), se = () => {
|
|
612
|
-
const l = X.current;
|
|
613
|
-
return c && c !== "button" && !(l.tagName === "A" && l.href);
|
|
614
|
-
}, le = u.useRef(!1), we = Z((l) => {
|
|
615
|
-
x && !le.current && G && B.current && l.key === " " && (le.current = !0, B.current.stop(l, () => {
|
|
616
|
-
B.current.start(l);
|
|
617
|
-
})), l.target === l.currentTarget && se() && l.key === " " && l.preventDefault(), f && f(l), l.target === l.currentTarget && se() && l.key === "Enter" && !d && (l.preventDefault(), R && R(l));
|
|
618
|
-
}), Je = Z((l) => {
|
|
619
|
-
x && l.key === " " && B.current && G && !l.defaultPrevented && (le.current = !1, B.current.stop(l, () => {
|
|
620
|
-
B.current.pulsate(l);
|
|
621
|
-
})), T && T(l), R && l.target === l.currentTarget && se() && l.key === " " && !l.defaultPrevented && R(l);
|
|
622
|
-
});
|
|
623
|
-
let q = c;
|
|
624
|
-
q === "button" && (k.href || k.to) && (q = C);
|
|
625
|
-
const Y = {};
|
|
626
|
-
q === "button" ? (Y.type = W === void 0 ? "button" : W, Y.disabled = d) : (!k.href && !k.to && (Y.role = "button"), d && (Y["aria-disabled"] = d));
|
|
627
|
-
const Qe = ye(t, Fe, X);
|
|
628
|
-
process.env.NODE_ENV !== "production" && u.useEffect(() => {
|
|
629
|
-
ae && !B.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(`
|
|
630
|
-
`));
|
|
631
|
-
}, [ae]);
|
|
632
|
-
const me = m({}, s, {
|
|
633
|
-
centerRipple: r,
|
|
634
|
-
component: c,
|
|
635
|
-
disabled: d,
|
|
636
|
-
disableRipple: b,
|
|
637
|
-
disableTouchRipple: v,
|
|
638
|
-
focusRipple: x,
|
|
639
|
-
tabIndex: I,
|
|
640
|
-
focusVisible: G
|
|
641
|
-
}), Ze = No(me);
|
|
642
|
-
return /* @__PURE__ */ Me(Io, m({
|
|
643
|
-
as: q,
|
|
644
|
-
className: M(Ze.root, p),
|
|
645
|
-
ownerState: me,
|
|
646
|
-
onBlur: He,
|
|
647
|
-
onClick: R,
|
|
648
|
-
onContextMenu: je,
|
|
649
|
-
onFocus: qe,
|
|
650
|
-
onKeyDown: we,
|
|
651
|
-
onKeyUp: Je,
|
|
652
|
-
onMouseDown: Ue,
|
|
653
|
-
onMouseLeave: Ke,
|
|
654
|
-
onMouseUp: Ge,
|
|
655
|
-
onDragLeave: We,
|
|
656
|
-
onTouchEnd: Xe,
|
|
657
|
-
onTouchMove: Ye,
|
|
658
|
-
onTouchStart: Ae,
|
|
659
|
-
ref: Qe,
|
|
660
|
-
tabIndex: d ? -1 : I,
|
|
661
|
-
type: W
|
|
662
|
-
}, Y, k, {
|
|
663
|
-
children: [a, ae ? (
|
|
664
|
-
/* TouchRipple is only needed client-side, x2 boost on the server. */
|
|
665
|
-
/* @__PURE__ */ P(Eo, m({
|
|
666
|
-
ref: Se,
|
|
667
|
-
center: r
|
|
668
|
-
}, F))
|
|
669
|
-
) : null]
|
|
670
|
-
}));
|
|
671
|
-
});
|
|
672
|
-
process.env.NODE_ENV !== "production" && (Ie.propTypes = {
|
|
673
|
-
// ----------------------------- Warning --------------------------------
|
|
674
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
675
|
-
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
676
|
-
// ----------------------------------------------------------------------
|
|
677
|
-
/**
|
|
678
|
-
* A ref for imperative actions.
|
|
679
|
-
* It currently only supports `focusVisible()` action.
|
|
680
|
-
*/
|
|
681
|
-
action: ao,
|
|
682
|
-
/**
|
|
683
|
-
* If `true`, the ripples are centered.
|
|
684
|
-
* They won't start at the cursor interaction position.
|
|
685
|
-
* @default false
|
|
686
|
-
*/
|
|
687
|
-
centerRipple: n.bool,
|
|
688
|
-
/**
|
|
689
|
-
* The content of the component.
|
|
690
|
-
*/
|
|
691
|
-
children: n.node,
|
|
692
|
-
/**
|
|
693
|
-
* Override or extend the styles applied to the component.
|
|
694
|
-
*/
|
|
695
|
-
classes: n.object,
|
|
696
|
-
/**
|
|
697
|
-
* @ignore
|
|
698
|
-
*/
|
|
699
|
-
className: n.string,
|
|
700
|
-
/**
|
|
701
|
-
* The component used for the root node.
|
|
702
|
-
* Either a string to use a HTML element or a component.
|
|
703
|
-
*/
|
|
704
|
-
component: so,
|
|
705
|
-
/**
|
|
706
|
-
* If `true`, the component is disabled.
|
|
707
|
-
* @default false
|
|
708
|
-
*/
|
|
709
|
-
disabled: n.bool,
|
|
710
|
-
/**
|
|
711
|
-
* If `true`, the ripple effect is disabled.
|
|
712
|
-
*
|
|
713
|
-
* ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure
|
|
714
|
-
* to highlight the element by applying separate styles with the `.Mui-focusVisible` class.
|
|
715
|
-
* @default false
|
|
716
|
-
*/
|
|
717
|
-
disableRipple: n.bool,
|
|
718
|
-
/**
|
|
719
|
-
* If `true`, the touch ripple effect is disabled.
|
|
720
|
-
* @default false
|
|
721
|
-
*/
|
|
722
|
-
disableTouchRipple: n.bool,
|
|
723
|
-
/**
|
|
724
|
-
* If `true`, the base button will have a keyboard focus ripple.
|
|
725
|
-
* @default false
|
|
726
|
-
*/
|
|
727
|
-
focusRipple: n.bool,
|
|
728
|
-
/**
|
|
729
|
-
* This prop can help identify which element has keyboard focus.
|
|
730
|
-
* The class name will be applied when the element gains the focus through keyboard interaction.
|
|
731
|
-
* It's a polyfill for the [CSS :focus-visible selector](https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo).
|
|
732
|
-
* The rationale for using this feature [is explained here](https://github.com/WICG/focus-visible/blob/HEAD/explainer.md).
|
|
733
|
-
* A [polyfill can be used](https://github.com/WICG/focus-visible) to apply a `focus-visible` class to other components
|
|
734
|
-
* if needed.
|
|
735
|
-
*/
|
|
736
|
-
focusVisibleClassName: n.string,
|
|
737
|
-
/**
|
|
738
|
-
* @ignore
|
|
739
|
-
*/
|
|
740
|
-
href: n.any,
|
|
741
|
-
/**
|
|
742
|
-
* The component used to render a link when the `href` prop is provided.
|
|
743
|
-
* @default 'a'
|
|
744
|
-
*/
|
|
745
|
-
LinkComponent: n.elementType,
|
|
746
|
-
/**
|
|
747
|
-
* @ignore
|
|
748
|
-
*/
|
|
749
|
-
onBlur: n.func,
|
|
750
|
-
/**
|
|
751
|
-
* @ignore
|
|
752
|
-
*/
|
|
753
|
-
onClick: n.func,
|
|
754
|
-
/**
|
|
755
|
-
* @ignore
|
|
756
|
-
*/
|
|
757
|
-
onContextMenu: n.func,
|
|
758
|
-
/**
|
|
759
|
-
* @ignore
|
|
760
|
-
*/
|
|
761
|
-
onDragLeave: n.func,
|
|
762
|
-
/**
|
|
763
|
-
* @ignore
|
|
764
|
-
*/
|
|
765
|
-
onFocus: n.func,
|
|
766
|
-
/**
|
|
767
|
-
* Callback fired when the component is focused with a keyboard.
|
|
768
|
-
* We trigger a `onFocus` callback too.
|
|
769
|
-
*/
|
|
770
|
-
onFocusVisible: n.func,
|
|
771
|
-
/**
|
|
772
|
-
* @ignore
|
|
773
|
-
*/
|
|
774
|
-
onKeyDown: n.func,
|
|
775
|
-
/**
|
|
776
|
-
* @ignore
|
|
777
|
-
*/
|
|
778
|
-
onKeyUp: n.func,
|
|
779
|
-
/**
|
|
780
|
-
* @ignore
|
|
781
|
-
*/
|
|
782
|
-
onMouseDown: n.func,
|
|
783
|
-
/**
|
|
784
|
-
* @ignore
|
|
785
|
-
*/
|
|
786
|
-
onMouseLeave: n.func,
|
|
787
|
-
/**
|
|
788
|
-
* @ignore
|
|
789
|
-
*/
|
|
790
|
-
onMouseUp: n.func,
|
|
791
|
-
/**
|
|
792
|
-
* @ignore
|
|
793
|
-
*/
|
|
794
|
-
onTouchEnd: n.func,
|
|
795
|
-
/**
|
|
796
|
-
* @ignore
|
|
797
|
-
*/
|
|
798
|
-
onTouchMove: n.func,
|
|
799
|
-
/**
|
|
800
|
-
* @ignore
|
|
801
|
-
*/
|
|
802
|
-
onTouchStart: n.func,
|
|
803
|
-
/**
|
|
804
|
-
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
805
|
-
*/
|
|
806
|
-
sx: n.oneOfType([n.arrayOf(n.oneOfType([n.func, n.object, n.bool])), n.func, n.object]),
|
|
807
|
-
/**
|
|
808
|
-
* @default 0
|
|
809
|
-
*/
|
|
810
|
-
tabIndex: n.number,
|
|
811
|
-
/**
|
|
812
|
-
* Props applied to the `TouchRipple` element.
|
|
813
|
-
*/
|
|
814
|
-
TouchRippleProps: n.object,
|
|
815
|
-
/**
|
|
816
|
-
* A ref that points to the `TouchRipple` element.
|
|
817
|
-
*/
|
|
818
|
-
touchRippleRef: n.oneOfType([n.func, n.shape({
|
|
819
|
-
current: n.shape({
|
|
820
|
-
pulsate: n.func.isRequired,
|
|
821
|
-
start: n.func.isRequired,
|
|
822
|
-
stop: n.func.isRequired
|
|
823
|
-
})
|
|
824
|
-
})]),
|
|
825
|
-
/**
|
|
826
|
-
* @ignore
|
|
827
|
-
*/
|
|
828
|
-
type: n.oneOfType([n.oneOf(["button", "reset", "submit"]), n.string])
|
|
829
|
-
});
|
|
830
|
-
const ko = Ie;
|
|
831
|
-
function Vo(e) {
|
|
832
|
-
return ze("MuiButton", e);
|
|
833
|
-
}
|
|
834
|
-
const Po = ue("MuiButton", ["root", "text", "textInherit", "textPrimary", "textSecondary", "textSuccess", "textError", "textInfo", "textWarning", "outlined", "outlinedInherit", "outlinedPrimary", "outlinedSecondary", "outlinedSuccess", "outlinedError", "outlinedInfo", "outlinedWarning", "contained", "containedInherit", "containedPrimary", "containedSecondary", "containedSuccess", "containedError", "containedInfo", "containedWarning", "disableElevation", "focusVisible", "disabled", "colorInherit", "textSizeSmall", "textSizeMedium", "textSizeLarge", "outlinedSizeSmall", "outlinedSizeMedium", "outlinedSizeLarge", "containedSizeSmall", "containedSizeMedium", "containedSizeLarge", "sizeMedium", "sizeSmall", "sizeLarge", "fullWidth", "startIcon", "endIcon", "iconSizeSmall", "iconSizeMedium", "iconSizeLarge"]), ee = Po, ke = /* @__PURE__ */ u.createContext({});
|
|
835
|
-
process.env.NODE_ENV !== "production" && (ke.displayName = "ButtonGroupContext");
|
|
836
|
-
const Oo = ke, Ve = /* @__PURE__ */ u.createContext(void 0);
|
|
837
|
-
process.env.NODE_ENV !== "production" && (Ve.displayName = "ButtonGroupButtonContext");
|
|
838
|
-
const So = Ve, Do = ["children", "color", "component", "className", "disabled", "disableElevation", "disableFocusRipple", "endIcon", "focusVisibleClassName", "fullWidth", "size", "startIcon", "type", "variant"], Lo = (e) => {
|
|
10
|
+
const Y = H("MuiButton", ["root", "text", "textInherit", "textPrimary", "textSecondary", "textSuccess", "textError", "textInfo", "textWarning", "outlined", "outlinedInherit", "outlinedPrimary", "outlinedSecondary", "outlinedSuccess", "outlinedError", "outlinedInfo", "outlinedWarning", "contained", "containedInherit", "containedPrimary", "containedSecondary", "containedSuccess", "containedError", "containedInfo", "containedWarning", "disableElevation", "focusVisible", "disabled", "colorInherit", "textSizeSmall", "textSizeMedium", "textSizeLarge", "outlinedSizeSmall", "outlinedSizeMedium", "outlinedSizeLarge", "containedSizeSmall", "containedSizeMedium", "containedSizeLarge", "sizeMedium", "sizeSmall", "sizeLarge", "fullWidth", "startIcon", "endIcon", "iconSizeSmall", "iconSizeMedium", "iconSizeLarge"]), g = Y, k = /* @__PURE__ */ p.createContext({});
|
|
11
|
+
process.env.NODE_ENV !== "production" && (k.displayName = "ButtonGroupContext");
|
|
12
|
+
const Z = k, N = /* @__PURE__ */ p.createContext(void 0);
|
|
13
|
+
process.env.NODE_ENV !== "production" && (N.displayName = "ButtonGroupButtonContext");
|
|
14
|
+
const w = N, oo = ["children", "color", "component", "className", "disabled", "disableElevation", "disableFocusRipple", "endIcon", "focusVisibleClassName", "fullWidth", "size", "startIcon", "type", "variant"], no = (o) => {
|
|
839
15
|
const {
|
|
840
|
-
color:
|
|
841
|
-
disableElevation:
|
|
842
|
-
fullWidth:
|
|
843
|
-
size:
|
|
844
|
-
variant:
|
|
845
|
-
classes:
|
|
846
|
-
} =
|
|
847
|
-
root: ["root",
|
|
16
|
+
color: n,
|
|
17
|
+
disableElevation: i,
|
|
18
|
+
fullWidth: l,
|
|
19
|
+
size: r,
|
|
20
|
+
variant: c,
|
|
21
|
+
classes: s
|
|
22
|
+
} = o, x = {
|
|
23
|
+
root: ["root", c, `${c}${e(n)}`, `size${e(r)}`, `${c}Size${e(r)}`, n === "inherit" && "colorInherit", i && "disableElevation", l && "fullWidth"],
|
|
848
24
|
label: ["label"],
|
|
849
|
-
startIcon: ["startIcon", `iconSize${
|
|
850
|
-
endIcon: ["endIcon", `iconSize${
|
|
851
|
-
},
|
|
852
|
-
return
|
|
853
|
-
},
|
|
25
|
+
startIcon: ["startIcon", `iconSize${e(r)}`],
|
|
26
|
+
endIcon: ["endIcon", `iconSize${e(r)}`]
|
|
27
|
+
}, f = K(x, X, s);
|
|
28
|
+
return t({}, s, f);
|
|
29
|
+
}, E = (o) => t({}, o.size === "small" && {
|
|
854
30
|
"& > *:nth-of-type(1)": {
|
|
855
31
|
fontSize: 18
|
|
856
32
|
}
|
|
857
|
-
},
|
|
33
|
+
}, o.size === "medium" && {
|
|
858
34
|
"& > *:nth-of-type(1)": {
|
|
859
35
|
fontSize: 20
|
|
860
36
|
}
|
|
861
|
-
},
|
|
37
|
+
}, o.size === "large" && {
|
|
862
38
|
"& > *:nth-of-type(1)": {
|
|
863
39
|
fontSize: 22
|
|
864
40
|
}
|
|
865
|
-
}),
|
|
866
|
-
shouldForwardProp: (
|
|
41
|
+
}), ao = y(Q, {
|
|
42
|
+
shouldForwardProp: (o) => A(o) || o === "classes",
|
|
867
43
|
name: "MuiButton",
|
|
868
44
|
slot: "Root",
|
|
869
|
-
overridesResolver: (
|
|
45
|
+
overridesResolver: (o, n) => {
|
|
870
46
|
const {
|
|
871
|
-
ownerState:
|
|
872
|
-
} =
|
|
873
|
-
return [
|
|
47
|
+
ownerState: i
|
|
48
|
+
} = o;
|
|
49
|
+
return [n.root, n[i.variant], n[`${i.variant}${e(i.color)}`], n[`size${e(i.size)}`], n[`${i.variant}Size${e(i.size)}`], i.color === "inherit" && n.colorInherit, i.disableElevation && n.disableElevation, i.fullWidth && n.fullWidth];
|
|
874
50
|
}
|
|
875
51
|
})(({
|
|
876
|
-
theme:
|
|
877
|
-
ownerState:
|
|
52
|
+
theme: o,
|
|
53
|
+
ownerState: n
|
|
878
54
|
}) => {
|
|
879
|
-
var
|
|
880
|
-
const
|
|
881
|
-
return
|
|
55
|
+
var i, l;
|
|
56
|
+
const r = o.palette.mode === "light" ? o.palette.grey[300] : o.palette.grey[800], c = o.palette.mode === "light" ? o.palette.grey.A100 : o.palette.grey[700];
|
|
57
|
+
return t({}, o.typography.button, {
|
|
882
58
|
minWidth: 64,
|
|
883
59
|
padding: "6px 16px",
|
|
884
|
-
borderRadius: (
|
|
885
|
-
transition:
|
|
886
|
-
duration:
|
|
60
|
+
borderRadius: (o.vars || o).shape.borderRadius,
|
|
61
|
+
transition: o.transitions.create(["background-color", "box-shadow", "border-color", "color"], {
|
|
62
|
+
duration: o.transitions.duration.short
|
|
887
63
|
}),
|
|
888
|
-
"&:hover":
|
|
64
|
+
"&:hover": t({
|
|
889
65
|
textDecoration: "none",
|
|
890
|
-
backgroundColor:
|
|
66
|
+
backgroundColor: o.vars ? `rgba(${o.vars.palette.text.primaryChannel} / ${o.vars.palette.action.hoverOpacity})` : b(o.palette.text.primary, o.palette.action.hoverOpacity),
|
|
891
67
|
// Reset on touch devices, it doesn't add specificity
|
|
892
68
|
"@media (hover: none)": {
|
|
893
69
|
backgroundColor: "transparent"
|
|
894
70
|
}
|
|
895
|
-
},
|
|
896
|
-
backgroundColor:
|
|
71
|
+
}, n.variant === "text" && n.color !== "inherit" && {
|
|
72
|
+
backgroundColor: o.vars ? `rgba(${o.vars.palette[n.color].mainChannel} / ${o.vars.palette.action.hoverOpacity})` : b(o.palette[n.color].main, o.palette.action.hoverOpacity),
|
|
897
73
|
// Reset on touch devices, it doesn't add specificity
|
|
898
74
|
"@media (hover: none)": {
|
|
899
75
|
backgroundColor: "transparent"
|
|
900
76
|
}
|
|
901
|
-
},
|
|
902
|
-
border: `1px solid ${(
|
|
903
|
-
backgroundColor:
|
|
77
|
+
}, n.variant === "outlined" && n.color !== "inherit" && {
|
|
78
|
+
border: `1px solid ${(o.vars || o).palette[n.color].main}`,
|
|
79
|
+
backgroundColor: o.vars ? `rgba(${o.vars.palette[n.color].mainChannel} / ${o.vars.palette.action.hoverOpacity})` : b(o.palette[n.color].main, o.palette.action.hoverOpacity),
|
|
904
80
|
// Reset on touch devices, it doesn't add specificity
|
|
905
81
|
"@media (hover: none)": {
|
|
906
82
|
backgroundColor: "transparent"
|
|
907
83
|
}
|
|
908
|
-
},
|
|
909
|
-
backgroundColor:
|
|
910
|
-
boxShadow: (
|
|
84
|
+
}, n.variant === "contained" && {
|
|
85
|
+
backgroundColor: o.vars ? o.vars.palette.Button.inheritContainedHoverBg : c,
|
|
86
|
+
boxShadow: (o.vars || o).shadows[4],
|
|
911
87
|
// Reset on touch devices, it doesn't add specificity
|
|
912
88
|
"@media (hover: none)": {
|
|
913
|
-
boxShadow: (
|
|
914
|
-
backgroundColor: (
|
|
89
|
+
boxShadow: (o.vars || o).shadows[2],
|
|
90
|
+
backgroundColor: (o.vars || o).palette.grey[300]
|
|
915
91
|
}
|
|
916
|
-
},
|
|
917
|
-
backgroundColor: (
|
|
92
|
+
}, n.variant === "contained" && n.color !== "inherit" && {
|
|
93
|
+
backgroundColor: (o.vars || o).palette[n.color].dark,
|
|
918
94
|
// Reset on touch devices, it doesn't add specificity
|
|
919
95
|
"@media (hover: none)": {
|
|
920
|
-
backgroundColor: (
|
|
96
|
+
backgroundColor: (o.vars || o).palette[n.color].main
|
|
921
97
|
}
|
|
922
98
|
}),
|
|
923
|
-
"&:active":
|
|
924
|
-
boxShadow: (
|
|
99
|
+
"&:active": t({}, n.variant === "contained" && {
|
|
100
|
+
boxShadow: (o.vars || o).shadows[8]
|
|
925
101
|
}),
|
|
926
|
-
[`&.${
|
|
927
|
-
boxShadow: (
|
|
102
|
+
[`&.${g.focusVisible}`]: t({}, n.variant === "contained" && {
|
|
103
|
+
boxShadow: (o.vars || o).shadows[6]
|
|
928
104
|
}),
|
|
929
|
-
[`&.${
|
|
930
|
-
color: (
|
|
931
|
-
},
|
|
932
|
-
border: `1px solid ${(
|
|
933
|
-
},
|
|
934
|
-
color: (
|
|
935
|
-
boxShadow: (
|
|
936
|
-
backgroundColor: (
|
|
105
|
+
[`&.${g.disabled}`]: t({
|
|
106
|
+
color: (o.vars || o).palette.action.disabled
|
|
107
|
+
}, n.variant === "outlined" && {
|
|
108
|
+
border: `1px solid ${(o.vars || o).palette.action.disabledBackground}`
|
|
109
|
+
}, n.variant === "contained" && {
|
|
110
|
+
color: (o.vars || o).palette.action.disabled,
|
|
111
|
+
boxShadow: (o.vars || o).shadows[0],
|
|
112
|
+
backgroundColor: (o.vars || o).palette.action.disabledBackground
|
|
937
113
|
})
|
|
938
|
-
},
|
|
114
|
+
}, n.variant === "text" && {
|
|
939
115
|
padding: "6px 8px"
|
|
940
|
-
},
|
|
941
|
-
color: (
|
|
942
|
-
},
|
|
116
|
+
}, n.variant === "text" && n.color !== "inherit" && {
|
|
117
|
+
color: (o.vars || o).palette[n.color].main
|
|
118
|
+
}, n.variant === "outlined" && {
|
|
943
119
|
padding: "5px 15px",
|
|
944
120
|
border: "1px solid currentColor"
|
|
945
|
-
},
|
|
946
|
-
color: (
|
|
947
|
-
border:
|
|
948
|
-
},
|
|
949
|
-
color:
|
|
121
|
+
}, n.variant === "outlined" && n.color !== "inherit" && {
|
|
122
|
+
color: (o.vars || o).palette[n.color].main,
|
|
123
|
+
border: o.vars ? `1px solid rgba(${o.vars.palette[n.color].mainChannel} / 0.5)` : `1px solid ${b(o.palette[n.color].main, 0.5)}`
|
|
124
|
+
}, n.variant === "contained" && {
|
|
125
|
+
color: o.vars ? (
|
|
950
126
|
// this is safe because grey does not change between default light/dark mode
|
|
951
|
-
|
|
952
|
-
) : (
|
|
953
|
-
backgroundColor:
|
|
954
|
-
boxShadow: (
|
|
955
|
-
},
|
|
956
|
-
color: (
|
|
957
|
-
backgroundColor: (
|
|
958
|
-
},
|
|
127
|
+
o.vars.palette.text.primary
|
|
128
|
+
) : (i = (l = o.palette).getContrastText) == null ? void 0 : i.call(l, o.palette.grey[300]),
|
|
129
|
+
backgroundColor: o.vars ? o.vars.palette.Button.inheritContainedBg : r,
|
|
130
|
+
boxShadow: (o.vars || o).shadows[2]
|
|
131
|
+
}, n.variant === "contained" && n.color !== "inherit" && {
|
|
132
|
+
color: (o.vars || o).palette[n.color].contrastText,
|
|
133
|
+
backgroundColor: (o.vars || o).palette[n.color].main
|
|
134
|
+
}, n.color === "inherit" && {
|
|
959
135
|
color: "inherit",
|
|
960
136
|
borderColor: "currentColor"
|
|
961
|
-
},
|
|
137
|
+
}, n.size === "small" && n.variant === "text" && {
|
|
962
138
|
padding: "4px 5px",
|
|
963
|
-
fontSize:
|
|
964
|
-
},
|
|
139
|
+
fontSize: o.typography.pxToRem(13)
|
|
140
|
+
}, n.size === "large" && n.variant === "text" && {
|
|
965
141
|
padding: "8px 11px",
|
|
966
|
-
fontSize:
|
|
967
|
-
},
|
|
142
|
+
fontSize: o.typography.pxToRem(15)
|
|
143
|
+
}, n.size === "small" && n.variant === "outlined" && {
|
|
968
144
|
padding: "3px 9px",
|
|
969
|
-
fontSize:
|
|
970
|
-
},
|
|
145
|
+
fontSize: o.typography.pxToRem(13)
|
|
146
|
+
}, n.size === "large" && n.variant === "outlined" && {
|
|
971
147
|
padding: "7px 21px",
|
|
972
|
-
fontSize:
|
|
973
|
-
},
|
|
148
|
+
fontSize: o.typography.pxToRem(15)
|
|
149
|
+
}, n.size === "small" && n.variant === "contained" && {
|
|
974
150
|
padding: "4px 10px",
|
|
975
|
-
fontSize:
|
|
976
|
-
},
|
|
151
|
+
fontSize: o.typography.pxToRem(13)
|
|
152
|
+
}, n.size === "large" && n.variant === "contained" && {
|
|
977
153
|
padding: "8px 22px",
|
|
978
|
-
fontSize:
|
|
979
|
-
},
|
|
154
|
+
fontSize: o.typography.pxToRem(15)
|
|
155
|
+
}, n.fullWidth && {
|
|
980
156
|
width: "100%"
|
|
981
157
|
});
|
|
982
158
|
}, ({
|
|
983
|
-
ownerState:
|
|
984
|
-
}) =>
|
|
159
|
+
ownerState: o
|
|
160
|
+
}) => o.disableElevation && {
|
|
985
161
|
boxShadow: "none",
|
|
986
162
|
"&:hover": {
|
|
987
163
|
boxShadow: "none"
|
|
988
164
|
},
|
|
989
|
-
[`&.${
|
|
165
|
+
[`&.${g.focusVisible}`]: {
|
|
990
166
|
boxShadow: "none"
|
|
991
167
|
},
|
|
992
168
|
"&:active": {
|
|
993
169
|
boxShadow: "none"
|
|
994
170
|
},
|
|
995
|
-
[`&.${
|
|
171
|
+
[`&.${g.disabled}`]: {
|
|
996
172
|
boxShadow: "none"
|
|
997
173
|
}
|
|
998
|
-
}),
|
|
174
|
+
}), io = y("span", {
|
|
999
175
|
name: "MuiButton",
|
|
1000
176
|
slot: "StartIcon",
|
|
1001
|
-
overridesResolver: (
|
|
177
|
+
overridesResolver: (o, n) => {
|
|
1002
178
|
const {
|
|
1003
|
-
ownerState:
|
|
1004
|
-
} =
|
|
1005
|
-
return [
|
|
179
|
+
ownerState: i
|
|
180
|
+
} = o;
|
|
181
|
+
return [n.startIcon, n[`iconSize${e(i.size)}`]];
|
|
1006
182
|
}
|
|
1007
183
|
})(({
|
|
1008
|
-
ownerState:
|
|
1009
|
-
}) =>
|
|
184
|
+
ownerState: o
|
|
185
|
+
}) => t({
|
|
1010
186
|
display: "inherit",
|
|
1011
187
|
marginRight: 8,
|
|
1012
188
|
marginLeft: -4
|
|
1013
|
-
},
|
|
189
|
+
}, o.size === "small" && {
|
|
1014
190
|
marginLeft: -2
|
|
1015
|
-
},
|
|
191
|
+
}, E(o))), ro = y("span", {
|
|
1016
192
|
name: "MuiButton",
|
|
1017
193
|
slot: "EndIcon",
|
|
1018
|
-
overridesResolver: (
|
|
194
|
+
overridesResolver: (o, n) => {
|
|
1019
195
|
const {
|
|
1020
|
-
ownerState:
|
|
1021
|
-
} =
|
|
1022
|
-
return [
|
|
196
|
+
ownerState: i
|
|
197
|
+
} = o;
|
|
198
|
+
return [n.endIcon, n[`iconSize${e(i.size)}`]];
|
|
1023
199
|
}
|
|
1024
200
|
})(({
|
|
1025
|
-
ownerState:
|
|
1026
|
-
}) =>
|
|
201
|
+
ownerState: o
|
|
202
|
+
}) => t({
|
|
1027
203
|
display: "inherit",
|
|
1028
204
|
marginRight: -4,
|
|
1029
205
|
marginLeft: 8
|
|
1030
|
-
},
|
|
206
|
+
}, o.size === "small" && {
|
|
1031
207
|
marginRight: -2
|
|
1032
|
-
},
|
|
1033
|
-
const
|
|
1034
|
-
props:
|
|
208
|
+
}, E(o))), O = /* @__PURE__ */ p.forwardRef(function(n, i) {
|
|
209
|
+
const l = p.useContext(Z), r = p.useContext(w), c = q(l, n), s = J({
|
|
210
|
+
props: c,
|
|
1035
211
|
name: "MuiButton"
|
|
1036
212
|
}), {
|
|
1037
|
-
children:
|
|
1038
|
-
color:
|
|
1039
|
-
component:
|
|
1040
|
-
className:
|
|
1041
|
-
disabled:
|
|
1042
|
-
disableElevation:
|
|
1043
|
-
disableFocusRipple:
|
|
1044
|
-
endIcon:
|
|
1045
|
-
focusVisibleClassName:
|
|
1046
|
-
fullWidth:
|
|
1047
|
-
size:
|
|
1048
|
-
startIcon:
|
|
1049
|
-
type:
|
|
1050
|
-
variant:
|
|
1051
|
-
} =
|
|
1052
|
-
color:
|
|
1053
|
-
component:
|
|
1054
|
-
disabled:
|
|
1055
|
-
disableElevation:
|
|
1056
|
-
disableFocusRipple:
|
|
1057
|
-
fullWidth:
|
|
1058
|
-
size:
|
|
1059
|
-
type:
|
|
1060
|
-
variant:
|
|
1061
|
-
}),
|
|
1062
|
-
className:
|
|
1063
|
-
ownerState:
|
|
1064
|
-
children:
|
|
1065
|
-
}),
|
|
1066
|
-
className:
|
|
1067
|
-
ownerState:
|
|
1068
|
-
children:
|
|
1069
|
-
}),
|
|
1070
|
-
return /* @__PURE__ */
|
|
1071
|
-
ownerState:
|
|
1072
|
-
className:
|
|
1073
|
-
component:
|
|
1074
|
-
disabled:
|
|
1075
|
-
focusRipple: !
|
|
1076
|
-
focusVisibleClassName:
|
|
1077
|
-
ref:
|
|
1078
|
-
type:
|
|
1079
|
-
},
|
|
1080
|
-
classes:
|
|
1081
|
-
children: [
|
|
213
|
+
children: x,
|
|
214
|
+
color: f = "primary",
|
|
215
|
+
component: z = "button",
|
|
216
|
+
className: T,
|
|
217
|
+
disabled: m = !1,
|
|
218
|
+
disableElevation: P = !1,
|
|
219
|
+
disableFocusRipple: B = !1,
|
|
220
|
+
endIcon: I,
|
|
221
|
+
focusVisibleClassName: W,
|
|
222
|
+
fullWidth: M = !1,
|
|
223
|
+
size: S = "medium",
|
|
224
|
+
startIcon: $,
|
|
225
|
+
type: h,
|
|
226
|
+
variant: V = "text"
|
|
227
|
+
} = s, L = D(s, oo), u = t({}, s, {
|
|
228
|
+
color: f,
|
|
229
|
+
component: z,
|
|
230
|
+
disabled: m,
|
|
231
|
+
disableElevation: P,
|
|
232
|
+
disableFocusRipple: B,
|
|
233
|
+
fullWidth: M,
|
|
234
|
+
size: S,
|
|
235
|
+
type: h,
|
|
236
|
+
variant: V
|
|
237
|
+
}), d = no(u), _ = $ && /* @__PURE__ */ C(io, {
|
|
238
|
+
className: d.startIcon,
|
|
239
|
+
ownerState: u,
|
|
240
|
+
children: $
|
|
241
|
+
}), G = I && /* @__PURE__ */ C(ro, {
|
|
242
|
+
className: d.endIcon,
|
|
243
|
+
ownerState: u,
|
|
244
|
+
children: I
|
|
245
|
+
}), j = r || "";
|
|
246
|
+
return /* @__PURE__ */ F(ao, t({
|
|
247
|
+
ownerState: u,
|
|
248
|
+
className: R(l.className, d.root, T, j),
|
|
249
|
+
component: z,
|
|
250
|
+
disabled: m,
|
|
251
|
+
focusRipple: !B,
|
|
252
|
+
focusVisibleClassName: R(d.focusVisible, W),
|
|
253
|
+
ref: i,
|
|
254
|
+
type: h
|
|
255
|
+
}, L, {
|
|
256
|
+
classes: d,
|
|
257
|
+
children: [_, x, G]
|
|
1082
258
|
}));
|
|
1083
259
|
});
|
|
1084
|
-
process.env.NODE_ENV !== "production" && (
|
|
260
|
+
process.env.NODE_ENV !== "production" && (O.propTypes = {
|
|
1085
261
|
// ----------------------------- Warning --------------------------------
|
|
1086
262
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
1087
263
|
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
@@ -1089,42 +265,42 @@ process.env.NODE_ENV !== "production" && (Oe.propTypes = {
|
|
|
1089
265
|
/**
|
|
1090
266
|
* The content of the component.
|
|
1091
267
|
*/
|
|
1092
|
-
children:
|
|
268
|
+
children: a.node,
|
|
1093
269
|
/**
|
|
1094
270
|
* Override or extend the styles applied to the component.
|
|
1095
271
|
*/
|
|
1096
|
-
classes:
|
|
272
|
+
classes: a.object,
|
|
1097
273
|
/**
|
|
1098
274
|
* @ignore
|
|
1099
275
|
*/
|
|
1100
|
-
className:
|
|
276
|
+
className: a.string,
|
|
1101
277
|
/**
|
|
1102
278
|
* The color of the component.
|
|
1103
279
|
* It supports both default and custom theme colors, which can be added as shown in the
|
|
1104
280
|
* [palette customization guide](https://mui.com/material-ui/customization/palette/#adding-new-colors).
|
|
1105
281
|
* @default 'primary'
|
|
1106
282
|
*/
|
|
1107
|
-
color:
|
|
283
|
+
color: a.oneOfType([a.oneOf(["inherit", "primary", "secondary", "success", "error", "info", "warning"]), a.string]),
|
|
1108
284
|
/**
|
|
1109
285
|
* The component used for the root node.
|
|
1110
286
|
* Either a string to use a HTML element or a component.
|
|
1111
287
|
*/
|
|
1112
|
-
component:
|
|
288
|
+
component: a.elementType,
|
|
1113
289
|
/**
|
|
1114
290
|
* If `true`, the component is disabled.
|
|
1115
291
|
* @default false
|
|
1116
292
|
*/
|
|
1117
|
-
disabled:
|
|
293
|
+
disabled: a.bool,
|
|
1118
294
|
/**
|
|
1119
295
|
* If `true`, no elevation is used.
|
|
1120
296
|
* @default false
|
|
1121
297
|
*/
|
|
1122
|
-
disableElevation:
|
|
298
|
+
disableElevation: a.bool,
|
|
1123
299
|
/**
|
|
1124
300
|
* If `true`, the keyboard focus ripple is disabled.
|
|
1125
301
|
* @default false
|
|
1126
302
|
*/
|
|
1127
|
-
disableFocusRipple:
|
|
303
|
+
disableFocusRipple: a.bool,
|
|
1128
304
|
/**
|
|
1129
305
|
* If `true`, the ripple effect is disabled.
|
|
1130
306
|
*
|
|
@@ -1132,80 +308,78 @@ process.env.NODE_ENV !== "production" && (Oe.propTypes = {
|
|
|
1132
308
|
* to highlight the element by applying separate styles with the `.Mui-focusVisible` class.
|
|
1133
309
|
* @default false
|
|
1134
310
|
*/
|
|
1135
|
-
disableRipple:
|
|
311
|
+
disableRipple: a.bool,
|
|
1136
312
|
/**
|
|
1137
313
|
* Element placed after the children.
|
|
1138
314
|
*/
|
|
1139
|
-
endIcon:
|
|
315
|
+
endIcon: a.node,
|
|
1140
316
|
/**
|
|
1141
317
|
* @ignore
|
|
1142
318
|
*/
|
|
1143
|
-
focusVisibleClassName:
|
|
319
|
+
focusVisibleClassName: a.string,
|
|
1144
320
|
/**
|
|
1145
321
|
* If `true`, the button will take up the full width of its container.
|
|
1146
322
|
* @default false
|
|
1147
323
|
*/
|
|
1148
|
-
fullWidth:
|
|
324
|
+
fullWidth: a.bool,
|
|
1149
325
|
/**
|
|
1150
326
|
* The URL to link to when the button is clicked.
|
|
1151
327
|
* If defined, an `a` element will be used as the root node.
|
|
1152
328
|
*/
|
|
1153
|
-
href:
|
|
329
|
+
href: a.string,
|
|
1154
330
|
/**
|
|
1155
331
|
* The size of the component.
|
|
1156
332
|
* `small` is equivalent to the dense button styling.
|
|
1157
333
|
* @default 'medium'
|
|
1158
334
|
*/
|
|
1159
|
-
size:
|
|
335
|
+
size: a.oneOfType([a.oneOf(["small", "medium", "large"]), a.string]),
|
|
1160
336
|
/**
|
|
1161
337
|
* Element placed before the children.
|
|
1162
338
|
*/
|
|
1163
|
-
startIcon:
|
|
339
|
+
startIcon: a.node,
|
|
1164
340
|
/**
|
|
1165
341
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
1166
342
|
*/
|
|
1167
|
-
sx:
|
|
343
|
+
sx: a.oneOfType([a.arrayOf(a.oneOfType([a.func, a.object, a.bool])), a.func, a.object]),
|
|
1168
344
|
/**
|
|
1169
345
|
* @ignore
|
|
1170
346
|
*/
|
|
1171
|
-
type:
|
|
347
|
+
type: a.oneOfType([a.oneOf(["button", "reset", "submit"]), a.string]),
|
|
1172
348
|
/**
|
|
1173
349
|
* The variant to use.
|
|
1174
350
|
* @default 'text'
|
|
1175
351
|
*/
|
|
1176
|
-
variant:
|
|
352
|
+
variant: a.oneOfType([a.oneOf(["contained", "outlined", "text"]), a.string])
|
|
1177
353
|
});
|
|
1178
|
-
const
|
|
1179
|
-
variant:
|
|
1180
|
-
disabled:
|
|
1181
|
-
look:
|
|
1182
|
-
children:
|
|
1183
|
-
sx:
|
|
1184
|
-
...
|
|
354
|
+
const to = O, uo = ({
|
|
355
|
+
variant: o = "contained",
|
|
356
|
+
disabled: n = !1,
|
|
357
|
+
look: i = "normal",
|
|
358
|
+
children: l,
|
|
359
|
+
sx: r,
|
|
360
|
+
...c
|
|
1185
361
|
}) => {
|
|
1186
|
-
let
|
|
1187
|
-
return
|
|
362
|
+
let s = {};
|
|
363
|
+
return i === "modified" ? (n === !1 && (s = {
|
|
1188
364
|
border: "0rem",
|
|
1189
|
-
backgroundColor:
|
|
1190
|
-
color:
|
|
365
|
+
backgroundColor: v("modify"),
|
|
366
|
+
color: v("primary"),
|
|
1191
367
|
"&:hover": {
|
|
1192
368
|
border: "0.0625rem solid",
|
|
1193
|
-
borderColor:
|
|
1194
|
-
backgroundColor:
|
|
369
|
+
borderColor: v("primary"),
|
|
370
|
+
backgroundColor: v("modify")
|
|
1195
371
|
}
|
|
1196
|
-
}),
|
|
1197
|
-
|
|
1198
|
-
color: "#000000",
|
|
1199
|
-
boxShadow: "none",
|
|
1200
|
-
"&:hover": {
|
|
372
|
+
}), o = "outlined") : o === "contained" && n === !0 && (s = {
|
|
373
|
+
"&.Mui-disabled": {
|
|
1201
374
|
backgroundColor: "#C4C4C4",
|
|
375
|
+
color: "#000000",
|
|
1202
376
|
boxShadow: "none"
|
|
1203
377
|
}
|
|
1204
|
-
}
|
|
1205
|
-
...
|
|
1206
|
-
...
|
|
1207
|
-
}, /* @__PURE__ */
|
|
378
|
+
}), r = {
|
|
379
|
+
...s,
|
|
380
|
+
...r
|
|
381
|
+
}, /* @__PURE__ */ C(to, { variant: o, disabled: n, sx: r, ...c, children: l });
|
|
1208
382
|
};
|
|
1209
383
|
export {
|
|
1210
|
-
|
|
384
|
+
uo as default
|
|
1211
385
|
};
|