@cgi-learning-hub/ui 1.9.0-dev.1758268283 → 1.9.0-dev.1758559075

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.
Files changed (510) hide show
  1. package/dist/index.cjs.js +63058 -1
  2. package/dist/index.cjs.js.map +1 -0
  3. package/dist/index.css +138 -0
  4. package/dist/index.d.ts +751 -1
  5. package/dist/index.es.js +63035 -433
  6. package/dist/index.es.js.map +1 -0
  7. package/package.json +14 -15
  8. package/dist/Alert-BH_3hKCB.cjs +0 -1
  9. package/dist/Alert-BeVYzSS-.js +0 -94
  10. package/dist/Alert-BoYBWOXe.cjs +0 -1
  11. package/dist/Alert-CEu3llDi.js +0 -369
  12. package/dist/Autocomplete-BgtRO16l.cjs +0 -6
  13. package/dist/Autocomplete-CYZGxJpy.js +0 -1881
  14. package/dist/Backdrop-BvL371G3.js +0 -360
  15. package/dist/Backdrop-qOBrabpf.cjs +0 -1
  16. package/dist/Badge-2Kgbx-Cs.js +0 -466
  17. package/dist/Badge-DXl0Da36.cjs +0 -1
  18. package/dist/Box-BaZ7KlAc.js +0 -59
  19. package/dist/Box-CYQlQqRB.cjs +0 -1
  20. package/dist/Button-BP-QmmUu.cjs +0 -1
  21. package/dist/Button-C1mKNW-c.js +0 -698
  22. package/dist/ButtonBase-C2jRC_V7.js +0 -883
  23. package/dist/ButtonBase-DSJojbNE.cjs +0 -74
  24. package/dist/CardContent-DVcUynuH.cjs +0 -1
  25. package/dist/CardContent-kIapWv4T.js +0 -225
  26. package/dist/Checkbox-DhhuvKO5.cjs +0 -1
  27. package/dist/Checkbox-RxHWtafR.js +0 -271
  28. package/dist/Chip-DgGmi9yn.js +0 -574
  29. package/dist/Chip-n1kY-Dsh.cjs +0 -1
  30. package/dist/CircularProgress-BOm4zz7e.cjs +0 -28
  31. package/dist/CircularProgress-CLq0Rl-1.js +0 -253
  32. package/dist/Close-DR9m6hv3.cjs +0 -1
  33. package/dist/Close-vu-MZYNA.js +0 -9
  34. package/dist/CloseRounded-Cpp6nWQi.cjs +0 -1
  35. package/dist/CloseRounded-DF05lCUu.js +0 -8
  36. package/dist/CustomTreeItem-AecanDDg.js +0 -2046
  37. package/dist/CustomTreeItem-BBMp0k4i.cjs +0 -41
  38. package/dist/DatePicker-UgrKaJQy.js +0 -10758
  39. package/dist/DatePicker-ikRScuPG.cjs +0 -16
  40. package/dist/DefaultPropsProvider-BrmlvPWg.js +0 -312
  41. package/dist/DefaultPropsProvider-C1g4BXET.cjs +0 -1
  42. package/dist/Delete-C36W48MB.cjs +0 -1
  43. package/dist/Delete-DXUljXzP.js +0 -8
  44. package/dist/Dialog-C2HYr67H.cjs +0 -1
  45. package/dist/Dialog-D__8rwpw.js +0 -469
  46. package/dist/DialogContent-MPwmUJQp.js +0 -195
  47. package/dist/DialogContent-lup2v_ab.cjs +0 -1
  48. package/dist/DialogTitle-B8jOk7ZE.cjs +0 -1
  49. package/dist/DialogTitle-Dly5D3Ud.js +0 -134
  50. package/dist/Divider-BN12gMv9.js +0 -297
  51. package/dist/Divider-wisA5Qp_.cjs +0 -1
  52. package/dist/Folder-BSZMyA2L.js +0 -8
  53. package/dist/Folder-aAI_w_uF.cjs +0 -1
  54. package/dist/FormLabel-ByYWZh7M.cjs +0 -2
  55. package/dist/FormLabel-DtxJI2CU.js +0 -408
  56. package/dist/Grid-C0LY-MbT.js +0 -419
  57. package/dist/Grid-CPXE25PR.cjs +0 -2
  58. package/dist/Grow-6zwoqUfO.cjs +0 -1
  59. package/dist/Grow-CeGwnQpw.js +0 -197
  60. package/dist/IconButton-BTN16gZi.cjs +0 -2
  61. package/dist/IconButton-DBjiNqOa.js +0 -299
  62. package/dist/InputAdornment-C1r1YutO.cjs +0 -1
  63. package/dist/InputAdornment-DuR35FtU.js +0 -173
  64. package/dist/InputBase-BSlOG3kE.cjs +0 -4
  65. package/dist/InputBase-Bejmx-67.js +0 -798
  66. package/dist/Link-T11NCxGd.cjs +0 -1
  67. package/dist/Link-hWCqsQiI.js +0 -281
  68. package/dist/List-CmJ1jCss.js +0 -131
  69. package/dist/List-eQ4D0MvJ.cjs +0 -1
  70. package/dist/ListItem-CgWgbZ_g.cjs +0 -1
  71. package/dist/ListItem-onoPfwb4.js +0 -423
  72. package/dist/ListItemText-B-dySXgz.cjs +0 -1
  73. package/dist/ListItemText-BjhXxIIV.js +0 -441
  74. package/dist/Menu-D3pHSNKn.cjs +0 -7
  75. package/dist/Menu-DnbZe8y-.js +0 -918
  76. package/dist/MenuItem-Cusmy5t2.js +0 -268
  77. package/dist/MenuItem-D-4xzo-S.cjs +0 -1
  78. package/dist/Modal-DB9K8sJI.cjs +0 -2
  79. package/dist/Modal-DtjScKxh.js +0 -744
  80. package/dist/MoreVert-BwfUF9pO.cjs +0 -1
  81. package/dist/MoreVert-woCQ0dNf.js +0 -8
  82. package/dist/Paper-CZXfHfN_.js +0 -158
  83. package/dist/Paper-DcVuAxq3.cjs +0 -2
  84. package/dist/Popper-BwuGO_Si.js +0 -1407
  85. package/dist/Popper-D5Cs38W_.cjs +0 -4
  86. package/dist/Portal-Cmv45gpL.cjs +0 -1
  87. package/dist/Portal-PkRJuFYN.js +0 -85
  88. package/dist/Radio-DiyDpiVL.js +0 -617
  89. package/dist/Radio-DzKwkI68.cjs +0 -1
  90. package/dist/RadioGroup-BlkHQVRF.cjs +0 -1
  91. package/dist/RadioGroup-CjUaFqjJ.js +0 -191
  92. package/dist/Select-DyEZ55iV.cjs +0 -3
  93. package/dist/Select-L9Xb238J.js +0 -2648
  94. package/dist/Stack-ChvZzNqc.cjs +0 -1
  95. package/dist/Stack-pMJEpL7k.js +0 -173
  96. package/dist/Stepper-BsfN7O-W.cjs +0 -1
  97. package/dist/Stepper-DyH4sgY5.js +0 -966
  98. package/dist/Switch-BgZUmsKc.js +0 -392
  99. package/dist/Switch-Dr2jgPGV.cjs +0 -1
  100. package/dist/SwitchBase-BP_I-APE.cjs +0 -1
  101. package/dist/SwitchBase-BWz31Ed6.js +0 -319
  102. package/dist/Tab-Bksf_S4K.js +0 -1454
  103. package/dist/Tab-D2mI5G0L.cjs +0 -4
  104. package/dist/TextField-CfHWjd-c.cjs +0 -1
  105. package/dist/TextField-Dt84Mrje.js +0 -560
  106. package/dist/Tooltip-C5AffX17.js +0 -722
  107. package/dist/Tooltip-CUm8vKGq.cjs +0 -4
  108. package/dist/TransitionGroupContext-DbLioz_6.js +0 -24
  109. package/dist/TransitionGroupContext-Zt4NoR0u.cjs +0 -1
  110. package/dist/Typography-Cr-aIusw.js +0 -261
  111. package/dist/Typography-DHjq4GzQ.cjs +0 -1
  112. package/dist/Zoom-CUWaLRDY.js +0 -9252
  113. package/dist/Zoom-D30Zatsh.cjs +0 -138
  114. package/dist/assets/Loader.css +0 -1
  115. package/dist/assets/LoaderBackdrop.css +0 -1
  116. package/dist/capitalize-3OjkeP9i.cjs +0 -1
  117. package/dist/capitalize-BHEX83JQ.js +0 -9
  118. package/dist/chainPropTypes-CEUi6Jb4.cjs +0 -1
  119. package/dist/chainPropTypes-D9lkm76m.js +0 -8
  120. package/dist/client-error-CHkavqXs.cjs +0 -1
  121. package/dist/client-error-D0Ng5oOn.js +0 -393
  122. package/dist/components/ActionBar/ActionBar.cjs.js +0 -1
  123. package/dist/components/ActionBar/ActionBar.d.ts +0 -3
  124. package/dist/components/ActionBar/ActionBar.es.js +0 -63
  125. package/dist/components/ActionBar/index.cjs.js +0 -1
  126. package/dist/components/ActionBar/index.d.ts +0 -2
  127. package/dist/components/ActionBar/index.es.js +0 -4
  128. package/dist/components/ActionBar/style.cjs.js +0 -1
  129. package/dist/components/ActionBar/style.es.js +0 -61
  130. package/dist/components/ActionBar/types.cjs.js +0 -1
  131. package/dist/components/ActionBar/types.d.ts +0 -17
  132. package/dist/components/ActionBar/types.es.js +0 -1
  133. package/dist/components/Alert/Alert.cjs.js +0 -1
  134. package/dist/components/Alert/Alert.d.ts +0 -6
  135. package/dist/components/Alert/Alert.es.js +0 -8
  136. package/dist/components/Alert/index.cjs.js +0 -1
  137. package/dist/components/Alert/index.d.ts +0 -2
  138. package/dist/components/Alert/index.es.js +0 -4
  139. package/dist/components/Button/Button.cjs.js +0 -1
  140. package/dist/components/Button/Button.d.ts +0 -4
  141. package/dist/components/Button/Button.es.js +0 -44
  142. package/dist/components/Button/index.cjs.js +0 -1
  143. package/dist/components/Button/index.d.ts +0 -2
  144. package/dist/components/Button/index.es.js +0 -4
  145. package/dist/components/ButtonGroup/ButtonGroup.cjs.js +0 -1
  146. package/dist/components/ButtonGroup/ButtonGroup.d.ts +0 -3
  147. package/dist/components/ButtonGroup/ButtonGroup.es.js +0 -38
  148. package/dist/components/ButtonGroup/index.cjs.js +0 -1
  149. package/dist/components/ButtonGroup/index.d.ts +0 -2
  150. package/dist/components/ButtonGroup/index.es.js +0 -4
  151. package/dist/components/ButtonGroup/style.cjs.js +0 -1
  152. package/dist/components/ButtonGroup/style.es.js +0 -29
  153. package/dist/components/ButtonGroup/types.cjs.js +0 -1
  154. package/dist/components/ButtonGroup/types.d.ts +0 -22
  155. package/dist/components/ButtonGroup/types.es.js +0 -1
  156. package/dist/components/ColorPicker/ColorPicker.cjs.js +0 -27
  157. package/dist/components/ColorPicker/ColorPicker.d.ts +0 -4
  158. package/dist/components/ColorPicker/ColorPicker.es.js +0 -7960
  159. package/dist/components/ColorPicker/ColorPickerIcon.cjs.js +0 -1
  160. package/dist/components/ColorPicker/ColorPickerIcon.d.ts +0 -5
  161. package/dist/components/ColorPicker/ColorPickerIcon.es.js +0 -58
  162. package/dist/components/ColorPicker/index.cjs.js +0 -1
  163. package/dist/components/ColorPicker/index.d.ts +0 -3
  164. package/dist/components/ColorPicker/index.es.js +0 -4
  165. package/dist/components/ColorPicker/styles.cjs.js +0 -1
  166. package/dist/components/ColorPicker/styles.es.js +0 -28
  167. package/dist/components/ColorPicker/types.cjs.js +0 -1
  168. package/dist/components/ColorPicker/types.d.ts +0 -19
  169. package/dist/components/ColorPicker/types.es.js +0 -1
  170. package/dist/components/DatePicker/DatePicker.cjs.js +0 -1
  171. package/dist/components/DatePicker/DatePicker.d.ts +0 -6
  172. package/dist/components/DatePicker/DatePicker.es.js +0 -5
  173. package/dist/components/DatePicker/index.cjs.js +0 -1
  174. package/dist/components/DatePicker/index.d.ts +0 -2
  175. package/dist/components/DatePicker/index.es.js +0 -4
  176. package/dist/components/Dialog/Dialog.cjs.js +0 -1
  177. package/dist/components/Dialog/Dialog.d.ts +0 -6
  178. package/dist/components/Dialog/Dialog.es.js +0 -31
  179. package/dist/components/Dialog/index.cjs.js +0 -1
  180. package/dist/components/Dialog/index.d.ts +0 -2
  181. package/dist/components/Dialog/index.es.js +0 -4
  182. package/dist/components/Dropzone/Dropzone.cjs.js +0 -1
  183. package/dist/components/Dropzone/Dropzone.d.ts +0 -12
  184. package/dist/components/Dropzone/Dropzone.es.js +0 -55
  185. package/dist/components/Dropzone/index.cjs.js +0 -1
  186. package/dist/components/Dropzone/index.d.ts +0 -2
  187. package/dist/components/Dropzone/index.es.js +0 -4
  188. package/dist/components/Dropzone/types.cjs.js +0 -1
  189. package/dist/components/Dropzone/types.d.ts +0 -8
  190. package/dist/components/Dropzone/types.es.js +0 -1
  191. package/dist/components/EllipsisWithTooltip/EllipsisWithTooltip.cjs.js +0 -1
  192. package/dist/components/EllipsisWithTooltip/EllipsisWithTooltip.d.ts +0 -9
  193. package/dist/components/EllipsisWithTooltip/EllipsisWithTooltip.es.js +0 -45
  194. package/dist/components/EllipsisWithTooltip/index.cjs.js +0 -1
  195. package/dist/components/EllipsisWithTooltip/index.d.ts +0 -2
  196. package/dist/components/EllipsisWithTooltip/index.es.js +0 -4
  197. package/dist/components/EmptyState/EmptyState.cjs.js +0 -1
  198. package/dist/components/EmptyState/EmptyState.d.ts +0 -22
  199. package/dist/components/EmptyState/EmptyState.es.js +0 -34
  200. package/dist/components/EmptyState/index.cjs.js +0 -1
  201. package/dist/components/EmptyState/index.d.ts +0 -2
  202. package/dist/components/EmptyState/index.es.js +0 -4
  203. package/dist/components/FileList/FileIcon.cjs.js +0 -1
  204. package/dist/components/FileList/FileIcon.d.ts +0 -3
  205. package/dist/components/FileList/FileIcon.es.js +0 -56
  206. package/dist/components/FileList/FileInfosSeparator.cjs.js +0 -1
  207. package/dist/components/FileList/FileInfosSeparator.d.ts +0 -1
  208. package/dist/components/FileList/FileInfosSeparator.es.js +0 -14
  209. package/dist/components/FileList/FileList.cjs.js +0 -1
  210. package/dist/components/FileList/FileList.d.ts +0 -9
  211. package/dist/components/FileList/FileList.es.js +0 -24
  212. package/dist/components/FileList/FileListItem.cjs.js +0 -1
  213. package/dist/components/FileList/FileListItem.d.ts +0 -16
  214. package/dist/components/FileList/FileListItem.es.js +0 -122
  215. package/dist/components/FileList/index.cjs.js +0 -1
  216. package/dist/components/FileList/index.d.ts +0 -4
  217. package/dist/components/FileList/index.es.js +0 -6
  218. package/dist/components/FileList/utils.cjs.js +0 -1
  219. package/dist/components/FileList/utils.d.ts +0 -2
  220. package/dist/components/FileList/utils.es.js +0 -13
  221. package/dist/components/FolderCard/FolderCard.cjs.js +0 -1
  222. package/dist/components/FolderCard/FolderCard.d.ts +0 -12
  223. package/dist/components/FolderCard/FolderCard.es.js +0 -88
  224. package/dist/components/FolderCard/index.cjs.js +0 -1
  225. package/dist/components/FolderCard/index.d.ts +0 -2
  226. package/dist/components/FolderCard/index.es.js +0 -4
  227. package/dist/components/FolderCard/styles.cjs.js +0 -1
  228. package/dist/components/FolderCard/styles.d.ts +0 -24
  229. package/dist/components/FolderCard/styles.es.js +0 -27
  230. package/dist/components/FolderCard/types.cjs.js +0 -1
  231. package/dist/components/FolderCard/types.d.ts +0 -3
  232. package/dist/components/FolderCard/types.es.js +0 -14
  233. package/dist/components/Heading/Heading.cjs.js +0 -1
  234. package/dist/components/Heading/Heading.d.ts +0 -14
  235. package/dist/components/Heading/Heading.es.js +0 -39
  236. package/dist/components/Heading/index.cjs.js +0 -1
  237. package/dist/components/Heading/index.d.ts +0 -2
  238. package/dist/components/Heading/index.es.js +0 -4
  239. package/dist/components/ImagePicker/ImagePicker.cjs.js +0 -1
  240. package/dist/components/ImagePicker/ImagePicker.d.ts +0 -13
  241. package/dist/components/ImagePicker/ImagePicker.es.js +0 -203
  242. package/dist/components/ImagePicker/index.cjs.js +0 -1
  243. package/dist/components/ImagePicker/index.d.ts +0 -2
  244. package/dist/components/ImagePicker/index.es.js +0 -4
  245. package/dist/components/Loader/Loader.cjs.js +0 -1
  246. package/dist/components/Loader/Loader.d.ts +0 -3
  247. package/dist/components/Loader/Loader.es.js +0 -11
  248. package/dist/components/Loader/index.cjs.js +0 -1
  249. package/dist/components/Loader/index.d.ts +0 -2
  250. package/dist/components/Loader/index.es.js +0 -4
  251. package/dist/components/LoaderBackdrop/LoaderBackdrop.cjs.js +0 -1
  252. package/dist/components/LoaderBackdrop/LoaderBackdrop.d.ts +0 -3
  253. package/dist/components/LoaderBackdrop/LoaderBackdrop.es.js +0 -12
  254. package/dist/components/LoaderBackdrop/index.cjs.js +0 -1
  255. package/dist/components/LoaderBackdrop/index.d.ts +0 -2
  256. package/dist/components/LoaderBackdrop/index.es.js +0 -4
  257. package/dist/components/PasswordInput/PasswordInput.cjs.js +0 -1
  258. package/dist/components/PasswordInput/PasswordInput.d.ts +0 -5
  259. package/dist/components/PasswordInput/PasswordInput.es.js +0 -39
  260. package/dist/components/PasswordInput/index.cjs.js +0 -1
  261. package/dist/components/PasswordInput/index.d.ts +0 -2
  262. package/dist/components/PasswordInput/index.es.js +0 -4
  263. package/dist/components/QueryError/QueryError.cjs.js +0 -1
  264. package/dist/components/QueryError/QueryError.d.ts +0 -8
  265. package/dist/components/QueryError/QueryError.es.js +0 -46
  266. package/dist/components/QueryError/helpers.cjs.js +0 -1
  267. package/dist/components/QueryError/helpers.d.ts +0 -11
  268. package/dist/components/QueryError/helpers.es.js +0 -10
  269. package/dist/components/QueryError/index.cjs.js +0 -1
  270. package/dist/components/QueryError/index.d.ts +0 -2
  271. package/dist/components/QueryError/index.es.js +0 -4
  272. package/dist/components/ResourceCard/ResourceCard.cjs.js +0 -1
  273. package/dist/components/ResourceCard/ResourceCard.d.ts +0 -25
  274. package/dist/components/ResourceCard/ResourceCard.es.js +0 -128
  275. package/dist/components/ResourceCard/index.cjs.js +0 -1
  276. package/dist/components/ResourceCard/index.d.ts +0 -2
  277. package/dist/components/ResourceCard/index.es.js +0 -4
  278. package/dist/components/ResourceCard/style.cjs.js +0 -1
  279. package/dist/components/ResourceCard/style.es.js +0 -130
  280. package/dist/components/SearchInput/SearchInput.cjs.js +0 -1
  281. package/dist/components/SearchInput/SearchInput.d.ts +0 -4
  282. package/dist/components/SearchInput/SearchInput.es.js +0 -38
  283. package/dist/components/SearchInput/index.cjs.js +0 -1
  284. package/dist/components/SearchInput/index.d.ts +0 -2
  285. package/dist/components/SearchInput/index.es.js +0 -4
  286. package/dist/components/TreeView/TreeView.cjs.js +0 -5
  287. package/dist/components/TreeView/TreeView.d.ts +0 -4
  288. package/dist/components/TreeView/TreeView.es.js +0 -1663
  289. package/dist/components/TreeView/components/CustomTreeItem.cjs.js +0 -1
  290. package/dist/components/TreeView/components/CustomTreeItem.d.ts +0 -6
  291. package/dist/components/TreeView/components/CustomTreeItem.es.js +0 -9
  292. package/dist/components/TreeView/index.cjs.js +0 -1
  293. package/dist/components/TreeView/index.d.ts +0 -2
  294. package/dist/components/TreeView/index.es.js +0 -6
  295. package/dist/components/TreeView/style.cjs.js +0 -1
  296. package/dist/components/TreeView/style.es.js +0 -35
  297. package/dist/components/TreeView/types.cjs.js +0 -1
  298. package/dist/components/TreeView/types.d.ts +0 -45
  299. package/dist/components/TreeView/types.es.js +0 -4
  300. package/dist/components/TreeView/utils.cjs.js +0 -1
  301. package/dist/components/TreeView/utils.d.ts +0 -6
  302. package/dist/components/TreeView/utils.es.js +0 -50
  303. package/dist/components/index.cjs.js +0 -1
  304. package/dist/components/index.d.ts +0 -209
  305. package/dist/components/index.es.js +0 -435
  306. package/dist/components/stories/ActionBar.stories.cjs.js +0 -1
  307. package/dist/components/stories/ActionBar.stories.d.ts +0 -11
  308. package/dist/components/stories/ActionBar.stories.es.js +0 -206
  309. package/dist/components/stories/Alert.stories.cjs.js +0 -1
  310. package/dist/components/stories/Alert.stories.d.ts +0 -9
  311. package/dist/components/stories/Alert.stories.es.js +0 -32
  312. package/dist/components/stories/Autocomplete.stories.cjs.js +0 -3
  313. package/dist/components/stories/Autocomplete.stories.d.ts +0 -6
  314. package/dist/components/stories/Autocomplete.stories.es.js +0 -62
  315. package/dist/components/stories/Badge.stories.cjs.js +0 -1
  316. package/dist/components/stories/Badge.stories.d.ts +0 -17
  317. package/dist/components/stories/Badge.stories.es.js +0 -188
  318. package/dist/components/stories/Button.stories.cjs.js +0 -1
  319. package/dist/components/stories/Button.stories.d.ts +0 -8
  320. package/dist/components/stories/Button.stories.es.js +0 -61
  321. package/dist/components/stories/ButtonGroup.stories.cjs.js +0 -153
  322. package/dist/components/stories/ButtonGroup.stories.d.ts +0 -17
  323. package/dist/components/stories/ButtonGroup.stories.es.js +0 -1296
  324. package/dist/components/stories/Card.stories.cjs.js +0 -1
  325. package/dist/components/stories/Card.stories.d.ts +0 -7
  326. package/dist/components/stories/Card.stories.es.js +0 -42
  327. package/dist/components/stories/Checkbox.stories.cjs.js +0 -1
  328. package/dist/components/stories/Checkbox.stories.d.ts +0 -10
  329. package/dist/components/stories/Checkbox.stories.es.js +0 -57
  330. package/dist/components/stories/Chip.stories.cjs.js +0 -1
  331. package/dist/components/stories/Chip.stories.d.ts +0 -10
  332. package/dist/components/stories/Chip.stories.es.js +0 -77
  333. package/dist/components/stories/ColoPicker.stories.cjs.js +0 -1
  334. package/dist/components/stories/ColoPicker.stories.d.ts +0 -6
  335. package/dist/components/stories/ColoPicker.stories.es.js +0 -23
  336. package/dist/components/stories/DatePicker.stories.cjs.js +0 -1
  337. package/dist/components/stories/DatePicker.stories.d.ts +0 -6
  338. package/dist/components/stories/DatePicker.stories.es.js +0 -13
  339. package/dist/components/stories/Dialog.stories.cjs.js +0 -1
  340. package/dist/components/stories/Dialog.stories.d.ts +0 -7
  341. package/dist/components/stories/Dialog.stories.es.js +0 -65
  342. package/dist/components/stories/Divider.stories.cjs.js +0 -1
  343. package/dist/components/stories/Divider.stories.d.ts +0 -6
  344. package/dist/components/stories/Divider.stories.es.js +0 -41
  345. package/dist/components/stories/Dropzone.stories.cjs.js +0 -1
  346. package/dist/components/stories/Dropzone.stories.d.ts +0 -6
  347. package/dist/components/stories/Dropzone.stories.es.js +0 -14
  348. package/dist/components/stories/EllipsisWithTooltip.stories.cjs.js +0 -1
  349. package/dist/components/stories/EllipsisWithTooltip.stories.d.ts +0 -6
  350. package/dist/components/stories/EllipsisWithTooltip.stories.es.js +0 -36
  351. package/dist/components/stories/EmptyState.stories.cjs.js +0 -1
  352. package/dist/components/stories/EmptyState.stories.d.ts +0 -6
  353. package/dist/components/stories/EmptyState.stories.es.js +0 -30
  354. package/dist/components/stories/FileList.stories.cjs.js +0 -8
  355. package/dist/components/stories/FileList.stories.d.ts +0 -6
  356. package/dist/components/stories/FileList.stories.es.js +0 -150
  357. package/dist/components/stories/FolderCard.stories.cjs.js +0 -1
  358. package/dist/components/stories/FolderCard.stories.d.ts +0 -7
  359. package/dist/components/stories/FolderCard.stories.es.js +0 -71
  360. package/dist/components/stories/FormControlLabel.stories.cjs.js +0 -1
  361. package/dist/components/stories/FormControlLabel.stories.d.ts +0 -9
  362. package/dist/components/stories/FormControlLabel.stories.es.js +0 -55
  363. package/dist/components/stories/Heading.stories.cjs.js +0 -1
  364. package/dist/components/stories/Heading.stories.d.ts +0 -6
  365. package/dist/components/stories/Heading.stories.es.js +0 -20
  366. package/dist/components/stories/IconButton.stories.cjs.js +0 -1
  367. package/dist/components/stories/IconButton.stories.d.ts +0 -6
  368. package/dist/components/stories/IconButton.stories.es.js +0 -55
  369. package/dist/components/stories/ImagePicker.stories.cjs.js +0 -1
  370. package/dist/components/stories/ImagePicker.stories.d.ts +0 -6
  371. package/dist/components/stories/ImagePicker.stories.es.js +0 -57
  372. package/dist/components/stories/Link.stories.cjs.js +0 -1
  373. package/dist/components/stories/Link.stories.d.ts +0 -7
  374. package/dist/components/stories/Link.stories.es.js +0 -43
  375. package/dist/components/stories/Loader.stories.cjs.js +0 -1
  376. package/dist/components/stories/Loader.stories.d.ts +0 -6
  377. package/dist/components/stories/Loader.stories.es.js +0 -11
  378. package/dist/components/stories/LoaderBackdrop.stories.cjs.js +0 -1
  379. package/dist/components/stories/LoaderBackdrop.stories.d.ts +0 -6
  380. package/dist/components/stories/LoaderBackdrop.stories.es.js +0 -11
  381. package/dist/components/stories/Menu.stories.cjs.js +0 -1
  382. package/dist/components/stories/Menu.stories.d.ts +0 -7
  383. package/dist/components/stories/Menu.stories.es.js +0 -51
  384. package/dist/components/stories/Paper.stories.cjs.js +0 -1
  385. package/dist/components/stories/Paper.stories.d.ts +0 -7
  386. package/dist/components/stories/Paper.stories.es.js +0 -28
  387. package/dist/components/stories/PasswordInput.stories.cjs.js +0 -1
  388. package/dist/components/stories/PasswordInput.stories.d.ts +0 -6
  389. package/dist/components/stories/PasswordInput.stories.es.js +0 -13
  390. package/dist/components/stories/RadioGroup.stories.cjs.js +0 -1
  391. package/dist/components/stories/RadioGroup.stories.d.ts +0 -8
  392. package/dist/components/stories/RadioGroup.stories.es.js +0 -37
  393. package/dist/components/stories/ResourceCard.stories.cjs.js +0 -1
  394. package/dist/components/stories/ResourceCard.stories.d.ts +0 -9
  395. package/dist/components/stories/ResourceCard.stories.es.js +0 -141
  396. package/dist/components/stories/SearchInput.stories.cjs.js +0 -1
  397. package/dist/components/stories/SearchInput.stories.d.ts +0 -6
  398. package/dist/components/stories/SearchInput.stories.es.js +0 -13
  399. package/dist/components/stories/Select.stories.cjs.js +0 -1
  400. package/dist/components/stories/Select.stories.d.ts +0 -10
  401. package/dist/components/stories/Select.stories.es.js +0 -52
  402. package/dist/components/stories/Stepper.stories.cjs.js +0 -1
  403. package/dist/components/stories/Stepper.stories.d.ts +0 -7
  404. package/dist/components/stories/Stepper.stories.es.js +0 -161
  405. package/dist/components/stories/TabList.stories.cjs.js +0 -1
  406. package/dist/components/stories/TabList.stories.d.ts +0 -7
  407. package/dist/components/stories/TabList.stories.es.js +0 -73
  408. package/dist/components/stories/TextField.stories.cjs.js +0 -1
  409. package/dist/components/stories/TextField.stories.d.ts +0 -10
  410. package/dist/components/stories/TextField.stories.es.js +0 -69
  411. package/dist/components/stories/Tooltip.stories.cjs.js +0 -1
  412. package/dist/components/stories/Tooltip.stories.d.ts +0 -7
  413. package/dist/components/stories/Tooltip.stories.es.js +0 -46
  414. package/dist/components/stories/TreeView.stories.cjs.js +0 -69
  415. package/dist/components/stories/TreeView.stories.d.ts +0 -15
  416. package/dist/components/stories/TreeView.stories.es.js +0 -1036
  417. package/dist/components/stories/Typography.stories.cjs.js +0 -1
  418. package/dist/components/stories/Typography.stories.d.ts +0 -6
  419. package/dist/components/stories/Typography.stories.es.js +0 -65
  420. package/dist/composeClasses-BskurlZX.js +0 -51
  421. package/dist/composeClasses-vN5Almps.cjs +0 -1
  422. package/dist/createChainedFunction-C0nujS3O.js +0 -9
  423. package/dist/createChainedFunction-CJmlQuW8.cjs +0 -1
  424. package/dist/createSimplePaletteValueFilter-B7--0ryQ.js +0 -17
  425. package/dist/createSimplePaletteValueFilter-PTK3TAhW.cjs +0 -1
  426. package/dist/createSvgIcon-CcWpa9Le.cjs +0 -1
  427. package/dist/createSvgIcon-DFIM5PqN.js +0 -254
  428. package/dist/debounce-46wSf_lW.js +0 -15
  429. package/dist/debounce-DpCj7ugL.cjs +0 -1
  430. package/dist/dividerClasses-BEzQ_reA.js +0 -9
  431. package/dist/dividerClasses-BpVbhp8e.cjs +0 -1
  432. package/dist/elementAcceptingRef-CZLfau9O.js +0 -31
  433. package/dist/elementAcceptingRef-CuMilXz3.cjs +0 -1
  434. package/dist/elementTypeAcceptingRef-vRb2iI4O.js +0 -23
  435. package/dist/elementTypeAcceptingRef-vjR5jGLx.cjs +0 -1
  436. package/dist/error-CRNeivL7.js +0 -5
  437. package/dist/error-Dk3o6ber.cjs +0 -1
  438. package/dist/extendSxProp-DGsHTtAe.js +0 -37
  439. package/dist/extendSxProp-Dwd9vpYv.cjs +0 -1
  440. package/dist/formControlState-CuX6WjAX.cjs +0 -1
  441. package/dist/formControlState-vgaj2ksH.js +0 -10
  442. package/dist/generateUtilityClasses-B_xKAflz.js +0 -2703
  443. package/dist/generateUtilityClasses-CENS22bI.cjs +0 -55
  444. package/dist/hooks/lazySvgImport.cjs.js +0 -1
  445. package/dist/hooks/lazySvgImport.d.ts +0 -6
  446. package/dist/hooks/lazySvgImport.es.js +0 -34
  447. package/dist/index-B9vkf41S.js +0 -672
  448. package/dist/index-BPpGXp0s.cjs +0 -1
  449. package/dist/index-BS46Ff4t.cjs +0 -5
  450. package/dist/index-Ba4TEBpP.js +0 -22
  451. package/dist/index-CJMnfcQs.js +0 -2152
  452. package/dist/index-CwHv-blH.js +0 -97
  453. package/dist/index-D_kvDIOz.cjs +0 -1
  454. package/dist/index-kjfz41UI.cjs +0 -20
  455. package/dist/integerPropType-BihGt2aU.js +0 -31
  456. package/dist/integerPropType-CR7ytEJG.cjs +0 -1
  457. package/dist/isFocusVisible-CPZqtjv2.js +0 -12
  458. package/dist/isFocusVisible-DlSijby6.cjs +0 -2
  459. package/dist/isHostComponent-PydJW4A4.cjs +0 -1
  460. package/dist/isHostComponent-kiaBvYVo.js +0 -6
  461. package/dist/isMuiElement-BzDAj3yJ.cjs +0 -1
  462. package/dist/isMuiElement-DnSE4qG4.js +0 -13
  463. package/dist/listItemTextClasses-CEbo8A-K.js +0 -9
  464. package/dist/listItemTextClasses-wcJANWC3.cjs +0 -1
  465. package/dist/memoTheme-Bi1UNdyO.cjs +0 -1
  466. package/dist/memoTheme-C-PaH-Cy.js +0 -15
  467. package/dist/mergeSlotProps-CL6s5QgQ.cjs +0 -1
  468. package/dist/mergeSlotProps-DVtjofCS.js +0 -62
  469. package/dist/ownerDocument-4MViGo3k.cjs +0 -1
  470. package/dist/ownerDocument-CUrv0DIK.js +0 -6
  471. package/dist/ownerWindow-DDHucZi0.cjs +0 -1
  472. package/dist/ownerWindow-niciwP7I.js +0 -7
  473. package/dist/refType-8hihVLUh.js +0 -5
  474. package/dist/refType-DJyA--UV.cjs +0 -1
  475. package/dist/server-error-CqyYyPLN.cjs +0 -1
  476. package/dist/server-error-CvgIy7ap.js +0 -398
  477. package/dist/unsupportedProp-Bn6XWqwH.cjs +0 -1
  478. package/dist/unsupportedProp-BuVD30Gh.js +0 -9
  479. package/dist/useControlled-QrrYcKxm.cjs +0 -3
  480. package/dist/useControlled-nm4pBabJ.js +0 -31
  481. package/dist/useEventCallback-BxpcFap0.cjs +0 -1
  482. package/dist/useEventCallback-Y2KwRxBw.js +0 -15
  483. package/dist/useForkRef-CFhhTu-Q.cjs +0 -1
  484. package/dist/useForkRef-u29GSuCu.js +0 -27
  485. package/dist/useFormControl-CatNKXAi.js +0 -10
  486. package/dist/useFormControl-haP0iPhl.cjs +0 -1
  487. package/dist/useId-CK6Kn3Tn.js +0 -21
  488. package/dist/useId-DNXtOFeX.cjs +0 -1
  489. package/dist/usePreviousProps-ByGlbpJ6.js +0 -10
  490. package/dist/usePreviousProps-jC3PWcIp.cjs +0 -1
  491. package/dist/useSlot-BSkdRaZr.js +0 -125
  492. package/dist/useSlot-C-aMxEm0.cjs +0 -1
  493. package/dist/useSlotProps-BVVfeURp.cjs +0 -1
  494. package/dist/useSlotProps-CWTjRiRv.js +0 -25
  495. package/dist/useTheme-0AkY41zn.js +0 -11
  496. package/dist/useTheme-BT6SDKkk.cjs +0 -1
  497. package/dist/useTheme-BrGF2Vm0.cjs +0 -1
  498. package/dist/useTheme-DSA6Ir8k.js +0 -18
  499. package/dist/useThemeProps-BWsN0TEk.cjs +0 -1
  500. package/dist/useThemeProps-CAonvyKa.js +0 -27
  501. package/dist/useThemeProps-JozrkyA_.cjs +0 -1
  502. package/dist/useThemeProps-hSh1qhnc.js +0 -17
  503. package/dist/useTimeout-COCrDKz-.cjs +0 -1
  504. package/dist/useTimeout-CrCYVizI.js +0 -42
  505. package/dist/utils-BWx1W_q1.cjs +0 -1
  506. package/dist/utils-B_pVp6UZ.js +0 -363
  507. package/dist/utils-DWqc1kRF.js +0 -13
  508. package/dist/utils-XujN9ndp.cjs +0 -1
  509. package/dist/warning-C8W811fV.js +0 -11
  510. package/dist/warning-DMUNDgRg.cjs +0 -2
@@ -1,1296 +0,0 @@
1
- import { jsx as e, jsxs as n } from "react/jsx-runtime";
2
- import { c as S } from "../../createSvgIcon-DFIM5PqN.js";
3
- import { useState as u, useCallback as w } from "react";
4
- import p from "../ButtonGroup/ButtonGroup.es.js";
5
- import { B as m } from "../../Box-BaZ7KlAc.js";
6
- import { T as t } from "../../Typography-Cr-aIusw.js";
7
- import { G as l } from "../../Grid-C0LY-MbT.js";
8
- import { B as y } from "../../Button-C1mKNW-c.js";
9
- import { P as s } from "../../Paper-CZXfHfN_.js";
10
- const M = S(/* @__PURE__ */ e("path", {
11
- d: "M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2M8 11H4V6h4zm6 0h-4V6h4zm6 0h-4V6h4zM8 18H4v-5h4zm6 0h-4v-5h4zm6 0h-4v-5h4z"
12
- }), "CalendarViewMonth"), z = S(/* @__PURE__ */ e("path", {
13
- fillRule: "evenodd",
14
- d: "M3 3v8h8V3zm6 6H5V5h4zm-6 4v8h8v-8zm6 6H5v-4h4zm4-16v8h8V3zm6 6h-4V5h4zm-6 4v8h8v-8zm6 6h-4v-4h4z"
15
- }), "GridView"), x = S(/* @__PURE__ */ e("path", {
16
- d: "M3 13h2v-2H3zm0 4h2v-2H3zm0-8h2V7H3zm4 4h14v-2H7zm0 4h14v-2H7zM7 7v2h14V7z"
17
- }), "List"), V = S(/* @__PURE__ */ e("path", {
18
- d: "M21 8H3V4h18zm0 2H3v4h18zm0 6H3v4h18z"
19
- }), "TableRows"), T = S(/* @__PURE__ */ e("path", {
20
- d: "M2 4v7h20V4zm8 16h12v-7H10zm-8 0h6v-7H2z"
21
- }), "ViewComfy"), B = S(/* @__PURE__ */ e("path", {
22
- d: "M14.67 5v6.5H9.33V5zm1 6.5H21V5h-5.33zm-1 7.5v-6.5H9.33V19zm1-6.5V19H21v-6.5zm-7.34 0H3V19h5.33zm0-1V5H3v6.5z"
23
- }), "ViewModule"), F = {
24
- title: "Components/ButtonGroup",
25
- component: p,
26
- argTypes: {
27
- buttonList: {
28
- description: "**[Requis]** Liste des boutons à afficher dans le ButtonGroup.",
29
- control: "object",
30
- table: {
31
- required: !0,
32
- type: { summary: "readonly ButtonItem[]" }
33
- }
34
- },
35
- viewMode: {
36
- description: "**[Requis]** Valeur actuellement sélectionnée.",
37
- control: "text",
38
- table: {
39
- required: !0,
40
- type: { summary: "T[number]['value']" }
41
- }
42
- },
43
- onChange: {
44
- description: "**[Requis]** Fonction appelée lorsqu'un bouton est sélectionné.",
45
- table: {
46
- required: !0,
47
- type: {
48
- summary: "(value: T[number]['value']) => void"
49
- }
50
- }
51
- },
52
- colorVariant: {
53
- description: "**[Optionnel]** Variante de couleur des boutons.",
54
- control: "select",
55
- options: ["primary", "secondary"],
56
- defaultValue: "primary",
57
- table: {
58
- required: !1,
59
- type: { summary: "ColorVariant" },
60
- defaultValue: { summary: "primary" }
61
- }
62
- },
63
- size: {
64
- description: "**[Optionnel]** Taille des boutons.",
65
- control: "select",
66
- options: ["small", "medium", "large"],
67
- defaultValue: "small",
68
- table: {
69
- required: !1,
70
- type: { summary: "string" },
71
- defaultValue: { summary: "small" }
72
- }
73
- },
74
- orientation: {
75
- description: "**[Optionnel]** Orientation du groupe de boutons.",
76
- control: "select",
77
- options: ["horizontal", "vertical"],
78
- defaultValue: "horizontal",
79
- table: {
80
- required: !1,
81
- type: { summary: "string" },
82
- defaultValue: { summary: "horizontal" }
83
- }
84
- }
85
- },
86
- parameters: {
87
- docs: {
88
- description: {
89
- component: `
90
- ## ButtonGroup
91
-
92
- Un composant générique TypeScript pour permettre à l'utilisateur de basculer entre différents modes d'affichage ou options avec une sécurité de type complète.
93
-
94
- ### 🔥 Typage générique et sécurité des types
95
-
96
- Le ButtonGroup utilise TypeScript générique avancé pour inférer automatiquement les types des valeurs possibles à partir de la liste des boutons fournie. **Il n'est plus nécessaire de définir un enum**, les types sont déduits automatiquement grâce à la magie de TypeScript !
97
-
98
- **Point clé** : Utilisez toujours \`as const\` après votre tableau de boutons pour permettre l'inférence de type littéral.
99
-
100
- ### 🎯 Utilisation recommandée pour éviter les types 'any'
101
-
102
- \`\`\`typescript
103
- // ✅ CORRECT : Définition avec 'as const' pour l'inférence de type
104
- const viewButtons = [
105
- { value: "cards", icon: <ViewModuleIcon /> },
106
- { value: "table", icon: <TableRowsIcon /> },
107
- { value: "list", icon: <ListIcon /> }
108
- ] as const; // ← IMPORTANT : ne pas oublier 'as const'
109
-
110
- // ✅ CORRECT : Typage explicite pour le state et le handler
111
- type ViewType = (typeof viewButtons)[number]["value"]; // "cards" | "table" | "list"
112
-
113
- const [currentView, setCurrentView] = useState<ViewType>("cards");
114
-
115
- const handleViewChange = useCallback((value: ViewType) => {
116
- console.log(\`Vue sélectionnée: \${value}\`); // ← value est typé correctement
117
- setCurrentView(value);
118
- }, []);
119
-
120
- <ButtonGroup
121
- buttonList={viewButtons}
122
- viewMode={currentView}
123
- onChange={handleViewChange} // ← Pas d'erreur 'any' !
124
- />
125
- \`\`\`
126
-
127
- ### ❌ À éviter : patterns qui causent des types 'any'
128
-
129
- \`\`\`typescript
130
- // ❌ INCORRECT : Sans 'as const'
131
- const viewButtons = [
132
- { value: "cards", icon: <ViewModuleIcon /> },
133
- { value: "table", icon: <TableRowsIcon /> }
134
- ]; // ← types inférés comme 'string' au lieu de littéraux
135
-
136
- // ❌ INCORRECT : Handler sans typage explicite
137
- const handleViewChange = (value) => { // ← 'value' aura le type 'any'
138
- setCurrentView(value);
139
- };
140
- \`\`\`
141
-
142
- ### 🛠️ Personnalisation
143
-
144
- - \`colorVariant\`: Choix entre les palettes "primary" et "secondary"
145
- - \`size\`: Contrôle la taille des boutons ("small", "medium", "large")
146
- - \`orientation\`: Affichage horizontal ou vertical du groupe de boutons
147
- - \`disabled\`: Possibilité de désactiver individuellement certains boutons
148
-
149
- ### 📋 Structure des données
150
-
151
- Le composant attend un tableau d'objets \`ButtonItem\` typé de manière générique :
152
-
153
- \`\`\`typescript
154
- interface ButtonItem<T extends string = string> {
155
- value: T; // Valeur unique pour ce bouton (obligatoire)
156
- icon: ReactNode; // Icône à afficher (obligatoire)
157
- disabled?: boolean; // Désactiver ce bouton spécifique (facultatif)
158
- }
159
-
160
- // Le composant infère automatiquement T à partir de votre tableau
161
- type SwitchViewProps<T extends readonly ButtonItem<string>[]> = {
162
- buttonList: T;
163
- viewMode: T[number]["value"]; // Type inféré automatiquement
164
- onChange: (value: T[number]["value"]) => void; // Type inféré automatiquement
165
- // ... autres props
166
- }
167
- \`\`\`
168
-
169
- ### 🎉 Avantages du typage générique
170
-
171
- 1. **Auto-complétion** : IDE suggère automatiquement les valeurs possibles
172
- 2. **Vérification à la compilation** : Erreurs détectées avant l'exécution
173
- 3. **Refactoring sûr** : Renommer une valeur met à jour toutes les références
174
- 4. **Documentation vivante** : Les types servent de documentation
175
-
176
- ### 💡 Conseils pour une utilisation optimale
177
-
178
- 1. **Utilisez des types helper** pour éviter la répétition :
179
- \`\`\`typescript
180
- type ViewConfig = typeof viewButtons;
181
- type ViewType = ViewConfig[number]["value"];
182
- \`\`\`
183
-
184
- 2. **Créez des constantes réutilisables** :
185
- \`\`\`typescript
186
- export const VIEW_MODES = {
187
- CARDS: "cards",
188
- TABLE: "table",
189
- LIST: "list"
190
- } as const;
191
-
192
- const viewButtons = [
193
- { value: VIEW_MODES.CARDS, icon: <ViewModuleIcon /> },
194
- // ...
195
- ] as const;
196
- \`\`\`
197
-
198
- 3. **Utilisez des factory functions** pour des configurations complexes :
199
- \`\`\`typescript
200
- const createViewButton = <T extends string>(value: T, icon: ReactNode) =>
201
- ({ value, icon } as const);
202
- \`\`\`
203
- `
204
- }
205
- }
206
- }
207
- }, f = [
208
- { value: "cards", icon: /* @__PURE__ */ e(B, {}) },
209
- { value: "table", icon: /* @__PURE__ */ e(V, {}) },
210
- { value: "list", icon: /* @__PURE__ */ e(x, {}) }
211
- ], I = [
212
- { value: "grid", icon: /* @__PURE__ */ e(z, {}) },
213
- { value: "cards", icon: /* @__PURE__ */ e(T, {}) },
214
- { value: "table", icon: /* @__PURE__ */ e(V, {}) },
215
- { value: "list", icon: /* @__PURE__ */ e(x, {}) },
216
- { value: "calendar", icon: /* @__PURE__ */ e(M, {}) }
217
- ], D = [
218
- { value: "cards", icon: /* @__PURE__ */ e(B, {}) },
219
- { value: "table", icon: /* @__PURE__ */ e(V, {}), disabled: !0 },
220
- { value: "list", icon: /* @__PURE__ */ e(x, {}) }
221
- ], W = {
222
- render: () => {
223
- const [o, r] = u("cards"), c = w((i) => {
224
- console.log(`Vue sélectionnée: ${i}`), r(i);
225
- }, []);
226
- return /* @__PURE__ */ n(m, { sx: { p: 2 }, children: [
227
- /* @__PURE__ */ e(t, { variant: "h6", gutterBottom: !0, children: "Sélecteur de vue standard" }),
228
- /* @__PURE__ */ e(
229
- p,
230
- {
231
- buttonList: f,
232
- viewMode: o,
233
- onChange: c
234
- }
235
- ),
236
- /* @__PURE__ */ n(t, { variant: "body2", sx: { mt: 2 }, children: [
237
- "Vue actuelle: ",
238
- /* @__PURE__ */ e("strong", { children: o })
239
- ] })
240
- ] });
241
- },
242
- parameters: {
243
- controls: { disable: !0 },
244
- actions: { disable: !0 },
245
- docs: {
246
- description: {
247
- story: "Sélecteur de vue basique permettant de basculer entre trois modes d'affichage : cartes, tableau et liste."
248
- }
249
- }
250
- }
251
- }, j = {
252
- render: () => {
253
- const [o, r] = u("table"), [c, i] = u(
254
- "primary"
255
- ), [h, a] = u("small"), [v, b] = u(
256
- "horizontal"
257
- );
258
- return /* @__PURE__ */ n(m, { sx: { p: 2 }, children: [
259
- /* @__PURE__ */ e(t, { variant: "h6", gutterBottom: !0, children: "Personnalisation en temps réel" }),
260
- /* @__PURE__ */ n(l, { container: !0, spacing: 2, sx: { mb: 3 }, children: [
261
- /* @__PURE__ */ n(l, { size: { xs: 12, sm: 6, md: 3 }, children: [
262
- /* @__PURE__ */ e(t, { variant: "subtitle2", gutterBottom: !0, children: "Couleur" }),
263
- /* @__PURE__ */ n(m, { sx: { display: "flex", gap: 1 }, children: [
264
- /* @__PURE__ */ e(
265
- y,
266
- {
267
- size: "small",
268
- variant: c === "primary" ? "contained" : "outlined",
269
- onClick: () => i("primary"),
270
- children: "Primary"
271
- }
272
- ),
273
- /* @__PURE__ */ e(
274
- y,
275
- {
276
- size: "small",
277
- variant: c === "secondary" ? "contained" : "outlined",
278
- onClick: () => i("secondary"),
279
- children: "Secondary"
280
- }
281
- )
282
- ] })
283
- ] }),
284
- /* @__PURE__ */ n(l, { size: { xs: 12, sm: 6, md: 3 }, children: [
285
- /* @__PURE__ */ e(t, { variant: "subtitle2", gutterBottom: !0, children: "Taille" }),
286
- /* @__PURE__ */ e(m, { sx: { display: "flex", gap: 1 }, children: ["small", "medium", "large"].map((g) => /* @__PURE__ */ e(
287
- y,
288
- {
289
- size: "small",
290
- variant: h === g ? "contained" : "outlined",
291
- onClick: () => a(g),
292
- children: g
293
- },
294
- g
295
- )) })
296
- ] }),
297
- /* @__PURE__ */ n(l, { size: { xs: 12, sm: 6, md: 3 }, children: [
298
- /* @__PURE__ */ e(t, { variant: "subtitle2", gutterBottom: !0, children: "Orientation" }),
299
- /* @__PURE__ */ n(m, { sx: { display: "flex", gap: 1 }, children: [
300
- /* @__PURE__ */ e(
301
- y,
302
- {
303
- size: "small",
304
- variant: v === "horizontal" ? "contained" : "outlined",
305
- onClick: () => b("horizontal"),
306
- children: "Horizontal"
307
- }
308
- ),
309
- /* @__PURE__ */ e(
310
- y,
311
- {
312
- size: "small",
313
- variant: v === "vertical" ? "contained" : "outlined",
314
- onClick: () => b("vertical"),
315
- children: "Vertical"
316
- }
317
- )
318
- ] })
319
- ] }),
320
- /* @__PURE__ */ n(l, { size: { xs: 12, sm: 6, md: 3 }, children: [
321
- /* @__PURE__ */ e(t, { variant: "subtitle2", gutterBottom: !0, children: "Vue actuelle" }),
322
- /* @__PURE__ */ e(t, { variant: "body2", color: "primary", children: /* @__PURE__ */ e("strong", { children: o }) })
323
- ] })
324
- ] }),
325
- /* @__PURE__ */ e(s, { sx: { p: 3, display: "inline-block" }, children: /* @__PURE__ */ e(
326
- p,
327
- {
328
- buttonList: f,
329
- viewMode: o,
330
- onChange: (g) => {
331
- console.log(`Vue sélectionnée: ${g}`), r(g);
332
- },
333
- colorVariant: c,
334
- size: h,
335
- orientation: v
336
- }
337
- ) })
338
- ] });
339
- },
340
- parameters: {
341
- controls: { disable: !0 },
342
- // Désactiver les contrôles automatiques
343
- actions: { disable: !0 },
344
- docs: {
345
- description: {
346
- story: "Interface de démonstration permettant de tester toutes les options de personnalisation disponibles : couleur, taille et orientation des boutons."
347
- }
348
- }
349
- }
350
- }, N = {
351
- render: () => {
352
- const o = [
353
- { value: "on", icon: /* @__PURE__ */ e(B, {}) },
354
- { value: "off", icon: /* @__PURE__ */ e(V, {}) }
355
- ], r = [
356
- { value: "active", icon: /* @__PURE__ */ e(T, {}) },
357
- { value: "inactive", icon: /* @__PURE__ */ e(x, {}) },
358
- { value: "pending", icon: /* @__PURE__ */ e(z, {}) }
359
- ], c = [
360
- { value: "edit", icon: /* @__PURE__ */ e(B, {}) },
361
- { value: "view", icon: /* @__PURE__ */ e(V, {}) },
362
- { value: "preview", icon: /* @__PURE__ */ e(x, {}) }
363
- ], [i, h] = u("on"), [a, v] = u("active"), [b, g] = u("edit");
364
- return /* @__PURE__ */ n(m, { sx: { p: 2 }, children: [
365
- /* @__PURE__ */ e(t, { variant: "h6", gutterBottom: !0, children: "Différents contextes d'utilisation" }),
366
- /* @__PURE__ */ e(t, { variant: "body2", color: "text.secondary", paragraph: !0, children: "Le même composant s'adapte automatiquement à différents types de données." }),
367
- /* @__PURE__ */ n(l, { container: !0, spacing: 3, children: [
368
- /* @__PURE__ */ e(l, { size: { xs: 12, md: 4 }, children: /* @__PURE__ */ n(s, { sx: { p: 2 }, children: [
369
- /* @__PURE__ */ e(t, { variant: "subtitle1", gutterBottom: !0, children: "Mode binaire" }),
370
- /* @__PURE__ */ e(
371
- t,
372
- {
373
- variant: "caption",
374
- color: "text.secondary",
375
- display: "block",
376
- sx: { mb: 2 },
377
- children: "Activation/Désactivation simple"
378
- }
379
- ),
380
- /* @__PURE__ */ e(
381
- p,
382
- {
383
- buttonList: o,
384
- viewMode: i,
385
- onChange: (d) => {
386
- console.log("Simple:", d), h(d);
387
- }
388
- }
389
- ),
390
- /* @__PURE__ */ n(t, { variant: "body2", sx: { mt: 1 }, children: [
391
- "État: ",
392
- i
393
- ] })
394
- ] }) }),
395
- /* @__PURE__ */ e(l, { size: { xs: 12, md: 4 }, children: /* @__PURE__ */ n(s, { sx: { p: 2 }, children: [
396
- /* @__PURE__ */ e(t, { variant: "subtitle1", gutterBottom: !0, children: "Statut système" }),
397
- /* @__PURE__ */ e(
398
- t,
399
- {
400
- variant: "caption",
401
- color: "text.secondary",
402
- display: "block",
403
- sx: { mb: 2 },
404
- children: "Gestion d'états métier"
405
- }
406
- ),
407
- /* @__PURE__ */ e(
408
- p,
409
- {
410
- buttonList: r,
411
- viewMode: a,
412
- onChange: (d) => {
413
- console.log("Status:", d), v(d);
414
- },
415
- colorVariant: "secondary"
416
- }
417
- ),
418
- /* @__PURE__ */ n(t, { variant: "body2", sx: { mt: 1 }, children: [
419
- "Statut: ",
420
- a
421
- ] })
422
- ] }) }),
423
- /* @__PURE__ */ e(l, { size: { xs: 12, md: 4 }, children: /* @__PURE__ */ n(s, { sx: { p: 2 }, children: [
424
- /* @__PURE__ */ e(t, { variant: "subtitle1", gutterBottom: !0, children: "Mode d'édition" }),
425
- /* @__PURE__ */ e(
426
- t,
427
- {
428
- variant: "caption",
429
- color: "text.secondary",
430
- display: "block",
431
- sx: { mb: 2 },
432
- children: "Interface utilisateur adaptative"
433
- }
434
- ),
435
- /* @__PURE__ */ e(
436
- p,
437
- {
438
- buttonList: c,
439
- viewMode: b,
440
- onChange: (d) => {
441
- console.log("Mode:", d), g(d);
442
- },
443
- size: "medium"
444
- }
445
- ),
446
- /* @__PURE__ */ n(t, { variant: "body2", sx: { mt: 1 }, children: [
447
- "Mode: ",
448
- b
449
- ] })
450
- ] }) })
451
- ] }),
452
- /* @__PURE__ */ n(
453
- s,
454
- {
455
- sx: {
456
- p: 2,
457
- mt: 3,
458
- backgroundColor: "info.light",
459
- color: "info.contrastText"
460
- },
461
- children: [
462
- /* @__PURE__ */ e(t, { variant: "subtitle2", gutterBottom: !0, children: "🎯 Flexibilité du composant" }),
463
- /* @__PURE__ */ e(t, { variant: "body2", children: "Un seul composant peut gérer n'importe quel ensemble d'options, s'adaptant automatiquement au contexte d'utilisation." })
464
- ]
465
- }
466
- )
467
- ] });
468
- },
469
- parameters: {
470
- controls: { disable: !0 },
471
- actions: { disable: !0 },
472
- docs: {
473
- description: {
474
- story: "Démonstration de la polyvalence du composant avec différents ensembles d'options : mode binaire, statuts système et modes d'édition."
475
- }
476
- }
477
- }
478
- }, _ = {
479
- render: () => {
480
- const o = ["primary", "secondary"], [r, c] = u({
481
- primary: "cards",
482
- secondary: "table"
483
- });
484
- return /* @__PURE__ */ n(m, { sx: { p: 2 }, children: [
485
- /* @__PURE__ */ e(t, { variant: "h6", gutterBottom: !0, children: "Comparaison des variantes de couleurs" }),
486
- /* @__PURE__ */ e(l, { container: !0, spacing: 3, children: o.map((i) => /* @__PURE__ */ e(l, { size: { xs: 12, md: 6 }, children: /* @__PURE__ */ n(s, { sx: { p: 2 }, children: [
487
- /* @__PURE__ */ n(t, { variant: "subtitle1", gutterBottom: !0, children: [
488
- "Variante ",
489
- i
490
- ] }),
491
- /* @__PURE__ */ e(
492
- p,
493
- {
494
- buttonList: f,
495
- viewMode: r[i],
496
- onChange: (h) => {
497
- c((a) => ({ ...a, [i]: h }));
498
- },
499
- colorVariant: i
500
- }
501
- ),
502
- /* @__PURE__ */ n(t, { variant: "body2", sx: { mt: 1 }, children: [
503
- "Sélectionné: ",
504
- r[i]
505
- ] })
506
- ] }) }, i)) })
507
- ] });
508
- },
509
- parameters: {
510
- controls: { disable: !0 },
511
- actions: { disable: !0 },
512
- docs: {
513
- description: {
514
- story: "Démonstration des deux variantes de couleurs disponibles : primary et secondary."
515
- }
516
- }
517
- }
518
- }, $ = {
519
- render: () => {
520
- const o = [
521
- "small",
522
- "medium",
523
- "large"
524
- ], [r, c] = u({
525
- small: "cards",
526
- medium: "table",
527
- large: "list"
528
- });
529
- return /* @__PURE__ */ n(m, { sx: { p: 2 }, children: [
530
- /* @__PURE__ */ e(t, { variant: "h6", gutterBottom: !0, children: "Comparaison des tailles" }),
531
- /* @__PURE__ */ e(l, { container: !0, spacing: 3, children: o.map((i) => /* @__PURE__ */ e(l, { size: { xs: 12, md: 4 }, children: /* @__PURE__ */ n(s, { sx: { p: 2 }, children: [
532
- /* @__PURE__ */ n(t, { variant: "subtitle1", gutterBottom: !0, children: [
533
- "Taille ",
534
- i
535
- ] }),
536
- /* @__PURE__ */ e(
537
- p,
538
- {
539
- buttonList: f,
540
- viewMode: r[i],
541
- onChange: (h) => {
542
- c((a) => ({ ...a, [i]: h }));
543
- },
544
- size: i
545
- }
546
- ),
547
- /* @__PURE__ */ n(t, { variant: "body2", sx: { mt: 1 }, children: [
548
- "Sélectionné: ",
549
- r[i]
550
- ] })
551
- ] }) }, i)) })
552
- ] });
553
- },
554
- parameters: {
555
- controls: { disable: !0 },
556
- actions: { disable: !0 },
557
- docs: {
558
- description: {
559
- story: "Démonstration des trois tailles disponibles : small, medium et large."
560
- }
561
- }
562
- }
563
- }, J = {
564
- render: () => {
565
- const [o, r] = u("grid"), c = w((i) => {
566
- r(i);
567
- }, []);
568
- return /* @__PURE__ */ n(m, { sx: { p: 2 }, children: [
569
- /* @__PURE__ */ e(t, { variant: "h6", gutterBottom: !0, children: "Orientation verticale" }),
570
- /* @__PURE__ */ n(l, { container: !0, spacing: 3, children: [
571
- /* @__PURE__ */ e(l, { size: { xs: 12, md: 6 }, children: /* @__PURE__ */ n(s, { sx: { p: 2 }, children: [
572
- /* @__PURE__ */ e(t, { variant: "subtitle1", gutterBottom: !0, children: "Orientation verticale - Taille medium" }),
573
- /* @__PURE__ */ e(
574
- p,
575
- {
576
- buttonList: I,
577
- viewMode: o,
578
- onChange: c,
579
- orientation: "vertical",
580
- size: "medium"
581
- }
582
- )
583
- ] }) }),
584
- /* @__PURE__ */ e(l, { size: { xs: 12, md: 4 }, children: /* @__PURE__ */ n(s, { sx: { p: 2 }, children: [
585
- /* @__PURE__ */ e(t, { variant: "subtitle1", gutterBottom: !0, children: "Orientation horizontale (comparaison)" }),
586
- /* @__PURE__ */ e(
587
- p,
588
- {
589
- buttonList: I,
590
- viewMode: o,
591
- onChange: c,
592
- orientation: "horizontal",
593
- size: "medium"
594
- }
595
- )
596
- ] }) })
597
- ] }),
598
- /* @__PURE__ */ n(t, { variant: "body2", sx: { mt: 2 }, children: [
599
- "Vue actuelle: ",
600
- /* @__PURE__ */ e("strong", { children: o })
601
- ] })
602
- ] });
603
- },
604
- parameters: {
605
- controls: { disable: !0 },
606
- actions: { disable: !0 },
607
- docs: {
608
- description: {
609
- story: "Démonstration de l'orientation verticale comparée à l'orientation horizontale avec plus d'options."
610
- }
611
- }
612
- }
613
- }, K = {
614
- render: () => {
615
- const o = [
616
- {
617
- value: "grid",
618
- icon: /* @__PURE__ */ e(z, {}),
619
- text: "Grille"
620
- },
621
- {
622
- value: "table",
623
- icon: /* @__PURE__ */ e(V, {}),
624
- text: "Tableau"
625
- },
626
- {
627
- value: "list",
628
- icon: /* @__PURE__ */ e(x, {}),
629
- text: "Liste"
630
- }
631
- ], r = [
632
- { value: "cards", icon: /* @__PURE__ */ e(B, {}) },
633
- { value: "comfort", icon: /* @__PURE__ */ e(T, {}) },
634
- { value: "calendar", icon: /* @__PURE__ */ e(M, {}) }
635
- ], c = [
636
- {
637
- value: "overview",
638
- icon: /* @__PURE__ */ e(z, {}),
639
- text: "Vue d'ensemble"
640
- },
641
- { value: "details", icon: /* @__PURE__ */ e(T, {}) },
642
- // Pas de texte
643
- {
644
- value: "settings",
645
- icon: /* @__PURE__ */ e(M, {}),
646
- text: "Paramètres"
647
- }
648
- ], [i, h] = u("grid"), [a, v] = u("cards"), [b, g] = u("overview");
649
- return /* @__PURE__ */ n(m, { sx: { p: 2 }, children: [
650
- /* @__PURE__ */ e(t, { variant: "h6", gutterBottom: !0, children: "Texte optionnel dans les boutons" }),
651
- /* @__PURE__ */ n(l, { container: !0, spacing: 3, children: [
652
- /* @__PURE__ */ e(l, { size: { xs: 12, md: 4 }, children: /* @__PURE__ */ n(s, { sx: { p: 2 }, children: [
653
- /* @__PURE__ */ e(t, { variant: "subtitle1", gutterBottom: !0, children: "Avec texte" }),
654
- /* @__PURE__ */ e(
655
- t,
656
- {
657
- variant: "caption",
658
- color: "text.secondary",
659
- display: "block",
660
- sx: { mb: 2 },
661
- children: "Tous les boutons ont un texte explicatif"
662
- }
663
- ),
664
- /* @__PURE__ */ e(
665
- p,
666
- {
667
- buttonList: o,
668
- viewMode: i,
669
- onChange: (d) => h(d),
670
- size: "medium"
671
- }
672
- ),
673
- /* @__PURE__ */ n(t, { variant: "body2", sx: { mt: 1 }, children: [
674
- "Sélection: ",
675
- i
676
- ] })
677
- ] }) }),
678
- /* @__PURE__ */ e(l, { size: { xs: 12, md: 4 }, children: /* @__PURE__ */ n(s, { sx: { p: 2 }, children: [
679
- /* @__PURE__ */ e(t, { variant: "subtitle1", gutterBottom: !0, children: "Icônes seulement" }),
680
- /* @__PURE__ */ e(
681
- t,
682
- {
683
- variant: "caption",
684
- color: "text.secondary",
685
- display: "block",
686
- sx: { mb: 2 },
687
- children: "Format classique avec icônes uniquement"
688
- }
689
- ),
690
- /* @__PURE__ */ e(
691
- p,
692
- {
693
- buttonList: r,
694
- viewMode: a,
695
- onChange: (d) => v(d),
696
- colorVariant: "secondary",
697
- size: "medium"
698
- }
699
- ),
700
- /* @__PURE__ */ n(t, { variant: "body2", sx: { mt: 1 }, children: [
701
- "Sélection: ",
702
- a
703
- ] })
704
- ] }) }),
705
- /* @__PURE__ */ e(l, { size: { xs: 12, md: 4 }, children: /* @__PURE__ */ n(s, { sx: { p: 2 }, children: [
706
- /* @__PURE__ */ e(t, { variant: "subtitle1", gutterBottom: !0, children: "Format mixte" }),
707
- /* @__PURE__ */ e(
708
- t,
709
- {
710
- variant: "caption",
711
- color: "text.secondary",
712
- display: "block",
713
- sx: { mb: 2 },
714
- children: "Certains boutons avec texte, d'autres sans"
715
- }
716
- ),
717
- /* @__PURE__ */ e(
718
- p,
719
- {
720
- buttonList: c,
721
- viewMode: b,
722
- onChange: (d) => g(d),
723
- size: "medium",
724
- orientation: "vertical"
725
- }
726
- ),
727
- /* @__PURE__ */ n(t, { variant: "body2", sx: { mt: 1 }, children: [
728
- "Sélection: ",
729
- b
730
- ] })
731
- ] }) })
732
- ] }),
733
- /* @__PURE__ */ n(s, { sx: { p: 3, mt: 3, backgroundColor: "info.light" }, children: [
734
- /* @__PURE__ */ e(t, { variant: "subtitle2", gutterBottom: !0, children: "💡 Utilisation du texte optionnel" }),
735
- /* @__PURE__ */ n(t, { variant: "body2", component: "div", children: [
736
- "• Le texte s'affiche automatiquement si la propriété",
737
- " ",
738
- /* @__PURE__ */ e("code", { children: "text" }),
739
- " est définie",
740
- /* @__PURE__ */ e("br", {}),
741
- "• Compatible avec l'ancien format (icônes seules)",
742
- /* @__PURE__ */ e("br", {}),
743
- "• Possibilité de mélanger boutons avec et sans texte",
744
- /* @__PURE__ */ e("br", {}),
745
- "• L'espacement est automatiquement ajusté entre l'icône et le texte"
746
- ] })
747
- ] }),
748
- /* @__PURE__ */ n(s, { sx: { p: 2, mt: 2, backgroundColor: "grey.100" }, children: [
749
- /* @__PURE__ */ e(t, { variant: "subtitle2", gutterBottom: !0, children: "Exemple de code" }),
750
- /* @__PURE__ */ e("pre", { style: { margin: 0, fontSize: "0.875rem", overflow: "auto" }, children: `const buttons = [
751
- {
752
- value: "grid",
753
- icon: <GridIcon />,
754
- text: "Grille" // ← Texte optionnel
755
- },
756
- {
757
- value: "list",
758
- icon: <ListIcon /> // ← Pas de texte, seule l'icône
759
- }
760
- ] as const;` })
761
- ] })
762
- ] });
763
- },
764
- parameters: {
765
- controls: { disable: !0 },
766
- actions: { disable: !0 },
767
- docs: {
768
- description: {
769
- story: "Démonstration de l'utilisation du texte optionnel dans les boutons. Le texte s'affiche automatiquement si la propriété `text` est présente, permettant une grande flexibilité dans la présentation."
770
- }
771
- }
772
- }
773
- }, Q = {
774
- render: () => {
775
- const [o, r] = u("cards"), c = w((i) => {
776
- r(i);
777
- }, []);
778
- return /* @__PURE__ */ n(m, { sx: { p: 2 }, children: [
779
- /* @__PURE__ */ e(t, { variant: "h6", gutterBottom: !0, children: "Gestion des boutons désactivés" }),
780
- /* @__PURE__ */ n(s, { sx: { p: 3 }, children: [
781
- /* @__PURE__ */ e(
782
- p,
783
- {
784
- buttonList: D,
785
- viewMode: o,
786
- onChange: c,
787
- size: "medium"
788
- }
789
- ),
790
- /* @__PURE__ */ n(t, { variant: "body2", sx: { mt: 2 }, children: [
791
- "Vue actuelle: ",
792
- /* @__PURE__ */ e("strong", { children: o })
793
- ] }),
794
- /* @__PURE__ */ e(t, { variant: "body2", color: "text.secondary", sx: { mt: 1 }, children: 'Le bouton "Table" est désactivé dans cet exemple' }),
795
- /* @__PURE__ */ n(m, { sx: { mt: 2 }, children: [
796
- /* @__PURE__ */ e(
797
- y,
798
- {
799
- variant: "outlined",
800
- size: "small",
801
- onClick: () => r("list"),
802
- sx: { mr: 1 },
803
- children: "Sélectionner Liste"
804
- }
805
- ),
806
- /* @__PURE__ */ e(
807
- y,
808
- {
809
- variant: "outlined",
810
- size: "small",
811
- onClick: () => r("cards"),
812
- children: "Sélectionner Cartes"
813
- }
814
- )
815
- ] })
816
- ] })
817
- ] });
818
- },
819
- parameters: {
820
- controls: { disable: !0 },
821
- actions: { disable: !0 },
822
- docs: {
823
- description: {
824
- story: "Exemple montrant comment désactiver individuellement certains boutons en utilisant la propriété `disabled` dans les éléments du tableau."
825
- }
826
- }
827
- }
828
- }, X = {
829
- render: () => {
830
- const [o, r] = u("grid"), c = w((i) => {
831
- r(i);
832
- }, []);
833
- return /* @__PURE__ */ n(m, { sx: { p: 2 }, children: [
834
- /* @__PURE__ */ e(t, { variant: "h6", gutterBottom: !0, children: "Plus d'options d'affichage" }),
835
- /* @__PURE__ */ n(s, { sx: { p: 3 }, children: [
836
- /* @__PURE__ */ e(
837
- p,
838
- {
839
- buttonList: I,
840
- viewMode: o,
841
- onChange: c,
842
- colorVariant: "secondary",
843
- size: "large"
844
- }
845
- ),
846
- /* @__PURE__ */ n(t, { variant: "body2", sx: { mt: 2 }, children: [
847
- "Vue actuelle: ",
848
- /* @__PURE__ */ e("strong", { children: o })
849
- ] }),
850
- /* @__PURE__ */ e(t, { variant: "body2", color: "text.secondary", sx: { mt: 1 }, children: "Cet exemple montre un ButtonGroup avec 5 options différentes en variante secondary et taille large" })
851
- ] })
852
- ] });
853
- },
854
- parameters: {
855
- controls: { disable: !0 },
856
- actions: { disable: !0 },
857
- docs: {
858
- description: {
859
- story: "Exemple avec davantage d'options pour montrer la flexibilité du composant avec plusieurs modes d'affichage."
860
- }
861
- }
862
- }
863
- }, Y = {
864
- render: () => {
865
- const [o, r] = u("cards"), c = w((a) => {
866
- console.log("Changement de vue:", a), r(a);
867
- }, []), i = w((a) => {
868
- console.log("Changement externe:", a), r(a);
869
- }, []);
870
- return /* @__PURE__ */ n(m, { sx: { p: 2 }, children: [
871
- /* @__PURE__ */ e(t, { variant: "h6", gutterBottom: !0, children: "Synchronisation avec d'autres composants" }),
872
- /* @__PURE__ */ n(t, { variant: "subtitle1", gutterBottom: !0, children: [
873
- "Vue actuelle: ",
874
- /* @__PURE__ */ e("strong", { children: o })
875
- ] }),
876
- /* @__PURE__ */ e(t, { variant: "body2", color: "text.secondary", paragraph: !0, children: (() => {
877
- switch (o) {
878
- case "cards":
879
- return "Affichage en cartes - Idéal pour une vue d'ensemble visuelle";
880
- case "table":
881
- return "Affichage en tableau - Parfait pour comparer des données";
882
- case "list":
883
- return "Affichage en liste - Optimal pour parcourir rapidement";
884
- default:
885
- return "Mode d'affichage inconnu";
886
- }
887
- })() }),
888
- /* @__PURE__ */ n(l, { container: !0, spacing: 3, children: [
889
- /* @__PURE__ */ e(l, { size: { xs: 12, md: 6 }, children: /* @__PURE__ */ n(s, { sx: { p: 2 }, children: [
890
- /* @__PURE__ */ e(t, { variant: "subtitle1", gutterBottom: !0, children: "ButtonGroup Principal" }),
891
- /* @__PURE__ */ e(
892
- p,
893
- {
894
- buttonList: f,
895
- viewMode: o,
896
- onChange: c,
897
- size: "medium"
898
- }
899
- )
900
- ] }) }),
901
- /* @__PURE__ */ e(l, { size: { xs: 12, md: 6 }, children: /* @__PURE__ */ n(s, { sx: { p: 2 }, children: [
902
- /* @__PURE__ */ e(t, { variant: "subtitle1", gutterBottom: !0, children: "Contrôles externes" }),
903
- /* @__PURE__ */ e(m, { sx: { display: "flex", flexDirection: "column", gap: 1 }, children: f.map((a) => /* @__PURE__ */ n(
904
- y,
905
- {
906
- variant: o === a.value ? "contained" : "outlined",
907
- onClick: () => i(a.value),
908
- size: "small",
909
- startIcon: a.icon,
910
- children: [
911
- "Mode ",
912
- a.value
913
- ]
914
- },
915
- a.value
916
- )) })
917
- ] }) })
918
- ] }),
919
- /* @__PURE__ */ n(s, { sx: { p: 2, mt: 2, backgroundColor: "grey.50" }, children: [
920
- /* @__PURE__ */ e(t, { variant: "subtitle2", gutterBottom: !0, children: "Actions rapides" }),
921
- /* @__PURE__ */ e(
922
- y,
923
- {
924
- variant: "text",
925
- size: "small",
926
- onClick: () => {
927
- const a = ["cards", "table", "list"], v = a[Math.floor(Math.random() * a.length)];
928
- i(v);
929
- },
930
- sx: { mr: 1 },
931
- children: "Vue aléatoire"
932
- }
933
- ),
934
- /* @__PURE__ */ e(
935
- y,
936
- {
937
- variant: "text",
938
- size: "small",
939
- onClick: () => {
940
- const v = (f.findIndex(
941
- (b) => b.value === o
942
- ) + 1) % f.length;
943
- i(f[v].value);
944
- },
945
- children: "Vue suivante"
946
- }
947
- )
948
- ] })
949
- ] });
950
- },
951
- parameters: {
952
- controls: { disable: !0 },
953
- actions: { disable: !0 },
954
- docs: {
955
- description: {
956
- story: "Démonstration de la synchronisation entre le ButtonGroup et d'autres composants. Cette story montre comment le ButtonGroup peut être intégré dans une interface complexe où la sélection peut provenir de différentes sources mais reste synchronisée."
957
- }
958
- }
959
- }
960
- }, Z = {
961
- render: () => {
962
- const o = [
963
- { value: "overview", icon: /* @__PURE__ */ e(T, {}) },
964
- { value: "detailed", icon: /* @__PURE__ */ e(V, {}) },
965
- { value: "analytics", icon: /* @__PURE__ */ e(z, {}) }
966
- ], r = [
967
- { value: "grid", icon: /* @__PURE__ */ e(z, {}) },
968
- { value: "list", icon: /* @__PURE__ */ e(x, {}) },
969
- { value: "tree", icon: /* @__PURE__ */ e(B, {}) }
970
- ], c = [
971
- { value: "chart", icon: /* @__PURE__ */ e(M, {}) },
972
- { value: "table", icon: /* @__PURE__ */ e(V, {}) },
973
- { value: "raw", icon: /* @__PURE__ */ e(x, {}), disabled: !0 }
974
- ], [i, h] = u("overview"), [a, v] = u("grid"), [b, g] = u("chart");
975
- return /* @__PURE__ */ n(m, { sx: { p: 2 }, children: [
976
- /* @__PURE__ */ e(t, { variant: "h6", gutterBottom: !0, children: "Cas d'utilisation dans une interface complexe" }),
977
- /* @__PURE__ */ n(l, { container: !0, spacing: 3, children: [
978
- /* @__PURE__ */ e(l, { size: { xs: 12, md: 4 }, children: /* @__PURE__ */ n(s, { sx: { p: 2, height: "100%" }, children: [
979
- /* @__PURE__ */ e(t, { variant: "subtitle1", gutterBottom: !0, children: "Dashboard" }),
980
- /* @__PURE__ */ e(
981
- p,
982
- {
983
- buttonList: o,
984
- viewMode: i,
985
- onChange: (d) => h(d),
986
- colorVariant: "primary",
987
- size: "small",
988
- orientation: "vertical"
989
- }
990
- ),
991
- /* @__PURE__ */ n(t, { variant: "body2", sx: { mt: 2 }, children: [
992
- "Mode: ",
993
- i
994
- ] })
995
- ] }) }),
996
- /* @__PURE__ */ e(l, { size: { xs: 12, md: 4 }, children: /* @__PURE__ */ n(s, { sx: { p: 2, height: "100%" }, children: [
997
- /* @__PURE__ */ e(t, { variant: "subtitle1", gutterBottom: !0, children: "Explorateur de fichiers" }),
998
- /* @__PURE__ */ e(
999
- p,
1000
- {
1001
- buttonList: r,
1002
- viewMode: a,
1003
- onChange: (d) => v(d),
1004
- colorVariant: "secondary",
1005
- size: "medium"
1006
- }
1007
- ),
1008
- /* @__PURE__ */ n(t, { variant: "body2", sx: { mt: 2 }, children: [
1009
- "Affichage: ",
1010
- a
1011
- ] })
1012
- ] }) }),
1013
- /* @__PURE__ */ e(l, { size: { xs: 12, md: 4 }, children: /* @__PURE__ */ n(s, { sx: { p: 2, height: "100%" }, children: [
1014
- /* @__PURE__ */ e(t, { variant: "subtitle1", gutterBottom: !0, children: "Visualisation de données" }),
1015
- /* @__PURE__ */ e(
1016
- p,
1017
- {
1018
- buttonList: c,
1019
- viewMode: b,
1020
- onChange: (d) => g(d),
1021
- colorVariant: "primary",
1022
- size: "large"
1023
- }
1024
- ),
1025
- /* @__PURE__ */ n(t, { variant: "body2", sx: { mt: 2 }, children: [
1026
- "Format: ",
1027
- b
1028
- ] }),
1029
- /* @__PURE__ */ e(t, { variant: "caption", color: "text.secondary", children: '(Le mode "raw" est temporairement désactivé)' })
1030
- ] }) })
1031
- ] }),
1032
- /* @__PURE__ */ n(
1033
- s,
1034
- {
1035
- sx: {
1036
- p: 2,
1037
- mt: 3,
1038
- backgroundColor: "info.light",
1039
- color: "info.contrastText"
1040
- },
1041
- children: [
1042
- /* @__PURE__ */ e(t, { variant: "subtitle2", gutterBottom: !0, children: "📊 Résumé des sélections (tous typés !)" }),
1043
- /* @__PURE__ */ n(t, { variant: "body2", children: [
1044
- "Dashboard: ",
1045
- /* @__PURE__ */ e("strong", { children: i }),
1046
- " | Fichiers:",
1047
- " ",
1048
- /* @__PURE__ */ e("strong", { children: a }),
1049
- " | Données: ",
1050
- /* @__PURE__ */ e("strong", { children: b })
1051
- ] })
1052
- ]
1053
- }
1054
- ),
1055
- /* @__PURE__ */ n(
1056
- s,
1057
- {
1058
- sx: {
1059
- p: 2,
1060
- mt: 2,
1061
- backgroundColor: "warning.light",
1062
- color: "warning.contrastText"
1063
- },
1064
- children: [
1065
- /* @__PURE__ */ e(t, { variant: "subtitle2", gutterBottom: !0, children: "🔍 Inspection des types" }),
1066
- /* @__PURE__ */ n(t, { variant: "body2", component: "div", children: [
1067
- /* @__PURE__ */ e("code", { children: "DashboardType:" }),
1068
- " ",
1069
- '"overview" | "detailed" | "analytics"',
1070
- /* @__PURE__ */ e("br", {}),
1071
- /* @__PURE__ */ e("code", { children: "FileType:" }),
1072
- " ",
1073
- '"grid" | "list" | "tree"',
1074
- /* @__PURE__ */ e("br", {}),
1075
- /* @__PURE__ */ e("code", { children: "DataType:" }),
1076
- " ",
1077
- '"chart" | "table" | "raw"'
1078
- ] }),
1079
- /* @__PURE__ */ e(t, { variant: "caption", sx: { mt: 1, display: "block" }, children: "Chaque callback reçoit exactement le bon type, aucune configuration supplémentaire requise !" })
1080
- ]
1081
- }
1082
- )
1083
- ] });
1084
- },
1085
- parameters: {
1086
- controls: { disable: !0 },
1087
- actions: { disable: !0 },
1088
- docs: {
1089
- description: {
1090
- story: "Exemple d'utilisation complexe montrant comment le ButtonGroup peut être utilisé dans différents contextes au sein d'une même interface, avec différentes configurations (tailles, couleurs, orientations) selon le besoin. Chaque instance a son propre type inféré automatiquement."
1091
- }
1092
- }
1093
- }
1094
- }, ee = {
1095
- render: () => {
1096
- const o = {
1097
- CARDS: "cards",
1098
- TABLE: "table",
1099
- LIST: "list"
1100
- }, r = (C, L, q = !1) => ({ value: C, icon: L, disabled: q }), c = [
1101
- r(o.CARDS, /* @__PURE__ */ e(B, {})),
1102
- r(o.TABLE, /* @__PURE__ */ e(V, {})),
1103
- r(o.LIST, /* @__PURE__ */ e(x, {}))
1104
- ], i = [
1105
- r("dashboard", /* @__PURE__ */ e(z, {})),
1106
- r("users", /* @__PURE__ */ e(T, {})),
1107
- r("settings", /* @__PURE__ */ e(M, {})),
1108
- r("logs", /* @__PURE__ */ e(x, {}), !0)
1109
- // désactivé
1110
- ], [h, a] = u(
1111
- o.CARDS
1112
- ), [v, b] = u("dashboard"), g = w((C) => {
1113
- console.log("Vue commune changée:", C), a(C);
1114
- }, []), d = w((C) => {
1115
- console.log("Vue admin changée:", C), b(C);
1116
- }, []);
1117
- return /* @__PURE__ */ n(m, { sx: { p: 2 }, children: [
1118
- /* @__PURE__ */ e(t, { variant: "h6", gutterBottom: !0, children: "🚀 Bonnes pratiques pour le typage" }),
1119
- /* @__PURE__ */ n(l, { container: !0, spacing: 3, children: [
1120
- /* @__PURE__ */ e(l, { size: { xs: 12, md: 6 }, children: /* @__PURE__ */ n(s, { sx: { p: 2 }, children: [
1121
- /* @__PURE__ */ e(t, { variant: "subtitle1", gutterBottom: !0, children: "Configuration standard" }),
1122
- /* @__PURE__ */ e(
1123
- t,
1124
- {
1125
- variant: "caption",
1126
- color: "text.secondary",
1127
- display: "block",
1128
- sx: { mb: 2 },
1129
- children: "Utilisation de constantes et factory functions"
1130
- }
1131
- ),
1132
- /* @__PURE__ */ e(
1133
- p,
1134
- {
1135
- buttonList: c,
1136
- viewMode: h,
1137
- onChange: g,
1138
- size: "medium"
1139
- }
1140
- ),
1141
- /* @__PURE__ */ n(t, { variant: "body2", sx: { mt: 1 }, children: [
1142
- "Sélection: ",
1143
- h
1144
- ] })
1145
- ] }) }),
1146
- /* @__PURE__ */ e(l, { size: { xs: 12, md: 6 }, children: /* @__PURE__ */ n(s, { sx: { p: 2 }, children: [
1147
- /* @__PURE__ */ e(t, { variant: "subtitle1", gutterBottom: !0, children: "Configuration avancée" }),
1148
- /* @__PURE__ */ e(
1149
- t,
1150
- {
1151
- variant: "caption",
1152
- color: "text.secondary",
1153
- display: "block",
1154
- sx: { mb: 2 },
1155
- children: "Types spécialisés avec bouton désactivé"
1156
- }
1157
- ),
1158
- /* @__PURE__ */ e(
1159
- p,
1160
- {
1161
- buttonList: i,
1162
- viewMode: v,
1163
- onChange: d,
1164
- colorVariant: "secondary",
1165
- size: "medium"
1166
- }
1167
- ),
1168
- /* @__PURE__ */ n(t, { variant: "body2", sx: { mt: 1 }, children: [
1169
- "Admin: ",
1170
- v
1171
- ] })
1172
- ] }) })
1173
- ] }),
1174
- /* @__PURE__ */ n(s, { sx: { p: 3, mt: 3, backgroundColor: "success.light" }, children: [
1175
- /* @__PURE__ */ e(t, { variant: "h6", gutterBottom: !0, children: "📚 Code examples - Bonnes pratiques" }),
1176
- /* @__PURE__ */ n(m, { sx: { mb: 2 }, children: [
1177
- /* @__PURE__ */ e(t, { variant: "subtitle2", gutterBottom: !0, children: "1. ✅ Utilisation de constantes réutilisables" }),
1178
- /* @__PURE__ */ e(s, { sx: { p: 2, backgroundColor: "grey.100" }, children: /* @__PURE__ */ e(
1179
- "pre",
1180
- {
1181
- style: { margin: 0, fontSize: "0.875rem", overflow: "auto" },
1182
- children: `const VIEW_MODES = {
1183
- CARDS: "cards",
1184
- TABLE: "table",
1185
- LIST: "list"
1186
- } as const;
1187
-
1188
- const buttons = [
1189
- { value: VIEW_MODES.CARDS, icon: <Icon /> }
1190
- ] as const;`
1191
- }
1192
- ) })
1193
- ] }),
1194
- /* @__PURE__ */ n(m, { sx: { mb: 2 }, children: [
1195
- /* @__PURE__ */ e(t, { variant: "subtitle2", gutterBottom: !0, children: "2. ✅ Factory functions pour la réutilisabilité" }),
1196
- /* @__PURE__ */ e(s, { sx: { p: 2, backgroundColor: "grey.100" }, children: /* @__PURE__ */ e(
1197
- "pre",
1198
- {
1199
- style: { margin: 0, fontSize: "0.875rem", overflow: "auto" },
1200
- children: `const createViewButton = <T extends string>(
1201
- value: T,
1202
- icon: ReactNode,
1203
- disabled = false
1204
- ) => ({ value, icon, disabled } as const);
1205
-
1206
- const buttons = [
1207
- createViewButton("cards", <CardsIcon />),
1208
- createViewButton("table", <TableIcon />, true)
1209
- ] as const;`
1210
- }
1211
- ) })
1212
- ] }),
1213
- /* @__PURE__ */ n(m, { sx: { mb: 2 }, children: [
1214
- /* @__PURE__ */ e(t, { variant: "subtitle2", gutterBottom: !0, children: "3. ✅ Types helper pour éviter la répétition" }),
1215
- /* @__PURE__ */ e(s, { sx: { p: 2, backgroundColor: "grey.100" }, children: /* @__PURE__ */ e(
1216
- "pre",
1217
- {
1218
- style: { margin: 0, fontSize: "0.875rem", overflow: "auto" },
1219
- children: `type ViewType = (typeof buttons)[number]["value"];
1220
-
1221
- const [view, setView] = useState<ViewType>("cards");
1222
-
1223
- const handleChange = useCallback((value: ViewType) => {
1224
- // value est automatiquement typé !
1225
- setView(value);
1226
- }, []);`
1227
- }
1228
- ) })
1229
- ] }),
1230
- /* @__PURE__ */ n(m, { children: [
1231
- /* @__PURE__ */ e(t, { variant: "subtitle2", gutterBottom: !0, children: "4. ✅ Handler avec typage explicite" }),
1232
- /* @__PURE__ */ e(s, { sx: { p: 2, backgroundColor: "grey.100" }, children: /* @__PURE__ */ e(
1233
- "pre",
1234
- {
1235
- style: { margin: 0, fontSize: "0.875rem", overflow: "auto" },
1236
- children: `<ButtonGroup
1237
- buttonList={buttons}
1238
- viewMode={view}
1239
- onChange={handleChange} // ← Pas de type 'any' !
1240
- />`
1241
- }
1242
- ) })
1243
- ] })
1244
- ] }),
1245
- /* @__PURE__ */ n(
1246
- s,
1247
- {
1248
- sx: {
1249
- p: 2,
1250
- mt: 2,
1251
- backgroundColor: "error.light",
1252
- color: "error.contrastText"
1253
- },
1254
- children: [
1255
- /* @__PURE__ */ e(t, { variant: "subtitle2", gutterBottom: !0, children: "❌ À éviter" }),
1256
- /* @__PURE__ */ n(t, { variant: "body2", component: "div", children: [
1257
- "• Oublier ",
1258
- /* @__PURE__ */ e("code", { children: "as const" }),
1259
- " après les tableaux",
1260
- /* @__PURE__ */ e("br", {}),
1261
- "• Utiliser des handlers sans typage explicite",
1262
- /* @__PURE__ */ e("br", {}),
1263
- "• Définir des valeurs en dur sans constantes",
1264
- /* @__PURE__ */ e("br", {}),
1265
- "• Ignorer les warnings TypeScript"
1266
- ] })
1267
- ]
1268
- }
1269
- )
1270
- ] });
1271
- },
1272
- parameters: {
1273
- controls: { disable: !0 },
1274
- actions: { disable: !0 },
1275
- docs: {
1276
- description: {
1277
- story: "Cette story présente les meilleures pratiques pour utiliser le ButtonGroup avec un typage TypeScript optimal. Elle montre comment structurer votre code pour éviter les types 'any' et maximiser la sécurité de type."
1278
- }
1279
- }
1280
- }
1281
- };
1282
- export {
1283
- Q as AvecBoutonsDesactives,
1284
- K as AvecTexteOptionnel,
1285
- ee as BonnesPratiques,
1286
- Z as CasUtilisationComplexe,
1287
- j as Controlable,
1288
- W as Default,
1289
- X as OptionsEtendues,
1290
- J as OrientationVerticale,
1291
- Y as Synchronisation,
1292
- $ as TaillesDifferentes,
1293
- N as TypageGenerique,
1294
- _ as VariantesDecouleurs,
1295
- F as default
1296
- };