@portnet/ui 6.0.0 → 6.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/index.js +196 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/v2/__tests__/FieldError.test.js +160 -0
- package/dist/esm/v2/__tests__/FieldError.test.js.map +1 -0
- package/dist/esm/v2/__tests__/FileCard.test.js +144 -0
- package/dist/esm/v2/__tests__/FileCard.test.js.map +1 -0
- package/dist/esm/v2/__tests__/MobileRowCard.test.js +333 -0
- package/dist/esm/v2/__tests__/MobileRowCard.test.js.map +1 -0
- package/dist/esm/v2/__tests__/SectionErrorBoundary.test.js +235 -0
- package/dist/esm/v2/__tests__/SectionErrorBoundary.test.js.map +1 -0
- package/dist/esm/v2/__tests__/apiError.test.js +181 -0
- package/dist/esm/v2/__tests__/apiError.test.js.map +1 -0
- package/dist/esm/v2/__tests__/banned-patterns.test.js +270 -0
- package/dist/esm/v2/__tests__/banned-patterns.test.js.map +1 -0
- package/dist/esm/v2/__tests__/contrast-palette.test.js +224 -0
- package/dist/esm/v2/__tests__/contrast-palette.test.js.map +1 -0
- package/dist/esm/v2/__tests__/cssVariables.test.js +157 -0
- package/dist/esm/v2/__tests__/cssVariables.test.js.map +1 -0
- package/dist/esm/v2/__tests__/labels-merge.test.js +147 -0
- package/dist/esm/v2/__tests__/labels-merge.test.js.map +1 -0
- package/dist/esm/v2/__tests__/locale-fallback.test.js +109 -0
- package/dist/esm/v2/__tests__/locale-fallback.test.js.map +1 -0
- package/dist/esm/v2/__tests__/useFocusTrap.test.js +514 -0
- package/dist/esm/v2/__tests__/useFocusTrap.test.js.map +1 -0
- package/dist/esm/v2/components/Accordion.js +230 -0
- package/dist/esm/v2/components/Accordion.js.map +1 -0
- package/dist/esm/v2/components/ActionStrip.js +146 -0
- package/dist/esm/v2/components/ActionStrip.js.map +1 -0
- package/dist/esm/v2/components/Banner.js +254 -0
- package/dist/esm/v2/components/Banner.js.map +1 -0
- package/dist/esm/v2/components/Busy.js +97 -0
- package/dist/esm/v2/components/Busy.js.map +1 -0
- package/dist/esm/v2/components/Button.js +114 -0
- package/dist/esm/v2/components/Button.js.map +1 -0
- package/dist/esm/v2/components/CategoryTag.js +81 -0
- package/dist/esm/v2/components/CategoryTag.js.map +1 -0
- package/dist/esm/v2/components/Checkbox.js +124 -0
- package/dist/esm/v2/components/Checkbox.js.map +1 -0
- package/dist/esm/v2/components/Chip.js +124 -0
- package/dist/esm/v2/components/Chip.js.map +1 -0
- package/dist/esm/v2/components/Combobox.js +394 -0
- package/dist/esm/v2/components/Combobox.js.map +1 -0
- package/dist/esm/v2/components/CommandPalette.js +660 -0
- package/dist/esm/v2/components/CommandPalette.js.map +1 -0
- package/dist/esm/v2/components/ConfirmDialog.js +144 -0
- package/dist/esm/v2/components/ConfirmDialog.js.map +1 -0
- package/dist/esm/v2/components/DatePicker.js +200 -0
- package/dist/esm/v2/components/DatePicker.js.map +1 -0
- package/dist/esm/v2/components/DateRangePicker.js +289 -0
- package/dist/esm/v2/components/DateRangePicker.js.map +1 -0
- package/dist/esm/v2/components/DateTimePicker.js +182 -0
- package/dist/esm/v2/components/DateTimePicker.js.map +1 -0
- package/dist/esm/v2/components/Drawer.js +333 -0
- package/dist/esm/v2/components/Drawer.js.map +1 -0
- package/dist/esm/v2/components/Dropzone.js +540 -0
- package/dist/esm/v2/components/Dropzone.js.map +1 -0
- package/dist/esm/v2/components/EmptyState.js +102 -0
- package/dist/esm/v2/components/EmptyState.js.map +1 -0
- package/dist/esm/v2/components/FavoriteToggle.js +127 -0
- package/dist/esm/v2/components/FavoriteToggle.js.map +1 -0
- package/dist/esm/v2/components/Field.js +197 -0
- package/dist/esm/v2/components/Field.js.map +1 -0
- package/dist/esm/v2/components/FieldError.js +124 -0
- package/dist/esm/v2/components/FieldError.js.map +1 -0
- package/dist/esm/v2/components/FieldHelp.js +202 -0
- package/dist/esm/v2/components/FieldHelp.js.map +1 -0
- package/dist/esm/v2/components/FileCard.js +162 -0
- package/dist/esm/v2/components/FileCard.js.map +1 -0
- package/dist/esm/v2/components/FilterTab.js +138 -0
- package/dist/esm/v2/components/FilterTab.js.map +1 -0
- package/dist/esm/v2/components/ForbiddenPage.js +74 -0
- package/dist/esm/v2/components/ForbiddenPage.js.map +1 -0
- package/dist/esm/v2/components/FormGrid.js +179 -0
- package/dist/esm/v2/components/FormGrid.js.map +1 -0
- package/dist/esm/v2/components/FormikDisplay.js +118 -0
- package/dist/esm/v2/components/FormikDisplay.js.map +1 -0
- package/dist/esm/v2/components/Input.js +107 -0
- package/dist/esm/v2/components/Input.js.map +1 -0
- package/dist/esm/v2/components/KPICard.js +237 -0
- package/dist/esm/v2/components/KPICard.js.map +1 -0
- package/dist/esm/v2/components/KPIStrip.js +84 -0
- package/dist/esm/v2/components/KPIStrip.js.map +1 -0
- package/dist/esm/v2/components/KV.js +75 -0
- package/dist/esm/v2/components/KV.js.map +1 -0
- package/dist/esm/v2/components/KVGrid.js +74 -0
- package/dist/esm/v2/components/KVGrid.js.map +1 -0
- package/dist/esm/v2/components/Layout.js +284 -0
- package/dist/esm/v2/components/Layout.js.map +1 -0
- package/dist/esm/v2/components/MobileRowCard.js +314 -0
- package/dist/esm/v2/components/MobileRowCard.js.map +1 -0
- package/dist/esm/v2/components/Modal.js +276 -0
- package/dist/esm/v2/components/Modal.js.map +1 -0
- package/dist/esm/v2/components/NetworkErrorPage.js +78 -0
- package/dist/esm/v2/components/NetworkErrorPage.js.map +1 -0
- package/dist/esm/v2/components/NotFoundPage.js +58 -0
- package/dist/esm/v2/components/NotFoundPage.js.map +1 -0
- package/dist/esm/v2/components/NumberInput.js +309 -0
- package/dist/esm/v2/components/NumberInput.js.map +1 -0
- package/dist/esm/v2/components/OverflowMenu.js +184 -0
- package/dist/esm/v2/components/OverflowMenu.js.map +1 -0
- package/dist/esm/v2/components/PdfViewer.js +122 -0
- package/dist/esm/v2/components/PdfViewer.js.map +1 -0
- package/dist/esm/v2/components/ProgressBar.js +202 -0
- package/dist/esm/v2/components/ProgressBar.js.map +1 -0
- package/dist/esm/v2/components/Radio.js +228 -0
- package/dist/esm/v2/components/Radio.js.map +1 -0
- package/dist/esm/v2/components/SectionErrorBoundary.js +214 -0
- package/dist/esm/v2/components/SectionErrorBoundary.js.map +1 -0
- package/dist/esm/v2/components/SectionHeader.js +132 -0
- package/dist/esm/v2/components/SectionHeader.js.map +1 -0
- package/dist/esm/v2/components/Segmented.js +254 -0
- package/dist/esm/v2/components/Segmented.js.map +1 -0
- package/dist/esm/v2/components/Select.js +490 -0
- package/dist/esm/v2/components/Select.js.map +1 -0
- package/dist/esm/v2/components/ServerErrorPage.js +74 -0
- package/dist/esm/v2/components/ServerErrorPage.js.map +1 -0
- package/dist/esm/v2/components/Skeleton.js +269 -0
- package/dist/esm/v2/components/Skeleton.js.map +1 -0
- package/dist/esm/v2/components/SkipLink.js +49 -0
- package/dist/esm/v2/components/SkipLink.js.map +1 -0
- package/dist/esm/v2/components/Spinner.js +69 -0
- package/dist/esm/v2/components/Spinner.js.map +1 -0
- package/dist/esm/v2/components/Status.js +64 -0
- package/dist/esm/v2/components/Status.js.map +1 -0
- package/dist/esm/v2/components/Stepper.js +432 -0
- package/dist/esm/v2/components/Stepper.js.map +1 -0
- package/dist/esm/v2/components/Surface.js +159 -0
- package/dist/esm/v2/components/Surface.js.map +1 -0
- package/dist/esm/v2/components/Switch.js +128 -0
- package/dist/esm/v2/components/Switch.js.map +1 -0
- package/dist/esm/v2/components/Tabs.js +150 -0
- package/dist/esm/v2/components/Tabs.js.map +1 -0
- package/dist/esm/v2/components/TelInput.js +274 -0
- package/dist/esm/v2/components/TelInput.js.map +1 -0
- package/dist/esm/v2/components/Textarea.js +72 -0
- package/dist/esm/v2/components/Textarea.js.map +1 -0
- package/dist/esm/v2/components/TimePicker.js +134 -0
- package/dist/esm/v2/components/TimePicker.js.map +1 -0
- package/dist/esm/v2/components/Toast.js +376 -0
- package/dist/esm/v2/components/Toast.js.map +1 -0
- package/dist/esm/v2/components/Tooltip.js +161 -0
- package/dist/esm/v2/components/Tooltip.js.map +1 -0
- package/dist/esm/v2/components/_ErrorPageBody.js +85 -0
- package/dist/esm/v2/components/_ErrorPageBody.js.map +1 -0
- package/dist/esm/v2/components/_pickerShared.js +60 -0
- package/dist/esm/v2/components/_pickerShared.js.map +1 -0
- package/dist/esm/v2/components/index.js +244 -0
- package/dist/esm/v2/components/index.js.map +1 -0
- package/dist/esm/v2/hooks/index.js +10 -0
- package/dist/esm/v2/hooks/index.js.map +1 -0
- package/dist/esm/v2/hooks/useDelayedFlag.js +55 -0
- package/dist/esm/v2/hooks/useDelayedFlag.js.map +1 -0
- package/dist/esm/v2/hooks/useDensity.js +119 -0
- package/dist/esm/v2/hooks/useDensity.js.map +1 -0
- package/dist/esm/v2/hooks/useFocusFirstError.js +197 -0
- package/dist/esm/v2/hooks/useFocusFirstError.js.map +1 -0
- package/dist/esm/v2/hooks/useFocusTrap.js +202 -0
- package/dist/esm/v2/hooks/useFocusTrap.js.map +1 -0
- package/dist/esm/v2/hooks/useFormAutoSave.js +181 -0
- package/dist/esm/v2/hooks/useFormAutoSave.js.map +1 -0
- package/dist/esm/v2/hooks/useFormCompletionProgress.js +131 -0
- package/dist/esm/v2/hooks/useFormCompletionProgress.js.map +1 -0
- package/dist/esm/v2/hooks/useResolvedDensity.js +44 -0
- package/dist/esm/v2/hooks/useResolvedDensity.js.map +1 -0
- package/dist/esm/v2/hooks/useSortedRows.js +32 -0
- package/dist/esm/v2/hooks/useSortedRows.js.map +1 -0
- package/dist/esm/v2/hooks/useTabLoading.js +79 -0
- package/dist/esm/v2/hooks/useTabLoading.js.map +1 -0
- package/dist/esm/v2/index.js +121 -0
- package/dist/esm/v2/index.js.map +1 -0
- package/dist/esm/v2/modalContext.js +108 -0
- package/dist/esm/v2/modalContext.js.map +1 -0
- package/dist/esm/v2/models/favorite.js +2 -0
- package/dist/esm/v2/models/favorite.js.map +1 -0
- package/dist/esm/v2/models/index.js +12 -0
- package/dist/esm/v2/models/index.js.map +1 -0
- package/dist/esm/v2/models/personalization.js +2 -0
- package/dist/esm/v2/models/personalization.js.map +1 -0
- package/dist/esm/v2/models/referentiel.js +2 -0
- package/dist/esm/v2/models/referentiel.js.map +1 -0
- package/dist/esm/v2/models/savedFilter.js +2 -0
- package/dist/esm/v2/models/savedFilter.js.map +1 -0
- package/dist/esm/v2/patterns/ActionBar.js +603 -0
- package/dist/esm/v2/patterns/ActionBar.js.map +1 -0
- package/dist/esm/v2/patterns/BulkActionBar.js +147 -0
- package/dist/esm/v2/patterns/BulkActionBar.js.map +1 -0
- package/dist/esm/v2/patterns/CollapsibleDataGrid.js +303 -0
- package/dist/esm/v2/patterns/CollapsibleDataGrid.js.map +1 -0
- package/dist/esm/v2/patterns/ColumnsToggle.js +301 -0
- package/dist/esm/v2/patterns/ColumnsToggle.js.map +1 -0
- package/dist/esm/v2/patterns/DataGrid.js +820 -0
- package/dist/esm/v2/patterns/DataGrid.js.map +1 -0
- package/dist/esm/v2/patterns/DataGridSettingsMenu.js +375 -0
- package/dist/esm/v2/patterns/DataGridSettingsMenu.js.map +1 -0
- package/dist/esm/v2/patterns/DataGridToolbar.js +249 -0
- package/dist/esm/v2/patterns/DataGridToolbar.js.map +1 -0
- package/dist/esm/v2/patterns/DataGridVirtualized.js +523 -0
- package/dist/esm/v2/patterns/DataGridVirtualized.js.map +1 -0
- package/dist/esm/v2/patterns/DeleteResourceConfirmDialog.js +70 -0
- package/dist/esm/v2/patterns/DeleteResourceConfirmDialog.js.map +1 -0
- package/dist/esm/v2/patterns/FavoriteColumn.js +164 -0
- package/dist/esm/v2/patterns/FavoriteColumn.js.map +1 -0
- package/dist/esm/v2/patterns/FavoritesFilter.js +91 -0
- package/dist/esm/v2/patterns/FavoritesFilter.js.map +1 -0
- package/dist/esm/v2/patterns/FormErrorSummary.js +101 -0
- package/dist/esm/v2/patterns/FormErrorSummary.js.map +1 -0
- package/dist/esm/v2/patterns/FormPageShell.js +126 -0
- package/dist/esm/v2/patterns/FormPageShell.js.map +1 -0
- package/dist/esm/v2/patterns/FormSection.js +190 -0
- package/dist/esm/v2/patterns/FormSection.js.map +1 -0
- package/dist/esm/v2/patterns/FormikCheckboxGroup.js +110 -0
- package/dist/esm/v2/patterns/FormikCheckboxGroup.js.map +1 -0
- package/dist/esm/v2/patterns/FormikCombobox.js +115 -0
- package/dist/esm/v2/patterns/FormikCombobox.js.map +1 -0
- package/dist/esm/v2/patterns/FormikDatePicker.js +196 -0
- package/dist/esm/v2/patterns/FormikDatePicker.js.map +1 -0
- package/dist/esm/v2/patterns/FormikErrorFocus.js +77 -0
- package/dist/esm/v2/patterns/FormikErrorFocus.js.map +1 -0
- package/dist/esm/v2/patterns/FormikFile.js +148 -0
- package/dist/esm/v2/patterns/FormikFile.js.map +1 -0
- package/dist/esm/v2/patterns/FormikInput.js +127 -0
- package/dist/esm/v2/patterns/FormikInput.js.map +1 -0
- package/dist/esm/v2/patterns/FormikReferentielField.js +116 -0
- package/dist/esm/v2/patterns/FormikReferentielField.js.map +1 -0
- package/dist/esm/v2/patterns/FormikSelect.js +159 -0
- package/dist/esm/v2/patterns/FormikSelect.js.map +1 -0
- package/dist/esm/v2/patterns/FormikTextarea.js +76 -0
- package/dist/esm/v2/patterns/FormikTextarea.js.map +1 -0
- package/dist/esm/v2/patterns/KeyboardShortcutsHelp.js +195 -0
- package/dist/esm/v2/patterns/KeyboardShortcutsHelp.js.map +1 -0
- package/dist/esm/v2/patterns/NetworkErrorBanner.js +72 -0
- package/dist/esm/v2/patterns/NetworkErrorBanner.js.map +1 -0
- package/dist/esm/v2/patterns/PageContent.js +62 -0
- package/dist/esm/v2/patterns/PageContent.js.map +1 -0
- package/dist/esm/v2/patterns/ReferentielField.js +615 -0
- package/dist/esm/v2/patterns/ReferentielField.js.map +1 -0
- package/dist/esm/v2/patterns/SaveFilterDialog.js +197 -0
- package/dist/esm/v2/patterns/SaveFilterDialog.js.map +1 -0
- package/dist/esm/v2/patterns/SavedFiltersMenu.js +406 -0
- package/dist/esm/v2/patterns/SavedFiltersMenu.js.map +1 -0
- package/dist/esm/v2/patterns/SkeletonPageShell.js +342 -0
- package/dist/esm/v2/patterns/SkeletonPageShell.js.map +1 -0
- package/dist/esm/v2/patterns/SortableHeader.js +179 -0
- package/dist/esm/v2/patterns/SortableHeader.js.map +1 -0
- package/dist/esm/v2/patterns/Tour.js +471 -0
- package/dist/esm/v2/patterns/Tour.js.map +1 -0
- package/dist/esm/v2/patterns/_dataGridShared.js +431 -0
- package/dist/esm/v2/patterns/_dataGridShared.js.map +1 -0
- package/dist/esm/v2/patterns/_sort.js +112 -0
- package/dist/esm/v2/patterns/_sort.js.map +1 -0
- package/dist/esm/v2/patterns/_useColumnReorder.js +257 -0
- package/dist/esm/v2/patterns/_useColumnReorder.js.map +1 -0
- package/dist/esm/v2/patterns/_useColumnResize.js +191 -0
- package/dist/esm/v2/patterns/_useColumnResize.js.map +1 -0
- package/dist/esm/v2/patterns/index.js +95 -0
- package/dist/esm/v2/patterns/index.js.map +1 -0
- package/dist/esm/v2/personalization/PersonalizationProvider.js +168 -0
- package/dist/esm/v2/personalization/PersonalizationProvider.js.map +1 -0
- package/dist/esm/v2/personalization/adapters/_storageKey.js +60 -0
- package/dist/esm/v2/personalization/adapters/_storageKey.js.map +1 -0
- package/dist/esm/v2/personalization/adapters/createLocalStorageAdapter.js +124 -0
- package/dist/esm/v2/personalization/adapters/createLocalStorageAdapter.js.map +1 -0
- package/dist/esm/v2/personalization/adapters/createMemoryAdapter.js +70 -0
- package/dist/esm/v2/personalization/adapters/createMemoryAdapter.js.map +1 -0
- package/dist/esm/v2/personalization/adapters/index.js +11 -0
- package/dist/esm/v2/personalization/adapters/index.js.map +1 -0
- package/dist/esm/v2/personalization/capabilities/favorites.js +216 -0
- package/dist/esm/v2/personalization/capabilities/favorites.js.map +1 -0
- package/dist/esm/v2/personalization/capabilities/favoritesView.js +111 -0
- package/dist/esm/v2/personalization/capabilities/favoritesView.js.map +1 -0
- package/dist/esm/v2/personalization/capabilities/index.js +17 -0
- package/dist/esm/v2/personalization/capabilities/index.js.map +1 -0
- package/dist/esm/v2/personalization/capabilities/savedFilters.js +291 -0
- package/dist/esm/v2/personalization/capabilities/savedFilters.js.map +1 -0
- package/dist/esm/v2/personalization/createPersonalizationStore.js +472 -0
- package/dist/esm/v2/personalization/createPersonalizationStore.js.map +1 -0
- package/dist/esm/v2/personalization/index.js +46 -0
- package/dist/esm/v2/personalization/index.js.map +1 -0
- package/dist/esm/v2/personalization/personalizationContext.js +108 -0
- package/dist/esm/v2/personalization/personalizationContext.js.map +1 -0
- package/dist/esm/v2/personalization/schema.js +92 -0
- package/dist/esm/v2/personalization/schema.js.map +1 -0
- package/dist/esm/v2/personalization/types.js +2 -0
- package/dist/esm/v2/personalization/types.js.map +1 -0
- package/dist/esm/v2/referentiel/ReferentielProvider.js +87 -0
- package/dist/esm/v2/referentiel/ReferentielProvider.js.map +1 -0
- package/dist/esm/v2/referentiel/index.js +15 -0
- package/dist/esm/v2/referentiel/index.js.map +1 -0
- package/dist/esm/v2/referentiel/useReferentielClient.js +37 -0
- package/dist/esm/v2/referentiel/useReferentielClient.js.map +1 -0
- package/dist/esm/v2/referentiel/useReferentielOptions.js +169 -0
- package/dist/esm/v2/referentiel/useReferentielOptions.js.map +1 -0
- package/dist/esm/v2/referentiel/useReferentielSearch.js +132 -0
- package/dist/esm/v2/referentiel/useReferentielSearch.js.map +1 -0
- package/dist/esm/v2/styles/base.css +425 -0
- package/dist/esm/v2/styles/css.d.ts +10 -0
- package/dist/esm/v2/styles/index.js +12 -0
- package/dist/esm/v2/styles/index.js.map +1 -0
- package/dist/esm/v2/theme/_brand.js +64 -0
- package/dist/esm/v2/theme/_brand.js.map +1 -0
- package/dist/esm/v2/theme/_brandSecondary.js +60 -0
- package/dist/esm/v2/theme/_brandSecondary.js.map +1 -0
- package/dist/esm/v2/theme/createPortnetTheme.js +548 -0
- package/dist/esm/v2/theme/createPortnetTheme.js.map +1 -0
- package/dist/esm/v2/theme/cssVariables.js +198 -0
- package/dist/esm/v2/theme/cssVariables.js.map +1 -0
- package/dist/esm/v2/theme/index.js +32 -0
- package/dist/esm/v2/theme/index.js.map +1 -0
- package/dist/esm/v2/tokens/breakpoints.js +106 -0
- package/dist/esm/v2/tokens/breakpoints.js.map +1 -0
- package/dist/esm/v2/tokens/colors.js +219 -0
- package/dist/esm/v2/tokens/colors.js.map +1 -0
- package/dist/esm/v2/tokens/density.js +98 -0
- package/dist/esm/v2/tokens/density.js.map +1 -0
- package/dist/esm/v2/tokens/index.js +80 -0
- package/dist/esm/v2/tokens/index.js.map +1 -0
- package/dist/esm/v2/tokens/motion.js +88 -0
- package/dist/esm/v2/tokens/motion.js.map +1 -0
- package/dist/esm/v2/tokens/radius.js +22 -0
- package/dist/esm/v2/tokens/radius.js.map +1 -0
- package/dist/esm/v2/tokens/shadows.js +40 -0
- package/dist/esm/v2/tokens/shadows.js.map +1 -0
- package/dist/esm/v2/tokens/spacing.js +51 -0
- package/dist/esm/v2/tokens/spacing.js.map +1 -0
- package/dist/esm/v2/tokens/state.js +41 -0
- package/dist/esm/v2/tokens/state.js.map +1 -0
- package/dist/esm/v2/tokens/statusPalette.js +66 -0
- package/dist/esm/v2/tokens/statusPalette.js.map +1 -0
- package/dist/esm/v2/tokens/tokens.json +153 -0
- package/dist/esm/v2/tokens/typography.js +149 -0
- package/dist/esm/v2/tokens/typography.js.map +1 -0
- package/dist/esm/v2/tokens/zIndex.js +44 -0
- package/dist/esm/v2/tokens/zIndex.js.map +1 -0
- package/dist/esm/v2/types/common.js +2 -0
- package/dist/esm/v2/types/common.js.map +1 -0
- package/dist/esm/v2/types/datagrid.js +2 -0
- package/dist/esm/v2/types/datagrid.js.map +1 -0
- package/dist/esm/v2/types/index.js +12 -0
- package/dist/esm/v2/types/index.js.map +1 -0
- package/dist/esm/v2/utils/apiError.js +281 -0
- package/dist/esm/v2/utils/apiError.js.map +1 -0
- package/dist/esm/v2/utils/contrast.js +157 -0
- package/dist/esm/v2/utils/contrast.js.map +1 -0
- package/dist/esm/v2/utils/cx.js +38 -0
- package/dist/esm/v2/utils/cx.js.map +1 -0
- package/dist/esm/v2/utils/fileDownload.js +226 -0
- package/dist/esm/v2/utils/fileDownload.js.map +1 -0
- package/dist/esm/v2/utils/fmtMoney.js +78 -0
- package/dist/esm/v2/utils/fmtMoney.js.map +1 -0
- package/dist/esm/v2/utils/index.js +43 -0
- package/dist/esm/v2/utils/index.js.map +1 -0
- package/dist/esm/v2/utils/mergeLabels.js +86 -0
- package/dist/esm/v2/utils/mergeLabels.js.map +1 -0
- package/dist/esm/v2/utils/networkStatus.js +114 -0
- package/dist/esm/v2/utils/networkStatus.js.map +1 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +21 -0
- package/dist/index.js.map +1 -1
- package/dist/v2/__tests__/FieldError.test.js +164 -0
- package/dist/v2/__tests__/FieldError.test.js.map +1 -0
- package/dist/v2/__tests__/FileCard.test.js +148 -0
- package/dist/v2/__tests__/FileCard.test.js.map +1 -0
- package/dist/v2/__tests__/SectionErrorBoundary.test.js +237 -0
- package/dist/v2/__tests__/SectionErrorBoundary.test.js.map +1 -0
- package/dist/v2/components/Accordion.d.ts +6 -6
- package/dist/v2/components/Accordion.d.ts.map +1 -1
- package/dist/v2/components/Accordion.js.map +1 -1
- package/dist/v2/components/ActionStrip.d.ts +12 -12
- package/dist/v2/components/ActionStrip.d.ts.map +1 -1
- package/dist/v2/components/ActionStrip.js.map +1 -1
- package/dist/v2/components/Banner.d.ts +48 -9
- package/dist/v2/components/Banner.d.ts.map +1 -1
- package/dist/v2/components/Banner.js +116 -35
- package/dist/v2/components/Banner.js.map +1 -1
- package/dist/v2/components/Busy.d.ts +3 -3
- package/dist/v2/components/Busy.d.ts.map +1 -1
- package/dist/v2/components/Busy.js.map +1 -1
- package/dist/v2/components/Button.d.ts +6 -6
- package/dist/v2/components/Button.d.ts.map +1 -1
- package/dist/v2/components/Button.js.map +1 -1
- package/dist/v2/components/CategoryTag.d.ts +3 -3
- package/dist/v2/components/CategoryTag.d.ts.map +1 -1
- package/dist/v2/components/CategoryTag.js.map +1 -1
- package/dist/v2/components/Checkbox.d.ts +11 -11
- package/dist/v2/components/Checkbox.d.ts.map +1 -1
- package/dist/v2/components/Checkbox.js.map +1 -1
- package/dist/v2/components/Chip.d.ts +8 -8
- package/dist/v2/components/Chip.d.ts.map +1 -1
- package/dist/v2/components/Chip.js +2 -1
- package/dist/v2/components/Chip.js.map +1 -1
- package/dist/v2/components/Combobox.d.ts +27 -27
- package/dist/v2/components/Combobox.d.ts.map +1 -1
- package/dist/v2/components/Combobox.js +3 -2
- package/dist/v2/components/Combobox.js.map +1 -1
- package/dist/v2/components/CommandPalette.d.ts +20 -20
- package/dist/v2/components/CommandPalette.d.ts.map +1 -1
- package/dist/v2/components/CommandPalette.js +2 -6
- package/dist/v2/components/CommandPalette.js.map +1 -1
- package/dist/v2/components/ConfirmDialog.d.ts +13 -13
- package/dist/v2/components/ConfirmDialog.d.ts.map +1 -1
- package/dist/v2/components/ConfirmDialog.js +2 -1
- package/dist/v2/components/ConfirmDialog.js.map +1 -1
- package/dist/v2/components/DatePicker.d.ts +11 -11
- package/dist/v2/components/DatePicker.d.ts.map +1 -1
- package/dist/v2/components/DatePicker.js.map +1 -1
- package/dist/v2/components/DateRangePicker.d.ts +16 -16
- package/dist/v2/components/DateRangePicker.d.ts.map +1 -1
- package/dist/v2/components/DateRangePicker.js +2 -1
- package/dist/v2/components/DateRangePicker.js.map +1 -1
- package/dist/v2/components/DateTimePicker.d.ts +11 -11
- package/dist/v2/components/DateTimePicker.d.ts.map +1 -1
- package/dist/v2/components/DateTimePicker.js.map +1 -1
- package/dist/v2/components/Drawer.d.ts +18 -18
- package/dist/v2/components/Drawer.d.ts.map +1 -1
- package/dist/v2/components/Drawer.js +2 -1
- package/dist/v2/components/Drawer.js.map +1 -1
- package/dist/v2/components/Dropzone.d.ts +34 -34
- package/dist/v2/components/Dropzone.d.ts.map +1 -1
- package/dist/v2/components/Dropzone.js +11 -3
- package/dist/v2/components/Dropzone.js.map +1 -1
- package/dist/v2/components/EmptyState.d.ts +7 -7
- package/dist/v2/components/EmptyState.d.ts.map +1 -1
- package/dist/v2/components/EmptyState.js.map +1 -1
- package/dist/v2/components/FavoriteToggle.d.ts +7 -7
- package/dist/v2/components/FavoriteToggle.d.ts.map +1 -1
- package/dist/v2/components/FavoriteToggle.js +2 -1
- package/dist/v2/components/FavoriteToggle.js.map +1 -1
- package/dist/v2/components/Field.d.ts +17 -12
- package/dist/v2/components/Field.d.ts.map +1 -1
- package/dist/v2/components/Field.js +25 -7
- package/dist/v2/components/Field.js.map +1 -1
- package/dist/v2/components/FieldError.d.ts +78 -0
- package/dist/v2/components/FieldError.d.ts.map +1 -0
- package/dist/v2/components/FieldError.js +131 -0
- package/dist/v2/components/FieldError.js.map +1 -0
- package/dist/v2/components/FieldHelp.d.ts +7 -7
- package/dist/v2/components/FieldHelp.d.ts.map +1 -1
- package/dist/v2/components/FieldHelp.js.map +1 -1
- package/dist/v2/components/FileCard.d.ts +75 -0
- package/dist/v2/components/FileCard.d.ts.map +1 -0
- package/dist/v2/components/FileCard.js +169 -0
- package/dist/v2/components/FileCard.js.map +1 -0
- package/dist/v2/components/FilterTab.d.ts +9 -9
- package/dist/v2/components/FilterTab.d.ts.map +1 -1
- package/dist/v2/components/FilterTab.js +2 -1
- package/dist/v2/components/FilterTab.js.map +1 -1
- package/dist/v2/components/FormGrid.d.ts +9 -4
- package/dist/v2/components/FormGrid.d.ts.map +1 -1
- package/dist/v2/components/FormGrid.js +11 -1
- package/dist/v2/components/FormGrid.js.map +1 -1
- package/dist/v2/components/FormikDisplay.d.ts +6 -6
- package/dist/v2/components/FormikDisplay.d.ts.map +1 -1
- package/dist/v2/components/FormikDisplay.js.map +1 -1
- package/dist/v2/components/Input.d.ts +6 -6
- package/dist/v2/components/Input.d.ts.map +1 -1
- package/dist/v2/components/Input.js.map +1 -1
- package/dist/v2/components/KPICard.d.ts +43 -13
- package/dist/v2/components/KPICard.d.ts.map +1 -1
- package/dist/v2/components/KPICard.js +53 -14
- package/dist/v2/components/KPICard.js.map +1 -1
- package/dist/v2/components/KPIStrip.d.ts +68 -0
- package/dist/v2/components/KPIStrip.d.ts.map +1 -0
- package/dist/v2/components/KPIStrip.js +92 -0
- package/dist/v2/components/KPIStrip.js.map +1 -0
- package/dist/v2/components/KV.d.ts +3 -3
- package/dist/v2/components/KV.d.ts.map +1 -1
- package/dist/v2/components/KV.js.map +1 -1
- package/dist/v2/components/KVGrid.d.ts +2 -2
- package/dist/v2/components/KVGrid.d.ts.map +1 -1
- package/dist/v2/components/KVGrid.js +8 -1
- package/dist/v2/components/KVGrid.js.map +1 -1
- package/dist/v2/components/Layout.d.ts +7 -7
- package/dist/v2/components/Layout.d.ts.map +1 -1
- package/dist/v2/components/Layout.js.map +1 -1
- package/dist/v2/components/MobileRowCard.d.ts +13 -13
- package/dist/v2/components/MobileRowCard.d.ts.map +1 -1
- package/dist/v2/components/MobileRowCard.js.map +1 -1
- package/dist/v2/components/Modal.d.ts +12 -12
- package/dist/v2/components/Modal.d.ts.map +1 -1
- package/dist/v2/components/Modal.js.map +1 -1
- package/dist/v2/components/NetworkErrorPage.d.ts +1 -1
- package/dist/v2/components/NetworkErrorPage.d.ts.map +1 -1
- package/dist/v2/components/NetworkErrorPage.js.map +1 -1
- package/dist/v2/components/NumberInput.d.ts +14 -14
- package/dist/v2/components/NumberInput.d.ts.map +1 -1
- package/dist/v2/components/NumberInput.js +7 -6
- package/dist/v2/components/NumberInput.js.map +1 -1
- package/dist/v2/components/OverflowMenu.d.ts +14 -14
- package/dist/v2/components/OverflowMenu.d.ts.map +1 -1
- package/dist/v2/components/OverflowMenu.js +4 -8
- package/dist/v2/components/OverflowMenu.js.map +1 -1
- package/dist/v2/components/PdfViewer.d.ts +9 -9
- package/dist/v2/components/PdfViewer.d.ts.map +1 -1
- package/dist/v2/components/PdfViewer.js.map +1 -1
- package/dist/v2/components/ProgressBar.d.ts +10 -10
- package/dist/v2/components/ProgressBar.d.ts.map +1 -1
- package/dist/v2/components/ProgressBar.js.map +1 -1
- package/dist/v2/components/Radio.d.ts +7 -7
- package/dist/v2/components/Radio.d.ts.map +1 -1
- package/dist/v2/components/Radio.js.map +1 -1
- package/dist/v2/components/SectionErrorBoundary.d.ts +89 -0
- package/dist/v2/components/SectionErrorBoundary.d.ts.map +1 -0
- package/dist/v2/components/SectionErrorBoundary.js +221 -0
- package/dist/v2/components/SectionErrorBoundary.js.map +1 -0
- package/dist/v2/components/SectionHeader.d.ts +5 -5
- package/dist/v2/components/SectionHeader.d.ts.map +1 -1
- package/dist/v2/components/SectionHeader.js.map +1 -1
- package/dist/v2/components/Segmented.d.ts +11 -11
- package/dist/v2/components/Segmented.d.ts.map +1 -1
- package/dist/v2/components/Segmented.js.map +1 -1
- package/dist/v2/components/Select.d.ts +33 -15
- package/dist/v2/components/Select.d.ts.map +1 -1
- package/dist/v2/components/Select.js +147 -30
- package/dist/v2/components/Select.js.map +1 -1
- package/dist/v2/components/ServerErrorPage.d.ts +1 -1
- package/dist/v2/components/ServerErrorPage.d.ts.map +1 -1
- package/dist/v2/components/ServerErrorPage.js.map +1 -1
- package/dist/v2/components/Skeleton.d.ts +15 -15
- package/dist/v2/components/Skeleton.d.ts.map +1 -1
- package/dist/v2/components/Skeleton.js.map +1 -1
- package/dist/v2/components/SkipLink.d.ts +2 -2
- package/dist/v2/components/SkipLink.d.ts.map +1 -1
- package/dist/v2/components/SkipLink.js.map +1 -1
- package/dist/v2/components/Status.d.ts +3 -3
- package/dist/v2/components/Status.d.ts.map +1 -1
- package/dist/v2/components/Status.js.map +1 -1
- package/dist/v2/components/Stepper.d.ts +28 -22
- package/dist/v2/components/Stepper.d.ts.map +1 -1
- package/dist/v2/components/Stepper.js +31 -5
- package/dist/v2/components/Stepper.js.map +1 -1
- package/dist/v2/components/Surface.d.ts +94 -0
- package/dist/v2/components/Surface.d.ts.map +1 -0
- package/dist/v2/components/Surface.js +163 -0
- package/dist/v2/components/Surface.js.map +1 -0
- package/dist/v2/components/Switch.d.ts +4 -4
- package/dist/v2/components/Switch.d.ts.map +1 -1
- package/dist/v2/components/Switch.js.map +1 -1
- package/dist/v2/components/Tabs.d.ts +6 -6
- package/dist/v2/components/Tabs.d.ts.map +1 -1
- package/dist/v2/components/Tabs.js.map +1 -1
- package/dist/v2/components/TelInput.d.ts +8 -8
- package/dist/v2/components/TelInput.d.ts.map +1 -1
- package/dist/v2/components/TelInput.js +18 -18
- package/dist/v2/components/TelInput.js.map +1 -1
- package/dist/v2/components/Textarea.d.ts +1 -1
- package/dist/v2/components/Textarea.d.ts.map +1 -1
- package/dist/v2/components/Textarea.js.map +1 -1
- package/dist/v2/components/TimePicker.d.ts +11 -11
- package/dist/v2/components/TimePicker.d.ts.map +1 -1
- package/dist/v2/components/TimePicker.js.map +1 -1
- package/dist/v2/components/Toast.d.ts +6 -6
- package/dist/v2/components/Toast.d.ts.map +1 -1
- package/dist/v2/components/Toast.js +9 -8
- package/dist/v2/components/Toast.js.map +1 -1
- package/dist/v2/components/Tooltip.d.ts +1 -1
- package/dist/v2/components/Tooltip.d.ts.map +1 -1
- package/dist/v2/components/Tooltip.js.map +1 -1
- package/dist/v2/components/index.d.ts +143 -0
- package/dist/v2/components/index.d.ts.map +1 -1
- package/dist/v2/components/index.js +35 -0
- package/dist/v2/components/index.js.map +1 -1
- package/dist/v2/models/favorite.d.ts +1 -1
- package/dist/v2/models/favorite.d.ts.map +1 -1
- package/dist/v2/models/favorite.js.map +1 -1
- package/dist/v2/models/personalization.d.ts +13 -13
- 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 +11 -11
- 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 -8
- package/dist/v2/models/savedFilter.d.ts.map +1 -1
- package/dist/v2/models/savedFilter.js.map +1 -1
- package/dist/v2/patterns/ActionBar.d.ts +33 -33
- package/dist/v2/patterns/ActionBar.d.ts.map +1 -1
- package/dist/v2/patterns/ActionBar.js +2 -1
- package/dist/v2/patterns/ActionBar.js.map +1 -1
- package/dist/v2/patterns/BulkActionBar.d.ts +12 -12
- package/dist/v2/patterns/BulkActionBar.d.ts.map +1 -1
- package/dist/v2/patterns/BulkActionBar.js +2 -1
- package/dist/v2/patterns/BulkActionBar.js.map +1 -1
- package/dist/v2/patterns/CollapsibleDataGrid.d.ts +15 -15
- package/dist/v2/patterns/CollapsibleDataGrid.d.ts.map +1 -1
- package/dist/v2/patterns/CollapsibleDataGrid.js.map +1 -1
- package/dist/v2/patterns/ColumnsToggle.d.ts +7 -7
- package/dist/v2/patterns/ColumnsToggle.d.ts.map +1 -1
- package/dist/v2/patterns/ColumnsToggle.js +4 -8
- package/dist/v2/patterns/ColumnsToggle.js.map +1 -1
- package/dist/v2/patterns/DataGridSettingsMenu.d.ts +12 -12
- package/dist/v2/patterns/DataGridSettingsMenu.d.ts.map +1 -1
- package/dist/v2/patterns/DataGridSettingsMenu.js +9 -8
- package/dist/v2/patterns/DataGridSettingsMenu.js.map +1 -1
- package/dist/v2/patterns/DataGridToolbar.d.ts +40 -40
- package/dist/v2/patterns/DataGridToolbar.d.ts.map +1 -1
- package/dist/v2/patterns/DataGridToolbar.js +2 -1
- package/dist/v2/patterns/DataGridToolbar.js.map +1 -1
- package/dist/v2/patterns/DataGridVirtualized.d.ts +27 -27
- package/dist/v2/patterns/DataGridVirtualized.d.ts.map +1 -1
- package/dist/v2/patterns/DataGridVirtualized.js.map +1 -1
- package/dist/v2/patterns/DeleteResourceConfirmDialog.d.ts +5 -5
- package/dist/v2/patterns/DeleteResourceConfirmDialog.d.ts.map +1 -1
- package/dist/v2/patterns/DeleteResourceConfirmDialog.js.map +1 -1
- package/dist/v2/patterns/FavoriteColumn.d.ts +6 -6
- package/dist/v2/patterns/FavoriteColumn.d.ts.map +1 -1
- package/dist/v2/patterns/FavoriteColumn.js.map +1 -1
- package/dist/v2/patterns/FavoritesFilter.d.ts +10 -10
- package/dist/v2/patterns/FavoritesFilter.d.ts.map +1 -1
- package/dist/v2/patterns/FavoritesFilter.js +2 -1
- package/dist/v2/patterns/FavoritesFilter.js.map +1 -1
- package/dist/v2/patterns/FormErrorSummary.d.ts +4 -4
- package/dist/v2/patterns/FormErrorSummary.d.ts.map +1 -1
- package/dist/v2/patterns/FormErrorSummary.js.map +1 -1
- package/dist/v2/patterns/FormPageShell.d.ts +4 -4
- package/dist/v2/patterns/FormPageShell.d.ts.map +1 -1
- package/dist/v2/patterns/FormPageShell.js.map +1 -1
- package/dist/v2/patterns/FormSection.d.ts +19 -8
- package/dist/v2/patterns/FormSection.d.ts.map +1 -1
- package/dist/v2/patterns/FormSection.js +106 -71
- package/dist/v2/patterns/FormSection.js.map +1 -1
- package/dist/v2/patterns/FormikCheckboxGroup.d.ts +6 -6
- package/dist/v2/patterns/FormikCheckboxGroup.d.ts.map +1 -1
- package/dist/v2/patterns/FormikCheckboxGroup.js.map +1 -1
- package/dist/v2/patterns/FormikCombobox.d.ts +11 -11
- package/dist/v2/patterns/FormikCombobox.d.ts.map +1 -1
- package/dist/v2/patterns/FormikCombobox.js.map +1 -1
- package/dist/v2/patterns/FormikDatePicker.d.ts +36 -8
- package/dist/v2/patterns/FormikDatePicker.d.ts.map +1 -1
- package/dist/v2/patterns/FormikDatePicker.js +27 -1
- package/dist/v2/patterns/FormikDatePicker.js.map +1 -1
- package/dist/v2/patterns/FormikErrorFocus.d.ts +3 -3
- package/dist/v2/patterns/FormikErrorFocus.d.ts.map +1 -1
- package/dist/v2/patterns/FormikErrorFocus.js.map +1 -1
- package/dist/v2/patterns/FormikFile.d.ts +8 -8
- package/dist/v2/patterns/FormikFile.d.ts.map +1 -1
- package/dist/v2/patterns/FormikFile.js.map +1 -1
- package/dist/v2/patterns/FormikInput.d.ts +41 -6
- package/dist/v2/patterns/FormikInput.d.ts.map +1 -1
- package/dist/v2/patterns/FormikInput.js +49 -1
- package/dist/v2/patterns/FormikInput.js.map +1 -1
- package/dist/v2/patterns/FormikReferentielField.d.ts +8 -8
- package/dist/v2/patterns/FormikReferentielField.d.ts.map +1 -1
- package/dist/v2/patterns/FormikReferentielField.js.map +1 -1
- package/dist/v2/patterns/FormikSelect.d.ts +33 -12
- package/dist/v2/patterns/FormikSelect.d.ts.map +1 -1
- package/dist/v2/patterns/FormikSelect.js +28 -2
- package/dist/v2/patterns/FormikSelect.js.map +1 -1
- package/dist/v2/patterns/FormikTextarea.d.ts +5 -5
- package/dist/v2/patterns/FormikTextarea.d.ts.map +1 -1
- package/dist/v2/patterns/FormikTextarea.js.map +1 -1
- package/dist/v2/patterns/KeyboardShortcutsHelp.d.ts +7 -7
- package/dist/v2/patterns/KeyboardShortcutsHelp.d.ts.map +1 -1
- package/dist/v2/patterns/KeyboardShortcutsHelp.js +2 -6
- package/dist/v2/patterns/KeyboardShortcutsHelp.js.map +1 -1
- package/dist/v2/patterns/NetworkErrorBanner.d.ts +4 -4
- package/dist/v2/patterns/NetworkErrorBanner.d.ts.map +1 -1
- package/dist/v2/patterns/NetworkErrorBanner.js.map +1 -1
- package/dist/v2/patterns/PageContent.d.ts +3 -3
- package/dist/v2/patterns/PageContent.d.ts.map +1 -1
- package/dist/v2/patterns/PageContent.js.map +1 -1
- package/dist/v2/patterns/ReferentielField.d.ts +49 -49
- package/dist/v2/patterns/ReferentielField.d.ts.map +1 -1
- package/dist/v2/patterns/ReferentielField.js +2 -1
- package/dist/v2/patterns/ReferentielField.js.map +1 -1
- package/dist/v2/patterns/SaveFilterDialog.d.ts +10 -10
- package/dist/v2/patterns/SaveFilterDialog.d.ts.map +1 -1
- package/dist/v2/patterns/SaveFilterDialog.js +9 -8
- package/dist/v2/patterns/SaveFilterDialog.js.map +1 -1
- package/dist/v2/patterns/SavedFiltersMenu.d.ts +7 -7
- package/dist/v2/patterns/SavedFiltersMenu.d.ts.map +1 -1
- package/dist/v2/patterns/SavedFiltersMenu.js +9 -8
- package/dist/v2/patterns/SavedFiltersMenu.js.map +1 -1
- package/dist/v2/patterns/SkeletonPageShell.d.ts +7 -7
- package/dist/v2/patterns/SkeletonPageShell.d.ts.map +1 -1
- package/dist/v2/patterns/SkeletonPageShell.js.map +1 -1
- package/dist/v2/patterns/SortableHeader.d.ts +1 -1
- package/dist/v2/patterns/SortableHeader.d.ts.map +1 -1
- package/dist/v2/patterns/SortableHeader.js.map +1 -1
- package/dist/v2/patterns/Tour.d.ts +12 -12
- package/dist/v2/patterns/Tour.d.ts.map +1 -1
- package/dist/v2/patterns/Tour.js +9 -8
- package/dist/v2/patterns/Tour.js.map +1 -1
- package/dist/v2/patterns/_dataGridShared.d.ts +25 -6
- package/dist/v2/patterns/_dataGridShared.d.ts.map +1 -1
- package/dist/v2/patterns/_dataGridShared.js +37 -3
- package/dist/v2/patterns/_dataGridShared.js.map +1 -1
- package/dist/v2/patterns/_useColumnReorder.d.ts +1 -1
- package/dist/v2/patterns/_useColumnReorder.d.ts.map +1 -1
- package/dist/v2/patterns/_useColumnReorder.js.map +1 -1
- package/dist/v2/patterns/_useColumnResize.d.ts +1 -1
- package/dist/v2/patterns/_useColumnResize.d.ts.map +1 -1
- package/dist/v2/patterns/_useColumnResize.js.map +1 -1
- package/dist/v2/patterns/index.d.ts +27 -0
- package/dist/v2/patterns/index.d.ts.map +1 -1
- package/dist/v2/patterns/index.js.map +1 -1
- package/dist/v2/personalization/PersonalizationProvider.d.ts +9 -9
- package/dist/v2/personalization/PersonalizationProvider.d.ts.map +1 -1
- package/dist/v2/personalization/PersonalizationProvider.js.map +1 -1
- package/dist/v2/personalization/adapters/createLocalStorageAdapter.d.ts +1 -1
- package/dist/v2/personalization/adapters/createLocalStorageAdapter.d.ts.map +1 -1
- package/dist/v2/personalization/adapters/createLocalStorageAdapter.js.map +1 -1
- package/dist/v2/personalization/adapters/createMemoryAdapter.d.ts +1 -1
- package/dist/v2/personalization/adapters/createMemoryAdapter.d.ts.map +1 -1
- package/dist/v2/personalization/adapters/createMemoryAdapter.js.map +1 -1
- package/dist/v2/personalization/capabilities/favoritesView.d.ts +3 -3
- package/dist/v2/personalization/capabilities/favoritesView.d.ts.map +1 -1
- package/dist/v2/personalization/capabilities/favoritesView.js.map +1 -1
- package/dist/v2/personalization/capabilities/savedFilters.d.ts +3 -3
- package/dist/v2/personalization/capabilities/savedFilters.d.ts.map +1 -1
- package/dist/v2/personalization/capabilities/savedFilters.js.map +1 -1
- package/dist/v2/personalization/createPersonalizationStore.d.ts +8 -8
- package/dist/v2/personalization/createPersonalizationStore.d.ts.map +1 -1
- package/dist/v2/personalization/createPersonalizationStore.js.map +1 -1
- package/dist/v2/personalization/schema.d.ts +2 -2
- package/dist/v2/personalization/schema.d.ts.map +1 -1
- package/dist/v2/personalization/schema.js.map +1 -1
- package/dist/v2/personalization/types.d.ts +19 -19
- package/dist/v2/personalization/types.d.ts.map +1 -1
- package/dist/v2/personalization/types.js.map +1 -1
- package/dist/v2/referentiel/ReferentielProvider.d.ts +4 -4
- package/dist/v2/referentiel/ReferentielProvider.d.ts.map +1 -1
- package/dist/v2/referentiel/ReferentielProvider.js.map +1 -1
- package/dist/v2/referentiel/useReferentielOptions.d.ts +4 -4
- package/dist/v2/referentiel/useReferentielOptions.d.ts.map +1 -1
- package/dist/v2/referentiel/useReferentielOptions.js.map +1 -1
- package/dist/v2/referentiel/useReferentielSearch.d.ts +3 -3
- package/dist/v2/referentiel/useReferentielSearch.d.ts.map +1 -1
- package/dist/v2/referentiel/useReferentielSearch.js.map +1 -1
- package/dist/v2/theme/createPortnetTheme.d.ts +32 -7
- package/dist/v2/theme/createPortnetTheme.d.ts.map +1 -1
- package/dist/v2/theme/createPortnetTheme.js +25 -1
- package/dist/v2/theme/createPortnetTheme.js.map +1 -1
- package/dist/v2/types/datagrid.d.ts +59 -59
- package/dist/v2/types/datagrid.d.ts.map +1 -1
- package/dist/v2/types/datagrid.js.map +1 -1
- package/dist/v2/utils/apiError.d.ts +65 -4
- package/dist/v2/utils/apiError.d.ts.map +1 -1
- package/dist/v2/utils/apiError.js +69 -6
- package/dist/v2/utils/apiError.js.map +1 -1
- package/dist/v2/utils/index.d.ts +1 -0
- package/dist/v2/utils/index.d.ts.map +1 -1
- package/dist/v2/utils/index.js +7 -0
- package/dist/v2/utils/index.js.map +1 -1
- package/dist/v2/utils/mergeLabels.d.ts +59 -0
- package/dist/v2/utils/mergeLabels.d.ts.map +1 -0
- package/dist/v2/utils/mergeLabels.js +93 -0
- package/dist/v2/utils/mergeLabels.js.map +1 -0
- package/package.json +23 -15
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
2
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
4
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
5
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
6
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
7
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
8
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
9
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) { ; } } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
10
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
11
|
+
/**
|
|
12
|
+
* CSS Variables emitter — Portnet UI v2
|
|
13
|
+
*
|
|
14
|
+
* Generates a CSS string declaring all tokens as :root variables.
|
|
15
|
+
* Mount once at app boot via:
|
|
16
|
+
*
|
|
17
|
+
* import { injectCssVariables } from "@portnet/ui/v2/theme";
|
|
18
|
+
* injectCssVariables();
|
|
19
|
+
*
|
|
20
|
+
* Or render `getCssVariables()` inside a `<style>` tag if SSR'd.
|
|
21
|
+
*
|
|
22
|
+
* Brand override (host-level theming):
|
|
23
|
+
*
|
|
24
|
+
* injectCssVariables({
|
|
25
|
+
* brand: { accent: "#2962FF" },
|
|
26
|
+
* brandSecondary: { secondary: "#4FB8CF" },
|
|
27
|
+
* });
|
|
28
|
+
* // Or via the unified theme factory (see createPortnetTheme):
|
|
29
|
+
* // createPortnetTheme({ brand: {...}, brandSecondary: {...} })
|
|
30
|
+
*
|
|
31
|
+
* Override is deep-merged onto the default brand / brandSecondary:
|
|
32
|
+
* any field you omit falls back to the token default. Use the SAME
|
|
33
|
+
* override objects when calling createPortnetTheme so the MUI
|
|
34
|
+
* palette and CSS variables stay in sync — both layers consume the
|
|
35
|
+
* same resolvers (./_brand, ./_brandSecondary) so mismatches are
|
|
36
|
+
* structurally impossible.
|
|
37
|
+
*/
|
|
38
|
+
import { ink, surface, border, semantic, status, dark, fontFamily, fontSize, fontWeight, lineHeight, letterSpacing, spacing, radius, shadows, duration, easing, zIndex, density, layout, breakpoints, state } from "../tokens";
|
|
39
|
+
import { resolveBrand } from "./_brand";
|
|
40
|
+
import { resolveBrandSecondary } from "./_brandSecondary";
|
|
41
|
+
|
|
42
|
+
/** Options for the CSS-variable emitter / injector. */
|
|
43
|
+
|
|
44
|
+
var STYLE_TAG_ID = "portnet-ui-v2-tokens";
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Spacing partition: numeric grid keys (s1..s10) vs semantic aliases
|
|
48
|
+
* (xs/sm/md/lg/xl/xxl). Two output namespaces so the alias names
|
|
49
|
+
* cannot collide with the grid (s-N) and cannot pollute the global
|
|
50
|
+
* variable namespace by emitting unprefixed --md / --lg / --xl.
|
|
51
|
+
*
|
|
52
|
+
* Uses Object.entries at module-load time — pure / no side-effects.
|
|
53
|
+
*/
|
|
54
|
+
var NUMERIC_GRID_RE = /^s\d+$/;
|
|
55
|
+
var SPACING_ENTRIES = Object.entries(spacing);
|
|
56
|
+
var NUMERIC_ENTRIES = SPACING_ENTRIES.filter(function (_ref) {
|
|
57
|
+
var _ref2 = _slicedToArray(_ref, 1),
|
|
58
|
+
k = _ref2[0];
|
|
59
|
+
return NUMERIC_GRID_RE.test(k);
|
|
60
|
+
});
|
|
61
|
+
var ALIAS_ENTRIES = SPACING_ENTRIES.filter(function (_ref3) {
|
|
62
|
+
var _ref4 = _slicedToArray(_ref3, 1),
|
|
63
|
+
k = _ref4[0];
|
|
64
|
+
return !NUMERIC_GRID_RE.test(k);
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Emits the canonical :root block + sidebar / density / dark-mode overrides.
|
|
69
|
+
* Pass a partial `brand` / `brandSecondary` to mirror a host theme override
|
|
70
|
+
* (use the SAME object you pass to createPortnetTheme so the two layers agree).
|
|
71
|
+
*/
|
|
72
|
+
export function getCssVariables() {
|
|
73
|
+
var _radius$none;
|
|
74
|
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
75
|
+
var brand = resolveBrand(options.brand);
|
|
76
|
+
var brandSecondary = resolveBrandSecondary(options.brandSecondary);
|
|
77
|
+
var lightVars = ["/* \u2500\u2500 Brand \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */", "--accent: ".concat(brand.accent, ";"), "--accent-hover: ".concat(brand.accentHover, ";"), "--accent-soft: ".concat(brand.accentSoft, ";"), "--accent-fg: ".concat(brand.accentFg, ";"), "", "/* \u2500\u2500 Brand secondary \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */", "--secondary: ".concat(brandSecondary.secondary, ";"), "--secondary-fg: ".concat(brandSecondary.secondaryFg, ";"), "", "/* \u2500\u2500 Ink \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */", "--fg: ".concat(ink.fg, ";"), "--fg-muted: ".concat(ink.fgMuted, ";"), "--fg-subtle: ".concat(ink.fgSubtle, ";"), "--fg-inverse: ".concat(ink.fgInverse, ";"), "", "/* \u2500\u2500 Surface \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */", "--bg: ".concat(surface.bg, ";"), "--bg-elev: ".concat(surface.bgElev, ";"), "--bg-subtle: ".concat(surface.bgSubtle, ";"), "--bg-hover: ".concat(surface.bgHover, ";"), "--surface: ".concat(surface.surface, ";"), "", "/* \u2500\u2500 Border \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */", "--border: ".concat(border.border, ";"), "--border-strong: ".concat(border.borderStrong, ";"), "", "/* \u2500\u2500 Semantic \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */", "/* Each concept has a saturated fill (--<name>) and a darker text */", "/* foreground (--<name>-fg). Pair fills with text on the same surface. */", "--success: ".concat(semantic.success, ";"), "--success-soft: ".concat(semantic.successSoft, ";"), "--success-fg: ".concat(semantic.successFg, ";"), "--warning: ".concat(semantic.warning, ";"), "--warning-soft: ".concat(semantic.warningSoft, ";"), "--warning-fg: ".concat(semantic.warningFg, ";"), "--danger: ".concat(semantic.danger, ";"), "--danger-soft: ".concat(semantic.dangerSoft, ";"), "--danger-fg: ".concat(semantic.dangerFg, ";"), "--info: ".concat(semantic.info, ";"), "--info-soft: ".concat(semantic.infoSoft, ";"), "--info-fg: ".concat(semantic.infoFg, ";"), "", "/* \u2500\u2500 Status palette \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */", "--status-new-soft: ".concat(status["new"].soft, ";"), "--status-new-fg: ".concat(status["new"].fg, ";"), "--status-sent-soft: ".concat(status.sent.soft, ";"), "--status-sent-fg: ".concat(status.sent.fg, ";"), "--status-pending-soft: ".concat(status.pending.soft, ";"), "--status-pending-fg: ".concat(status.pending.fg, ";"), "--status-approved-soft: ".concat(status.approved.soft, ";"), "--status-approved-fg: ".concat(status.approved.fg, ";"), "--status-rejected-soft: ".concat(status.rejected.soft, ";"), "--status-rejected-fg: ".concat(status.rejected.fg, ";"), "--status-neutral-soft: ".concat(status.neutral.soft, ";"), "--status-neutral-fg: ".concat(status.neutral.fg, ";"), "", "/* \u2500\u2500 State overlays (B2 \u2014 currentColor-based) \u2500\u2500\u2500 */", "--state-hover-overlay: ".concat(state.hoverOverlay, ";"), "--state-pressed-overlay: ".concat(state.pressedOverlay, ";"), "--state-selected-overlay: ".concat(state.selectedOverlay, ";"), "", "/* \u2500\u2500 Typography \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */", "--font-sans: ".concat(fontFamily.sans, ";"), "--font-mono: ".concat(fontFamily.mono, ";"), "--text-display: ".concat(fontSize.display, "px;"), "--text-h2: ".concat(fontSize.h2, "px;"), "--text-h3: ".concat(fontSize.h3, "px;"), "--text-h4: ".concat(fontSize.h4, "px;"), "--text-body: ".concat(fontSize.body, "px;"), "--text-sm: ".concat(fontSize.sm, "px;"), "--text-xs: ".concat(fontSize.xs, "px;"), "--fw-regular: ".concat(fontWeight.regular, ";"), "--fw-medium: ".concat(fontWeight.medium, ";"), "--fw-semibold: ".concat(fontWeight.semibold, ";"), "--fw-bold: ".concat(fontWeight.bold, ";"), // NOTE: there is deliberately no heavier weight than bold (700). Batch 1
|
|
78
|
+
// dropped the black weight from the typography tokens, and this file kept
|
|
79
|
+
// emitting the matching variable for a while — resolving to the literal
|
|
80
|
+
// string "undefined" in :root, which silently flattened every consumer that
|
|
81
|
+
// referenced it. The dev-only check at the end of this function exists
|
|
82
|
+
// because of that incident.
|
|
83
|
+
//
|
|
84
|
+
// The old variable name is deliberately not written out: banned-patterns
|
|
85
|
+
// scans raw file text with no comment awareness, so naming it here — even to
|
|
86
|
+
// record its removal — trips the rule that protects this block.
|
|
87
|
+
"--lh-tight: ".concat(lineHeight.tight, ";"), "--lh-snug: ".concat(lineHeight.snug, ";"), "--lh-normal: ".concat(lineHeight.normal, ";"), "--lh-loose: ".concat(lineHeight.loose, ";"), // A7-02 — letter-spacing scale. Six token names were referenced fleet-wide
|
|
88
|
+
// that this emitter never emitted, so their var() fallbacks were the only
|
|
89
|
+
// thing that ever rendered (R-2.3 / R-AI.1 magic values wearing a token's
|
|
90
|
+
// name). These two had a real platform basis — -0.01em was hardcoded twice
|
|
91
|
+
// in tokens/typography.ts itself, 0.04em inside KV and ConfirmDialog — so
|
|
92
|
+
// they are promoted. `--border-subtle`, `--r-xs`, `--icon-sm`, `--icon-xl`
|
|
93
|
+
// were local inventions and are fixed at their call sites instead.
|
|
94
|
+
"--ls-tight: ".concat(letterSpacing.tight, ";"), "--ls-normal: ".concat(letterSpacing.normal, ";"), "--ls-wide: ".concat(letterSpacing.wide, ";"), "", "/* \u2500\u2500 Spacing \u2014 numeric grid (8 px base) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */"].concat(_toConsumableArray(NUMERIC_ENTRIES.map(function (_ref5) {
|
|
95
|
+
var _ref6 = _slicedToArray(_ref5, 2),
|
|
96
|
+
k = _ref6[0],
|
|
97
|
+
v = _ref6[1];
|
|
98
|
+
return "--s-".concat(k.slice(1), ": ").concat(v, "px;");
|
|
99
|
+
})), ["", "/* \u2500\u2500 Spacing \u2014 semantic aliases \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */"], _toConsumableArray(ALIAS_ENTRIES.map(function (_ref7) {
|
|
100
|
+
var _ref8 = _slicedToArray(_ref7, 2),
|
|
101
|
+
k = _ref8[0],
|
|
102
|
+
v = _ref8[1];
|
|
103
|
+
return "--space-".concat(k, ": ").concat(v, "px;");
|
|
104
|
+
})), ["", "/* \u2500\u2500 Radius \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */", "--r-none: ".concat((_radius$none = radius.none) !== null && _radius$none !== void 0 ? _radius$none : 0, "px;"), "--r-sm: ".concat(radius.sm, "px;"), "--r-md: ".concat(radius.md, "px;"), "--r-lg: ".concat(radius.lg, "px;"), "--r-xl: ".concat(radius.xl, "px;"), "--r-full: ".concat(radius.full, "px;"), "", "/* \u2500\u2500 Shadows \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */", "--shadow-xs: ".concat(shadows.xs, ";"), "--shadow-sm: ".concat(shadows.sm, ";"), "--shadow-md: ".concat(shadows.md, ";"), "--shadow-lg: ".concat(shadows.lg, ";"), "--shadow-focus: ".concat(shadows.focus, ";")], _toConsumableArray(shadows.focusFallback ? ["--shadow-focus-fallback: ".concat(shadows.focusFallback, ";")] : []), ["", "/* \u2500\u2500 Motion (temporal vocabulary) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */", "--duration-fast: ".concat(duration.fast, "ms;"), "--duration-base: ".concat(duration.base, "ms;"), "--duration-slow: ".concat(duration.slow, "ms;"), "", "/* \u2500\u2500 Motion (semantic aliases \u2014 B6) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */", // Same numeric values as fast/base/slow; intent-readable at the
|
|
105
|
+
// call site. transition() helper recognises both vocabularies.
|
|
106
|
+
"--duration-microinteraction: ".concat(duration.microinteraction, "ms;"), "--duration-state-change: ".concat(duration.stateChange, "ms;"), "--duration-page-transition: ".concat(duration.pageTransition, "ms;"), "", "/* \u2500\u2500 Easing \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */", "--easing-out: ".concat(easing.out, ";"), "--easing-in: ".concat(easing["in"], ";"), "--easing-soft: ".concat(easing.soft, ";"), "", "/* \u2500\u2500 Z-index \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */"], _toConsumableArray(Object.entries(zIndex).map(function (_ref9) {
|
|
107
|
+
var _ref0 = _slicedToArray(_ref9, 2),
|
|
108
|
+
k = _ref0[0],
|
|
109
|
+
v = _ref0[1];
|
|
110
|
+
return "--z-".concat(k, ": ").concat(v, ";");
|
|
111
|
+
})), ["", "/* \u2500\u2500 Layout \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */", "--sidebar-w: ".concat(layout.sidebar, "px;"), "--topbar-h: ".concat(layout.topbar, "px;"), "--content-max: ".concat(layout.contentMax, "px;"), "--form-max: ".concat(layout.formMax, "px;"), "--tactile-min: ".concat(layout.tactileMin, "px;"), "", "/* \u2500\u2500 Breakpoints (R-RS.1) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */", // The single breakpoint scale, also wired into the MUI theme and the
|
|
112
|
+
// mq() string helpers. Media queries can't read var(), so these are
|
|
113
|
+
// for @container queries, clamp() and JS (getComputedStyle) — they
|
|
114
|
+
// exist so no consumer hardcodes a raw px breakpoint anywhere.
|
|
115
|
+
"--bp-xs: ".concat(breakpoints.xs, "px;"), "--bp-sm: ".concat(breakpoints.sm, "px;"), "--bp-md: ".concat(breakpoints.md, "px;"), "--bp-lg: ".concat(breakpoints.lg, "px;"), "--bp-xl: ".concat(breakpoints.xl, "px;"), "", "/* \u2500\u2500 Density (default = comfortable) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */", "--row-h: ".concat(density.comfortable.row, "px;"), "--input-h: ".concat(density.comfortable.input, "px;"), "--btn-h: ".concat(density.comfortable.btn, "px;"), "--text-fs: ".concat(density.comfortable.fontSize, "px;")]);
|
|
116
|
+
var collapsedSidebar = "[data-nav-collapsed=\"true\"] { --sidebar-w: ".concat(layout.sidebarMin, "px; }");
|
|
117
|
+
|
|
118
|
+
/* Density tier overrides — emitted in order of granularity so a
|
|
119
|
+
* cascading selector like `[data-density][data-density="compact"]`
|
|
120
|
+
* (host-side specificity hack) resolves predictably. */
|
|
121
|
+
var spaciousDensity = ["[data-density=\"spacious\"] {", " --row-h: ".concat(density.spacious.row, "px;"), " --input-h: ".concat(density.spacious.input, "px;"), " --btn-h: ".concat(density.spacious.btn, "px;"), " --text-fs: ".concat(density.spacious.fontSize, "px;"), "}"].join("\n");
|
|
122
|
+
var compactDensity = ["[data-density=\"compact\"] {", " --row-h: ".concat(density.compact.row, "px;"), " --input-h: ".concat(density.compact.input, "px;"), " --btn-h: ".concat(density.compact.btn, "px;"), " --text-fs: ".concat(density.compact.fontSize, "px;"), "}"].join("\n");
|
|
123
|
+
var ultraCompactDensity = ["[data-density=\"ultra-compact\"] {", " --row-h: ".concat(density.ultraCompact.row, "px;"), " --input-h: ".concat(density.ultraCompact.input, "px;"), " --btn-h: ".concat(density.ultraCompact.btn, "px;"), " --text-fs: ".concat(density.ultraCompact.fontSize, "px;"), "}"].join("\n");
|
|
124
|
+
|
|
125
|
+
/* ── Dark mode overrides ────────────────────────────────────
|
|
126
|
+
* Soft variants (semantic + status) are DERIVED via color-mix
|
|
127
|
+
* from the saturated colour or the dark-mode status FG. The
|
|
128
|
+
* static light-mode soft hex codes are too pale on dark
|
|
129
|
+
* surfaces and fail WCAG 1.4.11 non-text contrast.
|
|
130
|
+
* The 22-24% mix produces a tinted overlay that adapts to host
|
|
131
|
+
* brand overrides automatically.
|
|
132
|
+
* ───────────────────────────────────────────────────────── */
|
|
133
|
+
var darkVars = ["[data-theme=\"dark\"] {", " --bg: ".concat(dark.bg, ";"), " --bg-elev: ".concat(dark.bgElev, ";"), " --bg-subtle: ".concat(dark.bgSubtle, ";"), " --bg-hover: ".concat(dark.bgHover, ";"), " --surface: ".concat(dark.surface, ";"), " --border: ".concat(dark.border, ";"), " --border-strong: ".concat(dark.borderStrong, ";"), " --fg: ".concat(dark.fg, ";"), " --fg-muted: ".concat(dark.fgMuted, ";"), " --fg-subtle: ".concat(dark.fgSubtle, ";"), " --fg-inverse: ".concat(dark.fgInverse, ";"), " --accent-soft: ".concat(dark.accentSoft, ";"), "", " /* Soft semantic fills \u2014 derived from the saturated colour */", " --success-soft: color-mix(in srgb, var(--success) 24%, transparent);", " --warning-soft: color-mix(in srgb, var(--warning) 24%, transparent);", " --danger-soft: color-mix(in srgb, var(--danger) 24%, transparent);", " --info-soft: color-mix(in srgb, var(--info) 24%, transparent);", "", " /* Status FG \u2014 overridden for dark-mode visibility */", " --status-new-fg: ".concat(dark.status["new"].fg, ";"), " --status-sent-fg: ".concat(dark.status.sent.fg, ";"), " --status-pending-fg: ".concat(dark.status.pending.fg, ";"), " --status-approved-fg: ".concat(dark.status.approved.fg, ";"), " --status-rejected-fg: ".concat(dark.status.rejected.fg, ";"), " --status-neutral-fg: ".concat(dark.status.neutral.fg, ";"), "", " /* Status soft \u2014 derived from the dark-mode FG */", " --status-new-soft: color-mix(in srgb, var(--status-new-fg) 22%, transparent);", " --status-sent-soft: color-mix(in srgb, var(--status-sent-fg) 22%, transparent);", " --status-pending-soft: color-mix(in srgb, var(--status-pending-fg) 22%, transparent);", " --status-approved-soft: color-mix(in srgb, var(--status-approved-fg) 22%, transparent);", " --status-rejected-soft: color-mix(in srgb, var(--status-rejected-fg) 22%, transparent);", " --status-neutral-soft: color-mix(in srgb, var(--status-neutral-fg) 22%, transparent);", "}"].join("\n");
|
|
134
|
+
|
|
135
|
+
/* Dev-only validation — catches the regression class that motivated it: a
|
|
136
|
+
* token removed from ../tokens while this emitter still references it, which
|
|
137
|
+
* puts the literal "undefined" into :root instead of failing loudly. See the
|
|
138
|
+
* note beside --fw-bold above. */
|
|
139
|
+
if (typeof console !== "undefined") {
|
|
140
|
+
var offenders = lightVars.filter(function (l) {
|
|
141
|
+
return /:\s*undefined\b/.test(l);
|
|
142
|
+
});
|
|
143
|
+
if (offenders.length) {
|
|
144
|
+
// eslint-disable-next-line no-console
|
|
145
|
+
console.warn("[@portnet/ui v2] cssVariables emitted undefined values — check token imports:", offenders);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
return [":root {"].concat(_toConsumableArray(lightVars.map(function (line) {
|
|
149
|
+
return line ? " ".concat(line) : "";
|
|
150
|
+
})), ["}", "", collapsedSidebar, "", spaciousDensity, "", compactDensity, "", ultraCompactDensity, "", darkVars]).join("\n");
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Inject the variables into <head> at runtime.
|
|
155
|
+
* Idempotent: replaces a previous tag if present.
|
|
156
|
+
*
|
|
157
|
+
* Backward-compatible signatures:
|
|
158
|
+
* injectCssVariables(); // default id, no override
|
|
159
|
+
* injectCssVariables("my-style-id"); // legacy string id
|
|
160
|
+
* injectCssVariables({ id, brand, brandSecondary }); // options form
|
|
161
|
+
*/
|
|
162
|
+
export function injectCssVariables(arg) {
|
|
163
|
+
if (typeof document === "undefined") return;
|
|
164
|
+
var opts = typeof arg === "string" ? {
|
|
165
|
+
id: arg
|
|
166
|
+
} : arg || {};
|
|
167
|
+
var id = opts.id || STYLE_TAG_ID;
|
|
168
|
+
var tag = document.getElementById(id);
|
|
169
|
+
if (!tag) {
|
|
170
|
+
tag = document.createElement("style");
|
|
171
|
+
tag.id = id;
|
|
172
|
+
document.head.appendChild(tag);
|
|
173
|
+
}
|
|
174
|
+
tag.textContent = getCssVariables(opts);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* Remove the injected style tag. Symmetrical with
|
|
179
|
+
* injectCssVariables — needed for theme switching, hot-reload
|
|
180
|
+
* and test cleanup. No-op when the tag is absent or in SSR.
|
|
181
|
+
*
|
|
182
|
+
* removeCssVariables(); // default id
|
|
183
|
+
* removeCssVariables("my-style-id"); // legacy string id
|
|
184
|
+
* removeCssVariables({ id }); // options form
|
|
185
|
+
*/
|
|
186
|
+
export function removeCssVariables(arg) {
|
|
187
|
+
if (typeof document === "undefined") return;
|
|
188
|
+
var id = typeof arg === "string" ? arg : arg && arg.id || STYLE_TAG_ID;
|
|
189
|
+
var tag = document.getElementById(id);
|
|
190
|
+
if (tag) tag.remove();
|
|
191
|
+
}
|
|
192
|
+
var cssVariablesApi = {
|
|
193
|
+
getCssVariables: getCssVariables,
|
|
194
|
+
injectCssVariables: injectCssVariables,
|
|
195
|
+
removeCssVariables: removeCssVariables
|
|
196
|
+
};
|
|
197
|
+
export default cssVariablesApi;
|
|
198
|
+
//# sourceMappingURL=cssVariables.js.map
|
|
@@ -0,0 +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,IAAMC,eAAe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ACI,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":[]}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import createPortnetTheme from "./createPortnetTheme";
|
|
2
|
+
import { getCssVariables, injectCssVariables, removeCssVariables } from "./cssVariables";
|
|
3
|
+
export { default as createPortnetTheme } from "./createPortnetTheme";
|
|
4
|
+
export { getCssVariables, injectCssVariables, removeCssVariables } from "./cssVariables";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Public typed contract of the theme factory.
|
|
8
|
+
*
|
|
9
|
+
* Every host module wraps `createPortnetTheme` in a local `build<Module>Theme`
|
|
10
|
+
* helper (see the GU modules' `utils/appearance`), and those wrappers need to
|
|
11
|
+
* declare their own option surface without redefining it. Before this export
|
|
12
|
+
* the options type was module-private, which forced consumers into either
|
|
13
|
+
* `brand?: object` or an `as Parameters<typeof createPortnetTheme>[0]`
|
|
14
|
+
* assertion — both of which the Platform TypeScript Guidelines forbid
|
|
15
|
+
* ("Never use object", "Avoid unsafe assertions").
|
|
16
|
+
*
|
|
17
|
+
* `BrandTokens` / `BrandSecondaryTokens` are surfaced for the same reason: a
|
|
18
|
+
* host that receives a partial brand payload from the shell (themeReceived)
|
|
19
|
+
* must be able to type that payload against the shared token group instead of
|
|
20
|
+
* inventing a local twin.
|
|
21
|
+
*
|
|
22
|
+
* Additive, non-breaking: type-only re-exports, no runtime change.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
var themeApi = {
|
|
26
|
+
createPortnetTheme: createPortnetTheme,
|
|
27
|
+
getCssVariables: getCssVariables,
|
|
28
|
+
injectCssVariables: injectCssVariables,
|
|
29
|
+
removeCssVariables: removeCssVariables
|
|
30
|
+
};
|
|
31
|
+
export default themeApi;
|
|
32
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +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,IAAME,QAAQ,GAAG;EACfL,kBAAkB,EAAlBA,kBAAkB;EAClBC,eAAe,EAAfA,eAAe;EACfC,kBAAkB,EAAlBA,kBAAkB;EAClBC,kBAAkB,EAAlBA;AACF,CAAC;AACD,eAAeE,QAAQ","ignoreList":[]}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Breakpoint tokens — Portnet UI v2
|
|
3
|
+
* Aligned with Design System v1.0 §07 (Responsive) + R-RS.1.
|
|
4
|
+
*
|
|
5
|
+
* SINGLE SOURCE OF TRUTH for the responsive breakpoint scale.
|
|
6
|
+
* Previously these lived inside tokens/density.js, conflating two
|
|
7
|
+
* unrelated concerns (row/control density vs. viewport breakpoints).
|
|
8
|
+
* They now live here; density.js re-exports `breakpoints` so every
|
|
9
|
+
* existing `import { breakpoints } from "@portnet/ui/v2/tokens"`
|
|
10
|
+
* (and the `densityLayout` shape) keeps working unchanged.
|
|
11
|
+
*
|
|
12
|
+
* Two layers consume this scale and MUST stay in lockstep:
|
|
13
|
+
* 1. The MUI theme — createPortnetTheme wires `breakpoints` into
|
|
14
|
+
* createTheme's `breakpoints.values`, so `theme.breakpoints.up()`
|
|
15
|
+
* and every `sx={{ prop: { xs, md } }}` on a MUI component resolve
|
|
16
|
+
* against THESE values.
|
|
17
|
+
* 2. The CSS layer — the `mq` helpers below emit the SAME media
|
|
18
|
+
* queries as strings, for:
|
|
19
|
+
* - the theme-free v2 Box/Stack responsive sx engine (Layout.js),
|
|
20
|
+
* - raw `.css` / container styles,
|
|
21
|
+
* - any `sx={{ [mq.up("md")]: {...} }}`,
|
|
22
|
+
* and the `--bp-*` CSS variables emitted by cssVariables.js for
|
|
23
|
+
* pure-CSS / container-query consumers.
|
|
24
|
+
*
|
|
25
|
+
* IMPORTANT — keep `breakpoints` a PURE value map ({ key: number }).
|
|
26
|
+
* MUI's createTheme iterates `breakpoints.values` to build its own
|
|
27
|
+
* up/down/between; a non-numeric key (e.g. a helper function) would be
|
|
28
|
+
* mis-read as a breakpoint named "up". Helpers therefore live on the
|
|
29
|
+
* SEPARATE `mq` export, never on `breakpoints` itself.
|
|
30
|
+
*
|
|
31
|
+
* Charter viewport targets covered:
|
|
32
|
+
* - xs band : 320 / 360 / 375 / 390 / 414 (phones, base, no query)
|
|
33
|
+
* - md : 768 / 820 (tablet)
|
|
34
|
+
* - lg : 1024 (small desktop / landscape tablet)
|
|
35
|
+
* - xl band : 1280 / 1440 / 1920 (desktop)
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
/* Ascending, mobile-first. xs = 0 is the base band (phones 320-480). */
|
|
39
|
+
export var breakpoints = Object.freeze({
|
|
40
|
+
xs: 0,
|
|
41
|
+
sm: 481,
|
|
42
|
+
md: 768,
|
|
43
|
+
lg: 1024,
|
|
44
|
+
xl: 1280
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
/* Local key type — canonical union of breakpoint keys. Not exported;
|
|
48
|
+
* the public token surface is unchanged. */
|
|
49
|
+
|
|
50
|
+
/* Ordered key list — the canonical iteration order for any mobile-first
|
|
51
|
+
* cascade (base -> up). Re-used by Layout.js so the order can't drift. */
|
|
52
|
+
export var BREAKPOINT_KEYS = Object.freeze(["xs", "sm", "md", "lg", "xl"]);
|
|
53
|
+
|
|
54
|
+
/* MUI parity: down()/between() subtract this from the upper bound so a
|
|
55
|
+
* `down(key)` query and the matching `up(key)` query never overlap at
|
|
56
|
+
* the exact pixel. Mirrors MUI's default step (5/100 = 0.05px). */
|
|
57
|
+
var STEP = 0.05;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Resolve a key to its numeric min-width, falling back to 0 for an
|
|
61
|
+
* unknown key so a typo degrades to "always matches" rather than
|
|
62
|
+
* emitting a NaN width (which silently disables the whole query).
|
|
63
|
+
*/
|
|
64
|
+
export function bpValue(key) {
|
|
65
|
+
var v = breakpoints[key];
|
|
66
|
+
return typeof v === "number" ? v : 0;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/* Next key up the scale, or null when `key` is the largest. */
|
|
70
|
+
function nextKey(key) {
|
|
71
|
+
var i = BREAKPOINT_KEYS.indexOf(key);
|
|
72
|
+
return i >= 0 && i < BREAKPOINT_KEYS.length - 1 ? BREAKPOINT_KEYS[i + 1] : null;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Token-derived media-query string helpers. Output is identical in
|
|
77
|
+
* intent to MUI's `theme.breakpoints.*` so the CSS layer and the
|
|
78
|
+
* JS/MUI layer can never diverge.
|
|
79
|
+
*
|
|
80
|
+
* mq.up("md") -> "@media (min-width:<md>px)"
|
|
81
|
+
* mq.down("md") -> "@media (max-width:<md - 0.05>px)"
|
|
82
|
+
* mq.between("sm","lg") -> "@media (min-width:<sm>px) and (max-width:<lg - 0.05>px)"
|
|
83
|
+
* mq.only("md") -> mq.between("md","lg")
|
|
84
|
+
*
|
|
85
|
+
* Usage (theme-free CSS layer / raw stylesheet):
|
|
86
|
+
* `${mq.up("md")}{ .x{ gap:24px } }`
|
|
87
|
+
* Usage (sx object key):
|
|
88
|
+
* sx={{ [mq.up("md")]: { flexDirection: "row" } }}
|
|
89
|
+
*/
|
|
90
|
+
export var mq = Object.freeze({
|
|
91
|
+
up: function up(key) {
|
|
92
|
+
return "@media (min-width:".concat(bpValue(key), "px)");
|
|
93
|
+
},
|
|
94
|
+
down: function down(key) {
|
|
95
|
+
return "@media (max-width:".concat(bpValue(key) - STEP, "px)");
|
|
96
|
+
},
|
|
97
|
+
between: function between(start, end) {
|
|
98
|
+
return "@media (min-width:".concat(bpValue(start), "px) and (max-width:").concat(bpValue(end) - STEP, "px)");
|
|
99
|
+
},
|
|
100
|
+
only: function only(key) {
|
|
101
|
+
var next = nextKey(key);
|
|
102
|
+
return next ? mq.between(key, next) : mq.up(key);
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
export default breakpoints;
|
|
106
|
+
//# sourceMappingURL=breakpoints.js.map
|
|
@@ -0,0 +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","concat","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,IAAMA,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,IAAMC,eAAe,GAAGP,MAAM,CAACC,MAAM,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAU,CAAC;;AAErF;AACA;AACA;AACA,IAAMO,IAAI,GAAG,IAAI;;AA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