@portnet/ui 6.0.1 → 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 (1011) hide show
  1. package/CHANGELOG.md +737 -0
  2. package/dist/esm/index.js +90 -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 -39
  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 +146 -0
  17. package/dist/esm/v2/__tests__/FieldWidth.test.js.map +1 -0
  18. package/dist/esm/v2/__tests__/FileCard.test.js +18 -18
  19. package/dist/esm/v2/__tests__/FileCard.test.js.map +1 -1
  20. package/dist/esm/v2/__tests__/FormikCheckbox.test.js +173 -0
  21. package/dist/esm/v2/__tests__/FormikCheckbox.test.js.map +1 -0
  22. package/dist/esm/v2/__tests__/FormikDateTimePicker.test.js +236 -0
  23. package/dist/esm/v2/__tests__/FormikDateTimePicker.test.js.map +1 -0
  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 +299 -0
  27. package/dist/esm/v2/__tests__/FormikRadioGroup.test.js.map +1 -0
  28. package/dist/esm/v2/__tests__/MobileRowCard.test.js +44 -43
  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 -22
  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 +118 -90
  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 +210 -52
  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 +64 -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 +14 -4
  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 +26 -75
  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 +130 -0
  269. package/dist/esm/v2/patterns/FormikCheckbox.js.map +1 -0
  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 -66
  273. package/dist/esm/v2/patterns/FormikCombobox.js.map +1 -1
  274. package/dist/esm/v2/patterns/FormikDatePicker.js +51 -99
  275. package/dist/esm/v2/patterns/FormikDatePicker.js.map +1 -1
  276. package/dist/esm/v2/patterns/FormikDateTimePicker.js +136 -0
  277. package/dist/esm/v2/patterns/FormikDateTimePicker.js.map +1 -0
  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 -50
  285. package/dist/esm/v2/patterns/FormikInput.js.map +1 -1
  286. package/dist/esm/v2/patterns/FormikRadioGroup.js +129 -0
  287. package/dist/esm/v2/patterns/FormikRadioGroup.js.map +1 -0
  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 -84
  291. package/dist/esm/v2/patterns/FormikSelect.js.map +1 -1
  292. package/dist/esm/v2/patterns/FormikTextarea.js +30 -43
  293. package/dist/esm/v2/patterns/FormikTextarea.js.map +1 -1
  294. package/dist/esm/v2/patterns/KeyboardShortcutsHelp.js +64 -65
  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 +127 -0
  305. package/dist/esm/v2/patterns/RowFavoriteToggle.js.map +1 -0
  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 +72 -0
  319. package/dist/esm/v2/patterns/_pickerSerialisation.js.map +1 -0
  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 +235 -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 +203 -0
  345. package/dist/esm/v2/personalization/capabilities/gridPreferences.js.map +1 -0
  346. package/dist/esm/v2/personalization/capabilities/index.js +5 -0
  347. package/dist/esm/v2/personalization/capabilities/index.js.map +1 -1
  348. package/dist/esm/v2/personalization/capabilities/reviveSavedCriteria.js +119 -0
  349. package/dist/esm/v2/personalization/capabilities/reviveSavedCriteria.js.map +1 -0
  350. package/dist/esm/v2/personalization/capabilities/savedFilters.js +90 -98
  351. package/dist/esm/v2/personalization/capabilities/savedFilters.js.map +1 -1
  352. package/dist/esm/v2/personalization/createPersonalizationStore.js +78 -181
  353. package/dist/esm/v2/personalization/createPersonalizationStore.js.map +1 -1
  354. package/dist/esm/v2/personalization/index.js +35 -0
  355. package/dist/esm/v2/personalization/index.js.map +1 -1
  356. package/dist/esm/v2/personalization/personalizationContext.js +9 -9
  357. package/dist/esm/v2/personalization/personalizationContext.js.map +1 -1
  358. package/dist/esm/v2/personalization/schema.js +8 -9
  359. package/dist/esm/v2/personalization/schema.js.map +1 -1
  360. package/dist/esm/v2/referentiel/ReferentielProvider.js +27 -42
  361. package/dist/esm/v2/referentiel/ReferentielProvider.js.map +1 -1
  362. package/dist/esm/v2/referentiel/types.js +2 -0
  363. package/dist/esm/v2/referentiel/types.js.map +1 -0
  364. package/dist/esm/v2/referentiel/useReferentielClient.js +10 -11
  365. package/dist/esm/v2/referentiel/useReferentielClient.js.map +1 -1
  366. package/dist/esm/v2/referentiel/useReferentielOptions.js +60 -117
  367. package/dist/esm/v2/referentiel/useReferentielOptions.js.map +1 -1
  368. package/dist/esm/v2/referentiel/useReferentielSearch.js +37 -91
  369. package/dist/esm/v2/referentiel/useReferentielSearch.js.map +1 -1
  370. package/dist/esm/v2/theme/_brand.js +8 -24
  371. package/dist/esm/v2/theme/_brand.js.map +1 -1
  372. package/dist/esm/v2/theme/_brandSecondary.js +8 -24
  373. package/dist/esm/v2/theme/_brandSecondary.js.map +1 -1
  374. package/dist/esm/v2/theme/createPortnetTheme.js +51 -61
  375. package/dist/esm/v2/theme/createPortnetTheme.js.map +1 -1
  376. package/dist/esm/v2/theme/cssVariables.js +62 -69
  377. package/dist/esm/v2/theme/cssVariables.js.map +1 -1
  378. package/dist/esm/v2/theme/index.js +5 -5
  379. package/dist/esm/v2/theme/index.js.map +1 -1
  380. package/dist/esm/v2/tokens/breakpoints.js +14 -14
  381. package/dist/esm/v2/tokens/breakpoints.js.map +1 -1
  382. package/dist/esm/v2/tokens/chart.js +261 -0
  383. package/dist/esm/v2/tokens/chart.js.map +1 -0
  384. package/dist/esm/v2/tokens/colors.js +22 -22
  385. package/dist/esm/v2/tokens/colors.js.map +1 -1
  386. package/dist/esm/v2/tokens/density.js +62 -7
  387. package/dist/esm/v2/tokens/density.js.map +1 -1
  388. package/dist/esm/v2/tokens/index.js +49 -34
  389. package/dist/esm/v2/tokens/index.js.map +1 -1
  390. package/dist/esm/v2/tokens/motion.js +12 -20
  391. package/dist/esm/v2/tokens/motion.js.map +1 -1
  392. package/dist/esm/v2/tokens/radius.js +1 -1
  393. package/dist/esm/v2/tokens/radius.js.map +1 -1
  394. package/dist/esm/v2/tokens/shadows.js +6 -6
  395. package/dist/esm/v2/tokens/shadows.js.map +1 -1
  396. package/dist/esm/v2/tokens/spacing.js +2 -2
  397. package/dist/esm/v2/tokens/spacing.js.map +1 -1
  398. package/dist/esm/v2/tokens/state.js +1 -1
  399. package/dist/esm/v2/tokens/state.js.map +1 -1
  400. package/dist/esm/v2/tokens/statusPalette.js +17 -21
  401. package/dist/esm/v2/tokens/statusPalette.js.map +1 -1
  402. package/dist/esm/v2/tokens/tokens.json +6 -1
  403. package/dist/esm/v2/tokens/typography.js +13 -13
  404. package/dist/esm/v2/tokens/typography.js.map +1 -1
  405. package/dist/esm/v2/tokens/zIndex.js +1 -1
  406. package/dist/esm/v2/tokens/zIndex.js.map +1 -1
  407. package/dist/esm/v2/types/datagrid.js.map +1 -1
  408. package/dist/esm/v2/utils/apiError.js +16 -37
  409. package/dist/esm/v2/utils/apiError.js.map +1 -1
  410. package/dist/esm/v2/utils/contrast.js +31 -32
  411. package/dist/esm/v2/utils/contrast.js.map +1 -1
  412. package/dist/esm/v2/utils/cx.js +5 -25
  413. package/dist/esm/v2/utils/cx.js.map +1 -1
  414. package/dist/esm/v2/utils/fileDownload.js +23 -26
  415. package/dist/esm/v2/utils/fileDownload.js.map +1 -1
  416. package/dist/esm/v2/utils/fileValidation.js +209 -0
  417. package/dist/esm/v2/utils/fileValidation.js.map +1 -0
  418. package/dist/esm/v2/utils/fmtDate.js +111 -0
  419. package/dist/esm/v2/utils/fmtDate.js.map +1 -0
  420. package/dist/esm/v2/utils/fmtMoney.js +8 -10
  421. package/dist/esm/v2/utils/fmtMoney.js.map +1 -1
  422. package/dist/esm/v2/utils/formikErrors.js +78 -0
  423. package/dist/esm/v2/utils/formikErrors.js.map +1 -0
  424. package/dist/esm/v2/utils/index.js +35 -2
  425. package/dist/esm/v2/utils/index.js.map +1 -1
  426. package/dist/esm/v2/utils/mergeLabels.js +7 -12
  427. package/dist/esm/v2/utils/mergeLabels.js.map +1 -1
  428. package/dist/esm/v2/utils/networkStatus.js +12 -12
  429. package/dist/esm/v2/utils/networkStatus.js.map +1 -1
  430. package/dist/index.d.ts +9 -1
  431. package/dist/index.d.ts.map +1 -1
  432. package/dist/index.js +122 -47
  433. package/dist/index.js.map +1 -1
  434. package/dist/v2/__tests__/AppMain.test.js +133 -0
  435. package/dist/v2/__tests__/AppMain.test.js.map +1 -0
  436. package/dist/v2/__tests__/ChartFigure.test.js +183 -0
  437. package/dist/v2/__tests__/ChartFigure.test.js.map +1 -0
  438. package/dist/v2/__tests__/DataGridRowActionsPropagation.test.js +153 -0
  439. package/dist/v2/__tests__/DataGridRowActionsPropagation.test.js.map +1 -0
  440. package/dist/v2/__tests__/DrawerTactileTargets.test.js +94 -0
  441. package/dist/v2/__tests__/DrawerTactileTargets.test.js.map +1 -0
  442. package/dist/v2/__tests__/FieldError.test.js +98 -69
  443. package/dist/v2/__tests__/FieldError.test.js.map +1 -1
  444. package/dist/v2/__tests__/FieldNaming.test.js +161 -0
  445. package/dist/v2/__tests__/FieldNaming.test.js.map +1 -0
  446. package/dist/v2/__tests__/FieldWidth.test.js +148 -0
  447. package/dist/v2/__tests__/FieldWidth.test.js.map +1 -0
  448. package/dist/v2/__tests__/FileCard.test.js +45 -48
  449. package/dist/v2/__tests__/FileCard.test.js.map +1 -1
  450. package/dist/v2/__tests__/FormikCheckbox.test.js +175 -0
  451. package/dist/v2/__tests__/FormikCheckbox.test.js.map +1 -0
  452. package/dist/v2/__tests__/FormikDateTimePicker.test.js +237 -0
  453. package/dist/v2/__tests__/FormikDateTimePicker.test.js.map +1 -0
  454. package/dist/v2/__tests__/FormikDisplayWidth.test.js +102 -0
  455. package/dist/v2/__tests__/FormikDisplayWidth.test.js.map +1 -0
  456. package/dist/v2/__tests__/FormikRadioGroup.test.js +300 -0
  457. package/dist/v2/__tests__/FormikRadioGroup.test.js.map +1 -0
  458. package/dist/v2/__tests__/MobileRowCard.test.js +100 -102
  459. package/dist/v2/__tests__/MobileRowCard.test.js.map +1 -1
  460. package/dist/v2/__tests__/PreviewDrawer.test.js +169 -0
  461. package/dist/v2/__tests__/PreviewDrawer.test.js.map +1 -0
  462. package/dist/v2/__tests__/ReferentielFieldContainer.test.js +159 -0
  463. package/dist/v2/__tests__/ReferentielFieldContainer.test.js.map +1 -0
  464. package/dist/v2/__tests__/SectionErrorBoundary.test.js +53 -68
  465. package/dist/v2/__tests__/SectionErrorBoundary.test.js.map +1 -1
  466. package/dist/v2/__tests__/apiError.test.js +50 -69
  467. package/dist/v2/__tests__/apiError.test.js.map +1 -1
  468. package/dist/v2/__tests__/banned-patterns.test.js +42 -123
  469. package/dist/v2/__tests__/banned-patterns.test.js.map +1 -1
  470. package/dist/v2/__tests__/chart-palette.test.js +205 -0
  471. package/dist/v2/__tests__/chart-palette.test.js.map +1 -0
  472. package/dist/v2/__tests__/contrast-palette.test.js +42 -74
  473. package/dist/v2/__tests__/contrast-palette.test.js.map +1 -1
  474. package/dist/v2/__tests__/cssVariables.test.js +44 -51
  475. package/dist/v2/__tests__/cssVariables.test.js.map +1 -1
  476. package/dist/v2/__tests__/fileValidation.test.js +136 -0
  477. package/dist/v2/__tests__/fileValidation.test.js.map +1 -0
  478. package/dist/v2/__tests__/filterCriteria.test.js +324 -0
  479. package/dist/v2/__tests__/filterCriteria.test.js.map +1 -0
  480. package/dist/v2/__tests__/fmtDate.test.js +69 -0
  481. package/dist/v2/__tests__/fmtDate.test.js.map +1 -0
  482. package/dist/v2/__tests__/gap-leakage-refonte.test.js +221 -0
  483. package/dist/v2/__tests__/gap-leakage-refonte.test.js.map +1 -0
  484. package/dist/v2/__tests__/labels-merge.test.js +38 -46
  485. package/dist/v2/__tests__/labels-merge.test.js.map +1 -1
  486. package/dist/v2/__tests__/locale-fallback.test.js +47 -52
  487. package/dist/v2/__tests__/locale-fallback.test.js.map +1 -1
  488. package/dist/v2/__tests__/reviveSavedCriteria.test.js +144 -0
  489. package/dist/v2/__tests__/reviveSavedCriteria.test.js.map +1 -0
  490. package/dist/v2/__tests__/rowActions.test.js +186 -0
  491. package/dist/v2/__tests__/rowActions.test.js.map +1 -0
  492. package/dist/v2/__tests__/useFocusOnRouteChange.test.js +156 -0
  493. package/dist/v2/__tests__/useFocusOnRouteChange.test.js.map +1 -0
  494. package/dist/v2/__tests__/useFocusTrap.test.js +270 -407
  495. package/dist/v2/__tests__/useFocusTrap.test.js.map +1 -1
  496. package/dist/v2/__tests__/usePrefersReducedMotion.test.js +123 -0
  497. package/dist/v2/__tests__/usePrefersReducedMotion.test.js.map +1 -0
  498. package/dist/v2/components/Accordion.js +60 -82
  499. package/dist/v2/components/Accordion.js.map +1 -1
  500. package/dist/v2/components/ActionStrip.js +40 -52
  501. package/dist/v2/components/ActionStrip.js.map +1 -1
  502. package/dist/v2/components/Banner.js +42 -41
  503. package/dist/v2/components/Banner.js.map +1 -1
  504. package/dist/v2/components/Busy.js +22 -27
  505. package/dist/v2/components/Busy.js.map +1 -1
  506. package/dist/v2/components/Button.js +39 -50
  507. package/dist/v2/components/Button.js.map +1 -1
  508. package/dist/v2/components/CategoryTag.d.ts.map +1 -1
  509. package/dist/v2/components/CategoryTag.js +49 -32
  510. package/dist/v2/components/CategoryTag.js.map +1 -1
  511. package/dist/v2/components/Checkbox.js +39 -45
  512. package/dist/v2/components/Checkbox.js.map +1 -1
  513. package/dist/v2/components/Chip.js +29 -42
  514. package/dist/v2/components/Chip.js.map +1 -1
  515. package/dist/v2/components/Combobox.js +122 -144
  516. package/dist/v2/components/Combobox.js.map +1 -1
  517. package/dist/v2/components/CommandPalette.js +138 -225
  518. package/dist/v2/components/CommandPalette.js.map +1 -1
  519. package/dist/v2/components/ConfirmDialog.js +46 -56
  520. package/dist/v2/components/ConfirmDialog.js.map +1 -1
  521. package/dist/v2/components/DatePicker.js +81 -86
  522. package/dist/v2/components/DatePicker.js.map +1 -1
  523. package/dist/v2/components/DateRangePicker.js +77 -87
  524. package/dist/v2/components/DateRangePicker.js.map +1 -1
  525. package/dist/v2/components/DateTimePicker.d.ts.map +1 -1
  526. package/dist/v2/components/DateTimePicker.js +121 -95
  527. package/dist/v2/components/DateTimePicker.js.map +1 -1
  528. package/dist/v2/components/Drawer.d.ts.map +1 -1
  529. package/dist/v2/components/Drawer.js +93 -88
  530. package/dist/v2/components/Drawer.js.map +1 -1
  531. package/dist/v2/components/Dropzone.js +150 -196
  532. package/dist/v2/components/Dropzone.js.map +1 -1
  533. package/dist/v2/components/EmptyState.js +18 -20
  534. package/dist/v2/components/EmptyState.js.map +1 -1
  535. package/dist/v2/components/FavoriteToggle.js +28 -39
  536. package/dist/v2/components/FavoriteToggle.js.map +1 -1
  537. package/dist/v2/components/Field.d.ts +121 -5
  538. package/dist/v2/components/Field.d.ts.map +1 -1
  539. package/dist/v2/components/Field.js +221 -62
  540. package/dist/v2/components/Field.js.map +1 -1
  541. package/dist/v2/components/FieldError.js +18 -21
  542. package/dist/v2/components/FieldError.js.map +1 -1
  543. package/dist/v2/components/FieldHelp.js +40 -60
  544. package/dist/v2/components/FieldHelp.js.map +1 -1
  545. package/dist/v2/components/FileCard.js +27 -31
  546. package/dist/v2/components/FileCard.js.map +1 -1
  547. package/dist/v2/components/FilterTab.js +30 -38
  548. package/dist/v2/components/FilterTab.js.map +1 -1
  549. package/dist/v2/components/ForbiddenPage.d.ts +25 -1
  550. package/dist/v2/components/ForbiddenPage.d.ts.map +1 -1
  551. package/dist/v2/components/ForbiddenPage.js +37 -17
  552. package/dist/v2/components/ForbiddenPage.js.map +1 -1
  553. package/dist/v2/components/FormGrid.js +53 -59
  554. package/dist/v2/components/FormGrid.js.map +1 -1
  555. package/dist/v2/components/FormikDisplay.d.ts +50 -1
  556. package/dist/v2/components/FormikDisplay.d.ts.map +1 -1
  557. package/dist/v2/components/FormikDisplay.js +108 -33
  558. package/dist/v2/components/FormikDisplay.js.map +1 -1
  559. package/dist/v2/components/Input.d.ts +40 -0
  560. package/dist/v2/components/Input.d.ts.map +1 -1
  561. package/dist/v2/components/Input.js +81 -41
  562. package/dist/v2/components/Input.js.map +1 -1
  563. package/dist/v2/components/KPICard.js +57 -67
  564. package/dist/v2/components/KPICard.js.map +1 -1
  565. package/dist/v2/components/KPIStrip.js +16 -22
  566. package/dist/v2/components/KPIStrip.js.map +1 -1
  567. package/dist/v2/components/KV.js +25 -31
  568. package/dist/v2/components/KV.js.map +1 -1
  569. package/dist/v2/components/KVGrid.js +19 -26
  570. package/dist/v2/components/KVGrid.js.map +1 -1
  571. package/dist/v2/components/Layout.js +91 -120
  572. package/dist/v2/components/Layout.js.map +1 -1
  573. package/dist/v2/components/MobileRowCard.js +79 -91
  574. package/dist/v2/components/MobileRowCard.js.map +1 -1
  575. package/dist/v2/components/Modal.js +61 -69
  576. package/dist/v2/components/Modal.js.map +1 -1
  577. package/dist/v2/components/NetworkErrorPage.d.ts +19 -1
  578. package/dist/v2/components/NetworkErrorPage.d.ts.map +1 -1
  579. package/dist/v2/components/NetworkErrorPage.js +38 -21
  580. package/dist/v2/components/NetworkErrorPage.js.map +1 -1
  581. package/dist/v2/components/NotFoundPage.d.ts +17 -1
  582. package/dist/v2/components/NotFoundPage.d.ts.map +1 -1
  583. package/dist/v2/components/NotFoundPage.js +37 -18
  584. package/dist/v2/components/NotFoundPage.js.map +1 -1
  585. package/dist/v2/components/NumberInput.js +88 -118
  586. package/dist/v2/components/NumberInput.js.map +1 -1
  587. package/dist/v2/components/OverflowMenu.js +38 -56
  588. package/dist/v2/components/OverflowMenu.js.map +1 -1
  589. package/dist/v2/components/PdfViewer.js +34 -45
  590. package/dist/v2/components/PdfViewer.js.map +1 -1
  591. package/dist/v2/components/ProgressBar.js +42 -49
  592. package/dist/v2/components/ProgressBar.js.map +1 -1
  593. package/dist/v2/components/Radio.js +59 -67
  594. package/dist/v2/components/Radio.js.map +1 -1
  595. package/dist/v2/components/SectionErrorBoundary.js +90 -135
  596. package/dist/v2/components/SectionErrorBoundary.js.map +1 -1
  597. package/dist/v2/components/SectionHeader.js +34 -41
  598. package/dist/v2/components/SectionHeader.js.map +1 -1
  599. package/dist/v2/components/Segmented.js +69 -93
  600. package/dist/v2/components/Segmented.js.map +1 -1
  601. package/dist/v2/components/Select.d.ts +26 -2
  602. package/dist/v2/components/Select.d.ts.map +1 -1
  603. package/dist/v2/components/Select.js +120 -155
  604. package/dist/v2/components/Select.js.map +1 -1
  605. package/dist/v2/components/ServerErrorPage.d.ts +27 -1
  606. package/dist/v2/components/ServerErrorPage.d.ts.map +1 -1
  607. package/dist/v2/components/ServerErrorPage.js +37 -20
  608. package/dist/v2/components/ServerErrorPage.js.map +1 -1
  609. package/dist/v2/components/Skeleton.js +86 -100
  610. package/dist/v2/components/Skeleton.js.map +1 -1
  611. package/dist/v2/components/SkipLink.js +9 -12
  612. package/dist/v2/components/SkipLink.js.map +1 -1
  613. package/dist/v2/components/Spinner.js +16 -25
  614. package/dist/v2/components/Spinner.js.map +1 -1
  615. package/dist/v2/components/Status.js +18 -29
  616. package/dist/v2/components/Status.js.map +1 -1
  617. package/dist/v2/components/Stepper.js +80 -82
  618. package/dist/v2/components/Stepper.js.map +1 -1
  619. package/dist/v2/components/Surface.js +34 -49
  620. package/dist/v2/components/Surface.js.map +1 -1
  621. package/dist/v2/components/Switch.js +29 -37
  622. package/dist/v2/components/Switch.js.map +1 -1
  623. package/dist/v2/components/TabPanel.d.ts +17 -0
  624. package/dist/v2/components/TabPanel.d.ts.map +1 -0
  625. package/dist/v2/components/TabPanel.js +90 -0
  626. package/dist/v2/components/TabPanel.js.map +1 -0
  627. package/dist/v2/components/Tabs.d.ts +25 -0
  628. package/dist/v2/components/Tabs.d.ts.map +1 -1
  629. package/dist/v2/components/Tabs.js +53 -29
  630. package/dist/v2/components/Tabs.js.map +1 -1
  631. package/dist/v2/components/TelInput.js +80 -115
  632. package/dist/v2/components/TelInput.js.map +1 -1
  633. package/dist/v2/components/Textarea.js +26 -35
  634. package/dist/v2/components/Textarea.js.map +1 -1
  635. package/dist/v2/components/TimePicker.js +62 -74
  636. package/dist/v2/components/TimePicker.js.map +1 -1
  637. package/dist/v2/components/Toast.js +119 -174
  638. package/dist/v2/components/Toast.js.map +1 -1
  639. package/dist/v2/components/Tooltip.js +23 -38
  640. package/dist/v2/components/Tooltip.js.map +1 -1
  641. package/dist/v2/components/_ErrorPageBody.js +15 -16
  642. package/dist/v2/components/_ErrorPageBody.js.map +1 -1
  643. package/dist/v2/components/_pickerShared.js +5 -5
  644. package/dist/v2/components/_pickerShared.js.map +1 -1
  645. package/dist/v2/components/index.d.ts +67 -1
  646. package/dist/v2/components/index.d.ts.map +1 -1
  647. package/dist/v2/components/index.js +153 -136
  648. package/dist/v2/components/index.js.map +1 -1
  649. package/dist/v2/hooks/index.d.ts +65 -0
  650. package/dist/v2/hooks/index.d.ts.map +1 -1
  651. package/dist/v2/hooks/index.js +63 -24
  652. package/dist/v2/hooks/index.js.map +1 -1
  653. package/dist/v2/hooks/useAppliedFilters.d.ts +102 -0
  654. package/dist/v2/hooks/useAppliedFilters.d.ts.map +1 -0
  655. package/dist/v2/hooks/useAppliedFilters.js +117 -0
  656. package/dist/v2/hooks/useAppliedFilters.js.map +1 -0
  657. package/dist/v2/hooks/useDebouncedCallback.d.ts +64 -0
  658. package/dist/v2/hooks/useDebouncedCallback.d.ts.map +1 -0
  659. package/dist/v2/hooks/useDebouncedCallback.js +87 -0
  660. package/dist/v2/hooks/useDebouncedCallback.js.map +1 -0
  661. package/dist/v2/hooks/useDelayedFlag.js +6 -20
  662. package/dist/v2/hooks/useDelayedFlag.js.map +1 -1
  663. package/dist/v2/hooks/useDensity.d.ts.map +1 -1
  664. package/dist/v2/hooks/useDensity.js +14 -18
  665. package/dist/v2/hooks/useDensity.js.map +1 -1
  666. package/dist/v2/hooks/useFocusFirstError.js +26 -34
  667. package/dist/v2/hooks/useFocusFirstError.js.map +1 -1
  668. package/dist/v2/hooks/useFocusOnRouteChange.d.ts +65 -0
  669. package/dist/v2/hooks/useFocusOnRouteChange.d.ts.map +1 -0
  670. package/dist/v2/hooks/useFocusOnRouteChange.js +88 -0
  671. package/dist/v2/hooks/useFocusOnRouteChange.js.map +1 -0
  672. package/dist/v2/hooks/useFocusTrap.js +20 -24
  673. package/dist/v2/hooks/useFocusTrap.js.map +1 -1
  674. package/dist/v2/hooks/useFormAutoSave.d.ts +4 -4
  675. package/dist/v2/hooks/useFormAutoSave.d.ts.map +1 -1
  676. package/dist/v2/hooks/useFormAutoSave.js +39 -54
  677. package/dist/v2/hooks/useFormAutoSave.js.map +1 -1
  678. package/dist/v2/hooks/useFormCompletionProgress.d.ts +1 -1
  679. package/dist/v2/hooks/useFormCompletionProgress.d.ts.map +1 -1
  680. package/dist/v2/hooks/useFormCompletionProgress.js +33 -52
  681. package/dist/v2/hooks/useFormCompletionProgress.js.map +1 -1
  682. package/dist/v2/hooks/useKeyboardShortcuts.d.ts +25 -0
  683. package/dist/v2/hooks/useKeyboardShortcuts.d.ts.map +1 -0
  684. package/dist/v2/hooks/useKeyboardShortcuts.js +132 -0
  685. package/dist/v2/hooks/useKeyboardShortcuts.js.map +1 -0
  686. package/dist/v2/hooks/usePrefersReducedMotion.d.ts +56 -0
  687. package/dist/v2/hooks/usePrefersReducedMotion.d.ts.map +1 -0
  688. package/dist/v2/hooks/usePrefersReducedMotion.js +105 -0
  689. package/dist/v2/hooks/usePrefersReducedMotion.js.map +1 -0
  690. package/dist/v2/hooks/useResolvedDensity.js +5 -13
  691. package/dist/v2/hooks/useResolvedDensity.js.map +1 -1
  692. package/dist/v2/hooks/useSortedRows.js +4 -6
  693. package/dist/v2/hooks/useSortedRows.js.map +1 -1
  694. package/dist/v2/hooks/useTabLoading.js +7 -22
  695. package/dist/v2/hooks/useTabLoading.js.map +1 -1
  696. package/dist/v2/index.d.ts.map +1 -1
  697. package/dist/v2/index.js +143 -145
  698. package/dist/v2/index.js.map +1 -1
  699. package/dist/v2/modalContext.js +2 -2
  700. package/dist/v2/modalContext.js.map +1 -1
  701. package/dist/v2/models/favorite.d.ts +8 -9
  702. package/dist/v2/models/favorite.d.ts.map +1 -1
  703. package/dist/v2/models/favorite.js.map +1 -1
  704. package/dist/v2/models/index.js +4 -4
  705. package/dist/v2/models/index.js.map +1 -1
  706. package/dist/v2/models/personalization.d.ts +44 -48
  707. package/dist/v2/models/personalization.d.ts.map +1 -1
  708. package/dist/v2/models/personalization.js.map +1 -1
  709. package/dist/v2/models/referentiel.d.ts +32 -50
  710. package/dist/v2/models/referentiel.d.ts.map +1 -1
  711. package/dist/v2/models/referentiel.js.map +1 -1
  712. package/dist/v2/models/savedFilter.d.ts +8 -17
  713. package/dist/v2/models/savedFilter.d.ts.map +1 -1
  714. package/dist/v2/models/savedFilter.js.map +1 -1
  715. package/dist/v2/patterns/ActionBar.js +152 -187
  716. package/dist/v2/patterns/ActionBar.js.map +1 -1
  717. package/dist/v2/patterns/AppMain.d.ts +109 -0
  718. package/dist/v2/patterns/AppMain.d.ts.map +1 -0
  719. package/dist/v2/patterns/AppMain.js +115 -0
  720. package/dist/v2/patterns/AppMain.js.map +1 -0
  721. package/dist/v2/patterns/BulkActionBar.js +40 -42
  722. package/dist/v2/patterns/BulkActionBar.js.map +1 -1
  723. package/dist/v2/patterns/ChartFigure.d.ts +124 -0
  724. package/dist/v2/patterns/ChartFigure.d.ts.map +1 -0
  725. package/dist/v2/patterns/ChartFigure.js +159 -0
  726. package/dist/v2/patterns/ChartFigure.js.map +1 -0
  727. package/dist/v2/patterns/CollapsibleDataGrid.js +138 -174
  728. package/dist/v2/patterns/CollapsibleDataGrid.js.map +1 -1
  729. package/dist/v2/patterns/ColumnsToggle.js +60 -94
  730. package/dist/v2/patterns/ColumnsToggle.js.map +1 -1
  731. package/dist/v2/patterns/DataGrid.d.ts.map +1 -1
  732. package/dist/v2/patterns/DataGrid.js +262 -297
  733. package/dist/v2/patterns/DataGrid.js.map +1 -1
  734. package/dist/v2/patterns/DataGridSettingsMenu.d.ts +12 -0
  735. package/dist/v2/patterns/DataGridSettingsMenu.d.ts.map +1 -1
  736. package/dist/v2/patterns/DataGridSettingsMenu.js +104 -121
  737. package/dist/v2/patterns/DataGridSettingsMenu.js.map +1 -1
  738. package/dist/v2/patterns/DataGridToolbar.js +103 -106
  739. package/dist/v2/patterns/DataGridToolbar.js.map +1 -1
  740. package/dist/v2/patterns/DataGridVirtualized.js +179 -217
  741. package/dist/v2/patterns/DataGridVirtualized.js.map +1 -1
  742. package/dist/v2/patterns/DeleteResourceConfirmDialog.js +32 -35
  743. package/dist/v2/patterns/DeleteResourceConfirmDialog.js.map +1 -1
  744. package/dist/v2/patterns/DetailSplit.d.ts +87 -0
  745. package/dist/v2/patterns/DetailSplit.d.ts.map +1 -0
  746. package/dist/v2/patterns/DetailSplit.js +116 -0
  747. package/dist/v2/patterns/DetailSplit.js.map +1 -0
  748. package/dist/v2/patterns/FavoriteColumn.d.ts +9 -9
  749. package/dist/v2/patterns/FavoriteColumn.d.ts.map +1 -1
  750. package/dist/v2/patterns/FavoriteColumn.js +32 -80
  751. package/dist/v2/patterns/FavoriteColumn.js.map +1 -1
  752. package/dist/v2/patterns/FavoritesFilter.js +36 -44
  753. package/dist/v2/patterns/FavoritesFilter.js.map +1 -1
  754. package/dist/v2/patterns/FilterTabBar.d.ts +28 -0
  755. package/dist/v2/patterns/FilterTabBar.d.ts.map +1 -0
  756. package/dist/v2/patterns/FilterTabBar.js +120 -0
  757. package/dist/v2/patterns/FilterTabBar.js.map +1 -0
  758. package/dist/v2/patterns/FormErrorSummary.js +20 -23
  759. package/dist/v2/patterns/FormErrorSummary.js.map +1 -1
  760. package/dist/v2/patterns/FormPageShell.js +53 -50
  761. package/dist/v2/patterns/FormPageShell.js.map +1 -1
  762. package/dist/v2/patterns/FormSection.d.ts +8 -3
  763. package/dist/v2/patterns/FormSection.d.ts.map +1 -1
  764. package/dist/v2/patterns/FormSection.js +44 -51
  765. package/dist/v2/patterns/FormSection.js.map +1 -1
  766. package/dist/v2/patterns/FormikCheckbox.d.ts +77 -0
  767. package/dist/v2/patterns/FormikCheckbox.d.ts.map +1 -0
  768. package/dist/v2/patterns/FormikCheckbox.js +138 -0
  769. package/dist/v2/patterns/FormikCheckbox.js.map +1 -0
  770. package/dist/v2/patterns/FormikCheckboxGroup.d.ts +17 -1
  771. package/dist/v2/patterns/FormikCheckboxGroup.d.ts.map +1 -1
  772. package/dist/v2/patterns/FormikCheckboxGroup.js +62 -65
  773. package/dist/v2/patterns/FormikCheckboxGroup.js.map +1 -1
  774. package/dist/v2/patterns/FormikCombobox.d.ts +7 -1
  775. package/dist/v2/patterns/FormikCombobox.d.ts.map +1 -1
  776. package/dist/v2/patterns/FormikCombobox.js +55 -69
  777. package/dist/v2/patterns/FormikCombobox.js.map +1 -1
  778. package/dist/v2/patterns/FormikDatePicker.d.ts +13 -1
  779. package/dist/v2/patterns/FormikDatePicker.d.ts.map +1 -1
  780. package/dist/v2/patterns/FormikDatePicker.js +59 -106
  781. package/dist/v2/patterns/FormikDatePicker.js.map +1 -1
  782. package/dist/v2/patterns/FormikDateTimePicker.d.ts +111 -0
  783. package/dist/v2/patterns/FormikDateTimePicker.d.ts.map +1 -0
  784. package/dist/v2/patterns/FormikDateTimePicker.js +144 -0
  785. package/dist/v2/patterns/FormikDateTimePicker.js.map +1 -0
  786. package/dist/v2/patterns/FormikErrorFocus.js +25 -26
  787. package/dist/v2/patterns/FormikErrorFocus.js.map +1 -1
  788. package/dist/v2/patterns/FormikErrorSummary.d.ts +74 -0
  789. package/dist/v2/patterns/FormikErrorSummary.d.ts.map +1 -0
  790. package/dist/v2/patterns/FormikErrorSummary.js +97 -0
  791. package/dist/v2/patterns/FormikErrorSummary.js.map +1 -0
  792. package/dist/v2/patterns/FormikFile.d.ts +14 -1
  793. package/dist/v2/patterns/FormikFile.d.ts.map +1 -1
  794. package/dist/v2/patterns/FormikFile.js +99 -83
  795. package/dist/v2/patterns/FormikFile.js.map +1 -1
  796. package/dist/v2/patterns/FormikInput.d.ts +11 -1
  797. package/dist/v2/patterns/FormikInput.d.ts.map +1 -1
  798. package/dist/v2/patterns/FormikInput.js +45 -55
  799. package/dist/v2/patterns/FormikInput.js.map +1 -1
  800. package/dist/v2/patterns/FormikRadioGroup.d.ts +80 -0
  801. package/dist/v2/patterns/FormikRadioGroup.d.ts.map +1 -0
  802. package/dist/v2/patterns/FormikRadioGroup.js +137 -0
  803. package/dist/v2/patterns/FormikRadioGroup.js.map +1 -0
  804. package/dist/v2/patterns/FormikReferentielField.d.ts +12 -1
  805. package/dist/v2/patterns/FormikReferentielField.d.ts.map +1 -1
  806. package/dist/v2/patterns/FormikReferentielField.js +54 -64
  807. package/dist/v2/patterns/FormikReferentielField.js.map +1 -1
  808. package/dist/v2/patterns/FormikSelect.d.ts +9 -1
  809. package/dist/v2/patterns/FormikSelect.d.ts.map +1 -1
  810. package/dist/v2/patterns/FormikSelect.js +70 -89
  811. package/dist/v2/patterns/FormikSelect.js.map +1 -1
  812. package/dist/v2/patterns/FormikTextarea.d.ts +9 -1
  813. package/dist/v2/patterns/FormikTextarea.d.ts.map +1 -1
  814. package/dist/v2/patterns/FormikTextarea.js +35 -48
  815. package/dist/v2/patterns/FormikTextarea.js.map +1 -1
  816. package/dist/v2/patterns/KeyboardShortcutsHelp.d.ts +14 -1
  817. package/dist/v2/patterns/KeyboardShortcutsHelp.d.ts.map +1 -1
  818. package/dist/v2/patterns/KeyboardShortcutsHelp.js +71 -74
  819. package/dist/v2/patterns/KeyboardShortcutsHelp.js.map +1 -1
  820. package/dist/v2/patterns/NetworkErrorBanner.js +13 -16
  821. package/dist/v2/patterns/NetworkErrorBanner.js.map +1 -1
  822. package/dist/v2/patterns/PageContent.js +17 -20
  823. package/dist/v2/patterns/PageContent.js.map +1 -1
  824. package/dist/v2/patterns/PreviewDrawer.d.ts +49 -0
  825. package/dist/v2/patterns/PreviewDrawer.d.ts.map +1 -0
  826. package/dist/v2/patterns/PreviewDrawer.js +159 -0
  827. package/dist/v2/patterns/PreviewDrawer.js.map +1 -0
  828. package/dist/v2/patterns/ReferentielField.d.ts +86 -2
  829. package/dist/v2/patterns/ReferentielField.d.ts.map +1 -1
  830. package/dist/v2/patterns/ReferentielField.js +347 -327
  831. package/dist/v2/patterns/ReferentielField.js.map +1 -1
  832. package/dist/v2/patterns/RowFavoriteToggle.d.ts +98 -0
  833. package/dist/v2/patterns/RowFavoriteToggle.d.ts.map +1 -0
  834. package/dist/v2/patterns/RowFavoriteToggle.js +135 -0
  835. package/dist/v2/patterns/RowFavoriteToggle.js.map +1 -0
  836. package/dist/v2/patterns/SaveFilterDialog.js +50 -77
  837. package/dist/v2/patterns/SaveFilterDialog.js.map +1 -1
  838. package/dist/v2/patterns/SavedFiltersMenu.js +89 -107
  839. package/dist/v2/patterns/SavedFiltersMenu.js.map +1 -1
  840. package/dist/v2/patterns/SkeletonPageShell.js +122 -143
  841. package/dist/v2/patterns/SkeletonPageShell.js.map +1 -1
  842. package/dist/v2/patterns/SortableHeader.js +35 -57
  843. package/dist/v2/patterns/SortableHeader.js.map +1 -1
  844. package/dist/v2/patterns/Tour.js +121 -142
  845. package/dist/v2/patterns/Tour.js.map +1 -1
  846. package/dist/v2/patterns/_dataGridShared.d.ts.map +1 -1
  847. package/dist/v2/patterns/_dataGridShared.js +131 -147
  848. package/dist/v2/patterns/_dataGridShared.js.map +1 -1
  849. package/dist/v2/patterns/_pickerSerialisation.d.ts +44 -0
  850. package/dist/v2/patterns/_pickerSerialisation.d.ts.map +1 -0
  851. package/dist/v2/patterns/_pickerSerialisation.js +80 -0
  852. package/dist/v2/patterns/_pickerSerialisation.js.map +1 -0
  853. package/dist/v2/patterns/_sort.js +17 -33
  854. package/dist/v2/patterns/_sort.js.map +1 -1
  855. package/dist/v2/patterns/_useColumnReorder.js +124 -163
  856. package/dist/v2/patterns/_useColumnReorder.js.map +1 -1
  857. package/dist/v2/patterns/_useColumnResize.js +80 -99
  858. package/dist/v2/patterns/_useColumnResize.js.map +1 -1
  859. package/dist/v2/patterns/filterCriteria.d.ts +78 -0
  860. package/dist/v2/patterns/filterCriteria.d.ts.map +1 -0
  861. package/dist/v2/patterns/filterCriteria.js +110 -0
  862. package/dist/v2/patterns/filterCriteria.js.map +1 -0
  863. package/dist/v2/patterns/index.d.ts +247 -0
  864. package/dist/v2/patterns/index.d.ts.map +1 -1
  865. package/dist/v2/patterns/index.js +182 -70
  866. package/dist/v2/patterns/index.js.map +1 -1
  867. package/dist/v2/patterns/rowActions.d.ts +150 -0
  868. package/dist/v2/patterns/rowActions.d.ts.map +1 -0
  869. package/dist/v2/patterns/rowActions.js +232 -0
  870. package/dist/v2/patterns/rowActions.js.map +1 -0
  871. package/dist/v2/personalization/PersonalizationProvider.d.ts.map +1 -1
  872. package/dist/v2/personalization/PersonalizationProvider.js +57 -53
  873. package/dist/v2/personalization/PersonalizationProvider.js.map +1 -1
  874. package/dist/v2/personalization/adapters/_storageKey.js +5 -5
  875. package/dist/v2/personalization/adapters/_storageKey.js.map +1 -1
  876. package/dist/v2/personalization/adapters/createLocalStorageAdapter.js +25 -24
  877. package/dist/v2/personalization/adapters/createLocalStorageAdapter.js.map +1 -1
  878. package/dist/v2/personalization/adapters/createMemoryAdapter.js +14 -14
  879. package/dist/v2/personalization/adapters/createMemoryAdapter.js.map +1 -1
  880. package/dist/v2/personalization/adapters/index.js +5 -5
  881. package/dist/v2/personalization/adapters/index.js.map +1 -1
  882. package/dist/v2/personalization/capabilities/favorites.js +39 -62
  883. package/dist/v2/personalization/capabilities/favorites.js.map +1 -1
  884. package/dist/v2/personalization/capabilities/favoritesView.js +25 -37
  885. package/dist/v2/personalization/capabilities/favoritesView.js.map +1 -1
  886. package/dist/v2/personalization/capabilities/gridPreferences.d.ts +100 -0
  887. package/dist/v2/personalization/capabilities/gridPreferences.d.ts.map +1 -0
  888. package/dist/v2/personalization/capabilities/gridPreferences.js +210 -0
  889. package/dist/v2/personalization/capabilities/gridPreferences.js.map +1 -0
  890. package/dist/v2/personalization/capabilities/index.d.ts +6 -0
  891. package/dist/v2/personalization/capabilities/index.d.ts.map +1 -1
  892. package/dist/v2/personalization/capabilities/index.js +23 -10
  893. package/dist/v2/personalization/capabilities/index.js.map +1 -1
  894. package/dist/v2/personalization/capabilities/reviveSavedCriteria.d.ts +88 -0
  895. package/dist/v2/personalization/capabilities/reviveSavedCriteria.d.ts.map +1 -0
  896. package/dist/v2/personalization/capabilities/reviveSavedCriteria.js +126 -0
  897. package/dist/v2/personalization/capabilities/reviveSavedCriteria.js.map +1 -0
  898. package/dist/v2/personalization/capabilities/savedFilters.js +93 -100
  899. package/dist/v2/personalization/capabilities/savedFilters.js.map +1 -1
  900. package/dist/v2/personalization/createPersonalizationStore.d.ts.map +1 -1
  901. package/dist/v2/personalization/createPersonalizationStore.js +81 -182
  902. package/dist/v2/personalization/createPersonalizationStore.js.map +1 -1
  903. package/dist/v2/personalization/index.d.ts +34 -0
  904. package/dist/v2/personalization/index.d.ts.map +1 -1
  905. package/dist/v2/personalization/index.js +41 -21
  906. package/dist/v2/personalization/index.js.map +1 -1
  907. package/dist/v2/personalization/personalizationContext.js +10 -12
  908. package/dist/v2/personalization/personalizationContext.js.map +1 -1
  909. package/dist/v2/personalization/schema.js +8 -9
  910. package/dist/v2/personalization/schema.js.map +1 -1
  911. package/dist/v2/referentiel/ReferentielProvider.js +31 -45
  912. package/dist/v2/referentiel/ReferentielProvider.js.map +1 -1
  913. package/dist/v2/referentiel/index.js +11 -13
  914. package/dist/v2/referentiel/index.js.map +1 -1
  915. package/dist/v2/referentiel/types.d.ts +105 -0
  916. package/dist/v2/referentiel/types.d.ts.map +1 -0
  917. package/dist/v2/referentiel/types.js +6 -0
  918. package/dist/v2/referentiel/types.js.map +1 -0
  919. package/dist/v2/referentiel/useReferentielClient.js +13 -16
  920. package/dist/v2/referentiel/useReferentielClient.js.map +1 -1
  921. package/dist/v2/referentiel/useReferentielOptions.d.ts +7 -17
  922. package/dist/v2/referentiel/useReferentielOptions.d.ts.map +1 -1
  923. package/dist/v2/referentiel/useReferentielOptions.js +63 -120
  924. package/dist/v2/referentiel/useReferentielOptions.js.map +1 -1
  925. package/dist/v2/referentiel/useReferentielSearch.d.ts +7 -48
  926. package/dist/v2/referentiel/useReferentielSearch.d.ts.map +1 -1
  927. package/dist/v2/referentiel/useReferentielSearch.js +40 -95
  928. package/dist/v2/referentiel/useReferentielSearch.js.map +1 -1
  929. package/dist/v2/theme/_brand.js +12 -26
  930. package/dist/v2/theme/_brand.js.map +1 -1
  931. package/dist/v2/theme/_brandSecondary.js +12 -26
  932. package/dist/v2/theme/_brandSecondary.js.map +1 -1
  933. package/dist/v2/theme/createPortnetTheme.js +41 -49
  934. package/dist/v2/theme/createPortnetTheme.js.map +1 -1
  935. package/dist/v2/theme/cssVariables.d.ts +3 -3
  936. package/dist/v2/theme/cssVariables.d.ts.map +1 -1
  937. package/dist/v2/theme/cssVariables.js +65 -70
  938. package/dist/v2/theme/cssVariables.js.map +1 -1
  939. package/dist/v2/theme/index.js +10 -10
  940. package/dist/v2/theme/index.js.map +1 -1
  941. package/dist/v2/tokens/breakpoints.js +16 -16
  942. package/dist/v2/tokens/breakpoints.js.map +1 -1
  943. package/dist/v2/tokens/chart.d.ts +103 -0
  944. package/dist/v2/tokens/chart.d.ts.map +1 -0
  945. package/dist/v2/tokens/chart.js +270 -0
  946. package/dist/v2/tokens/chart.js.map +1 -0
  947. package/dist/v2/tokens/colors.js +24 -24
  948. package/dist/v2/tokens/colors.js.map +1 -1
  949. package/dist/v2/tokens/density.d.ts +104 -0
  950. package/dist/v2/tokens/density.d.ts.map +1 -1
  951. package/dist/v2/tokens/density.js +67 -12
  952. package/dist/v2/tokens/density.js.map +1 -1
  953. package/dist/v2/tokens/index.d.ts +50 -1
  954. package/dist/v2/tokens/index.d.ts.map +1 -1
  955. package/dist/v2/tokens/index.js +116 -68
  956. package/dist/v2/tokens/index.js.map +1 -1
  957. package/dist/v2/tokens/motion.js +16 -22
  958. package/dist/v2/tokens/motion.js.map +1 -1
  959. package/dist/v2/tokens/radius.js +3 -3
  960. package/dist/v2/tokens/radius.js.map +1 -1
  961. package/dist/v2/tokens/shadows.js +8 -8
  962. package/dist/v2/tokens/shadows.js.map +1 -1
  963. package/dist/v2/tokens/spacing.js +4 -4
  964. package/dist/v2/tokens/spacing.js.map +1 -1
  965. package/dist/v2/tokens/state.js +3 -3
  966. package/dist/v2/tokens/state.js.map +1 -1
  967. package/dist/v2/tokens/statusPalette.js +21 -23
  968. package/dist/v2/tokens/statusPalette.js.map +1 -1
  969. package/dist/v2/tokens/tokens.json +6 -1
  970. package/dist/v2/tokens/typography.js +15 -15
  971. package/dist/v2/tokens/typography.js.map +1 -1
  972. package/dist/v2/tokens/zIndex.js +3 -3
  973. package/dist/v2/tokens/zIndex.js.map +1 -1
  974. package/dist/v2/types/datagrid.d.ts +9 -1
  975. package/dist/v2/types/datagrid.d.ts.map +1 -1
  976. package/dist/v2/types/datagrid.js.map +1 -1
  977. package/dist/v2/types/index.js +2 -2
  978. package/dist/v2/types/index.js.map +1 -1
  979. package/dist/v2/utils/apiError.js +16 -37
  980. package/dist/v2/utils/apiError.js.map +1 -1
  981. package/dist/v2/utils/contrast.js +31 -32
  982. package/dist/v2/utils/contrast.js.map +1 -1
  983. package/dist/v2/utils/cx.js +7 -27
  984. package/dist/v2/utils/cx.js.map +1 -1
  985. package/dist/v2/utils/fileDownload.js +25 -28
  986. package/dist/v2/utils/fileDownload.js.map +1 -1
  987. package/dist/v2/utils/fileValidation.d.ts +116 -0
  988. package/dist/v2/utils/fileValidation.d.ts.map +1 -0
  989. package/dist/v2/utils/fileValidation.js +220 -0
  990. package/dist/v2/utils/fileValidation.js.map +1 -0
  991. package/dist/v2/utils/fmtDate.d.ts +103 -0
  992. package/dist/v2/utils/fmtDate.d.ts.map +1 -0
  993. package/dist/v2/utils/fmtDate.js +119 -0
  994. package/dist/v2/utils/fmtDate.js.map +1 -0
  995. package/dist/v2/utils/fmtMoney.d.ts +3 -3
  996. package/dist/v2/utils/fmtMoney.d.ts.map +1 -1
  997. package/dist/v2/utils/fmtMoney.js +9 -11
  998. package/dist/v2/utils/fmtMoney.js.map +1 -1
  999. package/dist/v2/utils/formikErrors.d.ts +67 -0
  1000. package/dist/v2/utils/formikErrors.d.ts.map +1 -0
  1001. package/dist/v2/utils/formikErrors.js +85 -0
  1002. package/dist/v2/utils/formikErrors.js.map +1 -0
  1003. package/dist/v2/utils/index.d.ts +5 -0
  1004. package/dist/v2/utils/index.d.ts.map +1 -1
  1005. package/dist/v2/utils/index.js +67 -18
  1006. package/dist/v2/utils/index.js.map +1 -1
  1007. package/dist/v2/utils/mergeLabels.js +9 -14
  1008. package/dist/v2/utils/mergeLabels.js.map +1 -1
  1009. package/dist/v2/utils/networkStatus.js +14 -14
  1010. package/dist/v2/utils/networkStatus.js.map +1 -1
  1011. package/package.json +26 -9
@@ -1,5 +1,38 @@
1
1
  export { default as ActionBar } from "./ActionBar";
2
+ /**
3
+ * AppMain — the `<main>` landmark (gap G-53).
4
+ *
5
+ * The library shipped HALF of a two-part contract: `SkipLink`'s docblock
6
+ * prescribes `<main id="main-content">` as its target and the library never
7
+ * provided it, so every module wrote the landmark — with `tabIndex={-1}`
8
+ * (without which the skip link scrolls but does not move focus in Safari),
9
+ * `outline: none` (R-F.1: the ring belongs on controls, not on a whole page),
10
+ * and the content measure of R-L.5, a MUST nothing here honoured:
11
+ * `PageContent` owns the canonical padding and caps NOTHING, so a certified
12
+ * module still stretched its tables across a 1920 px display.
13
+ *
14
+ * Two copies existed in the portfolio (autorisation-admis-pour-conforme-fe and
15
+ * the reference module ms-ti-fe), which is what a gap looks like from the
16
+ * outside.
17
+ */
18
+ export { default as AppMain } from "./AppMain";
2
19
  export { default as BulkActionBar } from "./BulkActionBar";
20
+ /**
21
+ * ChartFigure — a chart, its title, and its TEXT EQUIVALENT (gap G-55).
22
+ *
23
+ * `tokens/chart` states the obligation and shipped nothing to meet it, in its
24
+ * own words: the palette "does not make a chart accessible. Every consumer
25
+ * still owes a legend with text labels, and a text equivalent of the data —
26
+ * 1.1.1 for the chart as a whole." A rule stated without a component to carry
27
+ * it is met by whoever remembers it, and the text equivalent is the part that
28
+ * goes missing first — the only one nobody SEES missing.
29
+ *
30
+ * Hence `caption` being REQUIRED: a chart rendered through here cannot ship
31
+ * without its numbers in text. The canvas is `aria-hidden` (a renderer emits
32
+ * dozens of unstructured SVG text nodes, which is noise worse than silence) —
33
+ * so no interactive control goes inside it.
34
+ */
35
+ export { default as ChartFigure } from "./ChartFigure";
3
36
  export { default as ColumnsToggle } from "./ColumnsToggle";
4
37
  export { default as FormSection } from "./FormSection";
5
38
  export { default as FormPageShell } from "./FormPageShell";
@@ -7,11 +40,153 @@ export { default as FormErrorSummary } from "./FormErrorSummary";
7
40
  // R-FV.3 companion to FormErrorSummary (R-FV.2) — renders nothing, moves
8
41
  // focus to the first field in error after a failed submit. Adopt both.
9
42
  export { default as FormikErrorFocus } from "./FormikErrorFocus";
43
+ /**
44
+ * FormikErrorSummary — the Formik bridge for FormErrorSummary (R-FV.2).
45
+ *
46
+ * The library owned all three parts of the failed-submit recipe and no way to
47
+ * assemble them inside the form shape modules actually write:
48
+ * `FormErrorSummary` renders the banner from a flat list,
49
+ * `flattenFormikErrors` (G-38) produces that list, `focusFieldByName`
50
+ * (R-FV.3) resolves an item back to its control.
51
+ *
52
+ * Reaching `errors` / `submitCount` needs the Formik CONTEXT, and the
53
+ * prevailing shape is `<Formik><Form>…</Form></Formik>` with STATIC children —
54
+ * the host's body sits outside the provider, and `innerRef` does not help
55
+ * because mutating a ref does not re-render the holder when `errors` changes.
56
+ * So each host had to convert its form to a render-prop purely to reach the
57
+ * errors, or write a local null-rendering context reader.
58
+ *
59
+ * Raised from ms-ti-fe (Area 11), where ONE of eleven Formik forms had the
60
+ * banner: wiring the other ten meant ten copies of that wrapper. The sibling
61
+ * rule HAS a bridge (`FormikErrorFocus`), which is why field adoption of the
62
+ * two MUSTs diverged — the one needing boilerplate is the one nobody applied.
63
+ */
64
+ export { default as FormikErrorSummary } from "./FormikErrorSummary";
10
65
  export { default as PageContent } from "./PageContent";
66
+ /**
67
+ * DetailSplit — content + progression rail on a consultation page (gap G-44).
68
+ *
69
+ * §Detail / Consultation Pattern makes the vertical progress rail a MUST on
70
+ * every consultation page, and §07 R-L.7 fixes the skeleton. The library shipped
71
+ * the rail (`VStepper`) and not the geometry that places it beside the record,
72
+ * so each host wrote the same three-value flex row by hand.
73
+ *
74
+ * Promoted from `refonte-frontend` (Area 4), where the SAME row existed twice
75
+ * — `DetailPage` and `TraitementDemande` — with `560` / `300` / `260` written
76
+ * out in both (R-2.3), and already drifting: neither `<aside>` had an
77
+ * accessible name. Widths now live in `tokens.layout.detail`.
78
+ */
79
+ export { default as DetailSplit } from "./DetailSplit";
80
+ /**
81
+ * PreviewDrawer — the listing preview, body included (gap G-40).
82
+ *
83
+ * §Row Interaction and §Preview Drawer are MUST on every listing page of the
84
+ * platform, and the library shipped only `Drawer`, the empty shell. Each module
85
+ * assembled the same summary by hand, and the copies drifted where it shows
86
+ * least: `ms-ti-fe` uses `KVGrid` + `KV`, `refonte-frontend` had built a local
87
+ * `<dl>` with its own grid — one concept, two renderings (R-2.1).
88
+ *
89
+ * Promoted from `refonte-frontend` (Area 5). Reads NO field of `row`, which is
90
+ * what removed the `as unknown as` assertion its single-component ancestor
91
+ * needed; business defaults live in a host wrapper over a concrete row type.
92
+ */
93
+ export { default as PreviewDrawer } from "./PreviewDrawer";
11
94
  export { default as DataGrid, applySort } from "./DataGrid";
95
+ /**
96
+ * DataGridVirtualized — la seconde table, pour les grands volumes.
97
+ *
98
+ * Sa frontière d'emploi est énoncée dans son propre en-tête : au-delà de mille
99
+ * lignes où la pagination paraîtrait artificielle (journaux d'audit, « tout
100
+ * afficher ») ; sous cent lignes, `DataGrid` est plus simple.
101
+ *
102
+ * >>> LES TYPES SONT AJOUTÉS ICI (audit lot 12, Area 13) — MÊME CLASSE
103
+ * >>> GAP-TS-003 QUE CE FICHIER DOCUMENTE DÉJÀ CINQ FOIS. La VALEUR était
104
+ * >>> exportée, les types décrivant ses props ne l'étaient pas : un hôte ne
105
+ * >>> pouvait donc ni écrire un adaptateur typé autour de ce composant, ni
106
+ * >>> nommer `DataGridVirtualizedDensity` — dont il a besoin, puisque ce
107
+ * >>> palier de HAUTEUR DE LIGNE compte quatre valeurs là où le `Density`
108
+ * >>> canonique en a deux. Le repli aurait été un jumeau local, que les
109
+ * >>> Platform TypeScript Guidelines interdisent.
110
+ * >>>
111
+ * >>> Relevé depuis `autorisation-admis-pour-conforme-fe` (Area 13) : ce
112
+ * >>> module n'utilise pas ce composant — il pagine côté serveur — mais son
113
+ * >>> audit RGESN a dû établir où vivait la virtualisation, et a trouvé une
114
+ * >>> capacité complète dont la surface type était muette.
115
+ * >>>
116
+ * >>> Additif et purement typographique : aucun changement d'exécution. <<<
117
+ */
12
118
  export { default as DataGridVirtualized } from "./DataGridVirtualized";
13
119
  export { default as DataGridSettingsMenu } from "./DataGridSettingsMenu";
14
120
  export { default as DataGridToolbar } from "./DataGridToolbar";
121
+ /**
122
+ * rowActions — business descriptors → the row's kebab menu (gap G-41).
123
+ *
124
+ * The library shipped both halves — `OverflowMenu` renders flat actions,
125
+ * `DataGrid.rowActions` takes a `(row) => ReactNode` — and not the step
126
+ * between them, which every listing wrote for itself while carrying three
127
+ * Charter rules (R-3.3, R-B.6, R-K.1).
128
+ *
129
+ * `buildRowActionMenu` is exported alongside the renderer on purpose: a row
130
+ * appears twice, as a table row and as a `MobileRowCard` whose `actions` prop
131
+ * takes `OverflowMenuAction[]` rather than a node. Without it, hosts rebuilt
132
+ * the menu by hand for the card and the two copies drifted — the same failure
133
+ * the library records for `RowFavoriteToggle` (G-36).
134
+ *
135
+ * Promoted from `refonte-frontend` (Area 5), where it served twelve screens.
136
+ */
137
+ export { buildRowActions, buildRowActionMenu, MAX_ROW_ACTIONS } from "./rowActions";
138
+ /**
139
+ * FilterTabBar — the status-chip bar of a listing card (gap G-45).
140
+ *
141
+ * §Status Chips is a MUST on every listing, and the library shipped the PILL
142
+ * (`FilterTab`) without the bar that seats it — so each listing re-derived the
143
+ * row geometry, the card-header separator, and the split between the status
144
+ * group and the personalization controls.
145
+ *
146
+ * Promoted from `refonte-frontend` (Area 5), where FOUR listings carried the
147
+ * same `BARRE_CHIPS_STATUT` + `GROUPE_BARRE` pair — and had already drifted:
148
+ * one of the four omitted `justifyContent: "space-between"`, so the same
149
+ * listing family rendered two different layouts (R-2.1).
150
+ */
151
+ export { default as FilterTabBar } from "./FilterTabBar";
152
+ /**
153
+ * filterCriteria — active criteria as removable chips (gap G-42).
154
+ *
155
+ * The library owned the RENDERING (`DataGridToolbar.filterChips` and the
156
+ * `DataGridToolbarFilterChip` type, itself added at this module's request) and
157
+ * not the builder. Ten local copies would have drifted on the two things that
158
+ * are not obvious: what counts as SET (`0` is the unset value of a reference
159
+ * mirror on several hosts) and what a removal must CLEAR (reference criteria
160
+ * are held as pairs, so clearing only the displayed key leaves an invisible
161
+ * filter that still filters).
162
+ *
163
+ * Pair with `useAppliedFilters`. Promoted from `refonte-frontend` (Area 5).
164
+ */
165
+ export { buildFilterChips, filterCriteriaKeys, isCriterionSet } from "./filterCriteria";
166
+
167
+ /**
168
+ * DataGridToolbar contracts — public typed surface (gap G-I).
169
+ *
170
+ * Meme defaut que les blocs `StepStatus`, `FieldHelp`, `Status` et `Field` :
171
+ * la barre d'outils etait exportee comme VALEUR, sans les types de ses props.
172
+ * `DataGridToolbarFilterChip` est celui qui manque le plus : §Filters et
173
+ * §Search des Platform Mandatory UX Patterns imposent des criteres actifs
174
+ * retirables, `filterChips` est la capacite qui les rend, et un hote qui
175
+ * construit ce tableau a besoin de la forme d'une entree.
176
+ *
177
+ * Sans le type, il redeclare `{ key, label, onRemove }` au point d'appel — ce
178
+ * que les Platform TypeScript Guidelines interdisent (« Reusable types belong
179
+ * inside Shared UI Library … Never duplicate »). Releve depuis
180
+ * `refonte-frontend` (lot 8, ecart A9), ou dix listings doivent construire ces
181
+ * pastilles a partir d'une brique partagee.
182
+ *
183
+ * `DataGridToolbarLabels` voyage avec : un hote qui traduit la barre d'outils
184
+ * en a besoin, et c'est la meme duplication un niveau plus bas.
185
+ *
186
+ * FLAT-ONLY, per the policy note in src/lib/index.ts.
187
+ * Additive and type-only: no runtime change, no existing export altered.
188
+ */
189
+
15
190
  export { default as CollapsibleDataGrid } from "./CollapsibleDataGrid";
16
191
  export { default as SortableHeader, getAriaSort } from "./SortableHeader";
17
192
  export { default as NetworkErrorBanner } from "./NetworkErrorBanner";
@@ -52,6 +227,26 @@ export { default as SavedFiltersMenu } from "./SavedFiltersMenu";
52
227
  // FavoritesFilter is the all/favorites-only segmented control.
53
228
  export { default as makeFavoriteColumn } from "./FavoriteColumn";
54
229
  export { default as FavoritesFilter } from "./FavoritesFilter";
230
+ /**
231
+ * RowFavoriteToggle — the per-row follow star, standalone (gap G-36).
232
+ *
233
+ * It already existed as a PRIVATE `FavoriteCell` inside `makeFavoriteColumn`,
234
+ * which made the follow control reachable as a DataGrid column and nowhere
235
+ * else. The other place a row always appears is the mobile card: `DataGrid`
236
+ * swaps to `renderMobileCard` below its `mobileBreakpoint`, and
237
+ * `MobileRowCard` has a `leading` slot for exactly this — but a column
238
+ * definition cannot be rendered into a slot, so hosts rebuilt the star by
239
+ * hand (`onssa-export-fe`'s `MobileFavoriteToggle`; `ms-ti-fe` destructures
240
+ * the same MobileRowCard + FavoriteToggle + useIsFavorite trio).
241
+ *
242
+ * Same failure mode as G-10: the library owned the behaviour but exposed it at
243
+ * one composition point only. And the copies drifted where it is least visible
244
+ * and matters most — the local twin announced "Ajouter aux favoris" while the
245
+ * grid column on the same page said "Suivre", and it dropped the status
246
+ * tooltip. `makeFavoriteColumn` now renders this component, so the two agree
247
+ * by construction.
248
+ */
249
+ export { default as RowFavoriteToggle, DEFAULT_ROW_FAVORITE_LABELS } from "./RowFavoriteToggle";
55
250
  // ── Formik bridges ────────────────────────────────────────────────────────────
56
251
  export { default as FormikInput } from "./FormikInput";
57
252
  export { default as FormikTextarea } from "./FormikTextarea";
@@ -87,6 +282,46 @@ export { default as FormikCombobox } from "./FormikCombobox";
87
282
  export { default as FormikDatePicker } from "./FormikDatePicker";
88
283
  export { default as FormikFile } from "./FormikFile";
89
284
  export { default as FormikCheckboxGroup } from "./FormikCheckboxGroup";
285
+ /**
286
+ * FormikCheckbox — pont pour une case a cocher BOOLEENNE simple (gap G-A).
287
+ *
288
+ * `FormikCheckboxGroup` porte un TABLEAU de valeurs selectionnees : un hote
289
+ * dont l'etat est un booleen (`autreInfo.fabrication`,
290
+ * `objectDeclaration.premiereDeclaration`) ne peut pas l'adopter sans changer
291
+ * ce que son payload envoie. Faute de pont, les modules recablaient
292
+ * `Checkbox` + `useField` a la main — duplication interdite par R-2.1, et qui
293
+ * perdait systematiquement le rendu de l'erreur (R-4.1 MUST).
294
+ *
295
+ * Le type de props est expose : meme classe que Gap-TS-003 ci-dessus.
296
+ */
297
+ export { default as FormikCheckbox } from "./FormikCheckbox";
298
+ /**
299
+ * FormikRadioGroup — pont pour un groupe de radios (gap G-C).
300
+ *
301
+ * R-Sel.2 est un MUST : 2-3 options -> Radio ou Segmented, jamais un Select.
302
+ * Toute question metier binaire passe donc par `RadioGroup`, qui n'avait aucun
303
+ * pont Formik la ou `FormikSelect`, `FormikCombobox`, `FormikCheckboxGroup` et
304
+ * les autres en ont un. Les hotes recablaient `useField` + `RadioGroup` a la
305
+ * main, et y perdaient `FieldError`.
306
+ *
307
+ * Contrat invisible a connaitre : la valeur ECRITE est celle DECLAREE dans
308
+ * `options`, pas la chaine que rapporte le DOM — un hote aux options
309
+ * numeriques continue de stocker des nombres.
310
+ */
311
+ export { default as FormikRadioGroup } from "./FormikRadioGroup";
312
+ /**
313
+ * FormikDateTimePicker — pont date + HEURE (gap G-E).
314
+ *
315
+ * `FormikDatePicker` etait le seul pont de date de la library, et il est
316
+ * date-seule. Un hote ayant besoin de l'heure devait soit la perdre — ce qui
317
+ * change ce que recoit le backend, pas seulement l'affichage — soit recabler
318
+ * `useField` + le `DateTimePicker` nu, donc dupliquer.
319
+ *
320
+ * Les deux ponts PARTAGENT `coerceToDate` / `serialiseDate`
321
+ * (`./_pickerSerialisation`) : voir la note S-03 de `FormikDatePicker` pour ce
322
+ * qui arrive quand la lecture et l'ecriture d'une date divergent.
323
+ */
324
+ export { default as FormikDateTimePicker } from "./FormikDateTimePicker";
90
325
  export { default as FormikReferentielField } from "./FormikReferentielField";
91
326
  /** Affichage valeur système — fond grisé, aucune interaction.
92
327
  * Utiliser à la place de FormikInput disabled pour les champs
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["default","ActionBar","BulkActionBar","ColumnsToggle","FormSection","FormPageShell","FormErrorSummary","FormikErrorFocus","PageContent","DataGrid","applySort","DataGridVirtualized","DataGridSettingsMenu","DataGridToolbar","CollapsibleDataGrid","SortableHeader","getAriaSort","NetworkErrorBanner","ReferentielField","Tour","KeyboardShortcutsHelp","DeleteResourceConfirmDialog","SaveFilterDialog","SavedFiltersMenu","makeFavoriteColumn","FavoritesFilter","FormikInput","FormikTextarea","FormikSelect","FormikCombobox","FormikDatePicker","FormikFile","FormikCheckboxGroup","FormikReferentielField","FormikDisplay"],"sources":["../../../../src/lib/v2/patterns/index.ts"],"sourcesContent":["export { default as ActionBar } from \"./ActionBar\";\r\nexport type { ActionBarProps, ActionBarAction, ActionBarLabels, BreadcrumbItem, CrumbEntry } from \"./ActionBar\";\r\nexport { default as BulkActionBar } from \"./BulkActionBar\";\r\nexport { default as ColumnsToggle } from \"./ColumnsToggle\";\r\nexport { default as FormSection } from \"./FormSection\";\r\nexport { default as FormPageShell } from \"./FormPageShell\";\r\nexport { default as FormErrorSummary } from \"./FormErrorSummary\";\r\nexport type { FormErrorSummaryProps, FormErrorSummaryError } from \"./FormErrorSummary\";\r\n// R-FV.3 companion to FormErrorSummary (R-FV.2) — renders nothing, moves\r\n// focus to the first field in error after a failed submit. Adopt both.\r\nexport { default as FormikErrorFocus } from \"./FormikErrorFocus\";\r\nexport type { FormikErrorFocusProps } from \"./FormikErrorFocus\";\r\nexport { default as PageContent } from \"./PageContent\";\r\nexport { default as DataGrid, applySort } from \"./DataGrid\";\r\nexport { default as DataGridVirtualized } from \"./DataGridVirtualized\";\r\nexport { default as DataGridSettingsMenu } from \"./DataGridSettingsMenu\";\r\nexport { default as DataGridToolbar } from \"./DataGridToolbar\";\r\nexport { default as CollapsibleDataGrid } from \"./CollapsibleDataGrid\";\r\nexport { default as SortableHeader, getAriaSort } from \"./SortableHeader\";\r\nexport { default as NetworkErrorBanner } from \"./NetworkErrorBanner\";\r\nexport { default as ReferentielField } from \"./ReferentielField\";\r\n/**\r\n * ReferentielField configuration types — public typed surface.\r\n *\r\n * Same class of gap as Gap-TS-003 (component types), which was fixed for\r\n * `./components` but never extended to `./patterns`: the VALUE above was\r\n * exported while the types describing its own REQUIRED props were not.\r\n * `columns` and `criteria` are mandatory-to-configure, so a consumer had no\r\n * way to type them without either deep-importing\r\n * `@portnet/ui/dist/v2/patterns/…` (fragile, bypasses the `exports` map) or\r\n * declaring a local twin — which the Platform TypeScript Guidelines forbid\r\n * (\"Reusable types belong inside Shared UI Library … Never duplicate\").\r\n *\r\n * `ReferentielSearchResult` and `ReferentielSearchParams` are deliberately\r\n * NOT re-exported here: identically-named types are already surfaced from\r\n * `./referentiel` (useReferentielSearch) and `./v2/models` respectively, and\r\n * `src/lib/index.ts` star-exports all three barrels — a second named export of\r\n * either identifier is a hard TS2308 ambiguity at the library root.\r\n *\r\n * Additive and type-only: no runtime change, no existing export altered.\r\n */\r\nexport type {\r\n ReferentielFieldProps,\r\n ReferentielCriterion,\r\n ReferentielFieldLabels,\r\n} from \"./ReferentielField\";\r\nexport { default as Tour } from \"./Tour\";\r\nexport { default as KeyboardShortcutsHelp } from \"./KeyboardShortcutsHelp\";\r\nexport { default as DeleteResourceConfirmDialog } from \"./DeleteResourceConfirmDialog\";\r\n\r\n// ── Personalization · Saved Filters framework (v2/personalization) ────────────\r\n// SaveFilterDialog is presentational; SavedFiltersMenu is connected to the\r\n// savedFilters capability via useSavedFilters.\r\nexport { default as SaveFilterDialog } from \"./SaveFilterDialog\";\r\nexport { default as SavedFiltersMenu } from \"./SavedFiltersMenu\";\r\n\r\n// ── Personalization · Favorites DataGrid integration (v2/personalization) ─────\r\n// makeFavoriteColumn builds an always-visible favorites column for v2.DataGrid;\r\n// FavoritesFilter is the all/favorites-only segmented control.\r\nexport { default as makeFavoriteColumn } from \"./FavoriteColumn\";\r\nexport { default as FavoritesFilter } from \"./FavoritesFilter\";\r\nexport type { FavoritesFilterProps, FavoritesFilterLabels } from \"./FavoritesFilter\";\r\n\r\n// ── Formik bridges ────────────────────────────────────────────────────────────\r\nexport { default as FormikInput } from \"./FormikInput\";\r\nexport { default as FormikTextarea } from \"./FormikTextarea\";\r\nexport { default as FormikSelect } from \"./FormikSelect\";\r\nexport { default as FormikCombobox } from \"./FormikCombobox\";\r\n/**\r\n * FormikCombobox props — public typed surface.\r\n *\r\n * SAME GAP-TS-003 CLASS as the ReferentielField note above. That fix covered\r\n * `ReferentielField` and `FormikReferentielField` but was not extended to the\r\n * other Formik bridges: the VALUE is exported while the type describing its props\r\n * is not, so a consumer cannot write `Omit<FormikComboboxProps<T>, …>`.\r\n *\r\n * REQUESTED BY bmdav-fe (TypeScript migration, batch 6f). That module stores the\r\n * OPTION OBJECT in Formik rather than a primitive key, because its payload mapper\r\n * reads `values.typeDemande.id` and sends `delegationTraitement` as a whole\r\n * object — so it cannot adopt the primitive-key model without changing the\r\n * request body sent to bmdav-be. It contains the resulting variance in ONE local\r\n * adapter (`ObjectValuedFormikCombobox`) rather than scattering assertions across\r\n * call sites, and that adapter must restate this component's prop contract minus\r\n * `getOptionValue`. The deep-import fallback is unavailable under\r\n * `moduleResolution: \"bundler\"`, since the package `exports` map does not expose\r\n * `dist/v2/patterns/*`.\r\n *\r\n * `ComboboxOptionValue` is deliberately NOT re-exported here — it is already\r\n * surfaced from `./components` (Combobox), and a second named export at the\r\n * library root would be a TS2308 ambiguity, exactly as recorded above for\r\n * `ReferentielSearchResult` / `ReferentielSearchParams`.\r\n *\r\n * Additive and type-only: no runtime change, no existing export altered.\r\n */\r\nexport type { FormikComboboxProps } from \"./FormikCombobox\";\r\nexport { default as FormikDatePicker } from \"./FormikDatePicker\";\r\nexport { default as FormikFile } from \"./FormikFile\";\r\nexport { default as FormikCheckboxGroup } from \"./FormikCheckboxGroup\";\r\nexport { default as FormikReferentielField } from \"./FormikReferentielField\";\r\nexport type { FormikReferentielFieldProps } from \"./FormikReferentielField\";\r\n\r\n/** Affichage valeur système — fond grisé, aucune interaction.\r\n * Utiliser à la place de FormikInput disabled pour les champs\r\n * auto-générés ou non modifiables par l'utilisateur. */\r\nexport { default as FormikDisplay } from \"../components/FormikDisplay\";\r\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,SAAS,QAAmB,aAAa;AAE7D,SAASD,OAAO,IAAIE,aAAa,QAAe,iBAAiB;AACjE,SAASF,OAAO,IAAIG,aAAa,QAAe,iBAAiB;AACjE,SAASH,OAAO,IAAII,WAAW,QAAiB,eAAe;AAC/D,SAASJ,OAAO,IAAIK,aAAa,QAAe,iBAAiB;AACjE,SAASL,OAAO,IAAIM,gBAAgB,QAAY,oBAAoB;AAEpE;AACA;AACA,SAASN,OAAO,IAAIO,gBAAgB,QAAY,oBAAoB;AAEpE,SAASP,OAAO,IAAIQ,WAAW,QAAiB,eAAe;AAC/D,SAASR,OAAO,IAAIS,QAAQ,EAAEC,SAAS,QAAS,YAAY;AAC5D,SAASV,OAAO,IAAIW,mBAAmB,QAAS,uBAAuB;AACvE,SAASX,OAAO,IAAIY,oBAAoB,QAAQ,wBAAwB;AACxE,SAASZ,OAAO,IAAIa,eAAe,QAAa,mBAAmB;AACnE,SAASb,OAAO,IAAIc,mBAAmB,QAAS,uBAAuB;AACvE,SAASd,OAAO,IAAIe,cAAc,EAAEC,WAAW,QAAQ,kBAAkB;AACzE,SAAShB,OAAO,IAAIiB,kBAAkB,QAAU,sBAAsB;AACtE,SAASjB,OAAO,IAAIkB,gBAAgB,QAAY,oBAAoB;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAMA,SAASlB,OAAO,IAAImB,IAAI,QAAwB,QAAQ;AACxD,SAASnB,OAAO,IAAIoB,qBAAqB,QAAQ,yBAAyB;AAC1E,SAASpB,OAAO,IAAIqB,2BAA2B,QAAQ,+BAA+B;;AAEtF;AACA;AACA;AACA,SAASrB,OAAO,IAAIsB,gBAAgB,QAAY,oBAAoB;AACpE,SAAStB,OAAO,IAAIuB,gBAAgB,QAAY,oBAAoB;;AAEpE;AACA;AACA;AACA,SAASvB,OAAO,IAAIwB,kBAAkB,QAAU,kBAAkB;AAClE,SAASxB,OAAO,IAAIyB,eAAe,QAAa,mBAAmB;AAGnE;AACA,SAASzB,OAAO,IAAI0B,WAAW,QAAiB,eAAe;AAC/D,SAAS1B,OAAO,IAAI2B,cAAc,QAAc,kBAAkB;AAClE,SAAS3B,OAAO,IAAI4B,YAAY,QAAgB,gBAAgB;AAChE,SAAS5B,OAAO,IAAI6B,cAAc,QAAc,kBAAkB;AAClE;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,SAAS7B,OAAO,IAAI8B,gBAAgB,QAAY,oBAAoB;AACpE,SAAS9B,OAAO,IAAI+B,UAAU,QAAkB,cAAc;AAC9D,SAAS/B,OAAO,IAAIgC,mBAAmB,QAAS,uBAAuB;AACvE,SAAShC,OAAO,IAAIiC,sBAAsB,QAAQ,0BAA0B;AAG5E;AACA;AACA;AACA,SAASjC,OAAO,IAAIkC,aAAa,QAAe,6BAA6B","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["default","ActionBar","AppMain","BulkActionBar","ChartFigure","ColumnsToggle","FormSection","FormPageShell","FormErrorSummary","FormikErrorFocus","FormikErrorSummary","PageContent","DetailSplit","PreviewDrawer","DataGrid","applySort","DataGridVirtualized","DataGridSettingsMenu","DataGridToolbar","buildRowActions","buildRowActionMenu","MAX_ROW_ACTIONS","FilterTabBar","buildFilterChips","filterCriteriaKeys","isCriterionSet","CollapsibleDataGrid","SortableHeader","getAriaSort","NetworkErrorBanner","ReferentielField","Tour","KeyboardShortcutsHelp","DeleteResourceConfirmDialog","SaveFilterDialog","SavedFiltersMenu","makeFavoriteColumn","FavoritesFilter","RowFavoriteToggle","DEFAULT_ROW_FAVORITE_LABELS","FormikInput","FormikTextarea","FormikSelect","FormikCombobox","FormikDatePicker","FormikFile","FormikCheckboxGroup","FormikCheckbox","FormikRadioGroup","FormikDateTimePicker","FormikReferentielField","FormikDisplay"],"sources":["../../../../src/lib/v2/patterns/index.ts"],"sourcesContent":["export { default as ActionBar } from \"./ActionBar\";\r\nexport type { ActionBarProps, ActionBarAction, ActionBarLabels, BreadcrumbItem, CrumbEntry } from \"./ActionBar\";\r\n/**\r\n * AppMain — the `<main>` landmark (gap G-53).\r\n *\r\n * The library shipped HALF of a two-part contract: `SkipLink`'s docblock\r\n * prescribes `<main id=\"main-content\">` as its target and the library never\r\n * provided it, so every module wrote the landmark — with `tabIndex={-1}`\r\n * (without which the skip link scrolls but does not move focus in Safari),\r\n * `outline: none` (R-F.1: the ring belongs on controls, not on a whole page),\r\n * and the content measure of R-L.5, a MUST nothing here honoured:\r\n * `PageContent` owns the canonical padding and caps NOTHING, so a certified\r\n * module still stretched its tables across a 1920 px display.\r\n *\r\n * Two copies existed in the portfolio (autorisation-admis-pour-conforme-fe and\r\n * the reference module ms-ti-fe), which is what a gap looks like from the\r\n * outside.\r\n */\r\nexport { default as AppMain } from \"./AppMain\";\r\nexport type { AppMainProps, AppMainMeasure } from \"./AppMain\";\r\nexport { default as BulkActionBar } from \"./BulkActionBar\";\r\n/**\r\n * ChartFigure — a chart, its title, and its TEXT EQUIVALENT (gap G-55).\r\n *\r\n * `tokens/chart` states the obligation and shipped nothing to meet it, in its\r\n * own words: the palette \"does not make a chart accessible. Every consumer\r\n * still owes a legend with text labels, and a text equivalent of the data —\r\n * 1.1.1 for the chart as a whole.\" A rule stated without a component to carry\r\n * it is met by whoever remembers it, and the text equivalent is the part that\r\n * goes missing first — the only one nobody SEES missing.\r\n *\r\n * Hence `caption` being REQUIRED: a chart rendered through here cannot ship\r\n * without its numbers in text. The canvas is `aria-hidden` (a renderer emits\r\n * dozens of unstructured SVG text nodes, which is noise worse than silence) —\r\n * so no interactive control goes inside it.\r\n */\r\nexport { default as ChartFigure } from \"./ChartFigure\";\r\nexport type { ChartFigureProps } from \"./ChartFigure\";\r\nexport { default as ColumnsToggle } from \"./ColumnsToggle\";\r\nexport { default as FormSection } from \"./FormSection\";\r\nexport { default as FormPageShell } from \"./FormPageShell\";\r\nexport { default as FormErrorSummary } from \"./FormErrorSummary\";\r\nexport type { FormErrorSummaryProps, FormErrorSummaryError } from \"./FormErrorSummary\";\r\n// R-FV.3 companion to FormErrorSummary (R-FV.2) — renders nothing, moves\r\n// focus to the first field in error after a failed submit. Adopt both.\r\nexport { default as FormikErrorFocus } from \"./FormikErrorFocus\";\r\nexport type { FormikErrorFocusProps } from \"./FormikErrorFocus\";\r\n/**\r\n * FormikErrorSummary — the Formik bridge for FormErrorSummary (R-FV.2).\r\n *\r\n * The library owned all three parts of the failed-submit recipe and no way to\r\n * assemble them inside the form shape modules actually write:\r\n * `FormErrorSummary` renders the banner from a flat list,\r\n * `flattenFormikErrors` (G-38) produces that list, `focusFieldByName`\r\n * (R-FV.3) resolves an item back to its control.\r\n *\r\n * Reaching `errors` / `submitCount` needs the Formik CONTEXT, and the\r\n * prevailing shape is `<Formik><Form>…</Form></Formik>` with STATIC children —\r\n * the host's body sits outside the provider, and `innerRef` does not help\r\n * because mutating a ref does not re-render the holder when `errors` changes.\r\n * So each host had to convert its form to a render-prop purely to reach the\r\n * errors, or write a local null-rendering context reader.\r\n *\r\n * Raised from ms-ti-fe (Area 11), where ONE of eleven Formik forms had the\r\n * banner: wiring the other ten meant ten copies of that wrapper. The sibling\r\n * rule HAS a bridge (`FormikErrorFocus`), which is why field adoption of the\r\n * two MUSTs diverged — the one needing boilerplate is the one nobody applied.\r\n */\r\nexport { default as FormikErrorSummary } from \"./FormikErrorSummary\";\r\nexport type { FormikErrorSummaryProps } from \"./FormikErrorSummary\";\r\nexport { default as PageContent } from \"./PageContent\";\r\n/**\r\n * DetailSplit — content + progression rail on a consultation page (gap G-44).\r\n *\r\n * §Detail / Consultation Pattern makes the vertical progress rail a MUST on\r\n * every consultation page, and §07 R-L.7 fixes the skeleton. The library shipped\r\n * the rail (`VStepper`) and not the geometry that places it beside the record,\r\n * so each host wrote the same three-value flex row by hand.\r\n *\r\n * Promoted from `refonte-frontend` (Area 4), where the SAME row existed twice\r\n * — `DetailPage` and `TraitementDemande` — with `560` / `300` / `260` written\r\n * out in both (R-2.3), and already drifting: neither `<aside>` had an\r\n * accessible name. Widths now live in `tokens.layout.detail`.\r\n */\r\nexport { default as DetailSplit } from \"./DetailSplit\";\r\nexport type { DetailSplitProps } from \"./DetailSplit\";\r\n/**\r\n * PreviewDrawer — the listing preview, body included (gap G-40).\r\n *\r\n * §Row Interaction and §Preview Drawer are MUST on every listing page of the\r\n * platform, and the library shipped only `Drawer`, the empty shell. Each module\r\n * assembled the same summary by hand, and the copies drifted where it shows\r\n * least: `ms-ti-fe` uses `KVGrid` + `KV`, `refonte-frontend` had built a local\r\n * `<dl>` with its own grid — one concept, two renderings (R-2.1).\r\n *\r\n * Promoted from `refonte-frontend` (Area 5). Reads NO field of `row`, which is\r\n * what removed the `as unknown as` assertion its single-component ancestor\r\n * needed; business defaults live in a host wrapper over a concrete row type.\r\n */\r\nexport { default as PreviewDrawer } from \"./PreviewDrawer\";\r\nexport type {\r\n PreviewDrawerProps,\r\n PreviewDrawerItem,\r\n PreviewDrawerLabels,\r\n} from \"./PreviewDrawer\";\r\nexport { default as DataGrid, applySort } from \"./DataGrid\";\r\n/**\r\n * DataGridVirtualized — la seconde table, pour les grands volumes.\r\n *\r\n * Sa frontière d'emploi est énoncée dans son propre en-tête : au-delà de mille\r\n * lignes où la pagination paraîtrait artificielle (journaux d'audit, « tout\r\n * afficher ») ; sous cent lignes, `DataGrid` est plus simple.\r\n *\r\n * >>> LES TYPES SONT AJOUTÉS ICI (audit lot 12, Area 13) — MÊME CLASSE\r\n * >>> GAP-TS-003 QUE CE FICHIER DOCUMENTE DÉJÀ CINQ FOIS. La VALEUR était\r\n * >>> exportée, les types décrivant ses props ne l'étaient pas : un hôte ne\r\n * >>> pouvait donc ni écrire un adaptateur typé autour de ce composant, ni\r\n * >>> nommer `DataGridVirtualizedDensity` — dont il a besoin, puisque ce\r\n * >>> palier de HAUTEUR DE LIGNE compte quatre valeurs là où le `Density`\r\n * >>> canonique en a deux. Le repli aurait été un jumeau local, que les\r\n * >>> Platform TypeScript Guidelines interdisent.\r\n * >>>\r\n * >>> Relevé depuis `autorisation-admis-pour-conforme-fe` (Area 13) : ce\r\n * >>> module n'utilise pas ce composant — il pagine côté serveur — mais son\r\n * >>> audit RGESN a dû établir où vivait la virtualisation, et a trouvé une\r\n * >>> capacité complète dont la surface type était muette.\r\n * >>>\r\n * >>> Additif et purement typographique : aucun changement d'exécution. <<<\r\n */\r\nexport { default as DataGridVirtualized } from \"./DataGridVirtualized\";\r\nexport type {\r\n DataGridVirtualizedProps,\r\n DataGridVirtualizedDensity,\r\n} from \"./DataGridVirtualized\";\r\nexport { default as DataGridSettingsMenu } from \"./DataGridSettingsMenu\";\r\nexport { default as DataGridToolbar } from \"./DataGridToolbar\";\r\n/**\r\n * rowActions — business descriptors → the row's kebab menu (gap G-41).\r\n *\r\n * The library shipped both halves — `OverflowMenu` renders flat actions,\r\n * `DataGrid.rowActions` takes a `(row) => ReactNode` — and not the step\r\n * between them, which every listing wrote for itself while carrying three\r\n * Charter rules (R-3.3, R-B.6, R-K.1).\r\n *\r\n * `buildRowActionMenu` is exported alongside the renderer on purpose: a row\r\n * appears twice, as a table row and as a `MobileRowCard` whose `actions` prop\r\n * takes `OverflowMenuAction[]` rather than a node. Without it, hosts rebuilt\r\n * the menu by hand for the card and the two copies drifted — the same failure\r\n * the library records for `RowFavoriteToggle` (G-36).\r\n *\r\n * Promoted from `refonte-frontend` (Area 5), where it served twelve screens.\r\n */\r\nexport {\r\n buildRowActions,\r\n buildRowActionMenu,\r\n MAX_ROW_ACTIONS,\r\n} from \"./rowActions\";\r\nexport type { RowActionDescriptor, BuildRowActionsOptions } from \"./rowActions\";\r\n/**\r\n * FilterTabBar — the status-chip bar of a listing card (gap G-45).\r\n *\r\n * §Status Chips is a MUST on every listing, and the library shipped the PILL\r\n * (`FilterTab`) without the bar that seats it — so each listing re-derived the\r\n * row geometry, the card-header separator, and the split between the status\r\n * group and the personalization controls.\r\n *\r\n * Promoted from `refonte-frontend` (Area 5), where FOUR listings carried the\r\n * same `BARRE_CHIPS_STATUT` + `GROUPE_BARRE` pair — and had already drifted:\r\n * one of the four omitted `justifyContent: \"space-between\"`, so the same\r\n * listing family rendered two different layouts (R-2.1).\r\n */\r\nexport { default as FilterTabBar } from \"./FilterTabBar\";\r\nexport type { FilterTabBarProps } from \"./FilterTabBar\";\r\n/**\r\n * filterCriteria — active criteria as removable chips (gap G-42).\r\n *\r\n * The library owned the RENDERING (`DataGridToolbar.filterChips` and the\r\n * `DataGridToolbarFilterChip` type, itself added at this module's request) and\r\n * not the builder. Ten local copies would have drifted on the two things that\r\n * are not obvious: what counts as SET (`0` is the unset value of a reference\r\n * mirror on several hosts) and what a removal must CLEAR (reference criteria\r\n * are held as pairs, so clearing only the displayed key leaves an invisible\r\n * filter that still filters).\r\n *\r\n * Pair with `useAppliedFilters`. Promoted from `refonte-frontend` (Area 5).\r\n */\r\nexport {\r\n buildFilterChips,\r\n filterCriteriaKeys,\r\n isCriterionSet,\r\n} from \"./filterCriteria\";\r\nexport type { FilterCriterion } from \"./filterCriteria\";\r\n/**\r\n * DataGridToolbar contracts — public typed surface (gap G-I).\r\n *\r\n * Meme defaut que les blocs `StepStatus`, `FieldHelp`, `Status` et `Field` :\r\n * la barre d'outils etait exportee comme VALEUR, sans les types de ses props.\r\n * `DataGridToolbarFilterChip` est celui qui manque le plus : §Filters et\r\n * §Search des Platform Mandatory UX Patterns imposent des criteres actifs\r\n * retirables, `filterChips` est la capacite qui les rend, et un hote qui\r\n * construit ce tableau a besoin de la forme d'une entree.\r\n *\r\n * Sans le type, il redeclare `{ key, label, onRemove }` au point d'appel — ce\r\n * que les Platform TypeScript Guidelines interdisent (« Reusable types belong\r\n * inside Shared UI Library … Never duplicate »). Releve depuis\r\n * `refonte-frontend` (lot 8, ecart A9), ou dix listings doivent construire ces\r\n * pastilles a partir d'une brique partagee.\r\n *\r\n * `DataGridToolbarLabels` voyage avec : un hote qui traduit la barre d'outils\r\n * en a besoin, et c'est la meme duplication un niveau plus bas.\r\n *\r\n * FLAT-ONLY, per the policy note in src/lib/index.ts.\r\n * Additive and type-only: no runtime change, no existing export altered.\r\n */\r\nexport type {\r\n DataGridToolbarProps,\r\n DataGridToolbarFilterChip,\r\n DataGridToolbarLabels,\r\n} from \"./DataGridToolbar\";\r\nexport { default as CollapsibleDataGrid } from \"./CollapsibleDataGrid\";\r\nexport { default as SortableHeader, getAriaSort } from \"./SortableHeader\";\r\nexport { default as NetworkErrorBanner } from \"./NetworkErrorBanner\";\r\nexport { default as ReferentielField } from \"./ReferentielField\";\r\n/**\r\n * ReferentielField configuration types — public typed surface.\r\n *\r\n * Same class of gap as Gap-TS-003 (component types), which was fixed for\r\n * `./components` but never extended to `./patterns`: the VALUE above was\r\n * exported while the types describing its own REQUIRED props were not.\r\n * `columns` and `criteria` are mandatory-to-configure, so a consumer had no\r\n * way to type them without either deep-importing\r\n * `@portnet/ui/dist/v2/patterns/…` (fragile, bypasses the `exports` map) or\r\n * declaring a local twin — which the Platform TypeScript Guidelines forbid\r\n * (\"Reusable types belong inside Shared UI Library … Never duplicate\").\r\n *\r\n * `ReferentielSearchResult` and `ReferentielSearchParams` are deliberately\r\n * NOT re-exported here: identically-named types are already surfaced from\r\n * `./referentiel` (useReferentielSearch) and `./v2/models` respectively, and\r\n * `src/lib/index.ts` star-exports all three barrels — a second named export of\r\n * either identifier is a hard TS2308 ambiguity at the library root.\r\n *\r\n * Additive and type-only: no runtime change, no existing export altered.\r\n */\r\nexport type {\r\n ReferentielFieldProps,\r\n ReferentielCriterion,\r\n ReferentielFieldLabels,\r\n} from \"./ReferentielField\";\r\nexport { default as Tour } from \"./Tour\";\r\nexport { default as KeyboardShortcutsHelp } from \"./KeyboardShortcutsHelp\";\r\nexport { default as DeleteResourceConfirmDialog } from \"./DeleteResourceConfirmDialog\";\r\n\r\n// ── Personalization · Saved Filters framework (v2/personalization) ────────────\r\n// SaveFilterDialog is presentational; SavedFiltersMenu is connected to the\r\n// savedFilters capability via useSavedFilters.\r\nexport { default as SaveFilterDialog } from \"./SaveFilterDialog\";\r\nexport { default as SavedFiltersMenu } from \"./SavedFiltersMenu\";\r\n\r\n// ── Personalization · Favorites DataGrid integration (v2/personalization) ─────\r\n// makeFavoriteColumn builds an always-visible favorites column for v2.DataGrid;\r\n// FavoritesFilter is the all/favorites-only segmented control.\r\nexport { default as makeFavoriteColumn } from \"./FavoriteColumn\";\r\nexport { default as FavoritesFilter } from \"./FavoritesFilter\";\r\nexport type { FavoritesFilterProps, FavoritesFilterLabels } from \"./FavoritesFilter\";\r\n\r\n/**\r\n * RowFavoriteToggle — the per-row follow star, standalone (gap G-36).\r\n *\r\n * It already existed as a PRIVATE `FavoriteCell` inside `makeFavoriteColumn`,\r\n * which made the follow control reachable as a DataGrid column and nowhere\r\n * else. The other place a row always appears is the mobile card: `DataGrid`\r\n * swaps to `renderMobileCard` below its `mobileBreakpoint`, and\r\n * `MobileRowCard` has a `leading` slot for exactly this — but a column\r\n * definition cannot be rendered into a slot, so hosts rebuilt the star by\r\n * hand (`onssa-export-fe`'s `MobileFavoriteToggle`; `ms-ti-fe` destructures\r\n * the same MobileRowCard + FavoriteToggle + useIsFavorite trio).\r\n *\r\n * Same failure mode as G-10: the library owned the behaviour but exposed it at\r\n * one composition point only. And the copies drifted where it is least visible\r\n * and matters most — the local twin announced \"Ajouter aux favoris\" while the\r\n * grid column on the same page said \"Suivre\", and it dropped the status\r\n * tooltip. `makeFavoriteColumn` now renders this component, so the two agree\r\n * by construction.\r\n */\r\nexport { default as RowFavoriteToggle, DEFAULT_ROW_FAVORITE_LABELS } from \"./RowFavoriteToggle\";\r\nexport type {\r\n RowFavoriteToggleProps,\r\n RowFavoriteToggleLabels,\r\n FavoriteToggleSize,\r\n} from \"./RowFavoriteToggle\";\r\n\r\n// ── Formik bridges ────────────────────────────────────────────────────────────\r\nexport { default as FormikInput } from \"./FormikInput\";\r\nexport { default as FormikTextarea } from \"./FormikTextarea\";\r\nexport { default as FormikSelect } from \"./FormikSelect\";\r\nexport { default as FormikCombobox } from \"./FormikCombobox\";\r\n/**\r\n * FormikCombobox props — public typed surface.\r\n *\r\n * SAME GAP-TS-003 CLASS as the ReferentielField note above. That fix covered\r\n * `ReferentielField` and `FormikReferentielField` but was not extended to the\r\n * other Formik bridges: the VALUE is exported while the type describing its props\r\n * is not, so a consumer cannot write `Omit<FormikComboboxProps<T>, …>`.\r\n *\r\n * REQUESTED BY bmdav-fe (TypeScript migration, batch 6f). That module stores the\r\n * OPTION OBJECT in Formik rather than a primitive key, because its payload mapper\r\n * reads `values.typeDemande.id` and sends `delegationTraitement` as a whole\r\n * object — so it cannot adopt the primitive-key model without changing the\r\n * request body sent to bmdav-be. It contains the resulting variance in ONE local\r\n * adapter (`ObjectValuedFormikCombobox`) rather than scattering assertions across\r\n * call sites, and that adapter must restate this component's prop contract minus\r\n * `getOptionValue`. The deep-import fallback is unavailable under\r\n * `moduleResolution: \"bundler\"`, since the package `exports` map does not expose\r\n * `dist/v2/patterns/*`.\r\n *\r\n * `ComboboxOptionValue` is deliberately NOT re-exported here — it is already\r\n * surfaced from `./components` (Combobox), and a second named export at the\r\n * library root would be a TS2308 ambiguity, exactly as recorded above for\r\n * `ReferentielSearchResult` / `ReferentielSearchParams`.\r\n *\r\n * Additive and type-only: no runtime change, no existing export altered.\r\n */\r\nexport type { FormikComboboxProps } from \"./FormikCombobox\";\r\nexport { default as FormikDatePicker } from \"./FormikDatePicker\";\r\nexport { default as FormikFile } from \"./FormikFile\";\r\nexport { default as FormikCheckboxGroup } from \"./FormikCheckboxGroup\";\r\n/**\r\n * FormikCheckbox — pont pour une case a cocher BOOLEENNE simple (gap G-A).\r\n *\r\n * `FormikCheckboxGroup` porte un TABLEAU de valeurs selectionnees : un hote\r\n * dont l'etat est un booleen (`autreInfo.fabrication`,\r\n * `objectDeclaration.premiereDeclaration`) ne peut pas l'adopter sans changer\r\n * ce que son payload envoie. Faute de pont, les modules recablaient\r\n * `Checkbox` + `useField` a la main — duplication interdite par R-2.1, et qui\r\n * perdait systematiquement le rendu de l'erreur (R-4.1 MUST).\r\n *\r\n * Le type de props est expose : meme classe que Gap-TS-003 ci-dessus.\r\n */\r\nexport { default as FormikCheckbox } from \"./FormikCheckbox\";\r\nexport type { FormikCheckboxProps } from \"./FormikCheckbox\";\r\n/**\r\n * FormikRadioGroup — pont pour un groupe de radios (gap G-C).\r\n *\r\n * R-Sel.2 est un MUST : 2-3 options -> Radio ou Segmented, jamais un Select.\r\n * Toute question metier binaire passe donc par `RadioGroup`, qui n'avait aucun\r\n * pont Formik la ou `FormikSelect`, `FormikCombobox`, `FormikCheckboxGroup` et\r\n * les autres en ont un. Les hotes recablaient `useField` + `RadioGroup` a la\r\n * main, et y perdaient `FieldError`.\r\n *\r\n * Contrat invisible a connaitre : la valeur ECRITE est celle DECLAREE dans\r\n * `options`, pas la chaine que rapporte le DOM — un hote aux options\r\n * numeriques continue de stocker des nombres.\r\n */\r\nexport { default as FormikRadioGroup } from \"./FormikRadioGroup\";\r\nexport type { FormikRadioGroupProps } from \"./FormikRadioGroup\";\r\n/**\r\n * FormikDateTimePicker — pont date + HEURE (gap G-E).\r\n *\r\n * `FormikDatePicker` etait le seul pont de date de la library, et il est\r\n * date-seule. Un hote ayant besoin de l'heure devait soit la perdre — ce qui\r\n * change ce que recoit le backend, pas seulement l'affichage — soit recabler\r\n * `useField` + le `DateTimePicker` nu, donc dupliquer.\r\n *\r\n * Les deux ponts PARTAGENT `coerceToDate` / `serialiseDate`\r\n * (`./_pickerSerialisation`) : voir la note S-03 de `FormikDatePicker` pour ce\r\n * qui arrive quand la lecture et l'ecriture d'une date divergent.\r\n */\r\nexport { default as FormikDateTimePicker } from \"./FormikDateTimePicker\";\r\nexport type { FormikDateTimePickerProps } from \"./FormikDateTimePicker\";\r\nexport { default as FormikReferentielField } from \"./FormikReferentielField\";\r\nexport type { FormikReferentielFieldProps } from \"./FormikReferentielField\";\r\n\r\n/** Affichage valeur système — fond grisé, aucune interaction.\r\n * Utiliser à la place de FormikInput disabled pour les champs\r\n * auto-générés ou non modifiables par l'utilisateur. */\r\nexport { default as FormikDisplay } from \"../components/FormikDisplay\";\r\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,SAAS,QAAmB,aAAa;AAE7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASD,OAAO,IAAIE,OAAO,QAAqB,WAAW;AAE3D,SAASF,OAAO,IAAIG,aAAa,QAAe,iBAAiB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASH,OAAO,IAAII,WAAW,QAAiB,eAAe;AAE/D,SAASJ,OAAO,IAAIK,aAAa,QAAe,iBAAiB;AACjE,SAASL,OAAO,IAAIM,WAAW,QAAiB,eAAe;AAC/D,SAASN,OAAO,IAAIO,aAAa,QAAe,iBAAiB;AACjE,SAASP,OAAO,IAAIQ,gBAAgB,QAAY,oBAAoB;AAEpE;AACA;AACA,SAASR,OAAO,IAAIS,gBAAgB,QAAY,oBAAoB;AAEpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAST,OAAO,IAAIU,kBAAkB,QAAU,sBAAsB;AAEtE,SAASV,OAAO,IAAIW,WAAW,QAAiB,eAAe;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASX,OAAO,IAAIY,WAAW,QAAiB,eAAe;AAE/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASZ,OAAO,IAAIa,aAAa,QAAe,iBAAiB;AAMjE,SAASb,OAAO,IAAIc,QAAQ,EAAEC,SAAS,QAAS,YAAY;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASf,OAAO,IAAIgB,mBAAmB,QAAS,uBAAuB;AAKvE,SAAShB,OAAO,IAAIiB,oBAAoB,QAAQ,wBAAwB;AACxE,SAASjB,OAAO,IAAIkB,eAAe,QAAa,mBAAmB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SACEC,eAAe,EACfC,kBAAkB,EAClBC,eAAe,QACV,cAAc;AAErB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASrB,OAAO,IAAIsB,YAAY,QAAgB,gBAAgB;AAEhE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SACEC,gBAAgB,EAChBC,kBAAkB,EAClBC,cAAc,QACT,kBAAkB;;AAEzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAMA,SAASzB,OAAO,IAAI0B,mBAAmB,QAAS,uBAAuB;AACvE,SAAS1B,OAAO,IAAI2B,cAAc,EAAEC,WAAW,QAAQ,kBAAkB;AACzE,SAAS5B,OAAO,IAAI6B,kBAAkB,QAAU,sBAAsB;AACtE,SAAS7B,OAAO,IAAI8B,gBAAgB,QAAY,oBAAoB;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAMA,SAAS9B,OAAO,IAAI+B,IAAI,QAAwB,QAAQ;AACxD,SAAS/B,OAAO,IAAIgC,qBAAqB,QAAQ,yBAAyB;AAC1E,SAAShC,OAAO,IAAIiC,2BAA2B,QAAQ,+BAA+B;;AAEtF;AACA;AACA;AACA,SAASjC,OAAO,IAAIkC,gBAAgB,QAAY,oBAAoB;AACpE,SAASlC,OAAO,IAAImC,gBAAgB,QAAY,oBAAoB;;AAEpE;AACA;AACA;AACA,SAASnC,OAAO,IAAIoC,kBAAkB,QAAU,kBAAkB;AAClE,SAASpC,OAAO,IAAIqC,eAAe,QAAa,mBAAmB;AAGnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASrC,OAAO,IAAIsC,iBAAiB,EAAEC,2BAA2B,QAAQ,qBAAqB;AAO/F;AACA,SAASvC,OAAO,IAAIwC,WAAW,QAAiB,eAAe;AAC/D,SAASxC,OAAO,IAAIyC,cAAc,QAAc,kBAAkB;AAClE,SAASzC,OAAO,IAAI0C,YAAY,QAAgB,gBAAgB;AAChE,SAAS1C,OAAO,IAAI2C,cAAc,QAAc,kBAAkB;AAClE;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,SAAS3C,OAAO,IAAI4C,gBAAgB,QAAY,oBAAoB;AACpE,SAAS5C,OAAO,IAAI6C,UAAU,QAAkB,cAAc;AAC9D,SAAS7C,OAAO,IAAI8C,mBAAmB,QAAS,uBAAuB;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS9C,OAAO,IAAI+C,cAAc,QAAc,kBAAkB;AAElE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS/C,OAAO,IAAIgD,gBAAgB,QAAY,oBAAoB;AAEpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAShD,OAAO,IAAIiD,oBAAoB,QAAQ,wBAAwB;AAExE,SAASjD,OAAO,IAAIkD,sBAAsB,QAAQ,0BAA0B;AAG5E;AACA;AACA;AACA,SAASlD,OAAO,IAAImD,aAAa,QAAe,6BAA6B","ignoreList":[]}
@@ -0,0 +1,223 @@
1
+ import * as React from "react";
2
+ import OverflowMenu from "../components/OverflowMenu";
3
+ import Button from "../components/Button";
4
+ import Tooltip from "../components/Tooltip";
5
+
6
+ /**
7
+ * rowActions — business action descriptors → the row's kebab menu
8
+ * (capability gap G-41).
9
+ *
10
+ * ─────────────────────────────────────────────────────────────────────────────
11
+ * WHY THIS BELONGS IN THE LIBRARY
12
+ *
13
+ * The library ships both halves already: `OverflowMenu` renders a flat list of
14
+ * actions, and `DataGrid.rowActions` takes a `(row) => ReactNode` renderer. The
15
+ * step between them is what every listing writes for itself — turning the
16
+ * BUSINESS description of an action ("visible only on a draft", "greyed out
17
+ * while the request is in flight") into a menu for ONE row.
18
+ *
19
+ * That step is not glue. It carries three rules the Charter imposes, and each
20
+ * one is a rule a host can only get right by re-deriving it:
21
+ *
22
+ * R-3.3 ≤ 1 primary + ≤ 3 secondary actions per screen, hence the kebab.
23
+ * R-B.6 a destructive action is separated and marked, not merely last.
24
+ * R-K.1 every mouse-reachable action is keyboard-reachable — which is what
25
+ * `OverflowMenu` gives and what hover-revealed icon rows never did.
26
+ *
27
+ * Promoted from `refonte-frontend` (Area 5), where it served TWELVE screens and
28
+ * had already replaced a local `TableActions` that revealed its actions on
29
+ * hover, via a `mouseup` listener on `document`, with no keyboard equivalent
30
+ * and no `role` / `aria-*`. On those screens, consulting, editing or deleting a
31
+ * file was unreachable without a mouse — the Charter lists "hover-only
32
+ * interactions" among its Forbidden Practices for exactly this reason.
33
+ * ─────────────────────────────────────────────────────────────────────────────
34
+ *
35
+ * PREDICATES, NOT BOOLEANS, AND THAT IS THE WHOLE POINT. `hidden` and
36
+ * `disabled` take the ROW: an action's availability depends on the state of
37
+ * that row, so it must be evaluated per row, at render. A boolean would force
38
+ * the host to rebuild the descriptor array per row — which is how a card and a
39
+ * table row end up offering different actions for the same record.
40
+ *
41
+ * >>> THE TWO SURFACES ARE WHY `buildRowActionMenu` IS EXPORTED SEPARATELY.
42
+ * >>> A row appears twice: as a table row and, below the mobile breakpoint, as
43
+ * >>> a `MobileRowCard` whose `actions` prop takes `OverflowMenuAction[]` —
44
+ * >>> not a node. With only the renderer exported, a host had to rebuild the
45
+ * >>> menu by hand for the card, and the two copies drifted on the danger
46
+ * >>> separator, the overflow warning and the evaluation of the predicates.
47
+ * >>> The library documents that exact failure for `RowFavoriteToggle`
48
+ * >>> (gap G-36): the local twin announced "Ajouter aux favoris" while the
49
+ * >>> grid column on the same page said "Suivre". Same shape, one level up. <
50
+ *
51
+ * Usage:
52
+ *
53
+ * const descriptors: RowActionDescriptor<Dossier>[] = [
54
+ * { id: "open", label: "Consulter le dossier", icon: <Visibility />, onClick: open },
55
+ * { id: "del", label: "Supprimer définitivement", icon: <Delete />,
56
+ * onClick: remove, danger: true, hidden: (row) => row.status !== "DRAFT" },
57
+ * ];
58
+ *
59
+ * <DataGrid rowActions={buildRowActions(descriptors, `Actions sur ${row.reference}`)} />
60
+ * <MobileRowCard actions={buildRowActionMenu(descriptors, row)} />
61
+ */
62
+
63
+ /** Charter contract of `OverflowMenu`: ancillary row actions, ≤ 7 items. */
64
+ import { jsx as _jsx } from "react/jsx-runtime";
65
+ export const MAX_ROW_ACTIONS = 7;
66
+
67
+ /**
68
+ * One row action, described by the business.
69
+ *
70
+ * `hidden` and `disabled` are PREDICATES on the row, not booleans — see the
71
+ * note above.
72
+ */
73
+
74
+ /**
75
+ * Menu items for ONE row. Predicates are evaluated here, per call.
76
+ *
77
+ * Returns an empty array when nothing is visible, so a caller can decide to
78
+ * render no trigger at all rather than an empty menu.
79
+ */
80
+ export function buildRowActionMenu(descriptors, row) {
81
+ const visible = descriptors.filter(d => !d.hidden?.(row));
82
+ if (visible.length === 0) return [];
83
+
84
+ /* `process.env["NODE_ENV"]` and not `.NODE_ENV`:
85
+ * `noPropertyAccessFromIndexSignature` is mandatory platform-wide, precisely
86
+ * so a missing key cannot read as a guaranteed field. */
87
+ if (process.env["NODE_ENV"] !== "production" && visible.length > MAX_ROW_ACTIONS) {
88
+ // eslint-disable-next-line no-console
89
+ console.warn(`[@portnet/ui] buildRowActionMenu: ${visible.length} actions visible on ` + `one row; OverflowMenu's contract recommends at most ${MAX_ROW_ACTIONS} ` + `(R-3.3). Group them, or move some to the detail page.`);
90
+ }
91
+ const items = [];
92
+ let separatorPlaced = false;
93
+ visible.forEach(d => {
94
+ /* Separator before the FIRST destructive action, and only if something
95
+ * precedes it — a menu does not open on a rule. */
96
+ if (d.danger && !separatorPlaced && items.length > 0) {
97
+ items.push({
98
+ divider: true
99
+ });
100
+ separatorPlaced = true;
101
+ }
102
+ /* Conditional spreads, not `undefined` values: `exactOptionalPropertyTypes`
103
+ * is mandatory platform-wide, so an explicit `undefined` is not the same as
104
+ * an absent key — and `mergeLabels` exists in this library because a spread
105
+ * of `undefined` had silently deleted defaults elsewhere. */
106
+ items.push({
107
+ label: d.label,
108
+ ...(d.icon !== undefined ? {
109
+ icon: d.icon
110
+ } : {}),
111
+ onClick: () => d.onClick(row),
112
+ ...(d.danger !== undefined ? {
113
+ danger: d.danger
114
+ } : {}),
115
+ ...(d.disabled ? {
116
+ disabled: d.disabled(row)
117
+ } : {}),
118
+ ...(d.shortcut !== undefined ? {
119
+ shortcut: d.shortcut
120
+ } : {})
121
+ });
122
+ });
123
+ return items;
124
+ }
125
+
126
+ /**
127
+ * Options of {@link buildRowActions}.
128
+ */
129
+
130
+ /**
131
+ * Renderer for `DataGrid.rowActions`.
132
+ *
133
+ * Predicates are evaluated per row, at each cell render. Renders nothing when
134
+ * no action is visible for that row, rather than a trigger that opens an empty
135
+ * menu.
136
+ *
137
+ * NO DEFAULT `ariaLabel` (defect D-12). It used to default to the literal
138
+ * "Actions", which was forwarded to `OverflowMenu`'s `ariaLabel` — and that
139
+ * prop WINS over `labels.trigger`. So a row kebab built here announced
140
+ * "Actions" while every other kebab in the fleet announced OverflowMenu's
141
+ * canonical "Plus d'actions": one concept, two names, which R-2.4 forbids.
142
+ * `MobileRowCard` had the identical defect and was fixed by removing its
143
+ * default; this is the same repair, applied one level up. Omit the argument
144
+ * and OverflowMenu now names itself.
145
+ *
146
+ * PASS A CONTEXTUAL NAME ANYWAY. Neither default is good in a list: twenty
147
+ * identically-named kebabs give a screen-reader user no way to tell which row
148
+ * they are on. `Actions sur le dossier 2025-IM-00042` does.
149
+ *
150
+ * TWO SHAPES, ONE CONTRACT (`iconsUpTo` — promoted from `refonte-frontend`,
151
+ * Area 5). The kebab is the right shape for many or ancillary actions; a row
152
+ * with two or three primary ones reads better as icon buttons, and
153
+ * §Row Interaction treats those as COMPLEMENTARY to the row click. Hosts were
154
+ * writing that second shape themselves — this module served twelve screens
155
+ * with a local copy — which put the R-B.5 `aria-label`, the danger variant and
156
+ * the fallback rule outside the library.
157
+ *
158
+ * NOT hover-only, and that distinction is what makes it admissible: `DataGrid`
159
+ * reveals this renderer's output through `ROW_ACTIONS_OVERLAY_SX`, which keys
160
+ * on `tr:hover`, `tr:focus-within` AND `@media (pointer: coarse)` — so the
161
+ * buttons are reachable by keyboard and on touch (R-K.1). A host that renders
162
+ * an icon row elsewhere, without that overlay, owns that requirement itself.
163
+ *
164
+ * Above the threshold the menu is built by {@link buildRowActionMenu}, so the
165
+ * danger separator and the R-3.3 overflow warning are not re-derived here.
166
+ *
167
+ * @param descriptors actions in display order
168
+ * @param ariaLabel accessible name of the trigger. Omit to inherit
169
+ * OverflowMenu's canonical name; prefer a row-specific one.
170
+ * @param options `{ iconsUpTo }` — see {@link BuildRowActionsOptions}
171
+ */
172
+ export function buildRowActions(descriptors, ariaLabel, options) {
173
+ const iconsUpTo = options?.iconsUpTo;
174
+ return row => {
175
+ /* SAME predicate as `buildRowActionMenu`: how many actions this row
176
+ * actually shows decides the shape, so it must be known before the menu
177
+ * is built. */
178
+ const visible = descriptors.filter(d => !d.hidden?.(row));
179
+ if (visible.length === 0) return null;
180
+ if (iconsUpTo !== undefined && visible.length <= iconsUpTo) {
181
+ /* No spacing container here: `ROW_ACTIONS_OVERLAY_SX` (DataGrid) is
182
+ * already a flex row with `gap: var(--s-1)`. Re-posing one would
183
+ * duplicate the same token one level lower. */
184
+ return visible.map(d => {
185
+ const textLabel = typeof d.label === "string" ? d.label : undefined;
186
+ if (process.env["NODE_ENV"] !== "production" && textLabel === undefined) {
187
+ // eslint-disable-next-line no-console
188
+ console.warn(`[@portnet/ui] buildRowActions: action "${d.id}" has a non-textual ` + "label, so its icon button gets no explicit aria-label (R-B.5). " + "Give the descriptor a string label, or drop `iconsUpTo` for this grid.");
189
+ }
190
+ return /*#__PURE__*/_jsx(Tooltip, {
191
+ title: d.label,
192
+ children: /*#__PURE__*/_jsx(Button, {
193
+ iconOnly: true,
194
+ variant: d.danger ? "danger" : "ghost",
195
+ size: "sm",
196
+ ...(d.icon !== undefined ? {
197
+ icon: d.icon
198
+ } : {}),
199
+ onClick: () => d.onClick(row),
200
+ ...(d.disabled ? {
201
+ disabled: d.disabled(row)
202
+ } : {}),
203
+ ...(textLabel !== undefined ? {
204
+ "aria-label": textLabel
205
+ } : {})
206
+ })
207
+ }, d.id);
208
+ });
209
+ }
210
+ const items = buildRowActionMenu(descriptors, row);
211
+ if (items.length === 0) return null;
212
+ /* Conditional spread rather than ariaLabel={ariaLabel}: passing an
213
+ * explicit undefined would still override OverflowMenu's own label
214
+ * under exactOptionalPropertyTypes semantics (defect D-12). */
215
+ return /*#__PURE__*/_jsx(OverflowMenu, {
216
+ actions: items,
217
+ ...(ariaLabel !== undefined ? {
218
+ ariaLabel
219
+ } : {})
220
+ });
221
+ };
222
+ }
223
+ //# sourceMappingURL=rowActions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rowActions.js","names":["React","OverflowMenu","Button","Tooltip","jsx","_jsx","MAX_ROW_ACTIONS","buildRowActionMenu","descriptors","row","visible","filter","d","hidden","length","process","env","console","warn","items","separatorPlaced","forEach","danger","push","divider","label","icon","undefined","onClick","disabled","shortcut","buildRowActions","ariaLabel","options","iconsUpTo","map","textLabel","id","title","children","iconOnly","variant","size","actions"],"sources":["../../../../src/lib/v2/patterns/rowActions.tsx"],"sourcesContent":["import * as React from \"react\";\r\nimport OverflowMenu from \"../components/OverflowMenu\";\r\nimport type { OverflowMenuAction } from \"../components/OverflowMenu\";\r\nimport Button from \"../components/Button\";\r\nimport Tooltip from \"../components/Tooltip\";\r\n\r\n/**\r\n * rowActions — business action descriptors → the row's kebab menu\r\n * (capability gap G-41).\r\n *\r\n * ─────────────────────────────────────────────────────────────────────────────\r\n * WHY THIS BELONGS IN THE LIBRARY\r\n *\r\n * The library ships both halves already: `OverflowMenu` renders a flat list of\r\n * actions, and `DataGrid.rowActions` takes a `(row) => ReactNode` renderer. The\r\n * step between them is what every listing writes for itself — turning the\r\n * BUSINESS description of an action (\"visible only on a draft\", \"greyed out\r\n * while the request is in flight\") into a menu for ONE row.\r\n *\r\n * That step is not glue. It carries three rules the Charter imposes, and each\r\n * one is a rule a host can only get right by re-deriving it:\r\n *\r\n * R-3.3 ≤ 1 primary + ≤ 3 secondary actions per screen, hence the kebab.\r\n * R-B.6 a destructive action is separated and marked, not merely last.\r\n * R-K.1 every mouse-reachable action is keyboard-reachable — which is what\r\n * `OverflowMenu` gives and what hover-revealed icon rows never did.\r\n *\r\n * Promoted from `refonte-frontend` (Area 5), where it served TWELVE screens and\r\n * had already replaced a local `TableActions` that revealed its actions on\r\n * hover, via a `mouseup` listener on `document`, with no keyboard equivalent\r\n * and no `role` / `aria-*`. On those screens, consulting, editing or deleting a\r\n * file was unreachable without a mouse — the Charter lists \"hover-only\r\n * interactions\" among its Forbidden Practices for exactly this reason.\r\n * ─────────────────────────────────────────────────────────────────────────────\r\n *\r\n * PREDICATES, NOT BOOLEANS, AND THAT IS THE WHOLE POINT. `hidden` and\r\n * `disabled` take the ROW: an action's availability depends on the state of\r\n * that row, so it must be evaluated per row, at render. A boolean would force\r\n * the host to rebuild the descriptor array per row — which is how a card and a\r\n * table row end up offering different actions for the same record.\r\n *\r\n * >>> THE TWO SURFACES ARE WHY `buildRowActionMenu` IS EXPORTED SEPARATELY.\r\n * >>> A row appears twice: as a table row and, below the mobile breakpoint, as\r\n * >>> a `MobileRowCard` whose `actions` prop takes `OverflowMenuAction[]` —\r\n * >>> not a node. With only the renderer exported, a host had to rebuild the\r\n * >>> menu by hand for the card, and the two copies drifted on the danger\r\n * >>> separator, the overflow warning and the evaluation of the predicates.\r\n * >>> The library documents that exact failure for `RowFavoriteToggle`\r\n * >>> (gap G-36): the local twin announced \"Ajouter aux favoris\" while the\r\n * >>> grid column on the same page said \"Suivre\". Same shape, one level up. <\r\n *\r\n * Usage:\r\n *\r\n * const descriptors: RowActionDescriptor<Dossier>[] = [\r\n * { id: \"open\", label: \"Consulter le dossier\", icon: <Visibility />, onClick: open },\r\n * { id: \"del\", label: \"Supprimer définitivement\", icon: <Delete />,\r\n * onClick: remove, danger: true, hidden: (row) => row.status !== \"DRAFT\" },\r\n * ];\r\n *\r\n * <DataGrid rowActions={buildRowActions(descriptors, `Actions sur ${row.reference}`)} />\r\n * <MobileRowCard actions={buildRowActionMenu(descriptors, row)} />\r\n */\r\n\r\n/** Charter contract of `OverflowMenu`: ancillary row actions, ≤ 7 items. */\r\nexport const MAX_ROW_ACTIONS = 7;\r\n\r\n/**\r\n * One row action, described by the business.\r\n *\r\n * `hidden` and `disabled` are PREDICATES on the row, not booleans — see the\r\n * note above.\r\n */\r\nexport interface RowActionDescriptor<T> {\r\n /** Stable identifier — render key and test anchor. */\r\n id: string;\r\n /** Menu label. Verb + object (R-B.3, §9.2). */\r\n label: React.ReactNode;\r\n icon?: React.ReactNode | undefined;\r\n onClick: (row: T) => void;\r\n /** Hides the action for this row. */\r\n hidden?: ((row: T) => boolean) | undefined;\r\n /** Shows the action but disables it for this row. */\r\n disabled?: ((row: T) => boolean) | undefined;\r\n /** Destructive: separator before, danger styling (R-B.6). */\r\n danger?: boolean | undefined;\r\n /** Keyboard shortcut rendered at the end of the item. */\r\n shortcut?: React.ReactNode | undefined;\r\n}\r\n\r\n/**\r\n * Menu items for ONE row. Predicates are evaluated here, per call.\r\n *\r\n * Returns an empty array when nothing is visible, so a caller can decide to\r\n * render no trigger at all rather than an empty menu.\r\n */\r\nexport function buildRowActionMenu<T>(\r\n descriptors: readonly RowActionDescriptor<T>[],\r\n row: T\r\n): OverflowMenuAction[] {\r\n const visible = descriptors.filter((d) => !d.hidden?.(row));\r\n if (visible.length === 0) return [];\r\n\r\n /* `process.env[\"NODE_ENV\"]` and not `.NODE_ENV`:\r\n * `noPropertyAccessFromIndexSignature` is mandatory platform-wide, precisely\r\n * so a missing key cannot read as a guaranteed field. */\r\n if (\r\n process.env[\"NODE_ENV\"] !== \"production\" &&\r\n visible.length > MAX_ROW_ACTIONS\r\n ) {\r\n // eslint-disable-next-line no-console\r\n console.warn(\r\n `[@portnet/ui] buildRowActionMenu: ${visible.length} actions visible on ` +\r\n `one row; OverflowMenu's contract recommends at most ${MAX_ROW_ACTIONS} ` +\r\n `(R-3.3). Group them, or move some to the detail page.`\r\n );\r\n }\r\n\r\n const items: OverflowMenuAction[] = [];\r\n let separatorPlaced = false;\r\n\r\n visible.forEach((d) => {\r\n /* Separator before the FIRST destructive action, and only if something\r\n * precedes it — a menu does not open on a rule. */\r\n if (d.danger && !separatorPlaced && items.length > 0) {\r\n items.push({ divider: true });\r\n separatorPlaced = true;\r\n }\r\n /* Conditional spreads, not `undefined` values: `exactOptionalPropertyTypes`\r\n * is mandatory platform-wide, so an explicit `undefined` is not the same as\r\n * an absent key — and `mergeLabels` exists in this library because a spread\r\n * of `undefined` had silently deleted defaults elsewhere. */\r\n items.push({\r\n label: d.label,\r\n ...(d.icon !== undefined ? { icon: d.icon } : {}),\r\n onClick: () => d.onClick(row),\r\n ...(d.danger !== undefined ? { danger: d.danger } : {}),\r\n ...(d.disabled ? { disabled: d.disabled(row) } : {}),\r\n ...(d.shortcut !== undefined ? { shortcut: d.shortcut } : {}),\r\n });\r\n });\r\n\r\n return items;\r\n}\r\n\r\n/**\r\n * Options of {@link buildRowActions}.\r\n */\r\nexport interface BuildRowActionsOptions {\r\n /**\r\n * Render the row's VISIBLE actions as icon buttons while their count is\r\n * at most this value; fall back to the kebab menu above it.\r\n *\r\n * Omitted — the default — always renders the kebab, so existing callers\r\n * are untouched.\r\n *\r\n * The threshold counts actions visible FOR THAT ROW, never the number\r\n * declared: five descriptors whose `hidden` predicates are mutually\r\n * exclusive by status typically leave two or three per row.\r\n */\r\n iconsUpTo?: number | undefined;\r\n}\r\n\r\n/**\r\n * Renderer for `DataGrid.rowActions`.\r\n *\r\n * Predicates are evaluated per row, at each cell render. Renders nothing when\r\n * no action is visible for that row, rather than a trigger that opens an empty\r\n * menu.\r\n *\r\n * NO DEFAULT `ariaLabel` (defect D-12). It used to default to the literal\r\n * \"Actions\", which was forwarded to `OverflowMenu`'s `ariaLabel` — and that\r\n * prop WINS over `labels.trigger`. So a row kebab built here announced\r\n * \"Actions\" while every other kebab in the fleet announced OverflowMenu's\r\n * canonical \"Plus d'actions\": one concept, two names, which R-2.4 forbids.\r\n * `MobileRowCard` had the identical defect and was fixed by removing its\r\n * default; this is the same repair, applied one level up. Omit the argument\r\n * and OverflowMenu now names itself.\r\n *\r\n * PASS A CONTEXTUAL NAME ANYWAY. Neither default is good in a list: twenty\r\n * identically-named kebabs give a screen-reader user no way to tell which row\r\n * they are on. `Actions sur le dossier 2025-IM-00042` does.\r\n *\r\n * TWO SHAPES, ONE CONTRACT (`iconsUpTo` — promoted from `refonte-frontend`,\r\n * Area 5). The kebab is the right shape for many or ancillary actions; a row\r\n * with two or three primary ones reads better as icon buttons, and\r\n * §Row Interaction treats those as COMPLEMENTARY to the row click. Hosts were\r\n * writing that second shape themselves — this module served twelve screens\r\n * with a local copy — which put the R-B.5 `aria-label`, the danger variant and\r\n * the fallback rule outside the library.\r\n *\r\n * NOT hover-only, and that distinction is what makes it admissible: `DataGrid`\r\n * reveals this renderer's output through `ROW_ACTIONS_OVERLAY_SX`, which keys\r\n * on `tr:hover`, `tr:focus-within` AND `@media (pointer: coarse)` — so the\r\n * buttons are reachable by keyboard and on touch (R-K.1). A host that renders\r\n * an icon row elsewhere, without that overlay, owns that requirement itself.\r\n *\r\n * Above the threshold the menu is built by {@link buildRowActionMenu}, so the\r\n * danger separator and the R-3.3 overflow warning are not re-derived here.\r\n *\r\n * @param descriptors actions in display order\r\n * @param ariaLabel accessible name of the trigger. Omit to inherit\r\n * OverflowMenu's canonical name; prefer a row-specific one.\r\n * @param options `{ iconsUpTo }` — see {@link BuildRowActionsOptions}\r\n */\r\nexport function buildRowActions<T>(\r\n descriptors: readonly RowActionDescriptor<T>[],\r\n ariaLabel?: string,\r\n options?: BuildRowActionsOptions\r\n): (row: T) => React.ReactNode {\r\n const iconsUpTo = options?.iconsUpTo;\r\n\r\n return (row: T) => {\r\n /* SAME predicate as `buildRowActionMenu`: how many actions this row\r\n * actually shows decides the shape, so it must be known before the menu\r\n * is built. */\r\n const visible = descriptors.filter((d) => !d.hidden?.(row));\r\n if (visible.length === 0) return null;\r\n\r\n if (iconsUpTo !== undefined && visible.length <= iconsUpTo) {\r\n /* No spacing container here: `ROW_ACTIONS_OVERLAY_SX` (DataGrid) is\r\n * already a flex row with `gap: var(--s-1)`. Re-posing one would\r\n * duplicate the same token one level lower. */\r\n return visible.map((d) => {\r\n const textLabel = typeof d.label === \"string\" ? d.label : undefined;\r\n\r\n if (\r\n process.env[\"NODE_ENV\"] !== \"production\" &&\r\n textLabel === undefined\r\n ) {\r\n // eslint-disable-next-line no-console\r\n console.warn(\r\n `[@portnet/ui] buildRowActions: action \"${d.id}\" has a non-textual ` +\r\n \"label, so its icon button gets no explicit aria-label (R-B.5). \" +\r\n \"Give the descriptor a string label, or drop `iconsUpTo` for this grid.\"\r\n );\r\n }\r\n\r\n return (\r\n <Tooltip key={d.id} title={d.label}>\r\n <Button\r\n iconOnly\r\n variant={d.danger ? \"danger\" : \"ghost\"}\r\n size=\"sm\"\r\n {...(d.icon !== undefined ? { icon: d.icon } : {})}\r\n onClick={() => d.onClick(row)}\r\n {...(d.disabled ? { disabled: d.disabled(row) } : {})}\r\n {...(textLabel !== undefined\r\n ? { \"aria-label\": textLabel }\r\n : {})}\r\n />\r\n </Tooltip>\r\n );\r\n });\r\n }\r\n\r\n const items = buildRowActionMenu(descriptors, row);\r\n if (items.length === 0) return null;\r\n /* Conditional spread rather than ariaLabel={ariaLabel}: passing an\r\n * explicit undefined would still override OverflowMenu's own label\r\n * under exactOptionalPropertyTypes semantics (defect D-12). */\r\n return (\r\n <OverflowMenu\r\n actions={items}\r\n {...(ariaLabel !== undefined ? { ariaLabel } : {})}\r\n />\r\n );\r\n };\r\n}"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,OAAOC,YAAY,MAAM,4BAA4B;AAErD,OAAOC,MAAM,MAAM,sBAAsB;AACzC,OAAOC,OAAO,MAAM,uBAAuB;;AAE3C;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AAAA,SAAAC,GAAA,IAAAC,IAAA;AACA,OAAO,MAAMC,eAAe,GAAG,CAAC;;AAEhC;AACA;AACA;AACA;AACA;AACA;;AAkBA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,kBAAkBA,CAChCC,WAA8C,EAC9CC,GAAM,EACgB;EACtB,MAAMC,OAAO,GAAGF,WAAW,CAACG,MAAM,CAAEC,CAAC,IAAK,CAACA,CAAC,CAACC,MAAM,GAAGJ,GAAG,CAAC,CAAC;EAC3D,IAAIC,OAAO,CAACI,MAAM,KAAK,CAAC,EAAE,OAAO,EAAE;;EAEnC;AACF;AACA;EACE,IACEC,OAAO,CAACC,GAAG,CAAC,UAAU,CAAC,KAAK,YAAY,IACxCN,OAAO,CAACI,MAAM,GAAGR,eAAe,EAChC;IACA;IACAW,OAAO,CAACC,IAAI,CACV,qCAAqCR,OAAO,CAACI,MAAM,sBAAsB,GACvE,uDAAuDR,eAAe,GAAG,GACzE,uDACJ,CAAC;EACH;EAEA,MAAMa,KAA2B,GAAG,EAAE;EACtC,IAAIC,eAAe,GAAG,KAAK;EAE3BV,OAAO,CAACW,OAAO,CAAET,CAAC,IAAK;IACrB;AACJ;IACI,IAAIA,CAAC,CAACU,MAAM,IAAI,CAACF,eAAe,IAAID,KAAK,CAACL,MAAM,GAAG,CAAC,EAAE;MACpDK,KAAK,CAACI,IAAI,CAAC;QAAEC,OAAO,EAAE;MAAK,CAAC,CAAC;MAC7BJ,eAAe,GAAG,IAAI;IACxB;IACA;AACJ;AACA;AACA;IACID,KAAK,CAACI,IAAI,CAAC;MACTE,KAAK,EAAEb,CAAC,CAACa,KAAK;MACd,IAAIb,CAAC,CAACc,IAAI,KAAKC,SAAS,GAAG;QAAED,IAAI,EAAEd,CAAC,CAACc;MAAK,CAAC,GAAG,CAAC,CAAC,CAAC;MACjDE,OAAO,EAAEA,CAAA,KAAMhB,CAAC,CAACgB,OAAO,CAACnB,GAAG,CAAC;MAC7B,IAAIG,CAAC,CAACU,MAAM,KAAKK,SAAS,GAAG;QAAEL,MAAM,EAAEV,CAAC,CAACU;MAAO,CAAC,GAAG,CAAC,CAAC,CAAC;MACvD,IAAIV,CAAC,CAACiB,QAAQ,GAAG;QAAEA,QAAQ,EAAEjB,CAAC,CAACiB,QAAQ,CAACpB,GAAG;MAAE,CAAC,GAAG,CAAC,CAAC,CAAC;MACpD,IAAIG,CAAC,CAACkB,QAAQ,KAAKH,SAAS,GAAG;QAAEG,QAAQ,EAAElB,CAAC,CAACkB;MAAS,CAAC,GAAG,CAAC,CAAC;IAC9D,CAAC,CAAC;EACJ,CAAC,CAAC;EAEF,OAAOX,KAAK;AACd;;AAEA;AACA;AACA;;AAgBA;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,OAAO,SAASY,eAAeA,CAC7BvB,WAA8C,EAC9CwB,SAAkB,EAClBC,OAAgC,EACH;EAC7B,MAAMC,SAAS,GAAGD,OAAO,EAAEC,SAAS;EAEpC,OAAQzB,GAAM,IAAK;IACjB;AACJ;AACA;IACI,MAAMC,OAAO,GAAGF,WAAW,CAACG,MAAM,CAAEC,CAAC,IAAK,CAACA,CAAC,CAACC,MAAM,GAAGJ,GAAG,CAAC,CAAC;IAC3D,IAAIC,OAAO,CAACI,MAAM,KAAK,CAAC,EAAE,OAAO,IAAI;IAErC,IAAIoB,SAAS,KAAKP,SAAS,IAAIjB,OAAO,CAACI,MAAM,IAAIoB,SAAS,EAAE;MAC1D;AACN;AACA;MACM,OAAOxB,OAAO,CAACyB,GAAG,CAAEvB,CAAC,IAAK;QACxB,MAAMwB,SAAS,GAAG,OAAOxB,CAAC,CAACa,KAAK,KAAK,QAAQ,GAAGb,CAAC,CAACa,KAAK,GAAGE,SAAS;QAEnE,IACEZ,OAAO,CAACC,GAAG,CAAC,UAAU,CAAC,KAAK,YAAY,IACxCoB,SAAS,KAAKT,SAAS,EACvB;UACA;UACAV,OAAO,CAACC,IAAI,CACV,0CAA0CN,CAAC,CAACyB,EAAE,sBAAsB,GAClE,iEAAiE,GACjE,wEACJ,CAAC;QACH;QAEA,oBACEhC,IAAA,CAACF,OAAO;UAAYmC,KAAK,EAAE1B,CAAC,CAACa,KAAM;UAAAc,QAAA,eACjClC,IAAA,CAACH,MAAM;YACLsC,QAAQ;YACRC,OAAO,EAAE7B,CAAC,CAACU,MAAM,GAAG,QAAQ,GAAG,OAAQ;YACvCoB,IAAI,EAAC,IAAI;YAAA,IACJ9B,CAAC,CAACc,IAAI,KAAKC,SAAS,GAAG;cAAED,IAAI,EAAEd,CAAC,CAACc;YAAK,CAAC,GAAG,CAAC,CAAC;YACjDE,OAAO,EAAEA,CAAA,KAAMhB,CAAC,CAACgB,OAAO,CAACnB,GAAG,CAAE;YAAA,IACzBG,CAAC,CAACiB,QAAQ,GAAG;cAAEA,QAAQ,EAAEjB,CAAC,CAACiB,QAAQ,CAACpB,GAAG;YAAE,CAAC,GAAG,CAAC,CAAC;YAAA,IAC/C2B,SAAS,KAAKT,SAAS,GACxB;cAAE,YAAY,EAAES;YAAU,CAAC,GAC3B,CAAC,CAAC;UAAA,CACP;QAAC,GAXUxB,CAAC,CAACyB,EAYP,CAAC;MAEd,CAAC,CAAC;IACJ;IAEA,MAAMlB,KAAK,GAAGZ,kBAAkB,CAACC,WAAW,EAAEC,GAAG,CAAC;IAClD,IAAIU,KAAK,CAACL,MAAM,KAAK,CAAC,EAAE,OAAO,IAAI;IACnC;AACJ;AACA;IACI,oBACET,IAAA,CAACJ,YAAY;MACX0C,OAAO,EAAExB,KAAM;MAAA,IACVa,SAAS,KAAKL,SAAS,GAAG;QAAEK;MAAU,CAAC,GAAG,CAAC,CAAC;IAAA,CAClD,CAAC;EAEN,CAAC;AACH","ignoreList":[]}