@cgi-learning-hub/ui 0.0.1-dev.1708959744 → 0.0.1-dev.1708964890
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-7uR7JZiM.cjs +1 -0
- package/dist/Box-CPGTKTgx.js +56 -0
- package/dist/{ButtonBase-Bw43M3TO.js → ButtonBase-B0tkJ9zf.js} +2 -2
- package/dist/{ButtonBase-XPViWbp_.cjs → ButtonBase-DCL6Xlnm.cjs} +1 -1
- package/dist/{CircularProgress-BCdQaPFF.cjs → CircularProgress-CZX5SfKt.cjs} +1 -1
- package/dist/{CircularProgress-DRE9BLTL.js → CircularProgress-CguDBnxV.js} +2 -2
- package/dist/IconButton-CJ1Nt-jf.js +182 -0
- package/dist/IconButton-De7ZdW2q.cjs +2 -0
- package/dist/{InputBase-BbXy6VDy.js → InputBase-C_yPRkam.js} +109 -112
- package/dist/InputBase-Dvr5GnwD.cjs +4 -0
- package/dist/Tab-Bhm9hCrX.cjs +1 -0
- package/dist/{Tab-CWxCqAvH.js → Tab-C4l6V01S.js} +9 -9
- package/dist/{Typography-B1bdo7yt.js → Typography-CyFLZjnE.js} +99 -74
- package/dist/Typography-DwsN2Ttm.cjs +1 -0
- package/dist/assets/index.css +1 -1
- package/dist/components/Dropzone/Dropzone.cjs.js +5 -5
- package/dist/components/Dropzone/Dropzone.es.js +12 -11
- package/dist/components/Dropzone/Dropzone.stories.cjs.js +1 -0
- package/dist/components/{AnotherComponent/AnotherComponent.stories.d.ts → Dropzone/Dropzone.stories.d.ts} +1 -2
- package/dist/components/Dropzone/Dropzone.stories.es.js +17 -0
- package/dist/components/buttons/DefaultButton/DefaultButton.cjs.js +1 -1
- package/dist/components/buttons/DefaultButton/DefaultButton.es.js +474 -126
- package/dist/components/buttons/DefaultButton/DefaultButtonIcon.cjs.js +1 -1
- package/dist/components/buttons/DefaultButton/DefaultButtonIcon.es.js +4 -4
- package/dist/components/buttons/IconButton.stories.cjs.js +1 -0
- package/dist/components/buttons/IconButton.stories.d.ts +4 -0
- package/dist/components/buttons/IconButton.stories.es.js +27 -0
- 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.d.ts +1 -1
- package/dist/components/buttons/PrimaryButton/PrimaryButton.stories.es.js +8 -7
- 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.d.ts +1 -1
- package/dist/components/buttons/SecondaryButton/SecondaryButton.stories.es.js +10 -9
- package/dist/components/index.cjs.js +1 -1
- package/dist/components/index.d.ts +0 -2
- package/dist/components/index.es.js +18 -22
- package/dist/components/inputs/SearchInput/SearchInput.cjs.js +1 -1
- package/dist/components/inputs/SearchInput/SearchInput.es.js +10 -10
- package/dist/components/inputs/SearchInput/SearchInput.stories.cjs.js +1 -0
- package/dist/components/inputs/SearchInput/SearchInput.stories.d.ts +4 -0
- package/dist/components/inputs/SearchInput/SearchInput.stories.es.js +16 -0
- package/dist/components/inputs/TextInput/TextInput.cjs.js +11 -11
- package/dist/components/inputs/TextInput/TextInput.es.js +1905 -1655
- package/dist/components/inputs/TextInput/TextInput.stories.cjs.js +1 -0
- package/dist/components/inputs/TextInput/TextInput.stories.d.ts +4 -0
- package/dist/components/inputs/TextInput/TextInput.stories.es.js +17 -0
- package/dist/components/lists/FileList/FileList.cjs.js +1 -1
- package/dist/components/lists/FileList/FileList.es.js +1 -1
- package/dist/components/lists/FileList/FileList.stories.cjs.js +1 -0
- package/dist/components/lists/FileList/FileList.stories.d.ts +4 -0
- package/dist/components/lists/FileList/FileList.stories.es.js +28 -0
- package/dist/components/lists/FileList/FileListItem.cjs.js +1 -2
- package/dist/components/lists/FileList/FileListItem.es.js +26 -201
- package/dist/components/lists/TabList.stories.cjs.js +4 -0
- package/dist/components/lists/TabList.stories.d.ts +4 -0
- package/dist/components/lists/TabList.stories.es.js +1027 -0
- package/dist/{createSvgIcon-BivvPRyr.cjs → createSvgIcon-B6bZPuto.cjs} +1 -1
- package/dist/createSvgIcon-BX8WQ5r-.cjs +2 -0
- package/dist/{createSvgIcon-DLZM3vHe.js → createSvgIcon-KaSN8JhZ.js} +7 -7
- package/dist/createSvgIcon-m_wsenOJ.js +84 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +18 -22
- package/dist/isHostComponent-PydJW4A4.cjs +1 -0
- package/dist/isHostComponent-kiaBvYVo.js +6 -0
- package/dist/{ownerWindow-BoRkeomM.js → ownerWindow-C7EH1lr6.js} +2 -2
- package/dist/{refType-dllUCpD8.cjs → refType-CHSN6ysS.cjs} +1 -1
- package/dist/{refType-CMQbzE37.js → refType-Hh9tfnoF.js} +1 -1
- package/dist/unsupportedProp-Bn6XWqwH.cjs +1 -0
- package/dist/unsupportedProp-BuVD30Gh.js +9 -0
- package/dist/useSlotProps-MoAYME1z.js +70 -0
- package/dist/useSlotProps-R4s13HHI.cjs +1 -0
- package/dist/{useTheme-C-LTLVMt.cjs → useTheme-BDPYLOoP.cjs} +1 -1
- package/dist/{useTheme-BSwuVDD3.js → useTheme-DJEDOopE.js} +1 -1
- package/dist/{useThemeProps-kb_vU-1P.js → useThemeProps-Dg9Uoq7q.js} +656 -689
- package/dist/useThemeProps-jkB5q9ie.cjs +65 -0
- package/package.json +1 -1
- package/dist/Button-CmBnwwn3.js +0 -356
- package/dist/Button-wMPAZpnO.cjs +0 -1
- package/dist/Input-DHic6dYE.cjs +0 -1
- package/dist/Input-Dk-cN0Fb.js +0 -322
- package/dist/InputBase-WBNJQn8V.cjs +0 -4
- package/dist/Tab-C2Tmr8Sv.cjs +0 -1
- package/dist/Typography-CO64FVmw.cjs +0 -1
- package/dist/components/AnotherComponent/AnotherComponent.cjs.js +0 -1
- package/dist/components/AnotherComponent/AnotherComponent.d.ts +0 -2
- package/dist/components/AnotherComponent/AnotherComponent.es.js +0 -15
- package/dist/components/AnotherComponent/AnotherComponent.stories.cjs.js +0 -1
- package/dist/components/AnotherComponent/AnotherComponent.stories.es.js +0 -22
- package/dist/components/AnotherComponent/index.cjs.js +0 -1
- package/dist/components/AnotherComponent/index.d.ts +0 -2
- package/dist/components/AnotherComponent/index.es.js +0 -4
- package/dist/components/BasicButtons/BasicButtons.cjs.js +0 -1
- package/dist/components/BasicButtons/BasicButtons.d.ts +0 -2
- package/dist/components/BasicButtons/BasicButtons.es.js +0 -189
- package/dist/components/BasicButtons/BasicButtons.stories.cjs.js +0 -1
- package/dist/components/BasicButtons/BasicButtons.stories.d.ts +0 -5
- package/dist/components/BasicButtons/BasicButtons.stories.es.js +0 -22
- package/dist/components/BasicButtons/index.cjs.js +0 -1
- package/dist/components/BasicButtons/index.d.ts +0 -2
- package/dist/components/BasicButtons/index.es.js +0 -4
- package/dist/createSvgIcon-9NfUaq9H.js +0 -143
- package/dist/createSvgIcon-B7HVs3ZC.cjs +0 -2
- package/dist/extendSxProp-CVD6j4mA.js +0 -29
- package/dist/extendSxProp-D5gpnasP.cjs +0 -1
- package/dist/useThemeProps-C6ClLEqN.cjs +0 -65
|
@@ -1,142 +1,490 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
4
|
-
import { g as
|
|
5
|
-
import { B as
|
|
6
|
-
import { u as
|
|
7
|
-
import { c as
|
|
8
|
-
import { C as
|
|
9
|
-
import { u as
|
|
10
|
-
function
|
|
11
|
-
return
|
|
1
|
+
import { jsx as b, jsxs as O } from "react/jsx-runtime";
|
|
2
|
+
import * as p from "react";
|
|
3
|
+
import N from "./DefaultButtonIcon.es.js";
|
|
4
|
+
import { g as W, a as M, s as f, r as Y, c as l, _ as a, i as E, o as V, b as _, e as j, f as k, P as i, h as F } from "../../../useThemeProps-Dg9Uoq7q.js";
|
|
5
|
+
import { B as Z } from "../../../ButtonBase-B0tkJ9zf.js";
|
|
6
|
+
import { u as w } from "../../../useId-BW-oWmul.js";
|
|
7
|
+
import { c as oo } from "../../../refType-Hh9tfnoF.js";
|
|
8
|
+
import { C as no } from "../../../CircularProgress-CguDBnxV.js";
|
|
9
|
+
import { u as io } from "../../../useTheme-DJEDOopE.js";
|
|
10
|
+
function to(o) {
|
|
11
|
+
return M("MuiButton", o);
|
|
12
12
|
}
|
|
13
|
-
const
|
|
13
|
+
const ao = W("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"]), R = ao, G = /* @__PURE__ */ p.createContext({});
|
|
14
|
+
process.env.NODE_ENV !== "production" && (G.displayName = "ButtonGroupContext");
|
|
15
|
+
const U = G, D = /* @__PURE__ */ p.createContext(void 0);
|
|
16
|
+
process.env.NODE_ENV !== "production" && (D.displayName = "ButtonGroupButtonContext");
|
|
17
|
+
const ro = D, so = ["children", "color", "component", "className", "disabled", "disableElevation", "disableFocusRipple", "endIcon", "focusVisibleClassName", "fullWidth", "size", "startIcon", "type", "variant"], lo = (o) => {
|
|
14
18
|
const {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
19
|
+
color: n,
|
|
20
|
+
disableElevation: t,
|
|
21
|
+
fullWidth: s,
|
|
22
|
+
size: r,
|
|
23
|
+
variant: e,
|
|
24
|
+
classes: d
|
|
25
|
+
} = o, g = {
|
|
26
|
+
root: ["root", e, `${e}${l(n)}`, `size${l(r)}`, `${e}Size${l(r)}`, n === "inherit" && "colorInherit", t && "disableElevation", s && "fullWidth"],
|
|
27
|
+
label: ["label"],
|
|
28
|
+
startIcon: ["startIcon", `iconSize${l(r)}`],
|
|
29
|
+
endIcon: ["endIcon", `iconSize${l(r)}`]
|
|
30
|
+
}, x = F(g, to, d);
|
|
31
|
+
return a({}, d, x);
|
|
32
|
+
}, S = (o) => a({}, o.size === "small" && {
|
|
33
|
+
"& > *:nth-of-type(1)": {
|
|
34
|
+
fontSize: 18
|
|
35
|
+
}
|
|
36
|
+
}, o.size === "medium" && {
|
|
37
|
+
"& > *:nth-of-type(1)": {
|
|
38
|
+
fontSize: 20
|
|
39
|
+
}
|
|
40
|
+
}, o.size === "large" && {
|
|
41
|
+
"& > *:nth-of-type(1)": {
|
|
42
|
+
fontSize: 22
|
|
43
|
+
}
|
|
44
|
+
}), eo = f(Z, {
|
|
45
|
+
shouldForwardProp: (o) => Y(o) || o === "classes",
|
|
46
|
+
name: "MuiButton",
|
|
47
|
+
slot: "Root",
|
|
48
|
+
overridesResolver: (o, n) => {
|
|
49
|
+
const {
|
|
50
|
+
ownerState: t
|
|
51
|
+
} = o;
|
|
52
|
+
return [n.root, n[t.variant], n[`${t.variant}${l(t.color)}`], n[`size${l(t.size)}`], n[`${t.variant}Size${l(t.size)}`], t.color === "inherit" && n.colorInherit, t.disableElevation && n.disableElevation, t.fullWidth && n.fullWidth];
|
|
53
|
+
}
|
|
54
|
+
})(({
|
|
55
|
+
theme: o,
|
|
56
|
+
ownerState: n
|
|
57
|
+
}) => {
|
|
58
|
+
var t, s;
|
|
59
|
+
const r = o.palette.mode === "light" ? o.palette.grey[300] : o.palette.grey[800], e = o.palette.mode === "light" ? o.palette.grey.A100 : o.palette.grey[700];
|
|
60
|
+
return a({}, o.typography.button, {
|
|
61
|
+
minWidth: 64,
|
|
62
|
+
padding: "6px 16px",
|
|
63
|
+
borderRadius: (o.vars || o).shape.borderRadius,
|
|
64
|
+
transition: o.transitions.create(["background-color", "box-shadow", "border-color", "color"], {
|
|
65
|
+
duration: o.transitions.duration.short
|
|
66
|
+
}),
|
|
67
|
+
"&:hover": a({
|
|
68
|
+
textDecoration: "none",
|
|
69
|
+
backgroundColor: o.vars ? `rgba(${o.vars.palette.text.primaryChannel} / ${o.vars.palette.action.hoverOpacity})` : E(o.palette.text.primary, o.palette.action.hoverOpacity),
|
|
70
|
+
// Reset on touch devices, it doesn't add specificity
|
|
71
|
+
"@media (hover: none)": {
|
|
72
|
+
backgroundColor: "transparent"
|
|
73
|
+
}
|
|
74
|
+
}, n.variant === "text" && n.color !== "inherit" && {
|
|
75
|
+
backgroundColor: o.vars ? `rgba(${o.vars.palette[n.color].mainChannel} / ${o.vars.palette.action.hoverOpacity})` : E(o.palette[n.color].main, o.palette.action.hoverOpacity),
|
|
76
|
+
// Reset on touch devices, it doesn't add specificity
|
|
77
|
+
"@media (hover: none)": {
|
|
78
|
+
backgroundColor: "transparent"
|
|
79
|
+
}
|
|
80
|
+
}, n.variant === "outlined" && n.color !== "inherit" && {
|
|
81
|
+
border: `1px solid ${(o.vars || o).palette[n.color].main}`,
|
|
82
|
+
backgroundColor: o.vars ? `rgba(${o.vars.palette[n.color].mainChannel} / ${o.vars.palette.action.hoverOpacity})` : E(o.palette[n.color].main, o.palette.action.hoverOpacity),
|
|
83
|
+
// Reset on touch devices, it doesn't add specificity
|
|
84
|
+
"@media (hover: none)": {
|
|
85
|
+
backgroundColor: "transparent"
|
|
86
|
+
}
|
|
87
|
+
}, n.variant === "contained" && {
|
|
88
|
+
backgroundColor: o.vars ? o.vars.palette.Button.inheritContainedHoverBg : e,
|
|
89
|
+
boxShadow: (o.vars || o).shadows[4],
|
|
90
|
+
// Reset on touch devices, it doesn't add specificity
|
|
91
|
+
"@media (hover: none)": {
|
|
92
|
+
boxShadow: (o.vars || o).shadows[2],
|
|
93
|
+
backgroundColor: (o.vars || o).palette.grey[300]
|
|
94
|
+
}
|
|
95
|
+
}, n.variant === "contained" && n.color !== "inherit" && {
|
|
96
|
+
backgroundColor: (o.vars || o).palette[n.color].dark,
|
|
97
|
+
// Reset on touch devices, it doesn't add specificity
|
|
98
|
+
"@media (hover: none)": {
|
|
99
|
+
backgroundColor: (o.vars || o).palette[n.color].main
|
|
100
|
+
}
|
|
101
|
+
}),
|
|
102
|
+
"&:active": a({}, n.variant === "contained" && {
|
|
103
|
+
boxShadow: (o.vars || o).shadows[8]
|
|
104
|
+
}),
|
|
105
|
+
[`&.${R.focusVisible}`]: a({}, n.variant === "contained" && {
|
|
106
|
+
boxShadow: (o.vars || o).shadows[6]
|
|
107
|
+
}),
|
|
108
|
+
[`&.${R.disabled}`]: a({
|
|
109
|
+
color: (o.vars || o).palette.action.disabled
|
|
110
|
+
}, n.variant === "outlined" && {
|
|
111
|
+
border: `1px solid ${(o.vars || o).palette.action.disabledBackground}`
|
|
112
|
+
}, n.variant === "contained" && {
|
|
113
|
+
color: (o.vars || o).palette.action.disabled,
|
|
114
|
+
boxShadow: (o.vars || o).shadows[0],
|
|
115
|
+
backgroundColor: (o.vars || o).palette.action.disabledBackground
|
|
116
|
+
})
|
|
117
|
+
}, n.variant === "text" && {
|
|
118
|
+
padding: "6px 8px"
|
|
119
|
+
}, n.variant === "text" && n.color !== "inherit" && {
|
|
120
|
+
color: (o.vars || o).palette[n.color].main
|
|
121
|
+
}, n.variant === "outlined" && {
|
|
122
|
+
padding: "5px 15px",
|
|
123
|
+
border: "1px solid currentColor"
|
|
124
|
+
}, n.variant === "outlined" && n.color !== "inherit" && {
|
|
125
|
+
color: (o.vars || o).palette[n.color].main,
|
|
126
|
+
border: o.vars ? `1px solid rgba(${o.vars.palette[n.color].mainChannel} / 0.5)` : `1px solid ${E(o.palette[n.color].main, 0.5)}`
|
|
127
|
+
}, n.variant === "contained" && {
|
|
128
|
+
color: o.vars ? (
|
|
129
|
+
// this is safe because grey does not change between default light/dark mode
|
|
130
|
+
o.vars.palette.text.primary
|
|
131
|
+
) : (t = (s = o.palette).getContrastText) == null ? void 0 : t.call(s, o.palette.grey[300]),
|
|
132
|
+
backgroundColor: o.vars ? o.vars.palette.Button.inheritContainedBg : r,
|
|
133
|
+
boxShadow: (o.vars || o).shadows[2]
|
|
134
|
+
}, n.variant === "contained" && n.color !== "inherit" && {
|
|
135
|
+
color: (o.vars || o).palette[n.color].contrastText,
|
|
136
|
+
backgroundColor: (o.vars || o).palette[n.color].main
|
|
137
|
+
}, n.color === "inherit" && {
|
|
138
|
+
color: "inherit",
|
|
139
|
+
borderColor: "currentColor"
|
|
140
|
+
}, n.size === "small" && n.variant === "text" && {
|
|
141
|
+
padding: "4px 5px",
|
|
142
|
+
fontSize: o.typography.pxToRem(13)
|
|
143
|
+
}, n.size === "large" && n.variant === "text" && {
|
|
144
|
+
padding: "8px 11px",
|
|
145
|
+
fontSize: o.typography.pxToRem(15)
|
|
146
|
+
}, n.size === "small" && n.variant === "outlined" && {
|
|
147
|
+
padding: "3px 9px",
|
|
148
|
+
fontSize: o.typography.pxToRem(13)
|
|
149
|
+
}, n.size === "large" && n.variant === "outlined" && {
|
|
150
|
+
padding: "7px 21px",
|
|
151
|
+
fontSize: o.typography.pxToRem(15)
|
|
152
|
+
}, n.size === "small" && n.variant === "contained" && {
|
|
153
|
+
padding: "4px 10px",
|
|
154
|
+
fontSize: o.typography.pxToRem(13)
|
|
155
|
+
}, n.size === "large" && n.variant === "contained" && {
|
|
156
|
+
padding: "8px 22px",
|
|
157
|
+
fontSize: o.typography.pxToRem(15)
|
|
158
|
+
}, n.fullWidth && {
|
|
159
|
+
width: "100%"
|
|
160
|
+
});
|
|
161
|
+
}, ({
|
|
162
|
+
ownerState: o
|
|
163
|
+
}) => o.disableElevation && {
|
|
164
|
+
boxShadow: "none",
|
|
165
|
+
"&:hover": {
|
|
166
|
+
boxShadow: "none"
|
|
167
|
+
},
|
|
168
|
+
[`&.${R.focusVisible}`]: {
|
|
169
|
+
boxShadow: "none"
|
|
170
|
+
},
|
|
171
|
+
"&:active": {
|
|
172
|
+
boxShadow: "none"
|
|
173
|
+
},
|
|
174
|
+
[`&.${R.disabled}`]: {
|
|
175
|
+
boxShadow: "none"
|
|
176
|
+
}
|
|
177
|
+
}), co = f("span", {
|
|
178
|
+
name: "MuiButton",
|
|
179
|
+
slot: "StartIcon",
|
|
180
|
+
overridesResolver: (o, n) => {
|
|
181
|
+
const {
|
|
182
|
+
ownerState: t
|
|
183
|
+
} = o;
|
|
184
|
+
return [n.startIcon, n[`iconSize${l(t.size)}`]];
|
|
185
|
+
}
|
|
186
|
+
})(({
|
|
187
|
+
ownerState: o
|
|
188
|
+
}) => a({
|
|
189
|
+
display: "inherit",
|
|
190
|
+
marginRight: 8,
|
|
191
|
+
marginLeft: -4
|
|
192
|
+
}, o.size === "small" && {
|
|
193
|
+
marginLeft: -2
|
|
194
|
+
}, S(o))), uo = f("span", {
|
|
195
|
+
name: "MuiButton",
|
|
196
|
+
slot: "EndIcon",
|
|
197
|
+
overridesResolver: (o, n) => {
|
|
198
|
+
const {
|
|
199
|
+
ownerState: t
|
|
200
|
+
} = o;
|
|
201
|
+
return [n.endIcon, n[`iconSize${l(t.size)}`]];
|
|
202
|
+
}
|
|
203
|
+
})(({
|
|
204
|
+
ownerState: o
|
|
205
|
+
}) => a({
|
|
206
|
+
display: "inherit",
|
|
207
|
+
marginRight: -4,
|
|
208
|
+
marginLeft: 8
|
|
209
|
+
}, o.size === "small" && {
|
|
210
|
+
marginRight: -2
|
|
211
|
+
}, S(o))), H = /* @__PURE__ */ p.forwardRef(function(n, t) {
|
|
212
|
+
const s = p.useContext(U), r = p.useContext(ro), e = V(s, n), d = _({
|
|
213
|
+
props: e,
|
|
214
|
+
name: "MuiButton"
|
|
215
|
+
}), {
|
|
216
|
+
children: g,
|
|
217
|
+
color: x = "primary",
|
|
218
|
+
component: v = "button",
|
|
219
|
+
className: h,
|
|
220
|
+
disabled: z = !1,
|
|
221
|
+
disableElevation: $ = !1,
|
|
222
|
+
disableFocusRipple: B = !1,
|
|
223
|
+
endIcon: I,
|
|
224
|
+
focusVisibleClassName: m,
|
|
225
|
+
fullWidth: u = !1,
|
|
226
|
+
size: P = "medium",
|
|
227
|
+
startIcon: y,
|
|
228
|
+
type: T,
|
|
229
|
+
variant: q = "text"
|
|
230
|
+
} = d, J = j(d, so), L = a({}, d, {
|
|
231
|
+
color: x,
|
|
232
|
+
component: v,
|
|
233
|
+
disabled: z,
|
|
234
|
+
disableElevation: $,
|
|
235
|
+
disableFocusRipple: B,
|
|
236
|
+
fullWidth: u,
|
|
237
|
+
size: P,
|
|
238
|
+
type: T,
|
|
239
|
+
variant: q
|
|
240
|
+
}), C = lo(L), K = y && /* @__PURE__ */ b(co, {
|
|
241
|
+
className: C.startIcon,
|
|
242
|
+
ownerState: L,
|
|
243
|
+
children: y
|
|
244
|
+
}), Q = I && /* @__PURE__ */ b(uo, {
|
|
245
|
+
className: C.endIcon,
|
|
246
|
+
ownerState: L,
|
|
247
|
+
children: I
|
|
248
|
+
}), X = r || "";
|
|
249
|
+
return /* @__PURE__ */ O(eo, a({
|
|
250
|
+
ownerState: L,
|
|
251
|
+
className: k(s.className, C.root, h, X),
|
|
252
|
+
component: v,
|
|
253
|
+
disabled: z,
|
|
254
|
+
focusRipple: !B,
|
|
255
|
+
focusVisibleClassName: k(C.focusVisible, m),
|
|
256
|
+
ref: t,
|
|
257
|
+
type: T
|
|
258
|
+
}, J, {
|
|
259
|
+
classes: C,
|
|
260
|
+
children: [K, g, Q]
|
|
261
|
+
}));
|
|
262
|
+
});
|
|
263
|
+
process.env.NODE_ENV !== "production" && (H.propTypes = {
|
|
264
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
265
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
266
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
267
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
268
|
+
/**
|
|
269
|
+
* The content of the component.
|
|
270
|
+
*/
|
|
271
|
+
children: i.node,
|
|
272
|
+
/**
|
|
273
|
+
* Override or extend the styles applied to the component.
|
|
274
|
+
*/
|
|
275
|
+
classes: i.object,
|
|
276
|
+
/**
|
|
277
|
+
* @ignore
|
|
278
|
+
*/
|
|
279
|
+
className: i.string,
|
|
280
|
+
/**
|
|
281
|
+
* The color of the component.
|
|
282
|
+
* It supports both default and custom theme colors, which can be added as shown in the
|
|
283
|
+
* [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
|
|
284
|
+
* @default 'primary'
|
|
285
|
+
*/
|
|
286
|
+
color: i.oneOfType([i.oneOf(["inherit", "primary", "secondary", "success", "error", "info", "warning"]), i.string]),
|
|
287
|
+
/**
|
|
288
|
+
* The component used for the root node.
|
|
289
|
+
* Either a string to use a HTML element or a component.
|
|
290
|
+
*/
|
|
291
|
+
component: i.elementType,
|
|
292
|
+
/**
|
|
293
|
+
* If `true`, the component is disabled.
|
|
294
|
+
* @default false
|
|
295
|
+
*/
|
|
296
|
+
disabled: i.bool,
|
|
297
|
+
/**
|
|
298
|
+
* If `true`, no elevation is used.
|
|
299
|
+
* @default false
|
|
300
|
+
*/
|
|
301
|
+
disableElevation: i.bool,
|
|
302
|
+
/**
|
|
303
|
+
* If `true`, the keyboard focus ripple is disabled.
|
|
304
|
+
* @default false
|
|
305
|
+
*/
|
|
306
|
+
disableFocusRipple: i.bool,
|
|
307
|
+
/**
|
|
308
|
+
* If `true`, the ripple effect is disabled.
|
|
309
|
+
*
|
|
310
|
+
* ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure
|
|
311
|
+
* to highlight the element by applying separate styles with the `.Mui-focusVisible` class.
|
|
312
|
+
* @default false
|
|
313
|
+
*/
|
|
314
|
+
disableRipple: i.bool,
|
|
315
|
+
/**
|
|
316
|
+
* Element placed after the children.
|
|
317
|
+
*/
|
|
318
|
+
endIcon: i.node,
|
|
319
|
+
/**
|
|
320
|
+
* @ignore
|
|
321
|
+
*/
|
|
322
|
+
focusVisibleClassName: i.string,
|
|
323
|
+
/**
|
|
324
|
+
* If `true`, the button will take up the full width of its container.
|
|
325
|
+
* @default false
|
|
326
|
+
*/
|
|
327
|
+
fullWidth: i.bool,
|
|
328
|
+
/**
|
|
329
|
+
* The URL to link to when the button is clicked.
|
|
330
|
+
* If defined, an `a` element will be used as the root node.
|
|
331
|
+
*/
|
|
332
|
+
href: i.string,
|
|
333
|
+
/**
|
|
334
|
+
* The size of the component.
|
|
335
|
+
* `small` is equivalent to the dense button styling.
|
|
336
|
+
* @default 'medium'
|
|
337
|
+
*/
|
|
338
|
+
size: i.oneOfType([i.oneOf(["small", "medium", "large"]), i.string]),
|
|
339
|
+
/**
|
|
340
|
+
* Element placed before the children.
|
|
341
|
+
*/
|
|
342
|
+
startIcon: i.node,
|
|
343
|
+
/**
|
|
344
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
345
|
+
*/
|
|
346
|
+
sx: i.oneOfType([i.arrayOf(i.oneOfType([i.func, i.object, i.bool])), i.func, i.object]),
|
|
347
|
+
/**
|
|
348
|
+
* @ignore
|
|
349
|
+
*/
|
|
350
|
+
type: i.oneOfType([i.oneOf(["button", "reset", "submit"]), i.string]),
|
|
351
|
+
/**
|
|
352
|
+
* The variant to use.
|
|
353
|
+
* @default 'text'
|
|
354
|
+
*/
|
|
355
|
+
variant: i.oneOfType([i.oneOf(["contained", "outlined", "text"]), i.string])
|
|
356
|
+
});
|
|
357
|
+
const po = H;
|
|
358
|
+
function go(o) {
|
|
359
|
+
return M("MuiLoadingButton", o);
|
|
360
|
+
}
|
|
361
|
+
const vo = W("MuiLoadingButton", ["root", "loading", "loadingIndicator", "loadingIndicatorCenter", "loadingIndicatorStart", "loadingIndicatorEnd", "endIconLoadingEnd", "startIconLoadingStart"]), c = vo, bo = ["children", "disabled", "id", "loading", "loadingIndicator", "loadingPosition", "variant"], fo = (o) => {
|
|
362
|
+
const {
|
|
363
|
+
loading: n,
|
|
364
|
+
loadingPosition: t,
|
|
365
|
+
classes: s
|
|
366
|
+
} = o, r = {
|
|
367
|
+
root: ["root", n && "loading"],
|
|
368
|
+
startIcon: [n && `startIconLoading${l(t)}`],
|
|
369
|
+
endIcon: [n && `endIconLoading${l(t)}`],
|
|
370
|
+
loadingIndicator: ["loadingIndicator", n && `loadingIndicator${l(t)}`]
|
|
371
|
+
}, e = F(r, go, s);
|
|
372
|
+
return a({}, s, e);
|
|
373
|
+
}, xo = (o) => o !== "ownerState" && o !== "theme" && o !== "sx" && o !== "as" && o !== "classes", Io = f(po, {
|
|
374
|
+
shouldForwardProp: (o) => xo(o) || o === "classes",
|
|
27
375
|
name: "MuiLoadingButton",
|
|
28
376
|
slot: "Root",
|
|
29
|
-
overridesResolver: (
|
|
30
|
-
[`& .${
|
|
31
|
-
},
|
|
32
|
-
[`& .${
|
|
377
|
+
overridesResolver: (o, n) => [n.root, n.startIconLoadingStart && {
|
|
378
|
+
[`& .${c.startIconLoadingStart}`]: n.startIconLoadingStart
|
|
379
|
+
}, n.endIconLoadingEnd && {
|
|
380
|
+
[`& .${c.endIconLoadingEnd}`]: n.endIconLoadingEnd
|
|
33
381
|
}]
|
|
34
382
|
})(({
|
|
35
|
-
ownerState:
|
|
36
|
-
theme:
|
|
37
|
-
}) =>
|
|
38
|
-
[`& .${
|
|
39
|
-
transition:
|
|
40
|
-
duration:
|
|
383
|
+
ownerState: o,
|
|
384
|
+
theme: n
|
|
385
|
+
}) => a({
|
|
386
|
+
[`& .${c.startIconLoadingStart}, & .${c.endIconLoadingEnd}`]: {
|
|
387
|
+
transition: n.transitions.create(["opacity"], {
|
|
388
|
+
duration: n.transitions.duration.short
|
|
41
389
|
}),
|
|
42
390
|
opacity: 0
|
|
43
391
|
}
|
|
44
|
-
},
|
|
45
|
-
transition:
|
|
46
|
-
duration:
|
|
392
|
+
}, o.loadingPosition === "center" && {
|
|
393
|
+
transition: n.transitions.create(["background-color", "box-shadow", "border-color"], {
|
|
394
|
+
duration: n.transitions.duration.short
|
|
47
395
|
}),
|
|
48
|
-
[`&.${
|
|
396
|
+
[`&.${c.loading}`]: {
|
|
49
397
|
color: "transparent"
|
|
50
398
|
}
|
|
51
|
-
},
|
|
52
|
-
[`& .${
|
|
53
|
-
transition:
|
|
54
|
-
duration:
|
|
399
|
+
}, o.loadingPosition === "start" && o.fullWidth && {
|
|
400
|
+
[`& .${c.startIconLoadingStart}, & .${c.endIconLoadingEnd}`]: {
|
|
401
|
+
transition: n.transitions.create(["opacity"], {
|
|
402
|
+
duration: n.transitions.duration.short
|
|
55
403
|
}),
|
|
56
404
|
opacity: 0,
|
|
57
405
|
marginRight: -8
|
|
58
406
|
}
|
|
59
|
-
},
|
|
60
|
-
[`& .${
|
|
61
|
-
transition:
|
|
62
|
-
duration:
|
|
407
|
+
}, o.loadingPosition === "end" && o.fullWidth && {
|
|
408
|
+
[`& .${c.startIconLoadingStart}, & .${c.endIconLoadingEnd}`]: {
|
|
409
|
+
transition: n.transitions.create(["opacity"], {
|
|
410
|
+
duration: n.transitions.duration.short
|
|
63
411
|
}),
|
|
64
412
|
opacity: 0,
|
|
65
413
|
marginLeft: -8
|
|
66
414
|
}
|
|
67
|
-
})),
|
|
415
|
+
})), yo = f("span", {
|
|
68
416
|
name: "MuiLoadingButton",
|
|
69
417
|
slot: "LoadingIndicator",
|
|
70
|
-
overridesResolver: (
|
|
418
|
+
overridesResolver: (o, n) => {
|
|
71
419
|
const {
|
|
72
|
-
ownerState:
|
|
73
|
-
} =
|
|
74
|
-
return [
|
|
420
|
+
ownerState: t
|
|
421
|
+
} = o;
|
|
422
|
+
return [n.loadingIndicator, n[`loadingIndicator${l(t.loadingPosition)}`]];
|
|
75
423
|
}
|
|
76
424
|
})(({
|
|
77
|
-
theme:
|
|
78
|
-
ownerState:
|
|
79
|
-
}) =>
|
|
425
|
+
theme: o,
|
|
426
|
+
ownerState: n
|
|
427
|
+
}) => a({
|
|
80
428
|
position: "absolute",
|
|
81
429
|
visibility: "visible",
|
|
82
430
|
display: "flex"
|
|
83
|
-
},
|
|
84
|
-
left:
|
|
85
|
-
},
|
|
431
|
+
}, n.loadingPosition === "start" && (n.variant === "outlined" || n.variant === "contained") && {
|
|
432
|
+
left: n.size === "small" ? 10 : 14
|
|
433
|
+
}, n.loadingPosition === "start" && n.variant === "text" && {
|
|
86
434
|
left: 6
|
|
87
|
-
},
|
|
435
|
+
}, n.loadingPosition === "center" && {
|
|
88
436
|
left: "50%",
|
|
89
437
|
transform: "translate(-50%)",
|
|
90
|
-
color: (
|
|
91
|
-
},
|
|
92
|
-
right:
|
|
93
|
-
},
|
|
438
|
+
color: (o.vars || o).palette.action.disabled
|
|
439
|
+
}, n.loadingPosition === "end" && (n.variant === "outlined" || n.variant === "contained") && {
|
|
440
|
+
right: n.size === "small" ? 10 : 14
|
|
441
|
+
}, n.loadingPosition === "end" && n.variant === "text" && {
|
|
94
442
|
right: 6
|
|
95
|
-
},
|
|
443
|
+
}, n.loadingPosition === "start" && n.fullWidth && {
|
|
96
444
|
position: "relative",
|
|
97
445
|
left: -10
|
|
98
|
-
},
|
|
446
|
+
}, n.loadingPosition === "end" && n.fullWidth && {
|
|
99
447
|
position: "relative",
|
|
100
448
|
right: -10
|
|
101
|
-
})),
|
|
102
|
-
const
|
|
103
|
-
props:
|
|
449
|
+
})), A = /* @__PURE__ */ p.forwardRef(function(n, t) {
|
|
450
|
+
const s = p.useContext(U), r = V(s, n), e = _({
|
|
451
|
+
props: r,
|
|
104
452
|
name: "MuiLoadingButton"
|
|
105
453
|
}), {
|
|
106
|
-
children:
|
|
107
|
-
disabled:
|
|
108
|
-
id:
|
|
109
|
-
loading:
|
|
454
|
+
children: d,
|
|
455
|
+
disabled: g = !1,
|
|
456
|
+
id: x,
|
|
457
|
+
loading: v = !1,
|
|
110
458
|
loadingIndicator: h,
|
|
111
|
-
loadingPosition:
|
|
112
|
-
variant:
|
|
113
|
-
} =
|
|
114
|
-
"aria-labelledby":
|
|
459
|
+
loadingPosition: z = "center",
|
|
460
|
+
variant: $ = "text"
|
|
461
|
+
} = e, B = j(e, bo), I = w(x), m = h ?? /* @__PURE__ */ b(no, {
|
|
462
|
+
"aria-labelledby": I,
|
|
115
463
|
color: "inherit",
|
|
116
464
|
size: 16
|
|
117
|
-
}),
|
|
118
|
-
disabled:
|
|
119
|
-
loading:
|
|
120
|
-
loadingIndicator:
|
|
121
|
-
loadingPosition:
|
|
122
|
-
variant:
|
|
123
|
-
}),
|
|
124
|
-
className:
|
|
125
|
-
ownerState:
|
|
126
|
-
children:
|
|
465
|
+
}), u = a({}, e, {
|
|
466
|
+
disabled: g,
|
|
467
|
+
loading: v,
|
|
468
|
+
loadingIndicator: m,
|
|
469
|
+
loadingPosition: z,
|
|
470
|
+
variant: $
|
|
471
|
+
}), P = fo(u), y = v ? /* @__PURE__ */ b(yo, {
|
|
472
|
+
className: P.loadingIndicator,
|
|
473
|
+
ownerState: u,
|
|
474
|
+
children: m
|
|
127
475
|
}) : null;
|
|
128
|
-
return /* @__PURE__ */
|
|
129
|
-
disabled:
|
|
130
|
-
id:
|
|
131
|
-
ref:
|
|
132
|
-
},
|
|
133
|
-
variant:
|
|
134
|
-
classes:
|
|
135
|
-
ownerState:
|
|
136
|
-
children: [
|
|
476
|
+
return /* @__PURE__ */ O(Io, a({
|
|
477
|
+
disabled: g || v,
|
|
478
|
+
id: I,
|
|
479
|
+
ref: t
|
|
480
|
+
}, B, {
|
|
481
|
+
variant: $,
|
|
482
|
+
classes: P,
|
|
483
|
+
ownerState: u,
|
|
484
|
+
children: [u.loadingPosition === "end" ? d : y, u.loadingPosition === "end" ? y : d]
|
|
137
485
|
}));
|
|
138
486
|
});
|
|
139
|
-
process.env.NODE_ENV !== "production" && (
|
|
487
|
+
process.env.NODE_ENV !== "production" && (A.propTypes = {
|
|
140
488
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
141
489
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
142
490
|
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
@@ -144,50 +492,50 @@ process.env.NODE_ENV !== "production" && (x.propTypes = {
|
|
|
144
492
|
/**
|
|
145
493
|
* The content of the component.
|
|
146
494
|
*/
|
|
147
|
-
children:
|
|
495
|
+
children: i.node,
|
|
148
496
|
/**
|
|
149
497
|
* Override or extend the styles applied to the component.
|
|
150
498
|
*/
|
|
151
|
-
classes:
|
|
499
|
+
classes: i.object,
|
|
152
500
|
/**
|
|
153
501
|
* If `true`, the component is disabled.
|
|
154
502
|
* @default false
|
|
155
503
|
*/
|
|
156
|
-
disabled:
|
|
504
|
+
disabled: i.bool,
|
|
157
505
|
/**
|
|
158
506
|
* @ignore
|
|
159
507
|
*/
|
|
160
|
-
id:
|
|
508
|
+
id: i.string,
|
|
161
509
|
/**
|
|
162
510
|
* If `true`, the loading indicator is shown and the button becomes disabled.
|
|
163
511
|
* @default false
|
|
164
512
|
*/
|
|
165
|
-
loading:
|
|
513
|
+
loading: i.bool,
|
|
166
514
|
/**
|
|
167
515
|
* Element placed before the children if the button is in loading state.
|
|
168
516
|
* The node should contain an element with `role="progressbar"` with an accessible name.
|
|
169
517
|
* By default we render a `CircularProgress` that is labelled by the button itself.
|
|
170
518
|
* @default <CircularProgress color="inherit" size={16} />
|
|
171
519
|
*/
|
|
172
|
-
loadingIndicator:
|
|
520
|
+
loadingIndicator: i.node,
|
|
173
521
|
/**
|
|
174
522
|
* The loading indicator can be positioned on the start, end, or the center of the button.
|
|
175
523
|
* @default 'center'
|
|
176
524
|
*/
|
|
177
|
-
loadingPosition:
|
|
525
|
+
loadingPosition: oo(i.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
526
|
/**
|
|
179
527
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
180
528
|
*/
|
|
181
|
-
sx:
|
|
529
|
+
sx: i.oneOfType([i.arrayOf(i.oneOfType([i.func, i.object, i.bool])), i.func, i.object]),
|
|
182
530
|
/**
|
|
183
531
|
* The variant to use.
|
|
184
532
|
* @default 'text'
|
|
185
533
|
*/
|
|
186
|
-
variant:
|
|
534
|
+
variant: i.oneOfType([i.oneOf(["contained", "outlined", "text"]), i.string])
|
|
187
535
|
});
|
|
188
|
-
const
|
|
189
|
-
shouldForwardProp: (
|
|
190
|
-
})(({ contentColor:
|
|
536
|
+
const Co = A, ho = f(Co, {
|
|
537
|
+
shouldForwardProp: (o) => o !== "contentColor" && o !== "hoverColor"
|
|
538
|
+
})(({ contentColor: o, hoverColor: n, theme: t }) => ({
|
|
191
539
|
justifyContent: "center",
|
|
192
540
|
alignItems: "center",
|
|
193
541
|
columnGap: 8,
|
|
@@ -195,37 +543,37 @@ const Q = x, X = f(Q, {
|
|
|
195
543
|
paddingLeft: 12,
|
|
196
544
|
paddingRight: 12,
|
|
197
545
|
textTransform: "none",
|
|
198
|
-
color:
|
|
199
|
-
borderColor:
|
|
546
|
+
color: o,
|
|
547
|
+
borderColor: o,
|
|
200
548
|
borderRadius: 5,
|
|
201
549
|
borderWidth: 2,
|
|
202
550
|
"&:hover": {
|
|
203
|
-
color:
|
|
204
|
-
backgroundColor:
|
|
205
|
-
borderColor:
|
|
551
|
+
color: t.palette.common.white,
|
|
552
|
+
backgroundColor: n,
|
|
553
|
+
borderColor: n,
|
|
206
554
|
borderWidth: 2
|
|
207
555
|
}
|
|
208
|
-
})),
|
|
209
|
-
icon:
|
|
210
|
-
text:
|
|
211
|
-
...
|
|
556
|
+
})), Oo = ({
|
|
557
|
+
icon: o,
|
|
558
|
+
text: n,
|
|
559
|
+
...t
|
|
212
560
|
}) => {
|
|
213
|
-
const
|
|
214
|
-
return /* @__PURE__ */
|
|
215
|
-
|
|
561
|
+
const s = io(), r = t.contentColor ?? s.palette.primary.main;
|
|
562
|
+
return /* @__PURE__ */ O(
|
|
563
|
+
ho,
|
|
216
564
|
{
|
|
217
|
-
...
|
|
565
|
+
...t,
|
|
218
566
|
variant: "outlined",
|
|
219
|
-
contentColor:
|
|
220
|
-
hoverColor:
|
|
567
|
+
contentColor: r,
|
|
568
|
+
hoverColor: t.hoverColor ?? r,
|
|
221
569
|
children: [
|
|
222
|
-
(
|
|
223
|
-
|
|
224
|
-
(
|
|
570
|
+
(o == null ? void 0 : o.position) === "left" ? /* @__PURE__ */ b(N, { ...o }) : null,
|
|
571
|
+
n,
|
|
572
|
+
(o == null ? void 0 : o.position) === "right" ? /* @__PURE__ */ b(N, { ...o }) : null
|
|
225
573
|
]
|
|
226
574
|
}
|
|
227
575
|
);
|
|
228
576
|
};
|
|
229
577
|
export {
|
|
230
|
-
|
|
578
|
+
Oo as default
|
|
231
579
|
};
|