@cgi-learning-hub/ui 1.3.5 → 1.4.0-dev.1740589431
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-DcDd6WZF.js → Backdrop-BctCVgLy.js} +79 -82
- package/dist/Backdrop-DWp3AktL.cjs +1 -0
- package/dist/{Box-mP2Th61z.cjs → Box-DYA49L7w.cjs} +1 -1
- package/dist/{Box-Byz2BwGf.js → Box-DgqaLb7j.js} +8 -8
- package/dist/Button-B7kOjNW1.js +696 -0
- package/dist/Button-UmeKHfcL.cjs +1 -0
- package/dist/ButtonBase-D6tfI-8D.cjs +74 -0
- package/dist/{ButtonBase-DAWDecOk.js → ButtonBase-IZ_QjbpE.js} +334 -334
- package/dist/CardContent-5bW4A4d2.cjs +1 -0
- package/dist/CardContent-F4-KcZH8.js +226 -0
- package/dist/{Checkbox-DYrDbdy1.cjs → Checkbox-DQgPXaym.cjs} +1 -1
- package/dist/{Checkbox-8Rhxpkjl.js → Checkbox-qUSjau0g.js} +26 -26
- package/dist/Chip-BTnuWGEU.cjs +1 -0
- package/dist/Chip-OpRIs-sL.js +522 -0
- package/dist/{CircularProgress-Kwlef5fX.js → CircularProgress-CQxzJquv.js} +11 -11
- package/dist/{CircularProgress-BByrCLjv.cjs → CircularProgress-cPXhiRlM.cjs} +4 -4
- package/dist/CloseRounded-BMEGLs8y.js +8 -0
- package/dist/CloseRounded-BRXBizmR.cjs +1 -0
- package/dist/{DatePicker-BS1OatwQ.js → DatePicker-C6MCYjpp.js} +3113 -3600
- package/dist/DatePicker-CTIqTlNQ.cjs +14 -0
- package/dist/DefaultPropsProvider-Cqcb4sws.js +303 -0
- package/dist/DefaultPropsProvider-wpBXjN8r.cjs +1 -0
- package/dist/Dialog-B1wnk5BT.cjs +1 -0
- package/dist/Dialog-CKS7yjT5.js +478 -0
- package/dist/{DialogContent-uc65XOEU.js → DialogContent-BzPaz5G8.js} +13 -13
- package/dist/{DialogContent-Dj_OjLZ6.cjs → DialogContent-DcZz4rBc.cjs} +1 -1
- package/dist/{DialogTitle-C8JOi-rq.js → DialogTitle-D3E_lDHD.js} +30 -30
- package/dist/{DialogTitle-BboPDaoB.cjs → DialogTitle-mr9xn4JZ.cjs} +1 -1
- package/dist/{Divider-KO-E6nU8.js → Divider-D-pZeQTm.js} +8 -8
- package/dist/{Divider-CcrM3lNn.cjs → Divider-D3hPb7s4.cjs} +1 -1
- package/dist/{FormLabel-CfR4bb21.js → FormLabel-3-CC-ZGw.js} +131 -133
- package/dist/FormLabel-BV7-a0i5.cjs +2 -0
- package/dist/{Grow-CQVPAYvp.js → Grow-DKgYCxiY.js} +46 -43
- package/dist/Grow-Z3KzFaK5.cjs +1 -0
- package/dist/{IconButton-CekuyD4r.js → IconButton-CCNUMz2l.js} +132 -64
- package/dist/IconButton-CVOPR4EM.cjs +2 -0
- package/dist/{InputAdornment-Cq0WhPxF.cjs → InputAdornment-CwFEJSXv.cjs} +1 -1
- package/dist/{InputAdornment-iU5YnveW.js → InputAdornment-DL8XIM8r.js} +15 -14
- package/dist/{InputBase-BJy3wwFB.js → InputBase-By7jMrFP.js} +221 -215
- package/dist/InputBase-Cejvjv1E.cjs +3 -0
- package/dist/Link-2ncpUcIp.cjs +1 -0
- package/dist/{Link-CoQuUM0t.js → Link-C_GPIs0q.js} +46 -46
- package/dist/{Menu-C7tKmcAh.js → Menu-BunOW0ot.js} +72 -73
- package/dist/Menu-Cngt8Va9.cjs +7 -0
- package/dist/{MenuItem-BZ_EVaBq.cjs → MenuItem-Bha8aBMr.cjs} +1 -1
- package/dist/{MenuItem-j8luVUcX.js → MenuItem-Cu3FTLl8.js} +20 -20
- package/dist/{Modal-brWBFdK7.js → Modal-DTJd7JJ6.js} +99 -98
- package/dist/Modal-u82Ss4h_.cjs +2 -0
- package/dist/{Paper-BG4Vk_Um.js → Paper-BiZq6EF2.js} +8 -8
- package/dist/{Paper-Cr56xkCr.cjs → Paper-EvOTlB_Q.cjs} +2 -2
- package/dist/{Popper-YT5WAMV-.cjs → Popper-BVYscbsI.cjs} +3 -3
- package/dist/{Popper-DFZ_gRev.js → Popper-DjwR55WH.js} +241 -243
- package/dist/{Portal-JEwcozmp.js → Portal-BByeByPq.js} +34 -39
- package/dist/Portal-DUHpWdY1.cjs +1 -0
- package/dist/Radio-CSl8GQNk.cjs +1 -0
- package/dist/Radio-DSRS-tjj.js +568 -0
- package/dist/RadioGroup-DL4hhZzK.cjs +1 -0
- package/dist/RadioGroup-cPdOWdYD.js +190 -0
- package/dist/{Select-DmssuG5M.js → Select-CZnKFG3o.js} +419 -401
- package/dist/Select-DZAzJA0y.cjs +3 -0
- package/dist/Stack-B82ckLGm.cjs +1 -0
- package/dist/{Stack-BzTJdRGj.js → Stack-hbAJHQhq.js} +29 -29
- package/dist/Switch-B9uT9-d0.js +330 -0
- package/dist/Switch-DWKHe4z_.cjs +1 -0
- package/dist/{SwitchBase-Dlth5_F7.js → SwitchBase-CDkmnGAP.js} +29 -29
- package/dist/{SwitchBase-DjIY_KWB.cjs → SwitchBase-CnA6TA2P.cjs} +1 -1
- package/dist/Tabs-AyJ_tKtV.cjs +4 -0
- package/dist/{Tabs-CYbeTnJk.js → Tabs-BYfDlOR9.js} +336 -337
- package/dist/{TextField-Cri5Gxa7.js → TextField-BKfXjPdH.js} +29 -27
- package/dist/TextField-CwcPgdgD.cjs +1 -0
- package/dist/ToggleButtonGroup-DIp0fcXW.cjs +140 -0
- package/dist/ToggleButtonGroup-sc2omtRp.js +10473 -0
- package/dist/{Tooltip-BhAHhzKz.js → Tooltip-B1NGvrJP.js} +14 -14
- package/dist/{Tooltip-DhDtvULK.cjs → Tooltip-oNmnF7Bc.cjs} +3 -3
- package/dist/{TransitionGroupContext-DMJLhY9-.js → TransitionGroupContext-DbLioz_6.js} +7 -7
- package/dist/TransitionGroupContext-Zt4NoR0u.cjs +1 -0
- package/dist/{Typography-DfRMDngd.cjs → Typography-DPij13XT.cjs} +1 -1
- package/dist/{Typography-DBwTr_ix.js → Typography-SIQ6eleU.js} +9 -9
- package/dist/{capitalize-CkF8kU4n.js → capitalize-3KLkrEtk.js} +1 -1
- package/dist/{capitalize-B3GG7Wn6.cjs → capitalize-CEByPz9F.cjs} +1 -1
- 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 +118 -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-DJMYlO0S.cjs +1 -0
- package/dist/{createSvgIcon-C8nGcfF4.js → createSvgIcon-K2ZAdASa.js} +57 -55
- package/dist/{dividerClasses-CCAY3Pnr.cjs → dividerClasses-Dq1bCO_s.cjs} +1 -1
- package/dist/{dividerClasses-nh2-hkQB.js → dividerClasses-afsB3Yy1.js} +3 -3
- package/dist/{elementTypeAcceptingRef-D-5kcohU.js → elementTypeAcceptingRef-5ESWTE79.js} +1 -1
- package/dist/{elementTypeAcceptingRef-DZsNbuLU.cjs → elementTypeAcceptingRef-BjgxF5Bq.cjs} +1 -1
- package/dist/{extendSxProp-apyK-EBz.cjs → extendSxProp-D-oLUmkR.cjs} +1 -1
- package/dist/{extendSxProp-C2ff0oGc.js → extendSxProp-dlShX1xL.js} +3 -3
- package/dist/{fr-Bjufn3RW.js → fr-B3qrCNcK.js} +18 -18
- package/dist/generateUtilityClasses-De8NU9_E.cjs +75 -0
- package/dist/generateUtilityClasses-DotvgSDH.js +3297 -0
- package/dist/hooks/lazySvgImport.d.ts +1 -1
- package/dist/{index-CwvpOCso.js → index-B1u7G33_.js} +29 -29
- package/dist/{index-ChM1Ett8.cjs → index-CVFzneYe.cjs} +1 -1
- package/dist/{index-BCnPLuqJ.js → index-DTTmpNYg.js} +22 -22
- package/dist/index-T-RSwkXB.cjs +1 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +348 -294
- package/dist/{memoTheme-D7Fyh_3C.js → memoTheme-CqmIydD-.js} +1 -1
- package/dist/{memoTheme-Bdg0Y_2O.cjs → memoTheme-DrjvJtTP.cjs} +1 -1
- package/dist/{refType-CoaxQOPt.cjs → refType-BkobP3bK.cjs} +1 -1
- package/dist/{refType-DKYKROQk.js → refType-C210ipRY.js} +1 -1
- package/dist/{mergeSlotProps-tUJEcwVu.js → resolveComponentProps-CPmhKPdH.js} +7 -7
- package/dist/resolveComponentProps-PuUs-PsA.cjs +1 -0
- package/dist/unsupportedProp-Bn6XWqwH.cjs +1 -0
- package/dist/unsupportedProp-BuVD30Gh.js +9 -0
- package/dist/useSlot-CC2AaOjN.cjs +1 -0
- package/dist/useSlot-GZu0V5wJ.js +48 -0
- package/dist/{useSlotProps-B31YQlzb.js → useSlotProps-C9tsxDNg.js} +11 -11
- package/dist/useSlotProps-CvOxvhyy.cjs +1 -0
- package/dist/{useTheme-Dukx-__T.cjs → useTheme-7RGQRN-h.cjs} +1 -1
- package/dist/useTheme-BA7tMglY.js +11 -0
- package/dist/{useTheme-Cy5kyKJF.cjs → useTheme-CIf2b2wK.cjs} +1 -1
- package/dist/{useTheme-_xyy-wul.js → useTheme-tdgDVH1p.js} +1 -1
- package/dist/{useThemeProps-u_ESzK2f.cjs → useThemeProps-AnS1uVAy.cjs} +1 -1
- package/dist/{useThemeProps-BySkSe-M.js → useThemeProps-BQlPXzo3.js} +2 -2
- package/dist/useThemeProps-BTfGtNci.js +17 -0
- package/dist/useThemeProps-DxBEHys5.cjs +1 -0
- package/dist/utils-CFI_-FMV.cjs +1 -0
- package/dist/{utils-C6c4fj7D.js → utils-CXhh35wP.js} +41 -41
- package/package.json +9 -9
- package/dist/Backdrop-CvufxHMY.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/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/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/InputBase-s1fk8TB4.cjs +0 -3
- package/dist/Link-CWczkFp0.cjs +0 -1
- package/dist/Menu-Bsx8PA-q.cjs +0 -7
- package/dist/Modal-DImrEpYJ.cjs +0 -2
- 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/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/TransitionGroupContext-DbXD5xqS.cjs +0 -1
- package/dist/createSvgIcon--rEClVU7.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-Cw0GDedk.cjs +0 -17
- package/dist/index-DXD5J5Eu.js +0 -186
- package/dist/mergeSlotProps-DuV-LTW7.cjs +0 -1
- package/dist/useSlot-BTpHG6jf.js +0 -50
- package/dist/useSlot-CByalpSD.cjs +0 -1
- package/dist/useSlotProps-BVSAQTNl.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
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),c=require("../../createSvgIcon-DJMYlO0S.cjs"),o=require("@mui/material"),I=require("react"),S=require("../../index-CVFzneYe.cjs"),C=require("../../Stack-B82ckLGm.cjs"),i=require("../../Typography-DPij13XT.cjs"),p=c.createSvgIcon(e.jsx("path",{d:"M19 7v2.99s-1.99.01-2 0V7h-3s.01-1.99 0-2h3V2h2v3h3v2zm-3 4V8h-3V5H5c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-8zM5 19l3-4 2 3 3-4 4 5z"}),"AddPhotoAlternate"),F=c.createSvgIcon(e.jsx("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.996.996 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"}),"Create"),w=c.createSvgIcon(e.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete"),D=()=>e.jsxs(i.Typography,{textAlign:"center",fontSize:"14px",color:"grey.darker",children:[e.jsx(o.Box,{component:"span",fontWeight:"bold",children:"Glissez-déposez"})," ","ou"," ",e.jsx(o.Box,{component:"span",fontWeight:"bold",children:"cliquez"})," ","pour choisir une image"]}),A=()=>e.jsxs(i.Typography,{textAlign:"center",fontSize:"14px",color:"grey.darker",children:[e.jsx(o.Box,{component:"span",fontWeight:"bold",children:"Glissez"})," ","une image"]}),P=({defaultLabel:h=e.jsx(D,{}),dragLabel:g=e.jsx(A,{}),information:n,onFileChange:s=t=>{},width:x="160px",height:m="160px",initialFile:u=null,...j})=>{const[t,l]=I.useState(u),y=r=>{const d=r[0]||null;l(d),s(d)},f=r=>{r.stopPropagation(),l(null),s(null)},b=r=>{r.stopPropagation(),a()},{open:a,getRootProps:k,getInputProps:z,isDragActive:v}=S.useDropzone({...j,maxFiles:1,onDropAccepted:y,accept:{"image/*":[".png",".jpeg",".jpg",".gif"]},noClick:!0});return e.jsxs(C.Stack,{direction:"column",justifyContent:"center",alignItems:"center",width:x,minWidth:"150px",minHeight:"150px",height:m,borderRadius:1,sx:{cursor:"pointer",position:"relative",background:`${!t&&"linear-gradient(180deg, #F5F7F9 0%, #FFF 100%)"}`,border:`${!t&&"1px dashed"}`,borderColor:r=>!t&&r.palette.grey.main},...k({onClick:a}),children:[e.jsx("input",{...z()}),t?e.jsxs(e.Fragment,{children:[e.jsxs(o.Box,{sx:{position:"absolute",top:"0.5rem",right:"0.5rem",display:"flex",gap:"0.3rem"},children:[e.jsx(o.Box,{onClick:b,sx:{backgroundColor:"common.white",display:"flex",borderRadius:"3px",alignItems:"center",justifyContent:"center",boxShadow:1,width:"2rem",height:"2rem",cursor:"pointer","&:hover":{backgroundColor:"grey.darker","& .MuiSvgIcon-root":{fill:r=>r.palette.common.white}}},children:e.jsx(F,{fontSize:"small"})}),e.jsx(o.Box,{onClick:f,sx:{backgroundColor:"common.white",display:"flex",borderRadius:"3px",alignItems:"center",boxShadow:1,justifyContent:"center",width:"2rem",height:"2rem",cursor:"pointer","&:hover":{backgroundColor:"grey.darker","& .MuiSvgIcon-root":{fill:r=>r.palette.common.white}}},children:e.jsx(w,{fontSize:"small"})})]}),e.jsx("img",{src:typeof t=="string"?t:URL.createObjectURL(t),alt:typeof t=="string"?t:t.name,style:{width:"100%",height:"100%",maxWidth:"100%",objectFit:"cover",borderRadius:"5px"}})]}):e.jsx(e.Fragment,{children:v?e.jsxs(e.Fragment,{children:[e.jsx(p,{color:"primary",style:{width:"2.5rem",height:"2.5rem"}}),g,n&&e.jsx(i.Typography,{textAlign:"center",fontSize:"12px",color:"grey",children:n})]}):e.jsxs(o.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",padding:"0.5rem",gap:"0.3rem"},children:[e.jsx(p,{color:"primary",style:{width:"2.5rem",height:"2.5rem"}}),h,n&&e.jsx(i.Typography,{textAlign:"center",fontSize:"12px",color:"grey",children:n})]})})]})};module.exports=P;
|
|
@@ -1,52 +1,59 @@
|
|
|
1
1
|
import { jsx as e, jsxs as o, Fragment as c } from "react/jsx-runtime";
|
|
2
|
-
import { c as
|
|
3
|
-
import { D as w } from "../../Delete-BkZN7Xu5.js";
|
|
2
|
+
import { c as a } from "../../createSvgIcon-K2ZAdASa.js";
|
|
4
3
|
import { Box as n } from "@mui/material";
|
|
5
|
-
import { useState as
|
|
6
|
-
import { u as
|
|
7
|
-
import { S as
|
|
8
|
-
import { T as l } from "../../Typography-
|
|
9
|
-
const m =
|
|
4
|
+
import { useState as w } from "react";
|
|
5
|
+
import { u as D } from "../../index-B1u7G33_.js";
|
|
6
|
+
import { S as F } from "../../Stack-hbAJHQhq.js";
|
|
7
|
+
import { T as l } from "../../Typography-SIQ6eleU.js";
|
|
8
|
+
const m = a(/* @__PURE__ */ e("path", {
|
|
10
9
|
d: "M19 7v2.99s-1.99.01-2 0V7h-3s.01-1.99 0-2h3V2h2v3h3v2zm-3 4V8h-3V5H5c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-8zM5 19l3-4 2 3 3-4 4 5z"
|
|
11
|
-
}), "AddPhotoAlternate"),
|
|
10
|
+
}), "AddPhotoAlternate"), A = a(/* @__PURE__ */ e("path", {
|
|
12
11
|
d: "M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.996.996 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"
|
|
13
|
-
}), "Create"),
|
|
12
|
+
}), "Create"), j = a(/* @__PURE__ */ e("path", {
|
|
13
|
+
d: "M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"
|
|
14
|
+
}), "Delete"), P = () => /* @__PURE__ */ o(l, { textAlign: "center", fontSize: "14px", color: "grey.darker", children: [
|
|
14
15
|
/* @__PURE__ */ e(n, { component: "span", fontWeight: "bold", children: "Glissez-déposez" }),
|
|
15
|
-
"
|
|
16
|
+
" ",
|
|
17
|
+
"ou",
|
|
18
|
+
" ",
|
|
16
19
|
/* @__PURE__ */ e(n, { component: "span", fontWeight: "bold", children: "cliquez" }),
|
|
17
|
-
"
|
|
18
|
-
|
|
20
|
+
" ",
|
|
21
|
+
"pour choisir une image"
|
|
22
|
+
] }), M = () => /* @__PURE__ */ o(l, { textAlign: "center", fontSize: "14px", color: "grey.darker", children: [
|
|
19
23
|
/* @__PURE__ */ e(n, { component: "span", fontWeight: "bold", children: "Glissez" }),
|
|
20
|
-
"
|
|
21
|
-
|
|
24
|
+
" ",
|
|
25
|
+
"une image"
|
|
26
|
+
] }), U = ({
|
|
22
27
|
defaultLabel: g = /* @__PURE__ */ e(P, {}),
|
|
23
|
-
dragLabel: u = /* @__PURE__ */ e(
|
|
28
|
+
dragLabel: u = /* @__PURE__ */ e(M, {}),
|
|
24
29
|
information: i,
|
|
25
|
-
onFileChange:
|
|
30
|
+
onFileChange: s = (t) => {
|
|
26
31
|
},
|
|
27
32
|
width: x = "160px",
|
|
28
33
|
height: f = "160px",
|
|
29
34
|
initialFile: y = null,
|
|
30
35
|
...b
|
|
31
36
|
}) => {
|
|
32
|
-
const [t,
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
},
|
|
38
|
-
r.stopPropagation(), d();
|
|
39
|
-
},
|
|
37
|
+
const [t, d] = w(
|
|
38
|
+
y
|
|
39
|
+
), z = (r) => {
|
|
40
|
+
const h = r[0] || null;
|
|
41
|
+
d(h), s(h);
|
|
42
|
+
}, k = (r) => {
|
|
43
|
+
r.stopPropagation(), d(null), s(null);
|
|
44
|
+
}, v = (r) => {
|
|
45
|
+
r.stopPropagation(), p();
|
|
46
|
+
}, { open: p, getRootProps: C, getInputProps: I, isDragActive: S } = D({
|
|
40
47
|
...b,
|
|
41
48
|
maxFiles: 1,
|
|
42
|
-
onDropAccepted:
|
|
49
|
+
onDropAccepted: z,
|
|
43
50
|
accept: {
|
|
44
51
|
"image/*": [".png", ".jpeg", ".jpg", ".gif"]
|
|
45
52
|
},
|
|
46
53
|
noClick: !0
|
|
47
54
|
});
|
|
48
55
|
return /* @__PURE__ */ o(
|
|
49
|
-
|
|
56
|
+
F,
|
|
50
57
|
{
|
|
51
58
|
direction: "column",
|
|
52
59
|
justifyContent: "center",
|
|
@@ -63,11 +70,11 @@ const m = h(/* @__PURE__ */ e("path", {
|
|
|
63
70
|
border: `${!t && "1px dashed"}`,
|
|
64
71
|
borderColor: (r) => !t && r.palette.grey.main
|
|
65
72
|
},
|
|
66
|
-
...
|
|
67
|
-
onClick:
|
|
73
|
+
...C({
|
|
74
|
+
onClick: p
|
|
68
75
|
}),
|
|
69
76
|
children: [
|
|
70
|
-
/* @__PURE__ */ e("input", { ...
|
|
77
|
+
/* @__PURE__ */ e("input", { ...I() }),
|
|
71
78
|
t ? /* @__PURE__ */ o(c, { children: [
|
|
72
79
|
/* @__PURE__ */ o(
|
|
73
80
|
n,
|
|
@@ -83,7 +90,7 @@ const m = h(/* @__PURE__ */ e("path", {
|
|
|
83
90
|
/* @__PURE__ */ e(
|
|
84
91
|
n,
|
|
85
92
|
{
|
|
86
|
-
onClick:
|
|
93
|
+
onClick: v,
|
|
87
94
|
sx: {
|
|
88
95
|
backgroundColor: "common.white",
|
|
89
96
|
display: "flex",
|
|
@@ -101,13 +108,13 @@ const m = h(/* @__PURE__ */ e("path", {
|
|
|
101
108
|
}
|
|
102
109
|
}
|
|
103
110
|
},
|
|
104
|
-
children: /* @__PURE__ */ e(
|
|
111
|
+
children: /* @__PURE__ */ e(A, { fontSize: "small" })
|
|
105
112
|
}
|
|
106
113
|
),
|
|
107
114
|
/* @__PURE__ */ e(
|
|
108
115
|
n,
|
|
109
116
|
{
|
|
110
|
-
onClick:
|
|
117
|
+
onClick: k,
|
|
111
118
|
sx: {
|
|
112
119
|
backgroundColor: "common.white",
|
|
113
120
|
display: "flex",
|
|
@@ -125,7 +132,7 @@ const m = h(/* @__PURE__ */ e("path", {
|
|
|
125
132
|
}
|
|
126
133
|
}
|
|
127
134
|
},
|
|
128
|
-
children: /* @__PURE__ */ e(
|
|
135
|
+
children: /* @__PURE__ */ e(j, { fontSize: "small" })
|
|
129
136
|
}
|
|
130
137
|
)
|
|
131
138
|
]
|
|
@@ -137,7 +144,7 @@ const m = h(/* @__PURE__ */ e("path", {
|
|
|
137
144
|
src: typeof t == "string" ? t : URL.createObjectURL(t),
|
|
138
145
|
alt: typeof t == "string" ? t : t.name,
|
|
139
146
|
style: {
|
|
140
|
-
width: "
|
|
147
|
+
width: "100%",
|
|
141
148
|
height: "100%",
|
|
142
149
|
maxWidth: "100%",
|
|
143
150
|
objectFit: "cover",
|
|
@@ -145,31 +152,49 @@ const m = h(/* @__PURE__ */ e("path", {
|
|
|
145
152
|
}
|
|
146
153
|
}
|
|
147
154
|
)
|
|
148
|
-
] }) : /* @__PURE__ */ e(c, { children:
|
|
149
|
-
/* @__PURE__ */ e(
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
155
|
+
] }) : /* @__PURE__ */ e(c, { children: S ? /* @__PURE__ */ o(c, { children: [
|
|
156
|
+
/* @__PURE__ */ e(
|
|
157
|
+
m,
|
|
158
|
+
{
|
|
159
|
+
color: "primary",
|
|
160
|
+
style: {
|
|
161
|
+
width: "2.5rem",
|
|
162
|
+
height: "2.5rem"
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
),
|
|
153
166
|
u,
|
|
154
167
|
i && /* @__PURE__ */ e(l, { textAlign: "center", fontSize: "12px", color: "grey", children: i })
|
|
155
|
-
] }) : /* @__PURE__ */ o(
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
168
|
+
] }) : /* @__PURE__ */ o(
|
|
169
|
+
n,
|
|
170
|
+
{
|
|
171
|
+
sx: {
|
|
172
|
+
display: "flex",
|
|
173
|
+
flexDirection: "column",
|
|
174
|
+
alignItems: "center",
|
|
175
|
+
padding: "0.5rem",
|
|
176
|
+
gap: "0.3rem"
|
|
177
|
+
},
|
|
178
|
+
children: [
|
|
179
|
+
/* @__PURE__ */ e(
|
|
180
|
+
m,
|
|
181
|
+
{
|
|
182
|
+
color: "primary",
|
|
183
|
+
style: {
|
|
184
|
+
width: "2.5rem",
|
|
185
|
+
height: "2.5rem"
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
),
|
|
189
|
+
g,
|
|
190
|
+
i && /* @__PURE__ */ e(l, { textAlign: "center", fontSize: "12px", color: "grey", children: i })
|
|
191
|
+
]
|
|
192
|
+
}
|
|
193
|
+
) })
|
|
169
194
|
]
|
|
170
195
|
}
|
|
171
196
|
);
|
|
172
197
|
};
|
|
173
198
|
export {
|
|
174
|
-
|
|
199
|
+
U as default
|
|
175
200
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require('../../assets/styles.css');const e=require("react/jsx-runtime");;/* empty css */const r=require("../../Box-
|
|
1
|
+
"use strict";require('../../assets/styles.css');const e=require("react/jsx-runtime");;/* empty css */const r=require("../../Box-DYA49L7w.cjs"),s=({})=>e.jsx(r.Box,{className:"cs-loader",color:"primary.main",children:e.jsxs(r.Box,{className:"cs-loader-inner",children:[e.jsx("label",{children:"●"}),e.jsx("label",{children:"●"}),e.jsx("label",{children:"●"}),e.jsx("label",{children:"●"})]})});module.exports=s;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as r, jsxs as e } from "react/jsx-runtime";
|
|
2
2
|
import '../../assets/styles.css';/* empty css */
|
|
3
|
-
import { B as l } from "../../Box-
|
|
3
|
+
import { B as l } from "../../Box-DgqaLb7j.js";
|
|
4
4
|
const i = ({}) => /* @__PURE__ */ r(l, { className: "cs-loader", color: "primary.main", children: /* @__PURE__ */ e(l, { className: "cs-loader-inner", children: [
|
|
5
5
|
/* @__PURE__ */ r("label", { children: "●" }),
|
|
6
6
|
/* @__PURE__ */ r("label", { children: "●" }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require('../../assets/styles2.css');const r=require("react/jsx-runtime");;/* empty css */const e=require("../../Backdrop-
|
|
1
|
+
"use strict";require('../../assets/styles2.css');const r=require("react/jsx-runtime");;/* empty css */const e=require("../../Backdrop-DWp3AktL.cjs"),c=require("../../Box-DYA49L7w.cjs"),l=({})=>r.jsx(e.Backdrop,{open:!0,sx:{bgcolor:"background.default"},children:r.jsxs(c.Box,{className:"cs-loader-backdrop-inner",color:"primary.main",children:[r.jsx("label",{children:"●"}),r.jsx("label",{children:"●"}),r.jsx("label",{children:"●"}),r.jsx("label",{children:"●"})]})});module.exports=l;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as r, jsxs as o } from "react/jsx-runtime";
|
|
2
2
|
import '../../assets/styles2.css';/* empty css */
|
|
3
|
-
import { B as e } from "../../Backdrop-
|
|
4
|
-
import { B as l } from "../../Box-
|
|
3
|
+
import { B as e } from "../../Backdrop-BctCVgLy.js";
|
|
4
|
+
import { B as l } from "../../Box-DgqaLb7j.js";
|
|
5
5
|
const n = ({}) => /* @__PURE__ */ r(e, { open: !0, sx: { bgcolor: "background.default" }, children: /* @__PURE__ */ o(l, { className: "cs-loader-backdrop-inner", color: "primary.main", children: [
|
|
6
6
|
/* @__PURE__ */ r("label", { children: "●" }),
|
|
7
7
|
/* @__PURE__ */ r("label", { children: "●" }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require('../../assets/styles2.css');require('../../assets/styles.css');const e=require("react/jsx-runtime"),u=require("react")
|
|
1
|
+
"use strict";require('../../assets/styles2.css');require('../../assets/styles.css');const e=require("react/jsx-runtime"),u=require("react");require("../Alert/Alert.cjs.js");require("../Button/Button.cjs.js");require("../../fr-JE-1WKP6.cjs");require("@mui/material");require("../FileList/FileListItem.cjs.js");;/* empty css */;/* empty css */require("../ResourceCard/style.cjs.js");require("../SearchInput/SearchInput.cjs.js");const l=require("../TextInput/TextInput.cjs.js"),a=require("../../InputAdornment-CwFEJSXv.cjs"),d=require("../../IconButton-CVOPR4EM.cjs"),n=require("../../createSvgIcon-DJMYlO0S.cjs"),q=n.createSvgIcon(e.jsx("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"}),"Visibility"),p=n.createSvgIcon(e.jsx("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z"}),"VisibilityOff"),w=s=>{const[r,i]=u.useState(!1),o=()=>i(t=>!t),c=t=>{t.preventDefault()};return e.jsx(l,{...s,variant:"outlined",label:s.label,type:r?"text":"password",InputProps:{endAdornment:e.jsx(a.InputAdornment,{position:"end",children:e.jsx(d.IconButton,{"aria-label":"toggle password visibility",onClick:o,onMouseDown:c,edge:"end",children:r?e.jsx(p,{}):e.jsx(q,{})})})}})};module.exports=w;
|
|
@@ -1,34 +1,36 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { useState as a } from "react";
|
|
3
|
-
import c from "../TextInput/TextInput.es.js";
|
|
4
3
|
import "../Alert/Alert.es.js";
|
|
5
4
|
import "../Button/Button.es.js";
|
|
6
|
-
import "../../fr-
|
|
5
|
+
import "../../fr-B3qrCNcK.js";
|
|
7
6
|
import "@mui/material";
|
|
7
|
+
import "../FileList/FileListItem.es.js";
|
|
8
8
|
import '../../assets/styles2.css';import '../../assets/styles.css';/* empty css */
|
|
9
9
|
/* empty css */
|
|
10
|
+
import "../ResourceCard/style.es.js";
|
|
10
11
|
import "../SearchInput/SearchInput.es.js";
|
|
11
|
-
import
|
|
12
|
-
import { I as m } from "../../
|
|
13
|
-
import {
|
|
12
|
+
import p from "../TextInput/TextInput.es.js";
|
|
13
|
+
import { I as m } from "../../InputAdornment-DL8XIM8r.js";
|
|
14
|
+
import { I as c } from "../../IconButton-CCNUMz2l.js";
|
|
15
|
+
import { c as r } from "../../createSvgIcon-K2ZAdASa.js";
|
|
14
16
|
const d = r(/* @__PURE__ */ o("path", {
|
|
15
17
|
d: "M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"
|
|
16
18
|
}), "Visibility"), f = r(/* @__PURE__ */ o("path", {
|
|
17
19
|
d: "M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z"
|
|
18
|
-
}), "VisibilityOff"),
|
|
20
|
+
}), "VisibilityOff"), k = (i) => {
|
|
19
21
|
const [s, e] = a(!1), n = () => e((t) => !t), l = (t) => {
|
|
20
22
|
t.preventDefault();
|
|
21
23
|
};
|
|
22
24
|
return /* @__PURE__ */ o(
|
|
23
|
-
|
|
25
|
+
p,
|
|
24
26
|
{
|
|
25
27
|
...i,
|
|
26
28
|
variant: "outlined",
|
|
27
29
|
label: i.label,
|
|
28
30
|
type: s ? "text" : "password",
|
|
29
31
|
InputProps: {
|
|
30
|
-
endAdornment: /* @__PURE__ */ o(
|
|
31
|
-
|
|
32
|
+
endAdornment: /* @__PURE__ */ o(m, { position: "end", children: /* @__PURE__ */ o(
|
|
33
|
+
c,
|
|
32
34
|
{
|
|
33
35
|
"aria-label": "toggle password visibility",
|
|
34
36
|
onClick: n,
|
|
@@ -42,5 +44,5 @@ const d = r(/* @__PURE__ */ o("path", {
|
|
|
42
44
|
);
|
|
43
45
|
};
|
|
44
46
|
export {
|
|
45
|
-
|
|
47
|
+
k as default
|
|
46
48
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const s=require("react/jsx-runtime"),e=require("../EmptyState/EmptyState.cjs.js"),i=require("./helpers.cjs.js"),n=({error:t,statusPrefix:u="Erreur "})=>{if(i.isFetchBaseQueryError(t)){const r="error"in t?t.error:t.data?JSON.stringify(t.data):null;return typeof t.status=="number"&&t.status.toString().startsWith("4")?s.jsx(e,{svgName:"client-error",title:`Erreur client (${t.status})`,description:r??void 0}):typeof t.status=="number"&&t.status.toString().startsWith("5")?s.jsx(e,{svgName:"server-error",title:`Erreur serveur (${t.status})`,description:r??void 0}):s.jsx(e,{svgName:"error",title:`${u}${t.status}`,description:r??void 0})}return s.jsx(e,{svgName:"error",title:i.isErrorWithMessage(t)?t.message:"Une erreur est survenue"})};module.exports=n;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { SerializedError } from '@reduxjs/toolkit';
|
|
2
2
|
import { FetchBaseQueryError } from '@reduxjs/toolkit/query';
|
|
3
|
-
export
|
|
3
|
+
export type QueryErrorProps = {
|
|
4
4
|
error: FetchBaseQueryError | SerializedError | undefined;
|
|
5
5
|
statusPrefix?: string;
|
|
6
|
-
}
|
|
6
|
+
};
|
|
7
7
|
declare const QueryError: React.FunctionComponent<QueryErrorProps>;
|
|
8
8
|
export default QueryError;
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import { isFetchBaseQueryError as u, isErrorWithMessage as
|
|
4
|
-
const
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import e from "../EmptyState/EmptyState.es.js";
|
|
3
|
+
import { isFetchBaseQueryError as u, isErrorWithMessage as a } from "./helpers.es.js";
|
|
4
|
+
const f = ({
|
|
5
5
|
error: t,
|
|
6
6
|
statusPrefix: i = "Erreur "
|
|
7
7
|
}) => {
|
|
8
8
|
if (u(t)) {
|
|
9
9
|
const r = "error" in t ? t.error : t.data ? JSON.stringify(t.data) : null;
|
|
10
|
-
return typeof t.status == "number" && t.status.toString().startsWith("4") ? /* @__PURE__ */
|
|
11
|
-
|
|
10
|
+
return typeof t.status == "number" && t.status.toString().startsWith("4") ? /* @__PURE__ */ s(
|
|
11
|
+
e,
|
|
12
12
|
{
|
|
13
13
|
svgName: "client-error",
|
|
14
14
|
title: `Erreur client (${t.status})`,
|
|
15
15
|
description: r ?? void 0
|
|
16
16
|
}
|
|
17
|
-
) : typeof t.status == "number" && t.status.toString().startsWith("5") ? /* @__PURE__ */
|
|
18
|
-
|
|
17
|
+
) : typeof t.status == "number" && t.status.toString().startsWith("5") ? /* @__PURE__ */ s(
|
|
18
|
+
e,
|
|
19
19
|
{
|
|
20
20
|
svgName: "server-error",
|
|
21
21
|
title: `Erreur serveur (${t.status})`,
|
|
22
22
|
description: r ?? void 0
|
|
23
23
|
}
|
|
24
|
-
) : /* @__PURE__ */
|
|
25
|
-
|
|
24
|
+
) : /* @__PURE__ */ s(
|
|
25
|
+
e,
|
|
26
26
|
{
|
|
27
27
|
svgName: "error",
|
|
28
28
|
title: `${i}${t.status}`,
|
|
@@ -30,14 +30,14 @@ const d = ({
|
|
|
30
30
|
}
|
|
31
31
|
);
|
|
32
32
|
}
|
|
33
|
-
return /* @__PURE__ */
|
|
34
|
-
|
|
33
|
+
return /* @__PURE__ */ s(
|
|
34
|
+
e,
|
|
35
35
|
{
|
|
36
36
|
svgName: "error",
|
|
37
|
-
title:
|
|
37
|
+
title: a(t) ? t.message : "Une erreur est survenue"
|
|
38
38
|
}
|
|
39
39
|
);
|
|
40
40
|
};
|
|
41
41
|
export {
|
|
42
|
-
|
|
42
|
+
f as default
|
|
43
43
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const r=require("react/jsx-runtime"),m=require("../../createSvgIcon-DJMYlO0S.cjs"),d=require("@mui/material"),b=require("../EllipsisWithTooltip/EllipsisWithTooltip.cjs.js"),o=require("./style.cjs.js"),j=m.createSvgIcon(r.jsx("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"MoreVert"),g=({isSelected:l=!1,onSelect:x=()=>{},image:u,title:n,defaultImage:h,propertyItems:i=[],infoIcons:s=[],size:t="md",width:p,onClick:c=()=>{}})=>(s=s.slice(0,3),r.jsx(d.Box,{sx:{width:p&&t==="md"?p:"320px"},children:r.jsxs(o.StyledCard,{selected:l,size:t,onClick:c,onKeyDown:e=>{(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),c==null||c())},role:"button",tabIndex:0,"aria-label":`Resource card for ${n}`,children:[r.jsx(o.SelectedIcon,{onClick:e=>{e.preventDefault(),e.stopPropagation(),x()},onKeyDown:e=>{(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),e.stopPropagation(),x())},className:"selected-icon",selected:l,role:"button",tabIndex:0,"aria-label":l?"Unselect card":"Select card",children:r.jsx(j,{})}),r.jsx(d.Stack,{sx:{width:t=="sm"?110:"100%",display:"flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box"},children:r.jsx(o.ResourceCardImage,{image:u,defaultImage:h,size:t,role:"img","aria-label":`Image for ${n}`})}),r.jsxs(o.ResourceCardBody,{size:t,children:[r.jsx(b,{typographyProps:{fontWeight:"700",fontSize:"1.1rem"},tooltipProps:{placement:"bottom",arrow:!0},children:n}),i.length>0&&i.map((e,a)=>r.jsxs(o.ResourcePropertyItem,{size:t,role:"group","aria-label":`Property ${a}`,children:[e.icon,r.jsx(o.ResourcePropertyText,{isLast:a===i.length-1,size:t,width:p,children:e.text})]},`property-${a}`)),r.jsx(o.PublicIconWrapper,{size:t,children:s.length>0&&s.map((e,a)=>r.jsx(d.Tooltip,{title:e.text,placement:"top",arrow:!0,children:r.jsx(o.ResourceIconItem,{size:t,role:"button",tabIndex:0,"aria-label":e.text,children:e.icon})},`info-${a}`))})]})]})}));module.exports=g;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type PropertyItem = {
|
|
3
|
+
text: ReactNode;
|
|
4
|
+
icon?: ReactNode;
|
|
5
|
+
};
|
|
6
|
+
export type InfoItem = {
|
|
7
|
+
text: string;
|
|
8
|
+
icon: ReactNode;
|
|
9
|
+
};
|
|
10
|
+
export type ResourceCardSize = "md" | "sm";
|
|
11
|
+
export type ResourceCardProps = {
|
|
12
|
+
isSelected?: boolean;
|
|
13
|
+
onSelect?: () => void;
|
|
14
|
+
image?: string;
|
|
15
|
+
defaultImage: string;
|
|
16
|
+
title: string;
|
|
17
|
+
propertyItems?: PropertyItem[];
|
|
18
|
+
infoIcons?: InfoItem[];
|
|
19
|
+
size?: ResourceCardSize;
|
|
20
|
+
width?: string;
|
|
21
|
+
onClick?: () => void;
|
|
22
|
+
};
|
|
23
|
+
declare const ResourceCard: React.FunctionComponent<ResourceCardProps>;
|
|
24
|
+
export default ResourceCard;
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
2
|
+
import { c as h } from "../../createSvgIcon-K2ZAdASa.js";
|
|
3
|
+
import { Box as b, Stack as x, Tooltip as f } from "@mui/material";
|
|
4
|
+
import g from "../EllipsisWithTooltip/EllipsisWithTooltip.es.js";
|
|
5
|
+
import { StyledCard as y, SelectedIcon as P, ResourceCardImage as R, ResourceCardBody as I, ResourcePropertyItem as D, ResourcePropertyText as $, PublicIconWrapper as v, ResourceIconItem as w } from "./style.es.js";
|
|
6
|
+
const S = h(/* @__PURE__ */ r("path", {
|
|
7
|
+
d: "M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"
|
|
8
|
+
}), "MoreVert"), B = ({
|
|
9
|
+
isSelected: c = !1,
|
|
10
|
+
onSelect: m = () => {
|
|
11
|
+
},
|
|
12
|
+
image: s,
|
|
13
|
+
title: n,
|
|
14
|
+
defaultImage: u,
|
|
15
|
+
propertyItems: p = [],
|
|
16
|
+
infoIcons: a = [],
|
|
17
|
+
size: t = "md",
|
|
18
|
+
width: d,
|
|
19
|
+
onClick: l = () => {
|
|
20
|
+
}
|
|
21
|
+
}) => (a = a.slice(0, 3), /* @__PURE__ */ r(b, { sx: { width: d && t === "md" ? d : "320px" }, children: /* @__PURE__ */ i(
|
|
22
|
+
y,
|
|
23
|
+
{
|
|
24
|
+
selected: c,
|
|
25
|
+
size: t,
|
|
26
|
+
onClick: l,
|
|
27
|
+
onKeyDown: (e) => {
|
|
28
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), l == null || l());
|
|
29
|
+
},
|
|
30
|
+
role: "button",
|
|
31
|
+
tabIndex: 0,
|
|
32
|
+
"aria-label": `Resource card for ${n}`,
|
|
33
|
+
children: [
|
|
34
|
+
/* @__PURE__ */ r(
|
|
35
|
+
P,
|
|
36
|
+
{
|
|
37
|
+
onClick: (e) => {
|
|
38
|
+
e.preventDefault(), e.stopPropagation(), m();
|
|
39
|
+
},
|
|
40
|
+
onKeyDown: (e) => {
|
|
41
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), m());
|
|
42
|
+
},
|
|
43
|
+
className: "selected-icon",
|
|
44
|
+
selected: c,
|
|
45
|
+
role: "button",
|
|
46
|
+
tabIndex: 0,
|
|
47
|
+
"aria-label": c ? "Unselect card" : "Select card",
|
|
48
|
+
children: /* @__PURE__ */ r(S, {})
|
|
49
|
+
}
|
|
50
|
+
),
|
|
51
|
+
/* @__PURE__ */ r(
|
|
52
|
+
x,
|
|
53
|
+
{
|
|
54
|
+
sx: {
|
|
55
|
+
width: t == "sm" ? 110 : "100%",
|
|
56
|
+
display: "flex",
|
|
57
|
+
alignItems: "center",
|
|
58
|
+
justifyContent: "center",
|
|
59
|
+
boxSizing: "border-box"
|
|
60
|
+
},
|
|
61
|
+
children: /* @__PURE__ */ r(
|
|
62
|
+
R,
|
|
63
|
+
{
|
|
64
|
+
image: s,
|
|
65
|
+
defaultImage: u,
|
|
66
|
+
size: t,
|
|
67
|
+
role: "img",
|
|
68
|
+
"aria-label": `Image for ${n}`
|
|
69
|
+
}
|
|
70
|
+
)
|
|
71
|
+
}
|
|
72
|
+
),
|
|
73
|
+
/* @__PURE__ */ i(I, { size: t, children: [
|
|
74
|
+
/* @__PURE__ */ r(
|
|
75
|
+
g,
|
|
76
|
+
{
|
|
77
|
+
typographyProps: { fontWeight: "700", fontSize: "1.1rem" },
|
|
78
|
+
tooltipProps: { placement: "bottom", arrow: !0 },
|
|
79
|
+
children: n
|
|
80
|
+
}
|
|
81
|
+
),
|
|
82
|
+
p.length > 0 && p.map((e, o) => /* @__PURE__ */ i(
|
|
83
|
+
D,
|
|
84
|
+
{
|
|
85
|
+
size: t,
|
|
86
|
+
role: "group",
|
|
87
|
+
"aria-label": `Property ${o}`,
|
|
88
|
+
children: [
|
|
89
|
+
e.icon,
|
|
90
|
+
/* @__PURE__ */ r(
|
|
91
|
+
$,
|
|
92
|
+
{
|
|
93
|
+
isLast: o === p.length - 1,
|
|
94
|
+
size: t,
|
|
95
|
+
width: d,
|
|
96
|
+
children: e.text
|
|
97
|
+
}
|
|
98
|
+
)
|
|
99
|
+
]
|
|
100
|
+
},
|
|
101
|
+
`property-${o}`
|
|
102
|
+
)),
|
|
103
|
+
/* @__PURE__ */ r(v, { size: t, children: a.length > 0 && a.map((e, o) => /* @__PURE__ */ r(
|
|
104
|
+
f,
|
|
105
|
+
{
|
|
106
|
+
title: e.text,
|
|
107
|
+
placement: "top",
|
|
108
|
+
arrow: !0,
|
|
109
|
+
children: /* @__PURE__ */ r(
|
|
110
|
+
w,
|
|
111
|
+
{
|
|
112
|
+
size: t,
|
|
113
|
+
role: "button",
|
|
114
|
+
tabIndex: 0,
|
|
115
|
+
"aria-label": e.text,
|
|
116
|
+
children: e.icon
|
|
117
|
+
}
|
|
118
|
+
)
|
|
119
|
+
},
|
|
120
|
+
`info-${o}`
|
|
121
|
+
)) })
|
|
122
|
+
] })
|
|
123
|
+
]
|
|
124
|
+
}
|
|
125
|
+
) }));
|
|
126
|
+
export {
|
|
127
|
+
B as default
|
|
128
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./ResourceCard.cjs.js");exports.ResourceCard=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("@mui/material"),i=t.styled(t.Card)(({theme:e,selected:o,size:r})=>({boxShadow:"0px 4px 12px rgba(0, 0, 0, 0.1), 0px 2px 4px rgba(0, 0, 0, 0.06)",borderRadius:"0.5rem",height:"auto",border:"2px solid transparent",transition:"border-color 0.2s ease-in-out",position:"relative",...r==="sm"&&{display:"flex",width:"100%"},...o&&{borderColor:e.palette.primary.light},"&:hover":{"& .MuiBox-root.selected-icon":{opacity:1,visibility:"visible"}}})),a=t.styled(t.Box)(({theme:e,selected:o})=>({position:"absolute",top:0,right:0,width:"2rem",height:"2rem",background:e.palette.common.white,display:"flex",justifyContent:"center",alignItems:"center",padding:".8rem",borderRadius:".5rem",visibility:"visible",opacity:0,cursor:"pointer",transition:"opacity 0.2s ease-in-out, visibility 0.2s ease-in-out",...o&&{background:e.palette.primary.lighter,opacity:1,visibility:"visible"},"&:hover, &:focus":{background:e.palette.primary.lighter,opacity:1},"& .MuiSvgIcon-root":{color:e.palette.primary.main}})),s=t.styled(t.CardMedia)(({size:e,image:o,defaultImage:r})=>({height:e=="sm"?85:180,width:e=="sm"?85:"calc(100% - 2rem)",objectFit:"cover",margin:e=="sm"?"0 10px":"1rem",borderRadius:"0.5rem",...!o&&e==="md"&&{backgroundImage:`url(${r})`,backgroundRepeat:"repeat",backgroundSize:"20% 20%",backgroundPosition:"center",opacity:"0.7"}})),n=t.styled(t.CardContent)(({size:e})=>({padding:e=="sm"?".7rem 5px .7rem 0 !important":"0 16px 16px 16px !important",width:e==="sm"?"calc(100% - 110px)":"100%"})),p=t.styled(t.Box)(({size:e})=>({display:"flex",alignItems:"center",marginTop:"0.5rem",...e==="sm"&&{svg:{width:".8em",height:".8em"}}})),c=t.styled(t.Box)(({size:e,width:o,isLast:r})=>({marginLeft:e==="sm"?".3rem":".5rem",fontSize:e==="sm"?"12px":"15px","& .MuiTypography-root":{paddingTop:"2px",fontSize:e==="sm"?"12px":"15px"},...r&&!o&&{textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",maxWidth:e==="sm"?"110px":"172px"}})),d=t.styled(t.Box)(({size:e})=>({display:"inline-flex",alignItems:"center",justifyContent:"center",width:"fit-content",height:"fit-content",...e==="sm"&&{svg:{width:".8em",height:".8em"}}})),l=t.styled(t.Box)(({size:e})=>({position:"absolute",bottom:e==="sm"?".65rem":"16px",right:e==="sm"?"8px":"16px",display:"flex",gap:".2rem"}));exports.PublicIconWrapper=l;exports.ResourceCardBody=n;exports.ResourceCardImage=s;exports.ResourceIconItem=d;exports.ResourcePropertyItem=p;exports.ResourcePropertyText=c;exports.SelectedIcon=a;exports.StyledCard=i;
|