@cgi-learning-hub/ui 1.3.5 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Backdrop-COarwgJj.cjs +1 -0
- package/dist/{Backdrop-DcDd6WZF.js → Backdrop-DdA12b-5.js} +79 -82
- package/dist/Box-C0mEbUoK.cjs +1 -0
- package/dist/{Box-Byz2BwGf.js → Box-DbRInJ2-.js} +8 -8
- package/dist/Button-1tZRtOeG.cjs +1 -0
- package/dist/Button-rxIER0bL.js +662 -0
- package/dist/ButtonBase-C2rhY3j-.cjs +74 -0
- package/dist/{ButtonBase-DAWDecOk.js → ButtonBase-DzpmdR6N.js} +334 -334
- package/dist/CardContent-BXjX98Jd.cjs +1 -0
- package/dist/CardContent-u1MKaFvP.js +226 -0
- package/dist/{Checkbox-8Rhxpkjl.js → Checkbox-BI77q7eR.js} +26 -27
- package/dist/Checkbox-C6CIGK27.cjs +1 -0
- package/dist/Chip-6-zATjcr.js +521 -0
- package/dist/Chip-CAPnyZyW.cjs +1 -0
- package/dist/{CircularProgress-Kwlef5fX.js → CircularProgress-CDa_qU1a.js} +19 -20
- package/dist/CircularProgress-DTVP6gln.cjs +28 -0
- package/dist/CloseRounded-DQWTEbNz.cjs +1 -0
- package/dist/CloseRounded-DTpqUeWr.js +8 -0
- package/dist/{DatePicker-BS1OatwQ.js → DatePicker-BTTLIBm9.js} +3110 -3600
- package/dist/DatePicker-CJ5-Udgh.cjs +14 -0
- package/dist/DefaultPropsProvider-BcmyIf2H.js +303 -0
- 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-uc65XOEU.js → DialogContent-SYCCu1VD.js} +13 -13
- package/dist/DialogTitle-Dxm2NHs7.cjs +1 -0
- package/dist/{DialogTitle-C8JOi-rq.js → DialogTitle-_yayDwkI.js} +30 -30
- package/dist/Divider-D_LVNUqS.cjs +1 -0
- package/dist/{Divider-KO-E6nU8.js → Divider-Doy31VS6.js} +8 -8
- package/dist/FormLabel-D0gSgwnj.cjs +2 -0
- package/dist/{FormLabel-CfR4bb21.js → FormLabel-DjkS3S9h.js} +130 -133
- package/dist/Grow-D7scX77o.cjs +1 -0
- package/dist/{Grow-CQVPAYvp.js → Grow-DPD-iBAX.js} +46 -43
- package/dist/{IconButton-CekuyD4r.js → IconButton-B4bt0Hp2.js} +134 -67
- package/dist/IconButton-Edo5JMfQ.cjs +2 -0
- package/dist/InputAdornment-C9NrmB_z.cjs +1 -0
- package/dist/{InputAdornment-iU5YnveW.js → InputAdornment-GzDm1zf_.js} +17 -17
- package/dist/{InputBase-BJy3wwFB.js → InputBase-CF5oNEfh.js} +216 -211
- package/dist/InputBase-CgOQ0M4_.cjs +3 -0
- package/dist/Link-CAbb9OCV.cjs +1 -0
- package/dist/{Link-CoQuUM0t.js → Link-CnahHTmK.js} +49 -50
- package/dist/Menu-C-R0FVOB.cjs +7 -0
- package/dist/{Menu-C7tKmcAh.js → Menu-DzBX10ev.js} +56 -57
- package/dist/MenuItem-Cp1_Q0FD.cjs +1 -0
- package/dist/{MenuItem-j8luVUcX.js → MenuItem-DQQ-p2ie.js} +20 -20
- package/dist/{Modal-brWBFdK7.js → Modal-B8JRJWm0.js} +99 -98
- package/dist/Modal-D8lS9C1l.cjs +2 -0
- package/dist/Paper-C-oPGpbI.cjs +2 -0
- package/dist/{Paper-BG4Vk_Um.js → Paper-CbgkVQVx.js} +8 -8
- package/dist/{Popper-DFZ_gRev.js → Popper-1-DDNRPD.js} +241 -243
- package/dist/Popper-uw9PkkLY.cjs +4 -0
- package/dist/{Portal-JEwcozmp.js → Portal-T-1Qk77D.js} +34 -39
- package/dist/Portal-bIKnnWR4.cjs +1 -0
- package/dist/Radio-BxMxeQa-.js +567 -0
- package/dist/Radio-CvCkmq8g.cjs +1 -0
- package/dist/RadioGroup-BLrD8_Lp.js +190 -0
- package/dist/RadioGroup-Ya-I8Lz1.cjs +1 -0
- package/dist/{Select-DmssuG5M.js → Select-B6mYfJPA.js} +419 -402
- package/dist/Select-KMdcuol6.cjs +3 -0
- package/dist/Stack-C6v70ALA.cjs +1 -0
- package/dist/{Stack-BzTJdRGj.js → Stack-aCUdCw1A.js} +60 -105
- package/dist/Switch-BOpqo-TS.js +329 -0
- package/dist/Switch-DF4bSjED.cjs +1 -0
- package/dist/SwitchBase-7zONZyYP.cjs +1 -0
- package/dist/{SwitchBase-Dlth5_F7.js → SwitchBase-BAjfatYA.js} +35 -36
- package/dist/{Tabs-CYbeTnJk.js → Tabs-CrWcC5nJ.js} +299 -301
- package/dist/Tabs-Dploq_37.cjs +4 -0
- package/dist/TextField-BC7GvvHh.cjs +1 -0
- package/dist/{TextField-Cri5Gxa7.js → TextField-CAmc1Qpg.js} +31 -30
- package/dist/ToggleButtonGroup-BCVgsika.cjs +140 -0
- package/dist/ToggleButtonGroup-ekxVeQCc.js +10461 -0
- package/dist/{Tooltip-BhAHhzKz.js → Tooltip-BvVFPsVR.js} +32 -33
- package/dist/Tooltip-CWA-GKdK.cjs +4 -0
- package/dist/{TransitionGroupContext-DMJLhY9-.js → TransitionGroupContext-DbLioz_6.js} +7 -7
- package/dist/TransitionGroupContext-Zt4NoR0u.cjs +1 -0
- package/dist/{Typography-DBwTr_ix.js → Typography-CE8fQQ8B.js} +15 -16
- package/dist/Typography-DEAE8-8u.cjs +1 -0
- package/dist/components/Alert/Alert.es.js +13 -4
- package/dist/components/Button/Button.cjs.js +1 -1
- package/dist/components/Button/Button.d.ts +1 -2
- package/dist/components/Button/Button.es.js +12 -325
- package/dist/components/DatePicker/DatePicker.cjs.js +1 -1
- package/dist/components/DatePicker/DatePicker.es.js +2 -2
- 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 +12 -14
- package/dist/components/Dropzone/Dropzone.cjs.js +1 -1
- package/dist/components/Dropzone/Dropzone.d.ts +2 -0
- package/dist/components/Dropzone/Dropzone.es.js +22 -19
- package/dist/components/EllipsisWithTooltip/EllipsisWithTooltip.cjs.js +1 -1
- package/dist/components/EllipsisWithTooltip/EllipsisWithTooltip.es.js +4 -3
- 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 -0
- package/dist/components/FileList/FileIcon.d.ts +3 -0
- package/dist/components/FileList/FileIcon.es.js +56 -0
- package/dist/components/FileList/FileInfosSeparator.cjs.js +1 -0
- package/dist/components/FileList/FileInfosSeparator.d.ts +1 -0
- package/dist/components/FileList/FileInfosSeparator.es.js +14 -0
- package/dist/components/FileList/FileList.cjs.js +1 -1
- package/dist/components/FileList/FileList.d.ts +5 -3
- package/dist/components/FileList/FileList.es.js +22 -15
- package/dist/components/FileList/FileListItem.cjs.js +1 -1
- package/dist/components/FileList/FileListItem.d.ts +9 -5
- package/dist/components/FileList/FileListItem.es.js +117 -24
- package/dist/components/FileList/utils.cjs.js +1 -0
- package/dist/components/FileList/utils.d.ts +2 -0
- package/dist/components/FileList/utils.es.js +13 -0
- 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 +79 -54
- package/dist/components/Loader/Loader.cjs.js +1 -1
- package/dist/components/Loader/Loader.d.ts +1 -2
- package/dist/components/Loader/Loader.es.js +1 -1
- package/dist/components/LoaderBackdrop/LoaderBackdrop.cjs.js +1 -1
- package/dist/components/LoaderBackdrop/LoaderBackdrop.d.ts +1 -2
- 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 +12 -10
- package/dist/components/QueryError/QueryError.cjs.js +1 -1
- package/dist/components/QueryError/QueryError.d.ts +2 -2
- package/dist/components/QueryError/QueryError.es.js +14 -14
- package/dist/components/ResourceCard/ResourceCard.cjs.js +1 -0
- package/dist/components/ResourceCard/ResourceCard.d.ts +24 -0
- package/dist/components/ResourceCard/ResourceCard.es.js +128 -0
- package/dist/components/ResourceCard/index.cjs.js +1 -0
- package/dist/components/ResourceCard/index.d.ts +2 -0
- package/dist/components/ResourceCard/index.es.js +4 -0
- package/dist/components/ResourceCard/style.cjs.js +1 -0
- package/dist/components/ResourceCard/style.es.js +125 -0
- package/dist/components/SearchInput/SearchInput.cjs.js +1 -1
- package/dist/components/SearchInput/SearchInput.d.ts +1 -2
- 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.d.ts +35 -0
- package/dist/components/index.es.js +348 -294
- 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 +17 -168
- package/dist/components/stories/Checkbox.stories.cjs.js +1 -1
- package/dist/components/stories/Checkbox.stories.es.js +5 -5
- package/dist/components/stories/Chip.stories.cjs.js +1 -0
- package/dist/components/stories/Chip.stories.d.ts +10 -0
- package/dist/components/stories/Chip.stories.es.js +77 -0
- 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 +5 -5
- package/dist/components/stories/FileList.stories.cjs.js +8 -1
- package/dist/components/stories/FileList.stories.es.js +144 -20
- package/dist/components/stories/FormControlLabel.stories.cjs.js +1 -1
- package/dist/components/stories/FormControlLabel.stories.es.js +16 -340
- 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 +16 -16
- 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 +19 -115
- package/dist/components/stories/ResourceCard.stories.cjs.js +1 -0
- package/dist/components/stories/ResourceCard.stories.d.ts +9 -0
- package/dist/components/stories/ResourceCard.stories.es.js +141 -0
- 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 +14 -14
- package/dist/components/stories/TextField.stories.cjs.js +1 -1
- package/dist/components/stories/TextField.stories.es.js +3 -3
- 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-C8nGcfF4.js → createSvgIcon-CCejzj0C.js} +49 -48
- package/dist/createSvgIcon-Dn4BBPej.cjs +1 -0
- package/dist/{dividerClasses-nh2-hkQB.js → dividerClasses-DN9F43tq.js} +3 -3
- package/dist/dividerClasses-Zk1QmrZw.cjs +1 -0
- package/dist/{elementTypeAcceptingRef-D-5kcohU.js → elementTypeAcceptingRef-CrAqn_fc.js} +1 -1
- package/dist/elementTypeAcceptingRef-DVF2QSYK.cjs +1 -0
- package/dist/extendSxProp-BB6jYY1x.cjs +1 -0
- package/dist/{extendSxProp-C2ff0oGc.js → extendSxProp-DFv-GFt5.js} +3 -3
- package/dist/{fr-Bjufn3RW.js → fr-B3qrCNcK.js} +18 -18
- package/dist/hooks/lazySvgImport.d.ts +1 -1
- package/dist/identifier-5n4d7br9.cjs +75 -0
- package/dist/identifier-D58rA1gM.js +3267 -0
- package/dist/index-5BAFzrXD.cjs +1 -0
- package/dist/{index-CwvpOCso.js → index-BGS2uu2L.js} +29 -29
- package/dist/index-CFm-oAsb.cjs +1 -0
- package/dist/index-CJW5gB6d.cjs +5 -0
- package/dist/{index-BCnPLuqJ.js → index-ClXCinr6.js} +22 -22
- package/dist/index-DwHI-aa0.js +45 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +348 -294
- package/dist/{memoTheme-Bdg0Y_2O.cjs → memoTheme-C8EfvlY1.cjs} +1 -1
- package/dist/{memoTheme-D7Fyh_3C.js → memoTheme-DyiN-Awd.js} +1 -1
- package/dist/{refType-DKYKROQk.js → refType-B86yTZra.js} +1 -1
- package/dist/refType-CjW6JOBA.cjs +1 -0
- package/dist/{mergeSlotProps-tUJEcwVu.js → resolveComponentProps-0QnU-fDT.js} +7 -7
- package/dist/resolveComponentProps-D0sgyopa.cjs +1 -0
- package/dist/unsupportedProp-Bn6XWqwH.cjs +1 -0
- package/dist/unsupportedProp-BuVD30Gh.js +9 -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-_xyy-wul.js → useTheme-DxxkErdZ.js} +1 -1
- package/dist/{useThemeProps-BySkSe-M.js → useThemeProps-BGZrRNnL.js} +2 -2
- package/dist/useThemeProps-C6qniHmV.js +17 -0
- package/dist/{useThemeProps-u_ESzK2f.cjs → useThemeProps-CpNQz1Ap.cjs} +1 -1
- package/dist/useThemeProps-Dq3GRYN1.cjs +1 -0
- package/dist/utils-D4if93Yl.cjs +1 -0
- package/dist/{utils-C6c4fj7D.js → utils-SrEVp7Pm.js} +41 -41
- package/package.json +9 -9
- package/dist/Backdrop-CvufxHMY.cjs +0 -1
- package/dist/Box-mP2Th61z.cjs +0 -1
- package/dist/Button-BH9MUvmz.cjs +0 -1
- package/dist/Button-BnNYfQ3E.js +0 -484
- package/dist/ButtonBase-BXtyQVDC.cjs +0 -74
- package/dist/Card-AJG0TUOx.js +0 -74
- package/dist/Card-NqCXQteq.cjs +0 -1
- package/dist/Checkbox-DYrDbdy1.cjs +0 -1
- package/dist/CircularProgress-BByrCLjv.cjs +0 -28
- package/dist/DatePicker-7-4p3Vtj.cjs +0 -14
- package/dist/DefaultPropsProvider-3KMGupjb.cjs +0 -17
- package/dist/DefaultPropsProvider-CvJPQJmL.js +0 -454
- package/dist/Delete-BkZN7Xu5.js +0 -8
- package/dist/Delete-D1EiKoL5.cjs +0 -1
- package/dist/Dialog-D_lS4J_M.js +0 -415
- package/dist/Dialog-yOrNcHbG.cjs +0 -1
- package/dist/DialogContent-Dj_OjLZ6.cjs +0 -1
- package/dist/DialogTitle-BboPDaoB.cjs +0 -1
- package/dist/Divider-CcrM3lNn.cjs +0 -1
- package/dist/FormControlLabel-Bb6Ul-qQ.cjs +0 -1
- package/dist/FormControlLabel-BmrKQtQA.js +0 -262
- package/dist/FormGroup-CbczEc6e.js +0 -95
- package/dist/FormGroup-Y3P2AG0i.cjs +0 -1
- package/dist/FormLabel-D1uvEhsH.cjs +0 -2
- package/dist/Grow-CUBJs6WD.cjs +0 -1
- package/dist/IconButton-CJfzspZK.cjs +0 -2
- package/dist/InputAdornment-Cq0WhPxF.cjs +0 -1
- package/dist/InputBase-s1fk8TB4.cjs +0 -3
- package/dist/Link-CWczkFp0.cjs +0 -1
- package/dist/Menu-Bsx8PA-q.cjs +0 -7
- package/dist/MenuItem-BZ_EVaBq.cjs +0 -1
- package/dist/Modal-DImrEpYJ.cjs +0 -2
- package/dist/Paper-Cr56xkCr.cjs +0 -2
- package/dist/Popper-YT5WAMV-.cjs +0 -4
- package/dist/Portal-DF0RKOcD.cjs +0 -1
- package/dist/Radio-CVAEGXKi.cjs +0 -1
- package/dist/Radio-DGhot3Cd.js +0 -313
- package/dist/Select-CwAWNiiv.cjs +0 -3
- package/dist/Stack-Yq6rb7iK.cjs +0 -1
- package/dist/SwitchBase-DjIY_KWB.cjs +0 -1
- package/dist/TableSortLabel-BsgRD4k4.js +0 -6328
- package/dist/TableSortLabel-D0N3e3cP.cjs +0 -98
- package/dist/Tabs-KG4VWw-1.cjs +0 -4
- package/dist/TextField-BI9KVqjC.cjs +0 -1
- package/dist/Tooltip-DhDtvULK.cjs +0 -4
- package/dist/TransitionGroupContext-DbXD5xqS.cjs +0 -1
- package/dist/Typography-DfRMDngd.cjs +0 -1
- package/dist/capitalize-B3GG7Wn6.cjs +0 -1
- package/dist/capitalize-CkF8kU4n.js +0 -9
- package/dist/createSvgIcon--rEClVU7.cjs +0 -1
- package/dist/dividerClasses-CCAY3Pnr.cjs +0 -1
- package/dist/elementTypeAcceptingRef-DZsNbuLU.cjs +0 -1
- package/dist/extendSxProp-apyK-EBz.cjs +0 -1
- package/dist/generateUtilityClasses-B_H9HEmg.cjs +0 -59
- package/dist/generateUtilityClasses-Bssl7BA_.js +0 -3145
- package/dist/index-Aa73Kpym.cjs +0 -1
- package/dist/index-ChM1Ett8.cjs +0 -5
- package/dist/index-Cw0GDedk.cjs +0 -17
- package/dist/index-DXD5J5Eu.js +0 -186
- package/dist/mergeSlotProps-DuV-LTW7.cjs +0 -1
- package/dist/refType-CoaxQOPt.cjs +0 -1
- package/dist/useSlot-BTpHG6jf.js +0 -50
- package/dist/useSlot-CByalpSD.cjs +0 -1
- package/dist/useSlotProps-B31YQlzb.js +0 -45
- package/dist/useSlotProps-BVSAQTNl.cjs +0 -1
- package/dist/useTheme-Cy5kyKJF.cjs +0 -1
- package/dist/useTheme-Dukx-__T.cjs +0 -1
- package/dist/useTheme-DyaNKf4e.js +0 -11
- package/dist/useThemeProps-CdV_QwDl.cjs +0 -1
- package/dist/useThemeProps-CwEQ4bv2.js +0 -24
- package/dist/utils-vmyQ2IaS.cjs +0 -1
|
@@ -0,0 +1,329 @@
|
|
|
1
|
+
import * as k from "react";
|
|
2
|
+
import { H as S, I as y, G as $, L as r, n as f, s as C, q as x, P as a } from "./identifier-D58rA1gM.js";
|
|
3
|
+
import { c as z } from "./createSimplePaletteValueFilter-B7--0ryQ.js";
|
|
4
|
+
import { S as O } from "./SwitchBase-BAjfatYA.js";
|
|
5
|
+
import { m as l } from "./memoTheme-DyiN-Awd.js";
|
|
6
|
+
import { jsxs as T, jsx as w } from "react/jsx-runtime";
|
|
7
|
+
import { u as R, s as d, c as B } from "./DefaultPropsProvider-BcmyIf2H.js";
|
|
8
|
+
import { r as j } from "./refType-B86yTZra.js";
|
|
9
|
+
function M(t) {
|
|
10
|
+
return y("MuiSwitch", t);
|
|
11
|
+
}
|
|
12
|
+
const o = S("MuiSwitch", ["root", "edgeStart", "edgeEnd", "switchBase", "colorPrimary", "colorSecondary", "sizeSmall", "sizeMedium", "checked", "disabled", "input", "thumb", "track"]), N = (t) => {
|
|
13
|
+
const {
|
|
14
|
+
classes: e,
|
|
15
|
+
edge: s,
|
|
16
|
+
size: c,
|
|
17
|
+
color: p,
|
|
18
|
+
checked: u,
|
|
19
|
+
disabled: g
|
|
20
|
+
} = t, h = {
|
|
21
|
+
root: ["root", s && `edge${r(s)}`, `size${r(c)}`],
|
|
22
|
+
switchBase: ["switchBase", `color${r(p)}`, u && "checked", g && "disabled"],
|
|
23
|
+
thumb: ["thumb"],
|
|
24
|
+
track: ["track"],
|
|
25
|
+
input: ["input"]
|
|
26
|
+
}, b = B(h, M, e);
|
|
27
|
+
return {
|
|
28
|
+
...e,
|
|
29
|
+
// forward the disabled and checked classes to the SwitchBase
|
|
30
|
+
...b
|
|
31
|
+
};
|
|
32
|
+
}, I = d("span", {
|
|
33
|
+
name: "MuiSwitch",
|
|
34
|
+
slot: "Root",
|
|
35
|
+
overridesResolver: (t, e) => {
|
|
36
|
+
const {
|
|
37
|
+
ownerState: s
|
|
38
|
+
} = t;
|
|
39
|
+
return [e.root, s.edge && e[`edge${r(s.edge)}`], e[`size${r(s.size)}`]];
|
|
40
|
+
}
|
|
41
|
+
})({
|
|
42
|
+
display: "inline-flex",
|
|
43
|
+
width: 34 + 12 * 2,
|
|
44
|
+
height: 14 + 12 * 2,
|
|
45
|
+
overflow: "hidden",
|
|
46
|
+
padding: 12,
|
|
47
|
+
boxSizing: "border-box",
|
|
48
|
+
position: "relative",
|
|
49
|
+
flexShrink: 0,
|
|
50
|
+
zIndex: 0,
|
|
51
|
+
// Reset the stacking context.
|
|
52
|
+
verticalAlign: "middle",
|
|
53
|
+
// For correct alignment with the text.
|
|
54
|
+
"@media print": {
|
|
55
|
+
colorAdjust: "exact"
|
|
56
|
+
},
|
|
57
|
+
variants: [{
|
|
58
|
+
props: {
|
|
59
|
+
edge: "start"
|
|
60
|
+
},
|
|
61
|
+
style: {
|
|
62
|
+
marginLeft: -8
|
|
63
|
+
}
|
|
64
|
+
}, {
|
|
65
|
+
props: {
|
|
66
|
+
edge: "end"
|
|
67
|
+
},
|
|
68
|
+
style: {
|
|
69
|
+
marginRight: -8
|
|
70
|
+
}
|
|
71
|
+
}, {
|
|
72
|
+
props: {
|
|
73
|
+
size: "small"
|
|
74
|
+
},
|
|
75
|
+
style: {
|
|
76
|
+
width: 40,
|
|
77
|
+
height: 24,
|
|
78
|
+
padding: 7,
|
|
79
|
+
[`& .${o.thumb}`]: {
|
|
80
|
+
width: 16,
|
|
81
|
+
height: 16
|
|
82
|
+
},
|
|
83
|
+
[`& .${o.switchBase}`]: {
|
|
84
|
+
padding: 4,
|
|
85
|
+
[`&.${o.checked}`]: {
|
|
86
|
+
transform: "translateX(16px)"
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}]
|
|
91
|
+
}), P = d(O, {
|
|
92
|
+
name: "MuiSwitch",
|
|
93
|
+
slot: "SwitchBase",
|
|
94
|
+
overridesResolver: (t, e) => {
|
|
95
|
+
const {
|
|
96
|
+
ownerState: s
|
|
97
|
+
} = t;
|
|
98
|
+
return [e.switchBase, {
|
|
99
|
+
[`& .${o.input}`]: e.input
|
|
100
|
+
}, s.color !== "default" && e[`color${r(s.color)}`]];
|
|
101
|
+
}
|
|
102
|
+
})(l(({
|
|
103
|
+
theme: t
|
|
104
|
+
}) => ({
|
|
105
|
+
position: "absolute",
|
|
106
|
+
top: 0,
|
|
107
|
+
left: 0,
|
|
108
|
+
zIndex: 1,
|
|
109
|
+
// Render above the focus ripple.
|
|
110
|
+
color: t.vars ? t.vars.palette.Switch.defaultColor : `${t.palette.mode === "light" ? t.palette.common.white : t.palette.grey[300]}`,
|
|
111
|
+
transition: t.transitions.create(["left", "transform"], {
|
|
112
|
+
duration: t.transitions.duration.shortest
|
|
113
|
+
}),
|
|
114
|
+
[`&.${o.checked}`]: {
|
|
115
|
+
transform: "translateX(20px)"
|
|
116
|
+
},
|
|
117
|
+
[`&.${o.disabled}`]: {
|
|
118
|
+
color: t.vars ? t.vars.palette.Switch.defaultDisabledColor : `${t.palette.mode === "light" ? t.palette.grey[100] : t.palette.grey[600]}`
|
|
119
|
+
},
|
|
120
|
+
[`&.${o.checked} + .${o.track}`]: {
|
|
121
|
+
opacity: 0.5
|
|
122
|
+
},
|
|
123
|
+
[`&.${o.disabled} + .${o.track}`]: {
|
|
124
|
+
opacity: t.vars ? t.vars.opacity.switchTrackDisabled : `${t.palette.mode === "light" ? 0.12 : 0.2}`
|
|
125
|
+
},
|
|
126
|
+
[`& .${o.input}`]: {
|
|
127
|
+
left: "-100%",
|
|
128
|
+
width: "300%"
|
|
129
|
+
}
|
|
130
|
+
})), l(({
|
|
131
|
+
theme: t
|
|
132
|
+
}) => ({
|
|
133
|
+
"&:hover": {
|
|
134
|
+
backgroundColor: t.vars ? `rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})` : f(t.palette.action.active, t.palette.action.hoverOpacity),
|
|
135
|
+
// Reset on touch devices, it doesn't add specificity
|
|
136
|
+
"@media (hover: none)": {
|
|
137
|
+
backgroundColor: "transparent"
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
variants: [...Object.entries(t.palette).filter(z(["light"])).map(([e]) => ({
|
|
141
|
+
props: {
|
|
142
|
+
color: e
|
|
143
|
+
},
|
|
144
|
+
style: {
|
|
145
|
+
[`&.${o.checked}`]: {
|
|
146
|
+
color: (t.vars || t).palette[e].main,
|
|
147
|
+
"&:hover": {
|
|
148
|
+
backgroundColor: t.vars ? `rgba(${t.vars.palette[e].mainChannel} / ${t.vars.palette.action.hoverOpacity})` : f(t.palette[e].main, t.palette.action.hoverOpacity),
|
|
149
|
+
"@media (hover: none)": {
|
|
150
|
+
backgroundColor: "transparent"
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
[`&.${o.disabled}`]: {
|
|
154
|
+
color: t.vars ? t.vars.palette.Switch[`${e}DisabledColor`] : `${t.palette.mode === "light" ? C(t.palette[e].main, 0.62) : x(t.palette[e].main, 0.55)}`
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
[`&.${o.checked} + .${o.track}`]: {
|
|
158
|
+
backgroundColor: (t.vars || t).palette[e].main
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}))]
|
|
162
|
+
}))), D = d("span", {
|
|
163
|
+
name: "MuiSwitch",
|
|
164
|
+
slot: "Track",
|
|
165
|
+
overridesResolver: (t, e) => e.track
|
|
166
|
+
})(l(({
|
|
167
|
+
theme: t
|
|
168
|
+
}) => ({
|
|
169
|
+
height: "100%",
|
|
170
|
+
width: "100%",
|
|
171
|
+
borderRadius: 14 / 2,
|
|
172
|
+
zIndex: -1,
|
|
173
|
+
transition: t.transitions.create(["opacity", "background-color"], {
|
|
174
|
+
duration: t.transitions.duration.shortest
|
|
175
|
+
}),
|
|
176
|
+
backgroundColor: t.vars ? t.vars.palette.common.onBackground : `${t.palette.mode === "light" ? t.palette.common.black : t.palette.common.white}`,
|
|
177
|
+
opacity: t.vars ? t.vars.opacity.switchTrack : `${t.palette.mode === "light" ? 0.38 : 0.3}`
|
|
178
|
+
}))), U = d("span", {
|
|
179
|
+
name: "MuiSwitch",
|
|
180
|
+
slot: "Thumb",
|
|
181
|
+
overridesResolver: (t, e) => e.thumb
|
|
182
|
+
})(l(({
|
|
183
|
+
theme: t
|
|
184
|
+
}) => ({
|
|
185
|
+
boxShadow: (t.vars || t).shadows[1],
|
|
186
|
+
backgroundColor: "currentColor",
|
|
187
|
+
width: 20,
|
|
188
|
+
height: 20,
|
|
189
|
+
borderRadius: "50%"
|
|
190
|
+
}))), E = /* @__PURE__ */ k.forwardRef(function(e, s) {
|
|
191
|
+
const c = R({
|
|
192
|
+
props: e,
|
|
193
|
+
name: "MuiSwitch"
|
|
194
|
+
}), {
|
|
195
|
+
className: p,
|
|
196
|
+
color: u = "primary",
|
|
197
|
+
edge: g = !1,
|
|
198
|
+
size: h = "medium",
|
|
199
|
+
sx: b,
|
|
200
|
+
...m
|
|
201
|
+
} = c, i = {
|
|
202
|
+
...c,
|
|
203
|
+
color: u,
|
|
204
|
+
edge: g,
|
|
205
|
+
size: h
|
|
206
|
+
}, n = N(i), v = /* @__PURE__ */ w(U, {
|
|
207
|
+
className: n.thumb,
|
|
208
|
+
ownerState: i
|
|
209
|
+
});
|
|
210
|
+
return /* @__PURE__ */ T(I, {
|
|
211
|
+
className: $(n.root, p),
|
|
212
|
+
sx: b,
|
|
213
|
+
ownerState: i,
|
|
214
|
+
children: [/* @__PURE__ */ w(P, {
|
|
215
|
+
type: "checkbox",
|
|
216
|
+
icon: v,
|
|
217
|
+
checkedIcon: v,
|
|
218
|
+
ref: s,
|
|
219
|
+
ownerState: i,
|
|
220
|
+
...m,
|
|
221
|
+
classes: {
|
|
222
|
+
...n,
|
|
223
|
+
root: n.switchBase
|
|
224
|
+
}
|
|
225
|
+
}), /* @__PURE__ */ w(D, {
|
|
226
|
+
className: n.track,
|
|
227
|
+
ownerState: i
|
|
228
|
+
})]
|
|
229
|
+
});
|
|
230
|
+
});
|
|
231
|
+
process.env.NODE_ENV !== "production" && (E.propTypes = {
|
|
232
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
233
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
234
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
235
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
236
|
+
/**
|
|
237
|
+
* If `true`, the component is checked.
|
|
238
|
+
*/
|
|
239
|
+
checked: a.bool,
|
|
240
|
+
/**
|
|
241
|
+
* The icon to display when the component is checked.
|
|
242
|
+
*/
|
|
243
|
+
checkedIcon: a.node,
|
|
244
|
+
/**
|
|
245
|
+
* Override or extend the styles applied to the component.
|
|
246
|
+
*/
|
|
247
|
+
classes: a.object,
|
|
248
|
+
/**
|
|
249
|
+
* @ignore
|
|
250
|
+
*/
|
|
251
|
+
className: a.string,
|
|
252
|
+
/**
|
|
253
|
+
* The color of the component.
|
|
254
|
+
* It supports both default and custom theme colors, which can be added as shown in the
|
|
255
|
+
* [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
|
|
256
|
+
* @default 'primary'
|
|
257
|
+
*/
|
|
258
|
+
color: a.oneOfType([a.oneOf(["default", "primary", "secondary", "error", "info", "success", "warning"]), a.string]),
|
|
259
|
+
/**
|
|
260
|
+
* The default checked state. Use when the component is not controlled.
|
|
261
|
+
*/
|
|
262
|
+
defaultChecked: a.bool,
|
|
263
|
+
/**
|
|
264
|
+
* If `true`, the component is disabled.
|
|
265
|
+
*/
|
|
266
|
+
disabled: a.bool,
|
|
267
|
+
/**
|
|
268
|
+
* If `true`, the ripple effect is disabled.
|
|
269
|
+
* @default false
|
|
270
|
+
*/
|
|
271
|
+
disableRipple: a.bool,
|
|
272
|
+
/**
|
|
273
|
+
* If given, uses a negative margin to counteract the padding on one
|
|
274
|
+
* side (this is often helpful for aligning the left or right
|
|
275
|
+
* side of the icon with content above or below, without ruining the border
|
|
276
|
+
* size and shape).
|
|
277
|
+
* @default false
|
|
278
|
+
*/
|
|
279
|
+
edge: a.oneOf(["end", "start", !1]),
|
|
280
|
+
/**
|
|
281
|
+
* The icon to display when the component is unchecked.
|
|
282
|
+
*/
|
|
283
|
+
icon: a.node,
|
|
284
|
+
/**
|
|
285
|
+
* The id of the `input` element.
|
|
286
|
+
*/
|
|
287
|
+
id: a.string,
|
|
288
|
+
/**
|
|
289
|
+
* [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.
|
|
290
|
+
*/
|
|
291
|
+
inputProps: a.object,
|
|
292
|
+
/**
|
|
293
|
+
* Pass a ref to the `input` element.
|
|
294
|
+
*/
|
|
295
|
+
inputRef: j,
|
|
296
|
+
/**
|
|
297
|
+
* Callback fired when the state is changed.
|
|
298
|
+
*
|
|
299
|
+
* @param {React.ChangeEvent<HTMLInputElement>} event The event source of the callback.
|
|
300
|
+
* You can pull out the new value by accessing `event.target.value` (string).
|
|
301
|
+
* You can pull out the new checked state by accessing `event.target.checked` (boolean).
|
|
302
|
+
*/
|
|
303
|
+
onChange: a.func,
|
|
304
|
+
/**
|
|
305
|
+
* If `true`, the `input` element is required.
|
|
306
|
+
* @default false
|
|
307
|
+
*/
|
|
308
|
+
required: a.bool,
|
|
309
|
+
/**
|
|
310
|
+
* The size of the component.
|
|
311
|
+
* `small` is equivalent to the dense switch styling.
|
|
312
|
+
* @default 'medium'
|
|
313
|
+
*/
|
|
314
|
+
size: a.oneOfType([a.oneOf(["medium", "small"]), a.string]),
|
|
315
|
+
/**
|
|
316
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
317
|
+
*/
|
|
318
|
+
sx: a.oneOfType([a.arrayOf(a.oneOfType([a.func, a.object, a.bool])), a.func, a.object]),
|
|
319
|
+
/**
|
|
320
|
+
* The value of the component. The DOM API casts this to a string.
|
|
321
|
+
* The browser uses "on" as the default value.
|
|
322
|
+
*/
|
|
323
|
+
value: a.any
|
|
324
|
+
});
|
|
325
|
+
export {
|
|
326
|
+
E as S,
|
|
327
|
+
M as g,
|
|
328
|
+
o as s
|
|
329
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const T=require("react"),t=require("./identifier-5n4d7br9.cjs"),m=require("./createSimplePaletteValueFilter-PTK3TAhW.cjs"),S=require("./SwitchBase-7zONZyYP.cjs"),p=require("./memoTheme-C8EfvlY1.cjs"),l=require("react/jsx-runtime"),i=require("./DefaultPropsProvider-QmkL7lbM.cjs"),k=require("./refType-CjW6JOBA.cjs");function P(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const s=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(o,a,s.get?s:{enumerable:!0,get:()=>e[a]})}}return o.default=e,Object.freeze(o)}const $=P(T);function w(e){return t.generateUtilityClass("MuiSwitch",e)}const r=t.generateUtilityClasses("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),C=e=>{const{classes:o,edge:a,size:s,color:d,checked:u,disabled:y}=e,h={root:["root",a&&`edge${t.capitalize(a)}`,`size${t.capitalize(s)}`],switchBase:["switchBase",`color${t.capitalize(d)}`,u&&"checked",y&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},g=i.composeClasses(h,w,o);return{...o,...g}},x=i.styled("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:a}=e;return[o.root,a.edge&&o[`edge${t.capitalize(a.edge)}`],o[`size${t.capitalize(a.size)}`]]}})({display:"inline-flex",width:34+12*2,height:14+12*2,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"},variants:[{props:{edge:"start"},style:{marginLeft:-8}},{props:{edge:"end"},style:{marginRight:-8}},{props:{size:"small"},style:{width:40,height:24,padding:7,[`& .${r.thumb}`]:{width:16,height:16},[`& .${r.switchBase}`]:{padding:4,[`&.${r.checked}`]:{transform:"translateX(16px)"}}}}]}),z=i.styled(S.SwitchBase,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,o)=>{const{ownerState:a}=e;return[o.switchBase,{[`& .${r.input}`]:o.input},a.color!=="default"&&o[`color${t.capitalize(a.color)}`]]}})(p.memoTheme(({theme:e})=>({position:"absolute",top:0,left:0,zIndex:1,color:e.vars?e.vars.palette.Switch.defaultColor:`${e.palette.mode==="light"?e.palette.common.white:e.palette.grey[300]}`,transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),[`&.${r.checked}`]:{transform:"translateX(20px)"},[`&.${r.disabled}`]:{color:e.vars?e.vars.palette.Switch.defaultDisabledColor:`${e.palette.mode==="light"?e.palette.grey[100]:e.palette.grey[600]}`},[`&.${r.checked} + .${r.track}`]:{opacity:.5},[`&.${r.disabled} + .${r.track}`]:{opacity:e.vars?e.vars.opacity.switchTrackDisabled:`${e.palette.mode==="light"?.12:.2}`},[`& .${r.input}`]:{left:"-100%",width:"300%"}})),p.memoTheme(({theme:e})=>({"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:t.alpha(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(e.palette).filter(m.createSimplePaletteValueFilter(["light"])).map(([o])=>({props:{color:o},style:{[`&.${r.checked}`]:{color:(e.vars||e).palette[o].main,"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[o].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:t.alpha(e.palette[o].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${r.disabled}`]:{color:e.vars?e.vars.palette.Switch[`${o}DisabledColor`]:`${e.palette.mode==="light"?t.lighten(e.palette[o].main,.62):t.darken(e.palette[o].main,.55)}`}},[`&.${r.checked} + .${r.track}`]:{backgroundColor:(e.vars||e).palette[o].main}}}))]}))),O=i.styled("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(e,o)=>o.track})(p.memoTheme(({theme:e})=>({height:"100%",width:"100%",borderRadius:14/2,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:e.vars?e.vars.palette.common.onBackground:`${e.palette.mode==="light"?e.palette.common.black:e.palette.common.white}`,opacity:e.vars?e.vars.opacity.switchTrack:`${e.palette.mode==="light"?.38:.3}`}))),j=i.styled("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(e,o)=>o.thumb})(p.memoTheme(({theme:e})=>({boxShadow:(e.vars||e).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"}))),f=$.forwardRef(function(o,a){const s=i.useDefaultProps({props:o,name:"MuiSwitch"}),{className:d,color:u="primary",edge:y=!1,size:h="medium",sx:g,...v}=s,c={...s,color:u,edge:y,size:h},n=C(c),b=l.jsx(j,{className:n.thumb,ownerState:c});return l.jsxs(x,{className:t.clsx(n.root,d),sx:g,ownerState:c,children:[l.jsx(z,{type:"checkbox",icon:b,checkedIcon:b,ref:a,ownerState:c,...v,classes:{...n,root:n.switchBase}}),l.jsx(O,{className:n.track,ownerState:c})]})});process.env.NODE_ENV!=="production"&&(f.propTypes={checked:t.PropTypes.bool,checkedIcon:t.PropTypes.node,classes:t.PropTypes.object,className:t.PropTypes.string,color:t.PropTypes.oneOfType([t.PropTypes.oneOf(["default","primary","secondary","error","info","success","warning"]),t.PropTypes.string]),defaultChecked:t.PropTypes.bool,disabled:t.PropTypes.bool,disableRipple:t.PropTypes.bool,edge:t.PropTypes.oneOf(["end","start",!1]),icon:t.PropTypes.node,id:t.PropTypes.string,inputProps:t.PropTypes.object,inputRef:k.refType,onChange:t.PropTypes.func,required:t.PropTypes.bool,size:t.PropTypes.oneOfType([t.PropTypes.oneOf(["medium","small"]),t.PropTypes.string]),sx:t.PropTypes.oneOfType([t.PropTypes.arrayOf(t.PropTypes.oneOfType([t.PropTypes.func,t.PropTypes.object,t.PropTypes.bool])),t.PropTypes.func,t.PropTypes.object]),value:t.PropTypes.any});exports.Switch=f;exports.getSwitchUtilityClass=w;exports.switchClasses=r;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const M=require("react"),e=require("./identifier-5n4d7br9.cjs"),l=require("./DefaultPropsProvider-QmkL7lbM.cjs"),V=require("./useFormControl-haP0iPhl.cjs"),B=require("react/jsx-runtime"),$=require("./useControlled-Ysk4KqoX.cjs"),A=require("./ButtonBase-C2rhY3j-.cjs"),G=require("./refType-CjW6JOBA.cjs");function H(o){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const r in o)if(r!=="default"){const i=Object.getOwnPropertyDescriptor(o,r);Object.defineProperty(s,r,i.get?i:{enumerable:!0,get:()=>o[r]})}}return s.default=o,Object.freeze(s)}const J=H(M);function K(o){return e.generateUtilityClass("PrivateSwitchBase",o)}e.generateUtilityClasses("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const Q=o=>{const{classes:s,checked:r,disabled:i,edge:a}=o,p={root:["root",r&&"checked",i&&"disabled",a&&`edge${e.capitalize(a)}`],input:["input"]};return l.composeClasses(p,K,s)},W=l.styled(A.ButtonBase)({padding:9,borderRadius:"50%",variants:[{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:({edge:o,ownerState:s})=>o==="start"&&s.size!=="small",style:{marginLeft:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}},{props:({edge:o,ownerState:s})=>o==="end"&&s.size!=="small",style:{marginRight:-12}}]}),X=l.styled("input",{shouldForwardProp:l.rootShouldForwardProp})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),C=J.forwardRef(function(s,r){const{autoFocus:i,checked:a,checkedIcon:p,className:w,defaultChecked:f,disabled:F,disableFocusRipple:y=!1,edge:R=!1,icon:S,id:q,inputProps:x,inputRef:O,name:j,onBlur:h,onChange:b,onFocus:P,readOnly:I,required:v=!1,tabIndex:z,type:d,value:g,...N}=s,[m,D]=$.useControlled({controlled:a,default:!!f,name:"SwitchBase",state:"checked"}),n=V.useFormControl(),E=t=>{P&&P(t),n&&n.onFocus&&n.onFocus(t)},U=t=>{h&&h(t),n&&n.onBlur&&n.onBlur(t)},_=t=>{if(t.nativeEvent.defaultPrevented)return;const k=t.target.checked;D(k),b&&b(t,k)};let c=F;n&&typeof c>"u"&&(c=n.disabled);const L=d==="checkbox"||d==="radio",u={...s,checked:m,disabled:c,disableFocusRipple:y,edge:R},T=Q(u);return B.jsxs(W,{component:"span",className:e.clsx(T.root,w),centerRipple:!0,focusRipple:!y,disabled:c,tabIndex:null,role:void 0,onFocus:E,onBlur:U,ownerState:u,ref:r,...N,children:[B.jsx(X,{autoFocus:i,checked:a,defaultChecked:f,className:T.input,disabled:c,id:L?q:void 0,name:j,onChange:_,readOnly:I,ref:O,required:v,ownerState:u,tabIndex:z,type:d,...d==="checkbox"&&g===void 0?{}:{value:g},...x}),m?p:S]})});process.env.NODE_ENV!=="production"&&(C.propTypes={autoFocus:e.PropTypes.bool,checked:e.PropTypes.bool,checkedIcon:e.PropTypes.node.isRequired,classes:e.PropTypes.object,className:e.PropTypes.string,defaultChecked:e.PropTypes.bool,disabled:e.PropTypes.bool,disableFocusRipple:e.PropTypes.bool,edge:e.PropTypes.oneOf(["end","start",!1]),icon:e.PropTypes.node.isRequired,id:e.PropTypes.string,inputProps:e.PropTypes.object,inputRef:G.refType,name:e.PropTypes.string,onBlur:e.PropTypes.func,onChange:e.PropTypes.func,onFocus:e.PropTypes.func,readOnly:e.PropTypes.bool,required:e.PropTypes.bool,sx:e.PropTypes.object,tabIndex:e.PropTypes.oneOfType([e.PropTypes.number,e.PropTypes.string]),type:e.PropTypes.string.isRequired,value:e.PropTypes.any});exports.SwitchBase=C;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import * as D from "react";
|
|
2
|
-
import {
|
|
3
|
-
import { s as C,
|
|
4
|
-
import { u as
|
|
5
|
-
import { jsxs as
|
|
6
|
-
import { B as M } from "./ButtonBase-DAWDecOk.js";
|
|
2
|
+
import { I as G, H, G as V, L as _, P as e } from "./identifier-D58rA1gM.js";
|
|
3
|
+
import { s as C, c as $, r as A } from "./DefaultPropsProvider-BcmyIf2H.js";
|
|
4
|
+
import { u as J } from "./useFormControl-CatNKXAi.js";
|
|
5
|
+
import { jsxs as K, jsx as M } from "react/jsx-runtime";
|
|
7
6
|
import { u as Q } from "./useControlled-BYdyS7Pn.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
7
|
+
import { B as W } from "./ButtonBase-DzpmdR6N.js";
|
|
8
|
+
import { r as X } from "./refType-B86yTZra.js";
|
|
10
9
|
function Y(s) {
|
|
11
10
|
return G("PrivateSwitchBase", s);
|
|
12
11
|
}
|
|
@@ -16,13 +15,13 @@ const Z = (s) => {
|
|
|
16
15
|
classes: t,
|
|
17
16
|
checked: d,
|
|
18
17
|
disabled: c,
|
|
19
|
-
edge:
|
|
18
|
+
edge: n
|
|
20
19
|
} = s, l = {
|
|
21
|
-
root: ["root", d && "checked", c && "disabled",
|
|
20
|
+
root: ["root", d && "checked", c && "disabled", n && `edge${_(n)}`],
|
|
22
21
|
input: ["input"]
|
|
23
22
|
};
|
|
24
23
|
return $(l, Y, t);
|
|
25
|
-
}, ee = C(
|
|
24
|
+
}, ee = C(W)({
|
|
26
25
|
padding: 9,
|
|
27
26
|
borderRadius: "50%",
|
|
28
27
|
variants: [{
|
|
@@ -59,7 +58,7 @@ const Z = (s) => {
|
|
|
59
58
|
}
|
|
60
59
|
}]
|
|
61
60
|
}), oe = C("input", {
|
|
62
|
-
shouldForwardProp:
|
|
61
|
+
shouldForwardProp: A
|
|
63
62
|
})({
|
|
64
63
|
cursor: "inherit",
|
|
65
64
|
position: "absolute",
|
|
@@ -74,7 +73,7 @@ const Z = (s) => {
|
|
|
74
73
|
}), se = /* @__PURE__ */ D.forwardRef(function(t, d) {
|
|
75
74
|
const {
|
|
76
75
|
autoFocus: c,
|
|
77
|
-
checked:
|
|
76
|
+
checked: n,
|
|
78
77
|
checkedIcon: l,
|
|
79
78
|
className: w,
|
|
80
79
|
defaultChecked: p,
|
|
@@ -89,37 +88,37 @@ const Z = (s) => {
|
|
|
89
88
|
onBlur: h,
|
|
90
89
|
onChange: m,
|
|
91
90
|
onFocus: b,
|
|
92
|
-
readOnly:
|
|
93
|
-
required:
|
|
94
|
-
tabIndex:
|
|
91
|
+
readOnly: v,
|
|
92
|
+
required: z = !1,
|
|
93
|
+
tabIndex: N,
|
|
95
94
|
type: i,
|
|
96
95
|
value: g,
|
|
97
|
-
...
|
|
98
|
-
} = t, [y,
|
|
99
|
-
controlled:
|
|
96
|
+
...O
|
|
97
|
+
} = t, [y, j] = Q({
|
|
98
|
+
controlled: n,
|
|
100
99
|
default: !!p,
|
|
101
100
|
name: "SwitchBase",
|
|
102
101
|
state: "checked"
|
|
103
|
-
}),
|
|
104
|
-
b && b(o),
|
|
102
|
+
}), a = J(), E = (o) => {
|
|
103
|
+
b && b(o), a && a.onFocus && a.onFocus(o);
|
|
104
|
+
}, L = (o) => {
|
|
105
|
+
h && h(o), a && a.onBlur && a.onBlur(o);
|
|
105
106
|
}, T = (o) => {
|
|
106
|
-
h && h(o), n && n.onBlur && n.onBlur(o);
|
|
107
|
-
}, U = (o) => {
|
|
108
107
|
if (o.nativeEvent.defaultPrevented)
|
|
109
108
|
return;
|
|
110
109
|
const B = o.target.checked;
|
|
111
|
-
|
|
110
|
+
j(B), m && m(o, B);
|
|
112
111
|
};
|
|
113
112
|
let r = F;
|
|
114
|
-
|
|
115
|
-
const
|
|
113
|
+
a && typeof r > "u" && (r = a.disabled);
|
|
114
|
+
const U = i === "checkbox" || i === "radio", u = {
|
|
116
115
|
...t,
|
|
117
116
|
checked: y,
|
|
118
117
|
disabled: r,
|
|
119
118
|
disableFocusRipple: f,
|
|
120
119
|
edge: R
|
|
121
120
|
}, k = Z(u);
|
|
122
|
-
return /* @__PURE__ */
|
|
121
|
+
return /* @__PURE__ */ K(ee, {
|
|
123
122
|
component: "span",
|
|
124
123
|
className: V(k.root, w),
|
|
125
124
|
centerRipple: !0,
|
|
@@ -128,24 +127,24 @@ const Z = (s) => {
|
|
|
128
127
|
tabIndex: null,
|
|
129
128
|
role: void 0,
|
|
130
129
|
onFocus: E,
|
|
131
|
-
onBlur:
|
|
130
|
+
onBlur: L,
|
|
132
131
|
ownerState: u,
|
|
133
132
|
ref: d,
|
|
134
|
-
...
|
|
135
|
-
children: [/* @__PURE__ */
|
|
133
|
+
...O,
|
|
134
|
+
children: [/* @__PURE__ */ M(oe, {
|
|
136
135
|
autoFocus: c,
|
|
137
|
-
checked:
|
|
136
|
+
checked: n,
|
|
138
137
|
defaultChecked: p,
|
|
139
138
|
className: k.input,
|
|
140
139
|
disabled: r,
|
|
141
|
-
id:
|
|
140
|
+
id: U ? x : void 0,
|
|
142
141
|
name: q,
|
|
143
|
-
onChange:
|
|
144
|
-
readOnly:
|
|
142
|
+
onChange: T,
|
|
143
|
+
readOnly: v,
|
|
145
144
|
ref: I,
|
|
146
|
-
required:
|
|
145
|
+
required: z,
|
|
147
146
|
ownerState: u,
|
|
148
|
-
tabIndex:
|
|
147
|
+
tabIndex: N,
|
|
149
148
|
type: i,
|
|
150
149
|
...i === "checkbox" && g === void 0 ? {} : {
|
|
151
150
|
value: g
|
|
@@ -211,7 +210,7 @@ process.env.NODE_ENV !== "production" && (se.propTypes = {
|
|
|
211
210
|
/**
|
|
212
211
|
* Pass a ref to the `input` element.
|
|
213
212
|
*/
|
|
214
|
-
inputRef:
|
|
213
|
+
inputRef: X,
|
|
215
214
|
/*
|
|
216
215
|
* @ignore
|
|
217
216
|
*/
|