@geosynk/vsw-ui 0.0.0-stage → 0.5.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/COMPONENTS.md +149 -0
- package/LICENSE +21 -0
- package/README.md +74 -2
- package/contract/components.json +834 -0
- package/dist/charts/index.js +74 -0
- package/dist/charts/index.js.map +1 -0
- package/dist/chunk-JUZQB3TQ.js +5510 -0
- package/dist/chunk-JUZQB3TQ.js.map +1 -0
- package/dist/chunk-LP7YS7WH.js +430 -0
- package/dist/chunk-LP7YS7WH.js.map +1 -0
- package/dist/chunk-RGKOZN7C.js +194 -0
- package/dist/chunk-RGKOZN7C.js.map +1 -0
- package/dist/chunk-XQB56SCE.js +95 -0
- package/dist/chunk-XQB56SCE.js.map +1 -0
- package/dist/color/index.js +289 -0
- package/dist/color/index.js.map +1 -0
- package/dist/data-grid/index.js +624 -0
- package/dist/data-grid/index.js.map +1 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -0
- package/dist/types/charts/ChartCard.d.ts +24 -0
- package/dist/types/charts/ChartCard.d.ts.map +1 -0
- package/dist/types/charts/charts.theme.d.ts +28 -0
- package/dist/types/charts/charts.theme.d.ts.map +1 -0
- package/dist/types/charts/index.d.ts +6 -0
- package/dist/types/charts/index.d.ts.map +1 -0
- package/dist/types/charts/palette.d.ts +23 -0
- package/dist/types/charts/palette.d.ts.map +1 -0
- package/dist/types/charts/useNivoTheme.d.ts +4 -0
- package/dist/types/charts/useNivoTheme.d.ts.map +1 -0
- package/dist/types/color/ColorField.d.ts +24 -0
- package/dist/types/color/ColorField.d.ts.map +1 -0
- package/dist/types/color/ColorSwatchBar.d.ts +33 -0
- package/dist/types/color/ColorSwatchBar.d.ts.map +1 -0
- package/dist/types/color/color.theme.d.ts +115 -0
- package/dist/types/color/color.theme.d.ts.map +1 -0
- package/dist/types/color/index.d.ts +4 -0
- package/dist/types/color/index.d.ts.map +1 -0
- package/dist/types/components/Button/Button.d.ts +21 -0
- package/dist/types/components/Button/Button.d.ts.map +1 -0
- package/dist/types/components/Button/Button.theme.d.ts +314 -0
- package/dist/types/components/Button/Button.theme.d.ts.map +1 -0
- package/dist/types/components/Button/index.d.ts +2 -0
- package/dist/types/components/Button/index.d.ts.map +1 -0
- package/dist/types/components/ButtonBar/ButtonBar.d.ts +14 -0
- package/dist/types/components/ButtonBar/ButtonBar.d.ts.map +1 -0
- package/dist/types/components/ButtonBar/FormFooter.d.ts +34 -0
- package/dist/types/components/ButtonBar/FormFooter.d.ts.map +1 -0
- package/dist/types/components/ButtonBar/index.d.ts +3 -0
- package/dist/types/components/ButtonBar/index.d.ts.map +1 -0
- package/dist/types/components/IconButton/IconButton.d.ts +39 -0
- package/dist/types/components/IconButton/IconButton.d.ts.map +1 -0
- package/dist/types/components/IconButton/IconButton.theme.d.ts +218 -0
- package/dist/types/components/IconButton/IconButton.theme.d.ts.map +1 -0
- package/dist/types/components/IconButton/index.d.ts +2 -0
- package/dist/types/components/IconButton/index.d.ts.map +1 -0
- package/dist/types/components/ToggleGroup/ToggleGroup.d.ts +51 -0
- package/dist/types/components/ToggleGroup/ToggleGroup.d.ts.map +1 -0
- package/dist/types/components/ToggleGroup/ToggleGroup.theme.d.ts +90 -0
- package/dist/types/components/ToggleGroup/ToggleGroup.theme.d.ts.map +1 -0
- package/dist/types/components/ToggleGroup/index.d.ts +2 -0
- package/dist/types/components/ToggleGroup/index.d.ts.map +1 -0
- package/dist/types/components/ToolGroupButton/ToolGroupButton.d.ts +30 -0
- package/dist/types/components/ToolGroupButton/ToolGroupButton.d.ts.map +1 -0
- package/dist/types/components/ToolGroupButton/ToolGroupButton.theme.d.ts +47 -0
- package/dist/types/components/ToolGroupButton/ToolGroupButton.theme.d.ts.map +1 -0
- package/dist/types/components/ToolGroupButton/index.d.ts +2 -0
- package/dist/types/components/ToolGroupButton/index.d.ts.map +1 -0
- package/dist/types/components/ToolRail/ToolRail.d.ts +30 -0
- package/dist/types/components/ToolRail/ToolRail.d.ts.map +1 -0
- package/dist/types/components/ToolRail/ToolRail.theme.d.ts +44 -0
- package/dist/types/components/ToolRail/ToolRail.theme.d.ts.map +1 -0
- package/dist/types/components/ToolRail/index.d.ts +2 -0
- package/dist/types/components/ToolRail/index.d.ts.map +1 -0
- package/dist/types/components/ToolRail/useRailOverflow.d.ts +15 -0
- package/dist/types/components/ToolRail/useRailOverflow.d.ts.map +1 -0
- package/dist/types/components/ToolRail/useRovingTabIndex.d.ts +10 -0
- package/dist/types/components/ToolRail/useRovingTabIndex.d.ts.map +1 -0
- package/dist/types/components/blocks/Avatar.d.ts +22 -0
- package/dist/types/components/blocks/Avatar.d.ts.map +1 -0
- package/dist/types/components/blocks/DragHandle.d.ts +11 -0
- package/dist/types/components/blocks/DragHandle.d.ts.map +1 -0
- package/dist/types/components/blocks/FloatingPanel.d.ts +28 -0
- package/dist/types/components/blocks/FloatingPanel.d.ts.map +1 -0
- package/dist/types/components/blocks/MapLabel.d.ts +17 -0
- package/dist/types/components/blocks/MapLabel.d.ts.map +1 -0
- package/dist/types/components/blocks/Popconfirm.d.ts +22 -0
- package/dist/types/components/blocks/Popconfirm.d.ts.map +1 -0
- package/dist/types/components/blocks/ScrollArea.d.ts +12 -0
- package/dist/types/components/blocks/ScrollArea.d.ts.map +1 -0
- package/dist/types/components/blocks/Thumbnail.d.ts +20 -0
- package/dist/types/components/blocks/Thumbnail.d.ts.map +1 -0
- package/dist/types/components/blocks/ToastProvider.d.ts +19 -0
- package/dist/types/components/blocks/ToastProvider.d.ts.map +1 -0
- package/dist/types/components/blocks/TruncatedText.d.ts +13 -0
- package/dist/types/components/blocks/TruncatedText.d.ts.map +1 -0
- package/dist/types/components/blocks/blocks.theme.d.ts +126 -0
- package/dist/types/components/blocks/blocks.theme.d.ts.map +1 -0
- package/dist/types/components/blocks/index.d.ts +10 -0
- package/dist/types/components/blocks/index.d.ts.map +1 -0
- package/dist/types/components/cards/HighlightText.d.ts +7 -0
- package/dist/types/components/cards/HighlightText.d.ts.map +1 -0
- package/dist/types/components/cards/ItemCard.d.ts +60 -0
- package/dist/types/components/cards/ItemCard.d.ts.map +1 -0
- package/dist/types/components/cards/OptionCard.d.ts +27 -0
- package/dist/types/components/cards/OptionCard.d.ts.map +1 -0
- package/dist/types/components/cards/StatCard.d.ts +21 -0
- package/dist/types/components/cards/StatCard.d.ts.map +1 -0
- package/dist/types/components/cards/cards.theme.d.ts +240 -0
- package/dist/types/components/cards/cards.theme.d.ts.map +1 -0
- package/dist/types/components/cards/index.d.ts +5 -0
- package/dist/types/components/cards/index.d.ts.map +1 -0
- package/dist/types/components/feedback/BusyOverlay.d.ts +39 -0
- package/dist/types/components/feedback/BusyOverlay.d.ts.map +1 -0
- package/dist/types/components/feedback/ErrorBoundary.d.ts +19 -0
- package/dist/types/components/feedback/ErrorBoundary.d.ts.map +1 -0
- package/dist/types/components/feedback/InlineMessage.d.ts +15 -0
- package/dist/types/components/feedback/InlineMessage.d.ts.map +1 -0
- package/dist/types/components/feedback/LoadingScreen.d.ts +30 -0
- package/dist/types/components/feedback/LoadingScreen.d.ts.map +1 -0
- package/dist/types/components/feedback/ProgressBar.d.ts +14 -0
- package/dist/types/components/feedback/ProgressBar.d.ts.map +1 -0
- package/dist/types/components/feedback/StateViews.d.ts +37 -0
- package/dist/types/components/feedback/StateViews.d.ts.map +1 -0
- package/dist/types/components/feedback/Toast.d.ts +18 -0
- package/dist/types/components/feedback/Toast.d.ts.map +1 -0
- package/dist/types/components/feedback/feedback.theme.d.ts +375 -0
- package/dist/types/components/feedback/feedback.theme.d.ts.map +1 -0
- package/dist/types/components/feedback/index.d.ts +8 -0
- package/dist/types/components/feedback/index.d.ts.map +1 -0
- package/dist/types/components/headers/PanelBanner.d.ts +20 -0
- package/dist/types/components/headers/PanelBanner.d.ts.map +1 -0
- package/dist/types/components/headers/PanelIcon.d.ts +13 -0
- package/dist/types/components/headers/PanelIcon.d.ts.map +1 -0
- package/dist/types/components/headers/headers.theme.d.ts +65 -0
- package/dist/types/components/headers/headers.theme.d.ts.map +1 -0
- package/dist/types/components/headers/index.d.ts +3 -0
- package/dist/types/components/headers/index.d.ts.map +1 -0
- package/dist/types/components/index.d.ts +16 -0
- package/dist/types/components/index.d.ts.map +1 -0
- package/dist/types/components/inputs/CalendarGrid.d.ts +19 -0
- package/dist/types/components/inputs/CalendarGrid.d.ts.map +1 -0
- package/dist/types/components/inputs/Choice.d.ts +36 -0
- package/dist/types/components/inputs/Choice.d.ts.map +1 -0
- package/dist/types/components/inputs/DateField.d.ts +27 -0
- package/dist/types/components/inputs/DateField.d.ts.map +1 -0
- package/dist/types/components/inputs/DateRangeField.d.ts +30 -0
- package/dist/types/components/inputs/DateRangeField.d.ts.map +1 -0
- package/dist/types/components/inputs/DateRangePopover.d.ts +13 -0
- package/dist/types/components/inputs/DateRangePopover.d.ts.map +1 -0
- package/dist/types/components/inputs/Field.d.ts +27 -0
- package/dist/types/components/inputs/Field.d.ts.map +1 -0
- package/dist/types/components/inputs/FileField.d.ts +21 -0
- package/dist/types/components/inputs/FileField.d.ts.map +1 -0
- package/dist/types/components/inputs/NumberField.d.ts +41 -0
- package/dist/types/components/inputs/NumberField.d.ts.map +1 -0
- package/dist/types/components/inputs/SearchField.d.ts +35 -0
- package/dist/types/components/inputs/SearchField.d.ts.map +1 -0
- package/dist/types/components/inputs/SearchableSelect.d.ts +36 -0
- package/dist/types/components/inputs/SearchableSelect.d.ts.map +1 -0
- package/dist/types/components/inputs/Select.d.ts +27 -0
- package/dist/types/components/inputs/Select.d.ts.map +1 -0
- package/dist/types/components/inputs/Slider.d.ts +28 -0
- package/dist/types/components/inputs/Slider.d.ts.map +1 -0
- package/dist/types/components/inputs/TextField.d.ts +18 -0
- package/dist/types/components/inputs/TextField.d.ts.map +1 -0
- package/dist/types/components/inputs/TimeSelect.d.ts +10 -0
- package/dist/types/components/inputs/TimeSelect.d.ts.map +1 -0
- package/dist/types/components/inputs/calendarUtils.d.ts +39 -0
- package/dist/types/components/inputs/calendarUtils.d.ts.map +1 -0
- package/dist/types/components/inputs/date.theme.d.ts +227 -0
- package/dist/types/components/inputs/date.theme.d.ts.map +1 -0
- package/dist/types/components/inputs/index.d.ts +13 -0
- package/dist/types/components/inputs/index.d.ts.map +1 -0
- package/dist/types/components/inputs/inputs.theme.d.ts +399 -0
- package/dist/types/components/inputs/inputs.theme.d.ts.map +1 -0
- package/dist/types/components/inputs/inputsControls.theme.d.ts +168 -0
- package/dist/types/components/inputs/inputsControls.theme.d.ts.map +1 -0
- package/dist/types/components/inputs/listbox/ListBox.d.ts +41 -0
- package/dist/types/components/inputs/listbox/ListBox.d.ts.map +1 -0
- package/dist/types/components/inputs/listbox/PickerSelect.d.ts +54 -0
- package/dist/types/components/inputs/listbox/PickerSelect.d.ts.map +1 -0
- package/dist/types/components/inputs/listbox/index.d.ts +3 -0
- package/dist/types/components/inputs/listbox/index.d.ts.map +1 -0
- package/dist/types/components/inputs/listbox/listbox.theme.d.ts +107 -0
- package/dist/types/components/inputs/listbox/listbox.theme.d.ts.map +1 -0
- package/dist/types/components/inputs/listbox/useListBoxNav.d.ts +36 -0
- package/dist/types/components/inputs/listbox/useListBoxNav.d.ts.map +1 -0
- package/dist/types/components/stroke/StrokePicker.d.ts +25 -0
- package/dist/types/components/stroke/StrokePicker.d.ts.map +1 -0
- package/dist/types/components/stroke/StrokePreview.d.ts +16 -0
- package/dist/types/components/stroke/StrokePreview.d.ts.map +1 -0
- package/dist/types/components/stroke/index.d.ts +3 -0
- package/dist/types/components/stroke/index.d.ts.map +1 -0
- package/dist/types/components/stroke/stroke.theme.d.ts +9 -0
- package/dist/types/components/stroke/stroke.theme.d.ts.map +1 -0
- package/dist/types/components/structure/ActiveFilters.d.ts +16 -0
- package/dist/types/components/structure/ActiveFilters.d.ts.map +1 -0
- package/dist/types/components/structure/Breadcrumbs.d.ts +17 -0
- package/dist/types/components/structure/Breadcrumbs.d.ts.map +1 -0
- package/dist/types/components/structure/ConfirmDialog.d.ts +16 -0
- package/dist/types/components/structure/ConfirmDialog.d.ts.map +1 -0
- package/dist/types/components/structure/DataTable.d.ts +30 -0
- package/dist/types/components/structure/DataTable.d.ts.map +1 -0
- package/dist/types/components/structure/Dialog.d.ts +16 -0
- package/dist/types/components/structure/Dialog.d.ts.map +1 -0
- package/dist/types/components/structure/DrawerPanel.d.ts +22 -0
- package/dist/types/components/structure/DrawerPanel.d.ts.map +1 -0
- package/dist/types/components/structure/KeyValueList.d.ts +15 -0
- package/dist/types/components/structure/KeyValueList.d.ts.map +1 -0
- package/dist/types/components/structure/Legend.d.ts +20 -0
- package/dist/types/components/structure/Legend.d.ts.map +1 -0
- package/dist/types/components/structure/ListRow.d.ts +34 -0
- package/dist/types/components/structure/ListRow.d.ts.map +1 -0
- package/dist/types/components/structure/MenuButton.d.ts +37 -0
- package/dist/types/components/structure/MenuButton.d.ts.map +1 -0
- package/dist/types/components/structure/PanelHeader.d.ts +17 -0
- package/dist/types/components/structure/PanelHeader.d.ts.map +1 -0
- package/dist/types/components/structure/PopoverPanel.d.ts +19 -0
- package/dist/types/components/structure/PopoverPanel.d.ts.map +1 -0
- package/dist/types/components/structure/RowRenameInput.d.ts +12 -0
- package/dist/types/components/structure/RowRenameInput.d.ts.map +1 -0
- package/dist/types/components/structure/SectionHeader.d.ts +20 -0
- package/dist/types/components/structure/SectionHeader.d.ts.map +1 -0
- package/dist/types/components/structure/SelectionBar.d.ts +15 -0
- package/dist/types/components/structure/SelectionBar.d.ts.map +1 -0
- package/dist/types/components/structure/Stepper.d.ts +16 -0
- package/dist/types/components/structure/Stepper.d.ts.map +1 -0
- package/dist/types/components/structure/Tabs.d.ts +23 -0
- package/dist/types/components/structure/Tabs.d.ts.map +1 -0
- package/dist/types/components/structure/Toolbar.d.ts +13 -0
- package/dist/types/components/structure/Toolbar.d.ts.map +1 -0
- package/dist/types/components/structure/index.d.ts +18 -0
- package/dist/types/components/structure/index.d.ts.map +1 -0
- package/dist/types/components/structure/panelChrome.theme.d.ts +59 -0
- package/dist/types/components/structure/panelChrome.theme.d.ts.map +1 -0
- package/dist/types/components/structure/section.theme.d.ts +26 -0
- package/dist/types/components/structure/section.theme.d.ts.map +1 -0
- package/dist/types/components/structure/structure.theme.d.ts +478 -0
- package/dist/types/components/structure/structure.theme.d.ts.map +1 -0
- package/dist/types/components/tags/Chip.d.ts +16 -0
- package/dist/types/components/tags/Chip.d.ts.map +1 -0
- package/dist/types/components/tags/StatusBadge.d.ts +17 -0
- package/dist/types/components/tags/StatusBadge.d.ts.map +1 -0
- package/dist/types/components/tags/index.d.ts +3 -0
- package/dist/types/components/tags/index.d.ts.map +1 -0
- package/dist/types/components/tags/tags.theme.d.ts +158 -0
- package/dist/types/components/tags/tags.theme.d.ts.map +1 -0
- package/dist/types/components/themeOverrides.d.ts +3067 -0
- package/dist/types/components/themeOverrides.d.ts.map +1 -0
- package/dist/types/components/tree/GroupTree.d.ts +38 -0
- package/dist/types/components/tree/GroupTree.d.ts.map +1 -0
- package/dist/types/components/tree/index.d.ts +2 -0
- package/dist/types/components/tree/index.d.ts.map +1 -0
- package/dist/types/components/tree/tree.theme.d.ts +102 -0
- package/dist/types/components/tree/tree.theme.d.ts.map +1 -0
- package/dist/types/data-grid/ColumnFilter.d.ts +11 -0
- package/dist/types/data-grid/ColumnFilter.d.ts.map +1 -0
- package/dist/types/data-grid/ColumnsMenu.d.ts +12 -0
- package/dist/types/data-grid/ColumnsMenu.d.ts.map +1 -0
- package/dist/types/data-grid/DataGrid.d.ts +29 -0
- package/dist/types/data-grid/DataGrid.d.ts.map +1 -0
- package/dist/types/data-grid/GridHeaderCell.d.ts +18 -0
- package/dist/types/data-grid/GridHeaderCell.d.ts.map +1 -0
- package/dist/types/data-grid/GridSettingsMenu.d.ts +16 -0
- package/dist/types/data-grid/GridSettingsMenu.d.ts.map +1 -0
- package/dist/types/data-grid/dataGrid.theme.d.ts +74 -0
- package/dist/types/data-grid/dataGrid.theme.d.ts.map +1 -0
- package/dist/types/data-grid/index.d.ts +4 -0
- package/dist/types/data-grid/index.d.ts.map +1 -0
- package/dist/types/data-grid/types.d.ts +21 -0
- package/dist/types/data-grid/types.d.ts.map +1 -0
- package/dist/types/data-grid/useDataGridState.d.ts +27 -0
- package/dist/types/data-grid/useDataGridState.d.ts.map +1 -0
- package/dist/types/icons/Icon.d.ts +21 -0
- package/dist/types/icons/Icon.d.ts.map +1 -0
- package/dist/types/icons/custom.d.ts +17 -0
- package/dist/types/icons/custom.d.ts.map +1 -0
- package/dist/types/icons/editIcons.d.ts +62 -0
- package/dist/types/icons/editIcons.d.ts.map +1 -0
- package/dist/types/icons/index.d.ts +4 -0
- package/dist/types/icons/index.d.ts.map +1 -0
- package/dist/types/icons/registry.d.ts +163 -0
- package/dist/types/icons/registry.d.ts.map +1 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/templates/DetailPanel.d.ts +39 -0
- package/dist/types/templates/DetailPanel.d.ts.map +1 -0
- package/dist/types/templates/SidebarPanel.d.ts +36 -0
- package/dist/types/templates/SidebarPanel.d.ts.map +1 -0
- package/dist/types/templates/index.d.ts +3 -0
- package/dist/types/templates/index.d.ts.map +1 -0
- package/dist/types/templates/useScrollEdges.d.ts +14 -0
- package/dist/types/templates/useScrollEdges.d.ts.map +1 -0
- package/dist/types/theme/VsuiThemeProvider.d.ts +16 -0
- package/dist/types/theme/VsuiThemeProvider.d.ts.map +1 -0
- package/dist/types/theme/createVsuiTheme.d.ts +12 -0
- package/dist/types/theme/createVsuiTheme.d.ts.map +1 -0
- package/dist/types/theme/density.d.ts +13 -0
- package/dist/types/theme/density.d.ts.map +1 -0
- package/dist/types/theme/index.d.ts +6 -0
- package/dist/types/theme/index.d.ts.map +1 -0
- package/dist/types/theme/scrollbarRules.d.ts +41 -0
- package/dist/types/theme/scrollbarRules.d.ts.map +1 -0
- package/dist/types/theme/states.d.ts +34 -0
- package/dist/types/theme/states.d.ts.map +1 -0
- package/dist/types/theme/themeDetection.d.ts +4 -0
- package/dist/types/theme/themeDetection.d.ts.map +1 -0
- package/dist/types/theme/useIsDarkTheme.d.ts +3 -0
- package/dist/types/theme/useIsDarkTheme.d.ts.map +1 -0
- package/dist/types/tokens/color.d.ts +121 -0
- package/dist/types/tokens/color.d.ts.map +1 -0
- package/dist/types/tokens/container.d.ts +18 -0
- package/dist/types/tokens/container.d.ts.map +1 -0
- package/dist/types/tokens/index.d.ts +11 -0
- package/dist/types/tokens/index.d.ts.map +1 -0
- package/dist/types/tokens/mix.d.ts +5 -0
- package/dist/types/tokens/mix.d.ts.map +1 -0
- package/dist/types/tokens/motion.d.ts +20 -0
- package/dist/types/tokens/motion.d.ts.map +1 -0
- package/dist/types/tokens/radius.d.ts +22 -0
- package/dist/types/tokens/radius.d.ts.map +1 -0
- package/dist/types/tokens/shadow.d.ts +5 -0
- package/dist/types/tokens/shadow.d.ts.map +1 -0
- package/dist/types/tokens/size.d.ts +34 -0
- package/dist/types/tokens/size.d.ts.map +1 -0
- package/dist/types/tokens/spacing.d.ts +34 -0
- package/dist/types/tokens/spacing.d.ts.map +1 -0
- package/dist/types/tokens/typography.d.ts +27 -0
- package/dist/types/tokens/typography.d.ts.map +1 -0
- package/dist/types/tokens/zIndex.d.ts +13 -0
- package/dist/types/tokens/zIndex.d.ts.map +1 -0
- package/eslint/index.js +151 -0
- package/package.json +166 -5
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { LoadingState, EmptyState, ErrorState, useIsDarkTheme, SHADOW } from '../chunk-RGKOZN7C.js';
|
|
2
|
+
export { CHART_COLORS, CHART_SEQUENTIAL, CHART_STATUS, chartColors, chartContrastText } from '../chunk-RGKOZN7C.js';
|
|
3
|
+
import { COLOR, RADIUS_ROLE, SPACE } from '../chunk-LP7YS7WH.js';
|
|
4
|
+
import { Stack, GlobalStyles, Typography } from '@mui/material';
|
|
5
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
6
|
+
import * as React from 'react';
|
|
7
|
+
|
|
8
|
+
// src/lib/charts/charts.theme.ts
|
|
9
|
+
var chartClassRules = {
|
|
10
|
+
".vsui-chart-card": {
|
|
11
|
+
border: `1px solid ${COLOR.border.primary}`,
|
|
12
|
+
borderRadius: RADIUS_ROLE.surface,
|
|
13
|
+
backgroundColor: COLOR.surface.primary,
|
|
14
|
+
color: COLOR.text.primary,
|
|
15
|
+
minWidth: 0
|
|
16
|
+
},
|
|
17
|
+
".vsui-chart-subtitle": { color: COLOR.text.secondary },
|
|
18
|
+
".vsui-chart-legend": { listStyle: "none", margin: 0, padding: 0 },
|
|
19
|
+
".vsui-legend-key": { width: 10, height: 10, borderRadius: 2, backgroundColor: "var(--vsui-key)" },
|
|
20
|
+
".vsui-chart-plot": { position: "relative", minWidth: 0 }
|
|
21
|
+
};
|
|
22
|
+
function ChartCard({ title, subtitle, actions, legend, height = 240, state = "ready", emptyTitle = "No data for this selection", onRetry, children, className }) {
|
|
23
|
+
return /* @__PURE__ */ jsxs(Stack, { spacing: SPACE.sm, padding: SPACE.md, className: ["vsui-chart-card", className].filter(Boolean).join(" "), children: [
|
|
24
|
+
/* @__PURE__ */ jsx(GlobalStyles, { styles: chartClassRules }),
|
|
25
|
+
/* @__PURE__ */ jsxs(Stack, { direction: "row", alignItems: "flex-start", spacing: SPACE.sm, children: [
|
|
26
|
+
/* @__PURE__ */ jsxs(Stack, { flex: 1, minWidth: 0, children: [
|
|
27
|
+
/* @__PURE__ */ jsx(Typography, { variant: "subtitle2", component: "h3", children: title }),
|
|
28
|
+
subtitle && /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "vsui-chart-subtitle", children: subtitle })
|
|
29
|
+
] }),
|
|
30
|
+
actions
|
|
31
|
+
] }),
|
|
32
|
+
legend && legend.length > 1 && /* @__PURE__ */ jsx(Stack, { direction: "row", spacing: SPACE.md, useFlexGap: true, flexWrap: "wrap", component: "ul", className: "vsui-chart-legend", "aria-label": "Legend", children: legend.map((l) => /* @__PURE__ */ jsxs(Stack, { component: "li", direction: "row", spacing: SPACE.xs, alignItems: "center", children: [
|
|
33
|
+
/* @__PURE__ */ jsx("span", { className: "vsui-legend-key", style: { "--vsui-key": l.color }, "aria-hidden": true }),
|
|
34
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", children: l.label })
|
|
35
|
+
] }, l.label)) }),
|
|
36
|
+
/* @__PURE__ */ jsx("div", { className: "vsui-chart-plot", style: { height }, children: state === "loading" ? /* @__PURE__ */ jsx(LoadingState, { label: `Loading ${title.toLowerCase()}\u2026` }) : state === "empty" ? /* @__PURE__ */ jsx(EmptyState, { title: emptyTitle }) : state === "error" ? /* @__PURE__ */ jsx(ErrorState, { description: `${title} could not load.`, onRetry }) : children })
|
|
37
|
+
] });
|
|
38
|
+
}
|
|
39
|
+
function useNivoTheme() {
|
|
40
|
+
const isDark = useIsDarkTheme();
|
|
41
|
+
return React.useMemo(
|
|
42
|
+
() => ({
|
|
43
|
+
background: "transparent",
|
|
44
|
+
text: { fontFamily: "inherit", fontSize: 11, fill: COLOR.text.secondary, outlineWidth: 0, outlineColor: "transparent" },
|
|
45
|
+
axis: {
|
|
46
|
+
domain: { line: { stroke: COLOR.border.primary, strokeWidth: 1 } },
|
|
47
|
+
legend: { text: { fill: COLOR.text.secondary, fontSize: 12, fontWeight: 600 } },
|
|
48
|
+
ticks: { line: { stroke: COLOR.border.primary, strokeWidth: 1 }, text: { fill: COLOR.text.secondary, fontSize: 11 } }
|
|
49
|
+
},
|
|
50
|
+
grid: { line: { stroke: COLOR.border.secondary, strokeWidth: 1, strokeDasharray: "2 2" } },
|
|
51
|
+
legends: { text: { fill: COLOR.text.secondary, fontSize: 11 } },
|
|
52
|
+
labels: { text: { fill: COLOR.text.primary, fontSize: 11, fontWeight: 600 } },
|
|
53
|
+
crosshair: { line: { stroke: COLOR.text.secondary, strokeWidth: 1, strokeOpacity: 0.6, strokeDasharray: "4 4" } },
|
|
54
|
+
tooltip: {
|
|
55
|
+
container: {
|
|
56
|
+
background: COLOR.surface.primary,
|
|
57
|
+
color: COLOR.text.primary,
|
|
58
|
+
fontSize: 12,
|
|
59
|
+
borderRadius: RADIUS_ROLE.surface,
|
|
60
|
+
boxShadow: SHADOW.overlay,
|
|
61
|
+
border: `1px solid ${COLOR.border.primary}`,
|
|
62
|
+
padding: "6px 10px"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}),
|
|
66
|
+
// The tokens are CSS variables, so the theme follows the host; isDark re-renders charts on a switch.
|
|
67
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
68
|
+
[isDark]
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export { ChartCard, chartClassRules, useNivoTheme };
|
|
73
|
+
//# sourceMappingURL=index.js.map
|
|
74
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/charts/charts.theme.ts","../../src/lib/charts/ChartCard.tsx","../../src/lib/charts/useNivoTheme.ts"],"names":[],"mappings":";;;;;;;;AAEO,IAAM,eAAA,GAAkB;AAAA,EAC3B,kBAAA,EAAoB;AAAA,IAChB,MAAA,EAAQ,CAAA,UAAA,EAAa,KAAA,CAAM,MAAA,CAAO,OAAO,CAAA,CAAA;AAAA,IACzC,cAAc,WAAA,CAAY,OAAA;AAAA,IAC1B,eAAA,EAAiB,MAAM,OAAA,CAAQ,OAAA;AAAA,IAC/B,KAAA,EAAO,MAAM,IAAA,CAAK,OAAA;AAAA,IAClB,QAAA,EAAU;AAAA,GACd;AAAA,EACA,sBAAA,EAAwB,EAAE,KAAA,EAAO,KAAA,CAAM,KAAK,SAAA,EAAU;AAAA,EACtD,sBAAsB,EAAE,SAAA,EAAW,QAAQ,MAAA,EAAQ,CAAA,EAAG,SAAS,CAAA,EAAE;AAAA,EACjE,kBAAA,EAAoB,EAAE,KAAA,EAAO,EAAA,EAAI,QAAQ,EAAA,EAAI,YAAA,EAAc,CAAA,EAAG,eAAA,EAAiB,iBAAA,EAAkB;AAAA,EACjG,kBAAA,EAAoB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ACP,UAAA,EAAY,MAAM,OAAA,CAAQ,OAAA;AAAA,UAC1B,KAAA,EAAO,MAAM,IAAA,CAAK,OAAA;AAAA,UAClB,QAAA,EAAU,EAAA;AAAA,UACV,cAAc,WAAA,CAAY,OAAA;AAAA,UAC1B,WAAW,MAAA,CAAO,OAAA;AAAA,UAClB,MAAA,EAAQ,CAAA,UAAA,EAAa,KAAA,CAAM,MAAA,CAAO,OAAO,CAAA,CAAA;AAAA,UACzC,OAAA,EAAS;AAAA;AACb;AACJ,KACJ,CAAA;AAAA;AAAA;AAAA,IAGA,CAAC,MAAM;AAAA,GACX;AACJ","file":"index.js","sourcesContent":["import { COLOR, RADIUS_ROLE } from \"../tokens\";\n\nexport const chartClassRules = {\n \".vsui-chart-card\": {\n border: `1px solid ${COLOR.border.primary}`,\n borderRadius: RADIUS_ROLE.surface,\n backgroundColor: COLOR.surface.primary,\n color: COLOR.text.primary,\n minWidth: 0,\n },\n \".vsui-chart-subtitle\": { color: COLOR.text.secondary },\n \".vsui-chart-legend\": { listStyle: \"none\", margin: 0, padding: 0 },\n \".vsui-legend-key\": { width: 10, height: 10, borderRadius: 2, backgroundColor: \"var(--vsui-key)\" },\n \".vsui-chart-plot\": { position: \"relative\", minWidth: 0 },\n} as const;\n","import { GlobalStyles, Stack, Typography } from \"@mui/material\";\nimport type * as React from \"react\";\n\nimport { EmptyState, ErrorState, LoadingState } from \"../components/feedback\";\nimport { SPACE } from \"../tokens\";\nimport { chartClassRules } from \"./charts.theme\";\n\nexport interface LegendItem {\n label: string;\n color: string;\n}\n\nexport interface ChartCardProps {\n title: string;\n subtitle?: string;\n /** IconButtons at the top right (export, full screen). */\n actions?: React.ReactNode;\n /** Series shown under the title. Required for 2+ series (colour is never the only cue). */\n legend?: LegendItem[];\n /** Plot height in px. Default 240. */\n height?: number;\n state?: \"ready\" | \"loading\" | \"empty\" | \"error\";\n emptyTitle?: string;\n onRetry?: () => void;\n /** A Nivo Responsive* chart using useNivoTheme(). */\n children: React.ReactNode;\n className?: string;\n}\n\n/** The frame for every chart: title, legend, plot area, and loading / empty / error. */\nexport function ChartCard({ title, subtitle, actions, legend, height = 240, state = \"ready\", emptyTitle = \"No data for this selection\", onRetry, children, className }: ChartCardProps): React.ReactElement {\n return (\n <Stack spacing={SPACE.sm} padding={SPACE.md} className={[\"vsui-chart-card\", className].filter(Boolean).join(\" \")}>\n <GlobalStyles styles={chartClassRules} />\n <Stack direction=\"row\" alignItems=\"flex-start\" spacing={SPACE.sm}>\n <Stack flex={1} minWidth={0}>\n <Typography variant=\"subtitle2\" component=\"h3\">\n {title}\n </Typography>\n {subtitle && (\n <Typography variant=\"caption\" className=\"vsui-chart-subtitle\">\n {subtitle}\n </Typography>\n )}\n </Stack>\n {actions}\n </Stack>\n {legend && legend.length > 1 && (\n <Stack direction=\"row\" spacing={SPACE.md} useFlexGap flexWrap=\"wrap\" component=\"ul\" className=\"vsui-chart-legend\" aria-label=\"Legend\">\n {legend.map(l => (\n <Stack key={l.label} component=\"li\" direction=\"row\" spacing={SPACE.xs} alignItems=\"center\">\n <span className=\"vsui-legend-key\" style={{ \"--vsui-key\": l.color } as React.CSSProperties} aria-hidden />\n <Typography variant=\"caption\">{l.label}</Typography>\n </Stack>\n ))}\n </Stack>\n )}\n <div className=\"vsui-chart-plot\" style={{ height }}>\n {state === \"loading\" ? (\n <LoadingState label={`Loading ${title.toLowerCase()}…`} />\n ) : state === \"empty\" ? (\n <EmptyState title={emptyTitle} />\n ) : state === \"error\" ? (\n <ErrorState description={`${title} could not load.`} onRetry={onRetry} />\n ) : (\n children\n )}\n </div>\n </Stack>\n );\n}\n","import type { PartialTheme } from \"@nivo/theming\";\nimport * as React from \"react\";\n\nimport { useIsDarkTheme } from \"../theme\";\nimport { COLOR, RADIUS_ROLE, SHADOW } from \"../tokens\";\n\n/** The one Nivo theme: host text colours, 11–12px text, recessive dashed grid, vsw-ui tooltip. Pass to `theme`. */\nexport function useNivoTheme(): PartialTheme {\n const isDark = useIsDarkTheme();\n return React.useMemo<PartialTheme>(\n () => ({\n background: \"transparent\",\n text: { fontFamily: \"inherit\", fontSize: 11, fill: COLOR.text.secondary, outlineWidth: 0, outlineColor: \"transparent\" },\n axis: {\n domain: { line: { stroke: COLOR.border.primary, strokeWidth: 1 } },\n legend: { text: { fill: COLOR.text.secondary, fontSize: 12, fontWeight: 600 } },\n ticks: { line: { stroke: COLOR.border.primary, strokeWidth: 1 }, text: { fill: COLOR.text.secondary, fontSize: 11 } },\n },\n grid: { line: { stroke: COLOR.border.secondary, strokeWidth: 1, strokeDasharray: \"2 2\" } },\n legends: { text: { fill: COLOR.text.secondary, fontSize: 11 } },\n labels: { text: { fill: COLOR.text.primary, fontSize: 11, fontWeight: 600 } },\n crosshair: { line: { stroke: COLOR.text.secondary, strokeWidth: 1, strokeOpacity: 0.6, strokeDasharray: \"4 4\" } },\n tooltip: {\n container: {\n background: COLOR.surface.primary,\n color: COLOR.text.primary,\n fontSize: 12,\n borderRadius: RADIUS_ROLE.surface,\n boxShadow: SHADOW.overlay,\n border: `1px solid ${COLOR.border.primary}`,\n padding: \"6px 10px\",\n },\n },\n }),\n // The tokens are CSS variables, so the theme follows the host; isDark re-renders charts on a switch.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [isDark]\n );\n}\n"]}
|