@portnet/ui 6.0.0 → 6.0.1

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 (748) hide show
  1. package/dist/esm/index.js +196 -0
  2. package/dist/esm/index.js.map +1 -0
  3. package/dist/esm/v2/__tests__/FieldError.test.js +160 -0
  4. package/dist/esm/v2/__tests__/FieldError.test.js.map +1 -0
  5. package/dist/esm/v2/__tests__/FileCard.test.js +144 -0
  6. package/dist/esm/v2/__tests__/FileCard.test.js.map +1 -0
  7. package/dist/esm/v2/__tests__/MobileRowCard.test.js +333 -0
  8. package/dist/esm/v2/__tests__/MobileRowCard.test.js.map +1 -0
  9. package/dist/esm/v2/__tests__/SectionErrorBoundary.test.js +235 -0
  10. package/dist/esm/v2/__tests__/SectionErrorBoundary.test.js.map +1 -0
  11. package/dist/esm/v2/__tests__/apiError.test.js +181 -0
  12. package/dist/esm/v2/__tests__/apiError.test.js.map +1 -0
  13. package/dist/esm/v2/__tests__/banned-patterns.test.js +270 -0
  14. package/dist/esm/v2/__tests__/banned-patterns.test.js.map +1 -0
  15. package/dist/esm/v2/__tests__/contrast-palette.test.js +224 -0
  16. package/dist/esm/v2/__tests__/contrast-palette.test.js.map +1 -0
  17. package/dist/esm/v2/__tests__/cssVariables.test.js +157 -0
  18. package/dist/esm/v2/__tests__/cssVariables.test.js.map +1 -0
  19. package/dist/esm/v2/__tests__/labels-merge.test.js +147 -0
  20. package/dist/esm/v2/__tests__/labels-merge.test.js.map +1 -0
  21. package/dist/esm/v2/__tests__/locale-fallback.test.js +109 -0
  22. package/dist/esm/v2/__tests__/locale-fallback.test.js.map +1 -0
  23. package/dist/esm/v2/__tests__/useFocusTrap.test.js +514 -0
  24. package/dist/esm/v2/__tests__/useFocusTrap.test.js.map +1 -0
  25. package/dist/esm/v2/components/Accordion.js +230 -0
  26. package/dist/esm/v2/components/Accordion.js.map +1 -0
  27. package/dist/esm/v2/components/ActionStrip.js +146 -0
  28. package/dist/esm/v2/components/ActionStrip.js.map +1 -0
  29. package/dist/esm/v2/components/Banner.js +254 -0
  30. package/dist/esm/v2/components/Banner.js.map +1 -0
  31. package/dist/esm/v2/components/Busy.js +97 -0
  32. package/dist/esm/v2/components/Busy.js.map +1 -0
  33. package/dist/esm/v2/components/Button.js +114 -0
  34. package/dist/esm/v2/components/Button.js.map +1 -0
  35. package/dist/esm/v2/components/CategoryTag.js +81 -0
  36. package/dist/esm/v2/components/CategoryTag.js.map +1 -0
  37. package/dist/esm/v2/components/Checkbox.js +124 -0
  38. package/dist/esm/v2/components/Checkbox.js.map +1 -0
  39. package/dist/esm/v2/components/Chip.js +124 -0
  40. package/dist/esm/v2/components/Chip.js.map +1 -0
  41. package/dist/esm/v2/components/Combobox.js +394 -0
  42. package/dist/esm/v2/components/Combobox.js.map +1 -0
  43. package/dist/esm/v2/components/CommandPalette.js +660 -0
  44. package/dist/esm/v2/components/CommandPalette.js.map +1 -0
  45. package/dist/esm/v2/components/ConfirmDialog.js +144 -0
  46. package/dist/esm/v2/components/ConfirmDialog.js.map +1 -0
  47. package/dist/esm/v2/components/DatePicker.js +200 -0
  48. package/dist/esm/v2/components/DatePicker.js.map +1 -0
  49. package/dist/esm/v2/components/DateRangePicker.js +289 -0
  50. package/dist/esm/v2/components/DateRangePicker.js.map +1 -0
  51. package/dist/esm/v2/components/DateTimePicker.js +182 -0
  52. package/dist/esm/v2/components/DateTimePicker.js.map +1 -0
  53. package/dist/esm/v2/components/Drawer.js +333 -0
  54. package/dist/esm/v2/components/Drawer.js.map +1 -0
  55. package/dist/esm/v2/components/Dropzone.js +540 -0
  56. package/dist/esm/v2/components/Dropzone.js.map +1 -0
  57. package/dist/esm/v2/components/EmptyState.js +102 -0
  58. package/dist/esm/v2/components/EmptyState.js.map +1 -0
  59. package/dist/esm/v2/components/FavoriteToggle.js +127 -0
  60. package/dist/esm/v2/components/FavoriteToggle.js.map +1 -0
  61. package/dist/esm/v2/components/Field.js +197 -0
  62. package/dist/esm/v2/components/Field.js.map +1 -0
  63. package/dist/esm/v2/components/FieldError.js +124 -0
  64. package/dist/esm/v2/components/FieldError.js.map +1 -0
  65. package/dist/esm/v2/components/FieldHelp.js +202 -0
  66. package/dist/esm/v2/components/FieldHelp.js.map +1 -0
  67. package/dist/esm/v2/components/FileCard.js +162 -0
  68. package/dist/esm/v2/components/FileCard.js.map +1 -0
  69. package/dist/esm/v2/components/FilterTab.js +138 -0
  70. package/dist/esm/v2/components/FilterTab.js.map +1 -0
  71. package/dist/esm/v2/components/ForbiddenPage.js +74 -0
  72. package/dist/esm/v2/components/ForbiddenPage.js.map +1 -0
  73. package/dist/esm/v2/components/FormGrid.js +179 -0
  74. package/dist/esm/v2/components/FormGrid.js.map +1 -0
  75. package/dist/esm/v2/components/FormikDisplay.js +118 -0
  76. package/dist/esm/v2/components/FormikDisplay.js.map +1 -0
  77. package/dist/esm/v2/components/Input.js +107 -0
  78. package/dist/esm/v2/components/Input.js.map +1 -0
  79. package/dist/esm/v2/components/KPICard.js +237 -0
  80. package/dist/esm/v2/components/KPICard.js.map +1 -0
  81. package/dist/esm/v2/components/KPIStrip.js +84 -0
  82. package/dist/esm/v2/components/KPIStrip.js.map +1 -0
  83. package/dist/esm/v2/components/KV.js +75 -0
  84. package/dist/esm/v2/components/KV.js.map +1 -0
  85. package/dist/esm/v2/components/KVGrid.js +74 -0
  86. package/dist/esm/v2/components/KVGrid.js.map +1 -0
  87. package/dist/esm/v2/components/Layout.js +284 -0
  88. package/dist/esm/v2/components/Layout.js.map +1 -0
  89. package/dist/esm/v2/components/MobileRowCard.js +314 -0
  90. package/dist/esm/v2/components/MobileRowCard.js.map +1 -0
  91. package/dist/esm/v2/components/Modal.js +276 -0
  92. package/dist/esm/v2/components/Modal.js.map +1 -0
  93. package/dist/esm/v2/components/NetworkErrorPage.js +78 -0
  94. package/dist/esm/v2/components/NetworkErrorPage.js.map +1 -0
  95. package/dist/esm/v2/components/NotFoundPage.js +58 -0
  96. package/dist/esm/v2/components/NotFoundPage.js.map +1 -0
  97. package/dist/esm/v2/components/NumberInput.js +309 -0
  98. package/dist/esm/v2/components/NumberInput.js.map +1 -0
  99. package/dist/esm/v2/components/OverflowMenu.js +184 -0
  100. package/dist/esm/v2/components/OverflowMenu.js.map +1 -0
  101. package/dist/esm/v2/components/PdfViewer.js +122 -0
  102. package/dist/esm/v2/components/PdfViewer.js.map +1 -0
  103. package/dist/esm/v2/components/ProgressBar.js +202 -0
  104. package/dist/esm/v2/components/ProgressBar.js.map +1 -0
  105. package/dist/esm/v2/components/Radio.js +228 -0
  106. package/dist/esm/v2/components/Radio.js.map +1 -0
  107. package/dist/esm/v2/components/SectionErrorBoundary.js +214 -0
  108. package/dist/esm/v2/components/SectionErrorBoundary.js.map +1 -0
  109. package/dist/esm/v2/components/SectionHeader.js +132 -0
  110. package/dist/esm/v2/components/SectionHeader.js.map +1 -0
  111. package/dist/esm/v2/components/Segmented.js +254 -0
  112. package/dist/esm/v2/components/Segmented.js.map +1 -0
  113. package/dist/esm/v2/components/Select.js +490 -0
  114. package/dist/esm/v2/components/Select.js.map +1 -0
  115. package/dist/esm/v2/components/ServerErrorPage.js +74 -0
  116. package/dist/esm/v2/components/ServerErrorPage.js.map +1 -0
  117. package/dist/esm/v2/components/Skeleton.js +269 -0
  118. package/dist/esm/v2/components/Skeleton.js.map +1 -0
  119. package/dist/esm/v2/components/SkipLink.js +49 -0
  120. package/dist/esm/v2/components/SkipLink.js.map +1 -0
  121. package/dist/esm/v2/components/Spinner.js +69 -0
  122. package/dist/esm/v2/components/Spinner.js.map +1 -0
  123. package/dist/esm/v2/components/Status.js +64 -0
  124. package/dist/esm/v2/components/Status.js.map +1 -0
  125. package/dist/esm/v2/components/Stepper.js +432 -0
  126. package/dist/esm/v2/components/Stepper.js.map +1 -0
  127. package/dist/esm/v2/components/Surface.js +159 -0
  128. package/dist/esm/v2/components/Surface.js.map +1 -0
  129. package/dist/esm/v2/components/Switch.js +128 -0
  130. package/dist/esm/v2/components/Switch.js.map +1 -0
  131. package/dist/esm/v2/components/Tabs.js +150 -0
  132. package/dist/esm/v2/components/Tabs.js.map +1 -0
  133. package/dist/esm/v2/components/TelInput.js +274 -0
  134. package/dist/esm/v2/components/TelInput.js.map +1 -0
  135. package/dist/esm/v2/components/Textarea.js +72 -0
  136. package/dist/esm/v2/components/Textarea.js.map +1 -0
  137. package/dist/esm/v2/components/TimePicker.js +134 -0
  138. package/dist/esm/v2/components/TimePicker.js.map +1 -0
  139. package/dist/esm/v2/components/Toast.js +376 -0
  140. package/dist/esm/v2/components/Toast.js.map +1 -0
  141. package/dist/esm/v2/components/Tooltip.js +161 -0
  142. package/dist/esm/v2/components/Tooltip.js.map +1 -0
  143. package/dist/esm/v2/components/_ErrorPageBody.js +85 -0
  144. package/dist/esm/v2/components/_ErrorPageBody.js.map +1 -0
  145. package/dist/esm/v2/components/_pickerShared.js +60 -0
  146. package/dist/esm/v2/components/_pickerShared.js.map +1 -0
  147. package/dist/esm/v2/components/index.js +244 -0
  148. package/dist/esm/v2/components/index.js.map +1 -0
  149. package/dist/esm/v2/hooks/index.js +10 -0
  150. package/dist/esm/v2/hooks/index.js.map +1 -0
  151. package/dist/esm/v2/hooks/useDelayedFlag.js +55 -0
  152. package/dist/esm/v2/hooks/useDelayedFlag.js.map +1 -0
  153. package/dist/esm/v2/hooks/useDensity.js +119 -0
  154. package/dist/esm/v2/hooks/useDensity.js.map +1 -0
  155. package/dist/esm/v2/hooks/useFocusFirstError.js +197 -0
  156. package/dist/esm/v2/hooks/useFocusFirstError.js.map +1 -0
  157. package/dist/esm/v2/hooks/useFocusTrap.js +202 -0
  158. package/dist/esm/v2/hooks/useFocusTrap.js.map +1 -0
  159. package/dist/esm/v2/hooks/useFormAutoSave.js +181 -0
  160. package/dist/esm/v2/hooks/useFormAutoSave.js.map +1 -0
  161. package/dist/esm/v2/hooks/useFormCompletionProgress.js +131 -0
  162. package/dist/esm/v2/hooks/useFormCompletionProgress.js.map +1 -0
  163. package/dist/esm/v2/hooks/useResolvedDensity.js +44 -0
  164. package/dist/esm/v2/hooks/useResolvedDensity.js.map +1 -0
  165. package/dist/esm/v2/hooks/useSortedRows.js +32 -0
  166. package/dist/esm/v2/hooks/useSortedRows.js.map +1 -0
  167. package/dist/esm/v2/hooks/useTabLoading.js +79 -0
  168. package/dist/esm/v2/hooks/useTabLoading.js.map +1 -0
  169. package/dist/esm/v2/index.js +121 -0
  170. package/dist/esm/v2/index.js.map +1 -0
  171. package/dist/esm/v2/modalContext.js +108 -0
  172. package/dist/esm/v2/modalContext.js.map +1 -0
  173. package/dist/esm/v2/models/favorite.js +2 -0
  174. package/dist/esm/v2/models/favorite.js.map +1 -0
  175. package/dist/esm/v2/models/index.js +12 -0
  176. package/dist/esm/v2/models/index.js.map +1 -0
  177. package/dist/esm/v2/models/personalization.js +2 -0
  178. package/dist/esm/v2/models/personalization.js.map +1 -0
  179. package/dist/esm/v2/models/referentiel.js +2 -0
  180. package/dist/esm/v2/models/referentiel.js.map +1 -0
  181. package/dist/esm/v2/models/savedFilter.js +2 -0
  182. package/dist/esm/v2/models/savedFilter.js.map +1 -0
  183. package/dist/esm/v2/patterns/ActionBar.js +603 -0
  184. package/dist/esm/v2/patterns/ActionBar.js.map +1 -0
  185. package/dist/esm/v2/patterns/BulkActionBar.js +147 -0
  186. package/dist/esm/v2/patterns/BulkActionBar.js.map +1 -0
  187. package/dist/esm/v2/patterns/CollapsibleDataGrid.js +303 -0
  188. package/dist/esm/v2/patterns/CollapsibleDataGrid.js.map +1 -0
  189. package/dist/esm/v2/patterns/ColumnsToggle.js +301 -0
  190. package/dist/esm/v2/patterns/ColumnsToggle.js.map +1 -0
  191. package/dist/esm/v2/patterns/DataGrid.js +820 -0
  192. package/dist/esm/v2/patterns/DataGrid.js.map +1 -0
  193. package/dist/esm/v2/patterns/DataGridSettingsMenu.js +375 -0
  194. package/dist/esm/v2/patterns/DataGridSettingsMenu.js.map +1 -0
  195. package/dist/esm/v2/patterns/DataGridToolbar.js +249 -0
  196. package/dist/esm/v2/patterns/DataGridToolbar.js.map +1 -0
  197. package/dist/esm/v2/patterns/DataGridVirtualized.js +523 -0
  198. package/dist/esm/v2/patterns/DataGridVirtualized.js.map +1 -0
  199. package/dist/esm/v2/patterns/DeleteResourceConfirmDialog.js +70 -0
  200. package/dist/esm/v2/patterns/DeleteResourceConfirmDialog.js.map +1 -0
  201. package/dist/esm/v2/patterns/FavoriteColumn.js +164 -0
  202. package/dist/esm/v2/patterns/FavoriteColumn.js.map +1 -0
  203. package/dist/esm/v2/patterns/FavoritesFilter.js +91 -0
  204. package/dist/esm/v2/patterns/FavoritesFilter.js.map +1 -0
  205. package/dist/esm/v2/patterns/FormErrorSummary.js +101 -0
  206. package/dist/esm/v2/patterns/FormErrorSummary.js.map +1 -0
  207. package/dist/esm/v2/patterns/FormPageShell.js +126 -0
  208. package/dist/esm/v2/patterns/FormPageShell.js.map +1 -0
  209. package/dist/esm/v2/patterns/FormSection.js +190 -0
  210. package/dist/esm/v2/patterns/FormSection.js.map +1 -0
  211. package/dist/esm/v2/patterns/FormikCheckboxGroup.js +110 -0
  212. package/dist/esm/v2/patterns/FormikCheckboxGroup.js.map +1 -0
  213. package/dist/esm/v2/patterns/FormikCombobox.js +115 -0
  214. package/dist/esm/v2/patterns/FormikCombobox.js.map +1 -0
  215. package/dist/esm/v2/patterns/FormikDatePicker.js +196 -0
  216. package/dist/esm/v2/patterns/FormikDatePicker.js.map +1 -0
  217. package/dist/esm/v2/patterns/FormikErrorFocus.js +77 -0
  218. package/dist/esm/v2/patterns/FormikErrorFocus.js.map +1 -0
  219. package/dist/esm/v2/patterns/FormikFile.js +148 -0
  220. package/dist/esm/v2/patterns/FormikFile.js.map +1 -0
  221. package/dist/esm/v2/patterns/FormikInput.js +127 -0
  222. package/dist/esm/v2/patterns/FormikInput.js.map +1 -0
  223. package/dist/esm/v2/patterns/FormikReferentielField.js +116 -0
  224. package/dist/esm/v2/patterns/FormikReferentielField.js.map +1 -0
  225. package/dist/esm/v2/patterns/FormikSelect.js +159 -0
  226. package/dist/esm/v2/patterns/FormikSelect.js.map +1 -0
  227. package/dist/esm/v2/patterns/FormikTextarea.js +76 -0
  228. package/dist/esm/v2/patterns/FormikTextarea.js.map +1 -0
  229. package/dist/esm/v2/patterns/KeyboardShortcutsHelp.js +195 -0
  230. package/dist/esm/v2/patterns/KeyboardShortcutsHelp.js.map +1 -0
  231. package/dist/esm/v2/patterns/NetworkErrorBanner.js +72 -0
  232. package/dist/esm/v2/patterns/NetworkErrorBanner.js.map +1 -0
  233. package/dist/esm/v2/patterns/PageContent.js +62 -0
  234. package/dist/esm/v2/patterns/PageContent.js.map +1 -0
  235. package/dist/esm/v2/patterns/ReferentielField.js +615 -0
  236. package/dist/esm/v2/patterns/ReferentielField.js.map +1 -0
  237. package/dist/esm/v2/patterns/SaveFilterDialog.js +197 -0
  238. package/dist/esm/v2/patterns/SaveFilterDialog.js.map +1 -0
  239. package/dist/esm/v2/patterns/SavedFiltersMenu.js +406 -0
  240. package/dist/esm/v2/patterns/SavedFiltersMenu.js.map +1 -0
  241. package/dist/esm/v2/patterns/SkeletonPageShell.js +342 -0
  242. package/dist/esm/v2/patterns/SkeletonPageShell.js.map +1 -0
  243. package/dist/esm/v2/patterns/SortableHeader.js +179 -0
  244. package/dist/esm/v2/patterns/SortableHeader.js.map +1 -0
  245. package/dist/esm/v2/patterns/Tour.js +471 -0
  246. package/dist/esm/v2/patterns/Tour.js.map +1 -0
  247. package/dist/esm/v2/patterns/_dataGridShared.js +431 -0
  248. package/dist/esm/v2/patterns/_dataGridShared.js.map +1 -0
  249. package/dist/esm/v2/patterns/_sort.js +112 -0
  250. package/dist/esm/v2/patterns/_sort.js.map +1 -0
  251. package/dist/esm/v2/patterns/_useColumnReorder.js +257 -0
  252. package/dist/esm/v2/patterns/_useColumnReorder.js.map +1 -0
  253. package/dist/esm/v2/patterns/_useColumnResize.js +191 -0
  254. package/dist/esm/v2/patterns/_useColumnResize.js.map +1 -0
  255. package/dist/esm/v2/patterns/index.js +95 -0
  256. package/dist/esm/v2/patterns/index.js.map +1 -0
  257. package/dist/esm/v2/personalization/PersonalizationProvider.js +168 -0
  258. package/dist/esm/v2/personalization/PersonalizationProvider.js.map +1 -0
  259. package/dist/esm/v2/personalization/adapters/_storageKey.js +60 -0
  260. package/dist/esm/v2/personalization/adapters/_storageKey.js.map +1 -0
  261. package/dist/esm/v2/personalization/adapters/createLocalStorageAdapter.js +124 -0
  262. package/dist/esm/v2/personalization/adapters/createLocalStorageAdapter.js.map +1 -0
  263. package/dist/esm/v2/personalization/adapters/createMemoryAdapter.js +70 -0
  264. package/dist/esm/v2/personalization/adapters/createMemoryAdapter.js.map +1 -0
  265. package/dist/esm/v2/personalization/adapters/index.js +11 -0
  266. package/dist/esm/v2/personalization/adapters/index.js.map +1 -0
  267. package/dist/esm/v2/personalization/capabilities/favorites.js +216 -0
  268. package/dist/esm/v2/personalization/capabilities/favorites.js.map +1 -0
  269. package/dist/esm/v2/personalization/capabilities/favoritesView.js +111 -0
  270. package/dist/esm/v2/personalization/capabilities/favoritesView.js.map +1 -0
  271. package/dist/esm/v2/personalization/capabilities/index.js +17 -0
  272. package/dist/esm/v2/personalization/capabilities/index.js.map +1 -0
  273. package/dist/esm/v2/personalization/capabilities/savedFilters.js +291 -0
  274. package/dist/esm/v2/personalization/capabilities/savedFilters.js.map +1 -0
  275. package/dist/esm/v2/personalization/createPersonalizationStore.js +472 -0
  276. package/dist/esm/v2/personalization/createPersonalizationStore.js.map +1 -0
  277. package/dist/esm/v2/personalization/index.js +46 -0
  278. package/dist/esm/v2/personalization/index.js.map +1 -0
  279. package/dist/esm/v2/personalization/personalizationContext.js +108 -0
  280. package/dist/esm/v2/personalization/personalizationContext.js.map +1 -0
  281. package/dist/esm/v2/personalization/schema.js +92 -0
  282. package/dist/esm/v2/personalization/schema.js.map +1 -0
  283. package/dist/esm/v2/personalization/types.js +2 -0
  284. package/dist/esm/v2/personalization/types.js.map +1 -0
  285. package/dist/esm/v2/referentiel/ReferentielProvider.js +87 -0
  286. package/dist/esm/v2/referentiel/ReferentielProvider.js.map +1 -0
  287. package/dist/esm/v2/referentiel/index.js +15 -0
  288. package/dist/esm/v2/referentiel/index.js.map +1 -0
  289. package/dist/esm/v2/referentiel/useReferentielClient.js +37 -0
  290. package/dist/esm/v2/referentiel/useReferentielClient.js.map +1 -0
  291. package/dist/esm/v2/referentiel/useReferentielOptions.js +169 -0
  292. package/dist/esm/v2/referentiel/useReferentielOptions.js.map +1 -0
  293. package/dist/esm/v2/referentiel/useReferentielSearch.js +132 -0
  294. package/dist/esm/v2/referentiel/useReferentielSearch.js.map +1 -0
  295. package/dist/esm/v2/styles/base.css +425 -0
  296. package/dist/esm/v2/styles/css.d.ts +10 -0
  297. package/dist/esm/v2/styles/index.js +12 -0
  298. package/dist/esm/v2/styles/index.js.map +1 -0
  299. package/dist/esm/v2/theme/_brand.js +64 -0
  300. package/dist/esm/v2/theme/_brand.js.map +1 -0
  301. package/dist/esm/v2/theme/_brandSecondary.js +60 -0
  302. package/dist/esm/v2/theme/_brandSecondary.js.map +1 -0
  303. package/dist/esm/v2/theme/createPortnetTheme.js +548 -0
  304. package/dist/esm/v2/theme/createPortnetTheme.js.map +1 -0
  305. package/dist/esm/v2/theme/cssVariables.js +198 -0
  306. package/dist/esm/v2/theme/cssVariables.js.map +1 -0
  307. package/dist/esm/v2/theme/index.js +32 -0
  308. package/dist/esm/v2/theme/index.js.map +1 -0
  309. package/dist/esm/v2/tokens/breakpoints.js +106 -0
  310. package/dist/esm/v2/tokens/breakpoints.js.map +1 -0
  311. package/dist/esm/v2/tokens/colors.js +219 -0
  312. package/dist/esm/v2/tokens/colors.js.map +1 -0
  313. package/dist/esm/v2/tokens/density.js +98 -0
  314. package/dist/esm/v2/tokens/density.js.map +1 -0
  315. package/dist/esm/v2/tokens/index.js +80 -0
  316. package/dist/esm/v2/tokens/index.js.map +1 -0
  317. package/dist/esm/v2/tokens/motion.js +88 -0
  318. package/dist/esm/v2/tokens/motion.js.map +1 -0
  319. package/dist/esm/v2/tokens/radius.js +22 -0
  320. package/dist/esm/v2/tokens/radius.js.map +1 -0
  321. package/dist/esm/v2/tokens/shadows.js +40 -0
  322. package/dist/esm/v2/tokens/shadows.js.map +1 -0
  323. package/dist/esm/v2/tokens/spacing.js +51 -0
  324. package/dist/esm/v2/tokens/spacing.js.map +1 -0
  325. package/dist/esm/v2/tokens/state.js +41 -0
  326. package/dist/esm/v2/tokens/state.js.map +1 -0
  327. package/dist/esm/v2/tokens/statusPalette.js +66 -0
  328. package/dist/esm/v2/tokens/statusPalette.js.map +1 -0
  329. package/dist/esm/v2/tokens/tokens.json +153 -0
  330. package/dist/esm/v2/tokens/typography.js +149 -0
  331. package/dist/esm/v2/tokens/typography.js.map +1 -0
  332. package/dist/esm/v2/tokens/zIndex.js +44 -0
  333. package/dist/esm/v2/tokens/zIndex.js.map +1 -0
  334. package/dist/esm/v2/types/common.js +2 -0
  335. package/dist/esm/v2/types/common.js.map +1 -0
  336. package/dist/esm/v2/types/datagrid.js +2 -0
  337. package/dist/esm/v2/types/datagrid.js.map +1 -0
  338. package/dist/esm/v2/types/index.js +12 -0
  339. package/dist/esm/v2/types/index.js.map +1 -0
  340. package/dist/esm/v2/utils/apiError.js +281 -0
  341. package/dist/esm/v2/utils/apiError.js.map +1 -0
  342. package/dist/esm/v2/utils/contrast.js +157 -0
  343. package/dist/esm/v2/utils/contrast.js.map +1 -0
  344. package/dist/esm/v2/utils/cx.js +38 -0
  345. package/dist/esm/v2/utils/cx.js.map +1 -0
  346. package/dist/esm/v2/utils/fileDownload.js +226 -0
  347. package/dist/esm/v2/utils/fileDownload.js.map +1 -0
  348. package/dist/esm/v2/utils/fmtMoney.js +78 -0
  349. package/dist/esm/v2/utils/fmtMoney.js.map +1 -0
  350. package/dist/esm/v2/utils/index.js +43 -0
  351. package/dist/esm/v2/utils/index.js.map +1 -0
  352. package/dist/esm/v2/utils/mergeLabels.js +86 -0
  353. package/dist/esm/v2/utils/mergeLabels.js.map +1 -0
  354. package/dist/esm/v2/utils/networkStatus.js +114 -0
  355. package/dist/esm/v2/utils/networkStatus.js.map +1 -0
  356. package/dist/index.d.ts +3 -2
  357. package/dist/index.d.ts.map +1 -1
  358. package/dist/index.js +21 -0
  359. package/dist/index.js.map +1 -1
  360. package/dist/v2/__tests__/FieldError.test.js +164 -0
  361. package/dist/v2/__tests__/FieldError.test.js.map +1 -0
  362. package/dist/v2/__tests__/FileCard.test.js +148 -0
  363. package/dist/v2/__tests__/FileCard.test.js.map +1 -0
  364. package/dist/v2/__tests__/SectionErrorBoundary.test.js +237 -0
  365. package/dist/v2/__tests__/SectionErrorBoundary.test.js.map +1 -0
  366. package/dist/v2/components/Accordion.d.ts +6 -6
  367. package/dist/v2/components/Accordion.d.ts.map +1 -1
  368. package/dist/v2/components/Accordion.js.map +1 -1
  369. package/dist/v2/components/ActionStrip.d.ts +12 -12
  370. package/dist/v2/components/ActionStrip.d.ts.map +1 -1
  371. package/dist/v2/components/ActionStrip.js.map +1 -1
  372. package/dist/v2/components/Banner.d.ts +48 -9
  373. package/dist/v2/components/Banner.d.ts.map +1 -1
  374. package/dist/v2/components/Banner.js +116 -35
  375. package/dist/v2/components/Banner.js.map +1 -1
  376. package/dist/v2/components/Busy.d.ts +3 -3
  377. package/dist/v2/components/Busy.d.ts.map +1 -1
  378. package/dist/v2/components/Busy.js.map +1 -1
  379. package/dist/v2/components/Button.d.ts +6 -6
  380. package/dist/v2/components/Button.d.ts.map +1 -1
  381. package/dist/v2/components/Button.js.map +1 -1
  382. package/dist/v2/components/CategoryTag.d.ts +3 -3
  383. package/dist/v2/components/CategoryTag.d.ts.map +1 -1
  384. package/dist/v2/components/CategoryTag.js.map +1 -1
  385. package/dist/v2/components/Checkbox.d.ts +11 -11
  386. package/dist/v2/components/Checkbox.d.ts.map +1 -1
  387. package/dist/v2/components/Checkbox.js.map +1 -1
  388. package/dist/v2/components/Chip.d.ts +8 -8
  389. package/dist/v2/components/Chip.d.ts.map +1 -1
  390. package/dist/v2/components/Chip.js +2 -1
  391. package/dist/v2/components/Chip.js.map +1 -1
  392. package/dist/v2/components/Combobox.d.ts +27 -27
  393. package/dist/v2/components/Combobox.d.ts.map +1 -1
  394. package/dist/v2/components/Combobox.js +3 -2
  395. package/dist/v2/components/Combobox.js.map +1 -1
  396. package/dist/v2/components/CommandPalette.d.ts +20 -20
  397. package/dist/v2/components/CommandPalette.d.ts.map +1 -1
  398. package/dist/v2/components/CommandPalette.js +2 -6
  399. package/dist/v2/components/CommandPalette.js.map +1 -1
  400. package/dist/v2/components/ConfirmDialog.d.ts +13 -13
  401. package/dist/v2/components/ConfirmDialog.d.ts.map +1 -1
  402. package/dist/v2/components/ConfirmDialog.js +2 -1
  403. package/dist/v2/components/ConfirmDialog.js.map +1 -1
  404. package/dist/v2/components/DatePicker.d.ts +11 -11
  405. package/dist/v2/components/DatePicker.d.ts.map +1 -1
  406. package/dist/v2/components/DatePicker.js.map +1 -1
  407. package/dist/v2/components/DateRangePicker.d.ts +16 -16
  408. package/dist/v2/components/DateRangePicker.d.ts.map +1 -1
  409. package/dist/v2/components/DateRangePicker.js +2 -1
  410. package/dist/v2/components/DateRangePicker.js.map +1 -1
  411. package/dist/v2/components/DateTimePicker.d.ts +11 -11
  412. package/dist/v2/components/DateTimePicker.d.ts.map +1 -1
  413. package/dist/v2/components/DateTimePicker.js.map +1 -1
  414. package/dist/v2/components/Drawer.d.ts +18 -18
  415. package/dist/v2/components/Drawer.d.ts.map +1 -1
  416. package/dist/v2/components/Drawer.js +2 -1
  417. package/dist/v2/components/Drawer.js.map +1 -1
  418. package/dist/v2/components/Dropzone.d.ts +34 -34
  419. package/dist/v2/components/Dropzone.d.ts.map +1 -1
  420. package/dist/v2/components/Dropzone.js +11 -3
  421. package/dist/v2/components/Dropzone.js.map +1 -1
  422. package/dist/v2/components/EmptyState.d.ts +7 -7
  423. package/dist/v2/components/EmptyState.d.ts.map +1 -1
  424. package/dist/v2/components/EmptyState.js.map +1 -1
  425. package/dist/v2/components/FavoriteToggle.d.ts +7 -7
  426. package/dist/v2/components/FavoriteToggle.d.ts.map +1 -1
  427. package/dist/v2/components/FavoriteToggle.js +2 -1
  428. package/dist/v2/components/FavoriteToggle.js.map +1 -1
  429. package/dist/v2/components/Field.d.ts +17 -12
  430. package/dist/v2/components/Field.d.ts.map +1 -1
  431. package/dist/v2/components/Field.js +25 -7
  432. package/dist/v2/components/Field.js.map +1 -1
  433. package/dist/v2/components/FieldError.d.ts +78 -0
  434. package/dist/v2/components/FieldError.d.ts.map +1 -0
  435. package/dist/v2/components/FieldError.js +131 -0
  436. package/dist/v2/components/FieldError.js.map +1 -0
  437. package/dist/v2/components/FieldHelp.d.ts +7 -7
  438. package/dist/v2/components/FieldHelp.d.ts.map +1 -1
  439. package/dist/v2/components/FieldHelp.js.map +1 -1
  440. package/dist/v2/components/FileCard.d.ts +75 -0
  441. package/dist/v2/components/FileCard.d.ts.map +1 -0
  442. package/dist/v2/components/FileCard.js +169 -0
  443. package/dist/v2/components/FileCard.js.map +1 -0
  444. package/dist/v2/components/FilterTab.d.ts +9 -9
  445. package/dist/v2/components/FilterTab.d.ts.map +1 -1
  446. package/dist/v2/components/FilterTab.js +2 -1
  447. package/dist/v2/components/FilterTab.js.map +1 -1
  448. package/dist/v2/components/FormGrid.d.ts +9 -4
  449. package/dist/v2/components/FormGrid.d.ts.map +1 -1
  450. package/dist/v2/components/FormGrid.js +11 -1
  451. package/dist/v2/components/FormGrid.js.map +1 -1
  452. package/dist/v2/components/FormikDisplay.d.ts +6 -6
  453. package/dist/v2/components/FormikDisplay.d.ts.map +1 -1
  454. package/dist/v2/components/FormikDisplay.js.map +1 -1
  455. package/dist/v2/components/Input.d.ts +6 -6
  456. package/dist/v2/components/Input.d.ts.map +1 -1
  457. package/dist/v2/components/Input.js.map +1 -1
  458. package/dist/v2/components/KPICard.d.ts +43 -13
  459. package/dist/v2/components/KPICard.d.ts.map +1 -1
  460. package/dist/v2/components/KPICard.js +53 -14
  461. package/dist/v2/components/KPICard.js.map +1 -1
  462. package/dist/v2/components/KPIStrip.d.ts +68 -0
  463. package/dist/v2/components/KPIStrip.d.ts.map +1 -0
  464. package/dist/v2/components/KPIStrip.js +92 -0
  465. package/dist/v2/components/KPIStrip.js.map +1 -0
  466. package/dist/v2/components/KV.d.ts +3 -3
  467. package/dist/v2/components/KV.d.ts.map +1 -1
  468. package/dist/v2/components/KV.js.map +1 -1
  469. package/dist/v2/components/KVGrid.d.ts +2 -2
  470. package/dist/v2/components/KVGrid.d.ts.map +1 -1
  471. package/dist/v2/components/KVGrid.js +8 -1
  472. package/dist/v2/components/KVGrid.js.map +1 -1
  473. package/dist/v2/components/Layout.d.ts +7 -7
  474. package/dist/v2/components/Layout.d.ts.map +1 -1
  475. package/dist/v2/components/Layout.js.map +1 -1
  476. package/dist/v2/components/MobileRowCard.d.ts +13 -13
  477. package/dist/v2/components/MobileRowCard.d.ts.map +1 -1
  478. package/dist/v2/components/MobileRowCard.js.map +1 -1
  479. package/dist/v2/components/Modal.d.ts +12 -12
  480. package/dist/v2/components/Modal.d.ts.map +1 -1
  481. package/dist/v2/components/Modal.js.map +1 -1
  482. package/dist/v2/components/NetworkErrorPage.d.ts +1 -1
  483. package/dist/v2/components/NetworkErrorPage.d.ts.map +1 -1
  484. package/dist/v2/components/NetworkErrorPage.js.map +1 -1
  485. package/dist/v2/components/NumberInput.d.ts +14 -14
  486. package/dist/v2/components/NumberInput.d.ts.map +1 -1
  487. package/dist/v2/components/NumberInput.js +7 -6
  488. package/dist/v2/components/NumberInput.js.map +1 -1
  489. package/dist/v2/components/OverflowMenu.d.ts +14 -14
  490. package/dist/v2/components/OverflowMenu.d.ts.map +1 -1
  491. package/dist/v2/components/OverflowMenu.js +4 -8
  492. package/dist/v2/components/OverflowMenu.js.map +1 -1
  493. package/dist/v2/components/PdfViewer.d.ts +9 -9
  494. package/dist/v2/components/PdfViewer.d.ts.map +1 -1
  495. package/dist/v2/components/PdfViewer.js.map +1 -1
  496. package/dist/v2/components/ProgressBar.d.ts +10 -10
  497. package/dist/v2/components/ProgressBar.d.ts.map +1 -1
  498. package/dist/v2/components/ProgressBar.js.map +1 -1
  499. package/dist/v2/components/Radio.d.ts +7 -7
  500. package/dist/v2/components/Radio.d.ts.map +1 -1
  501. package/dist/v2/components/Radio.js.map +1 -1
  502. package/dist/v2/components/SectionErrorBoundary.d.ts +89 -0
  503. package/dist/v2/components/SectionErrorBoundary.d.ts.map +1 -0
  504. package/dist/v2/components/SectionErrorBoundary.js +221 -0
  505. package/dist/v2/components/SectionErrorBoundary.js.map +1 -0
  506. package/dist/v2/components/SectionHeader.d.ts +5 -5
  507. package/dist/v2/components/SectionHeader.d.ts.map +1 -1
  508. package/dist/v2/components/SectionHeader.js.map +1 -1
  509. package/dist/v2/components/Segmented.d.ts +11 -11
  510. package/dist/v2/components/Segmented.d.ts.map +1 -1
  511. package/dist/v2/components/Segmented.js.map +1 -1
  512. package/dist/v2/components/Select.d.ts +33 -15
  513. package/dist/v2/components/Select.d.ts.map +1 -1
  514. package/dist/v2/components/Select.js +147 -30
  515. package/dist/v2/components/Select.js.map +1 -1
  516. package/dist/v2/components/ServerErrorPage.d.ts +1 -1
  517. package/dist/v2/components/ServerErrorPage.d.ts.map +1 -1
  518. package/dist/v2/components/ServerErrorPage.js.map +1 -1
  519. package/dist/v2/components/Skeleton.d.ts +15 -15
  520. package/dist/v2/components/Skeleton.d.ts.map +1 -1
  521. package/dist/v2/components/Skeleton.js.map +1 -1
  522. package/dist/v2/components/SkipLink.d.ts +2 -2
  523. package/dist/v2/components/SkipLink.d.ts.map +1 -1
  524. package/dist/v2/components/SkipLink.js.map +1 -1
  525. package/dist/v2/components/Status.d.ts +3 -3
  526. package/dist/v2/components/Status.d.ts.map +1 -1
  527. package/dist/v2/components/Status.js.map +1 -1
  528. package/dist/v2/components/Stepper.d.ts +28 -22
  529. package/dist/v2/components/Stepper.d.ts.map +1 -1
  530. package/dist/v2/components/Stepper.js +31 -5
  531. package/dist/v2/components/Stepper.js.map +1 -1
  532. package/dist/v2/components/Surface.d.ts +94 -0
  533. package/dist/v2/components/Surface.d.ts.map +1 -0
  534. package/dist/v2/components/Surface.js +163 -0
  535. package/dist/v2/components/Surface.js.map +1 -0
  536. package/dist/v2/components/Switch.d.ts +4 -4
  537. package/dist/v2/components/Switch.d.ts.map +1 -1
  538. package/dist/v2/components/Switch.js.map +1 -1
  539. package/dist/v2/components/Tabs.d.ts +6 -6
  540. package/dist/v2/components/Tabs.d.ts.map +1 -1
  541. package/dist/v2/components/Tabs.js.map +1 -1
  542. package/dist/v2/components/TelInput.d.ts +8 -8
  543. package/dist/v2/components/TelInput.d.ts.map +1 -1
  544. package/dist/v2/components/TelInput.js +18 -18
  545. package/dist/v2/components/TelInput.js.map +1 -1
  546. package/dist/v2/components/Textarea.d.ts +1 -1
  547. package/dist/v2/components/Textarea.d.ts.map +1 -1
  548. package/dist/v2/components/Textarea.js.map +1 -1
  549. package/dist/v2/components/TimePicker.d.ts +11 -11
  550. package/dist/v2/components/TimePicker.d.ts.map +1 -1
  551. package/dist/v2/components/TimePicker.js.map +1 -1
  552. package/dist/v2/components/Toast.d.ts +6 -6
  553. package/dist/v2/components/Toast.d.ts.map +1 -1
  554. package/dist/v2/components/Toast.js +9 -8
  555. package/dist/v2/components/Toast.js.map +1 -1
  556. package/dist/v2/components/Tooltip.d.ts +1 -1
  557. package/dist/v2/components/Tooltip.d.ts.map +1 -1
  558. package/dist/v2/components/Tooltip.js.map +1 -1
  559. package/dist/v2/components/index.d.ts +143 -0
  560. package/dist/v2/components/index.d.ts.map +1 -1
  561. package/dist/v2/components/index.js +35 -0
  562. package/dist/v2/components/index.js.map +1 -1
  563. package/dist/v2/models/favorite.d.ts +1 -1
  564. package/dist/v2/models/favorite.d.ts.map +1 -1
  565. package/dist/v2/models/favorite.js.map +1 -1
  566. package/dist/v2/models/personalization.d.ts +13 -13
  567. package/dist/v2/models/personalization.d.ts.map +1 -1
  568. package/dist/v2/models/personalization.js.map +1 -1
  569. package/dist/v2/models/referentiel.d.ts +11 -11
  570. package/dist/v2/models/referentiel.d.ts.map +1 -1
  571. package/dist/v2/models/referentiel.js.map +1 -1
  572. package/dist/v2/models/savedFilter.d.ts +8 -8
  573. package/dist/v2/models/savedFilter.d.ts.map +1 -1
  574. package/dist/v2/models/savedFilter.js.map +1 -1
  575. package/dist/v2/patterns/ActionBar.d.ts +33 -33
  576. package/dist/v2/patterns/ActionBar.d.ts.map +1 -1
  577. package/dist/v2/patterns/ActionBar.js +2 -1
  578. package/dist/v2/patterns/ActionBar.js.map +1 -1
  579. package/dist/v2/patterns/BulkActionBar.d.ts +12 -12
  580. package/dist/v2/patterns/BulkActionBar.d.ts.map +1 -1
  581. package/dist/v2/patterns/BulkActionBar.js +2 -1
  582. package/dist/v2/patterns/BulkActionBar.js.map +1 -1
  583. package/dist/v2/patterns/CollapsibleDataGrid.d.ts +15 -15
  584. package/dist/v2/patterns/CollapsibleDataGrid.d.ts.map +1 -1
  585. package/dist/v2/patterns/CollapsibleDataGrid.js.map +1 -1
  586. package/dist/v2/patterns/ColumnsToggle.d.ts +7 -7
  587. package/dist/v2/patterns/ColumnsToggle.d.ts.map +1 -1
  588. package/dist/v2/patterns/ColumnsToggle.js +4 -8
  589. package/dist/v2/patterns/ColumnsToggle.js.map +1 -1
  590. package/dist/v2/patterns/DataGridSettingsMenu.d.ts +12 -12
  591. package/dist/v2/patterns/DataGridSettingsMenu.d.ts.map +1 -1
  592. package/dist/v2/patterns/DataGridSettingsMenu.js +9 -8
  593. package/dist/v2/patterns/DataGridSettingsMenu.js.map +1 -1
  594. package/dist/v2/patterns/DataGridToolbar.d.ts +40 -40
  595. package/dist/v2/patterns/DataGridToolbar.d.ts.map +1 -1
  596. package/dist/v2/patterns/DataGridToolbar.js +2 -1
  597. package/dist/v2/patterns/DataGridToolbar.js.map +1 -1
  598. package/dist/v2/patterns/DataGridVirtualized.d.ts +27 -27
  599. package/dist/v2/patterns/DataGridVirtualized.d.ts.map +1 -1
  600. package/dist/v2/patterns/DataGridVirtualized.js.map +1 -1
  601. package/dist/v2/patterns/DeleteResourceConfirmDialog.d.ts +5 -5
  602. package/dist/v2/patterns/DeleteResourceConfirmDialog.d.ts.map +1 -1
  603. package/dist/v2/patterns/DeleteResourceConfirmDialog.js.map +1 -1
  604. package/dist/v2/patterns/FavoriteColumn.d.ts +6 -6
  605. package/dist/v2/patterns/FavoriteColumn.d.ts.map +1 -1
  606. package/dist/v2/patterns/FavoriteColumn.js.map +1 -1
  607. package/dist/v2/patterns/FavoritesFilter.d.ts +10 -10
  608. package/dist/v2/patterns/FavoritesFilter.d.ts.map +1 -1
  609. package/dist/v2/patterns/FavoritesFilter.js +2 -1
  610. package/dist/v2/patterns/FavoritesFilter.js.map +1 -1
  611. package/dist/v2/patterns/FormErrorSummary.d.ts +4 -4
  612. package/dist/v2/patterns/FormErrorSummary.d.ts.map +1 -1
  613. package/dist/v2/patterns/FormErrorSummary.js.map +1 -1
  614. package/dist/v2/patterns/FormPageShell.d.ts +4 -4
  615. package/dist/v2/patterns/FormPageShell.d.ts.map +1 -1
  616. package/dist/v2/patterns/FormPageShell.js.map +1 -1
  617. package/dist/v2/patterns/FormSection.d.ts +19 -8
  618. package/dist/v2/patterns/FormSection.d.ts.map +1 -1
  619. package/dist/v2/patterns/FormSection.js +106 -71
  620. package/dist/v2/patterns/FormSection.js.map +1 -1
  621. package/dist/v2/patterns/FormikCheckboxGroup.d.ts +6 -6
  622. package/dist/v2/patterns/FormikCheckboxGroup.d.ts.map +1 -1
  623. package/dist/v2/patterns/FormikCheckboxGroup.js.map +1 -1
  624. package/dist/v2/patterns/FormikCombobox.d.ts +11 -11
  625. package/dist/v2/patterns/FormikCombobox.d.ts.map +1 -1
  626. package/dist/v2/patterns/FormikCombobox.js.map +1 -1
  627. package/dist/v2/patterns/FormikDatePicker.d.ts +36 -8
  628. package/dist/v2/patterns/FormikDatePicker.d.ts.map +1 -1
  629. package/dist/v2/patterns/FormikDatePicker.js +27 -1
  630. package/dist/v2/patterns/FormikDatePicker.js.map +1 -1
  631. package/dist/v2/patterns/FormikErrorFocus.d.ts +3 -3
  632. package/dist/v2/patterns/FormikErrorFocus.d.ts.map +1 -1
  633. package/dist/v2/patterns/FormikErrorFocus.js.map +1 -1
  634. package/dist/v2/patterns/FormikFile.d.ts +8 -8
  635. package/dist/v2/patterns/FormikFile.d.ts.map +1 -1
  636. package/dist/v2/patterns/FormikFile.js.map +1 -1
  637. package/dist/v2/patterns/FormikInput.d.ts +41 -6
  638. package/dist/v2/patterns/FormikInput.d.ts.map +1 -1
  639. package/dist/v2/patterns/FormikInput.js +49 -1
  640. package/dist/v2/patterns/FormikInput.js.map +1 -1
  641. package/dist/v2/patterns/FormikReferentielField.d.ts +8 -8
  642. package/dist/v2/patterns/FormikReferentielField.d.ts.map +1 -1
  643. package/dist/v2/patterns/FormikReferentielField.js.map +1 -1
  644. package/dist/v2/patterns/FormikSelect.d.ts +33 -12
  645. package/dist/v2/patterns/FormikSelect.d.ts.map +1 -1
  646. package/dist/v2/patterns/FormikSelect.js +28 -2
  647. package/dist/v2/patterns/FormikSelect.js.map +1 -1
  648. package/dist/v2/patterns/FormikTextarea.d.ts +5 -5
  649. package/dist/v2/patterns/FormikTextarea.d.ts.map +1 -1
  650. package/dist/v2/patterns/FormikTextarea.js.map +1 -1
  651. package/dist/v2/patterns/KeyboardShortcutsHelp.d.ts +7 -7
  652. package/dist/v2/patterns/KeyboardShortcutsHelp.d.ts.map +1 -1
  653. package/dist/v2/patterns/KeyboardShortcutsHelp.js +2 -6
  654. package/dist/v2/patterns/KeyboardShortcutsHelp.js.map +1 -1
  655. package/dist/v2/patterns/NetworkErrorBanner.d.ts +4 -4
  656. package/dist/v2/patterns/NetworkErrorBanner.d.ts.map +1 -1
  657. package/dist/v2/patterns/NetworkErrorBanner.js.map +1 -1
  658. package/dist/v2/patterns/PageContent.d.ts +3 -3
  659. package/dist/v2/patterns/PageContent.d.ts.map +1 -1
  660. package/dist/v2/patterns/PageContent.js.map +1 -1
  661. package/dist/v2/patterns/ReferentielField.d.ts +49 -49
  662. package/dist/v2/patterns/ReferentielField.d.ts.map +1 -1
  663. package/dist/v2/patterns/ReferentielField.js +2 -1
  664. package/dist/v2/patterns/ReferentielField.js.map +1 -1
  665. package/dist/v2/patterns/SaveFilterDialog.d.ts +10 -10
  666. package/dist/v2/patterns/SaveFilterDialog.d.ts.map +1 -1
  667. package/dist/v2/patterns/SaveFilterDialog.js +9 -8
  668. package/dist/v2/patterns/SaveFilterDialog.js.map +1 -1
  669. package/dist/v2/patterns/SavedFiltersMenu.d.ts +7 -7
  670. package/dist/v2/patterns/SavedFiltersMenu.d.ts.map +1 -1
  671. package/dist/v2/patterns/SavedFiltersMenu.js +9 -8
  672. package/dist/v2/patterns/SavedFiltersMenu.js.map +1 -1
  673. package/dist/v2/patterns/SkeletonPageShell.d.ts +7 -7
  674. package/dist/v2/patterns/SkeletonPageShell.d.ts.map +1 -1
  675. package/dist/v2/patterns/SkeletonPageShell.js.map +1 -1
  676. package/dist/v2/patterns/SortableHeader.d.ts +1 -1
  677. package/dist/v2/patterns/SortableHeader.d.ts.map +1 -1
  678. package/dist/v2/patterns/SortableHeader.js.map +1 -1
  679. package/dist/v2/patterns/Tour.d.ts +12 -12
  680. package/dist/v2/patterns/Tour.d.ts.map +1 -1
  681. package/dist/v2/patterns/Tour.js +9 -8
  682. package/dist/v2/patterns/Tour.js.map +1 -1
  683. package/dist/v2/patterns/_dataGridShared.d.ts +25 -6
  684. package/dist/v2/patterns/_dataGridShared.d.ts.map +1 -1
  685. package/dist/v2/patterns/_dataGridShared.js +37 -3
  686. package/dist/v2/patterns/_dataGridShared.js.map +1 -1
  687. package/dist/v2/patterns/_useColumnReorder.d.ts +1 -1
  688. package/dist/v2/patterns/_useColumnReorder.d.ts.map +1 -1
  689. package/dist/v2/patterns/_useColumnReorder.js.map +1 -1
  690. package/dist/v2/patterns/_useColumnResize.d.ts +1 -1
  691. package/dist/v2/patterns/_useColumnResize.d.ts.map +1 -1
  692. package/dist/v2/patterns/_useColumnResize.js.map +1 -1
  693. package/dist/v2/patterns/index.d.ts +27 -0
  694. package/dist/v2/patterns/index.d.ts.map +1 -1
  695. package/dist/v2/patterns/index.js.map +1 -1
  696. package/dist/v2/personalization/PersonalizationProvider.d.ts +9 -9
  697. package/dist/v2/personalization/PersonalizationProvider.d.ts.map +1 -1
  698. package/dist/v2/personalization/PersonalizationProvider.js.map +1 -1
  699. package/dist/v2/personalization/adapters/createLocalStorageAdapter.d.ts +1 -1
  700. package/dist/v2/personalization/adapters/createLocalStorageAdapter.d.ts.map +1 -1
  701. package/dist/v2/personalization/adapters/createLocalStorageAdapter.js.map +1 -1
  702. package/dist/v2/personalization/adapters/createMemoryAdapter.d.ts +1 -1
  703. package/dist/v2/personalization/adapters/createMemoryAdapter.d.ts.map +1 -1
  704. package/dist/v2/personalization/adapters/createMemoryAdapter.js.map +1 -1
  705. package/dist/v2/personalization/capabilities/favoritesView.d.ts +3 -3
  706. package/dist/v2/personalization/capabilities/favoritesView.d.ts.map +1 -1
  707. package/dist/v2/personalization/capabilities/favoritesView.js.map +1 -1
  708. package/dist/v2/personalization/capabilities/savedFilters.d.ts +3 -3
  709. package/dist/v2/personalization/capabilities/savedFilters.d.ts.map +1 -1
  710. package/dist/v2/personalization/capabilities/savedFilters.js.map +1 -1
  711. package/dist/v2/personalization/createPersonalizationStore.d.ts +8 -8
  712. package/dist/v2/personalization/createPersonalizationStore.d.ts.map +1 -1
  713. package/dist/v2/personalization/createPersonalizationStore.js.map +1 -1
  714. package/dist/v2/personalization/schema.d.ts +2 -2
  715. package/dist/v2/personalization/schema.d.ts.map +1 -1
  716. package/dist/v2/personalization/schema.js.map +1 -1
  717. package/dist/v2/personalization/types.d.ts +19 -19
  718. package/dist/v2/personalization/types.d.ts.map +1 -1
  719. package/dist/v2/personalization/types.js.map +1 -1
  720. package/dist/v2/referentiel/ReferentielProvider.d.ts +4 -4
  721. package/dist/v2/referentiel/ReferentielProvider.d.ts.map +1 -1
  722. package/dist/v2/referentiel/ReferentielProvider.js.map +1 -1
  723. package/dist/v2/referentiel/useReferentielOptions.d.ts +4 -4
  724. package/dist/v2/referentiel/useReferentielOptions.d.ts.map +1 -1
  725. package/dist/v2/referentiel/useReferentielOptions.js.map +1 -1
  726. package/dist/v2/referentiel/useReferentielSearch.d.ts +3 -3
  727. package/dist/v2/referentiel/useReferentielSearch.d.ts.map +1 -1
  728. package/dist/v2/referentiel/useReferentielSearch.js.map +1 -1
  729. package/dist/v2/theme/createPortnetTheme.d.ts +32 -7
  730. package/dist/v2/theme/createPortnetTheme.d.ts.map +1 -1
  731. package/dist/v2/theme/createPortnetTheme.js +25 -1
  732. package/dist/v2/theme/createPortnetTheme.js.map +1 -1
  733. package/dist/v2/types/datagrid.d.ts +59 -59
  734. package/dist/v2/types/datagrid.d.ts.map +1 -1
  735. package/dist/v2/types/datagrid.js.map +1 -1
  736. package/dist/v2/utils/apiError.d.ts +65 -4
  737. package/dist/v2/utils/apiError.d.ts.map +1 -1
  738. package/dist/v2/utils/apiError.js +69 -6
  739. package/dist/v2/utils/apiError.js.map +1 -1
  740. package/dist/v2/utils/index.d.ts +1 -0
  741. package/dist/v2/utils/index.d.ts.map +1 -1
  742. package/dist/v2/utils/index.js +7 -0
  743. package/dist/v2/utils/index.js.map +1 -1
  744. package/dist/v2/utils/mergeLabels.d.ts +59 -0
  745. package/dist/v2/utils/mergeLabels.d.ts.map +1 -0
  746. package/dist/v2/utils/mergeLabels.js +93 -0
  747. package/dist/v2/utils/mergeLabels.js.map +1 -0
  748. package/package.json +23 -15
@@ -0,0 +1,196 @@
1
+ /**
2
+ * @portnet/ui — root entry (MUI v9)
3
+ *
4
+ * The v1 Pui* surface was REMOVED in 0.3.0-mui9. The package now
5
+ * exposes the modernised v2 Design System directly at its root.
6
+ *
7
+ * Imports
8
+ * -------
9
+ *
10
+ * // Components (flat — preferred)
11
+ * import { Button, Modal, FormGrid, Combobox, ... } from "@portnet/ui";
12
+ *
13
+ * // Theme + CSS variables + tokens + hooks (flat, or subpath entrypoints)
14
+ * import { createPortnetTheme, injectCssVariables } from "@portnet/ui";
15
+ * import { palette, spacing } from "@portnet/ui/tokens";
16
+ * import { useFocusTrap } from "@portnet/ui/hooks";
17
+ *
18
+ * // Misc utils (flat) — class names, money formatting, WCAG contrast,
19
+ * // and base64 → browser download
20
+ * import { cx, fmtMoney, contrast, downloadBase64File } from "@portnet/ui";
21
+ *
22
+ * // Modal layering constants (flat)
23
+ * import { MODAL_POPPER_PROPS, MODAL_ZINDEX } from "@portnet/ui";
24
+ *
25
+ * // Personalization foundation (flat, or "@portnet/ui/personalization")
26
+ * import { UserPersonalizationProvider, createLocalStorageAdapter } from "@portnet/ui";
27
+ *
28
+ * // Referentiel data layer (flat) — backs ReferentielField /
29
+ * // FormikReferentielField. Mount the provider once at the app root.
30
+ * import { ReferentielProvider, useReferentielSearch } from "@portnet/ui";
31
+ *
32
+ * // Domain models + UI types (flat, type-only)
33
+ * import type { FavoriteItem, SavedFilter, GridColumn } from "@portnet/ui";
34
+ *
35
+ * // Legacy `@portnet/ui/v2/*` paths still resolve transitionally
36
+ * // through the v2 re-export below, deprecated and scheduled for
37
+ * // removal in 0.4.0. NOTE: capability added after that deprecation
38
+ * // is surfaced flat ONLY and is deliberately absent from `v2.*`.
39
+ *
40
+ * No v1 surface remains. Consuming modules that still import any
41
+ * Pui* component will fail to resolve and must migrate per the
42
+ * table in docs/migration-mui9/03-batch3-purge-v1.md.
43
+ */
44
+
45
+ // Flat re-export of every v2 component, pattern, hook, and the
46
+ // theme factory. This is what consuming modules pin against
47
+ // (`import { Button } from "@portnet/ui"`).
48
+ export * from "./v2/components";
49
+ export * from "./v2/patterns";
50
+ export * from "./v2/hooks";
51
+ export { createPortnetTheme, getCssVariables, injectCssVariables, removeCssVariables } from "./v2/theme";
52
+
53
+ // Theme factory typed contract, flat + type-only (capability gap G-33).
54
+ //
55
+ // The theme VALUES were flat-exported above while the types describing their
56
+ // options were reachable ONLY from the deprecated `@portnet/ui/v2` subpath.
57
+ // Every host module wraps createPortnetTheme in a local `build<Module>Theme`
58
+ // helper (see the GU modules' utils/appearance), so every host needs this
59
+ // contract to type its own wrapper — and had exactly two ways to get it:
60
+ // import from a surface scheduled for removal in 0.4.0, or fall back to
61
+ // `brand?: object` + `as Parameters<typeof createPortnetTheme>[0]`, both on
62
+ // the Platform TypeScript Guidelines FORBIDDEN list. ./v2/theme's own doc
63
+ // comment already names that anti-pattern as the reason these types were
64
+ // published; it just never reached the surface consumers are told to migrate
65
+ // TO. Closing that here removes the last reason a module needs `@portnet/ui/v2`
66
+ // for the theme layer.
67
+ //
68
+ // Flat-only, per the `v2` policy note at the bottom of this file.
69
+ // Purely additive and type-only; nothing existing changed.
70
+
71
+ // Added while migrating ms-dfd-fe to TypeScript: cx / fmtMoney / contrast had
72
+ // no flat or subpath route, only the deprecated `v2.*` namespace below.
73
+ // downloadBase64File + getMimeType were added later (mjcc-fe Area 5) and are
74
+ // flat-only by policy — see the note on `v2` at the bottom of this file.
75
+ // Purely additive re-exports; nothing existing changed.
76
+ //
77
+ // G-34 (caution-ui Area 6) — openBase64FileInTab + downloadBlobFile added.
78
+ // These two were NOT flat-only additions: ./v2/index.ts has exported them all
79
+ // along, so the FLAT ROOT — the surface the policy at the bottom of this file
80
+ // tells every module to migrate TO — was a strict SUBSET of the deprecated
81
+ // surface it replaces. A module obeying the migration policy lost access to
82
+ // both, which is how caution-ui's Area 6 build broke:
83
+ //
84
+ // Attempted import error: 'downloadBlobFile' is not exported
85
+ // from '@portnet/ui'
86
+ //
87
+ // Root cause is mechanical, and worth fixing properly rather than name by name:
88
+ // ./v2/components, ./v2/patterns and ./v2/hooks are re-exported above with
89
+ // `export *`, so anything added to them surfaces automatically. ./v2/utils is
90
+ // re-exported by EXPLICIT NAME LIST, so every new util silently fails to reach
91
+ // consumers until someone hits a build error. A wildcard is not a safe swap
92
+ // here — ./v2/utils also carries `mergeLabels`, an internal label-merging
93
+ // helper with no host use case, and widening a certified public surface by
94
+ // accident is worse than the drift. The list stays, and the invariant is stated
95
+ // instead: ANY addition to ./v2/utils intended for hosts must be added here in
96
+ // the same commit.
97
+ export { cx, fmtMoney, contrast, downloadBase64File, getMimeType, openBase64FileInTab, downloadBlobFile } from "./v2/utils";
98
+
99
+ // Error narrowing + the network-status channel. Flat-only per the `v2` policy
100
+ // note at the bottom of this file. Both were added from the
101
+ // procuration-portnet-fe Area 5 gap audit (G-04, G-03):
102
+ //
103
+ // - getApiErrorMessage / getApiErrorStatus close the hole between two rules
104
+ // the platform imposes together — `useUnknownInCatchVariables` is mandatory
105
+ // and `any` / unsafe assertions are forbidden, with nothing sanctioned in
106
+ // between. Every audited module had bridged it with
107
+ // `error as { response?: { data?: { message?: unknown } } }`.
108
+ //
109
+ // - networkStatus is the feed for NetworkErrorBanner, which shipped as a
110
+ // presentational component with its trigger contract left to consumers.
111
+ //
112
+ // G-34 — getApiErrorDetail added. Its own docstring PRESCRIBES a pairing that
113
+ // was impossible to write, because the companion was never surfaced:
114
+ //
115
+ // toast(getApiErrorMessage(err, "Échec de l'envoi."), "error");
116
+ // console.error("[submit]", getApiErrorStatus(err), getApiErrorDetail(err));
117
+ //
118
+ // The split exists because getApiErrorMessage deliberately SUPPRESSES transport
119
+ // phrasings (G-07) — right for a toast, wrong for a console or an APM
120
+ // breadcrumb, where "Request failed with status code 502" is exactly what an
121
+ // operator needs. Without the escape hatch a host either logs the sanitised
122
+ // string (losing the diagnostic) or re-reads `error.message` by hand with an
123
+ // assertion (the very thing G-04 exists to prevent).
124
+ //
125
+ // Purely additive; nothing existing changed.
126
+ export { getApiErrorMessage, getApiErrorDetail, getApiErrorStatus, DEFAULT_API_ERROR_MESSAGE, networkStatus, createNetworkStatus } from "./v2/utils";
127
+ // Route-level Suspense fallback. R-P.1 MUST requires a "fallback skeleton page",
128
+ // and the library had every skeleton PART plus PageBusy, but nothing satisfying
129
+ // the rule: PageBusy is a full-screen spinner, which R-8.1 MUST forbids for
130
+ // navigation. So every module hand-built one, and to avoid the CLS a skeleton
131
+ // exists to prevent it had to copy ActionBar's and PageContent's padding
132
+ // literals out of this library. Owning it here keeps the three in lockstep.
133
+ // Capability gap G-02 (procuration-portnet-fe Area 5). Flat-only, per the policy
134
+ // note below.
135
+ export { default as SkeletonPageShell } from "./v2/patterns/SkeletonPageShell";
136
+ // Modal/Drawer/Combobox/DatePicker layering constants - needed by any
137
+ // consumer stacking a popover-ish component (Combobox, DateTimePicker)
138
+ // above a Modal or Drawer. Was v2-namespace-only.
139
+ export { MODAL_POPPER_PROPS, MODAL_ZINDEX } from "./v2/modalContext";
140
+
141
+ // Personalization foundation runtime API (favorites, saved filters).
142
+ // Named re-export, not a wildcard: ./v2/personalization also carries
143
+ // the Scope/FavoriteRef/SavedFilter model types for its own internal
144
+ // use, which are already flat-exported canonically via ./v2/models
145
+ // below - a wildcard here would re-export them a second time and
146
+ // collide (TS2308). Mirrors exactly what ./v2/index.ts already does
147
+ // internally for the same reason.
148
+ export { UserPersonalizationProvider, createLocalStorageAdapter, createMemoryAdapter, registerCapability, useFavorites, useIsFavorite, useFavoritesView, filterRowsByFavorites, sortRowsByFavorites, FAVORITES_FILTER, FAVORITES_SORT, useSavedFilters } from "./v2/personalization";
149
+
150
+ // Referentiel data layer runtime API (config provider + hooks). Backs
151
+ // ReferentielField / FormikReferentielField, which are flat-exported
152
+ // above via ./v2/patterns - the field UI was reachable while the data
153
+ // layer that feeds it was not, so consumers had to either import from
154
+ // the deprecated `@portnet/ui/v2` surface or rebuild the client
155
+ // locally. Added while auditing mjcc-fe, which had done the latter.
156
+ //
157
+ // Named re-export, not a wildcard, for the SAME reason as
158
+ // personalization above: ./v2/referentiel also re-exports
159
+ // ReferentielSearchArgs, ReferentielSearchResult and
160
+ // ReferentielSearchFn for its own use, and those names are already
161
+ // flat-exported canonically through ./v2/models below. A wildcard
162
+ // would export them twice and collide (TS2308). The type layer keeps
163
+ // its single canonical route.
164
+ export { ReferentielProvider, ReferentielContext, useReferentielClient, useReferentielOptions, useReferentielSearch } from "./v2/referentiel";
165
+
166
+ // Domain models & shared UI/structural types, flat + type-only (no
167
+ // runtime cost). Mirrors the same re-export already done inside
168
+ // ./v2 — added here so consumers migrating off `v2.*` have a route
169
+ // to the shared types the platform guidelines require reusing
170
+ // (DrawerProps, FavoriteItem, SavedFilter, GridColumn, GridAction,
171
+ // WizardStep, Notification, FormField, etc.) without falling back to
172
+ // the deprecated namespace just to get a type import. Conflicting
173
+ // names across the two star-exports are omitted per ES module
174
+ // semantics rather than erroring.
175
+ export * from "./v2/models";
176
+ export * from "./v2/types";
177
+
178
+ // Transitional alias — the `@portnet/ui/v2` subpath kept resolving
179
+ // for one minor cycle so consuming modules can migrate their
180
+ // imports independently of the package bump. Scheduled removal:
181
+ // 0.4.0. Track removal in the Batch 5 cleanup ticket.
182
+ //
183
+ // POLICY: capability added after this deprecation is surfaced on the
184
+ // flat root ONLY and is not added to ./v2/index.ts — adding it there
185
+ // would hand consumers a new reason to stay on a retiring surface.
186
+ // downloadBase64File / getMimeType are the first such additions.
187
+ //
188
+ // COROLLARY, learned the hard way (G-34): the policy only works if the flat
189
+ // root is a strict SUPERSET of ./v2. It was not — downloadBlobFile and
190
+ // openBase64FileInTab were on v2 and missing here, so "migrate off v2" meant
191
+ // "lose two utilities". Before deprecating anything further, diff the two
192
+ // surfaces; `npm run api:check` covers the root but does not compare it against
193
+ // ./v2.
194
+ import * as _v from "./v2";
195
+ export { _v as v2 };
196
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["createPortnetTheme","getCssVariables","injectCssVariables","removeCssVariables","cx","fmtMoney","contrast","downloadBase64File","getMimeType","openBase64FileInTab","downloadBlobFile","getApiErrorMessage","getApiErrorDetail","getApiErrorStatus","DEFAULT_API_ERROR_MESSAGE","networkStatus","createNetworkStatus","default","SkeletonPageShell","MODAL_POPPER_PROPS","MODAL_ZINDEX","UserPersonalizationProvider","createLocalStorageAdapter","createMemoryAdapter","registerCapability","useFavorites","useIsFavorite","useFavoritesView","filterRowsByFavorites","sortRowsByFavorites","FAVORITES_FILTER","FAVORITES_SORT","useSavedFilters","ReferentielProvider","ReferentielContext","useReferentielClient","useReferentielOptions","useReferentielSearch","_v","v2"],"sources":["../../src/lib/index.ts"],"sourcesContent":["/**\r\n * @portnet/ui — root entry (MUI v9)\r\n *\r\n * The v1 Pui* surface was REMOVED in 0.3.0-mui9. The package now\r\n * exposes the modernised v2 Design System directly at its root.\r\n *\r\n * Imports\r\n * -------\r\n *\r\n * // Components (flat — preferred)\r\n * import { Button, Modal, FormGrid, Combobox, ... } from \"@portnet/ui\";\r\n *\r\n * // Theme + CSS variables + tokens + hooks (flat, or subpath entrypoints)\r\n * import { createPortnetTheme, injectCssVariables } from \"@portnet/ui\";\r\n * import { palette, spacing } from \"@portnet/ui/tokens\";\r\n * import { useFocusTrap } from \"@portnet/ui/hooks\";\r\n *\r\n * // Misc utils (flat) — class names, money formatting, WCAG contrast,\r\n * // and base64 → browser download\r\n * import { cx, fmtMoney, contrast, downloadBase64File } from \"@portnet/ui\";\r\n *\r\n * // Modal layering constants (flat)\r\n * import { MODAL_POPPER_PROPS, MODAL_ZINDEX } from \"@portnet/ui\";\r\n *\r\n * // Personalization foundation (flat, or \"@portnet/ui/personalization\")\r\n * import { UserPersonalizationProvider, createLocalStorageAdapter } from \"@portnet/ui\";\r\n *\r\n * // Referentiel data layer (flat) — backs ReferentielField /\r\n * // FormikReferentielField. Mount the provider once at the app root.\r\n * import { ReferentielProvider, useReferentielSearch } from \"@portnet/ui\";\r\n *\r\n * // Domain models + UI types (flat, type-only)\r\n * import type { FavoriteItem, SavedFilter, GridColumn } from \"@portnet/ui\";\r\n *\r\n * // Legacy `@portnet/ui/v2/*` paths still resolve transitionally\r\n * // through the v2 re-export below, deprecated and scheduled for\r\n * // removal in 0.4.0. NOTE: capability added after that deprecation\r\n * // is surfaced flat ONLY and is deliberately absent from `v2.*`.\r\n *\r\n * No v1 surface remains. Consuming modules that still import any\r\n * Pui* component will fail to resolve and must migrate per the\r\n * table in docs/migration-mui9/03-batch3-purge-v1.md.\r\n */\r\n\r\n// Flat re-export of every v2 component, pattern, hook, and the\r\n// theme factory. This is what consuming modules pin against\r\n// (`import { Button } from \"@portnet/ui\"`).\r\nexport * from \"./v2/components\";\r\nexport * from \"./v2/patterns\";\r\nexport * from \"./v2/hooks\";\r\nexport {\r\n createPortnetTheme,\r\n getCssVariables,\r\n injectCssVariables,\r\n removeCssVariables,\r\n} from \"./v2/theme\";\r\n\r\n// Theme factory typed contract, flat + type-only (capability gap G-33).\r\n//\r\n// The theme VALUES were flat-exported above while the types describing their\r\n// options were reachable ONLY from the deprecated `@portnet/ui/v2` subpath.\r\n// Every host module wraps createPortnetTheme in a local `build<Module>Theme`\r\n// helper (see the GU modules' utils/appearance), so every host needs this\r\n// contract to type its own wrapper — and had exactly two ways to get it:\r\n// import from a surface scheduled for removal in 0.4.0, or fall back to\r\n// `brand?: object` + `as Parameters<typeof createPortnetTheme>[0]`, both on\r\n// the Platform TypeScript Guidelines FORBIDDEN list. ./v2/theme's own doc\r\n// comment already names that anti-pattern as the reason these types were\r\n// published; it just never reached the surface consumers are told to migrate\r\n// TO. Closing that here removes the last reason a module needs `@portnet/ui/v2`\r\n// for the theme layer.\r\n//\r\n// Flat-only, per the `v2` policy note at the bottom of this file.\r\n// Purely additive and type-only; nothing existing changed.\r\nexport type {\r\n CreatePortnetThemeOptions,\r\n BrandTokens,\r\n BrandSecondaryTokens,\r\n} from \"./v2/theme\";\r\n\r\n// Added while migrating ms-dfd-fe to TypeScript: cx / fmtMoney / contrast had\r\n// no flat or subpath route, only the deprecated `v2.*` namespace below.\r\n// downloadBase64File + getMimeType were added later (mjcc-fe Area 5) and are\r\n// flat-only by policy — see the note on `v2` at the bottom of this file.\r\n// Purely additive re-exports; nothing existing changed.\r\n//\r\n// G-34 (caution-ui Area 6) — openBase64FileInTab + downloadBlobFile added.\r\n// These two were NOT flat-only additions: ./v2/index.ts has exported them all\r\n// along, so the FLAT ROOT — the surface the policy at the bottom of this file\r\n// tells every module to migrate TO — was a strict SUBSET of the deprecated\r\n// surface it replaces. A module obeying the migration policy lost access to\r\n// both, which is how caution-ui's Area 6 build broke:\r\n//\r\n// Attempted import error: 'downloadBlobFile' is not exported\r\n// from '@portnet/ui'\r\n//\r\n// Root cause is mechanical, and worth fixing properly rather than name by name:\r\n// ./v2/components, ./v2/patterns and ./v2/hooks are re-exported above with\r\n// `export *`, so anything added to them surfaces automatically. ./v2/utils is\r\n// re-exported by EXPLICIT NAME LIST, so every new util silently fails to reach\r\n// consumers until someone hits a build error. A wildcard is not a safe swap\r\n// here — ./v2/utils also carries `mergeLabels`, an internal label-merging\r\n// helper with no host use case, and widening a certified public surface by\r\n// accident is worse than the drift. The list stays, and the invariant is stated\r\n// instead: ANY addition to ./v2/utils intended for hosts must be added here in\r\n// the same commit.\r\nexport {\r\n cx,\r\n fmtMoney,\r\n contrast,\r\n downloadBase64File,\r\n getMimeType,\r\n openBase64FileInTab,\r\n downloadBlobFile,\r\n} from \"./v2/utils\";\r\n\r\n// Error narrowing + the network-status channel. Flat-only per the `v2` policy\r\n// note at the bottom of this file. Both were added from the\r\n// procuration-portnet-fe Area 5 gap audit (G-04, G-03):\r\n//\r\n// - getApiErrorMessage / getApiErrorStatus close the hole between two rules\r\n// the platform imposes together — `useUnknownInCatchVariables` is mandatory\r\n// and `any` / unsafe assertions are forbidden, with nothing sanctioned in\r\n// between. Every audited module had bridged it with\r\n// `error as { response?: { data?: { message?: unknown } } }`.\r\n//\r\n// - networkStatus is the feed for NetworkErrorBanner, which shipped as a\r\n// presentational component with its trigger contract left to consumers.\r\n//\r\n// G-34 — getApiErrorDetail added. Its own docstring PRESCRIBES a pairing that\r\n// was impossible to write, because the companion was never surfaced:\r\n//\r\n// toast(getApiErrorMessage(err, \"Échec de l'envoi.\"), \"error\");\r\n// console.error(\"[submit]\", getApiErrorStatus(err), getApiErrorDetail(err));\r\n//\r\n// The split exists because getApiErrorMessage deliberately SUPPRESSES transport\r\n// phrasings (G-07) — right for a toast, wrong for a console or an APM\r\n// breadcrumb, where \"Request failed with status code 502\" is exactly what an\r\n// operator needs. Without the escape hatch a host either logs the sanitised\r\n// string (losing the diagnostic) or re-reads `error.message` by hand with an\r\n// assertion (the very thing G-04 exists to prevent).\r\n//\r\n// Purely additive; nothing existing changed.\r\nexport {\r\n getApiErrorMessage,\r\n getApiErrorDetail,\r\n getApiErrorStatus,\r\n DEFAULT_API_ERROR_MESSAGE,\r\n networkStatus,\r\n createNetworkStatus,\r\n} from \"./v2/utils\";\r\nexport type { NetworkStatus, NetworkStatusListener } from \"./v2/utils\";\r\n\r\n// Route-level Suspense fallback. R-P.1 MUST requires a \"fallback skeleton page\",\r\n// and the library had every skeleton PART plus PageBusy, but nothing satisfying\r\n// the rule: PageBusy is a full-screen spinner, which R-8.1 MUST forbids for\r\n// navigation. So every module hand-built one, and to avoid the CLS a skeleton\r\n// exists to prevent it had to copy ActionBar's and PageContent's padding\r\n// literals out of this library. Owning it here keeps the three in lockstep.\r\n// Capability gap G-02 (procuration-portnet-fe Area 5). Flat-only, per the policy\r\n// note below.\r\nexport { default as SkeletonPageShell } from \"./v2/patterns/SkeletonPageShell\";\r\nexport type {\r\n SkeletonPageShellProps,\r\n SkeletonPageShellVariant,\r\n} from \"./v2/patterns/SkeletonPageShell\";\r\n\r\n// Modal/Drawer/Combobox/DatePicker layering constants - needed by any\r\n// consumer stacking a popover-ish component (Combobox, DateTimePicker)\r\n// above a Modal or Drawer. Was v2-namespace-only.\r\nexport { MODAL_POPPER_PROPS, MODAL_ZINDEX } from \"./v2/modalContext\";\r\n\r\n// Personalization foundation runtime API (favorites, saved filters).\r\n// Named re-export, not a wildcard: ./v2/personalization also carries\r\n// the Scope/FavoriteRef/SavedFilter model types for its own internal\r\n// use, which are already flat-exported canonically via ./v2/models\r\n// below - a wildcard here would re-export them a second time and\r\n// collide (TS2308). Mirrors exactly what ./v2/index.ts already does\r\n// internally for the same reason.\r\nexport {\r\n UserPersonalizationProvider,\r\n createLocalStorageAdapter,\r\n createMemoryAdapter,\r\n registerCapability,\r\n useFavorites,\r\n useIsFavorite,\r\n useFavoritesView,\r\n filterRowsByFavorites,\r\n sortRowsByFavorites,\r\n FAVORITES_FILTER,\r\n FAVORITES_SORT,\r\n useSavedFilters,\r\n} from \"./v2/personalization\";\r\n\r\n// Referentiel data layer runtime API (config provider + hooks). Backs\r\n// ReferentielField / FormikReferentielField, which are flat-exported\r\n// above via ./v2/patterns - the field UI was reachable while the data\r\n// layer that feeds it was not, so consumers had to either import from\r\n// the deprecated `@portnet/ui/v2` surface or rebuild the client\r\n// locally. Added while auditing mjcc-fe, which had done the latter.\r\n//\r\n// Named re-export, not a wildcard, for the SAME reason as\r\n// personalization above: ./v2/referentiel also re-exports\r\n// ReferentielSearchArgs, ReferentielSearchResult and\r\n// ReferentielSearchFn for its own use, and those names are already\r\n// flat-exported canonically through ./v2/models below. A wildcard\r\n// would export them twice and collide (TS2308). The type layer keeps\r\n// its single canonical route.\r\nexport {\r\n ReferentielProvider,\r\n ReferentielContext,\r\n useReferentielClient,\r\n useReferentielOptions,\r\n useReferentielSearch,\r\n} from \"./v2/referentiel\";\r\n\r\n// Domain models & shared UI/structural types, flat + type-only (no\r\n// runtime cost). Mirrors the same re-export already done inside\r\n// ./v2 — added here so consumers migrating off `v2.*` have a route\r\n// to the shared types the platform guidelines require reusing\r\n// (DrawerProps, FavoriteItem, SavedFilter, GridColumn, GridAction,\r\n// WizardStep, Notification, FormField, etc.) without falling back to\r\n// the deprecated namespace just to get a type import. Conflicting\r\n// names across the two star-exports are omitted per ES module\r\n// semantics rather than erroring.\r\nexport * from \"./v2/models\";\r\nexport * from \"./v2/types\";\r\n\r\n// Transitional alias — the `@portnet/ui/v2` subpath kept resolving\r\n// for one minor cycle so consuming modules can migrate their\r\n// imports independently of the package bump. Scheduled removal:\r\n// 0.4.0. Track removal in the Batch 5 cleanup ticket.\r\n//\r\n// POLICY: capability added after this deprecation is surfaced on the\r\n// flat root ONLY and is not added to ./v2/index.ts — adding it there\r\n// would hand consumers a new reason to stay on a retiring surface.\r\n// downloadBase64File / getMimeType are the first such additions.\r\n//\r\n// COROLLARY, learned the hard way (G-34): the policy only works if the flat\r\n// root is a strict SUPERSET of ./v2. It was not — downloadBlobFile and\r\n// openBase64FileInTab were on v2 and missing here, so \"migrate off v2\" meant\r\n// \"lose two utilities\". Before deprecating anything further, diff the two\r\n// surfaces; `npm run api:check` covers the root but does not compare it against\r\n// ./v2.\r\nexport * as v2 from \"./v2\";\r\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,iBAAiB;AAC/B,cAAc,eAAe;AAC7B,cAAc,YAAY;AAC1B,SACEA,kBAAkB,EAClBC,eAAe,EACfC,kBAAkB,EAClBC,kBAAkB,QACb,YAAY;;AAEnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SACEC,EAAE,EACFC,QAAQ,EACRC,QAAQ,EACRC,kBAAkB,EAClBC,WAAW,EACXC,mBAAmB,EACnBC,gBAAgB,QACX,YAAY;;AAEnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SACEC,kBAAkB,EAClBC,iBAAiB,EACjBC,iBAAiB,EACjBC,yBAAyB,EACzBC,aAAa,EACbC,mBAAmB,QACd,YAAY;AAGnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,OAAO,IAAIC,iBAAiB,QAAQ,iCAAiC;AAM9E;AACA;AACA;AACA,SAASC,kBAAkB,EAAEC,YAAY,QAAQ,mBAAmB;;AAEpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SACEC,2BAA2B,EAC3BC,yBAAyB,EACzBC,mBAAmB,EACnBC,kBAAkB,EAClBC,YAAY,EACZC,aAAa,EACbC,gBAAgB,EAChBC,qBAAqB,EACrBC,mBAAmB,EACnBC,gBAAgB,EAChBC,cAAc,EACdC,eAAe,QACV,sBAAsB;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SACEC,mBAAmB,EACnBC,kBAAkB,EAClBC,oBAAoB,EACpBC,qBAAqB,EACrBC,oBAAoB,QACf,kBAAkB;;AAEzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,aAAa;AAC3B,cAAc,YAAY;;AAE1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA,YAAAC,EAAA,MACoB,MAAM;AAAA,SAAAA,EAAA,IAAdC,EAAE","ignoreList":[]}
@@ -0,0 +1,160 @@
1
+ import "@testing-library/jest-dom";
2
+ import * as React from "react";
3
+ import { render, screen } from "@testing-library/react";
4
+ import FieldError from "../components/FieldError";
5
+ import Field from "../components/Field";
6
+
7
+ /**
8
+ * FieldError — contract tests, including its integration into Field.
9
+ *
10
+ * WHY THIS FILE EXISTS
11
+ * --------------------
12
+ * §10.3 R-G.6 MUST. But the real reason is narrower and worth stating: the
13
+ * contract this component carries is INVISIBLE. `Field` supplies an id, and that
14
+ * id must reach the control's `aria-describedby` so a screen reader announces
15
+ * the error when focus lands on the input. Break that wiring and NOTHING
16
+ * changes: same pixels, same screenshot, same visual review — only a blind user
17
+ * silently stops being told why their submit failed. There is no way to catch
18
+ * that except by asserting it.
19
+ *
20
+ * The assertions below use `toHaveAccessibleDescription`, not id comparisons, on
21
+ * purpose. It resolves aria-describedby to the text a screen reader would
22
+ * actually announce, so the test states the USER-FACING outcome and stays true
23
+ * if the id-generation scheme ever changes.
24
+ *
25
+ * NOT COVERED — deliberately
26
+ * R-4.1's visual half ("sous le champ, en rouge, avec icône") and the
27
+ * first-line icon alignment on a wrapping message are layout and colour. jsdom
28
+ * resolves neither CSS variables nor flexbox, so asserting them here would pass
29
+ * while the message rendered black and centred. Those live in
30
+ * FieldError.stories.tsx.
31
+ */
32
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
33
+ describe("FieldError — standalone", function () {
34
+ test("announces itself as an alert carrying the message", function () {
35
+ render(/*#__PURE__*/_jsx(FieldError, {
36
+ children: "Ajoutez au moins un article avant de soumettre."
37
+ }));
38
+ expect(screen.getByRole("alert")).toHaveTextContent("Ajoutez au moins un article avant de soumettre.");
39
+ });
40
+ test("forwards id so a host can wire its own aria-describedby", function () {
41
+ render(/*#__PURE__*/_jsx(FieldError, {
42
+ id: "articles-error",
43
+ children: "Ajoutez au moins un article."
44
+ }));
45
+ expect(screen.getByRole("alert")).toHaveAttribute("id", "articles-error");
46
+ });
47
+ test("omits id when none is supplied", function () {
48
+ /* The list-level case usually has nothing to bind to. Emitting an empty or
49
+ * generated id would create a describedby target nobody references. */
50
+ render(/*#__PURE__*/_jsx(FieldError, {
51
+ children: "Ajoutez au moins un article."
52
+ }));
53
+ expect(screen.getByRole("alert")).not.toHaveAttribute("id");
54
+ });
55
+ test("the icon is hidden from assistive tech", function () {
56
+ /* R-Ar.2 — the message IS the announcement; an announced glyph would double
57
+ * it. No semantic query reaches a role-less, name-less element, hence the
58
+ * testid the component exposes for exactly this assertion. */
59
+ render(/*#__PURE__*/_jsx(FieldError, {
60
+ children: "Message"
61
+ }));
62
+ expect(screen.getByTestId("fielderror-icon")).toHaveAttribute("aria-hidden", "true");
63
+ });
64
+ });
65
+ describe("FieldError — inside Field (the wiring that has no visual tell)", function () {
66
+ test("the error becomes the control's accessible description", function () {
67
+ render(/*#__PURE__*/_jsx(Field, {
68
+ label: "Num\xE9ro de titre",
69
+ error: "Le num\xE9ro est invalide. Format : AAAA-IM-NNNNN.",
70
+ children: /*#__PURE__*/_jsx("input", {})
71
+ }));
72
+ expect(screen.getByRole("textbox")).toHaveAccessibleDescription("Le numéro est invalide. Format : AAAA-IM-NNNNN.");
73
+ });
74
+ test("the control is marked invalid", function () {
75
+ render(/*#__PURE__*/_jsx(Field, {
76
+ label: "Num\xE9ro",
77
+ error: "Invalide.",
78
+ children: /*#__PURE__*/_jsx("input", {})
79
+ }));
80
+ // jest-dom's toBeInvalid reads aria-invalid — R-I.3.
81
+ expect(screen.getByRole("textbox")).toBeInvalid();
82
+ });
83
+ test("a host-supplied aria-describedby is PRESERVED, not replaced", function () {
84
+ /* The merge is the fragile part. Overwriting instead of merging silently
85
+ * drops a consumer's external help text, and again nothing visual changes.
86
+ * Asserted with two order-independent regexes rather than one exact string,
87
+ * so the test does not encode which fragment Field puts first. */
88
+ render(/*#__PURE__*/_jsxs(_Fragment, {
89
+ children: [/*#__PURE__*/_jsx("span", {
90
+ id: "host-help",
91
+ children: "Format attendu : AAAA-IM-NNNNN."
92
+ }), /*#__PURE__*/_jsx(Field, {
93
+ label: "Num\xE9ro",
94
+ error: "Le num\xE9ro est incomplet.",
95
+ children: /*#__PURE__*/_jsx("input", {
96
+ "aria-describedby": "host-help"
97
+ })
98
+ })]
99
+ }));
100
+ var input = screen.getByRole("textbox");
101
+ expect(input).toHaveAccessibleDescription(/Format attendu/);
102
+ expect(input).toHaveAccessibleDescription(/incomplet/);
103
+ });
104
+ test("the hint is suppressed while an error is shown", function () {
105
+ /* Two competing descriptions under one field is worse than one. The hint
106
+ * returns once the error clears — verified by the rerender below. */
107
+ var _render = render(/*#__PURE__*/_jsx(Field, {
108
+ label: "Num\xE9ro",
109
+ hint: "Format : AAAA-IM-NNNNN",
110
+ error: "Le num\xE9ro est incomplet.",
111
+ children: /*#__PURE__*/_jsx("input", {})
112
+ })),
113
+ rerender = _render.rerender;
114
+ expect(screen.getByRole("alert")).toHaveTextContent("Le numéro est incomplet.");
115
+ expect(screen.queryByText("Format : AAAA-IM-NNNNN")).not.toBeInTheDocument();
116
+ rerender(/*#__PURE__*/_jsx(Field, {
117
+ label: "Num\xE9ro",
118
+ hint: "Format : AAAA-IM-NNNNN",
119
+ children: /*#__PURE__*/_jsx("input", {})
120
+ }));
121
+ expect(screen.getByText("Format : AAAA-IM-NNNNN")).toBeInTheDocument();
122
+ });
123
+ });
124
+ describe("FieldError — live-region mounting contract", function () {
125
+ test("no alert exists until an error appears", function () {
126
+ /* THE contract. `role=\"alert\"` announces on INSERTION: an element mounted
127
+ * permanently with empty content announces nothing when it later fills, so
128
+ * a well-meaning refactor that always renders the container — to \"avoid
129
+ * layout shift\", say — silently kills the announcement while every pixel
130
+ * and every screenshot stays identical. */
131
+ var _render2 = render(/*#__PURE__*/_jsx(Field, {
132
+ label: "Num\xE9ro",
133
+ children: /*#__PURE__*/_jsx("input", {})
134
+ })),
135
+ rerender = _render2.rerender;
136
+ expect(screen.queryByRole("alert")).not.toBeInTheDocument();
137
+ rerender(/*#__PURE__*/_jsx(Field, {
138
+ label: "Num\xE9ro",
139
+ error: "Le num\xE9ro est incomplet.",
140
+ children: /*#__PURE__*/_jsx("input", {})
141
+ }));
142
+ expect(screen.getByRole("alert")).toBeInTheDocument();
143
+ });
144
+ test("the alert unmounts when the error clears", function () {
145
+ var _render3 = render(/*#__PURE__*/_jsx(Field, {
146
+ label: "Num\xE9ro",
147
+ error: "Le num\xE9ro est incomplet.",
148
+ children: /*#__PURE__*/_jsx("input", {})
149
+ })),
150
+ rerender = _render3.rerender;
151
+ expect(screen.getByRole("alert")).toBeInTheDocument();
152
+ rerender(/*#__PURE__*/_jsx(Field, {
153
+ label: "Num\xE9ro",
154
+ children: /*#__PURE__*/_jsx("input", {})
155
+ }));
156
+ expect(screen.queryByRole("alert")).not.toBeInTheDocument();
157
+ expect(screen.getByRole("textbox")).not.toBeInvalid();
158
+ });
159
+ });
160
+ //# sourceMappingURL=FieldError.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FieldError.test.js","names":["React","render","screen","FieldError","Field","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","describe","test","children","expect","getByRole","toHaveTextContent","id","toHaveAttribute","not","getByTestId","label","error","toHaveAccessibleDescription","toBeInvalid","input","_render","hint","rerender","queryByText","toBeInTheDocument","getByText","_render2","queryByRole","_render3"],"sources":["../../../../src/lib/v2/__tests__/FieldError.test.tsx"],"sourcesContent":["import \"@testing-library/jest-dom\";\r\nimport * as React from \"react\";\r\nimport { render, screen } from \"@testing-library/react\";\r\nimport FieldError from \"../components/FieldError\";\r\nimport Field from \"../components/Field\";\r\n\r\n/**\r\n * FieldError — contract tests, including its integration into Field.\r\n *\r\n * WHY THIS FILE EXISTS\r\n * --------------------\r\n * §10.3 R-G.6 MUST. But the real reason is narrower and worth stating: the\r\n * contract this component carries is INVISIBLE. `Field` supplies an id, and that\r\n * id must reach the control's `aria-describedby` so a screen reader announces\r\n * the error when focus lands on the input. Break that wiring and NOTHING\r\n * changes: same pixels, same screenshot, same visual review — only a blind user\r\n * silently stops being told why their submit failed. There is no way to catch\r\n * that except by asserting it.\r\n *\r\n * The assertions below use `toHaveAccessibleDescription`, not id comparisons, on\r\n * purpose. It resolves aria-describedby to the text a screen reader would\r\n * actually announce, so the test states the USER-FACING outcome and stays true\r\n * if the id-generation scheme ever changes.\r\n *\r\n * NOT COVERED — deliberately\r\n * R-4.1's visual half (\"sous le champ, en rouge, avec icône\") and the\r\n * first-line icon alignment on a wrapping message are layout and colour. jsdom\r\n * resolves neither CSS variables nor flexbox, so asserting them here would pass\r\n * while the message rendered black and centred. Those live in\r\n * FieldError.stories.tsx.\r\n */\r\ndescribe(\"FieldError — standalone\", () => {\r\n test(\"announces itself as an alert carrying the message\", () => {\r\n render(<FieldError>Ajoutez au moins un article avant de soumettre.</FieldError>);\r\n expect(screen.getByRole(\"alert\")).toHaveTextContent(\r\n \"Ajoutez au moins un article avant de soumettre.\"\r\n );\r\n });\r\n\r\n test(\"forwards id so a host can wire its own aria-describedby\", () => {\r\n render(<FieldError id=\"articles-error\">Ajoutez au moins un article.</FieldError>);\r\n expect(screen.getByRole(\"alert\")).toHaveAttribute(\"id\", \"articles-error\");\r\n });\r\n\r\n test(\"omits id when none is supplied\", () => {\r\n /* The list-level case usually has nothing to bind to. Emitting an empty or\r\n * generated id would create a describedby target nobody references. */\r\n render(<FieldError>Ajoutez au moins un article.</FieldError>);\r\n expect(screen.getByRole(\"alert\")).not.toHaveAttribute(\"id\");\r\n });\r\n\r\n test(\"the icon is hidden from assistive tech\", () => {\r\n /* R-Ar.2 — the message IS the announcement; an announced glyph would double\r\n * it. No semantic query reaches a role-less, name-less element, hence the\r\n * testid the component exposes for exactly this assertion. */\r\n render(<FieldError>Message</FieldError>);\r\n expect(screen.getByTestId(\"fielderror-icon\")).toHaveAttribute(\"aria-hidden\", \"true\");\r\n });\r\n});\r\n\r\ndescribe(\"FieldError — inside Field (the wiring that has no visual tell)\", () => {\r\n test(\"the error becomes the control's accessible description\", () => {\r\n render(\r\n <Field label=\"Numéro de titre\" error=\"Le numéro est invalide. Format : AAAA-IM-NNNNN.\">\r\n <input />\r\n </Field>\r\n );\r\n\r\n expect(screen.getByRole(\"textbox\")).toHaveAccessibleDescription(\r\n \"Le numéro est invalide. Format : AAAA-IM-NNNNN.\"\r\n );\r\n });\r\n\r\n test(\"the control is marked invalid\", () => {\r\n render(\r\n <Field label=\"Numéro\" error=\"Invalide.\">\r\n <input />\r\n </Field>\r\n );\r\n // jest-dom's toBeInvalid reads aria-invalid — R-I.3.\r\n expect(screen.getByRole(\"textbox\")).toBeInvalid();\r\n });\r\n\r\n test(\"a host-supplied aria-describedby is PRESERVED, not replaced\", () => {\r\n /* The merge is the fragile part. Overwriting instead of merging silently\r\n * drops a consumer's external help text, and again nothing visual changes.\r\n * Asserted with two order-independent regexes rather than one exact string,\r\n * so the test does not encode which fragment Field puts first. */\r\n render(\r\n <>\r\n <span id=\"host-help\">Format attendu : AAAA-IM-NNNNN.</span>\r\n <Field label=\"Numéro\" error=\"Le numéro est incomplet.\">\r\n <input aria-describedby=\"host-help\" />\r\n </Field>\r\n </>\r\n );\r\n\r\n const input = screen.getByRole(\"textbox\");\r\n expect(input).toHaveAccessibleDescription(/Format attendu/);\r\n expect(input).toHaveAccessibleDescription(/incomplet/);\r\n });\r\n\r\n test(\"the hint is suppressed while an error is shown\", () => {\r\n /* Two competing descriptions under one field is worse than one. The hint\r\n * returns once the error clears — verified by the rerender below. */\r\n const { rerender } = render(\r\n <Field label=\"Numéro\" hint=\"Format : AAAA-IM-NNNNN\" error=\"Le numéro est incomplet.\">\r\n <input />\r\n </Field>\r\n );\r\n\r\n expect(screen.getByRole(\"alert\")).toHaveTextContent(\"Le numéro est incomplet.\");\r\n expect(screen.queryByText(\"Format : AAAA-IM-NNNNN\")).not.toBeInTheDocument();\r\n\r\n rerender(\r\n <Field label=\"Numéro\" hint=\"Format : AAAA-IM-NNNNN\">\r\n <input />\r\n </Field>\r\n );\r\n expect(screen.getByText(\"Format : AAAA-IM-NNNNN\")).toBeInTheDocument();\r\n });\r\n});\r\n\r\ndescribe(\"FieldError — live-region mounting contract\", () => {\r\n test(\"no alert exists until an error appears\", () => {\r\n /* THE contract. `role=\\\"alert\\\"` announces on INSERTION: an element mounted\r\n * permanently with empty content announces nothing when it later fills, so\r\n * a well-meaning refactor that always renders the container — to \\\"avoid\r\n * layout shift\\\", say — silently kills the announcement while every pixel\r\n * and every screenshot stays identical. */\r\n const { rerender } = render(\r\n <Field label=\"Numéro\">\r\n <input />\r\n </Field>\r\n );\r\n expect(screen.queryByRole(\"alert\")).not.toBeInTheDocument();\r\n\r\n rerender(\r\n <Field label=\"Numéro\" error=\"Le numéro est incomplet.\">\r\n <input />\r\n </Field>\r\n );\r\n expect(screen.getByRole(\"alert\")).toBeInTheDocument();\r\n });\r\n\r\n test(\"the alert unmounts when the error clears\", () => {\r\n const { rerender } = render(\r\n <Field label=\"Numéro\" error=\"Le numéro est incomplet.\">\r\n <input />\r\n </Field>\r\n );\r\n expect(screen.getByRole(\"alert\")).toBeInTheDocument();\r\n\r\n rerender(\r\n <Field label=\"Numéro\">\r\n <input />\r\n </Field>\r\n );\r\n expect(screen.queryByRole(\"alert\")).not.toBeInTheDocument();\r\n expect(screen.getByRole(\"textbox\")).not.toBeInvalid();\r\n });\r\n});\r\n"],"mappings":"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","ignoreList":[]}
@@ -0,0 +1,144 @@
1
+ import "@testing-library/jest-dom";
2
+ import * as React from "react";
3
+ import { render, screen } from "@testing-library/react";
4
+ import FileCard from "../components/FileCard";
5
+
6
+ /**
7
+ * FileCard — contract tests.
8
+ *
9
+ * WHY THIS FILE EXISTS
10
+ * --------------------
11
+ * §10.3 R-G.6 MUST — "Snapshot Storybook + tests Jest/Testing-Library". The
12
+ * component was extracted from THREE hand-written copies found in addpe-fe
13
+ * (Attachment, AutorisationPreviewDrawer, AutorisationDetail), which had drifted
14
+ * to three different paddings for one concept. Consolidating them means a single
15
+ * change now moves every attachment row in the fleet, so the contracts below are
16
+ * the ones that must not move silently.
17
+ *
18
+ * NOT COVERED — deliberately
19
+ * The width negotiation is the most fragile part of this component and it is
20
+ * NOT tested here: `text-overflow: ellipsis`, `minWidth: 0` on the identity
21
+ * block and `flexShrink: 0` on the action cluster are LAYOUT, and jsdom computes
22
+ * no layout. A test asserting them would pass while the card is broken on a
23
+ * phone — worse than no coverage, because it would look like coverage. That
24
+ * contract lives in FileCard.stories.tsx ("Long filename"), which is where a
25
+ * browser can actually check it. Same reasoning as MobileRowCard.test.tsx
26
+ * records for R-G.3.
27
+ */
28
+ import { jsx as _jsx } from "react/jsx-runtime";
29
+ describe("FileCard — identity", function () {
30
+ test("renders the filename and mirrors it into title for the truncated case", function () {
31
+ var name = "autorisation-de-depot-prealable-a-l-exportation-2025-IM-0042-revision-finale.pdf";
32
+ render(/*#__PURE__*/_jsx(FileCard, {
33
+ name: name
34
+ }));
35
+
36
+ /* The title attribute is the ONLY reason `name` is typed `string` rather
37
+ * than ReactNode: once the CSS ellipsis hides the tail, the attribute is
38
+ * what keeps the full filename reachable. Losing it is invisible in every
39
+ * screenshot and only hurts the user with the long filename. */
40
+ expect(screen.getByText(name)).toHaveAttribute("title", name);
41
+ });
42
+ test("renders the meta line when supplied", function () {
43
+ render(/*#__PURE__*/_jsx(FileCard, {
44
+ name: "facture.pdf",
45
+ meta: "1,24 Mo"
46
+ }));
47
+ expect(screen.getByText("1,24 Mo")).toBeInTheDocument();
48
+ });
49
+ test("omits the meta line entirely when absent or empty", function () {
50
+ /* Not rendered rather than rendered blank: an empty second line reads as
51
+ * missing data, and it changes the row height, which breaks the alignment
52
+ * of a list of files. Both `undefined` and `""` are covered because a host
53
+ * formatting a byte count from an optional field produces either.
54
+ *
55
+ * Queried by testid, not by walking parentElement: "absent, not empty"
56
+ * cannot be expressed as a text query, and the repo's eslint config forbids
57
+ * direct node access — correctly, since a structural child count would also
58
+ * break the moment the component gains an unrelated third line. */
59
+ var _render = render(/*#__PURE__*/_jsx(FileCard, {
60
+ name: "a.pdf"
61
+ })),
62
+ rerender = _render.rerender;
63
+ expect(screen.getByText("a.pdf")).toBeInTheDocument();
64
+ expect(screen.queryByTestId("filecard-meta")).not.toBeInTheDocument();
65
+ rerender(/*#__PURE__*/_jsx(FileCard, {
66
+ name: "a.pdf",
67
+ meta: ""
68
+ }));
69
+ expect(screen.queryByTestId("filecard-meta")).not.toBeInTheDocument();
70
+ rerender(/*#__PURE__*/_jsx(FileCard, {
71
+ name: "a.pdf",
72
+ meta: "248 Ko"
73
+ }));
74
+ expect(screen.getByTestId("filecard-meta")).toHaveTextContent("248 Ko");
75
+ });
76
+ });
77
+ describe("FileCard — actions slot", function () {
78
+ test("renders host-supplied actions", function () {
79
+ render(/*#__PURE__*/_jsx(FileCard, {
80
+ name: "a.pdf",
81
+ actions: /*#__PURE__*/_jsx("button", {
82
+ type: "button",
83
+ children: "T\xE9l\xE9charger"
84
+ })
85
+ }));
86
+ expect(screen.getByRole("button", {
87
+ name: "Télécharger"
88
+ })).toBeInTheDocument();
89
+ });
90
+ test("renders no action cluster when actions is absent", function () {
91
+ render(/*#__PURE__*/_jsx(FileCard, {
92
+ name: "a.pdf"
93
+ }));
94
+ expect(screen.queryByRole("button")).not.toBeInTheDocument();
95
+ });
96
+ test("does not invent any action of its own", function () {
97
+ /* Regression guard on the component's SCOPE, not its rendering. FileCard is
98
+ * presentational: a download link, a delete confirmation and a blob URL all
99
+ * belong to the host. If a future change adds a built-in button, this fails
100
+ * — which is the intent. */
101
+ render(/*#__PURE__*/_jsx(FileCard, {
102
+ name: "a.pdf",
103
+ meta: "1 Ko"
104
+ }));
105
+ expect(screen.queryByRole("button")).not.toBeInTheDocument();
106
+ expect(screen.queryByRole("link")).not.toBeInTheDocument();
107
+ });
108
+ });
109
+ describe("FileCard — accessibility", function () {
110
+ test("the leading icon is hidden from assistive tech", function () {
111
+ /* R-Ar.2 — the filename IS the accessible name; a decorative glyph carrying
112
+ * one would make a screen reader announce the row twice. The wrapper has no
113
+ * role and no name by design, so there is no semantic query for it: the
114
+ * component exposes a stable testid for exactly this assertion. */
115
+ render(/*#__PURE__*/_jsx(FileCard, {
116
+ name: "a.pdf"
117
+ }));
118
+ expect(screen.getByTestId("filecard-icon")).toHaveAttribute("aria-hidden", "true");
119
+ });
120
+ test("a custom icon replaces the default and stays hidden", function () {
121
+ /* The second assertion is the one that matters: a host passing its own glyph
122
+ * must not be able to leak it into the accessibility tree. */
123
+ render(/*#__PURE__*/_jsx(FileCard, {
124
+ name: "a.pdf",
125
+ icon: /*#__PURE__*/_jsx("svg", {
126
+ "data-testid": "custom"
127
+ })
128
+ }));
129
+ expect(screen.getByTestId("custom")).toBeInTheDocument();
130
+ expect(screen.getByTestId("filecard-icon")).toHaveAttribute("aria-hidden", "true");
131
+ });
132
+ test("carries no role of its own", function () {
133
+ /* The card is not interactive — only its actions are. Giving it role=button
134
+ * or wrapping it in a group without an accessible name would add noise to
135
+ * the SR tree. Asserted so a future "make the whole row clickable" change
136
+ * has to be a deliberate decision rather than a drive-by. */
137
+ render(/*#__PURE__*/_jsx(FileCard, {
138
+ name: "a.pdf"
139
+ }));
140
+ expect(screen.queryByRole("button")).not.toBeInTheDocument();
141
+ expect(screen.queryByRole("group")).not.toBeInTheDocument();
142
+ });
143
+ });
144
+ //# sourceMappingURL=FileCard.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FileCard.test.js","names":["React","render","screen","FileCard","jsx","_jsx","describe","test","name","expect","getByText","toHaveAttribute","meta","toBeInTheDocument","_render","rerender","queryByTestId","not","getByTestId","toHaveTextContent","actions","type","children","getByRole","queryByRole","icon"],"sources":["../../../../src/lib/v2/__tests__/FileCard.test.tsx"],"sourcesContent":["import \"@testing-library/jest-dom\";\r\nimport * as React from \"react\";\r\nimport { render, screen } from \"@testing-library/react\";\r\nimport FileCard from \"../components/FileCard\";\r\n\r\n/**\r\n * FileCard — contract tests.\r\n *\r\n * WHY THIS FILE EXISTS\r\n * --------------------\r\n * §10.3 R-G.6 MUST — \"Snapshot Storybook + tests Jest/Testing-Library\". The\r\n * component was extracted from THREE hand-written copies found in addpe-fe\r\n * (Attachment, AutorisationPreviewDrawer, AutorisationDetail), which had drifted\r\n * to three different paddings for one concept. Consolidating them means a single\r\n * change now moves every attachment row in the fleet, so the contracts below are\r\n * the ones that must not move silently.\r\n *\r\n * NOT COVERED — deliberately\r\n * The width negotiation is the most fragile part of this component and it is\r\n * NOT tested here: `text-overflow: ellipsis`, `minWidth: 0` on the identity\r\n * block and `flexShrink: 0` on the action cluster are LAYOUT, and jsdom computes\r\n * no layout. A test asserting them would pass while the card is broken on a\r\n * phone — worse than no coverage, because it would look like coverage. That\r\n * contract lives in FileCard.stories.tsx (\"Long filename\"), which is where a\r\n * browser can actually check it. Same reasoning as MobileRowCard.test.tsx\r\n * records for R-G.3.\r\n */\r\ndescribe(\"FileCard — identity\", () => {\r\n test(\"renders the filename and mirrors it into title for the truncated case\", () => {\r\n const name =\r\n \"autorisation-de-depot-prealable-a-l-exportation-2025-IM-0042-revision-finale.pdf\";\r\n render(<FileCard name={name} />);\r\n\r\n /* The title attribute is the ONLY reason `name` is typed `string` rather\r\n * than ReactNode: once the CSS ellipsis hides the tail, the attribute is\r\n * what keeps the full filename reachable. Losing it is invisible in every\r\n * screenshot and only hurts the user with the long filename. */\r\n expect(screen.getByText(name)).toHaveAttribute(\"title\", name);\r\n });\r\n\r\n test(\"renders the meta line when supplied\", () => {\r\n render(<FileCard name=\"facture.pdf\" meta=\"1,24 Mo\" />);\r\n expect(screen.getByText(\"1,24 Mo\")).toBeInTheDocument();\r\n });\r\n\r\n test(\"omits the meta line entirely when absent or empty\", () => {\r\n /* Not rendered rather than rendered blank: an empty second line reads as\r\n * missing data, and it changes the row height, which breaks the alignment\r\n * of a list of files. Both `undefined` and `\"\"` are covered because a host\r\n * formatting a byte count from an optional field produces either.\r\n *\r\n * Queried by testid, not by walking parentElement: \"absent, not empty\"\r\n * cannot be expressed as a text query, and the repo's eslint config forbids\r\n * direct node access — correctly, since a structural child count would also\r\n * break the moment the component gains an unrelated third line. */\r\n const { rerender } = render(<FileCard name=\"a.pdf\" />);\r\n expect(screen.getByText(\"a.pdf\")).toBeInTheDocument();\r\n expect(screen.queryByTestId(\"filecard-meta\")).not.toBeInTheDocument();\r\n\r\n rerender(<FileCard name=\"a.pdf\" meta=\"\" />);\r\n expect(screen.queryByTestId(\"filecard-meta\")).not.toBeInTheDocument();\r\n\r\n rerender(<FileCard name=\"a.pdf\" meta=\"248 Ko\" />);\r\n expect(screen.getByTestId(\"filecard-meta\")).toHaveTextContent(\"248 Ko\");\r\n });\r\n});\r\n\r\ndescribe(\"FileCard — actions slot\", () => {\r\n test(\"renders host-supplied actions\", () => {\r\n render(\r\n <FileCard\r\n name=\"a.pdf\"\r\n actions={<button type=\"button\">Télécharger</button>}\r\n />\r\n );\r\n expect(screen.getByRole(\"button\", { name: \"Télécharger\" })).toBeInTheDocument();\r\n });\r\n\r\n test(\"renders no action cluster when actions is absent\", () => {\r\n render(<FileCard name=\"a.pdf\" />);\r\n expect(screen.queryByRole(\"button\")).not.toBeInTheDocument();\r\n });\r\n\r\n test(\"does not invent any action of its own\", () => {\r\n /* Regression guard on the component's SCOPE, not its rendering. FileCard is\r\n * presentational: a download link, a delete confirmation and a blob URL all\r\n * belong to the host. If a future change adds a built-in button, this fails\r\n * — which is the intent. */\r\n render(<FileCard name=\"a.pdf\" meta=\"1 Ko\" />);\r\n expect(screen.queryByRole(\"button\")).not.toBeInTheDocument();\r\n expect(screen.queryByRole(\"link\")).not.toBeInTheDocument();\r\n });\r\n});\r\n\r\ndescribe(\"FileCard — accessibility\", () => {\r\n test(\"the leading icon is hidden from assistive tech\", () => {\r\n /* R-Ar.2 — the filename IS the accessible name; a decorative glyph carrying\r\n * one would make a screen reader announce the row twice. The wrapper has no\r\n * role and no name by design, so there is no semantic query for it: the\r\n * component exposes a stable testid for exactly this assertion. */\r\n render(<FileCard name=\"a.pdf\" />);\r\n expect(screen.getByTestId(\"filecard-icon\")).toHaveAttribute(\"aria-hidden\", \"true\");\r\n });\r\n\r\n test(\"a custom icon replaces the default and stays hidden\", () => {\r\n /* The second assertion is the one that matters: a host passing its own glyph\r\n * must not be able to leak it into the accessibility tree. */\r\n render(<FileCard name=\"a.pdf\" icon={<svg data-testid=\"custom\" />} />);\r\n expect(screen.getByTestId(\"custom\")).toBeInTheDocument();\r\n expect(screen.getByTestId(\"filecard-icon\")).toHaveAttribute(\"aria-hidden\", \"true\");\r\n });\r\n\r\n test(\"carries no role of its own\", () => {\r\n /* The card is not interactive — only its actions are. Giving it role=button\r\n * or wrapping it in a group without an accessible name would add noise to\r\n * the SR tree. Asserted so a future \"make the whole row clickable\" change\r\n * has to be a deliberate decision rather than a drive-by. */\r\n render(<FileCard name=\"a.pdf\" />);\r\n expect(screen.queryByRole(\"button\")).not.toBeInTheDocument();\r\n expect(screen.queryByRole(\"group\")).not.toBeInTheDocument();\r\n });\r\n});\r\n"],"mappings":"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","ignoreList":[]}