@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,448 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import cn from 'classnames';
|
|
3
|
+
import { createContext, useContext, useState, useRef, useCallback, useLayoutEffect, useEffect, useMemo } from 'react';
|
|
4
|
+
import { Button } from '../Button/Button.js';
|
|
5
|
+
import { Separator } from '../Separator/Separator.js';
|
|
6
|
+
import { Sheet, SheetContent, SheetTitle } from '../Sheet/Sheet.js';
|
|
7
|
+
import { TooltipProvider, Tooltip, TooltipTrigger, TooltipContent } from '../Tooltip/Tooltip.js';
|
|
8
|
+
import { clampSidebarWidthPx, CHAT_WIDTH_STORAGE_KEY, SIDEBAR_WIDTH_DEFAULT_PX, SIDEBAR_WIDTH_MIN_PX, SIDEBAR_WIDTH_STORAGE_KEY_PX, SIDEBAR_WIDTH_STORAGE_KEY_PCT, CHAT_WIDTH_DEFAULT_PX, CHAT_WIDTH_MIN_PX, defaultChatWidthPx, clampChatWidthPx } from '../../../hooks/panelWidth.js';
|
|
9
|
+
import useElemDrag from '../../../hooks/useDragElem.js';
|
|
10
|
+
import useEvent from '../../../hooks/useEvent.js';
|
|
11
|
+
import { useIsMobile } from '../../../hooks/useIsMobile.js';
|
|
12
|
+
import { useShellWidthObserver } from '../../../hooks/useShellWidthObserver.js';
|
|
13
|
+
import { setCookie, getCookie } from '../../../lib/cookie.js';
|
|
14
|
+
import { getCookiePreferences } from '../../../lib/cookie-consent/cookie-consent.js';
|
|
15
|
+
import { LS, Scroll } from '@homecode/ui';
|
|
16
|
+
import { Slot } from '@radix-ui/react-slot';
|
|
17
|
+
import { PanelLeft } from 'lucide-react';
|
|
18
|
+
import SidebarStem from './Sidebar.styl.js';
|
|
19
|
+
|
|
20
|
+
const SIDEBAR_WIDTH_MOBILE = '18rem';
|
|
21
|
+
const SIDEBAR_WIDTH_ICON = '3rem';
|
|
22
|
+
const SIDEBAR_KEYBOARD_SHORTCUT = 'b';
|
|
23
|
+
function isEditableKeyboardTarget(el) {
|
|
24
|
+
if (!el)
|
|
25
|
+
return false;
|
|
26
|
+
if (el instanceof HTMLElement && el.isContentEditable)
|
|
27
|
+
return true;
|
|
28
|
+
const tag = el.tagName;
|
|
29
|
+
return tag === 'INPUT' || tag === 'TEXTAREA' || tag === 'SELECT';
|
|
30
|
+
}
|
|
31
|
+
function readInitialSidebarWidthPx(storageKeyPx) {
|
|
32
|
+
if (typeof window === 'undefined')
|
|
33
|
+
return SIDEBAR_WIDTH_DEFAULT_PX;
|
|
34
|
+
const stored = LS.get(storageKeyPx);
|
|
35
|
+
if (typeof stored === 'number' && stored >= SIDEBAR_WIDTH_MIN_PX) {
|
|
36
|
+
return stored;
|
|
37
|
+
}
|
|
38
|
+
if (storageKeyPx === SIDEBAR_WIDTH_STORAGE_KEY_PX) {
|
|
39
|
+
const legacyPct = LS.get(SIDEBAR_WIDTH_STORAGE_KEY_PCT);
|
|
40
|
+
if (typeof legacyPct === 'number' && legacyPct > 0) {
|
|
41
|
+
const w = window.innerWidth;
|
|
42
|
+
return clampSidebarWidthPx(Math.round((legacyPct / 100) * w), w, {
|
|
43
|
+
chatPanelOpen: false,
|
|
44
|
+
chatWidthPx: 0,
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return SIDEBAR_WIDTH_DEFAULT_PX;
|
|
49
|
+
}
|
|
50
|
+
function readInitialChatWidthPx() {
|
|
51
|
+
if (typeof window === 'undefined')
|
|
52
|
+
return CHAT_WIDTH_DEFAULT_PX;
|
|
53
|
+
const stored = LS.get(CHAT_WIDTH_STORAGE_KEY);
|
|
54
|
+
if (typeof stored === 'number' && stored >= CHAT_WIDTH_MIN_PX) {
|
|
55
|
+
return stored;
|
|
56
|
+
}
|
|
57
|
+
return defaultChatWidthPx(window.innerWidth);
|
|
58
|
+
}
|
|
59
|
+
const SidebarContext = createContext(null);
|
|
60
|
+
function useSidebar() {
|
|
61
|
+
const context = useContext(SidebarContext);
|
|
62
|
+
if (!context) {
|
|
63
|
+
throw new Error('useSidebar must be used within a SidebarProvider.');
|
|
64
|
+
}
|
|
65
|
+
return context;
|
|
66
|
+
}
|
|
67
|
+
function SidebarProvider({ defaultOpen = getCookie('isSidebarOpen') ?? true, className, style, children, userId, sidebarWidthStorageKey, persistSidebarWidthWithoutConsent = false, ...props }) {
|
|
68
|
+
const sidebarLsKey = sidebarWidthStorageKey ?? SIDEBAR_WIDTH_STORAGE_KEY_PX;
|
|
69
|
+
const allowPersistSidebarWidth = persistSidebarWidthWithoutConsent ||
|
|
70
|
+
Boolean(getCookiePreferences(userId)?.functional);
|
|
71
|
+
const isMobile = useIsMobile();
|
|
72
|
+
const [isOpen, setIsOpen] = useState(isMobile ? false : defaultOpen);
|
|
73
|
+
const wrapperRef = useRef(null);
|
|
74
|
+
const shellWidthRef = useRef(0);
|
|
75
|
+
const prevShellWidthRef = useRef(0);
|
|
76
|
+
const [shellEl, setShellEl] = useState(null);
|
|
77
|
+
const [chatPanelContainer, setChatPanelContainer] = useState(null);
|
|
78
|
+
const onChatPanelMount = useCallback((node) => {
|
|
79
|
+
setChatPanelContainer(node);
|
|
80
|
+
}, []);
|
|
81
|
+
const [sidebarWidthPx, _setSidebarWidthPx] = useState(() => readInitialSidebarWidthPx(sidebarLsKey));
|
|
82
|
+
const [chatWidthPx, _setChatWidthPx] = useState(readInitialChatWidthPx);
|
|
83
|
+
const [chatPanelOpen, setChatPanelOpen] = useState(false);
|
|
84
|
+
const sidebarWidthRef = useRef(sidebarWidthPx);
|
|
85
|
+
const chatWidthRef = useRef(chatWidthPx);
|
|
86
|
+
sidebarWidthRef.current = sidebarWidthPx;
|
|
87
|
+
chatWidthRef.current = chatWidthPx;
|
|
88
|
+
const mergeWrapperRef = useCallback((el) => {
|
|
89
|
+
wrapperRef.current = el;
|
|
90
|
+
setShellEl(el);
|
|
91
|
+
}, []);
|
|
92
|
+
const getShellWidth = useCallback(() => {
|
|
93
|
+
const w = shellWidthRef.current;
|
|
94
|
+
if (w > 0)
|
|
95
|
+
return w;
|
|
96
|
+
if (wrapperRef.current) {
|
|
97
|
+
const cw = wrapperRef.current.getBoundingClientRect().width;
|
|
98
|
+
if (cw > 0)
|
|
99
|
+
return cw;
|
|
100
|
+
}
|
|
101
|
+
return typeof window !== 'undefined' ? window.innerWidth : 1200;
|
|
102
|
+
}, []);
|
|
103
|
+
const setSidebarWidthPx = useCallback((px, options) => {
|
|
104
|
+
const persist = options?.persist !== false;
|
|
105
|
+
const shellW = getShellWidth();
|
|
106
|
+
const next = clampSidebarWidthPx(px, shellW, {
|
|
107
|
+
chatPanelOpen,
|
|
108
|
+
chatWidthPx,
|
|
109
|
+
});
|
|
110
|
+
_setSidebarWidthPx(next);
|
|
111
|
+
if (persist && allowPersistSidebarWidth) {
|
|
112
|
+
LS.set(sidebarLsKey, next);
|
|
113
|
+
}
|
|
114
|
+
}, [
|
|
115
|
+
getShellWidth,
|
|
116
|
+
chatPanelOpen,
|
|
117
|
+
chatWidthPx,
|
|
118
|
+
sidebarLsKey,
|
|
119
|
+
allowPersistSidebarWidth,
|
|
120
|
+
]);
|
|
121
|
+
const setChatWidthPx = useCallback((px, options) => {
|
|
122
|
+
const persist = options?.persist !== false;
|
|
123
|
+
const shellW = getShellWidth();
|
|
124
|
+
const effectiveSidebarW = isOpen ? sidebarWidthPx : 0;
|
|
125
|
+
const next = clampChatWidthPx(px, shellW, effectiveSidebarW);
|
|
126
|
+
_setChatWidthPx(next);
|
|
127
|
+
if (persist && getCookiePreferences(userId)?.functional) {
|
|
128
|
+
LS.set(CHAT_WIDTH_STORAGE_KEY, next);
|
|
129
|
+
}
|
|
130
|
+
}, [getShellWidth, isOpen, sidebarWidthPx, userId]);
|
|
131
|
+
const handleShellResize = useCallback((shellW) => {
|
|
132
|
+
shellWidthRef.current = shellW;
|
|
133
|
+
const prev = prevShellWidthRef.current;
|
|
134
|
+
if (prev > 0 && shellW > 0) {
|
|
135
|
+
const s = sidebarWidthRef.current;
|
|
136
|
+
const c = chatWidthRef.current;
|
|
137
|
+
const sScaled = Math.round((s * shellW) / prev);
|
|
138
|
+
const cScaled = Math.round((c * shellW) / prev);
|
|
139
|
+
const effS = (navOpen, sidebarPx) => navOpen ? sidebarPx : 0;
|
|
140
|
+
let cNext = clampChatWidthPx(cScaled, shellW, effS(isOpen, sScaled));
|
|
141
|
+
let sNext = clampSidebarWidthPx(sScaled, shellW, {
|
|
142
|
+
chatPanelOpen,
|
|
143
|
+
chatWidthPx: cNext,
|
|
144
|
+
});
|
|
145
|
+
cNext = clampChatWidthPx(cScaled, shellW, effS(isOpen, sNext));
|
|
146
|
+
sNext = clampSidebarWidthPx(sScaled, shellW, {
|
|
147
|
+
chatPanelOpen,
|
|
148
|
+
chatWidthPx: cNext,
|
|
149
|
+
});
|
|
150
|
+
_setSidebarWidthPx(sNext);
|
|
151
|
+
_setChatWidthPx(cNext);
|
|
152
|
+
if (allowPersistSidebarWidth) {
|
|
153
|
+
LS.set(sidebarLsKey, sNext);
|
|
154
|
+
}
|
|
155
|
+
if (getCookiePreferences(userId)?.functional) {
|
|
156
|
+
LS.set(CHAT_WIDTH_STORAGE_KEY, cNext);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
prevShellWidthRef.current = shellW;
|
|
160
|
+
}, [chatPanelOpen, isOpen, userId, sidebarLsKey, allowPersistSidebarWidth]);
|
|
161
|
+
const fitPanelWidthsToShell = useCallback(() => {
|
|
162
|
+
const shellW = getShellWidth();
|
|
163
|
+
if (shellW <= 0)
|
|
164
|
+
return;
|
|
165
|
+
const s = sidebarWidthRef.current;
|
|
166
|
+
const c = chatWidthRef.current;
|
|
167
|
+
const effS = isOpen ? s : 0;
|
|
168
|
+
let cNext = clampChatWidthPx(c, shellW, effS);
|
|
169
|
+
let sNext = clampSidebarWidthPx(s, shellW, {
|
|
170
|
+
chatPanelOpen,
|
|
171
|
+
chatWidthPx: cNext,
|
|
172
|
+
});
|
|
173
|
+
cNext = clampChatWidthPx(c, shellW, isOpen ? sNext : 0);
|
|
174
|
+
sNext = clampSidebarWidthPx(s, shellW, {
|
|
175
|
+
chatPanelOpen,
|
|
176
|
+
chatWidthPx: cNext,
|
|
177
|
+
});
|
|
178
|
+
if (sNext !== s || cNext !== c) {
|
|
179
|
+
_setSidebarWidthPx(sNext);
|
|
180
|
+
_setChatWidthPx(cNext);
|
|
181
|
+
if (allowPersistSidebarWidth) {
|
|
182
|
+
LS.set(sidebarLsKey, sNext);
|
|
183
|
+
}
|
|
184
|
+
if (getCookiePreferences(userId)?.functional) {
|
|
185
|
+
LS.set(CHAT_WIDTH_STORAGE_KEY, cNext);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
}, [
|
|
189
|
+
chatPanelOpen,
|
|
190
|
+
getShellWidth,
|
|
191
|
+
isOpen,
|
|
192
|
+
userId,
|
|
193
|
+
sidebarLsKey,
|
|
194
|
+
allowPersistSidebarWidth,
|
|
195
|
+
]);
|
|
196
|
+
useLayoutEffect(() => {
|
|
197
|
+
if (!shellEl || isMobile)
|
|
198
|
+
return;
|
|
199
|
+
fitPanelWidthsToShell();
|
|
200
|
+
}, [shellEl, chatPanelOpen, isMobile, isOpen, fitPanelWidthsToShell]);
|
|
201
|
+
useShellWidthObserver(shellEl, handleShellResize);
|
|
202
|
+
const setOpen = useCallback((value, options) => {
|
|
203
|
+
const useViewTransition = options?.viewTransition !== false &&
|
|
204
|
+
!isMobile &&
|
|
205
|
+
'startViewTransition' in document &&
|
|
206
|
+
document.startViewTransition;
|
|
207
|
+
if (useViewTransition) {
|
|
208
|
+
document.startViewTransition(() => {
|
|
209
|
+
setIsOpen(value);
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
else {
|
|
213
|
+
setIsOpen(value);
|
|
214
|
+
}
|
|
215
|
+
if (getCookiePreferences(userId)?.functional) {
|
|
216
|
+
setCookie('isSidebarOpen', value.toString(), 60 * 60 * 24 * 7);
|
|
217
|
+
}
|
|
218
|
+
}, [isMobile, userId]);
|
|
219
|
+
const toggleSidebar = useCallback(() => setOpen(!isOpen), [isOpen, setOpen]);
|
|
220
|
+
useEffect(() => {
|
|
221
|
+
const shell = wrapperRef.current;
|
|
222
|
+
if (!shell)
|
|
223
|
+
return;
|
|
224
|
+
if (chatPanelOpen) {
|
|
225
|
+
shell.setAttribute('data-chat-open', '');
|
|
226
|
+
if (isMobile) {
|
|
227
|
+
shell.style.setProperty('--chat-panel-width', '100%');
|
|
228
|
+
shell.style.setProperty('--chat-panel-height', '100dvh');
|
|
229
|
+
}
|
|
230
|
+
else {
|
|
231
|
+
shell.style.setProperty('--chat-panel-width', `${chatWidthPx}px`);
|
|
232
|
+
shell.style.removeProperty('--chat-panel-height');
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
else {
|
|
236
|
+
shell.removeAttribute('data-chat-open');
|
|
237
|
+
shell.style.setProperty('--chat-panel-width', '0px');
|
|
238
|
+
shell.style.removeProperty('--chat-panel-height');
|
|
239
|
+
}
|
|
240
|
+
}, [chatPanelOpen, isMobile, chatWidthPx]);
|
|
241
|
+
useEffect(() => {
|
|
242
|
+
return () => {
|
|
243
|
+
const shell = wrapperRef.current;
|
|
244
|
+
if (!shell)
|
|
245
|
+
return;
|
|
246
|
+
shell.removeAttribute('data-chat-open');
|
|
247
|
+
shell.style.setProperty('--chat-panel-width', '0px');
|
|
248
|
+
shell.style.removeProperty('--chat-panel-height');
|
|
249
|
+
};
|
|
250
|
+
}, []);
|
|
251
|
+
useEvent({
|
|
252
|
+
event: 'keydown',
|
|
253
|
+
callback: (e) => {
|
|
254
|
+
const isToggleShortcut = (e.key === SIDEBAR_KEYBOARD_SHORTCUT && (e.metaKey || e.ctrlKey)) ||
|
|
255
|
+
(e.key === '/' && !isEditableKeyboardTarget(document.activeElement));
|
|
256
|
+
if (isToggleShortcut) {
|
|
257
|
+
e.preventDefault();
|
|
258
|
+
toggleSidebar();
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
});
|
|
262
|
+
const contextValue = useMemo(() => ({
|
|
263
|
+
isOpen,
|
|
264
|
+
setOpen,
|
|
265
|
+
toggleSidebar,
|
|
266
|
+
sidebarWidthPx,
|
|
267
|
+
setSidebarWidthPx,
|
|
268
|
+
chatWidthPx,
|
|
269
|
+
setChatWidthPx,
|
|
270
|
+
chatPanelOpen,
|
|
271
|
+
setChatPanelOpen,
|
|
272
|
+
getShellWidth,
|
|
273
|
+
chatPanelContainer,
|
|
274
|
+
sidebarWrapperRef: wrapperRef,
|
|
275
|
+
}), [
|
|
276
|
+
isOpen,
|
|
277
|
+
setOpen,
|
|
278
|
+
toggleSidebar,
|
|
279
|
+
sidebarWidthPx,
|
|
280
|
+
setSidebarWidthPx,
|
|
281
|
+
chatWidthPx,
|
|
282
|
+
setChatWidthPx,
|
|
283
|
+
chatPanelOpen,
|
|
284
|
+
getShellWidth,
|
|
285
|
+
chatPanelContainer,
|
|
286
|
+
]);
|
|
287
|
+
return (jsx(SidebarContext.Provider, { value: contextValue, children: jsx(TooltipProvider, { delayDuration: 0, children: jsxs("div", { ref: mergeWrapperRef, "data-slot": "sidebar-wrapper", "data-state": isOpen ? 'expanded' : 'collapsed', style: {
|
|
288
|
+
'--sidebar-width': `${sidebarWidthPx}px`,
|
|
289
|
+
'--sidebar-width-icon': SIDEBAR_WIDTH_ICON,
|
|
290
|
+
...style,
|
|
291
|
+
}, className: cn(SidebarStem.sidebarWrapper, className), ...props, children: [jsx("div", { className: SidebarStem.sidebarMainShell, children: children }), jsx("div", { ref: onChatPanelMount, className: SidebarStem.chatPanelMount, "data-slot": "chat-panel-mount" })] }) }) }));
|
|
292
|
+
}
|
|
293
|
+
function Sidebar({ defaultOpen = true, open: openProp, onOpenChange: setOpenProp, className, side = 'left', variant = 'sidebar', collapsible = 'offcanvas', children, fullHeightResizer = false, ...props }) {
|
|
294
|
+
const isMobile = useIsMobile();
|
|
295
|
+
const { isOpen, setOpen } = useSidebar();
|
|
296
|
+
// Only force-close on mobile. Do not call setOpen(true) on desktop — that ran on every
|
|
297
|
+
// load and overwrote the isSidebarOpen cookie (collapsed → opened + cookie "true").
|
|
298
|
+
useEffect(() => {
|
|
299
|
+
if (isMobile)
|
|
300
|
+
setOpen(false);
|
|
301
|
+
}, [isMobile, setOpen]);
|
|
302
|
+
if (collapsible === 'none') {
|
|
303
|
+
return (jsx("div", { "data-slot": "sidebar", className: cn(SidebarStem.sidebarNone, className), ...props, children: children }));
|
|
304
|
+
}
|
|
305
|
+
if (isMobile) {
|
|
306
|
+
return (jsx(Sheet, { open: isOpen, onOpenChange: setOpen, ...props, children: jsxs(SheetContent, { "data-sidebar": "sidebar", "data-slot": "sidebar", className: cn(SidebarStem.sheetContentSidebar, className), style: {
|
|
307
|
+
'--gap-top': '40px',
|
|
308
|
+
'--sidebar-width': SIDEBAR_WIDTH_MOBILE,
|
|
309
|
+
}, side: side, children: [jsx(SheetTitle, { className: "sr-only", children: "Navigation Menu" }), jsx("div", { className: cn(SidebarStem.sheetSidebarInner), children: children })] }) }));
|
|
310
|
+
}
|
|
311
|
+
return (jsxs("aside", { className: cn(SidebarStem.sidebar, SidebarStem[`variant-${variant}`], className, fullHeightResizer && SidebarStem.fullHeightResizer), "data-state": isOpen ? 'expanded' : 'collapsed', "data-collapsible": !isOpen ? collapsible : '', "data-variant": variant, "data-side": side, ...props, children: [children, jsx(SidebarResizeHandle, { side: side })] }));
|
|
312
|
+
}
|
|
313
|
+
function SidebarTrigger({ className, onClick, ...props }) {
|
|
314
|
+
const { toggleSidebar } = useSidebar();
|
|
315
|
+
return (jsx(Button, { "data-sidebar": "trigger", "data-slot": "sidebar-trigger", variant: "ghost", icon: true, className: cn(SidebarStem.sidebarTrigger, className), onClick: event => {
|
|
316
|
+
onClick?.(event);
|
|
317
|
+
toggleSidebar();
|
|
318
|
+
}, ...props, children: jsx(PanelLeft, { size: 20, strokeWidth: 1.5, className: "text-foreground" }) }));
|
|
319
|
+
}
|
|
320
|
+
function SidebarRail({ className, ...props }) {
|
|
321
|
+
const { toggleSidebar } = useSidebar();
|
|
322
|
+
return (jsx("button", { "data-sidebar": "rail", "data-slot": "sidebar-rail", "aria-label": "Toggle Sidebar", tabIndex: -1, onClick: toggleSidebar, title: "Toggle Sidebar", className: cn(SidebarStem.sidebarRail, className), ...props }));
|
|
323
|
+
}
|
|
324
|
+
function PanelResizeHandle({ className, edge, isActive, startWidthPx, getShellWidth, onDragWidth, onDragComplete, ...props }) {
|
|
325
|
+
const handleRef = useRef(null);
|
|
326
|
+
const startWidthRef = useRef(0);
|
|
327
|
+
const lastRawRef = useRef(0);
|
|
328
|
+
const handleDrag = useCallback((delta) => {
|
|
329
|
+
const shellW = getShellWidth();
|
|
330
|
+
if (shellW <= 0)
|
|
331
|
+
return;
|
|
332
|
+
const raw = edge === 'trailing'
|
|
333
|
+
? startWidthRef.current + delta.x
|
|
334
|
+
: startWidthRef.current - delta.x;
|
|
335
|
+
lastRawRef.current = raw;
|
|
336
|
+
onDragWidth(raw);
|
|
337
|
+
}, [edge, getShellWidth, onDragWidth]);
|
|
338
|
+
const handleDragStart = useCallback((e) => {
|
|
339
|
+
startWidthRef.current = startWidthPx;
|
|
340
|
+
lastRawRef.current = startWidthPx;
|
|
341
|
+
handleRef.current?.setPointerCapture(e.pointerId);
|
|
342
|
+
}, [startWidthPx]);
|
|
343
|
+
const handleDragEnd = useCallback((e) => {
|
|
344
|
+
onDragComplete?.(lastRawRef.current);
|
|
345
|
+
try {
|
|
346
|
+
handleRef.current?.releasePointerCapture(e.pointerId);
|
|
347
|
+
}
|
|
348
|
+
catch {
|
|
349
|
+
// Capture already released
|
|
350
|
+
}
|
|
351
|
+
startWidthRef.current = 0;
|
|
352
|
+
}, [onDragComplete]);
|
|
353
|
+
useElemDrag({
|
|
354
|
+
elem: handleRef,
|
|
355
|
+
onDrag: handleDrag,
|
|
356
|
+
onDragStart: handleDragStart,
|
|
357
|
+
onDragEnd: handleDragEnd,
|
|
358
|
+
isActive,
|
|
359
|
+
});
|
|
360
|
+
if (!isActive) {
|
|
361
|
+
return null;
|
|
362
|
+
}
|
|
363
|
+
return (jsx("div", { ref: handleRef, "data-slot": "panel-resize-handle", "data-edge": edge, className: className, ...props }));
|
|
364
|
+
}
|
|
365
|
+
function SidebarResizeHandle({ className, side = 'left', ...props }) {
|
|
366
|
+
const { isOpen, sidebarWidthPx, setSidebarWidthPx, getShellWidth } = useSidebar();
|
|
367
|
+
const isMobile = useIsMobile();
|
|
368
|
+
const edge = side === 'left' ? 'trailing' : 'leading';
|
|
369
|
+
const onDragWidth = useCallback((rawPx) => {
|
|
370
|
+
setSidebarWidthPx(rawPx, { persist: false });
|
|
371
|
+
}, [setSidebarWidthPx]);
|
|
372
|
+
const onDragComplete = useCallback((finalRawPx) => {
|
|
373
|
+
setSidebarWidthPx(finalRawPx, { persist: true });
|
|
374
|
+
}, [setSidebarWidthPx]);
|
|
375
|
+
if (isMobile || !isOpen) {
|
|
376
|
+
return null;
|
|
377
|
+
}
|
|
378
|
+
return (jsx(PanelResizeHandle, { edge: edge, isActive: isOpen && !isMobile, startWidthPx: sidebarWidthPx, getShellWidth: getShellWidth, onDragWidth: onDragWidth, onDragComplete: onDragComplete, "data-sidebar": "resize-handle", "data-slot": "sidebar-resize-handle", "data-side": side, className: cn(SidebarStem.sidebarResizeHandle, className), ...props }));
|
|
379
|
+
}
|
|
380
|
+
function SidebarFooter({ className, ...props }) {
|
|
381
|
+
return (jsx("div", { "data-slot": "sidebar-footer", "data-sidebar": "footer", className: cn(SidebarStem.sidebarFooter, className), ...props }));
|
|
382
|
+
}
|
|
383
|
+
function SidebarSeparator({ className, ...props }) {
|
|
384
|
+
return (jsx(Separator, { "data-slot": "sidebar-separator", "data-sidebar": "separator", className: cn(SidebarStem.sidebarSeparator, className), ...props }));
|
|
385
|
+
}
|
|
386
|
+
function SidebarContent({ className, innerClassName, children, }) {
|
|
387
|
+
// const sidebarContentTransition = useViewTransition({
|
|
388
|
+
// transitionName: 'sidebar-content',
|
|
389
|
+
// });
|
|
390
|
+
return (jsx(Scroll, { y: true, autoHide: true, fadeSize: "l", offset: { y: { before: 40, after: 20 } }, className: cn(SidebarStem.sidebarContent, className), innerClassName: innerClassName, children: children }));
|
|
391
|
+
}
|
|
392
|
+
function SidebarGroup({ className, ...props }) {
|
|
393
|
+
return (jsx("div", { "data-slot": "sidebar-group", "data-sidebar": "group", className: cn(SidebarStem.sidebarGroup, className), ...props }));
|
|
394
|
+
}
|
|
395
|
+
function SidebarGroupLabel({ className, asChild = false, ...props }) {
|
|
396
|
+
const Comp = asChild ? Slot : 'div';
|
|
397
|
+
return (jsx(Comp, { "data-slot": "sidebar-group-label", "data-sidebar": "group-label", className: cn(SidebarStem.sidebarGroupLabel, className), ...props }));
|
|
398
|
+
}
|
|
399
|
+
function SidebarGroupAction({ className, asChild = false, ...props }) {
|
|
400
|
+
const Comp = asChild ? Slot : 'button';
|
|
401
|
+
return (jsx(Comp, { "data-slot": "sidebar-group-action", "data-sidebar": "group-action", className: cn(SidebarStem.sidebarGroupAction, className), ...props }));
|
|
402
|
+
}
|
|
403
|
+
function SidebarGroupContent({ className, ...props }) {
|
|
404
|
+
return (jsx("div", { "data-slot": "sidebar-group-content", "data-sidebar": "group-content", className: cn(SidebarStem.sidebarGroupContent, className), ...props }));
|
|
405
|
+
}
|
|
406
|
+
function SidebarMenu({ className, ...props }) {
|
|
407
|
+
return (jsx("ul", { "data-slot": "sidebar-menu", "data-sidebar": "menu", className: cn(SidebarStem.sidebarMenu, className), ...props }));
|
|
408
|
+
}
|
|
409
|
+
function SidebarMenuItem({ className, ...props }) {
|
|
410
|
+
return (jsx("li", { "data-slot": "sidebar-menu-item", "data-sidebar": "menu-item", className: cn(SidebarStem.sidebarMenuItem, className), ...props }));
|
|
411
|
+
}
|
|
412
|
+
function SidebarMenuButton({ asChild = false, isActive = false, variant = 'ghost', size = 'sm', className, ...props }) {
|
|
413
|
+
return (jsx(Button, { asChild: asChild, variant: variant, size: size, "data-slot": "sidebar-menu-button", "data-sidebar": "menu-button", "data-active": isActive, className: cn(variant === 'default' ? SidebarStem.sidebarMenuButtonCta : SidebarStem.sidebarMenuButton, SidebarStem[`size-${size}`], className), ...props }));
|
|
414
|
+
}
|
|
415
|
+
function SidebarMenuAction({ className, asChild = false, showOnHover = false, ...props }) {
|
|
416
|
+
const Comp = asChild ? Slot : 'button';
|
|
417
|
+
return (jsx(Comp, { "data-slot": "sidebar-menu-action", "data-sidebar": "menu-action", className: cn(SidebarStem.sidebarMenuAction, showOnHover && SidebarStem.showOnHover, className), ...props }));
|
|
418
|
+
}
|
|
419
|
+
function SidebarMenuBadge({ className, ...props }) {
|
|
420
|
+
return (jsx("div", { "data-slot": "sidebar-menu-badge", "data-sidebar": "menu-badge", className: cn(SidebarStem.sidebarMenuBadge, className), ...props }));
|
|
421
|
+
}
|
|
422
|
+
function SidebarMenuSub({ className, ...props }) {
|
|
423
|
+
return (jsx("ul", { "data-slot": "sidebar-menu-sub", "data-sidebar": "menu-sub", className: cn(SidebarStem.sidebarMenuSub, className), ...props }));
|
|
424
|
+
}
|
|
425
|
+
function SidebarMenuSubItem({ className, ...props }) {
|
|
426
|
+
return (jsx("li", { "data-slot": "sidebar-menu-sub-item", "data-sidebar": "menu-sub-item", className: cn(SidebarStem.sidebarMenuSubItem, className), ...props }));
|
|
427
|
+
}
|
|
428
|
+
function SidebarMenuSubButton({ asChild = false, size = 'md', isActive = false, tooltip, className, onClick, ...props }) {
|
|
429
|
+
const Comp = asChild ? Slot : 'a';
|
|
430
|
+
const { isOpen, setOpen } = useSidebar();
|
|
431
|
+
const isMobile = useIsMobile();
|
|
432
|
+
const handleClick = (event) => {
|
|
433
|
+
if (isMobile && isOpen)
|
|
434
|
+
setOpen(false);
|
|
435
|
+
onClick?.(event);
|
|
436
|
+
};
|
|
437
|
+
const button = (jsx(Comp, { "data-slot": "sidebar-menu-sub-button", "data-sidebar": "menu-sub-button", "data-size": size, "data-active": isActive, className: cn(SidebarStem.sidebarMenuSubButton, SidebarStem[`size-${size}`], className), onClick: handleClick, ...props }));
|
|
438
|
+
if (!tooltip)
|
|
439
|
+
return button;
|
|
440
|
+
if (typeof tooltip === 'string') {
|
|
441
|
+
tooltip = {
|
|
442
|
+
children: tooltip,
|
|
443
|
+
};
|
|
444
|
+
}
|
|
445
|
+
return (jsxs(Tooltip, { children: [jsx(TooltipTrigger, { asChild: true, children: button }), jsx(TooltipContent, { side: "right", align: "center", hidden: !isOpen || isMobile, ...tooltip })] }));
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
export { PanelResizeHandle, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarResizeHandle, SidebarSeparator, SidebarTrigger, useSidebar };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import styleInject from 'style-inject';
|
|
2
|
+
|
|
3
|
+
var css_248z = "@media (max-width:768px){:root{--page-x-padding:var(--p-6);--page-y-padding:var(--p-6)}}.Sidebar_sidebarWrapper__DGm4P{align-items:stretch;display:flex;flex-direction:row;--welcome-alert-height:44px;height:calc(100% - 44px);height:calc(100% - var(--welcome-alert-height));min-height:0;width:100%}.Sidebar_sidebarWrapper__DGm4P #page-sidebar-actions{min-height:100%}@media (max-width:768px){.Sidebar_sidebarWrapper__DGm4P{flex-direction:column;height:100dvh;max-height:100dvh}}.Sidebar_sidebarMainShell__pSWDC{display:flex;flex:1;flex-direction:column;min-height:0;min-width:0}.Sidebar_chatPanelMount__1Zctx{background:var(--background);border-left:1px solid var(--border);flex:0 0 0px;flex:0 0 var(--chat-panel-width,0px);min-height:0;min-width:0;overflow:hidden;width:0;width:var(--chat-panel-width,0)}@media (max-width:768px){.Sidebar_chatPanelMount__1Zctx{border-left:none;border-top:1px solid var(--border);flex:0 0 0px;flex:0 0 var(--chat-panel-height,0px);height:0;height:var(--chat-panel-height,0);transition:flex-basis .2s ease,height .2s ease;width:100%}}.Sidebar_sidebar__0vqNZ{height:0;position:fixed;--top-offset:-10px;--gap-top:calc(var(--header-height) + var(--top-offset));align-self:flex-start;color:var(--sidebar-foreground);display:none;flex-direction:column;top:var(--gap-top);width:var(--sidebar-width)}@media (min-width:768px){.Sidebar_sidebar__0vqNZ[data-state=expanded]{display:flex;height:calc(100vh - var(--gap-top));min-height:0}}.Sidebar_sidebar__0vqNZ[data-collapsible=offcanvas]{overflow:hidden;padding:0;width:0}.Sidebar_sidebarTrigger__ipx2C{cursor:pointer;height:var(--p-5);width:var(--p-5)}.Sidebar_sidebarTrigger__ipx2C svg{height:20px;width:20px}.Sidebar_sidebarRail__uvSpl{position:absolute;inset-y:0;display:hidden;transition:all ease-out;width:1rem;z-index:20}.Sidebar_sidebarRail__uvSpl:hover:after{background-color:var(--sidebar-border)}.Sidebar_sidebarRail__uvSpl[data-side=left]{right:-1rem}.Sidebar_sidebarRail__uvSpl[data-side=right]{left:0}.Sidebar_sidebarRail__uvSpl:after{content:\"\";position:absolute;inset-y:0;left:50%;width:2px}@media (min-width:640px){.Sidebar_sidebarRail__uvSpl{display:flex}}.Sidebar_sidebarRail__uvSpl[data-side=left]{cursor:w-resize}.Sidebar_sidebarRail__uvSpl[data-side=left][data-state=collapsed],.Sidebar_sidebarRail__uvSpl[data-side=right]{cursor:e-resize}.Sidebar_sidebarRail__uvSpl[data-side=right][data-state=collapsed]{cursor:w-resize}.Sidebar_sidebarRail__uvSpl[data-collapsible=offcanvas]{transform:translateX(0)}.Sidebar_sidebarRail__uvSpl[data-collapsible=offcanvas]:hover{background-color:var(--sidebar)}.Sidebar_sidebarRail__uvSpl[data-collapsible=offcanvas]:after{left:100%}.Sidebar_sidebarRail__uvSpl[data-side=left][data-collapsible=offcanvas]{right:-.5rem}.Sidebar_sidebarRail__uvSpl[data-side=right][data-collapsible=offcanvas]{left:-.5rem}.Sidebar_sidebarResizeHandle__kuD6t{background-color:transparent;background-color:var(--page-color);border-radius:2.5px;height:calc(100vh + 200px);opacity:0;position:absolute;top:-200px;touch-action:none;transition:opacity .15s ease-out;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:5px;z-index:30}.Sidebar_sidebarResizeHandle__kuD6t:before{content:\"\";cursor:col-resize;height:100%;position:absolute;right:0;width:30px}.Sidebar_sidebarResizeHandle__kuD6t[data-side=left]{right:2px}.Sidebar_sidebarResizeHandle__kuD6t[data-side=right]{left:0}.Sidebar_sidebarResizeHandle__kuD6t:hover{opacity:1}.Sidebar_sidebarResizeHandle__kuD6t:active{opacity:0}.Sidebar_fullHeightResizer__jZXnw .Sidebar_sidebarResizeHandle__kuD6t{height:calc(100vh - var(--gap-top)*-1);top:-80px}.Sidebar_sidebarInput__ujQLX{background-color:var(--background);box-shadow:none;height:2rem;width:100%}.Sidebar_sidebarFooter__V3O-l,.Sidebar_sidebarHeader__X33ii{display:flex;flex-direction:column;gap:0;padding:0}.Sidebar_sidebarSeparator__oUkYG{background-color:var(--sidebar-border);margin-left:0;margin-right:0;width:auto}.Sidebar_sidebarContent__Ywe1o{display:flex;flex:1;flex-direction:column;gap:var(--p-16);height:100vh;max-height:100vh;min-height:0;overflow:auto;position:absolute;width:100%}@media (min-width:768px){.Sidebar_sidebarContent__Ywe1o{height:calc(100vh - var(--gap-top))}}.Sidebar_sidebarContent__Ywe1o[data-collapsible=icon]{overflow:hidden}.Sidebar_sidebarGroup__7Mhg2{display:flex;flex-direction:column;min-width:0;padding:40px 0 0;position:relative;width:100%}.Sidebar_sidebarGroupLabel__5VJ-b{align-items:center;border-radius:.375rem;color:var(--sidebar-foreground);display:flex;flex-shrink:0;font-size:.75rem;font-weight:500;height:2rem;opacity:.7;outline:none;padding-left:.5rem;padding-right:.5rem;transition:margin ease-linear .2s,opacity ease-linear .2s}.Sidebar_sidebarGroupLabel__5VJ-b:focus-visible{box-shadow:0 0 0 2px var(--sidebar-ring)}.Sidebar_sidebarGroupLabel__5VJ-b>svg{flex-shrink:0;height:1rem;width:1rem}.Sidebar_sidebarGroupLabel__5VJ-b[data-collapsible=icon]{margin-top:-2rem;opacity:0}.Sidebar_sidebarGroupAction__OhVZq{align-items:center;aspect-ratio:1;border-radius:.375rem;color:var(--sidebar-foreground);display:flex;justify-content:center;outline:none;padding:0;position:absolute;right:.75rem;top:.875rem;transition:transform;width:1.25rem}.Sidebar_sidebarGroupAction__OhVZq:hover{background-color:var(--sidebar-accent);color:var(--sidebar-accent-foreground)}.Sidebar_sidebarGroupAction__OhVZq:focus-visible{box-shadow:0 0 0 2px var(--sidebar-ring)}.Sidebar_sidebarGroupAction__OhVZq>svg{flex-shrink:0;height:1rem;width:1rem}.Sidebar_sidebarGroupAction__OhVZq:after{content:\"\";inset:-.5rem;position:absolute}@media (min-width:768px){.Sidebar_sidebarGroupAction__OhVZq:after{display:none}}.Sidebar_sidebarGroupAction__OhVZq[data-collapsible=icon]{display:none}.Sidebar_sidebarGroupContent__ZqWcj{font-size:.875rem;width:100%}.Sidebar_sidebarMenu__hYXIo{display:flex;flex-direction:column;gap:var(--p-4);list-style:none;min-width:0;padding:0 var(--p-11) var(--p-10) var(--p-8);width:100%}@media (max-width:768px){.Sidebar_sidebarMenu__hYXIo{padding-right:var(--p-8)}}.Sidebar_sidebarMenuItem__CRhM8{cursor:pointer;position:relative}.Sidebar_sidebarMenuBadge__ttvCR{align-items:center;border-radius:.375rem;color:var(--sidebar-foreground);display:flex;font-size:.75rem;font-weight:500;height:1.25rem;justify-content:center;min-width:1.25rem;padding-left:.25rem;padding-right:.25rem;pointer-events:none;position:absolute;right:.25rem;-webkit-user-select:none;-moz-user-select:none;user-select:none}.Sidebar_sidebarMenuBadge__ttvCR[data-size=sm]{top:.25rem}.Sidebar_sidebarMenuBadge__ttvCR[data-size=md]{top:.375rem}.Sidebar_sidebarMenuBadge__ttvCR[data-size=lg]{top:.625rem}.Sidebar_sidebarMenuBadge__ttvCR[data-collapsible=icon]{display:none}.Sidebar_sidebarMenuSkeleton__u2KoI{align-items:center;border-radius:.375rem;display:flex;gap:.5rem;height:2rem;padding-left:.5rem;padding-right:.5rem}.Sidebar_sidebarMenuSkeletonIcon__-1tvv{border-radius:.375rem;height:1rem;width:1rem}.Sidebar_sidebarMenuSkeletonText__dWzWo{flex:1;height:1rem;max-width:var(--skeleton-width)}.Sidebar_sidebarMenuSub__gh8Rn{border-color:var(--sidebar-border);border-left:none;display:flex;flex-direction:column;gap:var(--p-2);list-style:none;margin-left:0;margin-right:0;min-width:0;padding:0;padding-top:var(--p-1);position:relative;transform:translateX(1px)}.Sidebar_sidebarMenuSub__gh8Rn:before{background:var(--sidebar-border);bottom:26px;content:\"\";left:var(--p-5);pointer-events:none;position:absolute;top:0;width:1px}.Sidebar_sidebarMenuSub__gh8Rn[data-collapsible=icon]{display:none}.Sidebar_sidebarMenuSubItem__fTHJa{margin-left:var(--p-6);position:relative}.Sidebar_sidebarMenuSubItem__fTHJa:before{border-bottom:1px solid var(--sidebar-border);border-bottom-left-radius:var(--p-2);border-left:1px solid var(--sidebar-border);bottom:0;content:\"\";height:var(--p-3);left:calc(var(--p-1)*-1);position:absolute;top:var(--p-2);width:var(--p-3)}.Sidebar_sidebarMenuSubItem__fTHJa a:hover{text-decoration:none}.Sidebar_sheetContentSidebar__cM2h2{color:var(--sidebar-foreground);padding:0;width:var(--sidebar-width)}.Sidebar_sheetContentSidebar__cM2h2>button{display:none}@media (max-width:768px){.Sidebar_sheetContentSidebar__cM2h2{z-index:100}}.Sidebar_sheetSidebarInner__U-SMQ{background-color:var(--sidebar);display:flex;flex-direction:column;height:100%;width:100%}.Sidebar_sidebarNone__crRsF{color:var(--sidebar-foreground);display:flex;flex-direction:column;height:100%;width:var(--sidebar-width)}.Sidebar_variant-floating__-qvkJ{padding:.5rem}.Sidebar_variant-floating__-qvkJ[data-collapsible=icon],.Sidebar_variant-inset__oTfrV[data-collapsible=icon]{width:calc(var(--sidebar-width-icon) + 1rem + 2px)}.Sidebar_variant-sidebar__fAe77[data-collapsible=icon]{width:var(--sidebar-width-icon)}.Sidebar_variant-sidebar__fAe77[data-side=left]{border-right:1px solid #e5e7eb}.Sidebar_variant-sidebar__fAe77[data-side=right]{border-left:1px solid #e5e7eb}.Sidebar_sidebarMenuButton__vIEh->span,.Sidebar_sidebarMenuSubButton__c9flh>span{min-width:0;text-transform:capitalize}.Sidebar_sidebarMenuButton__vIEh->span:first-child,.Sidebar_sidebarMenuSubButton__c9flh>span:first-child{flex-grow:1}.Sidebar_sidebarMenuButton__vIEh-{align-items:center;border-radius:var(--p-3);color:var(--sidebar-foreground);cursor:pointer;display:flex;font-size:.875rem;gap:var(--p-2);justify-content:flex-start;outline:none;overflow:hidden;padding:var(--p-6) var(--p-3);text-align:left;text-decoration:none;transition:all;width:100%}.Sidebar_sidebarMenuButton__vIEh-:visited{color:var(--sidebar-foreground)}.Sidebar_sidebarMenuButton__vIEh-:hover{text-decoration:none}.Sidebar_sidebarMenuSubItem__fTHJa:active .Sidebar_sidebarMenuButton__vIEh-,.Sidebar_sidebarMenuSubItem__fTHJa:hover .Sidebar_sidebarMenuButton__vIEh-,.Sidebar_sidebarMenuSubItem__fTHJa[data-state=open] .Sidebar_sidebarMenuButton__vIEh-{background-color:var(--sidebar-accent);color:var(--sidebar-accent-foreground)}.Sidebar_sidebarMenuButton__vIEh-:focus-visible{box-shadow:0 0 0 2px var(--sidebar-ring)}.Sidebar_sidebarMenuButton__vIEh-:disabled,.Sidebar_sidebarMenuButton__vIEh-[aria-disabled=true]{opacity:.5;pointer-events:none}.Sidebar_sidebarMenuButton__vIEh-[data-active=true]{background-color:var(--sidebar-accent);color:var(--sidebar-accent-foreground);font-weight:500}.Sidebar_sidebarMenuButton__vIEh-[data-collapsible=icon]{height:2rem!important;padding:.5rem!important;width:2rem!important}.Sidebar_sidebarMenuButton__vIEh->span{flex-grow:1;line-height:20px;overflow:hidden;white-space:nowrap}.Sidebar_sidebarMenuButton__vIEh->svg{flex-shrink:0;height:var(--p-5);width:var(--p-5)}.Sidebar_sidebarMenuButton__vIEh-.Sidebar_size-sm__7aIbu{font-size:.75rem;height:1.75rem}.Sidebar_sidebarMenuButton__vIEh-.Sidebar_size-md__rcjmO{font-size:.875rem;height:var(--p-12)}.Sidebar_sidebarMenuButton__vIEh-.Sidebar_size-lg__1k76S{font-size:.875rem;height:3rem}.Sidebar_sidebarMenuButton__vIEh-.Sidebar_size-lg__1k76S[data-collapsible=icon]{padding:0!important}.Sidebar_sidebarMenuButton__vIEh-.Sidebar_variant-outline__UmtAz{background-color:var(--background);box-shadow:0 0 0 1px var(--sidebar-border)}.Sidebar_sidebarMenuButton__vIEh-.Sidebar_variant-outline__UmtAz:hover{background-color:var(--sidebar-accent);box-shadow:0 0 0 1px var(--sidebar-accent);color:var(--sidebar-accent-foreground)}.Sidebar_sidebarMenuButtonCta__dQAhv{display:flex;justify-content:flex-start;text-align:left;width:100%}.Sidebar_sidebarMenuButtonCta__dQAhv>svg{flex-shrink:0;height:var(--p-5);width:var(--p-5)}.Sidebar_sidebarMenuAction__mFZa1{align-items:center;aspect-ratio:1;border-radius:.375rem;color:var(--sidebar-foreground);cursor:pointer;display:flex;justify-content:center;opacity:0;outline:none;padding:0;position:absolute;right:var(--p-2);top:var(--p-2);transition:transform;width:1.25rem}.Sidebar_sidebarMenuAction__mFZa1:before{background-image:linear-gradient(to left,var(--sidebar-accent) 70%,transparent 100%);content:\"\";height:100%;pointer-events:none;position:absolute;right:0;transition:opacity .2s ease-in-out;width:calc(100% + var(--p-4))}.Sidebar_sidebarMenuSubItem__fTHJa:hover .Sidebar_sidebarMenuAction__mFZa1{opacity:1}.Sidebar_sidebarMenuAction__mFZa1:focus-visible{box-shadow:0 0 0 2px var(--sidebar-ring)}.Sidebar_sidebarMenuAction__mFZa1>svg{flex-shrink:0;height:1rem;opacity:.5;pointer-events:none;transition:opacity .2s ease-in-out;width:1rem;z-index:1}.Sidebar_sidebarMenuAction__mFZa1:hover>svg{opacity:1}.Sidebar_sidebarMenuAction__mFZa1:after{content:\"\";inset:-.5rem;position:absolute}@media (min-width:768px){.Sidebar_sidebarMenuAction__mFZa1:after{display:none}}.Sidebar_sidebarMenuAction__mFZa1[data-size=sm]{top:.25rem}.Sidebar_sidebarMenuAction__mFZa1[data-size=md]{top:.375rem}.Sidebar_sidebarMenuAction__mFZa1[data-size=lg]{top:.625rem}.Sidebar_sidebarMenuAction__mFZa1[data-collapsible=icon]{display:none}.Sidebar_sidebarMenuAction__mFZa1.Sidebar_showOnHover__itXsA[data-active=true]{color:var(--sidebar-accent-foreground)}.Sidebar_sidebarMenuAction__mFZa1.Sidebar_showOnHover__itXsA[data-state=open]{opacity:1}@media (min-width:768px){.Sidebar_sidebarMenuAction__mFZa1.Sidebar_showOnHover__itXsA{opacity:0}.Sidebar_sidebarMenuAction__mFZa1.Sidebar_showOnHover__itXsA:focus-within,.Sidebar_sidebarMenuAction__mFZa1.Sidebar_showOnHover__itXsA:hover{opacity:1}}.Sidebar_sidebarMenuSubButton__c9flh{align-items:center;border-radius:var(--p-3);color:var(--sidebar-foreground);cursor:pointer;display:flex;gap:var(--p-1);height:var(--p-9);margin-left:var(--p-3);min-width:0;outline:none;overflow:hidden;padding:var(--p-1) var(--p-2);text-decoration:none;transform:translateX(-1px)}.Sidebar_sidebarMenuSubButton__c9flh:visited{color:var(--sidebar-foreground)}.Sidebar_sidebarMenuSubButton__c9flh:hover{text-decoration:none}.Sidebar_sidebarMenuSubItem__fTHJa:active .Sidebar_sidebarMenuSubButton__c9flh,.Sidebar_sidebarMenuSubItem__fTHJa:hover .Sidebar_sidebarMenuSubButton__c9flh{background-color:var(--sidebar-accent);color:var(--sidebar-accent-foreground)}.Sidebar_sidebarMenuSubButton__c9flh:focus-visible{box-shadow:0 0 0 2px var(--sidebar-ring)}.Sidebar_sidebarMenuSubButton__c9flh:disabled,.Sidebar_sidebarMenuSubButton__c9flh[aria-disabled=true]{opacity:.5;pointer-events:none}.Sidebar_sidebarMenuSubButton__c9flh[data-active=true]{background-color:var(--sidebar-accent);color:var(--sidebar-accent-foreground)}.Sidebar_sidebarMenuSubButton__c9flh[data-active=true]:visited{color:var(--sidebar-accent-foreground)}.Sidebar_sidebarMenuSubButton__c9flh[data-collapsible=icon]{display:none}.Sidebar_sidebarMenuSubButton__c9flh>span:first-child{overflow:hidden;white-space:nowrap}.Sidebar_sidebarMenuSubButton__c9flh>svg{color:var(--sidebar-accent-foreground);flex-shrink:0;height:1rem;width:1rem}.Sidebar_sidebarMenuSubButton__c9flh.Sidebar_size-sm__7aIbu{font-size:.75rem}.Sidebar_sidebarMenuSubButton__c9flh.Sidebar_size-md__rcjmO{font-size:.875rem}.Sidebar_sidebarMenuSubButton__c9flh.Sidebar_size-lg__1k76S{font-size:1rem}::view-transition-old(sidebar-container),::view-transition-old(sidebar-gap){animation-duration:.2s;animation-name:Sidebar_sidebarVtOld__hlKqn;animation-timing-function:ease-out;transform:translateZ(0)}::view-transition-new(sidebar-container),::view-transition-new(sidebar-gap){animation-duration:.2s;animation-name:Sidebar_sidebarVtNew__FFhYU;animation-timing-function:ease-out;transform:translateZ(0)}@keyframes Sidebar_sidebarVtOld__hlKqn{0%{opacity:1}to{opacity:0}}@keyframes Sidebar_sidebarVtNew__FFhYU{0%{opacity:0}to{opacity:1}}";
|
|
4
|
+
var SidebarStem = {"sidebarWrapper":"Sidebar_sidebarWrapper__DGm4P","sidebarMainShell":"Sidebar_sidebarMainShell__pSWDC","chatPanelMount":"Sidebar_chatPanelMount__1Zctx","sidebar":"Sidebar_sidebar__0vqNZ","sidebarTrigger":"Sidebar_sidebarTrigger__ipx2C","sidebarRail":"Sidebar_sidebarRail__uvSpl","sidebarResizeHandle":"Sidebar_sidebarResizeHandle__kuD6t","fullHeightResizer":"Sidebar_fullHeightResizer__jZXnw","sidebarInput":"Sidebar_sidebarInput__ujQLX","sidebarHeader":"Sidebar_sidebarHeader__X33ii","sidebarFooter":"Sidebar_sidebarFooter__V3O-l","sidebarSeparator":"Sidebar_sidebarSeparator__oUkYG","sidebarContent":"Sidebar_sidebarContent__Ywe1o","sidebarGroup":"Sidebar_sidebarGroup__7Mhg2","sidebarGroupLabel":"Sidebar_sidebarGroupLabel__5VJ-b","sidebarGroupAction":"Sidebar_sidebarGroupAction__OhVZq","sidebarGroupContent":"Sidebar_sidebarGroupContent__ZqWcj","sidebarMenu":"Sidebar_sidebarMenu__hYXIo","sidebarMenuItem":"Sidebar_sidebarMenuItem__CRhM8","sidebarMenuBadge":"Sidebar_sidebarMenuBadge__ttvCR","sidebarMenuSkeleton":"Sidebar_sidebarMenuSkeleton__u2KoI","sidebarMenuSkeletonIcon":"Sidebar_sidebarMenuSkeletonIcon__-1tvv","sidebarMenuSkeletonText":"Sidebar_sidebarMenuSkeletonText__dWzWo","sidebarMenuSub":"Sidebar_sidebarMenuSub__gh8Rn","sidebarMenuSubItem":"Sidebar_sidebarMenuSubItem__fTHJa","sheetContentSidebar":"Sidebar_sheetContentSidebar__cM2h2","sheetSidebarInner":"Sidebar_sheetSidebarInner__U-SMQ","sidebarNone":"Sidebar_sidebarNone__crRsF","variant-floating":"Sidebar_variant-floating__-qvkJ","variant-inset":"Sidebar_variant-inset__oTfrV","variant-sidebar":"Sidebar_variant-sidebar__fAe77","sidebarMenuButton":"Sidebar_sidebarMenuButton__vIEh-","sidebarMenuSubButton":"Sidebar_sidebarMenuSubButton__c9flh","size-sm":"Sidebar_size-sm__7aIbu","size-md":"Sidebar_size-md__rcjmO","size-lg":"Sidebar_size-lg__1k76S","variant-outline":"Sidebar_variant-outline__UmtAz","sidebarMenuButtonCta":"Sidebar_sidebarMenuButtonCta__dQAhv","sidebarMenuAction":"Sidebar_sidebarMenuAction__mFZa1","showOnHover":"Sidebar_showOnHover__itXsA","sidebarVtOld":"Sidebar_sidebarVtOld__hlKqn","sidebarVtNew":"Sidebar_sidebarVtNew__FFhYU"};
|
|
5
|
+
styleInject(css_248z);
|
|
6
|
+
|
|
7
|
+
export { SidebarStem as default };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import cn from 'classnames';
|
|
3
|
+
import S from './Skeleton.styl.js';
|
|
4
|
+
|
|
5
|
+
function Skeleton({ className, size = 'md', shape = 'rectangle', ...props }) {
|
|
6
|
+
return (jsx("div", { "data-slot": "skeleton", className: cn(S.root, S[`size-${size}`], S[`shape-${shape}`], className), ...props }));
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export { Skeleton };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import styleInject from 'style-inject';
|
|
2
|
+
|
|
3
|
+
var css_248z = ".Skeleton_root__Jjk-p{animation:Skeleton_pulse__8kRAv 2s cubic-bezier(.4,0,.6,1) infinite;background-color:var(--accent-color-alpha-100);border-radius:.375rem}@keyframes Skeleton_pulse__8kRAv{0%,to{opacity:1}50%{opacity:.5}}.Skeleton_size-sm__53K8I{height:1rem}.Skeleton_size-md__DU3Ku{height:1.5rem}.Skeleton_size-lg__ZhvKQ{height:2.5rem}.Skeleton_shape-rectangle__krxPl{border-radius:.375rem}.Skeleton_shape-circle__85od-{border-radius:9999px}.Skeleton_shape-rounded__6E9lP{border-radius:.5rem}";
|
|
4
|
+
var S = {"root":"Skeleton_root__Jjk-p","pulse":"Skeleton_pulse__8kRAv","size-sm":"Skeleton_size-sm__53K8I","size-md":"Skeleton_size-md__DU3Ku","size-lg":"Skeleton_size-lg__ZhvKQ","shape-rectangle":"Skeleton_shape-rectangle__krxPl","shape-circle":"Skeleton_shape-circle__85od-","shape-rounded":"Skeleton_shape-rounded__6E9lP"};
|
|
5
|
+
styleInject(css_248z);
|
|
6
|
+
|
|
7
|
+
export { S as default };
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import cn from 'classnames';
|
|
3
|
+
import { useState, useRef, useCallback, useEffect } from 'react';
|
|
4
|
+
import S from './Slider.styl.js';
|
|
5
|
+
|
|
6
|
+
function Slider({ className, value: controlledValue, defaultValue, onValueChange, onValueCommit, min = 0, max = 100, step = 1, disabled = false, }) {
|
|
7
|
+
const [internalValue, setInternalValue] = useState(controlledValue ?? defaultValue ?? [min]);
|
|
8
|
+
const [isDragging, setIsDragging] = useState(false);
|
|
9
|
+
const isControlled = controlledValue !== undefined;
|
|
10
|
+
const value = isControlled ? controlledValue : internalValue;
|
|
11
|
+
const sliderThumbContainerRef = useRef(null);
|
|
12
|
+
const thumbRef = useRef(null);
|
|
13
|
+
const rangeRef = useRef(null);
|
|
14
|
+
const cachedRectRef = useRef(null);
|
|
15
|
+
const updateThumbPosition = useCallback((percentage) => {
|
|
16
|
+
if (thumbRef.current) {
|
|
17
|
+
thumbRef.current.style.left = `${percentage}%`;
|
|
18
|
+
}
|
|
19
|
+
if (rangeRef.current && sliderThumbContainerRef.current) {
|
|
20
|
+
const containerWidth = sliderThumbContainerRef.current.offsetWidth;
|
|
21
|
+
const rangeWidth = (containerWidth * percentage) / 100 + 16;
|
|
22
|
+
rangeRef.current.style.width = `${rangeWidth}px`;
|
|
23
|
+
}
|
|
24
|
+
}, []);
|
|
25
|
+
const calculatePercentageFromPosition = useCallback((clientX, useCache = false) => {
|
|
26
|
+
if (!sliderThumbContainerRef.current)
|
|
27
|
+
return 0;
|
|
28
|
+
const rect = useCache && cachedRectRef.current
|
|
29
|
+
? cachedRectRef.current
|
|
30
|
+
: sliderThumbContainerRef.current.getBoundingClientRect();
|
|
31
|
+
if (useCache && !cachedRectRef.current) {
|
|
32
|
+
cachedRectRef.current = rect;
|
|
33
|
+
}
|
|
34
|
+
return Math.max(0, Math.min(1, (clientX - rect.left) / rect.width));
|
|
35
|
+
}, []);
|
|
36
|
+
const calculateValueFromPosition = useCallback((clientX, useCache = false) => {
|
|
37
|
+
if (!sliderThumbContainerRef.current)
|
|
38
|
+
return value;
|
|
39
|
+
const percentage = calculatePercentageFromPosition(clientX, useCache);
|
|
40
|
+
const rawValue = min + percentage * (max - min);
|
|
41
|
+
const steppedValue = Math.round(rawValue / step) * step;
|
|
42
|
+
const clampedValue = Math.max(min, Math.min(max, steppedValue));
|
|
43
|
+
return [clampedValue];
|
|
44
|
+
}, [min, max, step, value, calculatePercentageFromPosition]);
|
|
45
|
+
const handlePointerDown = useCallback((e) => {
|
|
46
|
+
if (disabled)
|
|
47
|
+
return;
|
|
48
|
+
e.preventDefault();
|
|
49
|
+
setIsDragging(true);
|
|
50
|
+
// Cache rect when drag starts
|
|
51
|
+
if (sliderThumbContainerRef.current) {
|
|
52
|
+
cachedRectRef.current =
|
|
53
|
+
sliderThumbContainerRef.current.getBoundingClientRect();
|
|
54
|
+
}
|
|
55
|
+
const rawPercentage = calculatePercentageFromPosition(e.clientX, false);
|
|
56
|
+
const visualPercentage = rawPercentage * 100;
|
|
57
|
+
updateThumbPosition(visualPercentage);
|
|
58
|
+
const newValue = calculateValueFromPosition(e.clientX);
|
|
59
|
+
if (!isControlled) {
|
|
60
|
+
setInternalValue(newValue);
|
|
61
|
+
}
|
|
62
|
+
onValueChange?.(newValue);
|
|
63
|
+
}, [
|
|
64
|
+
disabled,
|
|
65
|
+
calculatePercentageFromPosition,
|
|
66
|
+
calculateValueFromPosition,
|
|
67
|
+
isControlled,
|
|
68
|
+
onValueChange,
|
|
69
|
+
updateThumbPosition,
|
|
70
|
+
]);
|
|
71
|
+
const handlePointerMove = useCallback((e) => {
|
|
72
|
+
if (!isDragging || disabled)
|
|
73
|
+
return;
|
|
74
|
+
e.preventDefault();
|
|
75
|
+
// Use cached rect during drag for performance
|
|
76
|
+
const rawPercentage = calculatePercentageFromPosition(e.clientX, true);
|
|
77
|
+
const visualPercentage = rawPercentage * 100;
|
|
78
|
+
updateThumbPosition(visualPercentage);
|
|
79
|
+
const newValue = calculateValueFromPosition(e.clientX, true);
|
|
80
|
+
if (!isControlled) {
|
|
81
|
+
setInternalValue(newValue);
|
|
82
|
+
}
|
|
83
|
+
onValueChange?.(newValue);
|
|
84
|
+
}, [
|
|
85
|
+
disabled,
|
|
86
|
+
calculatePercentageFromPosition,
|
|
87
|
+
calculateValueFromPosition,
|
|
88
|
+
isControlled,
|
|
89
|
+
isDragging,
|
|
90
|
+
min,
|
|
91
|
+
max,
|
|
92
|
+
onValueChange,
|
|
93
|
+
updateThumbPosition,
|
|
94
|
+
]);
|
|
95
|
+
const handlePointerUp = useCallback((e) => {
|
|
96
|
+
if (!isDragging)
|
|
97
|
+
return;
|
|
98
|
+
setIsDragging(false);
|
|
99
|
+
// Clear cached rect when drag ends
|
|
100
|
+
cachedRectRef.current = null;
|
|
101
|
+
const newValue = calculateValueFromPosition(e.clientX);
|
|
102
|
+
onValueCommit?.(newValue);
|
|
103
|
+
}, [calculateValueFromPosition, isDragging, onValueCommit]);
|
|
104
|
+
useEffect(() => {
|
|
105
|
+
if (isDragging) {
|
|
106
|
+
document.addEventListener('pointermove', handlePointerMove);
|
|
107
|
+
document.addEventListener('pointerup', handlePointerUp);
|
|
108
|
+
return () => {
|
|
109
|
+
document.removeEventListener('pointermove', handlePointerMove);
|
|
110
|
+
document.removeEventListener('pointerup', handlePointerUp);
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
}, [isDragging, handlePointerMove, handlePointerUp]);
|
|
114
|
+
const percentage = ((value[0] - min) / (max - min)) * 100;
|
|
115
|
+
useEffect(() => {
|
|
116
|
+
if (!isDragging) {
|
|
117
|
+
updateThumbPosition(percentage);
|
|
118
|
+
}
|
|
119
|
+
}, [percentage, isDragging, updateThumbPosition, value]);
|
|
120
|
+
return (jsx("div", { "data-slot": "slider", className: cn(S.sliderRoot, className), "data-disabled": disabled, "data-dragging": isDragging, children: jsxs("div", { className: S.sliderTrack, onPointerDown: handlePointerDown, children: [jsx("div", { ref: rangeRef, className: S.sliderRange }), jsx("div", { ref: sliderThumbContainerRef, className: S.sliderThumbContainer, children: jsx("div", { ref: thumbRef, className: S.sliderThumb, onPointerDown: handlePointerDown }) })] }) }));
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export { Slider };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import styleInject from 'style-inject';
|
|
2
|
+
|
|
3
|
+
var css_248z = ".Slider_sliderRoot__h9oha{align-items:center;display:flex;height:20px;overflow:visible;position:relative;touch-action:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:100%}.Slider_sliderTrack__ZJT87{background-color:var(--border);border-radius:20px;cursor:pointer;flex-grow:1;height:calc(100% - 4px);margin-left:-8px;margin-right:-8px;position:relative;touch-action:none;width:calc(100% + 16px)}.dark .Slider_sliderTrack__ZJT87{background-color:var(--input)}.Slider_sliderRange__W4bae{background-color:var(--primary);border-radius:20px;height:100%;position:absolute}.Slider_sliderThumbContainer__foas-{height:100%;left:8px;pointer-events:none;position:absolute;right:8px}.Slider_sliderThumb__cUXFL{background-color:var(--card);border:2px solid var(--primary);border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.1);cursor:grab;display:block;height:16px;outline:none;pointer-events:auto;position:absolute;top:50%;touch-action:none;transform:translate(-50%,-50%);transition:transform .15s ease-in-out,box-shadow .15s ease-in-out;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:16px}.Slider_sliderThumb__cUXFL:hover{box-shadow:0 4px 8px rgba(0,0,0,.15);transform:translate(-50%,-50%) scale(1.1)}.Slider_sliderThumb__cUXFL:focus-visible{outline:2px solid var(--primary);outline-offset:2px}.Slider_sliderRoot__h9oha[data-dragging=true] .Slider_sliderThumb__cUXFL,.Slider_sliderThumb__cUXFL:active{cursor:grabbing;transform:translate(-50%,-50%) scale(1.15);transition:none}.Slider_sliderRoot__h9oha[data-disabled=true]{opacity:.5;pointer-events:none}";
|
|
4
|
+
var S = {"sliderRoot":"Slider_sliderRoot__h9oha","sliderTrack":"Slider_sliderTrack__ZJT87","sliderRange":"Slider_sliderRange__W4bae","sliderThumbContainer":"Slider_sliderThumbContainer__foas-","sliderThumb":"Slider_sliderThumb__cUXFL"};
|
|
5
|
+
styleInject(css_248z);
|
|
6
|
+
|
|
7
|
+
export { S as default };
|