@portnet/ui 6.0.1 → 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 +737 -0
- package/dist/esm/index.js +90 -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 -39
- 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 +146 -0
- package/dist/esm/v2/__tests__/FieldWidth.test.js.map +1 -0
- package/dist/esm/v2/__tests__/FileCard.test.js +18 -18
- package/dist/esm/v2/__tests__/FileCard.test.js.map +1 -1
- package/dist/esm/v2/__tests__/FormikCheckbox.test.js +173 -0
- package/dist/esm/v2/__tests__/FormikCheckbox.test.js.map +1 -0
- package/dist/esm/v2/__tests__/FormikDateTimePicker.test.js +236 -0
- package/dist/esm/v2/__tests__/FormikDateTimePicker.test.js.map +1 -0
- 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 +299 -0
- package/dist/esm/v2/__tests__/FormikRadioGroup.test.js.map +1 -0
- package/dist/esm/v2/__tests__/MobileRowCard.test.js +44 -43
- 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 -22
- 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 +118 -90
- 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 +210 -52
- 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 +64 -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 +14 -4
- 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 +26 -75
- 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 +130 -0
- package/dist/esm/v2/patterns/FormikCheckbox.js.map +1 -0
- 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 -66
- package/dist/esm/v2/patterns/FormikCombobox.js.map +1 -1
- package/dist/esm/v2/patterns/FormikDatePicker.js +51 -99
- package/dist/esm/v2/patterns/FormikDatePicker.js.map +1 -1
- package/dist/esm/v2/patterns/FormikDateTimePicker.js +136 -0
- package/dist/esm/v2/patterns/FormikDateTimePicker.js.map +1 -0
- 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 -50
- package/dist/esm/v2/patterns/FormikInput.js.map +1 -1
- package/dist/esm/v2/patterns/FormikRadioGroup.js +129 -0
- package/dist/esm/v2/patterns/FormikRadioGroup.js.map +1 -0
- 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 -84
- package/dist/esm/v2/patterns/FormikSelect.js.map +1 -1
- package/dist/esm/v2/patterns/FormikTextarea.js +30 -43
- package/dist/esm/v2/patterns/FormikTextarea.js.map +1 -1
- package/dist/esm/v2/patterns/KeyboardShortcutsHelp.js +64 -65
- 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 +127 -0
- package/dist/esm/v2/patterns/RowFavoriteToggle.js.map +1 -0
- 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 +72 -0
- package/dist/esm/v2/patterns/_pickerSerialisation.js.map +1 -0
- 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 +235 -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 +203 -0
- package/dist/esm/v2/personalization/capabilities/gridPreferences.js.map +1 -0
- package/dist/esm/v2/personalization/capabilities/index.js +5 -0
- package/dist/esm/v2/personalization/capabilities/index.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 +35 -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 +9 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +122 -47
- 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 +98 -69
- 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 +148 -0
- package/dist/v2/__tests__/FieldWidth.test.js.map +1 -0
- package/dist/v2/__tests__/FileCard.test.js +45 -48
- package/dist/v2/__tests__/FileCard.test.js.map +1 -1
- package/dist/v2/__tests__/FormikCheckbox.test.js +175 -0
- package/dist/v2/__tests__/FormikCheckbox.test.js.map +1 -0
- package/dist/v2/__tests__/FormikDateTimePicker.test.js +237 -0
- package/dist/v2/__tests__/FormikDateTimePicker.test.js.map +1 -0
- 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 +300 -0
- package/dist/v2/__tests__/FormikRadioGroup.test.js.map +1 -0
- package/dist/v2/__tests__/MobileRowCard.test.js +100 -102
- 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 +38 -46
- 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.d.ts.map +1 -1
- package/dist/v2/components/DateTimePicker.js +121 -95
- 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 +121 -5
- package/dist/v2/components/Field.d.ts.map +1 -1
- package/dist/v2/components/Field.js +221 -62
- 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 +67 -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.d.ts.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.d.ts +9 -9
- package/dist/v2/patterns/FavoriteColumn.d.ts.map +1 -1
- package/dist/v2/patterns/FavoriteColumn.js +32 -80
- 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.d.ts +77 -0
- package/dist/v2/patterns/FormikCheckbox.d.ts.map +1 -0
- package/dist/v2/patterns/FormikCheckbox.js +138 -0
- package/dist/v2/patterns/FormikCheckbox.js.map +1 -0
- 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.d.ts +7 -1
- package/dist/v2/patterns/FormikCombobox.d.ts.map +1 -1
- package/dist/v2/patterns/FormikCombobox.js +55 -69
- package/dist/v2/patterns/FormikCombobox.js.map +1 -1
- package/dist/v2/patterns/FormikDatePicker.d.ts +13 -1
- package/dist/v2/patterns/FormikDatePicker.d.ts.map +1 -1
- package/dist/v2/patterns/FormikDatePicker.js +59 -106
- package/dist/v2/patterns/FormikDatePicker.js.map +1 -1
- package/dist/v2/patterns/FormikDateTimePicker.d.ts +111 -0
- package/dist/v2/patterns/FormikDateTimePicker.d.ts.map +1 -0
- package/dist/v2/patterns/FormikDateTimePicker.js +144 -0
- package/dist/v2/patterns/FormikDateTimePicker.js.map +1 -0
- 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.d.ts +11 -1
- package/dist/v2/patterns/FormikInput.d.ts.map +1 -1
- package/dist/v2/patterns/FormikInput.js +45 -55
- package/dist/v2/patterns/FormikInput.js.map +1 -1
- package/dist/v2/patterns/FormikRadioGroup.d.ts +80 -0
- package/dist/v2/patterns/FormikRadioGroup.d.ts.map +1 -0
- package/dist/v2/patterns/FormikRadioGroup.js +137 -0
- package/dist/v2/patterns/FormikRadioGroup.js.map +1 -0
- 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.d.ts +9 -1
- package/dist/v2/patterns/FormikSelect.d.ts.map +1 -1
- package/dist/v2/patterns/FormikSelect.js +70 -89
- package/dist/v2/patterns/FormikSelect.js.map +1 -1
- package/dist/v2/patterns/FormikTextarea.d.ts +9 -1
- package/dist/v2/patterns/FormikTextarea.d.ts.map +1 -1
- package/dist/v2/patterns/FormikTextarea.js +35 -48
- package/dist/v2/patterns/FormikTextarea.js.map +1 -1
- package/dist/v2/patterns/KeyboardShortcutsHelp.d.ts +14 -1
- package/dist/v2/patterns/KeyboardShortcutsHelp.d.ts.map +1 -1
- package/dist/v2/patterns/KeyboardShortcutsHelp.js +71 -74
- 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 +98 -0
- package/dist/v2/patterns/RowFavoriteToggle.d.ts.map +1 -0
- package/dist/v2/patterns/RowFavoriteToggle.js +135 -0
- package/dist/v2/patterns/RowFavoriteToggle.js.map +1 -0
- 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.d.ts +44 -0
- package/dist/v2/patterns/_pickerSerialisation.d.ts.map +1 -0
- package/dist/v2/patterns/_pickerSerialisation.js +80 -0
- package/dist/v2/patterns/_pickerSerialisation.js.map +1 -0
- 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 +247 -0
- package/dist/v2/patterns/index.d.ts.map +1 -1
- package/dist/v2/patterns/index.js +182 -70
- 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.d.ts +100 -0
- package/dist/v2/personalization/capabilities/gridPreferences.d.ts.map +1 -0
- package/dist/v2/personalization/capabilities/gridPreferences.js +210 -0
- package/dist/v2/personalization/capabilities/gridPreferences.js.map +1 -0
- package/dist/v2/personalization/capabilities/index.d.ts +6 -0
- package/dist/v2/personalization/capabilities/index.d.ts.map +1 -1
- package/dist/v2/personalization/capabilities/index.js +23 -10
- package/dist/v2/personalization/capabilities/index.js.map +1 -1
- 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 +34 -0
- package/dist/v2/personalization/index.d.ts.map +1 -1
- package/dist/v2/personalization/index.js +41 -21
- 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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cssVariables.js","names":["ink","surface","border","semantic","status","dark","fontFamily","fontSize","fontWeight","lineHeight","letterSpacing","spacing","radius","shadows","duration","easing","zIndex","density","layout","breakpoints","state","resolveBrand","resolveBrandSecondary","STYLE_TAG_ID","NUMERIC_GRID_RE","SPACING_ENTRIES","Object","entries","NUMERIC_ENTRIES","filter","_ref","_ref2","_slicedToArray","k","test","ALIAS_ENTRIES","_ref3","_ref4","getCssVariables","_radius$none","options","arguments","length","undefined","brand","brandSecondary","lightVars","concat","accent","accentHover","accentSoft","accentFg","secondary","secondaryFg","fg","fgMuted","fgSubtle","fgInverse","bg","bgElev","bgSubtle","bgHover","borderStrong","success","successSoft","successFg","warning","warningSoft","warningFg","danger","dangerSoft","dangerFg","info","infoSoft","infoFg","soft","sent","pending","approved","rejected","neutral","hoverOverlay","pressedOverlay","selectedOverlay","sans","mono","display","h2","h3","h4","body","sm","xs","regular","medium","semibold","bold","tight","snug","normal","loose","wide","_toConsumableArray","map","_ref5","_ref6","v","slice","_ref7","_ref8","none","md","lg","xl","full","focus","focusFallback","fast","base","slow","microinteraction","stateChange","pageTransition","out","_ref9","_ref0","sidebar","topbar","contentMax","formMax","tactileMin","comfortable","row","input","btn","collapsedSidebar","sidebarMin","spaciousDensity","spacious","join","compactDensity","compact","ultraCompactDensity","ultraCompact","darkVars","console","offenders","l","warn","line","injectCssVariables","arg","document","opts","id","tag","getElementById","createElement","head","appendChild","textContent","removeCssVariables","remove","cssVariablesApi"],"sources":["../../../../src/lib/v2/theme/cssVariables.ts"],"sourcesContent":["/**\r\n * CSS Variables emitter — Portnet UI v2\r\n *\r\n * Generates a CSS string declaring all tokens as :root variables.\r\n * Mount once at app boot via:\r\n *\r\n * import { injectCssVariables } from \"@portnet/ui/v2/theme\";\r\n * injectCssVariables();\r\n *\r\n * Or render `getCssVariables()` inside a `<style>` tag if SSR'd.\r\n *\r\n * Brand override (host-level theming):\r\n *\r\n * injectCssVariables({\r\n * brand: { accent: \"#2962FF\" },\r\n * brandSecondary: { secondary: \"#4FB8CF\" },\r\n * });\r\n * // Or via the unified theme factory (see createPortnetTheme):\r\n * // createPortnetTheme({ brand: {...}, brandSecondary: {...} })\r\n *\r\n * Override is deep-merged onto the default brand / brandSecondary:\r\n * any field you omit falls back to the token default. Use the SAME\r\n * override objects when calling createPortnetTheme so the MUI\r\n * palette and CSS variables stay in sync — both layers consume the\r\n * same resolvers (./_brand, ./_brandSecondary) so mismatches are\r\n * structurally impossible.\r\n */\r\nimport {\r\n ink, surface, border, semantic, status, dark,\r\n fontFamily, fontSize, fontWeight, lineHeight, letterSpacing,\r\n spacing, radius, shadows, duration, easing, zIndex,\r\n density, layout, breakpoints,\r\n state,\r\n} from \"../tokens\";\r\nimport { resolveBrand, type BrandTokens } from \"./_brand\";\r\nimport { resolveBrandSecondary, type BrandSecondaryTokens } from \"./_brandSecondary\";\r\n\r\n/** Options for the CSS-variable emitter / injector. */\r\ntype CssVariablesOptions = {\r\n id?: string;\r\n brand?: Partial<BrandTokens>;\r\n brandSecondary?: Partial<BrandSecondaryTokens>;\r\n};\r\n\r\nconst STYLE_TAG_ID = \"portnet-ui-v2-tokens\";\r\n\r\n/**\r\n * Spacing partition: numeric grid keys (s1..s10) vs semantic aliases\r\n * (xs/sm/md/lg/xl/xxl). Two output namespaces so the alias names\r\n * cannot collide with the grid (s-N) and cannot pollute the global\r\n * variable namespace by emitting unprefixed --md / --lg / --xl.\r\n *\r\n * Uses Object.entries at module-load time — pure / no side-effects.\r\n */\r\nconst NUMERIC_GRID_RE = /^s\\d+$/;\r\nconst SPACING_ENTRIES = Object.entries(spacing);\r\nconst NUMERIC_ENTRIES = SPACING_ENTRIES.filter(([k]) => NUMERIC_GRID_RE.test(k));\r\nconst ALIAS_ENTRIES = SPACING_ENTRIES.filter(([k]) => !NUMERIC_GRID_RE.test(k));\r\n\r\n/**\r\n * Emits the canonical :root block + sidebar / density / dark-mode overrides.\r\n * Pass a partial `brand` / `brandSecondary` to mirror a host theme override\r\n * (use the SAME object you pass to createPortnetTheme so the two layers agree).\r\n */\r\nexport function getCssVariables(options: CssVariablesOptions = {}): string {\r\n const brand = resolveBrand(options.brand);\r\n const brandSecondary = resolveBrandSecondary(options.brandSecondary);\r\n\r\n const lightVars = [\r\n `/* ── Brand ─────────────────────────────────────── */`,\r\n `--accent: ${brand.accent};`,\r\n `--accent-hover: ${brand.accentHover};`,\r\n `--accent-soft: ${brand.accentSoft};`,\r\n `--accent-fg: ${brand.accentFg};`,\r\n ``,\r\n `/* ── Brand secondary ───────────────────────────── */`,\r\n `--secondary: ${brandSecondary.secondary};`,\r\n `--secondary-fg: ${brandSecondary.secondaryFg};`,\r\n ``,\r\n `/* ── Ink ───────────────────────────────────────── */`,\r\n `--fg: ${ink.fg};`,\r\n `--fg-muted: ${ink.fgMuted};`,\r\n `--fg-subtle: ${ink.fgSubtle};`,\r\n `--fg-inverse: ${ink.fgInverse};`,\r\n ``,\r\n `/* ── Surface ───────────────────────────────────── */`,\r\n `--bg: ${surface.bg};`,\r\n `--bg-elev: ${surface.bgElev};`,\r\n `--bg-subtle: ${surface.bgSubtle};`,\r\n `--bg-hover: ${surface.bgHover};`,\r\n `--surface: ${surface.surface};`,\r\n ``,\r\n `/* ── Border ────────────────────────────────────── */`,\r\n `--border: ${border.border};`,\r\n `--border-strong: ${border.borderStrong};`,\r\n ``,\r\n `/* ── Semantic ──────────────────────────────────── */`,\r\n `/* Each concept has a saturated fill (--<name>) and a darker text */`,\r\n `/* foreground (--<name>-fg). Pair fills with text on the same surface. */`,\r\n `--success: ${semantic.success};`,\r\n `--success-soft: ${semantic.successSoft};`,\r\n `--success-fg: ${semantic.successFg};`,\r\n `--warning: ${semantic.warning};`,\r\n `--warning-soft: ${semantic.warningSoft};`,\r\n `--warning-fg: ${semantic.warningFg};`,\r\n `--danger: ${semantic.danger};`,\r\n `--danger-soft: ${semantic.dangerSoft};`,\r\n `--danger-fg: ${semantic.dangerFg};`,\r\n `--info: ${semantic.info};`,\r\n `--info-soft: ${semantic.infoSoft};`,\r\n `--info-fg: ${semantic.infoFg};`,\r\n ``,\r\n `/* ── Status palette ────────────────────────────── */`,\r\n `--status-new-soft: ${status.new.soft};`,\r\n `--status-new-fg: ${status.new.fg};`,\r\n `--status-sent-soft: ${status.sent.soft};`,\r\n `--status-sent-fg: ${status.sent.fg};`,\r\n `--status-pending-soft: ${status.pending.soft};`,\r\n `--status-pending-fg: ${status.pending.fg};`,\r\n `--status-approved-soft: ${status.approved.soft};`,\r\n `--status-approved-fg: ${status.approved.fg};`,\r\n `--status-rejected-soft: ${status.rejected.soft};`,\r\n `--status-rejected-fg: ${status.rejected.fg};`,\r\n `--status-neutral-soft: ${status.neutral.soft};`,\r\n `--status-neutral-fg: ${status.neutral.fg};`,\r\n ``,\r\n `/* ── State overlays (B2 — currentColor-based) ─── */`,\r\n `--state-hover-overlay: ${state.hoverOverlay};`,\r\n `--state-pressed-overlay: ${state.pressedOverlay};`,\r\n `--state-selected-overlay: ${state.selectedOverlay};`,\r\n ``,\r\n `/* ── Typography ────────────────────────────────── */`,\r\n `--font-sans: ${fontFamily.sans};`,\r\n `--font-mono: ${fontFamily.mono};`,\r\n `--text-display: ${fontSize.display}px;`,\r\n `--text-h2: ${fontSize.h2}px;`,\r\n `--text-h3: ${fontSize.h3}px;`,\r\n `--text-h4: ${fontSize.h4}px;`,\r\n `--text-body: ${fontSize.body}px;`,\r\n `--text-sm: ${fontSize.sm}px;`,\r\n `--text-xs: ${fontSize.xs}px;`,\r\n `--fw-regular: ${fontWeight.regular};`,\r\n `--fw-medium: ${fontWeight.medium};`,\r\n `--fw-semibold: ${fontWeight.semibold};`,\r\n `--fw-bold: ${fontWeight.bold};`,\r\n // NOTE: there is deliberately no heavier weight than bold (700). Batch 1\r\n // dropped the black weight from the typography tokens, and this file kept\r\n // emitting the matching variable for a while — resolving to the literal\r\n // string \"undefined\" in :root, which silently flattened every consumer that\r\n // referenced it. The dev-only check at the end of this function exists\r\n // because of that incident.\r\n //\r\n // The old variable name is deliberately not written out: banned-patterns\r\n // scans raw file text with no comment awareness, so naming it here — even to\r\n // record its removal — trips the rule that protects this block.\r\n `--lh-tight: ${lineHeight.tight};`,\r\n `--lh-snug: ${lineHeight.snug};`,\r\n `--lh-normal: ${lineHeight.normal};`,\r\n `--lh-loose: ${lineHeight.loose};`,\r\n // A7-02 — letter-spacing scale. Six token names were referenced fleet-wide\r\n // that this emitter never emitted, so their var() fallbacks were the only\r\n // thing that ever rendered (R-2.3 / R-AI.1 magic values wearing a token's\r\n // name). These two had a real platform basis — -0.01em was hardcoded twice\r\n // in tokens/typography.ts itself, 0.04em inside KV and ConfirmDialog — so\r\n // they are promoted. `--border-subtle`, `--r-xs`, `--icon-sm`, `--icon-xl`\r\n // were local inventions and are fixed at their call sites instead.\r\n `--ls-tight: ${letterSpacing.tight};`,\r\n `--ls-normal: ${letterSpacing.normal};`,\r\n `--ls-wide: ${letterSpacing.wide};`,\r\n ``,\r\n `/* ── Spacing — numeric grid (8 px base) ─────────── */`,\r\n // s1..s10 → --s-1 .. --s-10 (preserves all existing consumers).\r\n ...NUMERIC_ENTRIES.map(([k, v]) => `--s-${k.slice(1)}: ${v}px;`),\r\n ``,\r\n `/* ── Spacing — semantic aliases ────────────────── */`,\r\n // xs/sm/md/lg/xl/xxl → --space-xs .. --space-xxl. The \"space-\"\r\n // prefix is mandatory: emitting them as raw --xs/--md/--lg\r\n // would pollute the global CSS variable namespace.\r\n ...ALIAS_ENTRIES.map(([k, v]) => `--space-${k}: ${v}px;`),\r\n ``,\r\n `/* ── Radius ────────────────────────────────────── */`,\r\n `--r-none: ${radius.none ?? 0}px;`,\r\n `--r-sm: ${radius.sm}px;`,\r\n `--r-md: ${radius.md}px;`,\r\n `--r-lg: ${radius.lg}px;`,\r\n `--r-xl: ${radius.xl}px;`,\r\n `--r-full: ${radius.full}px;`,\r\n ``,\r\n `/* ── Shadows ───────────────────────────────────── */`,\r\n `--shadow-xs: ${shadows.xs};`,\r\n `--shadow-sm: ${shadows.sm};`,\r\n `--shadow-md: ${shadows.md};`,\r\n `--shadow-lg: ${shadows.lg};`,\r\n `--shadow-focus: ${shadows.focus};`,\r\n // Static rgba fallback for non-CSS-vars contexts (SSR strings,\r\n // raw inline `style={{ boxShadow: ... }}` props that bypass CSS).\r\n ...(shadows.focusFallback\r\n ? [`--shadow-focus-fallback: ${shadows.focusFallback};`]\r\n : []),\r\n ``,\r\n `/* ── Motion (temporal vocabulary) ──────────────── */`,\r\n `--duration-fast: ${duration.fast}ms;`,\r\n `--duration-base: ${duration.base}ms;`,\r\n `--duration-slow: ${duration.slow}ms;`,\r\n ``,\r\n `/* ── Motion (semantic aliases — B6) ────────────── */`,\r\n // Same numeric values as fast/base/slow; intent-readable at the\r\n // call site. transition() helper recognises both vocabularies.\r\n `--duration-microinteraction: ${duration.microinteraction}ms;`,\r\n `--duration-state-change: ${duration.stateChange}ms;`,\r\n `--duration-page-transition: ${duration.pageTransition}ms;`,\r\n ``,\r\n `/* ── Easing ────────────────────────────────────── */`,\r\n `--easing-out: ${easing.out};`,\r\n `--easing-in: ${easing.in};`,\r\n `--easing-soft: ${easing.soft};`,\r\n ``,\r\n `/* ── Z-index ───────────────────────────────────── */`,\r\n // Iterates the full zIndex object — picks up popover/snackbar/\r\n // tooltip slots added in Batch 1 and skipLink (Batch 11 / B3)\r\n // without code changes here.\r\n ...Object.entries(zIndex).map(([k, v]) => `--z-${k}: ${v};`),\r\n ``,\r\n `/* ── Layout ────────────────────────────────────── */`,\r\n `--sidebar-w: ${layout.sidebar}px;`,\r\n `--topbar-h: ${layout.topbar}px;`,\r\n `--content-max: ${layout.contentMax}px;`,\r\n `--form-max: ${layout.formMax}px;`,\r\n `--tactile-min: ${layout.tactileMin}px;`,\r\n ``,\r\n `/* ── Breakpoints (R-RS.1) ──────────────────────── */`,\r\n // The single breakpoint scale, also wired into the MUI theme and the\r\n // mq() string helpers. Media queries can't read var(), so these are\r\n // for @container queries, clamp() and JS (getComputedStyle) — they\r\n // exist so no consumer hardcodes a raw px breakpoint anywhere.\r\n `--bp-xs: ${breakpoints.xs}px;`,\r\n `--bp-sm: ${breakpoints.sm}px;`,\r\n `--bp-md: ${breakpoints.md}px;`,\r\n `--bp-lg: ${breakpoints.lg}px;`,\r\n `--bp-xl: ${breakpoints.xl}px;`,\r\n ``,\r\n `/* ── Density (default = comfortable) ───────────── */`,\r\n `--row-h: ${density.comfortable.row}px;`,\r\n `--input-h: ${density.comfortable.input}px;`,\r\n `--btn-h: ${density.comfortable.btn}px;`,\r\n `--text-fs: ${density.comfortable.fontSize}px;`,\r\n ];\r\n\r\n const collapsedSidebar = `[data-nav-collapsed=\"true\"] { --sidebar-w: ${layout.sidebarMin}px; }`;\r\n\r\n /* Density tier overrides — emitted in order of granularity so a\r\n * cascading selector like `[data-density][data-density=\"compact\"]`\r\n * (host-side specificity hack) resolves predictably. */\r\n const spaciousDensity = [\r\n `[data-density=\"spacious\"] {`,\r\n ` --row-h: ${density.spacious.row}px;`,\r\n ` --input-h: ${density.spacious.input}px;`,\r\n ` --btn-h: ${density.spacious.btn}px;`,\r\n ` --text-fs: ${density.spacious.fontSize}px;`,\r\n `}`,\r\n ].join(\"\\n\");\r\n\r\n const compactDensity = [\r\n `[data-density=\"compact\"] {`,\r\n ` --row-h: ${density.compact.row}px;`,\r\n ` --input-h: ${density.compact.input}px;`,\r\n ` --btn-h: ${density.compact.btn}px;`,\r\n ` --text-fs: ${density.compact.fontSize}px;`,\r\n `}`,\r\n ].join(\"\\n\");\r\n\r\n const ultraCompactDensity = [\r\n `[data-density=\"ultra-compact\"] {`,\r\n ` --row-h: ${density.ultraCompact.row}px;`,\r\n ` --input-h: ${density.ultraCompact.input}px;`,\r\n ` --btn-h: ${density.ultraCompact.btn}px;`,\r\n ` --text-fs: ${density.ultraCompact.fontSize}px;`,\r\n `}`,\r\n ].join(\"\\n\");\r\n\r\n /* ── Dark mode overrides ────────────────────────────────────\r\n * Soft variants (semantic + status) are DERIVED via color-mix\r\n * from the saturated colour or the dark-mode status FG. The\r\n * static light-mode soft hex codes are too pale on dark\r\n * surfaces and fail WCAG 1.4.11 non-text contrast.\r\n * The 22-24% mix produces a tinted overlay that adapts to host\r\n * brand overrides automatically.\r\n * ───────────────────────────────────────────────────────── */\r\n const darkVars = [\r\n `[data-theme=\"dark\"] {`,\r\n ` --bg: ${dark.bg};`,\r\n ` --bg-elev: ${dark.bgElev};`,\r\n ` --bg-subtle: ${dark.bgSubtle};`,\r\n ` --bg-hover: ${dark.bgHover};`,\r\n ` --surface: ${dark.surface};`,\r\n ` --border: ${dark.border};`,\r\n ` --border-strong: ${dark.borderStrong};`,\r\n ` --fg: ${dark.fg};`,\r\n ` --fg-muted: ${dark.fgMuted};`,\r\n ` --fg-subtle: ${dark.fgSubtle};`,\r\n ` --fg-inverse: ${dark.fgInverse};`,\r\n ` --accent-soft: ${dark.accentSoft};`,\r\n ``,\r\n ` /* Soft semantic fills — derived from the saturated colour */`,\r\n ` --success-soft: color-mix(in srgb, var(--success) 24%, transparent);`,\r\n ` --warning-soft: color-mix(in srgb, var(--warning) 24%, transparent);`,\r\n ` --danger-soft: color-mix(in srgb, var(--danger) 24%, transparent);`,\r\n ` --info-soft: color-mix(in srgb, var(--info) 24%, transparent);`,\r\n ``,\r\n ` /* Status FG — overridden for dark-mode visibility */`,\r\n ` --status-new-fg: ${dark.status.new.fg};`,\r\n ` --status-sent-fg: ${dark.status.sent.fg};`,\r\n ` --status-pending-fg: ${dark.status.pending.fg};`,\r\n ` --status-approved-fg: ${dark.status.approved.fg};`,\r\n ` --status-rejected-fg: ${dark.status.rejected.fg};`,\r\n ` --status-neutral-fg: ${dark.status.neutral.fg};`,\r\n ``,\r\n ` /* Status soft — derived from the dark-mode FG */`,\r\n ` --status-new-soft: color-mix(in srgb, var(--status-new-fg) 22%, transparent);`,\r\n ` --status-sent-soft: color-mix(in srgb, var(--status-sent-fg) 22%, transparent);`,\r\n ` --status-pending-soft: color-mix(in srgb, var(--status-pending-fg) 22%, transparent);`,\r\n ` --status-approved-soft: color-mix(in srgb, var(--status-approved-fg) 22%, transparent);`,\r\n ` --status-rejected-soft: color-mix(in srgb, var(--status-rejected-fg) 22%, transparent);`,\r\n ` --status-neutral-soft: color-mix(in srgb, var(--status-neutral-fg) 22%, transparent);`,\r\n `}`,\r\n ].join(\"\\n\");\r\n\r\n /* Dev-only validation — catches the regression class that motivated it: a\r\n * token removed from ../tokens while this emitter still references it, which\r\n * puts the literal \"undefined\" into :root instead of failing loudly. See the\r\n * note beside --fw-bold above. */\r\n if (typeof console !== \"undefined\") {\r\n const offenders = lightVars.filter((l) => /:\\s*undefined\\b/.test(l));\r\n if (offenders.length) {\r\n // eslint-disable-next-line no-console\r\n console.warn(\r\n \"[@portnet/ui v2] cssVariables emitted undefined values — check token imports:\",\r\n offenders,\r\n );\r\n }\r\n }\r\n\r\n return [\r\n `:root {`,\r\n ...lightVars.map((line) => (line ? ` ${line}` : \"\")),\r\n `}`,\r\n ``,\r\n collapsedSidebar,\r\n ``,\r\n spaciousDensity,\r\n ``,\r\n compactDensity,\r\n ``,\r\n ultraCompactDensity,\r\n ``,\r\n darkVars,\r\n ].join(\"\\n\");\r\n}\r\n\r\n/**\r\n * Inject the variables into <head> at runtime.\r\n * Idempotent: replaces a previous tag if present.\r\n *\r\n * Backward-compatible signatures:\r\n * injectCssVariables(); // default id, no override\r\n * injectCssVariables(\"my-style-id\"); // legacy string id\r\n * injectCssVariables({ id, brand, brandSecondary }); // options form\r\n */\r\nexport function injectCssVariables(arg?: string | CssVariablesOptions): void {\r\n if (typeof document === \"undefined\") return;\r\n const opts: CssVariablesOptions = typeof arg === \"string\" ? { id: arg } : (arg || {});\r\n const id = opts.id || STYLE_TAG_ID;\r\n\r\n let tag = document.getElementById(id);\r\n if (!tag) {\r\n tag = document.createElement(\"style\");\r\n tag.id = id;\r\n document.head.appendChild(tag);\r\n }\r\n tag.textContent = getCssVariables(opts);\r\n}\r\n\r\n/**\r\n * Remove the injected style tag. Symmetrical with\r\n * injectCssVariables — needed for theme switching, hot-reload\r\n * and test cleanup. No-op when the tag is absent or in SSR.\r\n *\r\n * removeCssVariables(); // default id\r\n * removeCssVariables(\"my-style-id\"); // legacy string id\r\n * removeCssVariables({ id }); // options form\r\n */\r\nexport function removeCssVariables(arg?: string | CssVariablesOptions): void {\r\n if (typeof document === \"undefined\") return;\r\n const id = typeof arg === \"string\"\r\n ? arg\r\n : ((arg && arg.id) || STYLE_TAG_ID);\r\n const tag = document.getElementById(id);\r\n if (tag) tag.remove();\r\n}\r\n\r\nconst cssVariablesApi = { getCssVariables, injectCssVariables, removeCssVariables };\r\nexport default cssVariablesApi;\r\n"],"mappings":";;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SACEA,GAAG,EAAEC,OAAO,EAAEC,MAAM,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,IAAI,EAC5CC,UAAU,EAAEC,QAAQ,EAAEC,UAAU,EAAEC,UAAU,EAAEC,aAAa,EAC3DC,OAAO,EAAEC,MAAM,EAAEC,OAAO,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,MAAM,EAClDC,OAAO,EAAEC,MAAM,EAAEC,WAAW,EAC5BC,KAAK,QACA,WAAW;AAClB,SAASC,YAAY,QAA0B,UAAU;AACzD,SAASC,qBAAqB,QAAmC,mBAAmB;;AAEpF;;AAOA,IAAMC,YAAY,GAAG,sBAAsB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAMC,eAAe,GAAG,QAAQ;AAChC,I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,QAAQ,CAACI,cAAc,CAACF,EAAE,CAAC;EACvC,IAAIC,GAAG,EAAEA,GAAG,CAACO,MAAM,CAAC,CAAC;AACvB;AAEA,IAAMC,eAAe,GAAG;EAAE7H,eAAe,EAAfA,eAAe;EAAEgH,kBAAkB,EAAlBA,kBAAkB;EAAEW,kBAAkB,EAAlBA;AAAmB,CAAC;AACnF,eAAeE,eAAe","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"cssVariables.js","names":["ink","surface","border","semantic","status","dark","fontFamily","fontSize","fontWeight","lineHeight","letterSpacing","spacing","radius","shadows","duration","easing","zIndex","density","layout","breakpoints","state","chartCategorical","resolveBrand","resolveBrandSecondary","STYLE_TAG_ID","NUMERIC_GRID_RE","SPACING_ENTRIES","Object","entries","NUMERIC_ENTRIES","filter","k","test","ALIAS_ENTRIES","getCssVariables","options","brand","brandSecondary","lightVars","accent","accentHover","accentSoft","accentFg","secondary","secondaryFg","fg","fgMuted","fgSubtle","fgInverse","bg","bgElev","bgSubtle","bgHover","borderStrong","success","successSoft","successFg","warning","warningSoft","warningFg","danger","dangerSoft","dangerFg","info","infoSoft","infoFg","new","soft","sent","pending","approved","rejected","neutral","map","c","i","hoverOverlay","pressedOverlay","selectedOverlay","sans","mono","display","h2","h3","h4","body","sm","xs","regular","medium","semibold","bold","tight","snug","normal","loose","wide","v","slice","none","md","lg","xl","full","focus","focusFallback","fast","base","slow","microinteraction","stateChange","pageTransition","out","in","sidebar","topbar","contentMax","formMax","tactileMin","fieldWidth","s","m","l","comfortable","row","input","btn","collapsedSidebar","sidebarMin","spaciousDensity","spacious","join","compactDensity","compact","ultraCompactDensity","ultraCompact","darkVars","console","offenders","length","warn","line","injectCssVariables","arg","document","opts","id","tag","getElementById","createElement","head","appendChild","textContent","removeCssVariables","remove","cssVariablesApi"],"sources":["../../../../src/lib/v2/theme/cssVariables.ts"],"sourcesContent":["/**\r\n * CSS Variables emitter — Portnet UI v2\r\n *\r\n * Generates a CSS string declaring all tokens as :root variables.\r\n * Mount once at app boot via:\r\n *\r\n * import { injectCssVariables } from \"@portnet/ui/v2/theme\";\r\n * injectCssVariables();\r\n *\r\n * Or render `getCssVariables()` inside a `<style>` tag if SSR'd.\r\n *\r\n * Brand override (host-level theming):\r\n *\r\n * injectCssVariables({\r\n * brand: { accent: \"#2962FF\" },\r\n * brandSecondary: { secondary: \"#4FB8CF\" },\r\n * });\r\n * // Or via the unified theme factory (see createPortnetTheme):\r\n * // createPortnetTheme({ brand: {...}, brandSecondary: {...} })\r\n *\r\n * Override is deep-merged onto the default brand / brandSecondary:\r\n * any field you omit falls back to the token default. Use the SAME\r\n * override objects when calling createPortnetTheme so the MUI\r\n * palette and CSS variables stay in sync — both layers consume the\r\n * same resolvers (./_brand, ./_brandSecondary) so mismatches are\r\n * structurally impossible.\r\n */\r\nimport {\r\n ink, surface, border, semantic, status, dark,\r\n fontFamily, fontSize, fontWeight, lineHeight, letterSpacing,\r\n spacing, radius, shadows, duration, easing, zIndex,\r\n density, layout, breakpoints,\r\n state,\r\n chartCategorical,\r\n} from \"../tokens\";\r\nimport { resolveBrand, type BrandTokens } from \"./_brand\";\r\nimport { resolveBrandSecondary, type BrandSecondaryTokens } from \"./_brandSecondary\";\r\n\r\n/** Options for the CSS-variable emitter / injector. */\r\ntype CssVariablesOptions = {\r\n id?: string | undefined;\r\n brand?: Partial<BrandTokens> | undefined;\r\n brandSecondary?: Partial<BrandSecondaryTokens> | undefined;\r\n};\r\n\r\nconst STYLE_TAG_ID = \"portnet-ui-v2-tokens\";\r\n\r\n/**\r\n * Spacing partition: numeric grid keys (s1..s10) vs semantic aliases\r\n * (xs/sm/md/lg/xl/xxl). Two output namespaces so the alias names\r\n * cannot collide with the grid (s-N) and cannot pollute the global\r\n * variable namespace by emitting unprefixed --md / --lg / --xl.\r\n *\r\n * Uses Object.entries at module-load time — pure / no side-effects.\r\n */\r\nconst NUMERIC_GRID_RE = /^s\\d+$/;\r\nconst SPACING_ENTRIES = Object.entries(spacing);\r\nconst NUMERIC_ENTRIES = SPACING_ENTRIES.filter(([k]) => NUMERIC_GRID_RE.test(k));\r\nconst ALIAS_ENTRIES = SPACING_ENTRIES.filter(([k]) => !NUMERIC_GRID_RE.test(k));\r\n\r\n/**\r\n * Emits the canonical :root block + sidebar / density / dark-mode overrides.\r\n * Pass a partial `brand` / `brandSecondary` to mirror a host theme override\r\n * (use the SAME object you pass to createPortnetTheme so the two layers agree).\r\n */\r\nexport function getCssVariables(options: CssVariablesOptions = {}): string {\r\n const brand = resolveBrand(options.brand);\r\n const brandSecondary = resolveBrandSecondary(options.brandSecondary);\r\n\r\n const lightVars = [\r\n `/* ── Brand ─────────────────────────────────────── */`,\r\n `--accent: ${brand.accent};`,\r\n `--accent-hover: ${brand.accentHover};`,\r\n `--accent-soft: ${brand.accentSoft};`,\r\n `--accent-fg: ${brand.accentFg};`,\r\n ``,\r\n `/* ── Brand secondary ───────────────────────────── */`,\r\n `--secondary: ${brandSecondary.secondary};`,\r\n `--secondary-fg: ${brandSecondary.secondaryFg};`,\r\n ``,\r\n `/* ── Ink ───────────────────────────────────────── */`,\r\n `--fg: ${ink.fg};`,\r\n `--fg-muted: ${ink.fgMuted};`,\r\n `--fg-subtle: ${ink.fgSubtle};`,\r\n `--fg-inverse: ${ink.fgInverse};`,\r\n ``,\r\n `/* ── Surface ───────────────────────────────────── */`,\r\n `--bg: ${surface.bg};`,\r\n `--bg-elev: ${surface.bgElev};`,\r\n `--bg-subtle: ${surface.bgSubtle};`,\r\n `--bg-hover: ${surface.bgHover};`,\r\n `--surface: ${surface.surface};`,\r\n ``,\r\n `/* ── Border ────────────────────────────────────── */`,\r\n `--border: ${border.border};`,\r\n `--border-strong: ${border.borderStrong};`,\r\n ``,\r\n `/* ── Semantic ──────────────────────────────────── */`,\r\n `/* Each concept has a saturated fill (--<name>) and a darker text */`,\r\n `/* foreground (--<name>-fg). Pair fills with text on the same surface. */`,\r\n `--success: ${semantic.success};`,\r\n `--success-soft: ${semantic.successSoft};`,\r\n `--success-fg: ${semantic.successFg};`,\r\n `--warning: ${semantic.warning};`,\r\n `--warning-soft: ${semantic.warningSoft};`,\r\n `--warning-fg: ${semantic.warningFg};`,\r\n `--danger: ${semantic.danger};`,\r\n `--danger-soft: ${semantic.dangerSoft};`,\r\n `--danger-fg: ${semantic.dangerFg};`,\r\n `--info: ${semantic.info};`,\r\n `--info-soft: ${semantic.infoSoft};`,\r\n `--info-fg: ${semantic.infoFg};`,\r\n ``,\r\n `/* ── Status palette ────────────────────────────── */`,\r\n `--status-new-soft: ${status.new.soft};`,\r\n `--status-new-fg: ${status.new.fg};`,\r\n `--status-sent-soft: ${status.sent.soft};`,\r\n `--status-sent-fg: ${status.sent.fg};`,\r\n `--status-pending-soft: ${status.pending.soft};`,\r\n `--status-pending-fg: ${status.pending.fg};`,\r\n `--status-approved-soft: ${status.approved.soft};`,\r\n `--status-approved-fg: ${status.approved.fg};`,\r\n `--status-rejected-soft: ${status.rejected.soft};`,\r\n `--status-rejected-fg: ${status.rejected.fg};`,\r\n `--status-neutral-soft: ${status.neutral.soft};`,\r\n `--status-neutral-fg: ${status.neutral.fg};`,\r\n ``,\r\n `/* ── Chart categorical palette (gap G-37) ────── */`,\r\n `/* Category fills, NOT workflow state — see tokens/chart. Emitted */`,\r\n `/* for CSS and sx; chart libraries should take the JS token, since */`,\r\n `/* an SVG presentation attribute given a var() is not resolved by */`,\r\n `/* every renderer. NO DARK OVERRIDE IS NEEDED, deliberately: every */`,\r\n `/* entry clears the 3:1 non-text floor on the light AND the dark */`,\r\n `/* surface, which is the constraint the values were solved for. */`,\r\n ...chartCategorical.map((c, i) => `--chart-${i + 1}: ${c};`),\r\n ``,\r\n `/* ── State overlays (B2 — currentColor-based) ─── */`,\r\n `--state-hover-overlay: ${state.hoverOverlay};`,\r\n `--state-pressed-overlay: ${state.pressedOverlay};`,\r\n `--state-selected-overlay: ${state.selectedOverlay};`,\r\n ``,\r\n `/* ── Typography ────────────────────────────────── */`,\r\n `--font-sans: ${fontFamily.sans};`,\r\n `--font-mono: ${fontFamily.mono};`,\r\n `--text-display: ${fontSize.display}px;`,\r\n `--text-h2: ${fontSize.h2}px;`,\r\n `--text-h3: ${fontSize.h3}px;`,\r\n `--text-h4: ${fontSize.h4}px;`,\r\n `--text-body: ${fontSize.body}px;`,\r\n `--text-sm: ${fontSize.sm}px;`,\r\n `--text-xs: ${fontSize.xs}px;`,\r\n `--fw-regular: ${fontWeight.regular};`,\r\n `--fw-medium: ${fontWeight.medium};`,\r\n `--fw-semibold: ${fontWeight.semibold};`,\r\n `--fw-bold: ${fontWeight.bold};`,\r\n // NOTE: there is deliberately no heavier weight than bold (700). Batch 1\r\n // dropped the black weight from the typography tokens, and this file kept\r\n // emitting the matching variable for a while — resolving to the literal\r\n // string \"undefined\" in :root, which silently flattened every consumer that\r\n // referenced it. The dev-only check at the end of this function exists\r\n // because of that incident.\r\n //\r\n // The old variable name is deliberately not written out: banned-patterns\r\n // scans raw file text with no comment awareness, so naming it here — even to\r\n // record its removal — trips the rule that protects this block.\r\n `--lh-tight: ${lineHeight.tight};`,\r\n `--lh-snug: ${lineHeight.snug};`,\r\n `--lh-normal: ${lineHeight.normal};`,\r\n `--lh-loose: ${lineHeight.loose};`,\r\n // A7-02 — letter-spacing scale. Six token names were referenced fleet-wide\r\n // that this emitter never emitted, so their var() fallbacks were the only\r\n // thing that ever rendered (R-2.3 / R-AI.1 magic values wearing a token's\r\n // name). These two had a real platform basis — -0.01em was hardcoded twice\r\n // in tokens/typography.ts itself, 0.04em inside KV and ConfirmDialog — so\r\n // they are promoted. `--border-subtle`, `--r-xs`, `--icon-sm`, `--icon-xl`\r\n // were local inventions and are fixed at their call sites instead.\r\n `--ls-tight: ${letterSpacing.tight};`,\r\n `--ls-normal: ${letterSpacing.normal};`,\r\n `--ls-wide: ${letterSpacing.wide};`,\r\n ``,\r\n `/* ── Spacing — numeric grid (8 px base) ─────────── */`,\r\n // s1..s10 → --s-1 .. --s-10 (preserves all existing consumers).\r\n ...NUMERIC_ENTRIES.map(([k, v]) => `--s-${k.slice(1)}: ${v}px;`),\r\n ``,\r\n `/* ── Spacing — semantic aliases ────────────────── */`,\r\n // xs/sm/md/lg/xl/xxl → --space-xs .. --space-xxl. The \"space-\"\r\n // prefix is mandatory: emitting them as raw --xs/--md/--lg\r\n // would pollute the global CSS variable namespace.\r\n ...ALIAS_ENTRIES.map(([k, v]) => `--space-${k}: ${v}px;`),\r\n ``,\r\n `/* ── Radius ────────────────────────────────────── */`,\r\n `--r-none: ${radius.none ?? 0}px;`,\r\n `--r-sm: ${radius.sm}px;`,\r\n `--r-md: ${radius.md}px;`,\r\n `--r-lg: ${radius.lg}px;`,\r\n `--r-xl: ${radius.xl}px;`,\r\n `--r-full: ${radius.full}px;`,\r\n ``,\r\n `/* ── Shadows ───────────────────────────────────── */`,\r\n `--shadow-xs: ${shadows.xs};`,\r\n `--shadow-sm: ${shadows.sm};`,\r\n `--shadow-md: ${shadows.md};`,\r\n `--shadow-lg: ${shadows.lg};`,\r\n `--shadow-focus: ${shadows.focus};`,\r\n // Static rgba fallback for non-CSS-vars contexts (SSR strings,\r\n // raw inline `style={{ boxShadow: ... }}` props that bypass CSS).\r\n ...(shadows.focusFallback\r\n ? [`--shadow-focus-fallback: ${shadows.focusFallback};`]\r\n : []),\r\n ``,\r\n `/* ── Motion (temporal vocabulary) ──────────────── */`,\r\n `--duration-fast: ${duration.fast}ms;`,\r\n `--duration-base: ${duration.base}ms;`,\r\n `--duration-slow: ${duration.slow}ms;`,\r\n ``,\r\n `/* ── Motion (semantic aliases — B6) ────────────── */`,\r\n // Same numeric values as fast/base/slow; intent-readable at the\r\n // call site. transition() helper recognises both vocabularies.\r\n `--duration-microinteraction: ${duration.microinteraction}ms;`,\r\n `--duration-state-change: ${duration.stateChange}ms;`,\r\n `--duration-page-transition: ${duration.pageTransition}ms;`,\r\n ``,\r\n `/* ── Easing ────────────────────────────────────── */`,\r\n `--easing-out: ${easing.out};`,\r\n `--easing-in: ${easing.in};`,\r\n `--easing-soft: ${easing.soft};`,\r\n ``,\r\n `/* ── Z-index ───────────────────────────────────── */`,\r\n // Iterates the full zIndex object — picks up popover/snackbar/\r\n // tooltip slots added in Batch 1 and skipLink (Batch 11 / B3)\r\n // without code changes here.\r\n ...Object.entries(zIndex).map(([k, v]) => `--z-${k}: ${v};`),\r\n ``,\r\n `/* ── Layout ────────────────────────────────────── */`,\r\n `--sidebar-w: ${layout.sidebar}px;`,\r\n `--topbar-h: ${layout.topbar}px;`,\r\n `--content-max: ${layout.contentMax}px;`,\r\n `--form-max: ${layout.formMax}px;`,\r\n `--tactile-min: ${layout.tactileMin}px;`,\r\n ``,\r\n `/* ── Form field widths (G-H) ───────────────── */`,\r\n // A7-02 CLASS, SEVENTH INSTANCE. `Field.FIELD_MAX_WIDTH` consumes these\r\n // as `var(--field-w-s, 200px)`, and Field's docblock states the five\r\n // values are \"exposees en variables CSS pour etre revues sans toucher au\r\n // code\" — the stated escape hatch for a decision that same docblock flags\r\n // as needing design confirmation.\r\n //\r\n // This emitter never emitted them, so only the fallbacks ever rendered:\r\n // the widths were unrevisable without a code change and the promise was\r\n // false. Exactly what the A7-02 note above records for the letter-spacing\r\n // scale — a var() fallback wearing a token's name.\r\n //\r\n // Emitted from `layout.fieldWidth` so there is ONE source. The component\r\n // keeps its fallbacks, so a host that never calls injectCssVariables still\r\n // renders correct widths; where the variables exist, they win.\r\n `--field-w-xs: ${layout.fieldWidth.xs}px;`,\r\n `--field-w-s: ${layout.fieldWidth.s}px;`,\r\n `--field-w-m: ${layout.fieldWidth.m}px;`,\r\n `--field-w-l: ${layout.fieldWidth.l}px;`,\r\n ``,\r\n `/* ── Breakpoints (R-RS.1) ──────────────────────── */`,\r\n // The single breakpoint scale, also wired into the MUI theme and the\r\n // mq() string helpers. Media queries can't read var(), so these are\r\n // for @container queries, clamp() and JS (getComputedStyle) — they\r\n // exist so no consumer hardcodes a raw px breakpoint anywhere.\r\n `--bp-xs: ${breakpoints.xs}px;`,\r\n `--bp-sm: ${breakpoints.sm}px;`,\r\n `--bp-md: ${breakpoints.md}px;`,\r\n `--bp-lg: ${breakpoints.lg}px;`,\r\n `--bp-xl: ${breakpoints.xl}px;`,\r\n ``,\r\n `/* ── Density (default = comfortable) ───────────── */`,\r\n `--row-h: ${density.comfortable.row}px;`,\r\n `--input-h: ${density.comfortable.input}px;`,\r\n `--btn-h: ${density.comfortable.btn}px;`,\r\n `--text-fs: ${density.comfortable.fontSize}px;`,\r\n ];\r\n\r\n const collapsedSidebar = `[data-nav-collapsed=\"true\"] { --sidebar-w: ${layout.sidebarMin}px; }`;\r\n\r\n /* Density tier overrides — emitted in order of granularity so a\r\n * cascading selector like `[data-density][data-density=\"compact\"]`\r\n * (host-side specificity hack) resolves predictably. */\r\n const spaciousDensity = [\r\n `[data-density=\"spacious\"] {`,\r\n ` --row-h: ${density.spacious.row}px;`,\r\n ` --input-h: ${density.spacious.input}px;`,\r\n ` --btn-h: ${density.spacious.btn}px;`,\r\n ` --text-fs: ${density.spacious.fontSize}px;`,\r\n `}`,\r\n ].join(\"\\n\");\r\n\r\n const compactDensity = [\r\n `[data-density=\"compact\"] {`,\r\n ` --row-h: ${density.compact.row}px;`,\r\n ` --input-h: ${density.compact.input}px;`,\r\n ` --btn-h: ${density.compact.btn}px;`,\r\n ` --text-fs: ${density.compact.fontSize}px;`,\r\n `}`,\r\n ].join(\"\\n\");\r\n\r\n const ultraCompactDensity = [\r\n `[data-density=\"ultra-compact\"] {`,\r\n ` --row-h: ${density.ultraCompact.row}px;`,\r\n ` --input-h: ${density.ultraCompact.input}px;`,\r\n ` --btn-h: ${density.ultraCompact.btn}px;`,\r\n ` --text-fs: ${density.ultraCompact.fontSize}px;`,\r\n `}`,\r\n ].join(\"\\n\");\r\n\r\n /* ── Dark mode overrides ────────────────────────────────────\r\n * Soft variants (semantic + status) are DERIVED via color-mix\r\n * from the saturated colour or the dark-mode status FG. The\r\n * static light-mode soft hex codes are too pale on dark\r\n * surfaces and fail WCAG 1.4.11 non-text contrast.\r\n * The 22-24% mix produces a tinted overlay that adapts to host\r\n * brand overrides automatically.\r\n * ───────────────────────────────────────────────────────── */\r\n const darkVars = [\r\n `[data-theme=\"dark\"] {`,\r\n ` --bg: ${dark.bg};`,\r\n ` --bg-elev: ${dark.bgElev};`,\r\n ` --bg-subtle: ${dark.bgSubtle};`,\r\n ` --bg-hover: ${dark.bgHover};`,\r\n ` --surface: ${dark.surface};`,\r\n ` --border: ${dark.border};`,\r\n ` --border-strong: ${dark.borderStrong};`,\r\n ` --fg: ${dark.fg};`,\r\n ` --fg-muted: ${dark.fgMuted};`,\r\n ` --fg-subtle: ${dark.fgSubtle};`,\r\n ` --fg-inverse: ${dark.fgInverse};`,\r\n ` --accent-soft: ${dark.accentSoft};`,\r\n ``,\r\n ` /* Soft semantic fills — derived from the saturated colour */`,\r\n ` --success-soft: color-mix(in srgb, var(--success) 24%, transparent);`,\r\n ` --warning-soft: color-mix(in srgb, var(--warning) 24%, transparent);`,\r\n ` --danger-soft: color-mix(in srgb, var(--danger) 24%, transparent);`,\r\n ` --info-soft: color-mix(in srgb, var(--info) 24%, transparent);`,\r\n ``,\r\n ` /* Status FG — overridden for dark-mode visibility */`,\r\n ` --status-new-fg: ${dark.status.new.fg};`,\r\n ` --status-sent-fg: ${dark.status.sent.fg};`,\r\n ` --status-pending-fg: ${dark.status.pending.fg};`,\r\n ` --status-approved-fg: ${dark.status.approved.fg};`,\r\n ` --status-rejected-fg: ${dark.status.rejected.fg};`,\r\n ` --status-neutral-fg: ${dark.status.neutral.fg};`,\r\n ``,\r\n ` /* Status soft — derived from the dark-mode FG */`,\r\n ` --status-new-soft: color-mix(in srgb, var(--status-new-fg) 22%, transparent);`,\r\n ` --status-sent-soft: color-mix(in srgb, var(--status-sent-fg) 22%, transparent);`,\r\n ` --status-pending-soft: color-mix(in srgb, var(--status-pending-fg) 22%, transparent);`,\r\n ` --status-approved-soft: color-mix(in srgb, var(--status-approved-fg) 22%, transparent);`,\r\n ` --status-rejected-soft: color-mix(in srgb, var(--status-rejected-fg) 22%, transparent);`,\r\n ` --status-neutral-soft: color-mix(in srgb, var(--status-neutral-fg) 22%, transparent);`,\r\n `}`,\r\n ].join(\"\\n\");\r\n\r\n /* Dev-only validation — catches the regression class that motivated it: a\r\n * token removed from ../tokens while this emitter still references it, which\r\n * puts the literal \"undefined\" into :root instead of failing loudly. See the\r\n * note beside --fw-bold above. */\r\n if (typeof console !== \"undefined\") {\r\n const offenders = lightVars.filter((l) => /:\\s*undefined\\b/.test(l));\r\n if (offenders.length) {\r\n // eslint-disable-next-line no-console\r\n console.warn(\r\n \"[@portnet/ui v2] cssVariables emitted undefined values — check token imports:\",\r\n offenders,\r\n );\r\n }\r\n }\r\n\r\n return [\r\n `:root {`,\r\n ...lightVars.map((line) => (line ? ` ${line}` : \"\")),\r\n `}`,\r\n ``,\r\n collapsedSidebar,\r\n ``,\r\n spaciousDensity,\r\n ``,\r\n compactDensity,\r\n ``,\r\n ultraCompactDensity,\r\n ``,\r\n darkVars,\r\n ].join(\"\\n\");\r\n}\r\n\r\n/**\r\n * Inject the variables into <head> at runtime.\r\n * Idempotent: replaces a previous tag if present.\r\n *\r\n * Backward-compatible signatures:\r\n * injectCssVariables(); // default id, no override\r\n * injectCssVariables(\"my-style-id\"); // legacy string id\r\n * injectCssVariables({ id, brand, brandSecondary }); // options form\r\n */\r\nexport function injectCssVariables(arg?: string | CssVariablesOptions): void {\r\n if (typeof document === \"undefined\") return;\r\n const opts: CssVariablesOptions = typeof arg === \"string\" ? { id: arg } : (arg || {});\r\n const id = opts.id || STYLE_TAG_ID;\r\n\r\n let tag = document.getElementById(id);\r\n if (!tag) {\r\n tag = document.createElement(\"style\");\r\n tag.id = id;\r\n document.head.appendChild(tag);\r\n }\r\n tag.textContent = getCssVariables(opts);\r\n}\r\n\r\n/**\r\n * Remove the injected style tag. Symmetrical with\r\n * injectCssVariables — needed for theme switching, hot-reload\r\n * and test cleanup. No-op when the tag is absent or in SSR.\r\n *\r\n * removeCssVariables(); // default id\r\n * removeCssVariables(\"my-style-id\"); // legacy string id\r\n * removeCssVariables({ id }); // options form\r\n */\r\nexport function removeCssVariables(arg?: string | CssVariablesOptions): void {\r\n if (typeof document === \"undefined\") return;\r\n const id = typeof arg === \"string\"\r\n ? arg\r\n : ((arg && arg.id) || STYLE_TAG_ID);\r\n const tag = document.getElementById(id);\r\n if (tag) tag.remove();\r\n}\r\n\r\nconst cssVariablesApi = { getCssVariables, injectCssVariables, removeCssVariables };\r\nexport default cssVariablesApi;\r\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SACEA,GAAG,EAAEC,OAAO,EAAEC,MAAM,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,IAAI,EAC5CC,UAAU,EAAEC,QAAQ,EAAEC,UAAU,EAAEC,UAAU,EAAEC,aAAa,EAC3DC,OAAO,EAAEC,MAAM,EAAEC,OAAO,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,MAAM,EAClDC,OAAO,EAAEC,MAAM,EAAEC,WAAW,EAC5BC,KAAK,EACLC,gBAAgB,QACX,WAAW;AAClB,SAASC,YAAY,QAA0B,UAAU;AACzD,SAASC,qBAAqB,QAAmC,mBAAmB;;AAEpF;;AAOA,MAAMC,YAAY,GAAG,sBAAsB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,eAAe,GAAG,QAAQ;AAChC,MAAMC,eAAe,GAAGC,MAAM,CAACC,OAAO,CAACjB,OAAO,CAAC;AAC/C,MAAMkB,eAAe,GAAGH,eAAe,CAACI,MAAM,CAAC,CAAC,CAACC,CAAC,CAAC,KAAKN,eAAe,CAACO,IAAI,CAACD,CAAC,CAAC,CAAC;AAChF,MAAME,aAAa,GAAKP,eAAe,CAACI,MAAM,CAAC,CAAC,CAACC,CAAC,CAAC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C,WAAW,CAACJ,GAAG,CAAC;EAChC;EACAA,GAAG,CAACK,WAAW,GAAGtH,eAAe,CAAC+G,IAAI,CAAC;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASQ,kBAAkBA,CAACV,GAAkC,EAAQ;EAC3E,IAAI,OAAOC,QAAQ,KAAK,WAAW,EAAE;EACrC,MAAME,EAAE,GAAG,OAAOH,GAAG,KAAK,QAAQ,GAC9BA,GAAG,GACDA,GAAG,IAAIA,GAAG,CAACG,EAAE,IAAK1H,YAAa;EACrC,MAAM2H,GAAG,GAAGH,QAAQ,CAACI,cAAc,CAACF,EAAE,CAAC;EACvC,IAAIC,GAAG,EAAEA,GAAG,CAACO,MAAM,CAAC,CAAC;AACvB;AAEA,MAAMC,eAAe,GAAG;EAAEzH,eAAe;EAAE4G,kBAAkB;EAAEW;AAAmB,CAAC;AACnF,eAAeE,eAAe","ignoreList":[]}
|
|
@@ -22,11 +22,11 @@ export { getCssVariables, injectCssVariables, removeCssVariables } from "./cssVa
|
|
|
22
22
|
* Additive, non-breaking: type-only re-exports, no runtime change.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
createPortnetTheme
|
|
27
|
-
getCssVariables
|
|
28
|
-
injectCssVariables
|
|
29
|
-
removeCssVariables
|
|
25
|
+
const themeApi = {
|
|
26
|
+
createPortnetTheme,
|
|
27
|
+
getCssVariables,
|
|
28
|
+
injectCssVariables,
|
|
29
|
+
removeCssVariables
|
|
30
30
|
};
|
|
31
31
|
export default themeApi;
|
|
32
32
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["createPortnetTheme","getCssVariables","injectCssVariables","removeCssVariables","default","themeApi"],"sources":["../../../../src/lib/v2/theme/index.ts"],"sourcesContent":["import createPortnetTheme from \"./createPortnetTheme\";\r\nimport {\r\n getCssVariables,\r\n injectCssVariables,\r\n removeCssVariables,\r\n} from \"./cssVariables\";\r\n\r\nexport { default as createPortnetTheme } from \"./createPortnetTheme\";\r\nexport {\r\n getCssVariables,\r\n injectCssVariables,\r\n removeCssVariables,\r\n} from \"./cssVariables\";\r\n\r\n/**\r\n * Public typed contract of the theme factory.\r\n *\r\n * Every host module wraps `createPortnetTheme` in a local `build<Module>Theme`\r\n * helper (see the GU modules' `utils/appearance`), and those wrappers need to\r\n * declare their own option surface without redefining it. Before this export\r\n * the options type was module-private, which forced consumers into either\r\n * `brand?: object` or an `as Parameters<typeof createPortnetTheme>[0]`\r\n * assertion — both of which the Platform TypeScript Guidelines forbid\r\n * (\"Never use object\", \"Avoid unsafe assertions\").\r\n *\r\n * `BrandTokens` / `BrandSecondaryTokens` are surfaced for the same reason: a\r\n * host that receives a partial brand payload from the shell (themeReceived)\r\n * must be able to type that payload against the shared token group instead of\r\n * inventing a local twin.\r\n *\r\n * Additive, non-breaking: type-only re-exports, no runtime change.\r\n */\r\nexport type { CreatePortnetThemeOptions } from \"./createPortnetTheme\";\r\nexport type { BrandTokens } from \"./_brand\";\r\nexport type { BrandSecondaryTokens } from \"./_brandSecondary\";\r\n\r\nconst themeApi = {\r\n createPortnetTheme,\r\n getCssVariables,\r\n injectCssVariables,\r\n removeCssVariables,\r\n};\r\nexport default themeApi;\r\n"],"mappings":"AAAA,OAAOA,kBAAkB,MAAM,sBAAsB;AACrD,SACEC,eAAe,EACfC,kBAAkB,EAClBC,kBAAkB,QACb,gBAAgB;AAEvB,SAASC,OAAO,IAAIJ,kBAAkB,QAAQ,sBAAsB;AACpE,SACEC,eAAe,EACfC,kBAAkB,EAClBC,kBAAkB,QACb,gBAAgB;;AAEvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAKA,
|
|
1
|
+
{"version":3,"file":"index.js","names":["createPortnetTheme","getCssVariables","injectCssVariables","removeCssVariables","default","themeApi"],"sources":["../../../../src/lib/v2/theme/index.ts"],"sourcesContent":["import createPortnetTheme from \"./createPortnetTheme\";\r\nimport {\r\n getCssVariables,\r\n injectCssVariables,\r\n removeCssVariables,\r\n} from \"./cssVariables\";\r\n\r\nexport { default as createPortnetTheme } from \"./createPortnetTheme\";\r\nexport {\r\n getCssVariables,\r\n injectCssVariables,\r\n removeCssVariables,\r\n} from \"./cssVariables\";\r\n\r\n/**\r\n * Public typed contract of the theme factory.\r\n *\r\n * Every host module wraps `createPortnetTheme` in a local `build<Module>Theme`\r\n * helper (see the GU modules' `utils/appearance`), and those wrappers need to\r\n * declare their own option surface without redefining it. Before this export\r\n * the options type was module-private, which forced consumers into either\r\n * `brand?: object` or an `as Parameters<typeof createPortnetTheme>[0]`\r\n * assertion — both of which the Platform TypeScript Guidelines forbid\r\n * (\"Never use object\", \"Avoid unsafe assertions\").\r\n *\r\n * `BrandTokens` / `BrandSecondaryTokens` are surfaced for the same reason: a\r\n * host that receives a partial brand payload from the shell (themeReceived)\r\n * must be able to type that payload against the shared token group instead of\r\n * inventing a local twin.\r\n *\r\n * Additive, non-breaking: type-only re-exports, no runtime change.\r\n */\r\nexport type { CreatePortnetThemeOptions } from \"./createPortnetTheme\";\r\nexport type { BrandTokens } from \"./_brand\";\r\nexport type { BrandSecondaryTokens } from \"./_brandSecondary\";\r\n\r\nconst themeApi = {\r\n createPortnetTheme,\r\n getCssVariables,\r\n injectCssVariables,\r\n removeCssVariables,\r\n};\r\nexport default themeApi;\r\n"],"mappings":"AAAA,OAAOA,kBAAkB,MAAM,sBAAsB;AACrD,SACEC,eAAe,EACfC,kBAAkB,EAClBC,kBAAkB,QACb,gBAAgB;AAEvB,SAASC,OAAO,IAAIJ,kBAAkB,QAAQ,sBAAsB;AACpE,SACEC,eAAe,EACfC,kBAAkB,EAClBC,kBAAkB,QACb,gBAAgB;;AAEvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAKA,MAAME,QAAQ,GAAG;EACfL,kBAAkB;EAClBC,eAAe;EACfC,kBAAkB;EAClBC;AACF,CAAC;AACD,eAAeE,QAAQ","ignoreList":[]}
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
*/
|
|
37
37
|
|
|
38
38
|
/* Ascending, mobile-first. xs = 0 is the base band (phones 320-480). */
|
|
39
|
-
export
|
|
39
|
+
export const breakpoints = Object.freeze({
|
|
40
40
|
xs: 0,
|
|
41
41
|
sm: 481,
|
|
42
42
|
md: 768,
|
|
@@ -49,12 +49,12 @@ export var breakpoints = Object.freeze({
|
|
|
49
49
|
|
|
50
50
|
/* Ordered key list — the canonical iteration order for any mobile-first
|
|
51
51
|
* cascade (base -> up). Re-used by Layout.js so the order can't drift. */
|
|
52
|
-
export
|
|
52
|
+
export const BREAKPOINT_KEYS = Object.freeze(["xs", "sm", "md", "lg", "xl"]);
|
|
53
53
|
|
|
54
54
|
/* MUI parity: down()/between() subtract this from the upper bound so a
|
|
55
55
|
* `down(key)` query and the matching `up(key)` query never overlap at
|
|
56
56
|
* the exact pixel. Mirrors MUI's default step (5/100 = 0.05px). */
|
|
57
|
-
|
|
57
|
+
const STEP = 0.05;
|
|
58
58
|
|
|
59
59
|
/**
|
|
60
60
|
* Resolve a key to its numeric min-width, falling back to 0 for an
|
|
@@ -62,13 +62,13 @@ var STEP = 0.05;
|
|
|
62
62
|
* emitting a NaN width (which silently disables the whole query).
|
|
63
63
|
*/
|
|
64
64
|
export function bpValue(key) {
|
|
65
|
-
|
|
65
|
+
const v = breakpoints[key];
|
|
66
66
|
return typeof v === "number" ? v : 0;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
/* Next key up the scale, or null when `key` is the largest. */
|
|
70
70
|
function nextKey(key) {
|
|
71
|
-
|
|
71
|
+
const i = BREAKPOINT_KEYS.indexOf(key);
|
|
72
72
|
return i >= 0 && i < BREAKPOINT_KEYS.length - 1 ? BREAKPOINT_KEYS[i + 1] : null;
|
|
73
73
|
}
|
|
74
74
|
|
|
@@ -87,18 +87,18 @@ function nextKey(key) {
|
|
|
87
87
|
* Usage (sx object key):
|
|
88
88
|
* sx={{ [mq.up("md")]: { flexDirection: "row" } }}
|
|
89
89
|
*/
|
|
90
|
-
export
|
|
91
|
-
up
|
|
92
|
-
return
|
|
90
|
+
export const mq = Object.freeze({
|
|
91
|
+
up(key) {
|
|
92
|
+
return `@media (min-width:${bpValue(key)}px)`;
|
|
93
93
|
},
|
|
94
|
-
down
|
|
95
|
-
return
|
|
94
|
+
down(key) {
|
|
95
|
+
return `@media (max-width:${bpValue(key) - STEP}px)`;
|
|
96
96
|
},
|
|
97
|
-
between
|
|
98
|
-
return
|
|
97
|
+
between(start, end) {
|
|
98
|
+
return `@media (min-width:${bpValue(start)}px) and (max-width:${bpValue(end) - STEP}px)`;
|
|
99
99
|
},
|
|
100
|
-
only
|
|
101
|
-
|
|
100
|
+
only(key) {
|
|
101
|
+
const next = nextKey(key);
|
|
102
102
|
return next ? mq.between(key, next) : mq.up(key);
|
|
103
103
|
}
|
|
104
104
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"breakpoints.js","names":["breakpoints","Object","freeze","xs","sm","md","lg","xl","BREAKPOINT_KEYS","STEP","bpValue","key","v","nextKey","i","indexOf","length","mq","up","
|
|
1
|
+
{"version":3,"file":"breakpoints.js","names":["breakpoints","Object","freeze","xs","sm","md","lg","xl","BREAKPOINT_KEYS","STEP","bpValue","key","v","nextKey","i","indexOf","length","mq","up","down","between","start","end","only","next"],"sources":["../../../../src/lib/v2/tokens/breakpoints.ts"],"sourcesContent":["/**\r\n * Breakpoint tokens — Portnet UI v2\r\n * Aligned with Design System v1.0 §07 (Responsive) + R-RS.1.\r\n *\r\n * SINGLE SOURCE OF TRUTH for the responsive breakpoint scale.\r\n * Previously these lived inside tokens/density.js, conflating two\r\n * unrelated concerns (row/control density vs. viewport breakpoints).\r\n * They now live here; density.js re-exports `breakpoints` so every\r\n * existing `import { breakpoints } from \"@portnet/ui/v2/tokens\"`\r\n * (and the `densityLayout` shape) keeps working unchanged.\r\n *\r\n * Two layers consume this scale and MUST stay in lockstep:\r\n * 1. The MUI theme — createPortnetTheme wires `breakpoints` into\r\n * createTheme's `breakpoints.values`, so `theme.breakpoints.up()`\r\n * and every `sx={{ prop: { xs, md } }}` on a MUI component resolve\r\n * against THESE values.\r\n * 2. The CSS layer — the `mq` helpers below emit the SAME media\r\n * queries as strings, for:\r\n * - the theme-free v2 Box/Stack responsive sx engine (Layout.js),\r\n * - raw `.css` / container styles,\r\n * - any `sx={{ [mq.up(\"md\")]: {...} }}`,\r\n * and the `--bp-*` CSS variables emitted by cssVariables.js for\r\n * pure-CSS / container-query consumers.\r\n *\r\n * IMPORTANT — keep `breakpoints` a PURE value map ({ key: number }).\r\n * MUI's createTheme iterates `breakpoints.values` to build its own\r\n * up/down/between; a non-numeric key (e.g. a helper function) would be\r\n * mis-read as a breakpoint named \"up\". Helpers therefore live on the\r\n * SEPARATE `mq` export, never on `breakpoints` itself.\r\n *\r\n * Charter viewport targets covered:\r\n * - xs band : 320 / 360 / 375 / 390 / 414 (phones, base, no query)\r\n * - md : 768 / 820 (tablet)\r\n * - lg : 1024 (small desktop / landscape tablet)\r\n * - xl band : 1280 / 1440 / 1920 (desktop)\r\n */\r\n\r\n/* Ascending, mobile-first. xs = 0 is the base band (phones 320-480). */\r\nexport const breakpoints = Object.freeze({\r\n xs: 0,\r\n sm: 481,\r\n md: 768,\r\n lg: 1024,\r\n xl: 1280,\r\n});\r\n\r\n/* Local key type — canonical union of breakpoint keys. Not exported;\r\n * the public token surface is unchanged. */\r\ntype BreakpointKey = keyof typeof breakpoints;\r\n\r\n/* Ordered key list — the canonical iteration order for any mobile-first\r\n * cascade (base -> up). Re-used by Layout.js so the order can't drift. */\r\nexport const BREAKPOINT_KEYS = Object.freeze([\"xs\", \"sm\", \"md\", \"lg\", \"xl\"] as const);\r\n\r\n/* MUI parity: down()/between() subtract this from the upper bound so a\r\n * `down(key)` query and the matching `up(key)` query never overlap at\r\n * the exact pixel. Mirrors MUI's default step (5/100 = 0.05px). */\r\nconst STEP = 0.05;\r\n\r\n/**\r\n * Resolve a key to its numeric min-width, falling back to 0 for an\r\n * unknown key so a typo degrades to \"always matches\" rather than\r\n * emitting a NaN width (which silently disables the whole query).\r\n */\r\nexport function bpValue(key: BreakpointKey): number {\r\n const v = breakpoints[key];\r\n return typeof v === \"number\" ? v : 0;\r\n}\r\n\r\n/* Next key up the scale, or null when `key` is the largest. */\r\nfunction nextKey(key: BreakpointKey) {\r\n const i = BREAKPOINT_KEYS.indexOf(key);\r\n return i >= 0 && i < BREAKPOINT_KEYS.length - 1\r\n ? BREAKPOINT_KEYS[i + 1]\r\n : null;\r\n}\r\n\r\n/**\r\n * Token-derived media-query string helpers. Output is identical in\r\n * intent to MUI's `theme.breakpoints.*` so the CSS layer and the\r\n * JS/MUI layer can never diverge.\r\n *\r\n * mq.up(\"md\") -> \"@media (min-width:<md>px)\"\r\n * mq.down(\"md\") -> \"@media (max-width:<md - 0.05>px)\"\r\n * mq.between(\"sm\",\"lg\") -> \"@media (min-width:<sm>px) and (max-width:<lg - 0.05>px)\"\r\n * mq.only(\"md\") -> mq.between(\"md\",\"lg\")\r\n *\r\n * Usage (theme-free CSS layer / raw stylesheet):\r\n * `${mq.up(\"md\")}{ .x{ gap:24px } }`\r\n * Usage (sx object key):\r\n * sx={{ [mq.up(\"md\")]: { flexDirection: \"row\" } }}\r\n */\r\nexport const mq = Object.freeze({\r\n up(key: BreakpointKey): string {\r\n return `@media (min-width:${bpValue(key)}px)`;\r\n },\r\n down(key: BreakpointKey): string {\r\n return `@media (max-width:${bpValue(key) - STEP}px)`;\r\n },\r\n between(start: BreakpointKey, end: BreakpointKey): string {\r\n return `@media (min-width:${bpValue(start)}px) and (max-width:${bpValue(end) - STEP}px)`;\r\n },\r\n only(key: BreakpointKey): string {\r\n const next = nextKey(key);\r\n return next ? mq.between(key, next) : mq.up(key);\r\n },\r\n});\r\n\r\nexport default breakpoints;\r\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,OAAO,MAAMA,WAAW,GAAGC,MAAM,CAACC,MAAM,CAAC;EACvCC,EAAE,EAAK,CAAC;EACRC,EAAE,EAAG,GAAG;EACRC,EAAE,EAAG,GAAG;EACRC,EAAE,EAAE,IAAI;EACRC,EAAE,EAAE;AACN,CAAC,CAAC;;AAEF;AACA;;AAGA;AACA;AACA,OAAO,MAAMC,eAAe,GAAGP,MAAM,CAACC,MAAM,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAU,CAAC;;AAErF;AACA;AACA;AACA,MAAMO,IAAI,GAAG,IAAI;;AAEjB;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,OAAOA,CAACC,GAAkB,EAAU;EAClD,MAAMC,CAAC,GAAGZ,WAAW,CAACW,GAAG,CAAC;EAC1B,OAAO,OAAOC,CAAC,KAAK,QAAQ,GAAGA,CAAC,GAAG,CAAC;AACtC;;AAEA;AACA,SAASC,OAAOA,CAACF,GAAkB,EAAE;EACnC,MAAMG,CAAC,GAAGN,eAAe,CAACO,OAAO,CAACJ,GAAG,CAAC;EACtC,OAAOG,CAAC,IAAI,CAAC,IAAIA,CAAC,GAAGN,eAAe,CAACQ,MAAM,GAAG,CAAC,GAC3CR,eAAe,CAACM,CAAC,GAAG,CAAC,CAAC,GACtB,IAAI;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMG,EAAE,GAAGhB,MAAM,CAACC,MAAM,CAAC;EAC9BgB,EAAEA,CAACP,GAAkB,EAAU;IAC7B,OAAO,qBAAqBD,OAAO,CAACC,GAAG,CAAC,KAAK;EAC/C,CAAC;EACDQ,IAAIA,CAACR,GAAkB,EAAU;IAC/B,OAAO,qBAAqBD,OAAO,CAACC,GAAG,CAAC,GAAGF,IAAI,KAAK;EACtD,CAAC;EACDW,OAAOA,CAACC,KAAoB,EAAEC,GAAkB,EAAU;IACxD,OAAO,qBAAqBZ,OAAO,CAACW,KAAK,CAAC,sBAAsBX,OAAO,CAACY,GAAG,CAAC,GAAGb,IAAI,KAAK;EAC1F,CAAC;EACDc,IAAIA,CAACZ,GAAkB,EAAU;IAC/B,MAAMa,IAAI,GAAGX,OAAO,CAACF,GAAG,CAAC;IACzB,OAAOa,IAAI,GAAGP,EAAE,CAACG,OAAO,CAACT,GAAG,EAAEa,IAAI,CAAC,GAAGP,EAAE,CAACC,EAAE,CAACP,GAAG,CAAC;EAClD;AACF,CAAC,CAAC;AAEF,eAAeX,WAAW","ignoreList":[]}
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Categorical chart palette — Portnet UI v2
|
|
3
|
+
*
|
|
4
|
+
* A cyclable sequence of visually distinct fills for CATEGORY series in
|
|
5
|
+
* charts (pie slices, stacked bars, multi-series lines). Charter §02.
|
|
6
|
+
*
|
|
7
|
+
* ─────────────────────────────────────────────────────────────────────────────
|
|
8
|
+
* WHY THIS BELONGS IN THE LIBRARY (capability gap G-37)
|
|
9
|
+
*
|
|
10
|
+
* R-2.3 MUST: "aucune valeur magique : tout px/color/font-size passe par un
|
|
11
|
+
* token". R-AI.1 MUST repeats it for generated UI. Yet the library shipped only
|
|
12
|
+
* SEMANTIC colour: brand, ink, surface, border, the four severities and the six
|
|
13
|
+
* workflow statuses. None of them answers "give me N colours that a reader can
|
|
14
|
+
* tell apart", so every charting screen wrote its own list of hex literals.
|
|
15
|
+
*
|
|
16
|
+
* Observed in `refonte-frontend` (Area 4): THIRTY-TWO literals across two
|
|
17
|
+
* files — a 30-entry palette in `GraphiqueCamembert` (itself already
|
|
18
|
+
* de-duplicated from two copies) plus two more in
|
|
19
|
+
* `ChartBilanDPCIParDelegation`. The file carried a comment explaining, quite
|
|
20
|
+
* correctly, why it could not be fixed locally: mapping categories onto the
|
|
21
|
+
* SEMANTIC tones would make "red" mean *a category of measuring instrument*
|
|
22
|
+
* rather than *an error*, which R-2.2 exists to prevent. So the module was
|
|
23
|
+
* stuck between two MUST rules, and the only way out was here.
|
|
24
|
+
*
|
|
25
|
+
* >>> THE ARGUMENT FOR OWNING IT IS THE VERIFICATION, NOT THE STORAGE. Moving
|
|
26
|
+
* >>> thirty hex codes from a module to a library would only relocate them. The
|
|
27
|
+
* >>> reason they belong here is that a categorical palette carries three
|
|
28
|
+
* >>> claims no host can check for itself, and that this repository already has
|
|
29
|
+
* >>> the tooling for: each fill must clear the 3:1 non-text floor (WCAG
|
|
30
|
+
* >>> 1.4.11 / R-C.3) against the surface it sits on, the entries must stay
|
|
31
|
+
* >>> apart from each other, and they must stay apart under colour-vision
|
|
32
|
+
* >>> deficiency — a pie chart encodes its data in hue alone, so a palette that
|
|
33
|
+
* >>> collapses under deuteranopia loses the data, not just the styling. The
|
|
34
|
+
* >>> module's 30 literals had NONE of the three verified. See
|
|
35
|
+
* >>> __tests__/chart-palette.test.ts, which asserts all three. <<<
|
|
36
|
+
* ─────────────────────────────────────────────────────────────────────────────
|
|
37
|
+
*
|
|
38
|
+
* HOW THESE VALUES WERE DERIVED
|
|
39
|
+
*
|
|
40
|
+
* Hue-balanced, then constrained — not picked by eye:
|
|
41
|
+
*
|
|
42
|
+
* 1. Twelve hues, the first eight evenly spaced around the wheel, so the
|
|
43
|
+
* sequence reads as intentional rather than arbitrary.
|
|
44
|
+
* 2. Lightness solved numerically per entry so that relative luminance lands
|
|
45
|
+
* inside the window where a fill clears 3:1 against BOTH the light surface
|
|
46
|
+
* (#FFFFFF) and the dark-mode surface. That window is roughly
|
|
47
|
+
* L ∈ [0.119, 0.300] and it is why ONE array serves both themes — unlike
|
|
48
|
+
* `status`, which needs a `dark.status` override. Entries alternate
|
|
49
|
+
* between the two ends of the window, which adds a lightness difference to
|
|
50
|
+
* the hue difference between neighbours.
|
|
51
|
+
* 3. Entries 9 to 12 were then chosen by maximising the minimum separation
|
|
52
|
+
* against the first eight, measured as the WORST of three distances:
|
|
53
|
+
* normal vision, deuteranopia and protanopia (Viénot simulation, CIE76).
|
|
54
|
+
*
|
|
55
|
+
* Measured properties (all pinned in the test):
|
|
56
|
+
* · every entry ≥ 3.06:1 on #FFFFFF and ≥ 3.37:1 on the dark surface;
|
|
57
|
+
* · minimum pairwise separation ≥ 12 ΔE under normal vision AND under both
|
|
58
|
+
* simulated dichromacies — the closest pair is entry 1 (red) against
|
|
59
|
+
* entry 3 (olive), at ~12.4.
|
|
60
|
+
*
|
|
61
|
+
* USE THE FIRST EIGHT WHERE YOU CAN. Entries 1-8 are the hue-balanced core;
|
|
62
|
+
* 9-12 extend it for larger sets. Past twelve, `chartColor` CYCLES, and two
|
|
63
|
+
* slices then share a colour — which is a defect in the chart, not in the
|
|
64
|
+
* palette. A series with more than a dozen categories should aggregate its
|
|
65
|
+
* tail into a single "Autres" slice: R-3.1 / R-3.2 cap what one screen may
|
|
66
|
+
* show at once for the same reason.
|
|
67
|
+
*
|
|
68
|
+
* COLOUR IS NEVER THE ONLY CHANNEL (WCAG 1.4.1). This palette makes slices
|
|
69
|
+
* distinguishable; it does not make a chart accessible. Every consumer still
|
|
70
|
+
* owes a legend with text labels, and a text equivalent of the data — 1.1.1
|
|
71
|
+
* for the chart as a whole.
|
|
72
|
+
*
|
|
73
|
+
* Usage — prefer the JS token in a chart library, since SVG presentation
|
|
74
|
+
* attributes given a `var()` are not reliably resolved by every renderer:
|
|
75
|
+
*
|
|
76
|
+
* import { chartColor } from "@portnet/ui/tokens";
|
|
77
|
+
* <Cell fill={chartColor(index)} />
|
|
78
|
+
*
|
|
79
|
+
* In CSS or `sx`, the same values are emitted as `--chart-1` … `--chart-12`
|
|
80
|
+
* (see theme/cssVariables).
|
|
81
|
+
*
|
|
82
|
+
* ─────────────────────────────────────────────────────────────────────────────
|
|
83
|
+
* TEXT *ON* A SLICE IS A SECOND CONTRAST PROBLEM — see `chartColorOn`.
|
|
84
|
+
*
|
|
85
|
+
* The 3:1 floor above covers the FILL against the page. A percentage printed
|
|
86
|
+
* inside the slice is text on that fill, and owes 4.5:1 (WCAG 1.4.3). The
|
|
87
|
+
* palette deliberately spans two lightness tiers, so no single label colour
|
|
88
|
+
* works for all twelve: `refonte-frontend` printed `fill="white"` on all six
|
|
89
|
+
* of its pies, which was ~3:1 on half of them.
|
|
90
|
+
* ─────────────────────────────────────────────────────────────────────────────
|
|
91
|
+
*/
|
|
92
|
+
import { contrastRatio, WCAG_AA_NORMAL } from "../utils/contrast";
|
|
93
|
+
import { ink } from "./colors";
|
|
94
|
+
import { fontFamily, fontSize, fontWeight } from "./typography";
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* The palette, in display order. Entries 1-8 (indices 0-7) are the
|
|
98
|
+
* hue-balanced, CVD-verified core; 9-12 extend it.
|
|
99
|
+
*/
|
|
100
|
+
export const chartCategorical = Object.freeze(["#C92E1D",
|
|
101
|
+
// 1 red
|
|
102
|
+
"#A89318",
|
|
103
|
+
// 2 amber / olive-gold
|
|
104
|
+
"#3B7911",
|
|
105
|
+
// 3 olive green
|
|
106
|
+
"#18A84B",
|
|
107
|
+
// 4 green
|
|
108
|
+
"#127681",
|
|
109
|
+
// 5 teal
|
|
110
|
+
"#7A8CEC",
|
|
111
|
+
// 6 periwinkle
|
|
112
|
+
"#9B30E1",
|
|
113
|
+
// 7 violet
|
|
114
|
+
"#E860B8",
|
|
115
|
+
// 8 pink
|
|
116
|
+
"#119870",
|
|
117
|
+
// 9 jade
|
|
118
|
+
"#B915B0",
|
|
119
|
+
// 10 magenta
|
|
120
|
+
"#9A0DF9",
|
|
121
|
+
// 11 blue-violet
|
|
122
|
+
"#965848" // 12 brown
|
|
123
|
+
]);
|
|
124
|
+
|
|
125
|
+
/** Size of the hue-balanced core. Beyond it, separation is still verified but the sequence stops being evenly spaced. */
|
|
126
|
+
export const CHART_CATEGORICAL_CORE = 8;
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Colour for the n-th category, cycling past the end of the palette.
|
|
130
|
+
*
|
|
131
|
+
* Non-finite or negative indices resolve to the first entry rather than
|
|
132
|
+
* throwing: a chart is a read-only view, and a bad index should not blank a
|
|
133
|
+
* page. In development an out-of-range index also warns, because CYCLING IS
|
|
134
|
+
* SILENT — two slices sharing a colour looks like a design choice, not like the
|
|
135
|
+
* data-loss it is.
|
|
136
|
+
*/
|
|
137
|
+
export function chartColor(index) {
|
|
138
|
+
const total = chartCategorical.length;
|
|
139
|
+
if (!Number.isFinite(index) || index < 0) {
|
|
140
|
+
return chartCategorical[0];
|
|
141
|
+
}
|
|
142
|
+
const i = Math.floor(index);
|
|
143
|
+
if (i >= total && process.env["NODE_ENV"] !== "production") {
|
|
144
|
+
// eslint-disable-next-line no-console
|
|
145
|
+
console.warn(`[@portnet/ui] chartColor(${i}): the palette holds ${total} colours, so ` + `this category reuses the colour of category ${i % total}. Aggregate ` + `the tail of the series instead (R-3.2).`);
|
|
146
|
+
}
|
|
147
|
+
return chartCategorical[i % total];
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Label colour for text drawn ON a slice — `#FFFFFF` or `ink.fg`, whichever
|
|
152
|
+
* clears WCAG 1.4.3 AA against that fill.
|
|
153
|
+
*
|
|
154
|
+
* DERIVED, NOT TABULATED, and that is the whole point: a parallel array of
|
|
155
|
+
* twelve label colours would be a second list to keep in step with the first,
|
|
156
|
+
* and the failure mode of letting them drift is silent — unreadable text, at
|
|
157
|
+
* the exact spot where the chart states its numbers. Computed here with this
|
|
158
|
+
* library's own `contrastRatio`, so nudging a hue re-derives its label colour
|
|
159
|
+
* in the same breath.
|
|
160
|
+
*
|
|
161
|
+
* Measured: every entry pairs at ≥ 4.98:1, so the AA floor holds with margin
|
|
162
|
+
* on all twelve. The dev warning below is for a future hue that lands in the
|
|
163
|
+
* band where NEITHER candidate reaches 4.5:1 — possible in principle, since the
|
|
164
|
+
* fill constraint only bounds luminance to [0.119, 0.300].
|
|
165
|
+
*/
|
|
166
|
+
const LABEL_CANDIDATES = Object.freeze(["#FFFFFF", ink.fg]);
|
|
167
|
+
function pickLabelColour(fill) {
|
|
168
|
+
let best = LABEL_CANDIDATES[0];
|
|
169
|
+
let bestRatio = 0;
|
|
170
|
+
for (const candidate of LABEL_CANDIDATES) {
|
|
171
|
+
const ratio = contrastRatio(candidate, fill) ?? 0;
|
|
172
|
+
if (ratio > bestRatio) {
|
|
173
|
+
bestRatio = ratio;
|
|
174
|
+
best = candidate;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
if (bestRatio < WCAG_AA_NORMAL && process.env["NODE_ENV"] !== "production") {
|
|
178
|
+
// eslint-disable-next-line no-console
|
|
179
|
+
console.warn(`[@portnet/ui] chart fill ${fill} has no AA-compliant label colour ` + `(best ${bestRatio.toFixed(2)}:1). Draw the label outside the slice, or ` + `re-solve the fill's lightness.`);
|
|
180
|
+
}
|
|
181
|
+
return best;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/** Label colours, index-aligned with `chartCategorical`. */
|
|
185
|
+
export const chartCategoricalOn = Object.freeze(chartCategorical.map(pickLabelColour));
|
|
186
|
+
|
|
187
|
+
/** AA-safe colour for text drawn on top of `chartColor(index)`. Cycles identically. */
|
|
188
|
+
export function chartColorOn(index) {
|
|
189
|
+
const total = chartCategoricalOn.length;
|
|
190
|
+
if (!Number.isFinite(index) || index < 0) {
|
|
191
|
+
return chartCategoricalOn[0];
|
|
192
|
+
}
|
|
193
|
+
return chartCategoricalOn[Math.floor(index) % total];
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* Non-data chart furniture — title, labels, canvas (capability gap G-54).
|
|
198
|
+
*
|
|
199
|
+
* ────────────────────────────────────────────────────────────────────────────────
|
|
200
|
+
* THIS IS A ROLE→TOKEN MAPPING, NOT A STORE OF VALUES, and the distinction is
|
|
201
|
+
* the justification. Every value below already exists in this library, and a
|
|
202
|
+
* module reading `ink.fgMuted` for its axis labels is already compliant with
|
|
203
|
+
* R-2.3. What no module can get right alone is WHICH token plays WHICH role:
|
|
204
|
+
* is a chart title an `h2` or an `h3`? are axis labels `xs` or `sm`? is the
|
|
205
|
+
* canvas `surface` or transparent?
|
|
206
|
+
*
|
|
207
|
+
* Left unanswered, each screen answers it again. Observed in
|
|
208
|
+
* `autorisation-admis-pour-conforme-fe` (Area 5): three bilan screens, five
|
|
209
|
+
* chart definitions, the same five-line block of title / label / canvas styling
|
|
210
|
+
* copied into each — agreeing only because they were copied from one another.
|
|
211
|
+
* The next module starts from a blank chart and picks `h2`, and nothing in code
|
|
212
|
+
* review can call that wrong, because the platform never said.
|
|
213
|
+
*
|
|
214
|
+
* So this is the answer, once: a chart title reads as a card title (`h3`,
|
|
215
|
+
* semibold, full-strength ink), its labels as hints (`xs`, muted ink), and its
|
|
216
|
+
* canvas is TRANSPARENT — the chart sits on whatever `Surface` holds it, and a
|
|
217
|
+
* hard-coded white canvas is exactly what breaks a chart in dark mode.
|
|
218
|
+
* ────────────────────────────────────────────────────────────────────────────────
|
|
219
|
+
*
|
|
220
|
+
* LIBRARY-AGNOSTIC BY CONSTRUCTION. Plain strings, no chart library imported,
|
|
221
|
+
* no option shape assumed: Highcharts, Recharts, Chart.js and a hand-written
|
|
222
|
+
* SVG all take these. A consumer maps them to its renderer's option names,
|
|
223
|
+
* which is a binding — and a binding holding no design values is not a
|
|
224
|
+
* duplication of this.
|
|
225
|
+
*
|
|
226
|
+
* FONT SIZES ARE STRINGS WITH UNITS, unlike `fontSize.*`, which are integers.
|
|
227
|
+
* Chart libraries pass their style objects to SVG attributes rather than to
|
|
228
|
+
* React's style prop, so they never get a unit appended for free — a bare `16`
|
|
229
|
+
* is silently ignored by some renderers and read as `16px` by others.
|
|
230
|
+
*
|
|
231
|
+
* WHAT THIS DOES NOT MAKE ACCESSIBLE. Nothing here supplies the text
|
|
232
|
+
* equivalent WCAG 1.1.1 requires of a chart, or the non-colour channel of
|
|
233
|
+
* 1.4.1. See the `ChartFigure` pattern, which carries the caption, and the note
|
|
234
|
+
* at the head of this file.
|
|
235
|
+
*/
|
|
236
|
+
export const chartChrome = Object.freeze({
|
|
237
|
+
/** Canvas fill. Transparent so the holding `Surface` shows through, light or dark. */
|
|
238
|
+
background: "transparent",
|
|
239
|
+
/** One family for every text in the chart — §02.2 UI stack. */
|
|
240
|
+
fontFamily: fontFamily.sans,
|
|
241
|
+
/** Chart title: reads as a card title (§02.2 `h3`). */
|
|
242
|
+
title: Object.freeze({
|
|
243
|
+
color: ink.fg,
|
|
244
|
+
fontSize: `${fontSize.h3}px`,
|
|
245
|
+
fontWeight: String(fontWeight.semibold)
|
|
246
|
+
}),
|
|
247
|
+
/** Axis labels, legend items, data labels drawn OUTSIDE a slice: hints. */
|
|
248
|
+
label: Object.freeze({
|
|
249
|
+
color: ink.fgMuted,
|
|
250
|
+
fontSize: `${fontSize.xs}px`
|
|
251
|
+
})
|
|
252
|
+
});
|
|
253
|
+
const chart = {
|
|
254
|
+
chartCategorical,
|
|
255
|
+
chartColor,
|
|
256
|
+
chartColorOn,
|
|
257
|
+
chartChrome,
|
|
258
|
+
CHART_CATEGORICAL_CORE
|
|
259
|
+
};
|
|
260
|
+
export default chart;
|
|
261
|
+
//# sourceMappingURL=chart.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chart.js","names":["contrastRatio","WCAG_AA_NORMAL","ink","fontFamily","fontSize","fontWeight","chartCategorical","Object","freeze","CHART_CATEGORICAL_CORE","chartColor","index","total","length","Number","isFinite","i","Math","floor","process","env","console","warn","LABEL_CANDIDATES","fg","pickLabelColour","fill","best","bestRatio","candidate","ratio","toFixed","chartCategoricalOn","map","chartColorOn","chartChrome","background","sans","title","color","h3","String","semibold","label","fgMuted","xs","chart"],"sources":["../../../../src/lib/v2/tokens/chart.ts"],"sourcesContent":["/**\r\n * Categorical chart palette — Portnet UI v2\r\n *\r\n * A cyclable sequence of visually distinct fills for CATEGORY series in\r\n * charts (pie slices, stacked bars, multi-series lines). Charter §02.\r\n *\r\n * ─────────────────────────────────────────────────────────────────────────────\r\n * WHY THIS BELONGS IN THE LIBRARY (capability gap G-37)\r\n *\r\n * R-2.3 MUST: \"aucune valeur magique : tout px/color/font-size passe par un\r\n * token\". R-AI.1 MUST repeats it for generated UI. Yet the library shipped only\r\n * SEMANTIC colour: brand, ink, surface, border, the four severities and the six\r\n * workflow statuses. None of them answers \"give me N colours that a reader can\r\n * tell apart\", so every charting screen wrote its own list of hex literals.\r\n *\r\n * Observed in `refonte-frontend` (Area 4): THIRTY-TWO literals across two\r\n * files — a 30-entry palette in `GraphiqueCamembert` (itself already\r\n * de-duplicated from two copies) plus two more in\r\n * `ChartBilanDPCIParDelegation`. The file carried a comment explaining, quite\r\n * correctly, why it could not be fixed locally: mapping categories onto the\r\n * SEMANTIC tones would make \"red\" mean *a category of measuring instrument*\r\n * rather than *an error*, which R-2.2 exists to prevent. So the module was\r\n * stuck between two MUST rules, and the only way out was here.\r\n *\r\n * >>> THE ARGUMENT FOR OWNING IT IS THE VERIFICATION, NOT THE STORAGE. Moving\r\n * >>> thirty hex codes from a module to a library would only relocate them. The\r\n * >>> reason they belong here is that a categorical palette carries three\r\n * >>> claims no host can check for itself, and that this repository already has\r\n * >>> the tooling for: each fill must clear the 3:1 non-text floor (WCAG\r\n * >>> 1.4.11 / R-C.3) against the surface it sits on, the entries must stay\r\n * >>> apart from each other, and they must stay apart under colour-vision\r\n * >>> deficiency — a pie chart encodes its data in hue alone, so a palette that\r\n * >>> collapses under deuteranopia loses the data, not just the styling. The\r\n * >>> module's 30 literals had NONE of the three verified. See\r\n * >>> __tests__/chart-palette.test.ts, which asserts all three. <<<\r\n * ─────────────────────────────────────────────────────────────────────────────\r\n *\r\n * HOW THESE VALUES WERE DERIVED\r\n *\r\n * Hue-balanced, then constrained — not picked by eye:\r\n *\r\n * 1. Twelve hues, the first eight evenly spaced around the wheel, so the\r\n * sequence reads as intentional rather than arbitrary.\r\n * 2. Lightness solved numerically per entry so that relative luminance lands\r\n * inside the window where a fill clears 3:1 against BOTH the light surface\r\n * (#FFFFFF) and the dark-mode surface. That window is roughly\r\n * L ∈ [0.119, 0.300] and it is why ONE array serves both themes — unlike\r\n * `status`, which needs a `dark.status` override. Entries alternate\r\n * between the two ends of the window, which adds a lightness difference to\r\n * the hue difference between neighbours.\r\n * 3. Entries 9 to 12 were then chosen by maximising the minimum separation\r\n * against the first eight, measured as the WORST of three distances:\r\n * normal vision, deuteranopia and protanopia (Viénot simulation, CIE76).\r\n *\r\n * Measured properties (all pinned in the test):\r\n * · every entry ≥ 3.06:1 on #FFFFFF and ≥ 3.37:1 on the dark surface;\r\n * · minimum pairwise separation ≥ 12 ΔE under normal vision AND under both\r\n * simulated dichromacies — the closest pair is entry 1 (red) against\r\n * entry 3 (olive), at ~12.4.\r\n *\r\n * USE THE FIRST EIGHT WHERE YOU CAN. Entries 1-8 are the hue-balanced core;\r\n * 9-12 extend it for larger sets. Past twelve, `chartColor` CYCLES, and two\r\n * slices then share a colour — which is a defect in the chart, not in the\r\n * palette. A series with more than a dozen categories should aggregate its\r\n * tail into a single \"Autres\" slice: R-3.1 / R-3.2 cap what one screen may\r\n * show at once for the same reason.\r\n *\r\n * COLOUR IS NEVER THE ONLY CHANNEL (WCAG 1.4.1). This palette makes slices\r\n * distinguishable; it does not make a chart accessible. Every consumer still\r\n * owes a legend with text labels, and a text equivalent of the data — 1.1.1\r\n * for the chart as a whole.\r\n *\r\n * Usage — prefer the JS token in a chart library, since SVG presentation\r\n * attributes given a `var()` are not reliably resolved by every renderer:\r\n *\r\n * import { chartColor } from \"@portnet/ui/tokens\";\r\n * <Cell fill={chartColor(index)} />\r\n *\r\n * In CSS or `sx`, the same values are emitted as `--chart-1` … `--chart-12`\r\n * (see theme/cssVariables).\r\n *\r\n * ─────────────────────────────────────────────────────────────────────────────\r\n * TEXT *ON* A SLICE IS A SECOND CONTRAST PROBLEM — see `chartColorOn`.\r\n *\r\n * The 3:1 floor above covers the FILL against the page. A percentage printed\r\n * inside the slice is text on that fill, and owes 4.5:1 (WCAG 1.4.3). The\r\n * palette deliberately spans two lightness tiers, so no single label colour\r\n * works for all twelve: `refonte-frontend` printed `fill=\"white\"` on all six\r\n * of its pies, which was ~3:1 on half of them.\r\n * ─────────────────────────────────────────────────────────────────────────────\r\n */\r\nimport { contrastRatio, WCAG_AA_NORMAL } from \"../utils/contrast\";\r\nimport { ink } from \"./colors\";\r\nimport { fontFamily, fontSize, fontWeight } from \"./typography\";\r\n\r\n/**\r\n * The palette, in display order. Entries 1-8 (indices 0-7) are the\r\n * hue-balanced, CVD-verified core; 9-12 extend it.\r\n */\r\nexport const chartCategorical = Object.freeze([\r\n \"#C92E1D\", // 1 red\r\n \"#A89318\", // 2 amber / olive-gold\r\n \"#3B7911\", // 3 olive green\r\n \"#18A84B\", // 4 green\r\n \"#127681\", // 5 teal\r\n \"#7A8CEC\", // 6 periwinkle\r\n \"#9B30E1\", // 7 violet\r\n \"#E860B8\", // 8 pink\r\n \"#119870\", // 9 jade\r\n \"#B915B0\", // 10 magenta\r\n \"#9A0DF9\", // 11 blue-violet\r\n \"#965848\", // 12 brown\r\n] as const);\r\n\r\n/** Size of the hue-balanced core. Beyond it, separation is still verified but the sequence stops being evenly spaced. */\r\nexport const CHART_CATEGORICAL_CORE = 8;\r\n\r\n/**\r\n * Colour for the n-th category, cycling past the end of the palette.\r\n *\r\n * Non-finite or negative indices resolve to the first entry rather than\r\n * throwing: a chart is a read-only view, and a bad index should not blank a\r\n * page. In development an out-of-range index also warns, because CYCLING IS\r\n * SILENT — two slices sharing a colour looks like a design choice, not like the\r\n * data-loss it is.\r\n */\r\nexport function chartColor(index: number): string {\r\n const total = chartCategorical.length;\r\n if (!Number.isFinite(index) || index < 0) {\r\n return chartCategorical[0] as string;\r\n }\r\n const i = Math.floor(index);\r\n if (i >= total && process.env[\"NODE_ENV\"] !== \"production\") {\r\n // eslint-disable-next-line no-console\r\n console.warn(\r\n `[@portnet/ui] chartColor(${i}): the palette holds ${total} colours, so ` +\r\n `this category reuses the colour of category ${i % total}. Aggregate ` +\r\n `the tail of the series instead (R-3.2).`\r\n );\r\n }\r\n return chartCategorical[i % total] as string;\r\n}\r\n\r\n/**\r\n * Label colour for text drawn ON a slice — `#FFFFFF` or `ink.fg`, whichever\r\n * clears WCAG 1.4.3 AA against that fill.\r\n *\r\n * DERIVED, NOT TABULATED, and that is the whole point: a parallel array of\r\n * twelve label colours would be a second list to keep in step with the first,\r\n * and the failure mode of letting them drift is silent — unreadable text, at\r\n * the exact spot where the chart states its numbers. Computed here with this\r\n * library's own `contrastRatio`, so nudging a hue re-derives its label colour\r\n * in the same breath.\r\n *\r\n * Measured: every entry pairs at ≥ 4.98:1, so the AA floor holds with margin\r\n * on all twelve. The dev warning below is for a future hue that lands in the\r\n * band where NEITHER candidate reaches 4.5:1 — possible in principle, since the\r\n * fill constraint only bounds luminance to [0.119, 0.300].\r\n */\r\nconst LABEL_CANDIDATES: readonly string[] = Object.freeze([\"#FFFFFF\", ink.fg]);\r\n\r\nfunction pickLabelColour(fill: string): string {\r\n let best = LABEL_CANDIDATES[0] as string;\r\n let bestRatio = 0;\r\n for (const candidate of LABEL_CANDIDATES) {\r\n const ratio = contrastRatio(candidate, fill) ?? 0;\r\n if (ratio > bestRatio) {\r\n bestRatio = ratio;\r\n best = candidate;\r\n }\r\n }\r\n if (bestRatio < WCAG_AA_NORMAL && process.env[\"NODE_ENV\"] !== \"production\") {\r\n // eslint-disable-next-line no-console\r\n console.warn(\r\n `[@portnet/ui] chart fill ${fill} has no AA-compliant label colour ` +\r\n `(best ${bestRatio.toFixed(2)}:1). Draw the label outside the slice, or ` +\r\n `re-solve the fill's lightness.`\r\n );\r\n }\r\n return best;\r\n}\r\n\r\n/** Label colours, index-aligned with `chartCategorical`. */\r\nexport const chartCategoricalOn = Object.freeze(\r\n chartCategorical.map(pickLabelColour)\r\n);\r\n\r\n/** AA-safe colour for text drawn on top of `chartColor(index)`. Cycles identically. */\r\nexport function chartColorOn(index: number): string {\r\n const total = chartCategoricalOn.length;\r\n if (!Number.isFinite(index) || index < 0) {\r\n return chartCategoricalOn[0] as string;\r\n }\r\n return chartCategoricalOn[Math.floor(index) % total] as string;\r\n}\r\n\r\n/**\r\n * Non-data chart furniture — title, labels, canvas (capability gap G-54).\r\n *\r\n * ────────────────────────────────────────────────────────────────────────────────\r\n * THIS IS A ROLE→TOKEN MAPPING, NOT A STORE OF VALUES, and the distinction is\r\n * the justification. Every value below already exists in this library, and a\r\n * module reading `ink.fgMuted` for its axis labels is already compliant with\r\n * R-2.3. What no module can get right alone is WHICH token plays WHICH role:\r\n * is a chart title an `h2` or an `h3`? are axis labels `xs` or `sm`? is the\r\n * canvas `surface` or transparent?\r\n *\r\n * Left unanswered, each screen answers it again. Observed in\r\n * `autorisation-admis-pour-conforme-fe` (Area 5): three bilan screens, five\r\n * chart definitions, the same five-line block of title / label / canvas styling\r\n * copied into each — agreeing only because they were copied from one another.\r\n * The next module starts from a blank chart and picks `h2`, and nothing in code\r\n * review can call that wrong, because the platform never said.\r\n *\r\n * So this is the answer, once: a chart title reads as a card title (`h3`,\r\n * semibold, full-strength ink), its labels as hints (`xs`, muted ink), and its\r\n * canvas is TRANSPARENT — the chart sits on whatever `Surface` holds it, and a\r\n * hard-coded white canvas is exactly what breaks a chart in dark mode.\r\n * ────────────────────────────────────────────────────────────────────────────────\r\n *\r\n * LIBRARY-AGNOSTIC BY CONSTRUCTION. Plain strings, no chart library imported,\r\n * no option shape assumed: Highcharts, Recharts, Chart.js and a hand-written\r\n * SVG all take these. A consumer maps them to its renderer's option names,\r\n * which is a binding — and a binding holding no design values is not a\r\n * duplication of this.\r\n *\r\n * FONT SIZES ARE STRINGS WITH UNITS, unlike `fontSize.*`, which are integers.\r\n * Chart libraries pass their style objects to SVG attributes rather than to\r\n * React's style prop, so they never get a unit appended for free — a bare `16`\r\n * is silently ignored by some renderers and read as `16px` by others.\r\n *\r\n * WHAT THIS DOES NOT MAKE ACCESSIBLE. Nothing here supplies the text\r\n * equivalent WCAG 1.1.1 requires of a chart, or the non-colour channel of\r\n * 1.4.1. See the `ChartFigure` pattern, which carries the caption, and the note\r\n * at the head of this file.\r\n */\r\nexport const chartChrome = Object.freeze({\r\n /** Canvas fill. Transparent so the holding `Surface` shows through, light or dark. */\r\n background: \"transparent\",\r\n /** One family for every text in the chart — §02.2 UI stack. */\r\n fontFamily: fontFamily.sans,\r\n /** Chart title: reads as a card title (§02.2 `h3`). */\r\n title: Object.freeze({\r\n color: ink.fg,\r\n fontSize: `${fontSize.h3}px`,\r\n fontWeight: String(fontWeight.semibold),\r\n }),\r\n /** Axis labels, legend items, data labels drawn OUTSIDE a slice: hints. */\r\n label: Object.freeze({\r\n color: ink.fgMuted,\r\n fontSize: `${fontSize.xs}px`,\r\n }),\r\n});\r\n\r\nconst chart = {\r\n chartCategorical,\r\n chartColor,\r\n chartColorOn,\r\n chartChrome,\r\n CHART_CATEGORICAL_CORE,\r\n};\r\nexport default chart;\r\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,SAASA,aAAa,EAAEC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