@portnet/ui 6.0.2 → 6.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +652 -0
- package/dist/esm/index.js +72 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/v2/__tests__/AppMain.test.js +130 -0
- package/dist/esm/v2/__tests__/AppMain.test.js.map +1 -0
- package/dist/esm/v2/__tests__/ChartFigure.test.js +180 -0
- package/dist/esm/v2/__tests__/ChartFigure.test.js.map +1 -0
- package/dist/esm/v2/__tests__/DataGridRowActionsPropagation.test.js +150 -0
- package/dist/esm/v2/__tests__/DataGridRowActionsPropagation.test.js.map +1 -0
- package/dist/esm/v2/__tests__/DrawerTactileTargets.test.js +93 -0
- package/dist/esm/v2/__tests__/DrawerTactileTargets.test.js.map +1 -0
- package/dist/esm/v2/__tests__/FieldError.test.js +71 -38
- package/dist/esm/v2/__tests__/FieldError.test.js.map +1 -1
- package/dist/esm/v2/__tests__/FieldNaming.test.js +160 -0
- package/dist/esm/v2/__tests__/FieldNaming.test.js.map +1 -0
- package/dist/esm/v2/__tests__/FieldWidth.test.js +11 -11
- package/dist/esm/v2/__tests__/FieldWidth.test.js.map +1 -1
- package/dist/esm/v2/__tests__/FileCard.test.js +18 -17
- package/dist/esm/v2/__tests__/FileCard.test.js.map +1 -1
- package/dist/esm/v2/__tests__/FormikCheckbox.test.js +87 -179
- package/dist/esm/v2/__tests__/FormikCheckbox.test.js.map +1 -1
- package/dist/esm/v2/__tests__/FormikDateTimePicker.test.js +32 -44
- package/dist/esm/v2/__tests__/FormikDateTimePicker.test.js.map +1 -1
- package/dist/esm/v2/__tests__/FormikDisplayWidth.test.js +101 -0
- package/dist/esm/v2/__tests__/FormikDisplayWidth.test.js.map +1 -0
- package/dist/esm/v2/__tests__/FormikRadioGroup.test.js +118 -199
- package/dist/esm/v2/__tests__/FormikRadioGroup.test.js.map +1 -1
- package/dist/esm/v2/__tests__/MobileRowCard.test.js +44 -42
- package/dist/esm/v2/__tests__/MobileRowCard.test.js.map +1 -1
- package/dist/esm/v2/__tests__/PreviewDrawer.test.js +165 -0
- package/dist/esm/v2/__tests__/PreviewDrawer.test.js.map +1 -0
- package/dist/esm/v2/__tests__/ReferentielFieldContainer.test.js +156 -0
- package/dist/esm/v2/__tests__/ReferentielFieldContainer.test.js.map +1 -0
- package/dist/esm/v2/__tests__/SectionErrorBoundary.test.js +37 -52
- package/dist/esm/v2/__tests__/SectionErrorBoundary.test.js.map +1 -1
- package/dist/esm/v2/__tests__/apiError.test.js +50 -69
- package/dist/esm/v2/__tests__/apiError.test.js.map +1 -1
- package/dist/esm/v2/__tests__/banned-patterns.test.js +41 -122
- package/dist/esm/v2/__tests__/banned-patterns.test.js.map +1 -1
- package/dist/esm/v2/__tests__/chart-palette.test.js +204 -0
- package/dist/esm/v2/__tests__/chart-palette.test.js.map +1 -0
- package/dist/esm/v2/__tests__/contrast-palette.test.js +42 -74
- package/dist/esm/v2/__tests__/contrast-palette.test.js.map +1 -1
- package/dist/esm/v2/__tests__/cssVariables.test.js +44 -51
- package/dist/esm/v2/__tests__/cssVariables.test.js.map +1 -1
- package/dist/esm/v2/__tests__/fileValidation.test.js +134 -0
- package/dist/esm/v2/__tests__/fileValidation.test.js.map +1 -0
- package/dist/esm/v2/__tests__/filterCriteria.test.js +321 -0
- package/dist/esm/v2/__tests__/filterCriteria.test.js.map +1 -0
- package/dist/esm/v2/__tests__/fmtDate.test.js +68 -0
- package/dist/esm/v2/__tests__/fmtDate.test.js.map +1 -0
- package/dist/esm/v2/__tests__/gap-leakage-refonte.test.js +218 -0
- package/dist/esm/v2/__tests__/gap-leakage-refonte.test.js.map +1 -0
- package/dist/esm/v2/__tests__/labels-merge.test.js +17 -21
- package/dist/esm/v2/__tests__/labels-merge.test.js.map +1 -1
- package/dist/esm/v2/__tests__/locale-fallback.test.js +35 -40
- package/dist/esm/v2/__tests__/locale-fallback.test.js.map +1 -1
- package/dist/esm/v2/__tests__/reviveSavedCriteria.test.js +143 -0
- package/dist/esm/v2/__tests__/reviveSavedCriteria.test.js.map +1 -0
- package/dist/esm/v2/__tests__/rowActions.test.js +182 -0
- package/dist/esm/v2/__tests__/rowActions.test.js.map +1 -0
- package/dist/esm/v2/__tests__/useFocusOnRouteChange.test.js +155 -0
- package/dist/esm/v2/__tests__/useFocusOnRouteChange.test.js.map +1 -0
- package/dist/esm/v2/__tests__/useFocusTrap.test.js +266 -402
- package/dist/esm/v2/__tests__/useFocusTrap.test.js.map +1 -1
- package/dist/esm/v2/__tests__/usePrefersReducedMotion.test.js +120 -0
- package/dist/esm/v2/__tests__/usePrefersReducedMotion.test.js.map +1 -0
- package/dist/esm/v2/components/Accordion.js +48 -70
- package/dist/esm/v2/components/Accordion.js.map +1 -1
- package/dist/esm/v2/components/ActionStrip.js +31 -43
- package/dist/esm/v2/components/ActionStrip.js.map +1 -1
- package/dist/esm/v2/components/Banner.js +25 -22
- package/dist/esm/v2/components/Banner.js.map +1 -1
- package/dist/esm/v2/components/Busy.js +14 -19
- package/dist/esm/v2/components/Busy.js.map +1 -1
- package/dist/esm/v2/components/Button.js +34 -45
- package/dist/esm/v2/components/Button.js.map +1 -1
- package/dist/esm/v2/components/CategoryTag.js +44 -27
- package/dist/esm/v2/components/CategoryTag.js.map +1 -1
- package/dist/esm/v2/components/Checkbox.js +32 -38
- package/dist/esm/v2/components/Checkbox.js.map +1 -1
- package/dist/esm/v2/components/Chip.js +23 -36
- package/dist/esm/v2/components/Chip.js.map +1 -1
- package/dist/esm/v2/components/Combobox.js +112 -136
- package/dist/esm/v2/components/Combobox.js.map +1 -1
- package/dist/esm/v2/components/CommandPalette.js +113 -198
- package/dist/esm/v2/components/CommandPalette.js.map +1 -1
- package/dist/esm/v2/components/ConfirmDialog.js +36 -45
- package/dist/esm/v2/components/ConfirmDialog.js.map +1 -1
- package/dist/esm/v2/components/DatePicker.js +78 -81
- package/dist/esm/v2/components/DatePicker.js.map +1 -1
- package/dist/esm/v2/components/DateRangePicker.js +63 -74
- package/dist/esm/v2/components/DateRangePicker.js.map +1 -1
- package/dist/esm/v2/components/DateTimePicker.js +81 -86
- package/dist/esm/v2/components/DateTimePicker.js.map +1 -1
- package/dist/esm/v2/components/Drawer.js +71 -65
- package/dist/esm/v2/components/Drawer.js.map +1 -1
- package/dist/esm/v2/components/Dropzone.js +130 -177
- package/dist/esm/v2/components/Dropzone.js.map +1 -1
- package/dist/esm/v2/components/EmptyState.js +9 -9
- package/dist/esm/v2/components/EmptyState.js.map +1 -1
- package/dist/esm/v2/components/FavoriteToggle.js +24 -33
- package/dist/esm/v2/components/FavoriteToggle.js.map +1 -1
- package/dist/esm/v2/components/Field.js +155 -59
- package/dist/esm/v2/components/Field.js.map +1 -1
- package/dist/esm/v2/components/FieldError.js +9 -13
- package/dist/esm/v2/components/FieldError.js.map +1 -1
- package/dist/esm/v2/components/FieldHelp.js +28 -49
- package/dist/esm/v2/components/FieldHelp.js.map +1 -1
- package/dist/esm/v2/components/FileCard.js +14 -19
- package/dist/esm/v2/components/FileCard.js.map +1 -1
- package/dist/esm/v2/components/FilterTab.js +22 -31
- package/dist/esm/v2/components/FilterTab.js.map +1 -1
- package/dist/esm/v2/components/ForbiddenPage.js +28 -8
- package/dist/esm/v2/components/ForbiddenPage.js.map +1 -1
- package/dist/esm/v2/components/FormGrid.js +48 -54
- package/dist/esm/v2/components/FormGrid.js.map +1 -1
- package/dist/esm/v2/components/FormikDisplay.js +98 -24
- package/dist/esm/v2/components/FormikDisplay.js.map +1 -1
- package/dist/esm/v2/components/Input.js +75 -34
- package/dist/esm/v2/components/Input.js.map +1 -1
- package/dist/esm/v2/components/KPICard.js +42 -51
- package/dist/esm/v2/components/KPICard.js.map +1 -1
- package/dist/esm/v2/components/KPIStrip.js +9 -15
- package/dist/esm/v2/components/KPIStrip.js.map +1 -1
- package/dist/esm/v2/components/KV.js +16 -23
- package/dist/esm/v2/components/KV.js.map +1 -1
- package/dist/esm/v2/components/KVGrid.js +15 -23
- package/dist/esm/v2/components/KVGrid.js.map +1 -1
- package/dist/esm/v2/components/Layout.js +81 -117
- package/dist/esm/v2/components/Layout.js.map +1 -1
- package/dist/esm/v2/components/MobileRowCard.js +64 -75
- package/dist/esm/v2/components/MobileRowCard.js.map +1 -1
- package/dist/esm/v2/components/Modal.js +44 -53
- package/dist/esm/v2/components/Modal.js.map +1 -1
- package/dist/esm/v2/components/NetworkErrorPage.js +28 -11
- package/dist/esm/v2/components/NetworkErrorPage.js.map +1 -1
- package/dist/esm/v2/components/NotFoundPage.js +28 -9
- package/dist/esm/v2/components/NotFoundPage.js.map +1 -1
- package/dist/esm/v2/components/NumberInput.js +77 -107
- package/dist/esm/v2/components/NumberInput.js.map +1 -1
- package/dist/esm/v2/components/OverflowMenu.js +24 -42
- package/dist/esm/v2/components/OverflowMenu.js.map +1 -1
- package/dist/esm/v2/components/PdfViewer.js +24 -33
- package/dist/esm/v2/components/PdfViewer.js.map +1 -1
- package/dist/esm/v2/components/ProgressBar.js +28 -36
- package/dist/esm/v2/components/ProgressBar.js.map +1 -1
- package/dist/esm/v2/components/Radio.js +49 -57
- package/dist/esm/v2/components/Radio.js.map +1 -1
- package/dist/esm/v2/components/SectionErrorBoundary.js +84 -130
- package/dist/esm/v2/components/SectionErrorBoundary.js.map +1 -1
- package/dist/esm/v2/components/SectionHeader.js +24 -31
- package/dist/esm/v2/components/SectionHeader.js.map +1 -1
- package/dist/esm/v2/components/Segmented.js +59 -84
- package/dist/esm/v2/components/Segmented.js.map +1 -1
- package/dist/esm/v2/components/Select.js +100 -138
- package/dist/esm/v2/components/Select.js.map +1 -1
- package/dist/esm/v2/components/ServerErrorPage.js +27 -10
- package/dist/esm/v2/components/ServerErrorPage.js.map +1 -1
- package/dist/esm/v2/components/Skeleton.js +81 -96
- package/dist/esm/v2/components/Skeleton.js.map +1 -1
- package/dist/esm/v2/components/SkipLink.js +6 -7
- package/dist/esm/v2/components/SkipLink.js.map +1 -1
- package/dist/esm/v2/components/Spinner.js +13 -22
- package/dist/esm/v2/components/Spinner.js.map +1 -1
- package/dist/esm/v2/components/Status.js +14 -25
- package/dist/esm/v2/components/Status.js.map +1 -1
- package/dist/esm/v2/components/Stepper.js +68 -71
- package/dist/esm/v2/components/Stepper.js.map +1 -1
- package/dist/esm/v2/components/Surface.js +25 -44
- package/dist/esm/v2/components/Surface.js.map +1 -1
- package/dist/esm/v2/components/Switch.js +21 -29
- package/dist/esm/v2/components/Switch.js.map +1 -1
- package/dist/esm/v2/components/TabPanel.js +84 -0
- package/dist/esm/v2/components/TabPanel.js.map +1 -0
- package/dist/esm/v2/components/Tabs.js +43 -19
- package/dist/esm/v2/components/Tabs.js.map +1 -1
- package/dist/esm/v2/components/TelInput.js +75 -108
- package/dist/esm/v2/components/TelInput.js.map +1 -1
- package/dist/esm/v2/components/Textarea.js +21 -30
- package/dist/esm/v2/components/Textarea.js.map +1 -1
- package/dist/esm/v2/components/TimePicker.js +59 -69
- package/dist/esm/v2/components/TimePicker.js.map +1 -1
- package/dist/esm/v2/components/Toast.js +109 -163
- package/dist/esm/v2/components/Toast.js.map +1 -1
- package/dist/esm/v2/components/Tooltip.js +18 -31
- package/dist/esm/v2/components/Tooltip.js.map +1 -1
- package/dist/esm/v2/components/_ErrorPageBody.js +6 -5
- package/dist/esm/v2/components/_ErrorPageBody.js.map +1 -1
- package/dist/esm/v2/components/_pickerShared.js +2 -2
- package/dist/esm/v2/components/_pickerShared.js.map +1 -1
- package/dist/esm/v2/components/index.js +37 -0
- package/dist/esm/v2/components/index.js.map +1 -1
- package/dist/esm/v2/hooks/index.js +62 -0
- package/dist/esm/v2/hooks/index.js.map +1 -1
- package/dist/esm/v2/hooks/useAppliedFilters.js +112 -0
- package/dist/esm/v2/hooks/useAppliedFilters.js.map +1 -0
- package/dist/esm/v2/hooks/useDebouncedCallback.js +82 -0
- package/dist/esm/v2/hooks/useDebouncedCallback.js.map +1 -0
- package/dist/esm/v2/hooks/useDelayedFlag.js +5 -19
- package/dist/esm/v2/hooks/useDelayedFlag.js.map +1 -1
- package/dist/esm/v2/hooks/useDensity.js +13 -17
- package/dist/esm/v2/hooks/useDensity.js.map +1 -1
- package/dist/esm/v2/hooks/useFocusFirstError.js +25 -33
- package/dist/esm/v2/hooks/useFocusFirstError.js.map +1 -1
- package/dist/esm/v2/hooks/useFocusOnRouteChange.js +81 -0
- package/dist/esm/v2/hooks/useFocusOnRouteChange.js.map +1 -0
- package/dist/esm/v2/hooks/useFocusTrap.js +19 -23
- package/dist/esm/v2/hooks/useFocusTrap.js.map +1 -1
- package/dist/esm/v2/hooks/useFormAutoSave.js +38 -53
- package/dist/esm/v2/hooks/useFormAutoSave.js.map +1 -1
- package/dist/esm/v2/hooks/useFormCompletionProgress.js +32 -51
- package/dist/esm/v2/hooks/useFormCompletionProgress.js.map +1 -1
- package/dist/esm/v2/hooks/useKeyboardShortcuts.js +125 -0
- package/dist/esm/v2/hooks/useKeyboardShortcuts.js.map +1 -0
- package/dist/esm/v2/hooks/usePrefersReducedMotion.js +99 -0
- package/dist/esm/v2/hooks/usePrefersReducedMotion.js.map +1 -0
- package/dist/esm/v2/hooks/useResolvedDensity.js +2 -10
- package/dist/esm/v2/hooks/useResolvedDensity.js.map +1 -1
- package/dist/esm/v2/hooks/useSortedRows.js +3 -5
- package/dist/esm/v2/hooks/useSortedRows.js.map +1 -1
- package/dist/esm/v2/hooks/useTabLoading.js +6 -21
- package/dist/esm/v2/hooks/useTabLoading.js.map +1 -1
- package/dist/esm/v2/index.js +2 -3
- package/dist/esm/v2/index.js.map +1 -1
- package/dist/esm/v2/modalContext.js +2 -2
- package/dist/esm/v2/modalContext.js.map +1 -1
- package/dist/esm/v2/models/favorite.js.map +1 -1
- package/dist/esm/v2/models/personalization.js.map +1 -1
- package/dist/esm/v2/models/referentiel.js.map +1 -1
- package/dist/esm/v2/models/savedFilter.js.map +1 -1
- package/dist/esm/v2/patterns/ActionBar.js +115 -159
- package/dist/esm/v2/patterns/ActionBar.js.map +1 -1
- package/dist/esm/v2/patterns/AppMain.js +108 -0
- package/dist/esm/v2/patterns/AppMain.js.map +1 -0
- package/dist/esm/v2/patterns/BulkActionBar.js +31 -34
- package/dist/esm/v2/patterns/BulkActionBar.js.map +1 -1
- package/dist/esm/v2/patterns/ChartFigure.js +151 -0
- package/dist/esm/v2/patterns/ChartFigure.js.map +1 -0
- package/dist/esm/v2/patterns/CollapsibleDataGrid.js +111 -152
- package/dist/esm/v2/patterns/CollapsibleDataGrid.js.map +1 -1
- package/dist/esm/v2/patterns/ColumnsToggle.js +43 -77
- package/dist/esm/v2/patterns/ColumnsToggle.js.map +1 -1
- package/dist/esm/v2/patterns/DataGrid.js +221 -255
- package/dist/esm/v2/patterns/DataGrid.js.map +1 -1
- package/dist/esm/v2/patterns/DataGridSettingsMenu.js +76 -94
- package/dist/esm/v2/patterns/DataGridSettingsMenu.js.map +1 -1
- package/dist/esm/v2/patterns/DataGridToolbar.js +85 -89
- package/dist/esm/v2/patterns/DataGridToolbar.js.map +1 -1
- package/dist/esm/v2/patterns/DataGridVirtualized.js +141 -182
- package/dist/esm/v2/patterns/DataGridVirtualized.js.map +1 -1
- package/dist/esm/v2/patterns/DeleteResourceConfirmDialog.js +26 -30
- package/dist/esm/v2/patterns/DeleteResourceConfirmDialog.js.map +1 -1
- package/dist/esm/v2/patterns/DetailSplit.js +108 -0
- package/dist/esm/v2/patterns/DetailSplit.js.map +1 -0
- package/dist/esm/v2/patterns/FavoriteColumn.js +15 -17
- package/dist/esm/v2/patterns/FavoriteColumn.js.map +1 -1
- package/dist/esm/v2/patterns/FavoritesFilter.js +30 -39
- package/dist/esm/v2/patterns/FavoritesFilter.js.map +1 -1
- package/dist/esm/v2/patterns/FilterTabBar.js +112 -0
- package/dist/esm/v2/patterns/FilterTabBar.js.map +1 -0
- package/dist/esm/v2/patterns/FormErrorSummary.js +12 -13
- package/dist/esm/v2/patterns/FormErrorSummary.js.map +1 -1
- package/dist/esm/v2/patterns/FormPageShell.js +43 -41
- package/dist/esm/v2/patterns/FormPageShell.js.map +1 -1
- package/dist/esm/v2/patterns/FormSection.js +30 -38
- package/dist/esm/v2/patterns/FormSection.js.map +1 -1
- package/dist/esm/v2/patterns/FormikCheckbox.js +29 -39
- package/dist/esm/v2/patterns/FormikCheckbox.js.map +1 -1
- package/dist/esm/v2/patterns/FormikCheckboxGroup.js +56 -60
- package/dist/esm/v2/patterns/FormikCheckboxGroup.js.map +1 -1
- package/dist/esm/v2/patterns/FormikCombobox.js +51 -69
- package/dist/esm/v2/patterns/FormikCombobox.js.map +1 -1
- package/dist/esm/v2/patterns/FormikDatePicker.js +44 -58
- package/dist/esm/v2/patterns/FormikDatePicker.js.map +1 -1
- package/dist/esm/v2/patterns/FormikDateTimePicker.js +44 -58
- package/dist/esm/v2/patterns/FormikDateTimePicker.js.map +1 -1
- package/dist/esm/v2/patterns/FormikErrorFocus.js +22 -23
- package/dist/esm/v2/patterns/FormikErrorFocus.js.map +1 -1
- package/dist/esm/v2/patterns/FormikErrorSummary.js +89 -0
- package/dist/esm/v2/patterns/FormikErrorSummary.js.map +1 -0
- package/dist/esm/v2/patterns/FormikFile.js +94 -78
- package/dist/esm/v2/patterns/FormikFile.js.map +1 -1
- package/dist/esm/v2/patterns/FormikInput.js +40 -53
- package/dist/esm/v2/patterns/FormikInput.js.map +1 -1
- package/dist/esm/v2/patterns/FormikRadioGroup.js +39 -51
- package/dist/esm/v2/patterns/FormikRadioGroup.js.map +1 -1
- package/dist/esm/v2/patterns/FormikReferentielField.js +49 -59
- package/dist/esm/v2/patterns/FormikReferentielField.js.map +1 -1
- package/dist/esm/v2/patterns/FormikSelect.js +64 -87
- package/dist/esm/v2/patterns/FormikSelect.js.map +1 -1
- package/dist/esm/v2/patterns/FormikTextarea.js +30 -46
- package/dist/esm/v2/patterns/FormikTextarea.js.map +1 -1
- package/dist/esm/v2/patterns/KeyboardShortcutsHelp.js +53 -71
- package/dist/esm/v2/patterns/KeyboardShortcutsHelp.js.map +1 -1
- package/dist/esm/v2/patterns/NetworkErrorBanner.js +6 -7
- package/dist/esm/v2/patterns/NetworkErrorBanner.js.map +1 -1
- package/dist/esm/v2/patterns/PageContent.js +10 -14
- package/dist/esm/v2/patterns/PageContent.js.map +1 -1
- package/dist/esm/v2/patterns/PreviewDrawer.js +153 -0
- package/dist/esm/v2/patterns/PreviewDrawer.js.map +1 -0
- package/dist/esm/v2/patterns/ReferentielField.js +327 -312
- package/dist/esm/v2/patterns/ReferentielField.js.map +1 -1
- package/dist/esm/v2/patterns/RowFavoriteToggle.js +27 -22
- package/dist/esm/v2/patterns/RowFavoriteToggle.js.map +1 -1
- package/dist/esm/v2/patterns/SaveFilterDialog.js +38 -66
- package/dist/esm/v2/patterns/SaveFilterDialog.js.map +1 -1
- package/dist/esm/v2/patterns/SavedFiltersMenu.js +62 -81
- package/dist/esm/v2/patterns/SavedFiltersMenu.js.map +1 -1
- package/dist/esm/v2/patterns/SkeletonPageShell.js +106 -129
- package/dist/esm/v2/patterns/SkeletonPageShell.js.map +1 -1
- package/dist/esm/v2/patterns/SortableHeader.js +22 -45
- package/dist/esm/v2/patterns/SortableHeader.js.map +1 -1
- package/dist/esm/v2/patterns/Tour.js +94 -120
- package/dist/esm/v2/patterns/Tour.js.map +1 -1
- package/dist/esm/v2/patterns/_dataGridShared.js +107 -128
- package/dist/esm/v2/patterns/_dataGridShared.js.map +1 -1
- package/dist/esm/v2/patterns/_pickerSerialisation.js +6 -8
- package/dist/esm/v2/patterns/_pickerSerialisation.js.map +1 -1
- package/dist/esm/v2/patterns/_sort.js +17 -33
- package/dist/esm/v2/patterns/_sort.js.map +1 -1
- package/dist/esm/v2/patterns/_useColumnReorder.js +122 -160
- package/dist/esm/v2/patterns/_useColumnReorder.js.map +1 -1
- package/dist/esm/v2/patterns/_useColumnResize.js +78 -96
- package/dist/esm/v2/patterns/_useColumnResize.js.map +1 -1
- package/dist/esm/v2/patterns/filterCriteria.js +102 -0
- package/dist/esm/v2/patterns/filterCriteria.js.map +1 -0
- package/dist/esm/v2/patterns/index.js +152 -0
- package/dist/esm/v2/patterns/index.js.map +1 -1
- package/dist/esm/v2/patterns/rowActions.js +223 -0
- package/dist/esm/v2/patterns/rowActions.js.map +1 -0
- package/dist/esm/v2/personalization/PersonalizationProvider.js +50 -47
- package/dist/esm/v2/personalization/PersonalizationProvider.js.map +1 -1
- package/dist/esm/v2/personalization/adapters/_storageKey.js +5 -5
- package/dist/esm/v2/personalization/adapters/_storageKey.js.map +1 -1
- package/dist/esm/v2/personalization/adapters/createLocalStorageAdapter.js +22 -23
- package/dist/esm/v2/personalization/adapters/createLocalStorageAdapter.js.map +1 -1
- package/dist/esm/v2/personalization/adapters/createMemoryAdapter.js +13 -13
- package/dist/esm/v2/personalization/adapters/createMemoryAdapter.js.map +1 -1
- package/dist/esm/v2/personalization/capabilities/favorites.js +36 -60
- package/dist/esm/v2/personalization/capabilities/favorites.js.map +1 -1
- package/dist/esm/v2/personalization/capabilities/favoritesView.js +22 -34
- package/dist/esm/v2/personalization/capabilities/favoritesView.js.map +1 -1
- package/dist/esm/v2/personalization/capabilities/gridPreferences.js +28 -34
- package/dist/esm/v2/personalization/capabilities/gridPreferences.js.map +1 -1
- package/dist/esm/v2/personalization/capabilities/reviveSavedCriteria.js +119 -0
- package/dist/esm/v2/personalization/capabilities/reviveSavedCriteria.js.map +1 -0
- package/dist/esm/v2/personalization/capabilities/savedFilters.js +90 -98
- package/dist/esm/v2/personalization/capabilities/savedFilters.js.map +1 -1
- package/dist/esm/v2/personalization/createPersonalizationStore.js +78 -181
- package/dist/esm/v2/personalization/createPersonalizationStore.js.map +1 -1
- package/dist/esm/v2/personalization/index.js +17 -0
- package/dist/esm/v2/personalization/index.js.map +1 -1
- package/dist/esm/v2/personalization/personalizationContext.js +9 -9
- package/dist/esm/v2/personalization/personalizationContext.js.map +1 -1
- package/dist/esm/v2/personalization/schema.js +8 -9
- package/dist/esm/v2/personalization/schema.js.map +1 -1
- package/dist/esm/v2/referentiel/ReferentielProvider.js +27 -42
- package/dist/esm/v2/referentiel/ReferentielProvider.js.map +1 -1
- package/dist/esm/v2/referentiel/types.js +2 -0
- package/dist/esm/v2/referentiel/types.js.map +1 -0
- package/dist/esm/v2/referentiel/useReferentielClient.js +10 -11
- package/dist/esm/v2/referentiel/useReferentielClient.js.map +1 -1
- package/dist/esm/v2/referentiel/useReferentielOptions.js +60 -117
- package/dist/esm/v2/referentiel/useReferentielOptions.js.map +1 -1
- package/dist/esm/v2/referentiel/useReferentielSearch.js +37 -91
- package/dist/esm/v2/referentiel/useReferentielSearch.js.map +1 -1
- package/dist/esm/v2/theme/_brand.js +8 -24
- package/dist/esm/v2/theme/_brand.js.map +1 -1
- package/dist/esm/v2/theme/_brandSecondary.js +8 -24
- package/dist/esm/v2/theme/_brandSecondary.js.map +1 -1
- package/dist/esm/v2/theme/createPortnetTheme.js +51 -61
- package/dist/esm/v2/theme/createPortnetTheme.js.map +1 -1
- package/dist/esm/v2/theme/cssVariables.js +62 -69
- package/dist/esm/v2/theme/cssVariables.js.map +1 -1
- package/dist/esm/v2/theme/index.js +5 -5
- package/dist/esm/v2/theme/index.js.map +1 -1
- package/dist/esm/v2/tokens/breakpoints.js +14 -14
- package/dist/esm/v2/tokens/breakpoints.js.map +1 -1
- package/dist/esm/v2/tokens/chart.js +261 -0
- package/dist/esm/v2/tokens/chart.js.map +1 -0
- package/dist/esm/v2/tokens/colors.js +22 -22
- package/dist/esm/v2/tokens/colors.js.map +1 -1
- package/dist/esm/v2/tokens/density.js +62 -7
- package/dist/esm/v2/tokens/density.js.map +1 -1
- package/dist/esm/v2/tokens/index.js +49 -34
- package/dist/esm/v2/tokens/index.js.map +1 -1
- package/dist/esm/v2/tokens/motion.js +12 -20
- package/dist/esm/v2/tokens/motion.js.map +1 -1
- package/dist/esm/v2/tokens/radius.js +1 -1
- package/dist/esm/v2/tokens/radius.js.map +1 -1
- package/dist/esm/v2/tokens/shadows.js +6 -6
- package/dist/esm/v2/tokens/shadows.js.map +1 -1
- package/dist/esm/v2/tokens/spacing.js +2 -2
- package/dist/esm/v2/tokens/spacing.js.map +1 -1
- package/dist/esm/v2/tokens/state.js +1 -1
- package/dist/esm/v2/tokens/state.js.map +1 -1
- package/dist/esm/v2/tokens/statusPalette.js +17 -21
- package/dist/esm/v2/tokens/statusPalette.js.map +1 -1
- package/dist/esm/v2/tokens/tokens.json +6 -1
- package/dist/esm/v2/tokens/typography.js +13 -13
- package/dist/esm/v2/tokens/typography.js.map +1 -1
- package/dist/esm/v2/tokens/zIndex.js +1 -1
- package/dist/esm/v2/tokens/zIndex.js.map +1 -1
- package/dist/esm/v2/types/datagrid.js.map +1 -1
- package/dist/esm/v2/utils/apiError.js +16 -37
- package/dist/esm/v2/utils/apiError.js.map +1 -1
- package/dist/esm/v2/utils/contrast.js +31 -32
- package/dist/esm/v2/utils/contrast.js.map +1 -1
- package/dist/esm/v2/utils/cx.js +5 -25
- package/dist/esm/v2/utils/cx.js.map +1 -1
- package/dist/esm/v2/utils/fileDownload.js +23 -26
- package/dist/esm/v2/utils/fileDownload.js.map +1 -1
- package/dist/esm/v2/utils/fileValidation.js +209 -0
- package/dist/esm/v2/utils/fileValidation.js.map +1 -0
- package/dist/esm/v2/utils/fmtDate.js +111 -0
- package/dist/esm/v2/utils/fmtDate.js.map +1 -0
- package/dist/esm/v2/utils/fmtMoney.js +8 -10
- package/dist/esm/v2/utils/fmtMoney.js.map +1 -1
- package/dist/esm/v2/utils/formikErrors.js +78 -0
- package/dist/esm/v2/utils/formikErrors.js.map +1 -0
- package/dist/esm/v2/utils/index.js +35 -2
- package/dist/esm/v2/utils/index.js.map +1 -1
- package/dist/esm/v2/utils/mergeLabels.js +7 -12
- package/dist/esm/v2/utils/mergeLabels.js.map +1 -1
- package/dist/esm/v2/utils/networkStatus.js +12 -12
- package/dist/esm/v2/utils/networkStatus.js.map +1 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +110 -49
- package/dist/index.js.map +1 -1
- package/dist/v2/__tests__/AppMain.test.js +133 -0
- package/dist/v2/__tests__/AppMain.test.js.map +1 -0
- package/dist/v2/__tests__/ChartFigure.test.js +183 -0
- package/dist/v2/__tests__/ChartFigure.test.js.map +1 -0
- package/dist/v2/__tests__/DataGridRowActionsPropagation.test.js +153 -0
- package/dist/v2/__tests__/DataGridRowActionsPropagation.test.js.map +1 -0
- package/dist/v2/__tests__/DrawerTactileTargets.test.js +94 -0
- package/dist/v2/__tests__/DrawerTactileTargets.test.js.map +1 -0
- package/dist/v2/__tests__/FieldError.test.js +82 -49
- package/dist/v2/__tests__/FieldError.test.js.map +1 -1
- package/dist/v2/__tests__/FieldNaming.test.js +161 -0
- package/dist/v2/__tests__/FieldNaming.test.js.map +1 -0
- package/dist/v2/__tests__/FieldWidth.test.js +23 -25
- package/dist/v2/__tests__/FieldWidth.test.js.map +1 -1
- package/dist/v2/__tests__/FileCard.test.js +29 -28
- package/dist/v2/__tests__/FileCard.test.js.map +1 -1
- package/dist/v2/__tests__/FormikCheckbox.test.js +90 -183
- package/dist/v2/__tests__/FormikCheckbox.test.js.map +1 -1
- package/dist/v2/__tests__/FormikDateTimePicker.test.js +38 -48
- package/dist/v2/__tests__/FormikDateTimePicker.test.js.map +1 -1
- package/dist/v2/__tests__/FormikDisplayWidth.test.js +102 -0
- package/dist/v2/__tests__/FormikDisplayWidth.test.js.map +1 -0
- package/dist/v2/__tests__/FormikRadioGroup.test.js +123 -204
- package/dist/v2/__tests__/FormikRadioGroup.test.js.map +1 -1
- package/dist/v2/__tests__/MobileRowCard.test.js +63 -61
- package/dist/v2/__tests__/MobileRowCard.test.js.map +1 -1
- package/dist/v2/__tests__/PreviewDrawer.test.js +169 -0
- package/dist/v2/__tests__/PreviewDrawer.test.js.map +1 -0
- package/dist/v2/__tests__/ReferentielFieldContainer.test.js +159 -0
- package/dist/v2/__tests__/ReferentielFieldContainer.test.js.map +1 -0
- package/dist/v2/__tests__/SectionErrorBoundary.test.js +53 -68
- package/dist/v2/__tests__/SectionErrorBoundary.test.js.map +1 -1
- package/dist/v2/__tests__/apiError.test.js +50 -69
- package/dist/v2/__tests__/apiError.test.js.map +1 -1
- package/dist/v2/__tests__/banned-patterns.test.js +42 -123
- package/dist/v2/__tests__/banned-patterns.test.js.map +1 -1
- package/dist/v2/__tests__/chart-palette.test.js +205 -0
- package/dist/v2/__tests__/chart-palette.test.js.map +1 -0
- package/dist/v2/__tests__/contrast-palette.test.js +42 -74
- package/dist/v2/__tests__/contrast-palette.test.js.map +1 -1
- package/dist/v2/__tests__/cssVariables.test.js +44 -51
- package/dist/v2/__tests__/cssVariables.test.js.map +1 -1
- package/dist/v2/__tests__/fileValidation.test.js +136 -0
- package/dist/v2/__tests__/fileValidation.test.js.map +1 -0
- package/dist/v2/__tests__/filterCriteria.test.js +324 -0
- package/dist/v2/__tests__/filterCriteria.test.js.map +1 -0
- package/dist/v2/__tests__/fmtDate.test.js +69 -0
- package/dist/v2/__tests__/fmtDate.test.js.map +1 -0
- package/dist/v2/__tests__/gap-leakage-refonte.test.js +221 -0
- package/dist/v2/__tests__/gap-leakage-refonte.test.js.map +1 -0
- package/dist/v2/__tests__/labels-merge.test.js +23 -27
- package/dist/v2/__tests__/labels-merge.test.js.map +1 -1
- package/dist/v2/__tests__/locale-fallback.test.js +47 -52
- package/dist/v2/__tests__/locale-fallback.test.js.map +1 -1
- package/dist/v2/__tests__/reviveSavedCriteria.test.js +144 -0
- package/dist/v2/__tests__/reviveSavedCriteria.test.js.map +1 -0
- package/dist/v2/__tests__/rowActions.test.js +186 -0
- package/dist/v2/__tests__/rowActions.test.js.map +1 -0
- package/dist/v2/__tests__/useFocusOnRouteChange.test.js +156 -0
- package/dist/v2/__tests__/useFocusOnRouteChange.test.js.map +1 -0
- package/dist/v2/__tests__/useFocusTrap.test.js +270 -407
- package/dist/v2/__tests__/useFocusTrap.test.js.map +1 -1
- package/dist/v2/__tests__/usePrefersReducedMotion.test.js +123 -0
- package/dist/v2/__tests__/usePrefersReducedMotion.test.js.map +1 -0
- package/dist/v2/components/Accordion.js +60 -82
- package/dist/v2/components/Accordion.js.map +1 -1
- package/dist/v2/components/ActionStrip.js +40 -52
- package/dist/v2/components/ActionStrip.js.map +1 -1
- package/dist/v2/components/Banner.js +42 -41
- package/dist/v2/components/Banner.js.map +1 -1
- package/dist/v2/components/Busy.js +22 -27
- package/dist/v2/components/Busy.js.map +1 -1
- package/dist/v2/components/Button.js +39 -50
- package/dist/v2/components/Button.js.map +1 -1
- package/dist/v2/components/CategoryTag.d.ts.map +1 -1
- package/dist/v2/components/CategoryTag.js +49 -32
- package/dist/v2/components/CategoryTag.js.map +1 -1
- package/dist/v2/components/Checkbox.js +39 -45
- package/dist/v2/components/Checkbox.js.map +1 -1
- package/dist/v2/components/Chip.js +29 -42
- package/dist/v2/components/Chip.js.map +1 -1
- package/dist/v2/components/Combobox.js +122 -144
- package/dist/v2/components/Combobox.js.map +1 -1
- package/dist/v2/components/CommandPalette.js +138 -225
- package/dist/v2/components/CommandPalette.js.map +1 -1
- package/dist/v2/components/ConfirmDialog.js +46 -56
- package/dist/v2/components/ConfirmDialog.js.map +1 -1
- package/dist/v2/components/DatePicker.js +81 -86
- package/dist/v2/components/DatePicker.js.map +1 -1
- package/dist/v2/components/DateRangePicker.js +77 -87
- package/dist/v2/components/DateRangePicker.js.map +1 -1
- package/dist/v2/components/DateTimePicker.js +84 -91
- package/dist/v2/components/DateTimePicker.js.map +1 -1
- package/dist/v2/components/Drawer.d.ts.map +1 -1
- package/dist/v2/components/Drawer.js +93 -88
- package/dist/v2/components/Drawer.js.map +1 -1
- package/dist/v2/components/Dropzone.js +150 -196
- package/dist/v2/components/Dropzone.js.map +1 -1
- package/dist/v2/components/EmptyState.js +18 -20
- package/dist/v2/components/EmptyState.js.map +1 -1
- package/dist/v2/components/FavoriteToggle.js +28 -39
- package/dist/v2/components/FavoriteToggle.js.map +1 -1
- package/dist/v2/components/Field.d.ts +62 -4
- package/dist/v2/components/Field.d.ts.map +1 -1
- package/dist/v2/components/Field.js +169 -70
- package/dist/v2/components/Field.js.map +1 -1
- package/dist/v2/components/FieldError.js +18 -21
- package/dist/v2/components/FieldError.js.map +1 -1
- package/dist/v2/components/FieldHelp.js +40 -60
- package/dist/v2/components/FieldHelp.js.map +1 -1
- package/dist/v2/components/FileCard.js +27 -31
- package/dist/v2/components/FileCard.js.map +1 -1
- package/dist/v2/components/FilterTab.js +30 -38
- package/dist/v2/components/FilterTab.js.map +1 -1
- package/dist/v2/components/ForbiddenPage.d.ts +25 -1
- package/dist/v2/components/ForbiddenPage.d.ts.map +1 -1
- package/dist/v2/components/ForbiddenPage.js +37 -17
- package/dist/v2/components/ForbiddenPage.js.map +1 -1
- package/dist/v2/components/FormGrid.js +53 -59
- package/dist/v2/components/FormGrid.js.map +1 -1
- package/dist/v2/components/FormikDisplay.d.ts +50 -1
- package/dist/v2/components/FormikDisplay.d.ts.map +1 -1
- package/dist/v2/components/FormikDisplay.js +108 -33
- package/dist/v2/components/FormikDisplay.js.map +1 -1
- package/dist/v2/components/Input.d.ts +40 -0
- package/dist/v2/components/Input.d.ts.map +1 -1
- package/dist/v2/components/Input.js +81 -41
- package/dist/v2/components/Input.js.map +1 -1
- package/dist/v2/components/KPICard.js +57 -67
- package/dist/v2/components/KPICard.js.map +1 -1
- package/dist/v2/components/KPIStrip.js +16 -22
- package/dist/v2/components/KPIStrip.js.map +1 -1
- package/dist/v2/components/KV.js +25 -31
- package/dist/v2/components/KV.js.map +1 -1
- package/dist/v2/components/KVGrid.js +19 -26
- package/dist/v2/components/KVGrid.js.map +1 -1
- package/dist/v2/components/Layout.js +91 -120
- package/dist/v2/components/Layout.js.map +1 -1
- package/dist/v2/components/MobileRowCard.js +79 -91
- package/dist/v2/components/MobileRowCard.js.map +1 -1
- package/dist/v2/components/Modal.js +61 -69
- package/dist/v2/components/Modal.js.map +1 -1
- package/dist/v2/components/NetworkErrorPage.d.ts +19 -1
- package/dist/v2/components/NetworkErrorPage.d.ts.map +1 -1
- package/dist/v2/components/NetworkErrorPage.js +38 -21
- package/dist/v2/components/NetworkErrorPage.js.map +1 -1
- package/dist/v2/components/NotFoundPage.d.ts +17 -1
- package/dist/v2/components/NotFoundPage.d.ts.map +1 -1
- package/dist/v2/components/NotFoundPage.js +37 -18
- package/dist/v2/components/NotFoundPage.js.map +1 -1
- package/dist/v2/components/NumberInput.js +88 -118
- package/dist/v2/components/NumberInput.js.map +1 -1
- package/dist/v2/components/OverflowMenu.js +38 -56
- package/dist/v2/components/OverflowMenu.js.map +1 -1
- package/dist/v2/components/PdfViewer.js +34 -45
- package/dist/v2/components/PdfViewer.js.map +1 -1
- package/dist/v2/components/ProgressBar.js +42 -49
- package/dist/v2/components/ProgressBar.js.map +1 -1
- package/dist/v2/components/Radio.js +59 -67
- package/dist/v2/components/Radio.js.map +1 -1
- package/dist/v2/components/SectionErrorBoundary.js +90 -135
- package/dist/v2/components/SectionErrorBoundary.js.map +1 -1
- package/dist/v2/components/SectionHeader.js +34 -41
- package/dist/v2/components/SectionHeader.js.map +1 -1
- package/dist/v2/components/Segmented.js +69 -93
- package/dist/v2/components/Segmented.js.map +1 -1
- package/dist/v2/components/Select.d.ts +26 -2
- package/dist/v2/components/Select.d.ts.map +1 -1
- package/dist/v2/components/Select.js +120 -155
- package/dist/v2/components/Select.js.map +1 -1
- package/dist/v2/components/ServerErrorPage.d.ts +27 -1
- package/dist/v2/components/ServerErrorPage.d.ts.map +1 -1
- package/dist/v2/components/ServerErrorPage.js +37 -20
- package/dist/v2/components/ServerErrorPage.js.map +1 -1
- package/dist/v2/components/Skeleton.js +86 -100
- package/dist/v2/components/Skeleton.js.map +1 -1
- package/dist/v2/components/SkipLink.js +9 -12
- package/dist/v2/components/SkipLink.js.map +1 -1
- package/dist/v2/components/Spinner.js +16 -25
- package/dist/v2/components/Spinner.js.map +1 -1
- package/dist/v2/components/Status.js +18 -29
- package/dist/v2/components/Status.js.map +1 -1
- package/dist/v2/components/Stepper.js +80 -82
- package/dist/v2/components/Stepper.js.map +1 -1
- package/dist/v2/components/Surface.js +34 -49
- package/dist/v2/components/Surface.js.map +1 -1
- package/dist/v2/components/Switch.js +29 -37
- package/dist/v2/components/Switch.js.map +1 -1
- package/dist/v2/components/TabPanel.d.ts +17 -0
- package/dist/v2/components/TabPanel.d.ts.map +1 -0
- package/dist/v2/components/TabPanel.js +90 -0
- package/dist/v2/components/TabPanel.js.map +1 -0
- package/dist/v2/components/Tabs.d.ts +25 -0
- package/dist/v2/components/Tabs.d.ts.map +1 -1
- package/dist/v2/components/Tabs.js +53 -29
- package/dist/v2/components/Tabs.js.map +1 -1
- package/dist/v2/components/TelInput.js +80 -115
- package/dist/v2/components/TelInput.js.map +1 -1
- package/dist/v2/components/Textarea.js +26 -35
- package/dist/v2/components/Textarea.js.map +1 -1
- package/dist/v2/components/TimePicker.js +62 -74
- package/dist/v2/components/TimePicker.js.map +1 -1
- package/dist/v2/components/Toast.js +119 -174
- package/dist/v2/components/Toast.js.map +1 -1
- package/dist/v2/components/Tooltip.js +23 -38
- package/dist/v2/components/Tooltip.js.map +1 -1
- package/dist/v2/components/_ErrorPageBody.js +15 -16
- package/dist/v2/components/_ErrorPageBody.js.map +1 -1
- package/dist/v2/components/_pickerShared.js +5 -5
- package/dist/v2/components/_pickerShared.js.map +1 -1
- package/dist/v2/components/index.d.ts +40 -1
- package/dist/v2/components/index.d.ts.map +1 -1
- package/dist/v2/components/index.js +153 -136
- package/dist/v2/components/index.js.map +1 -1
- package/dist/v2/hooks/index.d.ts +65 -0
- package/dist/v2/hooks/index.d.ts.map +1 -1
- package/dist/v2/hooks/index.js +63 -24
- package/dist/v2/hooks/index.js.map +1 -1
- package/dist/v2/hooks/useAppliedFilters.d.ts +102 -0
- package/dist/v2/hooks/useAppliedFilters.d.ts.map +1 -0
- package/dist/v2/hooks/useAppliedFilters.js +117 -0
- package/dist/v2/hooks/useAppliedFilters.js.map +1 -0
- package/dist/v2/hooks/useDebouncedCallback.d.ts +64 -0
- package/dist/v2/hooks/useDebouncedCallback.d.ts.map +1 -0
- package/dist/v2/hooks/useDebouncedCallback.js +87 -0
- package/dist/v2/hooks/useDebouncedCallback.js.map +1 -0
- package/dist/v2/hooks/useDelayedFlag.js +6 -20
- package/dist/v2/hooks/useDelayedFlag.js.map +1 -1
- package/dist/v2/hooks/useDensity.d.ts.map +1 -1
- package/dist/v2/hooks/useDensity.js +14 -18
- package/dist/v2/hooks/useDensity.js.map +1 -1
- package/dist/v2/hooks/useFocusFirstError.js +26 -34
- package/dist/v2/hooks/useFocusFirstError.js.map +1 -1
- package/dist/v2/hooks/useFocusOnRouteChange.d.ts +65 -0
- package/dist/v2/hooks/useFocusOnRouteChange.d.ts.map +1 -0
- package/dist/v2/hooks/useFocusOnRouteChange.js +88 -0
- package/dist/v2/hooks/useFocusOnRouteChange.js.map +1 -0
- package/dist/v2/hooks/useFocusTrap.js +20 -24
- package/dist/v2/hooks/useFocusTrap.js.map +1 -1
- package/dist/v2/hooks/useFormAutoSave.d.ts +4 -4
- package/dist/v2/hooks/useFormAutoSave.d.ts.map +1 -1
- package/dist/v2/hooks/useFormAutoSave.js +39 -54
- package/dist/v2/hooks/useFormAutoSave.js.map +1 -1
- package/dist/v2/hooks/useFormCompletionProgress.d.ts +1 -1
- package/dist/v2/hooks/useFormCompletionProgress.d.ts.map +1 -1
- package/dist/v2/hooks/useFormCompletionProgress.js +33 -52
- package/dist/v2/hooks/useFormCompletionProgress.js.map +1 -1
- package/dist/v2/hooks/useKeyboardShortcuts.d.ts +25 -0
- package/dist/v2/hooks/useKeyboardShortcuts.d.ts.map +1 -0
- package/dist/v2/hooks/useKeyboardShortcuts.js +132 -0
- package/dist/v2/hooks/useKeyboardShortcuts.js.map +1 -0
- package/dist/v2/hooks/usePrefersReducedMotion.d.ts +56 -0
- package/dist/v2/hooks/usePrefersReducedMotion.d.ts.map +1 -0
- package/dist/v2/hooks/usePrefersReducedMotion.js +105 -0
- package/dist/v2/hooks/usePrefersReducedMotion.js.map +1 -0
- package/dist/v2/hooks/useResolvedDensity.js +5 -13
- package/dist/v2/hooks/useResolvedDensity.js.map +1 -1
- package/dist/v2/hooks/useSortedRows.js +4 -6
- package/dist/v2/hooks/useSortedRows.js.map +1 -1
- package/dist/v2/hooks/useTabLoading.js +7 -22
- package/dist/v2/hooks/useTabLoading.js.map +1 -1
- package/dist/v2/index.js +143 -145
- package/dist/v2/index.js.map +1 -1
- package/dist/v2/modalContext.js +2 -2
- package/dist/v2/modalContext.js.map +1 -1
- package/dist/v2/models/favorite.d.ts +8 -9
- package/dist/v2/models/favorite.d.ts.map +1 -1
- package/dist/v2/models/favorite.js.map +1 -1
- package/dist/v2/models/index.js +4 -4
- package/dist/v2/models/index.js.map +1 -1
- package/dist/v2/models/personalization.d.ts +44 -48
- package/dist/v2/models/personalization.d.ts.map +1 -1
- package/dist/v2/models/personalization.js.map +1 -1
- package/dist/v2/models/referentiel.d.ts +32 -50
- package/dist/v2/models/referentiel.d.ts.map +1 -1
- package/dist/v2/models/referentiel.js.map +1 -1
- package/dist/v2/models/savedFilter.d.ts +8 -17
- package/dist/v2/models/savedFilter.d.ts.map +1 -1
- package/dist/v2/models/savedFilter.js.map +1 -1
- package/dist/v2/patterns/ActionBar.js +152 -187
- package/dist/v2/patterns/ActionBar.js.map +1 -1
- package/dist/v2/patterns/AppMain.d.ts +109 -0
- package/dist/v2/patterns/AppMain.d.ts.map +1 -0
- package/dist/v2/patterns/AppMain.js +115 -0
- package/dist/v2/patterns/AppMain.js.map +1 -0
- package/dist/v2/patterns/BulkActionBar.js +40 -42
- package/dist/v2/patterns/BulkActionBar.js.map +1 -1
- package/dist/v2/patterns/ChartFigure.d.ts +124 -0
- package/dist/v2/patterns/ChartFigure.d.ts.map +1 -0
- package/dist/v2/patterns/ChartFigure.js +159 -0
- package/dist/v2/patterns/ChartFigure.js.map +1 -0
- package/dist/v2/patterns/CollapsibleDataGrid.js +138 -174
- package/dist/v2/patterns/CollapsibleDataGrid.js.map +1 -1
- package/dist/v2/patterns/ColumnsToggle.js +60 -94
- package/dist/v2/patterns/ColumnsToggle.js.map +1 -1
- package/dist/v2/patterns/DataGrid.d.ts.map +1 -1
- package/dist/v2/patterns/DataGrid.js +262 -297
- package/dist/v2/patterns/DataGrid.js.map +1 -1
- package/dist/v2/patterns/DataGridSettingsMenu.d.ts +12 -0
- package/dist/v2/patterns/DataGridSettingsMenu.d.ts.map +1 -1
- package/dist/v2/patterns/DataGridSettingsMenu.js +104 -121
- package/dist/v2/patterns/DataGridSettingsMenu.js.map +1 -1
- package/dist/v2/patterns/DataGridToolbar.js +103 -106
- package/dist/v2/patterns/DataGridToolbar.js.map +1 -1
- package/dist/v2/patterns/DataGridVirtualized.js +179 -217
- package/dist/v2/patterns/DataGridVirtualized.js.map +1 -1
- package/dist/v2/patterns/DeleteResourceConfirmDialog.js +32 -35
- package/dist/v2/patterns/DeleteResourceConfirmDialog.js.map +1 -1
- package/dist/v2/patterns/DetailSplit.d.ts +87 -0
- package/dist/v2/patterns/DetailSplit.d.ts.map +1 -0
- package/dist/v2/patterns/DetailSplit.js +116 -0
- package/dist/v2/patterns/DetailSplit.js.map +1 -0
- package/dist/v2/patterns/FavoriteColumn.js +22 -23
- package/dist/v2/patterns/FavoriteColumn.js.map +1 -1
- package/dist/v2/patterns/FavoritesFilter.js +36 -44
- package/dist/v2/patterns/FavoritesFilter.js.map +1 -1
- package/dist/v2/patterns/FilterTabBar.d.ts +28 -0
- package/dist/v2/patterns/FilterTabBar.d.ts.map +1 -0
- package/dist/v2/patterns/FilterTabBar.js +120 -0
- package/dist/v2/patterns/FilterTabBar.js.map +1 -0
- package/dist/v2/patterns/FormErrorSummary.js +20 -23
- package/dist/v2/patterns/FormErrorSummary.js.map +1 -1
- package/dist/v2/patterns/FormPageShell.js +53 -50
- package/dist/v2/patterns/FormPageShell.js.map +1 -1
- package/dist/v2/patterns/FormSection.d.ts +8 -3
- package/dist/v2/patterns/FormSection.d.ts.map +1 -1
- package/dist/v2/patterns/FormSection.js +44 -51
- package/dist/v2/patterns/FormSection.js.map +1 -1
- package/dist/v2/patterns/FormikCheckbox.js +36 -45
- package/dist/v2/patterns/FormikCheckbox.js.map +1 -1
- package/dist/v2/patterns/FormikCheckboxGroup.d.ts +17 -1
- package/dist/v2/patterns/FormikCheckboxGroup.d.ts.map +1 -1
- package/dist/v2/patterns/FormikCheckboxGroup.js +62 -65
- package/dist/v2/patterns/FormikCheckboxGroup.js.map +1 -1
- package/dist/v2/patterns/FormikCombobox.js +55 -72
- package/dist/v2/patterns/FormikCombobox.js.map +1 -1
- package/dist/v2/patterns/FormikDatePicker.js +50 -64
- package/dist/v2/patterns/FormikDatePicker.js.map +1 -1
- package/dist/v2/patterns/FormikDateTimePicker.js +50 -64
- package/dist/v2/patterns/FormikDateTimePicker.js.map +1 -1
- package/dist/v2/patterns/FormikErrorFocus.js +25 -26
- package/dist/v2/patterns/FormikErrorFocus.js.map +1 -1
- package/dist/v2/patterns/FormikErrorSummary.d.ts +74 -0
- package/dist/v2/patterns/FormikErrorSummary.d.ts.map +1 -0
- package/dist/v2/patterns/FormikErrorSummary.js +97 -0
- package/dist/v2/patterns/FormikErrorSummary.js.map +1 -0
- package/dist/v2/patterns/FormikFile.d.ts +14 -1
- package/dist/v2/patterns/FormikFile.d.ts.map +1 -1
- package/dist/v2/patterns/FormikFile.js +99 -83
- package/dist/v2/patterns/FormikFile.js.map +1 -1
- package/dist/v2/patterns/FormikInput.js +45 -58
- package/dist/v2/patterns/FormikInput.js.map +1 -1
- package/dist/v2/patterns/FormikRadioGroup.js +45 -56
- package/dist/v2/patterns/FormikRadioGroup.js.map +1 -1
- package/dist/v2/patterns/FormikReferentielField.d.ts +12 -1
- package/dist/v2/patterns/FormikReferentielField.d.ts.map +1 -1
- package/dist/v2/patterns/FormikReferentielField.js +54 -64
- package/dist/v2/patterns/FormikReferentielField.js.map +1 -1
- package/dist/v2/patterns/FormikSelect.js +70 -92
- package/dist/v2/patterns/FormikSelect.js.map +1 -1
- package/dist/v2/patterns/FormikTextarea.js +35 -51
- package/dist/v2/patterns/FormikTextarea.js.map +1 -1
- package/dist/v2/patterns/KeyboardShortcutsHelp.js +60 -80
- package/dist/v2/patterns/KeyboardShortcutsHelp.js.map +1 -1
- package/dist/v2/patterns/NetworkErrorBanner.js +13 -16
- package/dist/v2/patterns/NetworkErrorBanner.js.map +1 -1
- package/dist/v2/patterns/PageContent.js +17 -20
- package/dist/v2/patterns/PageContent.js.map +1 -1
- package/dist/v2/patterns/PreviewDrawer.d.ts +49 -0
- package/dist/v2/patterns/PreviewDrawer.d.ts.map +1 -0
- package/dist/v2/patterns/PreviewDrawer.js +159 -0
- package/dist/v2/patterns/PreviewDrawer.js.map +1 -0
- package/dist/v2/patterns/ReferentielField.d.ts +86 -2
- package/dist/v2/patterns/ReferentielField.d.ts.map +1 -1
- package/dist/v2/patterns/ReferentielField.js +347 -327
- package/dist/v2/patterns/ReferentielField.js.map +1 -1
- package/dist/v2/patterns/RowFavoriteToggle.d.ts +6 -0
- package/dist/v2/patterns/RowFavoriteToggle.d.ts.map +1 -1
- package/dist/v2/patterns/RowFavoriteToggle.js +38 -30
- package/dist/v2/patterns/RowFavoriteToggle.js.map +1 -1
- package/dist/v2/patterns/SaveFilterDialog.js +50 -77
- package/dist/v2/patterns/SaveFilterDialog.js.map +1 -1
- package/dist/v2/patterns/SavedFiltersMenu.js +89 -107
- package/dist/v2/patterns/SavedFiltersMenu.js.map +1 -1
- package/dist/v2/patterns/SkeletonPageShell.js +122 -143
- package/dist/v2/patterns/SkeletonPageShell.js.map +1 -1
- package/dist/v2/patterns/SortableHeader.js +35 -57
- package/dist/v2/patterns/SortableHeader.js.map +1 -1
- package/dist/v2/patterns/Tour.js +121 -142
- package/dist/v2/patterns/Tour.js.map +1 -1
- package/dist/v2/patterns/_dataGridShared.d.ts.map +1 -1
- package/dist/v2/patterns/_dataGridShared.js +131 -147
- package/dist/v2/patterns/_dataGridShared.js.map +1 -1
- package/dist/v2/patterns/_pickerSerialisation.js +9 -10
- package/dist/v2/patterns/_pickerSerialisation.js.map +1 -1
- package/dist/v2/patterns/_sort.js +17 -33
- package/dist/v2/patterns/_sort.js.map +1 -1
- package/dist/v2/patterns/_useColumnReorder.js +124 -163
- package/dist/v2/patterns/_useColumnReorder.js.map +1 -1
- package/dist/v2/patterns/_useColumnResize.js +80 -99
- package/dist/v2/patterns/_useColumnResize.js.map +1 -1
- package/dist/v2/patterns/filterCriteria.d.ts +78 -0
- package/dist/v2/patterns/filterCriteria.d.ts.map +1 -0
- package/dist/v2/patterns/filterCriteria.js +110 -0
- package/dist/v2/patterns/filterCriteria.js.map +1 -0
- package/dist/v2/patterns/index.d.ts +160 -0
- package/dist/v2/patterns/index.d.ts.map +1 -1
- package/dist/v2/patterns/index.js +157 -79
- package/dist/v2/patterns/index.js.map +1 -1
- package/dist/v2/patterns/rowActions.d.ts +150 -0
- package/dist/v2/patterns/rowActions.d.ts.map +1 -0
- package/dist/v2/patterns/rowActions.js +232 -0
- package/dist/v2/patterns/rowActions.js.map +1 -0
- package/dist/v2/personalization/PersonalizationProvider.d.ts.map +1 -1
- package/dist/v2/personalization/PersonalizationProvider.js +57 -53
- package/dist/v2/personalization/PersonalizationProvider.js.map +1 -1
- package/dist/v2/personalization/adapters/_storageKey.js +5 -5
- package/dist/v2/personalization/adapters/_storageKey.js.map +1 -1
- package/dist/v2/personalization/adapters/createLocalStorageAdapter.js +25 -24
- package/dist/v2/personalization/adapters/createLocalStorageAdapter.js.map +1 -1
- package/dist/v2/personalization/adapters/createMemoryAdapter.js +14 -14
- package/dist/v2/personalization/adapters/createMemoryAdapter.js.map +1 -1
- package/dist/v2/personalization/adapters/index.js +5 -5
- package/dist/v2/personalization/adapters/index.js.map +1 -1
- package/dist/v2/personalization/capabilities/favorites.js +39 -62
- package/dist/v2/personalization/capabilities/favorites.js.map +1 -1
- package/dist/v2/personalization/capabilities/favoritesView.js +25 -37
- package/dist/v2/personalization/capabilities/favoritesView.js.map +1 -1
- package/dist/v2/personalization/capabilities/gridPreferences.js +31 -36
- package/dist/v2/personalization/capabilities/gridPreferences.js.map +1 -1
- package/dist/v2/personalization/capabilities/index.js +12 -12
- package/dist/v2/personalization/capabilities/reviveSavedCriteria.d.ts +88 -0
- package/dist/v2/personalization/capabilities/reviveSavedCriteria.d.ts.map +1 -0
- package/dist/v2/personalization/capabilities/reviveSavedCriteria.js +126 -0
- package/dist/v2/personalization/capabilities/reviveSavedCriteria.js.map +1 -0
- package/dist/v2/personalization/capabilities/savedFilters.js +93 -100
- package/dist/v2/personalization/capabilities/savedFilters.js.map +1 -1
- package/dist/v2/personalization/createPersonalizationStore.d.ts.map +1 -1
- package/dist/v2/personalization/createPersonalizationStore.js +81 -182
- package/dist/v2/personalization/createPersonalizationStore.js.map +1 -1
- package/dist/v2/personalization/index.d.ts +16 -0
- package/dist/v2/personalization/index.d.ts.map +1 -1
- package/dist/v2/personalization/index.js +30 -23
- package/dist/v2/personalization/index.js.map +1 -1
- package/dist/v2/personalization/personalizationContext.js +10 -12
- package/dist/v2/personalization/personalizationContext.js.map +1 -1
- package/dist/v2/personalization/schema.js +8 -9
- package/dist/v2/personalization/schema.js.map +1 -1
- package/dist/v2/referentiel/ReferentielProvider.js +31 -45
- package/dist/v2/referentiel/ReferentielProvider.js.map +1 -1
- package/dist/v2/referentiel/index.js +11 -13
- package/dist/v2/referentiel/index.js.map +1 -1
- package/dist/v2/referentiel/types.d.ts +105 -0
- package/dist/v2/referentiel/types.d.ts.map +1 -0
- package/dist/v2/referentiel/types.js +6 -0
- package/dist/v2/referentiel/types.js.map +1 -0
- package/dist/v2/referentiel/useReferentielClient.js +13 -16
- package/dist/v2/referentiel/useReferentielClient.js.map +1 -1
- package/dist/v2/referentiel/useReferentielOptions.d.ts +7 -17
- package/dist/v2/referentiel/useReferentielOptions.d.ts.map +1 -1
- package/dist/v2/referentiel/useReferentielOptions.js +63 -120
- package/dist/v2/referentiel/useReferentielOptions.js.map +1 -1
- package/dist/v2/referentiel/useReferentielSearch.d.ts +7 -48
- package/dist/v2/referentiel/useReferentielSearch.d.ts.map +1 -1
- package/dist/v2/referentiel/useReferentielSearch.js +40 -95
- package/dist/v2/referentiel/useReferentielSearch.js.map +1 -1
- package/dist/v2/theme/_brand.js +12 -26
- package/dist/v2/theme/_brand.js.map +1 -1
- package/dist/v2/theme/_brandSecondary.js +12 -26
- package/dist/v2/theme/_brandSecondary.js.map +1 -1
- package/dist/v2/theme/createPortnetTheme.js +41 -49
- package/dist/v2/theme/createPortnetTheme.js.map +1 -1
- package/dist/v2/theme/cssVariables.d.ts +3 -3
- package/dist/v2/theme/cssVariables.d.ts.map +1 -1
- package/dist/v2/theme/cssVariables.js +65 -70
- package/dist/v2/theme/cssVariables.js.map +1 -1
- package/dist/v2/theme/index.js +10 -10
- package/dist/v2/theme/index.js.map +1 -1
- package/dist/v2/tokens/breakpoints.js +16 -16
- package/dist/v2/tokens/breakpoints.js.map +1 -1
- package/dist/v2/tokens/chart.d.ts +103 -0
- package/dist/v2/tokens/chart.d.ts.map +1 -0
- package/dist/v2/tokens/chart.js +270 -0
- package/dist/v2/tokens/chart.js.map +1 -0
- package/dist/v2/tokens/colors.js +24 -24
- package/dist/v2/tokens/colors.js.map +1 -1
- package/dist/v2/tokens/density.d.ts +104 -0
- package/dist/v2/tokens/density.d.ts.map +1 -1
- package/dist/v2/tokens/density.js +67 -12
- package/dist/v2/tokens/density.js.map +1 -1
- package/dist/v2/tokens/index.d.ts +50 -1
- package/dist/v2/tokens/index.d.ts.map +1 -1
- package/dist/v2/tokens/index.js +116 -68
- package/dist/v2/tokens/index.js.map +1 -1
- package/dist/v2/tokens/motion.js +16 -22
- package/dist/v2/tokens/motion.js.map +1 -1
- package/dist/v2/tokens/radius.js +3 -3
- package/dist/v2/tokens/radius.js.map +1 -1
- package/dist/v2/tokens/shadows.js +8 -8
- package/dist/v2/tokens/shadows.js.map +1 -1
- package/dist/v2/tokens/spacing.js +4 -4
- package/dist/v2/tokens/spacing.js.map +1 -1
- package/dist/v2/tokens/state.js +3 -3
- package/dist/v2/tokens/state.js.map +1 -1
- package/dist/v2/tokens/statusPalette.js +21 -23
- package/dist/v2/tokens/statusPalette.js.map +1 -1
- package/dist/v2/tokens/tokens.json +6 -1
- package/dist/v2/tokens/typography.js +15 -15
- package/dist/v2/tokens/typography.js.map +1 -1
- package/dist/v2/tokens/zIndex.js +3 -3
- package/dist/v2/tokens/zIndex.js.map +1 -1
- package/dist/v2/types/datagrid.d.ts +9 -1
- package/dist/v2/types/datagrid.d.ts.map +1 -1
- package/dist/v2/types/datagrid.js.map +1 -1
- package/dist/v2/types/index.js +2 -2
- package/dist/v2/types/index.js.map +1 -1
- package/dist/v2/utils/apiError.js +16 -37
- package/dist/v2/utils/apiError.js.map +1 -1
- package/dist/v2/utils/contrast.js +31 -32
- package/dist/v2/utils/contrast.js.map +1 -1
- package/dist/v2/utils/cx.js +7 -27
- package/dist/v2/utils/cx.js.map +1 -1
- package/dist/v2/utils/fileDownload.js +25 -28
- package/dist/v2/utils/fileDownload.js.map +1 -1
- package/dist/v2/utils/fileValidation.d.ts +116 -0
- package/dist/v2/utils/fileValidation.d.ts.map +1 -0
- package/dist/v2/utils/fileValidation.js +220 -0
- package/dist/v2/utils/fileValidation.js.map +1 -0
- package/dist/v2/utils/fmtDate.d.ts +103 -0
- package/dist/v2/utils/fmtDate.d.ts.map +1 -0
- package/dist/v2/utils/fmtDate.js +119 -0
- package/dist/v2/utils/fmtDate.js.map +1 -0
- package/dist/v2/utils/fmtMoney.d.ts +3 -3
- package/dist/v2/utils/fmtMoney.d.ts.map +1 -1
- package/dist/v2/utils/fmtMoney.js +9 -11
- package/dist/v2/utils/fmtMoney.js.map +1 -1
- package/dist/v2/utils/formikErrors.d.ts +67 -0
- package/dist/v2/utils/formikErrors.d.ts.map +1 -0
- package/dist/v2/utils/formikErrors.js +85 -0
- package/dist/v2/utils/formikErrors.js.map +1 -0
- package/dist/v2/utils/index.d.ts +5 -0
- package/dist/v2/utils/index.d.ts.map +1 -1
- package/dist/v2/utils/index.js +67 -18
- package/dist/v2/utils/index.js.map +1 -1
- package/dist/v2/utils/mergeLabels.js +9 -14
- package/dist/v2/utils/mergeLabels.js.map +1 -1
- package/dist/v2/utils/networkStatus.js +14 -14
- package/dist/v2/utils/networkStatus.js.map +1 -1
- package/package.json +26 -9
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
-
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
3
|
-
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); }
|
|
4
|
-
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; }
|
|
5
|
-
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; }
|
|
6
|
-
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; }
|
|
7
|
-
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; }
|
|
8
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
9
|
-
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); }
|
|
10
1
|
import * as React from "react";
|
|
11
2
|
import Box from "@mui/material/Box";
|
|
12
3
|
import Table from "@mui/material/Table";
|
|
@@ -49,6 +40,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
49
40
|
* masks the data column(s) it covers.
|
|
50
41
|
* - The actions column header carries a visually-hidden accessible
|
|
51
42
|
* name from labels.actionsHeader (default "Actions").
|
|
43
|
+
* - The cell CONTAINS its own click and keydown: an action must not also
|
|
44
|
+
* fire `onRowClick`. See the note at ROW_ACTIONS_CELL_SX.
|
|
52
45
|
*
|
|
53
46
|
* Mobile card view (R1 mobile, opt-in):
|
|
54
47
|
* - When `renderMobileCard` is provided AND viewport is below
|
|
@@ -69,10 +62,10 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
69
62
|
* strings are treated as "not provided". Charter R-DG + WCAG 2.2 AA.
|
|
70
63
|
*/
|
|
71
64
|
function useAriaLabelWarn(ariaLabel, labelsTableAria) {
|
|
72
|
-
React.useEffect(
|
|
65
|
+
React.useEffect(() => {
|
|
73
66
|
if (process.env["NODE_ENV"] === "production") return;
|
|
74
|
-
|
|
75
|
-
|
|
67
|
+
const hasAriaLabel = typeof ariaLabel === "string" && ariaLabel.trim().length > 0;
|
|
68
|
+
const hasLabelsAria = typeof labelsTableAria === "string" && labelsTableAria.trim().length > 0;
|
|
76
69
|
if (hasAriaLabel || hasLabelsAria) return;
|
|
77
70
|
|
|
78
71
|
// eslint-disable-next-line no-console
|
|
@@ -88,8 +81,36 @@ function useAriaLabelWarn(ariaLabel, labelsTableAria) {
|
|
|
88
81
|
* position:sticky right:0 glues the overlay's positioned ancestor to the
|
|
89
82
|
* visible right edge during horizontal scroll and provides a focus
|
|
90
83
|
* container. The strict 0 width makes the cell contribute nothing to
|
|
91
|
-
* layout; overflow:visible lets the absolute overlay render outside it.
|
|
92
|
-
|
|
84
|
+
* layout; overflow:visible lets the absolute overlay render outside it.
|
|
85
|
+
*
|
|
86
|
+
* ─── THE CELL CONTAINS ITS OWN EVENTS, AND IT MUST ───────────────────
|
|
87
|
+
*
|
|
88
|
+
* The row carries `onClick={() => onRowClick(row)}` and a keydown handler,
|
|
89
|
+
* and this cell is INSIDE it. Without containment, activating a row action
|
|
90
|
+
* also triggers the row click — on a listing that is §Row Interaction's
|
|
91
|
+
* preview drawer, so the user gets the action AND a drawer opening over it.
|
|
92
|
+
*
|
|
93
|
+
* It cannot be fixed at the action level. `buildRowActions` /
|
|
94
|
+
* `buildRowActionMenu` (./rowActions) describe an action as
|
|
95
|
+
* `onClick: (row: T) => void` — the DOM event is deliberately not exposed,
|
|
96
|
+
* because a business descriptor has no business knowing about propagation.
|
|
97
|
+
* `OverflowMenu`'s trigger is in the same position. So the only place that
|
|
98
|
+
* can hold this invariant for EVERY shape — the kebab, the icon row, and any
|
|
99
|
+
* host-written `rowActions` renderer — is the cell.
|
|
100
|
+
*
|
|
101
|
+
* Same treatment as the selection checkbox cell in the body below, which has
|
|
102
|
+
* always stopped both events for exactly this reason. Containing them here
|
|
103
|
+
* makes the two consistent instead of leaving one of the two interactive
|
|
104
|
+
* cells of a row unguarded.
|
|
105
|
+
*
|
|
106
|
+
* `stopPropagation` and NOT `preventDefault`: the buttons' own activation,
|
|
107
|
+
* including Enter/Space on a focused action, is untouched — only the bubble
|
|
108
|
+
* to the row is cut.
|
|
109
|
+
*
|
|
110
|
+
* Surfaced by addm-fe's Area 3 audit: both of its listings had hand-written
|
|
111
|
+
* their icon row specifically to call `e.stopPropagation()` per button, which
|
|
112
|
+
* is what made adopting `buildRowActions` look like a regression. */
|
|
113
|
+
const ROW_ACTIONS_CELL_SX = Object.freeze({
|
|
93
114
|
position: "sticky",
|
|
94
115
|
right: 0,
|
|
95
116
|
zIndex: 1,
|
|
@@ -101,7 +122,7 @@ var ROW_ACTIONS_CELL_SX = Object.freeze({
|
|
|
101
122
|
borderBottom: "1px solid var(--border)",
|
|
102
123
|
overflow: "visible"
|
|
103
124
|
});
|
|
104
|
-
|
|
125
|
+
const ROW_ACTIONS_HEAD_CELL_SX = Object.freeze({
|
|
105
126
|
position: "sticky",
|
|
106
127
|
right: 0,
|
|
107
128
|
top: 0,
|
|
@@ -118,7 +139,7 @@ var ROW_ACTIONS_HEAD_CELL_SX = Object.freeze({
|
|
|
118
139
|
* auto-generated actions column header an accessible name without adding
|
|
119
140
|
* visible text. clip-rect keeps it painted into the a11y tree while
|
|
120
141
|
* removing it from visual layout. */
|
|
121
|
-
|
|
142
|
+
const VISUALLY_HIDDEN_SX = Object.freeze({
|
|
122
143
|
position: "absolute",
|
|
123
144
|
width: "1px",
|
|
124
145
|
height: "1px",
|
|
@@ -133,7 +154,7 @@ var VISUALLY_HIDDEN_SX = Object.freeze({
|
|
|
133
154
|
/* R2 — Overlay floats over the row's right edge. Invisible by default,
|
|
134
155
|
* visible on hover / focus-within / coarse pointer. The parent
|
|
135
156
|
* ROW_ACTIONS_CELL_SX (position:sticky) is the containing block. */
|
|
136
|
-
|
|
157
|
+
const ROW_ACTIONS_OVERLAY_SX = Object.freeze({
|
|
137
158
|
position: "absolute",
|
|
138
159
|
right: "var(--s-3)",
|
|
139
160
|
top: "50%",
|
|
@@ -164,14 +185,14 @@ var ROW_ACTIONS_OVERLAY_SX = Object.freeze({
|
|
|
164
185
|
/* R2 — Filler cells stay at width:0 so they don't take any proportional
|
|
165
186
|
* residual under tableLayout:auto. (Local width:0 variants — distinct
|
|
166
187
|
* from _dataGridShared's exports, which are not imported here.) */
|
|
167
|
-
|
|
188
|
+
const FILLER_CELL_SX = Object.freeze({
|
|
168
189
|
padding: 0,
|
|
169
190
|
width: 0,
|
|
170
191
|
minWidth: 0,
|
|
171
192
|
maxWidth: 0,
|
|
172
193
|
borderBottom: "1px solid var(--border)"
|
|
173
194
|
});
|
|
174
|
-
|
|
195
|
+
const FILLER_HEAD_CELL_SX = Object.freeze({
|
|
175
196
|
padding: 0,
|
|
176
197
|
width: 0,
|
|
177
198
|
minWidth: 0,
|
|
@@ -187,7 +208,7 @@ var FILLER_HEAD_CELL_SX = Object.freeze({
|
|
|
187
208
|
* focus-within, and always revealed while itself focus-visible so it stays
|
|
188
209
|
* Tab-reachable. Absolutely positioned in the header cell's inline-start
|
|
189
210
|
* padding; background matches the header so it masks the sliver it overlaps. */
|
|
190
|
-
|
|
211
|
+
const REORDER_GRIP_SX = Object.freeze({
|
|
191
212
|
position: "absolute",
|
|
192
213
|
insetInlineStart: 2,
|
|
193
214
|
top: "50%",
|
|
@@ -226,13 +247,13 @@ var REORDER_GRIP_SX = Object.freeze({
|
|
|
226
247
|
|
|
227
248
|
/* ── Mobile card view SX (R1 mobile) ─────────────────────────────── */
|
|
228
249
|
|
|
229
|
-
|
|
250
|
+
const CARD_STACK_SX = Object.freeze({
|
|
230
251
|
display: "flex",
|
|
231
252
|
flexDirection: "column",
|
|
232
253
|
gap: "var(--s-2)",
|
|
233
254
|
padding: "var(--s-3)"
|
|
234
255
|
});
|
|
235
|
-
|
|
256
|
+
const CARD_BASE_SX = Object.freeze({
|
|
236
257
|
background: "var(--surface)",
|
|
237
258
|
border: "1px solid var(--border)",
|
|
238
259
|
borderRadius: "var(--r-md)",
|
|
@@ -240,7 +261,8 @@ var CARD_BASE_SX = Object.freeze({
|
|
|
240
261
|
transition: "background 60ms ease, border-color 60ms ease",
|
|
241
262
|
minHeight: 44
|
|
242
263
|
});
|
|
243
|
-
|
|
264
|
+
const CARD_CLICKABLE_SX = Object.freeze({
|
|
265
|
+
...CARD_BASE_SX,
|
|
244
266
|
cursor: "pointer",
|
|
245
267
|
"&:hover": {
|
|
246
268
|
background: "var(--bg-hover)"
|
|
@@ -259,8 +281,8 @@ var CARD_CLICKABLE_SX = Object.freeze(_objectSpread(_objectSpread({}, CARD_BASE_
|
|
|
259
281
|
background: "var(--accent-soft)",
|
|
260
282
|
borderColor: "var(--accent)"
|
|
261
283
|
}
|
|
262
|
-
})
|
|
263
|
-
|
|
284
|
+
});
|
|
285
|
+
const CARD_SKELETON_SX = Object.freeze({
|
|
264
286
|
height: 90,
|
|
265
287
|
background: "var(--bg-subtle)",
|
|
266
288
|
borderRadius: "var(--r-md)",
|
|
@@ -269,24 +291,24 @@ var CARD_SKELETON_SX = Object.freeze({
|
|
|
269
291
|
animation: "none"
|
|
270
292
|
}
|
|
271
293
|
});
|
|
272
|
-
|
|
294
|
+
const CARD_EMPTY_WRAPPER_SX = Object.freeze({
|
|
273
295
|
padding: "var(--s-6) var(--s-4)"
|
|
274
296
|
});
|
|
275
297
|
|
|
276
298
|
/* R2 — Default min-width contribution for a column without an explicit
|
|
277
299
|
* `width`. 120 px is a sensible floor for a typical data cell. */
|
|
278
|
-
|
|
300
|
+
const UNSIZED_COL_MIN_DEFAULT = 120;
|
|
279
301
|
|
|
280
302
|
/* R2 — Upper bound on how much ANY single column may contribute to the
|
|
281
303
|
* table's hard min-width. A column may DECLARE a large preferred width and
|
|
282
304
|
* tableLayout:auto grows it toward that when the container has room, but
|
|
283
305
|
* its preferred width must not drag the table's min-width past this cap
|
|
284
306
|
* (below which horizontal scroll kicks in). */
|
|
285
|
-
|
|
307
|
+
const COL_MINWIDTH_CAP = 220;
|
|
286
308
|
function widthToNumber(w) {
|
|
287
309
|
if (typeof w === "number" && Number.isFinite(w)) return w;
|
|
288
310
|
if (typeof w === "string") {
|
|
289
|
-
|
|
311
|
+
const parsed = parseFloat(w);
|
|
290
312
|
if (!Number.isNaN(parsed)) return parsed;
|
|
291
313
|
}
|
|
292
314
|
return 0;
|
|
@@ -303,158 +325,113 @@ function readCellValue(row, key) {
|
|
|
303
325
|
/* Default getRowId (`(r) => r.id`). Typed against `unknown` so the single
|
|
304
326
|
* assertion is legal; `(unknown) => RowId` is assignable to the declared
|
|
305
327
|
* `(row: T) => RowId` by parameter contravariance. */
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
labels = _ref.labels,
|
|
342
|
-
_ref$maxBodyHeight = _ref.maxBodyHeight,
|
|
343
|
-
maxBodyHeight = _ref$maxBodyHeight === void 0 ? DEFAULT_MAX_BODY_HEIGHT : _ref$maxBodyHeight,
|
|
344
|
-
_ref$resizable = _ref.resizable,
|
|
345
|
-
resizable = _ref$resizable === void 0 ? false : _ref$resizable,
|
|
346
|
-
columnWidths = _ref.columnWidths,
|
|
347
|
-
onColumnWidthsChange = _ref.onColumnWidthsChange,
|
|
348
|
-
_ref$reorderable = _ref.reorderable,
|
|
349
|
-
reorderable = _ref$reorderable === void 0 ? false : _ref$reorderable,
|
|
350
|
-
columnOrder = _ref.columnOrder,
|
|
351
|
-
onColumnOrderChange = _ref.onColumnOrderChange,
|
|
352
|
-
renderMobileCard = _ref.renderMobileCard,
|
|
353
|
-
_ref$mobileBreakpoint = _ref.mobileBreakpoint,
|
|
354
|
-
mobileBreakpoint = _ref$mobileBreakpoint === void 0 ? "sm" : _ref$mobileBreakpoint;
|
|
328
|
+
const defaultGetRowId = row => row.id;
|
|
329
|
+
function DataGrid({
|
|
330
|
+
rows = [],
|
|
331
|
+
columns: rawColumns = [],
|
|
332
|
+
loading = false,
|
|
333
|
+
error = null,
|
|
334
|
+
sort = [],
|
|
335
|
+
onSortChange,
|
|
336
|
+
selection,
|
|
337
|
+
onSelectionChange,
|
|
338
|
+
pagination,
|
|
339
|
+
emptyState,
|
|
340
|
+
filteredEmptyState,
|
|
341
|
+
errorState,
|
|
342
|
+
getRowId = defaultGetRowId,
|
|
343
|
+
onRowClick,
|
|
344
|
+
rowFlashId,
|
|
345
|
+
activeRowId,
|
|
346
|
+
rowActions,
|
|
347
|
+
hiddenColumns,
|
|
348
|
+
filtered = false,
|
|
349
|
+
density = "comfortable",
|
|
350
|
+
ariaLabel,
|
|
351
|
+
locale = "fr-FR",
|
|
352
|
+
labels,
|
|
353
|
+
maxBodyHeight = DEFAULT_MAX_BODY_HEIGHT,
|
|
354
|
+
resizable = false,
|
|
355
|
+
columnWidths,
|
|
356
|
+
onColumnWidthsChange,
|
|
357
|
+
reorderable = false,
|
|
358
|
+
columnOrder,
|
|
359
|
+
onColumnOrderChange,
|
|
360
|
+
renderMobileCard,
|
|
361
|
+
mobileBreakpoint = "sm"
|
|
362
|
+
}) {
|
|
355
363
|
// WCAG 1.3.1 / 4.1.2 — dev guard: warn once on mount when no contextual
|
|
356
364
|
// table name has been provided by the caller.
|
|
357
|
-
useAriaLabelWarn(ariaLabel, labels
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
var tableAria = ariaLabel != null ? ariaLabel : L.tableAria;
|
|
362
|
-
var showSkeleton = useDelayedFlag(loading);
|
|
365
|
+
useAriaLabelWarn(ariaLabel, labels?.tableAria);
|
|
366
|
+
const L = React.useMemo(() => mergeLabels(labels), [labels]);
|
|
367
|
+
const tableAria = ariaLabel != null ? ariaLabel : L.tableAria;
|
|
368
|
+
const showSkeleton = useDelayedFlag(loading);
|
|
363
369
|
useColumnsStabilityWarn(rawColumns);
|
|
364
370
|
|
|
365
371
|
// R1 mobile — detect xs viewport. Switch to card view only when the host
|
|
366
372
|
// opted in by passing renderMobileCard.
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
}, [hiddenColumns]);
|
|
376
|
-
var columns = React.useMemo(function () {
|
|
377
|
-
return orderedColumns.filter(function (c) {
|
|
378
|
-
return !hiddenSet.has(c.key);
|
|
379
|
-
});
|
|
380
|
-
}, [orderedColumns, hiddenSet]);
|
|
381
|
-
var resize = useColumnResize(columnWidths, onColumnWidthsChange);
|
|
382
|
-
var reorder = useColumnReorder(columns, columnOrder, onColumnOrderChange, {
|
|
373
|
+
const theme = useTheme();
|
|
374
|
+
const isBelowBreakpoint = useMediaQuery(theme.breakpoints.down(mobileBreakpoint));
|
|
375
|
+
const useCardView = isBelowBreakpoint && typeof renderMobileCard === "function";
|
|
376
|
+
const orderedColumns = React.useMemo(() => applyColumnOrder(rawColumns, columnOrder), [rawColumns, columnOrder]);
|
|
377
|
+
const hiddenSet = React.useMemo(() => hiddenColumns instanceof Set ? hiddenColumns : new Set(hiddenColumns || []), [hiddenColumns]);
|
|
378
|
+
const columns = React.useMemo(() => orderedColumns.filter(c => !hiddenSet.has(c.key)), [orderedColumns, hiddenSet]);
|
|
379
|
+
const resize = useColumnResize(columnWidths, onColumnWidthsChange);
|
|
380
|
+
const reorder = useColumnReorder(columns, columnOrder, onColumnOrderChange, {
|
|
383
381
|
resizeIsActive: resize.isResizing
|
|
384
382
|
});
|
|
385
383
|
|
|
386
384
|
// DG-R1 — after a keyboard reorder the moved column's grip is re-rendered at
|
|
387
385
|
// a new position and the browser drops focus; re-focus it so repeated Arrow
|
|
388
386
|
// presses keep moving the same column. Keyed on the host-controlled order.
|
|
389
|
-
|
|
390
|
-
React.useEffect(
|
|
391
|
-
|
|
387
|
+
const pendingReorderFocusRef = React.useRef(null);
|
|
388
|
+
React.useEffect(() => {
|
|
389
|
+
const key = pendingReorderFocusRef.current;
|
|
392
390
|
if (!key || typeof document === "undefined") return;
|
|
393
391
|
pendingReorderFocusRef.current = null;
|
|
394
|
-
|
|
395
|
-
|
|
392
|
+
const escaped = typeof window !== "undefined" && window.CSS && typeof window.CSS.escape === "function" ? window.CSS.escape(key) : key;
|
|
393
|
+
const el = document.querySelector(`[data-reorder-grip="${escaped}"]`);
|
|
396
394
|
if (el instanceof HTMLElement) el.focus();
|
|
397
395
|
}, [columnOrder]);
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
}, [selection]);
|
|
407
|
-
var allSelected = rows.length > 0 && rows.every(function (r) {
|
|
408
|
-
return selectedSet.has(getRowId(r));
|
|
409
|
-
});
|
|
410
|
-
var someSelected = !allSelected && rows.some(function (r) {
|
|
411
|
-
return selectedSet.has(getRowId(r));
|
|
412
|
-
});
|
|
413
|
-
var toggleAll = function toggleAll() {
|
|
396
|
+
const showCheckbox = !!onSelectionChange;
|
|
397
|
+
const hasRowActions = typeof rowActions === "function";
|
|
398
|
+
const colCount = columns.length + (showCheckbox ? 1 : 0) + 1 + (hasRowActions ? 1 : 0);
|
|
399
|
+
const sortable = col => col.sortable !== false && !!col.key && !!onSortChange;
|
|
400
|
+
const selectedSet = React.useMemo(() => selection instanceof Set ? selection : new Set(selection || []), [selection]);
|
|
401
|
+
const allSelected = rows.length > 0 && rows.every(r => selectedSet.has(getRowId(r)));
|
|
402
|
+
const someSelected = !allSelected && rows.some(r => selectedSet.has(getRowId(r)));
|
|
403
|
+
const toggleAll = () => {
|
|
414
404
|
if (!onSelectionChange) return;
|
|
415
405
|
if (allSelected) onSelectionChange(new Set());else onSelectionChange(new Set(rows.map(getRowId)));
|
|
416
406
|
};
|
|
417
|
-
|
|
407
|
+
const toggleRow = id => {
|
|
418
408
|
if (!onSelectionChange) return;
|
|
419
|
-
|
|
420
|
-
if (next.has(id)) next
|
|
409
|
+
const next = new Set(selectedSet);
|
|
410
|
+
if (next.has(id)) next.delete(id);else next.add(id);
|
|
421
411
|
onSelectionChange(next);
|
|
422
412
|
};
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
}
|
|
430
|
-
};
|
|
413
|
+
const handleRowKeyDown = row => e => {
|
|
414
|
+
if (!onRowClick) return;
|
|
415
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
416
|
+
e.preventDefault();
|
|
417
|
+
onRowClick(row);
|
|
418
|
+
}
|
|
431
419
|
};
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
};
|
|
438
|
-
}, [maxBodyHeight]);
|
|
420
|
+
const scrollContainerSx = React.useMemo(() => ({
|
|
421
|
+
overflow: "auto",
|
|
422
|
+
maxHeight: maxBodyHeight,
|
|
423
|
+
width: "100%"
|
|
424
|
+
}), [maxBodyHeight]);
|
|
439
425
|
|
|
440
426
|
/* R2 — Computed table min-width. Each column's contribution is clamped
|
|
441
427
|
* to COL_MINWIDTH_CAP; unsized columns contribute UNSIZED_COL_MIN_DEFAULT;
|
|
442
428
|
* the checkbox column adds ~48px. The rowActions cell contributes 0. */
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
var col = _step.value;
|
|
450
|
-
var w = widthToNumber(col.width);
|
|
451
|
-
var contribution = w > 0 ? Math.min(w, COL_MINWIDTH_CAP) : UNSIZED_COL_MIN_DEFAULT;
|
|
452
|
-
sum += contribution;
|
|
453
|
-
}
|
|
454
|
-
} catch (err) {
|
|
455
|
-
_iterator.e(err);
|
|
456
|
-
} finally {
|
|
457
|
-
_iterator.f();
|
|
429
|
+
const tableMinWidth = React.useMemo(() => {
|
|
430
|
+
let sum = 0;
|
|
431
|
+
for (const col of columns) {
|
|
432
|
+
const w = widthToNumber(col.width);
|
|
433
|
+
const contribution = w > 0 ? Math.min(w, COL_MINWIDTH_CAP) : UNSIZED_COL_MIN_DEFAULT;
|
|
434
|
+
sum += contribution;
|
|
458
435
|
}
|
|
459
436
|
if (showCheckbox) sum += 48;
|
|
460
437
|
return sum;
|
|
@@ -463,13 +440,12 @@ function DataGrid(_ref) {
|
|
|
463
440
|
// R2 — tableLayout:"auto" + computed minWidth. (SxProps-typed so the
|
|
464
441
|
// tableLayout literal stays typed; the density base is narrowed to a
|
|
465
442
|
// SystemStyleObject at the spread to avoid the fn/array arms of SxProps.)
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
}, [density, tableMinWidth]);
|
|
443
|
+
const tableSx = React.useMemo(() => ({
|
|
444
|
+
...(TABLE_BY_DENSITY[density] || TABLE_BY_DENSITY.comfortable),
|
|
445
|
+
width: "100%",
|
|
446
|
+
minWidth: tableMinWidth,
|
|
447
|
+
tableLayout: "auto"
|
|
448
|
+
}), [density, tableMinWidth]);
|
|
473
449
|
|
|
474
450
|
/* DG-1 (perf) — the desktop body renders EVERY row (no virtualization), so
|
|
475
451
|
* building the cell sx inline per row × per column allocated N×M fresh style
|
|
@@ -480,37 +456,34 @@ function DataGrid(_ref) {
|
|
|
480
456
|
* widths (the latter only changes during an active resize drag).
|
|
481
457
|
* --text-body (14px) is the explicit inheritance that replaced a dangling
|
|
482
458
|
* `var(--text-fs)` token typo (no fallback). */
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
fontSize: "var(--text-body)",
|
|
494
|
-
whiteSpace: col.wrap ? "normal" : "nowrap",
|
|
495
|
-
overflow: "hidden",
|
|
496
|
-
textOverflow: "ellipsis"
|
|
497
|
-
}, col.mono ? {
|
|
459
|
+
const columnCellSx = React.useMemo(() => {
|
|
460
|
+
const byKey = new Map();
|
|
461
|
+
for (const col of columns) {
|
|
462
|
+
const effectiveWidth = (resize.liveWidths && resize.liveWidths[col.key]) ?? col.width;
|
|
463
|
+
byKey.set(col.key, {
|
|
464
|
+
fontSize: "var(--text-body)",
|
|
465
|
+
whiteSpace: col.wrap ? "normal" : "nowrap",
|
|
466
|
+
overflow: "hidden",
|
|
467
|
+
textOverflow: "ellipsis",
|
|
468
|
+
...(col.mono ? {
|
|
498
469
|
fontFamily: "var(--font-mono)"
|
|
499
|
-
} : {}),
|
|
470
|
+
} : {}),
|
|
471
|
+
...(col.numeric || col.mono ? {
|
|
500
472
|
fontVariantNumeric: "tabular-nums"
|
|
501
|
-
} : {}),
|
|
473
|
+
} : {}),
|
|
474
|
+
...(effectiveWidth != null ? {
|
|
502
475
|
width: effectiveWidth
|
|
503
|
-
} : {}),
|
|
476
|
+
} : {}),
|
|
477
|
+
// When a column wraps, allow long unbroken tokens to break.
|
|
478
|
+
...(col.wrap ? {
|
|
504
479
|
overflowWrap: "anywhere",
|
|
505
480
|
wordBreak: "break-word"
|
|
506
|
-
} : {}),
|
|
481
|
+
} : {}),
|
|
482
|
+
...(col.maxWidth != null ? {
|
|
507
483
|
maxWidth: col.maxWidth
|
|
508
|
-
} : {}),
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
_iterator2.e(err);
|
|
512
|
-
} finally {
|
|
513
|
-
_iterator2.f();
|
|
484
|
+
} : {}),
|
|
485
|
+
...(col.hoverOnly ? HOVER_ONLY_CELL_SX : {})
|
|
486
|
+
});
|
|
514
487
|
}
|
|
515
488
|
return byKey;
|
|
516
489
|
}, [columns, resize.liveWidths]);
|
|
@@ -518,7 +491,7 @@ function DataGrid(_ref) {
|
|
|
518
491
|
/* ── Mobile card view body (R1 mobile) ─────────────────────────
|
|
519
492
|
* Built only when useCardView is true. `renderCard` is the narrowed,
|
|
520
493
|
* guaranteed-present renderer passed in from the return site. */
|
|
521
|
-
|
|
494
|
+
const renderCardBody = renderCard => {
|
|
522
495
|
if (showSkeleton) {
|
|
523
496
|
return /*#__PURE__*/_jsx(Box, {
|
|
524
497
|
role: "list",
|
|
@@ -527,12 +500,10 @@ function DataGrid(_ref) {
|
|
|
527
500
|
sx: CARD_STACK_SX,
|
|
528
501
|
children: Array.from({
|
|
529
502
|
length: 6
|
|
530
|
-
},
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
}, "sk-".concat(i));
|
|
535
|
-
})
|
|
503
|
+
}, (_, i) => /*#__PURE__*/_jsx(Box, {
|
|
504
|
+
"aria-hidden": "true",
|
|
505
|
+
sx: CARD_SKELETON_SX
|
|
506
|
+
}, `sk-${i}`))
|
|
536
507
|
});
|
|
537
508
|
}
|
|
538
509
|
if (error) {
|
|
@@ -552,15 +523,15 @@ function DataGrid(_ref) {
|
|
|
552
523
|
"aria-label": tableAria,
|
|
553
524
|
"aria-busy": loading || undefined,
|
|
554
525
|
sx: CARD_STACK_SX,
|
|
555
|
-
children: rows.map(
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
isActive
|
|
563
|
-
isSelected
|
|
526
|
+
children: rows.map(row => {
|
|
527
|
+
const id = getRowId(row);
|
|
528
|
+
const isSelected = selectedSet.has(id);
|
|
529
|
+
const isActive = activeRowId !== undefined && activeRowId !== null && id === activeRowId;
|
|
530
|
+
const flash = rowFlashId === id;
|
|
531
|
+
const clickable = !!onRowClick;
|
|
532
|
+
const ctx = {
|
|
533
|
+
isActive,
|
|
534
|
+
isSelected
|
|
564
535
|
};
|
|
565
536
|
return /*#__PURE__*/_jsx(Box, {
|
|
566
537
|
role: clickable ? "button" : "listitem",
|
|
@@ -568,9 +539,7 @@ function DataGrid(_ref) {
|
|
|
568
539
|
"data-selected": isSelected || undefined,
|
|
569
540
|
"data-active": isActive || undefined,
|
|
570
541
|
className: flash ? "pui-row-updated" : undefined,
|
|
571
|
-
onClick: clickable ?
|
|
572
|
-
return onRowClick === null || onRowClick === void 0 ? void 0 : onRowClick(row);
|
|
573
|
-
} : undefined,
|
|
542
|
+
onClick: clickable ? () => onRowClick?.(row) : undefined,
|
|
574
543
|
onKeyDown: clickable ? handleRowKeyDown(row) : undefined,
|
|
575
544
|
sx: clickable ? CARD_CLICKABLE_SX : CARD_BASE_SX,
|
|
576
545
|
children: renderCard(row, ctx)
|
|
@@ -580,19 +549,17 @@ function DataGrid(_ref) {
|
|
|
580
549
|
};
|
|
581
550
|
|
|
582
551
|
/* ── Table body (desktop / no card opt-in) ─────────────────── */
|
|
583
|
-
|
|
552
|
+
let body;
|
|
584
553
|
if (showSkeleton) {
|
|
585
554
|
body = /*#__PURE__*/_jsx(TableBody, {
|
|
586
555
|
"aria-busy": "true",
|
|
587
556
|
children: Array.from({
|
|
588
557
|
length: 6
|
|
589
|
-
},
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
}, "sk-".concat(i));
|
|
595
|
-
})
|
|
558
|
+
}, (_, i) => /*#__PURE__*/_jsx(SkeletonRow, {
|
|
559
|
+
cols: columns.length,
|
|
560
|
+
withCheckbox: showCheckbox,
|
|
561
|
+
withActions: hasRowActions
|
|
562
|
+
}, `sk-${i}`))
|
|
596
563
|
});
|
|
597
564
|
} else if (error) {
|
|
598
565
|
body = /*#__PURE__*/_jsx(TableBody, {
|
|
@@ -624,20 +591,18 @@ function DataGrid(_ref) {
|
|
|
624
591
|
} else {
|
|
625
592
|
body = /*#__PURE__*/_jsx(TableBody, {
|
|
626
593
|
"aria-busy": loading || undefined,
|
|
627
|
-
children: rows.map(
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
594
|
+
children: rows.map(row => {
|
|
595
|
+
const id = getRowId(row);
|
|
596
|
+
const isSelected = selectedSet.has(id);
|
|
597
|
+
const isActive = activeRowId !== undefined && activeRowId !== null && id === activeRowId;
|
|
598
|
+
const flash = rowFlashId === id;
|
|
599
|
+
const clickable = !!onRowClick;
|
|
633
600
|
return /*#__PURE__*/_jsxs(TableRow, {
|
|
634
601
|
hover: true,
|
|
635
602
|
"data-selected": isSelected || undefined,
|
|
636
603
|
"data-active": isActive || undefined,
|
|
637
604
|
className: flash ? "pui-row-updated" : undefined,
|
|
638
|
-
onClick: clickable ?
|
|
639
|
-
return onRowClick === null || onRowClick === void 0 ? void 0 : onRowClick(row);
|
|
640
|
-
} : undefined,
|
|
605
|
+
onClick: clickable ? () => onRowClick?.(row) : undefined,
|
|
641
606
|
onKeyDown: clickable ? handleRowKeyDown(row) : undefined,
|
|
642
607
|
tabIndex: clickable ? 0 : undefined,
|
|
643
608
|
sx: clickable ? ROW_CLICKABLE_SX : ROW_STATIC_SX,
|
|
@@ -647,35 +612,34 @@ function DataGrid(_ref) {
|
|
|
647
612
|
children: /*#__PURE__*/_jsx(Checkbox, {
|
|
648
613
|
size: "small",
|
|
649
614
|
checked: isSelected,
|
|
650
|
-
onChange:
|
|
615
|
+
onChange: e => {
|
|
651
616
|
e.stopPropagation();
|
|
652
617
|
toggleRow(id);
|
|
653
618
|
},
|
|
654
|
-
onClick:
|
|
655
|
-
|
|
656
|
-
},
|
|
657
|
-
onKeyDown: function onKeyDown(e) {
|
|
658
|
-
return e.stopPropagation();
|
|
659
|
-
},
|
|
619
|
+
onClick: e => e.stopPropagation(),
|
|
620
|
+
onKeyDown: e => e.stopPropagation(),
|
|
660
621
|
slotProps: {
|
|
661
622
|
input: {
|
|
662
623
|
"aria-label": L.selectRow(id)
|
|
663
624
|
}
|
|
664
625
|
}
|
|
665
626
|
})
|
|
666
|
-
}), columns.map(
|
|
667
|
-
|
|
668
|
-
var value = col.getValue ? col.getValue(row) : readCellValue(row, col.key);
|
|
627
|
+
}), columns.map(col => {
|
|
628
|
+
const value = col.getValue ? col.getValue(row) : readCellValue(row, col.key);
|
|
669
629
|
return /*#__PURE__*/_jsx(TableCell, {
|
|
670
630
|
align: col.align || (col.numeric ? "right" : "left"),
|
|
671
631
|
sx: columnCellSx.get(col.key),
|
|
672
|
-
children: col.render ? col.render(row) :
|
|
632
|
+
children: col.render ? col.render(row) : value ?? "—"
|
|
673
633
|
}, col.key);
|
|
674
634
|
}), /*#__PURE__*/_jsx(TableCell, {
|
|
675
635
|
sx: FILLER_CELL_SX,
|
|
676
636
|
"aria-hidden": "true"
|
|
677
637
|
}), hasRowActions && rowActions && /*#__PURE__*/_jsx(TableCell, {
|
|
678
|
-
sx: ROW_ACTIONS_CELL_SX
|
|
638
|
+
sx: ROW_ACTIONS_CELL_SX
|
|
639
|
+
/* See the note at ROW_ACTIONS_CELL_SX: an action must not
|
|
640
|
+
* also fire the row click. Mirrors the checkbox cell. */,
|
|
641
|
+
onClick: e => e.stopPropagation(),
|
|
642
|
+
onKeyDown: e => e.stopPropagation(),
|
|
679
643
|
children: /*#__PURE__*/_jsx(Box, {
|
|
680
644
|
sx: ROW_ACTIONS_OVERLAY_SX,
|
|
681
645
|
children: rowActions(row)
|
|
@@ -710,26 +674,27 @@ function DataGrid(_ref) {
|
|
|
710
674
|
}
|
|
711
675
|
}
|
|
712
676
|
})
|
|
713
|
-
}), columns.map(
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
return /*#__PURE__*/_jsxs(TableCell, _objectSpread(_objectSpread({
|
|
677
|
+
}), columns.map(col => {
|
|
678
|
+
const isSortable = sortable(col);
|
|
679
|
+
const isResizable = resizable && col.resizable !== false;
|
|
680
|
+
const isReorderable = reorderable && col.reorderable !== false;
|
|
681
|
+
const ariaSort = isSortable ? getAriaSort(sort, col.key) : undefined;
|
|
682
|
+
const effectiveWidth = (resize.liveWidths && resize.liveWidths[col.key]) ?? col.width;
|
|
683
|
+
const reorderHandlers = isReorderable ? reorder.cellHandlers(col.key) : null;
|
|
684
|
+
const reorderFeedbackSx = isReorderable ? reorder.cellSx(col.key) : undefined;
|
|
685
|
+
return /*#__PURE__*/_jsxs(TableCell, {
|
|
723
686
|
align: col.align || (col.numeric ? "right" : "left"),
|
|
724
|
-
"aria-sort": ariaSort
|
|
725
|
-
|
|
726
|
-
sx:
|
|
687
|
+
"aria-sort": ariaSort,
|
|
688
|
+
...(reorderHandlers || {}),
|
|
689
|
+
sx: {
|
|
727
690
|
position: "sticky",
|
|
728
691
|
top: 0,
|
|
729
|
-
zIndex: 1
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
692
|
+
zIndex: 1,
|
|
693
|
+
...(effectiveWidth != null ? {
|
|
694
|
+
width: effectiveWidth
|
|
695
|
+
} : {}),
|
|
696
|
+
...(reorderFeedbackSx ? reorderFeedbackSx : {})
|
|
697
|
+
},
|
|
733
698
|
children: [isSortable && onSortChange ? /*#__PURE__*/_jsx(SortableHeader, {
|
|
734
699
|
sortKey: col.key,
|
|
735
700
|
sort: sort,
|
|
@@ -742,7 +707,7 @@ function DataGrid(_ref) {
|
|
|
742
707
|
"data-reorder-grip": col.key,
|
|
743
708
|
"aria-label": "R\xE9organiser la colonne",
|
|
744
709
|
"aria-keyshortcuts": "ArrowLeft ArrowRight Home End",
|
|
745
|
-
onKeyDown:
|
|
710
|
+
onKeyDown: e => {
|
|
746
711
|
if (e.key === "ArrowLeft" || e.key === "ArrowRight" || e.key === "Home" || e.key === "End") {
|
|
747
712
|
pendingReorderFocusRef.current = col.key;
|
|
748
713
|
}
|
|
@@ -787,7 +752,7 @@ function DataGrid(_ref) {
|
|
|
787
752
|
}
|
|
788
753
|
}
|
|
789
754
|
})]
|
|
790
|
-
}
|
|
755
|
+
}, col.key);
|
|
791
756
|
}), /*#__PURE__*/_jsx(TableCell, {
|
|
792
757
|
sx: FILLER_HEAD_CELL_SX,
|
|
793
758
|
"aria-hidden": "true"
|
|
@@ -808,11 +773,12 @@ function DataGrid(_ref) {
|
|
|
808
773
|
})
|
|
809
774
|
}), body]
|
|
810
775
|
})
|
|
811
|
-
}), pagination && /*#__PURE__*/_jsx(Pagination,
|
|
776
|
+
}), pagination && /*#__PURE__*/_jsx(Pagination, {
|
|
777
|
+
...pagination,
|
|
812
778
|
loading: loading,
|
|
813
779
|
locale: locale,
|
|
814
780
|
labels: L.pagination
|
|
815
|
-
})
|
|
781
|
+
})]
|
|
816
782
|
});
|
|
817
783
|
}
|
|
818
784
|
export { applySort };
|