@cgi-learning-hub/ui 0.0.1-dev.1708959744 → 0.0.1-dev.1708974808
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/{Button-wMPAZpnO.cjs → Button-Tkz5NkF_.cjs} +1 -1
- package/dist/{Button-CmBnwwn3.js → Button-X7eWZQfX.js} +12 -12
- package/dist/ButtonBase-CKfcGhaU.js +892 -0
- package/dist/ButtonBase-Cg8cBMzO.cjs +75 -0
- package/dist/Input-CAb0EFzc.cjs +1 -0
- package/dist/{Input-Dk-cN0Fb.js → Input-CbYjsRHK.js} +10 -10
- package/dist/{InputBase-BbXy6VDy.js → InputBase-B13Nzzhk.js} +157 -138
- package/dist/InputBase-CKlCw9fj.cjs +4 -0
- package/dist/assets/index.css +1 -1
- package/dist/components/AnotherComponent/AnotherComponent.cjs.js +1 -1
- package/dist/components/AnotherComponent/AnotherComponent.es.js +3 -3
- package/dist/components/BasicButtons/BasicButtons.cjs.js +1 -1
- package/dist/components/BasicButtons/BasicButtons.es.js +10 -10
- package/dist/components/BasicButtons/BasicButtons.stories.cjs.js +1 -1
- package/dist/components/buttons/DefaultButton/DefaultButton.cjs.js +28 -1
- package/dist/components/buttons/DefaultButton/DefaultButton.es.js +333 -126
- package/dist/components/buttons/DefaultButton/DefaultButtonIcon.cjs.js +1 -1
- package/dist/components/buttons/DefaultButton/DefaultButtonIcon.es.js +8 -8
- package/dist/components/buttons/PrimaryButton/PrimaryButton.cjs.js +1 -1
- package/dist/components/buttons/PrimaryButton/PrimaryButton.es.js +1 -1
- 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 +1 -1
- 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/index.cjs.js +1 -1
- package/dist/components/index.d.ts +0 -4
- package/dist/components/index.es.js +12 -20
- package/dist/components/inputs/SearchInput/SearchInput.cjs.js +1 -1
- package/dist/components/inputs/SearchInput/SearchInput.es.js +247 -77
- package/dist/components/inputs/TextInput/TextInput.cjs.js +13 -11
- package/dist/components/inputs/TextInput/TextInput.es.js +404 -367
- package/dist/{createSvgIcon-BivvPRyr.cjs → createSvgIcon-jvI3LIfI.cjs} +1 -1
- package/dist/{createSvgIcon-DLZM3vHe.js → createSvgIcon-qXNZi4k1.js} +14 -14
- package/dist/{extendSxProp-CVD6j4mA.js → extendSxProp-BRHiEwyk.js} +1 -1
- package/dist/{extendSxProp-D5gpnasP.cjs → extendSxProp-CvhhU9Vb.cjs} +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +10 -18
- package/dist/useForkRef-82uiK71d.cjs +1 -0
- package/dist/useForkRef-CLcOhrzI.js +44 -0
- package/dist/useTheme-BWRyHzdn.js +65 -0
- package/dist/useTheme-BpLcDNG1.cjs +1 -0
- package/dist/{useThemeProps-kb_vU-1P.js → useThemeProps-B6yTTpAe.js} +714 -741
- package/dist/{useThemeProps-C6ClLEqN.cjs → useThemeProps-CDriK9TK.cjs} +14 -14
- package/package.json +1 -2
- package/dist/ButtonBase-Bw43M3TO.js +0 -831
- package/dist/ButtonBase-XPViWbp_.cjs +0 -75
- package/dist/CircularProgress-BCdQaPFF.cjs +0 -28
- package/dist/CircularProgress-DRE9BLTL.js +0 -215
- package/dist/Input-DHic6dYE.cjs +0 -1
- package/dist/InputBase-WBNJQn8V.cjs +0 -4
- package/dist/Tab-C2Tmr8Sv.cjs +0 -1
- package/dist/Tab-CWxCqAvH.js +0 -237
- package/dist/TransitionGroupContext-C7wWJ6l7.js +0 -14
- package/dist/TransitionGroupContext-g4tmk10h.cjs +0 -1
- package/dist/Typography-B1bdo7yt.js +0 -177
- package/dist/Typography-CO64FVmw.cjs +0 -1
- package/dist/components/Dropzone/Dropzone.cjs.js +0 -5
- package/dist/components/Dropzone/Dropzone.d.ts +0 -9
- package/dist/components/Dropzone/Dropzone.es.js +0 -1209
- package/dist/components/Dropzone/index.cjs.js +0 -1
- package/dist/components/Dropzone/index.d.ts +0 -2
- package/dist/components/Dropzone/index.es.js +0 -4
- package/dist/components/lists/FileList/FileList.cjs.js +0 -1
- package/dist/components/lists/FileList/FileList.d.ts +0 -7
- package/dist/components/lists/FileList/FileList.es.js +0 -19
- package/dist/components/lists/FileList/FileListItem.cjs.js +0 -2
- package/dist/components/lists/FileList/FileListItem.d.ts +0 -13
- package/dist/components/lists/FileList/FileListItem.es.js +0 -216
- package/dist/components/lists/FileList/index.cjs.js +0 -1
- package/dist/components/lists/FileList/index.d.ts +0 -4
- package/dist/components/lists/FileList/index.es.js +0 -6
- package/dist/components/lists/index.cjs.js +0 -1
- package/dist/components/lists/index.d.ts +0 -1
- package/dist/components/lists/index.es.js +0 -6
- package/dist/createSvgIcon-9NfUaq9H.js +0 -143
- package/dist/createSvgIcon-B7HVs3ZC.cjs +0 -2
- package/dist/ownerWindow-BoRkeomM.js +0 -23
- package/dist/ownerWindow-Dk_4aaak.cjs +0 -1
- package/dist/refType-CMQbzE37.js +0 -29
- package/dist/refType-dllUCpD8.cjs +0 -1
- package/dist/useControlled-BsLcOmhe.js +0 -48
- package/dist/useControlled-jN3fqFfv.cjs +0 -3
- package/dist/useForkRef-CGd3Nhyb.cjs +0 -1
- package/dist/useForkRef-DwN_Iz9R.js +0 -17
- package/dist/useIsFocusVisible-BF0lT08B.cjs +0 -1
- package/dist/useIsFocusVisible-D8ksiuhS.js +0 -69
- package/dist/useTheme-BSwuVDD3.js +0 -9
- package/dist/useTheme-C-LTLVMt.cjs +0 -1
- package/dist/useTimeout-KN97abZR.js +0 -47
- package/dist/useTimeout-qjxkiZZn.cjs +0 -1
|
@@ -1,142 +1,349 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import { B as
|
|
6
|
-
import { u as
|
|
7
|
-
import { c as
|
|
8
|
-
import {
|
|
9
|
-
import { u as
|
|
10
|
-
function
|
|
11
|
-
return
|
|
1
|
+
import { jsx as f, jsxs as S } from "react/jsx-runtime";
|
|
2
|
+
import * as B from "react";
|
|
3
|
+
import T from "./DefaultButtonIcon.es.js";
|
|
4
|
+
import { b as D, g as _, s as I, f as g, a as e, u as j, _ as N, h as V, P as n, e as U, v as K } from "../../../useThemeProps-B6yTTpAe.js";
|
|
5
|
+
import { B as H, a as Y } from "../../../Button-X7eWZQfX.js";
|
|
6
|
+
import { u as Z } from "../../../useId-BW-oWmul.js";
|
|
7
|
+
import { c as W } from "../../../useForkRef-CLcOhrzI.js";
|
|
8
|
+
import { keyframes as z, css as w } from "@emotion/react";
|
|
9
|
+
import { u as q } from "../../../useTheme-BWRyHzdn.js";
|
|
10
|
+
function A(o) {
|
|
11
|
+
return D("MuiCircularProgress", o);
|
|
12
12
|
}
|
|
13
|
-
|
|
13
|
+
_("MuiCircularProgress", ["root", "determinate", "indeterminate", "colorPrimary", "colorSecondary", "svg", "circle", "circleDeterminate", "circleIndeterminate", "circleDisableShrink"]);
|
|
14
|
+
const J = ["className", "color", "disableShrink", "size", "style", "thickness", "value", "variant"];
|
|
15
|
+
let k = (o) => o, E, M, R, O;
|
|
16
|
+
const u = 44, Q = z(E || (E = k`
|
|
17
|
+
0% {
|
|
18
|
+
transform: rotate(0deg);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
100% {
|
|
22
|
+
transform: rotate(360deg);
|
|
23
|
+
}
|
|
24
|
+
`)), X = z(M || (M = k`
|
|
25
|
+
0% {
|
|
26
|
+
stroke-dasharray: 1px, 200px;
|
|
27
|
+
stroke-dashoffset: 0;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
50% {
|
|
31
|
+
stroke-dasharray: 100px, 200px;
|
|
32
|
+
stroke-dashoffset: -15px;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
100% {
|
|
36
|
+
stroke-dasharray: 100px, 200px;
|
|
37
|
+
stroke-dashoffset: -125px;
|
|
38
|
+
}
|
|
39
|
+
`)), oo = (o) => {
|
|
40
|
+
const {
|
|
41
|
+
classes: t,
|
|
42
|
+
variant: r,
|
|
43
|
+
color: i,
|
|
44
|
+
disableShrink: a
|
|
45
|
+
} = o, s = {
|
|
46
|
+
root: ["root", r, `color${g(i)}`],
|
|
47
|
+
svg: ["svg"],
|
|
48
|
+
circle: ["circle", `circle${g(r)}`, a && "circleDisableShrink"]
|
|
49
|
+
};
|
|
50
|
+
return U(s, A, t);
|
|
51
|
+
}, to = I("span", {
|
|
52
|
+
name: "MuiCircularProgress",
|
|
53
|
+
slot: "Root",
|
|
54
|
+
overridesResolver: (o, t) => {
|
|
55
|
+
const {
|
|
56
|
+
ownerState: r
|
|
57
|
+
} = o;
|
|
58
|
+
return [t.root, t[r.variant], t[`color${g(r.color)}`]];
|
|
59
|
+
}
|
|
60
|
+
})(({
|
|
61
|
+
ownerState: o,
|
|
62
|
+
theme: t
|
|
63
|
+
}) => e({
|
|
64
|
+
display: "inline-block"
|
|
65
|
+
}, o.variant === "determinate" && {
|
|
66
|
+
transition: t.transitions.create("transform")
|
|
67
|
+
}, o.color !== "inherit" && {
|
|
68
|
+
color: (t.vars || t).palette[o.color].main
|
|
69
|
+
}), ({
|
|
70
|
+
ownerState: o
|
|
71
|
+
}) => o.variant === "indeterminate" && w(R || (R = k`
|
|
72
|
+
animation: ${0} 1.4s linear infinite;
|
|
73
|
+
`), Q)), no = I("svg", {
|
|
74
|
+
name: "MuiCircularProgress",
|
|
75
|
+
slot: "Svg",
|
|
76
|
+
overridesResolver: (o, t) => t.svg
|
|
77
|
+
})({
|
|
78
|
+
display: "block"
|
|
79
|
+
// Keeps the progress centered
|
|
80
|
+
}), ro = I("circle", {
|
|
81
|
+
name: "MuiCircularProgress",
|
|
82
|
+
slot: "Circle",
|
|
83
|
+
overridesResolver: (o, t) => {
|
|
84
|
+
const {
|
|
85
|
+
ownerState: r
|
|
86
|
+
} = o;
|
|
87
|
+
return [t.circle, t[`circle${g(r.variant)}`], r.disableShrink && t.circleDisableShrink];
|
|
88
|
+
}
|
|
89
|
+
})(({
|
|
90
|
+
ownerState: o,
|
|
91
|
+
theme: t
|
|
92
|
+
}) => e({
|
|
93
|
+
stroke: "currentColor"
|
|
94
|
+
}, o.variant === "determinate" && {
|
|
95
|
+
transition: t.transitions.create("stroke-dashoffset")
|
|
96
|
+
}, o.variant === "indeterminate" && {
|
|
97
|
+
// Some default value that looks fine waiting for the animation to kicks in.
|
|
98
|
+
strokeDasharray: "80px, 200px",
|
|
99
|
+
strokeDashoffset: 0
|
|
100
|
+
// Add the unit to fix a Edge 16 and below bug.
|
|
101
|
+
}), ({
|
|
102
|
+
ownerState: o
|
|
103
|
+
}) => o.variant === "indeterminate" && !o.disableShrink && w(O || (O = k`
|
|
104
|
+
animation: ${0} 1.4s ease-in-out infinite;
|
|
105
|
+
`), X)), F = /* @__PURE__ */ B.forwardRef(function(t, r) {
|
|
106
|
+
const i = j({
|
|
107
|
+
props: t,
|
|
108
|
+
name: "MuiCircularProgress"
|
|
109
|
+
}), {
|
|
110
|
+
className: a,
|
|
111
|
+
color: s = "primary",
|
|
112
|
+
disableShrink: C = !1,
|
|
113
|
+
size: h = 40,
|
|
114
|
+
style: $,
|
|
115
|
+
thickness: l = 3.6,
|
|
116
|
+
value: p = 0,
|
|
117
|
+
variant: x = "indeterminate"
|
|
118
|
+
} = i, L = N(i, J), m = e({}, i, {
|
|
119
|
+
color: s,
|
|
120
|
+
disableShrink: C,
|
|
121
|
+
size: h,
|
|
122
|
+
thickness: l,
|
|
123
|
+
value: p,
|
|
124
|
+
variant: x
|
|
125
|
+
}), v = oo(m), b = {}, c = {}, P = {};
|
|
126
|
+
if (x === "determinate") {
|
|
127
|
+
const y = 2 * Math.PI * ((u - l) / 2);
|
|
128
|
+
b.strokeDasharray = y.toFixed(3), P["aria-valuenow"] = Math.round(p), b.strokeDashoffset = `${((100 - p) / 100 * y).toFixed(3)}px`, c.transform = "rotate(-90deg)";
|
|
129
|
+
}
|
|
130
|
+
return /* @__PURE__ */ f(to, e({
|
|
131
|
+
className: V(v.root, a),
|
|
132
|
+
style: e({
|
|
133
|
+
width: h,
|
|
134
|
+
height: h
|
|
135
|
+
}, c, $),
|
|
136
|
+
ownerState: m,
|
|
137
|
+
ref: r,
|
|
138
|
+
role: "progressbar"
|
|
139
|
+
}, P, L, {
|
|
140
|
+
children: /* @__PURE__ */ f(no, {
|
|
141
|
+
className: v.svg,
|
|
142
|
+
ownerState: m,
|
|
143
|
+
viewBox: `${u / 2} ${u / 2} ${u} ${u}`,
|
|
144
|
+
children: /* @__PURE__ */ f(ro, {
|
|
145
|
+
className: v.circle,
|
|
146
|
+
style: b,
|
|
147
|
+
ownerState: m,
|
|
148
|
+
cx: u,
|
|
149
|
+
cy: u,
|
|
150
|
+
r: (u - l) / 2,
|
|
151
|
+
fill: "none",
|
|
152
|
+
strokeWidth: l
|
|
153
|
+
})
|
|
154
|
+
})
|
|
155
|
+
}));
|
|
156
|
+
});
|
|
157
|
+
process.env.NODE_ENV !== "production" && (F.propTypes = {
|
|
158
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
159
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
160
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
161
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
162
|
+
/**
|
|
163
|
+
* Override or extend the styles applied to the component.
|
|
164
|
+
*/
|
|
165
|
+
classes: n.object,
|
|
166
|
+
/**
|
|
167
|
+
* @ignore
|
|
168
|
+
*/
|
|
169
|
+
className: n.string,
|
|
170
|
+
/**
|
|
171
|
+
* The color of the component.
|
|
172
|
+
* It supports both default and custom theme colors, which can be added as shown in the
|
|
173
|
+
* [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
|
|
174
|
+
* @default 'primary'
|
|
175
|
+
*/
|
|
176
|
+
color: n.oneOfType([n.oneOf(["inherit", "primary", "secondary", "error", "info", "success", "warning"]), n.string]),
|
|
177
|
+
/**
|
|
178
|
+
* If `true`, the shrink animation is disabled.
|
|
179
|
+
* This only works if variant is `indeterminate`.
|
|
180
|
+
* @default false
|
|
181
|
+
*/
|
|
182
|
+
disableShrink: W(n.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),
|
|
183
|
+
/**
|
|
184
|
+
* The size of the component.
|
|
185
|
+
* If using a number, the pixel unit is assumed.
|
|
186
|
+
* If using a string, you need to provide the CSS unit, e.g. '3rem'.
|
|
187
|
+
* @default 40
|
|
188
|
+
*/
|
|
189
|
+
size: n.oneOfType([n.number, n.string]),
|
|
190
|
+
/**
|
|
191
|
+
* @ignore
|
|
192
|
+
*/
|
|
193
|
+
style: n.object,
|
|
194
|
+
/**
|
|
195
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
196
|
+
*/
|
|
197
|
+
sx: n.oneOfType([n.arrayOf(n.oneOfType([n.func, n.object, n.bool])), n.func, n.object]),
|
|
198
|
+
/**
|
|
199
|
+
* The thickness of the circle.
|
|
200
|
+
* @default 3.6
|
|
201
|
+
*/
|
|
202
|
+
thickness: n.number,
|
|
203
|
+
/**
|
|
204
|
+
* The value of the progress indicator for the determinate variant.
|
|
205
|
+
* Value between 0 and 100.
|
|
206
|
+
* @default 0
|
|
207
|
+
*/
|
|
208
|
+
value: n.number,
|
|
209
|
+
/**
|
|
210
|
+
* The variant to use.
|
|
211
|
+
* Use indeterminate when there is no progress value.
|
|
212
|
+
* @default 'indeterminate'
|
|
213
|
+
*/
|
|
214
|
+
variant: n.oneOf(["determinate", "indeterminate"])
|
|
215
|
+
});
|
|
216
|
+
const io = F;
|
|
217
|
+
function ao(o) {
|
|
218
|
+
return D("MuiLoadingButton", o);
|
|
219
|
+
}
|
|
220
|
+
const eo = _("MuiLoadingButton", ["root", "loading", "loadingIndicator", "loadingIndicatorCenter", "loadingIndicatorStart", "loadingIndicatorEnd", "endIconLoadingEnd", "startIconLoadingStart"]), d = eo, so = ["children", "disabled", "id", "loading", "loadingIndicator", "loadingPosition", "variant"], lo = (o) => {
|
|
14
221
|
const {
|
|
15
|
-
loading:
|
|
16
|
-
loadingPosition:
|
|
17
|
-
classes:
|
|
18
|
-
} =
|
|
19
|
-
root: ["root",
|
|
20
|
-
startIcon: [
|
|
21
|
-
endIcon: [
|
|
22
|
-
loadingIndicator: ["loadingIndicator",
|
|
23
|
-
},
|
|
24
|
-
return
|
|
25
|
-
},
|
|
26
|
-
shouldForwardProp: (
|
|
222
|
+
loading: t,
|
|
223
|
+
loadingPosition: r,
|
|
224
|
+
classes: i
|
|
225
|
+
} = o, a = {
|
|
226
|
+
root: ["root", t && "loading"],
|
|
227
|
+
startIcon: [t && `startIconLoading${g(r)}`],
|
|
228
|
+
endIcon: [t && `endIconLoading${g(r)}`],
|
|
229
|
+
loadingIndicator: ["loadingIndicator", t && `loadingIndicator${g(r)}`]
|
|
230
|
+
}, s = U(a, ao, i);
|
|
231
|
+
return e({}, i, s);
|
|
232
|
+
}, co = (o) => o !== "ownerState" && o !== "theme" && o !== "sx" && o !== "as" && o !== "classes", uo = I(H, {
|
|
233
|
+
shouldForwardProp: (o) => co(o) || o === "classes",
|
|
27
234
|
name: "MuiLoadingButton",
|
|
28
235
|
slot: "Root",
|
|
29
|
-
overridesResolver: (
|
|
30
|
-
[`& .${
|
|
31
|
-
},
|
|
32
|
-
[`& .${
|
|
236
|
+
overridesResolver: (o, t) => [t.root, t.startIconLoadingStart && {
|
|
237
|
+
[`& .${d.startIconLoadingStart}`]: t.startIconLoadingStart
|
|
238
|
+
}, t.endIconLoadingEnd && {
|
|
239
|
+
[`& .${d.endIconLoadingEnd}`]: t.endIconLoadingEnd
|
|
33
240
|
}]
|
|
34
241
|
})(({
|
|
35
|
-
ownerState:
|
|
36
|
-
theme:
|
|
37
|
-
}) =>
|
|
38
|
-
[`& .${
|
|
39
|
-
transition:
|
|
40
|
-
duration:
|
|
242
|
+
ownerState: o,
|
|
243
|
+
theme: t
|
|
244
|
+
}) => e({
|
|
245
|
+
[`& .${d.startIconLoadingStart}, & .${d.endIconLoadingEnd}`]: {
|
|
246
|
+
transition: t.transitions.create(["opacity"], {
|
|
247
|
+
duration: t.transitions.duration.short
|
|
41
248
|
}),
|
|
42
249
|
opacity: 0
|
|
43
250
|
}
|
|
44
|
-
},
|
|
45
|
-
transition:
|
|
46
|
-
duration:
|
|
251
|
+
}, o.loadingPosition === "center" && {
|
|
252
|
+
transition: t.transitions.create(["background-color", "box-shadow", "border-color"], {
|
|
253
|
+
duration: t.transitions.duration.short
|
|
47
254
|
}),
|
|
48
|
-
[`&.${
|
|
255
|
+
[`&.${d.loading}`]: {
|
|
49
256
|
color: "transparent"
|
|
50
257
|
}
|
|
51
|
-
},
|
|
52
|
-
[`& .${
|
|
53
|
-
transition:
|
|
54
|
-
duration:
|
|
258
|
+
}, o.loadingPosition === "start" && o.fullWidth && {
|
|
259
|
+
[`& .${d.startIconLoadingStart}, & .${d.endIconLoadingEnd}`]: {
|
|
260
|
+
transition: t.transitions.create(["opacity"], {
|
|
261
|
+
duration: t.transitions.duration.short
|
|
55
262
|
}),
|
|
56
263
|
opacity: 0,
|
|
57
264
|
marginRight: -8
|
|
58
265
|
}
|
|
59
|
-
},
|
|
60
|
-
[`& .${
|
|
61
|
-
transition:
|
|
62
|
-
duration:
|
|
266
|
+
}, o.loadingPosition === "end" && o.fullWidth && {
|
|
267
|
+
[`& .${d.startIconLoadingStart}, & .${d.endIconLoadingEnd}`]: {
|
|
268
|
+
transition: t.transitions.create(["opacity"], {
|
|
269
|
+
duration: t.transitions.duration.short
|
|
63
270
|
}),
|
|
64
271
|
opacity: 0,
|
|
65
272
|
marginLeft: -8
|
|
66
273
|
}
|
|
67
|
-
})),
|
|
274
|
+
})), go = I("span", {
|
|
68
275
|
name: "MuiLoadingButton",
|
|
69
276
|
slot: "LoadingIndicator",
|
|
70
|
-
overridesResolver: (
|
|
277
|
+
overridesResolver: (o, t) => {
|
|
71
278
|
const {
|
|
72
|
-
ownerState:
|
|
73
|
-
} =
|
|
74
|
-
return [
|
|
279
|
+
ownerState: r
|
|
280
|
+
} = o;
|
|
281
|
+
return [t.loadingIndicator, t[`loadingIndicator${g(r.loadingPosition)}`]];
|
|
75
282
|
}
|
|
76
283
|
})(({
|
|
77
|
-
theme:
|
|
78
|
-
ownerState:
|
|
79
|
-
}) =>
|
|
284
|
+
theme: o,
|
|
285
|
+
ownerState: t
|
|
286
|
+
}) => e({
|
|
80
287
|
position: "absolute",
|
|
81
288
|
visibility: "visible",
|
|
82
289
|
display: "flex"
|
|
83
|
-
},
|
|
84
|
-
left:
|
|
85
|
-
},
|
|
290
|
+
}, t.loadingPosition === "start" && (t.variant === "outlined" || t.variant === "contained") && {
|
|
291
|
+
left: t.size === "small" ? 10 : 14
|
|
292
|
+
}, t.loadingPosition === "start" && t.variant === "text" && {
|
|
86
293
|
left: 6
|
|
87
|
-
},
|
|
294
|
+
}, t.loadingPosition === "center" && {
|
|
88
295
|
left: "50%",
|
|
89
296
|
transform: "translate(-50%)",
|
|
90
|
-
color: (
|
|
91
|
-
},
|
|
92
|
-
right:
|
|
93
|
-
},
|
|
297
|
+
color: (o.vars || o).palette.action.disabled
|
|
298
|
+
}, t.loadingPosition === "end" && (t.variant === "outlined" || t.variant === "contained") && {
|
|
299
|
+
right: t.size === "small" ? 10 : 14
|
|
300
|
+
}, t.loadingPosition === "end" && t.variant === "text" && {
|
|
94
301
|
right: 6
|
|
95
|
-
},
|
|
302
|
+
}, t.loadingPosition === "start" && t.fullWidth && {
|
|
96
303
|
position: "relative",
|
|
97
304
|
left: -10
|
|
98
|
-
},
|
|
305
|
+
}, t.loadingPosition === "end" && t.fullWidth && {
|
|
99
306
|
position: "relative",
|
|
100
307
|
right: -10
|
|
101
|
-
})),
|
|
102
|
-
const
|
|
103
|
-
props:
|
|
308
|
+
})), G = /* @__PURE__ */ B.forwardRef(function(t, r) {
|
|
309
|
+
const i = B.useContext(Y), a = K(i, t), s = j({
|
|
310
|
+
props: a,
|
|
104
311
|
name: "MuiLoadingButton"
|
|
105
312
|
}), {
|
|
106
|
-
children:
|
|
107
|
-
disabled:
|
|
313
|
+
children: C,
|
|
314
|
+
disabled: h = !1,
|
|
108
315
|
id: $,
|
|
109
|
-
loading:
|
|
110
|
-
loadingIndicator:
|
|
111
|
-
loadingPosition:
|
|
112
|
-
variant:
|
|
113
|
-
} =
|
|
114
|
-
"aria-labelledby":
|
|
316
|
+
loading: l = !1,
|
|
317
|
+
loadingIndicator: p,
|
|
318
|
+
loadingPosition: x = "center",
|
|
319
|
+
variant: L = "text"
|
|
320
|
+
} = s, m = N(s, so), v = Z($), b = p ?? /* @__PURE__ */ f(io, {
|
|
321
|
+
"aria-labelledby": v,
|
|
115
322
|
color: "inherit",
|
|
116
323
|
size: 16
|
|
117
|
-
}),
|
|
118
|
-
disabled:
|
|
119
|
-
loading:
|
|
120
|
-
loadingIndicator:
|
|
121
|
-
loadingPosition:
|
|
122
|
-
variant:
|
|
123
|
-
}),
|
|
124
|
-
className:
|
|
125
|
-
ownerState:
|
|
126
|
-
children:
|
|
324
|
+
}), c = e({}, s, {
|
|
325
|
+
disabled: h,
|
|
326
|
+
loading: l,
|
|
327
|
+
loadingIndicator: b,
|
|
328
|
+
loadingPosition: x,
|
|
329
|
+
variant: L
|
|
330
|
+
}), P = lo(c), y = l ? /* @__PURE__ */ f(go, {
|
|
331
|
+
className: P.loadingIndicator,
|
|
332
|
+
ownerState: c,
|
|
333
|
+
children: b
|
|
127
334
|
}) : null;
|
|
128
|
-
return /* @__PURE__ */
|
|
129
|
-
disabled:
|
|
130
|
-
id:
|
|
131
|
-
ref:
|
|
132
|
-
},
|
|
133
|
-
variant:
|
|
134
|
-
classes:
|
|
135
|
-
ownerState:
|
|
136
|
-
children: [
|
|
335
|
+
return /* @__PURE__ */ S(uo, e({
|
|
336
|
+
disabled: h || l,
|
|
337
|
+
id: v,
|
|
338
|
+
ref: r
|
|
339
|
+
}, m, {
|
|
340
|
+
variant: L,
|
|
341
|
+
classes: P,
|
|
342
|
+
ownerState: c,
|
|
343
|
+
children: [c.loadingPosition === "end" ? C : y, c.loadingPosition === "end" ? y : C]
|
|
137
344
|
}));
|
|
138
345
|
});
|
|
139
|
-
process.env.NODE_ENV !== "production" && (
|
|
346
|
+
process.env.NODE_ENV !== "production" && (G.propTypes = {
|
|
140
347
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
141
348
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
142
349
|
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
@@ -144,50 +351,50 @@ process.env.NODE_ENV !== "production" && (x.propTypes = {
|
|
|
144
351
|
/**
|
|
145
352
|
* The content of the component.
|
|
146
353
|
*/
|
|
147
|
-
children:
|
|
354
|
+
children: n.node,
|
|
148
355
|
/**
|
|
149
356
|
* Override or extend the styles applied to the component.
|
|
150
357
|
*/
|
|
151
|
-
classes:
|
|
358
|
+
classes: n.object,
|
|
152
359
|
/**
|
|
153
360
|
* If `true`, the component is disabled.
|
|
154
361
|
* @default false
|
|
155
362
|
*/
|
|
156
|
-
disabled:
|
|
363
|
+
disabled: n.bool,
|
|
157
364
|
/**
|
|
158
365
|
* @ignore
|
|
159
366
|
*/
|
|
160
|
-
id:
|
|
367
|
+
id: n.string,
|
|
161
368
|
/**
|
|
162
369
|
* If `true`, the loading indicator is shown and the button becomes disabled.
|
|
163
370
|
* @default false
|
|
164
371
|
*/
|
|
165
|
-
loading:
|
|
372
|
+
loading: n.bool,
|
|
166
373
|
/**
|
|
167
374
|
* Element placed before the children if the button is in loading state.
|
|
168
375
|
* The node should contain an element with `role="progressbar"` with an accessible name.
|
|
169
376
|
* By default we render a `CircularProgress` that is labelled by the button itself.
|
|
170
377
|
* @default <CircularProgress color="inherit" size={16} />
|
|
171
378
|
*/
|
|
172
|
-
loadingIndicator:
|
|
379
|
+
loadingIndicator: n.node,
|
|
173
380
|
/**
|
|
174
381
|
* The loading indicator can be positioned on the start, end, or the center of the button.
|
|
175
382
|
* @default 'center'
|
|
176
383
|
*/
|
|
177
|
-
loadingPosition:
|
|
384
|
+
loadingPosition: W(n.oneOf(["start", "end", "center"]), (o) => o.loadingPosition === "start" && !o.startIcon ? new Error('MUI: The loadingPosition="start" should be used in combination with startIcon.') : o.loadingPosition === "end" && !o.endIcon ? new Error('MUI: The loadingPosition="end" should be used in combination with endIcon.') : null),
|
|
178
385
|
/**
|
|
179
386
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
180
387
|
*/
|
|
181
|
-
sx:
|
|
388
|
+
sx: n.oneOfType([n.arrayOf(n.oneOfType([n.func, n.object, n.bool])), n.func, n.object]),
|
|
182
389
|
/**
|
|
183
390
|
* The variant to use.
|
|
184
391
|
* @default 'text'
|
|
185
392
|
*/
|
|
186
|
-
variant:
|
|
393
|
+
variant: n.oneOfType([n.oneOf(["contained", "outlined", "text"]), n.string])
|
|
187
394
|
});
|
|
188
|
-
const
|
|
189
|
-
shouldForwardProp: (
|
|
190
|
-
})(({ contentColor:
|
|
395
|
+
const fo = G, ho = I(fo, {
|
|
396
|
+
shouldForwardProp: (o) => o !== "contentColor" && o !== "hoverColor"
|
|
397
|
+
})(({ contentColor: o, hoverColor: t, theme: r }) => ({
|
|
191
398
|
justifyContent: "center",
|
|
192
399
|
alignItems: "center",
|
|
193
400
|
columnGap: 8,
|
|
@@ -195,37 +402,37 @@ const Q = x, X = f(Q, {
|
|
|
195
402
|
paddingLeft: 12,
|
|
196
403
|
paddingRight: 12,
|
|
197
404
|
textTransform: "none",
|
|
198
|
-
color:
|
|
199
|
-
borderColor:
|
|
405
|
+
color: o,
|
|
406
|
+
borderColor: o,
|
|
200
407
|
borderRadius: 5,
|
|
201
408
|
borderWidth: 2,
|
|
202
409
|
"&:hover": {
|
|
203
|
-
color:
|
|
204
|
-
backgroundColor:
|
|
205
|
-
borderColor:
|
|
410
|
+
color: r.palette.common.white,
|
|
411
|
+
backgroundColor: t,
|
|
412
|
+
borderColor: t,
|
|
206
413
|
borderWidth: 2
|
|
207
414
|
}
|
|
208
|
-
})),
|
|
209
|
-
icon:
|
|
210
|
-
text:
|
|
211
|
-
...
|
|
415
|
+
})), xo = ({
|
|
416
|
+
icon: o,
|
|
417
|
+
text: t,
|
|
418
|
+
...r
|
|
212
419
|
}) => {
|
|
213
|
-
const
|
|
214
|
-
return /* @__PURE__ */
|
|
215
|
-
|
|
420
|
+
const i = q(), a = r.contentColor ?? i.palette.primary.main;
|
|
421
|
+
return /* @__PURE__ */ S(
|
|
422
|
+
ho,
|
|
216
423
|
{
|
|
217
|
-
...
|
|
424
|
+
...r,
|
|
218
425
|
variant: "outlined",
|
|
219
|
-
contentColor:
|
|
220
|
-
hoverColor:
|
|
426
|
+
contentColor: a,
|
|
427
|
+
hoverColor: r.hoverColor ?? a,
|
|
221
428
|
children: [
|
|
222
|
-
(
|
|
223
|
-
|
|
224
|
-
(
|
|
429
|
+
(o == null ? void 0 : o.position) === "left" ? /* @__PURE__ */ f(T, { ...o }) : null,
|
|
430
|
+
t,
|
|
431
|
+
(o == null ? void 0 : o.position) === "right" ? /* @__PURE__ */ f(T, { ...o }) : null
|
|
225
432
|
]
|
|
226
433
|
}
|
|
227
434
|
);
|
|
228
435
|
};
|
|
229
436
|
export {
|
|
230
|
-
|
|
437
|
+
xo as default
|
|
231
438
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const i=require("react/jsx-runtime"),m=require("react"),o=require("../../../useThemeProps-
|
|
1
|
+
"use strict";const i=require("react/jsx-runtime"),m=require("react"),o=require("../../../useThemeProps-CDriK9TK.cjs");function T(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,s.get?s:{enumerable:!0,get:()=>e[n]})}}return r.default=e,Object.freeze(r)}const P=T(m);function g(e){return o.generateUtilityClass("MuiIcon",e)}o.generateUtilityClasses("MuiIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const S=["baseClassName","className","color","component","fontSize"],b=e=>{const{color:r,fontSize:n,classes:s}=e,t={root:["root",r!=="inherit"&&`color${o.capitalize(r)}`,`fontSize${o.capitalize(n)}`]};return o.composeClasses(t,g,s)},z=o.styled("span",{name:"MuiIcon",slot:"Root",overridesResolver:(e,r)=>{const{ownerState:n}=e;return[r.root,n.color!=="inherit"&&r[`color${o.capitalize(n.color)}`],r[`fontSize${o.capitalize(n.fontSize)}`]]}})(({theme:e,ownerState:r})=>({userSelect:"none",width:"1em",height:"1em",overflow:"hidden",display:"inline-block",textAlign:"center",flexShrink:0,fontSize:{inherit:"inherit",small:e.typography.pxToRem(20),medium:e.typography.pxToRem(24),large:e.typography.pxToRem(36)}[r.fontSize],color:{primary:(e.vars||e).palette.primary.main,secondary:(e.vars||e).palette.secondary.main,info:(e.vars||e).palette.info.main,success:(e.vars||e).palette.success.main,warning:(e.vars||e).palette.warning.main,action:(e.vars||e).palette.action.active,error:(e.vars||e).palette.error.main,disabled:(e.vars||e).palette.action.disabled,inherit:void 0}[r.color]})),a=P.forwardRef(function(r,n){const s=o.useThemeProps({props:r,name:"MuiIcon"}),{baseClassName:t="material-icons",className:l,color:u="inherit",component:c="span",fontSize:y="medium"}=s,f=o._objectWithoutPropertiesLoose(s,S),p=o._extends({},s,{baseClassName:t,color:u,component:c,fontSize:y}),d=b(p);return i.jsx(z,o._extends({as:c,className:o.clsx(t,"notranslate",d.root,l),ownerState:p,"aria-hidden":!0,ref:n},f))});process.env.NODE_ENV!=="production"&&(a.propTypes={baseClassName:o.PropTypes.string,children:o.PropTypes.node,classes:o.PropTypes.object,className:o.PropTypes.string,color:o.PropTypes.oneOfType([o.PropTypes.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),o.PropTypes.string]),component:o.PropTypes.elementType,fontSize:o.PropTypes.oneOfType([o.PropTypes.oneOf(["inherit","large","medium","small"]),o.PropTypes.string]),sx:o.PropTypes.oneOfType([o.PropTypes.arrayOf(o.PropTypes.oneOfType([o.PropTypes.func,o.PropTypes.object,o.PropTypes.bool])),o.PropTypes.func,o.PropTypes.object])});a.muiName="Icon";const v=a,x=({Component:e,name:r})=>r?i.jsx(v,{children:r}):i.jsx(e,{});module.exports=x;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import * as S from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { b, g as v, s as z, f as t, u as I, _ as x, a as f, h as T, P as e, e as N } from "../../../useThemeProps-B6yTTpAe.js";
|
|
4
4
|
function C(o) {
|
|
5
|
-
return
|
|
5
|
+
return b("MuiIcon", o);
|
|
6
6
|
}
|
|
7
|
-
|
|
7
|
+
v("MuiIcon", ["root", "colorPrimary", "colorSecondary", "colorAction", "colorError", "colorDisabled", "fontSizeInherit", "fontSizeSmall", "fontSizeMedium", "fontSizeLarge"]);
|
|
8
8
|
const w = ["baseClassName", "className", "color", "component", "fontSize"], O = (o) => {
|
|
9
9
|
const {
|
|
10
10
|
color: n,
|
|
@@ -14,7 +14,7 @@ const w = ["baseClassName", "className", "color", "component", "fontSize"], O =
|
|
|
14
14
|
root: ["root", n !== "inherit" && `color${t(n)}`, `fontSize${t(r)}`]
|
|
15
15
|
};
|
|
16
16
|
return N(a, C, s);
|
|
17
|
-
}, R =
|
|
17
|
+
}, R = z("span", {
|
|
18
18
|
name: "MuiIcon",
|
|
19
19
|
slot: "Root",
|
|
20
20
|
overridesResolver: (o, n) => {
|
|
@@ -63,14 +63,14 @@ const w = ["baseClassName", "className", "color", "component", "fontSize"], O =
|
|
|
63
63
|
}), {
|
|
64
64
|
baseClassName: a = "material-icons",
|
|
65
65
|
className: d,
|
|
66
|
-
color:
|
|
66
|
+
color: u = "inherit",
|
|
67
67
|
component: l = "span",
|
|
68
|
-
fontSize:
|
|
68
|
+
fontSize: m = "medium"
|
|
69
69
|
} = s, y = x(s, w), p = f({}, s, {
|
|
70
70
|
baseClassName: a,
|
|
71
|
-
color:
|
|
71
|
+
color: u,
|
|
72
72
|
component: l,
|
|
73
|
-
fontSize:
|
|
73
|
+
fontSize: m
|
|
74
74
|
}), g = O(p);
|
|
75
75
|
return /* @__PURE__ */ i(R, f({
|
|
76
76
|
as: l,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const r=require("react/jsx-runtime");require("react");const o=require("../DefaultButton/DefaultButton.cjs.js"),n=require("../../../useTheme-
|
|
1
|
+
"use strict";const r=require("react/jsx-runtime");require("react");const o=require("../DefaultButton/DefaultButton.cjs.js"),n=require("../../../useTheme-BpLcDNG1.cjs"),u=t=>{const e=n.useTheme();return r.jsx(o,{contentColor:e.palette.primary.main,hoverColor:e.palette.primary.dark,...t})};module.exports=u;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
3
|
import e from "../DefaultButton/DefaultButton.es.js";
|
|
4
|
-
import { u as m } from "../../../useTheme-
|
|
4
|
+
import { u as m } from "../../../useTheme-BWRyHzdn.js";
|
|
5
5
|
const u = (r) => {
|
|
6
6
|
const t = m();
|
|
7
7
|
return /* @__PURE__ */ o(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),e=require("./PrimaryButton.cjs.js"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),e=require("./PrimaryButton.cjs.js"),r=require("../../../createSvgIcon-jvI3LIfI.cjs"),s=r.createSvgIcon(t.jsx("path",{d:"M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z"}),"Save"),c={title:"Components/Buttons/PrimaryButton",component:e,argTypes:{}},i=n=>t.jsx(e,{...n}),o=i.bind({});o.args={text:"Save",icon:{Component:s,position:"left"},onClick:()=>alert("Alert")};exports.Primary=o;exports.default=c;
|