@portnet/ui 6.0.2 → 6.0.3

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 (980) hide show
  1. package/CHANGELOG.md +652 -0
  2. package/dist/esm/index.js +72 -3
  3. package/dist/esm/index.js.map +1 -1
  4. package/dist/esm/v2/__tests__/AppMain.test.js +130 -0
  5. package/dist/esm/v2/__tests__/AppMain.test.js.map +1 -0
  6. package/dist/esm/v2/__tests__/ChartFigure.test.js +180 -0
  7. package/dist/esm/v2/__tests__/ChartFigure.test.js.map +1 -0
  8. package/dist/esm/v2/__tests__/DataGridRowActionsPropagation.test.js +150 -0
  9. package/dist/esm/v2/__tests__/DataGridRowActionsPropagation.test.js.map +1 -0
  10. package/dist/esm/v2/__tests__/DrawerTactileTargets.test.js +93 -0
  11. package/dist/esm/v2/__tests__/DrawerTactileTargets.test.js.map +1 -0
  12. package/dist/esm/v2/__tests__/FieldError.test.js +71 -38
  13. package/dist/esm/v2/__tests__/FieldError.test.js.map +1 -1
  14. package/dist/esm/v2/__tests__/FieldNaming.test.js +160 -0
  15. package/dist/esm/v2/__tests__/FieldNaming.test.js.map +1 -0
  16. package/dist/esm/v2/__tests__/FieldWidth.test.js +11 -11
  17. package/dist/esm/v2/__tests__/FieldWidth.test.js.map +1 -1
  18. package/dist/esm/v2/__tests__/FileCard.test.js +18 -17
  19. package/dist/esm/v2/__tests__/FileCard.test.js.map +1 -1
  20. package/dist/esm/v2/__tests__/FormikCheckbox.test.js +87 -179
  21. package/dist/esm/v2/__tests__/FormikCheckbox.test.js.map +1 -1
  22. package/dist/esm/v2/__tests__/FormikDateTimePicker.test.js +32 -44
  23. package/dist/esm/v2/__tests__/FormikDateTimePicker.test.js.map +1 -1
  24. package/dist/esm/v2/__tests__/FormikDisplayWidth.test.js +101 -0
  25. package/dist/esm/v2/__tests__/FormikDisplayWidth.test.js.map +1 -0
  26. package/dist/esm/v2/__tests__/FormikRadioGroup.test.js +118 -199
  27. package/dist/esm/v2/__tests__/FormikRadioGroup.test.js.map +1 -1
  28. package/dist/esm/v2/__tests__/MobileRowCard.test.js +44 -42
  29. package/dist/esm/v2/__tests__/MobileRowCard.test.js.map +1 -1
  30. package/dist/esm/v2/__tests__/PreviewDrawer.test.js +165 -0
  31. package/dist/esm/v2/__tests__/PreviewDrawer.test.js.map +1 -0
  32. package/dist/esm/v2/__tests__/ReferentielFieldContainer.test.js +156 -0
  33. package/dist/esm/v2/__tests__/ReferentielFieldContainer.test.js.map +1 -0
  34. package/dist/esm/v2/__tests__/SectionErrorBoundary.test.js +37 -52
  35. package/dist/esm/v2/__tests__/SectionErrorBoundary.test.js.map +1 -1
  36. package/dist/esm/v2/__tests__/apiError.test.js +50 -69
  37. package/dist/esm/v2/__tests__/apiError.test.js.map +1 -1
  38. package/dist/esm/v2/__tests__/banned-patterns.test.js +41 -122
  39. package/dist/esm/v2/__tests__/banned-patterns.test.js.map +1 -1
  40. package/dist/esm/v2/__tests__/chart-palette.test.js +204 -0
  41. package/dist/esm/v2/__tests__/chart-palette.test.js.map +1 -0
  42. package/dist/esm/v2/__tests__/contrast-palette.test.js +42 -74
  43. package/dist/esm/v2/__tests__/contrast-palette.test.js.map +1 -1
  44. package/dist/esm/v2/__tests__/cssVariables.test.js +44 -51
  45. package/dist/esm/v2/__tests__/cssVariables.test.js.map +1 -1
  46. package/dist/esm/v2/__tests__/fileValidation.test.js +134 -0
  47. package/dist/esm/v2/__tests__/fileValidation.test.js.map +1 -0
  48. package/dist/esm/v2/__tests__/filterCriteria.test.js +321 -0
  49. package/dist/esm/v2/__tests__/filterCriteria.test.js.map +1 -0
  50. package/dist/esm/v2/__tests__/fmtDate.test.js +68 -0
  51. package/dist/esm/v2/__tests__/fmtDate.test.js.map +1 -0
  52. package/dist/esm/v2/__tests__/gap-leakage-refonte.test.js +218 -0
  53. package/dist/esm/v2/__tests__/gap-leakage-refonte.test.js.map +1 -0
  54. package/dist/esm/v2/__tests__/labels-merge.test.js +17 -21
  55. package/dist/esm/v2/__tests__/labels-merge.test.js.map +1 -1
  56. package/dist/esm/v2/__tests__/locale-fallback.test.js +35 -40
  57. package/dist/esm/v2/__tests__/locale-fallback.test.js.map +1 -1
  58. package/dist/esm/v2/__tests__/reviveSavedCriteria.test.js +143 -0
  59. package/dist/esm/v2/__tests__/reviveSavedCriteria.test.js.map +1 -0
  60. package/dist/esm/v2/__tests__/rowActions.test.js +182 -0
  61. package/dist/esm/v2/__tests__/rowActions.test.js.map +1 -0
  62. package/dist/esm/v2/__tests__/useFocusOnRouteChange.test.js +155 -0
  63. package/dist/esm/v2/__tests__/useFocusOnRouteChange.test.js.map +1 -0
  64. package/dist/esm/v2/__tests__/useFocusTrap.test.js +266 -402
  65. package/dist/esm/v2/__tests__/useFocusTrap.test.js.map +1 -1
  66. package/dist/esm/v2/__tests__/usePrefersReducedMotion.test.js +120 -0
  67. package/dist/esm/v2/__tests__/usePrefersReducedMotion.test.js.map +1 -0
  68. package/dist/esm/v2/components/Accordion.js +48 -70
  69. package/dist/esm/v2/components/Accordion.js.map +1 -1
  70. package/dist/esm/v2/components/ActionStrip.js +31 -43
  71. package/dist/esm/v2/components/ActionStrip.js.map +1 -1
  72. package/dist/esm/v2/components/Banner.js +25 -22
  73. package/dist/esm/v2/components/Banner.js.map +1 -1
  74. package/dist/esm/v2/components/Busy.js +14 -19
  75. package/dist/esm/v2/components/Busy.js.map +1 -1
  76. package/dist/esm/v2/components/Button.js +34 -45
  77. package/dist/esm/v2/components/Button.js.map +1 -1
  78. package/dist/esm/v2/components/CategoryTag.js +44 -27
  79. package/dist/esm/v2/components/CategoryTag.js.map +1 -1
  80. package/dist/esm/v2/components/Checkbox.js +32 -38
  81. package/dist/esm/v2/components/Checkbox.js.map +1 -1
  82. package/dist/esm/v2/components/Chip.js +23 -36
  83. package/dist/esm/v2/components/Chip.js.map +1 -1
  84. package/dist/esm/v2/components/Combobox.js +112 -136
  85. package/dist/esm/v2/components/Combobox.js.map +1 -1
  86. package/dist/esm/v2/components/CommandPalette.js +113 -198
  87. package/dist/esm/v2/components/CommandPalette.js.map +1 -1
  88. package/dist/esm/v2/components/ConfirmDialog.js +36 -45
  89. package/dist/esm/v2/components/ConfirmDialog.js.map +1 -1
  90. package/dist/esm/v2/components/DatePicker.js +78 -81
  91. package/dist/esm/v2/components/DatePicker.js.map +1 -1
  92. package/dist/esm/v2/components/DateRangePicker.js +63 -74
  93. package/dist/esm/v2/components/DateRangePicker.js.map +1 -1
  94. package/dist/esm/v2/components/DateTimePicker.js +81 -86
  95. package/dist/esm/v2/components/DateTimePicker.js.map +1 -1
  96. package/dist/esm/v2/components/Drawer.js +71 -65
  97. package/dist/esm/v2/components/Drawer.js.map +1 -1
  98. package/dist/esm/v2/components/Dropzone.js +130 -177
  99. package/dist/esm/v2/components/Dropzone.js.map +1 -1
  100. package/dist/esm/v2/components/EmptyState.js +9 -9
  101. package/dist/esm/v2/components/EmptyState.js.map +1 -1
  102. package/dist/esm/v2/components/FavoriteToggle.js +24 -33
  103. package/dist/esm/v2/components/FavoriteToggle.js.map +1 -1
  104. package/dist/esm/v2/components/Field.js +155 -59
  105. package/dist/esm/v2/components/Field.js.map +1 -1
  106. package/dist/esm/v2/components/FieldError.js +9 -13
  107. package/dist/esm/v2/components/FieldError.js.map +1 -1
  108. package/dist/esm/v2/components/FieldHelp.js +28 -49
  109. package/dist/esm/v2/components/FieldHelp.js.map +1 -1
  110. package/dist/esm/v2/components/FileCard.js +14 -19
  111. package/dist/esm/v2/components/FileCard.js.map +1 -1
  112. package/dist/esm/v2/components/FilterTab.js +22 -31
  113. package/dist/esm/v2/components/FilterTab.js.map +1 -1
  114. package/dist/esm/v2/components/ForbiddenPage.js +28 -8
  115. package/dist/esm/v2/components/ForbiddenPage.js.map +1 -1
  116. package/dist/esm/v2/components/FormGrid.js +48 -54
  117. package/dist/esm/v2/components/FormGrid.js.map +1 -1
  118. package/dist/esm/v2/components/FormikDisplay.js +98 -24
  119. package/dist/esm/v2/components/FormikDisplay.js.map +1 -1
  120. package/dist/esm/v2/components/Input.js +75 -34
  121. package/dist/esm/v2/components/Input.js.map +1 -1
  122. package/dist/esm/v2/components/KPICard.js +42 -51
  123. package/dist/esm/v2/components/KPICard.js.map +1 -1
  124. package/dist/esm/v2/components/KPIStrip.js +9 -15
  125. package/dist/esm/v2/components/KPIStrip.js.map +1 -1
  126. package/dist/esm/v2/components/KV.js +16 -23
  127. package/dist/esm/v2/components/KV.js.map +1 -1
  128. package/dist/esm/v2/components/KVGrid.js +15 -23
  129. package/dist/esm/v2/components/KVGrid.js.map +1 -1
  130. package/dist/esm/v2/components/Layout.js +81 -117
  131. package/dist/esm/v2/components/Layout.js.map +1 -1
  132. package/dist/esm/v2/components/MobileRowCard.js +64 -75
  133. package/dist/esm/v2/components/MobileRowCard.js.map +1 -1
  134. package/dist/esm/v2/components/Modal.js +44 -53
  135. package/dist/esm/v2/components/Modal.js.map +1 -1
  136. package/dist/esm/v2/components/NetworkErrorPage.js +28 -11
  137. package/dist/esm/v2/components/NetworkErrorPage.js.map +1 -1
  138. package/dist/esm/v2/components/NotFoundPage.js +28 -9
  139. package/dist/esm/v2/components/NotFoundPage.js.map +1 -1
  140. package/dist/esm/v2/components/NumberInput.js +77 -107
  141. package/dist/esm/v2/components/NumberInput.js.map +1 -1
  142. package/dist/esm/v2/components/OverflowMenu.js +24 -42
  143. package/dist/esm/v2/components/OverflowMenu.js.map +1 -1
  144. package/dist/esm/v2/components/PdfViewer.js +24 -33
  145. package/dist/esm/v2/components/PdfViewer.js.map +1 -1
  146. package/dist/esm/v2/components/ProgressBar.js +28 -36
  147. package/dist/esm/v2/components/ProgressBar.js.map +1 -1
  148. package/dist/esm/v2/components/Radio.js +49 -57
  149. package/dist/esm/v2/components/Radio.js.map +1 -1
  150. package/dist/esm/v2/components/SectionErrorBoundary.js +84 -130
  151. package/dist/esm/v2/components/SectionErrorBoundary.js.map +1 -1
  152. package/dist/esm/v2/components/SectionHeader.js +24 -31
  153. package/dist/esm/v2/components/SectionHeader.js.map +1 -1
  154. package/dist/esm/v2/components/Segmented.js +59 -84
  155. package/dist/esm/v2/components/Segmented.js.map +1 -1
  156. package/dist/esm/v2/components/Select.js +100 -138
  157. package/dist/esm/v2/components/Select.js.map +1 -1
  158. package/dist/esm/v2/components/ServerErrorPage.js +27 -10
  159. package/dist/esm/v2/components/ServerErrorPage.js.map +1 -1
  160. package/dist/esm/v2/components/Skeleton.js +81 -96
  161. package/dist/esm/v2/components/Skeleton.js.map +1 -1
  162. package/dist/esm/v2/components/SkipLink.js +6 -7
  163. package/dist/esm/v2/components/SkipLink.js.map +1 -1
  164. package/dist/esm/v2/components/Spinner.js +13 -22
  165. package/dist/esm/v2/components/Spinner.js.map +1 -1
  166. package/dist/esm/v2/components/Status.js +14 -25
  167. package/dist/esm/v2/components/Status.js.map +1 -1
  168. package/dist/esm/v2/components/Stepper.js +68 -71
  169. package/dist/esm/v2/components/Stepper.js.map +1 -1
  170. package/dist/esm/v2/components/Surface.js +25 -44
  171. package/dist/esm/v2/components/Surface.js.map +1 -1
  172. package/dist/esm/v2/components/Switch.js +21 -29
  173. package/dist/esm/v2/components/Switch.js.map +1 -1
  174. package/dist/esm/v2/components/TabPanel.js +84 -0
  175. package/dist/esm/v2/components/TabPanel.js.map +1 -0
  176. package/dist/esm/v2/components/Tabs.js +43 -19
  177. package/dist/esm/v2/components/Tabs.js.map +1 -1
  178. package/dist/esm/v2/components/TelInput.js +75 -108
  179. package/dist/esm/v2/components/TelInput.js.map +1 -1
  180. package/dist/esm/v2/components/Textarea.js +21 -30
  181. package/dist/esm/v2/components/Textarea.js.map +1 -1
  182. package/dist/esm/v2/components/TimePicker.js +59 -69
  183. package/dist/esm/v2/components/TimePicker.js.map +1 -1
  184. package/dist/esm/v2/components/Toast.js +109 -163
  185. package/dist/esm/v2/components/Toast.js.map +1 -1
  186. package/dist/esm/v2/components/Tooltip.js +18 -31
  187. package/dist/esm/v2/components/Tooltip.js.map +1 -1
  188. package/dist/esm/v2/components/_ErrorPageBody.js +6 -5
  189. package/dist/esm/v2/components/_ErrorPageBody.js.map +1 -1
  190. package/dist/esm/v2/components/_pickerShared.js +2 -2
  191. package/dist/esm/v2/components/_pickerShared.js.map +1 -1
  192. package/dist/esm/v2/components/index.js +37 -0
  193. package/dist/esm/v2/components/index.js.map +1 -1
  194. package/dist/esm/v2/hooks/index.js +62 -0
  195. package/dist/esm/v2/hooks/index.js.map +1 -1
  196. package/dist/esm/v2/hooks/useAppliedFilters.js +112 -0
  197. package/dist/esm/v2/hooks/useAppliedFilters.js.map +1 -0
  198. package/dist/esm/v2/hooks/useDebouncedCallback.js +82 -0
  199. package/dist/esm/v2/hooks/useDebouncedCallback.js.map +1 -0
  200. package/dist/esm/v2/hooks/useDelayedFlag.js +5 -19
  201. package/dist/esm/v2/hooks/useDelayedFlag.js.map +1 -1
  202. package/dist/esm/v2/hooks/useDensity.js +13 -17
  203. package/dist/esm/v2/hooks/useDensity.js.map +1 -1
  204. package/dist/esm/v2/hooks/useFocusFirstError.js +25 -33
  205. package/dist/esm/v2/hooks/useFocusFirstError.js.map +1 -1
  206. package/dist/esm/v2/hooks/useFocusOnRouteChange.js +81 -0
  207. package/dist/esm/v2/hooks/useFocusOnRouteChange.js.map +1 -0
  208. package/dist/esm/v2/hooks/useFocusTrap.js +19 -23
  209. package/dist/esm/v2/hooks/useFocusTrap.js.map +1 -1
  210. package/dist/esm/v2/hooks/useFormAutoSave.js +38 -53
  211. package/dist/esm/v2/hooks/useFormAutoSave.js.map +1 -1
  212. package/dist/esm/v2/hooks/useFormCompletionProgress.js +32 -51
  213. package/dist/esm/v2/hooks/useFormCompletionProgress.js.map +1 -1
  214. package/dist/esm/v2/hooks/useKeyboardShortcuts.js +125 -0
  215. package/dist/esm/v2/hooks/useKeyboardShortcuts.js.map +1 -0
  216. package/dist/esm/v2/hooks/usePrefersReducedMotion.js +99 -0
  217. package/dist/esm/v2/hooks/usePrefersReducedMotion.js.map +1 -0
  218. package/dist/esm/v2/hooks/useResolvedDensity.js +2 -10
  219. package/dist/esm/v2/hooks/useResolvedDensity.js.map +1 -1
  220. package/dist/esm/v2/hooks/useSortedRows.js +3 -5
  221. package/dist/esm/v2/hooks/useSortedRows.js.map +1 -1
  222. package/dist/esm/v2/hooks/useTabLoading.js +6 -21
  223. package/dist/esm/v2/hooks/useTabLoading.js.map +1 -1
  224. package/dist/esm/v2/index.js +2 -3
  225. package/dist/esm/v2/index.js.map +1 -1
  226. package/dist/esm/v2/modalContext.js +2 -2
  227. package/dist/esm/v2/modalContext.js.map +1 -1
  228. package/dist/esm/v2/models/favorite.js.map +1 -1
  229. package/dist/esm/v2/models/personalization.js.map +1 -1
  230. package/dist/esm/v2/models/referentiel.js.map +1 -1
  231. package/dist/esm/v2/models/savedFilter.js.map +1 -1
  232. package/dist/esm/v2/patterns/ActionBar.js +115 -159
  233. package/dist/esm/v2/patterns/ActionBar.js.map +1 -1
  234. package/dist/esm/v2/patterns/AppMain.js +108 -0
  235. package/dist/esm/v2/patterns/AppMain.js.map +1 -0
  236. package/dist/esm/v2/patterns/BulkActionBar.js +31 -34
  237. package/dist/esm/v2/patterns/BulkActionBar.js.map +1 -1
  238. package/dist/esm/v2/patterns/ChartFigure.js +151 -0
  239. package/dist/esm/v2/patterns/ChartFigure.js.map +1 -0
  240. package/dist/esm/v2/patterns/CollapsibleDataGrid.js +111 -152
  241. package/dist/esm/v2/patterns/CollapsibleDataGrid.js.map +1 -1
  242. package/dist/esm/v2/patterns/ColumnsToggle.js +43 -77
  243. package/dist/esm/v2/patterns/ColumnsToggle.js.map +1 -1
  244. package/dist/esm/v2/patterns/DataGrid.js +221 -255
  245. package/dist/esm/v2/patterns/DataGrid.js.map +1 -1
  246. package/dist/esm/v2/patterns/DataGridSettingsMenu.js +76 -94
  247. package/dist/esm/v2/patterns/DataGridSettingsMenu.js.map +1 -1
  248. package/dist/esm/v2/patterns/DataGridToolbar.js +85 -89
  249. package/dist/esm/v2/patterns/DataGridToolbar.js.map +1 -1
  250. package/dist/esm/v2/patterns/DataGridVirtualized.js +141 -182
  251. package/dist/esm/v2/patterns/DataGridVirtualized.js.map +1 -1
  252. package/dist/esm/v2/patterns/DeleteResourceConfirmDialog.js +26 -30
  253. package/dist/esm/v2/patterns/DeleteResourceConfirmDialog.js.map +1 -1
  254. package/dist/esm/v2/patterns/DetailSplit.js +108 -0
  255. package/dist/esm/v2/patterns/DetailSplit.js.map +1 -0
  256. package/dist/esm/v2/patterns/FavoriteColumn.js +15 -17
  257. package/dist/esm/v2/patterns/FavoriteColumn.js.map +1 -1
  258. package/dist/esm/v2/patterns/FavoritesFilter.js +30 -39
  259. package/dist/esm/v2/patterns/FavoritesFilter.js.map +1 -1
  260. package/dist/esm/v2/patterns/FilterTabBar.js +112 -0
  261. package/dist/esm/v2/patterns/FilterTabBar.js.map +1 -0
  262. package/dist/esm/v2/patterns/FormErrorSummary.js +12 -13
  263. package/dist/esm/v2/patterns/FormErrorSummary.js.map +1 -1
  264. package/dist/esm/v2/patterns/FormPageShell.js +43 -41
  265. package/dist/esm/v2/patterns/FormPageShell.js.map +1 -1
  266. package/dist/esm/v2/patterns/FormSection.js +30 -38
  267. package/dist/esm/v2/patterns/FormSection.js.map +1 -1
  268. package/dist/esm/v2/patterns/FormikCheckbox.js +29 -39
  269. package/dist/esm/v2/patterns/FormikCheckbox.js.map +1 -1
  270. package/dist/esm/v2/patterns/FormikCheckboxGroup.js +56 -60
  271. package/dist/esm/v2/patterns/FormikCheckboxGroup.js.map +1 -1
  272. package/dist/esm/v2/patterns/FormikCombobox.js +51 -69
  273. package/dist/esm/v2/patterns/FormikCombobox.js.map +1 -1
  274. package/dist/esm/v2/patterns/FormikDatePicker.js +44 -58
  275. package/dist/esm/v2/patterns/FormikDatePicker.js.map +1 -1
  276. package/dist/esm/v2/patterns/FormikDateTimePicker.js +44 -58
  277. package/dist/esm/v2/patterns/FormikDateTimePicker.js.map +1 -1
  278. package/dist/esm/v2/patterns/FormikErrorFocus.js +22 -23
  279. package/dist/esm/v2/patterns/FormikErrorFocus.js.map +1 -1
  280. package/dist/esm/v2/patterns/FormikErrorSummary.js +89 -0
  281. package/dist/esm/v2/patterns/FormikErrorSummary.js.map +1 -0
  282. package/dist/esm/v2/patterns/FormikFile.js +94 -78
  283. package/dist/esm/v2/patterns/FormikFile.js.map +1 -1
  284. package/dist/esm/v2/patterns/FormikInput.js +40 -53
  285. package/dist/esm/v2/patterns/FormikInput.js.map +1 -1
  286. package/dist/esm/v2/patterns/FormikRadioGroup.js +39 -51
  287. package/dist/esm/v2/patterns/FormikRadioGroup.js.map +1 -1
  288. package/dist/esm/v2/patterns/FormikReferentielField.js +49 -59
  289. package/dist/esm/v2/patterns/FormikReferentielField.js.map +1 -1
  290. package/dist/esm/v2/patterns/FormikSelect.js +64 -87
  291. package/dist/esm/v2/patterns/FormikSelect.js.map +1 -1
  292. package/dist/esm/v2/patterns/FormikTextarea.js +30 -46
  293. package/dist/esm/v2/patterns/FormikTextarea.js.map +1 -1
  294. package/dist/esm/v2/patterns/KeyboardShortcutsHelp.js +53 -71
  295. package/dist/esm/v2/patterns/KeyboardShortcutsHelp.js.map +1 -1
  296. package/dist/esm/v2/patterns/NetworkErrorBanner.js +6 -7
  297. package/dist/esm/v2/patterns/NetworkErrorBanner.js.map +1 -1
  298. package/dist/esm/v2/patterns/PageContent.js +10 -14
  299. package/dist/esm/v2/patterns/PageContent.js.map +1 -1
  300. package/dist/esm/v2/patterns/PreviewDrawer.js +153 -0
  301. package/dist/esm/v2/patterns/PreviewDrawer.js.map +1 -0
  302. package/dist/esm/v2/patterns/ReferentielField.js +327 -312
  303. package/dist/esm/v2/patterns/ReferentielField.js.map +1 -1
  304. package/dist/esm/v2/patterns/RowFavoriteToggle.js +27 -22
  305. package/dist/esm/v2/patterns/RowFavoriteToggle.js.map +1 -1
  306. package/dist/esm/v2/patterns/SaveFilterDialog.js +38 -66
  307. package/dist/esm/v2/patterns/SaveFilterDialog.js.map +1 -1
  308. package/dist/esm/v2/patterns/SavedFiltersMenu.js +62 -81
  309. package/dist/esm/v2/patterns/SavedFiltersMenu.js.map +1 -1
  310. package/dist/esm/v2/patterns/SkeletonPageShell.js +106 -129
  311. package/dist/esm/v2/patterns/SkeletonPageShell.js.map +1 -1
  312. package/dist/esm/v2/patterns/SortableHeader.js +22 -45
  313. package/dist/esm/v2/patterns/SortableHeader.js.map +1 -1
  314. package/dist/esm/v2/patterns/Tour.js +94 -120
  315. package/dist/esm/v2/patterns/Tour.js.map +1 -1
  316. package/dist/esm/v2/patterns/_dataGridShared.js +107 -128
  317. package/dist/esm/v2/patterns/_dataGridShared.js.map +1 -1
  318. package/dist/esm/v2/patterns/_pickerSerialisation.js +6 -8
  319. package/dist/esm/v2/patterns/_pickerSerialisation.js.map +1 -1
  320. package/dist/esm/v2/patterns/_sort.js +17 -33
  321. package/dist/esm/v2/patterns/_sort.js.map +1 -1
  322. package/dist/esm/v2/patterns/_useColumnReorder.js +122 -160
  323. package/dist/esm/v2/patterns/_useColumnReorder.js.map +1 -1
  324. package/dist/esm/v2/patterns/_useColumnResize.js +78 -96
  325. package/dist/esm/v2/patterns/_useColumnResize.js.map +1 -1
  326. package/dist/esm/v2/patterns/filterCriteria.js +102 -0
  327. package/dist/esm/v2/patterns/filterCriteria.js.map +1 -0
  328. package/dist/esm/v2/patterns/index.js +152 -0
  329. package/dist/esm/v2/patterns/index.js.map +1 -1
  330. package/dist/esm/v2/patterns/rowActions.js +223 -0
  331. package/dist/esm/v2/patterns/rowActions.js.map +1 -0
  332. package/dist/esm/v2/personalization/PersonalizationProvider.js +50 -47
  333. package/dist/esm/v2/personalization/PersonalizationProvider.js.map +1 -1
  334. package/dist/esm/v2/personalization/adapters/_storageKey.js +5 -5
  335. package/dist/esm/v2/personalization/adapters/_storageKey.js.map +1 -1
  336. package/dist/esm/v2/personalization/adapters/createLocalStorageAdapter.js +22 -23
  337. package/dist/esm/v2/personalization/adapters/createLocalStorageAdapter.js.map +1 -1
  338. package/dist/esm/v2/personalization/adapters/createMemoryAdapter.js +13 -13
  339. package/dist/esm/v2/personalization/adapters/createMemoryAdapter.js.map +1 -1
  340. package/dist/esm/v2/personalization/capabilities/favorites.js +36 -60
  341. package/dist/esm/v2/personalization/capabilities/favorites.js.map +1 -1
  342. package/dist/esm/v2/personalization/capabilities/favoritesView.js +22 -34
  343. package/dist/esm/v2/personalization/capabilities/favoritesView.js.map +1 -1
  344. package/dist/esm/v2/personalization/capabilities/gridPreferences.js +28 -34
  345. package/dist/esm/v2/personalization/capabilities/gridPreferences.js.map +1 -1
  346. package/dist/esm/v2/personalization/capabilities/reviveSavedCriteria.js +119 -0
  347. package/dist/esm/v2/personalization/capabilities/reviveSavedCriteria.js.map +1 -0
  348. package/dist/esm/v2/personalization/capabilities/savedFilters.js +90 -98
  349. package/dist/esm/v2/personalization/capabilities/savedFilters.js.map +1 -1
  350. package/dist/esm/v2/personalization/createPersonalizationStore.js +78 -181
  351. package/dist/esm/v2/personalization/createPersonalizationStore.js.map +1 -1
  352. package/dist/esm/v2/personalization/index.js +17 -0
  353. package/dist/esm/v2/personalization/index.js.map +1 -1
  354. package/dist/esm/v2/personalization/personalizationContext.js +9 -9
  355. package/dist/esm/v2/personalization/personalizationContext.js.map +1 -1
  356. package/dist/esm/v2/personalization/schema.js +8 -9
  357. package/dist/esm/v2/personalization/schema.js.map +1 -1
  358. package/dist/esm/v2/referentiel/ReferentielProvider.js +27 -42
  359. package/dist/esm/v2/referentiel/ReferentielProvider.js.map +1 -1
  360. package/dist/esm/v2/referentiel/types.js +2 -0
  361. package/dist/esm/v2/referentiel/types.js.map +1 -0
  362. package/dist/esm/v2/referentiel/useReferentielClient.js +10 -11
  363. package/dist/esm/v2/referentiel/useReferentielClient.js.map +1 -1
  364. package/dist/esm/v2/referentiel/useReferentielOptions.js +60 -117
  365. package/dist/esm/v2/referentiel/useReferentielOptions.js.map +1 -1
  366. package/dist/esm/v2/referentiel/useReferentielSearch.js +37 -91
  367. package/dist/esm/v2/referentiel/useReferentielSearch.js.map +1 -1
  368. package/dist/esm/v2/theme/_brand.js +8 -24
  369. package/dist/esm/v2/theme/_brand.js.map +1 -1
  370. package/dist/esm/v2/theme/_brandSecondary.js +8 -24
  371. package/dist/esm/v2/theme/_brandSecondary.js.map +1 -1
  372. package/dist/esm/v2/theme/createPortnetTheme.js +51 -61
  373. package/dist/esm/v2/theme/createPortnetTheme.js.map +1 -1
  374. package/dist/esm/v2/theme/cssVariables.js +62 -69
  375. package/dist/esm/v2/theme/cssVariables.js.map +1 -1
  376. package/dist/esm/v2/theme/index.js +5 -5
  377. package/dist/esm/v2/theme/index.js.map +1 -1
  378. package/dist/esm/v2/tokens/breakpoints.js +14 -14
  379. package/dist/esm/v2/tokens/breakpoints.js.map +1 -1
  380. package/dist/esm/v2/tokens/chart.js +261 -0
  381. package/dist/esm/v2/tokens/chart.js.map +1 -0
  382. package/dist/esm/v2/tokens/colors.js +22 -22
  383. package/dist/esm/v2/tokens/colors.js.map +1 -1
  384. package/dist/esm/v2/tokens/density.js +62 -7
  385. package/dist/esm/v2/tokens/density.js.map +1 -1
  386. package/dist/esm/v2/tokens/index.js +49 -34
  387. package/dist/esm/v2/tokens/index.js.map +1 -1
  388. package/dist/esm/v2/tokens/motion.js +12 -20
  389. package/dist/esm/v2/tokens/motion.js.map +1 -1
  390. package/dist/esm/v2/tokens/radius.js +1 -1
  391. package/dist/esm/v2/tokens/radius.js.map +1 -1
  392. package/dist/esm/v2/tokens/shadows.js +6 -6
  393. package/dist/esm/v2/tokens/shadows.js.map +1 -1
  394. package/dist/esm/v2/tokens/spacing.js +2 -2
  395. package/dist/esm/v2/tokens/spacing.js.map +1 -1
  396. package/dist/esm/v2/tokens/state.js +1 -1
  397. package/dist/esm/v2/tokens/state.js.map +1 -1
  398. package/dist/esm/v2/tokens/statusPalette.js +17 -21
  399. package/dist/esm/v2/tokens/statusPalette.js.map +1 -1
  400. package/dist/esm/v2/tokens/tokens.json +6 -1
  401. package/dist/esm/v2/tokens/typography.js +13 -13
  402. package/dist/esm/v2/tokens/typography.js.map +1 -1
  403. package/dist/esm/v2/tokens/zIndex.js +1 -1
  404. package/dist/esm/v2/tokens/zIndex.js.map +1 -1
  405. package/dist/esm/v2/types/datagrid.js.map +1 -1
  406. package/dist/esm/v2/utils/apiError.js +16 -37
  407. package/dist/esm/v2/utils/apiError.js.map +1 -1
  408. package/dist/esm/v2/utils/contrast.js +31 -32
  409. package/dist/esm/v2/utils/contrast.js.map +1 -1
  410. package/dist/esm/v2/utils/cx.js +5 -25
  411. package/dist/esm/v2/utils/cx.js.map +1 -1
  412. package/dist/esm/v2/utils/fileDownload.js +23 -26
  413. package/dist/esm/v2/utils/fileDownload.js.map +1 -1
  414. package/dist/esm/v2/utils/fileValidation.js +209 -0
  415. package/dist/esm/v2/utils/fileValidation.js.map +1 -0
  416. package/dist/esm/v2/utils/fmtDate.js +111 -0
  417. package/dist/esm/v2/utils/fmtDate.js.map +1 -0
  418. package/dist/esm/v2/utils/fmtMoney.js +8 -10
  419. package/dist/esm/v2/utils/fmtMoney.js.map +1 -1
  420. package/dist/esm/v2/utils/formikErrors.js +78 -0
  421. package/dist/esm/v2/utils/formikErrors.js.map +1 -0
  422. package/dist/esm/v2/utils/index.js +35 -2
  423. package/dist/esm/v2/utils/index.js.map +1 -1
  424. package/dist/esm/v2/utils/mergeLabels.js +7 -12
  425. package/dist/esm/v2/utils/mergeLabels.js.map +1 -1
  426. package/dist/esm/v2/utils/networkStatus.js +12 -12
  427. package/dist/esm/v2/utils/networkStatus.js.map +1 -1
  428. package/dist/index.d.ts +7 -1
  429. package/dist/index.d.ts.map +1 -1
  430. package/dist/index.js +110 -49
  431. package/dist/index.js.map +1 -1
  432. package/dist/v2/__tests__/AppMain.test.js +133 -0
  433. package/dist/v2/__tests__/AppMain.test.js.map +1 -0
  434. package/dist/v2/__tests__/ChartFigure.test.js +183 -0
  435. package/dist/v2/__tests__/ChartFigure.test.js.map +1 -0
  436. package/dist/v2/__tests__/DataGridRowActionsPropagation.test.js +153 -0
  437. package/dist/v2/__tests__/DataGridRowActionsPropagation.test.js.map +1 -0
  438. package/dist/v2/__tests__/DrawerTactileTargets.test.js +94 -0
  439. package/dist/v2/__tests__/DrawerTactileTargets.test.js.map +1 -0
  440. package/dist/v2/__tests__/FieldError.test.js +82 -49
  441. package/dist/v2/__tests__/FieldError.test.js.map +1 -1
  442. package/dist/v2/__tests__/FieldNaming.test.js +161 -0
  443. package/dist/v2/__tests__/FieldNaming.test.js.map +1 -0
  444. package/dist/v2/__tests__/FieldWidth.test.js +23 -25
  445. package/dist/v2/__tests__/FieldWidth.test.js.map +1 -1
  446. package/dist/v2/__tests__/FileCard.test.js +29 -28
  447. package/dist/v2/__tests__/FileCard.test.js.map +1 -1
  448. package/dist/v2/__tests__/FormikCheckbox.test.js +90 -183
  449. package/dist/v2/__tests__/FormikCheckbox.test.js.map +1 -1
  450. package/dist/v2/__tests__/FormikDateTimePicker.test.js +38 -48
  451. package/dist/v2/__tests__/FormikDateTimePicker.test.js.map +1 -1
  452. package/dist/v2/__tests__/FormikDisplayWidth.test.js +102 -0
  453. package/dist/v2/__tests__/FormikDisplayWidth.test.js.map +1 -0
  454. package/dist/v2/__tests__/FormikRadioGroup.test.js +123 -204
  455. package/dist/v2/__tests__/FormikRadioGroup.test.js.map +1 -1
  456. package/dist/v2/__tests__/MobileRowCard.test.js +63 -61
  457. package/dist/v2/__tests__/MobileRowCard.test.js.map +1 -1
  458. package/dist/v2/__tests__/PreviewDrawer.test.js +169 -0
  459. package/dist/v2/__tests__/PreviewDrawer.test.js.map +1 -0
  460. package/dist/v2/__tests__/ReferentielFieldContainer.test.js +159 -0
  461. package/dist/v2/__tests__/ReferentielFieldContainer.test.js.map +1 -0
  462. package/dist/v2/__tests__/SectionErrorBoundary.test.js +53 -68
  463. package/dist/v2/__tests__/SectionErrorBoundary.test.js.map +1 -1
  464. package/dist/v2/__tests__/apiError.test.js +50 -69
  465. package/dist/v2/__tests__/apiError.test.js.map +1 -1
  466. package/dist/v2/__tests__/banned-patterns.test.js +42 -123
  467. package/dist/v2/__tests__/banned-patterns.test.js.map +1 -1
  468. package/dist/v2/__tests__/chart-palette.test.js +205 -0
  469. package/dist/v2/__tests__/chart-palette.test.js.map +1 -0
  470. package/dist/v2/__tests__/contrast-palette.test.js +42 -74
  471. package/dist/v2/__tests__/contrast-palette.test.js.map +1 -1
  472. package/dist/v2/__tests__/cssVariables.test.js +44 -51
  473. package/dist/v2/__tests__/cssVariables.test.js.map +1 -1
  474. package/dist/v2/__tests__/fileValidation.test.js +136 -0
  475. package/dist/v2/__tests__/fileValidation.test.js.map +1 -0
  476. package/dist/v2/__tests__/filterCriteria.test.js +324 -0
  477. package/dist/v2/__tests__/filterCriteria.test.js.map +1 -0
  478. package/dist/v2/__tests__/fmtDate.test.js +69 -0
  479. package/dist/v2/__tests__/fmtDate.test.js.map +1 -0
  480. package/dist/v2/__tests__/gap-leakage-refonte.test.js +221 -0
  481. package/dist/v2/__tests__/gap-leakage-refonte.test.js.map +1 -0
  482. package/dist/v2/__tests__/labels-merge.test.js +23 -27
  483. package/dist/v2/__tests__/labels-merge.test.js.map +1 -1
  484. package/dist/v2/__tests__/locale-fallback.test.js +47 -52
  485. package/dist/v2/__tests__/locale-fallback.test.js.map +1 -1
  486. package/dist/v2/__tests__/reviveSavedCriteria.test.js +144 -0
  487. package/dist/v2/__tests__/reviveSavedCriteria.test.js.map +1 -0
  488. package/dist/v2/__tests__/rowActions.test.js +186 -0
  489. package/dist/v2/__tests__/rowActions.test.js.map +1 -0
  490. package/dist/v2/__tests__/useFocusOnRouteChange.test.js +156 -0
  491. package/dist/v2/__tests__/useFocusOnRouteChange.test.js.map +1 -0
  492. package/dist/v2/__tests__/useFocusTrap.test.js +270 -407
  493. package/dist/v2/__tests__/useFocusTrap.test.js.map +1 -1
  494. package/dist/v2/__tests__/usePrefersReducedMotion.test.js +123 -0
  495. package/dist/v2/__tests__/usePrefersReducedMotion.test.js.map +1 -0
  496. package/dist/v2/components/Accordion.js +60 -82
  497. package/dist/v2/components/Accordion.js.map +1 -1
  498. package/dist/v2/components/ActionStrip.js +40 -52
  499. package/dist/v2/components/ActionStrip.js.map +1 -1
  500. package/dist/v2/components/Banner.js +42 -41
  501. package/dist/v2/components/Banner.js.map +1 -1
  502. package/dist/v2/components/Busy.js +22 -27
  503. package/dist/v2/components/Busy.js.map +1 -1
  504. package/dist/v2/components/Button.js +39 -50
  505. package/dist/v2/components/Button.js.map +1 -1
  506. package/dist/v2/components/CategoryTag.d.ts.map +1 -1
  507. package/dist/v2/components/CategoryTag.js +49 -32
  508. package/dist/v2/components/CategoryTag.js.map +1 -1
  509. package/dist/v2/components/Checkbox.js +39 -45
  510. package/dist/v2/components/Checkbox.js.map +1 -1
  511. package/dist/v2/components/Chip.js +29 -42
  512. package/dist/v2/components/Chip.js.map +1 -1
  513. package/dist/v2/components/Combobox.js +122 -144
  514. package/dist/v2/components/Combobox.js.map +1 -1
  515. package/dist/v2/components/CommandPalette.js +138 -225
  516. package/dist/v2/components/CommandPalette.js.map +1 -1
  517. package/dist/v2/components/ConfirmDialog.js +46 -56
  518. package/dist/v2/components/ConfirmDialog.js.map +1 -1
  519. package/dist/v2/components/DatePicker.js +81 -86
  520. package/dist/v2/components/DatePicker.js.map +1 -1
  521. package/dist/v2/components/DateRangePicker.js +77 -87
  522. package/dist/v2/components/DateRangePicker.js.map +1 -1
  523. package/dist/v2/components/DateTimePicker.js +84 -91
  524. package/dist/v2/components/DateTimePicker.js.map +1 -1
  525. package/dist/v2/components/Drawer.d.ts.map +1 -1
  526. package/dist/v2/components/Drawer.js +93 -88
  527. package/dist/v2/components/Drawer.js.map +1 -1
  528. package/dist/v2/components/Dropzone.js +150 -196
  529. package/dist/v2/components/Dropzone.js.map +1 -1
  530. package/dist/v2/components/EmptyState.js +18 -20
  531. package/dist/v2/components/EmptyState.js.map +1 -1
  532. package/dist/v2/components/FavoriteToggle.js +28 -39
  533. package/dist/v2/components/FavoriteToggle.js.map +1 -1
  534. package/dist/v2/components/Field.d.ts +62 -4
  535. package/dist/v2/components/Field.d.ts.map +1 -1
  536. package/dist/v2/components/Field.js +169 -70
  537. package/dist/v2/components/Field.js.map +1 -1
  538. package/dist/v2/components/FieldError.js +18 -21
  539. package/dist/v2/components/FieldError.js.map +1 -1
  540. package/dist/v2/components/FieldHelp.js +40 -60
  541. package/dist/v2/components/FieldHelp.js.map +1 -1
  542. package/dist/v2/components/FileCard.js +27 -31
  543. package/dist/v2/components/FileCard.js.map +1 -1
  544. package/dist/v2/components/FilterTab.js +30 -38
  545. package/dist/v2/components/FilterTab.js.map +1 -1
  546. package/dist/v2/components/ForbiddenPage.d.ts +25 -1
  547. package/dist/v2/components/ForbiddenPage.d.ts.map +1 -1
  548. package/dist/v2/components/ForbiddenPage.js +37 -17
  549. package/dist/v2/components/ForbiddenPage.js.map +1 -1
  550. package/dist/v2/components/FormGrid.js +53 -59
  551. package/dist/v2/components/FormGrid.js.map +1 -1
  552. package/dist/v2/components/FormikDisplay.d.ts +50 -1
  553. package/dist/v2/components/FormikDisplay.d.ts.map +1 -1
  554. package/dist/v2/components/FormikDisplay.js +108 -33
  555. package/dist/v2/components/FormikDisplay.js.map +1 -1
  556. package/dist/v2/components/Input.d.ts +40 -0
  557. package/dist/v2/components/Input.d.ts.map +1 -1
  558. package/dist/v2/components/Input.js +81 -41
  559. package/dist/v2/components/Input.js.map +1 -1
  560. package/dist/v2/components/KPICard.js +57 -67
  561. package/dist/v2/components/KPICard.js.map +1 -1
  562. package/dist/v2/components/KPIStrip.js +16 -22
  563. package/dist/v2/components/KPIStrip.js.map +1 -1
  564. package/dist/v2/components/KV.js +25 -31
  565. package/dist/v2/components/KV.js.map +1 -1
  566. package/dist/v2/components/KVGrid.js +19 -26
  567. package/dist/v2/components/KVGrid.js.map +1 -1
  568. package/dist/v2/components/Layout.js +91 -120
  569. package/dist/v2/components/Layout.js.map +1 -1
  570. package/dist/v2/components/MobileRowCard.js +79 -91
  571. package/dist/v2/components/MobileRowCard.js.map +1 -1
  572. package/dist/v2/components/Modal.js +61 -69
  573. package/dist/v2/components/Modal.js.map +1 -1
  574. package/dist/v2/components/NetworkErrorPage.d.ts +19 -1
  575. package/dist/v2/components/NetworkErrorPage.d.ts.map +1 -1
  576. package/dist/v2/components/NetworkErrorPage.js +38 -21
  577. package/dist/v2/components/NetworkErrorPage.js.map +1 -1
  578. package/dist/v2/components/NotFoundPage.d.ts +17 -1
  579. package/dist/v2/components/NotFoundPage.d.ts.map +1 -1
  580. package/dist/v2/components/NotFoundPage.js +37 -18
  581. package/dist/v2/components/NotFoundPage.js.map +1 -1
  582. package/dist/v2/components/NumberInput.js +88 -118
  583. package/dist/v2/components/NumberInput.js.map +1 -1
  584. package/dist/v2/components/OverflowMenu.js +38 -56
  585. package/dist/v2/components/OverflowMenu.js.map +1 -1
  586. package/dist/v2/components/PdfViewer.js +34 -45
  587. package/dist/v2/components/PdfViewer.js.map +1 -1
  588. package/dist/v2/components/ProgressBar.js +42 -49
  589. package/dist/v2/components/ProgressBar.js.map +1 -1
  590. package/dist/v2/components/Radio.js +59 -67
  591. package/dist/v2/components/Radio.js.map +1 -1
  592. package/dist/v2/components/SectionErrorBoundary.js +90 -135
  593. package/dist/v2/components/SectionErrorBoundary.js.map +1 -1
  594. package/dist/v2/components/SectionHeader.js +34 -41
  595. package/dist/v2/components/SectionHeader.js.map +1 -1
  596. package/dist/v2/components/Segmented.js +69 -93
  597. package/dist/v2/components/Segmented.js.map +1 -1
  598. package/dist/v2/components/Select.d.ts +26 -2
  599. package/dist/v2/components/Select.d.ts.map +1 -1
  600. package/dist/v2/components/Select.js +120 -155
  601. package/dist/v2/components/Select.js.map +1 -1
  602. package/dist/v2/components/ServerErrorPage.d.ts +27 -1
  603. package/dist/v2/components/ServerErrorPage.d.ts.map +1 -1
  604. package/dist/v2/components/ServerErrorPage.js +37 -20
  605. package/dist/v2/components/ServerErrorPage.js.map +1 -1
  606. package/dist/v2/components/Skeleton.js +86 -100
  607. package/dist/v2/components/Skeleton.js.map +1 -1
  608. package/dist/v2/components/SkipLink.js +9 -12
  609. package/dist/v2/components/SkipLink.js.map +1 -1
  610. package/dist/v2/components/Spinner.js +16 -25
  611. package/dist/v2/components/Spinner.js.map +1 -1
  612. package/dist/v2/components/Status.js +18 -29
  613. package/dist/v2/components/Status.js.map +1 -1
  614. package/dist/v2/components/Stepper.js +80 -82
  615. package/dist/v2/components/Stepper.js.map +1 -1
  616. package/dist/v2/components/Surface.js +34 -49
  617. package/dist/v2/components/Surface.js.map +1 -1
  618. package/dist/v2/components/Switch.js +29 -37
  619. package/dist/v2/components/Switch.js.map +1 -1
  620. package/dist/v2/components/TabPanel.d.ts +17 -0
  621. package/dist/v2/components/TabPanel.d.ts.map +1 -0
  622. package/dist/v2/components/TabPanel.js +90 -0
  623. package/dist/v2/components/TabPanel.js.map +1 -0
  624. package/dist/v2/components/Tabs.d.ts +25 -0
  625. package/dist/v2/components/Tabs.d.ts.map +1 -1
  626. package/dist/v2/components/Tabs.js +53 -29
  627. package/dist/v2/components/Tabs.js.map +1 -1
  628. package/dist/v2/components/TelInput.js +80 -115
  629. package/dist/v2/components/TelInput.js.map +1 -1
  630. package/dist/v2/components/Textarea.js +26 -35
  631. package/dist/v2/components/Textarea.js.map +1 -1
  632. package/dist/v2/components/TimePicker.js +62 -74
  633. package/dist/v2/components/TimePicker.js.map +1 -1
  634. package/dist/v2/components/Toast.js +119 -174
  635. package/dist/v2/components/Toast.js.map +1 -1
  636. package/dist/v2/components/Tooltip.js +23 -38
  637. package/dist/v2/components/Tooltip.js.map +1 -1
  638. package/dist/v2/components/_ErrorPageBody.js +15 -16
  639. package/dist/v2/components/_ErrorPageBody.js.map +1 -1
  640. package/dist/v2/components/_pickerShared.js +5 -5
  641. package/dist/v2/components/_pickerShared.js.map +1 -1
  642. package/dist/v2/components/index.d.ts +40 -1
  643. package/dist/v2/components/index.d.ts.map +1 -1
  644. package/dist/v2/components/index.js +153 -136
  645. package/dist/v2/components/index.js.map +1 -1
  646. package/dist/v2/hooks/index.d.ts +65 -0
  647. package/dist/v2/hooks/index.d.ts.map +1 -1
  648. package/dist/v2/hooks/index.js +63 -24
  649. package/dist/v2/hooks/index.js.map +1 -1
  650. package/dist/v2/hooks/useAppliedFilters.d.ts +102 -0
  651. package/dist/v2/hooks/useAppliedFilters.d.ts.map +1 -0
  652. package/dist/v2/hooks/useAppliedFilters.js +117 -0
  653. package/dist/v2/hooks/useAppliedFilters.js.map +1 -0
  654. package/dist/v2/hooks/useDebouncedCallback.d.ts +64 -0
  655. package/dist/v2/hooks/useDebouncedCallback.d.ts.map +1 -0
  656. package/dist/v2/hooks/useDebouncedCallback.js +87 -0
  657. package/dist/v2/hooks/useDebouncedCallback.js.map +1 -0
  658. package/dist/v2/hooks/useDelayedFlag.js +6 -20
  659. package/dist/v2/hooks/useDelayedFlag.js.map +1 -1
  660. package/dist/v2/hooks/useDensity.d.ts.map +1 -1
  661. package/dist/v2/hooks/useDensity.js +14 -18
  662. package/dist/v2/hooks/useDensity.js.map +1 -1
  663. package/dist/v2/hooks/useFocusFirstError.js +26 -34
  664. package/dist/v2/hooks/useFocusFirstError.js.map +1 -1
  665. package/dist/v2/hooks/useFocusOnRouteChange.d.ts +65 -0
  666. package/dist/v2/hooks/useFocusOnRouteChange.d.ts.map +1 -0
  667. package/dist/v2/hooks/useFocusOnRouteChange.js +88 -0
  668. package/dist/v2/hooks/useFocusOnRouteChange.js.map +1 -0
  669. package/dist/v2/hooks/useFocusTrap.js +20 -24
  670. package/dist/v2/hooks/useFocusTrap.js.map +1 -1
  671. package/dist/v2/hooks/useFormAutoSave.d.ts +4 -4
  672. package/dist/v2/hooks/useFormAutoSave.d.ts.map +1 -1
  673. package/dist/v2/hooks/useFormAutoSave.js +39 -54
  674. package/dist/v2/hooks/useFormAutoSave.js.map +1 -1
  675. package/dist/v2/hooks/useFormCompletionProgress.d.ts +1 -1
  676. package/dist/v2/hooks/useFormCompletionProgress.d.ts.map +1 -1
  677. package/dist/v2/hooks/useFormCompletionProgress.js +33 -52
  678. package/dist/v2/hooks/useFormCompletionProgress.js.map +1 -1
  679. package/dist/v2/hooks/useKeyboardShortcuts.d.ts +25 -0
  680. package/dist/v2/hooks/useKeyboardShortcuts.d.ts.map +1 -0
  681. package/dist/v2/hooks/useKeyboardShortcuts.js +132 -0
  682. package/dist/v2/hooks/useKeyboardShortcuts.js.map +1 -0
  683. package/dist/v2/hooks/usePrefersReducedMotion.d.ts +56 -0
  684. package/dist/v2/hooks/usePrefersReducedMotion.d.ts.map +1 -0
  685. package/dist/v2/hooks/usePrefersReducedMotion.js +105 -0
  686. package/dist/v2/hooks/usePrefersReducedMotion.js.map +1 -0
  687. package/dist/v2/hooks/useResolvedDensity.js +5 -13
  688. package/dist/v2/hooks/useResolvedDensity.js.map +1 -1
  689. package/dist/v2/hooks/useSortedRows.js +4 -6
  690. package/dist/v2/hooks/useSortedRows.js.map +1 -1
  691. package/dist/v2/hooks/useTabLoading.js +7 -22
  692. package/dist/v2/hooks/useTabLoading.js.map +1 -1
  693. package/dist/v2/index.js +143 -145
  694. package/dist/v2/index.js.map +1 -1
  695. package/dist/v2/modalContext.js +2 -2
  696. package/dist/v2/modalContext.js.map +1 -1
  697. package/dist/v2/models/favorite.d.ts +8 -9
  698. package/dist/v2/models/favorite.d.ts.map +1 -1
  699. package/dist/v2/models/favorite.js.map +1 -1
  700. package/dist/v2/models/index.js +4 -4
  701. package/dist/v2/models/index.js.map +1 -1
  702. package/dist/v2/models/personalization.d.ts +44 -48
  703. package/dist/v2/models/personalization.d.ts.map +1 -1
  704. package/dist/v2/models/personalization.js.map +1 -1
  705. package/dist/v2/models/referentiel.d.ts +32 -50
  706. package/dist/v2/models/referentiel.d.ts.map +1 -1
  707. package/dist/v2/models/referentiel.js.map +1 -1
  708. package/dist/v2/models/savedFilter.d.ts +8 -17
  709. package/dist/v2/models/savedFilter.d.ts.map +1 -1
  710. package/dist/v2/models/savedFilter.js.map +1 -1
  711. package/dist/v2/patterns/ActionBar.js +152 -187
  712. package/dist/v2/patterns/ActionBar.js.map +1 -1
  713. package/dist/v2/patterns/AppMain.d.ts +109 -0
  714. package/dist/v2/patterns/AppMain.d.ts.map +1 -0
  715. package/dist/v2/patterns/AppMain.js +115 -0
  716. package/dist/v2/patterns/AppMain.js.map +1 -0
  717. package/dist/v2/patterns/BulkActionBar.js +40 -42
  718. package/dist/v2/patterns/BulkActionBar.js.map +1 -1
  719. package/dist/v2/patterns/ChartFigure.d.ts +124 -0
  720. package/dist/v2/patterns/ChartFigure.d.ts.map +1 -0
  721. package/dist/v2/patterns/ChartFigure.js +159 -0
  722. package/dist/v2/patterns/ChartFigure.js.map +1 -0
  723. package/dist/v2/patterns/CollapsibleDataGrid.js +138 -174
  724. package/dist/v2/patterns/CollapsibleDataGrid.js.map +1 -1
  725. package/dist/v2/patterns/ColumnsToggle.js +60 -94
  726. package/dist/v2/patterns/ColumnsToggle.js.map +1 -1
  727. package/dist/v2/patterns/DataGrid.d.ts.map +1 -1
  728. package/dist/v2/patterns/DataGrid.js +262 -297
  729. package/dist/v2/patterns/DataGrid.js.map +1 -1
  730. package/dist/v2/patterns/DataGridSettingsMenu.d.ts +12 -0
  731. package/dist/v2/patterns/DataGridSettingsMenu.d.ts.map +1 -1
  732. package/dist/v2/patterns/DataGridSettingsMenu.js +104 -121
  733. package/dist/v2/patterns/DataGridSettingsMenu.js.map +1 -1
  734. package/dist/v2/patterns/DataGridToolbar.js +103 -106
  735. package/dist/v2/patterns/DataGridToolbar.js.map +1 -1
  736. package/dist/v2/patterns/DataGridVirtualized.js +179 -217
  737. package/dist/v2/patterns/DataGridVirtualized.js.map +1 -1
  738. package/dist/v2/patterns/DeleteResourceConfirmDialog.js +32 -35
  739. package/dist/v2/patterns/DeleteResourceConfirmDialog.js.map +1 -1
  740. package/dist/v2/patterns/DetailSplit.d.ts +87 -0
  741. package/dist/v2/patterns/DetailSplit.d.ts.map +1 -0
  742. package/dist/v2/patterns/DetailSplit.js +116 -0
  743. package/dist/v2/patterns/DetailSplit.js.map +1 -0
  744. package/dist/v2/patterns/FavoriteColumn.js +22 -23
  745. package/dist/v2/patterns/FavoriteColumn.js.map +1 -1
  746. package/dist/v2/patterns/FavoritesFilter.js +36 -44
  747. package/dist/v2/patterns/FavoritesFilter.js.map +1 -1
  748. package/dist/v2/patterns/FilterTabBar.d.ts +28 -0
  749. package/dist/v2/patterns/FilterTabBar.d.ts.map +1 -0
  750. package/dist/v2/patterns/FilterTabBar.js +120 -0
  751. package/dist/v2/patterns/FilterTabBar.js.map +1 -0
  752. package/dist/v2/patterns/FormErrorSummary.js +20 -23
  753. package/dist/v2/patterns/FormErrorSummary.js.map +1 -1
  754. package/dist/v2/patterns/FormPageShell.js +53 -50
  755. package/dist/v2/patterns/FormPageShell.js.map +1 -1
  756. package/dist/v2/patterns/FormSection.d.ts +8 -3
  757. package/dist/v2/patterns/FormSection.d.ts.map +1 -1
  758. package/dist/v2/patterns/FormSection.js +44 -51
  759. package/dist/v2/patterns/FormSection.js.map +1 -1
  760. package/dist/v2/patterns/FormikCheckbox.js +36 -45
  761. package/dist/v2/patterns/FormikCheckbox.js.map +1 -1
  762. package/dist/v2/patterns/FormikCheckboxGroup.d.ts +17 -1
  763. package/dist/v2/patterns/FormikCheckboxGroup.d.ts.map +1 -1
  764. package/dist/v2/patterns/FormikCheckboxGroup.js +62 -65
  765. package/dist/v2/patterns/FormikCheckboxGroup.js.map +1 -1
  766. package/dist/v2/patterns/FormikCombobox.js +55 -72
  767. package/dist/v2/patterns/FormikCombobox.js.map +1 -1
  768. package/dist/v2/patterns/FormikDatePicker.js +50 -64
  769. package/dist/v2/patterns/FormikDatePicker.js.map +1 -1
  770. package/dist/v2/patterns/FormikDateTimePicker.js +50 -64
  771. package/dist/v2/patterns/FormikDateTimePicker.js.map +1 -1
  772. package/dist/v2/patterns/FormikErrorFocus.js +25 -26
  773. package/dist/v2/patterns/FormikErrorFocus.js.map +1 -1
  774. package/dist/v2/patterns/FormikErrorSummary.d.ts +74 -0
  775. package/dist/v2/patterns/FormikErrorSummary.d.ts.map +1 -0
  776. package/dist/v2/patterns/FormikErrorSummary.js +97 -0
  777. package/dist/v2/patterns/FormikErrorSummary.js.map +1 -0
  778. package/dist/v2/patterns/FormikFile.d.ts +14 -1
  779. package/dist/v2/patterns/FormikFile.d.ts.map +1 -1
  780. package/dist/v2/patterns/FormikFile.js +99 -83
  781. package/dist/v2/patterns/FormikFile.js.map +1 -1
  782. package/dist/v2/patterns/FormikInput.js +45 -58
  783. package/dist/v2/patterns/FormikInput.js.map +1 -1
  784. package/dist/v2/patterns/FormikRadioGroup.js +45 -56
  785. package/dist/v2/patterns/FormikRadioGroup.js.map +1 -1
  786. package/dist/v2/patterns/FormikReferentielField.d.ts +12 -1
  787. package/dist/v2/patterns/FormikReferentielField.d.ts.map +1 -1
  788. package/dist/v2/patterns/FormikReferentielField.js +54 -64
  789. package/dist/v2/patterns/FormikReferentielField.js.map +1 -1
  790. package/dist/v2/patterns/FormikSelect.js +70 -92
  791. package/dist/v2/patterns/FormikSelect.js.map +1 -1
  792. package/dist/v2/patterns/FormikTextarea.js +35 -51
  793. package/dist/v2/patterns/FormikTextarea.js.map +1 -1
  794. package/dist/v2/patterns/KeyboardShortcutsHelp.js +60 -80
  795. package/dist/v2/patterns/KeyboardShortcutsHelp.js.map +1 -1
  796. package/dist/v2/patterns/NetworkErrorBanner.js +13 -16
  797. package/dist/v2/patterns/NetworkErrorBanner.js.map +1 -1
  798. package/dist/v2/patterns/PageContent.js +17 -20
  799. package/dist/v2/patterns/PageContent.js.map +1 -1
  800. package/dist/v2/patterns/PreviewDrawer.d.ts +49 -0
  801. package/dist/v2/patterns/PreviewDrawer.d.ts.map +1 -0
  802. package/dist/v2/patterns/PreviewDrawer.js +159 -0
  803. package/dist/v2/patterns/PreviewDrawer.js.map +1 -0
  804. package/dist/v2/patterns/ReferentielField.d.ts +86 -2
  805. package/dist/v2/patterns/ReferentielField.d.ts.map +1 -1
  806. package/dist/v2/patterns/ReferentielField.js +347 -327
  807. package/dist/v2/patterns/ReferentielField.js.map +1 -1
  808. package/dist/v2/patterns/RowFavoriteToggle.d.ts +6 -0
  809. package/dist/v2/patterns/RowFavoriteToggle.d.ts.map +1 -1
  810. package/dist/v2/patterns/RowFavoriteToggle.js +38 -30
  811. package/dist/v2/patterns/RowFavoriteToggle.js.map +1 -1
  812. package/dist/v2/patterns/SaveFilterDialog.js +50 -77
  813. package/dist/v2/patterns/SaveFilterDialog.js.map +1 -1
  814. package/dist/v2/patterns/SavedFiltersMenu.js +89 -107
  815. package/dist/v2/patterns/SavedFiltersMenu.js.map +1 -1
  816. package/dist/v2/patterns/SkeletonPageShell.js +122 -143
  817. package/dist/v2/patterns/SkeletonPageShell.js.map +1 -1
  818. package/dist/v2/patterns/SortableHeader.js +35 -57
  819. package/dist/v2/patterns/SortableHeader.js.map +1 -1
  820. package/dist/v2/patterns/Tour.js +121 -142
  821. package/dist/v2/patterns/Tour.js.map +1 -1
  822. package/dist/v2/patterns/_dataGridShared.d.ts.map +1 -1
  823. package/dist/v2/patterns/_dataGridShared.js +131 -147
  824. package/dist/v2/patterns/_dataGridShared.js.map +1 -1
  825. package/dist/v2/patterns/_pickerSerialisation.js +9 -10
  826. package/dist/v2/patterns/_pickerSerialisation.js.map +1 -1
  827. package/dist/v2/patterns/_sort.js +17 -33
  828. package/dist/v2/patterns/_sort.js.map +1 -1
  829. package/dist/v2/patterns/_useColumnReorder.js +124 -163
  830. package/dist/v2/patterns/_useColumnReorder.js.map +1 -1
  831. package/dist/v2/patterns/_useColumnResize.js +80 -99
  832. package/dist/v2/patterns/_useColumnResize.js.map +1 -1
  833. package/dist/v2/patterns/filterCriteria.d.ts +78 -0
  834. package/dist/v2/patterns/filterCriteria.d.ts.map +1 -0
  835. package/dist/v2/patterns/filterCriteria.js +110 -0
  836. package/dist/v2/patterns/filterCriteria.js.map +1 -0
  837. package/dist/v2/patterns/index.d.ts +160 -0
  838. package/dist/v2/patterns/index.d.ts.map +1 -1
  839. package/dist/v2/patterns/index.js +157 -79
  840. package/dist/v2/patterns/index.js.map +1 -1
  841. package/dist/v2/patterns/rowActions.d.ts +150 -0
  842. package/dist/v2/patterns/rowActions.d.ts.map +1 -0
  843. package/dist/v2/patterns/rowActions.js +232 -0
  844. package/dist/v2/patterns/rowActions.js.map +1 -0
  845. package/dist/v2/personalization/PersonalizationProvider.d.ts.map +1 -1
  846. package/dist/v2/personalization/PersonalizationProvider.js +57 -53
  847. package/dist/v2/personalization/PersonalizationProvider.js.map +1 -1
  848. package/dist/v2/personalization/adapters/_storageKey.js +5 -5
  849. package/dist/v2/personalization/adapters/_storageKey.js.map +1 -1
  850. package/dist/v2/personalization/adapters/createLocalStorageAdapter.js +25 -24
  851. package/dist/v2/personalization/adapters/createLocalStorageAdapter.js.map +1 -1
  852. package/dist/v2/personalization/adapters/createMemoryAdapter.js +14 -14
  853. package/dist/v2/personalization/adapters/createMemoryAdapter.js.map +1 -1
  854. package/dist/v2/personalization/adapters/index.js +5 -5
  855. package/dist/v2/personalization/adapters/index.js.map +1 -1
  856. package/dist/v2/personalization/capabilities/favorites.js +39 -62
  857. package/dist/v2/personalization/capabilities/favorites.js.map +1 -1
  858. package/dist/v2/personalization/capabilities/favoritesView.js +25 -37
  859. package/dist/v2/personalization/capabilities/favoritesView.js.map +1 -1
  860. package/dist/v2/personalization/capabilities/gridPreferences.js +31 -36
  861. package/dist/v2/personalization/capabilities/gridPreferences.js.map +1 -1
  862. package/dist/v2/personalization/capabilities/index.js +12 -12
  863. package/dist/v2/personalization/capabilities/reviveSavedCriteria.d.ts +88 -0
  864. package/dist/v2/personalization/capabilities/reviveSavedCriteria.d.ts.map +1 -0
  865. package/dist/v2/personalization/capabilities/reviveSavedCriteria.js +126 -0
  866. package/dist/v2/personalization/capabilities/reviveSavedCriteria.js.map +1 -0
  867. package/dist/v2/personalization/capabilities/savedFilters.js +93 -100
  868. package/dist/v2/personalization/capabilities/savedFilters.js.map +1 -1
  869. package/dist/v2/personalization/createPersonalizationStore.d.ts.map +1 -1
  870. package/dist/v2/personalization/createPersonalizationStore.js +81 -182
  871. package/dist/v2/personalization/createPersonalizationStore.js.map +1 -1
  872. package/dist/v2/personalization/index.d.ts +16 -0
  873. package/dist/v2/personalization/index.d.ts.map +1 -1
  874. package/dist/v2/personalization/index.js +30 -23
  875. package/dist/v2/personalization/index.js.map +1 -1
  876. package/dist/v2/personalization/personalizationContext.js +10 -12
  877. package/dist/v2/personalization/personalizationContext.js.map +1 -1
  878. package/dist/v2/personalization/schema.js +8 -9
  879. package/dist/v2/personalization/schema.js.map +1 -1
  880. package/dist/v2/referentiel/ReferentielProvider.js +31 -45
  881. package/dist/v2/referentiel/ReferentielProvider.js.map +1 -1
  882. package/dist/v2/referentiel/index.js +11 -13
  883. package/dist/v2/referentiel/index.js.map +1 -1
  884. package/dist/v2/referentiel/types.d.ts +105 -0
  885. package/dist/v2/referentiel/types.d.ts.map +1 -0
  886. package/dist/v2/referentiel/types.js +6 -0
  887. package/dist/v2/referentiel/types.js.map +1 -0
  888. package/dist/v2/referentiel/useReferentielClient.js +13 -16
  889. package/dist/v2/referentiel/useReferentielClient.js.map +1 -1
  890. package/dist/v2/referentiel/useReferentielOptions.d.ts +7 -17
  891. package/dist/v2/referentiel/useReferentielOptions.d.ts.map +1 -1
  892. package/dist/v2/referentiel/useReferentielOptions.js +63 -120
  893. package/dist/v2/referentiel/useReferentielOptions.js.map +1 -1
  894. package/dist/v2/referentiel/useReferentielSearch.d.ts +7 -48
  895. package/dist/v2/referentiel/useReferentielSearch.d.ts.map +1 -1
  896. package/dist/v2/referentiel/useReferentielSearch.js +40 -95
  897. package/dist/v2/referentiel/useReferentielSearch.js.map +1 -1
  898. package/dist/v2/theme/_brand.js +12 -26
  899. package/dist/v2/theme/_brand.js.map +1 -1
  900. package/dist/v2/theme/_brandSecondary.js +12 -26
  901. package/dist/v2/theme/_brandSecondary.js.map +1 -1
  902. package/dist/v2/theme/createPortnetTheme.js +41 -49
  903. package/dist/v2/theme/createPortnetTheme.js.map +1 -1
  904. package/dist/v2/theme/cssVariables.d.ts +3 -3
  905. package/dist/v2/theme/cssVariables.d.ts.map +1 -1
  906. package/dist/v2/theme/cssVariables.js +65 -70
  907. package/dist/v2/theme/cssVariables.js.map +1 -1
  908. package/dist/v2/theme/index.js +10 -10
  909. package/dist/v2/theme/index.js.map +1 -1
  910. package/dist/v2/tokens/breakpoints.js +16 -16
  911. package/dist/v2/tokens/breakpoints.js.map +1 -1
  912. package/dist/v2/tokens/chart.d.ts +103 -0
  913. package/dist/v2/tokens/chart.d.ts.map +1 -0
  914. package/dist/v2/tokens/chart.js +270 -0
  915. package/dist/v2/tokens/chart.js.map +1 -0
  916. package/dist/v2/tokens/colors.js +24 -24
  917. package/dist/v2/tokens/colors.js.map +1 -1
  918. package/dist/v2/tokens/density.d.ts +104 -0
  919. package/dist/v2/tokens/density.d.ts.map +1 -1
  920. package/dist/v2/tokens/density.js +67 -12
  921. package/dist/v2/tokens/density.js.map +1 -1
  922. package/dist/v2/tokens/index.d.ts +50 -1
  923. package/dist/v2/tokens/index.d.ts.map +1 -1
  924. package/dist/v2/tokens/index.js +116 -68
  925. package/dist/v2/tokens/index.js.map +1 -1
  926. package/dist/v2/tokens/motion.js +16 -22
  927. package/dist/v2/tokens/motion.js.map +1 -1
  928. package/dist/v2/tokens/radius.js +3 -3
  929. package/dist/v2/tokens/radius.js.map +1 -1
  930. package/dist/v2/tokens/shadows.js +8 -8
  931. package/dist/v2/tokens/shadows.js.map +1 -1
  932. package/dist/v2/tokens/spacing.js +4 -4
  933. package/dist/v2/tokens/spacing.js.map +1 -1
  934. package/dist/v2/tokens/state.js +3 -3
  935. package/dist/v2/tokens/state.js.map +1 -1
  936. package/dist/v2/tokens/statusPalette.js +21 -23
  937. package/dist/v2/tokens/statusPalette.js.map +1 -1
  938. package/dist/v2/tokens/tokens.json +6 -1
  939. package/dist/v2/tokens/typography.js +15 -15
  940. package/dist/v2/tokens/typography.js.map +1 -1
  941. package/dist/v2/tokens/zIndex.js +3 -3
  942. package/dist/v2/tokens/zIndex.js.map +1 -1
  943. package/dist/v2/types/datagrid.d.ts +9 -1
  944. package/dist/v2/types/datagrid.d.ts.map +1 -1
  945. package/dist/v2/types/datagrid.js.map +1 -1
  946. package/dist/v2/types/index.js +2 -2
  947. package/dist/v2/types/index.js.map +1 -1
  948. package/dist/v2/utils/apiError.js +16 -37
  949. package/dist/v2/utils/apiError.js.map +1 -1
  950. package/dist/v2/utils/contrast.js +31 -32
  951. package/dist/v2/utils/contrast.js.map +1 -1
  952. package/dist/v2/utils/cx.js +7 -27
  953. package/dist/v2/utils/cx.js.map +1 -1
  954. package/dist/v2/utils/fileDownload.js +25 -28
  955. package/dist/v2/utils/fileDownload.js.map +1 -1
  956. package/dist/v2/utils/fileValidation.d.ts +116 -0
  957. package/dist/v2/utils/fileValidation.d.ts.map +1 -0
  958. package/dist/v2/utils/fileValidation.js +220 -0
  959. package/dist/v2/utils/fileValidation.js.map +1 -0
  960. package/dist/v2/utils/fmtDate.d.ts +103 -0
  961. package/dist/v2/utils/fmtDate.d.ts.map +1 -0
  962. package/dist/v2/utils/fmtDate.js +119 -0
  963. package/dist/v2/utils/fmtDate.js.map +1 -0
  964. package/dist/v2/utils/fmtMoney.d.ts +3 -3
  965. package/dist/v2/utils/fmtMoney.d.ts.map +1 -1
  966. package/dist/v2/utils/fmtMoney.js +9 -11
  967. package/dist/v2/utils/fmtMoney.js.map +1 -1
  968. package/dist/v2/utils/formikErrors.d.ts +67 -0
  969. package/dist/v2/utils/formikErrors.d.ts.map +1 -0
  970. package/dist/v2/utils/formikErrors.js +85 -0
  971. package/dist/v2/utils/formikErrors.js.map +1 -0
  972. package/dist/v2/utils/index.d.ts +5 -0
  973. package/dist/v2/utils/index.d.ts.map +1 -1
  974. package/dist/v2/utils/index.js +67 -18
  975. package/dist/v2/utils/index.js.map +1 -1
  976. package/dist/v2/utils/mergeLabels.js +9 -14
  977. package/dist/v2/utils/mergeLabels.js.map +1 -1
  978. package/dist/v2/utils/networkStatus.js +14 -14
  979. package/dist/v2/utils/networkStatus.js.map +1 -1
  980. package/package.json +26 -9
package/dist/esm/index.js CHANGED
@@ -96,6 +96,31 @@ export { createPortnetTheme, getCssVariables, injectCssVariables, removeCssVaria
96
96
  // the same commit.
97
97
  export { cx, fmtMoney, contrast, downloadBase64File, getMimeType, openBase64FileInTab, downloadBlobFile } from "./v2/utils";
98
98
 
99
+ // Date display (gap G-51) — fmtMoney's counterpart, added here in the SAME
100
+ // commit as its entry in ./v2/utils/index.ts, per the invariant stated just
101
+ // above. Flat-only by the `v2` policy at the bottom of this file.
102
+ //
103
+ // Nothing in the library rendered a date, while fmtMoney has covered amounts
104
+ // since v1 — and a date is the more common cell by far. So every module wrote
105
+ // the same helper, and every copy passed `new Date(undefined)` to `getDate()`,
106
+ // which yields NaN for every accessor: optional date fields rendered the
107
+ // literal "NaN/NaN/NaN NaN:NaN". Raised from autorisation-admis-pour-conforme-fe
108
+ // (Area 5), where the guard had been added at eight call sites over four lots
109
+ // before landing in the module's own helper.
110
+ export { fmtDate, fmtDateTime } from "./v2/utils";
111
+ // Upload validation (gap G-52), flat-only, added here in the SAME commit as its
112
+ // entry in ./v2/utils/index.ts — the invariant stated above.
113
+ //
114
+ // Dropzone reports rejections but validates nothing: `accept` is a picker
115
+ // filter drag-and-drop ignores. Every host therefore wrote, next to its own
116
+ // extension allow-list, the same executable/script DENY-LIST and the same
117
+ // extension/MIME cross-check — neither of which is business policy. A security
118
+ // decision duplicated across fifteen modules drifts silently: the day a type
119
+ // must be added to the deny-list, nobody can say which modules have it. The
120
+ // host keeps its allow-list; the library owns the rest. Raised from
121
+ // autorisation-admis-pour-conforme-fe (Area 5), which carried a 21-entry
122
+ // deny-list locally.
123
+ export { isForbiddenExecutable, isAcceptedFile, getFileRejection, describeAcceptedTypes, toAcceptAttribute } from "./v2/utils";
99
124
  // Error narrowing + the network-status channel. Flat-only per the `v2` policy
100
125
  // note at the bottom of this file. Both were added from the
101
126
  // procuration-portnet-fe Area 5 gap audit (G-04, G-03):
@@ -124,6 +149,20 @@ export { cx, fmtMoney, contrast, downloadBase64File, getMimeType, openBase64File
124
149
  //
125
150
  // Purely additive; nothing existing changed.
126
151
  export { getApiErrorMessage, getApiErrorDetail, getApiErrorStatus, DEFAULT_API_ERROR_MESSAGE, networkStatus, createNetworkStatus } from "./v2/utils";
152
+ // Formik error flattening (gap G-38). FLAT-ONLY, per the policy note at the
153
+ // bottom of this file, and added here in the SAME commit as its entry in
154
+ // ./v2/utils/index.ts — that is the invariant recorded above: ./v2/utils is
155
+ // re-exported by explicit name list, so a util omitted here never reaches a
156
+ // consumer, which is how G-34 broke caution-ui's build.
157
+ //
158
+ // It completes the failed-submit recipe the library already half-owned:
159
+ // FormErrorSummary (R-FV.2) renders `{ name, message }[]`, focusFieldByName
160
+ // (R-FV.3) resolves that same name, and nothing turned Formik's nested error
161
+ // tree into the list both of them speak. Every host wrote the recursion, and a
162
+ // wrong accumulated path fails SILENTLY — the banner lists the right messages
163
+ // and its jump button targets a field that does not exist.
164
+ export { flattenFormikErrors } from "./v2/utils";
165
+
127
166
  // Route-level Suspense fallback. R-P.1 MUST requires a "fallback skeleton page",
128
167
  // and the library had every skeleton PART plus PageBusy, but nothing satisfying
129
168
  // the rule: PageBusy is a full-screen spinner, which R-8.1 MUST forbids for
@@ -145,7 +184,17 @@ export { MODAL_POPPER_PROPS, MODAL_ZINDEX } from "./v2/modalContext";
145
184
  // below - a wildcard here would re-export them a second time and
146
185
  // collide (TS2308). Mirrors exactly what ./v2/index.ts already does
147
186
  // internally for the same reason.
148
- export { UserPersonalizationProvider, createLocalStorageAdapter, createMemoryAdapter, registerCapability, useFavorites, useIsFavorite, useFavoritesView, filterRowsByFavorites, sortRowsByFavorites, FAVORITES_FILTER, FAVORITES_SORT, useSavedFilters } from "./v2/personalization";
187
+ export { UserPersonalizationProvider, createLocalStorageAdapter, createMemoryAdapter, registerCapability, useFavorites, useIsFavorite, useFavoritesView, filterRowsByFavorites, sortRowsByFavorites, FAVORITES_FILTER, FAVORITES_SORT, useSavedFilters,
188
+ // G-50 — reviveSavedCriteria. Listed HERE and not only in
189
+ // ./v2/personalization/index.ts, because this block is an EXPLICIT NAME LIST
190
+ // (see the collision note just above): the invariant recorded for ./v2/utils
191
+ // a few blocks up applies verbatim to this barrel — any addition intended for
192
+ // hosts must be added here in the same commit, or it silently fails to reach
193
+ // them until a consuming module's build breaks on
194
+ // "has no exported member". That is how G-34 broke caution-ui, and adding
195
+ // this one without touching this line reproduced it for the module that
196
+ // requested the capability.
197
+ reviveSavedCriteria } from "./v2/personalization";
149
198
 
150
199
  // Grid preferences capability (gap G-35) — per-user, per-resource hidden
151
200
  // columns. FLAT-ONLY, per the policy note on `v2` at the bottom of this file:
@@ -193,6 +242,27 @@ export { ReferentielProvider, ReferentielContext, useReferentielClient, useRefer
193
242
  export * from "./v2/models";
194
243
  export * from "./v2/types";
195
244
 
245
+ // ReferentielField's SEARCH CONTRACT, under non-colliding names.
246
+ //
247
+ // `ReferentielSearchParams` / `ReferentielSearchResult` exist twice in this
248
+ // library with different shapes: the pattern's ({criteria, page, pageSize,
249
+ // sort}) and the data layer's in ./v2/models/referentiel ({path, ...}). Per the
250
+ // star-export semantics noted above, the conflicting pattern names are omitted
251
+ // and both resolve to the MODELS types -- so a host cannot name the parameter
252
+ // type of the `search` prop that ReferentielField REQUIRES it to pass.
253
+ //
254
+ // Found migrating ms-ti-fe off its local AppFormikSearchField: a typed
255
+ // `async function searchTransitaires({ criteria, page, pageSize }:
256
+ // ReferentielSearchParams)` fails with "Property 'criteria' does not exist on
257
+ // type ReferentielSearchParams<Record<string, unknown>>", leaving a host only
258
+ // two bad options -- re-declare the shape locally (duplicating a shared type,
259
+ // which the Platform TypeScript Guidelines forbid) or derive it via
260
+ // `Parameters<ReferentielFieldProps<T>["search"]>[0]`.
261
+ //
262
+ // Aliasing rather than renaming: both original names keep resolving exactly as
263
+ // they do today, so this is additive, and it makes the flat root the strict
264
+ // superset of ./v2 that the COROLLARY below requires.
265
+
196
266
  // Transitional alias — the `@portnet/ui/v2` subpath kept resolving
197
267
  // for one minor cycle so consuming modules can migrate their
198
268
  // imports independently of the package bump. Scheduled removal:
@@ -209,6 +279,5 @@ export * from "./v2/types";
209
279
  // "lose two utilities". Before deprecating anything further, diff the two
210
280
  // surfaces; `npm run api:check` covers the root but does not compare it against
211
281
  // ./v2.
212
- import * as _v from "./v2";
213
- export { _v as v2 };
282
+ export * as v2 from "./v2";
214
283
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["createPortnetTheme","getCssVariables","injectCssVariables","removeCssVariables","cx","fmtMoney","contrast","downloadBase64File","getMimeType","openBase64FileInTab","downloadBlobFile","getApiErrorMessage","getApiErrorDetail","getApiErrorStatus","DEFAULT_API_ERROR_MESSAGE","networkStatus","createNetworkStatus","default","SkeletonPageShell","MODAL_POPPER_PROPS","MODAL_ZINDEX","UserPersonalizationProvider","createLocalStorageAdapter","createMemoryAdapter","registerCapability","useFavorites","useIsFavorite","useFavoritesView","filterRowsByFavorites","sortRowsByFavorites","FAVORITES_FILTER","FAVORITES_SORT","useSavedFilters","useGridPreferences","GRID_PREFERENCES_CAPABILITY_ID","ReferentielProvider","ReferentielContext","useReferentielClient","useReferentielOptions","useReferentielSearch","_v","v2"],"sources":["../../src/lib/index.ts"],"sourcesContent":["/**\r\n * @portnet/ui — root entry (MUI v9)\r\n *\r\n * The v1 Pui* surface was REMOVED in 0.3.0-mui9. The package now\r\n * exposes the modernised v2 Design System directly at its root.\r\n *\r\n * Imports\r\n * -------\r\n *\r\n * // Components (flat — preferred)\r\n * import { Button, Modal, FormGrid, Combobox, ... } from \"@portnet/ui\";\r\n *\r\n * // Theme + CSS variables + tokens + hooks (flat, or subpath entrypoints)\r\n * import { createPortnetTheme, injectCssVariables } from \"@portnet/ui\";\r\n * import { palette, spacing } from \"@portnet/ui/tokens\";\r\n * import { useFocusTrap } from \"@portnet/ui/hooks\";\r\n *\r\n * // Misc utils (flat) — class names, money formatting, WCAG contrast,\r\n * // and base64 → browser download\r\n * import { cx, fmtMoney, contrast, downloadBase64File } from \"@portnet/ui\";\r\n *\r\n * // Modal layering constants (flat)\r\n * import { MODAL_POPPER_PROPS, MODAL_ZINDEX } from \"@portnet/ui\";\r\n *\r\n * // Personalization foundation (flat, or \"@portnet/ui/personalization\")\r\n * import { UserPersonalizationProvider, createLocalStorageAdapter } from \"@portnet/ui\";\r\n *\r\n * // Referentiel data layer (flat) — backs ReferentielField /\r\n * // FormikReferentielField. Mount the provider once at the app root.\r\n * import { ReferentielProvider, useReferentielSearch } from \"@portnet/ui\";\r\n *\r\n * // Domain models + UI types (flat, type-only)\r\n * import type { FavoriteItem, SavedFilter, GridColumn } from \"@portnet/ui\";\r\n *\r\n * // Legacy `@portnet/ui/v2/*` paths still resolve transitionally\r\n * // through the v2 re-export below, deprecated and scheduled for\r\n * // removal in 0.4.0. NOTE: capability added after that deprecation\r\n * // is surfaced flat ONLY and is deliberately absent from `v2.*`.\r\n *\r\n * No v1 surface remains. Consuming modules that still import any\r\n * Pui* component will fail to resolve and must migrate per the\r\n * table in docs/migration-mui9/03-batch3-purge-v1.md.\r\n */\r\n\r\n// Flat re-export of every v2 component, pattern, hook, and the\r\n// theme factory. This is what consuming modules pin against\r\n// (`import { Button } from \"@portnet/ui\"`).\r\nexport * from \"./v2/components\";\r\nexport * from \"./v2/patterns\";\r\nexport * from \"./v2/hooks\";\r\nexport {\r\n createPortnetTheme,\r\n getCssVariables,\r\n injectCssVariables,\r\n removeCssVariables,\r\n} from \"./v2/theme\";\r\n\r\n// Theme factory typed contract, flat + type-only (capability gap G-33).\r\n//\r\n// The theme VALUES were flat-exported above while the types describing their\r\n// options were reachable ONLY from the deprecated `@portnet/ui/v2` subpath.\r\n// Every host module wraps createPortnetTheme in a local `build<Module>Theme`\r\n// helper (see the GU modules' utils/appearance), so every host needs this\r\n// contract to type its own wrapper — and had exactly two ways to get it:\r\n// import from a surface scheduled for removal in 0.4.0, or fall back to\r\n// `brand?: object` + `as Parameters<typeof createPortnetTheme>[0]`, both on\r\n// the Platform TypeScript Guidelines FORBIDDEN list. ./v2/theme's own doc\r\n// comment already names that anti-pattern as the reason these types were\r\n// published; it just never reached the surface consumers are told to migrate\r\n// TO. Closing that here removes the last reason a module needs `@portnet/ui/v2`\r\n// for the theme layer.\r\n//\r\n// Flat-only, per the `v2` policy note at the bottom of this file.\r\n// Purely additive and type-only; nothing existing changed.\r\nexport type {\r\n CreatePortnetThemeOptions,\r\n BrandTokens,\r\n BrandSecondaryTokens,\r\n} from \"./v2/theme\";\r\n\r\n// Added while migrating ms-dfd-fe to TypeScript: cx / fmtMoney / contrast had\r\n// no flat or subpath route, only the deprecated `v2.*` namespace below.\r\n// downloadBase64File + getMimeType were added later (mjcc-fe Area 5) and are\r\n// flat-only by policy — see the note on `v2` at the bottom of this file.\r\n// Purely additive re-exports; nothing existing changed.\r\n//\r\n// G-34 (caution-ui Area 6) — openBase64FileInTab + downloadBlobFile added.\r\n// These two were NOT flat-only additions: ./v2/index.ts has exported them all\r\n// along, so the FLAT ROOT — the surface the policy at the bottom of this file\r\n// tells every module to migrate TO — was a strict SUBSET of the deprecated\r\n// surface it replaces. A module obeying the migration policy lost access to\r\n// both, which is how caution-ui's Area 6 build broke:\r\n//\r\n// Attempted import error: 'downloadBlobFile' is not exported\r\n// from '@portnet/ui'\r\n//\r\n// Root cause is mechanical, and worth fixing properly rather than name by name:\r\n// ./v2/components, ./v2/patterns and ./v2/hooks are re-exported above with\r\n// `export *`, so anything added to them surfaces automatically. ./v2/utils is\r\n// re-exported by EXPLICIT NAME LIST, so every new util silently fails to reach\r\n// consumers until someone hits a build error. A wildcard is not a safe swap\r\n// here — ./v2/utils also carries `mergeLabels`, an internal label-merging\r\n// helper with no host use case, and widening a certified public surface by\r\n// accident is worse than the drift. The list stays, and the invariant is stated\r\n// instead: ANY addition to ./v2/utils intended for hosts must be added here in\r\n// the same commit.\r\nexport {\r\n cx,\r\n fmtMoney,\r\n contrast,\r\n downloadBase64File,\r\n getMimeType,\r\n openBase64FileInTab,\r\n downloadBlobFile,\r\n} from \"./v2/utils\";\r\n\r\n// Error narrowing + the network-status channel. Flat-only per the `v2` policy\r\n// note at the bottom of this file. Both were added from the\r\n// procuration-portnet-fe Area 5 gap audit (G-04, G-03):\r\n//\r\n// - getApiErrorMessage / getApiErrorStatus close the hole between two rules\r\n// the platform imposes together — `useUnknownInCatchVariables` is mandatory\r\n// and `any` / unsafe assertions are forbidden, with nothing sanctioned in\r\n// between. Every audited module had bridged it with\r\n// `error as { response?: { data?: { message?: unknown } } }`.\r\n//\r\n// - networkStatus is the feed for NetworkErrorBanner, which shipped as a\r\n// presentational component with its trigger contract left to consumers.\r\n//\r\n// G-34 — getApiErrorDetail added. Its own docstring PRESCRIBES a pairing that\r\n// was impossible to write, because the companion was never surfaced:\r\n//\r\n// toast(getApiErrorMessage(err, \"Échec de l'envoi.\"), \"error\");\r\n// console.error(\"[submit]\", getApiErrorStatus(err), getApiErrorDetail(err));\r\n//\r\n// The split exists because getApiErrorMessage deliberately SUPPRESSES transport\r\n// phrasings (G-07) — right for a toast, wrong for a console or an APM\r\n// breadcrumb, where \"Request failed with status code 502\" is exactly what an\r\n// operator needs. Without the escape hatch a host either logs the sanitised\r\n// string (losing the diagnostic) or re-reads `error.message` by hand with an\r\n// assertion (the very thing G-04 exists to prevent).\r\n//\r\n// Purely additive; nothing existing changed.\r\nexport {\r\n getApiErrorMessage,\r\n getApiErrorDetail,\r\n getApiErrorStatus,\r\n DEFAULT_API_ERROR_MESSAGE,\r\n networkStatus,\r\n createNetworkStatus,\r\n} from \"./v2/utils\";\r\nexport type { NetworkStatus, NetworkStatusListener } from \"./v2/utils\";\r\n\r\n// Route-level Suspense fallback. R-P.1 MUST requires a \"fallback skeleton page\",\r\n// and the library had every skeleton PART plus PageBusy, but nothing satisfying\r\n// the rule: PageBusy is a full-screen spinner, which R-8.1 MUST forbids for\r\n// navigation. So every module hand-built one, and to avoid the CLS a skeleton\r\n// exists to prevent it had to copy ActionBar's and PageContent's padding\r\n// literals out of this library. Owning it here keeps the three in lockstep.\r\n// Capability gap G-02 (procuration-portnet-fe Area 5). Flat-only, per the policy\r\n// note below.\r\nexport { default as SkeletonPageShell } from \"./v2/patterns/SkeletonPageShell\";\r\nexport type {\r\n SkeletonPageShellProps,\r\n SkeletonPageShellVariant,\r\n} from \"./v2/patterns/SkeletonPageShell\";\r\n\r\n// Modal/Drawer/Combobox/DatePicker layering constants - needed by any\r\n// consumer stacking a popover-ish component (Combobox, DateTimePicker)\r\n// above a Modal or Drawer. Was v2-namespace-only.\r\nexport { MODAL_POPPER_PROPS, MODAL_ZINDEX } from \"./v2/modalContext\";\r\n\r\n// Personalization foundation runtime API (favorites, saved filters).\r\n// Named re-export, not a wildcard: ./v2/personalization also carries\r\n// the Scope/FavoriteRef/SavedFilter model types for its own internal\r\n// use, which are already flat-exported canonically via ./v2/models\r\n// below - a wildcard here would re-export them a second time and\r\n// collide (TS2308). Mirrors exactly what ./v2/index.ts already does\r\n// internally for the same reason.\r\nexport {\r\n UserPersonalizationProvider,\r\n createLocalStorageAdapter,\r\n createMemoryAdapter,\r\n registerCapability,\r\n useFavorites,\r\n useIsFavorite,\r\n useFavoritesView,\r\n filterRowsByFavorites,\r\n sortRowsByFavorites,\r\n FAVORITES_FILTER,\r\n FAVORITES_SORT,\r\n useSavedFilters,\r\n} from \"./v2/personalization\";\r\n\r\n// Grid preferences capability (gap G-35) — per-user, per-resource hidden\r\n// columns. FLAT-ONLY, per the policy note on `v2` at the bottom of this file:\r\n// deliberately NOT added to ./v2/index.ts.\r\n//\r\n// DataGridToolbar owns the column-visibility UI but holds no state, so hosts\r\n// persisted it themselves in a bare localStorage key — not user-scoped, unlike\r\n// this foundation's `…:{userId}:{capabilityId}` scheme, so on a shared\r\n// workstation one user inherited another's hidden columns. Observed in\r\n// onssa-export-fe (\"onssaCertificates:listing:hiddenColumns\").\r\n//\r\n// It had to land in the library rather than the host: `registerCapability` is\r\n// exported above as a seam \"for custom/host-defined capabilities\", but the two\r\n// primitives a capability hook needs (usePersonalizationStore,\r\n// useStoreSelector) are private by design (§2.8, minimum API surface), so a\r\n// host-registered capability could be declared and never read or written.\r\n// Completing that seam instead would widen the internal surface AND leave every\r\n// module re-authoring the same slice; owning the slice here does neither.\r\nexport {\r\n useGridPreferences,\r\n GRID_PREFERENCES_CAPABILITY_ID,\r\n} from \"./v2/personalization\";\r\nexport type {\r\n UseGridPreferencesResult,\r\n GridPreferencesEntry,\r\n} from \"./v2/personalization\";\r\n\r\n// Referentiel data layer runtime API (config provider + hooks). Backs\r\n// ReferentielField / FormikReferentielField, which are flat-exported\r\n// above via ./v2/patterns - the field UI was reachable while the data\r\n// layer that feeds it was not, so consumers had to either import from\r\n// the deprecated `@portnet/ui/v2` surface or rebuild the client\r\n// locally. Added while auditing mjcc-fe, which had done the latter.\r\n//\r\n// Named re-export, not a wildcard, for the SAME reason as\r\n// personalization above: ./v2/referentiel also re-exports\r\n// ReferentielSearchArgs, ReferentielSearchResult and\r\n// ReferentielSearchFn for its own use, and those names are already\r\n// flat-exported canonically through ./v2/models below. A wildcard\r\n// would export them twice and collide (TS2308). The type layer keeps\r\n// its single canonical route.\r\nexport {\r\n ReferentielProvider,\r\n ReferentielContext,\r\n useReferentielClient,\r\n useReferentielOptions,\r\n useReferentielSearch,\r\n} from \"./v2/referentiel\";\r\n\r\n// Domain models & shared UI/structural types, flat + type-only (no\r\n// runtime cost). Mirrors the same re-export already done inside\r\n// ./v2 — added here so consumers migrating off `v2.*` have a route\r\n// to the shared types the platform guidelines require reusing\r\n// (DrawerProps, FavoriteItem, SavedFilter, GridColumn, GridAction,\r\n// WizardStep, Notification, FormField, etc.) without falling back to\r\n// the deprecated namespace just to get a type import. Conflicting\r\n// names across the two star-exports are omitted per ES module\r\n// semantics rather than erroring.\r\nexport * from \"./v2/models\";\r\nexport * from \"./v2/types\";\r\n\r\n// Transitional alias — the `@portnet/ui/v2` subpath kept resolving\r\n// for one minor cycle so consuming modules can migrate their\r\n// imports independently of the package bump. Scheduled removal:\r\n// 0.4.0. Track removal in the Batch 5 cleanup ticket.\r\n//\r\n// POLICY: capability added after this deprecation is surfaced on the\r\n// flat root ONLY and is not added to ./v2/index.ts — adding it there\r\n// would hand consumers a new reason to stay on a retiring surface.\r\n// downloadBase64File / getMimeType are the first such additions.\r\n//\r\n// COROLLARY, learned the hard way (G-34): the policy only works if the flat\r\n// root is a strict SUPERSET of ./v2. It was not — downloadBlobFile and\r\n// openBase64FileInTab were on v2 and missing here, so \"migrate off v2\" meant\r\n// \"lose two utilities\". Before deprecating anything further, diff the two\r\n// surfaces; `npm run api:check` covers the root but does not compare it against\r\n// ./v2.\r\nexport * as v2 from \"./v2\";\r\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,iBAAiB;AAC/B,cAAc,eAAe;AAC7B,cAAc,YAAY;AAC1B,SACEA,kBAAkB,EAClBC,eAAe,EACfC,kBAAkB,EAClBC,kBAAkB,QACb,YAAY;;AAEnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SACEC,EAAE,EACFC,QAAQ,EACRC,QAAQ,EACRC,kBAAkB,EAClBC,WAAW,EACXC,mBAAmB,EACnBC,gBAAgB,QACX,YAAY;;AAEnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SACEC,kBAAkB,EAClBC,iBAAiB,EACjBC,iBAAiB,EACjBC,yBAAyB,EACzBC,aAAa,EACbC,mBAAmB,QACd,YAAY;AAGnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,OAAO,IAAIC,iBAAiB,QAAQ,iCAAiC;AAM9E;AACA;AACA;AACA,SAASC,kBAAkB,EAAEC,YAAY,QAAQ,mBAAmB;;AAEpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SACEC,2BAA2B,EAC3BC,yBAAyB,EACzBC,mBAAmB,EACnBC,kBAAkB,EAClBC,YAAY,EACZC,aAAa,EACbC,gBAAgB,EAChBC,qBAAqB,EACrBC,mBAAmB,EACnBC,gBAAgB,EAChBC,cAAc,EACdC,eAAe,QACV,sBAAsB;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SACEC,kBAAkB,EAClBC,8BAA8B,QACzB,sBAAsB;AAM7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SACEC,mBAAmB,EACnBC,kBAAkB,EAClBC,oBAAoB,EACpBC,qBAAqB,EACrBC,oBAAoB,QACf,kBAAkB;;AAEzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,aAAa;AAC3B,cAAc,YAAY;;AAE1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA,YAAAC,EAAA,MACoB,MAAM;AAAA,SAAAA,EAAA,IAAdC,EAAE","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["createPortnetTheme","getCssVariables","injectCssVariables","removeCssVariables","cx","fmtMoney","contrast","downloadBase64File","getMimeType","openBase64FileInTab","downloadBlobFile","fmtDate","fmtDateTime","isForbiddenExecutable","isAcceptedFile","getFileRejection","describeAcceptedTypes","toAcceptAttribute","getApiErrorMessage","getApiErrorDetail","getApiErrorStatus","DEFAULT_API_ERROR_MESSAGE","networkStatus","createNetworkStatus","flattenFormikErrors","default","SkeletonPageShell","MODAL_POPPER_PROPS","MODAL_ZINDEX","UserPersonalizationProvider","createLocalStorageAdapter","createMemoryAdapter","registerCapability","useFavorites","useIsFavorite","useFavoritesView","filterRowsByFavorites","sortRowsByFavorites","FAVORITES_FILTER","FAVORITES_SORT","useSavedFilters","reviveSavedCriteria","useGridPreferences","GRID_PREFERENCES_CAPABILITY_ID","ReferentielProvider","ReferentielContext","useReferentielClient","useReferentielOptions","useReferentielSearch","v2"],"sources":["../../src/lib/index.ts"],"sourcesContent":["/**\r\n * @portnet/ui — root entry (MUI v9)\r\n *\r\n * The v1 Pui* surface was REMOVED in 0.3.0-mui9. The package now\r\n * exposes the modernised v2 Design System directly at its root.\r\n *\r\n * Imports\r\n * -------\r\n *\r\n * // Components (flat — preferred)\r\n * import { Button, Modal, FormGrid, Combobox, ... } from \"@portnet/ui\";\r\n *\r\n * // Theme + CSS variables + tokens + hooks (flat, or subpath entrypoints)\r\n * import { createPortnetTheme, injectCssVariables } from \"@portnet/ui\";\r\n * import { palette, spacing } from \"@portnet/ui/tokens\";\r\n * import { useFocusTrap } from \"@portnet/ui/hooks\";\r\n *\r\n * // Misc utils (flat) — class names, money formatting, WCAG contrast,\r\n * // and base64 → browser download\r\n * import { cx, fmtMoney, contrast, downloadBase64File } from \"@portnet/ui\";\r\n *\r\n * // Modal layering constants (flat)\r\n * import { MODAL_POPPER_PROPS, MODAL_ZINDEX } from \"@portnet/ui\";\r\n *\r\n * // Personalization foundation (flat, or \"@portnet/ui/personalization\")\r\n * import { UserPersonalizationProvider, createLocalStorageAdapter } from \"@portnet/ui\";\r\n *\r\n * // Referentiel data layer (flat) — backs ReferentielField /\r\n * // FormikReferentielField. Mount the provider once at the app root.\r\n * import { ReferentielProvider, useReferentielSearch } from \"@portnet/ui\";\r\n *\r\n * // Domain models + UI types (flat, type-only)\r\n * import type { FavoriteItem, SavedFilter, GridColumn } from \"@portnet/ui\";\r\n *\r\n * // Legacy `@portnet/ui/v2/*` paths still resolve transitionally\r\n * // through the v2 re-export below, deprecated and scheduled for\r\n * // removal in 0.4.0. NOTE: capability added after that deprecation\r\n * // is surfaced flat ONLY and is deliberately absent from `v2.*`.\r\n *\r\n * No v1 surface remains. Consuming modules that still import any\r\n * Pui* component will fail to resolve and must migrate per the\r\n * table in docs/migration-mui9/03-batch3-purge-v1.md.\r\n */\r\n\r\n// Flat re-export of every v2 component, pattern, hook, and the\r\n// theme factory. This is what consuming modules pin against\r\n// (`import { Button } from \"@portnet/ui\"`).\r\nexport * from \"./v2/components\";\r\nexport * from \"./v2/patterns\";\r\nexport * from \"./v2/hooks\";\r\nexport {\r\n createPortnetTheme,\r\n getCssVariables,\r\n injectCssVariables,\r\n removeCssVariables,\r\n} from \"./v2/theme\";\r\n\r\n// Theme factory typed contract, flat + type-only (capability gap G-33).\r\n//\r\n// The theme VALUES were flat-exported above while the types describing their\r\n// options were reachable ONLY from the deprecated `@portnet/ui/v2` subpath.\r\n// Every host module wraps createPortnetTheme in a local `build<Module>Theme`\r\n// helper (see the GU modules' utils/appearance), so every host needs this\r\n// contract to type its own wrapper — and had exactly two ways to get it:\r\n// import from a surface scheduled for removal in 0.4.0, or fall back to\r\n// `brand?: object` + `as Parameters<typeof createPortnetTheme>[0]`, both on\r\n// the Platform TypeScript Guidelines FORBIDDEN list. ./v2/theme's own doc\r\n// comment already names that anti-pattern as the reason these types were\r\n// published; it just never reached the surface consumers are told to migrate\r\n// TO. Closing that here removes the last reason a module needs `@portnet/ui/v2`\r\n// for the theme layer.\r\n//\r\n// Flat-only, per the `v2` policy note at the bottom of this file.\r\n// Purely additive and type-only; nothing existing changed.\r\nexport type {\r\n CreatePortnetThemeOptions,\r\n BrandTokens,\r\n BrandSecondaryTokens,\r\n} from \"./v2/theme\";\r\n\r\n// Added while migrating ms-dfd-fe to TypeScript: cx / fmtMoney / contrast had\r\n// no flat or subpath route, only the deprecated `v2.*` namespace below.\r\n// downloadBase64File + getMimeType were added later (mjcc-fe Area 5) and are\r\n// flat-only by policy — see the note on `v2` at the bottom of this file.\r\n// Purely additive re-exports; nothing existing changed.\r\n//\r\n// G-34 (caution-ui Area 6) — openBase64FileInTab + downloadBlobFile added.\r\n// These two were NOT flat-only additions: ./v2/index.ts has exported them all\r\n// along, so the FLAT ROOT — the surface the policy at the bottom of this file\r\n// tells every module to migrate TO — was a strict SUBSET of the deprecated\r\n// surface it replaces. A module obeying the migration policy lost access to\r\n// both, which is how caution-ui's Area 6 build broke:\r\n//\r\n// Attempted import error: 'downloadBlobFile' is not exported\r\n// from '@portnet/ui'\r\n//\r\n// Root cause is mechanical, and worth fixing properly rather than name by name:\r\n// ./v2/components, ./v2/patterns and ./v2/hooks are re-exported above with\r\n// `export *`, so anything added to them surfaces automatically. ./v2/utils is\r\n// re-exported by EXPLICIT NAME LIST, so every new util silently fails to reach\r\n// consumers until someone hits a build error. A wildcard is not a safe swap\r\n// here — ./v2/utils also carries `mergeLabels`, an internal label-merging\r\n// helper with no host use case, and widening a certified public surface by\r\n// accident is worse than the drift. The list stays, and the invariant is stated\r\n// instead: ANY addition to ./v2/utils intended for hosts must be added here in\r\n// the same commit.\r\nexport {\r\n cx,\r\n fmtMoney,\r\n contrast,\r\n downloadBase64File,\r\n getMimeType,\r\n openBase64FileInTab,\r\n downloadBlobFile,\r\n} from \"./v2/utils\";\r\n\r\n// Date display (gap G-51) — fmtMoney's counterpart, added here in the SAME\r\n// commit as its entry in ./v2/utils/index.ts, per the invariant stated just\r\n// above. Flat-only by the `v2` policy at the bottom of this file.\r\n//\r\n// Nothing in the library rendered a date, while fmtMoney has covered amounts\r\n// since v1 — and a date is the more common cell by far. So every module wrote\r\n// the same helper, and every copy passed `new Date(undefined)` to `getDate()`,\r\n// which yields NaN for every accessor: optional date fields rendered the\r\n// literal \"NaN/NaN/NaN NaN:NaN\". Raised from autorisation-admis-pour-conforme-fe\r\n// (Area 5), where the guard had been added at eight call sites over four lots\r\n// before landing in the module's own helper.\r\nexport { fmtDate, fmtDateTime } from \"./v2/utils\";\r\nexport type { FmtDateInput, FmtDateOptions } from \"./v2/utils\";\r\n\r\n// Upload validation (gap G-52), flat-only, added here in the SAME commit as its\r\n// entry in ./v2/utils/index.ts — the invariant stated above.\r\n//\r\n// Dropzone reports rejections but validates nothing: `accept` is a picker\r\n// filter drag-and-drop ignores. Every host therefore wrote, next to its own\r\n// extension allow-list, the same executable/script DENY-LIST and the same\r\n// extension/MIME cross-check — neither of which is business policy. A security\r\n// decision duplicated across fifteen modules drifts silently: the day a type\r\n// must be added to the deny-list, nobody can say which modules have it. The\r\n// host keeps its allow-list; the library owns the rest. Raised from\r\n// autorisation-admis-pour-conforme-fe (Area 5), which carried a 21-entry\r\n// deny-list locally.\r\nexport {\r\n isForbiddenExecutable,\r\n isAcceptedFile,\r\n getFileRejection,\r\n describeAcceptedTypes,\r\n toAcceptAttribute,\r\n} from \"./v2/utils\";\r\nexport type {\r\n FileAcceptPolicy,\r\n FileRejection,\r\n FileRejectionReason,\r\n} from \"./v2/utils\";\r\n\r\n// Error narrowing + the network-status channel. Flat-only per the `v2` policy\r\n// note at the bottom of this file. Both were added from the\r\n// procuration-portnet-fe Area 5 gap audit (G-04, G-03):\r\n//\r\n// - getApiErrorMessage / getApiErrorStatus close the hole between two rules\r\n// the platform imposes together — `useUnknownInCatchVariables` is mandatory\r\n// and `any` / unsafe assertions are forbidden, with nothing sanctioned in\r\n// between. Every audited module had bridged it with\r\n// `error as { response?: { data?: { message?: unknown } } }`.\r\n//\r\n// - networkStatus is the feed for NetworkErrorBanner, which shipped as a\r\n// presentational component with its trigger contract left to consumers.\r\n//\r\n// G-34 — getApiErrorDetail added. Its own docstring PRESCRIBES a pairing that\r\n// was impossible to write, because the companion was never surfaced:\r\n//\r\n// toast(getApiErrorMessage(err, \"Échec de l'envoi.\"), \"error\");\r\n// console.error(\"[submit]\", getApiErrorStatus(err), getApiErrorDetail(err));\r\n//\r\n// The split exists because getApiErrorMessage deliberately SUPPRESSES transport\r\n// phrasings (G-07) — right for a toast, wrong for a console or an APM\r\n// breadcrumb, where \"Request failed with status code 502\" is exactly what an\r\n// operator needs. Without the escape hatch a host either logs the sanitised\r\n// string (losing the diagnostic) or re-reads `error.message` by hand with an\r\n// assertion (the very thing G-04 exists to prevent).\r\n//\r\n// Purely additive; nothing existing changed.\r\nexport {\r\n getApiErrorMessage,\r\n getApiErrorDetail,\r\n getApiErrorStatus,\r\n DEFAULT_API_ERROR_MESSAGE,\r\n networkStatus,\r\n createNetworkStatus,\r\n} from \"./v2/utils\";\r\nexport type { NetworkStatus, NetworkStatusListener } from \"./v2/utils\";\r\n\r\n// Formik error flattening (gap G-38). FLAT-ONLY, per the policy note at the\r\n// bottom of this file, and added here in the SAME commit as its entry in\r\n// ./v2/utils/index.ts — that is the invariant recorded above: ./v2/utils is\r\n// re-exported by explicit name list, so a util omitted here never reaches a\r\n// consumer, which is how G-34 broke caution-ui's build.\r\n//\r\n// It completes the failed-submit recipe the library already half-owned:\r\n// FormErrorSummary (R-FV.2) renders `{ name, message }[]`, focusFieldByName\r\n// (R-FV.3) resolves that same name, and nothing turned Formik's nested error\r\n// tree into the list both of them speak. Every host wrote the recursion, and a\r\n// wrong accumulated path fails SILENTLY — the banner lists the right messages\r\n// and its jump button targets a field that does not exist.\r\nexport { flattenFormikErrors } from \"./v2/utils\";\r\n\r\n// Route-level Suspense fallback. R-P.1 MUST requires a \"fallback skeleton page\",\r\n// and the library had every skeleton PART plus PageBusy, but nothing satisfying\r\n// the rule: PageBusy is a full-screen spinner, which R-8.1 MUST forbids for\r\n// navigation. So every module hand-built one, and to avoid the CLS a skeleton\r\n// exists to prevent it had to copy ActionBar's and PageContent's padding\r\n// literals out of this library. Owning it here keeps the three in lockstep.\r\n// Capability gap G-02 (procuration-portnet-fe Area 5). Flat-only, per the policy\r\n// note below.\r\nexport { default as SkeletonPageShell } from \"./v2/patterns/SkeletonPageShell\";\r\nexport type {\r\n SkeletonPageShellProps,\r\n SkeletonPageShellVariant,\r\n} from \"./v2/patterns/SkeletonPageShell\";\r\n\r\n// Modal/Drawer/Combobox/DatePicker layering constants - needed by any\r\n// consumer stacking a popover-ish component (Combobox, DateTimePicker)\r\n// above a Modal or Drawer. Was v2-namespace-only.\r\nexport { MODAL_POPPER_PROPS, MODAL_ZINDEX } from \"./v2/modalContext\";\r\n\r\n// Personalization foundation runtime API (favorites, saved filters).\r\n// Named re-export, not a wildcard: ./v2/personalization also carries\r\n// the Scope/FavoriteRef/SavedFilter model types for its own internal\r\n// use, which are already flat-exported canonically via ./v2/models\r\n// below - a wildcard here would re-export them a second time and\r\n// collide (TS2308). Mirrors exactly what ./v2/index.ts already does\r\n// internally for the same reason.\r\nexport {\r\n UserPersonalizationProvider,\r\n createLocalStorageAdapter,\r\n createMemoryAdapter,\r\n registerCapability,\r\n useFavorites,\r\n useIsFavorite,\r\n useFavoritesView,\r\n filterRowsByFavorites,\r\n sortRowsByFavorites,\r\n FAVORITES_FILTER,\r\n FAVORITES_SORT,\r\n useSavedFilters,\r\n // G-50 — reviveSavedCriteria. Listed HERE and not only in\r\n // ./v2/personalization/index.ts, because this block is an EXPLICIT NAME LIST\r\n // (see the collision note just above): the invariant recorded for ./v2/utils\r\n // a few blocks up applies verbatim to this barrel — any addition intended for\r\n // hosts must be added here in the same commit, or it silently fails to reach\r\n // them until a consuming module's build breaks on\r\n // \"has no exported member\". That is how G-34 broke caution-ui, and adding\r\n // this one without touching this line reproduced it for the module that\r\n // requested the capability.\r\n reviveSavedCriteria,\r\n} from \"./v2/personalization\";\r\n\r\n// Grid preferences capability (gap G-35) — per-user, per-resource hidden\r\n// columns. FLAT-ONLY, per the policy note on `v2` at the bottom of this file:\r\n// deliberately NOT added to ./v2/index.ts.\r\n//\r\n// DataGridToolbar owns the column-visibility UI but holds no state, so hosts\r\n// persisted it themselves in a bare localStorage key — not user-scoped, unlike\r\n// this foundation's `…:{userId}:{capabilityId}` scheme, so on a shared\r\n// workstation one user inherited another's hidden columns. Observed in\r\n// onssa-export-fe (\"onssaCertificates:listing:hiddenColumns\").\r\n//\r\n// It had to land in the library rather than the host: `registerCapability` is\r\n// exported above as a seam \"for custom/host-defined capabilities\", but the two\r\n// primitives a capability hook needs (usePersonalizationStore,\r\n// useStoreSelector) are private by design (§2.8, minimum API surface), so a\r\n// host-registered capability could be declared and never read or written.\r\n// Completing that seam instead would widen the internal surface AND leave every\r\n// module re-authoring the same slice; owning the slice here does neither.\r\nexport {\r\n useGridPreferences,\r\n GRID_PREFERENCES_CAPABILITY_ID,\r\n} from \"./v2/personalization\";\r\nexport type {\r\n UseGridPreferencesResult,\r\n GridPreferencesEntry,\r\n} from \"./v2/personalization\";\r\n\r\n// Referentiel data layer runtime API (config provider + hooks). Backs\r\n// ReferentielField / FormikReferentielField, which are flat-exported\r\n// above via ./v2/patterns - the field UI was reachable while the data\r\n// layer that feeds it was not, so consumers had to either import from\r\n// the deprecated `@portnet/ui/v2` surface or rebuild the client\r\n// locally. Added while auditing mjcc-fe, which had done the latter.\r\n//\r\n// Named re-export, not a wildcard, for the SAME reason as\r\n// personalization above: ./v2/referentiel also re-exports\r\n// ReferentielSearchArgs, ReferentielSearchResult and\r\n// ReferentielSearchFn for its own use, and those names are already\r\n// flat-exported canonically through ./v2/models below. A wildcard\r\n// would export them twice and collide (TS2308). The type layer keeps\r\n// its single canonical route.\r\nexport {\r\n ReferentielProvider,\r\n ReferentielContext,\r\n useReferentielClient,\r\n useReferentielOptions,\r\n useReferentielSearch,\r\n} from \"./v2/referentiel\";\r\n\r\n// Domain models & shared UI/structural types, flat + type-only (no\r\n// runtime cost). Mirrors the same re-export already done inside\r\n// ./v2 — added here so consumers migrating off `v2.*` have a route\r\n// to the shared types the platform guidelines require reusing\r\n// (DrawerProps, FavoriteItem, SavedFilter, GridColumn, GridAction,\r\n// WizardStep, Notification, FormField, etc.) without falling back to\r\n// the deprecated namespace just to get a type import. Conflicting\r\n// names across the two star-exports are omitted per ES module\r\n// semantics rather than erroring.\r\nexport * from \"./v2/models\";\r\nexport * from \"./v2/types\";\r\n\r\n// ReferentielField's SEARCH CONTRACT, under non-colliding names.\r\n//\r\n// `ReferentielSearchParams` / `ReferentielSearchResult` exist twice in this\r\n// library with different shapes: the pattern's ({criteria, page, pageSize,\r\n// sort}) and the data layer's in ./v2/models/referentiel ({path, ...}). Per the\r\n// star-export semantics noted above, the conflicting pattern names are omitted\r\n// and both resolve to the MODELS types -- so a host cannot name the parameter\r\n// type of the `search` prop that ReferentielField REQUIRES it to pass.\r\n//\r\n// Found migrating ms-ti-fe off its local AppFormikSearchField: a typed\r\n// `async function searchTransitaires({ criteria, page, pageSize }:\r\n// ReferentielSearchParams)` fails with \"Property 'criteria' does not exist on\r\n// type ReferentielSearchParams<Record<string, unknown>>\", leaving a host only\r\n// two bad options -- re-declare the shape locally (duplicating a shared type,\r\n// which the Platform TypeScript Guidelines forbid) or derive it via\r\n// `Parameters<ReferentielFieldProps<T>[\"search\"]>[0]`.\r\n//\r\n// Aliasing rather than renaming: both original names keep resolving exactly as\r\n// they do today, so this is additive, and it makes the flat root the strict\r\n// superset of ./v2 that the COROLLARY below requires.\r\nexport type {\r\n ReferentielSearchParams as ReferentielFieldSearchParams,\r\n ReferentielSearchResult as ReferentielFieldSearchResult,\r\n} from \"./v2/patterns/ReferentielField\";\r\n\r\n// Transitional alias — the `@portnet/ui/v2` subpath kept resolving\r\n// for one minor cycle so consuming modules can migrate their\r\n// imports independently of the package bump. Scheduled removal:\r\n// 0.4.0. Track removal in the Batch 5 cleanup ticket.\r\n//\r\n// POLICY: capability added after this deprecation is surfaced on the\r\n// flat root ONLY and is not added to ./v2/index.ts — adding it there\r\n// would hand consumers a new reason to stay on a retiring surface.\r\n// downloadBase64File / getMimeType are the first such additions.\r\n//\r\n// COROLLARY, learned the hard way (G-34): the policy only works if the flat\r\n// root is a strict SUPERSET of ./v2. It was not — downloadBlobFile and\r\n// openBase64FileInTab were on v2 and missing here, so \"migrate off v2\" meant\r\n// \"lose two utilities\". Before deprecating anything further, diff the two\r\n// surfaces; `npm run api:check` covers the root but does not compare it against\r\n// ./v2.\r\nexport * as v2 from \"./v2\";\r\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,iBAAiB;AAC/B,cAAc,eAAe;AAC7B,cAAc,YAAY;AAC1B,SACEA,kBAAkB,EAClBC,eAAe,EACfC,kBAAkB,EAClBC,kBAAkB,QACb,YAAY;;AAEnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SACEC,EAAE,EACFC,QAAQ,EACRC,QAAQ,EACRC,kBAAkB,EAClBC,WAAW,EACXC,mBAAmB,EACnBC,gBAAgB,QACX,YAAY;;AAEnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,OAAO,EAAEC,WAAW,QAAQ,YAAY;AAGjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SACEC,qBAAqB,EACrBC,cAAc,EACdC,gBAAgB,EAChBC,qBAAqB,EACrBC,iBAAiB,QACZ,YAAY;AAOnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SACEC,kBAAkB,EAClBC,iBAAiB,EACjBC,iBAAiB,EACjBC,yBAAyB,EACzBC,aAAa,EACbC,mBAAmB,QACd,YAAY;AAGnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,mBAAmB,QAAQ,YAAY;;AAEhD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,OAAO,IAAIC,iBAAiB,QAAQ,iCAAiC;AAM9E;AACA;AACA;AACA,SAASC,kBAAkB,EAAEC,YAAY,QAAQ,mBAAmB;;AAEpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SACEC,2BAA2B,EAC3BC,yBAAyB,EACzBC,mBAAmB,EACnBC,kBAAkB,EAClBC,YAAY,EACZC,aAAa,EACbC,gBAAgB,EAChBC,qBAAqB,EACrBC,mBAAmB,EACnBC,gBAAgB,EAChBC,cAAc,EACdC,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACAC,mBAAmB,QACd,sBAAsB;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SACEC,kBAAkB,EAClBC,8BAA8B,QACzB,sBAAsB;AAM7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SACEC,mBAAmB,EACnBC,kBAAkB,EAClBC,oBAAoB,EACpBC,qBAAqB,EACrBC,oBAAoB,QACf,kBAAkB;;AAEzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,aAAa;AAC3B,cAAc,YAAY;;AAE1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,KAAKC,EAAE,MAAM,MAAM","ignoreList":[]}
@@ -0,0 +1,130 @@
1
+ import "@testing-library/jest-dom";
2
+ import { fireEvent, render, screen } from "@testing-library/react";
3
+ import AppMain from "../patterns/AppMain";
4
+ import SkipLink from "../components/SkipLink";
5
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
6
+ describe("AppMain", () => {
7
+ it("renders a main landmark holding its children", () => {
8
+ render(/*#__PURE__*/_jsx(AppMain, {
9
+ children: "contenu"
10
+ }));
11
+ const main = screen.getByRole("main");
12
+ expect(main).toHaveTextContent("contenu");
13
+ });
14
+
15
+ /* The id is half of a contract: SkipLink's default href is "#main-content". */
16
+ it("defaults its id to SkipLink's default target", () => {
17
+ render(/*#__PURE__*/_jsx(AppMain, {
18
+ children: "x"
19
+ }));
20
+ expect(screen.getByRole("main")).toHaveAttribute("id", "main-content");
21
+ });
22
+ it("accepts a custom id", () => {
23
+ render(/*#__PURE__*/_jsx(AppMain, {
24
+ id: "zone-principale",
25
+ children: "x"
26
+ }));
27
+ expect(screen.getByRole("main")).toHaveAttribute("id", "zone-principale");
28
+ });
29
+
30
+ /* Focusable programmatically, NOT a tab stop. */
31
+ it("is programmatically focusable without joining the tab order", () => {
32
+ render(/*#__PURE__*/_jsx(AppMain, {
33
+ children: "x"
34
+ }));
35
+ expect(screen.getByRole("main")).toHaveAttribute("tabindex", "-1");
36
+ });
37
+
38
+ /* R-L.5 — and the cap is meaningless without the auto margins: the content
39
+ * would pin left and leave the whole surplus as one gutter. */
40
+ it("caps the wide measure and centres it", () => {
41
+ render(/*#__PURE__*/_jsx(AppMain, {
42
+ children: "x"
43
+ }));
44
+ const main = screen.getByRole("main");
45
+ expect(main.style.maxWidth).toBe("var(--content-max)");
46
+ expect(main.style.marginInline).toBe("auto");
47
+ });
48
+ it("caps the form measure at the form token", () => {
49
+ render(/*#__PURE__*/_jsx(AppMain, {
50
+ measure: "form",
51
+ children: "x"
52
+ }));
53
+ expect(screen.getByRole("main").style.maxWidth).toBe("var(--form-max)");
54
+ });
55
+ it("applies no cap for the full measure", () => {
56
+ render(/*#__PURE__*/_jsx(AppMain, {
57
+ measure: "full",
58
+ children: "x"
59
+ }));
60
+ const main = screen.getByRole("main");
61
+ expect(main.style.maxWidth).toBe("");
62
+ expect(main.style.marginInline).toBe("");
63
+ });
64
+ it("reserves a minimum height, overridable", () => {
65
+ const {
66
+ unmount
67
+ } = render(/*#__PURE__*/_jsx(AppMain, {
68
+ children: "x"
69
+ }));
70
+ expect(screen.getByRole("main").style.minHeight).toBe("100vh");
71
+ unmount();
72
+ render(/*#__PURE__*/_jsx(AppMain, {
73
+ minHeight: "480px",
74
+ children: "x"
75
+ }));
76
+ expect(screen.getByRole("main").style.minHeight).toBe("480px");
77
+ });
78
+ it("lets an explicit style win over the computed one", () => {
79
+ render(/*#__PURE__*/_jsx(AppMain, {
80
+ style: {
81
+ maxWidth: "960px"
82
+ },
83
+ children: "x"
84
+ }));
85
+ expect(screen.getByRole("main").style.maxWidth).toBe("960px");
86
+ });
87
+
88
+ /* PRE-CONTENT — the case that made these two props exist. A host rendering
89
+ * the landmark before its router mounts (R-Pp.1) has nothing inside to name
90
+ * it, and an empty landmark is indistinguishable from a failed one. */
91
+ it("names and marks the region busy when asked", () => {
92
+ render(/*#__PURE__*/_jsx(AppMain, {
93
+ ariaLabel: "Initialisation de l'application",
94
+ ariaBusy: true,
95
+ children: null
96
+ }));
97
+ const main = screen.getByRole("main");
98
+ expect(main).toHaveAccessibleName("Initialisation de l'application");
99
+ expect(main).toHaveAttribute("aria-busy", "true");
100
+ });
101
+
102
+ /* And stays silent otherwise: a `<main>` holding content needs no name, and
103
+ * a spurious `aria-busy="false"` on every page would be noise in the tree. */
104
+ it("emits neither attribute by default", () => {
105
+ render(/*#__PURE__*/_jsx(AppMain, {
106
+ children: "contenu"
107
+ }));
108
+ const main = screen.getByRole("main");
109
+ expect(main).not.toHaveAttribute("aria-label");
110
+ expect(main).not.toHaveAttribute("aria-busy");
111
+ });
112
+
113
+ /* THE CONTRACT THIS PATTERN COMPLETES (WCAG 2.4.1 / R-N.6). Until now the
114
+ * library shipped the link and prescribed the target without providing it,
115
+ * so this pairing was only ever exercised in module code. */
116
+ it("receives focus when the skip link is activated", () => {
117
+ render(/*#__PURE__*/_jsxs(_Fragment, {
118
+ children: [/*#__PURE__*/_jsx(SkipLink, {}), /*#__PURE__*/_jsx(AppMain, {
119
+ children: "contenu"
120
+ })]
121
+ }));
122
+
123
+ /* fireEvent rather than user-event: the assertion is about SkipLink's own
124
+ click handler moving focus, and it keeps this suite free of a testing
125
+ dependency the repo may not carry. */
126
+ fireEvent.click(screen.getByRole("link"));
127
+ expect(screen.getByRole("main")).toHaveFocus();
128
+ });
129
+ });
130
+ //# sourceMappingURL=AppMain.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AppMain.test.js","names":["fireEvent","render","screen","AppMain","SkipLink","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","describe","it","children","main","getByRole","expect","toHaveTextContent","toHaveAttribute","id","style","maxWidth","toBe","marginInline","measure","unmount","minHeight","ariaLabel","ariaBusy","toHaveAccessibleName","not","click","toHaveFocus"],"sources":["../../../../src/lib/v2/__tests__/AppMain.test.tsx"],"sourcesContent":["import \"@testing-library/jest-dom\";\r\nimport { fireEvent, render, screen } from \"@testing-library/react\";\r\n\r\nimport AppMain from \"../patterns/AppMain\";\r\nimport SkipLink from \"../components/SkipLink\";\r\n\r\ndescribe(\"AppMain\", () => {\r\n it(\"renders a main landmark holding its children\", () => {\r\n render(<AppMain>contenu</AppMain>);\r\n const main = screen.getByRole(\"main\");\r\n expect(main).toHaveTextContent(\"contenu\");\r\n });\r\n\r\n /* The id is half of a contract: SkipLink's default href is \"#main-content\". */\r\n it(\"defaults its id to SkipLink's default target\", () => {\r\n render(<AppMain>x</AppMain>);\r\n expect(screen.getByRole(\"main\")).toHaveAttribute(\"id\", \"main-content\");\r\n });\r\n\r\n it(\"accepts a custom id\", () => {\r\n render(<AppMain id=\"zone-principale\">x</AppMain>);\r\n expect(screen.getByRole(\"main\")).toHaveAttribute(\"id\", \"zone-principale\");\r\n });\r\n\r\n /* Focusable programmatically, NOT a tab stop. */\r\n it(\"is programmatically focusable without joining the tab order\", () => {\r\n render(<AppMain>x</AppMain>);\r\n expect(screen.getByRole(\"main\")).toHaveAttribute(\"tabindex\", \"-1\");\r\n });\r\n\r\n /* R-L.5 — and the cap is meaningless without the auto margins: the content\r\n * would pin left and leave the whole surplus as one gutter. */\r\n it(\"caps the wide measure and centres it\", () => {\r\n render(<AppMain>x</AppMain>);\r\n const main = screen.getByRole(\"main\");\r\n expect(main.style.maxWidth).toBe(\"var(--content-max)\");\r\n expect(main.style.marginInline).toBe(\"auto\");\r\n });\r\n\r\n it(\"caps the form measure at the form token\", () => {\r\n render(<AppMain measure=\"form\">x</AppMain>);\r\n expect(screen.getByRole(\"main\").style.maxWidth).toBe(\"var(--form-max)\");\r\n });\r\n\r\n it(\"applies no cap for the full measure\", () => {\r\n render(<AppMain measure=\"full\">x</AppMain>);\r\n const main = screen.getByRole(\"main\");\r\n expect(main.style.maxWidth).toBe(\"\");\r\n expect(main.style.marginInline).toBe(\"\");\r\n });\r\n\r\n it(\"reserves a minimum height, overridable\", () => {\r\n const { unmount } = render(<AppMain>x</AppMain>);\r\n expect(screen.getByRole(\"main\").style.minHeight).toBe(\"100vh\");\r\n unmount();\r\n\r\n render(<AppMain minHeight=\"480px\">x</AppMain>);\r\n expect(screen.getByRole(\"main\").style.minHeight).toBe(\"480px\");\r\n });\r\n\r\n it(\"lets an explicit style win over the computed one\", () => {\r\n render(<AppMain style={{ maxWidth: \"960px\" }}>x</AppMain>);\r\n expect(screen.getByRole(\"main\").style.maxWidth).toBe(\"960px\");\r\n });\r\n\r\n /* PRE-CONTENT — the case that made these two props exist. A host rendering\r\n * the landmark before its router mounts (R-Pp.1) has nothing inside to name\r\n * it, and an empty landmark is indistinguishable from a failed one. */\r\n it(\"names and marks the region busy when asked\", () => {\r\n render(\r\n <AppMain ariaLabel=\"Initialisation de l'application\" ariaBusy>\r\n {null}\r\n </AppMain>\r\n );\r\n\r\n const main = screen.getByRole(\"main\");\r\n expect(main).toHaveAccessibleName(\"Initialisation de l'application\");\r\n expect(main).toHaveAttribute(\"aria-busy\", \"true\");\r\n });\r\n\r\n /* And stays silent otherwise: a `<main>` holding content needs no name, and\r\n * a spurious `aria-busy=\"false\"` on every page would be noise in the tree. */\r\n it(\"emits neither attribute by default\", () => {\r\n render(<AppMain>contenu</AppMain>);\r\n const main = screen.getByRole(\"main\");\r\n expect(main).not.toHaveAttribute(\"aria-label\");\r\n expect(main).not.toHaveAttribute(\"aria-busy\");\r\n });\r\n\r\n /* THE CONTRACT THIS PATTERN COMPLETES (WCAG 2.4.1 / R-N.6). Until now the\r\n * library shipped the link and prescribed the target without providing it,\r\n * so this pairing was only ever exercised in module code. */\r\n it(\"receives focus when the skip link is activated\", () => {\r\n render(\r\n <>\r\n <SkipLink />\r\n <AppMain>contenu</AppMain>\r\n </>\r\n );\r\n\r\n /* fireEvent rather than user-event: the assertion is about SkipLink's own\r\n click handler moving focus, and it keeps this suite free of a testing\r\n dependency the repo may not carry. */\r\n fireEvent.click(screen.getByRole(\"link\"));\r\n\r\n expect(screen.getByRole(\"main\")).toHaveFocus();\r\n });\r\n});\r\n"],"mappings":"AAAA,OAAO,2BAA2B;AAClC,SAASA,SAAS,EAAEC,MAAM,EAAEC,MAAM,QAAQ,wBAAwB;AAElE,OAAOC,OAAO,MAAM,qBAAqB;AACzC,OAAOC,QAAQ,MAAM,wBAAwB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAAC,SAAA,EAAAC,IAAA,IAAAC,KAAA;AAE9CC,QAAQ,CAAC,SAAS,EAAE,MAAM;EACxBC,EAAE,CAAC,8CAA8C,EAAE,MAAM;IACvDX,MAAM,cAACK,IAAA,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CAAC,gDAAgD,EAAE,MAAM;IACzDX,MAAM,cACJS,KAAA,CAAAF,SAAA;MAAAK,QAAA,gBACEP,IAAA,CAACF,QAAQ,IAAE,CAAC,eACZE,IAAA,CAACH,OAAO;QAAAU,QAAA,EAAC;MAAO,CAAS,CAAC;IAAA,CAC1B,CACJ,CAAC;;IAED;AACJ;AACA;IACIb,SAAS,CAAC+B,KAAK,CAAC7B,MAAM,CAACa,SAAS,CAAC,MAAM,CAAC,CAAC;IAEzCC,MAAM,CAACd,MAAM,CAACa,SAAS,CAAC,MAAM,CAAC,CAAC,CAACiB,WAAW,CAAC,CAAC;EAChD,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,180 @@
1
+ import "@testing-library/jest-dom";
2
+ import { render, screen } from "@testing-library/react";
3
+ import ChartFigure from "../patterns/ChartFigure";
4
+ import { chartChrome } from "../tokens/chart";
5
+ import { jsx as _jsx } from "react/jsx-runtime";
6
+ describe("ChartFigure", () => {
7
+ it("renders a figure with its heading, chart and caption", () => {
8
+ render(/*#__PURE__*/_jsx(ChartFigure, {
9
+ title: "Dossiers par type",
10
+ caption: "Admission : 128 (64 %). Renouvellement : 72 (36 %).",
11
+ children: /*#__PURE__*/_jsx("div", {
12
+ "data-testid": "canvas",
13
+ children: "graphe"
14
+ })
15
+ }));
16
+ expect(screen.getByRole("figure")).toBeInTheDocument();
17
+ expect(screen.getByRole("heading", {
18
+ name: "Dossiers par type"
19
+ })).toBeInTheDocument();
20
+ expect(screen.getByTestId("canvas")).toBeInTheDocument();
21
+ expect(screen.getByText("Admission : 128 (64 %). Renouvellement : 72 (36 %).")).toBeInTheDocument();
22
+ });
23
+
24
+ /* The heading is REAL TEXT, not an SVG title: selectable, translatable, and
25
+ * reachable as a heading. The renderer's own `title` option stays empty. */
26
+ it("exposes the title as a heading at h3 by default", () => {
27
+ render(/*#__PURE__*/_jsx(ChartFigure, {
28
+ title: "R\xE9partition",
29
+ caption: "\u2026",
30
+ children: /*#__PURE__*/_jsx("div", {})
31
+ }));
32
+ expect(screen.getByRole("heading", {
33
+ name: "Répartition"
34
+ }).tagName).toBe("H3");
35
+ });
36
+ it("accepts another heading level", () => {
37
+ render(/*#__PURE__*/_jsx(ChartFigure, {
38
+ title: "R\xE9partition",
39
+ caption: "\u2026",
40
+ level: "h2",
41
+ children: /*#__PURE__*/_jsx("div", {})
42
+ }));
43
+ expect(screen.getByRole("heading", {
44
+ name: "Répartition"
45
+ }).tagName).toBe("H2");
46
+ });
47
+
48
+ /* A renderer emits dozens of unstructured SVG text nodes; a screen reader
49
+ * walks them one by one, in visual order. That is noise, and the caption
50
+ * speaks for the canvas instead. */
51
+ it("hides the canvas from assistive technology by default", () => {
52
+ render(/*#__PURE__*/_jsx(ChartFigure, {
53
+ title: "T",
54
+ caption: "C",
55
+ children: /*#__PURE__*/_jsx("div", {
56
+ "data-testid": "canvas",
57
+ children: "graphe"
58
+ })
59
+ }));
60
+ expect(screen.getByTestId("canvas").parentElement).toHaveAttribute("aria-hidden", "true");
61
+ });
62
+
63
+ /* Escape hatch for a renderer that builds its own accessible data table. */
64
+ it("can leave the canvas exposed", () => {
65
+ render(/*#__PURE__*/_jsx(ChartFigure, {
66
+ title: "T",
67
+ caption: "C",
68
+ hideCanvasFromScreenReaders: false,
69
+ children: /*#__PURE__*/_jsx("div", {
70
+ "data-testid": "canvas",
71
+ children: "graphe"
72
+ })
73
+ }));
74
+ expect(screen.getByTestId("canvas").parentElement).not.toHaveAttribute("aria-hidden");
75
+ });
76
+
77
+ /* R-R.4 — the caption must not jump down the page when the chart paints. */
78
+ it("reserves the canvas height when asked", () => {
79
+ render(/*#__PURE__*/_jsx(ChartFigure, {
80
+ title: "T",
81
+ caption: "C",
82
+ minHeight: 320,
83
+ children: /*#__PURE__*/_jsx("div", {
84
+ "data-testid": "canvas"
85
+ })
86
+ }));
87
+ expect(screen.getByTestId("canvas").parentElement?.style.minHeight).toBe("320px");
88
+ });
89
+
90
+ /* The caption is VISIBLE, not visually-hidden: the numbers help the reader
91
+ * who can see the chart too, and a caption nobody sees is a caption nobody
92
+ * notices has gone stale. */
93
+ it("renders the caption as a visible figcaption", () => {
94
+ render(/*#__PURE__*/_jsx(ChartFigure, {
95
+ title: "T",
96
+ caption: "Approuv\xE9s : 12",
97
+ children: /*#__PURE__*/_jsx("div", {})
98
+ }));
99
+ const caption = screen.getByText("Approuvés : 12");
100
+ expect(caption.tagName).toBe("FIGCAPTION");
101
+ expect(caption).toBeVisible();
102
+ });
103
+ });
104
+
105
+ /* ── Tolérance aux pannes (ISO/IEC 25010, lot 12 Area 12) ──────────
106
+ *
107
+ * Le canevas héberge un moteur de graphes TIERS alimenté par des agrégats dont
108
+ * les modèles déclarent tous les champs optionnels. Sans frontière, une
109
+ * exception au rendu démonte tout l'arbre : la page de bilan entière, bande de
110
+ * KPI et tableau compris — le tableau qui porte précisément les chiffres que le
111
+ * graphe dessinait.
112
+ *
113
+ * `console.error` est réduit au silence sur ces deux cas : React journalise
114
+ * toute exception capturée par une frontière, et c'est du bruit attendu ici,
115
+ * pas un signal. */
116
+ describe("ChartFigure — tolérance aux pannes", () => {
117
+ const Exploding = () => {
118
+ throw new Error("series[0].data is not iterable");
119
+ };
120
+ let consoleError;
121
+ beforeEach(() => {
122
+ consoleError = jest.spyOn(console, "error").mockImplementation(() => {});
123
+ });
124
+ afterEach(() => {
125
+ consoleError.mockRestore();
126
+ });
127
+ it("contient la panne dans la carte, titre et légende intacts", () => {
128
+ render(/*#__PURE__*/_jsx(ChartFigure, {
129
+ title: "Dossiers par type",
130
+ caption: "Admission : 128 (64 %). Renouvellement : 72 (36 %).",
131
+ children: /*#__PURE__*/_jsx(Exploding, {})
132
+ }));
133
+
134
+ /* Ce qui compte : la figure EXISTE encore, et surtout la légende — elle
135
+ porte les chiffres en texte, donc le lecteur obtient la DONNÉE même quand
136
+ le dessin a disparu. */
137
+ expect(screen.getByRole("figure")).toBeInTheDocument();
138
+ expect(screen.getByRole("heading", {
139
+ name: "Dossiers par type"
140
+ })).toBeInTheDocument();
141
+ expect(screen.getByText("Admission : 128 (64 %). Renouvellement : 72 (36 %).")).toBeInTheDocument();
142
+ });
143
+
144
+ /* LA PARTIE FRAGILE. La frontière doit envelopper le `div` `aria-hidden`, pas
145
+ * y vivre : placée dedans, sa bannière d'erreur hériterait de l'`aria-hidden`
146
+ * et aucun lecteur d'écran ne l'annoncerait. Un voyant verrait la panne, un
147
+ * non-voyant n'entendrait rien — et rien à l'écran ne le révélerait. */
148
+ it("annonce l'erreur aux technologies d'assistance", () => {
149
+ render(/*#__PURE__*/_jsx(ChartFigure, {
150
+ title: "Dossiers par type",
151
+ caption: "\u2014",
152
+ children: /*#__PURE__*/_jsx(Exploding, {})
153
+ }));
154
+ const alert = screen.getByRole("alert");
155
+ expect(alert).toBeInTheDocument();
156
+ expect(alert.closest("[aria-hidden='true']")).toBeNull();
157
+ });
158
+ });
159
+ describe("chartChrome", () => {
160
+ /* A hard-coded white canvas is what breaks a chart in dark mode. */
161
+ it("keeps the canvas transparent", () => {
162
+ expect(chartChrome.background).toBe("transparent");
163
+ });
164
+
165
+ /* Chart libraries hand their style objects to SVG attributes, which never get
166
+ * a unit appended for free — a bare 16 is ignored by some renderers. */
167
+ it("gives font sizes with units", () => {
168
+ expect(chartChrome.title.fontSize).toMatch(/^\d+px$/);
169
+ expect(chartChrome.label.fontSize).toMatch(/^\d+px$/);
170
+ });
171
+ it("maps the roles onto distinct ink tokens", () => {
172
+ expect(chartChrome.title.color).not.toBe(chartChrome.label.color);
173
+ });
174
+ it("is frozen, so no consumer can mutate the shared mapping", () => {
175
+ expect(Object.isFrozen(chartChrome)).toBe(true);
176
+ expect(Object.isFrozen(chartChrome.title)).toBe(true);
177
+ expect(Object.isFrozen(chartChrome.label)).toBe(true);
178
+ });
179
+ });
180
+ //# sourceMappingURL=ChartFigure.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChartFigure.test.js","names":["render","screen","ChartFigure","chartChrome","jsx","_jsx","describe","it","title","caption","children","expect","getByRole","toBeInTheDocument","name","getByTestId","getByText","tagName","toBe","level","parentElement","toHaveAttribute","hideCanvasFromScreenReaders","not","minHeight","style","toBeVisible","Exploding","Error","consoleError","beforeEach","jest","spyOn","console","mockImplementation","afterEach","mockRestore","alert","closest","toBeNull","background","fontSize","toMatch","label","color","Object","isFrozen"],"sources":["../../../../src/lib/v2/__tests__/ChartFigure.test.tsx"],"sourcesContent":["import \"@testing-library/jest-dom\";\r\nimport { render, screen } from \"@testing-library/react\";\r\n\r\nimport ChartFigure from \"../patterns/ChartFigure\";\r\nimport { chartChrome } from \"../tokens/chart\";\r\n\r\ndescribe(\"ChartFigure\", () => {\r\n it(\"renders a figure with its heading, chart and caption\", () => {\r\n render(\r\n <ChartFigure\r\n title=\"Dossiers par type\"\r\n caption=\"Admission : 128 (64 %). Renouvellement : 72 (36 %).\"\r\n >\r\n <div data-testid=\"canvas\">graphe</div>\r\n </ChartFigure>\r\n );\r\n\r\n expect(screen.getByRole(\"figure\")).toBeInTheDocument();\r\n expect(\r\n screen.getByRole(\"heading\", { name: \"Dossiers par type\" })\r\n ).toBeInTheDocument();\r\n expect(screen.getByTestId(\"canvas\")).toBeInTheDocument();\r\n expect(\r\n screen.getByText(\"Admission : 128 (64 %). Renouvellement : 72 (36 %).\")\r\n ).toBeInTheDocument();\r\n });\r\n\r\n /* The heading is REAL TEXT, not an SVG title: selectable, translatable, and\r\n * reachable as a heading. The renderer's own `title` option stays empty. */\r\n it(\"exposes the title as a heading at h3 by default\", () => {\r\n render(\r\n <ChartFigure title=\"Répartition\" caption=\"…\">\r\n <div />\r\n </ChartFigure>\r\n );\r\n expect(screen.getByRole(\"heading\", { name: \"Répartition\" }).tagName).toBe(\r\n \"H3\"\r\n );\r\n });\r\n\r\n it(\"accepts another heading level\", () => {\r\n render(\r\n <ChartFigure title=\"Répartition\" caption=\"…\" level=\"h2\">\r\n <div />\r\n </ChartFigure>\r\n );\r\n expect(screen.getByRole(\"heading\", { name: \"Répartition\" }).tagName).toBe(\r\n \"H2\"\r\n );\r\n });\r\n\r\n /* A renderer emits dozens of unstructured SVG text nodes; a screen reader\r\n * walks them one by one, in visual order. That is noise, and the caption\r\n * speaks for the canvas instead. */\r\n it(\"hides the canvas from assistive technology by default\", () => {\r\n render(\r\n <ChartFigure title=\"T\" caption=\"C\">\r\n <div data-testid=\"canvas\">graphe</div>\r\n </ChartFigure>\r\n );\r\n expect(screen.getByTestId(\"canvas\").parentElement).toHaveAttribute(\r\n \"aria-hidden\",\r\n \"true\"\r\n );\r\n });\r\n\r\n /* Escape hatch for a renderer that builds its own accessible data table. */\r\n it(\"can leave the canvas exposed\", () => {\r\n render(\r\n <ChartFigure title=\"T\" caption=\"C\" hideCanvasFromScreenReaders={false}>\r\n <div data-testid=\"canvas\">graphe</div>\r\n </ChartFigure>\r\n );\r\n expect(screen.getByTestId(\"canvas\").parentElement).not.toHaveAttribute(\r\n \"aria-hidden\"\r\n );\r\n });\r\n\r\n /* R-R.4 — the caption must not jump down the page when the chart paints. */\r\n it(\"reserves the canvas height when asked\", () => {\r\n render(\r\n <ChartFigure title=\"T\" caption=\"C\" minHeight={320}>\r\n <div data-testid=\"canvas\" />\r\n </ChartFigure>\r\n );\r\n expect(screen.getByTestId(\"canvas\").parentElement?.style.minHeight).toBe(\r\n \"320px\"\r\n );\r\n });\r\n\r\n /* The caption is VISIBLE, not visually-hidden: the numbers help the reader\r\n * who can see the chart too, and a caption nobody sees is a caption nobody\r\n * notices has gone stale. */\r\n it(\"renders the caption as a visible figcaption\", () => {\r\n render(\r\n <ChartFigure title=\"T\" caption=\"Approuvés : 12\">\r\n <div />\r\n </ChartFigure>\r\n );\r\n const caption = screen.getByText(\"Approuvés : 12\");\r\n expect(caption.tagName).toBe(\"FIGCAPTION\");\r\n expect(caption).toBeVisible();\r\n });\r\n});\r\n\r\n/* ── Tolérance aux pannes (ISO/IEC 25010, lot 12 Area 12) ──────────\r\n *\r\n * Le canevas héberge un moteur de graphes TIERS alimenté par des agrégats dont\r\n * les modèles déclarent tous les champs optionnels. Sans frontière, une\r\n * exception au rendu démonte tout l'arbre : la page de bilan entière, bande de\r\n * KPI et tableau compris — le tableau qui porte précisément les chiffres que le\r\n * graphe dessinait.\r\n *\r\n * `console.error` est réduit au silence sur ces deux cas : React journalise\r\n * toute exception capturée par une frontière, et c'est du bruit attendu ici,\r\n * pas un signal. */\r\ndescribe(\"ChartFigure — tolérance aux pannes\", () => {\r\n const Exploding = () => {\r\n throw new Error(\"series[0].data is not iterable\");\r\n };\r\n\r\n let consoleError: jest.SpyInstance;\r\n\r\n beforeEach(() => {\r\n consoleError = jest.spyOn(console, \"error\").mockImplementation(() => {});\r\n });\r\n\r\n afterEach(() => {\r\n consoleError.mockRestore();\r\n });\r\n\r\n it(\"contient la panne dans la carte, titre et légende intacts\", () => {\r\n render(\r\n <ChartFigure\r\n title=\"Dossiers par type\"\r\n caption=\"Admission : 128 (64 %). Renouvellement : 72 (36 %).\"\r\n >\r\n <Exploding />\r\n </ChartFigure>\r\n );\r\n\r\n /* Ce qui compte : la figure EXISTE encore, et surtout la légende — elle\r\n porte les chiffres en texte, donc le lecteur obtient la DONNÉE même quand\r\n le dessin a disparu. */\r\n expect(screen.getByRole(\"figure\")).toBeInTheDocument();\r\n expect(\r\n screen.getByRole(\"heading\", { name: \"Dossiers par type\" })\r\n ).toBeInTheDocument();\r\n expect(\r\n screen.getByText(\"Admission : 128 (64 %). Renouvellement : 72 (36 %).\")\r\n ).toBeInTheDocument();\r\n });\r\n\r\n /* LA PARTIE FRAGILE. La frontière doit envelopper le `div` `aria-hidden`, pas\r\n * y vivre : placée dedans, sa bannière d'erreur hériterait de l'`aria-hidden`\r\n * et aucun lecteur d'écran ne l'annoncerait. Un voyant verrait la panne, un\r\n * non-voyant n'entendrait rien — et rien à l'écran ne le révélerait. */\r\n it(\"annonce l'erreur aux technologies d'assistance\", () => {\r\n render(\r\n <ChartFigure title=\"Dossiers par type\" caption=\"—\">\r\n <Exploding />\r\n </ChartFigure>\r\n );\r\n\r\n const alert = screen.getByRole(\"alert\");\r\n expect(alert).toBeInTheDocument();\r\n expect(alert.closest(\"[aria-hidden='true']\")).toBeNull();\r\n });\r\n});\r\n\r\ndescribe(\"chartChrome\", () => {\r\n /* A hard-coded white canvas is what breaks a chart in dark mode. */\r\n it(\"keeps the canvas transparent\", () => {\r\n expect(chartChrome.background).toBe(\"transparent\");\r\n });\r\n\r\n /* Chart libraries hand their style objects to SVG attributes, which never get\r\n * a unit appended for free — a bare 16 is ignored by some renderers. */\r\n it(\"gives font sizes with units\", () => {\r\n expect(chartChrome.title.fontSize).toMatch(/^\\d+px$/);\r\n expect(chartChrome.label.fontSize).toMatch(/^\\d+px$/);\r\n });\r\n\r\n it(\"maps the roles onto distinct ink tokens\", () => {\r\n expect(chartChrome.title.color).not.toBe(chartChrome.label.color);\r\n });\r\n\r\n it(\"is frozen, so no consumer can mutate the shared mapping\", () => {\r\n expect(Object.isFrozen(chartChrome)).toBe(true);\r\n expect(Object.isFrozen(chartChrome.title)).toBe(true);\r\n expect(Object.isFrozen(chartChrome.label)).toBe(true);\r\n });\r\n});\r\n"],"mappings":"AAAA,OAAO,2BAA2B;AAClC,SAASA,MAAM,EAAEC,MAAM,QAAQ,wBAAwB;AAEvD,OAAOC,WAAW,MAAM,yBAAyB;AACjD,SAASC,WAAW,QAAQ,iBAAiB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE9CC,QAAQ,CAAC,aAAa,EAAE,MAAM;EAC5BC,EAAE,CAAC,sDAAsD,EAAE,MAAM;IAC/DP,MAAM,cACJK,IAAA,CAACH,WAAW;MACVM,KAAK,EAAC,mBAAmB;MACzBC,OAAO,EAAC,qDAAqD;MAAAC,QAAA,eAE7DL,IAAA;QAAK,eAAY,QAAQ;QAAAK,QAAA,EAAC;MAAM,CAAK;IAAC,CAC3B,CACf,CAAC;IAEDC,MAAM,CAACV,MAAM,CAACW,SAAS,CAAC,QAAQ,CAAC,CAAC,CAACC,i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