@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 @@
1
+ {"version":3,"file":"SectionErrorBoundary.test.js","names":["React","render","screen","fireEvent","SectionErrorBoundary","jsx","_jsx","jsxs","_jsxs","Boom","_ref","_ref$shouldThrow","shouldThrow","Error","children","consoleErrorSpy","beforeEach","jest","spyOn","console","mockImplementation","afterEach","mockRestore","describe","test","title","expect","getByText","toBeInTheDocument","queryByRole","not","getByRole","toHaveTextContent","previous","process","env","holder","Flaky","click","name","retryLabel","onError","fn","toHaveBeenCalledTimes","_ref2","mock","calls","_ref3","_slicedToArray","err","info","toBeInstanceOf","message","toMatch","toHaveProperty","toThrow","onEscape","secondaryAction","label","onClick","escape","logged","some","args","a","includes","toBe"],"sources":["../../../../src/lib/v2/__tests__/SectionErrorBoundary.test.tsx"],"sourcesContent":["import \"@testing-library/jest-dom\";\r\nimport * as React from \"react\";\r\nimport { render, screen, fireEvent } from \"@testing-library/react\";\r\nimport SectionErrorBoundary from \"../components/SectionErrorBoundary\";\r\n\r\n/**\r\n * SectionErrorBoundary — behaviour tests.\r\n *\r\n * WHY THIS FILE MATTERS MORE THAN MOST\r\n * ------------------------------------\r\n * §10.3 R-G.6 MUST, but the real reason is that this is the one component in the\r\n * library whose ENTIRE contract is a failure path. Every other component can be\r\n * eyeballed in Storybook; this one only does its job when something throws, which\r\n * nobody exercises by hand. And its failure mode is total: if the boundary does\r\n * not catch, React unmounts the whole tree and the user gets a blank screen\r\n * (ISO/IEC 25010 § Reliability — fault tolerance).\r\n *\r\n * jsdom is the right tool here, unusually: catching, re-mounting, logging and\r\n * conditional detail are all logic, not layout.\r\n *\r\n * NOTE ON CONSOLE NOISE — React logs caught errors to console.error itself, on\r\n * top of the boundary's own log. Both are silenced per-test rather than globally\r\n * so a genuine unexpected console.error still surfaces in the other suites.\r\n */\r\n\r\n/** A component that throws on render, controlled by a prop. */\r\nfunction Boom({ shouldThrow = true }: { shouldThrow?: boolean }) {\r\n if (shouldThrow) throw new Error(\"payload inattendu: articles.map n'est pas une fonction\");\r\n return <div>contenu rétabli</div>;\r\n}\r\n\r\nlet consoleErrorSpy: jest.SpyInstance;\r\n\r\nbeforeEach(() => {\r\n consoleErrorSpy = jest.spyOn(console, \"error\").mockImplementation(() => {});\r\n});\r\n\r\nafterEach(() => {\r\n consoleErrorSpy.mockRestore();\r\n});\r\n\r\ndescribe(\"SectionErrorBoundary — containment\", () => {\r\n test(\"renders children untouched when nothing throws\", () => {\r\n render(\r\n <SectionErrorBoundary title=\"Marchandises\">\r\n <div>contenu normal</div>\r\n </SectionErrorBoundary>\r\n );\r\n expect(screen.getByText(\"contenu normal\")).toBeInTheDocument();\r\n expect(screen.queryByRole(\"alert\")).not.toBeInTheDocument();\r\n });\r\n\r\n test(\"catches a render exception and keeps its SIBLINGS mounted\", () => {\r\n /* THE contract. The assertion that matters is not that the banner appears —\r\n * it is that `sibling` is still in the document. Without a boundary React\r\n * unmounts the entire tree and BOTH would be gone: that is the blank screen\r\n * this component exists to prevent. */\r\n render(\r\n <div>\r\n <div>sibling</div>\r\n <SectionErrorBoundary title=\"Marchandises\">\r\n <Boom />\r\n </SectionErrorBoundary>\r\n </div>\r\n );\r\n\r\n expect(screen.getByText(\"sibling\")).toBeInTheDocument();\r\n expect(screen.getByRole(\"alert\")).toBeInTheDocument();\r\n });\r\n\r\n test(\"names the failing section so the user knows WHAT broke\", () => {\r\n render(\r\n <SectionErrorBoundary title=\"Marchandises\">\r\n <Boom />\r\n </SectionErrorBoundary>\r\n );\r\n expect(screen.getByRole(\"alert\")).toHaveTextContent(\"Marchandises\");\r\n });\r\n\r\n test(\"falls back to a generic label when no title is supplied\", () => {\r\n render(\r\n <SectionErrorBoundary>\r\n <Boom />\r\n </SectionErrorBoundary>\r\n );\r\n expect(screen.getByRole(\"alert\")).toHaveTextContent(\"Section\");\r\n });\r\n});\r\n\r\ndescribe(\"SectionErrorBoundary — user-facing copy (§09.3)\", () => {\r\n test(\"shows French recovery copy, never a raw exception message\", () => {\r\n /* Charter §09.3 forbids exposing technical detail to the user, and a raw JS\r\n * exception is worse than the \"Erreur HTTP 422\" the charter uses as its DON'T\r\n * example. The reference implementation this was promoted from rendered\r\n * error.message straight into the banner body; this asserts we do not.\r\n *\r\n * NODE_ENV is \"test\" here, not \"production\", so the dev detail block DOES\r\n * render — which is why this test targets the recovery sentence rather than\r\n * asserting the absence of the message. The production-only behaviour is\r\n * asserted separately below. */\r\n render(\r\n <SectionErrorBoundary title=\"Marchandises\">\r\n <Boom />\r\n </SectionErrorBoundary>\r\n );\r\n expect(screen.getByRole(\"alert\")).toHaveTextContent(\r\n /Cette section n'a pas pu s'afficher/\r\n );\r\n });\r\n\r\n test(\"suppresses the technical detail in production\", () => {\r\n const previous = process.env[\"NODE_ENV\"];\r\n /* Bracket access throughout, matching the component: `process.env` is an index\r\n * signature and `noPropertyAccessFromIndexSignature` is mandatory. Tests are\r\n * outside tsconfig.build.json's scope so dot access would have compiled here —\r\n * two conventions in neighbouring files is the drift this audit exists to stop.\r\n *\r\n * Assigned rather than replaced wholesale: other suites read NODE_ENV, and the\r\n * finally block restores it even if the assertion throws. */\r\n (process.env as Record<string, string>)[\"NODE_ENV\"] = \"production\";\r\n try {\r\n render(\r\n <SectionErrorBoundary title=\"Marchandises\">\r\n <Boom />\r\n </SectionErrorBoundary>\r\n );\r\n expect(screen.getByRole(\"alert\")).toHaveTextContent(\r\n /Cette section n'a pas pu s'afficher/\r\n );\r\n expect(screen.getByRole(\"alert\")).not.toHaveTextContent(/articles\\.map/);\r\n } finally {\r\n (process.env as Record<string, string>)[\"NODE_ENV\"] = previous ?? \"test\";\r\n }\r\n });\r\n});\r\n\r\ndescribe(\"SectionErrorBoundary — retry REMOUNTS\", () => {\r\n test(\"retry clears the error and re-renders the subtree\", () => {\r\n /* The re-key on `attempt` is what makes this work. Without it React reuses\r\n * the instance that threw and retry fails identically — a retry button that\r\n * cannot succeed is worse than no retry button. `shouldThrow` is read from a\r\n * mutable holder so the same element throws first and succeeds second,\r\n * exactly as a transient payload problem would. */\r\n const holder = { shouldThrow: true };\r\n function Flaky() {\r\n return <Boom shouldThrow={holder.shouldThrow} />;\r\n }\r\n\r\n render(\r\n <SectionErrorBoundary title=\"Marchandises\">\r\n <Flaky />\r\n </SectionErrorBoundary>\r\n );\r\n expect(screen.getByRole(\"alert\")).toBeInTheDocument();\r\n\r\n holder.shouldThrow = false;\r\n fireEvent.click(screen.getByRole(\"button\", { name: /Réessayer/ }));\r\n\r\n expect(screen.getByText(\"contenu rétabli\")).toBeInTheDocument();\r\n expect(screen.queryByRole(\"alert\")).not.toBeInTheDocument();\r\n });\r\n\r\n test(\"a custom retryLabel is used on the button and in the copy\", () => {\r\n render(\r\n <SectionErrorBoundary title=\"Marchandises\" retryLabel=\"Recharger\">\r\n <Boom />\r\n </SectionErrorBoundary>\r\n );\r\n expect(screen.getByRole(\"button\", { name: /Recharger/ })).toBeInTheDocument();\r\n expect(screen.getByRole(\"alert\")).toHaveTextContent(/Recharger/);\r\n });\r\n});\r\n\r\ndescribe(\"SectionErrorBoundary — reporting and second exit\", () => {\r\n test(\"calls onError with the error and the component info\", () => {\r\n /* console.error is invisible in production, so without this hook a boundary\r\n * silently swallows the only signal an operator would ever get. */\r\n const onError = jest.fn();\r\n render(\r\n <SectionErrorBoundary title=\"Marchandises\" onError={onError}>\r\n <Boom />\r\n </SectionErrorBoundary>\r\n );\r\n\r\n expect(onError).toHaveBeenCalledTimes(1);\r\n const [err, info] = onError.mock.calls[0] as [Error, React.ErrorInfo];\r\n expect(err).toBeInstanceOf(Error);\r\n expect(err.message).toMatch(/articles\\.map/);\r\n expect(info).toHaveProperty(\"componentStack\");\r\n });\r\n\r\n test(\"a throwing onError does not take the boundary down with it\", () => {\r\n /* Guard on the guard. A reporter that throws must not defeat the component\r\n * whose entire purpose is stopping one failure from causing another. */\r\n const onError = jest.fn(() => {\r\n throw new Error(\"APM indisponible\");\r\n });\r\n\r\n expect(() =>\r\n render(\r\n <SectionErrorBoundary title=\"Marchandises\" onError={onError}>\r\n <Boom />\r\n </SectionErrorBoundary>\r\n )\r\n ).not.toThrow();\r\n\r\n expect(screen.getByRole(\"alert\")).toBeInTheDocument();\r\n });\r\n\r\n test(\"renders the optional secondary exit when supplied\", () => {\r\n /* Only possible since Banner gained secondaryAction (gap G-19). The reference\r\n * implementation offered no way out when retrying could not help. */\r\n const onEscape = jest.fn();\r\n render(\r\n <SectionErrorBoundary\r\n title=\"Marchandises\"\r\n secondaryAction={{ label: \"Retour à la liste\", onClick: onEscape }}\r\n >\r\n <Boom />\r\n </SectionErrorBoundary>\r\n );\r\n\r\n const escape = screen.getByRole(\"button\", { name: /Retour à la liste/ });\r\n fireEvent.click(escape);\r\n expect(onEscape).toHaveBeenCalledTimes(1);\r\n });\r\n\r\n test(\"logs the section title and the component stack\", () => {\r\n render(\r\n <SectionErrorBoundary title=\"Marchandises\">\r\n <Boom />\r\n </SectionErrorBoundary>\r\n );\r\n /* Asserted loosely — the point is that an operator grepping logs can find\r\n * WHICH section failed, not the exact format of the line. */\r\n const logged = consoleErrorSpy.mock.calls.some((args) =>\r\n args.some((a) => typeof a === \"string\" && a.includes(\"Marchandises\"))\r\n );\r\n expect(logged).toBe(true);\r\n });\r\n});\r\n"],"mappings":";;;;;;AAAA,OAAO,2BAA2B;AAClC,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,MAAM,EAAEC,MAAM,EAAEC,SAAS,QAAQ,wBAAwB;AAClE,OAAOC,oBAAoB,MAAM,oCAAoC;;AAErE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AACA,SAASC,IAAIA,CAAAC,IAAA,EAAoD;EAAA,IAAAC,gBAAA,GAAAD,IAAA,CAAjDE,WAAW;IAAXA,WAAW,GAAAD,gBAAA,cAAG,IAAI,GAAAA,gBAAA;EAChC,IAAIC,WAAW,EAAE,MAAM,IAAIC,KAAK,CAAC,wDAAwD,CAAC;EAC1F,oBAAOP,IAAA;IAAAQ,QAAA,EAAK;EAAe,CAAK,CAAC;AACnC;AAEA,IAAIC,eAAiC;AAErCC,UAAU,CAAC,YAAM;EACfD,eAAe,GAAGE,IAAI,CAACC,KAAK,CAACC,OAAO,EAAE,OAAO,CAAC,CAACC,kBAA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AAG9C,eAAe,CAAC8B,IAAI,CAACC,KAAK,CAACgB,IAAI,CAAC,UAACC,IAAI;MAAA,OAClDA,IAAI,CAACD,IAAI,CAAC,UAACE,CAAC;QAAA,OAAK,OAAOA,CAAC,KAAK,QAAQ,IAAIA,CAAC,CAACC,QAAQ,CAAC,cAAc,CAAC;MAAA,EAAC;IAAA,CACvE,CAAC;IACDvC,MAAM,CAACmC,MAAM,CAAC,CAACK,IAAI,CAAC,IAAI,CAAC;EAC3B,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,181 @@
1
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
7
+ import { DEFAULT_API_ERROR_MESSAGE, getApiErrorDetail, getApiErrorMessage, getApiErrorStatus } from "../utils/apiError";
8
+
9
+ /**
10
+ * Contract tests for apiError — the platform's `unknown`-rejection narrower.
11
+ *
12
+ * Two contracts are load-bearing here, and both were regressions waiting to
13
+ * happen:
14
+ *
15
+ * 1. G-04 — this helper exists so consuming sagas do not hand-roll
16
+ * `(error as { response?: … })` to get around `useUnknownInCatchVariables`.
17
+ * Two modules had already done exactly that before it was added.
18
+ *
19
+ * 2. G-07 — `error.message` must NOT reach a user when it is an axios
20
+ * transport artefact. Before the fix, any server error without a
21
+ * `response.data.message` rendered "Request failed with status code 500"
22
+ * into a toast (Charter §09.3 forbids raw technical detail), and every
23
+ * consumer's French fallback was effectively unreachable.
24
+ *
25
+ * The second contract is invisible to `tsc` and to the build: suppressing a
26
+ * string is a behavioural property, so without these tests the fix would
27
+ * silently rot the first time someone "simplified" the resolution chain back to
28
+ * a plain `asNonEmptyString`.
29
+ */
30
+
31
+ /** Minimal axios-shaped rejection. Duck-typed on purpose — see the file header. */
32
+ var axiosLike = function axiosLike(status, message, dataMessage) {
33
+ return {
34
+ message: message,
35
+ response: _objectSpread({
36
+ status: status
37
+ }, dataMessage === undefined ? {} : {
38
+ data: {
39
+ message: dataMessage
40
+ }
41
+ })
42
+ };
43
+ };
44
+ describe("getApiErrorMessage — resolution order", function () {
45
+ test("a non-empty string rejection is returned as-is", function () {
46
+ expect(getApiErrorMessage("Trop de tentatives.")).toBe("Trop de tentatives.");
47
+ });
48
+ test("the backend message wins over everything else", function () {
49
+ var err = axiosLike(422, "Request failed with status code 422", "Le numéro de titre est invalide.");
50
+ expect(getApiErrorMessage(err, "Échec.")).toBe("Le numéro de titre est invalide.");
51
+ });
52
+ test("falls back when nothing usable is present", function () {
53
+ expect(getApiErrorMessage({}, "Échec de l'envoi.")).toBe("Échec de l'envoi.");
54
+ });
55
+ test("uses the platform default when no fallback is supplied", function () {
56
+ expect(getApiErrorMessage({})).toBe(DEFAULT_API_ERROR_MESSAGE);
57
+ });
58
+ test("never returns an empty string", function () {
59
+ expect(getApiErrorMessage("")).toBe(DEFAULT_API_ERROR_MESSAGE);
60
+ expect(getApiErrorMessage({
61
+ message: ""
62
+ })).toBe(DEFAULT_API_ERROR_MESSAGE);
63
+ });
64
+ test("never throws on hostile input", function () {
65
+ expect(function () {
66
+ return getApiErrorMessage(null);
67
+ }).not.toThrow();
68
+ expect(function () {
69
+ return getApiErrorMessage(undefined);
70
+ }).not.toThrow();
71
+ expect(function () {
72
+ return getApiErrorMessage(0);
73
+ }).not.toThrow();
74
+ expect(function () {
75
+ return getApiErrorMessage([]);
76
+ }).not.toThrow();
77
+ expect(function () {
78
+ return getApiErrorMessage({
79
+ response: null
80
+ });
81
+ }).not.toThrow();
82
+ expect(function () {
83
+ return getApiErrorMessage({
84
+ response: {
85
+ data: {
86
+ message: 42
87
+ }
88
+ }
89
+ });
90
+ }).not.toThrow();
91
+ });
92
+ });
93
+
94
+ /**
95
+ * G-07 — THE REGRESSION GUARD. If any of these fail, a transport string is
96
+ * reaching end users again.
97
+ */
98
+ describe("getApiErrorMessage — transport strings are suppressed (G-07)", function () {
99
+ var FALLBACK = "Le service est momentanément indisponible.";
100
+ test.each(["Request failed with status code 500", "Request failed with status code 404", "Network Error", "timeout of 15000ms exceeded", "timeout exceeded", "Request aborted", "canceled", "socket hang up", "ECONNREFUSED", "ETIMEDOUT", "ECONNRESET", "ENOTFOUND", "EPIPE", "ERR_NETWORK", "ERR_CANCELED", "ERR_BAD_RESPONSE"])("suppresses %p in favour of the caller's copy", function (message) {
101
+ expect(getApiErrorMessage({
102
+ message: message
103
+ }, FALLBACK)).toBe(FALLBACK);
104
+ });
105
+ test("matching is case-insensitive and tolerates padding", function () {
106
+ expect(getApiErrorMessage({
107
+ message: " network error "
108
+ }, FALLBACK)).toBe(FALLBACK);
109
+ });
110
+ test("a 500 with an empty body falls back rather than leaking the status line", function () {
111
+ var err = axiosLike(500, "Request failed with status code 500");
112
+ expect(getApiErrorMessage(err, FALLBACK)).toBe(FALLBACK);
113
+ });
114
+ });
115
+
116
+ /**
117
+ * The other half of the same contract: the deny-list must stay CONSERVATIVE. A
118
+ * false positive silently replaces a real business message with a generic one,
119
+ * which is more damaging than showing one ugly string.
120
+ */
121
+ describe("getApiErrorMessage — deliberate messages still pass through", function () {
122
+ test.each(["Ce titre ne peut pas être supprimé car il est en cours de validation.", "Le quota de dossiers est atteint.", "Session expirée. Reconnectez-vous.",
123
+ // Mentions a status but is human-written — must NOT be suppressed.
124
+ "Le service a répondu par une erreur (500). Réessayez.",
125
+ // Contains a transport phrase but is not one — anchored patterns only.
126
+ "Network Error détecté par la passerelle, contactez le support."])("passes %p through", function (message) {
127
+ expect(getApiErrorMessage({
128
+ message: message
129
+ }, "unused")).toBe(message);
130
+ });
131
+
132
+ /**
133
+ * Guards the CASE-SENSITIVITY of the two errno patterns.
134
+ *
135
+ * They are the only patterns in the list without `/i`, precisely so that a
136
+ * lowercase French word beginning with "e" is not mistaken for an errno
137
+ * constant. If someone "tidies" them to `/^e[a-z]+$/i` for consistency with
138
+ * their neighbours, every one of these becomes a generic fallback and a real
139
+ * business message is lost. That failure is silent in production — the user
140
+ * simply sees the wrong text — so it has to fail here instead.
141
+ */
142
+ test.each(["erreur", "expiré", "échec", "envoi", "erreurs"])("does not mistake the French word %p for an errno code", function (message) {
143
+ expect(getApiErrorMessage({
144
+ message: message
145
+ }, "unused")).toBe(message);
146
+ });
147
+ test("a module-thrown Error keeps its message", function () {
148
+ var err = new Error("Le montant FOB doit être positif.");
149
+ expect(getApiErrorMessage(err, "unused")).toBe("Le montant FOB doit être positif.");
150
+ });
151
+ });
152
+ describe("getApiErrorDetail — unfiltered, for logs", function () {
153
+ test("returns the transport string that getApiErrorMessage hides", function () {
154
+ var err = axiosLike(502, "Request failed with status code 502");
155
+ expect(getApiErrorMessage(err, "Indisponible.")).toBe("Indisponible.");
156
+ expect(getApiErrorDetail(err)).toBe("Request failed with status code 502");
157
+ });
158
+ test("returns undefined when there is nothing to log", function () {
159
+ expect(getApiErrorDetail({})).toBeUndefined();
160
+ expect(getApiErrorDetail(null)).toBeUndefined();
161
+ });
162
+ });
163
+ describe("getApiErrorStatus", function () {
164
+ test("returns the HTTP status when the server answered", function () {
165
+ expect(getApiErrorStatus(axiosLike(404, "Not Found"))).toBe(404);
166
+ });
167
+ test("returns undefined when there was no answer at all (R-4.3)", function () {
168
+ expect(getApiErrorStatus({
169
+ message: "Network Error"
170
+ })).toBeUndefined();
171
+ expect(getApiErrorStatus(null)).toBeUndefined();
172
+ });
173
+ test("ignores a non-numeric status", function () {
174
+ expect(getApiErrorStatus({
175
+ response: {
176
+ status: "500"
177
+ }
178
+ })).toBeUndefined();
179
+ });
180
+ });
181
+ //# sourceMappingURL=apiError.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apiError.test.js","names":["DEFAULT_API_ERROR_MESSAGE","getApiErrorDetail","getApiErrorMessage","getApiErrorStatus","axiosLike","status","message","dataMessage","response","_objectSpread","undefined","data","describe","test","expect","toBe","err","not","toThrow","FALLBACK","each","Error","toBeUndefined"],"sources":["../../../../src/lib/v2/__tests__/apiError.test.ts"],"sourcesContent":["import {\r\n DEFAULT_API_ERROR_MESSAGE,\r\n getApiErrorDetail,\r\n getApiErrorMessage,\r\n getApiErrorStatus,\r\n} from \"../utils/apiError\";\r\n\r\n/**\r\n * Contract tests for apiError — the platform's `unknown`-rejection narrower.\r\n *\r\n * Two contracts are load-bearing here, and both were regressions waiting to\r\n * happen:\r\n *\r\n * 1. G-04 — this helper exists so consuming sagas do not hand-roll\r\n * `(error as { response?: … })` to get around `useUnknownInCatchVariables`.\r\n * Two modules had already done exactly that before it was added.\r\n *\r\n * 2. G-07 — `error.message` must NOT reach a user when it is an axios\r\n * transport artefact. Before the fix, any server error without a\r\n * `response.data.message` rendered \"Request failed with status code 500\"\r\n * into a toast (Charter §09.3 forbids raw technical detail), and every\r\n * consumer's French fallback was effectively unreachable.\r\n *\r\n * The second contract is invisible to `tsc` and to the build: suppressing a\r\n * string is a behavioural property, so without these tests the fix would\r\n * silently rot the first time someone \"simplified\" the resolution chain back to\r\n * a plain `asNonEmptyString`.\r\n */\r\n\r\n/** Minimal axios-shaped rejection. Duck-typed on purpose — see the file header. */\r\nconst axiosLike = (status: number, message: string, dataMessage?: string) => ({\r\n message,\r\n response: {\r\n status,\r\n ...(dataMessage === undefined ? {} : { data: { message: dataMessage } }),\r\n },\r\n});\r\n\r\ndescribe(\"getApiErrorMessage — resolution order\", () => {\r\n test(\"a non-empty string rejection is returned as-is\", () => {\r\n expect(getApiErrorMessage(\"Trop de tentatives.\")).toBe(\r\n \"Trop de tentatives.\"\r\n );\r\n });\r\n\r\n test(\"the backend message wins over everything else\", () => {\r\n const err = axiosLike(\r\n 422,\r\n \"Request failed with status code 422\",\r\n \"Le numéro de titre est invalide.\"\r\n );\r\n expect(getApiErrorMessage(err, \"Échec.\")).toBe(\r\n \"Le numéro de titre est invalide.\"\r\n );\r\n });\r\n\r\n test(\"falls back when nothing usable is present\", () => {\r\n expect(getApiErrorMessage({}, \"Échec de l'envoi.\")).toBe(\r\n \"Échec de l'envoi.\"\r\n );\r\n });\r\n\r\n test(\"uses the platform default when no fallback is supplied\", () => {\r\n expect(getApiErrorMessage({})).toBe(DEFAULT_API_ERROR_MESSAGE);\r\n });\r\n\r\n test(\"never returns an empty string\", () => {\r\n expect(getApiErrorMessage(\"\")).toBe(DEFAULT_API_ERROR_MESSAGE);\r\n expect(getApiErrorMessage({ message: \"\" })).toBe(DEFAULT_API_ERROR_MESSAGE);\r\n });\r\n\r\n test(\"never throws on hostile input\", () => {\r\n expect(() => getApiErrorMessage(null)).not.toThrow();\r\n expect(() => getApiErrorMessage(undefined)).not.toThrow();\r\n expect(() => getApiErrorMessage(0)).not.toThrow();\r\n expect(() => getApiErrorMessage([])).not.toThrow();\r\n expect(() => getApiErrorMessage({ response: null })).not.toThrow();\r\n expect(() =>\r\n getApiErrorMessage({ response: { data: { message: 42 } } })\r\n ).not.toThrow();\r\n });\r\n});\r\n\r\n/**\r\n * G-07 — THE REGRESSION GUARD. If any of these fail, a transport string is\r\n * reaching end users again.\r\n */\r\ndescribe(\"getApiErrorMessage — transport strings are suppressed (G-07)\", () => {\r\n const FALLBACK = \"Le service est momentanément indisponible.\";\r\n\r\n test.each([\r\n \"Request failed with status code 500\",\r\n \"Request failed with status code 404\",\r\n \"Network Error\",\r\n \"timeout of 15000ms exceeded\",\r\n \"timeout exceeded\",\r\n \"Request aborted\",\r\n \"canceled\",\r\n \"socket hang up\",\r\n \"ECONNREFUSED\",\r\n \"ETIMEDOUT\",\r\n \"ECONNRESET\",\r\n \"ENOTFOUND\",\r\n \"EPIPE\",\r\n \"ERR_NETWORK\",\r\n \"ERR_CANCELED\",\r\n \"ERR_BAD_RESPONSE\",\r\n ])(\"suppresses %p in favour of the caller's copy\", (message) => {\r\n expect(getApiErrorMessage({ message }, FALLBACK)).toBe(FALLBACK);\r\n });\r\n\r\n test(\"matching is case-insensitive and tolerates padding\", () => {\r\n expect(\r\n getApiErrorMessage({ message: \" network error \" }, FALLBACK)\r\n ).toBe(FALLBACK);\r\n });\r\n\r\n test(\"a 500 with an empty body falls back rather than leaking the status line\", () => {\r\n const err = axiosLike(500, \"Request failed with status code 500\");\r\n expect(getApiErrorMessage(err, FALLBACK)).toBe(FALLBACK);\r\n });\r\n});\r\n\r\n/**\r\n * The other half of the same contract: the deny-list must stay CONSERVATIVE. A\r\n * false positive silently replaces a real business message with a generic one,\r\n * which is more damaging than showing one ugly string.\r\n */\r\ndescribe(\"getApiErrorMessage — deliberate messages still pass through\", () => {\r\n test.each([\r\n \"Ce titre ne peut pas être supprimé car il est en cours de validation.\",\r\n \"Le quota de dossiers est atteint.\",\r\n \"Session expirée. Reconnectez-vous.\",\r\n // Mentions a status but is human-written — must NOT be suppressed.\r\n \"Le service a répondu par une erreur (500). Réessayez.\",\r\n // Contains a transport phrase but is not one — anchored patterns only.\r\n \"Network Error détecté par la passerelle, contactez le support.\",\r\n ])(\"passes %p through\", (message) => {\r\n expect(getApiErrorMessage({ message }, \"unused\")).toBe(message);\r\n });\r\n\r\n /**\r\n * Guards the CASE-SENSITIVITY of the two errno patterns.\r\n *\r\n * They are the only patterns in the list without `/i`, precisely so that a\r\n * lowercase French word beginning with \"e\" is not mistaken for an errno\r\n * constant. If someone \"tidies\" them to `/^e[a-z]+$/i` for consistency with\r\n * their neighbours, every one of these becomes a generic fallback and a real\r\n * business message is lost. That failure is silent in production — the user\r\n * simply sees the wrong text — so it has to fail here instead.\r\n */\r\n test.each([\"erreur\", \"expiré\", \"échec\", \"envoi\", \"erreurs\"])(\r\n \"does not mistake the French word %p for an errno code\",\r\n (message) => {\r\n expect(getApiErrorMessage({ message }, \"unused\")).toBe(message);\r\n }\r\n );\r\n\r\n test(\"a module-thrown Error keeps its message\", () => {\r\n const err = new Error(\"Le montant FOB doit être positif.\");\r\n expect(getApiErrorMessage(err, \"unused\")).toBe(\r\n \"Le montant FOB doit être positif.\"\r\n );\r\n });\r\n});\r\n\r\ndescribe(\"getApiErrorDetail — unfiltered, for logs\", () => {\r\n test(\"returns the transport string that getApiErrorMessage hides\", () => {\r\n const err = axiosLike(502, \"Request failed with status code 502\");\r\n expect(getApiErrorMessage(err, \"Indisponible.\")).toBe(\"Indisponible.\");\r\n expect(getApiErrorDetail(err)).toBe(\"Request failed with status code 502\");\r\n });\r\n\r\n test(\"returns undefined when there is nothing to log\", () => {\r\n expect(getApiErrorDetail({})).toBeUndefined();\r\n expect(getApiErrorDetail(null)).toBeUndefined();\r\n });\r\n});\r\n\r\ndescribe(\"getApiErrorStatus\", () => {\r\n test(\"returns the HTTP status when the server answered\", () => {\r\n expect(getApiErrorStatus(axiosLike(404, \"Not Found\"))).toBe(404);\r\n });\r\n\r\n test(\"returns undefined when there was no answer at all (R-4.3)\", () => {\r\n expect(getApiErrorStatus({ message: \"Network Error\" })).toBeUndefined();\r\n expect(getApiErrorStatus(null)).toBeUndefined();\r\n });\r\n\r\n test(\"ignores a non-numeric status\", () => {\r\n expect(\r\n getApiErrorStatus({ response: { status: \"500\" } })\r\n ).toBeUndefined();\r\n });\r\n});\r\n"],"mappings":";;;;;;AAAA,SACEA,yBAAyB,EACzBC,iBAAiB,EACjBC,kBAAkB,EAClBC,iBAAiB,QACZ,mBAAmB;;AAE1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAMC,SAAS,GAAG,SAAZA,SAASA,CAAIC,MAAc,EAAEC,OAAe,EAAEC,WAAoB;EAAA,OAAM;IAC5ED,OAAO,EAAPA,OAAO;IACPE,QAAQ,EAAAC,aAAA;MACNJ,MAAM,EAANA;IAAM,GACFE,WAAW,KAAKG,SAAS,GAAG,CAAC,CAAC,GAAG;MAAEC,IAAI,EAAE;QAAEL,OAAO,EAAEC;MAAY;IAAE,CAAC;EAE3E,CAAC;AAAA,CAAC;AAEFK,QAAQ,CAAC,uCAAuC,EAAE,YAAM;EACtDC,IAAI,CAAC,gDAAgD,EAAE,YAAM;IAC3DC,MAAM,CAACZ,kBAAkB,CAAC,qBAAqB,CAAC,CAAC,CAACa,IAAI,CACpD,qBACF,CAAC;EACH,CAAC,CAAC;EAEFF,IAAI,CAAC,+CAA+C,EAAE,YAAM;IAC1D,IAAMG,GAAG,GAAGZ,SAAS,CACnB,GAAG,EACH,qCAAqC,EACrC,kCACF,CAAC;IACDU,MAAM,CAACZ,kBAAkB,CAACc,GAAG,EAAE,QAAQ,CAAC,CAAC,CAACD,IAAI,CAC5C,kCACF,CAAC;EACH,CAAC,CAAC;EAEFF,IAAI,CAAC,2CAA2C,EAAE,YAAM;IACtDC,MAAM,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AC,CAACqB,aAAa,CAAC,CAAC;IAC7CR,MAAM,CAACb,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAACqB,aAAa,CAAC,CAAC;EACjD,CAAC,CAAC;AACJ,CAAC,CAAC;AAEFV,QAAQ,CAAC,mBAAmB,EAAE,YAAM;EAClCC,IAAI,CAAC,kDAAkD,EAAE,YAAM;IAC7DC,MAAM,CAACX,iBAAiB,CAACC,SAAS,CAAC,GAAG,EAAE,WAAW,CAAC,CAAC,CAAC,CAACW,IAAI,CAAC,GAAG,CAAC;EAClE,CAAC,CAAC;EAEFF,IAAI,CAAC,2DAA2D,EAAE,YAAM;IACtEC,MAAM,CAACX,iBAAiB,CAAC;MAAEG,OAAO,EAAE;IAAgB,CAAC,CAAC,CAAC,CAACgB,aAAa,CAAC,CAAC;IACvER,MAAM,CAACX,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAACmB,aAAa,CAAC,CAAC;EACjD,CAAC,CAAC;EAEFT,IAAI,CAAC,8BAA8B,EAAE,YAAM;IACzCC,MAAM,CACJX,iBAAiB,CAAC;MAAEK,QAAQ,EAAE;QAAEH,MAAM,EAAE;MAAM;IAAE,CAAC,CACnD,CAAC,CAACiB,aAAa,CAAC,CAAC;EACnB,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,270 @@
1
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
3
+ var _marked = /*#__PURE__*/_regeneratorRuntime().mark(walk);
4
+ function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
5
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
6
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
7
+ /* eslint-env node */
8
+ import * as fs from "fs";
9
+ import * as path from "path";
10
+
11
+ /**
12
+ * Static-analysis tests guarding against re-introduction of banned
13
+ * patterns in src/lib/v2/. Pure filesystem scan; no React, no jsdom.
14
+ *
15
+ * Each banned pattern has a unique regression history documented in
16
+ * the per-test comment so future readers know WHY the rule exists,
17
+ * not just what it forbids.
18
+ */
19
+
20
+ var V2_ROOT = path.resolve(__dirname, "..");
21
+ /**
22
+ * Recursively walk a directory, yielding paths of source files that
23
+ * are eligible for scanning. Excludes nested __tests__ folders so
24
+ * test fixtures referencing banned strings as test data don't trigger
25
+ * the rule. Scans .js/.jsx/.ts/.tsx/.css (ambient .d.ts excluded — no
26
+ * runtime style/breakpoint literals live there).
27
+ */
28
+ function walk(dir) {
29
+ var _iterator, _step, entry, p;
30
+ return _regeneratorRuntime().wrap(function walk$(_context) {
31
+ while (1) {
32
+ switch (_context.prev = _context.next) {
33
+ case 0:
34
+ _iterator = _createForOfIteratorHelper(fs.readdirSync(dir, {
35
+ withFileTypes: true
36
+ }));
37
+ _context.prev = 1;
38
+ _iterator.s();
39
+ case 3:
40
+ if ((_step = _iterator.n()).done) {
41
+ _context.next = 17;
42
+ break;
43
+ }
44
+ entry = _step.value;
45
+ p = path.join(dir, entry.name);
46
+ if (!entry.isDirectory()) {
47
+ _context.next = 12;
48
+ break;
49
+ }
50
+ if (!(entry.name === "__tests__" || entry.name === "node_modules")) {
51
+ _context.next = 9;
52
+ break;
53
+ }
54
+ return _context.abrupt("continue", 15);
55
+ case 9:
56
+ return _context.delegateYield(walk(p), "t0", 10);
57
+ case 10:
58
+ _context.next = 15;
59
+ break;
60
+ case 12:
61
+ if (!(entry.isFile() && /\.(?:jsx?|tsx?|css)$/.test(entry.name) && !entry.name.endsWith(".d.ts"))) {
62
+ _context.next = 15;
63
+ break;
64
+ }
65
+ _context.next = 15;
66
+ return p;
67
+ case 15:
68
+ _context.next = 3;
69
+ break;
70
+ case 17:
71
+ _context.next = 22;
72
+ break;
73
+ case 19:
74
+ _context.prev = 19;
75
+ _context.t1 = _context["catch"](1);
76
+ _iterator.e(_context.t1);
77
+ case 22:
78
+ _context.prev = 22;
79
+ _iterator.f();
80
+ return _context.finish(22);
81
+ case 25:
82
+ case "end":
83
+ return _context.stop();
84
+ }
85
+ }
86
+ }, _marked, null, [[1, 19, 22, 25]]);
87
+ }
88
+ function readAllSourceFiles() {
89
+ var files = [];
90
+ var _iterator2 = _createForOfIteratorHelper(walk(V2_ROOT)),
91
+ _step2;
92
+ try {
93
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
94
+ var file = _step2.value;
95
+ files.push({
96
+ path: file,
97
+ content: fs.readFileSync(file, "utf8")
98
+ });
99
+ }
100
+ } catch (err) {
101
+ _iterator2.e(err);
102
+ } finally {
103
+ _iterator2.f();
104
+ }
105
+ return files;
106
+ }
107
+ function findOffenders(files, predicate) {
108
+ return files.filter(function (f) {
109
+ return predicate(f.content);
110
+ }).map(function (f) {
111
+ return path.relative(V2_ROOT, f.path);
112
+ });
113
+ }
114
+ describe("Banned patterns in src/lib/v2/ (regression guard)", function () {
115
+ var files;
116
+ beforeAll(function () {
117
+ files = readAllSourceFiles();
118
+ // Sanity check — make sure the walker actually found source.
119
+ // A misconfigured path would silently make every test pass with
120
+ // an empty input set; this prevents that false-positive.
121
+ expect(files.length).toBeGreaterThan(20);
122
+ });
123
+
124
+ /**
125
+ * --fw-black ghost token
126
+ * History: Batch 1 removed fontWeight.black from the typography
127
+ * tokens; Batch 2 dropped the matching `--fw-black` line from the
128
+ * cssVariables emitter. Two regression sites detected later
129
+ * (KPICard in Batch 6, FormSection in Batch 7) — both silently
130
+ * lost their bold weight at runtime. The CSS variable was
131
+ * referenced but resolved to undefined.
132
+ *
133
+ * ⚠ THE SCAN IS RAW AND COMMENT-BLIND. DO NOT "FIX" THAT.
134
+ *
135
+ * `findOffenders` matches the banned literal anywhere in the file, including
136
+ * inside comments. That is deliberate: a guard that parses code can be fooled
137
+ * by anything its parser mishandles, whereas a text scan cannot. The cost is
138
+ * that DOCUMENTING the banned token — even to record its removal — trips the
139
+ * rule.
140
+ *
141
+ * That is exactly what happened during the procuration-portnet-fe audit: both
142
+ * `--fw-black` tests failed, and the "offenders" turned out to be explanatory
143
+ * comments in `KPICard.tsx` and `theme/cssVariables.ts` describing the very
144
+ * fix this rule enforces. The code was correct; both files already used
145
+ * `var(--fw-bold)`. The comments were reworded to refer to the token
146
+ * descriptively instead.
147
+ *
148
+ * So: if this fails, read the offending lines BEFORE assuming a regression.
149
+ * The correct remedy is to reword the prose, never to add comment-stripping
150
+ * here — that would weaken every rule in this file to fix a documentation
151
+ * nit.
152
+ *
153
+ * `__tests__` is excluded from `walk`, which is why this docstring may name
154
+ * the token freely.
155
+ */
156
+ test("no `--fw-black` references anywhere in src/lib/v2/", function () {
157
+ var offenders = findOffenders(files, function (c) {
158
+ return c.includes("--fw-black");
159
+ });
160
+ expect(offenders).toEqual([]);
161
+ });
162
+ test("no `var(--fw-black)` consumption (paranoid duplicate of the above)", function () {
163
+ var offenders = findOffenders(files, function (c) {
164
+ return c.includes("var(--fw-black)");
165
+ });
166
+ expect(offenders).toEqual([]);
167
+ });
168
+
169
+ /**
170
+ * fontWeight: 650
171
+ * History: Banned by Batch 1 typography refactor — 650 is a
172
+ * non-standard CSS weight not supported by non-variable fallback
173
+ * fonts. Re-introduced twice in Batch 6 (Stepper HStepper +
174
+ * FilterTab). Each time it took a careful read to spot, since
175
+ * 650 looks "close enough" to semibold (600).
176
+ */
177
+ test("no `fontWeight: 650` literal in component sx / inline style", function () {
178
+ // Match `fontWeight: 650` and `fontWeight:650` (with or without space).
179
+ // Word boundary on the right so we don't false-match 6500.
180
+ var re = /fontWeight\s*:\s*650\b/;
181
+ var offenders = findOffenders(files, function (c) {
182
+ return re.test(c);
183
+ });
184
+ expect(offenders).toEqual([]);
185
+ });
186
+
187
+ /**
188
+ * Plain CSS form `font-weight: 650`
189
+ * Same rationale as above but for the kebab-case form used inside
190
+ * .css files (base.css and friends).
191
+ */
192
+ test("no `font-weight: 650` in CSS files", function () {
193
+ var re = /font-weight\s*:\s*650\b/;
194
+ var offenders = findOffenders(files, function (c) {
195
+ return re.test(c);
196
+ });
197
+ expect(offenders).toEqual([]);
198
+ });
199
+
200
+ /**
201
+ * Hardcoded breakpoint — raw px-width @media query
202
+ * History: Batch 1 (mobile & responsive certification). The
203
+ * breakpoint scale is single-sourced in tokens/breakpoints and
204
+ * wired into BOTH the MUI theme (theme.breakpoints) and the `mq`
205
+ * string helpers. A raw `@media (min-width:600px)` (or any literal
206
+ * px width) bypasses that single source and silently re-introduces
207
+ * the MUI-default divergence (sm:600 / md:900 / lg:1200) the token
208
+ * wiring was added to eliminate.
209
+ *
210
+ * Token-derived queries are produced via mq.up()/down() as
211
+ * interpolated `${...}px` strings — no digit follows `width:`, so
212
+ * they never match. Feature queries (prefers-reduced-motion,
213
+ * pointer, print) carry no width literal and are unaffected.
214
+ */
215
+ test("no hardcoded px-width @media query (use mq.up/down or theme.breakpoints)", function () {
216
+ var re = /@media[^{]*\b(?:min|max)-width\s*:\s*\d/;
217
+ var offenders = findOffenders(files, function (c) {
218
+ return re.test(c);
219
+ });
220
+ expect(offenders).toEqual([]);
221
+ });
222
+
223
+ /**
224
+ * Hardcoded breakpoint — useMediaQuery() with a literal px string
225
+ * History: Batch 1. `useMediaQuery("(max-width: 600px)")` hardcodes a
226
+ * breakpoint outside the token scale. The sanctioned form passes a
227
+ * theme callback — `useMediaQuery(theme.breakpoints.down("sm"))` — so
228
+ * the query resolves against the wired token values. This rule flags
229
+ * only the string-literal form: the theme-callback form has no quote
230
+ * immediately after the opening paren and is unaffected.
231
+ */
232
+ test("no useMediaQuery() with a literal px breakpoint string", function () {
233
+ var re = /useMediaQuery\(\s*["'`][^)]*\d+\s*px/;
234
+ var offenders = findOffenders(files, function (c) {
235
+ return re.test(c);
236
+ });
237
+ expect(offenders).toEqual([]);
238
+ });
239
+
240
+ /**
241
+ * Hardcoded px floor in a CSS-grid minmax() track
242
+ * History: Batch 2 (KVGrid + components/FormGrid) and Batch 9
243
+ * (patterns/FormGrid) — the mobile & responsive certification. An
244
+ * auto-fill grid written as `minmax(<N>px, 1fr)` uses the px value as
245
+ * a HARD track minimum: when that floor exceeds the available
246
+ * container width (a large N, or the grid nested inside a narrow
247
+ * column / Drawer at the sm tier) the track cannot shrink and
248
+ * overflows its container, producing horizontal scroll on tablet /
249
+ * phone viewports (WCAG 1.4.10 Reflow).
250
+ *
251
+ * The sanctioned forms never match this rule:
252
+ * - `minmax(0, 1fr)` → 0 floor, no px
253
+ * - `minmax(min(${w}px, 100%), 1fr)` → starts with `min(` (not a
254
+ * digit) and the px floor is
255
+ * clamped to the container
256
+ * Only a LITERAL leading-digit px floor — `minmax(240px, …)` — trips
257
+ * the rule, which is exactly the un-clamped, un-tokenised regression
258
+ * the responsive audit forbids. Verified green against every
259
+ * display:grid site in the v2 surface (KVGrid, components/FormGrid,
260
+ * patterns/FormGrid, FormGrid.Item, KeyboardShortcutsHelp).
261
+ */
262
+ test("no hardcoded px floor in a CSS-grid minmax() track (clamp with min(…,100%))", function () {
263
+ var re = /minmax\(\s*\d+(?:\.\d+)?\s*px/i;
264
+ var offenders = findOffenders(files, function (c) {
265
+ return re.test(c);
266
+ });
267
+ expect(offenders).toEqual([]);
268
+ });
269
+ });
270
+ //# sourceMappingURL=banned-patterns.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"banned-patterns.test.js","names":["_regeneratorRuntime","exports","Op","Object","prototype","hasOwn","hasOwnProperty","defineProperty","obj","key","desc","value","$Symbol","Symbol","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","define","enumerable","configurable","writable","err","wrap","innerFn","outerFn","self","tryLocsList","protoGenerator","Generator","generator","create","context","Context","makeInvokeMethod","tryCatch","fn","arg","type","call","ContinueSentinel","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","getProto","getPrototypeOf","NativeIteratorPrototype","values","Gp","defineIteratorMethods","forEach","method","_invoke","AsyncIterator","PromiseImpl","invoke","resolve","reject","record","result","_typeof","__await","then","unwrapped","error","previousPromise","callInvokeWithMethodAndArg","state","Error","doneResult","delegate","delegateResult","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","done","methodName","undefined","TypeError","info","resultName","next","nextLoc","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","push","resetTryEntry","completion","reset","iterable","iteratorMethod","isNaN","length","i","displayName","isGeneratorFunction","genFun","ctor","constructor","name","mark","setPrototypeOf","__proto__","awrap","async","Promise","iter","keys","val","object","reverse","pop","skipTempReset","prev","charAt","slice","stop","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","_catch","thrown","delegateYield","_marked","walk","_createForOfIteratorHelper","o","allowArrayLike","it","Array","isArray","_unsupportedIterableToArray","F","s","n","e","_e","f","normalCompletion","didErr","step","_e2","minLen","_arrayLikeToArray","toString","from","test","arr","len","arr2","fs","path","V2_ROOT","__dirname","dir","_iterator","_step","p","walk$","_context","readdirSync","withFileTypes","join","isDirectory","isFile","endsWith","t1","readAllSourceFiles","files","_iterator2","_step2","file","content","readFileSync","findOffenders","predicate","filter","map","relative","describe","beforeAll","expect","toBeGreaterThan","offenders","c","includes","toEqual","re"],"sources":["../../../../src/lib/v2/__tests__/banned-patterns.test.ts"],"sourcesContent":["/* eslint-env node */\r\nimport * as fs from \"fs\";\r\nimport * as path from \"path\";\r\n\r\n/**\r\n * Static-analysis tests guarding against re-introduction of banned\r\n * patterns in src/lib/v2/. Pure filesystem scan; no React, no jsdom.\r\n *\r\n * Each banned pattern has a unique regression history documented in\r\n * the per-test comment so future readers know WHY the rule exists,\r\n * not just what it forbids.\r\n */\r\n\r\nconst V2_ROOT: string = path.resolve(__dirname, \"..\");\r\n\r\ninterface SourceFile {\r\n path: string;\r\n content: string;\r\n}\r\n\r\n/**\r\n * Recursively walk a directory, yielding paths of source files that\r\n * are eligible for scanning. Excludes nested __tests__ folders so\r\n * test fixtures referencing banned strings as test data don't trigger\r\n * the rule. Scans .js/.jsx/.ts/.tsx/.css (ambient .d.ts excluded — no\r\n * runtime style/breakpoint literals live there).\r\n */\r\nfunction* walk(dir: string): Generator<string> {\r\n for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {\r\n const p = path.join(dir, entry.name);\r\n if (entry.isDirectory()) {\r\n if (entry.name === \"__tests__\" || entry.name === \"node_modules\") continue;\r\n yield* walk(p);\r\n } else if (\r\n entry.isFile() &&\r\n /\\.(?:jsx?|tsx?|css)$/.test(entry.name) &&\r\n !entry.name.endsWith(\".d.ts\")\r\n ) {\r\n yield p;\r\n }\r\n }\r\n}\r\n\r\nfunction readAllSourceFiles(): SourceFile[] {\r\n const files: SourceFile[] = [];\r\n for (const file of walk(V2_ROOT)) {\r\n files.push({ path: file, content: fs.readFileSync(file, \"utf8\") });\r\n }\r\n return files;\r\n}\r\n\r\nfunction findOffenders(\r\n files: SourceFile[],\r\n predicate: (content: string) => boolean\r\n): string[] {\r\n return files\r\n .filter((f) => predicate(f.content))\r\n .map((f) => path.relative(V2_ROOT, f.path));\r\n}\r\n\r\ndescribe(\"Banned patterns in src/lib/v2/ (regression guard)\", () => {\r\n let files: SourceFile[];\r\n\r\n beforeAll(() => {\r\n files = readAllSourceFiles();\r\n // Sanity check — make sure the walker actually found source.\r\n // A misconfigured path would silently make every test pass with\r\n // an empty input set; this prevents that false-positive.\r\n expect(files.length).toBeGreaterThan(20);\r\n });\r\n\r\n /**\r\n * --fw-black ghost token\r\n * History: Batch 1 removed fontWeight.black from the typography\r\n * tokens; Batch 2 dropped the matching `--fw-black` line from the\r\n * cssVariables emitter. Two regression sites detected later\r\n * (KPICard in Batch 6, FormSection in Batch 7) — both silently\r\n * lost their bold weight at runtime. The CSS variable was\r\n * referenced but resolved to undefined.\r\n *\r\n * ⚠ THE SCAN IS RAW AND COMMENT-BLIND. DO NOT \"FIX\" THAT.\r\n *\r\n * `findOffenders` matches the banned literal anywhere in the file, including\r\n * inside comments. That is deliberate: a guard that parses code can be fooled\r\n * by anything its parser mishandles, whereas a text scan cannot. The cost is\r\n * that DOCUMENTING the banned token — even to record its removal — trips the\r\n * rule.\r\n *\r\n * That is exactly what happened during the procuration-portnet-fe audit: both\r\n * `--fw-black` tests failed, and the \"offenders\" turned out to be explanatory\r\n * comments in `KPICard.tsx` and `theme/cssVariables.ts` describing the very\r\n * fix this rule enforces. The code was correct; both files already used\r\n * `var(--fw-bold)`. The comments were reworded to refer to the token\r\n * descriptively instead.\r\n *\r\n * So: if this fails, read the offending lines BEFORE assuming a regression.\r\n * The correct remedy is to reword the prose, never to add comment-stripping\r\n * here — that would weaken every rule in this file to fix a documentation\r\n * nit.\r\n *\r\n * `__tests__` is excluded from `walk`, which is why this docstring may name\r\n * the token freely.\r\n */\r\n test(\"no `--fw-black` references anywhere in src/lib/v2/\", () => {\r\n const offenders = findOffenders(files, (c) => c.includes(\"--fw-black\"));\r\n expect(offenders).toEqual([]);\r\n });\r\n\r\n test(\"no `var(--fw-black)` consumption (paranoid duplicate of the above)\", () => {\r\n const offenders = findOffenders(files, (c) => c.includes(\"var(--fw-black)\"));\r\n expect(offenders).toEqual([]);\r\n });\r\n\r\n /**\r\n * fontWeight: 650\r\n * History: Banned by Batch 1 typography refactor — 650 is a\r\n * non-standard CSS weight not supported by non-variable fallback\r\n * fonts. Re-introduced twice in Batch 6 (Stepper HStepper +\r\n * FilterTab). Each time it took a careful read to spot, since\r\n * 650 looks \"close enough\" to semibold (600).\r\n */\r\n test(\"no `fontWeight: 650` literal in component sx / inline style\", () => {\r\n // Match `fontWeight: 650` and `fontWeight:650` (with or without space).\r\n // Word boundary on the right so we don't false-match 6500.\r\n const re = /fontWeight\\s*:\\s*650\\b/;\r\n const offenders = findOffenders(files, (c) => re.test(c));\r\n expect(offenders).toEqual([]);\r\n });\r\n\r\n /**\r\n * Plain CSS form `font-weight: 650`\r\n * Same rationale as above but for the kebab-case form used inside\r\n * .css files (base.css and friends).\r\n */\r\n test(\"no `font-weight: 650` in CSS files\", () => {\r\n const re = /font-weight\\s*:\\s*650\\b/;\r\n const offenders = findOffenders(files, (c) => re.test(c));\r\n expect(offenders).toEqual([]);\r\n });\r\n\r\n /**\r\n * Hardcoded breakpoint — raw px-width @media query\r\n * History: Batch 1 (mobile & responsive certification). The\r\n * breakpoint scale is single-sourced in tokens/breakpoints and\r\n * wired into BOTH the MUI theme (theme.breakpoints) and the `mq`\r\n * string helpers. A raw `@media (min-width:600px)` (or any literal\r\n * px width) bypasses that single source and silently re-introduces\r\n * the MUI-default divergence (sm:600 / md:900 / lg:1200) the token\r\n * wiring was added to eliminate.\r\n *\r\n * Token-derived queries are produced via mq.up()/down() as\r\n * interpolated `${...}px` strings — no digit follows `width:`, so\r\n * they never match. Feature queries (prefers-reduced-motion,\r\n * pointer, print) carry no width literal and are unaffected.\r\n */\r\n test(\"no hardcoded px-width @media query (use mq.up/down or theme.breakpoints)\", () => {\r\n const re = /@media[^{]*\\b(?:min|max)-width\\s*:\\s*\\d/;\r\n const offenders = findOffenders(files, (c) => re.test(c));\r\n expect(offenders).toEqual([]);\r\n });\r\n\r\n /**\r\n * Hardcoded breakpoint — useMediaQuery() with a literal px string\r\n * History: Batch 1. `useMediaQuery(\"(max-width: 600px)\")` hardcodes a\r\n * breakpoint outside the token scale. The sanctioned form passes a\r\n * theme callback — `useMediaQuery(theme.breakpoints.down(\"sm\"))` — so\r\n * the query resolves against the wired token values. This rule flags\r\n * only the string-literal form: the theme-callback form has no quote\r\n * immediately after the opening paren and is unaffected.\r\n */\r\n test(\"no useMediaQuery() with a literal px breakpoint string\", () => {\r\n const re = /useMediaQuery\\(\\s*[\"'`][^)]*\\d+\\s*px/;\r\n const offenders = findOffenders(files, (c) => re.test(c));\r\n expect(offenders).toEqual([]);\r\n });\r\n\r\n /**\r\n * Hardcoded px floor in a CSS-grid minmax() track\r\n * History: Batch 2 (KVGrid + components/FormGrid) and Batch 9\r\n * (patterns/FormGrid) — the mobile & responsive certification. An\r\n * auto-fill grid written as `minmax(<N>px, 1fr)` uses the px value as\r\n * a HARD track minimum: when that floor exceeds the available\r\n * container width (a large N, or the grid nested inside a narrow\r\n * column / Drawer at the sm tier) the track cannot shrink and\r\n * overflows its container, producing horizontal scroll on tablet /\r\n * phone viewports (WCAG 1.4.10 Reflow).\r\n *\r\n * The sanctioned forms never match this rule:\r\n * - `minmax(0, 1fr)` → 0 floor, no px\r\n * - `minmax(min(${w}px, 100%), 1fr)` → starts with `min(` (not a\r\n * digit) and the px floor is\r\n * clamped to the container\r\n * Only a LITERAL leading-digit px floor — `minmax(240px, …)` — trips\r\n * the rule, which is exactly the un-clamped, un-tokenised regression\r\n * the responsive audit forbids. Verified green against every\r\n * display:grid site in the v2 surface (KVGrid, components/FormGrid,\r\n * patterns/FormGrid, FormGrid.Item, KeyboardShortcutsHelp).\r\n */\r\n test(\"no hardcoded px floor in a CSS-grid minmax() track (clamp with min(…,100%))\", () => {\r\n const re = /minmax\\(\\s*\\d+(?:\\.\\d+)?\\s*px/i;\r\n const offenders = findOffenders(files, (c) => re.test(c));\r\n expect(offenders).toE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