@cgi-learning-hub/ui 1.3.2 → 1.3.3-dev.1732123246
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-DorR8O-b.js +359 -0
- package/dist/Backdrop-cE8nccLi.cjs +1 -0
- package/dist/{Box-a6v7fn61.js → Box-BTNw-FYi.js} +8 -8
- package/dist/{Box-D61CmHcZ.cjs → Box-Y_dUbq3W.cjs} +1 -1
- package/dist/{Button-B8Vr_qVd.js → Button--paERYBc.js} +4 -4
- package/dist/{Button-elp97nQ8.cjs → Button-TBA8S65S.cjs} +1 -1
- package/dist/{ButtonBase-Y5TK5SRu.js → ButtonBase-B0gJT_ti.js} +228 -236
- package/dist/ButtonBase-DKxpvXo7.cjs +74 -0
- package/dist/Card-BVJgnURR.js +74 -0
- package/dist/Card-DBGYwd3H.cjs +1 -0
- package/dist/Checkbox-OTMaikud.cjs +1 -0
- package/dist/Checkbox-aBoDjdQG.js +241 -0
- package/dist/{CircularProgress-DU3DJQfF.js → CircularProgress-CIqTwP6H.js} +4 -4
- package/dist/{CircularProgress-DDIZxeFH.cjs → CircularProgress-DjNvPtUm.cjs} +7 -7
- package/dist/DatePicker-DGRD-CdO.cjs +14 -0
- package/dist/DatePicker-DXgVCuAd.js +10814 -0
- package/dist/{DefaultPropsProvider-7QnSWHxy.js → DefaultPropsProvider-StV_SUuk.js} +25 -25
- package/dist/{DefaultPropsProvider-eEVEiLDf.cjs → DefaultPropsProvider-eVMpAUQg.cjs} +1 -1
- package/dist/DialogContent-C0L4r0-p.cjs +1 -0
- package/dist/DialogContent-CP2NOfUr.js +602 -0
- package/dist/DialogTitle-Couh2TzJ.js +134 -0
- package/dist/DialogTitle-DemSKN6H.cjs +1 -0
- package/dist/FormGroup-CcM69JIS.js +348 -0
- package/dist/FormGroup-KOLND6rE.cjs +1 -0
- package/dist/FormLabel-C506NT5o.cjs +2 -0
- package/dist/FormLabel-wDh-AEMQ.js +417 -0
- package/dist/Grow-4QU1bnXQ.js +193 -0
- package/dist/Grow-C_nN9VuE.cjs +1 -0
- package/dist/IconButton-5LMERRPL.cjs +2 -0
- package/dist/{IconButton-C7H_G1LX.js → IconButton-CsqR1453.js} +5 -5
- package/dist/InputAdornment-DgT008NI.cjs +1 -0
- package/dist/{InputAdornment-CPJFY_m_.js → InputAdornment-bXTpzNQ2.js} +5 -5
- package/dist/InputBase-Cpx39cny.cjs +3 -0
- package/dist/{InputBase-5GB2c2J6.js → InputBase-VKt_ajuq.js} +185 -207
- package/dist/Link-6UH3Aljp.cjs +1 -0
- package/dist/Link-CPyeYGpa.js +266 -0
- package/dist/MenuItem-BFkBwBkN.js +277 -0
- package/dist/MenuItem-BxXCEc8h.cjs +1 -0
- package/dist/Modal-BDx2_UzP.js +750 -0
- package/dist/Modal-BLMnkdGb.cjs +2 -0
- package/dist/Paper-CMUbp6SX.js +185 -0
- package/dist/Paper-n4KgM09K.cjs +2 -0
- package/dist/Popper-D_UryU8v.js +1407 -0
- package/dist/Popper-DzQZEFYT.cjs +4 -0
- package/dist/Portal-C4QgaMKl.cjs +1 -0
- package/dist/Portal-DVy9JFBN.js +86 -0
- package/dist/Select-CcnCBhBN.js +3555 -0
- package/dist/Select-CnFa2_je.cjs +9 -0
- package/dist/{Stack-CutIWKkG.js → Stack-CKjrTRJB.js} +12 -12
- package/dist/{Stack-656bqKiW.cjs → Stack-elRjtOGk.cjs} +1 -1
- package/dist/SwitchBase-DWfUIgEW.cjs +1 -0
- package/dist/SwitchBase-DYa1wGSu.js +261 -0
- package/dist/{Tooltip-DqLAZimE.js → TableSortLabel-Czgy_sW5.js} +2998 -5191
- package/dist/TableSortLabel-Ppl9Q-SZ.cjs +98 -0
- package/dist/Tabs-CUpcnsPl.cjs +4 -0
- package/dist/{Tabs-CKic46Op.js → Tabs-RxcUgknI.js} +284 -282
- package/dist/TextField-DorMAtUh.js +547 -0
- package/dist/TextField-DvGLmvG1.cjs +1 -0
- package/dist/Tooltip-B4e9QdHI.js +697 -0
- package/dist/Tooltip-CPAH20AZ.cjs +4 -0
- package/dist/{Typography-DsJC595c.js → Typography-B29dnCv3.js} +4 -4
- package/dist/{Typography-CreZW2v6.cjs → Typography-DyMSnhvs.cjs} +1 -1
- package/dist/assets/styles.css +1 -1
- package/dist/assets/styles2.css +1 -1
- package/dist/chainPropTypes-CEUi6Jb4.cjs +1 -0
- package/dist/chainPropTypes-D9lkm76m.js +8 -0
- package/dist/components/Button/Button.cjs.js +1 -1
- package/dist/components/Button/Button.es.js +6 -6
- 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/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/FileList.cjs.js +1 -1
- package/dist/components/FileList/FileList.es.js +1 -1
- package/dist/components/FileList/FileListItem.cjs.js +1 -1
- package/dist/components/FileList/FileListItem.es.js +6 -6
- package/dist/components/Heading/Heading.cjs.js +1 -1
- package/dist/components/Heading/Heading.es.js +2 -2
- package/dist/components/Loader/Loader.cjs.js +1 -1
- package/dist/components/Loader/Loader.es.js +2 -2
- package/dist/components/LoaderBackdrop/LoaderBackdrop.cjs.js +1 -1
- package/dist/components/LoaderBackdrop/LoaderBackdrop.es.js +3 -3
- package/dist/components/PasswordInput/PasswordInput.cjs.js +1 -1
- package/dist/components/PasswordInput/PasswordInput.es.js +5 -5
- 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 +280 -269
- package/dist/components/stories/Alert.stories.cjs.js +1 -0
- package/dist/components/stories/Alert.stories.d.ts +9 -0
- package/dist/components/stories/Alert.stories.es.js +32 -0
- package/dist/components/stories/Button.stories.cjs.js +1 -0
- package/dist/components/stories/Button.stories.d.ts +8 -0
- package/dist/components/stories/Button.stories.es.js +43 -0
- package/dist/components/stories/Card.stories.cjs.js +1 -0
- package/dist/components/stories/Card.stories.d.ts +7 -0
- package/dist/components/stories/Card.stories.es.js +193 -0
- package/dist/components/stories/Checkbox.stories.cjs.js +1 -0
- package/dist/components/stories/Checkbox.stories.d.ts +10 -0
- package/dist/components/stories/Checkbox.stories.es.js +28 -0
- package/dist/components/stories/DatePicker.stories.cjs.js +1 -0
- package/dist/components/stories/DatePicker.stories.d.ts +6 -0
- package/dist/components/stories/DatePicker.stories.es.js +13 -0
- package/dist/components/stories/Dialog.stories.cjs.js +1 -0
- package/dist/components/stories/Dialog.stories.d.ts +7 -0
- package/dist/components/stories/Dialog.stories.es.js +33 -0
- package/dist/components/stories/Dropzone.stories.cjs.js +1 -0
- package/dist/components/stories/Dropzone.stories.d.ts +6 -0
- package/dist/components/stories/Dropzone.stories.es.js +14 -0
- package/dist/components/stories/EmptyState.stories.cjs.js +1 -0
- package/dist/components/stories/EmptyState.stories.d.ts +6 -0
- package/dist/components/stories/EmptyState.stories.es.js +14 -0
- package/dist/components/stories/FileList.stories.cjs.js +1 -0
- package/dist/components/stories/FileList.stories.d.ts +6 -0
- package/dist/components/stories/FileList.stories.es.js +26 -0
- package/dist/components/stories/Heading.stories.cjs.js +1 -0
- package/dist/components/stories/Heading.stories.d.ts +6 -0
- package/dist/components/stories/Heading.stories.es.js +20 -0
- package/dist/components/stories/IconButton.stories.cjs.js +1 -0
- package/dist/components/stories/IconButton.stories.d.ts +6 -0
- package/dist/components/{IconButton.stories.es.js → stories/IconButton.stories.es.js} +12 -14
- package/dist/components/stories/Link.stories.cjs.js +1 -0
- package/dist/components/stories/Link.stories.d.ts +7 -0
- package/dist/components/stories/Link.stories.es.js +43 -0
- package/dist/components/stories/Loader.stories.cjs.js +1 -0
- package/dist/components/stories/Loader.stories.d.ts +6 -0
- package/dist/components/stories/Loader.stories.es.js +11 -0
- package/dist/components/stories/LoaderBackdrop.stories.cjs.js +1 -0
- package/dist/components/stories/LoaderBackdrop.stories.d.ts +6 -0
- package/dist/components/stories/LoaderBackdrop.stories.es.js +11 -0
- package/dist/components/stories/Paper.stories.cjs.js +1 -0
- package/dist/components/stories/Paper.stories.d.ts +7 -0
- package/dist/components/stories/Paper.stories.es.js +28 -0
- package/dist/components/stories/PasswordInput.stories.cjs.js +1 -0
- package/dist/components/stories/PasswordInput.stories.d.ts +6 -0
- package/dist/components/stories/PasswordInput.stories.es.js +13 -0
- package/dist/components/stories/RadioGroup.stories.cjs.js +1 -0
- package/dist/components/stories/RadioGroup.stories.d.ts +8 -0
- package/dist/components/stories/RadioGroup.stories.es.js +435 -0
- package/dist/components/stories/SearchInput.stories.cjs.js +1 -0
- package/dist/components/stories/SearchInput.stories.d.ts +6 -0
- package/dist/components/stories/SearchInput.stories.es.js +13 -0
- package/dist/components/stories/Select.stories.cjs.js +1 -0
- package/dist/components/stories/Select.stories.d.ts +10 -0
- package/dist/components/stories/Select.stories.es.js +52 -0
- package/dist/components/stories/TabList.stories.cjs.js +1 -0
- package/dist/components/stories/TabList.stories.d.ts +7 -0
- package/dist/components/{TabList.stories.es.js → stories/TabList.stories.es.js} +45 -52
- package/dist/components/stories/TextField.stories.cjs.js +1 -0
- package/dist/components/stories/TextField.stories.d.ts +10 -0
- package/dist/components/stories/TextField.stories.es.js +69 -0
- package/dist/components/stories/Tooltip.stories.cjs.js +1 -0
- package/dist/components/stories/Tooltip.stories.d.ts +7 -0
- package/dist/components/stories/Tooltip.stories.es.js +46 -0
- package/dist/createChainedFunction-C0nujS3O.js +9 -0
- package/dist/createChainedFunction-CJmlQuW8.cjs +1 -0
- package/dist/{createSvgIcon-PXjVOXDY.cjs → createSvgIcon-DQqazotA.cjs} +1 -1
- package/dist/{createSvgIcon-Ae1vF9Lv.js → createSvgIcon-VByplk-r.js} +3 -3
- package/dist/debounce-46wSf_lW.js +15 -0
- package/dist/debounce-DpCj7ugL.cjs +1 -0
- package/dist/elementTypeAcceptingRef-BPhL72td.js +23 -0
- package/dist/elementTypeAcceptingRef-DiSL8-Ea.cjs +1 -0
- package/dist/{extendSxProp-BzTGWWcy.js → extendSxProp-BYB-kybW.js} +1 -1
- package/dist/{extendSxProp-DLhbnNxc.cjs → extendSxProp-BZ8P8fbI.cjs} +1 -1
- package/dist/formControlState-DCkDUdfO.cjs +1 -0
- package/dist/formControlState-DdQP43Uo.js +21 -0
- package/dist/{fr-B0c4Eu-I.js → fr-B4aeA9th.js} +23 -23
- package/dist/{fr-BtINyNRC.cjs → fr-CSCQhSqi.cjs} +1 -1
- package/dist/{identifier-Bu3vgTzE.js → identifier-BewKgEhI.js} +487 -486
- package/dist/{identifier-B_IiMbpZ.cjs → identifier-DTh6b5Gz.cjs} +17 -17
- package/dist/{index-D4YvqRSh.js → index-BAjSgP8k.js} +3 -3
- package/dist/{index-BDy6VH40.cjs → index-B_acx8gh.cjs} +1 -1
- package/dist/{index-DNmEgr4X.js → index-_oi9ph20.js} +4 -4
- package/dist/index-oINGa1MV.cjs +1 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +280 -269
- package/dist/isFocusVisible-CPZqtjv2.js +12 -0
- package/dist/isFocusVisible-DlSijby6.cjs +2 -0
- package/dist/{memoTheme-C4_nd-x4.js → memoTheme-B9kDhX1-.js} +1 -1
- package/dist/{memoTheme-DvW891YJ.cjs → memoTheme-DJBS0nbO.cjs} +1 -1
- package/dist/ownerDocument-4MViGo3k.cjs +1 -0
- package/dist/ownerDocument-CUrv0DIK.js +6 -0
- package/dist/ownerWindow-DDHucZi0.cjs +1 -0
- package/dist/ownerWindow-niciwP7I.js +7 -0
- package/dist/refType-3o3c-kYx.js +7 -0
- package/dist/refType-DNB-r0Bp.cjs +1 -0
- package/dist/{useTheme-B_3HWqyi.js → resolveComponentProps-BQQ-uUKZ.js} +18 -26
- package/dist/resolveComponentProps-R_l8gy3y.cjs +1 -0
- package/dist/useControlled-BYdyS7Pn.js +31 -0
- package/dist/useControlled-Ysk4KqoX.cjs +3 -0
- package/dist/useForkRef-CTI33h-3.cjs +1 -0
- package/dist/useForkRef-C_4o__cU.js +15 -0
- package/dist/useFormControl-CatNKXAi.js +10 -0
- package/dist/useFormControl-haP0iPhl.cjs +1 -0
- package/dist/useSlot-B2hCpx8C.js +50 -0
- package/dist/useSlot-i7AZwCRV.cjs +1 -0
- package/dist/useTheme-0u9_WhjM.js +11 -0
- package/dist/{useTheme-DhYab2-0.js → useTheme-BrFhq4dW.js} +1 -1
- package/dist/useTheme-DfN3sBzg.cjs +1 -0
- package/dist/{useTheme-vN32oV1t.cjs → useTheme-w4BoR6ol.cjs} +1 -1
- package/dist/{useThemeProps-5hp2m3Xl.cjs → useThemeProps-BoO3MMZc.cjs} +1 -1
- package/dist/{useThemeProps-D_gKWuk1.cjs → useThemeProps-CkGODfms.cjs} +1 -1
- package/dist/{useThemeProps-Bmkt_XOR.js → useThemeProps-CwWORfXn.js} +4 -4
- package/dist/{useThemeProps-DftpgVZ0.js → useThemeProps-cERu5xHk.js} +3 -3
- package/dist/{useTimeout-Bx22KOcH.js → useTimeout-Br8oWWYt.js} +4 -4
- package/dist/{useTimeout-gEG15bRo.cjs → useTimeout-DnTtyB2y.cjs} +1 -1
- package/dist/utils-CH0HZgJe.js +391 -0
- package/dist/utils-D2bhwE7x.cjs +1 -0
- package/package.json +1 -1
- package/dist/Backdrop-CxHwPsCX.js +0 -789
- package/dist/Backdrop-ZCTs-Ws8.cjs +0 -1
- package/dist/ButtonBase-S0mFlojL.cjs +0 -75
- package/dist/DatePicker-BigDV0IN.cjs +0 -17
- package/dist/DatePicker-ZdjLD9eR.js +0 -12779
- package/dist/IconButton-DfmbM9nO.cjs +0 -2
- package/dist/InputAdornment-C-EbfNtT.cjs +0 -1
- package/dist/InputBase-CPtGhJye.cjs +0 -3
- package/dist/Tabs-DzrxYlm-.cjs +0 -4
- package/dist/TextField-BLEvZwPH.cjs +0 -14
- package/dist/TextField-CGMPbx_J.js +0 -5686
- package/dist/Tooltip-BJefPCe7.cjs +0 -100
- package/dist/components/Alert/Alert.stories.cjs.js +0 -1
- package/dist/components/Alert/Alert.stories.d.ts +0 -4
- package/dist/components/Alert/Alert.stories.es.js +0 -17
- package/dist/components/Button/Button.stories.cjs.js +0 -1
- package/dist/components/Button/Button.stories.d.ts +0 -6
- package/dist/components/Button/Button.stories.es.js +0 -45
- package/dist/components/DatePicker/DatePicker.stories.cjs.js +0 -1
- package/dist/components/DatePicker/DatePicker.stories.d.ts +0 -4
- package/dist/components/DatePicker/DatePicker.stories.es.js +0 -16
- package/dist/components/Dropzone/Dropzone.stories.cjs.js +0 -1
- package/dist/components/Dropzone/Dropzone.stories.d.ts +0 -4
- package/dist/components/Dropzone/Dropzone.stories.es.js +0 -17
- package/dist/components/EmptyState/EmptyState.stories.cjs.js +0 -1
- package/dist/components/EmptyState/EmptyState.stories.d.ts +0 -4
- package/dist/components/EmptyState/EmptyState.stories.es.js +0 -17
- package/dist/components/FileList/FileList.stories.cjs.js +0 -1
- package/dist/components/FileList/FileList.stories.d.ts +0 -4
- package/dist/components/FileList/FileList.stories.es.js +0 -28
- package/dist/components/Heading/Heading.stories.cjs.js +0 -1
- package/dist/components/Heading/Heading.stories.d.ts +0 -4
- package/dist/components/Heading/Heading.stories.es.js +0 -22
- package/dist/components/IconButton.stories.cjs.js +0 -1
- package/dist/components/IconButton.stories.d.ts +0 -4
- package/dist/components/Loader/Loader.stories.cjs.js +0 -1
- package/dist/components/Loader/Loader.stories.d.ts +0 -4
- package/dist/components/Loader/Loader.stories.es.js +0 -14
- package/dist/components/LoaderBackdrop/LoaderBackdrop.stories.cjs.js +0 -1
- package/dist/components/LoaderBackdrop/LoaderBackdrop.stories.d.ts +0 -4
- package/dist/components/LoaderBackdrop/LoaderBackdrop.stories.es.js +0 -14
- package/dist/components/PasswordInput/PasswordInput.stories.cjs.js +0 -1
- package/dist/components/PasswordInput/PasswordInput.stories.d.ts +0 -4
- package/dist/components/PasswordInput/PasswordInput.stories.es.js +0 -16
- package/dist/components/SearchInput/SearchInput.stories.cjs.js +0 -1
- package/dist/components/SearchInput/SearchInput.stories.d.ts +0 -4
- package/dist/components/SearchInput/SearchInput.stories.es.js +0 -16
- package/dist/components/TabList.stories.cjs.js +0 -1
- package/dist/components/TabList.stories.d.ts +0 -4
- package/dist/components/TextInput/TextInput.stories.cjs.js +0 -1
- package/dist/components/TextInput/TextInput.stories.d.ts +0 -7
- package/dist/components/TextInput/TextInput.stories.es.js +0 -43
- package/dist/index-Dl4BXU0b.cjs +0 -1
- package/dist/ownerWindow-BoRkeomM.js +0 -23
- package/dist/ownerWindow-Dk_4aaak.cjs +0 -1
- package/dist/refType-DYRsy3ld.cjs +0 -1
- package/dist/refType-DvOnKTmB.js +0 -27
- package/dist/useForkRef-D-DyzOXj.js +0 -21
- package/dist/useForkRef-D81w5oMb.cjs +0 -1
- package/dist/useTheme-BvsnROiB.cjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),o=require("../../Paper-n4KgM09K.cjs"),r=e=>t.jsx(o.Paper,{sx:{width:"10rem",height:"10rem",p:1},...e,children:"children"}),n={title:"Components/Paper",component:r,argTypes:{elevation:{control:"number"},square:{control:"boolean"},variant:{control:"select",options:["elevation","outlined"]}}},a={args:{elevation:1,square:!1,variant:"elevation"}};exports.Default=a;exports.default=n;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PaperProps } from '@mui/material/Paper';
|
|
2
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
3
|
+
declare const Paper: (props: PaperProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare const meta: Meta<typeof Paper>;
|
|
5
|
+
export default meta;
|
|
6
|
+
type Story = StoryObj<typeof Paper>;
|
|
7
|
+
export declare const Default: Story;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { P as o } from "../../Paper-CMUbp6SX.js";
|
|
3
|
+
const r = (e) => /* @__PURE__ */ t(o, { sx: { width: "10rem", height: "10rem", p: 1 }, ...e, children: "children" }), l = {
|
|
4
|
+
title: "Components/Paper",
|
|
5
|
+
component: r,
|
|
6
|
+
argTypes: {
|
|
7
|
+
elevation: {
|
|
8
|
+
control: "number"
|
|
9
|
+
},
|
|
10
|
+
square: {
|
|
11
|
+
control: "boolean"
|
|
12
|
+
},
|
|
13
|
+
variant: {
|
|
14
|
+
control: "select",
|
|
15
|
+
options: ["elevation", "outlined"]
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}, i = {
|
|
19
|
+
args: {
|
|
20
|
+
elevation: 1,
|
|
21
|
+
square: !1,
|
|
22
|
+
variant: "elevation"
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
export {
|
|
26
|
+
i as Default,
|
|
27
|
+
l as default
|
|
28
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../PasswordInput/PasswordInput.cjs.js"),t={title:"Components/PasswordInput",component:e},o={args:{label:"Password"}};exports.Default=o;exports.default=t;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("react/jsx-runtime"),z=require("../../FormLabel-C506NT5o.cjs"),B=require("react"),o=require("../../identifier-DTh6b5Gz.cjs"),D=require("../../useControlled-Ysk4KqoX.cjs"),E=require("../../useForkRef-CTI33h-3.cjs"),U=require("../../useId-DNXtOFeX.cjs"),v=require("../../FormGroup-KOLND6rE.cjs"),c=require("../../DefaultPropsProvider-eVMpAUQg.cjs"),_=require("../../SwitchBase-DWfUIgEW.cjs"),G=require("../../createSvgIcon-DQqazotA.cjs"),V=require("../../memoTheme-DJBS0nbO.cjs"),L=require("../../useFormControl-haP0iPhl.cjs"),F=require("../../createSimplePaletteValueFilter-PTK3TAhW.cjs"),H=require("../../createChainedFunction-CJmlQuW8.cjs"),Z=require("../../refType-DNB-r0Bp.cjs");function A(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const a=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,a.get?a:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const l=A(B),J=G.createSvgIcon(s.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"RadioButtonUnchecked"),K=G.createSvgIcon(s.jsx("path",{d:"M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z"}),"RadioButtonChecked"),Q=c.styled("span",{shouldForwardProp:c.rootShouldForwardProp})({position:"relative",display:"flex"}),W=c.styled(J)({transform:"scale(1)"}),X=c.styled(K)(V.memoTheme(({theme:e})=>({left:0,position:"absolute",transform:"scale(0)",transition:e.transitions.create("transform",{easing:e.transitions.easing.easeIn,duration:e.transitions.duration.shortest}),variants:[{props:{checked:!0},style:{transform:"scale(1)",transition:e.transitions.create("transform",{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.shortest})}}]})));function O(e){const{checked:r=!1,classes:t={},fontSize:a}=e,n={...e,checked:r};return s.jsxs(Q,{className:t.root,ownerState:n,children:[s.jsx(W,{fontSize:a,className:t.background,ownerState:n}),s.jsx(X,{fontSize:a,className:t.dot,ownerState:n})]})}process.env.NODE_ENV!=="production"&&(O.propTypes={checked:o.PropTypes.bool,classes:o.PropTypes.object,fontSize:o.PropTypes.oneOf(["small","medium"])});const w=l.createContext(void 0);process.env.NODE_ENV!=="production"&&(w.displayName="RadioGroupContext");function Y(){return l.useContext(w)}function ee(e){return o.generateUtilityClass("MuiRadio",e)}const q=o.generateUtilityClasses("MuiRadio",["root","checked","disabled","colorPrimary","colorSecondary","sizeSmall"]),oe=e=>{const{classes:r,color:t,size:a}=e,n={root:["root",`color${o.capitalize(t)}`,a!=="medium"&&`size${o.capitalize(a)}`]};return{...r,...c.composeClasses(n,ee,r)}},re=c.styled(_.SwitchBase,{shouldForwardProp:e=>c.rootShouldForwardProp(e)||e==="classes",name:"MuiRadio",slot:"Root",overridesResolver:(e,r)=>{const{ownerState:t}=e;return[r.root,t.size!=="medium"&&r[`size${o.capitalize(t.size)}`],r[`color${o.capitalize(t.color)}`]]}})(V.memoTheme(({theme:e})=>({color:(e.vars||e).palette.text.secondary,[`&.${q.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{color:"default",disabled:!1,disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:o.alpha(e.palette.action.active,e.palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter(F.createSimplePaletteValueFilter()).map(([r])=>({props:{color:r,disabled:!1,disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[r].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:o.alpha(e.palette[r].main,e.palette.action.hoverOpacity)}}})),...Object.entries(e.palette).filter(F.createSimplePaletteValueFilter()).map(([r])=>({props:{color:r,disabled:!1},style:{[`&.${q.checked}`]:{color:(e.vars||e).palette[r].main}}})),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:"transparent"}}}}]})));function te(e,r){return typeof r=="object"&&r!==null?e===r:String(e)===String(r)}const N=s.jsx(O,{checked:!0}),I=s.jsx(O,{}),C=l.forwardRef(function(r,t){const a=c.useDefaultProps({props:r,name:"MuiRadio"}),{checked:n,checkedIcon:T=N,color:R="primary",icon:h=I,name:u,onChange:S,size:d="medium",className:f,disabled:j,disableRipple:m=!1,...b}=a,P=L.useFormControl();let p=j;P&&typeof p>"u"&&(p=P.disabled),p??(p=!1);const g={...a,disabled:p,disableRipple:m,color:R,size:d},i=oe(g),y=Y();let x=n;const $=H.createChainedFunction(S,y&&y.onChange);let k=u;return y&&(typeof x>"u"&&(x=te(y.value,a.value)),typeof k>"u"&&(k=y.name)),s.jsx(re,{type:"radio",icon:l.cloneElement(h,{fontSize:I.props.fontSize??d}),checkedIcon:l.cloneElement(T,{fontSize:N.props.fontSize??d}),disabled:p,ownerState:g,classes:i,name:k,checked:x,onChange:$,ref:t,className:o.clsx(i.root,f),...b})});process.env.NODE_ENV!=="production"&&(C.propTypes={checked:o.PropTypes.bool,checkedIcon:o.PropTypes.node,classes:o.PropTypes.object,className:o.PropTypes.string,color:o.PropTypes.oneOfType([o.PropTypes.oneOf(["default","primary","secondary","error","info","success","warning"]),o.PropTypes.string]),disabled:o.PropTypes.bool,disableRipple:o.PropTypes.bool,icon:o.PropTypes.node,id:o.PropTypes.string,inputProps:o.PropTypes.object,inputRef:Z.refType,name:o.PropTypes.string,onChange:o.PropTypes.func,required:o.PropTypes.bool,size:o.PropTypes.oneOfType([o.PropTypes.oneOf(["medium","small"]),o.PropTypes.string]),sx:o.PropTypes.oneOfType([o.PropTypes.arrayOf(o.PropTypes.oneOfType([o.PropTypes.func,o.PropTypes.object,o.PropTypes.bool])),o.PropTypes.func,o.PropTypes.object]),value:o.PropTypes.any});function se(e){return o.generateUtilityClass("MuiRadioGroup",e)}o.generateUtilityClasses("MuiRadioGroup",["root","row","error"]);const ae=e=>{const{classes:r,row:t,error:a}=e,n={root:["root",t&&"row",a&&"error"]};return c.composeClasses(n,se,r)},M=l.forwardRef(function(r,t){const{actions:a,children:n,className:T,defaultValue:R,name:h,onChange:u,value:S,...d}=r,f=l.useRef(null),j=ae(r),[m,b]=D.useControlled({controlled:S,default:R,name:"RadioGroup"});l.useImperativeHandle(a,()=>({focus:()=>{let i=f.current.querySelector("input:not(:disabled):checked");i||(i=f.current.querySelector("input:not(:disabled)")),i&&i.focus()}}),[]);const P=E.useForkRef(t,f),p=U.useId(h),g=l.useMemo(()=>({name:p,onChange(i){b(i.target.value),u&&u(i,i.target.value)},value:m}),[p,u,b,m]);return s.jsx(w.Provider,{value:g,children:s.jsx(v.FormGroup,{role:"radiogroup",ref:P,className:o.clsx(j.root,T),...d,children:n})})});process.env.NODE_ENV!=="production"&&(M.propTypes={children:o.PropTypes.node,className:o.PropTypes.string,defaultValue:o.PropTypes.any,name:o.PropTypes.string,onChange:o.PropTypes.func,value:o.PropTypes.any});const ne=e=>s.jsxs(z.FormControl,{children:[s.jsx(z.FormLabel,{id:"radio-buttons-group-label",children:"Label"}),s.jsxs(M,{"aria-labelledby":"radio-buttons-group-label",defaultValue:"first",name:"radio-buttons-group",...e,children:[s.jsx(v.FormControlLabel,{value:"first",control:s.jsx(C,{}),label:"First"}),s.jsx(v.FormControlLabel,{value:"second",control:s.jsx(C,{}),label:"Second"}),s.jsx(v.FormControlLabel,{value:"third",control:s.jsx(C,{}),label:"Third"})]})]}),ie={title:"Components/RadioGroup",component:ne},le={args:{row:!1}},ce={args:{row:!0}};exports.Default=le;exports.Row=ce;exports.default=ie;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { RadioGroupProps } from '@mui/material/RadioGroup';
|
|
2
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
3
|
+
declare const RadioGroup: (props: RadioGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare const meta: Meta<typeof RadioGroup>;
|
|
5
|
+
export default meta;
|
|
6
|
+
type Story = StoryObj<typeof RadioGroup>;
|
|
7
|
+
export declare const Default: Story;
|
|
8
|
+
export declare const Row: Story;
|
|
@@ -0,0 +1,435 @@
|
|
|
1
|
+
import { jsx as t, jsxs as P } from "react/jsx-runtime";
|
|
2
|
+
import { F as J, a as K } from "../../FormLabel-wDh-AEMQ.js";
|
|
3
|
+
import * as l from "react";
|
|
4
|
+
import { P as e, J as j, I as B, K as y, n as x, L as M } from "../../identifier-BewKgEhI.js";
|
|
5
|
+
import { u as Z } from "../../useControlled-BYdyS7Pn.js";
|
|
6
|
+
import { u as A } from "../../useForkRef-C_4o__cU.js";
|
|
7
|
+
import { u as Q } from "../../useId-CK6Kn3Tn.js";
|
|
8
|
+
import { a as W, F as I } from "../../FormGroup-CcM69JIS.js";
|
|
9
|
+
import { s as C, r as U, u as X, c as D } from "../../DefaultPropsProvider-StV_SUuk.js";
|
|
10
|
+
import { S as Y } from "../../SwitchBase-DYa1wGSu.js";
|
|
11
|
+
import { c as q } from "../../createSvgIcon-VByplk-r.js";
|
|
12
|
+
import { m as L } from "../../memoTheme-B9kDhX1-.js";
|
|
13
|
+
import { u as oo } from "../../useFormControl-CatNKXAi.js";
|
|
14
|
+
import { c as $ } from "../../createSimplePaletteValueFilter-B7--0ryQ.js";
|
|
15
|
+
import { c as eo } from "../../createChainedFunction-C0nujS3O.js";
|
|
16
|
+
import { r as ao } from "../../refType-3o3c-kYx.js";
|
|
17
|
+
const to = q(/* @__PURE__ */ t("path", {
|
|
18
|
+
d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"
|
|
19
|
+
}), "RadioButtonUnchecked"), ro = q(/* @__PURE__ */ t("path", {
|
|
20
|
+
d: "M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z"
|
|
21
|
+
}), "RadioButtonChecked"), so = C("span", {
|
|
22
|
+
shouldForwardProp: U
|
|
23
|
+
})({
|
|
24
|
+
position: "relative",
|
|
25
|
+
display: "flex"
|
|
26
|
+
}), no = C(to)({
|
|
27
|
+
// Scale applied to prevent dot misalignment in Safari
|
|
28
|
+
transform: "scale(1)"
|
|
29
|
+
}), io = C(ro)(L(({
|
|
30
|
+
theme: o
|
|
31
|
+
}) => ({
|
|
32
|
+
left: 0,
|
|
33
|
+
position: "absolute",
|
|
34
|
+
transform: "scale(0)",
|
|
35
|
+
transition: o.transitions.create("transform", {
|
|
36
|
+
easing: o.transitions.easing.easeIn,
|
|
37
|
+
duration: o.transitions.duration.shortest
|
|
38
|
+
}),
|
|
39
|
+
variants: [{
|
|
40
|
+
props: {
|
|
41
|
+
checked: !0
|
|
42
|
+
},
|
|
43
|
+
style: {
|
|
44
|
+
transform: "scale(1)",
|
|
45
|
+
transition: o.transitions.create("transform", {
|
|
46
|
+
easing: o.transitions.easing.easeOut,
|
|
47
|
+
duration: o.transitions.duration.shortest
|
|
48
|
+
})
|
|
49
|
+
}
|
|
50
|
+
}]
|
|
51
|
+
})));
|
|
52
|
+
function F(o) {
|
|
53
|
+
const {
|
|
54
|
+
checked: a = !1,
|
|
55
|
+
classes: r = {},
|
|
56
|
+
fontSize: s
|
|
57
|
+
} = o, i = {
|
|
58
|
+
...o,
|
|
59
|
+
checked: a
|
|
60
|
+
};
|
|
61
|
+
return /* @__PURE__ */ P(so, {
|
|
62
|
+
className: r.root,
|
|
63
|
+
ownerState: i,
|
|
64
|
+
children: [/* @__PURE__ */ t(no, {
|
|
65
|
+
fontSize: s,
|
|
66
|
+
className: r.background,
|
|
67
|
+
ownerState: i
|
|
68
|
+
}), /* @__PURE__ */ t(io, {
|
|
69
|
+
fontSize: s,
|
|
70
|
+
className: r.dot,
|
|
71
|
+
ownerState: i
|
|
72
|
+
})]
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
process.env.NODE_ENV !== "production" && (F.propTypes = {
|
|
76
|
+
/**
|
|
77
|
+
* If `true`, the component is checked.
|
|
78
|
+
*/
|
|
79
|
+
checked: e.bool,
|
|
80
|
+
/**
|
|
81
|
+
* Override or extend the styles applied to the component.
|
|
82
|
+
*/
|
|
83
|
+
classes: e.object,
|
|
84
|
+
/**
|
|
85
|
+
* The size of the component.
|
|
86
|
+
* `small` is equivalent to the dense radio styling.
|
|
87
|
+
*/
|
|
88
|
+
fontSize: e.oneOf(["small", "medium"])
|
|
89
|
+
});
|
|
90
|
+
const G = /* @__PURE__ */ l.createContext(void 0);
|
|
91
|
+
process.env.NODE_ENV !== "production" && (G.displayName = "RadioGroupContext");
|
|
92
|
+
function lo() {
|
|
93
|
+
return l.useContext(G);
|
|
94
|
+
}
|
|
95
|
+
function co(o) {
|
|
96
|
+
return B("MuiRadio", o);
|
|
97
|
+
}
|
|
98
|
+
const E = j("MuiRadio", ["root", "checked", "disabled", "colorPrimary", "colorSecondary", "sizeSmall"]), uo = (o) => {
|
|
99
|
+
const {
|
|
100
|
+
classes: a,
|
|
101
|
+
color: r,
|
|
102
|
+
size: s
|
|
103
|
+
} = o, i = {
|
|
104
|
+
root: ["root", `color${y(r)}`, s !== "medium" && `size${y(s)}`]
|
|
105
|
+
};
|
|
106
|
+
return {
|
|
107
|
+
...a,
|
|
108
|
+
...D(i, co, a)
|
|
109
|
+
};
|
|
110
|
+
}, po = C(Y, {
|
|
111
|
+
shouldForwardProp: (o) => U(o) || o === "classes",
|
|
112
|
+
name: "MuiRadio",
|
|
113
|
+
slot: "Root",
|
|
114
|
+
overridesResolver: (o, a) => {
|
|
115
|
+
const {
|
|
116
|
+
ownerState: r
|
|
117
|
+
} = o;
|
|
118
|
+
return [a.root, r.size !== "medium" && a[`size${y(r.size)}`], a[`color${y(r.color)}`]];
|
|
119
|
+
}
|
|
120
|
+
})(L(({
|
|
121
|
+
theme: o
|
|
122
|
+
}) => ({
|
|
123
|
+
color: (o.vars || o).palette.text.secondary,
|
|
124
|
+
[`&.${E.disabled}`]: {
|
|
125
|
+
color: (o.vars || o).palette.action.disabled
|
|
126
|
+
},
|
|
127
|
+
variants: [{
|
|
128
|
+
props: {
|
|
129
|
+
color: "default",
|
|
130
|
+
disabled: !1,
|
|
131
|
+
disableRipple: !1
|
|
132
|
+
},
|
|
133
|
+
style: {
|
|
134
|
+
"&:hover": {
|
|
135
|
+
backgroundColor: o.vars ? `rgba(${o.vars.palette.action.activeChannel} / ${o.vars.palette.action.hoverOpacity})` : x(o.palette.action.active, o.palette.action.hoverOpacity)
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}, ...Object.entries(o.palette).filter($()).map(([a]) => ({
|
|
139
|
+
props: {
|
|
140
|
+
color: a,
|
|
141
|
+
disabled: !1,
|
|
142
|
+
disableRipple: !1
|
|
143
|
+
},
|
|
144
|
+
style: {
|
|
145
|
+
"&:hover": {
|
|
146
|
+
backgroundColor: o.vars ? `rgba(${o.vars.palette[a].mainChannel} / ${o.vars.palette.action.hoverOpacity})` : x(o.palette[a].main, o.palette.action.hoverOpacity)
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
})), ...Object.entries(o.palette).filter($()).map(([a]) => ({
|
|
150
|
+
props: {
|
|
151
|
+
color: a,
|
|
152
|
+
disabled: !1
|
|
153
|
+
},
|
|
154
|
+
style: {
|
|
155
|
+
[`&.${E.checked}`]: {
|
|
156
|
+
color: (o.vars || o).palette[a].main
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
})), {
|
|
160
|
+
// Should be last to override other colors
|
|
161
|
+
props: {
|
|
162
|
+
disableRipple: !1
|
|
163
|
+
},
|
|
164
|
+
style: {
|
|
165
|
+
// Reset on touch devices, it doesn't add specificity
|
|
166
|
+
"&:hover": {
|
|
167
|
+
"@media (hover: none)": {
|
|
168
|
+
backgroundColor: "transparent"
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}]
|
|
173
|
+
})));
|
|
174
|
+
function fo(o, a) {
|
|
175
|
+
return typeof a == "object" && a !== null ? o === a : String(o) === String(a);
|
|
176
|
+
}
|
|
177
|
+
const T = /* @__PURE__ */ t(F, {
|
|
178
|
+
checked: !0
|
|
179
|
+
}), V = /* @__PURE__ */ t(F, {}), g = /* @__PURE__ */ l.forwardRef(function(a, r) {
|
|
180
|
+
const s = X({
|
|
181
|
+
props: a,
|
|
182
|
+
name: "MuiRadio"
|
|
183
|
+
}), {
|
|
184
|
+
checked: i,
|
|
185
|
+
checkedIcon: h = T,
|
|
186
|
+
color: S = "primary",
|
|
187
|
+
icon: k = V,
|
|
188
|
+
name: d,
|
|
189
|
+
onChange: w,
|
|
190
|
+
size: u = "medium",
|
|
191
|
+
className: p,
|
|
192
|
+
disabled: z,
|
|
193
|
+
disableRipple: m = !1,
|
|
194
|
+
...b
|
|
195
|
+
} = s, v = oo();
|
|
196
|
+
let c = z;
|
|
197
|
+
v && typeof c > "u" && (c = v.disabled), c ?? (c = !1);
|
|
198
|
+
const R = {
|
|
199
|
+
...s,
|
|
200
|
+
disabled: c,
|
|
201
|
+
disableRipple: m,
|
|
202
|
+
color: S,
|
|
203
|
+
size: u
|
|
204
|
+
}, n = uo(R), f = lo();
|
|
205
|
+
let O = i;
|
|
206
|
+
const H = eo(w, f && f.onChange);
|
|
207
|
+
let N = d;
|
|
208
|
+
return f && (typeof O > "u" && (O = fo(f.value, s.value)), typeof N > "u" && (N = f.name)), /* @__PURE__ */ t(po, {
|
|
209
|
+
type: "radio",
|
|
210
|
+
icon: /* @__PURE__ */ l.cloneElement(k, {
|
|
211
|
+
fontSize: V.props.fontSize ?? u
|
|
212
|
+
}),
|
|
213
|
+
checkedIcon: /* @__PURE__ */ l.cloneElement(h, {
|
|
214
|
+
fontSize: T.props.fontSize ?? u
|
|
215
|
+
}),
|
|
216
|
+
disabled: c,
|
|
217
|
+
ownerState: R,
|
|
218
|
+
classes: n,
|
|
219
|
+
name: N,
|
|
220
|
+
checked: O,
|
|
221
|
+
onChange: H,
|
|
222
|
+
ref: r,
|
|
223
|
+
className: M(n.root, p),
|
|
224
|
+
...b
|
|
225
|
+
});
|
|
226
|
+
});
|
|
227
|
+
process.env.NODE_ENV !== "production" && (g.propTypes = {
|
|
228
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
229
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
230
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
231
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
232
|
+
/**
|
|
233
|
+
* If `true`, the component is checked.
|
|
234
|
+
*/
|
|
235
|
+
checked: e.bool,
|
|
236
|
+
/**
|
|
237
|
+
* The icon to display when the component is checked.
|
|
238
|
+
* @default <RadioButtonIcon checked />
|
|
239
|
+
*/
|
|
240
|
+
checkedIcon: e.node,
|
|
241
|
+
/**
|
|
242
|
+
* Override or extend the styles applied to the component.
|
|
243
|
+
*/
|
|
244
|
+
classes: e.object,
|
|
245
|
+
/**
|
|
246
|
+
* @ignore
|
|
247
|
+
*/
|
|
248
|
+
className: e.string,
|
|
249
|
+
/**
|
|
250
|
+
* The color of the component.
|
|
251
|
+
* It supports both default and custom theme colors, which can be added as shown in the
|
|
252
|
+
* [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
|
|
253
|
+
* @default 'primary'
|
|
254
|
+
*/
|
|
255
|
+
color: e.oneOfType([e.oneOf(["default", "primary", "secondary", "error", "info", "success", "warning"]), e.string]),
|
|
256
|
+
/**
|
|
257
|
+
* If `true`, the component is disabled.
|
|
258
|
+
*/
|
|
259
|
+
disabled: e.bool,
|
|
260
|
+
/**
|
|
261
|
+
* If `true`, the ripple effect is disabled.
|
|
262
|
+
* @default false
|
|
263
|
+
*/
|
|
264
|
+
disableRipple: e.bool,
|
|
265
|
+
/**
|
|
266
|
+
* The icon to display when the component is unchecked.
|
|
267
|
+
* @default <RadioButtonIcon />
|
|
268
|
+
*/
|
|
269
|
+
icon: e.node,
|
|
270
|
+
/**
|
|
271
|
+
* The id of the `input` element.
|
|
272
|
+
*/
|
|
273
|
+
id: e.string,
|
|
274
|
+
/**
|
|
275
|
+
* [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.
|
|
276
|
+
*/
|
|
277
|
+
inputProps: e.object,
|
|
278
|
+
/**
|
|
279
|
+
* Pass a ref to the `input` element.
|
|
280
|
+
*/
|
|
281
|
+
inputRef: ao,
|
|
282
|
+
/**
|
|
283
|
+
* Name attribute of the `input` element.
|
|
284
|
+
*/
|
|
285
|
+
name: e.string,
|
|
286
|
+
/**
|
|
287
|
+
* Callback fired when the state is changed.
|
|
288
|
+
*
|
|
289
|
+
* @param {React.ChangeEvent<HTMLInputElement>} event The event source of the callback.
|
|
290
|
+
* You can pull out the new value by accessing `event.target.value` (string).
|
|
291
|
+
* You can pull out the new checked state by accessing `event.target.checked` (boolean).
|
|
292
|
+
*/
|
|
293
|
+
onChange: e.func,
|
|
294
|
+
/**
|
|
295
|
+
* If `true`, the `input` element is required.
|
|
296
|
+
* @default false
|
|
297
|
+
*/
|
|
298
|
+
required: e.bool,
|
|
299
|
+
/**
|
|
300
|
+
* The size of the component.
|
|
301
|
+
* `small` is equivalent to the dense radio styling.
|
|
302
|
+
* @default 'medium'
|
|
303
|
+
*/
|
|
304
|
+
size: e.oneOfType([e.oneOf(["medium", "small"]), e.string]),
|
|
305
|
+
/**
|
|
306
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
307
|
+
*/
|
|
308
|
+
sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
|
|
309
|
+
/**
|
|
310
|
+
* The value of the component. The DOM API casts this to a string.
|
|
311
|
+
*/
|
|
312
|
+
value: e.any
|
|
313
|
+
});
|
|
314
|
+
function mo(o) {
|
|
315
|
+
return B("MuiRadioGroup", o);
|
|
316
|
+
}
|
|
317
|
+
j("MuiRadioGroup", ["root", "row", "error"]);
|
|
318
|
+
const bo = (o) => {
|
|
319
|
+
const {
|
|
320
|
+
classes: a,
|
|
321
|
+
row: r,
|
|
322
|
+
error: s
|
|
323
|
+
} = o;
|
|
324
|
+
return D({
|
|
325
|
+
root: ["root", r && "row", s && "error"]
|
|
326
|
+
}, mo, a);
|
|
327
|
+
}, _ = /* @__PURE__ */ l.forwardRef(function(a, r) {
|
|
328
|
+
const {
|
|
329
|
+
// private
|
|
330
|
+
// eslint-disable-next-line react/prop-types
|
|
331
|
+
actions: s,
|
|
332
|
+
children: i,
|
|
333
|
+
className: h,
|
|
334
|
+
defaultValue: S,
|
|
335
|
+
name: k,
|
|
336
|
+
onChange: d,
|
|
337
|
+
value: w,
|
|
338
|
+
...u
|
|
339
|
+
} = a, p = l.useRef(null), z = bo(a), [m, b] = Z({
|
|
340
|
+
controlled: w,
|
|
341
|
+
default: S,
|
|
342
|
+
name: "RadioGroup"
|
|
343
|
+
});
|
|
344
|
+
l.useImperativeHandle(s, () => ({
|
|
345
|
+
focus: () => {
|
|
346
|
+
let n = p.current.querySelector("input:not(:disabled):checked");
|
|
347
|
+
n || (n = p.current.querySelector("input:not(:disabled)")), n && n.focus();
|
|
348
|
+
}
|
|
349
|
+
}), []);
|
|
350
|
+
const v = A(r, p), c = Q(k), R = l.useMemo(() => ({
|
|
351
|
+
name: c,
|
|
352
|
+
onChange(n) {
|
|
353
|
+
b(n.target.value), d && d(n, n.target.value);
|
|
354
|
+
},
|
|
355
|
+
value: m
|
|
356
|
+
}), [c, d, b, m]);
|
|
357
|
+
return /* @__PURE__ */ t(G.Provider, {
|
|
358
|
+
value: R,
|
|
359
|
+
children: /* @__PURE__ */ t(W, {
|
|
360
|
+
role: "radiogroup",
|
|
361
|
+
ref: v,
|
|
362
|
+
className: M(z.root, h),
|
|
363
|
+
...u,
|
|
364
|
+
children: i
|
|
365
|
+
})
|
|
366
|
+
});
|
|
367
|
+
});
|
|
368
|
+
process.env.NODE_ENV !== "production" && (_.propTypes = {
|
|
369
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
370
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
371
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
372
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
373
|
+
/**
|
|
374
|
+
* The content of the component.
|
|
375
|
+
*/
|
|
376
|
+
children: e.node,
|
|
377
|
+
/**
|
|
378
|
+
* @ignore
|
|
379
|
+
*/
|
|
380
|
+
className: e.string,
|
|
381
|
+
/**
|
|
382
|
+
* The default value. Use when the component is not controlled.
|
|
383
|
+
*/
|
|
384
|
+
defaultValue: e.any,
|
|
385
|
+
/**
|
|
386
|
+
* The name used to reference the value of the control.
|
|
387
|
+
* If you don't provide this prop, it falls back to a randomly generated name.
|
|
388
|
+
*/
|
|
389
|
+
name: e.string,
|
|
390
|
+
/**
|
|
391
|
+
* Callback fired when a radio button is selected.
|
|
392
|
+
*
|
|
393
|
+
* @param {React.ChangeEvent<HTMLInputElement>} event The event source of the callback.
|
|
394
|
+
* @param {string} value The value of the selected radio button.
|
|
395
|
+
* You can pull out the new value by accessing `event.target.value` (string).
|
|
396
|
+
*/
|
|
397
|
+
onChange: e.func,
|
|
398
|
+
/**
|
|
399
|
+
* Value of the selected radio button. The DOM API casts this to a string.
|
|
400
|
+
*/
|
|
401
|
+
value: e.any
|
|
402
|
+
});
|
|
403
|
+
const vo = (o) => /* @__PURE__ */ P(J, { children: [
|
|
404
|
+
/* @__PURE__ */ t(K, { id: "radio-buttons-group-label", children: "Label" }),
|
|
405
|
+
/* @__PURE__ */ P(
|
|
406
|
+
_,
|
|
407
|
+
{
|
|
408
|
+
"aria-labelledby": "radio-buttons-group-label",
|
|
409
|
+
defaultValue: "first",
|
|
410
|
+
name: "radio-buttons-group",
|
|
411
|
+
...o,
|
|
412
|
+
children: [
|
|
413
|
+
/* @__PURE__ */ t(I, { value: "first", control: /* @__PURE__ */ t(g, {}), label: "First" }),
|
|
414
|
+
/* @__PURE__ */ t(I, { value: "second", control: /* @__PURE__ */ t(g, {}), label: "Second" }),
|
|
415
|
+
/* @__PURE__ */ t(I, { value: "third", control: /* @__PURE__ */ t(g, {}), label: "Third" })
|
|
416
|
+
]
|
|
417
|
+
}
|
|
418
|
+
)
|
|
419
|
+
] }), xo = {
|
|
420
|
+
title: "Components/RadioGroup",
|
|
421
|
+
component: vo
|
|
422
|
+
}, $o = {
|
|
423
|
+
args: {
|
|
424
|
+
row: !1
|
|
425
|
+
}
|
|
426
|
+
}, Eo = {
|
|
427
|
+
args: {
|
|
428
|
+
row: !0
|
|
429
|
+
}
|
|
430
|
+
};
|
|
431
|
+
export {
|
|
432
|
+
$o as Default,
|
|
433
|
+
Eo as Row,
|
|
434
|
+
xo as default
|
|
435
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../SearchInput/SearchInput.cjs.js"),t={title:"Components/SearchInput",component:e},o={args:{placeholder:"Rechercher"}};exports.Default=o;exports.default=t;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),d=require("react"),u=require("../../FormLabel-C506NT5o.cjs"),l=require("../../Select-CnFa2_je.cjs"),t=require("../../MenuItem-BxXCEc8h.cjs"),c=n=>{const[a,s]=d.useState("pending"),i=r=>s(r.target.value);return e.jsxs(u.FormControl,{variant:n.variant,sx:{width:"10rem"},children:[e.jsx(l.InputLabel,{id:"simple-select-label",children:"Status"}),e.jsxs(l.Select,{labelId:"simple-select-label",id:"simple-select",value:a,label:"Status",onChange:i,...n,children:[e.jsx(t.MenuItem,{value:"pending",children:"Pending"}),e.jsx(t.MenuItem,{value:"ongoing",children:"Ongoing"}),e.jsx(t.MenuItem,{value:"validated",children:"Validated"}),e.jsx(t.MenuItem,{value:"rejected",children:"Rejected"})]})]})},o={title:"Components/Select",component:c},g={args:{}},m={args:{variant:"filled"}},v={args:{variant:"standard"}},S={args:{disabled:!0}};exports.Default=g;exports.Disabled=S;exports.Filled=m;exports.Standard=v;exports.default=o;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SelectProps } from '@mui/material/Select';
|
|
2
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
3
|
+
declare const Select: (props: SelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare const meta: Meta<typeof Select>;
|
|
5
|
+
export default meta;
|
|
6
|
+
type Story = StoryObj<typeof Select>;
|
|
7
|
+
export declare const Default: Story;
|
|
8
|
+
export declare const Filled: Story;
|
|
9
|
+
export declare const Standard: Story;
|
|
10
|
+
export declare const Disabled: Story;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { jsxs as l, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useState as d } from "react";
|
|
3
|
+
import { F as o } from "../../FormLabel-wDh-AEMQ.js";
|
|
4
|
+
import { a as c, S as m } from "../../Select-CcnCBhBN.js";
|
|
5
|
+
import { M as t } from "../../MenuItem-BFkBwBkN.js";
|
|
6
|
+
const u = (a) => {
|
|
7
|
+
const [n, s] = d("pending"), r = (i) => s(i.target.value);
|
|
8
|
+
return /* @__PURE__ */ l(o, { variant: a.variant, sx: { width: "10rem" }, children: [
|
|
9
|
+
/* @__PURE__ */ e(c, { id: "simple-select-label", children: "Status" }),
|
|
10
|
+
/* @__PURE__ */ l(
|
|
11
|
+
m,
|
|
12
|
+
{
|
|
13
|
+
labelId: "simple-select-label",
|
|
14
|
+
id: "simple-select",
|
|
15
|
+
value: n,
|
|
16
|
+
label: "Status",
|
|
17
|
+
onChange: r,
|
|
18
|
+
...a,
|
|
19
|
+
children: [
|
|
20
|
+
/* @__PURE__ */ e(t, { value: "pending", children: "Pending" }),
|
|
21
|
+
/* @__PURE__ */ e(t, { value: "ongoing", children: "Ongoing" }),
|
|
22
|
+
/* @__PURE__ */ e(t, { value: "validated", children: "Validated" }),
|
|
23
|
+
/* @__PURE__ */ e(t, { value: "rejected", children: "Rejected" })
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
)
|
|
27
|
+
] });
|
|
28
|
+
}, f = {
|
|
29
|
+
title: "Components/Select",
|
|
30
|
+
component: u
|
|
31
|
+
}, b = {
|
|
32
|
+
args: {}
|
|
33
|
+
}, j = {
|
|
34
|
+
args: {
|
|
35
|
+
variant: "filled"
|
|
36
|
+
}
|
|
37
|
+
}, x = {
|
|
38
|
+
args: {
|
|
39
|
+
variant: "standard"
|
|
40
|
+
}
|
|
41
|
+
}, C = {
|
|
42
|
+
args: {
|
|
43
|
+
disabled: !0
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
export {
|
|
47
|
+
b as Default,
|
|
48
|
+
C as Disabled,
|
|
49
|
+
j as Filled,
|
|
50
|
+
x as Standard,
|
|
51
|
+
f as default
|
|
52
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("react/jsx-runtime"),O=require("react"),r=require("../../identifier-DTh6b5Gz.cjs"),d=require("../../Tabs-CUpcnsPl.cjs"),P=require("../../DefaultPropsProvider-eVMpAUQg.cjs"),E=require("../../useThemeProps-BoO3MMZc.cjs");function M(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const a=M(O),f=a.createContext(null);process.env.NODE_ENV!=="production"&&(f.displayName="TabContext");function D(){const[e,n]=a.useState(null);return a.useEffect(()=>{n(`mui-p-${Math.round(Math.random()*1e5)}`)},[]),e}function y(e){const{children:n,value:t}=e,o=D(),p=a.useMemo(()=>({idPrefix:o,value:t}),[o,t]);return s.jsx(f.Provider,{value:p,children:n})}process.env.NODE_ENV!=="production"&&(y.propTypes={children:r.PropTypes.node,value:r.PropTypes.oneOfType([r.PropTypes.number,r.PropTypes.string]).isRequired});function v(){return a.useContext(f)}function x(e,n){const{idPrefix:t}=e;return t===null?null:`${e.idPrefix}-P-${n}`}function m(e,n){const{idPrefix:t}=e;return t===null?null:`${e.idPrefix}-T-${n}`}const h=a.forwardRef(function(n,t){const{children:o,...p}=n,i=v();if(i===null)throw new TypeError("No TabContext provided");const l=a.Children.map(o,u=>a.isValidElement(u)?a.cloneElement(u,{"aria-controls":x(i,u.props.value),id:m(i,u.props.value)}):null);return s.jsx(d.Tabs,{...p,ref:t,value:i.value,children:l})});process.env.NODE_ENV!=="production"&&(h.propTypes={children:r.PropTypes.node});function R(e){return r.generateUtilityClass("MuiTabPanel",e)}r.generateUtilityClasses("MuiTabPanel",["root","hidden"]);const q=e=>{const{classes:n,hidden:t}=e,o={root:["root",t&&"hidden"]};return P.composeClasses(o,R,n)},w=P.styled("div",{name:"MuiTabPanel",slot:"Root",overridesResolver:(e,n)=>n.root})(({theme:e})=>({padding:e.spacing(3)})),T=a.forwardRef(function(n,t){const o=E.useThemeProps({props:n,name:"MuiTabPanel"}),{children:p,className:i,value:l,keepMounted:u=!1,...j}=o,b={...o},g=q(b),c=v();if(c===null)throw new TypeError("No TabContext provided");const C=x(c,l),N=m(c,l);return s.jsx(w,{"aria-labelledby":N,className:r.clsx(g.root,i),hidden:l!==c.value,id:C,ref:t,role:"tabpanel",ownerState:b,...j,children:(u||l===c.value)&&p})});process.env.NODE_ENV!=="production"&&(T.propTypes={children:r.PropTypes.node,classes:r.PropTypes.object,className:r.PropTypes.string,keepMounted:r.PropTypes.bool,sx:r.PropTypes.oneOfType([r.PropTypes.arrayOf(r.PropTypes.oneOfType([r.PropTypes.func,r.PropTypes.object,r.PropTypes.bool])),r.PropTypes.func,r.PropTypes.object]),value:r.PropTypes.oneOfType([r.PropTypes.number,r.PropTypes.string]).isRequired});const _=e=>s.jsxs(y,{value:"1",children:[s.jsxs(h,{...e,"aria-label":"lab API tabs example",children:[s.jsx(d.Tab,{label:"Utilisateurs",value:"1"}),s.jsx(d.Tab,{label:"Groupes",value:"2"}),s.jsx(d.Tab,{label:"Demandes d'inscription",value:"3"})]}),s.jsx(T,{value:"1",children:"Utilisateurs"}),s.jsx(T,{value:"2",children:"Groupes"}),s.jsx(T,{value:"3",children:"Demandes d'inscription"})]}),S={title:"Components/TabList",component:_},U={args:{}};exports.Default=U;exports.default=S;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { TabListProps } from '@mui/lab/TabList';
|
|
2
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
3
|
+
declare const TabList: (props: TabListProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare const meta: Meta<typeof TabList>;
|
|
5
|
+
export default meta;
|
|
6
|
+
type Story = StoryObj<typeof TabList>;
|
|
7
|
+
export declare const Default: Story;
|