@cgi-learning-hub/ui 1.3.5-dev.1740134984 → 1.3.5-dev.1740156229
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/Backdrop-COarwgJj.cjs +1 -0
- package/dist/{Backdrop-CZ3ay4ta.js → Backdrop-DdA12b-5.js} +5 -5
- package/dist/Box-C0mEbUoK.cjs +1 -0
- package/dist/{Box-Cpg9IWKr.js → Box-DbRInJ2-.js} +3 -3
- package/dist/Button-1tZRtOeG.cjs +1 -0
- package/dist/Button-rxIER0bL.js +662 -0
- package/dist/{ButtonBase-C9D6EAt-.cjs → ButtonBase-C2rhY3j-.cjs} +1 -1
- package/dist/{ButtonBase-ylADCBW1.js → ButtonBase-DzpmdR6N.js} +4 -4
- package/dist/CardContent-BXjX98Jd.cjs +1 -0
- package/dist/{CardContent-CHoWb0DR.js → CardContent-u1MKaFvP.js} +3 -3
- package/dist/{Checkbox-92V5IqYF.js → Checkbox-BI77q7eR.js} +22 -23
- package/dist/Checkbox-C6CIGK27.cjs +1 -0
- package/dist/{Chip-I3ytWE-R.js → Chip-6-zATjcr.js} +49 -50
- package/dist/Chip-CAPnyZyW.cjs +1 -0
- package/dist/CircularProgress-CDa_qU1a.js +252 -0
- package/dist/CircularProgress-DTVP6gln.cjs +28 -0
- package/dist/{CloseRounded-BpiJGsCY.cjs → CloseRounded-DQWTEbNz.cjs} +1 -1
- package/dist/{CloseRounded-Di7N75zk.js → CloseRounded-DTpqUeWr.js} +1 -1
- package/dist/{DatePicker-ByvIBsyI.js → DatePicker-BTTLIBm9.js} +538 -536
- package/dist/DatePicker-CJ5-Udgh.cjs +14 -0
- package/dist/{DefaultPropsProvider-CmOKr9hq.js → DefaultPropsProvider-BcmyIf2H.js} +27 -27
- package/dist/DefaultPropsProvider-QmkL7lbM.cjs +1 -0
- package/dist/Dialog-CgBiKk8B.js +477 -0
- package/dist/Dialog-Cmv58WoN.cjs +1 -0
- package/dist/DialogContent-CGEdCDYk.cjs +1 -0
- package/dist/{DialogContent-4rDvu_sh.js → DialogContent-SYCCu1VD.js} +3 -3
- package/dist/DialogTitle-Dxm2NHs7.cjs +1 -0
- package/dist/{DialogTitle-Bw1Q-9PX.js → DialogTitle-_yayDwkI.js} +5 -5
- package/dist/Divider-D_LVNUqS.cjs +1 -0
- package/dist/{Divider-CeOjSQMP.js → Divider-Doy31VS6.js} +4 -4
- package/dist/FormLabel-D0gSgwnj.cjs +2 -0
- package/dist/{FormLabel-Cm4Ba58U.js → FormLabel-DjkS3S9h.js} +79 -80
- package/dist/Grow-D7scX77o.cjs +1 -0
- package/dist/{Grow-BL8Bx4y5.js → Grow-DPD-iBAX.js} +3 -3
- package/dist/{IconButton-C4GFAbeH.js → IconButton-B4bt0Hp2.js} +134 -67
- package/dist/IconButton-Edo5JMfQ.cjs +2 -0
- package/dist/InputAdornment-C9NrmB_z.cjs +1 -0
- package/dist/{InputAdornment-XfxRdI9K.js → InputAdornment-GzDm1zf_.js} +8 -9
- package/dist/{InputBase-DBsV_L3Y.js → InputBase-CF5oNEfh.js} +215 -210
- package/dist/InputBase-CgOQ0M4_.cjs +3 -0
- package/dist/Link-CAbb9OCV.cjs +1 -0
- package/dist/{Link-Dqbq0dpE.js → Link-CnahHTmK.js} +48 -49
- package/dist/{Menu-DiQ9wnM_.cjs → Menu-C-R0FVOB.cjs} +6 -6
- package/dist/{Menu-CtlPVqJo.js → Menu-DzBX10ev.js} +28 -28
- package/dist/MenuItem-Cp1_Q0FD.cjs +1 -0
- package/dist/{MenuItem-BCyMn0B-.js → MenuItem-DQQ-p2ie.js} +6 -6
- package/dist/{Modal-BBc68t3R.js → Modal-B8JRJWm0.js} +8 -8
- package/dist/{Modal-CGCKjoqp.cjs → Modal-D8lS9C1l.cjs} +2 -2
- package/dist/Paper-C-oPGpbI.cjs +2 -0
- package/dist/{Paper-BIgadgtb.js → Paper-CbgkVQVx.js} +4 -4
- package/dist/{Popper-Dotov0nV.js → Popper-1-DDNRPD.js} +5 -5
- package/dist/Popper-uw9PkkLY.cjs +4 -0
- package/dist/{Portal-DvgoZfYl.js → Portal-T-1Qk77D.js} +2 -2
- package/dist/Portal-bIKnnWR4.cjs +1 -0
- package/dist/{Radio-BmCVKlgN.js → Radio-BxMxeQa-.js} +8 -9
- package/dist/Radio-CvCkmq8g.cjs +1 -0
- package/dist/{RadioGroup-BoBajGjF.js → RadioGroup-BLrD8_Lp.js} +3 -3
- package/dist/RadioGroup-Ya-I8Lz1.cjs +1 -0
- package/dist/{Select-DCbhewsz.js → Select-B6mYfJPA.js} +195 -191
- package/dist/Select-KMdcuol6.cjs +3 -0
- package/dist/Stack-C6v70ALA.cjs +1 -0
- package/dist/{Stack-CSgGU-cq.js → Stack-aCUdCw1A.js} +60 -105
- package/dist/{Switch-JIoNRv7S.js → Switch-BOpqo-TS.js} +10 -11
- package/dist/Switch-DF4bSjED.cjs +1 -0
- package/dist/SwitchBase-7zONZyYP.cjs +1 -0
- package/dist/{SwitchBase-Ccit_gYg.js → SwitchBase-BAjfatYA.js} +20 -21
- package/dist/{Tabs-Bhy2g9Y0.js → Tabs-CrWcC5nJ.js} +225 -226
- package/dist/Tabs-Dploq_37.cjs +4 -0
- package/dist/TextField-BC7GvvHh.cjs +1 -0
- package/dist/{TextField-FNS4AqVd.js → TextField-CAmc1Qpg.js} +17 -18
- package/dist/ToggleButtonGroup-BCVgsika.cjs +140 -0
- package/dist/{ToggleButtonGroup-qi5MsGIW.js → ToggleButtonGroup-ekxVeQCc.js} +3088 -3229
- package/dist/{Tooltip-AHSVG6xQ.js → Tooltip-BvVFPsVR.js} +29 -30
- package/dist/Tooltip-CWA-GKdK.cjs +4 -0
- package/dist/{Typography-C9ltjPyz.js → Typography-CE8fQQ8B.js} +12 -13
- package/dist/Typography-DEAE8-8u.cjs +1 -0
- package/dist/components/Button/Button.cjs.js +1 -1
- package/dist/components/Button/Button.es.js +2 -2
- package/dist/components/DatePicker/DatePicker.cjs.js +1 -1
- package/dist/components/DatePicker/DatePicker.es.js +1 -1
- package/dist/components/DatePicker/index.cjs.js +1 -1
- package/dist/components/DatePicker/index.es.js +1 -1
- package/dist/components/Dialog/Dialog.cjs.js +1 -1
- package/dist/components/Dialog/Dialog.es.js +2 -2
- package/dist/components/Dropzone/Dropzone.cjs.js +1 -1
- package/dist/components/Dropzone/Dropzone.es.js +4 -4
- package/dist/components/EmptyState/EmptyState.cjs.js +1 -1
- package/dist/components/EmptyState/EmptyState.es.js +2 -2
- package/dist/components/FileList/FileIcon.cjs.js +1 -1
- package/dist/components/FileList/FileIcon.es.js +1 -1
- package/dist/components/FileList/FileListItem.cjs.js +1 -1
- package/dist/components/FileList/FileListItem.es.js +4 -4
- package/dist/components/Heading/Heading.cjs.js +1 -1
- package/dist/components/Heading/Heading.es.js +2 -2
- package/dist/components/ImagePicker/ImagePicker.cjs.js +1 -1
- package/dist/components/ImagePicker/ImagePicker.es.js +4 -4
- package/dist/components/Loader/Loader.cjs.js +1 -1
- package/dist/components/Loader/Loader.es.js +1 -1
- package/dist/components/LoaderBackdrop/LoaderBackdrop.cjs.js +1 -1
- package/dist/components/LoaderBackdrop/LoaderBackdrop.es.js +2 -2
- package/dist/components/PasswordInput/PasswordInput.cjs.js +1 -1
- package/dist/components/PasswordInput/PasswordInput.es.js +3 -3
- package/dist/components/ResourceCard/ResourceCard.cjs.js +1 -1
- package/dist/components/ResourceCard/ResourceCard.es.js +1 -1
- package/dist/components/SearchInput/SearchInput.cjs.js +1 -1
- package/dist/components/SearchInput/SearchInput.es.js +4 -4
- package/dist/components/TextInput/TextInput.cjs.js +1 -1
- package/dist/components/TextInput/TextInput.es.js +1 -1
- package/dist/components/index.cjs.js +1 -1
- package/dist/components/index.es.js +341 -340
- package/dist/components/stories/Button.stories.cjs.js +1 -1
- package/dist/components/stories/Button.stories.es.js +1 -1
- package/dist/components/stories/Card.stories.cjs.js +1 -1
- package/dist/components/stories/Card.stories.es.js +2 -2
- package/dist/components/stories/Checkbox.stories.cjs.js +1 -1
- package/dist/components/stories/Checkbox.stories.es.js +1 -1
- package/dist/components/stories/Chip.stories.cjs.js +1 -1
- package/dist/components/stories/Chip.stories.es.js +1 -1
- package/dist/components/stories/DatePicker.stories.cjs.js +1 -1
- package/dist/components/stories/DatePicker.stories.es.js +1 -1
- package/dist/components/stories/Dialog.stories.cjs.js +1 -1
- package/dist/components/stories/Dialog.stories.es.js +2 -2
- package/dist/components/stories/Divider.stories.cjs.js +1 -1
- package/dist/components/stories/Divider.stories.es.js +1 -1
- package/dist/components/stories/FormControlLabel.stories.cjs.js +1 -1
- package/dist/components/stories/FormControlLabel.stories.es.js +3 -3
- package/dist/components/stories/Heading.stories.cjs.js +1 -1
- package/dist/components/stories/Heading.stories.es.js +2 -2
- package/dist/components/stories/IconButton.stories.cjs.js +1 -1
- package/dist/components/stories/IconButton.stories.es.js +2 -2
- package/dist/components/stories/Link.stories.cjs.js +1 -1
- package/dist/components/stories/Link.stories.es.js +1 -1
- package/dist/components/stories/Menu.stories.cjs.js +1 -1
- package/dist/components/stories/Menu.stories.es.js +2 -2
- package/dist/components/stories/Paper.stories.cjs.js +1 -1
- package/dist/components/stories/Paper.stories.es.js +1 -1
- package/dist/components/stories/RadioGroup.stories.cjs.js +1 -1
- package/dist/components/stories/RadioGroup.stories.es.js +3 -3
- package/dist/components/stories/ResourceCard.stories.cjs.js +1 -1
- package/dist/components/stories/ResourceCard.stories.es.js +1 -1
- package/dist/components/stories/Select.stories.cjs.js +1 -1
- package/dist/components/stories/Select.stories.es.js +3 -3
- package/dist/components/stories/TabList.stories.cjs.js +1 -1
- package/dist/components/stories/TabList.stories.es.js +4 -4
- package/dist/components/stories/TextField.stories.cjs.js +1 -1
- package/dist/components/stories/TextField.stories.es.js +1 -1
- package/dist/components/stories/Tooltip.stories.cjs.js +1 -1
- package/dist/components/stories/Tooltip.stories.es.js +2 -2
- package/dist/components/stories/Typography.stories.cjs.js +1 -1
- package/dist/components/stories/Typography.stories.es.js +1 -1
- package/dist/{createSvgIcon-CIearCnQ.js → createSvgIcon-CCejzj0C.js} +17 -18
- package/dist/createSvgIcon-Dn4BBPej.cjs +1 -0
- package/dist/{dividerClasses-DHKvPyr8.js → dividerClasses-DN9F43tq.js} +1 -1
- package/dist/dividerClasses-Zk1QmrZw.cjs +1 -0
- package/dist/{elementTypeAcceptingRef-BnBq35EV.js → elementTypeAcceptingRef-CrAqn_fc.js} +1 -1
- package/dist/elementTypeAcceptingRef-DVF2QSYK.cjs +1 -0
- package/dist/extendSxProp-BB6jYY1x.cjs +1 -0
- package/dist/{extendSxProp-D1UphbpP.js → extendSxProp-DFv-GFt5.js} +1 -1
- package/dist/identifier-5n4d7br9.cjs +75 -0
- package/dist/{generateUtilityClasses-v9KcqdK1.js → identifier-D58rA1gM.js} +832 -862
- package/dist/index-5BAFzrXD.cjs +1 -0
- package/dist/{index-OesDQygc.js → index-BGS2uu2L.js} +1 -1
- package/dist/index-CFm-oAsb.cjs +1 -0
- package/dist/index-CJW5gB6d.cjs +5 -0
- package/dist/{index-BhCs2pHX.js → index-ClXCinr6.js} +4 -4
- package/dist/{useSlotProps-pX6ti4cn.js → index-DwHI-aa0.js} +26 -26
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +341 -340
- package/dist/{memoTheme-D1tPxCd9.cjs → memoTheme-C8EfvlY1.cjs} +1 -1
- package/dist/{memoTheme-D-rebSfX.js → memoTheme-DyiN-Awd.js} +1 -1
- package/dist/{refType-DcE_kWty.js → refType-B86yTZra.js} +1 -1
- package/dist/refType-CjW6JOBA.cjs +1 -0
- package/dist/{resolveComponentProps-kRRJ79Kv.js → resolveComponentProps-0QnU-fDT.js} +1 -1
- package/dist/resolveComponentProps-D0sgyopa.cjs +1 -0
- package/dist/useSlot-CZNcsPv1.js +48 -0
- package/dist/useSlot-CyXLaLc2.cjs +1 -0
- package/dist/useTheme-Bi8B4Op1.cjs +1 -0
- package/dist/useTheme-C_2IF7CS.cjs +1 -0
- package/dist/useTheme-Clhsq4HW.js +11 -0
- package/dist/{useTheme-BB8ZCoMF.js → useTheme-DxxkErdZ.js} +1 -1
- package/dist/{useThemeProps-DnDXTiQj.js → useThemeProps-BGZrRNnL.js} +2 -2
- package/dist/useThemeProps-C6qniHmV.js +17 -0
- package/dist/{useThemeProps-DcOn-vk2.cjs → useThemeProps-CpNQz1Ap.cjs} +1 -1
- package/dist/useThemeProps-Dq3GRYN1.cjs +1 -0
- package/dist/utils-D4if93Yl.cjs +1 -0
- package/dist/{utils-CSBYZkoB.js → utils-SrEVp7Pm.js} +1 -1
- package/package.json +7 -7
- package/dist/Backdrop-BY124k9Q.cjs +0 -1
- package/dist/Box-CVaz7diG.cjs +0 -1
- package/dist/Button-Bqcf-Wrh.js +0 -483
- package/dist/Button-qwUFZs87.cjs +0 -1
- package/dist/CardContent-BMiRcSGk.cjs +0 -1
- package/dist/Checkbox-DVRfGO8D.cjs +0 -1
- package/dist/Chip-Ch7Ec9PJ.cjs +0 -1
- package/dist/DatePicker-D3AfDdBL.cjs +0 -14
- package/dist/DefaultPropsProvider-PRhNsS_3.cjs +0 -1
- package/dist/Dialog-DouQwf1_.cjs +0 -1
- package/dist/Dialog-GVgQOV8v.js +0 -415
- package/dist/DialogContent-DMvW6Xos.cjs +0 -1
- package/dist/DialogTitle-BTBnlhmM.cjs +0 -1
- package/dist/Divider-CISPNs7L.cjs +0 -1
- package/dist/FormLabel-CtCBcJ-1.cjs +0 -2
- package/dist/Grow-BjcgF7nV.cjs +0 -1
- package/dist/IconButton-loyqjXrR.cjs +0 -2
- package/dist/InputAdornment-CLIvW7Gk.cjs +0 -1
- package/dist/InputBase-BXcShs87.cjs +0 -3
- package/dist/Link-DgsVJ4Wk.cjs +0 -1
- package/dist/MenuItem-DuLNR389.cjs +0 -1
- package/dist/Paper-DYhLUL1K.cjs +0 -2
- package/dist/Popper-CyMmAyHW.cjs +0 -4
- package/dist/Portal-BC_MWv30.cjs +0 -1
- package/dist/Radio-Cta61QrN.cjs +0 -1
- package/dist/RadioGroup-CA-GTAeR.cjs +0 -1
- package/dist/Select-Bm-ZcxRN.cjs +0 -3
- package/dist/Stack-B68ooSQ-.cjs +0 -1
- package/dist/Switch-BMjiyNyB.cjs +0 -1
- package/dist/SwitchBase-CaXyAuEt.cjs +0 -1
- package/dist/Tabs-ll24SDcl.cjs +0 -4
- package/dist/TextField-C5lHwquP.cjs +0 -1
- package/dist/ToggleButtonGroup-CEPDUgtK.cjs +0 -167
- package/dist/Tooltip-C2KS56xn.cjs +0 -4
- package/dist/Typography-Y-OGmT9M.cjs +0 -1
- package/dist/capitalize-Cq3s4y8R.cjs +0 -1
- package/dist/capitalize-yX_QSknw.js +0 -9
- package/dist/createSvgIcon-DKtSalut.cjs +0 -1
- package/dist/dividerClasses-1ChhOCNX.cjs +0 -1
- package/dist/elementTypeAcceptingRef-BgjnOQqe.cjs +0 -1
- package/dist/extendSxProp-Dolw-tGY.cjs +0 -1
- package/dist/generateUtilityClasses-0dYt6eGZ.cjs +0 -75
- package/dist/index-BUATG6-f.cjs +0 -5
- package/dist/index-CgWaRcwQ.cjs +0 -1
- package/dist/refType-DdkUp8DT.cjs +0 -1
- package/dist/resolveComponentProps-CGmtduHt.cjs +0 -1
- package/dist/useSlot-BYekfmak.cjs +0 -1
- package/dist/useSlot-CQW01GLa.js +0 -44
- package/dist/useSlotProps-NZH6_nAj.cjs +0 -1
- package/dist/useTheme-B1HNivkF.cjs +0 -1
- package/dist/useTheme-C0AF6jAe.cjs +0 -1
- package/dist/useTheme-Dyx3LMQU.js +0 -11
- package/dist/useThemeProps-BAXMP5Ww.cjs +0 -1
- package/dist/useThemeProps-KNNlKFR_.js +0 -17
- package/dist/utils-C6YMiaf0.cjs +0 -1
|
@@ -0,0 +1,662 @@
|
|
|
1
|
+
import * as b from "react";
|
|
2
|
+
import { H as A, I as q, G as N, L as r, n as y, P as t } from "./identifier-D58rA1gM.js";
|
|
3
|
+
import { a as J, u as K, s as f, c as Q, r as X } from "./DefaultPropsProvider-BcmyIf2H.js";
|
|
4
|
+
import { m as Y } from "./memoTheme-DyiN-Awd.js";
|
|
5
|
+
import { c as Z } from "./createSimplePaletteValueFilter-B7--0ryQ.js";
|
|
6
|
+
import { jsxs as oo, jsx as d } from "react/jsx-runtime";
|
|
7
|
+
import { u as to } from "./useId-CK6Kn3Tn.js";
|
|
8
|
+
import { B as ao } from "./ButtonBase-DzpmdR6N.js";
|
|
9
|
+
import { C as no } from "./CircularProgress-CDa_qU1a.js";
|
|
10
|
+
function io(o) {
|
|
11
|
+
return q("MuiButton", o);
|
|
12
|
+
}
|
|
13
|
+
const p = A("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"]), W = /* @__PURE__ */ b.createContext({});
|
|
14
|
+
process.env.NODE_ENV !== "production" && (W.displayName = "ButtonGroupContext");
|
|
15
|
+
const T = /* @__PURE__ */ b.createContext(void 0);
|
|
16
|
+
process.env.NODE_ENV !== "production" && (T.displayName = "ButtonGroupButtonContext");
|
|
17
|
+
const ro = (o) => {
|
|
18
|
+
const {
|
|
19
|
+
color: a,
|
|
20
|
+
disableElevation: n,
|
|
21
|
+
fullWidth: i,
|
|
22
|
+
size: c,
|
|
23
|
+
variant: u,
|
|
24
|
+
loading: g,
|
|
25
|
+
loadingPosition: z,
|
|
26
|
+
classes: x
|
|
27
|
+
} = o, S = {
|
|
28
|
+
root: ["root", g && "loading", u, `${u}${r(a)}`, `size${r(c)}`, `${u}Size${r(c)}`, `color${r(a)}`, n && "disableElevation", i && "fullWidth", g && `loadingPosition${r(z)}`],
|
|
29
|
+
startIcon: ["icon", "startIcon", `iconSize${r(c)}`],
|
|
30
|
+
endIcon: ["icon", "endIcon", `iconSize${r(c)}`],
|
|
31
|
+
loadingIndicator: ["loadingIndicator"],
|
|
32
|
+
loadingWrapper: ["loadingWrapper"]
|
|
33
|
+
}, I = Q(S, io, x);
|
|
34
|
+
return {
|
|
35
|
+
...x,
|
|
36
|
+
// forward the focused, disabled, etc. classes to the ButtonBase
|
|
37
|
+
...I
|
|
38
|
+
};
|
|
39
|
+
}, L = [{
|
|
40
|
+
props: {
|
|
41
|
+
size: "small"
|
|
42
|
+
},
|
|
43
|
+
style: {
|
|
44
|
+
"& > *:nth-of-type(1)": {
|
|
45
|
+
fontSize: 18
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}, {
|
|
49
|
+
props: {
|
|
50
|
+
size: "medium"
|
|
51
|
+
},
|
|
52
|
+
style: {
|
|
53
|
+
"& > *:nth-of-type(1)": {
|
|
54
|
+
fontSize: 20
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}, {
|
|
58
|
+
props: {
|
|
59
|
+
size: "large"
|
|
60
|
+
},
|
|
61
|
+
style: {
|
|
62
|
+
"& > *:nth-of-type(1)": {
|
|
63
|
+
fontSize: 22
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}], eo = f(ao, {
|
|
67
|
+
shouldForwardProp: (o) => X(o) || o === "classes",
|
|
68
|
+
name: "MuiButton",
|
|
69
|
+
slot: "Root",
|
|
70
|
+
overridesResolver: (o, a) => {
|
|
71
|
+
const {
|
|
72
|
+
ownerState: n
|
|
73
|
+
} = o;
|
|
74
|
+
return [a.root, a[n.variant], a[`${n.variant}${r(n.color)}`], a[`size${r(n.size)}`], a[`${n.variant}Size${r(n.size)}`], n.color === "inherit" && a.colorInherit, n.disableElevation && a.disableElevation, n.fullWidth && a.fullWidth, n.loading && a.loading];
|
|
75
|
+
}
|
|
76
|
+
})(Y(({
|
|
77
|
+
theme: o
|
|
78
|
+
}) => {
|
|
79
|
+
const a = o.palette.mode === "light" ? o.palette.grey[300] : o.palette.grey[800], n = o.palette.mode === "light" ? o.palette.grey.A100 : o.palette.grey[700];
|
|
80
|
+
return {
|
|
81
|
+
...o.typography.button,
|
|
82
|
+
minWidth: 64,
|
|
83
|
+
padding: "6px 16px",
|
|
84
|
+
border: 0,
|
|
85
|
+
borderRadius: (o.vars || o).shape.borderRadius,
|
|
86
|
+
transition: o.transitions.create(["background-color", "box-shadow", "border-color", "color"], {
|
|
87
|
+
duration: o.transitions.duration.short
|
|
88
|
+
}),
|
|
89
|
+
"&:hover": {
|
|
90
|
+
textDecoration: "none"
|
|
91
|
+
},
|
|
92
|
+
[`&.${p.disabled}`]: {
|
|
93
|
+
color: (o.vars || o).palette.action.disabled
|
|
94
|
+
},
|
|
95
|
+
variants: [{
|
|
96
|
+
props: {
|
|
97
|
+
variant: "contained"
|
|
98
|
+
},
|
|
99
|
+
style: {
|
|
100
|
+
color: "var(--variant-containedColor)",
|
|
101
|
+
backgroundColor: "var(--variant-containedBg)",
|
|
102
|
+
boxShadow: (o.vars || o).shadows[2],
|
|
103
|
+
"&:hover": {
|
|
104
|
+
boxShadow: (o.vars || o).shadows[4],
|
|
105
|
+
// Reset on touch devices, it doesn't add specificity
|
|
106
|
+
"@media (hover: none)": {
|
|
107
|
+
boxShadow: (o.vars || o).shadows[2]
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
"&:active": {
|
|
111
|
+
boxShadow: (o.vars || o).shadows[8]
|
|
112
|
+
},
|
|
113
|
+
[`&.${p.focusVisible}`]: {
|
|
114
|
+
boxShadow: (o.vars || o).shadows[6]
|
|
115
|
+
},
|
|
116
|
+
[`&.${p.disabled}`]: {
|
|
117
|
+
color: (o.vars || o).palette.action.disabled,
|
|
118
|
+
boxShadow: (o.vars || o).shadows[0],
|
|
119
|
+
backgroundColor: (o.vars || o).palette.action.disabledBackground
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}, {
|
|
123
|
+
props: {
|
|
124
|
+
variant: "outlined"
|
|
125
|
+
},
|
|
126
|
+
style: {
|
|
127
|
+
padding: "5px 15px",
|
|
128
|
+
border: "1px solid currentColor",
|
|
129
|
+
borderColor: "var(--variant-outlinedBorder, currentColor)",
|
|
130
|
+
backgroundColor: "var(--variant-outlinedBg)",
|
|
131
|
+
color: "var(--variant-outlinedColor)",
|
|
132
|
+
[`&.${p.disabled}`]: {
|
|
133
|
+
border: `1px solid ${(o.vars || o).palette.action.disabledBackground}`
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}, {
|
|
137
|
+
props: {
|
|
138
|
+
variant: "text"
|
|
139
|
+
},
|
|
140
|
+
style: {
|
|
141
|
+
padding: "6px 8px",
|
|
142
|
+
color: "var(--variant-textColor)",
|
|
143
|
+
backgroundColor: "var(--variant-textBg)"
|
|
144
|
+
}
|
|
145
|
+
}, ...Object.entries(o.palette).filter(Z()).map(([i]) => ({
|
|
146
|
+
props: {
|
|
147
|
+
color: i
|
|
148
|
+
},
|
|
149
|
+
style: {
|
|
150
|
+
"--variant-textColor": (o.vars || o).palette[i].main,
|
|
151
|
+
"--variant-outlinedColor": (o.vars || o).palette[i].main,
|
|
152
|
+
"--variant-outlinedBorder": o.vars ? `rgba(${o.vars.palette[i].mainChannel} / 0.5)` : y(o.palette[i].main, 0.5),
|
|
153
|
+
"--variant-containedColor": (o.vars || o).palette[i].contrastText,
|
|
154
|
+
"--variant-containedBg": (o.vars || o).palette[i].main,
|
|
155
|
+
"@media (hover: hover)": {
|
|
156
|
+
"&:hover": {
|
|
157
|
+
"--variant-containedBg": (o.vars || o).palette[i].dark,
|
|
158
|
+
"--variant-textBg": o.vars ? `rgba(${o.vars.palette[i].mainChannel} / ${o.vars.palette.action.hoverOpacity})` : y(o.palette[i].main, o.palette.action.hoverOpacity),
|
|
159
|
+
"--variant-outlinedBorder": (o.vars || o).palette[i].main,
|
|
160
|
+
"--variant-outlinedBg": o.vars ? `rgba(${o.vars.palette[i].mainChannel} / ${o.vars.palette.action.hoverOpacity})` : y(o.palette[i].main, o.palette.action.hoverOpacity)
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
})), {
|
|
165
|
+
props: {
|
|
166
|
+
color: "inherit"
|
|
167
|
+
},
|
|
168
|
+
style: {
|
|
169
|
+
color: "inherit",
|
|
170
|
+
borderColor: "currentColor",
|
|
171
|
+
"--variant-containedBg": o.vars ? o.vars.palette.Button.inheritContainedBg : a,
|
|
172
|
+
"@media (hover: hover)": {
|
|
173
|
+
"&:hover": {
|
|
174
|
+
"--variant-containedBg": o.vars ? o.vars.palette.Button.inheritContainedHoverBg : n,
|
|
175
|
+
"--variant-textBg": o.vars ? `rgba(${o.vars.palette.text.primaryChannel} / ${o.vars.palette.action.hoverOpacity})` : y(o.palette.text.primary, o.palette.action.hoverOpacity),
|
|
176
|
+
"--variant-outlinedBg": o.vars ? `rgba(${o.vars.palette.text.primaryChannel} / ${o.vars.palette.action.hoverOpacity})` : y(o.palette.text.primary, o.palette.action.hoverOpacity)
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}, {
|
|
181
|
+
props: {
|
|
182
|
+
size: "small",
|
|
183
|
+
variant: "text"
|
|
184
|
+
},
|
|
185
|
+
style: {
|
|
186
|
+
padding: "4px 5px",
|
|
187
|
+
fontSize: o.typography.pxToRem(13)
|
|
188
|
+
}
|
|
189
|
+
}, {
|
|
190
|
+
props: {
|
|
191
|
+
size: "large",
|
|
192
|
+
variant: "text"
|
|
193
|
+
},
|
|
194
|
+
style: {
|
|
195
|
+
padding: "8px 11px",
|
|
196
|
+
fontSize: o.typography.pxToRem(15)
|
|
197
|
+
}
|
|
198
|
+
}, {
|
|
199
|
+
props: {
|
|
200
|
+
size: "small",
|
|
201
|
+
variant: "outlined"
|
|
202
|
+
},
|
|
203
|
+
style: {
|
|
204
|
+
padding: "3px 9px",
|
|
205
|
+
fontSize: o.typography.pxToRem(13)
|
|
206
|
+
}
|
|
207
|
+
}, {
|
|
208
|
+
props: {
|
|
209
|
+
size: "large",
|
|
210
|
+
variant: "outlined"
|
|
211
|
+
},
|
|
212
|
+
style: {
|
|
213
|
+
padding: "7px 21px",
|
|
214
|
+
fontSize: o.typography.pxToRem(15)
|
|
215
|
+
}
|
|
216
|
+
}, {
|
|
217
|
+
props: {
|
|
218
|
+
size: "small",
|
|
219
|
+
variant: "contained"
|
|
220
|
+
},
|
|
221
|
+
style: {
|
|
222
|
+
padding: "4px 10px",
|
|
223
|
+
fontSize: o.typography.pxToRem(13)
|
|
224
|
+
}
|
|
225
|
+
}, {
|
|
226
|
+
props: {
|
|
227
|
+
size: "large",
|
|
228
|
+
variant: "contained"
|
|
229
|
+
},
|
|
230
|
+
style: {
|
|
231
|
+
padding: "8px 22px",
|
|
232
|
+
fontSize: o.typography.pxToRem(15)
|
|
233
|
+
}
|
|
234
|
+
}, {
|
|
235
|
+
props: {
|
|
236
|
+
disableElevation: !0
|
|
237
|
+
},
|
|
238
|
+
style: {
|
|
239
|
+
boxShadow: "none",
|
|
240
|
+
"&:hover": {
|
|
241
|
+
boxShadow: "none"
|
|
242
|
+
},
|
|
243
|
+
[`&.${p.focusVisible}`]: {
|
|
244
|
+
boxShadow: "none"
|
|
245
|
+
},
|
|
246
|
+
"&:active": {
|
|
247
|
+
boxShadow: "none"
|
|
248
|
+
},
|
|
249
|
+
[`&.${p.disabled}`]: {
|
|
250
|
+
boxShadow: "none"
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
}, {
|
|
254
|
+
props: {
|
|
255
|
+
fullWidth: !0
|
|
256
|
+
},
|
|
257
|
+
style: {
|
|
258
|
+
width: "100%"
|
|
259
|
+
}
|
|
260
|
+
}, {
|
|
261
|
+
props: {
|
|
262
|
+
loadingPosition: "center"
|
|
263
|
+
},
|
|
264
|
+
style: {
|
|
265
|
+
transition: o.transitions.create(["background-color", "box-shadow", "border-color"], {
|
|
266
|
+
duration: o.transitions.duration.short
|
|
267
|
+
}),
|
|
268
|
+
[`&.${p.loading}`]: {
|
|
269
|
+
color: "transparent"
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
}]
|
|
273
|
+
};
|
|
274
|
+
})), so = f("span", {
|
|
275
|
+
name: "MuiButton",
|
|
276
|
+
slot: "StartIcon",
|
|
277
|
+
overridesResolver: (o, a) => {
|
|
278
|
+
const {
|
|
279
|
+
ownerState: n
|
|
280
|
+
} = o;
|
|
281
|
+
return [a.startIcon, n.loading && a.startIconLoadingStart, a[`iconSize${r(n.size)}`]];
|
|
282
|
+
}
|
|
283
|
+
})(({
|
|
284
|
+
theme: o
|
|
285
|
+
}) => ({
|
|
286
|
+
display: "inherit",
|
|
287
|
+
marginRight: 8,
|
|
288
|
+
marginLeft: -4,
|
|
289
|
+
variants: [{
|
|
290
|
+
props: {
|
|
291
|
+
size: "small"
|
|
292
|
+
},
|
|
293
|
+
style: {
|
|
294
|
+
marginLeft: -2
|
|
295
|
+
}
|
|
296
|
+
}, {
|
|
297
|
+
props: {
|
|
298
|
+
loadingPosition: "start",
|
|
299
|
+
loading: !0
|
|
300
|
+
},
|
|
301
|
+
style: {
|
|
302
|
+
transition: o.transitions.create(["opacity"], {
|
|
303
|
+
duration: o.transitions.duration.short
|
|
304
|
+
}),
|
|
305
|
+
opacity: 0
|
|
306
|
+
}
|
|
307
|
+
}, {
|
|
308
|
+
props: {
|
|
309
|
+
loadingPosition: "start",
|
|
310
|
+
loading: !0,
|
|
311
|
+
fullWidth: !0
|
|
312
|
+
},
|
|
313
|
+
style: {
|
|
314
|
+
marginRight: -8
|
|
315
|
+
}
|
|
316
|
+
}, ...L]
|
|
317
|
+
})), lo = f("span", {
|
|
318
|
+
name: "MuiButton",
|
|
319
|
+
slot: "EndIcon",
|
|
320
|
+
overridesResolver: (o, a) => {
|
|
321
|
+
const {
|
|
322
|
+
ownerState: n
|
|
323
|
+
} = o;
|
|
324
|
+
return [a.endIcon, n.loading && a.endIconLoadingEnd, a[`iconSize${r(n.size)}`]];
|
|
325
|
+
}
|
|
326
|
+
})(({
|
|
327
|
+
theme: o
|
|
328
|
+
}) => ({
|
|
329
|
+
display: "inherit",
|
|
330
|
+
marginRight: -4,
|
|
331
|
+
marginLeft: 8,
|
|
332
|
+
variants: [{
|
|
333
|
+
props: {
|
|
334
|
+
size: "small"
|
|
335
|
+
},
|
|
336
|
+
style: {
|
|
337
|
+
marginRight: -2
|
|
338
|
+
}
|
|
339
|
+
}, {
|
|
340
|
+
props: {
|
|
341
|
+
loadingPosition: "end",
|
|
342
|
+
loading: !0
|
|
343
|
+
},
|
|
344
|
+
style: {
|
|
345
|
+
transition: o.transitions.create(["opacity"], {
|
|
346
|
+
duration: o.transitions.duration.short
|
|
347
|
+
}),
|
|
348
|
+
opacity: 0
|
|
349
|
+
}
|
|
350
|
+
}, {
|
|
351
|
+
props: {
|
|
352
|
+
loadingPosition: "end",
|
|
353
|
+
loading: !0,
|
|
354
|
+
fullWidth: !0
|
|
355
|
+
},
|
|
356
|
+
style: {
|
|
357
|
+
marginLeft: -8
|
|
358
|
+
}
|
|
359
|
+
}, ...L]
|
|
360
|
+
})), po = f("span", {
|
|
361
|
+
name: "MuiButton",
|
|
362
|
+
slot: "LoadingIndicator",
|
|
363
|
+
overridesResolver: (o, a) => a.loadingIndicator
|
|
364
|
+
})(({
|
|
365
|
+
theme: o
|
|
366
|
+
}) => ({
|
|
367
|
+
display: "none",
|
|
368
|
+
position: "absolute",
|
|
369
|
+
visibility: "visible",
|
|
370
|
+
variants: [{
|
|
371
|
+
props: {
|
|
372
|
+
loading: !0
|
|
373
|
+
},
|
|
374
|
+
style: {
|
|
375
|
+
display: "flex"
|
|
376
|
+
}
|
|
377
|
+
}, {
|
|
378
|
+
props: {
|
|
379
|
+
loadingPosition: "start"
|
|
380
|
+
},
|
|
381
|
+
style: {
|
|
382
|
+
left: 14
|
|
383
|
+
}
|
|
384
|
+
}, {
|
|
385
|
+
props: {
|
|
386
|
+
loadingPosition: "start",
|
|
387
|
+
size: "small"
|
|
388
|
+
},
|
|
389
|
+
style: {
|
|
390
|
+
left: 10
|
|
391
|
+
}
|
|
392
|
+
}, {
|
|
393
|
+
props: {
|
|
394
|
+
variant: "text",
|
|
395
|
+
loadingPosition: "start"
|
|
396
|
+
},
|
|
397
|
+
style: {
|
|
398
|
+
left: 6
|
|
399
|
+
}
|
|
400
|
+
}, {
|
|
401
|
+
props: {
|
|
402
|
+
loadingPosition: "center"
|
|
403
|
+
},
|
|
404
|
+
style: {
|
|
405
|
+
left: "50%",
|
|
406
|
+
transform: "translate(-50%)",
|
|
407
|
+
color: (o.vars || o).palette.action.disabled
|
|
408
|
+
}
|
|
409
|
+
}, {
|
|
410
|
+
props: {
|
|
411
|
+
loadingPosition: "end"
|
|
412
|
+
},
|
|
413
|
+
style: {
|
|
414
|
+
right: 14
|
|
415
|
+
}
|
|
416
|
+
}, {
|
|
417
|
+
props: {
|
|
418
|
+
loadingPosition: "end",
|
|
419
|
+
size: "small"
|
|
420
|
+
},
|
|
421
|
+
style: {
|
|
422
|
+
right: 10
|
|
423
|
+
}
|
|
424
|
+
}, {
|
|
425
|
+
props: {
|
|
426
|
+
variant: "text",
|
|
427
|
+
loadingPosition: "end"
|
|
428
|
+
},
|
|
429
|
+
style: {
|
|
430
|
+
right: 6
|
|
431
|
+
}
|
|
432
|
+
}, {
|
|
433
|
+
props: {
|
|
434
|
+
loadingPosition: "start",
|
|
435
|
+
fullWidth: !0
|
|
436
|
+
},
|
|
437
|
+
style: {
|
|
438
|
+
position: "relative",
|
|
439
|
+
left: -10
|
|
440
|
+
}
|
|
441
|
+
}, {
|
|
442
|
+
props: {
|
|
443
|
+
loadingPosition: "end",
|
|
444
|
+
fullWidth: !0
|
|
445
|
+
},
|
|
446
|
+
style: {
|
|
447
|
+
position: "relative",
|
|
448
|
+
right: -10
|
|
449
|
+
}
|
|
450
|
+
}]
|
|
451
|
+
})), E = f("span", {
|
|
452
|
+
name: "MuiButton",
|
|
453
|
+
slot: "LoadingIconPlaceholder",
|
|
454
|
+
overridesResolver: (o, a) => a.loadingIconPlaceholder
|
|
455
|
+
})({
|
|
456
|
+
display: "inline-block",
|
|
457
|
+
width: "1em",
|
|
458
|
+
height: "1em"
|
|
459
|
+
}), co = /* @__PURE__ */ b.forwardRef(function(a, n) {
|
|
460
|
+
const i = b.useContext(W), c = b.useContext(T), u = J(i, a), g = K({
|
|
461
|
+
props: u,
|
|
462
|
+
name: "MuiButton"
|
|
463
|
+
}), {
|
|
464
|
+
children: z,
|
|
465
|
+
color: x = "primary",
|
|
466
|
+
component: S = "button",
|
|
467
|
+
className: I,
|
|
468
|
+
disabled: C = !1,
|
|
469
|
+
disableElevation: M = !1,
|
|
470
|
+
disableFocusRipple: B = !1,
|
|
471
|
+
endIcon: P,
|
|
472
|
+
focusVisibleClassName: k,
|
|
473
|
+
fullWidth: V = !1,
|
|
474
|
+
id: m,
|
|
475
|
+
loading: s = null,
|
|
476
|
+
loadingIndicator: j,
|
|
477
|
+
loadingPosition: v = "center",
|
|
478
|
+
size: G = "medium",
|
|
479
|
+
startIcon: h,
|
|
480
|
+
type: w,
|
|
481
|
+
variant: D = "text",
|
|
482
|
+
...F
|
|
483
|
+
} = g, $ = to(m), R = j ?? /* @__PURE__ */ d(no, {
|
|
484
|
+
"aria-labelledby": $,
|
|
485
|
+
color: "inherit",
|
|
486
|
+
size: 16
|
|
487
|
+
}), l = {
|
|
488
|
+
...g,
|
|
489
|
+
color: x,
|
|
490
|
+
component: S,
|
|
491
|
+
disabled: C,
|
|
492
|
+
disableElevation: M,
|
|
493
|
+
disableFocusRipple: B,
|
|
494
|
+
fullWidth: V,
|
|
495
|
+
loading: s,
|
|
496
|
+
loadingIndicator: R,
|
|
497
|
+
loadingPosition: v,
|
|
498
|
+
size: G,
|
|
499
|
+
type: w,
|
|
500
|
+
variant: D
|
|
501
|
+
}, e = ro(l), U = (h || s && v === "start") && /* @__PURE__ */ d(so, {
|
|
502
|
+
className: e.startIcon,
|
|
503
|
+
ownerState: l,
|
|
504
|
+
children: h || /* @__PURE__ */ d(E, {
|
|
505
|
+
className: e.loadingIconPlaceholder,
|
|
506
|
+
ownerState: l
|
|
507
|
+
})
|
|
508
|
+
}), H = (P || s && v === "end") && /* @__PURE__ */ d(lo, {
|
|
509
|
+
className: e.endIcon,
|
|
510
|
+
ownerState: l,
|
|
511
|
+
children: P || /* @__PURE__ */ d(E, {
|
|
512
|
+
className: e.loadingIconPlaceholder,
|
|
513
|
+
ownerState: l
|
|
514
|
+
})
|
|
515
|
+
}), _ = c || "", O = typeof s == "boolean" ? (
|
|
516
|
+
// use plain HTML span to minimize the runtime overhead
|
|
517
|
+
/* @__PURE__ */ d("span", {
|
|
518
|
+
className: e.loadingWrapper,
|
|
519
|
+
style: {
|
|
520
|
+
display: "contents"
|
|
521
|
+
},
|
|
522
|
+
children: s && /* @__PURE__ */ d(po, {
|
|
523
|
+
className: e.loadingIndicator,
|
|
524
|
+
ownerState: l,
|
|
525
|
+
children: R
|
|
526
|
+
})
|
|
527
|
+
})
|
|
528
|
+
) : null;
|
|
529
|
+
return /* @__PURE__ */ oo(eo, {
|
|
530
|
+
ownerState: l,
|
|
531
|
+
className: N(i.className, e.root, I, _),
|
|
532
|
+
component: S,
|
|
533
|
+
disabled: C || s,
|
|
534
|
+
focusRipple: !B,
|
|
535
|
+
focusVisibleClassName: N(e.focusVisible, k),
|
|
536
|
+
ref: n,
|
|
537
|
+
type: w,
|
|
538
|
+
id: s ? $ : m,
|
|
539
|
+
...F,
|
|
540
|
+
classes: e,
|
|
541
|
+
children: [U, v !== "end" && O, z, v === "end" && O, H]
|
|
542
|
+
});
|
|
543
|
+
});
|
|
544
|
+
process.env.NODE_ENV !== "production" && (co.propTypes = {
|
|
545
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
546
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
547
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
548
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
549
|
+
/**
|
|
550
|
+
* The content of the component.
|
|
551
|
+
*/
|
|
552
|
+
children: t.node,
|
|
553
|
+
/**
|
|
554
|
+
* Override or extend the styles applied to the component.
|
|
555
|
+
*/
|
|
556
|
+
classes: t.object,
|
|
557
|
+
/**
|
|
558
|
+
* @ignore
|
|
559
|
+
*/
|
|
560
|
+
className: t.string,
|
|
561
|
+
/**
|
|
562
|
+
* The color of the component.
|
|
563
|
+
* It supports both default and custom theme colors, which can be added as shown in the
|
|
564
|
+
* [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
|
|
565
|
+
* @default 'primary'
|
|
566
|
+
*/
|
|
567
|
+
color: t.oneOfType([t.oneOf(["inherit", "primary", "secondary", "success", "error", "info", "warning"]), t.string]),
|
|
568
|
+
/**
|
|
569
|
+
* The component used for the root node.
|
|
570
|
+
* Either a string to use a HTML element or a component.
|
|
571
|
+
*/
|
|
572
|
+
component: t.elementType,
|
|
573
|
+
/**
|
|
574
|
+
* If `true`, the component is disabled.
|
|
575
|
+
* @default false
|
|
576
|
+
*/
|
|
577
|
+
disabled: t.bool,
|
|
578
|
+
/**
|
|
579
|
+
* If `true`, no elevation is used.
|
|
580
|
+
* @default false
|
|
581
|
+
*/
|
|
582
|
+
disableElevation: t.bool,
|
|
583
|
+
/**
|
|
584
|
+
* If `true`, the keyboard focus ripple is disabled.
|
|
585
|
+
* @default false
|
|
586
|
+
*/
|
|
587
|
+
disableFocusRipple: t.bool,
|
|
588
|
+
/**
|
|
589
|
+
* If `true`, the ripple effect is disabled.
|
|
590
|
+
*
|
|
591
|
+
* ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure
|
|
592
|
+
* to highlight the element by applying separate styles with the `.Mui-focusVisible` class.
|
|
593
|
+
* @default false
|
|
594
|
+
*/
|
|
595
|
+
disableRipple: t.bool,
|
|
596
|
+
/**
|
|
597
|
+
* Element placed after the children.
|
|
598
|
+
*/
|
|
599
|
+
endIcon: t.node,
|
|
600
|
+
/**
|
|
601
|
+
* @ignore
|
|
602
|
+
*/
|
|
603
|
+
focusVisibleClassName: t.string,
|
|
604
|
+
/**
|
|
605
|
+
* If `true`, the button will take up the full width of its container.
|
|
606
|
+
* @default false
|
|
607
|
+
*/
|
|
608
|
+
fullWidth: t.bool,
|
|
609
|
+
/**
|
|
610
|
+
* The URL to link to when the button is clicked.
|
|
611
|
+
* If defined, an `a` element will be used as the root node.
|
|
612
|
+
*/
|
|
613
|
+
href: t.string,
|
|
614
|
+
/**
|
|
615
|
+
* @ignore
|
|
616
|
+
*/
|
|
617
|
+
id: t.string,
|
|
618
|
+
/**
|
|
619
|
+
* If `true`, the loading indicator is visible and the button is disabled.
|
|
620
|
+
* If `true | false`, the loading wrapper is always rendered before the children to prevent [Google Translation Crash](https://github.com/mui/material-ui/issues/27853).
|
|
621
|
+
* @default null
|
|
622
|
+
*/
|
|
623
|
+
loading: t.bool,
|
|
624
|
+
/**
|
|
625
|
+
* Element placed before the children if the button is in loading state.
|
|
626
|
+
* The node should contain an element with `role="progressbar"` with an accessible name.
|
|
627
|
+
* By default, it renders a `CircularProgress` that is labeled by the button itself.
|
|
628
|
+
* @default <CircularProgress color="inherit" size={16} />
|
|
629
|
+
*/
|
|
630
|
+
loadingIndicator: t.node,
|
|
631
|
+
/**
|
|
632
|
+
* The loading indicator can be positioned on the start, end, or the center of the button.
|
|
633
|
+
* @default 'center'
|
|
634
|
+
*/
|
|
635
|
+
loadingPosition: t.oneOf(["center", "end", "start"]),
|
|
636
|
+
/**
|
|
637
|
+
* The size of the component.
|
|
638
|
+
* `small` is equivalent to the dense button styling.
|
|
639
|
+
* @default 'medium'
|
|
640
|
+
*/
|
|
641
|
+
size: t.oneOfType([t.oneOf(["small", "medium", "large"]), t.string]),
|
|
642
|
+
/**
|
|
643
|
+
* Element placed before the children.
|
|
644
|
+
*/
|
|
645
|
+
startIcon: t.node,
|
|
646
|
+
/**
|
|
647
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
648
|
+
*/
|
|
649
|
+
sx: t.oneOfType([t.arrayOf(t.oneOfType([t.func, t.object, t.bool])), t.func, t.object]),
|
|
650
|
+
/**
|
|
651
|
+
* @ignore
|
|
652
|
+
*/
|
|
653
|
+
type: t.oneOfType([t.oneOf(["button", "reset", "submit"]), t.string]),
|
|
654
|
+
/**
|
|
655
|
+
* The variant to use.
|
|
656
|
+
* @default 'text'
|
|
657
|
+
*/
|
|
658
|
+
variant: t.oneOfType([t.oneOf(["contained", "outlined", "text"]), t.string])
|
|
659
|
+
});
|
|
660
|
+
export {
|
|
661
|
+
co as B
|
|
662
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var De=Object.defineProperty;var Ne=(o,t,n)=>t in o?De(o,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):o[t]=n;var re=(o,t,n)=>Ne(o,typeof t!="symbol"?t+"":t,n);const T=require("react"),e=require("./
|
|
1
|
+
"use strict";var De=Object.defineProperty;var Ne=(o,t,n)=>t in o?De(o,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):o[t]=n;var re=(o,t,n)=>Ne(o,typeof t!="symbol"?t+"":t,n);const T=require("react"),e=require("./identifier-5n4d7br9.cjs"),L=require("react/jsx-runtime"),$=require("./DefaultPropsProvider-QmkL7lbM.cjs"),ue=require("./useTimeout-COCrDKz-.cjs"),W=require("./TransitionGroupContext-Zt4NoR0u.cjs"),ne=require("@emotion/react"),ie=require("./useForkRef-CTI33h-3.cjs"),H=require("./useEventCallback-C0-Qw3Sm.cjs"),le=require("./isFocusVisible-DlSijby6.cjs"),je=require("./elementTypeAcceptingRef-DVF2QSYK.cjs"),ke=require("./refType-CjW6JOBA.cjs");function Se(o){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const n in o)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(o,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:()=>o[n]})}}return t.default=o,Object.freeze(t)}const d=Se(T);class J{constructor(){re(this,"mountEffect",()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())});this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}static create(){return new J}static use(){const t=ue.useLazyRef(J.create).current,[n,i]=d.useState(!1);return t.shouldMount=n,t.setShouldMount=i,d.useEffect(t.mountEffect,[n]),t}mount(){return this.mounted||(this.mounted=we(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}start(...t){this.mount().then(()=>{var n;return(n=this.ref.current)==null?void 0:n.start(...t)})}stop(...t){this.mount().then(()=>{var n;return(n=this.ref.current)==null?void 0:n.stop(...t)})}pulsate(...t){this.mount().then(()=>{var n;return(n=this.ref.current)==null?void 0:n.pulsate(...t)})}}function Oe(){return J.use()}function we(){let o,t;const n=new Promise((i,s)=>{o=i,t=s});return n.resolve=o,n.reject=t,n}function Q(){return Q=Object.assign?Object.assign.bind():function(o){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(o[i]=n[i])}return o},Q.apply(null,arguments)}function Be(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}function oe(o,t){var n=function(r){return t&&T.isValidElement(r)?t(r):r},i=Object.create(null);return o&&T.Children.map(o,function(s){return s}).forEach(function(s){i[s.key]=n(s)}),i}function Le(o,t){o=o||{},t=t||{};function n(h){return h in t?t[h]:o[h]}var i=Object.create(null),s=[];for(var r in o)r in t?s.length&&(i[r]=s,s=[]):s.push(r);var l,c={};for(var a in t){if(i[a])for(l=0;l<i[a].length;l++){var f=i[a][l];c[i[a][l]]=n(f)}c[a]=n(a)}for(l=0;l<s.length;l++)c[s[l]]=n(s[l]);return c}function B(o,t,n){return n[t]!=null?n[t]:o.props[t]}function Fe(o,t){return oe(o.children,function(n){return T.cloneElement(n,{onExited:t.bind(null,n),in:!0,appear:B(n,"appear",o),enter:B(n,"enter",o),exit:B(n,"exit",o)})})}function qe(o,t,n){var i=oe(o.children),s=Le(t,i);return Object.keys(s).forEach(function(r){var l=s[r];if(T.isValidElement(l)){var c=r in t,a=r in i,f=t[r],h=T.isValidElement(f)&&!f.props.in;a&&(!c||h)?s[r]=T.cloneElement(l,{onExited:n.bind(null,l),in:!0,exit:B(l,"exit",o),enter:B(l,"enter",o)}):!a&&c&&!h?s[r]=T.cloneElement(l,{in:!1}):a&&c&&T.isValidElement(f)&&(s[r]=T.cloneElement(l,{onExited:n.bind(null,l),in:f.props.in,exit:B(l,"exit",o),enter:B(l,"enter",o)}))}}),s}var Ue=Object.values||function(o){return Object.keys(o).map(function(t){return o[t]})},$e={component:"div",childFactory:function(t){return t}},Z=function(o){W._inheritsLoose(t,o);function t(i,s){var r;r=o.call(this,i,s)||this;var l=r.handleExited.bind(Be(r));return r.state={contextValue:{isMounting:!0},handleExited:l,firstRender:!0},r}var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(s,r){var l=r.children,c=r.handleExited,a=r.firstRender;return{children:a?Fe(s,c):qe(s,l,c),firstRender:!1}},n.handleExited=function(s,r){var l=oe(this.props.children);s.key in l||(s.props.onExited&&s.props.onExited(r),this.mounted&&this.setState(function(c){var a=Q({},c.children);return delete a[s.key],{children:a}}))},n.render=function(){var s=this.props,r=s.component,l=s.childFactory,c=W._objectWithoutPropertiesLoose(s,["component","childFactory"]),a=this.state.contextValue,f=Ue(this.state.children).map(l);return delete c.appear,delete c.enter,delete c.exit,r===null?T.createElement(W.TransitionGroupContext.Provider,{value:a},f):T.createElement(W.TransitionGroupContext.Provider,{value:a},T.createElement(r,c,f))},t}(T.Component);Z.propTypes=process.env.NODE_ENV!=="production"?{component:e.PropTypes.any,children:e.PropTypes.node,appear:e.PropTypes.bool,enter:e.PropTypes.bool,exit:e.PropTypes.bool,childFactory:e.PropTypes.func}:{};Z.defaultProps=$e;function ae(o){const{className:t,classes:n,pulsate:i=!1,rippleX:s,rippleY:r,rippleSize:l,in:c,onExited:a,timeout:f}=o,[h,m]=d.useState(!1),g=e.clsx(t,n.ripple,n.rippleVisible,i&&n.ripplePulsate),V={width:l,height:l,top:-(l/2)+r,left:-(l/2)+s},b=e.clsx(n.child,h&&n.childLeaving,i&&n.childPulsate);return!c&&!h&&m(!0),d.useEffect(()=>{if(!c&&a!=null){const k=setTimeout(a,f);return()=>{clearTimeout(k)}}},[a,c,f]),L.jsx("span",{className:g,style:V,children:L.jsx("span",{className:b})})}process.env.NODE_ENV!=="production"&&(ae.propTypes={classes:e.PropTypes.object.isRequired,className:e.PropTypes.string,in:e.PropTypes.bool,onExited:e.PropTypes.func,pulsate:e.PropTypes.bool,rippleSize:e.PropTypes.number,rippleX:e.PropTypes.number,rippleY:e.PropTypes.number,timeout:e.PropTypes.number.isRequired});const P=e.generateUtilityClasses("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),te=550,Ie=80,ze=ne.keyframes`
|
|
2
2
|
0% {
|
|
3
3
|
transform: scale(0);
|
|
4
4
|
opacity: 0.1;
|