@sybilion/uilib 1.0.20
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/README.md +138 -0
- package/dist/esm/assets/doc-4d8d38268d07c83e.png +0 -0
- package/dist/esm/assets/xls-d1595343260dd096.png +0 -0
- package/dist/esm/components/ui/AnalysesSelector/AnalysesSelector.js +188 -0
- package/dist/esm/components/ui/AnalysesSelector/AnalysesSelector.styl.js +7 -0
- package/dist/esm/components/ui/AnalysisLineIcon/AnalysisLineIcon.js +11 -0
- package/dist/esm/components/ui/AnalysisLineIcon/AnalysisLineIcon.styl.js +7 -0
- package/dist/esm/components/ui/AppHeader/AppHeader.js +22 -0
- package/dist/esm/components/ui/AppHeader/AppHeader.styl.js +7 -0
- package/dist/esm/components/ui/AppHeader/appChromeAnchors.js +4 -0
- package/dist/esm/components/ui/Avatar/Avatar.js +16 -0
- package/dist/esm/components/ui/Avatar/Avatar.styl.js +7 -0
- package/dist/esm/components/ui/Badge/Badge.js +11 -0
- package/dist/esm/components/ui/Badge/Badge.styl.js +7 -0
- package/dist/esm/components/ui/Breadcrumb/Breadcrumb.js +30 -0
- package/dist/esm/components/ui/Breadcrumb/Breadcrumb.styl.js +7 -0
- package/dist/esm/components/ui/Button/Button.js +12 -0
- package/dist/esm/components/ui/Button/Button.styl.js +7 -0
- package/dist/esm/components/ui/Card/Card.js +57 -0
- package/dist/esm/components/ui/Card/Card.styl.js +7 -0
- package/dist/esm/components/ui/Chart/Chart.context.js +11 -0
- package/dist/esm/components/ui/Chart/Chart.helpers.js +9 -0
- package/dist/esm/components/ui/Chart/Chart.js +23 -0
- package/dist/esm/components/ui/Chart/Chart.styl.js +7 -0
- package/dist/esm/components/ui/Chart/Chart.types.js +3 -0
- package/dist/esm/components/ui/Chart/components/BaseChartWrapper.js +473 -0
- package/dist/esm/components/ui/Chart/components/BaseChartWrapper.styl.js +7 -0
- package/dist/esm/components/ui/Chart/components/ChartAxes.js +52 -0
- package/dist/esm/components/ui/Chart/components/ChartContainer.js +31 -0
- package/dist/esm/components/ui/Chart/components/ChartGrid.js +9 -0
- package/dist/esm/components/ui/Chart/components/ChartLegendContent.js +17 -0
- package/dist/esm/components/ui/Chart/components/ChartLegendItem.js +13 -0
- package/dist/esm/components/ui/Chart/components/ChartTooltipContent.js +74 -0
- package/dist/esm/components/ui/Chart/components/ChartTooltipItem.js +26 -0
- package/dist/esm/components/ui/Chart/components/CustomChartLegend/CustomChartLegend.js +64 -0
- package/dist/esm/components/ui/Chart/components/CustomChartLegend/CustomChartLegend.styl.js +7 -0
- package/dist/esm/components/ui/Chart/components/LegendSvg/LegendSvg.js +19 -0
- package/dist/esm/components/ui/Chart/components/QuantileBands.js +23 -0
- package/dist/esm/components/ui/Chart/tools/formatters.js +81 -0
- package/dist/esm/components/ui/ChartAreaInteractive/ChartAreaInteractive.helpers.js +15 -0
- package/dist/esm/components/ui/ChartAreaInteractive/ChartAreaInteractive.js +103 -0
- package/dist/esm/components/ui/ChartAreaInteractive/ChartAreaInteractive.styl.js +7 -0
- package/dist/esm/components/ui/ChartAreaInteractive/ChartLines.js +81 -0
- package/dist/esm/components/ui/ChartAreaInteractive/overlays/IntervalsOverlay/IntervalsOverlay.hooks.js +134 -0
- package/dist/esm/components/ui/ChartAreaInteractive/overlays/IntervalsOverlay/IntervalsOverlay.js +257 -0
- package/dist/esm/components/ui/ChartAreaInteractive/overlays/IntervalsOverlay/IntervalsOverlay.styl.js +7 -0
- package/dist/esm/components/ui/ChartAreaInteractive/overlays/PinOverlay/PinOverlay.js +165 -0
- package/dist/esm/components/ui/ChartAreaInteractive/overlays/PinOverlay/PinOverlay.styl.js +7 -0
- package/dist/esm/components/ui/ChartAreaInteractive/overlays/ThresholdsOverlay/ThresholdsOverlay.hooks.js +113 -0
- package/dist/esm/components/ui/ChartAreaInteractive/overlays/ThresholdsOverlay/ThresholdsOverlay.js +114 -0
- package/dist/esm/components/ui/ChartAreaInteractive/overlays/ThresholdsOverlay/ThresholdsOverlay.styl.js +7 -0
- package/dist/esm/components/ui/ChartAreaInteractive/overlays/useChartYRange.js +155 -0
- package/dist/esm/components/ui/ChartAreaInteractive/overlays/useForecastColor.js +33 -0
- package/dist/esm/components/ui/ChartAreaInteractive/overlays/useQuantileBands.js +170 -0
- package/dist/esm/components/ui/Chat/Chat.js +17 -0
- package/dist/esm/components/ui/Chat/Chat.styl.js +7 -0
- package/dist/esm/components/ui/Chat/Chat.types.js +10 -0
- package/dist/esm/components/ui/Chat/ChatChrome/ChatChrome.js +31 -0
- package/dist/esm/components/ui/Chat/ChatChrome/ChatChrome.styl.js +7 -0
- package/dist/esm/components/ui/Chat/ChatEmptyState/ChatEmptyState.js +8 -0
- package/dist/esm/components/ui/Chat/ChatEmptyState/ChatEmptyState.styl.js +7 -0
- package/dist/esm/components/ui/Chat/ChatMessage/AgentMessageContent.helpers.js +312 -0
- package/dist/esm/components/ui/Chat/ChatMessage/AgentMessageContent.js +133 -0
- package/dist/esm/components/ui/Chat/ChatMessage/ChatDatasetApplicationLink.js +23 -0
- package/dist/esm/components/ui/Chat/ChatMessage/ChatMessage.js +14 -0
- package/dist/esm/components/ui/Chat/ChatMessage/ChatMessage.styl.js +7 -0
- package/dist/esm/components/ui/Chat/ChatMessage/icons/DocIcon.js +8 -0
- package/dist/esm/components/ui/Chat/ChatMessage/icons/XlsIcon.js +8 -0
- package/dist/esm/components/ui/Chat/ChatMessage/icons/doc.png.js +3 -0
- package/dist/esm/components/ui/Chat/ChatMessage/icons/xls.png.js +3 -0
- package/dist/esm/components/ui/Chat/ChatMessage/presetScript.js +187 -0
- package/dist/esm/components/ui/Chat/ChatPresets/ChatPresets.js +23 -0
- package/dist/esm/components/ui/Chat/ChatPresets/ChatPresets.styl.js +7 -0
- package/dist/esm/components/ui/Chat/ChatPrompt/ChatPrompt.js +48 -0
- package/dist/esm/components/ui/Chat/ChatPrompt/ChatPrompt.styl.js +7 -0
- package/dist/esm/components/ui/Chat/ChatSheet/ChatSelector.js +29 -0
- package/dist/esm/components/ui/Chat/ChatSheet/ChatSheet.js +34 -0
- package/dist/esm/components/ui/Chat/ChatSheet/useChatPanelChromeModel.js +800 -0
- package/dist/esm/components/ui/Chat/chat-preset-utils.js +22 -0
- package/dist/esm/components/ui/Checkbox/Checkbox.js +11 -0
- package/dist/esm/components/ui/Checkbox/Checkbox.styl.js +7 -0
- package/dist/esm/components/ui/Dialog/Dialog.js +126 -0
- package/dist/esm/components/ui/Dialog/Dialog.styl.js +7 -0
- package/dist/esm/components/ui/DraggingButton/DraggingButton.js +11 -0
- package/dist/esm/components/ui/DraggingButton/DraggingButton.styl.js +7 -0
- package/dist/esm/components/ui/Drawer/Drawer.js +37 -0
- package/dist/esm/components/ui/Drawer/Drawer.styl.js +7 -0
- package/dist/esm/components/ui/DropZone/DropZone.js +112 -0
- package/dist/esm/components/ui/DropZone/DropZone.styl.js +7 -0
- package/dist/esm/components/ui/DropdownMenu/DropdownMenu.js +53 -0
- package/dist/esm/components/ui/DropdownMenu/DropdownMenu.styl.js +7 -0
- package/dist/esm/components/ui/FlickeringGrid/FlickeringGrid.js +8 -0
- package/dist/esm/components/ui/FlickeringGrid/FlickeringGrid.styl.js +7 -0
- package/dist/esm/components/ui/Foldable/Foldable.js +15 -0
- package/dist/esm/components/ui/Foldable/Foldable.styl.js +7 -0
- package/dist/esm/components/ui/Gap/Gap.js +6 -0
- package/dist/esm/components/ui/Gap/Gap.styl.js +7 -0
- package/dist/esm/components/ui/Image/Image.js +17 -0
- package/dist/esm/components/ui/Image/Image.styl.js +7 -0
- package/dist/esm/components/ui/ImageWithFallback/ImageWithFallback.js +19 -0
- package/dist/esm/components/ui/Input/Input.js +14 -0
- package/dist/esm/components/ui/Input/Input.styl.js +7 -0
- package/dist/esm/components/ui/InteractionOverlay/InteractionOverlay.js +35 -0
- package/dist/esm/components/ui/InteractionOverlay/InteractionOverlay.styl.js +7 -0
- package/dist/esm/components/ui/InteractiveContent/InteractiveContent.js +10 -0
- package/dist/esm/components/ui/InteractiveContent/InteractiveContent.styl.js +7 -0
- package/dist/esm/components/ui/Label/Label.js +10 -0
- package/dist/esm/components/ui/Label/Label.styl.js +7 -0
- package/dist/esm/components/ui/LabelWithId/AltKeyProvider.js +22 -0
- package/dist/esm/components/ui/LabelWithId/LabelWithId.js +9 -0
- package/dist/esm/components/ui/LabelWithId/LabelWithId.styl.js +7 -0
- package/dist/esm/components/ui/LabeledInput/LabeledInput.js +12 -0
- package/dist/esm/components/ui/LabeledInput/LabeledInput.styl.js +7 -0
- package/dist/esm/components/ui/LegacyPlatformLink/LegacyPlatformLink.js +10 -0
- package/dist/esm/components/ui/LegacyPlatformLink/LegacyPlatformLink.styl.js +7 -0
- package/dist/esm/components/ui/Logo/Logo.js +9 -0
- package/dist/esm/components/ui/Logo/Logo.styl.js +7 -0
- package/dist/esm/components/ui/MobileAdaptiveSelector/MobileAdaptiveSelector.js +23 -0
- package/dist/esm/components/ui/MobileAdaptiveSelector/MobileAdaptiveSelector.styl.js +7 -0
- package/dist/esm/components/ui/NumberControl/NumberControl.js +26 -0
- package/dist/esm/components/ui/NumberControl/NumberControl.styl.js +7 -0
- package/dist/esm/components/ui/Page/AppShell/AppShell.js +14 -0
- package/dist/esm/components/ui/Page/AppShell/AppShell.styl.js +7 -0
- package/dist/esm/components/ui/Page/Breadcrumbs/Breadcrumbs.js +22 -0
- package/dist/esm/components/ui/Page/Breadcrumbs/Breadcrumbs.styl.js +7 -0
- package/dist/esm/components/ui/Page/PageColumns/PageColumns.js +9 -0
- package/dist/esm/components/ui/Page/PageColumns/PageColumns.styl.js +7 -0
- package/dist/esm/components/ui/Page/PageContent/PageContent.js +12 -0
- package/dist/esm/components/ui/Page/PageContent/PageContent.styl.js +7 -0
- package/dist/esm/components/ui/Page/PageEmptyCanvas/PageEmptyCanvas.js +8 -0
- package/dist/esm/components/ui/Page/PageEmptyCanvas/PageEmptyCanvas.styl.js +7 -0
- package/dist/esm/components/ui/Page/PageFooter/PageFooter.js +10 -0
- package/dist/esm/components/ui/Page/PageFooter/PageFooter.styl.js +7 -0
- package/dist/esm/components/ui/Page/PageHeader/PageHeader.js +14 -0
- package/dist/esm/components/ui/Page/PageHeader/PageHeader.styl.js +7 -0
- package/dist/esm/components/ui/Page/PageScroll/PageScroll.js +37 -0
- package/dist/esm/components/ui/Page/PageScroll/PageScroll.styl.js +7 -0
- package/dist/esm/components/ui/Page/PageTabs/PageTabs.js +22 -0
- package/dist/esm/components/ui/Page/PageTabs/PageTabs.styl.js +7 -0
- package/dist/esm/components/ui/Page/PageXScroll/PageXScroll.js +34 -0
- package/dist/esm/components/ui/Page/PageXScroll/PageXScroll.styl.js +7 -0
- package/dist/esm/components/ui/Page/SectionHeader/SectionHeader.js +9 -0
- package/dist/esm/components/ui/Page/SectionHeader/SectionHeader.styl.js +7 -0
- package/dist/esm/components/ui/Page/pageContext.js +8 -0
- package/dist/esm/components/ui/Progress/Progress.js +10 -0
- package/dist/esm/components/ui/Progress/Progress.styl.js +7 -0
- package/dist/esm/components/ui/RegionCoords/RegionSelector.js +22 -0
- package/dist/esm/components/ui/RegionCoords/RegionSelector.styl.js +7 -0
- package/dist/esm/components/ui/Renamer/Renamer.js +61 -0
- package/dist/esm/components/ui/Renamer/Renamer.styl.js +7 -0
- package/dist/esm/components/ui/Select/Select.js +35 -0
- package/dist/esm/components/ui/Select/Select.styl.js +7 -0
- package/dist/esm/components/ui/Separator/Separator.js +10 -0
- package/dist/esm/components/ui/Separator/Separator.styl.js +7 -0
- package/dist/esm/components/ui/Sheet/Sheet.js +41 -0
- package/dist/esm/components/ui/Sheet/Sheet.styl.js +7 -0
- package/dist/esm/components/ui/Sidebar/Sidebar.js +448 -0
- package/dist/esm/components/ui/Sidebar/Sidebar.styl.js +7 -0
- package/dist/esm/components/ui/Skeleton/Skeleton.js +9 -0
- package/dist/esm/components/ui/Skeleton/Skeleton.styl.js +7 -0
- package/dist/esm/components/ui/Slider/Slider.js +123 -0
- package/dist/esm/components/ui/Slider/Slider.styl.js +7 -0
- package/dist/esm/components/ui/SmartTextTruncate/SmartTextTruncate.js +98 -0
- package/dist/esm/components/ui/Sparkline/Sparkline.helpers.js +11 -0
- package/dist/esm/components/ui/Sparkline/Sparkline.js +27 -0
- package/dist/esm/components/ui/Sparkline/Sparkline.styl.js +7 -0
- package/dist/esm/components/ui/Switch/Switch.js +17 -0
- package/dist/esm/components/ui/Switch/Switch.styl.js +7 -0
- package/dist/esm/components/ui/Table/Table.js +30 -0
- package/dist/esm/components/ui/Table/Table.styl.js +7 -0
- package/dist/esm/components/ui/Tabs/Tabs.js +19 -0
- package/dist/esm/components/ui/Tabs/Tabs.styl.js +7 -0
- package/dist/esm/components/ui/TextShimmer/TextShimmer.js +31 -0
- package/dist/esm/components/ui/TextShimmer/TextShimmer.styl.js +7 -0
- package/dist/esm/components/ui/TextWithDeferTooltip/TextWithDeferTooltip.js +48 -0
- package/dist/esm/components/ui/TimeRangeControls/TimeRangeControls.constants.js +3 -0
- package/dist/esm/components/ui/TimeRangeControls/TimeRangeControls.js +13 -0
- package/dist/esm/components/ui/TimeRangeControls/TimeRangeControls.styl.js +7 -0
- package/dist/esm/components/ui/Toggle/Toggle.js +10 -0
- package/dist/esm/components/ui/Toggle/Toggle.styl.js +7 -0
- package/dist/esm/components/ui/ToggleGroup/ToggleGroup.helpers.js +12 -0
- package/dist/esm/components/ui/ToggleGroup/ToggleGroup.js +19 -0
- package/dist/esm/components/ui/ToggleGroup/ToggleGroup.styl.js +7 -0
- package/dist/esm/components/ui/Tooltip/Tooltip.js +22 -0
- package/dist/esm/components/ui/Tooltip/Tooltip.styl.js +7 -0
- package/dist/esm/components/ui/VimeoEmbed/VimeoEmbed.js +137 -0
- package/dist/esm/components/ui/VimeoEmbed/VimeoEmbed.styl.js +7 -0
- package/dist/esm/constants/dataset.js +4 -0
- package/dist/esm/contexts/chat-context.js +297 -0
- package/dist/esm/hooks/panelWidth.js +46 -0
- package/dist/esm/hooks/useDebounceCallback.js +14 -0
- package/dist/esm/hooks/useDragElem.js +115 -0
- package/dist/esm/hooks/useEvent.js +52 -0
- package/dist/esm/hooks/useIsMobile.js +18 -0
- package/dist/esm/hooks/useIsTouchDevice.js +43 -0
- package/dist/esm/hooks/useQueryParams.js +40 -0
- package/dist/esm/hooks/useShellWidthObserver.js +23 -0
- package/dist/esm/hooks/useThrottledCallback.js +28 -0
- package/dist/esm/index.js +83 -0
- package/dist/esm/lib/cookie-consent/cookie-consent.js +63 -0
- package/dist/esm/lib/cookie.js +22 -0
- package/dist/esm/lib/dashboard-spec/stripJsonDashboardFences.js +7 -0
- package/dist/esm/lib/logger.js +10 -0
- package/dist/esm/tools/debounce.js +41 -0
- package/dist/esm/tools/env.js +7 -0
- package/dist/esm/types/index.d.ts +1 -0
- package/dist/esm/types/node_modules/@reduxjs/toolkit/dist/uncheckedindexed.d.ts +5 -0
- package/dist/esm/types/node_modules/@vimeo/player/types/errors.d.ts +28 -0
- package/dist/esm/types/node_modules/@vimeo/player/types/events.d.ts +144 -0
- package/dist/esm/types/node_modules/@vimeo/player/types/formats.d.ts +406 -0
- package/dist/esm/types/src/components/ui/AnalysesSelector/AnalysesSelector.d.ts +2 -0
- package/dist/esm/types/src/components/ui/AnalysesSelector/AnalysesSelector.types.d.ts +38 -0
- package/dist/esm/types/src/components/ui/AnalysesSelector/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/AnalysisLineIcon/AnalysisLineIcon.d.ts +6 -0
- package/dist/esm/types/src/components/ui/AnalysisLineIcon/index.d.ts +1 -0
- package/dist/esm/types/src/components/ui/AppHeader/AppHeader.d.ts +11 -0
- package/dist/esm/types/src/components/ui/AppHeader/appChromeAnchors.d.ts +2 -0
- package/dist/esm/types/src/components/ui/AppHeader/index.d.ts +3 -0
- package/dist/esm/types/src/components/ui/Avatar/Avatar.d.ts +5 -0
- package/dist/esm/types/src/components/ui/Avatar/Avatar.types.d.ts +9 -0
- package/dist/esm/types/src/components/ui/Avatar/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Badge/Badge.d.ts +3 -0
- package/dist/esm/types/src/components/ui/Badge/Badge.types.d.ts +6 -0
- package/dist/esm/types/src/components/ui/Badge/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Breadcrumb/Breadcrumb.d.ts +9 -0
- package/dist/esm/types/src/components/ui/Breadcrumb/Breadcrumb.types.d.ts +15 -0
- package/dist/esm/types/src/components/ui/Breadcrumb/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Button/Button.d.ts +3 -0
- package/dist/esm/types/src/components/ui/Button/Button.types.d.ts +8 -0
- package/dist/esm/types/src/components/ui/Button/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Card/Card.d.ts +11 -0
- package/dist/esm/types/src/components/ui/Card/Card.types.d.ts +29 -0
- package/dist/esm/types/src/components/ui/Card/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Chart/Chart.context.d.ts +3 -0
- package/dist/esm/types/src/components/ui/Chart/Chart.d.ts +12 -0
- package/dist/esm/types/src/components/ui/Chart/Chart.helpers.d.ts +11 -0
- package/dist/esm/types/src/components/ui/Chart/Chart.types.d.ts +34 -0
- package/dist/esm/types/src/components/ui/Chart/chartForecastVisualization.constants.d.ts +21 -0
- package/dist/esm/types/src/components/ui/Chart/chartForecastVisualization.types.d.ts +84 -0
- package/dist/esm/types/src/components/ui/Chart/components/ActiveDotsLayer/ActiveDotsLayer.d.ts +11 -0
- package/dist/esm/types/src/components/ui/Chart/components/BaseChartWrapper.d.ts +79 -0
- package/dist/esm/types/src/components/ui/Chart/components/ChartAxes.d.ts +15 -0
- package/dist/esm/types/src/components/ui/Chart/components/ChartContainer.d.ts +11 -0
- package/dist/esm/types/src/components/ui/Chart/components/ChartGrid.d.ts +1 -0
- package/dist/esm/types/src/components/ui/Chart/components/ChartLegendContent.d.ts +7 -0
- package/dist/esm/types/src/components/ui/Chart/components/ChartLegendItem.d.ts +15 -0
- package/dist/esm/types/src/components/ui/Chart/components/ChartTooltipContent.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Chart/components/ChartTooltipItem.d.ts +24 -0
- package/dist/esm/types/src/components/ui/Chart/components/ConfidenceBands.d.ts +7 -0
- package/dist/esm/types/src/components/ui/Chart/components/CustomChartLegend/CustomChartLegend.d.ts +31 -0
- package/dist/esm/types/src/components/ui/Chart/components/ForecastBoundaries.d.ts +8 -0
- package/dist/esm/types/src/components/ui/Chart/components/ForecastLine.d.ts +12 -0
- package/dist/esm/types/src/components/ui/Chart/components/HistoricalLine.d.ts +12 -0
- package/dist/esm/types/src/components/ui/Chart/components/LegendSvg/LegendSvg.d.ts +12 -0
- package/dist/esm/types/src/components/ui/Chart/components/QuantileBands.d.ts +18 -0
- package/dist/esm/types/src/components/ui/Chart/components/index.d.ts +12 -0
- package/dist/esm/types/src/components/ui/Chart/hooks/useChartAnimation.d.ts +5 -0
- package/dist/esm/types/src/components/ui/Chart/hooks/useChartColors.d.ts +12 -0
- package/dist/esm/types/src/components/ui/Chart/hooks/useLegendState.d.ts +10 -0
- package/dist/esm/types/src/components/ui/Chart/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Chart/tools/formatters.d.ts +21 -0
- package/dist/esm/types/src/components/ui/ChartAreaInteractive/ChartAreaInteractive.d.ts +3 -0
- package/dist/esm/types/src/components/ui/ChartAreaInteractive/ChartAreaInteractive.helpers.d.ts +31 -0
- package/dist/esm/types/src/components/ui/ChartAreaInteractive/ChartAreaInteractive.types.d.ts +63 -0
- package/dist/esm/types/src/components/ui/ChartAreaInteractive/ChartLines.d.ts +45 -0
- package/dist/esm/types/src/components/ui/ChartAreaInteractive/index.d.ts +3 -0
- package/dist/esm/types/src/components/ui/ChartAreaInteractive/overlays/IntervalsOverlay/IntervalsOverlay.d.ts +17 -0
- package/dist/esm/types/src/components/ui/ChartAreaInteractive/overlays/IntervalsOverlay/IntervalsOverlay.hooks.d.ts +15 -0
- package/dist/esm/types/src/components/ui/ChartAreaInteractive/overlays/PinOverlay/PinOverlay.d.ts +10 -0
- package/dist/esm/types/src/components/ui/ChartAreaInteractive/overlays/ThresholdsOverlay/ThresholdsOverlay.d.ts +19 -0
- package/dist/esm/types/src/components/ui/ChartAreaInteractive/overlays/ThresholdsOverlay/ThresholdsOverlay.hooks.d.ts +15 -0
- package/dist/esm/types/src/components/ui/ChartAreaInteractive/overlays/index.d.ts +3 -0
- package/dist/esm/types/src/components/ui/ChartAreaInteractive/overlays/useChartYRange.d.ts +18 -0
- package/dist/esm/types/src/components/ui/ChartAreaInteractive/overlays/useForecastColor.d.ts +10 -0
- package/dist/esm/types/src/components/ui/ChartAreaInteractive/overlays/useQuantileBands.d.ts +22 -0
- package/dist/esm/types/src/components/ui/Chat/Chat.d.ts +12 -0
- package/dist/esm/types/src/components/ui/Chat/Chat.types.d.ts +80 -0
- package/dist/esm/types/src/components/ui/Chat/ChatChrome/ChatChrome.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Chat/ChatChrome/ChatChrome.types.d.ts +45 -0
- package/dist/esm/types/src/components/ui/Chat/ChatChrome/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Chat/ChatEmptyState/ChatEmptyState.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Chat/ChatEmptyState/ChatEmptyState.types.d.ts +5 -0
- package/dist/esm/types/src/components/ui/Chat/ChatMessage/AgentMessageContent.d.ts +13 -0
- package/dist/esm/types/src/components/ui/Chat/ChatMessage/AgentMessageContent.helpers.d.ts +31 -0
- package/dist/esm/types/src/components/ui/Chat/ChatMessage/ChatDatasetApplicationLink.d.ts +5 -0
- package/dist/esm/types/src/components/ui/Chat/ChatMessage/ChatMessage.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Chat/ChatMessage/MessageChart.d.ts +9 -0
- package/dist/esm/types/src/components/ui/Chat/ChatMessage/icons/DocIcon.d.ts +3 -0
- package/dist/esm/types/src/components/ui/Chat/ChatMessage/icons/XlsIcon.d.ts +3 -0
- package/dist/esm/types/src/components/ui/Chat/ChatMessage/index.d.ts +1 -0
- package/dist/esm/types/src/components/ui/Chat/ChatMessage/presetScript.d.ts +55 -0
- package/dist/esm/types/src/components/ui/Chat/ChatPresets/ChatPresets.d.ts +11 -0
- package/dist/esm/types/src/components/ui/Chat/ChatPresets/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Chat/ChatPrompt/ChatPrompt.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Chat/ChatPrompt/index.d.ts +1 -0
- package/dist/esm/types/src/components/ui/Chat/ChatSheet/ChatSelector.d.ts +5 -0
- package/dist/esm/types/src/components/ui/Chat/ChatSheet/ChatSettings.d.ts +5 -0
- package/dist/esm/types/src/components/ui/Chat/ChatSheet/ChatSheet.d.ts +22 -0
- package/dist/esm/types/src/components/ui/Chat/ChatSheet/index.d.ts +3 -0
- package/dist/esm/types/src/components/ui/Chat/ChatSheet/useChatPanelChromeModel.d.ts +25 -0
- package/dist/esm/types/src/components/ui/Chat/chat-preset-utils.d.ts +6 -0
- package/dist/esm/types/src/components/ui/Chat/index.d.ts +13 -0
- package/dist/esm/types/src/components/ui/Checkbox/Checkbox.d.ts +3 -0
- package/dist/esm/types/src/components/ui/Checkbox/Checkbox.types.d.ts +3 -0
- package/dist/esm/types/src/components/ui/Checkbox/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Dialog/Dialog.d.ts +3 -0
- package/dist/esm/types/src/components/ui/Dialog/Dialog.types.d.ts +26 -0
- package/dist/esm/types/src/components/ui/Dialog/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/DraggingButton/DraggingButton.d.ts +12 -0
- package/dist/esm/types/src/components/ui/Drawer/Drawer.d.ts +12 -0
- package/dist/esm/types/src/components/ui/Drawer/Drawer.types.d.ts +30 -0
- package/dist/esm/types/src/components/ui/Drawer/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/DropZone/DropZone.d.ts +20 -0
- package/dist/esm/types/src/components/ui/DropdownMenu/DropdownMenu.d.ts +17 -0
- package/dist/esm/types/src/components/ui/DropdownMenu/DropdownMenu.types.d.ts +36 -0
- package/dist/esm/types/src/components/ui/DropdownMenu/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/FlickeringGrid/FlickeringGrid.d.ts +3 -0
- package/dist/esm/types/src/components/ui/FlickeringGrid/FlickeringGrid.types.d.ts +10 -0
- package/dist/esm/types/src/components/ui/FlickeringGrid/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Foldable/Foldable.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Foldable/Foldable.types.d.ts +6 -0
- package/dist/esm/types/src/components/ui/Foldable/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Gap/Gap.d.ts +1 -0
- package/dist/esm/types/src/components/ui/Image/Image.d.ts +3 -0
- package/dist/esm/types/src/components/ui/Image/Image.types.d.ts +5 -0
- package/dist/esm/types/src/components/ui/Image/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/ImageWithFallback/ImageWithFallback.d.ts +2 -0
- package/dist/esm/types/src/components/ui/ImageWithFallback/ImageWithFallback.types.d.ts +5 -0
- package/dist/esm/types/src/components/ui/ImageWithFallback/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/InfoIconTooltip/InfoIconTooltip.d.ts +3 -0
- package/dist/esm/types/src/components/ui/Input/Input.d.ts +11 -0
- package/dist/esm/types/src/components/ui/Input/Input.types.d.ts +9 -0
- package/dist/esm/types/src/components/ui/Input/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/InteractionOverlay/InteractionOverlay.d.ts +6 -0
- package/dist/esm/types/src/components/ui/InteractiveContent/InteractiveContent.d.ts +6 -0
- package/dist/esm/types/src/components/ui/InteractiveContent/index.d.ts +1 -0
- package/dist/esm/types/src/components/ui/Label/Label.d.ts +3 -0
- package/dist/esm/types/src/components/ui/Label/Label.types.d.ts +3 -0
- package/dist/esm/types/src/components/ui/Label/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/LabelWithId/AltKeyProvider.d.ts +3 -0
- package/dist/esm/types/src/components/ui/LabelWithId/LabelWithId.d.ts +2 -0
- package/dist/esm/types/src/components/ui/LabelWithId/LabelWithId.types.d.ts +5 -0
- package/dist/esm/types/src/components/ui/LabelWithId/index.d.ts +3 -0
- package/dist/esm/types/src/components/ui/LabeledInput/LabeledInput.d.ts +12 -0
- package/dist/esm/types/src/components/ui/LabledCheckbox/LabledCheckbox.d.ts +6 -0
- package/dist/esm/types/src/components/ui/LegacyPlatformLink/LegacyPlatformLink.d.ts +2 -0
- package/dist/esm/types/src/components/ui/LegacyPlatformLink/LegacyPlatformLink.types.d.ts +4 -0
- package/dist/esm/types/src/components/ui/LegacyPlatformLink/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Logo/Logo.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Logo/Logo.types.d.ts +7 -0
- package/dist/esm/types/src/components/ui/Logo/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/MobileAdaptiveSelector/MobileAdaptiveSelector.d.ts +2 -0
- package/dist/esm/types/src/components/ui/MobileAdaptiveSelector/MobileAdaptiveSelector.types.d.ts +18 -0
- package/dist/esm/types/src/components/ui/MobileAdaptiveSelector/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/NumberControl/NumberControl.d.ts +2 -0
- package/dist/esm/types/src/components/ui/NumberControl/NumberControl.types.d.ts +7 -0
- package/dist/esm/types/src/components/ui/NumberControl/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Page/AppShell/AppShell.d.ts +13 -0
- package/dist/esm/types/src/components/ui/Page/Breadcrumbs/Breadcrumbs.d.ts +15 -0
- package/dist/esm/types/src/components/ui/Page/Breadcrumbs/Breadcrumbs.types.d.ts +4 -0
- package/dist/esm/types/src/components/ui/Page/PageColumns/PageColumns.d.ts +5 -0
- package/dist/esm/types/src/components/ui/Page/PageContent/PageContent.d.ts +9 -0
- package/dist/esm/types/src/components/ui/Page/PageEmptyCanvas/PageEmptyCanvas.d.ts +6 -0
- package/dist/esm/types/src/components/ui/Page/PageFooter/PageFooter.d.ts +16 -0
- package/dist/esm/types/src/components/ui/Page/PageHeader/PageHeader.d.ts +11 -0
- package/dist/esm/types/src/components/ui/Page/PageScroll/PageScroll.d.ts +4 -0
- package/dist/esm/types/src/components/ui/Page/PageTabs/PageTabs.d.ts +14 -0
- package/dist/esm/types/src/components/ui/Page/PageXScroll/PageXScroll.d.ts +11 -0
- package/dist/esm/types/src/components/ui/Page/SectionHeader/SectionHeader.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Page/SectionHeader/SectionHeader.types.d.ts +7 -0
- package/dist/esm/types/src/components/ui/Page/SectionHeader/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Page/index.d.ts +13 -0
- package/dist/esm/types/src/components/ui/Page/pageContext.d.ts +4 -0
- package/dist/esm/types/src/components/ui/Progress/Progress.d.ts +3 -0
- package/dist/esm/types/src/components/ui/Progress/Progress.types.d.ts +3 -0
- package/dist/esm/types/src/components/ui/Progress/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/RegionCoords/RegionSelector.d.ts +2 -0
- package/dist/esm/types/src/components/ui/RegionCoords/RegionSelector.types.d.ts +13 -0
- package/dist/esm/types/src/components/ui/RegionCoords/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Renamer/Renamer.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Renamer/Renamer.types.d.ts +11 -0
- package/dist/esm/types/src/components/ui/Renamer/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Select/Select.d.ts +13 -0
- package/dist/esm/types/src/components/ui/Select/Select.types.d.ts +20 -0
- package/dist/esm/types/src/components/ui/Select/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Separator/Separator.d.ts +3 -0
- package/dist/esm/types/src/components/ui/Separator/Separator.types.d.ts +4 -0
- package/dist/esm/types/src/components/ui/Separator/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Sheet/Sheet.d.ts +10 -0
- package/dist/esm/types/src/components/ui/Sheet/Sheet.types.d.ts +15 -0
- package/dist/esm/types/src/components/ui/Sheet/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Sidebar/Sidebar.d.ts +93 -0
- package/dist/esm/types/src/components/ui/Skeleton/Skeleton.d.ts +3 -0
- package/dist/esm/types/src/components/ui/Skeleton/Skeleton.helpers.d.ts +7 -0
- package/dist/esm/types/src/components/ui/Skeleton/Skeleton.types.d.ts +8 -0
- package/dist/esm/types/src/components/ui/Skeleton/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Slider/Slider.d.ts +3 -0
- package/dist/esm/types/src/components/ui/Slider/Slider.types.d.ts +4 -0
- package/dist/esm/types/src/components/ui/Slider/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/SmartTextTruncate/SmartTextTruncate.d.ts +3 -0
- package/dist/esm/types/src/components/ui/SmartTextTruncate/SmartTextTruncate.types.d.ts +4 -0
- package/dist/esm/types/src/components/ui/SmartTextTruncate/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Sparkline/Sparkline.d.ts +3 -0
- package/dist/esm/types/src/components/ui/Sparkline/Sparkline.helpers.d.ts +9 -0
- package/dist/esm/types/src/components/ui/Sparkline/Sparkline.types.d.ts +16 -0
- package/dist/esm/types/src/components/ui/Sparkline/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Switch/Switch.d.ts +3 -0
- package/dist/esm/types/src/components/ui/Switch/Switch.types.d.ts +4 -0
- package/dist/esm/types/src/components/ui/Switch/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Table/Table.d.ts +13 -0
- package/dist/esm/types/src/components/ui/Table/Table.types.d.ts +19 -0
- package/dist/esm/types/src/components/ui/Table/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Tabs/Tabs.d.ts +12 -0
- package/dist/esm/types/src/components/ui/Tabs/Tabs.types.d.ts +6 -0
- package/dist/esm/types/src/components/ui/Tabs/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/TextShimmer/TextShimmer.d.ts +5 -0
- package/dist/esm/types/src/components/ui/TextShimmer/TextShimmer.types.d.ts +8 -0
- package/dist/esm/types/src/components/ui/TextShimmer/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/TextWithDeferTooltip/TextWithDeferTooltip.d.ts +3 -0
- package/dist/esm/types/src/components/ui/TextWithDeferTooltip/TextWithDeferTooltip.types.d.ts +7 -0
- package/dist/esm/types/src/components/ui/TextWithDeferTooltip/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/TimeRangeControls/TimeRangeControls.constants.d.ts +1 -0
- package/dist/esm/types/src/components/ui/TimeRangeControls/TimeRangeControls.d.ts +11 -0
- package/dist/esm/types/src/components/ui/TimeRangeControls/TimeRangeControls.types.d.ts +2 -0
- package/dist/esm/types/src/components/ui/TimeRangeControls/index.d.ts +3 -0
- package/dist/esm/types/src/components/ui/Toggle/Toggle.d.ts +3 -0
- package/dist/esm/types/src/components/ui/Toggle/Toggle.types.d.ts +7 -0
- package/dist/esm/types/src/components/ui/Toggle/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/ToggleGroup/ToggleGroup.d.ts +4 -0
- package/dist/esm/types/src/components/ui/ToggleGroup/ToggleGroup.helpers.d.ts +6 -0
- package/dist/esm/types/src/components/ui/ToggleGroup/ToggleGroup.types.d.ts +32 -0
- package/dist/esm/types/src/components/ui/ToggleGroup/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Tooltip/Tooltip.d.ts +6 -0
- package/dist/esm/types/src/components/ui/Tooltip/Tooltip.types.d.ts +13 -0
- package/dist/esm/types/src/components/ui/Tooltip/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/VimeoEmbed/VimeoEmbed.d.ts +3 -0
- package/dist/esm/types/src/components/ui/VimeoEmbed/VimeoEmbed.types.d.ts +9 -0
- package/dist/esm/types/src/components/ui/VimeoEmbed/index.d.ts +2 -0
- package/dist/esm/types/src/components/ui/icons/Github.d.ts +1 -0
- package/dist/esm/types/src/constants/dataset.d.ts +2 -0
- package/dist/esm/types/src/contexts/chat-context.d.ts +48 -0
- package/dist/esm/types/src/docs/App/App.d.ts +1 -0
- package/dist/esm/types/src/docs/App/ThemeToggle.d.ts +1 -0
- package/dist/esm/types/src/docs/DocPage.d.ts +1 -0
- package/dist/esm/types/src/docs/DocsShell.d.ts +1 -0
- package/dist/esm/types/src/docs/components/AppPageHeader/AppPageHeader.d.ts +8 -0
- package/dist/esm/types/src/docs/components/DocsSidebar/DocsSidebar.d.ts +1 -0
- package/dist/esm/types/src/docs/config/paths.d.ts +10 -0
- package/dist/esm/types/src/docs/contexts/theme-context.d.ts +8 -0
- package/dist/esm/types/src/docs/docsConstants.d.ts +4 -0
- package/dist/esm/types/src/docs/docsHeaderActions.d.ts +1 -0
- package/dist/esm/types/src/docs/index.d.ts +1 -0
- package/dist/esm/types/src/docs/lib/theme.d.ts +5 -0
- package/dist/esm/types/src/docs/pages/AnalysesSelectorPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/AnalysisLineIconPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/AvatarPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/BadgePage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/BreadcrumbPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/ButtonPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/CardPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/ChartAreaInteractivePage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/ChartPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/ChatPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/CheckboxPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/DialogPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/DrawerPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/DropZonePage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/DropdownMenuPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/FlickeringGridPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/FoldablePage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/ImagePage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/ImageWithFallbackPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/InputPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/InteractiveContentPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/LabelPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/LabelWithIdPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/LabeledInputPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/LegacyPlatformLinkPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/LogoPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/MobileAdaptiveSelectorPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/NumberControlPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/PagePage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/ProgressPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/RegionCoordsPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/RenamerPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/SelectPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/SeparatorPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/SheetPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/SidebarPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/SkeletonPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/SliderPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/SmartTextTruncatePage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/SparklinePage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/SwitchPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/TablePage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/TabsPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/TextShimmerPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/TextWithDeferTooltipPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/TimeRangeControlsPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/ToggleGroupPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/TogglePage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/TooltipPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/VimeoEmbedPage.d.ts +1 -0
- package/dist/esm/types/src/docs/registry.d.ts +14 -0
- package/dist/esm/types/src/hooks/panelWidth.d.ts +20 -0
- package/dist/esm/types/src/hooks/useClickOutside.d.ts +10 -0
- package/dist/esm/types/src/hooks/useDebounceCallback.d.ts +3 -0
- package/dist/esm/types/src/hooks/useDragElem.d.ts +15 -0
- package/dist/esm/types/src/hooks/useEvent.d.ts +11 -0
- package/dist/esm/types/src/hooks/useIsMobile.d.ts +1 -0
- package/dist/esm/types/src/hooks/useIsTouchDevice.d.ts +6 -0
- package/dist/esm/types/src/hooks/useQueryParams.d.ts +6 -0
- package/dist/esm/types/src/hooks/useShellWidthObserver.d.ts +1 -0
- package/dist/esm/types/src/hooks/useThrottledCallback.d.ts +5 -0
- package/dist/esm/types/src/index.d.ts +54 -0
- package/dist/esm/types/src/lib/cookie-consent/cookie-consent.d.ts +20 -0
- package/dist/esm/types/src/lib/cookie.d.ts +2 -0
- package/dist/esm/types/src/lib/dashboard-spec/stripJsonDashboardFences.d.ts +2 -0
- package/dist/esm/types/src/lib/logger.d.ts +9 -0
- package/dist/esm/types/src/tools/debounce.d.ts +6 -0
- package/dist/esm/types/src/tools/env.d.ts +2 -0
- package/dist/esm/types/src/types/chat-api.types.d.ts +5 -0
- package/dist/esm/types/src/types/forecast-data.d.ts +8 -0
- package/dist/esm/types/src/utils/analysisDate.d.ts +7 -0
- package/dist/esm/types/src/utils/chartConnectionPoint.d.ts +61 -0
- package/dist/esm/types/src/utils/chartRenderQueue.d.ts +10 -0
- package/dist/esm/types/src/utils/chatPresetMerge.d.ts +2 -0
- package/dist/esm/types/src/utils/datasetApplicationLink.d.ts +7 -0
- package/dist/esm/types/src/utils/quantileFormat.d.ts +3 -0
- package/dist/esm/types/tests/chartConnectionPoint.test.d.ts +1 -0
- package/dist/esm/types/tests/smoke.test.d.ts +1 -0
- package/dist/esm/utils/analysisDate.js +16 -0
- package/dist/esm/utils/chartConnectionPoint.js +105 -0
- package/dist/esm/utils/chartRenderQueue.js +49 -0
- package/dist/esm/utils/chatPresetMerge.js +29 -0
- package/dist/esm/utils/datasetApplicationLink.js +21 -0
- package/dist/esm/utils/quantileFormat.js +32 -0
- package/package.json +172 -0
- package/src/components/ui/AnalysesSelector/AnalysesSelector.styl +68 -0
- package/src/components/ui/AnalysesSelector/AnalysesSelector.styl.d.ts +19 -0
- package/src/components/ui/AnalysesSelector/AnalysesSelector.tsx +369 -0
- package/src/components/ui/AnalysesSelector/AnalysesSelector.types.ts +41 -0
- package/src/components/ui/AnalysesSelector/index.ts +5 -0
- package/src/components/ui/AnalysisLineIcon/AnalysisLineIcon.styl +22 -0
- package/src/components/ui/AnalysisLineIcon/AnalysisLineIcon.styl.d.ts +9 -0
- package/src/components/ui/AnalysisLineIcon/AnalysisLineIcon.tsx +47 -0
- package/src/components/ui/AnalysisLineIcon/index.ts +5 -0
- package/src/components/ui/AppHeader/AppHeader.styl +73 -0
- package/src/components/ui/AppHeader/AppHeader.styl.d.ts +13 -0
- package/src/components/ui/AppHeader/AppHeader.tsx +37 -0
- package/src/components/ui/AppHeader/appChromeAnchors.ts +2 -0
- package/src/components/ui/AppHeader/index.ts +3 -0
- package/src/components/ui/Avatar/Avatar.styl +31 -0
- package/src/components/ui/Avatar/Avatar.styl.d.ts +12 -0
- package/src/components/ui/Avatar/Avatar.tsx +42 -0
- package/src/components/ui/Avatar/Avatar.types.ts +17 -0
- package/src/components/ui/Avatar/index.ts +6 -0
- package/src/components/ui/Badge/Badge.styl +95 -0
- package/src/components/ui/Badge/Badge.styl.d.ts +13 -0
- package/src/components/ui/Badge/Badge.tsx +31 -0
- package/src/components/ui/Badge/Badge.types.ts +7 -0
- package/src/components/ui/Badge/index.ts +2 -0
- package/src/components/ui/Breadcrumb/Breadcrumb.styl +49 -0
- package/src/components/ui/Breadcrumb/Breadcrumb.styl.d.ts +12 -0
- package/src/components/ui/Breadcrumb/Breadcrumb.tsx +107 -0
- package/src/components/ui/Breadcrumb/Breadcrumb.types.ts +15 -0
- package/src/components/ui/Breadcrumb/index.ts +10 -0
- package/src/components/ui/Button/Button.styl +131 -0
- package/src/components/ui/Button/Button.styl.d.ts +17 -0
- package/src/components/ui/Button/Button.tsx +35 -0
- package/src/components/ui/Button/Button.types.ts +15 -0
- package/src/components/ui/Button/index.ts +2 -0
- package/src/components/ui/Card/Card.styl +108 -0
- package/src/components/ui/Card/Card.styl.d.ts +21 -0
- package/src/components/ui/Card/Card.tsx +199 -0
- package/src/components/ui/Card/Card.types.ts +35 -0
- package/src/components/ui/Card/index.ts +11 -0
- package/src/components/ui/Chart/Chart.context.ts +14 -0
- package/src/components/ui/Chart/Chart.helpers.ts +14 -0
- package/src/components/ui/Chart/Chart.styl +184 -0
- package/src/components/ui/Chart/Chart.styl.d.ts +22 -0
- package/src/components/ui/Chart/Chart.tsx +23 -0
- package/src/components/ui/Chart/Chart.types.ts +46 -0
- package/src/components/ui/Chart/chart-types.csv +33 -0
- package/src/components/ui/Chart/chartForecastVisualization.constants.ts +22 -0
- package/src/components/ui/Chart/chartForecastVisualization.types.ts +97 -0
- package/src/components/ui/Chart/components/ActiveDotsLayer/ActiveDotsLayer.styl +16 -0
- package/src/components/ui/Chart/components/ActiveDotsLayer/ActiveDotsLayer.styl.d.ts +8 -0
- package/src/components/ui/Chart/components/ActiveDotsLayer/ActiveDotsLayer.tsx +32 -0
- package/src/components/ui/Chart/components/BaseChartWrapper.styl +96 -0
- package/src/components/ui/Chart/components/BaseChartWrapper.styl.d.ts +20 -0
- package/src/components/ui/Chart/components/BaseChartWrapper.tsx +907 -0
- package/src/components/ui/Chart/components/ChartAxes.tsx +140 -0
- package/src/components/ui/Chart/components/ChartContainer.tsx +73 -0
- package/src/components/ui/Chart/components/ChartGrid.tsx +7 -0
- package/src/components/ui/Chart/components/ChartLegendContent.tsx +48 -0
- package/src/components/ui/Chart/components/ChartLegendItem.tsx +43 -0
- package/src/components/ui/Chart/components/ChartTooltipContent.tsx +140 -0
- package/src/components/ui/Chart/components/ChartTooltipItem.tsx +114 -0
- package/src/components/ui/Chart/components/ConfidenceBands.tsx +49 -0
- package/src/components/ui/Chart/components/CustomChartLegend/CustomChartLegend.styl +102 -0
- package/src/components/ui/Chart/components/CustomChartLegend/CustomChartLegend.styl.d.ts +18 -0
- package/src/components/ui/Chart/components/CustomChartLegend/CustomChartLegend.tsx +152 -0
- package/src/components/ui/Chart/components/ForecastBoundaries.tsx +71 -0
- package/src/components/ui/Chart/components/ForecastLine.tsx +68 -0
- package/src/components/ui/Chart/components/HistoricalLine.tsx +67 -0
- package/src/components/ui/Chart/components/LegendSvg/LegendSvg.tsx +61 -0
- package/src/components/ui/Chart/components/QuantileBands.tsx +73 -0
- package/src/components/ui/Chart/components/index.ts +12 -0
- package/src/components/ui/Chart/hooks/useChartAnimation.ts +17 -0
- package/src/components/ui/Chart/hooks/useChartColors.ts +24 -0
- package/src/components/ui/Chart/hooks/useLegendState.ts +31 -0
- package/src/components/ui/Chart/index.ts +2 -0
- package/src/components/ui/Chart/tools/formatters.ts +88 -0
- package/src/components/ui/ChartAreaInteractive/ChartAreaInteractive.helpers.ts +168 -0
- package/src/components/ui/ChartAreaInteractive/ChartAreaInteractive.styl +66 -0
- package/src/components/ui/ChartAreaInteractive/ChartAreaInteractive.styl.d.ts +14 -0
- package/src/components/ui/ChartAreaInteractive/ChartAreaInteractive.tsx +230 -0
- package/src/components/ui/ChartAreaInteractive/ChartAreaInteractive.types.ts +68 -0
- package/src/components/ui/ChartAreaInteractive/ChartLines.tsx +204 -0
- package/src/components/ui/ChartAreaInteractive/index.ts +3 -0
- package/src/components/ui/ChartAreaInteractive/overlays/DraggingButton.styl +29 -0
- package/src/components/ui/ChartAreaInteractive/overlays/DraggingButton.styl.d.ts +8 -0
- package/src/components/ui/ChartAreaInteractive/overlays/IntervalsOverlay/IntervalsOverlay.hooks.ts +211 -0
- package/src/components/ui/ChartAreaInteractive/overlays/IntervalsOverlay/IntervalsOverlay.styl +17 -0
- package/src/components/ui/ChartAreaInteractive/overlays/IntervalsOverlay/IntervalsOverlay.styl.d.ts +8 -0
- package/src/components/ui/ChartAreaInteractive/overlays/IntervalsOverlay/IntervalsOverlay.tsx +402 -0
- package/src/components/ui/ChartAreaInteractive/overlays/PinOverlay/PinOverlay.styl +107 -0
- package/src/components/ui/ChartAreaInteractive/overlays/PinOverlay/PinOverlay.styl.d.ts +15 -0
- package/src/components/ui/ChartAreaInteractive/overlays/PinOverlay/PinOverlay.tsx +256 -0
- package/src/components/ui/ChartAreaInteractive/overlays/ThresholdsOverlay/ThresholdsOverlay.hooks.ts +185 -0
- package/src/components/ui/ChartAreaInteractive/overlays/ThresholdsOverlay/ThresholdsOverlay.styl +21 -0
- package/src/components/ui/ChartAreaInteractive/overlays/ThresholdsOverlay/ThresholdsOverlay.styl.d.ts +8 -0
- package/src/components/ui/ChartAreaInteractive/overlays/ThresholdsOverlay/ThresholdsOverlay.tsx +206 -0
- package/src/components/ui/ChartAreaInteractive/overlays/index.ts +3 -0
- package/src/components/ui/ChartAreaInteractive/overlays/useChartYRange.ts +209 -0
- package/src/components/ui/ChartAreaInteractive/overlays/useForecastColor.ts +49 -0
- package/src/components/ui/ChartAreaInteractive/overlays/useQuantileBands.ts +248 -0
- package/src/components/ui/Chat/Chat.styl +7 -0
- package/src/components/ui/Chat/Chat.styl.d.ts +8 -0
- package/src/components/ui/Chat/Chat.tsx +22 -0
- package/src/components/ui/Chat/Chat.types.ts +88 -0
- package/src/components/ui/Chat/ChatChrome/ChatChrome.styl +125 -0
- package/src/components/ui/Chat/ChatChrome/ChatChrome.styl.d.ts +21 -0
- package/src/components/ui/Chat/ChatChrome/ChatChrome.tsx +188 -0
- package/src/components/ui/Chat/ChatChrome/ChatChrome.types.ts +50 -0
- package/src/components/ui/Chat/ChatChrome/index.ts +5 -0
- package/src/components/ui/Chat/ChatEmptyState/ChatEmptyState.styl +20 -0
- package/src/components/ui/Chat/ChatEmptyState/ChatEmptyState.styl.d.ts +8 -0
- package/src/components/ui/Chat/ChatEmptyState/ChatEmptyState.tsx +16 -0
- package/src/components/ui/Chat/ChatEmptyState/ChatEmptyState.types.ts +5 -0
- package/src/components/ui/Chat/ChatEmptyState/sparkles.svg +22 -0
- package/src/components/ui/Chat/ChatMessage/AgentMessageContent.helpers.tsx +405 -0
- package/src/components/ui/Chat/ChatMessage/AgentMessageContent.tsx +234 -0
- package/src/components/ui/Chat/ChatMessage/ChatDatasetApplicationLink.tsx +38 -0
- package/src/components/ui/Chat/ChatMessage/ChatMessage.styl +184 -0
- package/src/components/ui/Chat/ChatMessage/ChatMessage.styl.d.ts +22 -0
- package/src/components/ui/Chat/ChatMessage/ChatMessage.tsx +52 -0
- package/src/components/ui/Chat/ChatMessage/MessageChart.tsx +32 -0
- package/src/components/ui/Chat/ChatMessage/icons/DocIcon.tsx +7 -0
- package/src/components/ui/Chat/ChatMessage/icons/XlsIcon.tsx +7 -0
- package/src/components/ui/Chat/ChatMessage/icons/doc.png +0 -0
- package/src/components/ui/Chat/ChatMessage/icons/doc.svg +1 -0
- package/src/components/ui/Chat/ChatMessage/icons/xls.png +0 -0
- package/src/components/ui/Chat/ChatMessage/icons/xls.svg +1 -0
- package/src/components/ui/Chat/ChatMessage/index.ts +1 -0
- package/src/components/ui/Chat/ChatMessage/presetScript.ts +282 -0
- package/src/components/ui/Chat/ChatPresets/ChatPresets.styl +41 -0
- package/src/components/ui/Chat/ChatPresets/ChatPresets.styl.d.ts +11 -0
- package/src/components/ui/Chat/ChatPresets/ChatPresets.tsx +59 -0
- package/src/components/ui/Chat/ChatPresets/index.ts +2 -0
- package/src/components/ui/Chat/ChatPrompt/ChatPrompt.styl +84 -0
- package/src/components/ui/Chat/ChatPrompt/ChatPrompt.styl.d.ts +13 -0
- package/src/components/ui/Chat/ChatPrompt/ChatPrompt.tsx +103 -0
- package/src/components/ui/Chat/ChatPrompt/index.ts +1 -0
- package/src/components/ui/Chat/ChatSheet/ChatSelector.tsx +65 -0
- package/src/components/ui/Chat/ChatSheet/ChatSettings.styl +35 -0
- package/src/components/ui/Chat/ChatSheet/ChatSettings.styl.d.ts +10 -0
- package/src/components/ui/Chat/ChatSheet/ChatSettings.tsx +61 -0
- package/src/components/ui/Chat/ChatSheet/ChatSheet.styl.d.ts +19 -0
- package/src/components/ui/Chat/ChatSheet/ChatSheet.tsx +91 -0
- package/src/components/ui/Chat/ChatSheet/ChatSidebar.styl.d.ts +17 -0
- package/src/components/ui/Chat/ChatSheet/index.ts +7 -0
- package/src/components/ui/Chat/ChatSheet/loader.svg +14 -0
- package/src/components/ui/Chat/ChatSheet/useChatPanelChromeModel.tsx +1024 -0
- package/src/components/ui/Chat/chat-preset-utils.ts +27 -0
- package/src/components/ui/Chat/index.ts +24 -0
- package/src/components/ui/Checkbox/Checkbox.styl +42 -0
- package/src/components/ui/Checkbox/Checkbox.styl.d.ts +9 -0
- package/src/components/ui/Checkbox/Checkbox.tsx +26 -0
- package/src/components/ui/Checkbox/Checkbox.types.ts +5 -0
- package/src/components/ui/Checkbox/index.ts +2 -0
- package/src/components/ui/Dialog/Dialog.styl +145 -0
- package/src/components/ui/Dialog/Dialog.styl.d.ts +21 -0
- package/src/components/ui/Dialog/Dialog.tsx +233 -0
- package/src/components/ui/Dialog/Dialog.types.ts +27 -0
- package/src/components/ui/Dialog/index.ts +3 -0
- package/src/components/ui/DraggingButton/DraggingButton.styl +74 -0
- package/src/components/ui/DraggingButton/DraggingButton.styl.d.ts +11 -0
- package/src/components/ui/DraggingButton/DraggingButton.tsx +55 -0
- package/src/components/ui/Drawer/Drawer.styl +123 -0
- package/src/components/ui/Drawer/Drawer.styl.d.ts +15 -0
- package/src/components/ui/Drawer/Drawer.tsx +112 -0
- package/src/components/ui/Drawer/Drawer.types.ts +35 -0
- package/src/components/ui/Drawer/index.ts +13 -0
- package/src/components/ui/DropZone/DropZone.styl +66 -0
- package/src/components/ui/DropZone/DropZone.styl.d.ts +13 -0
- package/src/components/ui/DropZone/DropZone.tsx +188 -0
- package/src/components/ui/DropdownMenu/DropdownMenu.styl +331 -0
- package/src/components/ui/DropdownMenu/DropdownMenu.styl.d.ts +27 -0
- package/src/components/ui/DropdownMenu/DropdownMenu.tsx +231 -0
- package/src/components/ui/DropdownMenu/DropdownMenu.types.ts +68 -0
- package/src/components/ui/DropdownMenu/index.ts +18 -0
- package/src/components/ui/FlickeringGrid/FlickeringGrid.styl +12 -0
- package/src/components/ui/FlickeringGrid/FlickeringGrid.styl.d.ts +7 -0
- package/src/components/ui/FlickeringGrid/FlickeringGrid.tsx +10 -0
- package/src/components/ui/FlickeringGrid/FlickeringGrid.types.ts +10 -0
- package/src/components/ui/FlickeringGrid/bg.svg +194 -0
- package/src/components/ui/FlickeringGrid/index.ts +2 -0
- package/src/components/ui/Foldable/Foldable.styl +48 -0
- package/src/components/ui/Foldable/Foldable.styl.d.ts +13 -0
- package/src/components/ui/Foldable/Foldable.tsx +38 -0
- package/src/components/ui/Foldable/Foldable.types.ts +6 -0
- package/src/components/ui/Foldable/index.ts +2 -0
- package/src/components/ui/Gap/Gap.styl +2 -0
- package/src/components/ui/Gap/Gap.styl.d.ts +7 -0
- package/src/components/ui/Gap/Gap.tsx +3 -0
- package/src/components/ui/Image/Image.styl +27 -0
- package/src/components/ui/Image/Image.styl.d.ts +10 -0
- package/src/components/ui/Image/Image.tsx +31 -0
- package/src/components/ui/Image/Image.types.ts +6 -0
- package/src/components/ui/Image/index.ts +2 -0
- package/src/components/ui/ImageWithFallback/ImageWithFallback.tsx +32 -0
- package/src/components/ui/ImageWithFallback/ImageWithFallback.types.ts +9 -0
- package/src/components/ui/ImageWithFallback/index.ts +2 -0
- package/src/components/ui/InfoIconTooltip/InfoIconTooltip.styl +5 -0
- package/src/components/ui/InfoIconTooltip/InfoIconTooltip.styl.d.ts +7 -0
- package/src/components/ui/InfoIconTooltip/InfoIconTooltip.tsx +21 -0
- package/src/components/ui/Input/Input.styl +67 -0
- package/src/components/ui/Input/Input.styl.d.ts +11 -0
- package/src/components/ui/Input/Input.tsx +42 -0
- package/src/components/ui/Input/Input.types.ts +11 -0
- package/src/components/ui/Input/index.ts +2 -0
- package/src/components/ui/InteractionOverlay/InteractionOverlay.styl +19 -0
- package/src/components/ui/InteractionOverlay/InteractionOverlay.styl.d.ts +8 -0
- package/src/components/ui/InteractionOverlay/InteractionOverlay.tsx +55 -0
- package/src/components/ui/InteractiveContent/InteractiveContent.styl +3 -0
- package/src/components/ui/InteractiveContent/InteractiveContent.styl.d.ts +7 -0
- package/src/components/ui/InteractiveContent/InteractiveContent.tsx +21 -0
- package/src/components/ui/InteractiveContent/index.ts +1 -0
- package/src/components/ui/Label/Label.styl +16 -0
- package/src/components/ui/Label/Label.styl.d.ts +7 -0
- package/src/components/ui/Label/Label.tsx +18 -0
- package/src/components/ui/Label/Label.types.ts +5 -0
- package/src/components/ui/Label/index.ts +2 -0
- package/src/components/ui/LabelWithId/AltKeyProvider.tsx +22 -0
- package/src/components/ui/LabelWithId/LabelWithId.styl +14 -0
- package/src/components/ui/LabelWithId/LabelWithId.styl.d.ts +8 -0
- package/src/components/ui/LabelWithId/LabelWithId.tsx +12 -0
- package/src/components/ui/LabelWithId/LabelWithId.types.ts +5 -0
- package/src/components/ui/LabelWithId/index.ts +3 -0
- package/src/components/ui/LabeledInput/LabeledInput.styl +32 -0
- package/src/components/ui/LabeledInput/LabeledInput.styl.d.ts +14 -0
- package/src/components/ui/LabeledInput/LabeledInput.tsx +53 -0
- package/src/components/ui/LabledCheckbox/LabledCheckbox.tsx +21 -0
- package/src/components/ui/LegacyPlatformLink/LegacyPlatformLink.styl +10 -0
- package/src/components/ui/LegacyPlatformLink/LegacyPlatformLink.styl.d.ts +7 -0
- package/src/components/ui/LegacyPlatformLink/LegacyPlatformLink.tsx +18 -0
- package/src/components/ui/LegacyPlatformLink/LegacyPlatformLink.types.ts +5 -0
- package/src/components/ui/LegacyPlatformLink/index.ts +2 -0
- package/src/components/ui/Logo/Logo.styl +39 -0
- package/src/components/ui/Logo/Logo.styl.d.ts +12 -0
- package/src/components/ui/Logo/Logo.tsx +18 -0
- package/src/components/ui/Logo/Logo.types.ts +12 -0
- package/src/components/ui/Logo/index.ts +5 -0
- package/src/components/ui/MobileAdaptiveSelector/MobileAdaptiveSelector.styl +32 -0
- package/src/components/ui/MobileAdaptiveSelector/MobileAdaptiveSelector.styl.d.ts +13 -0
- package/src/components/ui/MobileAdaptiveSelector/MobileAdaptiveSelector.tsx +117 -0
- package/src/components/ui/MobileAdaptiveSelector/MobileAdaptiveSelector.types.ts +31 -0
- package/src/components/ui/MobileAdaptiveSelector/index.ts +8 -0
- package/src/components/ui/NumberControl/NumberControl.styl +11 -0
- package/src/components/ui/NumberControl/NumberControl.styl.d.ts +8 -0
- package/src/components/ui/NumberControl/NumberControl.tsx +58 -0
- package/src/components/ui/NumberControl/NumberControl.types.ts +10 -0
- package/src/components/ui/NumberControl/index.ts +2 -0
- package/src/components/ui/Page/AppShell/AppShell.styl +36 -0
- package/src/components/ui/Page/AppShell/AppShell.styl.d.ts +9 -0
- package/src/components/ui/Page/AppShell/AppShell.tsx +38 -0
- package/src/components/ui/Page/Breadcrumbs/Breadcrumbs.styl +33 -0
- package/src/components/ui/Page/Breadcrumbs/Breadcrumbs.styl.d.ts +10 -0
- package/src/components/ui/Page/Breadcrumbs/Breadcrumbs.tsx +71 -0
- package/src/components/ui/Page/Breadcrumbs/Breadcrumbs.types.ts +6 -0
- package/src/components/ui/Page/PageColumns/PageColumns.styl +28 -0
- package/src/components/ui/Page/PageColumns/PageColumns.styl.d.ts +11 -0
- package/src/components/ui/Page/PageColumns/PageColumns.tsx +31 -0
- package/src/components/ui/Page/PageContent/PageContent.styl +17 -0
- package/src/components/ui/Page/PageContent/PageContent.styl.d.ts +8 -0
- package/src/components/ui/Page/PageContent/PageContent.tsx +34 -0
- package/src/components/ui/Page/PageEmptyCanvas/PageEmptyCanvas.styl +28 -0
- package/src/components/ui/Page/PageEmptyCanvas/PageEmptyCanvas.styl.d.ts +9 -0
- package/src/components/ui/Page/PageEmptyCanvas/PageEmptyCanvas.tsx +21 -0
- package/src/components/ui/Page/PageFooter/DebugPanel/DebugPanel.styl.d.ts +9 -0
- package/src/components/ui/Page/PageFooter/PageFooter.styl +69 -0
- package/src/components/ui/Page/PageFooter/PageFooter.styl.d.ts +12 -0
- package/src/components/ui/Page/PageFooter/PageFooter.tsx +68 -0
- package/src/components/ui/Page/PageFooter/treads.svg +3 -0
- package/src/components/ui/Page/PageHeader/PageHeader.styl +185 -0
- package/src/components/ui/Page/PageHeader/PageHeader.styl.d.ts +17 -0
- package/src/components/ui/Page/PageHeader/PageHeader.tsx +67 -0
- package/src/components/ui/Page/PageScroll/PageScroll.styl +32 -0
- package/src/components/ui/Page/PageScroll/PageScroll.styl.d.ts +9 -0
- package/src/components/ui/Page/PageScroll/PageScroll.tsx +69 -0
- package/src/components/ui/Page/PageTabs/PageTabs.styl +20 -0
- package/src/components/ui/Page/PageTabs/PageTabs.styl.d.ts +11 -0
- package/src/components/ui/Page/PageTabs/PageTabs.tsx +64 -0
- package/src/components/ui/Page/PageXScroll/PageXScroll.styl +16 -0
- package/src/components/ui/Page/PageXScroll/PageXScroll.styl.d.ts +9 -0
- package/src/components/ui/Page/PageXScroll/PageXScroll.tsx +70 -0
- package/src/components/ui/Page/SectionHeader/SectionHeader.styl +36 -0
- package/src/components/ui/Page/SectionHeader/SectionHeader.styl.d.ts +12 -0
- package/src/components/ui/Page/SectionHeader/SectionHeader.tsx +26 -0
- package/src/components/ui/Page/SectionHeader/SectionHeader.types.ts +8 -0
- package/src/components/ui/Page/SectionHeader/index.ts +2 -0
- package/src/components/ui/Page/index.ts +18 -0
- package/src/components/ui/Page/pageContext.ts +9 -0
- package/src/components/ui/Progress/Progress.styl +22 -0
- package/src/components/ui/Progress/Progress.styl.d.ts +8 -0
- package/src/components/ui/Progress/Progress.tsx +26 -0
- package/src/components/ui/Progress/Progress.types.ts +5 -0
- package/src/components/ui/Progress/index.ts +2 -0
- package/src/components/ui/RegionCoords/RegionSelector.styl +21 -0
- package/src/components/ui/RegionCoords/RegionSelector.styl.d.ts +9 -0
- package/src/components/ui/RegionCoords/RegionSelector.tsx +56 -0
- package/src/components/ui/RegionCoords/RegionSelector.types.ts +10 -0
- package/src/components/ui/RegionCoords/index.ts +2 -0
- package/src/components/ui/Renamer/Renamer.styl +22 -0
- package/src/components/ui/Renamer/Renamer.styl.d.ts +11 -0
- package/src/components/ui/Renamer/Renamer.tsx +127 -0
- package/src/components/ui/Renamer/Renamer.types.ts +11 -0
- package/src/components/ui/Renamer/index.ts +2 -0
- package/src/components/ui/Select/Select.styl +321 -0
- package/src/components/ui/Select/Select.styl.d.ts +31 -0
- package/src/components/ui/Select/Select.tsx +169 -0
- package/src/components/ui/Select/Select.types.ts +40 -0
- package/src/components/ui/Select/index.ts +2 -0
- package/src/components/ui/Separator/Separator.styl +11 -0
- package/src/components/ui/Separator/Separator.styl.d.ts +7 -0
- package/src/components/ui/Separator/Separator.tsx +25 -0
- package/src/components/ui/Separator/Separator.types.ts +7 -0
- package/src/components/ui/Separator/index.ts +2 -0
- package/src/components/ui/Sheet/Sheet.styl +238 -0
- package/src/components/ui/Sheet/Sheet.styl.d.ts +28 -0
- package/src/components/ui/Sheet/Sheet.tsx +129 -0
- package/src/components/ui/Sheet/Sheet.types.ts +22 -0
- package/src/components/ui/Sheet/index.ts +11 -0
- package/src/components/ui/Sidebar/Sidebar.styl +710 -0
- package/src/components/ui/Sidebar/Sidebar.styl.d.ts +48 -0
- package/src/components/ui/Sidebar/Sidebar.tsx +971 -0
- package/src/components/ui/Skeleton/Skeleton.helpers.ts +13 -0
- package/src/components/ui/Skeleton/Skeleton.styl +31 -0
- package/src/components/ui/Skeleton/Skeleton.styl.d.ts +14 -0
- package/src/components/ui/Skeleton/Skeleton.tsx +21 -0
- package/src/components/ui/Skeleton/Skeleton.types.ts +10 -0
- package/src/components/ui/Skeleton/index.ts +2 -0
- package/src/components/ui/Slider/Slider.styl +77 -0
- package/src/components/ui/Slider/Slider.styl.d.ts +11 -0
- package/src/components/ui/Slider/Slider.tsx +189 -0
- package/src/components/ui/Slider/Slider.types.ts +7 -0
- package/src/components/ui/Slider/index.ts +2 -0
- package/src/components/ui/SmartTextTruncate/SmartTextTruncate.tsx +141 -0
- package/src/components/ui/SmartTextTruncate/SmartTextTruncate.types.ts +5 -0
- package/src/components/ui/SmartTextTruncate/index.ts +2 -0
- package/src/components/ui/Sparkline/Sparkline.helpers.ts +26 -0
- package/src/components/ui/Sparkline/Sparkline.styl +18 -0
- package/src/components/ui/Sparkline/Sparkline.styl.d.ts +9 -0
- package/src/components/ui/Sparkline/Sparkline.tsx +80 -0
- package/src/components/ui/Sparkline/Sparkline.types.ts +18 -0
- package/src/components/ui/Sparkline/index.ts +2 -0
- package/src/components/ui/Switch/Switch.styl +63 -0
- package/src/components/ui/Switch/Switch.styl.d.ts +11 -0
- package/src/components/ui/Switch/Switch.tsx +40 -0
- package/src/components/ui/Switch/Switch.types.ts +7 -0
- package/src/components/ui/Switch/index.ts +2 -0
- package/src/components/ui/Table/Table.styl +119 -0
- package/src/components/ui/Table/Table.styl.d.ts +20 -0
- package/src/components/ui/Table/Table.tsx +114 -0
- package/src/components/ui/Table/Table.types.ts +14 -0
- package/src/components/ui/Table/index.ts +11 -0
- package/src/components/ui/Tabs/Tabs.styl +117 -0
- package/src/components/ui/Tabs/Tabs.styl.d.ts +14 -0
- package/src/components/ui/Tabs/Tabs.tsx +73 -0
- package/src/components/ui/Tabs/Tabs.types.ts +8 -0
- package/src/components/ui/Tabs/index.ts +2 -0
- package/src/components/ui/TextShimmer/TextShimmer.styl +16 -0
- package/src/components/ui/TextShimmer/TextShimmer.styl.d.ts +7 -0
- package/src/components/ui/TextShimmer/TextShimmer.tsx +56 -0
- package/src/components/ui/TextShimmer/TextShimmer.types.ts +9 -0
- package/src/components/ui/TextShimmer/index.ts +2 -0
- package/src/components/ui/TextWithDeferTooltip/TextWithDeferTooltip.tsx +98 -0
- package/src/components/ui/TextWithDeferTooltip/TextWithDeferTooltip.types.ts +11 -0
- package/src/components/ui/TextWithDeferTooltip/index.ts +2 -0
- package/src/components/ui/TimeRangeControls/TimeRangeControls.constants.ts +1 -0
- package/src/components/ui/TimeRangeControls/TimeRangeControls.styl +28 -0
- package/src/components/ui/TimeRangeControls/TimeRangeControls.styl.d.ts +12 -0
- package/src/components/ui/TimeRangeControls/TimeRangeControls.tsx +92 -0
- package/src/components/ui/TimeRangeControls/TimeRangeControls.types.ts +3 -0
- package/src/components/ui/TimeRangeControls/index.ts +3 -0
- package/src/components/ui/Toggle/Toggle.styl +79 -0
- package/src/components/ui/Toggle/Toggle.styl.d.ts +12 -0
- package/src/components/ui/Toggle/Toggle.tsx +28 -0
- package/src/components/ui/Toggle/Toggle.types.ts +11 -0
- package/src/components/ui/Toggle/index.ts +2 -0
- package/src/components/ui/ToggleGroup/ToggleGroup.helpers.ts +20 -0
- package/src/components/ui/ToggleGroup/ToggleGroup.styl +38 -0
- package/src/components/ui/ToggleGroup/ToggleGroup.styl.d.ts +8 -0
- package/src/components/ui/ToggleGroup/ToggleGroup.tsx +77 -0
- package/src/components/ui/ToggleGroup/ToggleGroup.types.ts +38 -0
- package/src/components/ui/ToggleGroup/index.ts +2 -0
- package/src/components/ui/Tooltip/Tooltip.styl +131 -0
- package/src/components/ui/Tooltip/Tooltip.styl.d.ts +16 -0
- package/src/components/ui/Tooltip/Tooltip.tsx +64 -0
- package/src/components/ui/Tooltip/Tooltip.types.ts +23 -0
- package/src/components/ui/Tooltip/index.ts +12 -0
- package/src/components/ui/VimeoEmbed/VimeoEmbed.styl +63 -0
- package/src/components/ui/VimeoEmbed/VimeoEmbed.styl.d.ts +11 -0
- package/src/components/ui/VimeoEmbed/VimeoEmbed.tsx +191 -0
- package/src/components/ui/VimeoEmbed/VimeoEmbed.types.ts +10 -0
- package/src/components/ui/VimeoEmbed/index.ts +2 -0
- package/src/components/ui/icons/Github.tsx +10 -0
- package/src/constants/dataset.ts +2 -0
- package/src/contexts/chat-context.tsx +444 -0
- package/src/declarations.d.ts +15 -0
- package/src/docs/App/App.styl +8 -0
- package/src/docs/App/App.styl.d.ts +8 -0
- package/src/docs/App/App.tsx +55 -0
- package/src/docs/App/ThemeToggle.tsx +30 -0
- package/src/docs/DocPage.tsx +21 -0
- package/src/docs/DocsShell.styl +28 -0
- package/src/docs/DocsShell.styl.d.ts +11 -0
- package/src/docs/DocsShell.tsx +39 -0
- package/src/docs/components/AppPageHeader/AppPageHeader.tsx +28 -0
- package/src/docs/components/DocsSidebar/DocsSidebar.styl +22 -0
- package/src/docs/components/DocsSidebar/DocsSidebar.styl.d.ts +7 -0
- package/src/docs/components/DocsSidebar/DocsSidebar.tsx +165 -0
- package/src/docs/config/paths.ts +18 -0
- package/src/docs/config/webpack.config.js +212 -0
- package/src/docs/contexts/theme-context.tsx +47 -0
- package/src/docs/docsConstants.ts +5 -0
- package/src/docs/docsHeaderActions.tsx +18 -0
- package/src/docs/index.tsx +16 -0
- package/src/docs/lib/theme.ts +55 -0
- package/src/docs/pages/AnalysesSelectorPage.tsx +57 -0
- package/src/docs/pages/AnalysisLineIconPage.tsx +24 -0
- package/src/docs/pages/AvatarPage.tsx +33 -0
- package/src/docs/pages/BadgePage.tsx +27 -0
- package/src/docs/pages/BreadcrumbPage.tsx +38 -0
- package/src/docs/pages/ButtonPage.tsx +142 -0
- package/src/docs/pages/CardPage.tsx +42 -0
- package/src/docs/pages/ChartAreaInteractivePage.tsx +161 -0
- package/src/docs/pages/ChartPage.tsx +50 -0
- package/src/docs/pages/ChatPage.tsx +61 -0
- package/src/docs/pages/CheckboxPage.tsx +25 -0
- package/src/docs/pages/DialogPage.tsx +38 -0
- package/src/docs/pages/DrawerPage.tsx +48 -0
- package/src/docs/pages/DropZonePage.tsx +32 -0
- package/src/docs/pages/DropdownMenuPage.tsx +41 -0
- package/src/docs/pages/FlickeringGridPage.tsx +23 -0
- package/src/docs/pages/FoldablePage.tsx +25 -0
- package/src/docs/pages/ImagePage.tsx +26 -0
- package/src/docs/pages/ImageWithFallbackPage.tsx +34 -0
- package/src/docs/pages/InputPage.tsx +39 -0
- package/src/docs/pages/InteractiveContentPage.tsx +23 -0
- package/src/docs/pages/LabelPage.tsx +21 -0
- package/src/docs/pages/LabelWithIdPage.tsx +21 -0
- package/src/docs/pages/LabeledInputPage.tsx +32 -0
- package/src/docs/pages/LegacyPlatformLinkPage.tsx +23 -0
- package/src/docs/pages/LogoPage.tsx +25 -0
- package/src/docs/pages/MobileAdaptiveSelectorPage.tsx +36 -0
- package/src/docs/pages/NumberControlPage.tsx +25 -0
- package/src/docs/pages/PagePage.tsx +25 -0
- package/src/docs/pages/ProgressPage.tsx +21 -0
- package/src/docs/pages/RegionCoordsPage.tsx +40 -0
- package/src/docs/pages/RenamerPage.tsx +27 -0
- package/src/docs/pages/SelectPage.tsx +40 -0
- package/src/docs/pages/SeparatorPage.tsx +23 -0
- package/src/docs/pages/SheetPage.tsx +40 -0
- package/src/docs/pages/SidebarPage.tsx +53 -0
- package/src/docs/pages/SkeletonPage.tsx +30 -0
- package/src/docs/pages/SliderPage.tsx +26 -0
- package/src/docs/pages/SmartTextTruncatePage.tsx +26 -0
- package/src/docs/pages/SparklinePage.tsx +23 -0
- package/src/docs/pages/SwitchPage.tsx +29 -0
- package/src/docs/pages/TablePage.tsx +45 -0
- package/src/docs/pages/TabsPage.tsx +33 -0
- package/src/docs/pages/TextShimmerPage.tsx +23 -0
- package/src/docs/pages/TextWithDeferTooltipPage.tsx +29 -0
- package/src/docs/pages/TimeRangeControlsPage.tsx +30 -0
- package/src/docs/pages/ToggleGroupPage.tsx +35 -0
- package/src/docs/pages/TogglePage.tsx +24 -0
- package/src/docs/pages/TooltipPage.tsx +35 -0
- package/src/docs/pages/VimeoEmbedPage.tsx +21 -0
- package/src/docs/registry.ts +338 -0
- package/src/hooks/panelWidth.ts +72 -0
- package/src/hooks/useClickOutside.ts +36 -0
- package/src/hooks/useDebounceCallback.ts +18 -0
- package/src/hooks/useDragElem.ts +153 -0
- package/src/hooks/useEvent.ts +73 -0
- package/src/hooks/useIsMobile.ts +21 -0
- package/src/hooks/useIsTouchDevice.ts +43 -0
- package/src/hooks/useQueryParams.ts +60 -0
- package/src/hooks/useShellWidthObserver.ts +25 -0
- package/src/hooks/useThrottledCallback.ts +41 -0
- package/src/index.ts +54 -0
- package/src/lib/cookie-consent/cookie-consent.ts +132 -0
- package/src/lib/cookie.ts +23 -0
- package/src/lib/dashboard-spec/stripJsonDashboardFences.ts +6 -0
- package/src/lib/logger.ts +9 -0
- package/src/lib/theme.styl +23 -0
- package/src/lib/theme.styl.d.ts +2 -0
- package/src/tools/debounce.ts +59 -0
- package/src/tools/env.ts +7 -0
- package/src/types/chat-api.types.ts +5 -0
- package/src/types/forecast-data.ts +8 -0
- package/src/utils/analysisDate.ts +17 -0
- package/src/utils/chartConnectionPoint.ts +292 -0
- package/src/utils/chartRenderQueue.ts +52 -0
- package/src/utils/chatPresetMerge.ts +36 -0
- package/src/utils/datasetApplicationLink.ts +25 -0
- package/src/utils/quantileFormat.ts +46 -0
|
@@ -0,0 +1,971 @@
|
|
|
1
|
+
import cn from 'classnames';
|
|
2
|
+
import {
|
|
3
|
+
CSSProperties,
|
|
4
|
+
ComponentProps,
|
|
5
|
+
RefObject,
|
|
6
|
+
createContext,
|
|
7
|
+
useCallback,
|
|
8
|
+
useContext,
|
|
9
|
+
useEffect,
|
|
10
|
+
useLayoutEffect,
|
|
11
|
+
useMemo,
|
|
12
|
+
useRef,
|
|
13
|
+
useState,
|
|
14
|
+
} from 'react';
|
|
15
|
+
|
|
16
|
+
import { Button } from '#uilib/components/ui/Button';
|
|
17
|
+
import type { ButtonProps } from '#uilib/components/ui/Button/Button.types';
|
|
18
|
+
import { Separator } from '#uilib/components/ui/Separator';
|
|
19
|
+
import { Sheet, SheetContent, SheetTitle } from '#uilib/components/ui/Sheet';
|
|
20
|
+
import {
|
|
21
|
+
Tooltip,
|
|
22
|
+
TooltipContent,
|
|
23
|
+
TooltipProvider,
|
|
24
|
+
TooltipTrigger,
|
|
25
|
+
} from '#uilib/components/ui/Tooltip';
|
|
26
|
+
import {
|
|
27
|
+
CHAT_WIDTH_DEFAULT_PX,
|
|
28
|
+
CHAT_WIDTH_MIN_PX,
|
|
29
|
+
CHAT_WIDTH_STORAGE_KEY,
|
|
30
|
+
SIDEBAR_WIDTH_DEFAULT_PX,
|
|
31
|
+
SIDEBAR_WIDTH_MIN_PX,
|
|
32
|
+
SIDEBAR_WIDTH_STORAGE_KEY_PCT,
|
|
33
|
+
SIDEBAR_WIDTH_STORAGE_KEY_PX,
|
|
34
|
+
clampChatWidthPx,
|
|
35
|
+
clampSidebarWidthPx,
|
|
36
|
+
defaultChatWidthPx,
|
|
37
|
+
} from '#uilib/hooks/panelWidth';
|
|
38
|
+
import useElemDrag, { Delta } from '#uilib/hooks/useDragElem';
|
|
39
|
+
import useEvent from '#uilib/hooks/useEvent';
|
|
40
|
+
import { useIsMobile } from '#uilib/hooks/useIsMobile';
|
|
41
|
+
import { useShellWidthObserver } from '#uilib/hooks/useShellWidthObserver';
|
|
42
|
+
import { getCookie, setCookie } from '#uilib/lib/cookie';
|
|
43
|
+
import { getCookiePreferences } from '#uilib/lib/cookie-consent/cookie-consent';
|
|
44
|
+
import { LS, Scroll } from '@homecode/ui';
|
|
45
|
+
import { Slot } from '@radix-ui/react-slot';
|
|
46
|
+
import { PanelLeft } from 'lucide-react';
|
|
47
|
+
|
|
48
|
+
import S from './Sidebar.styl';
|
|
49
|
+
|
|
50
|
+
const SIDEBAR_WIDTH_MOBILE = '18rem';
|
|
51
|
+
const SIDEBAR_WIDTH_ICON = '3rem';
|
|
52
|
+
const SIDEBAR_KEYBOARD_SHORTCUT = 'b';
|
|
53
|
+
|
|
54
|
+
function isEditableKeyboardTarget(el: Element | null): boolean {
|
|
55
|
+
if (!el) return false;
|
|
56
|
+
if (el instanceof HTMLElement && el.isContentEditable) return true;
|
|
57
|
+
const tag = el.tagName;
|
|
58
|
+
return tag === 'INPUT' || tag === 'TEXTAREA' || tag === 'SELECT';
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function readInitialSidebarWidthPx(storageKeyPx: string): number {
|
|
62
|
+
if (typeof window === 'undefined') return SIDEBAR_WIDTH_DEFAULT_PX;
|
|
63
|
+
const stored = LS.get(storageKeyPx);
|
|
64
|
+
if (typeof stored === 'number' && stored >= SIDEBAR_WIDTH_MIN_PX) {
|
|
65
|
+
return stored;
|
|
66
|
+
}
|
|
67
|
+
if (storageKeyPx === SIDEBAR_WIDTH_STORAGE_KEY_PX) {
|
|
68
|
+
const legacyPct = LS.get(SIDEBAR_WIDTH_STORAGE_KEY_PCT);
|
|
69
|
+
if (typeof legacyPct === 'number' && legacyPct > 0) {
|
|
70
|
+
const w = window.innerWidth;
|
|
71
|
+
return clampSidebarWidthPx(Math.round((legacyPct / 100) * w), w, {
|
|
72
|
+
chatPanelOpen: false,
|
|
73
|
+
chatWidthPx: 0,
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
return SIDEBAR_WIDTH_DEFAULT_PX;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function readInitialChatWidthPx(): number {
|
|
81
|
+
if (typeof window === 'undefined') return CHAT_WIDTH_DEFAULT_PX;
|
|
82
|
+
const stored = LS.get(CHAT_WIDTH_STORAGE_KEY);
|
|
83
|
+
if (typeof stored === 'number' && stored >= CHAT_WIDTH_MIN_PX) {
|
|
84
|
+
return stored;
|
|
85
|
+
}
|
|
86
|
+
return defaultChatWidthPx(window.innerWidth);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
type SetPanelWidthOptions = { persist?: boolean };
|
|
90
|
+
|
|
91
|
+
/** Pass `viewTransition: false` to avoid nesting `document.startViewTransition` (e.g. chat open already animating). */
|
|
92
|
+
export type SetSidebarOpenOptions = { viewTransition?: boolean };
|
|
93
|
+
|
|
94
|
+
type SidebarContextProps = {
|
|
95
|
+
isOpen: boolean;
|
|
96
|
+
setOpen: (open: boolean, options?: SetSidebarOpenOptions) => void;
|
|
97
|
+
toggleSidebar: () => void;
|
|
98
|
+
sidebarWidthPx: number;
|
|
99
|
+
setSidebarWidthPx: (px: number, options?: SetPanelWidthOptions) => void;
|
|
100
|
+
chatWidthPx: number;
|
|
101
|
+
setChatWidthPx: (px: number, options?: SetPanelWidthOptions) => void;
|
|
102
|
+
chatPanelOpen: boolean;
|
|
103
|
+
setChatPanelOpen: (open: boolean) => void;
|
|
104
|
+
getShellWidth: () => number;
|
|
105
|
+
/** Portal target for the AI chat side panel (right column). */
|
|
106
|
+
chatPanelContainer: HTMLDivElement | null;
|
|
107
|
+
/** App shell wrapper; used to set `--chat-panel-width` (and `--chat-panel-height` on mobile only). */
|
|
108
|
+
sidebarWrapperRef: RefObject<HTMLDivElement | null>;
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
type SidebarProps = ComponentProps<'div'> & {
|
|
112
|
+
defaultOpen?: boolean;
|
|
113
|
+
open?: boolean;
|
|
114
|
+
onOpenChange?: (open: boolean) => void;
|
|
115
|
+
side?: 'left' | 'right';
|
|
116
|
+
variant?: 'sidebar' | 'floating' | 'inset';
|
|
117
|
+
collapsible?: 'offcanvas' | 'icon' | 'none';
|
|
118
|
+
fullHeightResizer?: boolean;
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
const SidebarContext = createContext<SidebarContextProps | null>(null);
|
|
122
|
+
|
|
123
|
+
function useSidebar() {
|
|
124
|
+
const context = useContext(SidebarContext);
|
|
125
|
+
if (!context) {
|
|
126
|
+
throw new Error('useSidebar must be used within a SidebarProvider.');
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
return context;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
function SidebarProvider({
|
|
133
|
+
defaultOpen = (getCookie('isSidebarOpen') as unknown as boolean) ?? true,
|
|
134
|
+
className,
|
|
135
|
+
style,
|
|
136
|
+
children,
|
|
137
|
+
userId,
|
|
138
|
+
sidebarWidthStorageKey,
|
|
139
|
+
persistSidebarWidthWithoutConsent = false,
|
|
140
|
+
...props
|
|
141
|
+
}: ComponentProps<'div'> & {
|
|
142
|
+
defaultOpen?: boolean;
|
|
143
|
+
open?: boolean;
|
|
144
|
+
onOpenChange?: (open: boolean) => void;
|
|
145
|
+
userId?: string | number | null;
|
|
146
|
+
/** LocalStorage key for sidebar width (pixels). Defaults to `sidebarWidthPx`. */
|
|
147
|
+
sidebarWidthStorageKey?: string;
|
|
148
|
+
/** When true, sidebar width is saved without functional cookie consent (e.g. internal docs). */
|
|
149
|
+
persistSidebarWidthWithoutConsent?: boolean;
|
|
150
|
+
}) {
|
|
151
|
+
const sidebarLsKey = sidebarWidthStorageKey ?? SIDEBAR_WIDTH_STORAGE_KEY_PX;
|
|
152
|
+
const allowPersistSidebarWidth =
|
|
153
|
+
persistSidebarWidthWithoutConsent ||
|
|
154
|
+
Boolean(getCookiePreferences(userId)?.functional);
|
|
155
|
+
|
|
156
|
+
const isMobile = useIsMobile();
|
|
157
|
+
const [isOpen, setIsOpen] = useState(isMobile ? false : defaultOpen);
|
|
158
|
+
const wrapperRef = useRef<HTMLDivElement | null>(null);
|
|
159
|
+
const shellWidthRef = useRef(0);
|
|
160
|
+
const prevShellWidthRef = useRef(0);
|
|
161
|
+
const [shellEl, setShellEl] = useState<HTMLDivElement | null>(null);
|
|
162
|
+
const [chatPanelContainer, setChatPanelContainer] =
|
|
163
|
+
useState<HTMLDivElement | null>(null);
|
|
164
|
+
const onChatPanelMount = useCallback((node: HTMLDivElement | null) => {
|
|
165
|
+
setChatPanelContainer(node);
|
|
166
|
+
}, []);
|
|
167
|
+
|
|
168
|
+
const [sidebarWidthPx, _setSidebarWidthPx] = useState(() =>
|
|
169
|
+
readInitialSidebarWidthPx(sidebarLsKey),
|
|
170
|
+
);
|
|
171
|
+
const [chatWidthPx, _setChatWidthPx] = useState(readInitialChatWidthPx);
|
|
172
|
+
const [chatPanelOpen, setChatPanelOpen] = useState(false);
|
|
173
|
+
const sidebarWidthRef = useRef(sidebarWidthPx);
|
|
174
|
+
const chatWidthRef = useRef(chatWidthPx);
|
|
175
|
+
sidebarWidthRef.current = sidebarWidthPx;
|
|
176
|
+
chatWidthRef.current = chatWidthPx;
|
|
177
|
+
|
|
178
|
+
const mergeWrapperRef = useCallback((el: HTMLDivElement | null) => {
|
|
179
|
+
wrapperRef.current = el;
|
|
180
|
+
setShellEl(el);
|
|
181
|
+
}, []);
|
|
182
|
+
|
|
183
|
+
const getShellWidth = useCallback((): number => {
|
|
184
|
+
const w = shellWidthRef.current;
|
|
185
|
+
if (w > 0) return w;
|
|
186
|
+
if (wrapperRef.current) {
|
|
187
|
+
const cw = wrapperRef.current.getBoundingClientRect().width;
|
|
188
|
+
if (cw > 0) return cw;
|
|
189
|
+
}
|
|
190
|
+
return typeof window !== 'undefined' ? window.innerWidth : 1200;
|
|
191
|
+
}, []);
|
|
192
|
+
|
|
193
|
+
const setSidebarWidthPx = useCallback(
|
|
194
|
+
(px: number, options?: SetPanelWidthOptions) => {
|
|
195
|
+
const persist = options?.persist !== false;
|
|
196
|
+
const shellW = getShellWidth();
|
|
197
|
+
const next = clampSidebarWidthPx(px, shellW, {
|
|
198
|
+
chatPanelOpen,
|
|
199
|
+
chatWidthPx,
|
|
200
|
+
});
|
|
201
|
+
_setSidebarWidthPx(next);
|
|
202
|
+
if (persist && allowPersistSidebarWidth) {
|
|
203
|
+
LS.set(sidebarLsKey, next);
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
[
|
|
207
|
+
getShellWidth,
|
|
208
|
+
chatPanelOpen,
|
|
209
|
+
chatWidthPx,
|
|
210
|
+
sidebarLsKey,
|
|
211
|
+
allowPersistSidebarWidth,
|
|
212
|
+
],
|
|
213
|
+
);
|
|
214
|
+
|
|
215
|
+
const setChatWidthPx = useCallback(
|
|
216
|
+
(px: number, options?: SetPanelWidthOptions) => {
|
|
217
|
+
const persist = options?.persist !== false;
|
|
218
|
+
const shellW = getShellWidth();
|
|
219
|
+
const effectiveSidebarW = isOpen ? sidebarWidthPx : 0;
|
|
220
|
+
const next = clampChatWidthPx(px, shellW, effectiveSidebarW);
|
|
221
|
+
_setChatWidthPx(next);
|
|
222
|
+
if (persist && getCookiePreferences(userId)?.functional) {
|
|
223
|
+
LS.set(CHAT_WIDTH_STORAGE_KEY, next);
|
|
224
|
+
}
|
|
225
|
+
},
|
|
226
|
+
[getShellWidth, isOpen, sidebarWidthPx, userId],
|
|
227
|
+
);
|
|
228
|
+
|
|
229
|
+
const handleShellResize = useCallback(
|
|
230
|
+
(shellW: number) => {
|
|
231
|
+
shellWidthRef.current = shellW;
|
|
232
|
+
const prev = prevShellWidthRef.current;
|
|
233
|
+
if (prev > 0 && shellW > 0) {
|
|
234
|
+
const s = sidebarWidthRef.current;
|
|
235
|
+
const c = chatWidthRef.current;
|
|
236
|
+
const sScaled = Math.round((s * shellW) / prev);
|
|
237
|
+
const cScaled = Math.round((c * shellW) / prev);
|
|
238
|
+
const effS = (navOpen: boolean, sidebarPx: number) =>
|
|
239
|
+
navOpen ? sidebarPx : 0;
|
|
240
|
+
let cNext = clampChatWidthPx(cScaled, shellW, effS(isOpen, sScaled));
|
|
241
|
+
let sNext = clampSidebarWidthPx(sScaled, shellW, {
|
|
242
|
+
chatPanelOpen,
|
|
243
|
+
chatWidthPx: cNext,
|
|
244
|
+
});
|
|
245
|
+
cNext = clampChatWidthPx(cScaled, shellW, effS(isOpen, sNext));
|
|
246
|
+
sNext = clampSidebarWidthPx(sScaled, shellW, {
|
|
247
|
+
chatPanelOpen,
|
|
248
|
+
chatWidthPx: cNext,
|
|
249
|
+
});
|
|
250
|
+
_setSidebarWidthPx(sNext);
|
|
251
|
+
_setChatWidthPx(cNext);
|
|
252
|
+
if (allowPersistSidebarWidth) {
|
|
253
|
+
LS.set(sidebarLsKey, sNext);
|
|
254
|
+
}
|
|
255
|
+
if (getCookiePreferences(userId)?.functional) {
|
|
256
|
+
LS.set(CHAT_WIDTH_STORAGE_KEY, cNext);
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
prevShellWidthRef.current = shellW;
|
|
260
|
+
},
|
|
261
|
+
[chatPanelOpen, isOpen, userId, sidebarLsKey, allowPersistSidebarWidth],
|
|
262
|
+
);
|
|
263
|
+
|
|
264
|
+
const fitPanelWidthsToShell = useCallback(() => {
|
|
265
|
+
const shellW = getShellWidth();
|
|
266
|
+
if (shellW <= 0) return;
|
|
267
|
+
const s = sidebarWidthRef.current;
|
|
268
|
+
const c = chatWidthRef.current;
|
|
269
|
+
const effS = isOpen ? s : 0;
|
|
270
|
+
let cNext = clampChatWidthPx(c, shellW, effS);
|
|
271
|
+
let sNext = clampSidebarWidthPx(s, shellW, {
|
|
272
|
+
chatPanelOpen,
|
|
273
|
+
chatWidthPx: cNext,
|
|
274
|
+
});
|
|
275
|
+
cNext = clampChatWidthPx(c, shellW, isOpen ? sNext : 0);
|
|
276
|
+
sNext = clampSidebarWidthPx(s, shellW, {
|
|
277
|
+
chatPanelOpen,
|
|
278
|
+
chatWidthPx: cNext,
|
|
279
|
+
});
|
|
280
|
+
if (sNext !== s || cNext !== c) {
|
|
281
|
+
_setSidebarWidthPx(sNext);
|
|
282
|
+
_setChatWidthPx(cNext);
|
|
283
|
+
if (allowPersistSidebarWidth) {
|
|
284
|
+
LS.set(sidebarLsKey, sNext);
|
|
285
|
+
}
|
|
286
|
+
if (getCookiePreferences(userId)?.functional) {
|
|
287
|
+
LS.set(CHAT_WIDTH_STORAGE_KEY, cNext);
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
}, [
|
|
291
|
+
chatPanelOpen,
|
|
292
|
+
getShellWidth,
|
|
293
|
+
isOpen,
|
|
294
|
+
userId,
|
|
295
|
+
sidebarLsKey,
|
|
296
|
+
allowPersistSidebarWidth,
|
|
297
|
+
]);
|
|
298
|
+
|
|
299
|
+
useLayoutEffect(() => {
|
|
300
|
+
if (!shellEl || isMobile) return;
|
|
301
|
+
fitPanelWidthsToShell();
|
|
302
|
+
}, [shellEl, chatPanelOpen, isMobile, isOpen, fitPanelWidthsToShell]);
|
|
303
|
+
|
|
304
|
+
useShellWidthObserver(shellEl, handleShellResize);
|
|
305
|
+
|
|
306
|
+
const setOpen = useCallback(
|
|
307
|
+
(value: boolean, options?: SetSidebarOpenOptions) => {
|
|
308
|
+
const useViewTransition =
|
|
309
|
+
options?.viewTransition !== false &&
|
|
310
|
+
!isMobile &&
|
|
311
|
+
'startViewTransition' in document &&
|
|
312
|
+
document.startViewTransition;
|
|
313
|
+
|
|
314
|
+
if (useViewTransition) {
|
|
315
|
+
document.startViewTransition(() => {
|
|
316
|
+
setIsOpen(value);
|
|
317
|
+
});
|
|
318
|
+
} else {
|
|
319
|
+
setIsOpen(value);
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
if (getCookiePreferences(userId)?.functional) {
|
|
323
|
+
setCookie('isSidebarOpen', value.toString(), 60 * 60 * 24 * 7);
|
|
324
|
+
}
|
|
325
|
+
},
|
|
326
|
+
[isMobile, userId],
|
|
327
|
+
);
|
|
328
|
+
|
|
329
|
+
const toggleSidebar = useCallback(() => setOpen(!isOpen), [isOpen, setOpen]);
|
|
330
|
+
|
|
331
|
+
useEffect(() => {
|
|
332
|
+
const shell = wrapperRef.current;
|
|
333
|
+
if (!shell) return;
|
|
334
|
+
if (chatPanelOpen) {
|
|
335
|
+
shell.setAttribute('data-chat-open', '');
|
|
336
|
+
if (isMobile) {
|
|
337
|
+
shell.style.setProperty('--chat-panel-width', '100%');
|
|
338
|
+
shell.style.setProperty('--chat-panel-height', '100dvh');
|
|
339
|
+
} else {
|
|
340
|
+
shell.style.setProperty('--chat-panel-width', `${chatWidthPx}px`);
|
|
341
|
+
shell.style.removeProperty('--chat-panel-height');
|
|
342
|
+
}
|
|
343
|
+
} else {
|
|
344
|
+
shell.removeAttribute('data-chat-open');
|
|
345
|
+
shell.style.setProperty('--chat-panel-width', '0px');
|
|
346
|
+
shell.style.removeProperty('--chat-panel-height');
|
|
347
|
+
}
|
|
348
|
+
}, [chatPanelOpen, isMobile, chatWidthPx]);
|
|
349
|
+
|
|
350
|
+
useEffect(() => {
|
|
351
|
+
return () => {
|
|
352
|
+
const shell = wrapperRef.current;
|
|
353
|
+
if (!shell) return;
|
|
354
|
+
shell.removeAttribute('data-chat-open');
|
|
355
|
+
shell.style.setProperty('--chat-panel-width', '0px');
|
|
356
|
+
shell.style.removeProperty('--chat-panel-height');
|
|
357
|
+
};
|
|
358
|
+
}, []);
|
|
359
|
+
|
|
360
|
+
useEvent({
|
|
361
|
+
event: 'keydown',
|
|
362
|
+
callback: (e: KeyboardEvent) => {
|
|
363
|
+
const isToggleShortcut =
|
|
364
|
+
(e.key === SIDEBAR_KEYBOARD_SHORTCUT && (e.metaKey || e.ctrlKey)) ||
|
|
365
|
+
(e.key === '/' && !isEditableKeyboardTarget(document.activeElement));
|
|
366
|
+
|
|
367
|
+
if (isToggleShortcut) {
|
|
368
|
+
e.preventDefault();
|
|
369
|
+
toggleSidebar();
|
|
370
|
+
}
|
|
371
|
+
},
|
|
372
|
+
});
|
|
373
|
+
|
|
374
|
+
const contextValue = useMemo<SidebarContextProps>(
|
|
375
|
+
() => ({
|
|
376
|
+
isOpen,
|
|
377
|
+
setOpen,
|
|
378
|
+
toggleSidebar,
|
|
379
|
+
sidebarWidthPx,
|
|
380
|
+
setSidebarWidthPx,
|
|
381
|
+
chatWidthPx,
|
|
382
|
+
setChatWidthPx,
|
|
383
|
+
chatPanelOpen,
|
|
384
|
+
setChatPanelOpen,
|
|
385
|
+
getShellWidth,
|
|
386
|
+
chatPanelContainer,
|
|
387
|
+
sidebarWrapperRef: wrapperRef,
|
|
388
|
+
}),
|
|
389
|
+
[
|
|
390
|
+
isOpen,
|
|
391
|
+
setOpen,
|
|
392
|
+
toggleSidebar,
|
|
393
|
+
sidebarWidthPx,
|
|
394
|
+
setSidebarWidthPx,
|
|
395
|
+
chatWidthPx,
|
|
396
|
+
setChatWidthPx,
|
|
397
|
+
chatPanelOpen,
|
|
398
|
+
getShellWidth,
|
|
399
|
+
chatPanelContainer,
|
|
400
|
+
],
|
|
401
|
+
);
|
|
402
|
+
|
|
403
|
+
return (
|
|
404
|
+
<SidebarContext.Provider value={contextValue}>
|
|
405
|
+
<TooltipProvider delayDuration={0}>
|
|
406
|
+
<div
|
|
407
|
+
ref={mergeWrapperRef}
|
|
408
|
+
data-slot="sidebar-wrapper"
|
|
409
|
+
data-state={isOpen ? 'expanded' : 'collapsed'}
|
|
410
|
+
style={
|
|
411
|
+
{
|
|
412
|
+
'--sidebar-width': `${sidebarWidthPx}px`,
|
|
413
|
+
'--sidebar-width-icon': SIDEBAR_WIDTH_ICON,
|
|
414
|
+
...style,
|
|
415
|
+
} as CSSProperties
|
|
416
|
+
}
|
|
417
|
+
className={cn(S.sidebarWrapper, className)}
|
|
418
|
+
{...props}
|
|
419
|
+
>
|
|
420
|
+
<div
|
|
421
|
+
className={S.sidebarMainShell}
|
|
422
|
+
// style={{ viewTransitionName: 'sidebar-gap' }}
|
|
423
|
+
>
|
|
424
|
+
{children}
|
|
425
|
+
</div>
|
|
426
|
+
<div
|
|
427
|
+
ref={onChatPanelMount}
|
|
428
|
+
className={S.chatPanelMount}
|
|
429
|
+
data-slot="chat-panel-mount"
|
|
430
|
+
// style={{ viewTransitionName: 'sidebar-container' }}
|
|
431
|
+
/>
|
|
432
|
+
</div>
|
|
433
|
+
</TooltipProvider>
|
|
434
|
+
</SidebarContext.Provider>
|
|
435
|
+
);
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
function Sidebar({
|
|
439
|
+
defaultOpen = true,
|
|
440
|
+
open: openProp,
|
|
441
|
+
onOpenChange: setOpenProp,
|
|
442
|
+
className,
|
|
443
|
+
side = 'left',
|
|
444
|
+
variant = 'sidebar',
|
|
445
|
+
collapsible = 'offcanvas',
|
|
446
|
+
children,
|
|
447
|
+
fullHeightResizer = false,
|
|
448
|
+
...props
|
|
449
|
+
}: SidebarProps) {
|
|
450
|
+
const isMobile = useIsMobile();
|
|
451
|
+
const { isOpen, setOpen } = useSidebar();
|
|
452
|
+
|
|
453
|
+
// Only force-close on mobile. Do not call setOpen(true) on desktop — that ran on every
|
|
454
|
+
// load and overwrote the isSidebarOpen cookie (collapsed → opened + cookie "true").
|
|
455
|
+
useEffect(() => {
|
|
456
|
+
if (isMobile) setOpen(false);
|
|
457
|
+
}, [isMobile, setOpen]);
|
|
458
|
+
|
|
459
|
+
if (collapsible === 'none') {
|
|
460
|
+
return (
|
|
461
|
+
<div
|
|
462
|
+
data-slot="sidebar"
|
|
463
|
+
className={cn(S.sidebarNone, className)}
|
|
464
|
+
{...props}
|
|
465
|
+
>
|
|
466
|
+
{children}
|
|
467
|
+
</div>
|
|
468
|
+
);
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
if (isMobile) {
|
|
472
|
+
return (
|
|
473
|
+
<Sheet open={isOpen} onOpenChange={setOpen} {...props}>
|
|
474
|
+
<SheetContent
|
|
475
|
+
data-sidebar="sidebar"
|
|
476
|
+
data-slot="sidebar"
|
|
477
|
+
className={cn(S.sheetContentSidebar, className)}
|
|
478
|
+
style={
|
|
479
|
+
{
|
|
480
|
+
'--gap-top': '40px',
|
|
481
|
+
'--sidebar-width': SIDEBAR_WIDTH_MOBILE,
|
|
482
|
+
} as CSSProperties
|
|
483
|
+
}
|
|
484
|
+
side={side}
|
|
485
|
+
>
|
|
486
|
+
<SheetTitle className="sr-only">Navigation Menu</SheetTitle>
|
|
487
|
+
<div className={cn(S.sheetSidebarInner)}>{children}</div>
|
|
488
|
+
</SheetContent>
|
|
489
|
+
</Sheet>
|
|
490
|
+
);
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
return (
|
|
494
|
+
<aside
|
|
495
|
+
className={cn(
|
|
496
|
+
S.sidebar,
|
|
497
|
+
S[`variant-${variant}`],
|
|
498
|
+
className,
|
|
499
|
+
fullHeightResizer && S.fullHeightResizer,
|
|
500
|
+
)}
|
|
501
|
+
data-state={isOpen ? 'expanded' : 'collapsed'}
|
|
502
|
+
data-collapsible={!isOpen ? collapsible : ''}
|
|
503
|
+
data-variant={variant}
|
|
504
|
+
data-side={side}
|
|
505
|
+
{...props}
|
|
506
|
+
>
|
|
507
|
+
{children}
|
|
508
|
+
<SidebarResizeHandle side={side} />
|
|
509
|
+
</aside>
|
|
510
|
+
);
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
function SidebarTrigger({
|
|
514
|
+
className,
|
|
515
|
+
onClick,
|
|
516
|
+
...props
|
|
517
|
+
}: ComponentProps<typeof Button>) {
|
|
518
|
+
const { toggleSidebar } = useSidebar();
|
|
519
|
+
|
|
520
|
+
return (
|
|
521
|
+
<Button
|
|
522
|
+
data-sidebar="trigger"
|
|
523
|
+
data-slot="sidebar-trigger"
|
|
524
|
+
variant="ghost"
|
|
525
|
+
icon
|
|
526
|
+
className={cn(S.sidebarTrigger, className)}
|
|
527
|
+
onClick={event => {
|
|
528
|
+
onClick?.(event);
|
|
529
|
+
toggleSidebar();
|
|
530
|
+
}}
|
|
531
|
+
{...props}
|
|
532
|
+
>
|
|
533
|
+
<PanelLeft size={20} strokeWidth={1.5} className="text-foreground" />
|
|
534
|
+
{/* <span className="sr-only">Toggle Sidebar</span> */}
|
|
535
|
+
</Button>
|
|
536
|
+
);
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
function SidebarRail({ className, ...props }: ComponentProps<'button'>) {
|
|
540
|
+
const { toggleSidebar } = useSidebar();
|
|
541
|
+
|
|
542
|
+
return (
|
|
543
|
+
<button
|
|
544
|
+
data-sidebar="rail"
|
|
545
|
+
data-slot="sidebar-rail"
|
|
546
|
+
aria-label="Toggle Sidebar"
|
|
547
|
+
tabIndex={-1}
|
|
548
|
+
onClick={toggleSidebar}
|
|
549
|
+
title="Toggle Sidebar"
|
|
550
|
+
className={cn(S.sidebarRail, className)}
|
|
551
|
+
{...props}
|
|
552
|
+
/>
|
|
553
|
+
);
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
function PanelResizeHandle({
|
|
557
|
+
className,
|
|
558
|
+
edge,
|
|
559
|
+
isActive,
|
|
560
|
+
startWidthPx,
|
|
561
|
+
getShellWidth,
|
|
562
|
+
onDragWidth,
|
|
563
|
+
onDragComplete,
|
|
564
|
+
...props
|
|
565
|
+
}: ComponentProps<'div'> & {
|
|
566
|
+
edge: 'leading' | 'trailing';
|
|
567
|
+
isActive: boolean;
|
|
568
|
+
startWidthPx: number;
|
|
569
|
+
getShellWidth: () => number;
|
|
570
|
+
onDragWidth: (rawPx: number) => void;
|
|
571
|
+
onDragComplete?: (finalRawPx: number) => void;
|
|
572
|
+
}) {
|
|
573
|
+
const handleRef = useRef<HTMLDivElement>(null);
|
|
574
|
+
const startWidthRef = useRef(0);
|
|
575
|
+
const lastRawRef = useRef(0);
|
|
576
|
+
|
|
577
|
+
const handleDrag = useCallback(
|
|
578
|
+
(delta: Delta) => {
|
|
579
|
+
const shellW = getShellWidth();
|
|
580
|
+
if (shellW <= 0) return;
|
|
581
|
+
const raw =
|
|
582
|
+
edge === 'trailing'
|
|
583
|
+
? startWidthRef.current + delta.x
|
|
584
|
+
: startWidthRef.current - delta.x;
|
|
585
|
+
lastRawRef.current = raw;
|
|
586
|
+
onDragWidth(raw);
|
|
587
|
+
},
|
|
588
|
+
[edge, getShellWidth, onDragWidth],
|
|
589
|
+
);
|
|
590
|
+
|
|
591
|
+
const handleDragStart = useCallback(
|
|
592
|
+
(e: PointerEvent) => {
|
|
593
|
+
startWidthRef.current = startWidthPx;
|
|
594
|
+
lastRawRef.current = startWidthPx;
|
|
595
|
+
handleRef.current?.setPointerCapture(e.pointerId);
|
|
596
|
+
},
|
|
597
|
+
[startWidthPx],
|
|
598
|
+
);
|
|
599
|
+
|
|
600
|
+
const handleDragEnd = useCallback(
|
|
601
|
+
(e: PointerEvent) => {
|
|
602
|
+
onDragComplete?.(lastRawRef.current);
|
|
603
|
+
try {
|
|
604
|
+
handleRef.current?.releasePointerCapture(e.pointerId);
|
|
605
|
+
} catch {
|
|
606
|
+
// Capture already released
|
|
607
|
+
}
|
|
608
|
+
startWidthRef.current = 0;
|
|
609
|
+
},
|
|
610
|
+
[onDragComplete],
|
|
611
|
+
);
|
|
612
|
+
|
|
613
|
+
useElemDrag({
|
|
614
|
+
elem: handleRef,
|
|
615
|
+
onDrag: handleDrag,
|
|
616
|
+
onDragStart: handleDragStart,
|
|
617
|
+
onDragEnd: handleDragEnd,
|
|
618
|
+
isActive,
|
|
619
|
+
});
|
|
620
|
+
|
|
621
|
+
if (!isActive) {
|
|
622
|
+
return null;
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
return (
|
|
626
|
+
<div
|
|
627
|
+
ref={handleRef}
|
|
628
|
+
data-slot="panel-resize-handle"
|
|
629
|
+
data-edge={edge}
|
|
630
|
+
className={className}
|
|
631
|
+
{...props}
|
|
632
|
+
/>
|
|
633
|
+
);
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
function SidebarResizeHandle({
|
|
637
|
+
className,
|
|
638
|
+
side = 'left',
|
|
639
|
+
...props
|
|
640
|
+
}: ComponentProps<'div'> & { side?: 'left' | 'right' }) {
|
|
641
|
+
const { isOpen, sidebarWidthPx, setSidebarWidthPx, getShellWidth } =
|
|
642
|
+
useSidebar();
|
|
643
|
+
const isMobile = useIsMobile();
|
|
644
|
+
|
|
645
|
+
const edge: 'leading' | 'trailing' = side === 'left' ? 'trailing' : 'leading';
|
|
646
|
+
|
|
647
|
+
const onDragWidth = useCallback(
|
|
648
|
+
(rawPx: number) => {
|
|
649
|
+
setSidebarWidthPx(rawPx, { persist: false });
|
|
650
|
+
},
|
|
651
|
+
[setSidebarWidthPx],
|
|
652
|
+
);
|
|
653
|
+
|
|
654
|
+
const onDragComplete = useCallback(
|
|
655
|
+
(finalRawPx: number) => {
|
|
656
|
+
setSidebarWidthPx(finalRawPx, { persist: true });
|
|
657
|
+
},
|
|
658
|
+
[setSidebarWidthPx],
|
|
659
|
+
);
|
|
660
|
+
|
|
661
|
+
if (isMobile || !isOpen) {
|
|
662
|
+
return null;
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
return (
|
|
666
|
+
<PanelResizeHandle
|
|
667
|
+
edge={edge}
|
|
668
|
+
isActive={isOpen && !isMobile}
|
|
669
|
+
startWidthPx={sidebarWidthPx}
|
|
670
|
+
getShellWidth={getShellWidth}
|
|
671
|
+
onDragWidth={onDragWidth}
|
|
672
|
+
onDragComplete={onDragComplete}
|
|
673
|
+
data-sidebar="resize-handle"
|
|
674
|
+
data-slot="sidebar-resize-handle"
|
|
675
|
+
data-side={side}
|
|
676
|
+
className={cn(S.sidebarResizeHandle, className)}
|
|
677
|
+
{...props}
|
|
678
|
+
/>
|
|
679
|
+
);
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
function SidebarFooter({ className, ...props }: ComponentProps<'div'>) {
|
|
683
|
+
return (
|
|
684
|
+
<div
|
|
685
|
+
data-slot="sidebar-footer"
|
|
686
|
+
data-sidebar="footer"
|
|
687
|
+
className={cn(S.sidebarFooter, className)}
|
|
688
|
+
{...props}
|
|
689
|
+
/>
|
|
690
|
+
);
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
function SidebarSeparator({
|
|
694
|
+
className,
|
|
695
|
+
...props
|
|
696
|
+
}: ComponentProps<typeof Separator>) {
|
|
697
|
+
return (
|
|
698
|
+
<Separator
|
|
699
|
+
data-slot="sidebar-separator"
|
|
700
|
+
data-sidebar="separator"
|
|
701
|
+
className={cn(S.sidebarSeparator, className)}
|
|
702
|
+
{...props}
|
|
703
|
+
/>
|
|
704
|
+
);
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
function SidebarContent({
|
|
708
|
+
className,
|
|
709
|
+
innerClassName,
|
|
710
|
+
children,
|
|
711
|
+
}: ComponentProps<typeof Scroll>) {
|
|
712
|
+
// const sidebarContentTransition = useViewTransition({
|
|
713
|
+
// transitionName: 'sidebar-content',
|
|
714
|
+
// });
|
|
715
|
+
|
|
716
|
+
return (
|
|
717
|
+
<Scroll
|
|
718
|
+
y
|
|
719
|
+
autoHide
|
|
720
|
+
fadeSize="l"
|
|
721
|
+
offset={{ y: { before: 40, after: 20 } }}
|
|
722
|
+
className={cn(S.sidebarContent, className)}
|
|
723
|
+
innerClassName={innerClassName}
|
|
724
|
+
>
|
|
725
|
+
{children}
|
|
726
|
+
</Scroll>
|
|
727
|
+
);
|
|
728
|
+
}
|
|
729
|
+
|
|
730
|
+
function SidebarGroup({ className, ...props }: ComponentProps<'div'>) {
|
|
731
|
+
return (
|
|
732
|
+
<div
|
|
733
|
+
data-slot="sidebar-group"
|
|
734
|
+
data-sidebar="group"
|
|
735
|
+
className={cn(S.sidebarGroup, className)}
|
|
736
|
+
{...props}
|
|
737
|
+
/>
|
|
738
|
+
);
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
function SidebarGroupLabel({
|
|
742
|
+
className,
|
|
743
|
+
asChild = false,
|
|
744
|
+
...props
|
|
745
|
+
}: ComponentProps<'div'> & { asChild?: boolean }) {
|
|
746
|
+
const Comp = asChild ? Slot : 'div';
|
|
747
|
+
|
|
748
|
+
return (
|
|
749
|
+
<Comp
|
|
750
|
+
data-slot="sidebar-group-label"
|
|
751
|
+
data-sidebar="group-label"
|
|
752
|
+
className={cn(S.sidebarGroupLabel, className)}
|
|
753
|
+
{...props}
|
|
754
|
+
/>
|
|
755
|
+
);
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
function SidebarGroupAction({
|
|
759
|
+
className,
|
|
760
|
+
asChild = false,
|
|
761
|
+
...props
|
|
762
|
+
}: ComponentProps<'button'> & { asChild?: boolean }) {
|
|
763
|
+
const Comp = asChild ? Slot : 'button';
|
|
764
|
+
|
|
765
|
+
return (
|
|
766
|
+
<Comp
|
|
767
|
+
data-slot="sidebar-group-action"
|
|
768
|
+
data-sidebar="group-action"
|
|
769
|
+
className={cn(S.sidebarGroupAction, className)}
|
|
770
|
+
{...props}
|
|
771
|
+
/>
|
|
772
|
+
);
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
function SidebarGroupContent({ className, ...props }: ComponentProps<'div'>) {
|
|
776
|
+
return (
|
|
777
|
+
<div
|
|
778
|
+
data-slot="sidebar-group-content"
|
|
779
|
+
data-sidebar="group-content"
|
|
780
|
+
className={cn(S.sidebarGroupContent, className)}
|
|
781
|
+
{...props}
|
|
782
|
+
/>
|
|
783
|
+
);
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
function SidebarMenu({ className, ...props }: ComponentProps<'ul'>) {
|
|
787
|
+
return (
|
|
788
|
+
<ul
|
|
789
|
+
data-slot="sidebar-menu"
|
|
790
|
+
data-sidebar="menu"
|
|
791
|
+
className={cn(S.sidebarMenu, className)}
|
|
792
|
+
{...props}
|
|
793
|
+
/>
|
|
794
|
+
);
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
function SidebarMenuItem({ className, ...props }: ComponentProps<'li'>) {
|
|
798
|
+
return (
|
|
799
|
+
<li
|
|
800
|
+
data-slot="sidebar-menu-item"
|
|
801
|
+
data-sidebar="menu-item"
|
|
802
|
+
className={cn(S.sidebarMenuItem, className)}
|
|
803
|
+
{...props}
|
|
804
|
+
/>
|
|
805
|
+
);
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
function SidebarMenuButton({
|
|
809
|
+
asChild = false,
|
|
810
|
+
isActive = false,
|
|
811
|
+
variant = 'ghost',
|
|
812
|
+
size = 'sm',
|
|
813
|
+
className,
|
|
814
|
+
...props
|
|
815
|
+
}: ButtonProps & { isActive?: boolean }) {
|
|
816
|
+
return (
|
|
817
|
+
<Button
|
|
818
|
+
asChild={asChild}
|
|
819
|
+
variant={variant}
|
|
820
|
+
size={size}
|
|
821
|
+
data-slot="sidebar-menu-button"
|
|
822
|
+
data-sidebar="menu-button"
|
|
823
|
+
data-active={isActive}
|
|
824
|
+
className={cn(
|
|
825
|
+
variant === 'default' ? S.sidebarMenuButtonCta : S.sidebarMenuButton,
|
|
826
|
+
S[`size-${size}`],
|
|
827
|
+
className,
|
|
828
|
+
)}
|
|
829
|
+
{...props}
|
|
830
|
+
/>
|
|
831
|
+
);
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
function SidebarMenuAction({
|
|
835
|
+
className,
|
|
836
|
+
asChild = false,
|
|
837
|
+
showOnHover = false,
|
|
838
|
+
...props
|
|
839
|
+
}: ComponentProps<'button'> & {
|
|
840
|
+
asChild?: boolean;
|
|
841
|
+
showOnHover?: boolean;
|
|
842
|
+
}) {
|
|
843
|
+
const Comp = asChild ? Slot : 'button';
|
|
844
|
+
|
|
845
|
+
return (
|
|
846
|
+
<Comp
|
|
847
|
+
data-slot="sidebar-menu-action"
|
|
848
|
+
data-sidebar="menu-action"
|
|
849
|
+
className={cn(
|
|
850
|
+
S.sidebarMenuAction,
|
|
851
|
+
showOnHover && S.showOnHover,
|
|
852
|
+
className,
|
|
853
|
+
)}
|
|
854
|
+
{...props}
|
|
855
|
+
/>
|
|
856
|
+
);
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
function SidebarMenuBadge({ className, ...props }: ComponentProps<'div'>) {
|
|
860
|
+
return (
|
|
861
|
+
<div
|
|
862
|
+
data-slot="sidebar-menu-badge"
|
|
863
|
+
data-sidebar="menu-badge"
|
|
864
|
+
className={cn(S.sidebarMenuBadge, className)}
|
|
865
|
+
{...props}
|
|
866
|
+
/>
|
|
867
|
+
);
|
|
868
|
+
}
|
|
869
|
+
|
|
870
|
+
function SidebarMenuSub({ className, ...props }: ComponentProps<'ul'>) {
|
|
871
|
+
return (
|
|
872
|
+
<ul
|
|
873
|
+
data-slot="sidebar-menu-sub"
|
|
874
|
+
data-sidebar="menu-sub"
|
|
875
|
+
className={cn(S.sidebarMenuSub, className)}
|
|
876
|
+
{...props}
|
|
877
|
+
/>
|
|
878
|
+
);
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
function SidebarMenuSubItem({ className, ...props }: ComponentProps<'li'>) {
|
|
882
|
+
return (
|
|
883
|
+
<li
|
|
884
|
+
data-slot="sidebar-menu-sub-item"
|
|
885
|
+
data-sidebar="menu-sub-item"
|
|
886
|
+
className={cn(S.sidebarMenuSubItem, className)}
|
|
887
|
+
{...props}
|
|
888
|
+
/>
|
|
889
|
+
);
|
|
890
|
+
}
|
|
891
|
+
|
|
892
|
+
function SidebarMenuSubButton({
|
|
893
|
+
asChild = false,
|
|
894
|
+
size = 'md',
|
|
895
|
+
isActive = false,
|
|
896
|
+
tooltip,
|
|
897
|
+
className,
|
|
898
|
+
onClick,
|
|
899
|
+
...props
|
|
900
|
+
}: ComponentProps<'a'> & {
|
|
901
|
+
asChild?: boolean;
|
|
902
|
+
size?: 'sm' | 'md' | 'lg';
|
|
903
|
+
isActive?: boolean;
|
|
904
|
+
tooltip?: string | ComponentProps<typeof TooltipContent>;
|
|
905
|
+
}) {
|
|
906
|
+
const Comp = asChild ? Slot : 'a';
|
|
907
|
+
const { isOpen, setOpen } = useSidebar();
|
|
908
|
+
const isMobile = useIsMobile();
|
|
909
|
+
|
|
910
|
+
const handleClick = (event: React.MouseEvent<HTMLAnchorElement>) => {
|
|
911
|
+
if (isMobile && isOpen) setOpen(false);
|
|
912
|
+
onClick?.(event);
|
|
913
|
+
};
|
|
914
|
+
|
|
915
|
+
const button = (
|
|
916
|
+
<Comp
|
|
917
|
+
data-slot="sidebar-menu-sub-button"
|
|
918
|
+
data-sidebar="menu-sub-button"
|
|
919
|
+
data-size={size}
|
|
920
|
+
data-active={isActive}
|
|
921
|
+
className={cn(S.sidebarMenuSubButton, S[`size-${size}`], className)}
|
|
922
|
+
onClick={handleClick}
|
|
923
|
+
{...props}
|
|
924
|
+
/>
|
|
925
|
+
);
|
|
926
|
+
|
|
927
|
+
if (!tooltip) return button;
|
|
928
|
+
|
|
929
|
+
if (typeof tooltip === 'string') {
|
|
930
|
+
tooltip = {
|
|
931
|
+
children: tooltip,
|
|
932
|
+
};
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
return (
|
|
936
|
+
<Tooltip>
|
|
937
|
+
<TooltipTrigger asChild>{button}</TooltipTrigger>
|
|
938
|
+
<TooltipContent
|
|
939
|
+
side="right"
|
|
940
|
+
align="center"
|
|
941
|
+
hidden={!isOpen || isMobile}
|
|
942
|
+
{...tooltip}
|
|
943
|
+
/>
|
|
944
|
+
</Tooltip>
|
|
945
|
+
);
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
export {
|
|
949
|
+
PanelResizeHandle,
|
|
950
|
+
Sidebar,
|
|
951
|
+
SidebarContent,
|
|
952
|
+
SidebarFooter,
|
|
953
|
+
SidebarGroup,
|
|
954
|
+
SidebarGroupAction,
|
|
955
|
+
SidebarGroupContent,
|
|
956
|
+
SidebarGroupLabel,
|
|
957
|
+
SidebarMenu,
|
|
958
|
+
SidebarMenuAction,
|
|
959
|
+
SidebarMenuBadge,
|
|
960
|
+
SidebarMenuButton,
|
|
961
|
+
SidebarMenuItem,
|
|
962
|
+
SidebarMenuSub,
|
|
963
|
+
SidebarMenuSubButton,
|
|
964
|
+
SidebarMenuSubItem,
|
|
965
|
+
SidebarProvider,
|
|
966
|
+
SidebarRail,
|
|
967
|
+
SidebarResizeHandle,
|
|
968
|
+
SidebarSeparator,
|
|
969
|
+
SidebarTrigger,
|
|
970
|
+
useSidebar,
|
|
971
|
+
};
|