@portnet/ui 6.0.0 → 6.0.2

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 (820) hide show
  1. package/CHANGELOG.md +85 -0
  2. package/dist/esm/index.js +214 -0
  3. package/dist/esm/index.js.map +1 -0
  4. package/dist/esm/v2/__tests__/FieldError.test.js +159 -0
  5. package/dist/esm/v2/__tests__/FieldError.test.js.map +1 -0
  6. package/dist/esm/v2/__tests__/FieldWidth.test.js +146 -0
  7. package/dist/esm/v2/__tests__/FieldWidth.test.js.map +1 -0
  8. package/dist/esm/v2/__tests__/FileCard.test.js +143 -0
  9. package/dist/esm/v2/__tests__/FileCard.test.js.map +1 -0
  10. package/dist/esm/v2/__tests__/FormikCheckbox.test.js +265 -0
  11. package/dist/esm/v2/__tests__/FormikCheckbox.test.js.map +1 -0
  12. package/dist/esm/v2/__tests__/FormikDateTimePicker.test.js +248 -0
  13. package/dist/esm/v2/__tests__/FormikDateTimePicker.test.js.map +1 -0
  14. package/dist/esm/v2/__tests__/FormikRadioGroup.test.js +380 -0
  15. package/dist/esm/v2/__tests__/FormikRadioGroup.test.js.map +1 -0
  16. package/dist/esm/v2/__tests__/MobileRowCard.test.js +332 -0
  17. package/dist/esm/v2/__tests__/MobileRowCard.test.js.map +1 -0
  18. package/dist/esm/v2/__tests__/SectionErrorBoundary.test.js +235 -0
  19. package/dist/esm/v2/__tests__/SectionErrorBoundary.test.js.map +1 -0
  20. package/dist/esm/v2/__tests__/apiError.test.js +181 -0
  21. package/dist/esm/v2/__tests__/apiError.test.js.map +1 -0
  22. package/dist/esm/v2/__tests__/banned-patterns.test.js +270 -0
  23. package/dist/esm/v2/__tests__/banned-patterns.test.js.map +1 -0
  24. package/dist/esm/v2/__tests__/contrast-palette.test.js +224 -0
  25. package/dist/esm/v2/__tests__/contrast-palette.test.js.map +1 -0
  26. package/dist/esm/v2/__tests__/cssVariables.test.js +157 -0
  27. package/dist/esm/v2/__tests__/cssVariables.test.js.map +1 -0
  28. package/dist/esm/v2/__tests__/labels-merge.test.js +146 -0
  29. package/dist/esm/v2/__tests__/labels-merge.test.js.map +1 -0
  30. package/dist/esm/v2/__tests__/locale-fallback.test.js +109 -0
  31. package/dist/esm/v2/__tests__/locale-fallback.test.js.map +1 -0
  32. package/dist/esm/v2/__tests__/useFocusTrap.test.js +514 -0
  33. package/dist/esm/v2/__tests__/useFocusTrap.test.js.map +1 -0
  34. package/dist/esm/v2/components/Accordion.js +230 -0
  35. package/dist/esm/v2/components/Accordion.js.map +1 -0
  36. package/dist/esm/v2/components/ActionStrip.js +146 -0
  37. package/dist/esm/v2/components/ActionStrip.js.map +1 -0
  38. package/dist/esm/v2/components/Banner.js +254 -0
  39. package/dist/esm/v2/components/Banner.js.map +1 -0
  40. package/dist/esm/v2/components/Busy.js +97 -0
  41. package/dist/esm/v2/components/Busy.js.map +1 -0
  42. package/dist/esm/v2/components/Button.js +114 -0
  43. package/dist/esm/v2/components/Button.js.map +1 -0
  44. package/dist/esm/v2/components/CategoryTag.js +81 -0
  45. package/dist/esm/v2/components/CategoryTag.js.map +1 -0
  46. package/dist/esm/v2/components/Checkbox.js +124 -0
  47. package/dist/esm/v2/components/Checkbox.js.map +1 -0
  48. package/dist/esm/v2/components/Chip.js +124 -0
  49. package/dist/esm/v2/components/Chip.js.map +1 -0
  50. package/dist/esm/v2/components/Combobox.js +394 -0
  51. package/dist/esm/v2/components/Combobox.js.map +1 -0
  52. package/dist/esm/v2/components/CommandPalette.js +660 -0
  53. package/dist/esm/v2/components/CommandPalette.js.map +1 -0
  54. package/dist/esm/v2/components/ConfirmDialog.js +144 -0
  55. package/dist/esm/v2/components/ConfirmDialog.js.map +1 -0
  56. package/dist/esm/v2/components/DatePicker.js +200 -0
  57. package/dist/esm/v2/components/DatePicker.js.map +1 -0
  58. package/dist/esm/v2/components/DateRangePicker.js +289 -0
  59. package/dist/esm/v2/components/DateRangePicker.js.map +1 -0
  60. package/dist/esm/v2/components/DateTimePicker.js +215 -0
  61. package/dist/esm/v2/components/DateTimePicker.js.map +1 -0
  62. package/dist/esm/v2/components/Drawer.js +333 -0
  63. package/dist/esm/v2/components/Drawer.js.map +1 -0
  64. package/dist/esm/v2/components/Dropzone.js +540 -0
  65. package/dist/esm/v2/components/Dropzone.js.map +1 -0
  66. package/dist/esm/v2/components/EmptyState.js +102 -0
  67. package/dist/esm/v2/components/EmptyState.js.map +1 -0
  68. package/dist/esm/v2/components/FavoriteToggle.js +127 -0
  69. package/dist/esm/v2/components/FavoriteToggle.js.map +1 -0
  70. package/dist/esm/v2/components/Field.js +259 -0
  71. package/dist/esm/v2/components/Field.js.map +1 -0
  72. package/dist/esm/v2/components/FieldError.js +124 -0
  73. package/dist/esm/v2/components/FieldError.js.map +1 -0
  74. package/dist/esm/v2/components/FieldHelp.js +202 -0
  75. package/dist/esm/v2/components/FieldHelp.js.map +1 -0
  76. package/dist/esm/v2/components/FileCard.js +162 -0
  77. package/dist/esm/v2/components/FileCard.js.map +1 -0
  78. package/dist/esm/v2/components/FilterTab.js +138 -0
  79. package/dist/esm/v2/components/FilterTab.js.map +1 -0
  80. package/dist/esm/v2/components/ForbiddenPage.js +74 -0
  81. package/dist/esm/v2/components/ForbiddenPage.js.map +1 -0
  82. package/dist/esm/v2/components/FormGrid.js +179 -0
  83. package/dist/esm/v2/components/FormGrid.js.map +1 -0
  84. package/dist/esm/v2/components/FormikDisplay.js +118 -0
  85. package/dist/esm/v2/components/FormikDisplay.js.map +1 -0
  86. package/dist/esm/v2/components/Input.js +107 -0
  87. package/dist/esm/v2/components/Input.js.map +1 -0
  88. package/dist/esm/v2/components/KPICard.js +237 -0
  89. package/dist/esm/v2/components/KPICard.js.map +1 -0
  90. package/dist/esm/v2/components/KPIStrip.js +84 -0
  91. package/dist/esm/v2/components/KPIStrip.js.map +1 -0
  92. package/dist/esm/v2/components/KV.js +75 -0
  93. package/dist/esm/v2/components/KV.js.map +1 -0
  94. package/dist/esm/v2/components/KVGrid.js +74 -0
  95. package/dist/esm/v2/components/KVGrid.js.map +1 -0
  96. package/dist/esm/v2/components/Layout.js +284 -0
  97. package/dist/esm/v2/components/Layout.js.map +1 -0
  98. package/dist/esm/v2/components/MobileRowCard.js +314 -0
  99. package/dist/esm/v2/components/MobileRowCard.js.map +1 -0
  100. package/dist/esm/v2/components/Modal.js +276 -0
  101. package/dist/esm/v2/components/Modal.js.map +1 -0
  102. package/dist/esm/v2/components/NetworkErrorPage.js +78 -0
  103. package/dist/esm/v2/components/NetworkErrorPage.js.map +1 -0
  104. package/dist/esm/v2/components/NotFoundPage.js +58 -0
  105. package/dist/esm/v2/components/NotFoundPage.js.map +1 -0
  106. package/dist/esm/v2/components/NumberInput.js +309 -0
  107. package/dist/esm/v2/components/NumberInput.js.map +1 -0
  108. package/dist/esm/v2/components/OverflowMenu.js +184 -0
  109. package/dist/esm/v2/components/OverflowMenu.js.map +1 -0
  110. package/dist/esm/v2/components/PdfViewer.js +122 -0
  111. package/dist/esm/v2/components/PdfViewer.js.map +1 -0
  112. package/dist/esm/v2/components/ProgressBar.js +202 -0
  113. package/dist/esm/v2/components/ProgressBar.js.map +1 -0
  114. package/dist/esm/v2/components/Radio.js +228 -0
  115. package/dist/esm/v2/components/Radio.js.map +1 -0
  116. package/dist/esm/v2/components/SectionErrorBoundary.js +214 -0
  117. package/dist/esm/v2/components/SectionErrorBoundary.js.map +1 -0
  118. package/dist/esm/v2/components/SectionHeader.js +132 -0
  119. package/dist/esm/v2/components/SectionHeader.js.map +1 -0
  120. package/dist/esm/v2/components/Segmented.js +254 -0
  121. package/dist/esm/v2/components/Segmented.js.map +1 -0
  122. package/dist/esm/v2/components/Select.js +490 -0
  123. package/dist/esm/v2/components/Select.js.map +1 -0
  124. package/dist/esm/v2/components/ServerErrorPage.js +74 -0
  125. package/dist/esm/v2/components/ServerErrorPage.js.map +1 -0
  126. package/dist/esm/v2/components/Skeleton.js +269 -0
  127. package/dist/esm/v2/components/Skeleton.js.map +1 -0
  128. package/dist/esm/v2/components/SkipLink.js +49 -0
  129. package/dist/esm/v2/components/SkipLink.js.map +1 -0
  130. package/dist/esm/v2/components/Spinner.js +69 -0
  131. package/dist/esm/v2/components/Spinner.js.map +1 -0
  132. package/dist/esm/v2/components/Status.js +64 -0
  133. package/dist/esm/v2/components/Status.js.map +1 -0
  134. package/dist/esm/v2/components/Stepper.js +432 -0
  135. package/dist/esm/v2/components/Stepper.js.map +1 -0
  136. package/dist/esm/v2/components/Surface.js +159 -0
  137. package/dist/esm/v2/components/Surface.js.map +1 -0
  138. package/dist/esm/v2/components/Switch.js +128 -0
  139. package/dist/esm/v2/components/Switch.js.map +1 -0
  140. package/dist/esm/v2/components/Tabs.js +150 -0
  141. package/dist/esm/v2/components/Tabs.js.map +1 -0
  142. package/dist/esm/v2/components/TelInput.js +274 -0
  143. package/dist/esm/v2/components/TelInput.js.map +1 -0
  144. package/dist/esm/v2/components/Textarea.js +72 -0
  145. package/dist/esm/v2/components/Textarea.js.map +1 -0
  146. package/dist/esm/v2/components/TimePicker.js +134 -0
  147. package/dist/esm/v2/components/TimePicker.js.map +1 -0
  148. package/dist/esm/v2/components/Toast.js +376 -0
  149. package/dist/esm/v2/components/Toast.js.map +1 -0
  150. package/dist/esm/v2/components/Tooltip.js +161 -0
  151. package/dist/esm/v2/components/Tooltip.js.map +1 -0
  152. package/dist/esm/v2/components/_ErrorPageBody.js +85 -0
  153. package/dist/esm/v2/components/_ErrorPageBody.js.map +1 -0
  154. package/dist/esm/v2/components/_pickerShared.js +60 -0
  155. package/dist/esm/v2/components/_pickerShared.js.map +1 -0
  156. package/dist/esm/v2/components/index.js +271 -0
  157. package/dist/esm/v2/components/index.js.map +1 -0
  158. package/dist/esm/v2/hooks/index.js +10 -0
  159. package/dist/esm/v2/hooks/index.js.map +1 -0
  160. package/dist/esm/v2/hooks/useDelayedFlag.js +55 -0
  161. package/dist/esm/v2/hooks/useDelayedFlag.js.map +1 -0
  162. package/dist/esm/v2/hooks/useDensity.js +119 -0
  163. package/dist/esm/v2/hooks/useDensity.js.map +1 -0
  164. package/dist/esm/v2/hooks/useFocusFirstError.js +197 -0
  165. package/dist/esm/v2/hooks/useFocusFirstError.js.map +1 -0
  166. package/dist/esm/v2/hooks/useFocusTrap.js +202 -0
  167. package/dist/esm/v2/hooks/useFocusTrap.js.map +1 -0
  168. package/dist/esm/v2/hooks/useFormAutoSave.js +181 -0
  169. package/dist/esm/v2/hooks/useFormAutoSave.js.map +1 -0
  170. package/dist/esm/v2/hooks/useFormCompletionProgress.js +131 -0
  171. package/dist/esm/v2/hooks/useFormCompletionProgress.js.map +1 -0
  172. package/dist/esm/v2/hooks/useResolvedDensity.js +44 -0
  173. package/dist/esm/v2/hooks/useResolvedDensity.js.map +1 -0
  174. package/dist/esm/v2/hooks/useSortedRows.js +32 -0
  175. package/dist/esm/v2/hooks/useSortedRows.js.map +1 -0
  176. package/dist/esm/v2/hooks/useTabLoading.js +79 -0
  177. package/dist/esm/v2/hooks/useTabLoading.js.map +1 -0
  178. package/dist/esm/v2/index.js +132 -0
  179. package/dist/esm/v2/index.js.map +1 -0
  180. package/dist/esm/v2/modalContext.js +108 -0
  181. package/dist/esm/v2/modalContext.js.map +1 -0
  182. package/dist/esm/v2/models/favorite.js +2 -0
  183. package/dist/esm/v2/models/favorite.js.map +1 -0
  184. package/dist/esm/v2/models/index.js +12 -0
  185. package/dist/esm/v2/models/index.js.map +1 -0
  186. package/dist/esm/v2/models/personalization.js +2 -0
  187. package/dist/esm/v2/models/personalization.js.map +1 -0
  188. package/dist/esm/v2/models/referentiel.js +2 -0
  189. package/dist/esm/v2/models/referentiel.js.map +1 -0
  190. package/dist/esm/v2/models/savedFilter.js +2 -0
  191. package/dist/esm/v2/models/savedFilter.js.map +1 -0
  192. package/dist/esm/v2/patterns/ActionBar.js +603 -0
  193. package/dist/esm/v2/patterns/ActionBar.js.map +1 -0
  194. package/dist/esm/v2/patterns/BulkActionBar.js +147 -0
  195. package/dist/esm/v2/patterns/BulkActionBar.js.map +1 -0
  196. package/dist/esm/v2/patterns/CollapsibleDataGrid.js +303 -0
  197. package/dist/esm/v2/patterns/CollapsibleDataGrid.js.map +1 -0
  198. package/dist/esm/v2/patterns/ColumnsToggle.js +301 -0
  199. package/dist/esm/v2/patterns/ColumnsToggle.js.map +1 -0
  200. package/dist/esm/v2/patterns/DataGrid.js +820 -0
  201. package/dist/esm/v2/patterns/DataGrid.js.map +1 -0
  202. package/dist/esm/v2/patterns/DataGridSettingsMenu.js +375 -0
  203. package/dist/esm/v2/patterns/DataGridSettingsMenu.js.map +1 -0
  204. package/dist/esm/v2/patterns/DataGridToolbar.js +249 -0
  205. package/dist/esm/v2/patterns/DataGridToolbar.js.map +1 -0
  206. package/dist/esm/v2/patterns/DataGridVirtualized.js +523 -0
  207. package/dist/esm/v2/patterns/DataGridVirtualized.js.map +1 -0
  208. package/dist/esm/v2/patterns/DeleteResourceConfirmDialog.js +70 -0
  209. package/dist/esm/v2/patterns/DeleteResourceConfirmDialog.js.map +1 -0
  210. package/dist/esm/v2/patterns/FavoriteColumn.js +117 -0
  211. package/dist/esm/v2/patterns/FavoriteColumn.js.map +1 -0
  212. package/dist/esm/v2/patterns/FavoritesFilter.js +91 -0
  213. package/dist/esm/v2/patterns/FavoritesFilter.js.map +1 -0
  214. package/dist/esm/v2/patterns/FormErrorSummary.js +101 -0
  215. package/dist/esm/v2/patterns/FormErrorSummary.js.map +1 -0
  216. package/dist/esm/v2/patterns/FormPageShell.js +126 -0
  217. package/dist/esm/v2/patterns/FormPageShell.js.map +1 -0
  218. package/dist/esm/v2/patterns/FormSection.js +190 -0
  219. package/dist/esm/v2/patterns/FormSection.js.map +1 -0
  220. package/dist/esm/v2/patterns/FormikCheckbox.js +140 -0
  221. package/dist/esm/v2/patterns/FormikCheckbox.js.map +1 -0
  222. package/dist/esm/v2/patterns/FormikCheckboxGroup.js +110 -0
  223. package/dist/esm/v2/patterns/FormikCheckboxGroup.js.map +1 -0
  224. package/dist/esm/v2/patterns/FormikCombobox.js +118 -0
  225. package/dist/esm/v2/patterns/FormikCombobox.js.map +1 -0
  226. package/dist/esm/v2/patterns/FormikDatePicker.js +162 -0
  227. package/dist/esm/v2/patterns/FormikDatePicker.js.map +1 -0
  228. package/dist/esm/v2/patterns/FormikDateTimePicker.js +150 -0
  229. package/dist/esm/v2/patterns/FormikDateTimePicker.js.map +1 -0
  230. package/dist/esm/v2/patterns/FormikErrorFocus.js +77 -0
  231. package/dist/esm/v2/patterns/FormikErrorFocus.js.map +1 -0
  232. package/dist/esm/v2/patterns/FormikFile.js +148 -0
  233. package/dist/esm/v2/patterns/FormikFile.js.map +1 -0
  234. package/dist/esm/v2/patterns/FormikInput.js +130 -0
  235. package/dist/esm/v2/patterns/FormikInput.js.map +1 -0
  236. package/dist/esm/v2/patterns/FormikRadioGroup.js +141 -0
  237. package/dist/esm/v2/patterns/FormikRadioGroup.js.map +1 -0
  238. package/dist/esm/v2/patterns/FormikReferentielField.js +116 -0
  239. package/dist/esm/v2/patterns/FormikReferentielField.js.map +1 -0
  240. package/dist/esm/v2/patterns/FormikSelect.js +162 -0
  241. package/dist/esm/v2/patterns/FormikSelect.js.map +1 -0
  242. package/dist/esm/v2/patterns/FormikTextarea.js +79 -0
  243. package/dist/esm/v2/patterns/FormikTextarea.js.map +1 -0
  244. package/dist/esm/v2/patterns/KeyboardShortcutsHelp.js +212 -0
  245. package/dist/esm/v2/patterns/KeyboardShortcutsHelp.js.map +1 -0
  246. package/dist/esm/v2/patterns/NetworkErrorBanner.js +72 -0
  247. package/dist/esm/v2/patterns/NetworkErrorBanner.js.map +1 -0
  248. package/dist/esm/v2/patterns/PageContent.js +62 -0
  249. package/dist/esm/v2/patterns/PageContent.js.map +1 -0
  250. package/dist/esm/v2/patterns/ReferentielField.js +615 -0
  251. package/dist/esm/v2/patterns/ReferentielField.js.map +1 -0
  252. package/dist/esm/v2/patterns/RowFavoriteToggle.js +122 -0
  253. package/dist/esm/v2/patterns/RowFavoriteToggle.js.map +1 -0
  254. package/dist/esm/v2/patterns/SaveFilterDialog.js +197 -0
  255. package/dist/esm/v2/patterns/SaveFilterDialog.js.map +1 -0
  256. package/dist/esm/v2/patterns/SavedFiltersMenu.js +406 -0
  257. package/dist/esm/v2/patterns/SavedFiltersMenu.js.map +1 -0
  258. package/dist/esm/v2/patterns/SkeletonPageShell.js +342 -0
  259. package/dist/esm/v2/patterns/SkeletonPageShell.js.map +1 -0
  260. package/dist/esm/v2/patterns/SortableHeader.js +179 -0
  261. package/dist/esm/v2/patterns/SortableHeader.js.map +1 -0
  262. package/dist/esm/v2/patterns/Tour.js +471 -0
  263. package/dist/esm/v2/patterns/Tour.js.map +1 -0
  264. package/dist/esm/v2/patterns/_dataGridShared.js +431 -0
  265. package/dist/esm/v2/patterns/_dataGridShared.js.map +1 -0
  266. package/dist/esm/v2/patterns/_pickerSerialisation.js +74 -0
  267. package/dist/esm/v2/patterns/_pickerSerialisation.js.map +1 -0
  268. package/dist/esm/v2/patterns/_sort.js +112 -0
  269. package/dist/esm/v2/patterns/_sort.js.map +1 -0
  270. package/dist/esm/v2/patterns/_useColumnReorder.js +257 -0
  271. package/dist/esm/v2/patterns/_useColumnReorder.js.map +1 -0
  272. package/dist/esm/v2/patterns/_useColumnResize.js +191 -0
  273. package/dist/esm/v2/patterns/_useColumnResize.js.map +1 -0
  274. package/dist/esm/v2/patterns/index.js +178 -0
  275. package/dist/esm/v2/patterns/index.js.map +1 -0
  276. package/dist/esm/v2/personalization/PersonalizationProvider.js +168 -0
  277. package/dist/esm/v2/personalization/PersonalizationProvider.js.map +1 -0
  278. package/dist/esm/v2/personalization/adapters/_storageKey.js +60 -0
  279. package/dist/esm/v2/personalization/adapters/_storageKey.js.map +1 -0
  280. package/dist/esm/v2/personalization/adapters/createLocalStorageAdapter.js +124 -0
  281. package/dist/esm/v2/personalization/adapters/createLocalStorageAdapter.js.map +1 -0
  282. package/dist/esm/v2/personalization/adapters/createMemoryAdapter.js +70 -0
  283. package/dist/esm/v2/personalization/adapters/createMemoryAdapter.js.map +1 -0
  284. package/dist/esm/v2/personalization/adapters/index.js +11 -0
  285. package/dist/esm/v2/personalization/adapters/index.js.map +1 -0
  286. package/dist/esm/v2/personalization/capabilities/favorites.js +216 -0
  287. package/dist/esm/v2/personalization/capabilities/favorites.js.map +1 -0
  288. package/dist/esm/v2/personalization/capabilities/favoritesView.js +111 -0
  289. package/dist/esm/v2/personalization/capabilities/favoritesView.js.map +1 -0
  290. package/dist/esm/v2/personalization/capabilities/gridPreferences.js +209 -0
  291. package/dist/esm/v2/personalization/capabilities/gridPreferences.js.map +1 -0
  292. package/dist/esm/v2/personalization/capabilities/index.js +22 -0
  293. package/dist/esm/v2/personalization/capabilities/index.js.map +1 -0
  294. package/dist/esm/v2/personalization/capabilities/savedFilters.js +291 -0
  295. package/dist/esm/v2/personalization/capabilities/savedFilters.js.map +1 -0
  296. package/dist/esm/v2/personalization/createPersonalizationStore.js +472 -0
  297. package/dist/esm/v2/personalization/createPersonalizationStore.js.map +1 -0
  298. package/dist/esm/v2/personalization/index.js +64 -0
  299. package/dist/esm/v2/personalization/index.js.map +1 -0
  300. package/dist/esm/v2/personalization/personalizationContext.js +108 -0
  301. package/dist/esm/v2/personalization/personalizationContext.js.map +1 -0
  302. package/dist/esm/v2/personalization/schema.js +92 -0
  303. package/dist/esm/v2/personalization/schema.js.map +1 -0
  304. package/dist/esm/v2/personalization/types.js +2 -0
  305. package/dist/esm/v2/personalization/types.js.map +1 -0
  306. package/dist/esm/v2/referentiel/ReferentielProvider.js +87 -0
  307. package/dist/esm/v2/referentiel/ReferentielProvider.js.map +1 -0
  308. package/dist/esm/v2/referentiel/index.js +15 -0
  309. package/dist/esm/v2/referentiel/index.js.map +1 -0
  310. package/dist/esm/v2/referentiel/useReferentielClient.js +37 -0
  311. package/dist/esm/v2/referentiel/useReferentielClient.js.map +1 -0
  312. package/dist/esm/v2/referentiel/useReferentielOptions.js +169 -0
  313. package/dist/esm/v2/referentiel/useReferentielOptions.js.map +1 -0
  314. package/dist/esm/v2/referentiel/useReferentielSearch.js +132 -0
  315. package/dist/esm/v2/referentiel/useReferentielSearch.js.map +1 -0
  316. package/dist/esm/v2/styles/base.css +425 -0
  317. package/dist/esm/v2/styles/css.d.ts +10 -0
  318. package/dist/esm/v2/styles/index.js +12 -0
  319. package/dist/esm/v2/styles/index.js.map +1 -0
  320. package/dist/esm/v2/theme/_brand.js +64 -0
  321. package/dist/esm/v2/theme/_brand.js.map +1 -0
  322. package/dist/esm/v2/theme/_brandSecondary.js +60 -0
  323. package/dist/esm/v2/theme/_brandSecondary.js.map +1 -0
  324. package/dist/esm/v2/theme/createPortnetTheme.js +548 -0
  325. package/dist/esm/v2/theme/createPortnetTheme.js.map +1 -0
  326. package/dist/esm/v2/theme/cssVariables.js +198 -0
  327. package/dist/esm/v2/theme/cssVariables.js.map +1 -0
  328. package/dist/esm/v2/theme/index.js +32 -0
  329. package/dist/esm/v2/theme/index.js.map +1 -0
  330. package/dist/esm/v2/tokens/breakpoints.js +106 -0
  331. package/dist/esm/v2/tokens/breakpoints.js.map +1 -0
  332. package/dist/esm/v2/tokens/colors.js +219 -0
  333. package/dist/esm/v2/tokens/colors.js.map +1 -0
  334. package/dist/esm/v2/tokens/density.js +98 -0
  335. package/dist/esm/v2/tokens/density.js.map +1 -0
  336. package/dist/esm/v2/tokens/index.js +80 -0
  337. package/dist/esm/v2/tokens/index.js.map +1 -0
  338. package/dist/esm/v2/tokens/motion.js +88 -0
  339. package/dist/esm/v2/tokens/motion.js.map +1 -0
  340. package/dist/esm/v2/tokens/radius.js +22 -0
  341. package/dist/esm/v2/tokens/radius.js.map +1 -0
  342. package/dist/esm/v2/tokens/shadows.js +40 -0
  343. package/dist/esm/v2/tokens/shadows.js.map +1 -0
  344. package/dist/esm/v2/tokens/spacing.js +51 -0
  345. package/dist/esm/v2/tokens/spacing.js.map +1 -0
  346. package/dist/esm/v2/tokens/state.js +41 -0
  347. package/dist/esm/v2/tokens/state.js.map +1 -0
  348. package/dist/esm/v2/tokens/statusPalette.js +66 -0
  349. package/dist/esm/v2/tokens/statusPalette.js.map +1 -0
  350. package/dist/esm/v2/tokens/tokens.json +153 -0
  351. package/dist/esm/v2/tokens/typography.js +149 -0
  352. package/dist/esm/v2/tokens/typography.js.map +1 -0
  353. package/dist/esm/v2/tokens/zIndex.js +44 -0
  354. package/dist/esm/v2/tokens/zIndex.js.map +1 -0
  355. package/dist/esm/v2/types/common.js +2 -0
  356. package/dist/esm/v2/types/common.js.map +1 -0
  357. package/dist/esm/v2/types/datagrid.js +2 -0
  358. package/dist/esm/v2/types/datagrid.js.map +1 -0
  359. package/dist/esm/v2/types/index.js +12 -0
  360. package/dist/esm/v2/types/index.js.map +1 -0
  361. package/dist/esm/v2/utils/apiError.js +281 -0
  362. package/dist/esm/v2/utils/apiError.js.map +1 -0
  363. package/dist/esm/v2/utils/contrast.js +157 -0
  364. package/dist/esm/v2/utils/contrast.js.map +1 -0
  365. package/dist/esm/v2/utils/cx.js +38 -0
  366. package/dist/esm/v2/utils/cx.js.map +1 -0
  367. package/dist/esm/v2/utils/fileDownload.js +226 -0
  368. package/dist/esm/v2/utils/fileDownload.js.map +1 -0
  369. package/dist/esm/v2/utils/fmtMoney.js +78 -0
  370. package/dist/esm/v2/utils/fmtMoney.js.map +1 -0
  371. package/dist/esm/v2/utils/index.js +43 -0
  372. package/dist/esm/v2/utils/index.js.map +1 -0
  373. package/dist/esm/v2/utils/mergeLabels.js +86 -0
  374. package/dist/esm/v2/utils/mergeLabels.js.map +1 -0
  375. package/dist/esm/v2/utils/networkStatus.js +114 -0
  376. package/dist/esm/v2/utils/networkStatus.js.map +1 -0
  377. package/dist/index.d.ts +5 -2
  378. package/dist/index.d.ts.map +1 -1
  379. package/dist/index.js +35 -0
  380. package/dist/index.js.map +1 -1
  381. package/dist/v2/__tests__/FieldError.test.js +160 -0
  382. package/dist/v2/__tests__/FieldError.test.js.map +1 -0
  383. package/dist/v2/__tests__/FieldWidth.test.js +150 -0
  384. package/dist/v2/__tests__/FieldWidth.test.js.map +1 -0
  385. package/dist/v2/__tests__/FileCard.test.js +144 -0
  386. package/dist/v2/__tests__/FileCard.test.js.map +1 -0
  387. package/dist/v2/__tests__/FormikCheckbox.test.js +268 -0
  388. package/dist/v2/__tests__/FormikCheckbox.test.js.map +1 -0
  389. package/dist/v2/__tests__/FormikDateTimePicker.test.js +247 -0
  390. package/dist/v2/__tests__/FormikDateTimePicker.test.js.map +1 -0
  391. package/dist/v2/__tests__/FormikRadioGroup.test.js +381 -0
  392. package/dist/v2/__tests__/FormikRadioGroup.test.js.map +1 -0
  393. package/dist/v2/__tests__/MobileRowCard.test.js +52 -56
  394. package/dist/v2/__tests__/MobileRowCard.test.js.map +1 -1
  395. package/dist/v2/__tests__/SectionErrorBoundary.test.js +237 -0
  396. package/dist/v2/__tests__/SectionErrorBoundary.test.js.map +1 -0
  397. package/dist/v2/__tests__/labels-merge.test.js +20 -24
  398. package/dist/v2/__tests__/labels-merge.test.js.map +1 -1
  399. package/dist/v2/components/Accordion.d.ts +6 -6
  400. package/dist/v2/components/Accordion.d.ts.map +1 -1
  401. package/dist/v2/components/Accordion.js.map +1 -1
  402. package/dist/v2/components/ActionStrip.d.ts +12 -12
  403. package/dist/v2/components/ActionStrip.d.ts.map +1 -1
  404. package/dist/v2/components/ActionStrip.js.map +1 -1
  405. package/dist/v2/components/Banner.d.ts +48 -9
  406. package/dist/v2/components/Banner.d.ts.map +1 -1
  407. package/dist/v2/components/Banner.js +116 -35
  408. package/dist/v2/components/Banner.js.map +1 -1
  409. package/dist/v2/components/Busy.d.ts +3 -3
  410. package/dist/v2/components/Busy.d.ts.map +1 -1
  411. package/dist/v2/components/Busy.js.map +1 -1
  412. package/dist/v2/components/Button.d.ts +6 -6
  413. package/dist/v2/components/Button.d.ts.map +1 -1
  414. package/dist/v2/components/Button.js.map +1 -1
  415. package/dist/v2/components/CategoryTag.d.ts +3 -3
  416. package/dist/v2/components/CategoryTag.d.ts.map +1 -1
  417. package/dist/v2/components/CategoryTag.js.map +1 -1
  418. package/dist/v2/components/Checkbox.d.ts +11 -11
  419. package/dist/v2/components/Checkbox.d.ts.map +1 -1
  420. package/dist/v2/components/Checkbox.js.map +1 -1
  421. package/dist/v2/components/Chip.d.ts +8 -8
  422. package/dist/v2/components/Chip.d.ts.map +1 -1
  423. package/dist/v2/components/Chip.js +2 -1
  424. package/dist/v2/components/Chip.js.map +1 -1
  425. package/dist/v2/components/Combobox.d.ts +27 -27
  426. package/dist/v2/components/Combobox.d.ts.map +1 -1
  427. package/dist/v2/components/Combobox.js +3 -2
  428. package/dist/v2/components/Combobox.js.map +1 -1
  429. package/dist/v2/components/CommandPalette.d.ts +20 -20
  430. package/dist/v2/components/CommandPalette.d.ts.map +1 -1
  431. package/dist/v2/components/CommandPalette.js +2 -6
  432. package/dist/v2/components/CommandPalette.js.map +1 -1
  433. package/dist/v2/components/ConfirmDialog.d.ts +13 -13
  434. package/dist/v2/components/ConfirmDialog.d.ts.map +1 -1
  435. package/dist/v2/components/ConfirmDialog.js +2 -1
  436. package/dist/v2/components/ConfirmDialog.js.map +1 -1
  437. package/dist/v2/components/DatePicker.d.ts +11 -11
  438. package/dist/v2/components/DatePicker.d.ts.map +1 -1
  439. package/dist/v2/components/DatePicker.js.map +1 -1
  440. package/dist/v2/components/DateRangePicker.d.ts +16 -16
  441. package/dist/v2/components/DateRangePicker.d.ts.map +1 -1
  442. package/dist/v2/components/DateRangePicker.js +2 -1
  443. package/dist/v2/components/DateRangePicker.js.map +1 -1
  444. package/dist/v2/components/DateTimePicker.d.ts +11 -11
  445. package/dist/v2/components/DateTimePicker.d.ts.map +1 -1
  446. package/dist/v2/components/DateTimePicker.js +37 -4
  447. package/dist/v2/components/DateTimePicker.js.map +1 -1
  448. package/dist/v2/components/Drawer.d.ts +18 -18
  449. package/dist/v2/components/Drawer.d.ts.map +1 -1
  450. package/dist/v2/components/Drawer.js +2 -1
  451. package/dist/v2/components/Drawer.js.map +1 -1
  452. package/dist/v2/components/Dropzone.d.ts +34 -34
  453. package/dist/v2/components/Dropzone.d.ts.map +1 -1
  454. package/dist/v2/components/Dropzone.js +11 -3
  455. package/dist/v2/components/Dropzone.js.map +1 -1
  456. package/dist/v2/components/EmptyState.d.ts +7 -7
  457. package/dist/v2/components/EmptyState.d.ts.map +1 -1
  458. package/dist/v2/components/EmptyState.js.map +1 -1
  459. package/dist/v2/components/FavoriteToggle.d.ts +7 -7
  460. package/dist/v2/components/FavoriteToggle.d.ts.map +1 -1
  461. package/dist/v2/components/FavoriteToggle.js +2 -1
  462. package/dist/v2/components/FavoriteToggle.js.map +1 -1
  463. package/dist/v2/components/Field.d.ts +76 -13
  464. package/dist/v2/components/Field.d.ts.map +1 -1
  465. package/dist/v2/components/Field.js +87 -9
  466. package/dist/v2/components/Field.js.map +1 -1
  467. package/dist/v2/components/FieldError.d.ts +78 -0
  468. package/dist/v2/components/FieldError.d.ts.map +1 -0
  469. package/dist/v2/components/FieldError.js +131 -0
  470. package/dist/v2/components/FieldError.js.map +1 -0
  471. package/dist/v2/components/FieldHelp.d.ts +7 -7
  472. package/dist/v2/components/FieldHelp.d.ts.map +1 -1
  473. package/dist/v2/components/FieldHelp.js.map +1 -1
  474. package/dist/v2/components/FileCard.d.ts +75 -0
  475. package/dist/v2/components/FileCard.d.ts.map +1 -0
  476. package/dist/v2/components/FileCard.js +169 -0
  477. package/dist/v2/components/FileCard.js.map +1 -0
  478. package/dist/v2/components/FilterTab.d.ts +9 -9
  479. package/dist/v2/components/FilterTab.d.ts.map +1 -1
  480. package/dist/v2/components/FilterTab.js +2 -1
  481. package/dist/v2/components/FilterTab.js.map +1 -1
  482. package/dist/v2/components/FormGrid.d.ts +9 -4
  483. package/dist/v2/components/FormGrid.d.ts.map +1 -1
  484. package/dist/v2/components/FormGrid.js +11 -1
  485. package/dist/v2/components/FormGrid.js.map +1 -1
  486. package/dist/v2/components/FormikDisplay.d.ts +6 -6
  487. package/dist/v2/components/FormikDisplay.d.ts.map +1 -1
  488. package/dist/v2/components/FormikDisplay.js.map +1 -1
  489. package/dist/v2/components/Input.d.ts +6 -6
  490. package/dist/v2/components/Input.d.ts.map +1 -1
  491. package/dist/v2/components/Input.js.map +1 -1
  492. package/dist/v2/components/KPICard.d.ts +43 -13
  493. package/dist/v2/components/KPICard.d.ts.map +1 -1
  494. package/dist/v2/components/KPICard.js +53 -14
  495. package/dist/v2/components/KPICard.js.map +1 -1
  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 +3 -3
  501. package/dist/v2/components/KV.d.ts.map +1 -1
  502. package/dist/v2/components/KV.js.map +1 -1
  503. package/dist/v2/components/KVGrid.d.ts +2 -2
  504. package/dist/v2/components/KVGrid.d.ts.map +1 -1
  505. package/dist/v2/components/KVGrid.js +8 -1
  506. package/dist/v2/components/KVGrid.js.map +1 -1
  507. package/dist/v2/components/Layout.d.ts +7 -7
  508. package/dist/v2/components/Layout.d.ts.map +1 -1
  509. package/dist/v2/components/Layout.js.map +1 -1
  510. package/dist/v2/components/MobileRowCard.d.ts +13 -13
  511. package/dist/v2/components/MobileRowCard.d.ts.map +1 -1
  512. package/dist/v2/components/MobileRowCard.js.map +1 -1
  513. package/dist/v2/components/Modal.d.ts +12 -12
  514. package/dist/v2/components/Modal.d.ts.map +1 -1
  515. package/dist/v2/components/Modal.js.map +1 -1
  516. package/dist/v2/components/NetworkErrorPage.d.ts +1 -1
  517. package/dist/v2/components/NetworkErrorPage.d.ts.map +1 -1
  518. package/dist/v2/components/NetworkErrorPage.js.map +1 -1
  519. package/dist/v2/components/NumberInput.d.ts +14 -14
  520. package/dist/v2/components/NumberInput.d.ts.map +1 -1
  521. package/dist/v2/components/NumberInput.js +7 -6
  522. package/dist/v2/components/NumberInput.js.map +1 -1
  523. package/dist/v2/components/OverflowMenu.d.ts +14 -14
  524. package/dist/v2/components/OverflowMenu.d.ts.map +1 -1
  525. package/dist/v2/components/OverflowMenu.js +4 -8
  526. package/dist/v2/components/OverflowMenu.js.map +1 -1
  527. package/dist/v2/components/PdfViewer.d.ts +9 -9
  528. package/dist/v2/components/PdfViewer.d.ts.map +1 -1
  529. package/dist/v2/components/PdfViewer.js.map +1 -1
  530. package/dist/v2/components/ProgressBar.d.ts +10 -10
  531. package/dist/v2/components/ProgressBar.d.ts.map +1 -1
  532. package/dist/v2/components/ProgressBar.js.map +1 -1
  533. package/dist/v2/components/Radio.d.ts +7 -7
  534. package/dist/v2/components/Radio.d.ts.map +1 -1
  535. package/dist/v2/components/Radio.js.map +1 -1
  536. package/dist/v2/components/SectionErrorBoundary.d.ts +89 -0
  537. package/dist/v2/components/SectionErrorBoundary.d.ts.map +1 -0
  538. package/dist/v2/components/SectionErrorBoundary.js +221 -0
  539. package/dist/v2/components/SectionErrorBoundary.js.map +1 -0
  540. package/dist/v2/components/SectionHeader.d.ts +5 -5
  541. package/dist/v2/components/SectionHeader.d.ts.map +1 -1
  542. package/dist/v2/components/SectionHeader.js.map +1 -1
  543. package/dist/v2/components/Segmented.d.ts +11 -11
  544. package/dist/v2/components/Segmented.d.ts.map +1 -1
  545. package/dist/v2/components/Segmented.js.map +1 -1
  546. package/dist/v2/components/Select.d.ts +33 -15
  547. package/dist/v2/components/Select.d.ts.map +1 -1
  548. package/dist/v2/components/Select.js +147 -30
  549. package/dist/v2/components/Select.js.map +1 -1
  550. package/dist/v2/components/ServerErrorPage.d.ts +1 -1
  551. package/dist/v2/components/ServerErrorPage.d.ts.map +1 -1
  552. package/dist/v2/components/ServerErrorPage.js.map +1 -1
  553. package/dist/v2/components/Skeleton.d.ts +15 -15
  554. package/dist/v2/components/Skeleton.d.ts.map +1 -1
  555. package/dist/v2/components/Skeleton.js.map +1 -1
  556. package/dist/v2/components/SkipLink.d.ts +2 -2
  557. package/dist/v2/components/SkipLink.d.ts.map +1 -1
  558. package/dist/v2/components/SkipLink.js.map +1 -1
  559. package/dist/v2/components/Status.d.ts +3 -3
  560. package/dist/v2/components/Status.d.ts.map +1 -1
  561. package/dist/v2/components/Status.js.map +1 -1
  562. package/dist/v2/components/Stepper.d.ts +28 -22
  563. package/dist/v2/components/Stepper.d.ts.map +1 -1
  564. package/dist/v2/components/Stepper.js +31 -5
  565. package/dist/v2/components/Stepper.js.map +1 -1
  566. package/dist/v2/components/Surface.d.ts +94 -0
  567. package/dist/v2/components/Surface.d.ts.map +1 -0
  568. package/dist/v2/components/Surface.js +163 -0
  569. package/dist/v2/components/Surface.js.map +1 -0
  570. package/dist/v2/components/Switch.d.ts +4 -4
  571. package/dist/v2/components/Switch.d.ts.map +1 -1
  572. package/dist/v2/components/Switch.js.map +1 -1
  573. package/dist/v2/components/Tabs.d.ts +6 -6
  574. package/dist/v2/components/Tabs.d.ts.map +1 -1
  575. package/dist/v2/components/Tabs.js.map +1 -1
  576. package/dist/v2/components/TelInput.d.ts +8 -8
  577. package/dist/v2/components/TelInput.d.ts.map +1 -1
  578. package/dist/v2/components/TelInput.js +18 -18
  579. package/dist/v2/components/TelInput.js.map +1 -1
  580. package/dist/v2/components/Textarea.d.ts +1 -1
  581. package/dist/v2/components/Textarea.d.ts.map +1 -1
  582. package/dist/v2/components/Textarea.js.map +1 -1
  583. package/dist/v2/components/TimePicker.d.ts +11 -11
  584. package/dist/v2/components/TimePicker.d.ts.map +1 -1
  585. package/dist/v2/components/TimePicker.js.map +1 -1
  586. package/dist/v2/components/Toast.d.ts +6 -6
  587. package/dist/v2/components/Toast.d.ts.map +1 -1
  588. package/dist/v2/components/Toast.js +9 -8
  589. package/dist/v2/components/Toast.js.map +1 -1
  590. package/dist/v2/components/Tooltip.d.ts +1 -1
  591. package/dist/v2/components/Tooltip.d.ts.map +1 -1
  592. package/dist/v2/components/Tooltip.js.map +1 -1
  593. package/dist/v2/components/index.d.ts +170 -0
  594. package/dist/v2/components/index.d.ts.map +1 -1
  595. package/dist/v2/components/index.js +35 -0
  596. package/dist/v2/components/index.js.map +1 -1
  597. package/dist/v2/index.d.ts.map +1 -1
  598. package/dist/v2/index.js.map +1 -1
  599. package/dist/v2/models/favorite.d.ts +1 -1
  600. package/dist/v2/models/favorite.d.ts.map +1 -1
  601. package/dist/v2/models/favorite.js.map +1 -1
  602. package/dist/v2/models/personalization.d.ts +13 -13
  603. package/dist/v2/models/personalization.d.ts.map +1 -1
  604. package/dist/v2/models/personalization.js.map +1 -1
  605. package/dist/v2/models/referentiel.d.ts +11 -11
  606. package/dist/v2/models/referentiel.d.ts.map +1 -1
  607. package/dist/v2/models/referentiel.js.map +1 -1
  608. package/dist/v2/models/savedFilter.d.ts +8 -8
  609. package/dist/v2/models/savedFilter.d.ts.map +1 -1
  610. package/dist/v2/models/savedFilter.js.map +1 -1
  611. package/dist/v2/patterns/ActionBar.d.ts +33 -33
  612. package/dist/v2/patterns/ActionBar.d.ts.map +1 -1
  613. package/dist/v2/patterns/ActionBar.js +2 -1
  614. package/dist/v2/patterns/ActionBar.js.map +1 -1
  615. package/dist/v2/patterns/BulkActionBar.d.ts +12 -12
  616. package/dist/v2/patterns/BulkActionBar.d.ts.map +1 -1
  617. package/dist/v2/patterns/BulkActionBar.js +2 -1
  618. package/dist/v2/patterns/BulkActionBar.js.map +1 -1
  619. package/dist/v2/patterns/CollapsibleDataGrid.d.ts +15 -15
  620. package/dist/v2/patterns/CollapsibleDataGrid.d.ts.map +1 -1
  621. package/dist/v2/patterns/CollapsibleDataGrid.js.map +1 -1
  622. package/dist/v2/patterns/ColumnsToggle.d.ts +7 -7
  623. package/dist/v2/patterns/ColumnsToggle.d.ts.map +1 -1
  624. package/dist/v2/patterns/ColumnsToggle.js +4 -8
  625. package/dist/v2/patterns/ColumnsToggle.js.map +1 -1
  626. package/dist/v2/patterns/DataGridSettingsMenu.d.ts +12 -12
  627. package/dist/v2/patterns/DataGridSettingsMenu.d.ts.map +1 -1
  628. package/dist/v2/patterns/DataGridSettingsMenu.js +9 -8
  629. package/dist/v2/patterns/DataGridSettingsMenu.js.map +1 -1
  630. package/dist/v2/patterns/DataGridToolbar.d.ts +40 -40
  631. package/dist/v2/patterns/DataGridToolbar.d.ts.map +1 -1
  632. package/dist/v2/patterns/DataGridToolbar.js +2 -1
  633. package/dist/v2/patterns/DataGridToolbar.js.map +1 -1
  634. package/dist/v2/patterns/DataGridVirtualized.d.ts +27 -27
  635. package/dist/v2/patterns/DataGridVirtualized.d.ts.map +1 -1
  636. package/dist/v2/patterns/DataGridVirtualized.js.map +1 -1
  637. package/dist/v2/patterns/DeleteResourceConfirmDialog.d.ts +5 -5
  638. package/dist/v2/patterns/DeleteResourceConfirmDialog.d.ts.map +1 -1
  639. package/dist/v2/patterns/DeleteResourceConfirmDialog.js.map +1 -1
  640. package/dist/v2/patterns/FavoriteColumn.d.ts +15 -15
  641. package/dist/v2/patterns/FavoriteColumn.d.ts.map +1 -1
  642. package/dist/v2/patterns/FavoriteColumn.js +14 -61
  643. package/dist/v2/patterns/FavoriteColumn.js.map +1 -1
  644. package/dist/v2/patterns/FavoritesFilter.d.ts +10 -10
  645. package/dist/v2/patterns/FavoritesFilter.d.ts.map +1 -1
  646. package/dist/v2/patterns/FavoritesFilter.js +2 -1
  647. package/dist/v2/patterns/FavoritesFilter.js.map +1 -1
  648. package/dist/v2/patterns/FormErrorSummary.d.ts +4 -4
  649. package/dist/v2/patterns/FormErrorSummary.d.ts.map +1 -1
  650. package/dist/v2/patterns/FormErrorSummary.js.map +1 -1
  651. package/dist/v2/patterns/FormPageShell.d.ts +4 -4
  652. package/dist/v2/patterns/FormPageShell.d.ts.map +1 -1
  653. package/dist/v2/patterns/FormPageShell.js.map +1 -1
  654. package/dist/v2/patterns/FormSection.d.ts +19 -8
  655. package/dist/v2/patterns/FormSection.d.ts.map +1 -1
  656. package/dist/v2/patterns/FormSection.js +106 -71
  657. package/dist/v2/patterns/FormSection.js.map +1 -1
  658. package/dist/v2/patterns/FormikCheckbox.d.ts +77 -0
  659. package/dist/v2/patterns/FormikCheckbox.d.ts.map +1 -0
  660. package/dist/v2/patterns/FormikCheckbox.js +147 -0
  661. package/dist/v2/patterns/FormikCheckbox.js.map +1 -0
  662. package/dist/v2/patterns/FormikCheckboxGroup.d.ts +6 -6
  663. package/dist/v2/patterns/FormikCheckboxGroup.d.ts.map +1 -1
  664. package/dist/v2/patterns/FormikCheckboxGroup.js.map +1 -1
  665. package/dist/v2/patterns/FormikCombobox.d.ts +18 -12
  666. package/dist/v2/patterns/FormikCombobox.d.ts.map +1 -1
  667. package/dist/v2/patterns/FormikCombobox.js +5 -2
  668. package/dist/v2/patterns/FormikCombobox.js.map +1 -1
  669. package/dist/v2/patterns/FormikDatePicker.d.ts +48 -8
  670. package/dist/v2/patterns/FormikDatePicker.d.ts.map +1 -1
  671. package/dist/v2/patterns/FormikDatePicker.js +58 -65
  672. package/dist/v2/patterns/FormikDatePicker.js.map +1 -1
  673. package/dist/v2/patterns/FormikDateTimePicker.d.ts +111 -0
  674. package/dist/v2/patterns/FormikDateTimePicker.d.ts.map +1 -0
  675. package/dist/v2/patterns/FormikDateTimePicker.js +158 -0
  676. package/dist/v2/patterns/FormikDateTimePicker.js.map +1 -0
  677. package/dist/v2/patterns/FormikErrorFocus.d.ts +3 -3
  678. package/dist/v2/patterns/FormikErrorFocus.d.ts.map +1 -1
  679. package/dist/v2/patterns/FormikErrorFocus.js.map +1 -1
  680. package/dist/v2/patterns/FormikFile.d.ts +8 -8
  681. package/dist/v2/patterns/FormikFile.d.ts.map +1 -1
  682. package/dist/v2/patterns/FormikFile.js.map +1 -1
  683. package/dist/v2/patterns/FormikInput.d.ts +51 -6
  684. package/dist/v2/patterns/FormikInput.d.ts.map +1 -1
  685. package/dist/v2/patterns/FormikInput.js +53 -2
  686. package/dist/v2/patterns/FormikInput.js.map +1 -1
  687. package/dist/v2/patterns/FormikRadioGroup.d.ts +80 -0
  688. package/dist/v2/patterns/FormikRadioGroup.d.ts.map +1 -0
  689. package/dist/v2/patterns/FormikRadioGroup.js +148 -0
  690. package/dist/v2/patterns/FormikRadioGroup.js.map +1 -0
  691. package/dist/v2/patterns/FormikReferentielField.d.ts +8 -8
  692. package/dist/v2/patterns/FormikReferentielField.d.ts.map +1 -1
  693. package/dist/v2/patterns/FormikReferentielField.js.map +1 -1
  694. package/dist/v2/patterns/FormikSelect.d.ts +41 -12
  695. package/dist/v2/patterns/FormikSelect.d.ts.map +1 -1
  696. package/dist/v2/patterns/FormikSelect.js +32 -3
  697. package/dist/v2/patterns/FormikSelect.js.map +1 -1
  698. package/dist/v2/patterns/FormikTextarea.d.ts +14 -6
  699. package/dist/v2/patterns/FormikTextarea.d.ts.map +1 -1
  700. package/dist/v2/patterns/FormikTextarea.js +5 -2
  701. package/dist/v2/patterns/FormikTextarea.js.map +1 -1
  702. package/dist/v2/patterns/KeyboardShortcutsHelp.d.ts +21 -8
  703. package/dist/v2/patterns/KeyboardShortcutsHelp.d.ts.map +1 -1
  704. package/dist/v2/patterns/KeyboardShortcutsHelp.js +27 -14
  705. package/dist/v2/patterns/KeyboardShortcutsHelp.js.map +1 -1
  706. package/dist/v2/patterns/NetworkErrorBanner.d.ts +4 -4
  707. package/dist/v2/patterns/NetworkErrorBanner.d.ts.map +1 -1
  708. package/dist/v2/patterns/NetworkErrorBanner.js.map +1 -1
  709. package/dist/v2/patterns/PageContent.d.ts +3 -3
  710. package/dist/v2/patterns/PageContent.d.ts.map +1 -1
  711. package/dist/v2/patterns/PageContent.js.map +1 -1
  712. package/dist/v2/patterns/ReferentielField.d.ts +49 -49
  713. package/dist/v2/patterns/ReferentielField.d.ts.map +1 -1
  714. package/dist/v2/patterns/ReferentielField.js +2 -1
  715. package/dist/v2/patterns/ReferentielField.js.map +1 -1
  716. package/dist/v2/patterns/RowFavoriteToggle.d.ts +92 -0
  717. package/dist/v2/patterns/RowFavoriteToggle.d.ts.map +1 -0
  718. package/dist/v2/patterns/RowFavoriteToggle.js +127 -0
  719. package/dist/v2/patterns/RowFavoriteToggle.js.map +1 -0
  720. package/dist/v2/patterns/SaveFilterDialog.d.ts +10 -10
  721. package/dist/v2/patterns/SaveFilterDialog.d.ts.map +1 -1
  722. package/dist/v2/patterns/SaveFilterDialog.js +9 -8
  723. package/dist/v2/patterns/SaveFilterDialog.js.map +1 -1
  724. package/dist/v2/patterns/SavedFiltersMenu.d.ts +7 -7
  725. package/dist/v2/patterns/SavedFiltersMenu.d.ts.map +1 -1
  726. package/dist/v2/patterns/SavedFiltersMenu.js +9 -8
  727. package/dist/v2/patterns/SavedFiltersMenu.js.map +1 -1
  728. package/dist/v2/patterns/SkeletonPageShell.d.ts +7 -7
  729. package/dist/v2/patterns/SkeletonPageShell.d.ts.map +1 -1
  730. package/dist/v2/patterns/SkeletonPageShell.js.map +1 -1
  731. package/dist/v2/patterns/SortableHeader.d.ts +1 -1
  732. package/dist/v2/patterns/SortableHeader.d.ts.map +1 -1
  733. package/dist/v2/patterns/SortableHeader.js.map +1 -1
  734. package/dist/v2/patterns/Tour.d.ts +12 -12
  735. package/dist/v2/patterns/Tour.d.ts.map +1 -1
  736. package/dist/v2/patterns/Tour.js +9 -8
  737. package/dist/v2/patterns/Tour.js.map +1 -1
  738. package/dist/v2/patterns/_dataGridShared.d.ts +25 -6
  739. package/dist/v2/patterns/_dataGridShared.d.ts.map +1 -1
  740. package/dist/v2/patterns/_dataGridShared.js +37 -3
  741. package/dist/v2/patterns/_dataGridShared.js.map +1 -1
  742. package/dist/v2/patterns/_pickerSerialisation.d.ts +44 -0
  743. package/dist/v2/patterns/_pickerSerialisation.d.ts.map +1 -0
  744. package/dist/v2/patterns/_pickerSerialisation.js +81 -0
  745. package/dist/v2/patterns/_pickerSerialisation.js.map +1 -0
  746. package/dist/v2/patterns/_useColumnReorder.d.ts +1 -1
  747. package/dist/v2/patterns/_useColumnReorder.d.ts.map +1 -1
  748. package/dist/v2/patterns/_useColumnReorder.js.map +1 -1
  749. package/dist/v2/patterns/_useColumnResize.d.ts +1 -1
  750. package/dist/v2/patterns/_useColumnResize.d.ts.map +1 -1
  751. package/dist/v2/patterns/_useColumnResize.js.map +1 -1
  752. package/dist/v2/patterns/index.d.ts +114 -0
  753. package/dist/v2/patterns/index.d.ts.map +1 -1
  754. package/dist/v2/patterns/index.js +34 -0
  755. package/dist/v2/patterns/index.js.map +1 -1
  756. package/dist/v2/personalization/PersonalizationProvider.d.ts +9 -9
  757. package/dist/v2/personalization/PersonalizationProvider.d.ts.map +1 -1
  758. package/dist/v2/personalization/PersonalizationProvider.js.map +1 -1
  759. package/dist/v2/personalization/adapters/createLocalStorageAdapter.d.ts +1 -1
  760. package/dist/v2/personalization/adapters/createLocalStorageAdapter.d.ts.map +1 -1
  761. package/dist/v2/personalization/adapters/createLocalStorageAdapter.js.map +1 -1
  762. package/dist/v2/personalization/adapters/createMemoryAdapter.d.ts +1 -1
  763. package/dist/v2/personalization/adapters/createMemoryAdapter.d.ts.map +1 -1
  764. package/dist/v2/personalization/adapters/createMemoryAdapter.js.map +1 -1
  765. package/dist/v2/personalization/capabilities/favoritesView.d.ts +3 -3
  766. package/dist/v2/personalization/capabilities/favoritesView.d.ts.map +1 -1
  767. package/dist/v2/personalization/capabilities/favoritesView.js.map +1 -1
  768. package/dist/v2/personalization/capabilities/gridPreferences.d.ts +100 -0
  769. package/dist/v2/personalization/capabilities/gridPreferences.d.ts.map +1 -0
  770. package/dist/v2/personalization/capabilities/gridPreferences.js +215 -0
  771. package/dist/v2/personalization/capabilities/gridPreferences.js.map +1 -0
  772. package/dist/v2/personalization/capabilities/index.d.ts +6 -0
  773. package/dist/v2/personalization/capabilities/index.d.ts.map +1 -1
  774. package/dist/v2/personalization/capabilities/index.js +13 -0
  775. package/dist/v2/personalization/capabilities/index.js.map +1 -1
  776. package/dist/v2/personalization/capabilities/savedFilters.d.ts +3 -3
  777. package/dist/v2/personalization/capabilities/savedFilters.d.ts.map +1 -1
  778. package/dist/v2/personalization/capabilities/savedFilters.js.map +1 -1
  779. package/dist/v2/personalization/createPersonalizationStore.d.ts +8 -8
  780. package/dist/v2/personalization/createPersonalizationStore.d.ts.map +1 -1
  781. package/dist/v2/personalization/createPersonalizationStore.js.map +1 -1
  782. package/dist/v2/personalization/index.d.ts +18 -0
  783. package/dist/v2/personalization/index.d.ts.map +1 -1
  784. package/dist/v2/personalization/index.js +13 -0
  785. package/dist/v2/personalization/index.js.map +1 -1
  786. package/dist/v2/personalization/schema.d.ts +2 -2
  787. package/dist/v2/personalization/schema.d.ts.map +1 -1
  788. package/dist/v2/personalization/schema.js.map +1 -1
  789. package/dist/v2/personalization/types.d.ts +19 -19
  790. package/dist/v2/personalization/types.d.ts.map +1 -1
  791. package/dist/v2/personalization/types.js.map +1 -1
  792. package/dist/v2/referentiel/ReferentielProvider.d.ts +4 -4
  793. package/dist/v2/referentiel/ReferentielProvider.d.ts.map +1 -1
  794. package/dist/v2/referentiel/ReferentielProvider.js.map +1 -1
  795. package/dist/v2/referentiel/useReferentielOptions.d.ts +4 -4
  796. package/dist/v2/referentiel/useReferentielOptions.d.ts.map +1 -1
  797. package/dist/v2/referentiel/useReferentielOptions.js.map +1 -1
  798. package/dist/v2/referentiel/useReferentielSearch.d.ts +3 -3
  799. package/dist/v2/referentiel/useReferentielSearch.d.ts.map +1 -1
  800. package/dist/v2/referentiel/useReferentielSearch.js.map +1 -1
  801. package/dist/v2/theme/createPortnetTheme.d.ts +32 -7
  802. package/dist/v2/theme/createPortnetTheme.d.ts.map +1 -1
  803. package/dist/v2/theme/createPortnetTheme.js +25 -1
  804. package/dist/v2/theme/createPortnetTheme.js.map +1 -1
  805. package/dist/v2/types/datagrid.d.ts +59 -59
  806. package/dist/v2/types/datagrid.d.ts.map +1 -1
  807. package/dist/v2/types/datagrid.js.map +1 -1
  808. package/dist/v2/utils/apiError.d.ts +65 -4
  809. package/dist/v2/utils/apiError.d.ts.map +1 -1
  810. package/dist/v2/utils/apiError.js +69 -6
  811. package/dist/v2/utils/apiError.js.map +1 -1
  812. package/dist/v2/utils/index.d.ts +1 -0
  813. package/dist/v2/utils/index.d.ts.map +1 -1
  814. package/dist/v2/utils/index.js +7 -0
  815. package/dist/v2/utils/index.js.map +1 -1
  816. package/dist/v2/utils/mergeLabels.d.ts +59 -0
  817. package/dist/v2/utils/mergeLabels.d.ts.map +1 -0
  818. package/dist/v2/utils/mergeLabels.js +93 -0
  819. package/dist/v2/utils/mergeLabels.js.map +1 -0
  820. package/package.json +23 -15
@@ -1 +1 @@
1
- {"version":3,"file":"MobileRowCard.js","names":["React","_interopRequireWildcard","require","_Box","_interopRequireDefault","_OverflowMenu","_KV","_jsxRuntime","obj","__esModule","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","Symbol","iterator","constructor","ownKeys","object","enumerableOnly","keys","getOwnPropertySymbols","symbols","filter","sym","enumerable","push","apply","_objectSpread","target","i","arguments","length","source","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","value","_toPropertyKey","configurable","writable","arg","_toPrimitive","String","input","hint","prim","toPrimitive","undefined","res","TypeError","Number","CARD_INNER_SX","freeze","display","flexDirection","gap","padding","HEADER_SX","alignItems","justifyContent","HEADER_MAIN_SX","minWidth","flex","LEADING_SX","flexShrink","TITLE_BASE_SX","fontWeight","fontSize","color","overflow","textOverflow","whiteSpace","TITLE_MONO_SX","fontFamily","SUBTITLE_SX","CHIPS_SX","flexWrap","META_SX","KV_GRID_SX","gridTemplateColumns","HEADER_END_SX","MobileRowCard","_ref","leading","trailing","title","_ref$titleMono","titleMono","subtitle","chips","kv","meta","actions","actionsAriaLabel","visibleActions","useMemo","Array","isArray","a","divider","visibleChips","Boolean","metaParts","p","kvPairs","label","hasActions","hasTitle","hasLeading","hasTrailing","hasHeader","hasSubtitle","titleAttr","subtitleAttr","jsxs","sx","children","jsx","onClick","e","stopPropagation","onKeyDown","ariaLabel","map","c","Fragment","pair","mono","fallback","join","_default","exports"],"sources":["../../../src/lib/v2/components/MobileRowCard.tsx"],"sourcesContent":["import * as React from \"react\";\r\nimport Box from \"@mui/material/Box\";\r\nimport type { SxProps, Theme } from \"@mui/material/styles\";\r\nimport OverflowMenu from \"./OverflowMenu\";\r\nimport type { OverflowMenuAction } from \"./OverflowMenu\";\r\nimport KV from \"./KV\";\r\n\r\n/**\r\n * MobileRowCard - Portnet UI v2\r\n *\r\n * Canonical card layout for the DataGrid mobile card view (R1 mobile,\r\n * lib commit \"feat(DataGrid): R1 mobile - opt-in card view\"). Used\r\n * inside DataGrid's renderMobileCard prop to centralise the visual\r\n * rhythm across modules.\r\n *\r\n * <DataGrid\r\n * renderMobileCard={(row) => (\r\n * <MobileRowCard\r\n * title={row.reference}\r\n * titleMono\r\n * subtitle={row.importer?.description}\r\n * chips={[\r\n * <StatutAutorisationChip code={row.statutAutorisation} />,\r\n * <StatutUtilisationChip code={row.statutUtilisation} />,\r\n * ]}\r\n * meta={[\r\n * `Émise ${formatDate(row.dateIssue)}`,\r\n * `Fin ${formatDate(row.dateFinValidite)}`,\r\n * ]}\r\n * actions={buildRowActions(row)}\r\n * actionsAriaLabel={`Actions pour ${row.reference}`}\r\n * />\r\n * )}\r\n * ...\r\n * />\r\n *\r\n * Layout (top to bottom, each line conditional on its prop):\r\n * 1. Header row: [leading] + title (truncate, optional mono) + [trailing] + OverflowMenu kebab\r\n * 2. Subtitle line: muted, single-line truncate\r\n * 3. Chips row: wrapping flexbox for status chips\r\n * 4. KV grid: two-column label/value pairs (see `kv`)\r\n * 5. Meta line: secondary scalars joined with \" · \"\r\n *\r\n * All props are optional; the component renders only the lines\r\n * that have content, with no empty placeholder boxes.\r\n *\r\n * `kv` vs `meta` — pick by whether the reader needs the label.\r\n * meta → self-evident scalars, joined label-less: \"12/05/2026 · 3 pièces\"\r\n * kv → values that are meaningless unaccompanied (\"SOFRANE SA\",\r\n * \"Casablanca\", \"Tissus\") — rendered as a 2-column grid of v2.KV\r\n *\r\n * `kv` exists because every listing in ms-dfd-fe and ms-ti-fe independently\r\n * built header + labelled-KV-grid cards with a local MOBILE_CARD_KV_SX,\r\n * bypassing this component entirely — nine sites across two modules. `meta`\r\n * could not absorb them: joining five labelled pairs into one \" · \" string\r\n * loses the labels, and on a phone those labels are what make the values\r\n * interpretable (Nielsen #6, recognition over recall). Each pair renders\r\n * through v2.KV, so label/value stay paired for screen readers via\r\n * aria-labelledby, and empty values fall back to KV's own \"—\" rather than each\r\n * host writing `?? \"-\"`.\r\n *\r\n * <MobileRowCard\r\n * leading={<FavoriteToggle ... />}\r\n * title={row.num} titleMono\r\n * chips={[<Status kind={...} label={row.etat} />]}\r\n * kv={[\r\n * { label: \"Catégorie\", value: row.categorie },\r\n * { label: \"Importateur\", value: row.importateur },\r\n * { label: \"Référence\", value: row.ref, mono: true },\r\n * ]}\r\n * />\r\n *\r\n * `leading` — a slot BEFORE the title, inside the header row, vertically\r\n * centred against it and never shrinking. Added for the listing favourite\r\n * star, which hosts previously could not place inside the card and therefore\r\n * hand-rolled the whole card layout instead:\r\n *\r\n * <MobileRowCard\r\n * leading={<FavoriteToggle pressed={isFavorite} size=\"sm\" onChange={...} />}\r\n * title={row.reference}\r\n * titleMono\r\n * />\r\n *\r\n * PROPAGATION — deliberate asymmetry with the kebab. The kebab wrapper stops\r\n * click/keydown itself, because opening a menu must never also fire the card's\r\n * onRowClick. `leading` does NOT: a decorative leading node (icon, avatar)\r\n * should still open the row like the rest of the card, and silently swallowing\r\n * that would be the more surprising default. Interactive leading content is\r\n * therefore responsible for stopping propagation in its own handlers — exactly\r\n * as DataGrid's own FavoriteCell does. Get this wrong and a tap both toggles\r\n * the star and opens the drawer.\r\n *\r\n * Charter §02.3 — spacing: --s-2 gap between lines, --s-3 padding.\r\n * Charter §02.2 — typography:\r\n * - title: text-sm semibold (text-mono variant if titleMono)\r\n * - subtitle: text-sm fg-muted\r\n * - meta: text-xs fg-subtle\r\n * Charter §05 — a11y: kebab has its own aria-label; the card-level\r\n * click wiring (role=button, tabIndex, Enter/Space) is owned by\r\n * DataGrid's mobile card wrapper. This component just renders the\r\n * contents.\r\n *\r\n * Why chips are NODES (not objects):\r\n * Hosts have specialised chip components (StatutAutorisationChip\r\n * etc.) and passing nodes lets them keep their existing chip type\r\n * without translating to a generic schema. We just lay them out\r\n * in a wrapping row.\r\n */\r\n\r\nconst CARD_INNER_SX = Object.freeze({\r\n display: \"flex\",\r\n flexDirection: \"column\",\r\n gap: \"var(--s-2)\",\r\n padding: \"var(--s-3)\",\r\n} satisfies SxProps<Theme>);\r\n\r\nconst HEADER_SX = Object.freeze({\r\n display: \"flex\",\r\n alignItems: \"flex-start\",\r\n justifyContent: \"space-between\",\r\n gap: \"var(--s-2)\",\r\n} satisfies SxProps<Theme>);\r\n\r\n/* Groups `leading` + title on the left of the header so the kebab keeps its\r\n * space-between position. `minWidth: 0` is what lets the title's ellipsis\r\n * actually engage inside a flex child. */\r\nconst HEADER_MAIN_SX = Object.freeze({\r\n display: \"flex\",\r\n alignItems: \"center\",\r\n gap: \"var(--s-2)\",\r\n minWidth: 0,\r\n flex: 1,\r\n} satisfies SxProps<Theme>);\r\n\r\nconst LEADING_SX = Object.freeze({\r\n display: \"inline-flex\",\r\n alignItems: \"center\",\r\n flexShrink: 0,\r\n} satisfies SxProps<Theme>);\r\n\r\nconst TITLE_BASE_SX = Object.freeze({\r\n fontWeight: \"var(--fw-semibold)\",\r\n fontSize: \"var(--text-sm)\",\r\n color: \"var(--fg)\",\r\n minWidth: 0,\r\n flex: 1,\r\n overflow: \"hidden\",\r\n textOverflow: \"ellipsis\",\r\n whiteSpace: \"nowrap\",\r\n} satisfies SxProps<Theme>);\r\n\r\nconst TITLE_MONO_SX = Object.freeze({\r\n ...TITLE_BASE_SX,\r\n fontFamily: \"var(--font-mono)\",\r\n} satisfies SxProps<Theme>);\r\n\r\nconst SUBTITLE_SX = Object.freeze({\r\n fontSize: \"var(--text-sm)\",\r\n color: \"var(--fg-muted)\",\r\n overflow: \"hidden\",\r\n textOverflow: \"ellipsis\",\r\n whiteSpace: \"nowrap\",\r\n} satisfies SxProps<Theme>);\r\n\r\nconst CHIPS_SX = Object.freeze({\r\n display: \"flex\",\r\n alignItems: \"center\",\r\n gap: \"var(--s-1)\",\r\n flexWrap: \"wrap\",\r\n} satisfies SxProps<Theme>);\r\n\r\nconst META_SX = Object.freeze({\r\n fontSize: \"var(--text-xs)\",\r\n color: \"var(--fg-subtle)\",\r\n});\r\n\r\n/* Two columns at every phone width. Deliberately not responsive: below ~320px\r\n * a single column would be more readable, but 320px is the Charter's narrowest\r\n * supported breakpoint (§07.2 xs) and two columns still fit there. Matches the\r\n * MOBILE_CARD_KV_SX both modules converged on independently. */\r\nconst KV_GRID_SX = Object.freeze({\r\n display: \"grid\",\r\n gridTemplateColumns: \"1fr 1fr\",\r\n gap: \"var(--s-2)\",\r\n} satisfies SxProps<Theme>);\r\n\r\n/* Right cluster of the header row: [trailing] then the kebab. One shared\r\n * wrapper so a card can carry both a visible action and an overflow menu, and\r\n * so propagation is stopped once for the whole interactive cluster. */\r\nconst HEADER_END_SX = Object.freeze({\r\n display: \"inline-flex\",\r\n alignItems: \"center\",\r\n gap: \"var(--s-1)\",\r\n flexShrink: 0,\r\n} satisfies SxProps<Theme>);\r\n\r\n/** One label/value pair in the card's `kv` grid. Mirrors v2.KV's own props. */\r\nexport interface MobileRowCardKV {\r\n label: React.ReactNode;\r\n value?: React.ReactNode;\r\n /** Tabular-nums monospace — for references, IDs, amounts. */\r\n mono?: boolean;\r\n /** Overrides KV's default \"—\" when the value is null/undefined/\"\". */\r\n fallback?: React.ReactNode;\r\n}\r\n\r\nexport interface MobileRowCardProps {\r\n /** Slot before the title (favourite toggle, icon, avatar). Interactive\r\n * content must stop propagation itself — see the propagation note above. */\r\n leading?: React.ReactNode;\r\n /**\r\n * Slot at the END of the header row — the VISIBLE counterpart of `actions`.\r\n *\r\n * `actions` collapses into a kebab, which is right for a listing's secondary\r\n * verbs and wrong when the action IS the point of the row: a picker modal's\r\n * \"Choisir\" button is the only way to select a row on a phone, and burying it\r\n * behind \"…\" turns one tap into two. Six sites across ms-dfd-fe and ms-ti-fe\r\n * hand-rolled the entire card layout rather than accept that, which is what\r\n * this slot exists to end.\r\n *\r\n * Renders before the kebab; both may be present.\r\n *\r\n * PROPAGATION — unlike `leading`, `trailing` shares the kebab's wrapper and\r\n * therefore DOES stop click/keydown. Its declared purpose is interactive\r\n * actions, and a tap that both fires the action and opens the row is the more\r\n * damaging default. Decorative content belongs in `leading`.\r\n */\r\n trailing?: React.ReactNode;\r\n title?: React.ReactNode;\r\n titleMono?: boolean;\r\n subtitle?: React.ReactNode;\r\n chips?: React.ReactNode[];\r\n /** Labelled pairs rendered as a 2-column v2.KV grid. See `kv` vs `meta`. */\r\n kv?: MobileRowCardKV[];\r\n meta?: React.ReactNode[];\r\n actions?: OverflowMenuAction[];\r\n /**\r\n * Accessible name for the kebab trigger.\r\n *\r\n * NO DEFAULT ON PURPOSE. This used to default to the literal \"Actions\",\r\n * which was then passed to OverflowMenu's `ariaLabel` — and `ariaLabel`\r\n * WINS over `labels.trigger`, so the card silently overrode the design\r\n * system's own canonical trigger name (\"Plus d'actions\", OverflowMenu\r\n * DEFAULT_LABELS). Result: every kebab in the fleet announced « Plus\r\n * d'actions » except the ones inside a mobile row card, which announced the\r\n * vaguer « Actions » — an inter-module naming inconsistency (Charter P2 /\r\n * R-2.4 : « un même concept = un même libellé partout »).\r\n *\r\n * Leaving it undefined lets OverflowMenu apply its own default. Hosts\r\n * SHOULD still pass a contextual name (« Actions pour 2025-IM-0042 »), which\r\n * is strictly better than either default for screen-reader users scanning a\r\n * list of cards.\r\n */\r\n actionsAriaLabel?: string;\r\n}\r\n\r\nfunction MobileRowCard({\r\n leading,\r\n trailing,\r\n title,\r\n titleMono = false,\r\n subtitle,\r\n chips,\r\n kv,\r\n meta,\r\n actions,\r\n /* No default — see the prop's doc comment. Forwarded only when the host\r\n * supplies one, so OverflowMenu's own default applies otherwise. */\r\n actionsAriaLabel,\r\n}: MobileRowCardProps) {\r\n // Filter out divider entries (OverflowMenu separator marks) and\r\n // null/undefined actions so the kebab only renders when there is\r\n // at least one real action available.\r\n const visibleActions = React.useMemo(() => {\r\n if (!Array.isArray(actions)) return [];\r\n return actions.filter((a) => a && !a.divider);\r\n }, [actions]);\r\n\r\n const visibleChips = React.useMemo(() => {\r\n if (!Array.isArray(chips)) return [];\r\n return chips.filter(Boolean);\r\n }, [chips]);\r\n\r\n const metaParts = React.useMemo(() => {\r\n if (!Array.isArray(meta)) return [];\r\n return meta.filter((p) => p != null && p !== \"\");\r\n }, [meta]);\r\n\r\n /* Only `label` is required — a pair with an empty value is kept on purpose so\r\n * KV renders its \"—\" placeholder and the grid keeps its shape across rows.\r\n * Entries missing a label are dropped: KV would emit an empty eyebrow and an\r\n * aria-labelledby pointing at nothing. */\r\n const kvPairs = React.useMemo(() => {\r\n if (!Array.isArray(kv)) return [];\r\n return kv.filter((p) => p != null && p.label != null && p.label !== \"\");\r\n }, [kv]);\r\n\r\n const hasActions = visibleActions.length > 0;\r\n const hasTitle = title != null && title !== \"\";\r\n const hasLeading = leading != null && leading !== \"\";\r\n const hasTrailing = trailing != null && trailing !== \"\";\r\n const hasHeader = hasTitle || hasActions || hasLeading || hasTrailing;\r\n const hasSubtitle = subtitle != null && subtitle !== \"\";\r\n\r\n // Title attribute (native hover tooltip) is set only when the value\r\n // is a string — wrapping a React node yields a \"[object Object]\"\r\n // tooltip which is worse than no tooltip.\r\n const titleAttr = typeof title === \"string\" ? title : undefined;\r\n const subtitleAttr =\r\n typeof subtitle === \"string\" ? subtitle : undefined;\r\n\r\n return (\r\n <Box sx={CARD_INNER_SX}>\r\n {hasHeader && (\r\n <Box sx={HEADER_SX}>\r\n {(hasLeading || hasTitle) && (\r\n <Box sx={HEADER_MAIN_SX}>\r\n {hasLeading && <Box sx={LEADING_SX}>{leading}</Box>}\r\n {hasTitle && (\r\n <Box\r\n sx={titleMono ? TITLE_MONO_SX : TITLE_BASE_SX}\r\n title={titleAttr}\r\n >\r\n {title}\r\n </Box>\r\n )}\r\n </Box>\r\n )}\r\n {(hasTrailing || hasActions) && (\r\n // The card itself is the click target (wired by DataGrid's\r\n // mobile card wrapper). Stop propagation on the whole\r\n // interactive cluster so firing a visible action, or opening\r\n // the kebab, doesn't also fire onRowClick.\r\n <Box\r\n sx={HEADER_END_SX}\r\n onClick={(e) => e.stopPropagation()}\r\n onKeyDown={(e) => e.stopPropagation()}\r\n >\r\n {hasTrailing && trailing}\r\n {hasActions && (\r\n <OverflowMenu\r\n {...(actionsAriaLabel !== undefined ? { ariaLabel: actionsAriaLabel } : {})}\r\n {...(actions !== undefined ? { actions } : {})}\r\n />\r\n )}\r\n </Box>\r\n )}\r\n </Box>\r\n )}\r\n {hasSubtitle && (\r\n <Box sx={SUBTITLE_SX} title={subtitleAttr}>\r\n {subtitle}\r\n </Box>\r\n )}\r\n {visibleChips.length > 0 && (\r\n <Box sx={CHIPS_SX}>\r\n {visibleChips.map((c, i) => (\r\n <React.Fragment key={i}>{c}</React.Fragment>\r\n ))}\r\n </Box>\r\n )}\r\n {kvPairs.length > 0 && (\r\n <Box sx={KV_GRID_SX}>\r\n {kvPairs.map((pair, i) => (\r\n <KV\r\n key={i}\r\n label={pair.label}\r\n {...(pair.value !== undefined ? { value: pair.value } : {})}\r\n {...(pair.mono !== undefined ? { mono: pair.mono } : {})}\r\n {...(pair.fallback !== undefined ? { fallback: pair.fallback } : {})}\r\n />\r\n ))}\r\n </Box>\r\n )}\r\n {metaParts.length > 0 && (\r\n <Box sx={META_SX}>{metaParts.join(\" · \")}</Box>\r\n )}\r\n </Box>\r\n );\r\n}\r\n\r\nexport default MobileRowCard;\r\n"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,IAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,aAAA,GAAAD,sBAAA,CAAAF,OAAA;AAEA,IAAAI,GAAA,G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AA,EAACvI,KAAK,CAAC+I,QAAQ;UAAAT,QAAA,EAAUQ;QAAC,GAALhG,CAAsB,CAAC;MAAA,CAC7C;IAAC,CACC,CACN,EACA4E,OAAO,CAAC1E,MAAM,GAAG,CAAC,iBACjB,IAAAzC,WAAA,CAAAgI,GAAA,EAACpI,IAAA,WAAG;MAACkI,EAAE,EAAErC,UAAW;MAAAsC,QAAA,EACjBZ,OAAO,CAACmB,GAAG,CAAC,UAACG,IAAI,EAAElG,CAAC;QAAA,oBACnB,IAAAvC,WAAA,CAAAgI,GAAA,EAACjI,GAAA,WAAE,EAAAsC,aAAA,CAAAA,aAAA,CAAAA,aAAA;UAED+E,KAAK,EAAEqB,IAAI,CAACrB;QAAM,GACbqB,IAAI,CAAC1F,KAAK,KAAKW,SAAS,GAAG;UAAEX,KAAK,EAAE0F,IAAI,CAAC1F;QAAM,CAAC,GAAG,CAAC,CAAC,GACrD0F,IAAI,CAACC,IAAI,KAAKhF,SAAS,GAAG;UAAEgF,IAAI,EAAED,IAAI,CAACC;QAAK,CAAC,GAAG,CAAC,CAAC,GAClDD,IAAI,CAACE,QAAQ,KAAKjF,SAAS,GAAG;UAAEiF,QAAQ,EAAEF,IAAI,CAACE;QAAS,CAAC,GAAG,CAAC,CAAC,GAJ9DpG,CAKN,CAAC;MAAA,CACH;IAAC,CACC,CACN,EACA0E,SAAS,CAACxE,MAAM,GAAG,CAAC,iBACnB,IAAAzC,WAAA,CAAAgI,GAAA,EAACpI,IAAA,WAAG;MAACkI,EAAE,EAAEtC,OAAQ;MAAAuC,QAAA,EAAEd,SAAS,CAAC2B,IAAI,CAAC,KAAK;IAAC,CAAM,CAC/C;EAAA,CACE,CAAC;AAEV;AAAC,IAAAC,QAAA,GAAAC,OAAA,cAEclD,aAAa","ignoreList":[]}
1
+ {"version":3,"file":"MobileRowCard.js","names":["React","_interopRequireWildcard","require","_Box","_interopRequireDefault","_OverflowMenu","_KV","_jsxRuntime","obj","__esModule","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","Symbol","iterator","constructor","ownKeys","object","enumerableOnly","keys","getOwnPropertySymbols","symbols","filter","sym","enumerable","push","apply","_objectSpread","target","i","arguments","length","source","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","value","_toPropertyKey","configurable","writable","arg","_toPrimitive","String","input","hint","prim","toPrimitive","undefined","res","TypeError","Number","CARD_INNER_SX","freeze","display","flexDirection","gap","padding","HEADER_SX","alignItems","justifyContent","HEADER_MAIN_SX","minWidth","flex","LEADING_SX","flexShrink","TITLE_BASE_SX","fontWeight","fontSize","color","overflow","textOverflow","whiteSpace","TITLE_MONO_SX","fontFamily","SUBTITLE_SX","CHIPS_SX","flexWrap","META_SX","KV_GRID_SX","gridTemplateColumns","HEADER_END_SX","MobileRowCard","_ref","leading","trailing","title","_ref$titleMono","titleMono","subtitle","chips","kv","meta","actions","actionsAriaLabel","visibleActions","useMemo","Array","isArray","a","divider","visibleChips","Boolean","metaParts","p","kvPairs","label","hasActions","hasTitle","hasLeading","hasTrailing","hasHeader","hasSubtitle","titleAttr","subtitleAttr","jsxs","sx","children","jsx","onClick","e","stopPropagation","onKeyDown","ariaLabel","map","c","Fragment","pair","mono","fallback","join","_default","exports"],"sources":["../../../src/lib/v2/components/MobileRowCard.tsx"],"sourcesContent":["import * as React from \"react\";\r\nimport Box from \"@mui/material/Box\";\r\nimport type { SxProps, Theme } from \"@mui/material/styles\";\r\nimport OverflowMenu from \"./OverflowMenu\";\r\nimport type { OverflowMenuAction } from \"./OverflowMenu\";\r\nimport KV from \"./KV\";\r\n\r\n/**\r\n * MobileRowCard - Portnet UI v2\r\n *\r\n * Canonical card layout for the DataGrid mobile card view (R1 mobile,\r\n * lib commit \"feat(DataGrid): R1 mobile - opt-in card view\"). Used\r\n * inside DataGrid's renderMobileCard prop to centralise the visual\r\n * rhythm across modules.\r\n *\r\n * <DataGrid\r\n * renderMobileCard={(row) => (\r\n * <MobileRowCard\r\n * title={row.reference}\r\n * titleMono\r\n * subtitle={row.importer?.description}\r\n * chips={[\r\n * <StatutAutorisationChip code={row.statutAutorisation} />,\r\n * <StatutUtilisationChip code={row.statutUtilisation} />,\r\n * ]}\r\n * meta={[\r\n * `Émise ${formatDate(row.dateIssue)}`,\r\n * `Fin ${formatDate(row.dateFinValidite)}`,\r\n * ]}\r\n * actions={buildRowActions(row)}\r\n * actionsAriaLabel={`Actions pour ${row.reference}`}\r\n * />\r\n * )}\r\n * ...\r\n * />\r\n *\r\n * Layout (top to bottom, each line conditional on its prop):\r\n * 1. Header row: [leading] + title (truncate, optional mono) + [trailing] + OverflowMenu kebab\r\n * 2. Subtitle line: muted, single-line truncate\r\n * 3. Chips row: wrapping flexbox for status chips\r\n * 4. KV grid: two-column label/value pairs (see `kv`)\r\n * 5. Meta line: secondary scalars joined with \" · \"\r\n *\r\n * All props are optional; the component renders only the lines\r\n * that have content, with no empty placeholder boxes.\r\n *\r\n * `kv` vs `meta` — pick by whether the reader needs the label.\r\n * meta → self-evident scalars, joined label-less: \"12/05/2026 · 3 pièces\"\r\n * kv → values that are meaningless unaccompanied (\"SOFRANE SA\",\r\n * \"Casablanca\", \"Tissus\") — rendered as a 2-column grid of v2.KV\r\n *\r\n * `kv` exists because every listing in ms-dfd-fe and ms-ti-fe independently\r\n * built header + labelled-KV-grid cards with a local MOBILE_CARD_KV_SX,\r\n * bypassing this component entirely — nine sites across two modules. `meta`\r\n * could not absorb them: joining five labelled pairs into one \" · \" string\r\n * loses the labels, and on a phone those labels are what make the values\r\n * interpretable (Nielsen #6, recognition over recall). Each pair renders\r\n * through v2.KV, so label/value stay paired for screen readers via\r\n * aria-labelledby, and empty values fall back to KV's own \"—\" rather than each\r\n * host writing `?? \"-\"`.\r\n *\r\n * <MobileRowCard\r\n * leading={<FavoriteToggle ... />}\r\n * title={row.num} titleMono\r\n * chips={[<Status kind={...} label={row.etat} />]}\r\n * kv={[\r\n * { label: \"Catégorie\", value: row.categorie },\r\n * { label: \"Importateur\", value: row.importateur },\r\n * { label: \"Référence\", value: row.ref, mono: true },\r\n * ]}\r\n * />\r\n *\r\n * `leading` — a slot BEFORE the title, inside the header row, vertically\r\n * centred against it and never shrinking. Added for the listing favourite\r\n * star, which hosts previously could not place inside the card and therefore\r\n * hand-rolled the whole card layout instead:\r\n *\r\n * <MobileRowCard\r\n * leading={<FavoriteToggle pressed={isFavorite} size=\"sm\" onChange={...} />}\r\n * title={row.reference}\r\n * titleMono\r\n * />\r\n *\r\n * PROPAGATION — deliberate asymmetry with the kebab. The kebab wrapper stops\r\n * click/keydown itself, because opening a menu must never also fire the card's\r\n * onRowClick. `leading` does NOT: a decorative leading node (icon, avatar)\r\n * should still open the row like the rest of the card, and silently swallowing\r\n * that would be the more surprising default. Interactive leading content is\r\n * therefore responsible for stopping propagation in its own handlers — exactly\r\n * as DataGrid's own FavoriteCell does. Get this wrong and a tap both toggles\r\n * the star and opens the drawer.\r\n *\r\n * Charter §02.3 — spacing: --s-2 gap between lines, --s-3 padding.\r\n * Charter §02.2 — typography:\r\n * - title: text-sm semibold (text-mono variant if titleMono)\r\n * - subtitle: text-sm fg-muted\r\n * - meta: text-xs fg-subtle\r\n * Charter §05 — a11y: kebab has its own aria-label; the card-level\r\n * click wiring (role=button, tabIndex, Enter/Space) is owned by\r\n * DataGrid's mobile card wrapper. This component just renders the\r\n * contents.\r\n *\r\n * Why chips are NODES (not objects):\r\n * Hosts have specialised chip components (StatutAutorisationChip\r\n * etc.) and passing nodes lets them keep their existing chip type\r\n * without translating to a generic schema. We just lay them out\r\n * in a wrapping row.\r\n */\r\n\r\nconst CARD_INNER_SX = Object.freeze({\r\n display: \"flex\",\r\n flexDirection: \"column\",\r\n gap: \"var(--s-2)\",\r\n padding: \"var(--s-3)\",\r\n} satisfies SxProps<Theme>);\r\n\r\nconst HEADER_SX = Object.freeze({\r\n display: \"flex\",\r\n alignItems: \"flex-start\",\r\n justifyContent: \"space-between\",\r\n gap: \"var(--s-2)\",\r\n} satisfies SxProps<Theme>);\r\n\r\n/* Groups `leading` + title on the left of the header so the kebab keeps its\r\n * space-between position. `minWidth: 0` is what lets the title's ellipsis\r\n * actually engage inside a flex child. */\r\nconst HEADER_MAIN_SX = Object.freeze({\r\n display: \"flex\",\r\n alignItems: \"center\",\r\n gap: \"var(--s-2)\",\r\n minWidth: 0,\r\n flex: 1,\r\n} satisfies SxProps<Theme>);\r\n\r\nconst LEADING_SX = Object.freeze({\r\n display: \"inline-flex\",\r\n alignItems: \"center\",\r\n flexShrink: 0,\r\n} satisfies SxProps<Theme>);\r\n\r\nconst TITLE_BASE_SX = Object.freeze({\r\n fontWeight: \"var(--fw-semibold)\",\r\n fontSize: \"var(--text-sm)\",\r\n color: \"var(--fg)\",\r\n minWidth: 0,\r\n flex: 1,\r\n overflow: \"hidden\",\r\n textOverflow: \"ellipsis\",\r\n whiteSpace: \"nowrap\",\r\n} satisfies SxProps<Theme>);\r\n\r\nconst TITLE_MONO_SX = Object.freeze({\r\n ...TITLE_BASE_SX,\r\n fontFamily: \"var(--font-mono)\",\r\n} satisfies SxProps<Theme>);\r\n\r\nconst SUBTITLE_SX = Object.freeze({\r\n fontSize: \"var(--text-sm)\",\r\n color: \"var(--fg-muted)\",\r\n overflow: \"hidden\",\r\n textOverflow: \"ellipsis\",\r\n whiteSpace: \"nowrap\",\r\n} satisfies SxProps<Theme>);\r\n\r\nconst CHIPS_SX = Object.freeze({\r\n display: \"flex\",\r\n alignItems: \"center\",\r\n gap: \"var(--s-1)\",\r\n flexWrap: \"wrap\",\r\n} satisfies SxProps<Theme>);\r\n\r\nconst META_SX = Object.freeze({\r\n fontSize: \"var(--text-xs)\",\r\n color: \"var(--fg-subtle)\",\r\n});\r\n\r\n/* Two columns at every phone width. Deliberately not responsive: below ~320px\r\n * a single column would be more readable, but 320px is the Charter's narrowest\r\n * supported breakpoint (§07.2 xs) and two columns still fit there. Matches the\r\n * MOBILE_CARD_KV_SX both modules converged on independently. */\r\nconst KV_GRID_SX = Object.freeze({\r\n display: \"grid\",\r\n gridTemplateColumns: \"1fr 1fr\",\r\n gap: \"var(--s-2)\",\r\n} satisfies SxProps<Theme>);\r\n\r\n/* Right cluster of the header row: [trailing] then the kebab. One shared\r\n * wrapper so a card can carry both a visible action and an overflow menu, and\r\n * so propagation is stopped once for the whole interactive cluster. */\r\nconst HEADER_END_SX = Object.freeze({\r\n display: \"inline-flex\",\r\n alignItems: \"center\",\r\n gap: \"var(--s-1)\",\r\n flexShrink: 0,\r\n} satisfies SxProps<Theme>);\r\n\r\n/** One label/value pair in the card's `kv` grid. Mirrors v2.KV's own props. */\r\nexport interface MobileRowCardKV {\r\n label: React.ReactNode;\r\n value?: React.ReactNode | undefined;\r\n /** Tabular-nums monospace — for references, IDs, amounts. */\r\n mono?: boolean | undefined;\r\n /** Overrides KV's default \"—\" when the value is null/undefined/\"\". */\r\n fallback?: React.ReactNode | undefined;\r\n}\r\n\r\nexport interface MobileRowCardProps {\r\n /** Slot before the title (favourite toggle, icon, avatar). Interactive\r\n * content must stop propagation itself — see the propagation note above. */\r\n leading?: React.ReactNode | undefined;\r\n /**\r\n * Slot at the END of the header row — the VISIBLE counterpart of `actions`.\r\n *\r\n * `actions` collapses into a kebab, which is right for a listing's secondary\r\n * verbs and wrong when the action IS the point of the row: a picker modal's\r\n * \"Choisir\" button is the only way to select a row on a phone, and burying it\r\n * behind \"…\" turns one tap into two. Six sites across ms-dfd-fe and ms-ti-fe\r\n * hand-rolled the entire card layout rather than accept that, which is what\r\n * this slot exists to end.\r\n *\r\n * Renders before the kebab; both may be present.\r\n *\r\n * PROPAGATION — unlike `leading`, `trailing` shares the kebab's wrapper and\r\n * therefore DOES stop click/keydown. Its declared purpose is interactive\r\n * actions, and a tap that both fires the action and opens the row is the more\r\n * damaging default. Decorative content belongs in `leading`.\r\n */\r\n trailing?: React.ReactNode | undefined;\r\n title?: React.ReactNode | undefined;\r\n titleMono?: boolean | undefined;\r\n subtitle?: React.ReactNode | undefined;\r\n chips?: React.ReactNode[] | undefined;\r\n /** Labelled pairs rendered as a 2-column v2.KV grid. See `kv` vs `meta`. */\r\n kv?: MobileRowCardKV[] | undefined;\r\n meta?: React.ReactNode[] | undefined;\r\n actions?: OverflowMenuAction[] | undefined;\r\n /**\r\n * Accessible name for the kebab trigger.\r\n *\r\n * NO DEFAULT ON PURPOSE. This used to default to the literal \"Actions\",\r\n * which was then passed to OverflowMenu's `ariaLabel` — and `ariaLabel`\r\n * WINS over `labels.trigger`, so the card silently overrode the design\r\n * system's own canonical trigger name (\"Plus d'actions\", OverflowMenu\r\n * DEFAULT_LABELS). Result: every kebab in the fleet announced « Plus\r\n * d'actions » except the ones inside a mobile row card, which announced the\r\n * vaguer « Actions » — an inter-module naming inconsistency (Charter P2 /\r\n * R-2.4 : « un même concept = un même libellé partout »).\r\n *\r\n * Leaving it undefined lets OverflowMenu apply its own default. Hosts\r\n * SHOULD still pass a contextual name (« Actions pour 2025-IM-0042 »), which\r\n * is strictly better than either default for screen-reader users scanning a\r\n * list of cards.\r\n */\r\n actionsAriaLabel?: string | undefined;\r\n}\r\n\r\nfunction MobileRowCard({\r\n leading,\r\n trailing,\r\n title,\r\n titleMono = false,\r\n subtitle,\r\n chips,\r\n kv,\r\n meta,\r\n actions,\r\n /* No default — see the prop's doc comment. Forwarded only when the host\r\n * supplies one, so OverflowMenu's own default applies otherwise. */\r\n actionsAriaLabel,\r\n}: MobileRowCardProps) {\r\n // Filter out divider entries (OverflowMenu separator marks) and\r\n // null/undefined actions so the kebab only renders when there is\r\n // at least one real action available.\r\n const visibleActions = React.useMemo(() => {\r\n if (!Array.isArray(actions)) return [];\r\n return actions.filter((a) => a && !a.divider);\r\n }, [actions]);\r\n\r\n const visibleChips = React.useMemo(() => {\r\n if (!Array.isArray(chips)) return [];\r\n return chips.filter(Boolean);\r\n }, [chips]);\r\n\r\n const metaParts = React.useMemo(() => {\r\n if (!Array.isArray(meta)) return [];\r\n return meta.filter((p) => p != null && p !== \"\");\r\n }, [meta]);\r\n\r\n /* Only `label` is required — a pair with an empty value is kept on purpose so\r\n * KV renders its \"—\" placeholder and the grid keeps its shape across rows.\r\n * Entries missing a label are dropped: KV would emit an empty eyebrow and an\r\n * aria-labelledby pointing at nothing. */\r\n const kvPairs = React.useMemo(() => {\r\n if (!Array.isArray(kv)) return [];\r\n return kv.filter((p) => p != null && p.label != null && p.label !== \"\");\r\n }, [kv]);\r\n\r\n const hasActions = visibleActions.length > 0;\r\n const hasTitle = title != null && title !== \"\";\r\n const hasLeading = leading != null && leading !== \"\";\r\n const hasTrailing = trailing != null && trailing !== \"\";\r\n const hasHeader = hasTitle || hasActions || hasLeading || hasTrailing;\r\n const hasSubtitle = subtitle != null && subtitle !== \"\";\r\n\r\n // Title attribute (native hover tooltip) is set only when the value\r\n // is a string — wrapping a React node yields a \"[object Object]\"\r\n // tooltip which is worse than no tooltip.\r\n const titleAttr = typeof title === \"string\" ? title : undefined;\r\n const subtitleAttr =\r\n typeof subtitle === \"string\" ? subtitle : undefined;\r\n\r\n return (\r\n <Box sx={CARD_INNER_SX}>\r\n {hasHeader && (\r\n <Box sx={HEADER_SX}>\r\n {(hasLeading || hasTitle) && (\r\n <Box sx={HEADER_MAIN_SX}>\r\n {hasLeading && <Box sx={LEADING_SX}>{leading}</Box>}\r\n {hasTitle && (\r\n <Box\r\n sx={titleMono ? TITLE_MONO_SX : TITLE_BASE_SX}\r\n title={titleAttr}\r\n >\r\n {title}\r\n </Box>\r\n )}\r\n </Box>\r\n )}\r\n {(hasTrailing || hasActions) && (\r\n // The card itself is the click target (wired by DataGrid's\r\n // mobile card wrapper). Stop propagation on the whole\r\n // interactive cluster so firing a visible action, or opening\r\n // the kebab, doesn't also fire onRowClick.\r\n <Box\r\n sx={HEADER_END_SX}\r\n onClick={(e) => e.stopPropagation()}\r\n onKeyDown={(e) => e.stopPropagation()}\r\n >\r\n {hasTrailing && trailing}\r\n {hasActions && (\r\n <OverflowMenu\r\n {...(actionsAriaLabel !== undefined ? { ariaLabel: actionsAriaLabel } : {})}\r\n {...(actions !== undefined ? { actions } : {})}\r\n />\r\n )}\r\n </Box>\r\n )}\r\n </Box>\r\n )}\r\n {hasSubtitle && (\r\n <Box sx={SUBTITLE_SX} title={subtitleAttr}>\r\n {subtitle}\r\n </Box>\r\n )}\r\n {visibleChips.length > 0 && (\r\n <Box sx={CHIPS_SX}>\r\n {visibleChips.map((c, i) => (\r\n <React.Fragment key={i}>{c}</React.Fragment>\r\n ))}\r\n </Box>\r\n )}\r\n {kvPairs.length > 0 && (\r\n <Box sx={KV_GRID_SX}>\r\n {kvPairs.map((pair, i) => (\r\n <KV\r\n key={i}\r\n label={pair.label}\r\n {...(pair.value !== undefined ? { value: pair.value } : {})}\r\n {...(pair.mono !== undefined ? { mono: pair.mono } : {})}\r\n {...(pair.fallback !== undefined ? { fallback: pair.fallback } : {})}\r\n />\r\n ))}\r\n </Box>\r\n )}\r\n {metaParts.length > 0 && (\r\n <Box sx={META_SX}>{metaParts.join(\" · \")}</Box>\r\n )}\r\n </Box>\r\n );\r\n}\r\n\r\nexport default MobileRowCard;\r\n"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,IAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,aAAA,GAAAD,sBAAA,CAAAF,OAAA;AAEA,IAAAI,GAAA,GAAAF,sBAAA,CAAAF,OAAA;AAAsB,IAAAK,WAAA,GAAAL,OAAA;AAAA,SAAAE,uBAAAI,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,gBAAAA,GAAA;AAAA,SAAAE,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,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AAAC,QAAA,oBAAAjD,GAAA,CAAAgB,GAAA,IAAA8B,KAAA,WAAA9C,GAAA;AAAA,SAAA+C,eAAAG,GAAA,QAAAlC,GAAA,GAAAmC,YAAA,CAAAD,GAAA,oBAAA3C,OAAA,CAAAS,GAAA,iBAAAA,GAAA,GAAAoC,MAAA,CAAApC,GAAA;AAAA,SAAAmC,aAAAE,KAAA,EAAAC,IAAA,QAAA/C,OAAA,CAAA8C,KAAA,kBAAAA,KAAA,kBAAAA,KAAA,MAAAE,IAAA,GAAAF,KAAA,CAAA/B,MAAA,CAAAkC,WAAA,OAAAD,IAAA,KAAAE,SAAA,QAAAC,GAAA,GAAAH,IAAA,CAAApC,IAAA,CAAAkC,KAAA,EAAAC,IAAA,oBAAA/C,OAAA,CAAAmD,GAAA,uBAAAA,GAAA,YAAAC,SAAA,4DAAAL,IAAA,gBAAAF,MAAA,GAAAQ,MAAA,EAAAP,KAAA,KAEtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,IAAMQ,aAAa,GAAGhD,MAAM,CAACiD,MAAM,CAAC;EAClCC,OAAO,EAAE,MAAM;EACfC,aAAa,EAAE,QAAQ;EACvBC,GAAG,EAAE,YAAY;EACjBC,OAAO,EAAE;AACX,CAA0B,CAAC;AA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,IAAAvC,WAAA,CAAAgI,GAAA,EAACjI,GAAA,WAAE,EAAAsC,aAAA,CAAAA,aAAA,CAAAA,aAAA;UAED+E,KAAK,EAAEqB,IAAI,CAACrB;QAAM,GACbqB,IAAI,CAAC1F,KAAK,KAAKW,SAAS,GAAG;UAAEX,KAAK,EAAE0F,IAAI,CAAC1F;QAAM,CAAC,GAAG,CAAC,CAAC,GACrD0F,IAAI,CAACC,IAAI,KAAKhF,SAAS,GAAG;UAAEgF,IAAI,EAAED,IAAI,CAACC;QAAK,CAAC,GAAG,CAAC,CAAC,GAClDD,IAAI,CAACE,QAAQ,KAAKjF,SAAS,GAAG;UAAEiF,QAAQ,EAAEF,IAAI,CAACE;QAAS,CAAC,GAAG,CAAC,CAAC,GAJ9DpG,CAKN,CAAC;MAAA,CACH;IAAC,CACC,CACN,EACA0E,SAAS,CAACxE,MAAM,GAAG,CAAC,iBACnB,IAAAzC,WAAA,CAAAgI,GAAA,EAACpI,IAAA,WAAG;MAACkI,EAAE,EAAEtC,OAAQ;MAAAuC,QAAA,EAAEd,SAAS,CAAC2B,IAAI,CAAC,KAAK;IAAC,CAAM,CAC/C;EAAA,CACE,CAAC;AAEV;AAAC,IAAAC,QAAA,GAAAC,OAAA,cAEclD,aAAa","ignoreList":[]}
@@ -1,20 +1,20 @@
1
1
  import * as React from "react";
2
2
  export type ModalSize = "sm" | "md" | "lg" | "xl";
3
3
  export interface ModalProps {
4
- open?: boolean;
5
- onClose?: () => void;
6
- title?: React.ReactNode;
7
- subtitle?: React.ReactNode;
8
- children?: React.ReactNode;
9
- footer?: React.ReactNode;
10
- size?: ModalSize;
11
- disableBackdropClick?: boolean;
12
- disableEscape?: boolean;
4
+ open?: boolean | undefined;
5
+ onClose?: (() => void) | undefined;
6
+ title?: React.ReactNode | undefined;
7
+ subtitle?: React.ReactNode | undefined;
8
+ children?: React.ReactNode | undefined;
9
+ footer?: React.ReactNode | undefined;
10
+ size?: ModalSize | undefined;
11
+ disableBackdropClick?: boolean | undefined;
12
+ disableEscape?: boolean | undefined;
13
13
  /** R-RS.2 — go full-screen below the `sm` token (< 481px). Default true. */
14
- fullScreenOnMobile?: boolean;
14
+ fullScreenOnMobile?: boolean | undefined;
15
15
  /** Accessible name for the dialog when no `title` is rendered (R-M.3). */
16
- ariaLabel?: string;
17
- ariaLabelClose?: string;
16
+ ariaLabel?: string | undefined;
17
+ ariaLabelClose?: string | undefined;
18
18
  }
19
19
  declare function Modal({ open, onClose, title, subtitle, children, footer, size, disableBackdropClick, disableEscape, fullScreenOnMobile, ariaLabel, ariaLabelClose, }: ModalProps): React.JSX.Element;
20
20
  export default Modal;
@@ -1 +1 @@
1
- {"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../src/lib/v2/components/Modal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA2J/B,MAAM,MAAM,SAAS,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAElD,MAAM,WAAW,UAAU;IACzB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,4EAA4E;IAC5E,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,0EAA0E;IAC1E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,iBAAS,KAAK,CAAC,EACb,IAAI,EACJ,OAAO,EACP,KAAK,EAC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EACzB,SAAS,EACT,cAA8C,GAC/C,EAAE,UAAU,qBAwGZ;AAED,eAAe,KAAK,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Modal.js","names":["React","_interopRequireWildcard","require","_Dialog","_interopRequireDefault","_DialogTitle","_DialogContent","_DialogActions","_IconButton","_Close","_Typography","_useMediaQuery","_styles","_tokens","_useFocusTrap","_jsxRuntime","obj","__esModule","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","Symbol","iterator","constructor","ownKeys","object","enumerableOnly","keys","getOwnPropertySymbols","symbols","filter","sym","enumerable","push","apply","_objectSpread","target","i","arguments","length","source","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","value","_toPropertyKey","configurable","writable","arg","_toPrimitive","String","input","hint","prim","toPrimitive","undefined","res","TypeError","Number","DIALOG_ROOT_SX","freeze","zIndex","modal","BACKDROP_SLOT_PROPS","sx","backgroundColor","PAPER_BASE_SX","width","borderRadius","boxShadow","PAPER_FULLSCREEN_SX","maxWidth","DIALOG_TITLE_SX","padding","display","alignItems","justifyContent","gap","TITLE_TYPOGRAPHY_SX","fontSize","fontWeight","color","SUBTITLE_TYPOGRAPHY_SX","marginTop","CLOSE_ICON_BUTTON_SX","marginRight","DIALOG_CONTENT_SX","borderColor","DIALOG_ACTIONS_SX","Modal","_ref","open","onClose","title","subtitle","children","footer","_ref$size","size","_ref$disableBackdropC","disableBackdropClick","_ref$disableEscape","disableEscape","_ref$fullScreenOnMobi","fullScreenOnMobile","ariaLabel","_ref$ariaLabelClose","ariaLabelClose","titleId","useId","paperRef","useRef","useFocusTrap","theme","useTheme","isMobile","useMediaQuery","breakpoints","down","fullScreen","handleClose","_e","reason","layout","md","slotProps","useMemo","paper","ref","backdrop","jsxs","role","disableAutoFocus","disableEnforceFocus","disableRestoreFocus","jsx","id","variant","component","onClick","dividers","_default","exports"],"sources":["../../../src/lib/v2/components/Modal.tsx"],"sourcesContent":["import * as React from \"react\";\r\nimport Dialog from \"@mui/material/Dialog\";\r\nimport DialogTitle from \"@mui/material/DialogTitle\";\r\nimport DialogContent from \"@mui/material/DialogContent\";\r\nimport DialogActions from \"@mui/material/DialogActions\";\r\nimport IconButton from \"@mui/material/IconButton\";\r\nimport CloseIcon from \"@mui/icons-material/Close\";\r\nimport Typography from \"@mui/material/Typography\";\r\nimport useMediaQuery from \"@mui/material/useMediaQuery\";\r\nimport { useTheme } from \"@mui/material/styles\";\r\nimport type { SxProps, Theme } from \"@mui/material/styles\";\r\nimport { layout, zIndex } from \"../tokens\";\r\nimport useFocusTrap from \"../hooks/useFocusTrap\";\r\n\r\n/**\r\n * Modal - Portnet UI v2\r\n *\r\n * Charter §03 · Component \"Modal · Dialog\".\r\n *\r\n * R-M.1 - Closable via Esc + backdrop click + explicit X button.\r\n * R-M.2 - Focus trap when open, focus restored to trigger on close.\r\n * Backed by the v2 useFocusTrap hook (Batch 3) - honours\r\n * [autofocus] and [data-autofocus] markers, coordinates\r\n * with nested traps via a module-level trapStack, and\r\n * filters disabled/hidden/inert subtrees.\r\n * R-M.3 - role=\"dialog\" + aria-modal=\"true\" + aria-labelledby.\r\n * R-M.4 - No modal inside modal - use stepper flow.\r\n * R-M.5 - Use Drawer (not Modal) for ≥ 3 fields or long scroll.\r\n * R-M.6 - Action principale à droite, secondaire à gauche.\r\n * R-RS.2 - Below the `sm` breakpoint token (< 481px) the dialog goes\r\n * FULL-SCREEN by default. A md/lg/xl modal centred with its\r\n * token max-width left only a thin sliver of usable width at\r\n * 320–375px; full-screen restores a usable reading column and\r\n * keeps the footer actions reachable (WCAG 1.4.10 Reflow).\r\n * Opt out with fullScreenOnMobile={false} for genuinely tiny\r\n * confirm dialogs that read better centred.\r\n *\r\n * <Modal open={open} onClose={close} title=\"Confirmation\" size=\"sm\"\r\n * footer={<><Button variant=\"ghost\" onClick={close}>Annuler</Button>\r\n * <Button variant=\"primary\">OK</Button></>}>\r\n * Body content here.\r\n * </Modal>\r\n *\r\n * Accessible name (R-Ar.5 / R-M.3):\r\n * `aria-labelledby` points at the title <Typography> (id=titleId), so the\r\n * dialog's accessible name is the title text ONLY — the close button and\r\n * subtitle are not part of it. When no `title` is provided, pass `ariaLabel`\r\n * to name the dialog; otherwise it would have no accessible name.\r\n *\r\n * Initial focus targeting (R-Ar.4):\r\n * By default the FIRST focusable element of the dialog gets focus on\r\n * open. To opt a specific control in (e.g. the destructive \"Delete\"\r\n * button which intentionally is NOT first), mark it with either:\r\n * - React's <button autoFocus> attribute (standard), or\r\n * - <button data-autofocus> (v2 marker, identical effect).\r\n * Both are matched by useFocusTrap's AUTOFOCUS_SELECTORS.\r\n *\r\n * Stacking:\r\n * The modal's portal layer uses the v2 `zIndex.modal` token (100), so\r\n * it stacks ABOVE a Drawer (zIndex.drawer:80) when opened from inside\r\n * one (e.g. a ReferentielField search launched from the filters Drawer)\r\n * and BELOW snackbar:150 / toast:200 / tooltip:250 so notifications and\r\n * tooltips fired from a modal action stay on top. MUI popups rendered\r\n * inside the modal — Combobox/Autocomplete listboxes and X date-picker\r\n * calendars — also render at theme.zIndex.modal (100) and, opening\r\n * after the dialog, paint above it by DOM order (MUI's own\r\n * Dialog+Autocomplete contract). A previous build hardcoded 1350 here\r\n * (a leftover from MUI's 1100..1500 scale before the v2 remap to\r\n * 0..250); that buried those in-modal popups (at 100) behind the modal\r\n * and pushed the modal above toasts/tooltips.\r\n */\r\n\r\n/* ── Hoisted static sx (D5) ────────────────────────────────────────────\r\n * Frozen at module load. Same emotion / allocation rationale as Tabs +\r\n * DataGrid hoisting. The paper slotProps cannot be fully hoisted because\r\n * it embeds the dynamic `maxWidth` (size-driven) and the `ref` (per\r\n * Modal instance) — its static base is hoisted and the dynamic\r\n * additions are layered via useMemo at the call site.\r\n */\r\n\r\nconst DIALOG_ROOT_SX = Object.freeze({\r\n // v2 z-index token (zIndex.js). modal:100 sits ABOVE drawer:80 (so a\r\n // Modal opened from inside a Drawer stacks correctly) and BELOW\r\n // snackbar:150 / toast:200 / tooltip:250. In-modal MUI popups\r\n // (Combobox listboxes, X date-picker calendars) also use\r\n // theme.zIndex.modal and paint above the dialog by DOM order. The\r\n // previous hardcoded 1350 predated the v2 remap of MUI's 1100..1500\r\n // scale down to 0..250.\r\n zIndex: zIndex.modal,\r\n});\r\n\r\n// MUI v9: backdrop forwarded via slotProps.backdrop (was BackdropProps\r\n// at the Dialog top-level in v5/v6/v7, removed in v9). The content\r\n// `{ sx: {...} }` is unchanged — the backdrop slot receives the same\r\n// shape.\r\nconst BACKDROP_SLOT_PROPS = Object.freeze({\r\n // R-AI.1 - backdrop derived from the live --fg token instead of hard\r\n // rgba(15,21,37,...). Adapts to any future theme override.\r\n sx: { backgroundColor: \"color-mix(in srgb, var(--fg) 45%, transparent)\" },\r\n});\r\n\r\nconst PAPER_BASE_SX = Object.freeze({\r\n width: \"100%\",\r\n borderRadius: \"var(--r-lg)\",\r\n boxShadow: \"var(--shadow-lg)\",\r\n});\r\n\r\n/* R-RS.2 — full-screen paper sx for the mobile (< sm token) branch.\r\n * Drops the rounded corners + shadow (no longer floating) and lets the\r\n * paper fill the viewport. maxWidth is forced to 100% so the size-driven\r\n * token max-width can't re-clamp it. Kept as a frozen module constant so\r\n * the reference is stable across renders. */\r\nconst PAPER_FULLSCREEN_SX = Object.freeze({\r\n width: \"100%\",\r\n maxWidth: \"100%\",\r\n borderRadius: 0,\r\n boxShadow: \"none\",\r\n});\r\n\r\nconst DIALOG_TITLE_SX = Object.freeze({\r\n padding: \"var(--s-4) var(--s-5) var(--s-2)\",\r\n display: \"flex\",\r\n alignItems: \"flex-start\",\r\n justifyContent: \"space-between\",\r\n gap: \"var(--s-2)\",\r\n} satisfies SxProps<Theme>);\r\n\r\nconst TITLE_TYPOGRAPHY_SX = Object.freeze({\r\n fontSize: \"var(--text-h3)\",\r\n fontWeight: \"var(--fw-bold)\",\r\n color: \"var(--fg)\",\r\n});\r\n\r\nconst SUBTITLE_TYPOGRAPHY_SX = Object.freeze({\r\n fontSize: \"var(--text-sm)\",\r\n color: \"var(--fg-muted)\",\r\n marginTop: \"var(--s-1)\",\r\n});\r\n\r\nconst CLOSE_ICON_BUTTON_SX = Object.freeze({\r\n color: \"var(--fg-subtle)\",\r\n marginRight: \"calc(-1 * var(--s-1))\",\r\n marginTop: \"calc(-1 * var(--s-1))\",\r\n});\r\n\r\nconst DIALOG_CONTENT_SX = Object.freeze({\r\n padding: \"var(--s-4) var(--s-5)\",\r\n borderColor: \"var(--border)\",\r\n});\r\n\r\nconst DIALOG_ACTIONS_SX = Object.freeze({\r\n padding: \"var(--s-3) var(--s-5) var(--s-4)\",\r\n gap: \"var(--s-2)\",\r\n});\r\n\r\nexport type ModalSize = \"sm\" | \"md\" | \"lg\" | \"xl\";\r\n\r\nexport interface ModalProps {\r\n open?: boolean;\r\n onClose?: () => void;\r\n title?: React.ReactNode;\r\n subtitle?: React.ReactNode;\r\n children?: React.ReactNode;\r\n footer?: React.ReactNode;\r\n size?: ModalSize;\r\n disableBackdropClick?: boolean;\r\n disableEscape?: boolean;\r\n /** R-RS.2 — go full-screen below the `sm` token (< 481px). Default true. */\r\n fullScreenOnMobile?: boolean;\r\n /** Accessible name for the dialog when no `title` is rendered (R-M.3). */\r\n ariaLabel?: string;\r\n ariaLabelClose?: string;\r\n}\r\n\r\nfunction Modal({\r\n open,\r\n onClose,\r\n title,\r\n subtitle,\r\n children,\r\n footer,\r\n size = \"md\",\r\n disableBackdropClick = false,\r\n disableEscape = false,\r\n fullScreenOnMobile = true,\r\n ariaLabel,\r\n ariaLabelClose = \"Fermer la boîte de dialogue\",\r\n}: ModalProps) {\r\n // R-Ar.5 - stable, per-instance, collision-safe ID for aria-labelledby.\r\n const titleId = React.useId();\r\n\r\n // R-F.2 / R-M.2 - the v2 trap is wired on the Dialog Paper element,\r\n // activated only while the modal is open. MUI's own trap is disabled\r\n // via the disable*Focus props on Dialog below so the two implementations\r\n // don't compete for the same DOM event stream.\r\n const paperRef = React.useRef<HTMLDivElement>(null);\r\n useFocusTrap(paperRef, !!open);\r\n\r\n // R-RS.2 — full-screen below the `sm` breakpoint TOKEN (< 481px now\r\n // that tokens are wired into the theme). Reads the live theme so a host\r\n // breakpoint override is honoured. Gated behind fullScreenOnMobile so a\r\n // caller can keep a small confirm dialog centred on phones.\r\n const theme = useTheme();\r\n const isMobile = useMediaQuery(theme.breakpoints.down(\"sm\"));\r\n const fullScreen = fullScreenOnMobile && isMobile;\r\n\r\n const handleClose = (_e: unknown, reason: \"backdropClick\" | \"escapeKeyDown\") => {\r\n if (reason === \"backdropClick\" && disableBackdropClick) return;\r\n if (reason === \"escapeKeyDown\" && disableEscape) return;\r\n onClose?.();\r\n };\r\n\r\n // R-AI.1 - modal sizing is owned by the token system (layout.modal),\r\n // not duplicated here. See src/lib/v2/tokens/density.js.\r\n const maxWidth = layout.modal[size] || layout.modal.md;\r\n\r\n // MUI v9: paper slot is forwarded through slotProps.paper. The slot\r\n // cannot be fully hoisted — embeds the dynamic maxWidth (size-driven)\r\n // and the per-instance ref. Memo on [maxWidth, fullScreen] so the\r\n // reference is stable until either the size or the mobile branch flips.\r\n const slotProps = React.useMemo(\r\n () => ({\r\n paper: {\r\n ref: paperRef,\r\n sx: fullScreen\r\n ? { ...PAPER_FULLSCREEN_SX }\r\n : { ...PAPER_BASE_SX, maxWidth },\r\n },\r\n backdrop: BACKDROP_SLOT_PROPS,\r\n }),\r\n [maxWidth, fullScreen]\r\n );\r\n\r\n return (\r\n <Dialog\r\n open={!!open}\r\n onClose={handleClose}\r\n role=\"dialog\"\r\n aria-modal=\"true\"\r\n // Name = title text only (id is on the title Typography). Falls back\r\n // to ariaLabel when the dialog has no title.\r\n aria-labelledby={title != null ? titleId : undefined}\r\n aria-label={title == null ? ariaLabel : undefined}\r\n maxWidth={false}\r\n // R-RS.2 — hand the full-screen decision to MUI's own prop so it\r\n // applies the correct fullscreen paper geometry (100vw/100vh,\r\n // no margin); our PAPER_FULLSCREEN_SX only relaxes radius/shadow.\r\n fullScreen={fullScreen}\r\n // Hand over focus management to useFocusTrap above. Dialog still\r\n // owns the Portal, Backdrop, scroll lock, transitions, and Esc\r\n // wiring - just not the focus trap itself.\r\n disableAutoFocus\r\n disableEnforceFocus\r\n disableRestoreFocus\r\n // Root sx anchors the portal at the v2 zIndex.modal token — above\r\n // the Drawer, below snackbar/toast/tooltip. See DIALOG_ROOT_SX.\r\n sx={DIALOG_ROOT_SX}\r\n slotProps={slotProps}\r\n >\r\n <DialogTitle sx={DIALOG_TITLE_SX}>\r\n <div>\r\n <Typography id={titleId} variant=\"h3\" component=\"h2\" sx={TITLE_TYPOGRAPHY_SX}>\r\n {title}\r\n </Typography>\r\n {subtitle && (\r\n <Typography sx={SUBTITLE_TYPOGRAPHY_SX}>\r\n {subtitle}\r\n </Typography>\r\n )}\r\n </div>\r\n <IconButton\r\n aria-label={ariaLabelClose}\r\n onClick={onClose}\r\n size=\"small\"\r\n sx={CLOSE_ICON_BUTTON_SX}\r\n >\r\n <CloseIcon fontSize=\"small\" />\r\n </IconButton>\r\n </DialogTitle>\r\n\r\n <DialogContent dividers={!!footer} sx={DIALOG_CONTENT_SX}>\r\n {children}\r\n </DialogContent>\r\n\r\n {footer && (\r\n <DialogActions sx={DIALOG_ACTIONS_SX}>\r\n {footer}\r\n </DialogActions>\r\n )}\r\n </Dialog>\r\n );\r\n}\r\n\r\nexport default Modal;\r\n"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,YAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,cAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,cAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,WAAA,GAAAJ,sBAAA,CAAAF,OAAA;AACA,IAAAO,MAAA,GA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,QAAQ,EAAC;QAAO,CAAE;MAAC,CACpB,CAAC;IAAA,CACF,CAAC,eAEd,IAAAlF,WAAA,CAAA0I,GAAA,EAACnJ,cAAA,WAAa;MAACwJ,QAAQ,EAAE,CAAC,CAAC5C,MAAO;MAAChC,EAAE,EAAEsB,iBAAkB;MAAAS,QAAA,EACtDA;IAAQ,CACI,CAAC,EAEfC,MAAM,iBACL,IAAAnG,WAAA,CAAA0I,GAAA,EAAClJ,cAAA,WAAa;MAAC2E,EAAE,EAAEwB,iBAAkB;MAAAO,QAAA,EAClCC;IAAM,CACM,CAChB;EAAA,CACK,CAAC;AAEb;AAAC,IAAA6C,QAAA,GAAAC,OAAA,cAEcrD,KAAK","ignoreList":[]}
1
+ {"version":3,"file":"Modal.js","names":["React","_interopRequireWildcard","require","_Dialog","_interopRequireDefault","_DialogTitle","_DialogContent","_DialogActions","_IconButton","_Close","_Typography","_useMediaQuery","_styles","_tokens","_useFocusTrap","_jsxRuntime","obj","__esModule","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","Symbol","iterator","constructor","ownKeys","object","enumerableOnly","keys","getOwnPropertySymbols","symbols","filter","sym","enumerable","push","apply","_objectSpread","target","i","arguments","length","source","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","value","_toPropertyKey","configurable","writable","arg","_toPrimitive","String","input","hint","prim","toPrimitive","undefined","res","TypeError","Number","DIALOG_ROOT_SX","freeze","zIndex","modal","BACKDROP_SLOT_PROPS","sx","backgroundColor","PAPER_BASE_SX","width","borderRadius","boxShadow","PAPER_FULLSCREEN_SX","maxWidth","DIALOG_TITLE_SX","padding","display","alignItems","justifyContent","gap","TITLE_TYPOGRAPHY_SX","fontSize","fontWeight","color","SUBTITLE_TYPOGRAPHY_SX","marginTop","CLOSE_ICON_BUTTON_SX","marginRight","DIALOG_CONTENT_SX","borderColor","DIALOG_ACTIONS_SX","Modal","_ref","open","onClose","title","subtitle","children","footer","_ref$size","size","_ref$disableBackdropC","disableBackdropClick","_ref$disableEscape","disableEscape","_ref$fullScreenOnMobi","fullScreenOnMobile","ariaLabel","_ref$ariaLabelClose","ariaLabelClose","titleId","useId","paperRef","useRef","useFocusTrap","theme","useTheme","isMobile","useMediaQuery","breakpoints","down","fullScreen","handleClose","_e","reason","layout","md","slotProps","useMemo","paper","ref","backdrop","jsxs","role","disableAutoFocus","disableEnforceFocus","disableRestoreFocus","jsx","id","variant","component","onClick","dividers","_default","exports"],"sources":["../../../src/lib/v2/components/Modal.tsx"],"sourcesContent":["import * as React from \"react\";\r\nimport Dialog from \"@mui/material/Dialog\";\r\nimport DialogTitle from \"@mui/material/DialogTitle\";\r\nimport DialogContent from \"@mui/material/DialogContent\";\r\nimport DialogActions from \"@mui/material/DialogActions\";\r\nimport IconButton from \"@mui/material/IconButton\";\r\nimport CloseIcon from \"@mui/icons-material/Close\";\r\nimport Typography from \"@mui/material/Typography\";\r\nimport useMediaQuery from \"@mui/material/useMediaQuery\";\r\nimport { useTheme } from \"@mui/material/styles\";\r\nimport type { SxProps, Theme } from \"@mui/material/styles\";\r\nimport { layout, zIndex } from \"../tokens\";\r\nimport useFocusTrap from \"../hooks/useFocusTrap\";\r\n\r\n/**\r\n * Modal - Portnet UI v2\r\n *\r\n * Charter §03 · Component \"Modal · Dialog\".\r\n *\r\n * R-M.1 - Closable via Esc + backdrop click + explicit X button.\r\n * R-M.2 - Focus trap when open, focus restored to trigger on close.\r\n * Backed by the v2 useFocusTrap hook (Batch 3) - honours\r\n * [autofocus] and [data-autofocus] markers, coordinates\r\n * with nested traps via a module-level trapStack, and\r\n * filters disabled/hidden/inert subtrees.\r\n * R-M.3 - role=\"dialog\" + aria-modal=\"true\" + aria-labelledby.\r\n * R-M.4 - No modal inside modal - use stepper flow.\r\n * R-M.5 - Use Drawer (not Modal) for ≥ 3 fields or long scroll.\r\n * R-M.6 - Action principale à droite, secondaire à gauche.\r\n * R-RS.2 - Below the `sm` breakpoint token (< 481px) the dialog goes\r\n * FULL-SCREEN by default. A md/lg/xl modal centred with its\r\n * token max-width left only a thin sliver of usable width at\r\n * 320–375px; full-screen restores a usable reading column and\r\n * keeps the footer actions reachable (WCAG 1.4.10 Reflow).\r\n * Opt out with fullScreenOnMobile={false} for genuinely tiny\r\n * confirm dialogs that read better centred.\r\n *\r\n * <Modal open={open} onClose={close} title=\"Confirmation\" size=\"sm\"\r\n * footer={<><Button variant=\"ghost\" onClick={close}>Annuler</Button>\r\n * <Button variant=\"primary\">OK</Button></>}>\r\n * Body content here.\r\n * </Modal>\r\n *\r\n * Accessible name (R-Ar.5 / R-M.3):\r\n * `aria-labelledby` points at the title <Typography> (id=titleId), so the\r\n * dialog's accessible name is the title text ONLY — the close button and\r\n * subtitle are not part of it. When no `title` is provided, pass `ariaLabel`\r\n * to name the dialog; otherwise it would have no accessible name.\r\n *\r\n * Initial focus targeting (R-Ar.4):\r\n * By default the FIRST focusable element of the dialog gets focus on\r\n * open. To opt a specific control in (e.g. the destructive \"Delete\"\r\n * button which intentionally is NOT first), mark it with either:\r\n * - React's <button autoFocus> attribute (standard), or\r\n * - <button data-autofocus> (v2 marker, identical effect).\r\n * Both are matched by useFocusTrap's AUTOFOCUS_SELECTORS.\r\n *\r\n * Stacking:\r\n * The modal's portal layer uses the v2 `zIndex.modal` token (100), so\r\n * it stacks ABOVE a Drawer (zIndex.drawer:80) when opened from inside\r\n * one (e.g. a ReferentielField search launched from the filters Drawer)\r\n * and BELOW snackbar:150 / toast:200 / tooltip:250 so notifications and\r\n * tooltips fired from a modal action stay on top. MUI popups rendered\r\n * inside the modal — Combobox/Autocomplete listboxes and X date-picker\r\n * calendars — also render at theme.zIndex.modal (100) and, opening\r\n * after the dialog, paint above it by DOM order (MUI's own\r\n * Dialog+Autocomplete contract). A previous build hardcoded 1350 here\r\n * (a leftover from MUI's 1100..1500 scale before the v2 remap to\r\n * 0..250); that buried those in-modal popups (at 100) behind the modal\r\n * and pushed the modal above toasts/tooltips.\r\n */\r\n\r\n/* ── Hoisted static sx (D5) ────────────────────────────────────────────\r\n * Frozen at module load. Same emotion / allocation rationale as Tabs +\r\n * DataGrid hoisting. The paper slotProps cannot be fully hoisted because\r\n * it embeds the dynamic `maxWidth` (size-driven) and the `ref` (per\r\n * Modal instance) — its static base is hoisted and the dynamic\r\n * additions are layered via useMemo at the call site.\r\n */\r\n\r\nconst DIALOG_ROOT_SX = Object.freeze({\r\n // v2 z-index token (zIndex.js). modal:100 sits ABOVE drawer:80 (so a\r\n // Modal opened from inside a Drawer stacks correctly) and BELOW\r\n // snackbar:150 / toast:200 / tooltip:250. In-modal MUI popups\r\n // (Combobox listboxes, X date-picker calendars) also use\r\n // theme.zIndex.modal and paint above the dialog by DOM order. The\r\n // previous hardcoded 1350 predated the v2 remap of MUI's 1100..1500\r\n // scale down to 0..250.\r\n zIndex: zIndex.modal,\r\n});\r\n\r\n// MUI v9: backdrop forwarded via slotProps.backdrop (was BackdropProps\r\n// at the Dialog top-level in v5/v6/v7, removed in v9). The content\r\n// `{ sx: {...} }` is unchanged — the backdrop slot receives the same\r\n// shape.\r\nconst BACKDROP_SLOT_PROPS = Object.freeze({\r\n // R-AI.1 - backdrop derived from the live --fg token instead of hard\r\n // rgba(15,21,37,...). Adapts to any future theme override.\r\n sx: { backgroundColor: \"color-mix(in srgb, var(--fg) 45%, transparent)\" },\r\n});\r\n\r\nconst PAPER_BASE_SX = Object.freeze({\r\n width: \"100%\",\r\n borderRadius: \"var(--r-lg)\",\r\n boxShadow: \"var(--shadow-lg)\",\r\n});\r\n\r\n/* R-RS.2 — full-screen paper sx for the mobile (< sm token) branch.\r\n * Drops the rounded corners + shadow (no longer floating) and lets the\r\n * paper fill the viewport. maxWidth is forced to 100% so the size-driven\r\n * token max-width can't re-clamp it. Kept as a frozen module constant so\r\n * the reference is stable across renders. */\r\nconst PAPER_FULLSCREEN_SX = Object.freeze({\r\n width: \"100%\",\r\n maxWidth: \"100%\",\r\n borderRadius: 0,\r\n boxShadow: \"none\",\r\n});\r\n\r\nconst DIALOG_TITLE_SX = Object.freeze({\r\n padding: \"var(--s-4) var(--s-5) var(--s-2)\",\r\n display: \"flex\",\r\n alignItems: \"flex-start\",\r\n justifyContent: \"space-between\",\r\n gap: \"var(--s-2)\",\r\n} satisfies SxProps<Theme>);\r\n\r\nconst TITLE_TYPOGRAPHY_SX = Object.freeze({\r\n fontSize: \"var(--text-h3)\",\r\n fontWeight: \"var(--fw-bold)\",\r\n color: \"var(--fg)\",\r\n});\r\n\r\nconst SUBTITLE_TYPOGRAPHY_SX = Object.freeze({\r\n fontSize: \"var(--text-sm)\",\r\n color: \"var(--fg-muted)\",\r\n marginTop: \"var(--s-1)\",\r\n});\r\n\r\nconst CLOSE_ICON_BUTTON_SX = Object.freeze({\r\n color: \"var(--fg-subtle)\",\r\n marginRight: \"calc(-1 * var(--s-1))\",\r\n marginTop: \"calc(-1 * var(--s-1))\",\r\n});\r\n\r\nconst DIALOG_CONTENT_SX = Object.freeze({\r\n padding: \"var(--s-4) var(--s-5)\",\r\n borderColor: \"var(--border)\",\r\n});\r\n\r\nconst DIALOG_ACTIONS_SX = Object.freeze({\r\n padding: \"var(--s-3) var(--s-5) var(--s-4)\",\r\n gap: \"var(--s-2)\",\r\n});\r\n\r\nexport type ModalSize = \"sm\" | \"md\" | \"lg\" | \"xl\";\r\n\r\nexport interface ModalProps {\r\n open?: boolean | undefined;\r\n onClose?: (() => void) | undefined;\r\n title?: React.ReactNode | undefined;\r\n subtitle?: React.ReactNode | undefined;\r\n children?: React.ReactNode | undefined;\r\n footer?: React.ReactNode | undefined;\r\n size?: ModalSize | undefined;\r\n disableBackdropClick?: boolean | undefined;\r\n disableEscape?: boolean | undefined;\r\n /** R-RS.2 — go full-screen below the `sm` token (< 481px). Default true. */\r\n fullScreenOnMobile?: boolean | undefined;\r\n /** Accessible name for the dialog when no `title` is rendered (R-M.3). */\r\n ariaLabel?: string | undefined;\r\n ariaLabelClose?: string | undefined;\r\n}\r\n\r\nfunction Modal({\r\n open,\r\n onClose,\r\n title,\r\n subtitle,\r\n children,\r\n footer,\r\n size = \"md\",\r\n disableBackdropClick = false,\r\n disableEscape = false,\r\n fullScreenOnMobile = true,\r\n ariaLabel,\r\n ariaLabelClose = \"Fermer la boîte de dialogue\",\r\n}: ModalProps) {\r\n // R-Ar.5 - stable, per-instance, collision-safe ID for aria-labelledby.\r\n const titleId = React.useId();\r\n\r\n // R-F.2 / R-M.2 - the v2 trap is wired on the Dialog Paper element,\r\n // activated only while the modal is open. MUI's own trap is disabled\r\n // via the disable*Focus props on Dialog below so the two implementations\r\n // don't compete for the same DOM event stream.\r\n const paperRef = React.useRef<HTMLDivElement>(null);\r\n useFocusTrap(paperRef, !!open);\r\n\r\n // R-RS.2 — full-screen below the `sm` breakpoint TOKEN (< 481px now\r\n // that tokens are wired into the theme). Reads the live theme so a host\r\n // breakpoint override is honoured. Gated behind fullScreenOnMobile so a\r\n // caller can keep a small confirm dialog centred on phones.\r\n const theme = useTheme();\r\n const isMobile = useMediaQuery(theme.breakpoints.down(\"sm\"));\r\n const fullScreen = fullScreenOnMobile && isMobile;\r\n\r\n const handleClose = (_e: unknown, reason: \"backdropClick\" | \"escapeKeyDown\") => {\r\n if (reason === \"backdropClick\" && disableBackdropClick) return;\r\n if (reason === \"escapeKeyDown\" && disableEscape) return;\r\n onClose?.();\r\n };\r\n\r\n // R-AI.1 - modal sizing is owned by the token system (layout.modal),\r\n // not duplicated here. See src/lib/v2/tokens/density.js.\r\n const maxWidth = layout.modal[size] || layout.modal.md;\r\n\r\n // MUI v9: paper slot is forwarded through slotProps.paper. The slot\r\n // cannot be fully hoisted — embeds the dynamic maxWidth (size-driven)\r\n // and the per-instance ref. Memo on [maxWidth, fullScreen] so the\r\n // reference is stable until either the size or the mobile branch flips.\r\n const slotProps = React.useMemo(\r\n () => ({\r\n paper: {\r\n ref: paperRef,\r\n sx: fullScreen\r\n ? { ...PAPER_FULLSCREEN_SX }\r\n : { ...PAPER_BASE_SX, maxWidth },\r\n },\r\n backdrop: BACKDROP_SLOT_PROPS,\r\n }),\r\n [maxWidth, fullScreen]\r\n );\r\n\r\n return (\r\n <Dialog\r\n open={!!open}\r\n onClose={handleClose}\r\n role=\"dialog\"\r\n aria-modal=\"true\"\r\n // Name = title text only (id is on the title Typography). Falls back\r\n // to ariaLabel when the dialog has no title.\r\n aria-labelledby={title != null ? titleId : undefined}\r\n aria-label={title == null ? ariaLabel : undefined}\r\n maxWidth={false}\r\n // R-RS.2 — hand the full-screen decision to MUI's own prop so it\r\n // applies the correct fullscreen paper geometry (100vw/100vh,\r\n // no margin); our PAPER_FULLSCREEN_SX only relaxes radius/shadow.\r\n fullScreen={fullScreen}\r\n // Hand over focus management to useFocusTrap above. Dialog still\r\n // owns the Portal, Backdrop, scroll lock, transitions, and Esc\r\n // wiring - just not the focus trap itself.\r\n disableAutoFocus\r\n disableEnforceFocus\r\n disableRestoreFocus\r\n // Root sx anchors the portal at the v2 zIndex.modal token — above\r\n // the Drawer, below snackbar/toast/tooltip. See DIALOG_ROOT_SX.\r\n sx={DIALOG_ROOT_SX}\r\n slotProps={slotProps}\r\n >\r\n <DialogTitle sx={DIALOG_TITLE_SX}>\r\n <div>\r\n <Typography id={titleId} variant=\"h3\" component=\"h2\" sx={TITLE_TYPOGRAPHY_SX}>\r\n {title}\r\n </Typography>\r\n {subtitle && (\r\n <Typography sx={SUBTITLE_TYPOGRAPHY_SX}>\r\n {subtitle}\r\n </Typography>\r\n )}\r\n </div>\r\n <IconButton\r\n aria-label={ariaLabelClose}\r\n onClick={onClose}\r\n size=\"small\"\r\n sx={CLOSE_ICON_BUTTON_SX}\r\n >\r\n <CloseIcon fontSize=\"small\" />\r\n </IconButton>\r\n </DialogTitle>\r\n\r\n <DialogContent dividers={!!footer} sx={DIALOG_CONTENT_SX}>\r\n {children}\r\n </DialogContent>\r\n\r\n {footer && (\r\n <Dialog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A,EAC1EF;QAAK,CACI,CAAC,EACZC,QAAQ,iBACP,IAAAjG,WAAA,CAAA0I,GAAA,EAAC/I,WAAA,WAAU;UAACwE,EAAE,EAAEkB,sBAAuB;UAAAa,QAAA,EACpCD;QAAQ,CACC,CACb;MAAA,CACE,CAAC,eACN,IAAAjG,WAAA,CAAA0I,GAAA,EAACjJ,WAAA,WAAU;QACT,cAAYqH,cAAe;QAC3BgC,OAAO,EAAE/C,OAAQ;QACjBM,IAAI,EAAC,OAAO;QACZlC,EAAE,EAAEoB,oBAAqB;QAAAW,QAAA,eAEzB,IAAAlG,WAAA,CAAA0I,GAAA,EAAChJ,MAAA,WAAS;UAACwF,QAAQ,EAAC;QAAO,CAAE;MAAC,CACpB,CAAC;IAAA,CACF,CAAC,eAEd,IAAAlF,WAAA,CAAA0I,GAAA,EAACnJ,cAAA,WAAa;MAACwJ,QAAQ,EAAE,CAAC,CAAC5C,MAAO;MAAChC,EAAE,EAAEsB,iBAAkB;MAAAS,QAAA,EACtDA;IAAQ,CACI,CAAC,EAEfC,MAAM,iBACL,IAAAnG,WAAA,CAAA0I,GAAA,EAAClJ,cAAA,WAAa;MAAC2E,EAAE,EAAEwB,iBAAkB;MAAAO,QAAA,EAClCC;IAAM,CACM,CAChB;EAAA,CACK,CAAC;AAEb;AAAC,IAAA6C,QAAA,GAAAC,OAAA,cAEcrD,KAAK","ignoreList":[]}
@@ -4,7 +4,7 @@ export interface NetworkErrorPageProps {
4
4
  /** Callback for the primary "Retour à l'accueil" CTA. */
5
5
  onHome: () => void;
6
6
  /** Optional retry callback. When omitted, the Réessayer button is hidden. */
7
- onRetry?: () => void;
7
+ onRetry?: (() => void) | undefined;
8
8
  }
9
9
  declare function NetworkErrorPage({ onBack, onHome, onRetry }: NetworkErrorPageProps): import("react").JSX.Element;
10
10
  export default NetworkErrorPage;
@@ -1 +1 @@
1
- {"version":3,"file":"NetworkErrorPage.d.ts","sourceRoot":"","sources":["../../../src/lib/v2/components/NetworkErrorPage.tsx"],"names":[],"mappings":"AAqCA,MAAM,WAAW,qBAAqB;IACpC,oDAAoD;IACpD,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,yDAAyD;IACzD,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,6EAA6E;IAC7E,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,iBAAS,gBAAgB,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,qBAAqB,+BAiC3E;AAED,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"NetworkErrorPage.d.ts","sourceRoot":"","sources":["../../../src/lib/v2/components/NetworkErrorPage.tsx"],"names":[],"mappings":"AAqCA,MAAM,WAAW,qBAAqB;IACpC,oDAAoD;IACpD,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,yDAAyD;IACzD,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,6EAA6E;IAC7E,OAAO,CAAC,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAAC;CACpC;AAED,iBAAS,gBAAgB,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,qBAAqB,+BAiC3E;AAED,eAAe,gBAAgB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"NetworkErrorPage.js","names":["_Box","_interopRequireDefault","require","_ArrowBack","_WifiOff","_ActionBar","_Button","_ErrorPageBody","_jsxRuntime","obj","__esModule","NetworkErrorPage","_ref","onBack","onHome","onRetry","jsxs","Fragment","children","jsx","back","breadcrumb","title","icon","sx","fontSize","color","code","description","display","justifyContent","gap","paddingBottom","variant","onClick","_default","exports"],"sources":["../../../src/lib/v2/components/NetworkErrorPage.tsx"],"sourcesContent":["/**\r\n * NetworkErrorPage — Portnet UI v2 (component)\r\n *\r\n * Charter §07 · Connexion perdue.\r\n *\r\n * Same contract as ServerErrorPage: router-agnostic with required\r\n * onBack + onHome and an optional onRetry. The code heading reads\r\n * \"—\" since there is no HTTP status to surface.\r\n *\r\n * import { NetworkErrorPage } from \"@portnet/ui/lib/v2\";\r\n * import { useNavigate } from \"react-router-dom\";\r\n *\r\n * function NetworkErrorRoute() {\r\n * const navigate = useNavigate();\r\n * return (\r\n * <NetworkErrorPage\r\n * onBack={() => navigate(-1)}\r\n * onHome={() => navigate(\"/\")}\r\n * onRetry={() => window.location.reload()}\r\n * />\r\n * );\r\n * }\r\n *\r\n * NB: for TRANSIENT connection drops during normal navigation, the\r\n * v2.NetworkErrorBanner (top of the page, with inline Retry CTA)\r\n * is the charter-preferred pattern — Charter R-A.3 explicitly\r\n * forbids forced navigation to a full error page on transient\r\n * network failure, since it destroys the user's current context.\r\n * This page is for the explicit /network-error route only.\r\n */\r\nimport Box from \"@mui/material/Box\";\r\nimport ArrowBack from \"@mui/icons-material/ArrowBack\";\r\nimport WifiOff from \"@mui/icons-material/WifiOff\";\r\nimport ActionBar from \"../patterns/ActionBar\";\r\nimport Button from \"./Button\";\r\nimport ErrorPageBody from \"./_ErrorPageBody\";\r\n\r\nexport interface NetworkErrorPageProps {\r\n /** Callback for the back button (top-bar arrow). */\r\n onBack: () => void;\r\n /** Callback for the primary \"Retour à l'accueil\" CTA. */\r\n onHome: () => void;\r\n /** Optional retry callback. When omitted, the Réessayer button is hidden. */\r\n onRetry?: () => void;\r\n}\r\n\r\nfunction NetworkErrorPage({ onBack, onHome, onRetry }: NetworkErrorPageProps) {\r\n return (\r\n <>\r\n <ActionBar\r\n back={onBack}\r\n breadcrumb={[\"Erreur\", \"Connexion perdue\"]}\r\n title=\"Connexion perdue\"\r\n />\r\n <ErrorPageBody\r\n icon={<WifiOff sx={{ fontSize: 64, color: \"var(--warning)\" }} />}\r\n code=\"—\"\r\n title=\"Aucune connexion au serveur\"\r\n description=\"Vérifiez votre connexion réseau, puis réessayez. Si vous êtes connecté, le service est peut-être momentanément interrompu.\"\r\n />\r\n <Box\r\n sx={{\r\n display: \"flex\",\r\n justifyContent: \"center\",\r\n gap: \"var(--s-3)\",\r\n paddingBottom: \"var(--s-7)\",\r\n }}\r\n >\r\n {onRetry ? (\r\n <Button variant=\"ghost\" onClick={onRetry}>\r\n Réessayer\r\n </Button>\r\n ) : null}\r\n <Button variant=\"primary\" icon={<ArrowBack />} onClick={onHome}>\r\n Retour à l'accueil\r\n </Button>\r\n </Box>\r\n </>\r\n );\r\n}\r\n\r\nexport default NetworkErrorPage;\r\n"],"mappings":";;;;;;AA8BA,IAAAA,IAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,QAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,UAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,OAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,cAAA,GAAAN,sBAAA,CAAAC,OAAA;AAA6C,IAAAM,WAAA,GAAAN,OAAA;AAAA,SAAAD,uBAAAQ,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,gBAAAA,GAAA;AAnC7C;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;;AAiBA,SAASE,gBAAgBA,CAAAC,IAAA,EAAqD;EAAA,IAAlDC,MAAM,GAAAD,IAAA,CAANC,MAAM;IAAEC,MAAM,GAAAF,IAAA,CAANE,MAAM;IAAEC,OAAO,GAAAH,IAAA,CAAPG,OAAO;EACjD,oBACE,IAAAP,WAAA,CAAAQ,IAAA,EAAAR,WAAA,CAAAS,QAAA;IAAAC,QAAA,gBACE,IAAAV,WAAA,CAAAW,GAAA,EAACd,UAAA,WAAS;MACRe,IAAI,EAAEP,MAAO;MACbQ,UAAU,EAAE,CAAC,QAAQ,EAAE,kBAAkB,CAAE;MAC3CC,KAAK,EAAC;IAAkB,CACzB,CAAC,eACF,IAAAd,WAAA,CAAAW,GAAA,EAACZ,cAAA,WAAa;MACZgB,IAAI,eAAE,IAAAf,WAAA,CAAAW,GAAA,EAACf,QAAA,WAAO;QAACoB,EAAE,EAAE;UAAEC,QAAQ,EAAE,EAAE;UAAEC,KAAK,EAAE;QAAiB;MAAE,CAAE,CAAE;MACjEC,IAAI,EAAC,QAAG;MACRL,KAAK,EAAC,6BAA6B;MACnCM,WAAW,EAAC;IAA4H,CACzI,CAAC,eACF,IAAApB,WAAA,CAAAQ,IAAA,EAAChB,IAAA,WAAG;MACFwB,EAAE,EAAE;QACFK,OAAO,EAAS,MAAM;QACtBC,cAAc,EAAE,QAAQ;QACxBC,GAAG,EAAa,YAAY;QAC5BC,aAAa,EAAG;MAClB,CAAE;MAAAd,QAAA,GAEDH,OAAO,gBACN,IAAAP,WAAA,CAAAW,GAAA,EAACb,OAAA,WAAM;QAAC2B,OAAO,EAAC,OAAO;QAACC,OAAO,EAAEnB,OAAQ;QAAAG,QAAA,EAAC;MAE1C,CAAQ,CAAC,GACP,IAAI,eACR,IAAAV,WAAA,CAAAW,GAAA,EAACb,OAAA,WAAM;QAAC2B,OAAO,EAAC,SAAS;QAACV,IAAI,eAAE,IAAAf,WAAA,CAAAW,GAAA,EAAChB,UAAA,WAAS,IAAE,CAAE;QAAC+B,OAAO,EAAEpB,MAAO;QAAAI,QAAA,EAAC;MAEhE,CAAQ,CAAC;IAAA,CACN,CAAC;EAAA,CACN,CAAC;AAEP;AAAC,IAAAiB,QAAA,GAAAC,OAAA,cAEczB,gBAAgB","ignoreList":[]}
1
+ {"version":3,"file":"NetworkErrorPage.js","names":["_Box","_interopRequireDefault","require","_ArrowBack","_WifiOff","_ActionBar","_Button","_ErrorPageBody","_jsxRuntime","obj","__esModule","NetworkErrorPage","_ref","onBack","onHome","onRetry","jsxs","Fragment","children","jsx","back","breadcrumb","title","icon","sx","fontSize","color","code","description","display","justifyContent","gap","paddingBottom","variant","onClick","_default","exports"],"sources":["../../../src/lib/v2/components/NetworkErrorPage.tsx"],"sourcesContent":["/**\r\n * NetworkErrorPage — Portnet UI v2 (component)\r\n *\r\n * Charter §07 · Connexion perdue.\r\n *\r\n * Same contract as ServerErrorPage: router-agnostic with required\r\n * onBack + onHome and an optional onRetry. The code heading reads\r\n * \"—\" since there is no HTTP status to surface.\r\n *\r\n * import { NetworkErrorPage } from \"@portnet/ui/lib/v2\";\r\n * import { useNavigate } from \"react-router-dom\";\r\n *\r\n * function NetworkErrorRoute() {\r\n * const navigate = useNavigate();\r\n * return (\r\n * <NetworkErrorPage\r\n * onBack={() => navigate(-1)}\r\n * onHome={() => navigate(\"/\")}\r\n * onRetry={() => window.location.reload()}\r\n * />\r\n * );\r\n * }\r\n *\r\n * NB: for TRANSIENT connection drops during normal navigation, the\r\n * v2.NetworkErrorBanner (top of the page, with inline Retry CTA)\r\n * is the charter-preferred pattern — Charter R-A.3 explicitly\r\n * forbids forced navigation to a full error page on transient\r\n * network failure, since it destroys the user's current context.\r\n * This page is for the explicit /network-error route only.\r\n */\r\nimport Box from \"@mui/material/Box\";\r\nimport ArrowBack from \"@mui/icons-material/ArrowBack\";\r\nimport WifiOff from \"@mui/icons-material/WifiOff\";\r\nimport ActionBar from \"../patterns/ActionBar\";\r\nimport Button from \"./Button\";\r\nimport ErrorPageBody from \"./_ErrorPageBody\";\r\n\r\nexport interface NetworkErrorPageProps {\r\n /** Callback for the back button (top-bar arrow). */\r\n onBack: () => void;\r\n /** Callback for the primary \"Retour à l'accueil\" CTA. */\r\n onHome: () => void;\r\n /** Optional retry callback. When omitted, the Réessayer button is hidden. */\r\n onRetry?: (() => void) | undefined;\r\n}\r\n\r\nfunction NetworkErrorPage({ onBack, onHome, onRetry }: NetworkErrorPageProps) {\r\n return (\r\n <>\r\n <ActionBar\r\n back={onBack}\r\n breadcrumb={[\"Erreur\", \"Connexion perdue\"]}\r\n title=\"Connexion perdue\"\r\n />\r\n <ErrorPageBody\r\n icon={<WifiOff sx={{ fontSize: 64, color: \"var(--warning)\" }} />}\r\n code=\"—\"\r\n title=\"Aucune connexion au serveur\"\r\n description=\"Vérifiez votre connexion réseau, puis réessayez. Si vous êtes connecté, le service est peut-être momentanément interrompu.\"\r\n />\r\n <Box\r\n sx={{\r\n display: \"flex\",\r\n justifyContent: \"center\",\r\n gap: \"var(--s-3)\",\r\n paddingBottom: \"var(--s-7)\",\r\n }}\r\n >\r\n {onRetry ? (\r\n <Button variant=\"ghost\" onClick={onRetry}>\r\n Réessayer\r\n </Button>\r\n ) : null}\r\n <Button variant=\"primary\" icon={<ArrowBack />} onClick={onHome}>\r\n Retour à l'accueil\r\n </Button>\r\n </Box>\r\n </>\r\n );\r\n}\r\n\r\nexport default NetworkErrorPage;\r\n"],"mappings":";;;;;;AA8BA,IAAAA,IAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,QAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,UAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,OAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,cAAA,GAAAN,sBAAA,CAAAC,OAAA;AAA6C,IAAAM,WAAA,GAAAN,OAAA;AAAA,SAAAD,uBAAAQ,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,gBAAAA,GAAA;AAnC7C;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;;AAiBA,SAASE,gBAAgBA,CAAAC,IAAA,EAAqD;EAAA,IAAlDC,MAAM,GAAAD,IAAA,CAANC,MAAM;IAAEC,MAAM,GAAAF,IAAA,CAANE,MAAM;IAAEC,OAAO,GAAAH,IAAA,CAAPG,OAAO;EACjD,oBACE,IAAAP,WAAA,CAAAQ,IAAA,EAA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Input";
54
54
  * Documented exception, see Batch 14 charter-exceptions log.
55
55
  */
56
56
  export interface NumberInputLabels {
57
- decrement?: string;
58
- increment?: string;
57
+ decrement?: string | undefined;
58
+ increment?: string | undefined;
59
59
  }
60
60
  export interface NumberInputValidateResult {
61
61
  value: number | null;
@@ -63,18 +63,18 @@ export interface NumberInputValidateResult {
63
63
  violation: "min" | "max" | null;
64
64
  }
65
65
  export interface NumberInputProps extends Omit<OutlinedInputProps, "value" | "onChange" | "prefix" | "suffix"> {
66
- value?: number | null;
67
- onChange?: (value: number | null) => void;
68
- min?: number;
69
- max?: number;
70
- step?: number;
71
- decimals?: number;
72
- showSpinner?: boolean;
73
- prefix?: React.ReactNode;
74
- suffix?: React.ReactNode;
75
- onValidate?: (result: NumberInputValidateResult) => void;
76
- locale?: string;
77
- labels?: NumberInputLabels;
66
+ value?: number | null | undefined;
67
+ onChange?: ((value: number | null) => void) | undefined;
68
+ min?: number | undefined;
69
+ max?: number | undefined;
70
+ step?: number | undefined;
71
+ decimals?: number | undefined;
72
+ showSpinner?: boolean | undefined;
73
+ prefix?: React.ReactNode | undefined;
74
+ suffix?: React.ReactNode | undefined;
75
+ onValidate?: ((result: NumberInputValidateResult) => void) | undefined;
76
+ locale?: string | undefined;
77
+ labels?: NumberInputLabels | undefined;
78
78
  }
79
79
  declare const NumberInput: React.ForwardRefExoticComponent<Omit<NumberInputProps, "ref"> & React.RefAttributes<unknown>>;
80
80
  export declare const FR_DECIMAL_SEPARATOR = ",";
@@ -1 +1 @@
1
- {"version":3,"file":"NumberInput.d.ts","sourceRoot":"","sources":["../../../src/lib/v2/components/NumberInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAMtE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AAEH,MAAM,WAAW,iBAAiB;IA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A,MAAM,WAAW,+FAoKf,CAAC;AAKH,eAAO,MAAM,oBAAoB,MAAiB,CAAC;AACnD,eAAO,MAAM,qBAAqB,MAAkB,CAAC;AAErD,eAAe,WAAW,CAAC"}
@@ -11,6 +11,7 @@ var _InputAdornment = _interopRequireDefault(require("@mui/material/InputAdornme
11
11
  var _IconButton = _interopRequireDefault(require("@mui/material/IconButton"));
12
12
  var _Add = _interopRequireDefault(require("@mui/icons-material/Add"));
13
13
  var _Remove = _interopRequireDefault(require("@mui/icons-material/Remove"));
14
+ var _mergeLabels = require("../utils/mergeLabels");
14
15
  var _jsxRuntime = require("react/jsx-runtime");
15
16
  var _excluded = ["value", "onChange", "onBlur", "min", "max", "step", "decimals", "placeholder", "disabled", "error", "readOnly", "fullWidth", "showSpinner", "prefix", "suffix", "inputProps", "onValidate", "locale", "labels", "sx"];
16
17
  /**
@@ -69,17 +70,17 @@ var _excluded = ["value", "onChange", "onBlur", "min", "max", "step", "decimals"
69
70
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
70
71
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
71
72
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
73
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
74
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
75
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
76
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
77
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
72
78
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
73
79
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
74
80
  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); }
75
81
  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; }
76
82
  function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) { ; } } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
77
83
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
78
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
79
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
80
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
81
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
82
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
83
84
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
84
85
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
85
86
  var FR_DECIMAL_SEP = ",";
@@ -143,7 +144,7 @@ var NumberInput = /*#__PURE__*/React.forwardRef(function NumberInput(_ref, ref)
143
144
  labels = _ref.labels,
144
145
  sx = _ref.sx,
145
146
  rest = _objectWithoutProperties(_ref, _excluded);
146
- var mergedLabels = labels ? _objectSpread(_objectSpread({}, DEFAULT_LABELS), labels) : DEFAULT_LABELS;
147
+ var mergedLabels = (0, _mergeLabels.mergeLabels)(DEFAULT_LABELS, labels);
147
148
  var _React$useState = React.useState(function () {
148
149
  return formatForDisplay(value, decimals, locale);
149
150
  }),