@portnet/ui 5.0.32 → 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 (1121) hide show
  1. package/CHANGELOG.md +524 -0
  2. package/README.md +101 -38
  3. package/dist/esm/index.js +196 -0
  4. package/dist/esm/index.js.map +1 -0
  5. package/dist/esm/v2/__tests__/FieldError.test.js +160 -0
  6. package/dist/esm/v2/__tests__/FieldError.test.js.map +1 -0
  7. package/dist/esm/v2/__tests__/FileCard.test.js +144 -0
  8. package/dist/esm/v2/__tests__/FileCard.test.js.map +1 -0
  9. package/dist/esm/v2/__tests__/MobileRowCard.test.js +333 -0
  10. package/dist/esm/v2/__tests__/MobileRowCard.test.js.map +1 -0
  11. package/dist/esm/v2/__tests__/SectionErrorBoundary.test.js +235 -0
  12. package/dist/esm/v2/__tests__/SectionErrorBoundary.test.js.map +1 -0
  13. package/dist/esm/v2/__tests__/apiError.test.js +181 -0
  14. package/dist/esm/v2/__tests__/apiError.test.js.map +1 -0
  15. package/dist/esm/v2/__tests__/banned-patterns.test.js +270 -0
  16. package/dist/esm/v2/__tests__/banned-patterns.test.js.map +1 -0
  17. package/dist/esm/v2/__tests__/contrast-palette.test.js +224 -0
  18. package/dist/esm/v2/__tests__/contrast-palette.test.js.map +1 -0
  19. package/dist/esm/v2/__tests__/cssVariables.test.js +157 -0
  20. package/dist/esm/v2/__tests__/cssVariables.test.js.map +1 -0
  21. package/dist/esm/v2/__tests__/labels-merge.test.js +147 -0
  22. package/dist/esm/v2/__tests__/labels-merge.test.js.map +1 -0
  23. package/dist/esm/v2/__tests__/locale-fallback.test.js +109 -0
  24. package/dist/esm/v2/__tests__/locale-fallback.test.js.map +1 -0
  25. package/dist/esm/v2/__tests__/useFocusTrap.test.js +514 -0
  26. package/dist/esm/v2/__tests__/useFocusTrap.test.js.map +1 -0
  27. package/dist/esm/v2/components/Accordion.js +230 -0
  28. package/dist/esm/v2/components/Accordion.js.map +1 -0
  29. package/dist/esm/v2/components/ActionStrip.js +146 -0
  30. package/dist/esm/v2/components/ActionStrip.js.map +1 -0
  31. package/dist/esm/v2/components/Banner.js +254 -0
  32. package/dist/esm/v2/components/Banner.js.map +1 -0
  33. package/dist/esm/v2/components/Busy.js +97 -0
  34. package/dist/esm/v2/components/Busy.js.map +1 -0
  35. package/dist/esm/v2/components/Button.js +114 -0
  36. package/dist/esm/v2/components/Button.js.map +1 -0
  37. package/dist/esm/v2/components/CategoryTag.js +81 -0
  38. package/dist/esm/v2/components/CategoryTag.js.map +1 -0
  39. package/dist/esm/v2/components/Checkbox.js +124 -0
  40. package/dist/esm/v2/components/Checkbox.js.map +1 -0
  41. package/dist/esm/v2/components/Chip.js +124 -0
  42. package/dist/esm/v2/components/Chip.js.map +1 -0
  43. package/dist/esm/v2/components/Combobox.js +394 -0
  44. package/dist/esm/v2/components/Combobox.js.map +1 -0
  45. package/dist/esm/v2/components/CommandPalette.js +660 -0
  46. package/dist/esm/v2/components/CommandPalette.js.map +1 -0
  47. package/dist/esm/v2/components/ConfirmDialog.js +144 -0
  48. package/dist/esm/v2/components/ConfirmDialog.js.map +1 -0
  49. package/dist/esm/v2/components/DatePicker.js +200 -0
  50. package/dist/esm/v2/components/DatePicker.js.map +1 -0
  51. package/dist/esm/v2/components/DateRangePicker.js +289 -0
  52. package/dist/esm/v2/components/DateRangePicker.js.map +1 -0
  53. package/dist/esm/v2/components/DateTimePicker.js +182 -0
  54. package/dist/esm/v2/components/DateTimePicker.js.map +1 -0
  55. package/dist/esm/v2/components/Drawer.js +333 -0
  56. package/dist/esm/v2/components/Drawer.js.map +1 -0
  57. package/dist/esm/v2/components/Dropzone.js +540 -0
  58. package/dist/esm/v2/components/Dropzone.js.map +1 -0
  59. package/dist/esm/v2/components/EmptyState.js +102 -0
  60. package/dist/esm/v2/components/EmptyState.js.map +1 -0
  61. package/dist/esm/v2/components/FavoriteToggle.js +127 -0
  62. package/dist/esm/v2/components/FavoriteToggle.js.map +1 -0
  63. package/dist/esm/v2/components/Field.js +197 -0
  64. package/dist/esm/v2/components/Field.js.map +1 -0
  65. package/dist/esm/v2/components/FieldError.js +124 -0
  66. package/dist/esm/v2/components/FieldError.js.map +1 -0
  67. package/dist/esm/v2/components/FieldHelp.js +202 -0
  68. package/dist/esm/v2/components/FieldHelp.js.map +1 -0
  69. package/dist/esm/v2/components/FileCard.js +162 -0
  70. package/dist/esm/v2/components/FileCard.js.map +1 -0
  71. package/dist/esm/v2/components/FilterTab.js +138 -0
  72. package/dist/esm/v2/components/FilterTab.js.map +1 -0
  73. package/dist/esm/v2/components/ForbiddenPage.js +74 -0
  74. package/dist/esm/v2/components/ForbiddenPage.js.map +1 -0
  75. package/dist/esm/v2/components/FormGrid.js +179 -0
  76. package/dist/esm/v2/components/FormGrid.js.map +1 -0
  77. package/dist/esm/v2/components/FormikDisplay.js +118 -0
  78. package/dist/esm/v2/components/FormikDisplay.js.map +1 -0
  79. package/dist/esm/v2/components/Input.js +107 -0
  80. package/dist/esm/v2/components/Input.js.map +1 -0
  81. package/dist/esm/v2/components/KPICard.js +237 -0
  82. package/dist/esm/v2/components/KPICard.js.map +1 -0
  83. package/dist/esm/v2/components/KPIStrip.js +84 -0
  84. package/dist/esm/v2/components/KPIStrip.js.map +1 -0
  85. package/dist/esm/v2/components/KV.js +75 -0
  86. package/dist/esm/v2/components/KV.js.map +1 -0
  87. package/dist/esm/v2/components/KVGrid.js +74 -0
  88. package/dist/esm/v2/components/KVGrid.js.map +1 -0
  89. package/dist/esm/v2/components/Layout.js +284 -0
  90. package/dist/esm/v2/components/Layout.js.map +1 -0
  91. package/dist/esm/v2/components/MobileRowCard.js +314 -0
  92. package/dist/esm/v2/components/MobileRowCard.js.map +1 -0
  93. package/dist/esm/v2/components/Modal.js +276 -0
  94. package/dist/esm/v2/components/Modal.js.map +1 -0
  95. package/dist/esm/v2/components/NetworkErrorPage.js +78 -0
  96. package/dist/esm/v2/components/NetworkErrorPage.js.map +1 -0
  97. package/dist/esm/v2/components/NotFoundPage.js +58 -0
  98. package/dist/esm/v2/components/NotFoundPage.js.map +1 -0
  99. package/dist/esm/v2/components/NumberInput.js +309 -0
  100. package/dist/esm/v2/components/NumberInput.js.map +1 -0
  101. package/dist/esm/v2/components/OverflowMenu.js +184 -0
  102. package/dist/esm/v2/components/OverflowMenu.js.map +1 -0
  103. package/dist/esm/v2/components/PdfViewer.js +122 -0
  104. package/dist/esm/v2/components/PdfViewer.js.map +1 -0
  105. package/dist/esm/v2/components/ProgressBar.js +202 -0
  106. package/dist/esm/v2/components/ProgressBar.js.map +1 -0
  107. package/dist/esm/v2/components/Radio.js +228 -0
  108. package/dist/esm/v2/components/Radio.js.map +1 -0
  109. package/dist/esm/v2/components/SectionErrorBoundary.js +214 -0
  110. package/dist/esm/v2/components/SectionErrorBoundary.js.map +1 -0
  111. package/dist/esm/v2/components/SectionHeader.js +132 -0
  112. package/dist/esm/v2/components/SectionHeader.js.map +1 -0
  113. package/dist/esm/v2/components/Segmented.js +254 -0
  114. package/dist/esm/v2/components/Segmented.js.map +1 -0
  115. package/dist/esm/v2/components/Select.js +490 -0
  116. package/dist/esm/v2/components/Select.js.map +1 -0
  117. package/dist/esm/v2/components/ServerErrorPage.js +74 -0
  118. package/dist/esm/v2/components/ServerErrorPage.js.map +1 -0
  119. package/dist/esm/v2/components/Skeleton.js +269 -0
  120. package/dist/esm/v2/components/Skeleton.js.map +1 -0
  121. package/dist/esm/v2/components/SkipLink.js +49 -0
  122. package/dist/esm/v2/components/SkipLink.js.map +1 -0
  123. package/dist/esm/v2/components/Spinner.js +69 -0
  124. package/dist/esm/v2/components/Spinner.js.map +1 -0
  125. package/dist/esm/v2/components/Status.js +64 -0
  126. package/dist/esm/v2/components/Status.js.map +1 -0
  127. package/dist/esm/v2/components/Stepper.js +432 -0
  128. package/dist/esm/v2/components/Stepper.js.map +1 -0
  129. package/dist/esm/v2/components/Surface.js +159 -0
  130. package/dist/esm/v2/components/Surface.js.map +1 -0
  131. package/dist/esm/v2/components/Switch.js +128 -0
  132. package/dist/esm/v2/components/Switch.js.map +1 -0
  133. package/dist/esm/v2/components/Tabs.js +150 -0
  134. package/dist/esm/v2/components/Tabs.js.map +1 -0
  135. package/dist/esm/v2/components/TelInput.js +274 -0
  136. package/dist/esm/v2/components/TelInput.js.map +1 -0
  137. package/dist/esm/v2/components/Textarea.js +72 -0
  138. package/dist/esm/v2/components/Textarea.js.map +1 -0
  139. package/dist/esm/v2/components/TimePicker.js +134 -0
  140. package/dist/esm/v2/components/TimePicker.js.map +1 -0
  141. package/dist/esm/v2/components/Toast.js +376 -0
  142. package/dist/esm/v2/components/Toast.js.map +1 -0
  143. package/dist/esm/v2/components/Tooltip.js +161 -0
  144. package/dist/esm/v2/components/Tooltip.js.map +1 -0
  145. package/dist/esm/v2/components/_ErrorPageBody.js +85 -0
  146. package/dist/esm/v2/components/_ErrorPageBody.js.map +1 -0
  147. package/dist/esm/v2/components/_pickerShared.js +60 -0
  148. package/dist/esm/v2/components/_pickerShared.js.map +1 -0
  149. package/dist/esm/v2/components/index.js +244 -0
  150. package/dist/esm/v2/components/index.js.map +1 -0
  151. package/dist/esm/v2/hooks/index.js +10 -0
  152. package/dist/esm/v2/hooks/index.js.map +1 -0
  153. package/dist/esm/v2/hooks/useDelayedFlag.js +55 -0
  154. package/dist/esm/v2/hooks/useDelayedFlag.js.map +1 -0
  155. package/dist/esm/v2/hooks/useDensity.js +119 -0
  156. package/dist/esm/v2/hooks/useDensity.js.map +1 -0
  157. package/dist/esm/v2/hooks/useFocusFirstError.js +197 -0
  158. package/dist/esm/v2/hooks/useFocusFirstError.js.map +1 -0
  159. package/dist/esm/v2/hooks/useFocusTrap.js +202 -0
  160. package/dist/esm/v2/hooks/useFocusTrap.js.map +1 -0
  161. package/dist/esm/v2/hooks/useFormAutoSave.js +181 -0
  162. package/dist/esm/v2/hooks/useFormAutoSave.js.map +1 -0
  163. package/dist/esm/v2/hooks/useFormCompletionProgress.js +131 -0
  164. package/dist/esm/v2/hooks/useFormCompletionProgress.js.map +1 -0
  165. package/dist/esm/v2/hooks/useResolvedDensity.js +44 -0
  166. package/dist/esm/v2/hooks/useResolvedDensity.js.map +1 -0
  167. package/dist/esm/v2/hooks/useSortedRows.js +32 -0
  168. package/dist/esm/v2/hooks/useSortedRows.js.map +1 -0
  169. package/dist/esm/v2/hooks/useTabLoading.js +79 -0
  170. package/dist/esm/v2/hooks/useTabLoading.js.map +1 -0
  171. package/dist/esm/v2/index.js +121 -0
  172. package/dist/esm/v2/index.js.map +1 -0
  173. package/dist/esm/v2/modalContext.js +108 -0
  174. package/dist/esm/v2/modalContext.js.map +1 -0
  175. package/dist/esm/v2/models/favorite.js +2 -0
  176. package/dist/esm/v2/models/favorite.js.map +1 -0
  177. package/dist/esm/v2/models/index.js +12 -0
  178. package/dist/esm/v2/models/index.js.map +1 -0
  179. package/dist/esm/v2/models/personalization.js +2 -0
  180. package/dist/esm/v2/models/personalization.js.map +1 -0
  181. package/dist/esm/v2/models/referentiel.js +2 -0
  182. package/dist/esm/v2/models/referentiel.js.map +1 -0
  183. package/dist/esm/v2/models/savedFilter.js +2 -0
  184. package/dist/esm/v2/models/savedFilter.js.map +1 -0
  185. package/dist/esm/v2/patterns/ActionBar.js +603 -0
  186. package/dist/esm/v2/patterns/ActionBar.js.map +1 -0
  187. package/dist/esm/v2/patterns/BulkActionBar.js +147 -0
  188. package/dist/esm/v2/patterns/BulkActionBar.js.map +1 -0
  189. package/dist/esm/v2/patterns/CollapsibleDataGrid.js +303 -0
  190. package/dist/esm/v2/patterns/CollapsibleDataGrid.js.map +1 -0
  191. package/dist/esm/v2/patterns/ColumnsToggle.js +301 -0
  192. package/dist/esm/v2/patterns/ColumnsToggle.js.map +1 -0
  193. package/dist/esm/v2/patterns/DataGrid.js +820 -0
  194. package/dist/esm/v2/patterns/DataGrid.js.map +1 -0
  195. package/dist/esm/v2/patterns/DataGridSettingsMenu.js +375 -0
  196. package/dist/esm/v2/patterns/DataGridSettingsMenu.js.map +1 -0
  197. package/dist/esm/v2/patterns/DataGridToolbar.js +249 -0
  198. package/dist/esm/v2/patterns/DataGridToolbar.js.map +1 -0
  199. package/dist/esm/v2/patterns/DataGridVirtualized.js +523 -0
  200. package/dist/esm/v2/patterns/DataGridVirtualized.js.map +1 -0
  201. package/dist/esm/v2/patterns/DeleteResourceConfirmDialog.js +70 -0
  202. package/dist/esm/v2/patterns/DeleteResourceConfirmDialog.js.map +1 -0
  203. package/dist/esm/v2/patterns/FavoriteColumn.js +164 -0
  204. package/dist/esm/v2/patterns/FavoriteColumn.js.map +1 -0
  205. package/dist/esm/v2/patterns/FavoritesFilter.js +91 -0
  206. package/dist/esm/v2/patterns/FavoritesFilter.js.map +1 -0
  207. package/dist/esm/v2/patterns/FormErrorSummary.js +101 -0
  208. package/dist/esm/v2/patterns/FormErrorSummary.js.map +1 -0
  209. package/dist/esm/v2/patterns/FormPageShell.js +126 -0
  210. package/dist/esm/v2/patterns/FormPageShell.js.map +1 -0
  211. package/dist/esm/v2/patterns/FormSection.js +190 -0
  212. package/dist/esm/v2/patterns/FormSection.js.map +1 -0
  213. package/dist/esm/v2/patterns/FormikCheckboxGroup.js +110 -0
  214. package/dist/esm/v2/patterns/FormikCheckboxGroup.js.map +1 -0
  215. package/dist/esm/v2/patterns/FormikCombobox.js +115 -0
  216. package/dist/esm/v2/patterns/FormikCombobox.js.map +1 -0
  217. package/dist/esm/v2/patterns/FormikDatePicker.js +196 -0
  218. package/dist/esm/v2/patterns/FormikDatePicker.js.map +1 -0
  219. package/dist/esm/v2/patterns/FormikErrorFocus.js +77 -0
  220. package/dist/esm/v2/patterns/FormikErrorFocus.js.map +1 -0
  221. package/dist/esm/v2/patterns/FormikFile.js +148 -0
  222. package/dist/esm/v2/patterns/FormikFile.js.map +1 -0
  223. package/dist/esm/v2/patterns/FormikInput.js +127 -0
  224. package/dist/esm/v2/patterns/FormikInput.js.map +1 -0
  225. package/dist/esm/v2/patterns/FormikReferentielField.js +116 -0
  226. package/dist/esm/v2/patterns/FormikReferentielField.js.map +1 -0
  227. package/dist/esm/v2/patterns/FormikSelect.js +159 -0
  228. package/dist/esm/v2/patterns/FormikSelect.js.map +1 -0
  229. package/dist/esm/v2/patterns/FormikTextarea.js +76 -0
  230. package/dist/esm/v2/patterns/FormikTextarea.js.map +1 -0
  231. package/dist/esm/v2/patterns/KeyboardShortcutsHelp.js +195 -0
  232. package/dist/esm/v2/patterns/KeyboardShortcutsHelp.js.map +1 -0
  233. package/dist/esm/v2/patterns/NetworkErrorBanner.js +72 -0
  234. package/dist/esm/v2/patterns/NetworkErrorBanner.js.map +1 -0
  235. package/dist/esm/v2/patterns/PageContent.js +62 -0
  236. package/dist/esm/v2/patterns/PageContent.js.map +1 -0
  237. package/dist/esm/v2/patterns/ReferentielField.js +615 -0
  238. package/dist/esm/v2/patterns/ReferentielField.js.map +1 -0
  239. package/dist/esm/v2/patterns/SaveFilterDialog.js +197 -0
  240. package/dist/esm/v2/patterns/SaveFilterDialog.js.map +1 -0
  241. package/dist/esm/v2/patterns/SavedFiltersMenu.js +406 -0
  242. package/dist/esm/v2/patterns/SavedFiltersMenu.js.map +1 -0
  243. package/dist/esm/v2/patterns/SkeletonPageShell.js +342 -0
  244. package/dist/esm/v2/patterns/SkeletonPageShell.js.map +1 -0
  245. package/dist/esm/v2/patterns/SortableHeader.js +179 -0
  246. package/dist/esm/v2/patterns/SortableHeader.js.map +1 -0
  247. package/dist/esm/v2/patterns/Tour.js +471 -0
  248. package/dist/esm/v2/patterns/Tour.js.map +1 -0
  249. package/dist/esm/v2/patterns/_dataGridShared.js +431 -0
  250. package/dist/esm/v2/patterns/_dataGridShared.js.map +1 -0
  251. package/dist/esm/v2/patterns/_sort.js +112 -0
  252. package/dist/esm/v2/patterns/_sort.js.map +1 -0
  253. package/dist/esm/v2/patterns/_useColumnReorder.js +257 -0
  254. package/dist/esm/v2/patterns/_useColumnReorder.js.map +1 -0
  255. package/dist/esm/v2/patterns/_useColumnResize.js +191 -0
  256. package/dist/esm/v2/patterns/_useColumnResize.js.map +1 -0
  257. package/dist/esm/v2/patterns/index.js +95 -0
  258. package/dist/esm/v2/patterns/index.js.map +1 -0
  259. package/dist/esm/v2/personalization/PersonalizationProvider.js +168 -0
  260. package/dist/esm/v2/personalization/PersonalizationProvider.js.map +1 -0
  261. package/dist/esm/v2/personalization/adapters/_storageKey.js +60 -0
  262. package/dist/esm/v2/personalization/adapters/_storageKey.js.map +1 -0
  263. package/dist/esm/v2/personalization/adapters/createLocalStorageAdapter.js +124 -0
  264. package/dist/esm/v2/personalization/adapters/createLocalStorageAdapter.js.map +1 -0
  265. package/dist/esm/v2/personalization/adapters/createMemoryAdapter.js +70 -0
  266. package/dist/esm/v2/personalization/adapters/createMemoryAdapter.js.map +1 -0
  267. package/dist/esm/v2/personalization/adapters/index.js +11 -0
  268. package/dist/esm/v2/personalization/adapters/index.js.map +1 -0
  269. package/dist/esm/v2/personalization/capabilities/favorites.js +216 -0
  270. package/dist/esm/v2/personalization/capabilities/favorites.js.map +1 -0
  271. package/dist/esm/v2/personalization/capabilities/favoritesView.js +111 -0
  272. package/dist/esm/v2/personalization/capabilities/favoritesView.js.map +1 -0
  273. package/dist/esm/v2/personalization/capabilities/index.js +17 -0
  274. package/dist/esm/v2/personalization/capabilities/index.js.map +1 -0
  275. package/dist/esm/v2/personalization/capabilities/savedFilters.js +291 -0
  276. package/dist/esm/v2/personalization/capabilities/savedFilters.js.map +1 -0
  277. package/dist/esm/v2/personalization/createPersonalizationStore.js +472 -0
  278. package/dist/esm/v2/personalization/createPersonalizationStore.js.map +1 -0
  279. package/dist/esm/v2/personalization/index.js +46 -0
  280. package/dist/esm/v2/personalization/index.js.map +1 -0
  281. package/dist/esm/v2/personalization/personalizationContext.js +108 -0
  282. package/dist/esm/v2/personalization/personalizationContext.js.map +1 -0
  283. package/dist/esm/v2/personalization/schema.js +92 -0
  284. package/dist/esm/v2/personalization/schema.js.map +1 -0
  285. package/dist/esm/v2/personalization/types.js +2 -0
  286. package/dist/esm/v2/personalization/types.js.map +1 -0
  287. package/dist/esm/v2/referentiel/ReferentielProvider.js +87 -0
  288. package/dist/esm/v2/referentiel/ReferentielProvider.js.map +1 -0
  289. package/dist/esm/v2/referentiel/index.js +15 -0
  290. package/dist/esm/v2/referentiel/index.js.map +1 -0
  291. package/dist/esm/v2/referentiel/useReferentielClient.js +37 -0
  292. package/dist/esm/v2/referentiel/useReferentielClient.js.map +1 -0
  293. package/dist/esm/v2/referentiel/useReferentielOptions.js +169 -0
  294. package/dist/esm/v2/referentiel/useReferentielOptions.js.map +1 -0
  295. package/dist/esm/v2/referentiel/useReferentielSearch.js +132 -0
  296. package/dist/esm/v2/referentiel/useReferentielSearch.js.map +1 -0
  297. package/dist/esm/v2/styles/base.css +425 -0
  298. package/dist/esm/v2/styles/css.d.ts +10 -0
  299. package/dist/esm/v2/styles/index.js +12 -0
  300. package/dist/esm/v2/styles/index.js.map +1 -0
  301. package/dist/esm/v2/theme/_brand.js +64 -0
  302. package/dist/esm/v2/theme/_brand.js.map +1 -0
  303. package/dist/esm/v2/theme/_brandSecondary.js +60 -0
  304. package/dist/esm/v2/theme/_brandSecondary.js.map +1 -0
  305. package/dist/esm/v2/theme/createPortnetTheme.js +548 -0
  306. package/dist/esm/v2/theme/createPortnetTheme.js.map +1 -0
  307. package/dist/esm/v2/theme/cssVariables.js +198 -0
  308. package/dist/esm/v2/theme/cssVariables.js.map +1 -0
  309. package/dist/esm/v2/theme/index.js +32 -0
  310. package/dist/esm/v2/theme/index.js.map +1 -0
  311. package/dist/esm/v2/tokens/breakpoints.js +106 -0
  312. package/dist/esm/v2/tokens/breakpoints.js.map +1 -0
  313. package/dist/esm/v2/tokens/colors.js +219 -0
  314. package/dist/esm/v2/tokens/colors.js.map +1 -0
  315. package/dist/esm/v2/tokens/density.js +98 -0
  316. package/dist/esm/v2/tokens/density.js.map +1 -0
  317. package/dist/esm/v2/tokens/index.js +80 -0
  318. package/dist/esm/v2/tokens/index.js.map +1 -0
  319. package/dist/esm/v2/tokens/motion.js +88 -0
  320. package/dist/esm/v2/tokens/motion.js.map +1 -0
  321. package/dist/esm/v2/tokens/radius.js +22 -0
  322. package/dist/esm/v2/tokens/radius.js.map +1 -0
  323. package/dist/esm/v2/tokens/shadows.js +40 -0
  324. package/dist/esm/v2/tokens/shadows.js.map +1 -0
  325. package/dist/esm/v2/tokens/spacing.js +51 -0
  326. package/dist/esm/v2/tokens/spacing.js.map +1 -0
  327. package/dist/esm/v2/tokens/state.js +41 -0
  328. package/dist/esm/v2/tokens/state.js.map +1 -0
  329. package/dist/esm/v2/tokens/statusPalette.js +66 -0
  330. package/dist/esm/v2/tokens/statusPalette.js.map +1 -0
  331. package/dist/esm/v2/tokens/tokens.json +153 -0
  332. package/dist/esm/v2/tokens/typography.js +149 -0
  333. package/dist/esm/v2/tokens/typography.js.map +1 -0
  334. package/dist/esm/v2/tokens/zIndex.js +44 -0
  335. package/dist/esm/v2/tokens/zIndex.js.map +1 -0
  336. package/dist/esm/v2/types/common.js +2 -0
  337. package/dist/esm/v2/types/common.js.map +1 -0
  338. package/dist/esm/v2/types/datagrid.js +2 -0
  339. package/dist/esm/v2/types/datagrid.js.map +1 -0
  340. package/dist/esm/v2/types/index.js +12 -0
  341. package/dist/esm/v2/types/index.js.map +1 -0
  342. package/dist/esm/v2/utils/apiError.js +281 -0
  343. package/dist/esm/v2/utils/apiError.js.map +1 -0
  344. package/dist/esm/v2/utils/contrast.js +157 -0
  345. package/dist/esm/v2/utils/contrast.js.map +1 -0
  346. package/dist/esm/v2/utils/cx.js +38 -0
  347. package/dist/esm/v2/utils/cx.js.map +1 -0
  348. package/dist/esm/v2/utils/fileDownload.js +226 -0
  349. package/dist/esm/v2/utils/fileDownload.js.map +1 -0
  350. package/dist/esm/v2/utils/fmtMoney.js +78 -0
  351. package/dist/esm/v2/utils/fmtMoney.js.map +1 -0
  352. package/dist/esm/v2/utils/index.js +43 -0
  353. package/dist/esm/v2/utils/index.js.map +1 -0
  354. package/dist/esm/v2/utils/mergeLabels.js +86 -0
  355. package/dist/esm/v2/utils/mergeLabels.js.map +1 -0
  356. package/dist/esm/v2/utils/networkStatus.js +114 -0
  357. package/dist/esm/v2/utils/networkStatus.js.map +1 -0
  358. package/dist/index.d.ts +60 -0
  359. package/dist/index.d.ts.map +1 -0
  360. package/dist/index.js +183 -191
  361. package/dist/index.js.map +1 -0
  362. package/dist/v2/__tests__/FieldError.test.js +164 -0
  363. package/dist/v2/__tests__/FieldError.test.js.map +1 -0
  364. package/dist/v2/__tests__/FileCard.test.js +148 -0
  365. package/dist/v2/__tests__/FileCard.test.js.map +1 -0
  366. package/dist/v2/__tests__/MobileRowCard.test.js +337 -0
  367. package/dist/v2/__tests__/MobileRowCard.test.js.map +1 -0
  368. package/dist/v2/__tests__/SectionErrorBoundary.test.js +237 -0
  369. package/dist/v2/__tests__/SectionErrorBoundary.test.js.map +1 -0
  370. package/dist/v2/__tests__/apiError.test.js +182 -0
  371. package/dist/v2/__tests__/apiError.test.js.map +1 -0
  372. package/dist/v2/__tests__/banned-patterns.test.js +272 -0
  373. package/dist/v2/__tests__/banned-patterns.test.js.map +1 -0
  374. package/dist/v2/__tests__/contrast-palette.test.js +225 -0
  375. package/dist/v2/__tests__/contrast-palette.test.js.map +1 -0
  376. package/dist/v2/__tests__/cssVariables.test.js +158 -0
  377. package/dist/v2/__tests__/cssVariables.test.js.map +1 -0
  378. package/dist/v2/__tests__/labels-merge.test.js +153 -0
  379. package/dist/v2/__tests__/labels-merge.test.js.map +1 -0
  380. package/dist/v2/__tests__/locale-fallback.test.js +111 -0
  381. package/dist/v2/__tests__/locale-fallback.test.js.map +1 -0
  382. package/dist/v2/__tests__/useFocusTrap.test.js +517 -0
  383. package/dist/v2/__tests__/useFocusTrap.test.js.map +1 -0
  384. package/dist/v2/components/Accordion.d.ts +56 -0
  385. package/dist/v2/components/Accordion.d.ts.map +1 -0
  386. package/dist/v2/components/Accordion.js +238 -0
  387. package/dist/v2/components/Accordion.js.map +1 -0
  388. package/dist/v2/components/ActionStrip.d.ts +67 -0
  389. package/dist/v2/components/ActionStrip.d.ts.map +1 -0
  390. package/dist/v2/components/ActionStrip.js +154 -0
  391. package/dist/v2/components/ActionStrip.js.map +1 -0
  392. package/dist/v2/components/Banner.d.ts +88 -0
  393. package/dist/v2/components/Banner.d.ts.map +1 -0
  394. package/dist/v2/components/Banner.js +264 -0
  395. package/dist/v2/components/Banner.js.map +1 -0
  396. package/dist/v2/components/Busy.d.ts +18 -0
  397. package/dist/v2/components/Busy.d.ts.map +1 -0
  398. package/dist/v2/components/Busy.js +104 -0
  399. package/dist/v2/components/Busy.js.map +1 -0
  400. package/dist/v2/components/Button.d.ts +36 -0
  401. package/dist/v2/components/Button.d.ts.map +1 -0
  402. package/dist/v2/components/Button.js +122 -0
  403. package/dist/v2/components/Button.js.map +1 -0
  404. package/dist/v2/components/CategoryTag.d.ts +45 -0
  405. package/dist/v2/components/CategoryTag.d.ts.map +1 -0
  406. package/dist/v2/components/CategoryTag.js +89 -0
  407. package/dist/v2/components/CategoryTag.js.map +1 -0
  408. package/dist/v2/components/Checkbox.d.ts +59 -0
  409. package/dist/v2/components/Checkbox.d.ts.map +1 -0
  410. package/dist/v2/components/Checkbox.js +134 -0
  411. package/dist/v2/components/Checkbox.js.map +1 -0
  412. package/dist/v2/components/Chip.d.ts +48 -0
  413. package/dist/v2/components/Chip.d.ts.map +1 -0
  414. package/dist/v2/components/Chip.js +132 -0
  415. package/dist/v2/components/Chip.js.map +1 -0
  416. package/dist/v2/components/Combobox.d.ts +134 -0
  417. package/dist/v2/components/Combobox.d.ts.map +1 -0
  418. package/dist/v2/components/Combobox.js +400 -0
  419. package/dist/v2/components/Combobox.js.map +1 -0
  420. package/dist/v2/components/CommandPalette.d.ts +36 -0
  421. package/dist/v2/components/CommandPalette.d.ts.map +1 -0
  422. package/dist/v2/components/CommandPalette.js +668 -0
  423. package/dist/v2/components/CommandPalette.js.map +1 -0
  424. package/dist/v2/components/ConfirmDialog.d.ts +23 -0
  425. package/dist/v2/components/ConfirmDialog.d.ts.map +1 -0
  426. package/dist/v2/components/ConfirmDialog.js +151 -0
  427. package/dist/v2/components/ConfirmDialog.js.map +1 -0
  428. package/dist/v2/components/DatePicker.d.ts +21 -0
  429. package/dist/v2/components/DatePicker.d.ts.map +1 -0
  430. package/dist/v2/components/DatePicker.js +207 -0
  431. package/dist/v2/components/DatePicker.js.map +1 -0
  432. package/dist/v2/components/DateRangePicker.d.ts +81 -0
  433. package/dist/v2/components/DateRangePicker.d.ts.map +1 -0
  434. package/dist/v2/components/DateRangePicker.js +296 -0
  435. package/dist/v2/components/DateRangePicker.js.map +1 -0
  436. package/dist/v2/components/DateTimePicker.d.ts +21 -0
  437. package/dist/v2/components/DateTimePicker.d.ts.map +1 -0
  438. package/dist/v2/components/DateTimePicker.js +189 -0
  439. package/dist/v2/components/DateTimePicker.js.map +1 -0
  440. package/dist/v2/components/Drawer.d.ts +34 -0
  441. package/dist/v2/components/Drawer.d.ts.map +1 -0
  442. package/dist/v2/components/Drawer.js +340 -0
  443. package/dist/v2/components/Drawer.js.map +1 -0
  444. package/dist/v2/components/Dropzone.d.ts +150 -0
  445. package/dist/v2/components/Dropzone.d.ts.map +1 -0
  446. package/dist/v2/components/Dropzone.js +547 -0
  447. package/dist/v2/components/Dropzone.js.map +1 -0
  448. package/dist/v2/components/EmptyState.d.ts +36 -0
  449. package/dist/v2/components/EmptyState.d.ts.map +1 -0
  450. package/dist/v2/components/EmptyState.js +112 -0
  451. package/dist/v2/components/EmptyState.js.map +1 -0
  452. package/dist/v2/components/FavoriteToggle.d.ts +22 -0
  453. package/dist/v2/components/FavoriteToggle.d.ts.map +1 -0
  454. package/dist/v2/components/FavoriteToggle.js +135 -0
  455. package/dist/v2/components/FavoriteToggle.js.map +1 -0
  456. package/dist/v2/components/Field.d.ts +63 -0
  457. package/dist/v2/components/Field.d.ts.map +1 -0
  458. package/dist/v2/components/Field.js +204 -0
  459. package/dist/v2/components/Field.js.map +1 -0
  460. package/dist/v2/components/FieldError.d.ts +78 -0
  461. package/dist/v2/components/FieldError.d.ts.map +1 -0
  462. package/dist/v2/components/FieldError.js +131 -0
  463. package/dist/v2/components/FieldError.js.map +1 -0
  464. package/dist/v2/components/FieldHelp.d.ts +54 -0
  465. package/dist/v2/components/FieldHelp.d.ts.map +1 -0
  466. package/dist/v2/components/FieldHelp.js +209 -0
  467. package/dist/v2/components/FieldHelp.js.map +1 -0
  468. package/dist/v2/components/FileCard.d.ts +75 -0
  469. package/dist/v2/components/FileCard.d.ts.map +1 -0
  470. package/dist/v2/components/FileCard.js +169 -0
  471. package/dist/v2/components/FileCard.js.map +1 -0
  472. package/dist/v2/components/FilterTab.d.ts +35 -0
  473. package/dist/v2/components/FilterTab.d.ts.map +1 -0
  474. package/dist/v2/components/FilterTab.js +145 -0
  475. package/dist/v2/components/FilterTab.js.map +1 -0
  476. package/dist/v2/components/ForbiddenPage.d.ts +40 -0
  477. package/dist/v2/components/ForbiddenPage.d.ts.map +1 -0
  478. package/dist/v2/components/ForbiddenPage.js +81 -0
  479. package/dist/v2/components/ForbiddenPage.js.map +1 -0
  480. package/dist/v2/components/FormGrid.d.ts +81 -0
  481. package/dist/v2/components/FormGrid.d.ts.map +1 -0
  482. package/dist/v2/components/FormGrid.js +187 -0
  483. package/dist/v2/components/FormGrid.js.map +1 -0
  484. package/dist/v2/components/FormikDisplay.d.ts +38 -0
  485. package/dist/v2/components/FormikDisplay.d.ts.map +1 -0
  486. package/dist/v2/components/FormikDisplay.js +125 -0
  487. package/dist/v2/components/FormikDisplay.js.map +1 -0
  488. package/dist/v2/components/Input.d.ts +62 -0
  489. package/dist/v2/components/Input.d.ts.map +1 -0
  490. package/dist/v2/components/Input.js +115 -0
  491. package/dist/v2/components/Input.js.map +1 -0
  492. package/dist/v2/components/KPICard.d.ts +52 -0
  493. package/dist/v2/components/KPICard.d.ts.map +1 -0
  494. package/dist/v2/components/KPICard.js +244 -0
  495. package/dist/v2/components/KPICard.js.map +1 -0
  496. package/dist/v2/components/KPIStrip.d.ts +68 -0
  497. package/dist/v2/components/KPIStrip.d.ts.map +1 -0
  498. package/dist/v2/components/KPIStrip.js +92 -0
  499. package/dist/v2/components/KPIStrip.js.map +1 -0
  500. package/dist/v2/components/KV.d.ts +25 -0
  501. package/dist/v2/components/KV.d.ts.map +1 -0
  502. package/dist/v2/components/KV.js +82 -0
  503. package/dist/v2/components/KV.js.map +1 -0
  504. package/dist/v2/components/KVGrid.d.ts +44 -0
  505. package/dist/v2/components/KVGrid.d.ts.map +1 -0
  506. package/dist/v2/components/KVGrid.js +80 -0
  507. package/dist/v2/components/KVGrid.js.map +1 -0
  508. package/dist/v2/components/Layout.d.ts +78 -0
  509. package/dist/v2/components/Layout.d.ts.map +1 -0
  510. package/dist/v2/components/Layout.js +284 -0
  511. package/dist/v2/components/Layout.js.map +1 -0
  512. package/dist/v2/components/MobileRowCard.d.ts +63 -0
  513. package/dist/v2/components/MobileRowCard.d.ts.map +1 -0
  514. package/dist/v2/components/MobileRowCard.js +321 -0
  515. package/dist/v2/components/MobileRowCard.js.map +1 -0
  516. package/dist/v2/components/Modal.d.ts +21 -0
  517. package/dist/v2/components/Modal.d.ts.map +1 -0
  518. package/dist/v2/components/Modal.js +281 -0
  519. package/dist/v2/components/Modal.js.map +1 -0
  520. package/dist/v2/components/NetworkErrorPage.d.ts +11 -0
  521. package/dist/v2/components/NetworkErrorPage.d.ts.map +1 -0
  522. package/dist/v2/components/NetworkErrorPage.js +86 -0
  523. package/dist/v2/components/NetworkErrorPage.js.map +1 -0
  524. package/dist/v2/components/NotFoundPage.d.ts +9 -0
  525. package/dist/v2/components/NotFoundPage.d.ts.map +1 -0
  526. package/dist/v2/components/NotFoundPage.js +66 -0
  527. package/dist/v2/components/NotFoundPage.js.map +1 -0
  528. package/dist/v2/components/NumberInput.d.ts +83 -0
  529. package/dist/v2/components/NumberInput.d.ts.map +1 -0
  530. package/dist/v2/components/NumberInput.js +317 -0
  531. package/dist/v2/components/NumberInput.js.map +1 -0
  532. package/dist/v2/components/OverflowMenu.d.ts +55 -0
  533. package/dist/v2/components/OverflowMenu.d.ts.map +1 -0
  534. package/dist/v2/components/OverflowMenu.js +192 -0
  535. package/dist/v2/components/OverflowMenu.js.map +1 -0
  536. package/dist/v2/components/PdfViewer.d.ts +56 -0
  537. package/dist/v2/components/PdfViewer.d.ts.map +1 -0
  538. package/dist/v2/components/PdfViewer.js +132 -0
  539. package/dist/v2/components/PdfViewer.js.map +1 -0
  540. package/dist/v2/components/ProgressBar.d.ts +53 -0
  541. package/dist/v2/components/ProgressBar.d.ts.map +1 -0
  542. package/dist/v2/components/ProgressBar.js +209 -0
  543. package/dist/v2/components/ProgressBar.js.map +1 -0
  544. package/dist/v2/components/Radio.d.ts +78 -0
  545. package/dist/v2/components/Radio.d.ts.map +1 -0
  546. package/dist/v2/components/Radio.js +238 -0
  547. package/dist/v2/components/Radio.js.map +1 -0
  548. package/dist/v2/components/SectionErrorBoundary.d.ts +89 -0
  549. package/dist/v2/components/SectionErrorBoundary.d.ts.map +1 -0
  550. package/dist/v2/components/SectionErrorBoundary.js +221 -0
  551. package/dist/v2/components/SectionErrorBoundary.js.map +1 -0
  552. package/dist/v2/components/SectionHeader.d.ts +53 -0
  553. package/dist/v2/components/SectionHeader.d.ts.map +1 -0
  554. package/dist/v2/components/SectionHeader.js +140 -0
  555. package/dist/v2/components/SectionHeader.js.map +1 -0
  556. package/dist/v2/components/Segmented.d.ts +61 -0
  557. package/dist/v2/components/Segmented.d.ts.map +1 -0
  558. package/dist/v2/components/Segmented.js +261 -0
  559. package/dist/v2/components/Segmented.js.map +1 -0
  560. package/dist/v2/components/Select.d.ts +90 -0
  561. package/dist/v2/components/Select.d.ts.map +1 -0
  562. package/dist/v2/components/Select.js +499 -0
  563. package/dist/v2/components/Select.js.map +1 -0
  564. package/dist/v2/components/ServerErrorPage.d.ts +11 -0
  565. package/dist/v2/components/ServerErrorPage.d.ts.map +1 -0
  566. package/dist/v2/components/ServerErrorPage.js +82 -0
  567. package/dist/v2/components/ServerErrorPage.js.map +1 -0
  568. package/dist/v2/components/Skeleton.d.ts +56 -0
  569. package/dist/v2/components/Skeleton.d.ts.map +1 -0
  570. package/dist/v2/components/Skeleton.js +281 -0
  571. package/dist/v2/components/Skeleton.js.map +1 -0
  572. package/dist/v2/components/SkipLink.d.ts +30 -0
  573. package/dist/v2/components/SkipLink.d.ts.map +1 -0
  574. package/dist/v2/components/SkipLink.js +58 -0
  575. package/dist/v2/components/SkipLink.js.map +1 -0
  576. package/dist/v2/components/Spinner.d.ts +40 -0
  577. package/dist/v2/components/Spinner.d.ts.map +1 -0
  578. package/dist/v2/components/Spinner.js +76 -0
  579. package/dist/v2/components/Spinner.js.map +1 -0
  580. package/dist/v2/components/Status.d.ts +42 -0
  581. package/dist/v2/components/Status.d.ts.map +1 -0
  582. package/dist/v2/components/Status.js +71 -0
  583. package/dist/v2/components/Status.js.map +1 -0
  584. package/dist/v2/components/Stepper.d.ts +142 -0
  585. package/dist/v2/components/Stepper.d.ts.map +1 -0
  586. package/dist/v2/components/Stepper.js +441 -0
  587. package/dist/v2/components/Stepper.js.map +1 -0
  588. package/dist/v2/components/Surface.d.ts +94 -0
  589. package/dist/v2/components/Surface.d.ts.map +1 -0
  590. package/dist/v2/components/Surface.js +163 -0
  591. package/dist/v2/components/Surface.js.map +1 -0
  592. package/dist/v2/components/Switch.d.ts +30 -0
  593. package/dist/v2/components/Switch.d.ts.map +1 -0
  594. package/dist/v2/components/Switch.js +136 -0
  595. package/dist/v2/components/Switch.js.map +1 -0
  596. package/dist/v2/components/Tabs.d.ts +49 -0
  597. package/dist/v2/components/Tabs.d.ts.map +1 -0
  598. package/dist/v2/components/Tabs.js +160 -0
  599. package/dist/v2/components/Tabs.js.map +1 -0
  600. package/dist/v2/components/TelInput.d.ts +33 -0
  601. package/dist/v2/components/TelInput.d.ts.map +1 -0
  602. package/dist/v2/components/TelInput.js +282 -0
  603. package/dist/v2/components/TelInput.js.map +1 -0
  604. package/dist/v2/components/Textarea.d.ts +23 -0
  605. package/dist/v2/components/Textarea.d.ts.map +1 -0
  606. package/dist/v2/components/Textarea.js +80 -0
  607. package/dist/v2/components/Textarea.js.map +1 -0
  608. package/dist/v2/components/TimePicker.d.ts +21 -0
  609. package/dist/v2/components/TimePicker.d.ts.map +1 -0
  610. package/dist/v2/components/TimePicker.js +141 -0
  611. package/dist/v2/components/TimePicker.js.map +1 -0
  612. package/dist/v2/components/Toast.d.ts +32 -0
  613. package/dist/v2/components/Toast.d.ts.map +1 -0
  614. package/dist/v2/components/Toast.js +385 -0
  615. package/dist/v2/components/Toast.js.map +1 -0
  616. package/dist/v2/components/Tooltip.d.ts +9 -0
  617. package/dist/v2/components/Tooltip.d.ts.map +1 -0
  618. package/dist/v2/components/Tooltip.js +169 -0
  619. package/dist/v2/components/Tooltip.js.map +1 -0
  620. package/dist/v2/components/_ErrorPageBody.d.ts +48 -0
  621. package/dist/v2/components/_ErrorPageBody.d.ts.map +1 -0
  622. package/dist/v2/components/_ErrorPageBody.js +96 -0
  623. package/dist/v2/components/_ErrorPageBody.js.map +1 -0
  624. package/dist/v2/components/_pickerShared.d.ts +47 -0
  625. package/dist/v2/components/_pickerShared.d.ts.map +1 -0
  626. package/dist/v2/components/_pickerShared.js +68 -0
  627. package/dist/v2/components/_pickerShared.js.map +1 -0
  628. package/dist/v2/components/index.d.ts +226 -0
  629. package/dist/v2/components/index.d.ts.map +1 -0
  630. package/dist/v2/components/index.js +512 -0
  631. package/dist/v2/components/index.js.map +1 -0
  632. package/dist/v2/hooks/index.d.ts +11 -0
  633. package/dist/v2/hooks/index.d.ts.map +1 -0
  634. package/dist/v2/hooks/index.js +85 -0
  635. package/dist/v2/hooks/index.js.map +1 -0
  636. package/dist/v2/hooks/useDelayedFlag.d.ts +22 -0
  637. package/dist/v2/hooks/useDelayedFlag.d.ts.map +1 -0
  638. package/dist/v2/hooks/useDelayedFlag.js +60 -0
  639. package/dist/v2/hooks/useDelayedFlag.js.map +1 -0
  640. package/dist/v2/hooks/useDensity.d.ts +23 -0
  641. package/dist/v2/hooks/useDensity.d.ts.map +1 -0
  642. package/dist/v2/hooks/useDensity.js +124 -0
  643. package/dist/v2/hooks/useDensity.js.map +1 -0
  644. package/dist/v2/hooks/useFocusFirstError.d.ts +121 -0
  645. package/dist/v2/hooks/useFocusFirstError.d.ts.map +1 -0
  646. package/dist/v2/hooks/useFocusFirstError.js +203 -0
  647. package/dist/v2/hooks/useFocusFirstError.js.map +1 -0
  648. package/dist/v2/hooks/useFocusTrap.d.ts +3 -0
  649. package/dist/v2/hooks/useFocusTrap.d.ts.map +1 -0
  650. package/dist/v2/hooks/useFocusTrap.js +207 -0
  651. package/dist/v2/hooks/useFocusTrap.js.map +1 -0
  652. package/dist/v2/hooks/useFormAutoSave.d.ts +42 -0
  653. package/dist/v2/hooks/useFormAutoSave.d.ts.map +1 -0
  654. package/dist/v2/hooks/useFormAutoSave.js +186 -0
  655. package/dist/v2/hooks/useFormAutoSave.js.map +1 -0
  656. package/dist/v2/hooks/useFormCompletionProgress.d.ts +52 -0
  657. package/dist/v2/hooks/useFormCompletionProgress.d.ts.map +1 -0
  658. package/dist/v2/hooks/useFormCompletionProgress.js +136 -0
  659. package/dist/v2/hooks/useFormCompletionProgress.js.map +1 -0
  660. package/dist/v2/hooks/useResolvedDensity.d.ts +31 -0
  661. package/dist/v2/hooks/useResolvedDensity.d.ts.map +1 -0
  662. package/dist/v2/hooks/useResolvedDensity.js +50 -0
  663. package/dist/v2/hooks/useResolvedDensity.js.map +1 -0
  664. package/dist/v2/hooks/useSortedRows.d.ts +25 -0
  665. package/dist/v2/hooks/useSortedRows.d.ts.map +1 -0
  666. package/dist/v2/hooks/useSortedRows.js +38 -0
  667. package/dist/v2/hooks/useSortedRows.js.map +1 -0
  668. package/dist/v2/hooks/useTabLoading.d.ts +39 -0
  669. package/dist/v2/hooks/useTabLoading.d.ts.map +1 -0
  670. package/dist/v2/hooks/useTabLoading.js +85 -0
  671. package/dist/v2/hooks/useTabLoading.js.map +1 -0
  672. package/dist/v2/index.d.ts +115 -0
  673. package/dist/v2/index.d.ts.map +1 -0
  674. package/dist/v2/index.js +1127 -0
  675. package/dist/v2/index.js.map +1 -0
  676. package/dist/v2/modalContext.d.ts +96 -0
  677. package/dist/v2/modalContext.d.ts.map +1 -0
  678. package/dist/v2/modalContext.js +113 -0
  679. package/dist/v2/modalContext.js.map +1 -0
  680. package/dist/v2/models/favorite.d.ts +14 -0
  681. package/dist/v2/models/favorite.d.ts.map +1 -0
  682. package/dist/v2/models/favorite.js +6 -0
  683. package/dist/v2/models/favorite.js.map +1 -0
  684. package/dist/v2/models/index.d.ts +11 -0
  685. package/dist/v2/models/index.d.ts.map +1 -0
  686. package/dist/v2/models/index.js +50 -0
  687. package/dist/v2/models/index.js.map +1 -0
  688. package/dist/v2/models/personalization.d.ts +65 -0
  689. package/dist/v2/models/personalization.d.ts.map +1 -0
  690. package/dist/v2/models/personalization.js +6 -0
  691. package/dist/v2/models/personalization.js.map +1 -0
  692. package/dist/v2/models/referentiel.d.ts +67 -0
  693. package/dist/v2/models/referentiel.d.ts.map +1 -0
  694. package/dist/v2/models/referentiel.js +6 -0
  695. package/dist/v2/models/referentiel.js.map +1 -0
  696. package/dist/v2/models/savedFilter.d.ts +22 -0
  697. package/dist/v2/models/savedFilter.d.ts.map +1 -0
  698. package/dist/v2/models/savedFilter.js +6 -0
  699. package/dist/v2/models/savedFilter.js.map +1 -0
  700. package/dist/v2/patterns/ActionBar.d.ts +137 -0
  701. package/dist/v2/patterns/ActionBar.d.ts.map +1 -0
  702. package/dist/v2/patterns/ActionBar.js +602 -0
  703. package/dist/v2/patterns/ActionBar.js.map +1 -0
  704. package/dist/v2/patterns/BulkActionBar.d.ts +63 -0
  705. package/dist/v2/patterns/BulkActionBar.d.ts.map +1 -0
  706. package/dist/v2/patterns/BulkActionBar.js +154 -0
  707. package/dist/v2/patterns/BulkActionBar.js.map +1 -0
  708. package/dist/v2/patterns/CollapsibleDataGrid.d.ts +62 -0
  709. package/dist/v2/patterns/CollapsibleDataGrid.d.ts.map +1 -0
  710. package/dist/v2/patterns/CollapsibleDataGrid.js +306 -0
  711. package/dist/v2/patterns/CollapsibleDataGrid.js.map +1 -0
  712. package/dist/v2/patterns/ColumnsToggle.d.ts +55 -0
  713. package/dist/v2/patterns/ColumnsToggle.d.ts.map +1 -0
  714. package/dist/v2/patterns/ColumnsToggle.js +310 -0
  715. package/dist/v2/patterns/ColumnsToggle.js.map +1 -0
  716. package/dist/v2/patterns/DataGrid.d.ts +7 -0
  717. package/dist/v2/patterns/DataGrid.d.ts.map +1 -0
  718. package/dist/v2/patterns/DataGrid.js +834 -0
  719. package/dist/v2/patterns/DataGrid.js.map +1 -0
  720. package/dist/v2/patterns/DataGridSettingsMenu.d.ts +68 -0
  721. package/dist/v2/patterns/DataGridSettingsMenu.d.ts.map +1 -0
  722. package/dist/v2/patterns/DataGridSettingsMenu.js +382 -0
  723. package/dist/v2/patterns/DataGridSettingsMenu.js.map +1 -0
  724. package/dist/v2/patterns/DataGridToolbar.d.ts +81 -0
  725. package/dist/v2/patterns/DataGridToolbar.d.ts.map +1 -0
  726. package/dist/v2/patterns/DataGridToolbar.js +256 -0
  727. package/dist/v2/patterns/DataGridToolbar.js.map +1 -0
  728. package/dist/v2/patterns/DataGridVirtualized.d.ts +76 -0
  729. package/dist/v2/patterns/DataGridVirtualized.d.ts.map +1 -0
  730. package/dist/v2/patterns/DataGridVirtualized.js +528 -0
  731. package/dist/v2/patterns/DataGridVirtualized.js.map +1 -0
  732. package/dist/v2/patterns/DeleteResourceConfirmDialog.d.ts +46 -0
  733. package/dist/v2/patterns/DeleteResourceConfirmDialog.d.ts.map +1 -0
  734. package/dist/v2/patterns/DeleteResourceConfirmDialog.js +77 -0
  735. package/dist/v2/patterns/DeleteResourceConfirmDialog.js.map +1 -0
  736. package/dist/v2/patterns/FavoriteColumn.d.ts +72 -0
  737. package/dist/v2/patterns/FavoriteColumn.d.ts.map +1 -0
  738. package/dist/v2/patterns/FavoriteColumn.js +171 -0
  739. package/dist/v2/patterns/FavoriteColumn.js.map +1 -0
  740. package/dist/v2/patterns/FavoritesFilter.d.ts +51 -0
  741. package/dist/v2/patterns/FavoritesFilter.d.ts.map +1 -0
  742. package/dist/v2/patterns/FavoritesFilter.js +98 -0
  743. package/dist/v2/patterns/FavoritesFilter.js.map +1 -0
  744. package/dist/v2/patterns/FormErrorSummary.d.ts +39 -0
  745. package/dist/v2/patterns/FormErrorSummary.d.ts.map +1 -0
  746. package/dist/v2/patterns/FormErrorSummary.js +111 -0
  747. package/dist/v2/patterns/FormErrorSummary.js.map +1 -0
  748. package/dist/v2/patterns/FormPageShell.d.ts +55 -0
  749. package/dist/v2/patterns/FormPageShell.d.ts.map +1 -0
  750. package/dist/v2/patterns/FormPageShell.js +133 -0
  751. package/dist/v2/patterns/FormPageShell.js.map +1 -0
  752. package/dist/v2/patterns/FormSection.d.ts +64 -0
  753. package/dist/v2/patterns/FormSection.d.ts.map +1 -0
  754. package/dist/v2/patterns/FormSection.js +197 -0
  755. package/dist/v2/patterns/FormSection.js.map +1 -0
  756. package/dist/v2/patterns/FormikCheckboxGroup.d.ts +51 -0
  757. package/dist/v2/patterns/FormikCheckboxGroup.d.ts.map +1 -0
  758. package/dist/v2/patterns/FormikCheckboxGroup.js +117 -0
  759. package/dist/v2/patterns/FormikCheckboxGroup.js.map +1 -0
  760. package/dist/v2/patterns/FormikCombobox.d.ts +43 -0
  761. package/dist/v2/patterns/FormikCombobox.d.ts.map +1 -0
  762. package/dist/v2/patterns/FormikCombobox.js +121 -0
  763. package/dist/v2/patterns/FormikCombobox.js.map +1 -0
  764. package/dist/v2/patterns/FormikDatePicker.d.ts +115 -0
  765. package/dist/v2/patterns/FormikDatePicker.d.ts.map +1 -0
  766. package/dist/v2/patterns/FormikDatePicker.js +203 -0
  767. package/dist/v2/patterns/FormikDatePicker.js.map +1 -0
  768. package/dist/v2/patterns/FormikErrorFocus.d.ts +59 -0
  769. package/dist/v2/patterns/FormikErrorFocus.d.ts.map +1 -0
  770. package/dist/v2/patterns/FormikErrorFocus.js +83 -0
  771. package/dist/v2/patterns/FormikErrorFocus.js.map +1 -0
  772. package/dist/v2/patterns/FormikFile.d.ts +43 -0
  773. package/dist/v2/patterns/FormikFile.d.ts.map +1 -0
  774. package/dist/v2/patterns/FormikFile.js +156 -0
  775. package/dist/v2/patterns/FormikFile.js.map +1 -0
  776. package/dist/v2/patterns/FormikInput.d.ts +72 -0
  777. package/dist/v2/patterns/FormikInput.d.ts.map +1 -0
  778. package/dist/v2/patterns/FormikInput.js +135 -0
  779. package/dist/v2/patterns/FormikInput.js.map +1 -0
  780. package/dist/v2/patterns/FormikReferentielField.d.ts +33 -0
  781. package/dist/v2/patterns/FormikReferentielField.d.ts.map +1 -0
  782. package/dist/v2/patterns/FormikReferentielField.js +124 -0
  783. package/dist/v2/patterns/FormikReferentielField.js.map +1 -0
  784. package/dist/v2/patterns/FormikSelect.d.ts +61 -0
  785. package/dist/v2/patterns/FormikSelect.d.ts.map +1 -0
  786. package/dist/v2/patterns/FormikSelect.js +165 -0
  787. package/dist/v2/patterns/FormikSelect.js.map +1 -0
  788. package/dist/v2/patterns/FormikTextarea.d.ts +31 -0
  789. package/dist/v2/patterns/FormikTextarea.d.ts.map +1 -0
  790. package/dist/v2/patterns/FormikTextarea.js +84 -0
  791. package/dist/v2/patterns/FormikTextarea.js.map +1 -0
  792. package/dist/v2/patterns/KeyboardShortcutsHelp.d.ts +44 -0
  793. package/dist/v2/patterns/KeyboardShortcutsHelp.d.ts.map +1 -0
  794. package/dist/v2/patterns/KeyboardShortcutsHelp.js +203 -0
  795. package/dist/v2/patterns/KeyboardShortcutsHelp.js.map +1 -0
  796. package/dist/v2/patterns/NetworkErrorBanner.d.ts +26 -0
  797. package/dist/v2/patterns/NetworkErrorBanner.d.ts.map +1 -0
  798. package/dist/v2/patterns/NetworkErrorBanner.js +82 -0
  799. package/dist/v2/patterns/NetworkErrorBanner.js.map +1 -0
  800. package/dist/v2/patterns/PageContent.d.ts +40 -0
  801. package/dist/v2/patterns/PageContent.d.ts.map +1 -0
  802. package/dist/v2/patterns/PageContent.js +69 -0
  803. package/dist/v2/patterns/PageContent.js.map +1 -0
  804. package/dist/v2/patterns/ReferentielField.d.ts +118 -0
  805. package/dist/v2/patterns/ReferentielField.d.ts.map +1 -0
  806. package/dist/v2/patterns/ReferentielField.js +618 -0
  807. package/dist/v2/patterns/ReferentielField.js.map +1 -0
  808. package/dist/v2/patterns/SaveFilterDialog.d.ts +68 -0
  809. package/dist/v2/patterns/SaveFilterDialog.d.ts.map +1 -0
  810. package/dist/v2/patterns/SaveFilterDialog.js +204 -0
  811. package/dist/v2/patterns/SaveFilterDialog.js.map +1 -0
  812. package/dist/v2/patterns/SavedFiltersMenu.d.ts +74 -0
  813. package/dist/v2/patterns/SavedFiltersMenu.d.ts.map +1 -0
  814. package/dist/v2/patterns/SavedFiltersMenu.js +413 -0
  815. package/dist/v2/patterns/SavedFiltersMenu.js.map +1 -0
  816. package/dist/v2/patterns/SkeletonPageShell.d.ts +76 -0
  817. package/dist/v2/patterns/SkeletonPageShell.d.ts.map +1 -0
  818. package/dist/v2/patterns/SkeletonPageShell.js +347 -0
  819. package/dist/v2/patterns/SkeletonPageShell.js.map +1 -0
  820. package/dist/v2/patterns/SortableHeader.d.ts +47 -0
  821. package/dist/v2/patterns/SortableHeader.d.ts.map +1 -0
  822. package/dist/v2/patterns/SortableHeader.js +193 -0
  823. package/dist/v2/patterns/SortableHeader.js.map +1 -0
  824. package/dist/v2/patterns/Tour.d.ts +55 -0
  825. package/dist/v2/patterns/Tour.d.ts.map +1 -0
  826. package/dist/v2/patterns/Tour.js +474 -0
  827. package/dist/v2/patterns/Tour.js.map +1 -0
  828. package/dist/v2/patterns/_dataGridShared.d.ts +144 -0
  829. package/dist/v2/patterns/_dataGridShared.d.ts.map +1 -0
  830. package/dist/v2/patterns/_dataGridShared.js +440 -0
  831. package/dist/v2/patterns/_dataGridShared.js.map +1 -0
  832. package/dist/v2/patterns/_sort.d.ts +22 -0
  833. package/dist/v2/patterns/_sort.d.ts.map +1 -0
  834. package/dist/v2/patterns/_sort.js +118 -0
  835. package/dist/v2/patterns/_sort.js.map +1 -0
  836. package/dist/v2/patterns/_useColumnReorder.d.ts +69 -0
  837. package/dist/v2/patterns/_useColumnReorder.d.ts.map +1 -0
  838. package/dist/v2/patterns/_useColumnReorder.js +264 -0
  839. package/dist/v2/patterns/_useColumnReorder.js.map +1 -0
  840. package/dist/v2/patterns/_useColumnResize.d.ts +49 -0
  841. package/dist/v2/patterns/_useColumnResize.d.ts.map +1 -0
  842. package/dist/v2/patterns/_useColumnResize.js +198 -0
  843. package/dist/v2/patterns/_useColumnResize.js.map +1 -0
  844. package/dist/v2/patterns/index.d.ts +89 -0
  845. package/dist/v2/patterns/index.d.ts.map +1 -0
  846. package/dist/v2/patterns/index.js +246 -0
  847. package/dist/v2/patterns/index.js.map +1 -0
  848. package/dist/v2/personalization/PersonalizationProvider.d.ts +80 -0
  849. package/dist/v2/personalization/PersonalizationProvider.d.ts.map +1 -0
  850. package/dist/v2/personalization/PersonalizationProvider.js +177 -0
  851. package/dist/v2/personalization/PersonalizationProvider.js.map +1 -0
  852. package/dist/v2/personalization/adapters/_storageKey.d.ts +35 -0
  853. package/dist/v2/personalization/adapters/_storageKey.d.ts.map +1 -0
  854. package/dist/v2/personalization/adapters/_storageKey.js +69 -0
  855. package/dist/v2/personalization/adapters/_storageKey.js.map +1 -0
  856. package/dist/v2/personalization/adapters/createLocalStorageAdapter.d.ts +31 -0
  857. package/dist/v2/personalization/adapters/createLocalStorageAdapter.d.ts.map +1 -0
  858. package/dist/v2/personalization/adapters/createLocalStorageAdapter.js +128 -0
  859. package/dist/v2/personalization/adapters/createLocalStorageAdapter.js.map +1 -0
  860. package/dist/v2/personalization/adapters/createMemoryAdapter.d.ts +25 -0
  861. package/dist/v2/personalization/adapters/createMemoryAdapter.d.ts.map +1 -0
  862. package/dist/v2/personalization/adapters/createMemoryAdapter.js +76 -0
  863. package/dist/v2/personalization/adapters/createMemoryAdapter.js.map +1 -0
  864. package/dist/v2/personalization/adapters/index.d.ts +10 -0
  865. package/dist/v2/personalization/adapters/index.d.ts.map +1 -0
  866. package/dist/v2/personalization/adapters/index.js +21 -0
  867. package/dist/v2/personalization/adapters/index.js.map +1 -0
  868. package/dist/v2/personalization/capabilities/favorites.d.ts +53 -0
  869. package/dist/v2/personalization/capabilities/favorites.d.ts.map +1 -0
  870. package/dist/v2/personalization/capabilities/favorites.js +223 -0
  871. package/dist/v2/personalization/capabilities/favorites.js.map +1 -0
  872. package/dist/v2/personalization/capabilities/favoritesView.d.ts +58 -0
  873. package/dist/v2/personalization/capabilities/favoritesView.d.ts.map +1 -0
  874. package/dist/v2/personalization/capabilities/favoritesView.js +121 -0
  875. package/dist/v2/personalization/capabilities/favoritesView.js.map +1 -0
  876. package/dist/v2/personalization/capabilities/index.d.ts +16 -0
  877. package/dist/v2/personalization/capabilities/index.d.ts.map +1 -0
  878. package/dist/v2/personalization/capabilities/index.js +69 -0
  879. package/dist/v2/personalization/capabilities/index.js.map +1 -0
  880. package/dist/v2/personalization/capabilities/savedFilters.d.ts +61 -0
  881. package/dist/v2/personalization/capabilities/savedFilters.d.ts.map +1 -0
  882. package/dist/v2/personalization/capabilities/savedFilters.js +297 -0
  883. package/dist/v2/personalization/capabilities/savedFilters.js.map +1 -0
  884. package/dist/v2/personalization/createPersonalizationStore.d.ts +76 -0
  885. package/dist/v2/personalization/createPersonalizationStore.d.ts.map +1 -0
  886. package/dist/v2/personalization/createPersonalizationStore.js +475 -0
  887. package/dist/v2/personalization/createPersonalizationStore.js.map +1 -0
  888. package/dist/v2/personalization/index.d.ts +33 -0
  889. package/dist/v2/personalization/index.d.ts.map +1 -0
  890. package/dist/v2/personalization/index.js +111 -0
  891. package/dist/v2/personalization/index.js.map +1 -0
  892. package/dist/v2/personalization/personalizationContext.d.ts +78 -0
  893. package/dist/v2/personalization/personalizationContext.d.ts.map +1 -0
  894. package/dist/v2/personalization/personalizationContext.js +121 -0
  895. package/dist/v2/personalization/personalizationContext.js.map +1 -0
  896. package/dist/v2/personalization/schema.d.ts +60 -0
  897. package/dist/v2/personalization/schema.d.ts.map +1 -0
  898. package/dist/v2/personalization/schema.js +102 -0
  899. package/dist/v2/personalization/schema.js.map +1 -0
  900. package/dist/v2/personalization/types.d.ts +81 -0
  901. package/dist/v2/personalization/types.d.ts.map +1 -0
  902. package/dist/v2/personalization/types.js +6 -0
  903. package/dist/v2/personalization/types.js.map +1 -0
  904. package/dist/v2/referentiel/ReferentielProvider.d.ts +53 -0
  905. package/dist/v2/referentiel/ReferentielProvider.d.ts.map +1 -0
  906. package/dist/v2/referentiel/ReferentielProvider.js +94 -0
  907. package/dist/v2/referentiel/ReferentielProvider.js.map +1 -0
  908. package/dist/v2/referentiel/index.d.ts +18 -0
  909. package/dist/v2/referentiel/index.d.ts.map +1 -0
  910. package/dist/v2/referentiel/index.js +44 -0
  911. package/dist/v2/referentiel/index.js.map +1 -0
  912. package/dist/v2/referentiel/useReferentielClient.d.ts +15 -0
  913. package/dist/v2/referentiel/useReferentielClient.d.ts.map +1 -0
  914. package/dist/v2/referentiel/useReferentielClient.js +46 -0
  915. package/dist/v2/referentiel/useReferentielClient.js.map +1 -0
  916. package/dist/v2/referentiel/useReferentielOptions.d.ts +40 -0
  917. package/dist/v2/referentiel/useReferentielOptions.d.ts.map +1 -0
  918. package/dist/v2/referentiel/useReferentielOptions.js +177 -0
  919. package/dist/v2/referentiel/useReferentielOptions.js.map +1 -0
  920. package/dist/v2/referentiel/useReferentielSearch.d.ts +76 -0
  921. package/dist/v2/referentiel/useReferentielSearch.d.ts.map +1 -0
  922. package/dist/v2/referentiel/useReferentielSearch.js +140 -0
  923. package/dist/v2/referentiel/useReferentielSearch.js.map +1 -0
  924. package/dist/v2/styles/base.css +425 -0
  925. package/dist/v2/styles/css.d.ts +10 -0
  926. package/dist/v2/styles/index.d.ts +12 -0
  927. package/dist/v2/styles/index.d.ts.map +1 -0
  928. package/dist/v2/styles/index.js +4 -0
  929. package/dist/v2/styles/index.js.map +1 -0
  930. package/dist/v2/theme/_brand.d.ts +29 -0
  931. package/dist/v2/theme/_brand.d.ts.map +1 -0
  932. package/dist/v2/theme/_brand.js +69 -0
  933. package/dist/v2/theme/_brand.js.map +1 -0
  934. package/dist/v2/theme/_brandSecondary.d.ts +26 -0
  935. package/dist/v2/theme/_brandSecondary.d.ts.map +1 -0
  936. package/dist/v2/theme/_brandSecondary.js +65 -0
  937. package/dist/v2/theme/_brandSecondary.js.map +1 -0
  938. package/dist/v2/theme/createPortnetTheme.d.ts +75 -0
  939. package/dist/v2/theme/createPortnetTheme.d.ts.map +1 -0
  940. package/dist/v2/theme/createPortnetTheme.js +553 -0
  941. package/dist/v2/theme/createPortnetTheme.js.map +1 -0
  942. package/dist/v2/theme/cssVariables.d.ts +41 -0
  943. package/dist/v2/theme/cssVariables.d.ts.map +1 -0
  944. package/dist/v2/theme/cssVariables.js +205 -0
  945. package/dist/v2/theme/cssVariables.js.map +1 -0
  946. package/dist/v2/theme/index.d.ts +33 -0
  947. package/dist/v2/theme/index.d.ts.map +1 -0
  948. package/dist/v2/theme/index.js +60 -0
  949. package/dist/v2/theme/index.js.map +1 -0
  950. package/dist/v2/tokens/breakpoints.d.ts +74 -0
  951. package/dist/v2/tokens/breakpoints.d.ts.map +1 -0
  952. package/dist/v2/tokens/breakpoints.js +114 -0
  953. package/dist/v2/tokens/breakpoints.js.map +1 -0
  954. package/dist/v2/tokens/colors.d.ts +228 -0
  955. package/dist/v2/tokens/colors.d.ts.map +1 -0
  956. package/dist/v2/tokens/colors.js +225 -0
  957. package/dist/v2/tokens/colors.js.map +1 -0
  958. package/dist/v2/tokens/density.d.ts +142 -0
  959. package/dist/v2/tokens/density.d.ts.map +1 -0
  960. package/dist/v2/tokens/density.js +111 -0
  961. package/dist/v2/tokens/density.js.map +1 -0
  962. package/dist/v2/tokens/index.d.ts +556 -0
  963. package/dist/v2/tokens/index.d.ts.map +1 -0
  964. package/dist/v2/tokens/index.js +313 -0
  965. package/dist/v2/tokens/index.js.map +1 -0
  966. package/dist/v2/tokens/motion.d.ts +85 -0
  967. package/dist/v2/tokens/motion.d.ts.map +1 -0
  968. package/dist/v2/tokens/motion.js +94 -0
  969. package/dist/v2/tokens/motion.js.map +1 -0
  970. package/dist/v2/tokens/radius.d.ts +18 -0
  971. package/dist/v2/tokens/radius.d.ts.map +1 -0
  972. package/dist/v2/tokens/radius.js +28 -0
  973. package/dist/v2/tokens/radius.js.map +1 -0
  974. package/dist/v2/tokens/shadows.d.ts +25 -0
  975. package/dist/v2/tokens/shadows.d.ts.map +1 -0
  976. package/dist/v2/tokens/shadows.js +46 -0
  977. package/dist/v2/tokens/shadows.js.map +1 -0
  978. package/dist/v2/tokens/spacing.d.ts +38 -0
  979. package/dist/v2/tokens/spacing.d.ts.map +1 -0
  980. package/dist/v2/tokens/spacing.js +57 -0
  981. package/dist/v2/tokens/spacing.js.map +1 -0
  982. package/dist/v2/tokens/state.d.ts +40 -0
  983. package/dist/v2/tokens/state.d.ts.map +1 -0
  984. package/dist/v2/tokens/state.js +47 -0
  985. package/dist/v2/tokens/state.js.map +1 -0
  986. package/dist/v2/tokens/statusPalette.d.ts +54 -0
  987. package/dist/v2/tokens/statusPalette.d.ts.map +1 -0
  988. package/dist/v2/tokens/statusPalette.js +72 -0
  989. package/dist/v2/tokens/statusPalette.js.map +1 -0
  990. package/dist/v2/tokens/tokens.json +153 -0
  991. package/dist/v2/tokens/typography.d.ts +206 -0
  992. package/dist/v2/tokens/typography.d.ts.map +1 -0
  993. package/dist/v2/tokens/typography.js +155 -0
  994. package/dist/v2/tokens/typography.js.map +1 -0
  995. package/dist/v2/tokens/zIndex.d.ts +33 -0
  996. package/dist/v2/tokens/zIndex.d.ts.map +1 -0
  997. package/dist/v2/tokens/zIndex.js +50 -0
  998. package/dist/v2/tokens/zIndex.js.map +1 -0
  999. package/dist/v2/types/common.d.ts +24 -0
  1000. package/dist/v2/types/common.d.ts.map +1 -0
  1001. package/dist/v2/types/common.js +6 -0
  1002. package/dist/v2/types/common.js.map +1 -0
  1003. package/dist/v2/types/datagrid.d.ts +131 -0
  1004. package/dist/v2/types/datagrid.d.ts.map +1 -0
  1005. package/dist/v2/types/datagrid.js +6 -0
  1006. package/dist/v2/types/datagrid.js.map +1 -0
  1007. package/dist/v2/types/index.d.ts +11 -0
  1008. package/dist/v2/types/index.d.ts.map +1 -0
  1009. package/dist/v2/types/index.js +28 -0
  1010. package/dist/v2/types/index.js.map +1 -0
  1011. package/dist/v2/utils/apiError.d.ts +151 -0
  1012. package/dist/v2/utils/apiError.d.ts.map +1 -0
  1013. package/dist/v2/utils/apiError.js +290 -0
  1014. package/dist/v2/utils/apiError.js.map +1 -0
  1015. package/dist/v2/utils/contrast.d.ts +68 -0
  1016. package/dist/v2/utils/contrast.d.ts.map +1 -0
  1017. package/dist/v2/utils/contrast.js +167 -0
  1018. package/dist/v2/utils/contrast.js.map +1 -0
  1019. package/dist/v2/utils/cx.d.ts +9 -0
  1020. package/dist/v2/utils/cx.d.ts.map +1 -0
  1021. package/dist/v2/utils/cx.js +45 -0
  1022. package/dist/v2/utils/cx.js.map +1 -0
  1023. package/dist/v2/utils/fileDownload.d.ts +94 -0
  1024. package/dist/v2/utils/fileDownload.d.ts.map +1 -0
  1025. package/dist/v2/utils/fileDownload.js +236 -0
  1026. package/dist/v2/utils/fileDownload.js.map +1 -0
  1027. package/dist/v2/utils/fmtMoney.d.ts +28 -0
  1028. package/dist/v2/utils/fmtMoney.d.ts.map +1 -0
  1029. package/dist/v2/utils/fmtMoney.js +84 -0
  1030. package/dist/v2/utils/fmtMoney.js.map +1 -0
  1031. package/dist/v2/utils/index.d.ts +9 -0
  1032. package/dist/v2/utils/index.d.ts.map +1 -0
  1033. package/dist/v2/utils/index.js +97 -0
  1034. package/dist/v2/utils/index.js.map +1 -0
  1035. package/dist/v2/utils/mergeLabels.d.ts +59 -0
  1036. package/dist/v2/utils/mergeLabels.d.ts.map +1 -0
  1037. package/dist/v2/utils/mergeLabels.js +93 -0
  1038. package/dist/v2/utils/mergeLabels.js.map +1 -0
  1039. package/dist/v2/utils/networkStatus.d.ts +88 -0
  1040. package/dist/v2/utils/networkStatus.d.ts.map +1 -0
  1041. package/dist/v2/utils/networkStatus.js +121 -0
  1042. package/dist/v2/utils/networkStatus.js.map +1 -0
  1043. package/package.json +198 -76
  1044. package/dist/api/guideApi.js +0 -12
  1045. package/dist/api/guideImageService.js +0 -119
  1046. package/dist/api/reclamationApi.js +0 -119
  1047. package/dist/assets/guides/FAQ.json +0 -118
  1048. package/dist/assets/guides/index.js +0 -11
  1049. package/dist/assets/images/tijariaLogo.ico +0 -0
  1050. package/dist/components/buttons/PuiButton.js +0 -217
  1051. package/dist/components/buttons/PuiIconButton.js +0 -98
  1052. package/dist/components/common/PuiAlertContext.js +0 -12
  1053. package/dist/components/common/PuiHelpWidgetContext.js +0 -17
  1054. package/dist/components/common/StyledMuiButton.js +0 -48
  1055. package/dist/components/common/StyledMuiTextField.js +0 -180
  1056. package/dist/components/inputs/PuiAutocomplete.js +0 -352
  1057. package/dist/components/inputs/PuiCheckbox.js +0 -308
  1058. package/dist/components/inputs/PuiCheckboxGroup.js +0 -215
  1059. package/dist/components/inputs/PuiCheckboxItem.js +0 -162
  1060. package/dist/components/inputs/PuiDateField.js +0 -280
  1061. package/dist/components/inputs/PuiDateTimeField.js +0 -276
  1062. package/dist/components/inputs/PuiFileField.js +0 -265
  1063. package/dist/components/inputs/PuiRadioGroup.js +0 -197
  1064. package/dist/components/inputs/PuiRadioItem.js +0 -100
  1065. package/dist/components/inputs/PuiSelect.js +0 -427
  1066. package/dist/components/inputs/PuiTextField.js +0 -263
  1067. package/dist/components/others/PuiBadge.js +0 -58
  1068. package/dist/components/others/PuiChip.js +0 -150
  1069. package/dist/components/others/PuiDialog.js +0 -102
  1070. package/dist/components/others/PuiFormikForm.js +0 -70
  1071. package/dist/components/others/PuiGrid.js +0 -23
  1072. package/dist/components/others/PuiIcon.js +0 -92
  1073. package/dist/components/others/PuiLoadingBackdrop.js +0 -32
  1074. package/dist/components/others/PuiMainContainer.js +0 -41
  1075. package/dist/components/others/PuiNavigation.js +0 -68
  1076. package/dist/components/others/PuiSection.js +0 -187
  1077. package/dist/components/others/PuiTooltip.js +0 -86
  1078. package/dist/components/providers/PuiAlertProvider.js +0 -134
  1079. package/dist/components/providers/PuiHelpWidgetProvider.js +0 -91
  1080. package/dist/components/providers/PuiLocalizationProvider.js +0 -34
  1081. package/dist/components/referentiel/common/ReferetielContext.js +0 -12
  1082. package/dist/components/referentiel/common/constants/specificReferentielsApis.js +0 -22
  1083. package/dist/components/referentiel/common/constants/specificReferentielsBaseColumns.js +0 -691
  1084. package/dist/components/referentiel/common/constants/specificReferentielsBaseFilters.js +0 -598
  1085. package/dist/components/referentiel/common/constants/specificReferentielsInitialValues.js +0 -80
  1086. package/dist/components/referentiel/common/constants/specificReferentielsKeys.js +0 -18
  1087. package/dist/components/referentiel/common/constants/specificReferentielsTitles.js +0 -22
  1088. package/dist/components/referentiel/common/constants/specificReferentielsValidationSchemas.js +0 -85
  1089. package/dist/components/referentiel/components/PuiBasePopupReferentielField.js +0 -356
  1090. package/dist/components/referentiel/components/PuiCustomPopupReferentielField.js +0 -181
  1091. package/dist/components/referentiel/components/PuiSimplePopupReferentielField.js +0 -325
  1092. package/dist/components/referentiel/components/PuiSimpleReferentielField.js +0 -203
  1093. package/dist/components/referentiel/components/PuiSpecificReferentielField.js +0 -352
  1094. package/dist/components/referentiel/providers/PuiReferentielProvider.js +0 -66
  1095. package/dist/components/tab/PuiTab.js +0 -25
  1096. package/dist/components/tab/PuiTabs.js +0 -148
  1097. package/dist/components/table/PuiTable.js +0 -643
  1098. package/dist/components/table/PuiTableAction.js +0 -75
  1099. package/dist/components/typography/PuiDefinition.js +0 -42
  1100. package/dist/components/typography/PuiIndication.js +0 -80
  1101. package/dist/components/typography/PuiMainTitle.js +0 -144
  1102. package/dist/components/ui/dialogs/PuiSearchDialog.js +0 -106
  1103. package/dist/components/ui/pages/errors/PuiErrorBasePage.js +0 -73
  1104. package/dist/components/ui/pages/errors/PuiForbiddenErrorPage.js +0 -36
  1105. package/dist/components/ui/pages/errors/PuiNetworkErrorPage.js +0 -36
  1106. package/dist/components/ui/pages/errors/PuiNotFoundErrorPage.js +0 -30
  1107. package/dist/components/ui/pages/errors/PuiServerErrorPage.js +0 -37
  1108. package/dist/components/ui/pages/general/PuiDefaultPage.js +0 -68
  1109. package/dist/components/ui/pages/general/PuiSearchPage.js +0 -203
  1110. package/dist/components/widgets/GuideImage.js +0 -251
  1111. package/dist/components/widgets/PuiHelpWidget.js +0 -4276
  1112. package/dist/config/apperance.js +0 -26
  1113. package/dist/config/mapping.js +0 -26
  1114. package/dist/config/referentiel.js +0 -10
  1115. package/dist/general/yupValidationErrors.js +0 -8
  1116. package/dist/hooks/useAlert.js +0 -19
  1117. package/dist/hooks/useAxios.js +0 -23
  1118. package/dist/hooks/useQuery.js +0 -21
  1119. package/dist/hooks/useReclamation.js +0 -116
  1120. package/dist/styles/ReclamationFormModal.css +0 -629
  1121. package/dist/styles/help-widget.css +0 -621
@@ -0,0 +1 @@
1
+ {"version":3,"file":"datagrid.js","names":[],"sources":["../../../src/lib/v2/types/datagrid.ts"],"sourcesContent":["/**\r\n * @portnet/ui v2 — DataGrid generic contract.\r\n *\r\n * Derived verbatim from the DataGrid / SortableHeader / _dataGridShared\r\n * PropTypes + implementation (the executable contract). MUI-independent:\r\n * component-level composition with MUI prop types happens in the component\r\n * itself (Part 2), not here.\r\n */\r\n\r\nimport type { Dispatch, ReactNode, SetStateAction } from \"react\";\r\nimport type { Alignment, Breakpoint, Density, RowId, SortDescriptor } from \"./common\";\r\n\r\n/** A DataGrid column definition over row type `T`. */\r\nexport interface DataGridColumn<T> {\r\n /** Unique column key; also the default value accessor (`row[key]`). */\r\n key: string;\r\n /** Header content. */\r\n header: ReactNode;\r\n align?: Alignment | undefined;\r\n /** Right-align + tabular numerals. */\r\n numeric?: boolean | undefined;\r\n /** Monospaced cell font + tabular numerals. */\r\n mono?: boolean | undefined;\r\n /** Default true when `onSortChange` is set; `false` opts the column out of sorting. */\r\n sortable?: boolean | undefined;\r\n /** Default true when the grid is `resizable`; `false` opts the column out. */\r\n resizable?: boolean | undefined;\r\n /** Default true when the grid is `reorderable`; `false` opts the column out. */\r\n reorderable?: boolean | undefined;\r\n /** Reveal the cell only on row hover / focus-within / coarse pointer. */\r\n hoverOnly?: boolean | undefined;\r\n /** Column may be toggled by a column-visibility UI. */\r\n toggleable?: boolean | undefined;\r\n /** Preferred width (px number or CSS length). */\r\n width?: number | string | undefined;\r\n /** Hard max width (px number or CSS length). */\r\n maxWidth?: number | string | undefined;\r\n /** Wrap long content instead of truncating with an ellipsis. */\r\n wrap?: boolean | undefined;\r\n /** Custom cell renderer; overrides `getValue` / `row[key]`. */\r\n render?: ((row: T) => ReactNode) | undefined;\r\n /** Custom value accessor used when `render` is absent (default `row[key]`). */\r\n getValue?: ((row: T) => unknown) | undefined;\r\n}\r\n\r\n/** Pagination model for DataGrid (`page` is 1-based). */\r\nexport interface DataGridPagination {\r\n page: number;\r\n pageSize: number;\r\n total: number;\r\n onPageChange: (page: number) => void;\r\n onPageSizeChange?: ((pageSize: number) => void) | undefined;\r\n pageSizes?: number[] | undefined;\r\n}\r\n\r\n/** i18n labels for the DataGrid pagination bar. */\r\nexport interface DataGridPaginationLabels {\r\n loading?: ReactNode | undefined;\r\n rowsPerPage?: ReactNode | undefined;\r\n firstPage?: string | undefined;\r\n previousPage?: string | undefined;\r\n nextPage?: string | undefined;\r\n lastPage?: string | undefined;\r\n /** Accessible name for the pagination navigation landmark (WCAG landmark / 2.4.1). */\r\n navLabel?: string | undefined;\r\n /** Range summary; `fmt` is the resolved locale number formatter. */\r\n rangeOf?: ((from: number, to: number, total: number, fmt: (n: number) => string) => ReactNode) | undefined;\r\n}\r\n\r\n/** i18n labels for DataGrid. */\r\nexport interface DataGridLabels {\r\n tableAria?: string | undefined;\r\n selectAll?: string | undefined;\r\n selectRow?: ((id: RowId) => string) | undefined;\r\n actionsHeader?: string | undefined;\r\n pagination?: DataGridPaginationLabels | undefined;\r\n}\r\n\r\n/** Context object passed to `renderMobileCard`. */\r\nexport interface DataGridMobileCardContext {\r\n isActive: boolean;\r\n isSelected: boolean;\r\n}\r\n\r\n/** Options accepted by the exported `applySort` helper. */\r\nexport interface ApplySortOptions {\r\n /** BCP-47 locale for collation (default \"fr-FR\"). */\r\n locale?: string | undefined;\r\n}\r\n\r\n/** Props for the DataGrid pattern over row type `T`. */\r\nexport interface DataGridProps<T> {\r\n rows?: T[] | undefined;\r\n columns: DataGridColumn<T>[];\r\n loading?: boolean | undefined;\r\n /** Any truthy value switches the grid to its error branch (renders `errorState`). */\r\n error?: unknown;\r\n sort?: SortDescriptor[] | undefined;\r\n /**\r\n * Sort-state setter. DataGrid forwards this straight to SortableHeader,\r\n * which invokes it with an UPDATER function — so it must behave like a\r\n * `useState` dispatcher (accepts a value OR a `(prev) => next` updater).\r\n */\r\n onSortChange?: Dispatch<SetStateAction<SortDescriptor[]>> | undefined;\r\n selection?: Set<RowId> | RowId[] | undefined;\r\n /** Receives the next selection as a `Set`. Presence enables the checkbox column. */\r\n onSelectionChange?: ((selection: Set<RowId>) => void) | undefined;\r\n pagination?: DataGridPagination | undefined;\r\n emptyState?: ReactNode | undefined;\r\n filteredEmptyState?: ReactNode | undefined;\r\n errorState?: ReactNode | undefined;\r\n /** Row identity (default `(row) => row.id`). */\r\n getRowId?: ((row: T) => RowId) | undefined;\r\n onRowClick?: ((row: T) => void) | undefined;\r\n rowFlashId?: RowId | undefined;\r\n activeRowId?: RowId | undefined;\r\n /** Renders the per-row actions overlay. Presence enables the actions column. */\r\n rowActions?: ((row: T) => ReactNode) | undefined;\r\n hiddenColumns?: Set<string> | string[] | undefined;\r\n /** Marks an empty result as filter-induced (renders `filteredEmptyState`). */\r\n filtered?: boolean | undefined;\r\n density?: Density | undefined;\r\n /** Contextual accessible table name (WCAG 1.3.1 / Charter R-DG). */\r\n ariaLabel?: string | undefined;\r\n /** BCP-47 locale for number formatting (default \"fr-FR\"). */\r\n locale?: string | undefined;\r\n labels?: DataGridLabels | undefined;\r\n maxBodyHeight?: number | string | undefined;\r\n resizable?: boolean | undefined;\r\n columnWidths?: Record<string, number> | undefined;\r\n onColumnWidthsChange?: ((widths: Record<string, number>) => void) | undefined;\r\n reorderable?: boolean | undefined;\r\n columnOrder?: string[] | undefined;\r\n onColumnOrderChange?: ((order: string[]) => void) | undefined;\r\n /** Opt-in mobile card renderer; below `mobileBreakpoint` the grid renders cards. */\r\n renderMobileCard?: ((row: T, ctx: DataGridMobileCardContext) => ReactNode) | undefined;\r\n mobileBreakpoint?: Breakpoint | undefined;\r\n}\r\n"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @portnet/ui v2 — Shared UI type architecture (barrel).
3
+ *
4
+ * Reusable UI/structural types. Business/domain models live under ../models.
5
+ * Topic modules are re-exported here; component-specific prop types are added
6
+ * as each component migrates (Part 2). The public typed surface is finalised
7
+ * in Batch 5 (barrels + `exports` type conditions).
8
+ */
9
+ export * from "./common";
10
+ export * from "./datagrid";
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/v2/types/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC"}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _common = require("./common");
7
+ Object.keys(_common).forEach(function (key) {
8
+ if (key === "default" || key === "__esModule") return;
9
+ if (key in exports && exports[key] === _common[key]) return;
10
+ Object.defineProperty(exports, key, {
11
+ enumerable: true,
12
+ get: function get() {
13
+ return _common[key];
14
+ }
15
+ });
16
+ });
17
+ var _datagrid = require("./datagrid");
18
+ Object.keys(_datagrid).forEach(function (key) {
19
+ if (key === "default" || key === "__esModule") return;
20
+ if (key in exports && exports[key] === _datagrid[key]) return;
21
+ Object.defineProperty(exports, key, {
22
+ enumerable: true,
23
+ get: function get() {
24
+ return _datagrid[key];
25
+ }
26
+ });
27
+ });
28
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["_common","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_datagrid"],"sources":["../../../src/lib/v2/types/index.ts"],"sourcesContent":["/**\r\n * @portnet/ui v2 — Shared UI type architecture (barrel).\r\n *\r\n * Reusable UI/structural types. Business/domain models live under ../models.\r\n * Topic modules are re-exported here; component-specific prop types are added\r\n * as each component migrates (Part 2). The public typed surface is finalised\r\n * in Batch 5 (barrels + `exports` type conditions).\r\n */\r\n\r\nexport * from \"./common\";\r\nexport * from \"./datagrid\";\r\n"],"mappings":";;;;;AASA,IAAAA,OAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,OAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,OAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAT,OAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,SAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,SAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,SAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAC,SAAA,CAAAL,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
@@ -0,0 +1,151 @@
1
+ /**
2
+ * apiError — narrow an `unknown` rejection into something displayable.
3
+ *
4
+ * ─────────────────────────────────────────────────────────────────────────────
5
+ * WHY THIS BELONGS IN THE LIBRARY (capability gap G-04)
6
+ *
7
+ * The Platform TypeScript Guidelines mandate `useUnknownInCatchVariables`, so
8
+ * `catch (e)` binds `unknown` in EVERY saga of EVERY consuming module. The same
9
+ * guidelines forbid `any` and unsafe assertions. Between those two rules sits a
10
+ * narrowing helper that the library did not provide — so each module wrote its
11
+ * own, and the observed outcome was that they wrote it the forbidden way:
12
+ *
13
+ * (error as { response?: { data?: { message?: unknown } } }).response
14
+ *
15
+ * i.e. an unchecked assertion on an `unknown`, used to work around a flag the
16
+ * platform imposes. Two modules audited (`procuration-portnet-fe`,
17
+ * `procuration-fe`) had independently reached for exactly that construct.
18
+ * A mandated strict-mode flag with no sanctioned escape hatch produces
19
+ * unsanctioned ones.
20
+ *
21
+ * Implementation notes
22
+ * --------------------
23
+ * `readPath` walks nested objects using the `in` operator, which narrows without
24
+ * an assertion, and `Reflect.get`, which returns the value as `unknown` rather
25
+ * than widening anything to `any`. No assertion appears anywhere in this file.
26
+ *
27
+ * Deliberately DUCK-TYPED rather than built on `axios.isAxiosError`. Three
28
+ * reasons: this library must not take a hard axios dependency for a string
29
+ * helper; a plain object shaped like an axios error (a hand-rolled reject, a
30
+ * test double, a non-axios transport) still resolves correctly; and the check
31
+ * stays valid across axios majors.
32
+ * ─────────────────────────────────────────────────────────────────────────────
33
+ *
34
+ * getApiErrorMessage(err) → backend message, or the default
35
+ * getApiErrorMessage(err, "Échec de l'envoi.") → custom fallback
36
+ * getApiErrorStatus(err) → 404 | undefined
37
+ *
38
+ * Envelope keys read, in order: `data.body`, `data.message`, `data.error`.
39
+ * Three keys because three PORTNET back-ends chose differently; see the
40
+ * resolution-order note on `getApiErrorMessage` before adding a fourth.
41
+ */
42
+ /**
43
+ * Default user-facing fallback. French per Charter §09 (voice, vouvoiement) and
44
+ * §09.3 (no raw technical detail — never "Erreur 422 Unprocessable Entity").
45
+ * Override per call site when a screen can say something more useful.
46
+ */
47
+ export declare const DEFAULT_API_ERROR_MESSAGE = "Une erreur est survenue. Veuillez r\u00E9essayer.";
48
+ /**
49
+ * Best available human-readable message for a rejection of unknown shape.
50
+ *
51
+ * Resolution order, first match wins:
52
+ * 1. the rejection itself, when it is a non-empty string;
53
+ * 2. `error.response.data.body` — the SAME envelope's third key;
54
+ * 3. `error.response.data.message` — the backend's own message;
55
+ * 4. `error.response.data.error` — the SAME envelope's alternate key;
56
+ * 5. `error.message` — **only when it is not a transport artefact** (G-07);
57
+ * 6. `fallback`.
58
+ *
59
+ * Step 4 closes capability gap G-08. Several PORTNET back-ends populate
60
+ * `data.error` rather than `data.message` (addpe-fe declares BOTH on its
61
+ * `ApiErrorBody` and read both at seven call sites), so a helper that stopped at
62
+ * `data.message` skipped a real business message and fell through to the generic
63
+ * fallback — which made it non-substitutable for the module-local extractors it
64
+ * exists to replace. Strictly additive: what step 4 now catches previously
65
+ * reached step 5 or 6.
66
+ *
67
+ * Step 2 closes G-08bis — the same defect, a third key. `caution-ui`'s axios
68
+ * interceptor reads `error.response.data.body ?? error.response.data.message`,
69
+ * so on that back-end a helper stopping at `message` again skipped a real
70
+ * business message. Without step 2 the helper was non-substitutable there and
71
+ * the module would have had to keep its own assertion-based extractor.
72
+ *
73
+ * WHY STEP 2 SITS BEFORE `message` AND NOT AFTER `error`.
74
+ * `caution-ui` uses `??`, which is direct evidence that a single response can
75
+ * carry both keys and that `body` is the one that back-end means. Appending
76
+ * `body` at the end of the envelope hops would therefore have SILENTLY FLIPPED
77
+ * which message its users see. Placing it first preserves that precedence, and
78
+ * is provably a no-op for every module that does not populate `body`: `readPath`
79
+ * returns `undefined` and resolution falls straight through to `message`.
80
+ *
81
+ * The one case this perturbs is a back-end that populates BOTH `body` and
82
+ * `message` while intending `message` to win. No such module exists in the
83
+ * portfolio — addpe-fe's `ApiErrorBody` declares `message` and `error`, not
84
+ * `body` — and a module in that position should say so here rather than have the
85
+ * order guessed for it.
86
+ *
87
+ * Step 5 is filtered: `"Request failed with status code 500"`, `"Network Error"`,
88
+ * timeouts and errno codes are SUPPRESSED so the caller's own French copy is
89
+ * used instead (Charter §09.3 — no raw technical detail). A message a module
90
+ * threw deliberately still passes through. Use `getApiErrorDetail` when you want
91
+ * the unfiltered string for a log.
92
+ *
93
+ * Never throws and never returns an empty string, so it is safe to render
94
+ * directly into a toast or a `Banner`.
95
+ *
96
+ * @param error The caught value. `unknown` by design.
97
+ * @param fallback Message when nothing usable is found.
98
+ */
99
+ export declare function getApiErrorMessage(error: unknown, fallback?: string): string;
100
+ /**
101
+ * Unfiltered technical detail for LOGGING — never for display.
102
+ *
103
+ * `getApiErrorMessage` deliberately suppresses transport phrasings (G-07), which
104
+ * is right for a toast and wrong for a console or an APM breadcrumb, where
105
+ * `"Request failed with status code 502"` is exactly what an operator needs. This
106
+ * is the escape hatch: it returns the raw `error.message` when there is one,
107
+ * whatever its shape.
108
+ *
109
+ * Pair them:
110
+ *
111
+ * toast(getApiErrorMessage(err, "Échec de l'envoi."), "error");
112
+ * console.error("[submit]", getApiErrorStatus(err), getApiErrorDetail(err));
113
+ */
114
+ export declare function getApiErrorDetail(error: unknown): string | undefined;
115
+ /**
116
+ * HTTP status carried by a rejection, when there is one.
117
+ *
118
+ * Resolution order, first numeric match wins:
119
+ * 1. `error.response.data.status` — a BODY-level status;
120
+ * 2. `error.response.status` — the transport status.
121
+ *
122
+ * Returns `undefined` for a network drop, a timeout, or any non-HTTP rejection —
123
+ * which is the signal callers use to distinguish "the server answered with an
124
+ * error" from "there was no answer at all" (Charter R-4.3: a status-less failure
125
+ * is a network banner, not a toast).
126
+ *
127
+ * Step 1 closes G-08ter, the status-side counterpart of the envelope-key gaps
128
+ * G-08 / G-08bis. Several PORTNET back-ends put the meaningful status in the
129
+ * BODY: caution-ui's axios interceptor reads
130
+ * `error.response.data.status ?? error.response.status` and routes on the
131
+ * result (404 -> not-found page, 500 -> server-error page, 401 -> re-login), and
132
+ * its RESPONSE interceptor does the same for success handling. A helper reading
133
+ * only the transport status was therefore not substitutable there — the module
134
+ * had to keep a hand-written `HttpErrorLike` interface and assert onto it, which
135
+ * is exactly the anti-pattern G-04 exists to end. Closing the message side
136
+ * (G-08bis) without the status side would have left that assertion in place for
137
+ * the sake of one field.
138
+ *
139
+ * Body-first ordering mirrors the module's own `??` and is provably a no-op for
140
+ * every back-end that does not populate `data.status`: `readPath` returns
141
+ * `undefined` and resolution falls through to the transport status.
142
+ *
143
+ * BOTH hops are numeric-guarded, which is a deliberate tightening over the
144
+ * module code being replaced. That code did `String(status)` on whatever it
145
+ * found, so a body carrying `status: "ERROR"` produced a `String` switch miss
146
+ * and fell to the default toast branch; here a non-numeric `data.status` is
147
+ * ignored and the real transport status is used instead. That is the more useful
148
+ * answer, and it keeps the return type honest — the signature promises a number.
149
+ */
150
+ export declare function getApiErrorStatus(error: unknown): number | undefined;
151
+ //# sourceMappingURL=apiError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apiError.d.ts","sourceRoot":"","sources":["../../../src/lib/v2/utils/apiError.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,sDACU,CAAC;AA6GjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,OAAO,EACd,QAAQ,GAAE,MAAkC,GAC3C,MAAM,CAUR;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAGpE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAMpE"}
@@ -0,0 +1,290 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.DEFAULT_API_ERROR_MESSAGE = void 0;
7
+ exports.getApiErrorDetail = getApiErrorDetail;
8
+ exports.getApiErrorMessage = getApiErrorMessage;
9
+ exports.getApiErrorStatus = getApiErrorStatus;
10
+ 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); }
11
+ 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; } } }; }
12
+ 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); }
13
+ 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; }
14
+ /**
15
+ * apiError — narrow an `unknown` rejection into something displayable.
16
+ *
17
+ * ─────────────────────────────────────────────────────────────────────────────
18
+ * WHY THIS BELONGS IN THE LIBRARY (capability gap G-04)
19
+ *
20
+ * The Platform TypeScript Guidelines mandate `useUnknownInCatchVariables`, so
21
+ * `catch (e)` binds `unknown` in EVERY saga of EVERY consuming module. The same
22
+ * guidelines forbid `any` and unsafe assertions. Between those two rules sits a
23
+ * narrowing helper that the library did not provide — so each module wrote its
24
+ * own, and the observed outcome was that they wrote it the forbidden way:
25
+ *
26
+ * (error as { response?: { data?: { message?: unknown } } }).response
27
+ *
28
+ * i.e. an unchecked assertion on an `unknown`, used to work around a flag the
29
+ * platform imposes. Two modules audited (`procuration-portnet-fe`,
30
+ * `procuration-fe`) had independently reached for exactly that construct.
31
+ * A mandated strict-mode flag with no sanctioned escape hatch produces
32
+ * unsanctioned ones.
33
+ *
34
+ * Implementation notes
35
+ * --------------------
36
+ * `readPath` walks nested objects using the `in` operator, which narrows without
37
+ * an assertion, and `Reflect.get`, which returns the value as `unknown` rather
38
+ * than widening anything to `any`. No assertion appears anywhere in this file.
39
+ *
40
+ * Deliberately DUCK-TYPED rather than built on `axios.isAxiosError`. Three
41
+ * reasons: this library must not take a hard axios dependency for a string
42
+ * helper; a plain object shaped like an axios error (a hand-rolled reject, a
43
+ * test double, a non-axios transport) still resolves correctly; and the check
44
+ * stays valid across axios majors.
45
+ * ─────────────────────────────────────────────────────────────────────────────
46
+ *
47
+ * getApiErrorMessage(err) → backend message, or the default
48
+ * getApiErrorMessage(err, "Échec de l'envoi.") → custom fallback
49
+ * getApiErrorStatus(err) → 404 | undefined
50
+ *
51
+ * Envelope keys read, in order: `data.body`, `data.message`, `data.error`.
52
+ * Three keys because three PORTNET back-ends chose differently; see the
53
+ * resolution-order note on `getApiErrorMessage` before adding a fourth.
54
+ */
55
+
56
+ /**
57
+ * Default user-facing fallback. French per Charter §09 (voice, vouvoiement) and
58
+ * §09.3 (no raw technical detail — never "Erreur 422 Unprocessable Entity").
59
+ * Override per call site when a screen can say something more useful.
60
+ */
61
+ var DEFAULT_API_ERROR_MESSAGE = exports.DEFAULT_API_ERROR_MESSAGE = "Une erreur est survenue. Veuillez réessayer.";
62
+
63
+ /**
64
+ * Walk `path` through nested non-null objects, returning the value at the end,
65
+ * or `undefined` if any hop is missing. Assertion-free.
66
+ */
67
+ var readPath = function readPath(source, path) {
68
+ var current = source;
69
+ var _iterator = _createForOfIteratorHelper(path),
70
+ _step;
71
+ try {
72
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
73
+ var key = _step.value;
74
+ if (_typeof(current) !== "object" || current === null || !(key in current)) {
75
+ return undefined;
76
+ }
77
+ current = Reflect.get(current, key);
78
+ }
79
+ } catch (err) {
80
+ _iterator.e(err);
81
+ } finally {
82
+ _iterator.f();
83
+ }
84
+ return current;
85
+ };
86
+ var asNonEmptyString = function asNonEmptyString(value) {
87
+ return typeof value === "string" && value.length > 0 ? value : undefined;
88
+ };
89
+
90
+ /**
91
+ * Transport-layer phrasings that must NEVER reach a user — capability gap G-07.
92
+ *
93
+ * ──────────────────────────────────────────────────────────────────────
94
+ * THE DEFECT THIS FIXES
95
+ *
96
+ * `getApiErrorMessage` resolved `error.message` BEFORE its fallback. An
97
+ * `AxiosError` always has `.message`, so on any server error carrying no
98
+ * `response.data.message` — a 500 with an empty body, a gateway error, a
99
+ * timeout — step 3 won and the user was shown:
100
+ *
101
+ * "Request failed with status code 500"
102
+ *
103
+ * English, technical, and precisely the shape Charter §09.3 names as forbidden
104
+ * ("✗ « Erreur 422 — Unprocessable Entity »"). Worse, it made every consuming
105
+ * module's carefully-written French fallback effectively UNREACHABLE — the
106
+ * argument was accepted and then almost never used. Found during the
107
+ * `procuration-portnet-fe` Area 10 audit, where 12 call sites pass a considered
108
+ * fallback that could essentially never render.
109
+ *
110
+ * WHY A DENY-LIST AND NOT SIMPLY DROPPING STEP 3
111
+ *
112
+ * Step 3 also carries LEGITIMATE messages: any `throw new Error("Ce titre ne
113
+ * peut pas être supprimé car il est en cours de validation.")` in module code
114
+ * arrives through exactly the same path. Removing the hop would trade a leak of
115
+ * technical strings for the loss of real business messages across the whole
116
+ * platform — a worse outcome. So the hop stays and only transport phrasings are
117
+ * suppressed.
118
+ *
119
+ * The list is deliberately CONSERVATIVE: anything not recognised passes through,
120
+ * on the assumption a human wrote it. A false negative shows one ugly string; a
121
+ * false positive silently replaces a real business message with a generic
122
+ * fallback, which is the more damaging error.
123
+ *
124
+ * Sourced from axios's own message construction (`settle`, `AxiosError` codes
125
+ * ECONNABORTED / ETIMEDOUT / ERR_NETWORK / ERR_CANCELED) plus the Node socket
126
+ * phrasing that surfaces through SSR and test doubles.
127
+ * ──────────────────────────────────────────────────────────────────────
128
+ */
129
+ var TRANSPORT_MESSAGE_PATTERNS = [/^request failed with status code \d+$/i, /^network error$/i, /^timeout of \d+ms exceeded$/i, /^timeout exceeded$/i, /^request aborted$/i, /^canceled$/i, /^unsupported protocol/i, /^maximum content size exceeded$/i, /^socket hang up$/i,
130
+ /* ── errno codes and axios error codes ── CASE-SENSITIVE, DELIBERATELY ─────
131
+ *
132
+ * These two are the only patterns here NOT marked `/i`, and the asymmetry is
133
+ * load-bearing. errno constants are uppercase by universal convention
134
+ * (`ETIMEDOUT`, `ECONNREFUSED`, `ENOTFOUND`, `EPIPE`), so an uppercase-only
135
+ * match identifies them precisely. Matching case-insensitively would make
136
+ * `/^e[a-z]+$/i` swallow ordinary French words beginning with "e" — "erreur",
137
+ * "expiré", "échec" — turning a real business message into a generic fallback,
138
+ * which is the more damaging failure this list is tuned against.
139
+ *
140
+ * ⚠ An earlier version of the first pattern was `/^ec[a-z]+$/i`, which matched
141
+ * `ECONNREFUSED` (it begins "EC") but silently MISSED `ETIMEDOUT` ("ET"),
142
+ * despite the comment claiming otherwise. The unit test caught it. Do not
143
+ * narrow the prefix again: the family is "E + uppercase word", not "EC...".
144
+ *
145
+ * Residual, accepted: an all-caps single word like "ERREUR" is treated as an
146
+ * errno code. A module should not be throwing all-caps single-word messages at
147
+ * users, and replacing one with a proper French fallback is an improvement. */
148
+ /^E[A-Z]{3,}$/,
149
+ // errno: ETIMEDOUT, ECONNREFUSED, ECONNRESET, ENOTFOUND, EPIPE
150
+ /^ERR_[A-Z_]+$/ // axios: ERR_NETWORK, ERR_CANCELED, ERR_BAD_RESPONSE
151
+ ];
152
+
153
+ /** Is this string an axios/transport artefact rather than something for a user? */
154
+ var isTransportMessage = function isTransportMessage(value) {
155
+ return TRANSPORT_MESSAGE_PATTERNS.some(function (pattern) {
156
+ return pattern.test(value.trim());
157
+ });
158
+ };
159
+
160
+ /**
161
+ * `error.message`, but only when it is fit to show a user.
162
+ *
163
+ * Suppresses transport phrasings (G-07) so the caller's French fallback is
164
+ * reached instead. Module-thrown `Error` messages pass through untouched.
165
+ */
166
+ var asUserFacingMessage = function asUserFacingMessage(value) {
167
+ var text = asNonEmptyString(value);
168
+ if (text === undefined) return undefined;
169
+ return isTransportMessage(text) ? undefined : text;
170
+ };
171
+
172
+ /**
173
+ * Best available human-readable message for a rejection of unknown shape.
174
+ *
175
+ * Resolution order, first match wins:
176
+ * 1. the rejection itself, when it is a non-empty string;
177
+ * 2. `error.response.data.body` — the SAME envelope's third key;
178
+ * 3. `error.response.data.message` — the backend's own message;
179
+ * 4. `error.response.data.error` — the SAME envelope's alternate key;
180
+ * 5. `error.message` — **only when it is not a transport artefact** (G-07);
181
+ * 6. `fallback`.
182
+ *
183
+ * Step 4 closes capability gap G-08. Several PORTNET back-ends populate
184
+ * `data.error` rather than `data.message` (addpe-fe declares BOTH on its
185
+ * `ApiErrorBody` and read both at seven call sites), so a helper that stopped at
186
+ * `data.message` skipped a real business message and fell through to the generic
187
+ * fallback — which made it non-substitutable for the module-local extractors it
188
+ * exists to replace. Strictly additive: what step 4 now catches previously
189
+ * reached step 5 or 6.
190
+ *
191
+ * Step 2 closes G-08bis — the same defect, a third key. `caution-ui`'s axios
192
+ * interceptor reads `error.response.data.body ?? error.response.data.message`,
193
+ * so on that back-end a helper stopping at `message` again skipped a real
194
+ * business message. Without step 2 the helper was non-substitutable there and
195
+ * the module would have had to keep its own assertion-based extractor.
196
+ *
197
+ * WHY STEP 2 SITS BEFORE `message` AND NOT AFTER `error`.
198
+ * `caution-ui` uses `??`, which is direct evidence that a single response can
199
+ * carry both keys and that `body` is the one that back-end means. Appending
200
+ * `body` at the end of the envelope hops would therefore have SILENTLY FLIPPED
201
+ * which message its users see. Placing it first preserves that precedence, and
202
+ * is provably a no-op for every module that does not populate `body`: `readPath`
203
+ * returns `undefined` and resolution falls straight through to `message`.
204
+ *
205
+ * The one case this perturbs is a back-end that populates BOTH `body` and
206
+ * `message` while intending `message` to win. No such module exists in the
207
+ * portfolio — addpe-fe's `ApiErrorBody` declares `message` and `error`, not
208
+ * `body` — and a module in that position should say so here rather than have the
209
+ * order guessed for it.
210
+ *
211
+ * Step 5 is filtered: `"Request failed with status code 500"`, `"Network Error"`,
212
+ * timeouts and errno codes are SUPPRESSED so the caller's own French copy is
213
+ * used instead (Charter §09.3 — no raw technical detail). A message a module
214
+ * threw deliberately still passes through. Use `getApiErrorDetail` when you want
215
+ * the unfiltered string for a log.
216
+ *
217
+ * Never throws and never returns an empty string, so it is safe to render
218
+ * directly into a toast or a `Banner`.
219
+ *
220
+ * @param error The caught value. `unknown` by design.
221
+ * @param fallback Message when nothing usable is found.
222
+ */
223
+ function getApiErrorMessage(error) {
224
+ var _ref, _ref2, _ref3, _asNonEmptyString;
225
+ var fallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_API_ERROR_MESSAGE;
226
+ if (typeof error === "string" && error.length > 0) return error;
227
+ return (_ref = (_ref2 = (_ref3 = (_asNonEmptyString = asNonEmptyString(readPath(error, ["response", "data", "body"]))) !== null && _asNonEmptyString !== void 0 ? _asNonEmptyString : asNonEmptyString(readPath(error, ["response", "data", "message"]))) !== null && _ref3 !== void 0 ? _ref3 : asNonEmptyString(readPath(error, ["response", "data", "error"]))) !== null && _ref2 !== void 0 ? _ref2 : asUserFacingMessage(readPath(error, ["message"]))) !== null && _ref !== void 0 ? _ref : fallback;
228
+ }
229
+
230
+ /**
231
+ * Unfiltered technical detail for LOGGING — never for display.
232
+ *
233
+ * `getApiErrorMessage` deliberately suppresses transport phrasings (G-07), which
234
+ * is right for a toast and wrong for a console or an APM breadcrumb, where
235
+ * `"Request failed with status code 502"` is exactly what an operator needs. This
236
+ * is the escape hatch: it returns the raw `error.message` when there is one,
237
+ * whatever its shape.
238
+ *
239
+ * Pair them:
240
+ *
241
+ * toast(getApiErrorMessage(err, "Échec de l'envoi."), "error");
242
+ * console.error("[submit]", getApiErrorStatus(err), getApiErrorDetail(err));
243
+ */
244
+ function getApiErrorDetail(error) {
245
+ if (typeof error === "string" && error.length > 0) return error;
246
+ return asNonEmptyString(readPath(error, ["message"]));
247
+ }
248
+
249
+ /**
250
+ * HTTP status carried by a rejection, when there is one.
251
+ *
252
+ * Resolution order, first numeric match wins:
253
+ * 1. `error.response.data.status` — a BODY-level status;
254
+ * 2. `error.response.status` — the transport status.
255
+ *
256
+ * Returns `undefined` for a network drop, a timeout, or any non-HTTP rejection —
257
+ * which is the signal callers use to distinguish "the server answered with an
258
+ * error" from "there was no answer at all" (Charter R-4.3: a status-less failure
259
+ * is a network banner, not a toast).
260
+ *
261
+ * Step 1 closes G-08ter, the status-side counterpart of the envelope-key gaps
262
+ * G-08 / G-08bis. Several PORTNET back-ends put the meaningful status in the
263
+ * BODY: caution-ui's axios interceptor reads
264
+ * `error.response.data.status ?? error.response.status` and routes on the
265
+ * result (404 -> not-found page, 500 -> server-error page, 401 -> re-login), and
266
+ * its RESPONSE interceptor does the same for success handling. A helper reading
267
+ * only the transport status was therefore not substitutable there — the module
268
+ * had to keep a hand-written `HttpErrorLike` interface and assert onto it, which
269
+ * is exactly the anti-pattern G-04 exists to end. Closing the message side
270
+ * (G-08bis) without the status side would have left that assertion in place for
271
+ * the sake of one field.
272
+ *
273
+ * Body-first ordering mirrors the module's own `??` and is provably a no-op for
274
+ * every back-end that does not populate `data.status`: `readPath` returns
275
+ * `undefined` and resolution falls through to the transport status.
276
+ *
277
+ * BOTH hops are numeric-guarded, which is a deliberate tightening over the
278
+ * module code being replaced. That code did `String(status)` on whatever it
279
+ * found, so a body carrying `status: "ERROR"` produced a `String` switch miss
280
+ * and fell to the default toast branch; here a non-numeric `data.status` is
281
+ * ignored and the real transport status is used instead. That is the more useful
282
+ * answer, and it keeps the return type honest — the signature promises a number.
283
+ */
284
+ function getApiErrorStatus(error) {
285
+ var bodyStatus = readPath(error, ["response", "data", "status"]);
286
+ if (typeof bodyStatus === "number") return bodyStatus;
287
+ var status = readPath(error, ["response", "status"]);
288
+ return typeof status === "number" ? status : undefined;
289
+ }
290
+ //# sourceMappingURL=apiError.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apiError.js","names":["DEFAULT_API_ERROR_MESSAGE","exports","readPath","source","path","current","_iterator","_createForOfIteratorHelper","_step","s","n","done","key","value","_typeof","undefined","Reflect","get","err","e","f","asNonEmptyString","length","TRANSPORT_MESSAGE_PATTERNS","isTransportMessage","some","pattern","test","trim","asUserFacingMessage","text","getApiErrorMessage","error","_ref","_ref2","_ref3","_asNonEmptyString","fallback","arguments","getApiErrorDetail","getApiErrorStatus","bodyStatus","status"],"sources":["../../../src/lib/v2/utils/apiError.ts"],"sourcesContent":["/**\r\n * apiError — narrow an `unknown` rejection into something displayable.\r\n *\r\n * ─────────────────────────────────────────────────────────────────────────────\r\n * WHY THIS BELONGS IN THE LIBRARY (capability gap G-04)\r\n *\r\n * The Platform TypeScript Guidelines mandate `useUnknownInCatchVariables`, so\r\n * `catch (e)` binds `unknown` in EVERY saga of EVERY consuming module. The same\r\n * guidelines forbid `any` and unsafe assertions. Between those two rules sits a\r\n * narrowing helper that the library did not provide — so each module wrote its\r\n * own, and the observed outcome was that they wrote it the forbidden way:\r\n *\r\n * (error as { response?: { data?: { message?: unknown } } }).response\r\n *\r\n * i.e. an unchecked assertion on an `unknown`, used to work around a flag the\r\n * platform imposes. Two modules audited (`procuration-portnet-fe`,\r\n * `procuration-fe`) had independently reached for exactly that construct.\r\n * A mandated strict-mode flag with no sanctioned escape hatch produces\r\n * unsanctioned ones.\r\n *\r\n * Implementation notes\r\n * --------------------\r\n * `readPath` walks nested objects using the `in` operator, which narrows without\r\n * an assertion, and `Reflect.get`, which returns the value as `unknown` rather\r\n * than widening anything to `any`. No assertion appears anywhere in this file.\r\n *\r\n * Deliberately DUCK-TYPED rather than built on `axios.isAxiosError`. Three\r\n * reasons: this library must not take a hard axios dependency for a string\r\n * helper; a plain object shaped like an axios error (a hand-rolled reject, a\r\n * test double, a non-axios transport) still resolves correctly; and the check\r\n * stays valid across axios majors.\r\n * ─────────────────────────────────────────────────────────────────────────────\r\n *\r\n * getApiErrorMessage(err) → backend message, or the default\r\n * getApiErrorMessage(err, \"Échec de l'envoi.\") → custom fallback\r\n * getApiErrorStatus(err) → 404 | undefined\r\n *\r\n * Envelope keys read, in order: `data.body`, `data.message`, `data.error`.\r\n * Three keys because three PORTNET back-ends chose differently; see the\r\n * resolution-order note on `getApiErrorMessage` before adding a fourth.\r\n */\r\n\r\n/**\r\n * Default user-facing fallback. French per Charter §09 (voice, vouvoiement) and\r\n * §09.3 (no raw technical detail — never \"Erreur 422 Unprocessable Entity\").\r\n * Override per call site when a screen can say something more useful.\r\n */\r\nexport const DEFAULT_API_ERROR_MESSAGE =\r\n \"Une erreur est survenue. Veuillez réessayer.\";\r\n\r\n/**\r\n * Walk `path` through nested non-null objects, returning the value at the end,\r\n * or `undefined` if any hop is missing. Assertion-free.\r\n */\r\nconst readPath = (source: unknown, path: readonly string[]): unknown => {\r\n let current: unknown = source;\r\n\r\n for (const key of path) {\r\n if (typeof current !== \"object\" || current === null || !(key in current)) {\r\n return undefined;\r\n }\r\n current = Reflect.get(current, key);\r\n }\r\n\r\n return current;\r\n};\r\n\r\nconst asNonEmptyString = (value: unknown): string | undefined =>\r\n typeof value === \"string\" && value.length > 0 ? value : undefined;\r\n\r\n/**\r\n * Transport-layer phrasings that must NEVER reach a user — capability gap G-07.\r\n *\r\n * ──────────────────────────────────────────────────────────────────────\r\n * THE DEFECT THIS FIXES\r\n *\r\n * `getApiErrorMessage` resolved `error.message` BEFORE its fallback. An\r\n * `AxiosError` always has `.message`, so on any server error carrying no\r\n * `response.data.message` — a 500 with an empty body, a gateway error, a\r\n * timeout — step 3 won and the user was shown:\r\n *\r\n * \"Request failed with status code 500\"\r\n *\r\n * English, technical, and precisely the shape Charter §09.3 names as forbidden\r\n * (\"✗ « Erreur 422 — Unprocessable Entity »\"). Worse, it made every consuming\r\n * module's carefully-written French fallback effectively UNREACHABLE — the\r\n * argument was accepted and then almost never used. Found during the\r\n * `procuration-portnet-fe` Area 10 audit, where 12 call sites pass a considered\r\n * fallback that could essentially never render.\r\n *\r\n * WHY A DENY-LIST AND NOT SIMPLY DROPPING STEP 3\r\n *\r\n * Step 3 also carries LEGITIMATE messages: any `throw new Error(\"Ce titre ne\r\n * peut pas être supprimé car il est en cours de validation.\")` in module code\r\n * arrives through exactly the same path. Removing the hop would trade a leak of\r\n * technical strings for the loss of real business messages across the whole\r\n * platform — a worse outcome. So the hop stays and only transport phrasings are\r\n * suppressed.\r\n *\r\n * The list is deliberately CONSERVATIVE: anything not recognised passes through,\r\n * on the assumption a human wrote it. A false negative shows one ugly string; a\r\n * false positive silently replaces a real business message with a generic\r\n * fallback, which is the more damaging error.\r\n *\r\n * Sourced from axios's own message construction (`settle`, `AxiosError` codes\r\n * ECONNABORTED / ETIMEDOUT / ERR_NETWORK / ERR_CANCELED) plus the Node socket\r\n * phrasing that surfaces through SSR and test doubles.\r\n * ──────────────────────────────────────────────────────────────────────\r\n */\r\nconst TRANSPORT_MESSAGE_PATTERNS: readonly RegExp[] = [\r\n /^request failed with status code \\d+$/i,\r\n /^network error$/i,\r\n /^timeout of \\d+ms exceeded$/i,\r\n /^timeout exceeded$/i,\r\n /^request aborted$/i,\r\n /^canceled$/i,\r\n /^unsupported protocol/i,\r\n /^maximum content size exceeded$/i,\r\n /^socket hang up$/i,\r\n /* ── errno codes and axios error codes ── CASE-SENSITIVE, DELIBERATELY ─────\r\n *\r\n * These two are the only patterns here NOT marked `/i`, and the asymmetry is\r\n * load-bearing. errno constants are uppercase by universal convention\r\n * (`ETIMEDOUT`, `ECONNREFUSED`, `ENOTFOUND`, `EPIPE`), so an uppercase-only\r\n * match identifies them precisely. Matching case-insensitively would make\r\n * `/^e[a-z]+$/i` swallow ordinary French words beginning with \"e\" — \"erreur\",\r\n * \"expiré\", \"échec\" — turning a real business message into a generic fallback,\r\n * which is the more damaging failure this list is tuned against.\r\n *\r\n * ⚠ An earlier version of the first pattern was `/^ec[a-z]+$/i`, which matched\r\n * `ECONNREFUSED` (it begins \"EC\") but silently MISSED `ETIMEDOUT` (\"ET\"),\r\n * despite the comment claiming otherwise. The unit test caught it. Do not\r\n * narrow the prefix again: the family is \"E + uppercase word\", not \"EC...\".\r\n *\r\n * Residual, accepted: an all-caps single word like \"ERREUR\" is treated as an\r\n * errno code. A module should not be throwing all-caps single-word messages at\r\n * users, and replacing one with a proper French fallback is an improvement. */\r\n /^E[A-Z]{3,}$/, // errno: ETIMEDOUT, ECONNREFUSED, ECONNRESET, ENOTFOUND, EPIPE\r\n /^ERR_[A-Z_]+$/, // axios: ERR_NETWORK, ERR_CANCELED, ERR_BAD_RESPONSE\r\n];\r\n\r\n/** Is this string an axios/transport artefact rather than something for a user? */\r\nconst isTransportMessage = (value: string): boolean =>\r\n TRANSPORT_MESSAGE_PATTERNS.some((pattern) => pattern.test(value.trim()));\r\n\r\n/**\r\n * `error.message`, but only when it is fit to show a user.\r\n *\r\n * Suppresses transport phrasings (G-07) so the caller's French fallback is\r\n * reached instead. Module-thrown `Error` messages pass through untouched.\r\n */\r\nconst asUserFacingMessage = (value: unknown): string | undefined => {\r\n const text = asNonEmptyString(value);\r\n if (text === undefined) return undefined;\r\n return isTransportMessage(text) ? undefined : text;\r\n};\r\n\r\n/**\r\n * Best available human-readable message for a rejection of unknown shape.\r\n *\r\n * Resolution order, first match wins:\r\n * 1. the rejection itself, when it is a non-empty string;\r\n * 2. `error.response.data.body` — the SAME envelope's third key;\r\n * 3. `error.response.data.message` — the backend's own message;\r\n * 4. `error.response.data.error` — the SAME envelope's alternate key;\r\n * 5. `error.message` — **only when it is not a transport artefact** (G-07);\r\n * 6. `fallback`.\r\n *\r\n * Step 4 closes capability gap G-08. Several PORTNET back-ends populate\r\n * `data.error` rather than `data.message` (addpe-fe declares BOTH on its\r\n * `ApiErrorBody` and read both at seven call sites), so a helper that stopped at\r\n * `data.message` skipped a real business message and fell through to the generic\r\n * fallback — which made it non-substitutable for the module-local extractors it\r\n * exists to replace. Strictly additive: what step 4 now catches previously\r\n * reached step 5 or 6.\r\n *\r\n * Step 2 closes G-08bis — the same defect, a third key. `caution-ui`'s axios\r\n * interceptor reads `error.response.data.body ?? error.response.data.message`,\r\n * so on that back-end a helper stopping at `message` again skipped a real\r\n * business message. Without step 2 the helper was non-substitutable there and\r\n * the module would have had to keep its own assertion-based extractor.\r\n *\r\n * WHY STEP 2 SITS BEFORE `message` AND NOT AFTER `error`.\r\n * `caution-ui` uses `??`, which is direct evidence that a single response can\r\n * carry both keys and that `body` is the one that back-end means. Appending\r\n * `body` at the end of the envelope hops would therefore have SILENTLY FLIPPED\r\n * which message its users see. Placing it first preserves that precedence, and\r\n * is provably a no-op for every module that does not populate `body`: `readPath`\r\n * returns `undefined` and resolution falls straight through to `message`.\r\n *\r\n * The one case this perturbs is a back-end that populates BOTH `body` and\r\n * `message` while intending `message` to win. No such module exists in the\r\n * portfolio — addpe-fe's `ApiErrorBody` declares `message` and `error`, not\r\n * `body` — and a module in that position should say so here rather than have the\r\n * order guessed for it.\r\n *\r\n * Step 5 is filtered: `\"Request failed with status code 500\"`, `\"Network Error\"`,\r\n * timeouts and errno codes are SUPPRESSED so the caller's own French copy is\r\n * used instead (Charter §09.3 — no raw technical detail). A message a module\r\n * threw deliberately still passes through. Use `getApiErrorDetail` when you want\r\n * the unfiltered string for a log.\r\n *\r\n * Never throws and never returns an empty string, so it is safe to render\r\n * directly into a toast or a `Banner`.\r\n *\r\n * @param error The caught value. `unknown` by design.\r\n * @param fallback Message when nothing usable is found.\r\n */\r\nexport function getApiErrorMessage(\r\n error: unknown,\r\n fallback: string = DEFAULT_API_ERROR_MESSAGE\r\n): string {\r\n if (typeof error === \"string\" && error.length > 0) return error;\r\n\r\n return (\r\n asNonEmptyString(readPath(error, [\"response\", \"data\", \"body\"])) ??\r\n asNonEmptyString(readPath(error, [\"response\", \"data\", \"message\"])) ??\r\n asNonEmptyString(readPath(error, [\"response\", \"data\", \"error\"])) ??\r\n asUserFacingMessage(readPath(error, [\"message\"])) ??\r\n fallback\r\n );\r\n}\r\n\r\n/**\r\n * Unfiltered technical detail for LOGGING — never for display.\r\n *\r\n * `getApiErrorMessage` deliberately suppresses transport phrasings (G-07), which\r\n * is right for a toast and wrong for a console or an APM breadcrumb, where\r\n * `\"Request failed with status code 502\"` is exactly what an operator needs. This\r\n * is the escape hatch: it returns the raw `error.message` when there is one,\r\n * whatever its shape.\r\n *\r\n * Pair them:\r\n *\r\n * toast(getApiErrorMessage(err, \"Échec de l'envoi.\"), \"error\");\r\n * console.error(\"[submit]\", getApiErrorStatus(err), getApiErrorDetail(err));\r\n */\r\nexport function getApiErrorDetail(error: unknown): string | undefined {\r\n if (typeof error === \"string\" && error.length > 0) return error;\r\n return asNonEmptyString(readPath(error, [\"message\"]));\r\n}\r\n\r\n/**\r\n * HTTP status carried by a rejection, when there is one.\r\n *\r\n * Resolution order, first numeric match wins:\r\n * 1. `error.response.data.status` — a BODY-level status;\r\n * 2. `error.response.status` — the transport status.\r\n *\r\n * Returns `undefined` for a network drop, a timeout, or any non-HTTP rejection —\r\n * which is the signal callers use to distinguish \"the server answered with an\r\n * error\" from \"there was no answer at all\" (Charter R-4.3: a status-less failure\r\n * is a network banner, not a toast).\r\n *\r\n * Step 1 closes G-08ter, the status-side counterpart of the envelope-key gaps\r\n * G-08 / G-08bis. Several PORTNET back-ends put the meaningful status in the\r\n * BODY: caution-ui's axios interceptor reads\r\n * `error.response.data.status ?? error.response.status` and routes on the\r\n * result (404 -> not-found page, 500 -> server-error page, 401 -> re-login), and\r\n * its RESPONSE interceptor does the same for success handling. A helper reading\r\n * only the transport status was therefore not substitutable there — the module\r\n * had to keep a hand-written `HttpErrorLike` interface and assert onto it, which\r\n * is exactly the anti-pattern G-04 exists to end. Closing the message side\r\n * (G-08bis) without the status side would have left that assertion in place for\r\n * the sake of one field.\r\n *\r\n * Body-first ordering mirrors the module's own `??` and is provably a no-op for\r\n * every back-end that does not populate `data.status`: `readPath` returns\r\n * `undefined` and resolution falls through to the transport status.\r\n *\r\n * BOTH hops are numeric-guarded, which is a deliberate tightening over the\r\n * module code being replaced. That code did `String(status)` on whatever it\r\n * found, so a body carrying `status: \"ERROR\"` produced a `String` switch miss\r\n * and fell to the default toast branch; here a non-numeric `data.status` is\r\n * ignored and the real transport status is used instead. That is the more useful\r\n * answer, and it keeps the return type honest — the signature promises a number.\r\n */\r\nexport function getApiErrorStatus(error: unknown): number | undefined {\r\n const bodyStatus = readPath(error, [\"response\", \"data\", \"status\"]);\r\n if (typeof bodyStatus === \"number\") return bodyStatus;\r\n\r\n const status = readPath(error, [\"response\", \"status\"]);\r\n return typeof status === \"number\" ? status : undefined;\r\n}\r\n"],"mappings":";;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACO,IAAMA,yBAAyB,GAAAC,OAAA,CAAAD,yBAAA,GACpC,8CAA8C;;AAEhD;AACA;AACA;AACA;AACA,IAAME,QAAQ,GAAG,SAAXA,QAAQA,CAAIC,MAAe,EAAEC,IAAuB,EAAc;EACtE,IAAIC,OAAgB,GAAGF,MAAM;EAAC,IAAAG,SAAA,GAAAC,0BAAA,CAEZH,IAAI;IAAAI,KAAA;EAAA;IAAtB,KAAAF,SAAA,CAAAG,CAAA,MAAAD,KAAA,GAAAF,SAAA,CAAAI,CAAA,IAAAC,IAAA,GAAwB;MAAA,IAAbC,GAAG,GAAAJ,KAAA,CAAAK,KAAA;MACZ,IAAIC,OAAA,CAAOT,OAAO,MAAK,QAAQ,IAAIA,OAAO,KAAK,IAAI,IAAI,EAAEO,GAAG,IAAIP,OAAO,CAAC,EAAE;QACxE,OAAOU,SAAS;MAClB;MACAV,OAAO,GAAGW,OAAO,CAACC,GAAG,CAACZ,OAAO,EAAEO,GAAG,CAAC;IACrC;EAAC,SAAAM,GAAA;IAAAZ,SAAA,CAAAa,CAAA,CAAAD,GAAA;EAAA;IAAAZ,SAAA,CAAAc,CAAA;EAAA;EAED,OAAOf,OAAO;AAChB,CAAC;AAED,IAAMgB,gBAAgB,GAAG,SAAnBA,gBAAgBA,CAAIR,KAAc;EAAA,OACtC,OAAOA,KAAK,KAAK,QAAQ,IAAIA,KAAK,CAACS,MAAM,GAAG,CAAC,GAAGT,KAAK,GAAGE,SAAS;AAAA;;AAEnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAMQ,0BAA6C,GAAG,CACpD,wCAAwC,EACxC,kBAAkB,EAClB,8BAA8B,EAC9B,qBAAqB,EACrB,oBAAoB,EACpB,aAAa,EACb,wBAAwB,EACxB,kCAAkC,EAClC,mBAAmB;AACnB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACE,cAAc;AAAE;AAChB,eAAe,CAAE;AAAA,CAClB;;AAED;AACA,IAAMC,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAIX,KAAa;EAAA,OACvCU,0BAA0B,CAACE,IAAI,CAAC,UAACC,OAAO;IAAA,OAAKA,OAAO,CAACC,IAAI,CAACd,KAAK,CAACe,IAAI,CAAC,CAAC,CAAC;EAAA,EAAC;AAAA;;AAE1E;AACA;AACA;AACA;AACA;AACA;AACA,IAAMC,mBAAmB,GAAG,SAAtBA,mBAAmBA,CAAIhB,KAAc,EAAyB;EAClE,IAAMiB,IAAI,GAAGT,gBAAgB,CAACR,KAAK,CAAC;EACpC,IAAIiB,IAAI,KAAKf,SAAS,EAAE,OAAOA,SAAS;EACxC,OAAOS,kBAAkB,CAACM,IAAI,CAAC,GAAGf,SAAS,GAAGe,IAAI;AACpD,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,kBAAkBA,CAChCC,KAAc,EAEN;EAAA,IAAAC,IAAA,EAAAC,KAAA,EAAAC,KAAA,EAAAC,iBAAA;EAAA,IADRC,QAAgB,GAAAC,SAAA,CAAAhB,MAAA,QAAAgB,SAAA,QAAAvB,SAAA,GAAAuB,SAAA,MAAGtC,yBAAyB;EAE5C,IAAI,OAAOgC,KAAK,KAAK,QAAQ,IAAIA,KAAK,CAACV,MAAM,GAAG,CAAC,EAAE,OAAOU,KAAK;EAE/D,QAAAC,IAAA,IAAAC,KAAA,IAAAC,KAAA,IAAAC,iBAAA,GACEf,gBAAgB,CAACnB,QAAQ,CAAC8B,KAAK,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,cAAAI,iBAAA,cAAAA,iBAAA,GAC/Df,gBAAgB,CAACnB,QAAQ,CAAC8B,KAAK,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,cAAAG,KAAA,cAAAA,KAAA,GAClEd,gBAAgB,CAACnB,QAAQ,CAAC8B,KAAK,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,cAAAE,KAAA,cAAAA,KAAA,GAChEL,mBAAmB,CAAC3B,QAAQ,CAAC8B,KAAK,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,cAAAC,IAAA,cAAAA,IAAA,GACjDI,QAAQ;AAEZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASE,iBAAiBA,CAACP,KAAc,EAAsB;EACpE,IAAI,OAAOA,KAAK,KAAK,QAAQ,IAAIA,KAAK,CAACV,MAAM,GAAG,CAAC,EAAE,OAAOU,KAAK;EAC/D,OAAOX,gBAAgB,CAACnB,QAAQ,CAAC8B,KAAK,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;AACvD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASQ,iBAAiBA,CAACR,KAAc,EAAsB;EACpE,IAAMS,UAAU,GAAGvC,QAAQ,CAAC8B,KAAK,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;EAClE,IAAI,OAAOS,UAAU,KAAK,QAAQ,EAAE,OAAOA,UAAU;EAErD,IAAMC,MAAM,GAAGxC,QAAQ,CAAC8B,KAAK,EAAE,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;EACtD,OAAO,OAAOU,MAAM,KAAK,QAAQ,GAAGA,MAAM,GAAG3B,SAAS;AACxD","ignoreList":[]}
@@ -0,0 +1,68 @@
1
+ /**
2
+ * WCAG 2.1 contrast utilities — Portnet UI v2
3
+ *
4
+ * Reference: https://www.w3.org/TR/WCAG21/#dfn-contrast-ratio
5
+ *
6
+ * Pure functions, framework-agnostic, no deps. Reusable by any
7
+ * host module that needs to validate a runtime brand override
8
+ * against WCAG 1.4.3 AA (typical scenario: a host-shell event
9
+ * injects a tenant brand and the consumer wants to dev-warn when
10
+ * the resulting accent/foreground pair drops below 4.5:1).
11
+ *
12
+ * Also used by the dark-mode work (F29) to audit dual-mode token
13
+ * pairs and by Storybook contrast stories.
14
+ */
15
+ /** Normal text contrast ratio threshold (AA). */
16
+ export declare const WCAG_AA_NORMAL = 4.5;
17
+ /** Large text (≥ 18pt or ≥ 14pt bold) contrast ratio threshold (AA). */
18
+ export declare const WCAG_AA_LARGE = 3;
19
+ /** UI components & graphical objects contrast ratio threshold (AA 1.4.11). */
20
+ export declare const WCAG_AA_UI_NON_TEXT = 3;
21
+ type RGB = {
22
+ r: number;
23
+ g: number;
24
+ b: number;
25
+ };
26
+ /**
27
+ * Parse a CSS color string into an { r, g, b } object with 0..255
28
+ * channels. Returns null for unparseable input.
29
+ *
30
+ * Supported formats:
31
+ * - "#RGB" (3-digit hex shorthand)
32
+ * - "#RRGGBB" (6-digit hex)
33
+ * - "#RRGGBBAA" (8-digit hex; alpha channel is dropped)
34
+ * - "rgb(r, g, b)"
35
+ * - "rgba(r, g, b, a)" (alpha dropped)
36
+ *
37
+ * HSL / HWB / LAB / named-colors are NOT supported — the v2 token
38
+ * surface and observed host-shell brand payloads are always hex
39
+ * or rgb(). A wider parser can be swapped in later without
40
+ * changing the public API of this function.
41
+ */
42
+ export declare function parseColor(input: unknown): RGB | null;
43
+ /**
44
+ * Compute relative luminance of an sRGB color per WCAG 2.1.
45
+ * Accepts an { r, g, b } object (channels in 0..255).
46
+ * Returns a number in 0..1, or null if input is invalid.
47
+ */
48
+ export declare function relativeLuminance(rgb: RGB | null | undefined): number | null;
49
+ /**
50
+ * WCAG contrast ratio between two colors.
51
+ *
52
+ * Accepts either CSS color strings (parsed via parseColor) or
53
+ * already-parsed { r, g, b } objects. Returns a number in
54
+ * [1.0, 21.0], or null if either input is unparseable.
55
+ */
56
+ export declare function contrastRatio(c1: string | RGB, c2: string | RGB): number | null;
57
+ /**
58
+ * Verdict helper — `passesContrast(ratio, "normal")` returns true
59
+ * if the ratio meets the requested WCAG AA threshold. Returns
60
+ * false on null ratios so callers can treat unparseable inputs as
61
+ * failures.
62
+ *
63
+ * `level` accepts "normal" | "large" | "ui". Unknown levels default
64
+ * to the strictest threshold.
65
+ */
66
+ export declare function passesContrast(ratio: number | null | undefined, level?: "normal" | "large" | "ui"): boolean;
67
+ export {};
68
+ //# sourceMappingURL=contrast.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contrast.d.ts","sourceRoot":"","sources":["../../../src/lib/v2/utils/contrast.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAIH,iDAAiD;AACjD,eAAO,MAAM,cAAc,MAAM,CAAC;AAElC,wEAAwE;AACxE,eAAO,MAAM,aAAa,IAAM,CAAC;AAEjC,8EAA8E;AAC9E,eAAO,MAAM,mBAAmB,IAAM,CAAC;AAIvC,KAAK,GAAG,GAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAE/C;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,GAAG,GAAG,IAAI,CAyCrD;AAUD;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,GAAG,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAU5E;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAC3B,EAAE,EAAE,MAAM,GAAG,GAAG,EAChB,EAAE,EAAE,MAAM,GAAG,GAAG,GACf,MAAM,GAAG,IAAI,CASf;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAChC,KAAK,GAAE,QAAQ,GAAG,OAAO,GAAG,IAAe,GAC1C,OAAO,CAgBT"}