@fangzsx/component-library 0.0.11 → 0.0.13
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-DPlM16yK.js +30 -0
- package/dist/ButtonBase-qMhxbNdC.js +878 -0
- package/dist/FormLabel-DKoCtSGZ.js +600 -0
- package/dist/{Paper-CAUsv8qs.js → Paper-DyRh03We.js} +54 -51
- package/dist/SwitchBase-DStPyUhD.js +311 -0
- package/dist/Typography-B0rSrz7H.js +253 -0
- package/dist/components/AppBarPublic/index.js +83 -105
- package/dist/components/Button/index.js +1 -1
- package/dist/components/Checkbox/index.js +103 -607
- package/dist/components/CheckboxGroup/index.d.ts +17 -0
- package/dist/components/CheckboxGroup/index.js +68 -0
- package/dist/components/Dropdown/index.d.ts +22 -0
- package/dist/components/Dropdown/index.js +120 -0
- package/dist/components/LinearProgress/index.d.ts +3 -0
- package/dist/components/LinearProgress/index.js +19 -0
- package/dist/components/MediaCardWithAction/index.js +157 -436
- package/dist/components/RadioButtonGroup/index.d.ts +17 -0
- package/dist/components/RadioButtonGroup/index.js +836 -0
- package/dist/components/TextFieldInput/index.d.ts +15 -0
- package/dist/components/TextFieldInput/index.js +6578 -0
- package/dist/{createSvgIcon-DAI5icic.js → createSvgIcon-Dj0SJuc1.js} +8 -7
- package/dist/generateUtilityClasses-BCID9NF1.js +2806 -0
- package/dist/{index-DGepNtNg.js → index-CoBGCD2e.js} +143 -158
- package/dist/index-o1i1vy-V.js +73 -0
- package/dist/main.d.ts +5 -1
- package/dist/main.js +21 -13
- package/dist/mergeSlotProps-C-n2ing7.js +62 -0
- package/dist/useId-CK6Kn3Tn.js +21 -0
- package/dist/useSlot-S2pEBHE8.js +161 -0
- package/dist/useTimeout-BWi4JTOH.js +635 -0
- package/package.json +1 -1
- package/dist/ButtonBase-CAtBagnK.js +0 -4293
- package/dist/assets/index2.css +0 -1
- package/dist/components/Input/index.d.ts +0 -1
- package/dist/components/Input/index.js +0 -11
|
@@ -1,30 +1,16 @@
|
|
|
1
|
-
import { jsx as c, jsxs as
|
|
1
|
+
import { jsx as c, jsxs as U } from "react/jsx-runtime";
|
|
2
2
|
import { c as P } from "./colors-BYtTt7gN.js";
|
|
3
|
-
import * as
|
|
4
|
-
import { g as
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}, [r]), n;
|
|
3
|
+
import * as k from "react";
|
|
4
|
+
import { g as G, a as _, c as i, P as t } from "./generateUtilityClasses-BCID9NF1.js";
|
|
5
|
+
import { u as A, s as f, c as R, a as H, m as O, b as K, f as so, g as lo, r as co } from "./useTimeout-BWi4JTOH.js";
|
|
6
|
+
import { u as po } from "./useId-CK6Kn3Tn.js";
|
|
7
|
+
import { B as uo } from "./ButtonBase-qMhxbNdC.js";
|
|
8
|
+
import { css as Y, keyframes as Z } from "@mui/system";
|
|
9
|
+
function go(o) {
|
|
10
|
+
return G("MuiCircularProgress", o);
|
|
12
11
|
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}, U = fo.useId;
|
|
16
|
-
function yo(o) {
|
|
17
|
-
if (U !== void 0) {
|
|
18
|
-
const r = U();
|
|
19
|
-
return o ?? r;
|
|
20
|
-
}
|
|
21
|
-
return vo(o);
|
|
22
|
-
}
|
|
23
|
-
function bo(o) {
|
|
24
|
-
return A("MuiCircularProgress", o);
|
|
25
|
-
}
|
|
26
|
-
H("MuiCircularProgress", ["root", "determinate", "indeterminate", "colorPrimary", "colorSecondary", "svg", "track", "circle", "circleDeterminate", "circleIndeterminate", "circleDisableShrink"]);
|
|
27
|
-
const l = 44, T = J`
|
|
12
|
+
_("MuiCircularProgress", ["root", "determinate", "indeterminate", "colorPrimary", "colorSecondary", "svg", "track", "circle", "circleDeterminate", "circleIndeterminate", "circleDisableShrink"]);
|
|
13
|
+
const l = 44, T = Z`
|
|
28
14
|
0% {
|
|
29
15
|
transform: rotate(0deg);
|
|
30
16
|
}
|
|
@@ -32,7 +18,7 @@ const l = 44, T = J`
|
|
|
32
18
|
100% {
|
|
33
19
|
transform: rotate(360deg);
|
|
34
20
|
}
|
|
35
|
-
`, E =
|
|
21
|
+
`, E = Z`
|
|
36
22
|
0% {
|
|
37
23
|
stroke-dasharray: 1px, 200px;
|
|
38
24
|
stroke-dashoffset: 0;
|
|
@@ -47,33 +33,33 @@ const l = 44, T = J`
|
|
|
47
33
|
stroke-dasharray: 1px, 200px;
|
|
48
34
|
stroke-dashoffset: -126px;
|
|
49
35
|
}
|
|
50
|
-
`,
|
|
36
|
+
`, vo = typeof T != "string" ? Y`
|
|
51
37
|
animation: ${T} 1.4s linear infinite;
|
|
52
|
-
` : null,
|
|
38
|
+
` : null, fo = typeof E != "string" ? Y`
|
|
53
39
|
animation: ${E} 1.4s ease-in-out infinite;
|
|
54
|
-
` : null,
|
|
40
|
+
` : null, yo = (o) => {
|
|
55
41
|
const {
|
|
56
42
|
classes: r,
|
|
57
43
|
variant: a,
|
|
58
44
|
color: n,
|
|
59
|
-
disableShrink:
|
|
45
|
+
disableShrink: e
|
|
60
46
|
} = o, s = {
|
|
61
|
-
root: ["root", a, `color${
|
|
47
|
+
root: ["root", a, `color${i(n)}`],
|
|
62
48
|
svg: ["svg"],
|
|
63
49
|
track: ["track"],
|
|
64
|
-
circle: ["circle", `circle${
|
|
50
|
+
circle: ["circle", `circle${i(a)}`, e && "circleDisableShrink"]
|
|
65
51
|
};
|
|
66
|
-
return
|
|
67
|
-
},
|
|
52
|
+
return H(s, go, r);
|
|
53
|
+
}, bo = f("span", {
|
|
68
54
|
name: "MuiCircularProgress",
|
|
69
55
|
slot: "Root",
|
|
70
56
|
overridesResolver: (o, r) => {
|
|
71
57
|
const {
|
|
72
58
|
ownerState: a
|
|
73
59
|
} = o;
|
|
74
|
-
return [r.root, r[a.variant], r[`color${
|
|
60
|
+
return [r.root, r[a.variant], r[`color${i(a.color)}`]];
|
|
75
61
|
}
|
|
76
|
-
})(
|
|
62
|
+
})(O(({
|
|
77
63
|
theme: o
|
|
78
64
|
}) => ({
|
|
79
65
|
display: "inline-block",
|
|
@@ -88,10 +74,10 @@ const l = 44, T = J`
|
|
|
88
74
|
props: {
|
|
89
75
|
variant: "indeterminate"
|
|
90
76
|
},
|
|
91
|
-
style:
|
|
77
|
+
style: vo || {
|
|
92
78
|
animation: `${T} 1.4s linear infinite`
|
|
93
79
|
}
|
|
94
|
-
}, ...Object.entries(o.palette).filter(
|
|
80
|
+
}, ...Object.entries(o.palette).filter(K()).map(([r]) => ({
|
|
95
81
|
props: {
|
|
96
82
|
color: r
|
|
97
83
|
},
|
|
@@ -99,22 +85,22 @@ const l = 44, T = J`
|
|
|
99
85
|
color: (o.vars || o).palette[r].main
|
|
100
86
|
}
|
|
101
87
|
}))]
|
|
102
|
-
}))),
|
|
88
|
+
}))), xo = f("svg", {
|
|
103
89
|
name: "MuiCircularProgress",
|
|
104
90
|
slot: "Svg"
|
|
105
91
|
})({
|
|
106
92
|
display: "block"
|
|
107
93
|
// Keeps the progress centered
|
|
108
|
-
}),
|
|
94
|
+
}), So = f("circle", {
|
|
109
95
|
name: "MuiCircularProgress",
|
|
110
96
|
slot: "Circle",
|
|
111
97
|
overridesResolver: (o, r) => {
|
|
112
98
|
const {
|
|
113
99
|
ownerState: a
|
|
114
100
|
} = o;
|
|
115
|
-
return [r.circle, r[`circle${
|
|
101
|
+
return [r.circle, r[`circle${i(a.variant)}`], a.disableShrink && r.circleDisableShrink];
|
|
116
102
|
}
|
|
117
|
-
})(
|
|
103
|
+
})(O(({
|
|
118
104
|
theme: o
|
|
119
105
|
}) => ({
|
|
120
106
|
stroke: "currentColor",
|
|
@@ -139,78 +125,78 @@ const l = 44, T = J`
|
|
|
139
125
|
props: ({
|
|
140
126
|
ownerState: r
|
|
141
127
|
}) => r.variant === "indeterminate" && !r.disableShrink,
|
|
142
|
-
style:
|
|
128
|
+
style: fo || {
|
|
143
129
|
// At runtime for Pigment CSS, `bufferAnimation` will be null and the generated keyframe will be used.
|
|
144
130
|
animation: `${E} 1.4s ease-in-out infinite`
|
|
145
131
|
}
|
|
146
132
|
}]
|
|
147
|
-
}))),
|
|
133
|
+
}))), ho = f("circle", {
|
|
148
134
|
name: "MuiCircularProgress",
|
|
149
135
|
slot: "Track"
|
|
150
|
-
})(
|
|
136
|
+
})(O(({
|
|
151
137
|
theme: o
|
|
152
138
|
}) => ({
|
|
153
139
|
stroke: "currentColor",
|
|
154
140
|
opacity: (o.vars || o).palette.action.activatedOpacity
|
|
155
|
-
}))),
|
|
156
|
-
const n =
|
|
141
|
+
}))), q = /* @__PURE__ */ k.forwardRef(function(r, a) {
|
|
142
|
+
const n = A({
|
|
157
143
|
props: r,
|
|
158
144
|
name: "MuiCircularProgress"
|
|
159
145
|
}), {
|
|
160
|
-
className:
|
|
146
|
+
className: e,
|
|
161
147
|
color: s = "primary",
|
|
162
148
|
disableShrink: g = !1,
|
|
163
149
|
enableTrackSlot: d = !1,
|
|
164
|
-
size:
|
|
165
|
-
style:
|
|
150
|
+
size: y = 40,
|
|
151
|
+
style: h,
|
|
166
152
|
thickness: p = 3.6,
|
|
167
153
|
value: m = 0,
|
|
168
154
|
variant: w = "indeterminate",
|
|
169
155
|
...$
|
|
170
|
-
} = n,
|
|
156
|
+
} = n, b = {
|
|
171
157
|
...n,
|
|
172
158
|
color: s,
|
|
173
159
|
disableShrink: g,
|
|
174
|
-
size:
|
|
160
|
+
size: y,
|
|
175
161
|
thickness: p,
|
|
176
162
|
value: m,
|
|
177
163
|
variant: w,
|
|
178
164
|
enableTrackSlot: d
|
|
179
|
-
},
|
|
165
|
+
}, C = yo(b), z = {}, I = {}, u = {};
|
|
180
166
|
if (w === "determinate") {
|
|
181
167
|
const N = 2 * Math.PI * ((l - p) / 2);
|
|
182
|
-
|
|
168
|
+
z.strokeDasharray = N.toFixed(3), u["aria-valuenow"] = Math.round(m), z.strokeDashoffset = `${((100 - m) / 100 * N).toFixed(3)}px`, I.transform = "rotate(-90deg)";
|
|
183
169
|
}
|
|
184
|
-
return /* @__PURE__ */ c(
|
|
185
|
-
className:
|
|
170
|
+
return /* @__PURE__ */ c(bo, {
|
|
171
|
+
className: R(C.root, e),
|
|
186
172
|
style: {
|
|
187
|
-
width:
|
|
188
|
-
height:
|
|
189
|
-
...
|
|
190
|
-
...
|
|
173
|
+
width: y,
|
|
174
|
+
height: y,
|
|
175
|
+
...I,
|
|
176
|
+
...h
|
|
191
177
|
},
|
|
192
|
-
ownerState:
|
|
178
|
+
ownerState: b,
|
|
193
179
|
ref: a,
|
|
194
180
|
role: "progressbar",
|
|
195
181
|
...u,
|
|
196
182
|
...$,
|
|
197
|
-
children: /* @__PURE__ */
|
|
198
|
-
className:
|
|
199
|
-
ownerState:
|
|
183
|
+
children: /* @__PURE__ */ U(xo, {
|
|
184
|
+
className: C.svg,
|
|
185
|
+
ownerState: b,
|
|
200
186
|
viewBox: `${l / 2} ${l / 2} ${l} ${l}`,
|
|
201
|
-
children: [d ? /* @__PURE__ */ c(
|
|
202
|
-
className:
|
|
203
|
-
ownerState:
|
|
187
|
+
children: [d ? /* @__PURE__ */ c(ho, {
|
|
188
|
+
className: C.track,
|
|
189
|
+
ownerState: b,
|
|
204
190
|
cx: l,
|
|
205
191
|
cy: l,
|
|
206
192
|
r: (l - p) / 2,
|
|
207
193
|
fill: "none",
|
|
208
194
|
strokeWidth: p,
|
|
209
195
|
"aria-hidden": "true"
|
|
210
|
-
}) : null, /* @__PURE__ */ c(
|
|
211
|
-
className:
|
|
212
|
-
style:
|
|
213
|
-
ownerState:
|
|
196
|
+
}) : null, /* @__PURE__ */ c(So, {
|
|
197
|
+
className: C.circle,
|
|
198
|
+
style: z,
|
|
199
|
+
ownerState: b,
|
|
214
200
|
cx: l,
|
|
215
201
|
cy: l,
|
|
216
202
|
r: (l - p) / 2,
|
|
@@ -220,7 +206,7 @@ const l = 44, T = J`
|
|
|
220
206
|
})
|
|
221
207
|
});
|
|
222
208
|
});
|
|
223
|
-
process.env.NODE_ENV !== "production" && (
|
|
209
|
+
process.env.NODE_ENV !== "production" && (q.propTypes = {
|
|
224
210
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
225
211
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
226
212
|
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
@@ -245,7 +231,7 @@ process.env.NODE_ENV !== "production" && (Q.propTypes = {
|
|
|
245
231
|
* This only works if variant is `indeterminate`.
|
|
246
232
|
* @default false
|
|
247
233
|
*/
|
|
248
|
-
disableShrink:
|
|
234
|
+
disableShrink: so(t.bool, (o) => o.disableShrink && o.variant && o.variant !== "indeterminate" ? new Error("MUI: You have provided the `disableShrink` prop with a variant other than `indeterminate`. This will have no effect.") : null),
|
|
249
235
|
/**
|
|
250
236
|
* If `true`, a track circle slot is mounted to show a subtle background for the progress.
|
|
251
237
|
* The `size` and `thickness` apply to the track slot to be consistent with the progress circle.
|
|
@@ -285,36 +271,36 @@ process.env.NODE_ENV !== "production" && (Q.propTypes = {
|
|
|
285
271
|
*/
|
|
286
272
|
variant: t.oneOf(["determinate", "indeterminate"])
|
|
287
273
|
});
|
|
288
|
-
function
|
|
289
|
-
return
|
|
274
|
+
function mo(o) {
|
|
275
|
+
return G("MuiButton", o);
|
|
290
276
|
}
|
|
291
|
-
const
|
|
292
|
-
process.env.NODE_ENV !== "production" && (
|
|
293
|
-
const
|
|
294
|
-
process.env.NODE_ENV !== "production" && (
|
|
295
|
-
const
|
|
277
|
+
const S = _("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", "colorPrimary", "colorSecondary", "colorSuccess", "colorError", "colorInfo", "colorWarning", "textSizeSmall", "textSizeMedium", "textSizeLarge", "outlinedSizeSmall", "outlinedSizeMedium", "outlinedSizeLarge", "containedSizeSmall", "containedSizeMedium", "containedSizeLarge", "sizeMedium", "sizeSmall", "sizeLarge", "fullWidth", "startIcon", "endIcon", "icon", "iconSizeSmall", "iconSizeMedium", "iconSizeLarge", "loading", "loadingWrapper", "loadingIconPlaceholder", "loadingIndicator", "loadingPositionCenter", "loadingPositionStart", "loadingPositionEnd"]), J = /* @__PURE__ */ k.createContext({});
|
|
278
|
+
process.env.NODE_ENV !== "production" && (J.displayName = "ButtonGroupContext");
|
|
279
|
+
const Q = /* @__PURE__ */ k.createContext(void 0);
|
|
280
|
+
process.env.NODE_ENV !== "production" && (Q.displayName = "ButtonGroupButtonContext");
|
|
281
|
+
const Co = (o) => {
|
|
296
282
|
const {
|
|
297
283
|
color: r,
|
|
298
284
|
disableElevation: a,
|
|
299
285
|
fullWidth: n,
|
|
300
|
-
size:
|
|
286
|
+
size: e,
|
|
301
287
|
variant: s,
|
|
302
288
|
loading: g,
|
|
303
289
|
loadingPosition: d,
|
|
304
|
-
classes:
|
|
305
|
-
} = o,
|
|
306
|
-
root: ["root", g && "loading", s, `${s}${
|
|
307
|
-
startIcon: ["icon", "startIcon", `iconSize${e
|
|
308
|
-
endIcon: ["icon", "endIcon", `iconSize${e
|
|
290
|
+
classes: y
|
|
291
|
+
} = o, h = {
|
|
292
|
+
root: ["root", g && "loading", s, `${s}${i(r)}`, `size${i(e)}`, `${s}Size${i(e)}`, `color${i(r)}`, a && "disableElevation", n && "fullWidth", g && `loadingPosition${i(d)}`],
|
|
293
|
+
startIcon: ["icon", "startIcon", `iconSize${i(e)}`],
|
|
294
|
+
endIcon: ["icon", "endIcon", `iconSize${i(e)}`],
|
|
309
295
|
loadingIndicator: ["loadingIndicator"],
|
|
310
296
|
loadingWrapper: ["loadingWrapper"]
|
|
311
|
-
}, p =
|
|
297
|
+
}, p = H(h, mo, y);
|
|
312
298
|
return {
|
|
313
|
-
...
|
|
299
|
+
...y,
|
|
314
300
|
// forward the focused, disabled, etc. classes to the ButtonBase
|
|
315
301
|
...p
|
|
316
302
|
};
|
|
317
|
-
},
|
|
303
|
+
}, X = [{
|
|
318
304
|
props: {
|
|
319
305
|
size: "small"
|
|
320
306
|
},
|
|
@@ -341,17 +327,17 @@ const zo = (o) => {
|
|
|
341
327
|
fontSize: 22
|
|
342
328
|
}
|
|
343
329
|
}
|
|
344
|
-
}],
|
|
345
|
-
shouldForwardProp: (o) =>
|
|
330
|
+
}], Po = f(uo, {
|
|
331
|
+
shouldForwardProp: (o) => co(o) || o === "classes",
|
|
346
332
|
name: "MuiButton",
|
|
347
333
|
slot: "Root",
|
|
348
334
|
overridesResolver: (o, r) => {
|
|
349
335
|
const {
|
|
350
336
|
ownerState: a
|
|
351
337
|
} = o;
|
|
352
|
-
return [r.root, r[a.variant], r[`${a.variant}${
|
|
338
|
+
return [r.root, r[a.variant], r[`${a.variant}${i(a.color)}`], r[`size${i(a.size)}`], r[`${a.variant}Size${i(a.size)}`], a.color === "inherit" && r.colorInherit, a.disableElevation && r.disableElevation, a.fullWidth && r.fullWidth, a.loading && r.loading];
|
|
353
339
|
}
|
|
354
|
-
})(
|
|
340
|
+
})(O(({
|
|
355
341
|
theme: o
|
|
356
342
|
}) => {
|
|
357
343
|
const r = o.palette.mode === "light" ? o.palette.grey[300] : o.palette.grey[800], a = o.palette.mode === "light" ? o.palette.grey.A100 : o.palette.grey[700];
|
|
@@ -367,7 +353,7 @@ const zo = (o) => {
|
|
|
367
353
|
"&:hover": {
|
|
368
354
|
textDecoration: "none"
|
|
369
355
|
},
|
|
370
|
-
[`&.${
|
|
356
|
+
[`&.${S.disabled}`]: {
|
|
371
357
|
color: (o.vars || o).palette.action.disabled
|
|
372
358
|
},
|
|
373
359
|
variants: [{
|
|
@@ -388,10 +374,10 @@ const zo = (o) => {
|
|
|
388
374
|
"&:active": {
|
|
389
375
|
boxShadow: (o.vars || o).shadows[8]
|
|
390
376
|
},
|
|
391
|
-
[`&.${
|
|
377
|
+
[`&.${S.focusVisible}`]: {
|
|
392
378
|
boxShadow: (o.vars || o).shadows[6]
|
|
393
379
|
},
|
|
394
|
-
[`&.${
|
|
380
|
+
[`&.${S.disabled}`]: {
|
|
395
381
|
color: (o.vars || o).palette.action.disabled,
|
|
396
382
|
boxShadow: (o.vars || o).shadows[0],
|
|
397
383
|
backgroundColor: (o.vars || o).palette.action.disabledBackground
|
|
@@ -407,7 +393,7 @@ const zo = (o) => {
|
|
|
407
393
|
borderColor: "var(--variant-outlinedBorder, currentColor)",
|
|
408
394
|
backgroundColor: "var(--variant-outlinedBg)",
|
|
409
395
|
color: "var(--variant-outlinedColor)",
|
|
410
|
-
[`&.${
|
|
396
|
+
[`&.${S.disabled}`]: {
|
|
411
397
|
border: `1px solid ${(o.vars || o).palette.action.disabledBackground}`
|
|
412
398
|
}
|
|
413
399
|
}
|
|
@@ -420,7 +406,7 @@ const zo = (o) => {
|
|
|
420
406
|
color: "var(--variant-textColor)",
|
|
421
407
|
backgroundColor: "var(--variant-textBg)"
|
|
422
408
|
}
|
|
423
|
-
}, ...Object.entries(o.palette).filter(
|
|
409
|
+
}, ...Object.entries(o.palette).filter(K()).map(([n]) => ({
|
|
424
410
|
props: {
|
|
425
411
|
color: n
|
|
426
412
|
},
|
|
@@ -518,13 +504,13 @@ const zo = (o) => {
|
|
|
518
504
|
"&:hover": {
|
|
519
505
|
boxShadow: "none"
|
|
520
506
|
},
|
|
521
|
-
[`&.${
|
|
507
|
+
[`&.${S.focusVisible}`]: {
|
|
522
508
|
boxShadow: "none"
|
|
523
509
|
},
|
|
524
510
|
"&:active": {
|
|
525
511
|
boxShadow: "none"
|
|
526
512
|
},
|
|
527
|
-
[`&.${
|
|
513
|
+
[`&.${S.disabled}`]: {
|
|
528
514
|
boxShadow: "none"
|
|
529
515
|
}
|
|
530
516
|
}
|
|
@@ -543,20 +529,20 @@ const zo = (o) => {
|
|
|
543
529
|
transition: o.transitions.create(["background-color", "box-shadow", "border-color"], {
|
|
544
530
|
duration: o.transitions.duration.short
|
|
545
531
|
}),
|
|
546
|
-
[`&.${
|
|
532
|
+
[`&.${S.loading}`]: {
|
|
547
533
|
color: "transparent"
|
|
548
534
|
}
|
|
549
535
|
}
|
|
550
536
|
}]
|
|
551
537
|
};
|
|
552
|
-
})),
|
|
538
|
+
})), ko = f("span", {
|
|
553
539
|
name: "MuiButton",
|
|
554
540
|
slot: "StartIcon",
|
|
555
541
|
overridesResolver: (o, r) => {
|
|
556
542
|
const {
|
|
557
543
|
ownerState: a
|
|
558
544
|
} = o;
|
|
559
|
-
return [r.startIcon, a.loading && r.startIconLoadingStart, r[`iconSize${
|
|
545
|
+
return [r.startIcon, a.loading && r.startIconLoadingStart, r[`iconSize${i(a.size)}`]];
|
|
560
546
|
}
|
|
561
547
|
})(({
|
|
562
548
|
theme: o
|
|
@@ -591,15 +577,15 @@ const zo = (o) => {
|
|
|
591
577
|
style: {
|
|
592
578
|
marginRight: -8
|
|
593
579
|
}
|
|
594
|
-
}, ...
|
|
595
|
-
})),
|
|
580
|
+
}, ...X]
|
|
581
|
+
})), zo = f("span", {
|
|
596
582
|
name: "MuiButton",
|
|
597
583
|
slot: "EndIcon",
|
|
598
584
|
overridesResolver: (o, r) => {
|
|
599
585
|
const {
|
|
600
586
|
ownerState: a
|
|
601
587
|
} = o;
|
|
602
|
-
return [r.endIcon, a.loading && r.endIconLoadingEnd, r[`iconSize${
|
|
588
|
+
return [r.endIcon, a.loading && r.endIconLoadingEnd, r[`iconSize${i(a.size)}`]];
|
|
603
589
|
}
|
|
604
590
|
})(({
|
|
605
591
|
theme: o
|
|
@@ -634,8 +620,8 @@ const zo = (o) => {
|
|
|
634
620
|
style: {
|
|
635
621
|
marginLeft: -8
|
|
636
622
|
}
|
|
637
|
-
}, ...
|
|
638
|
-
})),
|
|
623
|
+
}, ...X]
|
|
624
|
+
})), Io = f("span", {
|
|
639
625
|
name: "MuiButton",
|
|
640
626
|
slot: "LoadingIndicator"
|
|
641
627
|
})(({
|
|
@@ -725,99 +711,99 @@ const zo = (o) => {
|
|
|
725
711
|
right: -10
|
|
726
712
|
}
|
|
727
713
|
}]
|
|
728
|
-
})),
|
|
714
|
+
})), j = f("span", {
|
|
729
715
|
name: "MuiButton",
|
|
730
716
|
slot: "LoadingIconPlaceholder"
|
|
731
717
|
})({
|
|
732
718
|
display: "inline-block",
|
|
733
719
|
width: "1em",
|
|
734
720
|
height: "1em"
|
|
735
|
-
}),
|
|
736
|
-
const n =
|
|
721
|
+
}), oo = /* @__PURE__ */ k.forwardRef(function(r, a) {
|
|
722
|
+
const n = k.useContext(J), e = k.useContext(Q), s = lo(n, r), g = A({
|
|
737
723
|
props: s,
|
|
738
724
|
name: "MuiButton"
|
|
739
725
|
}), {
|
|
740
726
|
children: d,
|
|
741
|
-
color:
|
|
742
|
-
component:
|
|
727
|
+
color: y = "primary",
|
|
728
|
+
component: h = "button",
|
|
743
729
|
className: p,
|
|
744
730
|
disabled: m = !1,
|
|
745
731
|
disableElevation: w = !1,
|
|
746
732
|
disableFocusRipple: $ = !1,
|
|
747
|
-
endIcon:
|
|
748
|
-
focusVisibleClassName:
|
|
749
|
-
fullWidth:
|
|
750
|
-
id:
|
|
733
|
+
endIcon: b,
|
|
734
|
+
focusVisibleClassName: C,
|
|
735
|
+
fullWidth: z = !1,
|
|
736
|
+
id: I,
|
|
751
737
|
loading: u = null,
|
|
752
738
|
loadingIndicator: N,
|
|
753
739
|
loadingPosition: B = "center",
|
|
754
|
-
size:
|
|
740
|
+
size: to = "medium",
|
|
755
741
|
startIcon: W,
|
|
756
742
|
type: M,
|
|
757
|
-
variant:
|
|
758
|
-
...
|
|
759
|
-
} = g, D =
|
|
743
|
+
variant: ro = "text",
|
|
744
|
+
...ao
|
|
745
|
+
} = g, D = po(I), L = N ?? /* @__PURE__ */ c(q, {
|
|
760
746
|
"aria-labelledby": D,
|
|
761
747
|
color: "inherit",
|
|
762
748
|
size: 16
|
|
763
|
-
}),
|
|
749
|
+
}), x = {
|
|
764
750
|
...g,
|
|
765
|
-
color:
|
|
766
|
-
component:
|
|
751
|
+
color: y,
|
|
752
|
+
component: h,
|
|
767
753
|
disabled: m,
|
|
768
754
|
disableElevation: w,
|
|
769
755
|
disableFocusRipple: $,
|
|
770
|
-
fullWidth:
|
|
756
|
+
fullWidth: z,
|
|
771
757
|
loading: u,
|
|
772
758
|
loadingIndicator: L,
|
|
773
759
|
loadingPosition: B,
|
|
774
|
-
size:
|
|
760
|
+
size: to,
|
|
775
761
|
type: M,
|
|
776
|
-
variant:
|
|
777
|
-
}, v =
|
|
762
|
+
variant: ro
|
|
763
|
+
}, v = Co(x), no = (W || u && B === "start") && /* @__PURE__ */ c(ko, {
|
|
778
764
|
className: v.startIcon,
|
|
779
|
-
ownerState:
|
|
780
|
-
children: W || /* @__PURE__ */ c(
|
|
765
|
+
ownerState: x,
|
|
766
|
+
children: W || /* @__PURE__ */ c(j, {
|
|
781
767
|
className: v.loadingIconPlaceholder,
|
|
782
|
-
ownerState:
|
|
768
|
+
ownerState: x
|
|
783
769
|
})
|
|
784
|
-
}),
|
|
770
|
+
}), io = (b || u && B === "end") && /* @__PURE__ */ c(zo, {
|
|
785
771
|
className: v.endIcon,
|
|
786
|
-
ownerState:
|
|
787
|
-
children:
|
|
772
|
+
ownerState: x,
|
|
773
|
+
children: b || /* @__PURE__ */ c(j, {
|
|
788
774
|
className: v.loadingIconPlaceholder,
|
|
789
|
-
ownerState:
|
|
775
|
+
ownerState: x
|
|
790
776
|
})
|
|
791
|
-
}),
|
|
777
|
+
}), eo = e || "", V = typeof u == "boolean" ? (
|
|
792
778
|
// use plain HTML span to minimize the runtime overhead
|
|
793
779
|
/* @__PURE__ */ c("span", {
|
|
794
780
|
className: v.loadingWrapper,
|
|
795
781
|
style: {
|
|
796
782
|
display: "contents"
|
|
797
783
|
},
|
|
798
|
-
children: u && /* @__PURE__ */ c(
|
|
784
|
+
children: u && /* @__PURE__ */ c(Io, {
|
|
799
785
|
className: v.loadingIndicator,
|
|
800
|
-
ownerState:
|
|
786
|
+
ownerState: x,
|
|
801
787
|
children: L
|
|
802
788
|
})
|
|
803
789
|
})
|
|
804
790
|
) : null;
|
|
805
|
-
return /* @__PURE__ */
|
|
806
|
-
ownerState:
|
|
807
|
-
className:
|
|
808
|
-
component:
|
|
791
|
+
return /* @__PURE__ */ U(Po, {
|
|
792
|
+
ownerState: x,
|
|
793
|
+
className: R(n.className, v.root, p, eo),
|
|
794
|
+
component: h,
|
|
809
795
|
disabled: m || u,
|
|
810
796
|
focusRipple: !$,
|
|
811
|
-
focusVisibleClassName:
|
|
797
|
+
focusVisibleClassName: R(v.focusVisible, C),
|
|
812
798
|
ref: a,
|
|
813
799
|
type: M,
|
|
814
|
-
id: u ? D :
|
|
815
|
-
...
|
|
800
|
+
id: u ? D : I,
|
|
801
|
+
...ao,
|
|
816
802
|
classes: v,
|
|
817
|
-
children: [
|
|
803
|
+
children: [no, B !== "end" && V, d, B === "end" && V, io]
|
|
818
804
|
});
|
|
819
805
|
});
|
|
820
|
-
process.env.NODE_ENV !== "production" && (
|
|
806
|
+
process.env.NODE_ENV !== "production" && (oo.propTypes = {
|
|
821
807
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
822
808
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
823
809
|
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
@@ -933,19 +919,19 @@ process.env.NODE_ENV !== "production" && (ro.propTypes = {
|
|
|
933
919
|
*/
|
|
934
920
|
variant: t.oneOfType([t.oneOf(["contained", "outlined", "text"]), t.string])
|
|
935
921
|
});
|
|
936
|
-
const
|
|
922
|
+
const F = {
|
|
937
923
|
blue: { backgroundColor: P.primary500, hoverColor: "#1f7eb1", textColor: "white" },
|
|
938
924
|
clear: { backgroundColor: "", hoverColor: "", textColor: "" },
|
|
939
925
|
gray: { backgroundColor: P.grey50, hoverColor: P.primary50, textColor: P.grey800 }
|
|
940
926
|
};
|
|
941
|
-
function
|
|
942
|
-
const { className: r, children: a, sx: n, disabled:
|
|
927
|
+
function Eo(o) {
|
|
928
|
+
const { className: r, children: a, sx: n, disabled: e, color: s = "blue", ...g } = o, d = F[s] || F.blue;
|
|
943
929
|
return /* @__PURE__ */ c(
|
|
944
|
-
|
|
930
|
+
oo,
|
|
945
931
|
{
|
|
946
932
|
className: r,
|
|
947
933
|
variant: "text",
|
|
948
|
-
disabled:
|
|
934
|
+
disabled: e,
|
|
949
935
|
...g,
|
|
950
936
|
sx: {
|
|
951
937
|
px: "24px",
|
|
@@ -953,10 +939,10 @@ function Wo(o) {
|
|
|
953
939
|
letterSpacing: "1.25px",
|
|
954
940
|
height: "38px",
|
|
955
941
|
fontWeight: 600,
|
|
956
|
-
color:
|
|
957
|
-
backgroundColor:
|
|
942
|
+
color: e ? P.grey100 : d.textColor,
|
|
943
|
+
backgroundColor: e ? P.grey100 : d.backgroundColor,
|
|
958
944
|
"&:hover": {
|
|
959
|
-
backgroundColor:
|
|
945
|
+
backgroundColor: e ? "none" : d.hoverColor
|
|
960
946
|
},
|
|
961
947
|
...n
|
|
962
948
|
},
|
|
@@ -965,7 +951,6 @@ function Wo(o) {
|
|
|
965
951
|
);
|
|
966
952
|
}
|
|
967
953
|
export {
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
yo as u
|
|
954
|
+
Eo as B,
|
|
955
|
+
q as C
|
|
971
956
|
};
|