@flikk/ui 1.0.0-beta.30 → 1.0.0-beta.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +375 -5
- package/dist/components/ai/AgentRequest/AgentRequest.animations.d.ts +25 -0
- package/dist/components/ai/AgentRequest/AgentRequest.animations.js +81 -0
- package/dist/components/ai/AgentRequest/AgentRequest.d.ts +3 -0
- package/dist/components/ai/AgentRequest/AgentRequest.js +435 -0
- package/dist/components/ai/AgentRequest/AgentRequest.theme.d.ts +2 -0
- package/dist/components/ai/AgentRequest/AgentRequest.theme.js +106 -0
- package/dist/components/ai/AgentRequest/AgentRequest.types.d.ts +241 -0
- package/dist/components/ai/AgentRequest/index.d.ts +3 -0
- package/dist/components/ai/AgentStatus/AgentStatus.d.ts +3 -0
- package/dist/components/ai/AgentStatus/AgentStatus.js +144 -0
- package/dist/components/ai/AgentStatus/AgentStatus.theme.d.ts +2 -0
- package/dist/components/ai/AgentStatus/AgentStatus.theme.js +37 -0
- package/dist/components/ai/AgentStatus/AgentStatus.types.d.ts +116 -0
- package/dist/components/ai/AgentStatus/index.d.ts +3 -0
- package/dist/components/ai/CodeBlock/CodeBlock.js +3 -3
- package/dist/components/ai/CodeBlock/CodeBlock.theme.js +2 -2
- package/dist/components/ai/PromptInput/PromptInput.js +13 -14
- package/dist/components/ai/PromptInput/PromptInput.theme.js +3 -3
- package/dist/components/ai/PromptInput/VoiceRecorder.js +3 -3
- package/dist/components/ai/PromptSuggestion/PromptSuggestion.theme.js +2 -2
- package/dist/components/ai/Reasoning/Reasoning.d.ts +5 -0
- package/dist/components/ai/Reasoning/Reasoning.js +40 -0
- package/dist/components/ai/Reasoning/Reasoning.theme.d.ts +6 -0
- package/dist/components/ai/Reasoning/Reasoning.theme.js +36 -0
- package/dist/components/ai/Reasoning/Reasoning.types.d.ts +73 -0
- package/dist/components/ai/Reasoning/ReasoningTrace.d.ts +11 -0
- package/dist/components/ai/Reasoning/ReasoningTrace.js +84 -0
- package/dist/components/ai/Reasoning/index.d.ts +3 -0
- package/dist/components/ai/SourceCitation/SourceCitation.d.ts +4 -0
- package/dist/components/ai/SourceCitation/SourceCitation.js +29 -0
- package/dist/components/ai/SourceCitation/SourceCitation.theme.d.ts +2 -0
- package/dist/components/ai/SourceCitation/SourceCitation.theme.js +23 -0
- package/dist/components/ai/SourceCitation/SourceCitation.types.d.ts +55 -0
- package/dist/components/ai/SourceCitation/index.d.ts +3 -0
- package/dist/components/ai/StreamingResponse/AnimatedText.d.ts +7 -0
- package/dist/components/ai/StreamingResponse/AnimatedText.js +8 -7
- package/dist/components/ai/StreamingResponse/ErrorDisplay.js +2 -2
- package/dist/components/ai/StreamingResponse/MarkdownRenderer.d.ts +5 -0
- package/dist/components/ai/StreamingResponse/MarkdownRenderer.js +4 -4
- package/dist/components/ai/StreamingResponse/StreamingCursor.d.ts +2 -2
- package/dist/components/ai/StreamingResponse/StreamingCursor.js +10 -7
- package/dist/components/ai/StreamingResponse/StreamingResponse.animations.d.ts +10 -0
- package/dist/components/ai/StreamingResponse/StreamingResponse.animations.js +59 -33
- package/dist/components/ai/StreamingResponse/StreamingResponse.js +14 -10
- package/dist/components/ai/StreamingResponse/StreamingResponse.theme.js +3 -1
- package/dist/components/ai/StreamingResponse/StreamingResponse.types.d.ts +33 -2
- package/dist/components/ai/StreamingResponse/StreamingSurface.d.ts +13 -0
- package/dist/components/ai/StreamingResponse/StreamingSurface.js +38 -0
- package/dist/components/ai/StreamingResponse/WordAnimationContext.d.ts +5 -0
- package/dist/components/ai/StreamingResponse/WordAnimationContext.js +5 -4
- package/dist/components/ai/StreamingResponse/index.d.ts +4 -2
- package/dist/components/ai/TokenCounter/TokenCounter.js +2 -2
- package/dist/components/ai/TokenCounter/TokenCounter.theme.js +1 -1
- package/dist/components/ai/index.d.ts +6 -2
- package/dist/components/ai/index.js +10 -3
- package/dist/components/ai/shared/StatusIndicator.d.ts +8 -0
- package/dist/components/ai/shared/StatusIndicator.js +34 -0
- package/dist/components/canvas/BaseNode.js +1 -1
- package/dist/components/canvas/CanvasToolbar.js +2 -3
- package/dist/components/canvas/Edge.js +2 -2
- package/dist/components/canvas/NodeControls.js +2 -3
- package/dist/components/canvas/NodeRenderer.js +4 -4
- package/dist/components/charts/ActivityRings/ActivityRings.js +4 -4
- package/dist/components/charts/ActivityRings/ActivityRings.theme.js +1 -1
- package/dist/components/charts/AreaChart/AreaChart.js +24 -35
- package/dist/components/charts/AreaChart/AreaChart.theme.d.ts +1 -6
- package/dist/components/charts/AreaChart/AreaChart.theme.js +10 -22
- package/dist/components/charts/AreaChart/AreaChart.types.d.ts +18 -11
- package/dist/components/charts/AreaChart/AreaChart.types.js +10 -3
- package/dist/components/charts/AreaChart/index.d.ts +1 -1
- package/dist/components/charts/BarChart/BarChart.js +13 -32
- package/dist/components/charts/BarChart/BarChart.types.d.ts +20 -16
- package/dist/components/charts/BarChart/BarChart.types.js +11 -4
- package/dist/components/charts/ComboChart/BarRenderer.js +10 -7
- package/dist/components/charts/ComboChart/BarRenderer.types.d.ts +1 -1
- package/dist/components/charts/ComboChart/ComboChart.js +11 -24
- package/dist/components/charts/ComboChart/ComboChart.types.d.ts +15 -13
- package/dist/components/charts/ComboChart/ComboChart.types.js +14 -2
- package/dist/components/charts/ComboChart/ComboChartCanvas.js +1 -1
- package/dist/components/charts/ComboChart/LineRenderer.js +16 -11
- package/dist/components/charts/ComboChart/LineRenderer.types.d.ts +1 -1
- package/dist/components/charts/DonutChart/DonutChart.theme.js +4 -4
- package/dist/components/charts/DonutChart/MultiSegmentDonutChart.theme.js +1 -1
- package/dist/components/charts/Heatmap/Heatmap.js +49 -42
- package/dist/components/charts/Heatmap/Heatmap.theme.d.ts +6 -2
- package/dist/components/charts/Heatmap/Heatmap.theme.js +20 -8
- package/dist/components/charts/Heatmap/Heatmap.types.d.ts +49 -82
- package/dist/components/charts/Heatmap/HeatmapCell.js +30 -81
- package/dist/components/charts/Heatmap/HeatmapLegend.d.ts +7 -6
- package/dist/components/charts/Heatmap/HeatmapLegend.js +6 -6
- package/dist/components/charts/Heatmap/index.d.ts +1 -1
- package/dist/components/charts/Heatmap/utils/heatmapUtils.d.ts +7 -12
- package/dist/components/charts/Heatmap/utils/heatmapUtils.js +16 -61
- package/dist/components/charts/Heatmap/utils/heatmapUtils.test.d.ts +1 -0
- package/dist/components/charts/HorizontalBarChart/HorizontalBarChart.d.ts +16 -0
- package/dist/components/charts/HorizontalBarChart/HorizontalBarChart.js +237 -0
- package/dist/components/charts/HorizontalBarChart/HorizontalBarChart.types.d.ts +62 -0
- package/dist/components/charts/HorizontalBarChart/HorizontalBarChart.types.js +21 -0
- package/dist/components/charts/HorizontalBarChart/index.d.ts +3 -0
- package/dist/components/charts/LineChart/LineChart.js +11 -28
- package/dist/components/charts/LineChart/LineChart.types.d.ts +11 -14
- package/dist/components/charts/LineChart/LineChart.types.js +11 -3
- package/dist/components/charts/LollipopChart/LollipopChart.d.ts +3 -0
- package/dist/components/charts/LollipopChart/LollipopChart.js +361 -0
- package/dist/components/charts/LollipopChart/LollipopChart.types.d.ts +42 -0
- package/dist/components/charts/LollipopChart/LollipopChart.types.js +12 -0
- package/dist/components/charts/LollipopChart/index.d.ts +3 -0
- package/dist/components/charts/RadarChart/RadarChart.js +1 -1
- package/dist/components/charts/StackedBarChart/StackedBarChart.js +151 -133
- package/dist/components/charts/StackedBarChart/StackedBarChart.types.d.ts +20 -18
- package/dist/components/charts/StackedBarChart/StackedBarChart.types.js +10 -4
- package/dist/components/charts/hooks/useChartAccessibility.d.ts +1 -1
- package/dist/components/charts/hooks/useChartAccessibility.js +12 -6
- package/dist/components/charts/hooks/useTooltipPosition.js +18 -6
- package/dist/components/charts/index.d.ts +10 -8
- package/dist/components/charts/index.js +8 -4
- package/dist/components/charts/shared/ChartAxis/CategoryYAxis.d.ts +14 -0
- package/dist/components/charts/shared/ChartAxis/CategoryYAxis.js +35 -0
- package/dist/components/charts/shared/ChartAxis/ChartAxis.types.d.ts +69 -8
- package/dist/components/charts/shared/ChartAxis/ValueXAxis.d.ts +14 -0
- package/dist/components/charts/shared/ChartAxis/ValueXAxis.js +64 -0
- package/dist/components/charts/shared/ChartAxis/XAxis.js +1 -1
- package/dist/components/charts/shared/ChartAxis/YAxis.js +2 -2
- package/dist/components/charts/shared/ChartAxis/index.d.ts +3 -1
- package/dist/components/charts/shared/ChartGrid/HorizontalGrid.d.ts +0 -2
- package/dist/components/charts/shared/ChartGrid/HorizontalGrid.js +1 -1
- package/dist/components/charts/shared/ChartGrid/VerticalGrid.d.ts +29 -0
- package/dist/components/charts/shared/ChartGrid/VerticalGrid.js +26 -0
- package/dist/components/charts/shared/ChartGrid/index.d.ts +2 -0
- package/dist/components/charts/shared/ChartMarker/ChartMarker.js +7 -1
- package/dist/components/charts/shared/ChartText/ChartText.theme.js +1 -1
- package/dist/components/charts/shared/index.d.ts +1 -1
- package/dist/components/charts/theme/chart.theme.js +21 -26
- package/dist/components/charts/types/chart.types.d.ts +9 -5
- package/dist/components/charts/types/chart.types.js +1 -7
- package/dist/components/charts/utils/animation-utils.d.ts +12 -7
- package/dist/components/charts/utils/animation-utils.js +19 -21
- package/dist/components/charts/utils/bar-emphasis.d.ts +32 -3
- package/dist/components/charts/utils/bar-emphasis.js +24 -8
- package/dist/components/charts/utils/index.d.ts +1 -0
- package/dist/components/charts/utils/series-color.d.ts +7 -0
- package/dist/components/charts/utils/series-color.js +20 -0
- package/dist/components/core/Accordion/Accordion.theme.js +3 -3
- package/dist/components/core/Accordion/AccordionTrigger.js +2 -2
- package/dist/components/core/Alert/Alert.animations.d.ts +11 -3
- package/dist/components/core/Alert/Alert.animations.js +30 -8
- package/dist/components/core/Alert/Alert.js +23 -9
- package/dist/components/core/Alert/Alert.theme.js +1 -1
- package/dist/components/core/Alert/Alert.types.d.ts +4 -2
- package/dist/components/core/AlertDialog/AlertDialog.js +2 -2
- package/dist/components/core/Avatar/Avatar.js +50 -42
- package/dist/components/core/Avatar/Avatar.theme.d.ts +8 -4
- package/dist/components/core/Avatar/Avatar.theme.js +64 -8
- package/dist/components/core/Avatar/Avatar.types.d.ts +13 -2
- package/dist/components/core/Avatar/index.d.ts +1 -1
- package/dist/components/core/AvatarGroup/AvatarGroup.js +6 -8
- package/dist/components/core/AvatarGroup/AvatarGroup.theme.d.ts +1 -2
- package/dist/components/core/AvatarGroup/AvatarGroup.theme.js +2 -6
- package/dist/components/core/AvatarGroup/AvatarGroup.types.d.ts +0 -6
- package/dist/components/core/AvatarGroup/index.d.ts +1 -1
- package/dist/components/core/Badge/Badge.animations.d.ts +0 -5
- package/dist/components/core/Badge/Badge.animations.js +5 -82
- package/dist/components/core/Badge/Badge.d.ts +7 -4
- package/dist/components/core/Badge/Badge.js +33 -65
- package/dist/components/core/Badge/Badge.theme.js +26 -24
- package/dist/components/core/Badge/Badge.types.d.ts +18 -34
- package/dist/components/core/Breadcrumbs/Breadcrumbs.theme.d.ts +1 -4
- package/dist/components/core/Breadcrumbs/Breadcrumbs.theme.js +6 -6
- package/dist/components/core/Button/Button.js +14 -58
- package/dist/components/core/Button/Button.theme.d.ts +2 -0
- package/dist/components/core/Button/Button.theme.js +35 -22
- package/dist/components/core/Button/Button.types.d.ts +26 -13
- package/dist/components/core/Button/index.d.ts +0 -2
- package/dist/components/core/Calendar/Calendar.js +20 -5
- package/dist/components/core/Calendar/Calendar.theme.js +15 -23
- package/dist/components/core/Calendar/Calendar.types.d.ts +0 -1
- package/dist/components/core/Calendar/CalendarMini/CalendarMini.js +3 -3
- package/dist/components/core/Calendar/CalendarMini/CalendarMini.theme.js +2 -2
- package/dist/components/core/Card/Card.js +7 -2
- package/dist/components/core/Card/Card.theme.js +40 -4
- package/dist/components/core/Card/Card.types.d.ts +20 -0
- package/dist/components/core/Card/CardBody.js +9 -1
- package/dist/components/core/Card/CardContext.d.ts +13 -0
- package/dist/components/core/Card/CardContext.js +14 -0
- package/dist/components/core/Card/CardFooter.js +1 -1
- package/dist/components/core/Card/CardHeader.js +4 -1
- package/dist/components/core/CommandPalette/CommandPalette.js +5 -4
- package/dist/components/core/CommandPalette/CommandPalette.theme.js +3 -7
- package/dist/components/core/CommandPalette/CommandPalette.types.d.ts +2 -0
- package/dist/components/core/ContextMenu/ContextMenu.theme.js +4 -3
- package/dist/components/core/ContextMenu/ContextMenu.types.d.ts +8 -1
- package/dist/components/core/ContextMenu/ContextMenuItem.js +2 -2
- package/dist/components/core/ContextMenu/ContextMenuSub.d.ts +11 -1
- package/dist/components/core/ContextMenu/ContextMenuSub.js +35 -22
- package/dist/components/core/ContextMenu/ContextMenuSubBody.js +14 -3
- package/dist/components/core/ContextMenu/ContextMenuSubTrigger.js +22 -9
- package/dist/components/core/DragDrop/DragDrop.theme.js +2 -2
- package/dist/components/core/Drawer/Drawer.theme.js +7 -4
- package/dist/components/core/Drawer/DrawerHeader.js +2 -3
- package/dist/components/core/Dropdown/Dropdown.theme.js +3 -1
- package/dist/components/core/Dropdown/DropdownItem.js +2 -2
- package/dist/components/core/Dropdown/DropdownMenu.js +22 -7
- package/dist/components/core/Dropdown/DropdownTrigger.js +16 -5
- package/dist/components/core/HeroCard/HeroCard.theme.js +5 -2
- package/dist/components/core/Kbd/Kbd.theme.js +4 -2
- package/dist/components/core/Link/Link.js +7 -5
- package/dist/components/core/Masonry/Masonry.theme.js +1 -1
- package/dist/components/core/MenuItem/MenuItem.js +2 -1
- package/dist/components/core/MenuItem/MenuItem.theme.js +13 -1
- package/dist/components/core/Message/Message.js +4 -2
- package/dist/components/core/Message/Message.theme.js +8 -10
- package/dist/components/core/Message/MessageAudio.js +2 -2
- package/dist/components/core/Message/MessageFile.js +2 -2
- package/dist/components/core/Message/MessageLink.js +2 -2
- package/dist/components/core/Message/MessageStatusIndicator.js +5 -5
- package/dist/components/core/Modal/Modal.animations.d.ts +1 -1
- package/dist/components/core/Modal/Modal.animations.js +50 -11
- package/dist/components/core/Modal/Modal.d.ts +1 -1
- package/dist/components/core/Modal/Modal.js +6 -2
- package/dist/components/core/Modal/Modal.theme.js +9 -4
- package/dist/components/core/Modal/ModalHeader.js +2 -3
- package/dist/components/core/ModalStack/ModalStackModal.js +4 -2
- package/dist/components/core/NavItem/NavItem.js +8 -7
- package/dist/components/core/NavItem/NavItem.theme.js +1 -1
- package/dist/components/core/OfflineIndicator/OfflineIndicator.animations.d.ts +22 -0
- package/dist/components/core/OfflineIndicator/OfflineIndicator.animations.js +54 -0
- package/dist/components/core/OfflineIndicator/OfflineIndicator.js +23 -24
- package/dist/components/core/OfflineIndicator/OfflineIndicator.theme.js +27 -6
- package/dist/components/core/OfflineIndicator/OfflineIndicator.types.d.ts +17 -0
- package/dist/components/core/PageHeading/PageHeading.theme.js +1 -1
- package/dist/components/core/PageHeading/PageHeadingBackButton.js +2 -2
- package/dist/components/core/Pagination/Pagination.js +3 -3
- package/dist/components/core/Pagination/Pagination.theme.js +5 -5
- package/dist/components/core/Pill/Pill.js +5 -2
- package/dist/components/core/Pill/Pill.theme.js +9 -5
- package/dist/components/core/Popover/PopoverBody.js +16 -5
- package/dist/components/core/Progress/Progress.d.ts +0 -25
- package/dist/components/core/Progress/Progress.js +79 -11
- package/dist/components/core/Progress/Progress.theme.js +17 -0
- package/dist/components/core/Progress/Progress.types.d.ts +47 -1
- package/dist/components/core/Rating/Rating.js +4 -5
- package/dist/components/core/Rating/Rating.theme.js +2 -2
- package/dist/components/core/Rating/Rating.types.d.ts +3 -2
- package/dist/components/core/ScrollArea/ScrollArea.js +1 -1
- package/dist/components/core/ScrollArea/ScrollArea.theme.js +1 -1
- package/dist/components/core/Segmented/Segmented.theme.js +10 -7
- package/dist/components/core/Segmented/SegmentedContext.js +1 -0
- package/dist/components/core/Sidebar/Sidebar.js +5 -2
- package/dist/components/core/Sidebar/Sidebar.theme.js +2 -2
- package/dist/components/core/Sidebar/Sidebar.types.d.ts +4 -2
- package/dist/components/core/Sidebar/SidebarContent.js +1 -1
- package/dist/components/core/Sidebar/SidebarHeader.js +3 -3
- package/dist/components/core/Sidebar/SidebarMobileTrigger.js +2 -2
- package/dist/components/core/Sidebar/SidebarSearch.js +4 -4
- package/dist/components/core/Sidebar/SidebarToggle.js +3 -3
- package/dist/components/core/Sidebar/SidebarUserProfile.js +3 -3
- package/dist/components/core/Sortable/Sortable.js +2 -2
- package/dist/components/core/Sortable/Sortable.theme.js +1 -1
- package/dist/components/core/Tabs/Tabs.theme.js +1 -1
- package/dist/components/core/Tag/Tag.js +2 -2
- package/dist/components/core/Tag/Tag.theme.js +5 -3
- package/dist/components/core/Toast/Toast.js +3 -3
- package/dist/components/core/Toast/Toast.types.d.ts +1 -1
- package/dist/components/core/Toast/ToastProvider.js +1 -1
- package/dist/components/core/Toast/useToast.js +5 -5
- package/dist/components/core/Tooltip/Tooltip.d.ts +1 -1
- package/dist/components/core/Tooltip/Tooltip.js +42 -10
- package/dist/components/core/Tooltip/Tooltip.types.d.ts +25 -0
- package/dist/components/core/Tree/Tree.js +2 -2
- package/dist/components/core/Tree/Tree.theme.js +1 -1
- package/dist/components/core/index.d.ts +0 -2
- package/dist/components/core/index.js +0 -4
- package/dist/components/core/shared/ChartTooltip/ChartTooltip.animations.d.ts +4 -0
- package/dist/components/core/shared/ChartTooltip/ChartTooltip.animations.js +20 -0
- package/dist/components/{charts → core}/shared/ChartTooltip/ChartTooltip.js +1 -1
- package/dist/components/core/shared/Ripple.d.ts +16 -0
- package/dist/components/core/shared/Ripple.js +141 -0
- package/dist/components/core/shared/interaction.animations.d.ts +51 -0
- package/dist/components/core/shared/interaction.animations.js +59 -0
- package/dist/components/data-display/Feed/Feed.js +2 -2
- package/dist/components/data-display/GanttChart/GanttChart.theme.js +7 -7
- package/dist/components/data-display/GanttChart/GanttChartPanel.js +2 -2
- package/dist/components/data-display/GanttChart/GanttTableGroupRow.js +3 -3
- package/dist/components/data-display/GanttChart/GanttTaskBar.js +1 -1
- package/dist/components/data-display/GanttChart/GanttTaskContextMenu.js +2 -2
- package/dist/components/data-display/GanttChart/GanttTimelineHeader.js +1 -1
- package/dist/components/data-display/GanttChart/GanttToolbar.js +2 -3
- package/dist/components/data-display/KPI/KPI.js +12 -21
- package/dist/components/data-display/KPI/KPI.theme.js +8 -4
- package/dist/components/data-display/Metric/Metric.js +2 -2
- package/dist/components/data-display/Metric/Metric.theme.js +25 -8
- package/dist/components/data-display/Metric/Metric.types.d.ts +1 -1
- package/dist/components/data-display/Table/Table.theme.js +11 -11
- package/dist/components/data-display/Table/TableActions.js +2 -2
- package/dist/components/data-display/Table/TableActionsMenu.js +1 -1
- package/dist/components/data-display/Table/TableColumnManager.js +2 -3
- package/dist/components/data-display/Table/TableContext.js +1 -0
- package/dist/components/data-display/Table/TableDeclarative.js +3 -3
- package/dist/components/data-display/Table/TableFilter.js +13 -6
- package/dist/components/data-display/Table/TableHeader.js +3 -3
- package/dist/components/data-display/Table/TableRow.js +2 -2
- package/dist/components/data-display/Table/TableSelectionHeader.js +4 -4
- package/dist/components/data-display/Timeline/Timeline.theme.js +1 -1
- package/dist/components/data-display/Timeline/TimelineMarker.js +2 -2
- package/dist/components/effects/CustomCursor/CustomCursor.d.ts +1 -1
- package/dist/components/effects/CustomCursor/CustomCursor.js +3 -3
- package/dist/components/effects/CustomCursor/CustomCursor.theme.js +4 -4
- package/dist/components/effects/DotPattern/DotPattern.js +6 -0
- package/dist/components/effects/DotPattern/DotPattern.types.d.ts +4 -2
- package/dist/components/effects/MeshGradient/MeshGradient.utils.d.ts +1 -1
- package/dist/components/effects/MeshGradient/MeshGradient.utils.js +1 -1
- package/dist/components/effects/Neumorphic/InsetCircleButton.js +1 -1
- package/dist/components/effects/Overlay/Overlay.js +7 -3
- package/dist/components/effects/index.d.ts +0 -32
- package/dist/components/effects/index.js +0 -16
- package/dist/components/effects/shared/ShaderCanvas/ShaderCanvas.d.ts +0 -2
- package/dist/components/effects/shared/ShaderCanvas/ShaderCanvas.js +1 -93
- package/dist/components/effects/shared/ShaderCanvas/ShaderCanvas.types.d.ts +0 -10
- package/dist/components/effects/shared/ShaderCanvas/index.d.ts +1 -1
- package/dist/components/effects/shared/index.d.ts +1 -3
- package/dist/components/effects/shared/shaderNoise.glsl.d.ts +1 -1
- package/dist/components/effects/shared/shaderNoise.glsl.js +2 -11
- package/dist/components/forms/Checkbox/Checkbox.js +2 -1
- package/dist/components/forms/Checkbox/Checkbox.theme.js +3 -3
- package/dist/components/forms/ColorPicker/ColorPickerEyeDropper.js +2 -2
- package/dist/components/forms/ColorPicker/ColorPickerGradient.js +2 -2
- package/dist/components/forms/ColorPicker/ColorPickerHeader.js +2 -2
- package/dist/components/forms/ColorPicker/ColorPickerImage.js +3 -3
- package/dist/components/forms/ColorPicker/ColorPickerInput.js +2 -2
- package/dist/components/forms/ColorPicker/ColorPickerPresets.js +2 -2
- package/dist/components/forms/ColorPicker/ColorPickerSavedColors.js +2 -2
- package/dist/components/forms/Combobox/Combobox.js +5 -3
- package/dist/components/forms/Combobox/Combobox.theme.js +2 -2
- package/dist/components/forms/DatePicker/DatePicker.animations.js +16 -25
- package/dist/components/forms/DatePicker/DatePicker.theme.js +2 -2
- package/dist/components/forms/DatePicker/DatePickerBody.js +1 -1
- package/dist/components/forms/DatePicker/DatePickerTrigger.js +2 -2
- package/dist/components/forms/DateRangePicker/DateRangePicker.theme.js +4 -4
- package/dist/components/forms/DateRangePicker/DateRangePickerBody.js +1 -1
- package/dist/components/forms/DateRangePicker/DateRangePickerContext.js +1 -0
- package/dist/components/forms/DateRangePicker/DateRangePickerPresets.js +2 -2
- package/dist/components/forms/DateRangePicker/DateRangePickerTrigger.js +2 -2
- package/dist/components/forms/FileUpload/FileUpload.js +4 -4
- package/dist/components/forms/FileUpload/FileUpload.theme.js +7 -3
- package/dist/components/forms/FileUpload/FileUploadProgress.js +7 -7
- package/dist/components/forms/FileUpload/FileUploadProgress.theme.js +1 -1
- package/dist/components/forms/Input/Input.js +6 -7
- package/dist/components/forms/Input/Input.theme.js +19 -15
- package/dist/components/forms/InputAddress/InputAddress.js +10 -3
- package/dist/components/forms/InputAddress/InputAddress.types.d.ts +2 -2
- package/dist/components/forms/InputCounter/InputCounter.js +3 -3
- package/dist/components/forms/InputOTP/InputOTP.d.ts +3 -12
- package/dist/components/forms/InputOTP/InputOTP.js +140 -151
- package/dist/components/forms/InputOTP/InputOTP.theme.d.ts +5 -1
- package/dist/components/forms/InputOTP/InputOTP.theme.js +40 -5
- package/dist/components/forms/InputOTP/InputOTP.types.d.ts +45 -2
- package/dist/components/forms/InputOTP/index.d.ts +1 -1
- package/dist/components/forms/InputTag/InputTag.js +5 -5
- package/dist/components/forms/InputTag/InputTag.theme.js +1 -2
- package/dist/components/forms/Mention/Mention.theme.js +3 -5
- package/dist/components/forms/Radio/Radio.js +3 -2
- package/dist/components/forms/Radio/Radio.theme.js +3 -3
- package/dist/components/forms/RichTextEditor/RichTextEditor.d.ts +12 -16
- package/dist/components/forms/RichTextEditor/RichTextEditor.js +165 -1681
- package/dist/components/forms/RichTextEditor/RichTextEditor.theme.d.ts +12 -56
- package/dist/components/forms/RichTextEditor/RichTextEditor.theme.js +60 -118
- package/dist/components/forms/RichTextEditor/RichTextEditor.types.d.ts +62 -126
- package/dist/components/forms/RichTextEditor/RichTextLinkField.d.ts +18 -0
- package/dist/components/forms/RichTextEditor/RichTextLinkField.js +46 -0
- package/dist/components/forms/RichTextEditor/RichTextToolbar.d.ts +15 -0
- package/dist/components/forms/RichTextEditor/RichTextToolbar.js +93 -0
- package/dist/components/forms/RichTextEditor/editorCommands.d.ts +50 -0
- package/dist/components/forms/RichTextEditor/editorCommands.js +58 -0
- package/dist/components/forms/RichTextEditor/editorState.d.ts +19 -0
- package/dist/components/forms/RichTextEditor/editorState.js +103 -0
- package/dist/components/forms/RichTextEditor/index.d.ts +5 -3
- package/dist/components/forms/RichTextEditor/sanitizeHtml.d.ts +38 -0
- package/dist/components/forms/RichTextEditor/sanitizeHtml.js +179 -0
- package/dist/components/forms/RichTextEditor/sanitizeHtml.test.d.ts +1 -0
- package/dist/components/forms/Select/Select.d.ts +5 -1
- package/dist/components/forms/Select/Select.js +14 -13
- package/dist/components/forms/Select/Select.theme.js +4 -4
- package/dist/components/forms/Select/Select.types.d.ts +74 -8
- package/dist/components/forms/Select/useSelectState.d.ts +9 -3
- package/dist/components/forms/Select/useSelectState.js +4 -1
- package/dist/components/forms/SelectableCard/SelectableCard.animations.d.ts +1 -2
- package/dist/components/forms/SelectableCard/SelectableCard.animations.js +6 -7
- package/dist/components/forms/SelectableCard/SelectableCard.js +3 -2
- package/dist/components/forms/SelectableCard/SelectableCard.theme.js +1 -1
- package/dist/components/forms/Signature/Signature.js +1 -1
- package/dist/components/forms/Slider/Slider.js +24 -11
- package/dist/components/forms/Slider/Slider.theme.js +9 -3
- package/dist/components/forms/Switch/Switch.theme.js +3 -3
- package/dist/components/forms/TimePicker/TimePicker.theme.js +7 -8
- package/dist/components/forms/TimePicker/TimePickerContent.js +1 -1
- package/dist/components/forms/TimePicker/TimePickerTrigger.js +3 -3
- package/dist/components/forms/forms.theme.js +38 -13
- package/dist/components/forms/index.js +2 -1
- package/dist/components/generative/FormShell.d.ts +22 -0
- package/dist/components/generative/FormShell.js +102 -0
- package/dist/components/generative/GenerativeView.d.ts +52 -1
- package/dist/components/generative/GenerativeView.js +203 -11
- package/dist/components/generative/actions.d.ts +5 -0
- package/dist/components/generative/ai-sdk/index.d.ts +1 -0
- package/dist/components/generative/ai-sdk/index.js +1 -0
- package/dist/components/generative/ai-sdk/useGenerativeChat.d.ts +52 -0
- package/dist/components/generative/ai-sdk/useGenerativeChat.js +73 -0
- package/dist/components/generative/ai-sdk/useGenerativeChat.test.d.ts +1 -0
- package/dist/components/generative/fieldBinding.d.ts +31 -0
- package/dist/components/generative/fieldBinding.js +33 -0
- package/dist/components/generative/fieldBinding.test.d.ts +1 -0
- package/dist/components/generative/formScope.d.ts +71 -0
- package/dist/components/generative/formScope.js +135 -0
- package/dist/components/generative/index.d.ts +4 -0
- package/dist/components/generative/index.js +4 -0
- package/dist/components/generative/registry.d.ts +2 -0
- package/dist/components/generative/registry.js +197 -4
- package/dist/components/generative/resolvers.js +16 -16
- package/dist/components/generative/schema.generated.js +2522 -328
- package/dist/components/generative/toToolResult.d.ts +21 -0
- package/dist/components/generative/toToolResult.js +15 -0
- package/dist/components/generative/toToolResult.test.d.ts +1 -0
- package/dist/components/generative/validate.d.ts +10 -1
- package/dist/components/generative/validate.js +126 -11
- package/dist/components/layout/Grid/Grid.js +1 -0
- package/dist/components/layout/Section/Section.theme.js +1 -1
- package/dist/components/layout/Stack/Stack.js +1 -0
- package/dist/generative.schema.json +2522 -328
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/useElapsedTime.d.ts +28 -0
- package/dist/hooks/useElapsedTime.js +37 -0
- package/dist/hooks/useSelectPortal.d.ts +10 -2
- package/dist/hooks/useSelectPortal.js +6 -3
- package/dist/index.js +2 -5
- package/dist/registry.json +3262 -2464
- package/dist/shadcn-compat.css +6 -6
- package/dist/styles/theme.test.d.ts +1 -0
- package/dist/styles.css +1 -1
- package/dist/test/render.d.ts +17 -0
- package/dist/theme.css +5 -1
- package/dist/themes/ember.css +131 -0
- package/dist/themes/iris.css +94 -0
- package/dist/themes/jade.css +139 -0
- package/dist/themes/precision.css +232 -0
- package/dist/tools.json +2557 -328
- package/dist/utils/colorUtils.d.ts +6 -6
- package/dist/utils/colorUtils.js +8 -8
- package/dist/utils/index.d.ts +0 -1
- package/package.json +39 -6
- package/src/global.scss +32 -28
- package/src/styles/theme.css +547 -176
- package/src/styles/theme.test.ts +119 -0
- package/tailwind.preset.cjs +66 -38
- package/dist/components/charts/FunnelChart/FunnelChart.animations.d.ts +0 -35
- package/dist/components/charts/FunnelChart/FunnelChart.animations.js +0 -59
- package/dist/components/charts/FunnelChart/FunnelChart.d.ts +0 -8
- package/dist/components/charts/FunnelChart/FunnelChart.js +0 -410
- package/dist/components/charts/FunnelChart/FunnelChart.theme.d.ts +0 -2
- package/dist/components/charts/FunnelChart/FunnelChart.theme.js +0 -12
- package/dist/components/charts/FunnelChart/FunnelChart.types.d.ts +0 -105
- package/dist/components/charts/FunnelChart/index.d.ts +0 -4
- package/dist/components/charts/ScatterPlot/ScatterPlot.d.ts +0 -9
- package/dist/components/charts/ScatterPlot/ScatterPlot.js +0 -207
- package/dist/components/charts/ScatterPlot/ScatterPlot.theme.d.ts +0 -18
- package/dist/components/charts/ScatterPlot/ScatterPlot.theme.js +0 -42
- package/dist/components/charts/ScatterPlot/ScatterPlot.types.d.ts +0 -65
- package/dist/components/charts/ScatterPlot/ScatterPlot.types.js +0 -12
- package/dist/components/charts/ScatterPlot/index.d.ts +0 -3
- package/dist/components/core/Button/Button.ripple.d.ts +0 -71
- package/dist/components/core/Button/Button.ripple.js +0 -236
- package/dist/components/core/Calendar/CalendarEvent/CalendarEvent.d.ts +0 -4
- package/dist/components/core/Calendar/CalendarEvent/CalendarEvent.theme.d.ts +0 -12
- package/dist/components/core/Calendar/CalendarEvent/CalendarEvent.types.d.ts +0 -23
- package/dist/components/core/Calendar/CalendarEvent/index.d.ts +0 -2
- package/dist/components/core/CardStack/CardStack.animations.d.ts +0 -47
- package/dist/components/core/CardStack/CardStack.d.ts +0 -3
- package/dist/components/core/CardStack/CardStack.js +0 -187
- package/dist/components/core/CardStack/CardStack.theme.d.ts +0 -6
- package/dist/components/core/CardStack/CardStack.theme.js +0 -33
- package/dist/components/core/CardStack/CardStack.types.d.ts +0 -139
- package/dist/components/core/CardStack/index.d.ts +0 -7
- package/dist/components/core/Carousel/Carousel.d.ts +0 -3
- package/dist/components/core/Carousel/Carousel.js +0 -83
- package/dist/components/core/Carousel/Carousel.theme.d.ts +0 -10
- package/dist/components/core/Carousel/Carousel.theme.js +0 -20
- package/dist/components/core/Carousel/Carousel.types.d.ts +0 -113
- package/dist/components/core/Carousel/CarouselBody.d.ts +0 -4
- package/dist/components/core/Carousel/CarouselBody.js +0 -59
- package/dist/components/core/Carousel/CarouselContext.d.ts +0 -3
- package/dist/components/core/Carousel/CarouselContext.js +0 -13
- package/dist/components/core/Carousel/CarouselItem.d.ts +0 -4
- package/dist/components/core/Carousel/CarouselItem.js +0 -11
- package/dist/components/core/Carousel/CarouselNext.d.ts +0 -4
- package/dist/components/core/Carousel/CarouselNext.js +0 -16
- package/dist/components/core/Carousel/CarouselPrevious.d.ts +0 -4
- package/dist/components/core/Carousel/CarouselPrevious.js +0 -16
- package/dist/components/core/Carousel/index.d.ts +0 -3
- package/dist/components/core/Pill/Pill.animations.d.ts +0 -32
- package/dist/components/core/Pill/Pill.animations.js +0 -16
- package/dist/components/effects/ColorPanels/ColorPanels.d.ts +0 -8
- package/dist/components/effects/ColorPanels/ColorPanels.js +0 -66
- package/dist/components/effects/ColorPanels/ColorPanels.shaders.d.ts +0 -12
- package/dist/components/effects/ColorPanels/ColorPanels.shaders.js +0 -218
- package/dist/components/effects/ColorPanels/ColorPanels.types.d.ts +0 -29
- package/dist/components/effects/ColorPanels/ColorPanels.types.js +0 -3
- package/dist/components/effects/ColorPanels/index.d.ts +0 -2
- package/dist/components/effects/FlutedGlass/FlutedGlass.d.ts +0 -9
- package/dist/components/effects/FlutedGlass/FlutedGlass.js +0 -80
- package/dist/components/effects/FlutedGlass/FlutedGlass.shaders.d.ts +0 -12
- package/dist/components/effects/FlutedGlass/FlutedGlass.shaders.js +0 -335
- package/dist/components/effects/FlutedGlass/FlutedGlass.types.d.ts +0 -61
- package/dist/components/effects/FlutedGlass/FlutedGlass.types.js +0 -16
- package/dist/components/effects/FlutedGlass/index.d.ts +0 -3
- package/dist/components/effects/GlassEffect/GlassEffect.d.ts +0 -15
- package/dist/components/effects/GlassEffect/GlassEffect.js +0 -38
- package/dist/components/effects/GlassEffect/GlassEffect.types.d.ts +0 -19
- package/dist/components/effects/GlassEffect/index.d.ts +0 -2
- package/dist/components/effects/GlassSurface/GlassSurface.d.ts +0 -8
- package/dist/components/effects/GlassSurface/GlassSurface.js +0 -250
- package/dist/components/effects/GlassSurface/GlassSurface.types.d.ts +0 -66
- package/dist/components/effects/GlassSurface/index.d.ts +0 -2
- package/dist/components/effects/GodRays/GodRays.d.ts +0 -8
- package/dist/components/effects/GodRays/GodRays.js +0 -68
- package/dist/components/effects/GodRays/GodRays.shaders.d.ts +0 -10
- package/dist/components/effects/GodRays/GodRays.shaders.js +0 -128
- package/dist/components/effects/GodRays/GodRays.types.d.ts +0 -25
- package/dist/components/effects/GodRays/GodRays.types.js +0 -3
- package/dist/components/effects/GodRays/index.d.ts +0 -2
- package/dist/components/effects/GridPattern/GridPattern.d.ts +0 -18
- package/dist/components/effects/GridPattern/GridPattern.js +0 -65
- package/dist/components/effects/GridPattern/GridPattern.types.d.ts +0 -47
- package/dist/components/effects/GridPattern/index.d.ts +0 -2
- package/dist/components/effects/HalftoneCmyk/HalftoneCmyk.d.ts +0 -10
- package/dist/components/effects/HalftoneCmyk/HalftoneCmyk.js +0 -78
- package/dist/components/effects/HalftoneCmyk/HalftoneCmyk.shaders.d.ts +0 -22
- package/dist/components/effects/HalftoneCmyk/HalftoneCmyk.shaders.js +0 -239
- package/dist/components/effects/HalftoneCmyk/HalftoneCmyk.types.d.ts +0 -52
- package/dist/components/effects/HalftoneCmyk/index.d.ts +0 -2
- package/dist/components/effects/HalftoneDots/HalftoneDots.d.ts +0 -9
- package/dist/components/effects/HalftoneDots/HalftoneDots.js +0 -68
- package/dist/components/effects/HalftoneDots/HalftoneDots.shaders.d.ts +0 -13
- package/dist/components/effects/HalftoneDots/HalftoneDots.shaders.js +0 -296
- package/dist/components/effects/HalftoneDots/HalftoneDots.types.d.ts +0 -43
- package/dist/components/effects/HalftoneDots/HalftoneDots.types.js +0 -12
- package/dist/components/effects/HalftoneDots/index.d.ts +0 -3
- package/dist/components/effects/ImageDithering/ImageDithering.d.ts +0 -9
- package/dist/components/effects/ImageDithering/ImageDithering.js +0 -68
- package/dist/components/effects/ImageDithering/ImageDithering.shaders.d.ts +0 -12
- package/dist/components/effects/ImageDithering/ImageDithering.shaders.js +0 -117
- package/dist/components/effects/ImageDithering/ImageDithering.types.d.ts +0 -30
- package/dist/components/effects/ImageDithering/ImageDithering.types.js +0 -8
- package/dist/components/effects/ImageDithering/index.d.ts +0 -3
- package/dist/components/effects/MagneticElement/MagneticElement.d.ts +0 -30
- package/dist/components/effects/MagneticElement/MagneticElement.js +0 -111
- package/dist/components/effects/MagneticElement/MagneticElement.types.d.ts +0 -44
- package/dist/components/effects/MagneticElement/index.d.ts +0 -2
- package/dist/components/effects/Metaballs/Metaballs.d.ts +0 -8
- package/dist/components/effects/Metaballs/Metaballs.js +0 -59
- package/dist/components/effects/Metaballs/Metaballs.shaders.d.ts +0 -10
- package/dist/components/effects/Metaballs/Metaballs.shaders.js +0 -102
- package/dist/components/effects/Metaballs/Metaballs.types.d.ts +0 -16
- package/dist/components/effects/Metaballs/Metaballs.types.js +0 -3
- package/dist/components/effects/Metaballs/index.d.ts +0 -2
- package/dist/components/effects/PaperTexture/PaperTexture.d.ts +0 -9
- package/dist/components/effects/PaperTexture/PaperTexture.js +0 -61
- package/dist/components/effects/PaperTexture/PaperTexture.shaders.d.ts +0 -22
- package/dist/components/effects/PaperTexture/PaperTexture.shaders.js +0 -145
- package/dist/components/effects/PaperTexture/PaperTexture.types.d.ts +0 -19
- package/dist/components/effects/PaperTexture/index.d.ts +0 -2
- package/dist/components/effects/PulsingBorder/PulsingBorder.d.ts +0 -27
- package/dist/components/effects/PulsingBorder/PulsingBorder.js +0 -174
- package/dist/components/effects/PulsingBorder/PulsingBorder.shaders.d.ts +0 -14
- package/dist/components/effects/PulsingBorder/PulsingBorder.shaders.js +0 -258
- package/dist/components/effects/PulsingBorder/PulsingBorder.types.d.ts +0 -75
- package/dist/components/effects/PulsingBorder/PulsingBorder.types.js +0 -3
- package/dist/components/effects/PulsingBorder/index.d.ts +0 -2
- package/dist/components/effects/SmokeRing/SmokeRing.d.ts +0 -8
- package/dist/components/effects/SmokeRing/SmokeRing.js +0 -62
- package/dist/components/effects/SmokeRing/SmokeRing.shaders.d.ts +0 -14
- package/dist/components/effects/SmokeRing/SmokeRing.shaders.js +0 -130
- package/dist/components/effects/SmokeRing/SmokeRing.types.d.ts +0 -22
- package/dist/components/effects/SmokeRing/SmokeRing.types.js +0 -3
- package/dist/components/effects/SmokeRing/index.d.ts +0 -2
- package/dist/components/effects/StaticGradientMesh/StaticGradientMesh.d.ts +0 -9
- package/dist/components/effects/StaticGradientMesh/StaticGradientMesh.js +0 -59
- package/dist/components/effects/StaticGradientMesh/StaticGradientMesh.shaders.d.ts +0 -14
- package/dist/components/effects/StaticGradientMesh/StaticGradientMesh.shaders.js +0 -129
- package/dist/components/effects/StaticGradientMesh/StaticGradientMesh.types.d.ts +0 -23
- package/dist/components/effects/StaticGradientMesh/StaticGradientMesh.types.js +0 -3
- package/dist/components/effects/StaticGradientMesh/index.d.ts +0 -2
- package/dist/components/effects/Water/Water.d.ts +0 -9
- package/dist/components/effects/Water/Water.js +0 -65
- package/dist/components/effects/Water/Water.shaders.d.ts +0 -11
- package/dist/components/effects/Water/Water.shaders.js +0 -123
- package/dist/components/effects/Water/Water.types.d.ts +0 -25
- package/dist/components/effects/Water/index.d.ts +0 -2
- package/dist/components/effects/shared/bayerMatrices.glsl.d.ts +0 -10
- package/dist/components/effects/shared/bayerMatrices.glsl.js +0 -44
- package/dist/components/effects/shared/imageUV.glsl.d.ts +0 -12
- package/dist/components/effects/shared/imageUV.glsl.js +0 -26
- package/dist/components/forms/RichTextEditor/RichTextEditor.animations.d.ts +0 -7
- package/dist/components/forms/RichTextEditor/RichTextEditor.animations.js +0 -32
- package/dist/utils/calendarUtils.d.ts +0 -60
- /package/dist/components/{charts → core}/shared/ChartTooltip/ChartTooltip.d.ts +0 -0
- /package/dist/components/{charts → core}/shared/ChartTooltip/ChartTooltip.theme.d.ts +0 -0
- /package/dist/components/{charts → core}/shared/ChartTooltip/ChartTooltip.theme.js +0 -0
- /package/dist/components/{charts → core}/shared/ChartTooltip/ChartTooltip.types.d.ts +0 -0
- /package/dist/components/{charts → core}/shared/ChartTooltip/ChartTooltipContent.d.ts +0 -0
- /package/dist/components/{charts → core}/shared/ChartTooltip/index.d.ts +0 -0
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export { ChartContainer } from './ChartContainer.js';
|
|
2
2
|
export { BarChart } from './BarChart/BarChart.js';
|
|
3
|
+
export { HorizontalBarChart } from './HorizontalBarChart/HorizontalBarChart.js';
|
|
4
|
+
export { HORIZONTAL_BAR_CHART_DEFAULTS } from './HorizontalBarChart/HorizontalBarChart.types.js';
|
|
3
5
|
export { StackedBarChart } from './StackedBarChart/StackedBarChart.js';
|
|
4
6
|
export { STACKED_BAR_CHART_DEFAULTS } from './StackedBarChart/StackedBarChart.types.js';
|
|
5
7
|
export { LineChart } from './LineChart/LineChart.js';
|
|
@@ -10,16 +12,18 @@ export { Heatmap } from './Heatmap/Heatmap.js';
|
|
|
10
12
|
import './Heatmap/HeatmapCell.js';
|
|
11
13
|
import 'react/jsx-runtime';
|
|
12
14
|
import '../../utils/cn.js';
|
|
13
|
-
export { calculateIntensity, createGridMatrix, formatAxisLabel,
|
|
14
|
-
export { FunnelChart } from './FunnelChart/FunnelChart.js';
|
|
15
|
-
export { ScatterPlot } from './ScatterPlot/ScatterPlot.js';
|
|
15
|
+
export { calculateIntensity, createGridMatrix, formatAxisLabel, getDefaultTooltipContent, processHeatmapData } from './Heatmap/utils/heatmapUtils.js';
|
|
16
16
|
export { RadarChart } from './RadarChart/RadarChart.js';
|
|
17
17
|
export { ComboChart } from './ComboChart/ComboChart.js';
|
|
18
18
|
export { ActivityRings } from './ActivityRings/ActivityRings.js';
|
|
19
|
-
export {
|
|
19
|
+
export { LollipopChart } from './LollipopChart/LollipopChart.js';
|
|
20
|
+
export { LOLLIPOP_CHART_DEFAULTS } from './LollipopChart/LollipopChart.types.js';
|
|
21
|
+
export { ChartTooltip } from '../core/shared/ChartTooltip/ChartTooltip.js';
|
|
20
22
|
export { ChartLegend } from './shared/ChartLegend/ChartLegend.js';
|
|
21
23
|
export { XAxis } from './shared/ChartAxis/XAxis.js';
|
|
22
24
|
export { YAxis } from './shared/ChartAxis/YAxis.js';
|
|
25
|
+
import './shared/ChartAxis/ValueXAxis.js';
|
|
26
|
+
import './shared/ChartAxis/CategoryYAxis.js';
|
|
23
27
|
export { ChartText } from './shared/ChartText/ChartText.js';
|
|
24
28
|
export { ChartMarker } from './shared/ChartMarker/ChartMarker.js';
|
|
25
29
|
export { ChartCrosshair } from './shared/ChartCrosshair/ChartCrosshair.js';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { CategoryYAxisProps } from "./ChartAxis.types";
|
|
3
|
+
/**
|
|
4
|
+
* CategoryYAxis component for charts
|
|
5
|
+
* Renders a vertical CATEGORY axis: one label per category down the left, with
|
|
6
|
+
* optional tick marks.
|
|
7
|
+
*
|
|
8
|
+
* This is `XAxis` rotated. Labels sit to the LEFT of the axis line and are
|
|
9
|
+
* end-anchored, so a ragged set of category names ("United Kingdom", "Italy") stays
|
|
10
|
+
* flush against the plot — the caller is responsible for reserving enough left margin,
|
|
11
|
+
* since unlike a bottom axis there is no shared constant that can know how wide a
|
|
12
|
+
* category name will be.
|
|
13
|
+
*/
|
|
14
|
+
export declare const CategoryYAxis: React.FC<CategoryYAxisProps>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import { cn } from '../../../../utils/cn.js';
|
|
4
|
+
import { ChartText } from '../ChartText/ChartText.js';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* CategoryYAxis component for charts
|
|
8
|
+
* Renders a vertical CATEGORY axis: one label per category down the left, with
|
|
9
|
+
* optional tick marks.
|
|
10
|
+
*
|
|
11
|
+
* This is `XAxis` rotated. Labels sit to the LEFT of the axis line and are
|
|
12
|
+
* end-anchored, so a ragged set of category names ("United Kingdom", "Italy") stays
|
|
13
|
+
* flush against the plot — the caller is responsible for reserving enough left margin,
|
|
14
|
+
* since unlike a bottom axis there is no shared constant that can know how wide a
|
|
15
|
+
* category name will be.
|
|
16
|
+
*/
|
|
17
|
+
const CategoryYAxis = React__default.memo(({ data, x, y, height, categoryHeight, categoryGap = 0, show = true, className, showTicks = true, tickLength = 6, tickPadding = 8, textAnchor = "end", labelFormatter, maxLabelWidth = 100, }) => {
|
|
18
|
+
if (!show)
|
|
19
|
+
return null;
|
|
20
|
+
const formatLabel = (item, index) => {
|
|
21
|
+
if (labelFormatter) {
|
|
22
|
+
return labelFormatter(item, index);
|
|
23
|
+
}
|
|
24
|
+
return item.name || item.label || String(index);
|
|
25
|
+
};
|
|
26
|
+
const getTickY = (index) => y + index * (categoryHeight + categoryGap) + categoryHeight / 2;
|
|
27
|
+
return (jsxs("g", { className: cn("chart-category-y-axis", className), children: [jsx("line", { x1: x, y1: y, x2: x, y2: y + height, className: "stroke-[var(--color-border)]", strokeWidth: 1 }), data.map((item, index) => {
|
|
28
|
+
const tickY = getTickY(index);
|
|
29
|
+
const label = formatLabel(item, index);
|
|
30
|
+
return (jsxs("g", { children: [showTicks && (jsx("line", { x1: x - tickLength, y1: tickY, x2: x, y2: tickY, className: "stroke-[var(--color-border)]", strokeWidth: 1 })), jsx(ChartText, { x: x - tickLength - tickPadding, y: tickY, textAnchor: textAnchor, dominantBaseline: "middle", maxWidth: maxLabelWidth, truncate: !!maxLabelWidth, children: label })] }, index));
|
|
31
|
+
})] }));
|
|
32
|
+
});
|
|
33
|
+
CategoryYAxis.displayName = "CategoryYAxis";
|
|
34
|
+
|
|
35
|
+
export { CategoryYAxis };
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import type { ChartDataPoint } from '../../types/chart.types';
|
|
2
|
+
/**
|
|
3
|
+
* 🔴 No `color` / `fontSize` here on purpose. Axis lines and labels are themed via CSS
|
|
4
|
+
* variables (`stroke-[var(--color-border)]` and the text utilities), so both props were
|
|
5
|
+
* accepted and then ignored. Restyle an axis with `className`, or change the token.
|
|
6
|
+
*/
|
|
2
7
|
export interface BaseAxisProps {
|
|
3
8
|
/** Whether to show the axis */
|
|
4
9
|
show?: boolean;
|
|
5
10
|
/** Custom className for styling */
|
|
6
11
|
className?: string;
|
|
7
|
-
/** Color of the axis line and text */
|
|
8
|
-
color?: string;
|
|
9
|
-
/** Font size for axis labels */
|
|
10
|
-
fontSize?: number;
|
|
11
12
|
/** Whether to show tick marks */
|
|
12
13
|
showTicks?: boolean;
|
|
13
14
|
/** Length of tick marks */
|
|
@@ -64,9 +65,73 @@ export interface YAxisProps extends BaseAxisProps {
|
|
|
64
65
|
showGrid?: boolean;
|
|
65
66
|
/** Width of the chart area for grid lines */
|
|
66
67
|
gridWidth?: number;
|
|
68
|
+
/** Custom className for the grid lines this axis draws (`className` styles the axis group) */
|
|
69
|
+
gridClassName?: string;
|
|
67
70
|
/** Custom tick values */
|
|
68
71
|
ticks?: number[];
|
|
69
72
|
}
|
|
73
|
+
/**
|
|
74
|
+
* A VALUE axis rendered horizontally (ticks along the bottom).
|
|
75
|
+
*
|
|
76
|
+
* The mirror of `YAxisProps`, for charts whose value axis runs left-to-right
|
|
77
|
+
* (HorizontalBarChart). Note `XAxis` is a CATEGORY axis despite also being
|
|
78
|
+
* horizontal — the two axis families are split by what they measure, not by
|
|
79
|
+
* which way they point.
|
|
80
|
+
*/
|
|
81
|
+
export interface ValueXAxisProps extends BaseAxisProps {
|
|
82
|
+
/** Minimum value for the axis */
|
|
83
|
+
min: number;
|
|
84
|
+
/** Maximum value for the axis */
|
|
85
|
+
max: number;
|
|
86
|
+
/** Number of ticks */
|
|
87
|
+
tickCount?: number;
|
|
88
|
+
/** X position of the axis */
|
|
89
|
+
x: number;
|
|
90
|
+
/** Y position of the axis (its baseline) */
|
|
91
|
+
y: number;
|
|
92
|
+
/** Width of the axis */
|
|
93
|
+
width: number;
|
|
94
|
+
/** Text anchor for labels */
|
|
95
|
+
textAnchor?: 'start' | 'middle' | 'end';
|
|
96
|
+
/** Custom tick formatter */
|
|
97
|
+
tickFormatter?: (value: number) => string;
|
|
98
|
+
/** Whether to draw grid lines up from each tick */
|
|
99
|
+
showGrid?: boolean;
|
|
100
|
+
/** Height of the chart area for grid lines */
|
|
101
|
+
gridHeight?: number;
|
|
102
|
+
/** Custom tick values */
|
|
103
|
+
ticks?: number[];
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* A CATEGORY axis rendered vertically (one label per category, down the left).
|
|
107
|
+
*
|
|
108
|
+
* The mirror of `XAxisProps`, for charts whose categories stack vertically
|
|
109
|
+
* (HorizontalBarChart).
|
|
110
|
+
*/
|
|
111
|
+
export interface CategoryYAxisProps extends BaseAxisProps {
|
|
112
|
+
/** Data points for the axis */
|
|
113
|
+
data: Array<{
|
|
114
|
+
name?: string;
|
|
115
|
+
label?: string;
|
|
116
|
+
[key: string]: string | number | null | undefined;
|
|
117
|
+
}>;
|
|
118
|
+
/** X position of the axis (its line) */
|
|
119
|
+
x: number;
|
|
120
|
+
/** Y position of the axis */
|
|
121
|
+
y: number;
|
|
122
|
+
/** Height of the axis */
|
|
123
|
+
height: number;
|
|
124
|
+
/** Height of each category/bar group */
|
|
125
|
+
categoryHeight: number;
|
|
126
|
+
/** Gap between categories */
|
|
127
|
+
categoryGap?: number;
|
|
128
|
+
/** Text anchor for labels */
|
|
129
|
+
textAnchor?: 'start' | 'middle' | 'end';
|
|
130
|
+
/** Custom label formatter */
|
|
131
|
+
labelFormatter?: (value: ChartDataPoint, index: number) => string;
|
|
132
|
+
/** Maximum width for labels before truncation */
|
|
133
|
+
maxLabelWidth?: number;
|
|
134
|
+
}
|
|
70
135
|
export interface AxisTickProps {
|
|
71
136
|
/** Value of the tick */
|
|
72
137
|
value: number | string;
|
|
@@ -82,10 +147,6 @@ export interface AxisTickProps {
|
|
|
82
147
|
textAnchor?: 'start' | 'middle' | 'end';
|
|
83
148
|
/** Custom formatter */
|
|
84
149
|
formatter?: (value: number | string) => string;
|
|
85
|
-
/** Font size */
|
|
86
|
-
fontSize?: number;
|
|
87
|
-
/** Color */
|
|
88
|
-
color?: string;
|
|
89
150
|
/** Rotation angle */
|
|
90
151
|
rotation?: number;
|
|
91
152
|
/** Maximum width before truncation */
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { ValueXAxisProps } from "./ChartAxis.types";
|
|
3
|
+
/**
|
|
4
|
+
* ValueXAxis component for charts
|
|
5
|
+
* Renders a horizontal VALUE axis: nice ticks, labels below, optional grid lines
|
|
6
|
+
* rising from each tick.
|
|
7
|
+
*
|
|
8
|
+
* This is `YAxis` rotated — same Heckbert nice-ticks and the same tick formatting,
|
|
9
|
+
* so a horizontal chart's value ticks read identically to a vertical one's. Kept as a
|
|
10
|
+
* separate component rather than an `orientation` prop on YAxis because every position
|
|
11
|
+
* calculation and text anchor differs; a branchy shared axis would be harder to follow
|
|
12
|
+
* than two flat mirrors.
|
|
13
|
+
*/
|
|
14
|
+
export declare const ValueXAxis: React.FC<ValueXAxisProps>;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import { cn } from '../../../../utils/cn.js';
|
|
4
|
+
import { ChartText } from '../ChartText/ChartText.js';
|
|
5
|
+
import { generateNiceTicks } from '../../utils/chart-validation.js';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* ValueXAxis component for charts
|
|
9
|
+
* Renders a horizontal VALUE axis: nice ticks, labels below, optional grid lines
|
|
10
|
+
* rising from each tick.
|
|
11
|
+
*
|
|
12
|
+
* This is `YAxis` rotated — same Heckbert nice-ticks and the same tick formatting,
|
|
13
|
+
* so a horizontal chart's value ticks read identically to a vertical one's. Kept as a
|
|
14
|
+
* separate component rather than an `orientation` prop on YAxis because every position
|
|
15
|
+
* calculation and text anchor differs; a branchy shared axis would be harder to follow
|
|
16
|
+
* than two flat mirrors.
|
|
17
|
+
*/
|
|
18
|
+
const ValueXAxis = React__default.memo(({ min, max, tickCount = 5, x, y, width, show = true, className, showTicks = true, tickLength = 6, tickPadding = 12, textAnchor = "middle", tickFormatter, showGrid = false, gridHeight = 0, ticks: customTicks, }) => {
|
|
19
|
+
if (!show)
|
|
20
|
+
return null;
|
|
21
|
+
// Generate tick values using Heckbert's nice numbers algorithm (same as YAxis)
|
|
22
|
+
const ticks = (() => {
|
|
23
|
+
if (customTicks)
|
|
24
|
+
return customTicks;
|
|
25
|
+
if (tickCount <= 1)
|
|
26
|
+
return [min];
|
|
27
|
+
const { ticks: niceTicks } = generateNiceTicks(min, max, tickCount);
|
|
28
|
+
return niceTicks;
|
|
29
|
+
})();
|
|
30
|
+
// Identical to YAxis.formatTick — the two must agree, or the same dataset would
|
|
31
|
+
// label differently depending on orientation.
|
|
32
|
+
const formatTick = (value) => {
|
|
33
|
+
if (tickFormatter) {
|
|
34
|
+
return tickFormatter(value);
|
|
35
|
+
}
|
|
36
|
+
if (Math.abs(value) >= 1000000) {
|
|
37
|
+
return `${Math.round(value / 1000000)}M`;
|
|
38
|
+
}
|
|
39
|
+
else if (Math.abs(value) >= 1000) {
|
|
40
|
+
return `${Math.round(value / 1000)}K`;
|
|
41
|
+
}
|
|
42
|
+
else if (Number.isInteger(value) ||
|
|
43
|
+
Math.abs(value - Math.round(value)) < 0.01) {
|
|
44
|
+
return Math.round(value).toString();
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
return value.toFixed(1);
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
const getTickX = (value) => {
|
|
51
|
+
if (max === min) {
|
|
52
|
+
return x + width / 2; // Center position when no range
|
|
53
|
+
}
|
|
54
|
+
const ratio = (value - min) / (max - min);
|
|
55
|
+
return x + ratio * width;
|
|
56
|
+
};
|
|
57
|
+
return (jsxs("g", { className: cn("chart-value-x-axis", className), children: [jsx("line", { x1: x, y1: y, x2: x + width, y2: y, className: "stroke-[var(--color-border)]", strokeWidth: 1 }), ticks.map((tick, index) => {
|
|
58
|
+
const tickX = getTickX(tick);
|
|
59
|
+
return (jsxs("g", { children: [showGrid && gridHeight > 0 && (jsx("line", { x1: tickX, y1: y, x2: tickX, y2: y - gridHeight, className: "opacity-80 stroke-[var(--color-border)]", strokeWidth: 1 })), showTicks && (jsx("line", { x1: tickX, y1: y, x2: tickX, y2: y + tickLength, className: "stroke-[var(--color-border)]", strokeWidth: 1 })), jsx(ChartText, { x: tickX, y: y + tickLength + tickPadding, textAnchor: textAnchor, children: formatTick(tick) })] }, index));
|
|
60
|
+
})] }));
|
|
61
|
+
});
|
|
62
|
+
ValueXAxis.displayName = "ValueXAxis";
|
|
63
|
+
|
|
64
|
+
export { ValueXAxis };
|
|
@@ -7,7 +7,7 @@ import { ChartText } from '../ChartText/ChartText.js';
|
|
|
7
7
|
* XAxis component for charts
|
|
8
8
|
* Renders horizontal axis with labels and optional tick marks
|
|
9
9
|
*/
|
|
10
|
-
const XAxis = React__default.memo(({ data, x, y, width, categoryWidth, categoryGap = 0, show = true, className,
|
|
10
|
+
const XAxis = React__default.memo(({ data, x, y, width, categoryWidth, categoryGap = 0, show = true, className, showTicks = true, tickLength = 6, tickPadding = 12, textAnchor = "middle", labelRotation = 0, labelFormatter, maxLabelWidth = 100, alignWithEdge = false, }) => {
|
|
11
11
|
if (!show)
|
|
12
12
|
return null;
|
|
13
13
|
const formatLabel = (item, index) => {
|
|
@@ -8,7 +8,7 @@ import { generateNiceTicks } from '../../utils/chart-validation.js';
|
|
|
8
8
|
* YAxis component for charts
|
|
9
9
|
* Renders vertical axis with labels, optional tick marks, and grid lines
|
|
10
10
|
*/
|
|
11
|
-
const YAxis = React__default.memo(({ min, max, tickCount = 5, x, y, height, show = true, className,
|
|
11
|
+
const YAxis = React__default.memo(({ min, max, tickCount = 5, x, y, height, show = true, className, showTicks = true, tickLength = 6, tickPadding = 8, textAnchor = "end", tickFormatter, showGrid = false, gridWidth = 0, gridClassName, ticks: customTicks, }) => {
|
|
12
12
|
if (!show)
|
|
13
13
|
return null;
|
|
14
14
|
// Generate tick values using Heckbert's nice numbers algorithm
|
|
@@ -48,7 +48,7 @@ const YAxis = React__default.memo(({ min, max, tickCount = 5, x, y, height, show
|
|
|
48
48
|
};
|
|
49
49
|
return (jsxs("g", { className: cn("chart-y-axis", className), children: [jsx("line", { x1: x, y1: y, x2: x, y2: y + height, className: "stroke-[var(--color-border)]", strokeWidth: 1 }), ticks.map((tick, index) => {
|
|
50
50
|
const tickY = getTickY(tick);
|
|
51
|
-
return (jsxs("g", { children: [showGrid && gridWidth > 0 && (jsx("line", { x1: x, y1: tickY, x2: x + gridWidth, y2: tickY, className: "opacity-80 stroke-[var(--color-border)]", strokeWidth: 1 })), showTicks && (jsx("line", { x1: x - tickLength, y1: tickY, x2: x, y2: tickY, className: "stroke-[var(--color-border)]", strokeWidth: 1 })), jsx(ChartText, { x: x - tickLength - tickPadding, y: tickY, textAnchor: textAnchor, dominantBaseline: "middle", children: formatTick(tick) })] }, index));
|
|
51
|
+
return (jsxs("g", { children: [showGrid && gridWidth > 0 && (jsx("line", { x1: x, y1: tickY, x2: x + gridWidth, y2: tickY, className: cn("opacity-80 stroke-[var(--color-border)]", gridClassName), strokeWidth: 1 })), showTicks && (jsx("line", { x1: x - tickLength, y1: tickY, x2: x, y2: tickY, className: "stroke-[var(--color-border)]", strokeWidth: 1 })), jsx(ChartText, { x: x - tickLength - tickPadding, y: tickY, textAnchor: textAnchor, dominantBaseline: "middle", children: formatTick(tick) })] }, index));
|
|
52
52
|
})] }));
|
|
53
53
|
});
|
|
54
54
|
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
export { XAxis } from './XAxis';
|
|
2
2
|
export { YAxis } from './YAxis';
|
|
3
|
-
export
|
|
3
|
+
export { ValueXAxis } from './ValueXAxis';
|
|
4
|
+
export { CategoryYAxis } from './CategoryYAxis';
|
|
5
|
+
export type { BaseAxisProps, XAxisProps, YAxisProps, ValueXAxisProps, CategoryYAxisProps, AxisTickProps, } from './ChartAxis.types';
|
|
@@ -12,8 +12,6 @@ export interface HorizontalGridProps {
|
|
|
12
12
|
lineCount?: number;
|
|
13
13
|
/** Whether to show the grid */
|
|
14
14
|
show?: boolean;
|
|
15
|
-
/** Grid line color */
|
|
16
|
-
color?: string;
|
|
17
15
|
/** Additional CSS classes */
|
|
18
16
|
className?: string;
|
|
19
17
|
/** Custom tick positions (overrides lineCount) */
|
|
@@ -5,7 +5,7 @@ import { cn } from '../../../../utils/cn.js';
|
|
|
5
5
|
* HorizontalGrid component for charts
|
|
6
6
|
* Renders horizontal grid lines at specified intervals
|
|
7
7
|
*/
|
|
8
|
-
const HorizontalGrid = ({ x, y, width, height, lineCount = 5, show = true,
|
|
8
|
+
const HorizontalGrid = ({ x, y, width, height, lineCount = 5, show = true, className, tickPositions, }) => {
|
|
9
9
|
if (!show)
|
|
10
10
|
return null;
|
|
11
11
|
// Generate grid line positions
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface VerticalGridProps {
|
|
3
|
+
/** X position to start the grid */
|
|
4
|
+
x: number;
|
|
5
|
+
/** Y position to start the grid */
|
|
6
|
+
y: number;
|
|
7
|
+
/** Width of the grid area */
|
|
8
|
+
width: number;
|
|
9
|
+
/** Height of the grid area */
|
|
10
|
+
height: number;
|
|
11
|
+
/** Number of grid lines */
|
|
12
|
+
lineCount?: number;
|
|
13
|
+
/** Whether to show the grid */
|
|
14
|
+
show?: boolean;
|
|
15
|
+
/** Additional CSS classes */
|
|
16
|
+
className?: string;
|
|
17
|
+
/** Custom tick positions (overrides lineCount) */
|
|
18
|
+
tickPositions?: number[];
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* VerticalGrid component for charts
|
|
22
|
+
* Renders vertical grid lines at specified intervals — the mirror of HorizontalGrid,
|
|
23
|
+
* for charts whose VALUE axis runs horizontally (e.g. HorizontalBarChart), where the
|
|
24
|
+
* reference lines a reader traces are vertical.
|
|
25
|
+
*
|
|
26
|
+
* Deliberately has NO `color` prop: the line is themed via `stroke-[var(--color-border)]`.
|
|
27
|
+
* Don't add one here without wiring it up.
|
|
28
|
+
*/
|
|
29
|
+
export declare const VerticalGrid: React.FC<VerticalGridProps>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { cn } from '../../../../utils/cn.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* VerticalGrid component for charts
|
|
6
|
+
* Renders vertical grid lines at specified intervals — the mirror of HorizontalGrid,
|
|
7
|
+
* for charts whose VALUE axis runs horizontally (e.g. HorizontalBarChart), where the
|
|
8
|
+
* reference lines a reader traces are vertical.
|
|
9
|
+
*
|
|
10
|
+
* Deliberately has NO `color` prop: the line is themed via `stroke-[var(--color-border)]`.
|
|
11
|
+
* Don't add one here without wiring it up.
|
|
12
|
+
*/
|
|
13
|
+
const VerticalGrid = ({ x, y, width, height, lineCount = 5, show = true, className, tickPositions, }) => {
|
|
14
|
+
if (!show)
|
|
15
|
+
return null;
|
|
16
|
+
// Generate grid line positions
|
|
17
|
+
const positions = tickPositions ||
|
|
18
|
+
Array.from({ length: lineCount }, (_, i) => {
|
|
19
|
+
if (lineCount <= 1)
|
|
20
|
+
return x;
|
|
21
|
+
return x + (i * width) / (lineCount - 1);
|
|
22
|
+
});
|
|
23
|
+
return (jsx("g", { className: cn("chart-vertical-grid", className), children: positions.map((lineX, index) => (jsx("line", { x1: lineX, y1: y, x2: lineX, y2: y + height, className: "opacity-80 stroke-[var(--color-border)]", strokeWidth: 1 }, index))) }));
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export { VerticalGrid };
|
|
@@ -16,7 +16,13 @@ const ChartMarker = ({ cx, cy, radius, colorClass, className, strokeWidth = 2, f
|
|
|
16
16
|
const currentRadius = isHovered ? radius * 1.1 : radius;
|
|
17
17
|
return (jsx("g", { className: "chart-marker", children: jsx("circle", { cx: cx, cy: cy, r: currentRadius, className: baseClasses, fill: fillColor || "white", stroke: strokeColor, strokeWidth: strokeWidth, onMouseEnter: () => setIsHovered(true), onMouseLeave: () => setIsHovered(false), style: {
|
|
18
18
|
transition: 'linear 0.2s ease-out',
|
|
19
|
-
cursor: 'pointer'
|
|
19
|
+
cursor: 'pointer',
|
|
20
|
+
// `fill-white`/`stroke-2` in the theme's baseStyle are CSS class rules, which
|
|
21
|
+
// beat the `fill`/`stroke` presentation attributes below in the cascade — so an
|
|
22
|
+
// explicit fillColor/strokeColor prop needs inline style (highest specificity)
|
|
23
|
+
// to actually take effect, not just the attribute.
|
|
24
|
+
...(fillColor ? { fill: fillColor } : {}),
|
|
25
|
+
...(strokeColor ? { stroke: strokeColor } : {}),
|
|
20
26
|
} }) }));
|
|
21
27
|
};
|
|
22
28
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Uses fixed Tailwind styling for consistency across charts
|
|
4
4
|
*/
|
|
5
5
|
const chartTextTheme = {
|
|
6
|
-
baseStyle: "transition-all duration-
|
|
6
|
+
baseStyle: "transition-all duration-[var(--motion-duration-base)] text-xs text-[var(--color-text-secondary)]/80 fill-[var(--color-text-secondary)]/80 font-medium select-none",
|
|
7
7
|
};
|
|
8
8
|
|
|
9
9
|
export { chartTextTheme };
|
|
@@ -4,4 +4,4 @@ export { ChartMarker } from './ChartMarker';
|
|
|
4
4
|
export { HorizontalGrid } from './ChartGrid';
|
|
5
5
|
export { ChartText } from './ChartText';
|
|
6
6
|
export { XAxis, YAxis } from './ChartAxis';
|
|
7
|
-
export { ChartTooltip } from '
|
|
7
|
+
export { ChartTooltip } from '../../core/shared/ChartTooltip';
|
|
@@ -5,23 +5,21 @@
|
|
|
5
5
|
const chartTheme = {
|
|
6
6
|
baseStyle: {
|
|
7
7
|
colors: {
|
|
8
|
-
//
|
|
8
|
+
// Categorical series palette — dedicated chart-N tokens, decoupled
|
|
9
|
+
// from the semantic status colors (primary/success/warning/danger).
|
|
9
10
|
series: [
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"fill-[var(--color-warning-400)] stroke-[var(--color-warning-400)]", // Warning lighter
|
|
16
|
-
"fill-[var(--color-success-400)] stroke-[var(--color-success-400)]", // Success lighter
|
|
17
|
-
"fill-[var(--color-danger-400)] stroke-[var(--color-danger-400)]", // Danger lighter
|
|
11
|
+
"var(--color-chart-1)",
|
|
12
|
+
"var(--color-chart-2)",
|
|
13
|
+
"var(--color-chart-3)",
|
|
14
|
+
"var(--color-chart-4)",
|
|
15
|
+
"var(--color-chart-5)",
|
|
18
16
|
],
|
|
19
17
|
// Chart infrastructure colors
|
|
20
18
|
grid: "stroke-[var(--color-border)]",
|
|
21
19
|
axis: "stroke-[var(--color-border)]",
|
|
22
20
|
text: "fill-[var(--color-text-secondary)]",
|
|
23
21
|
background: "fill-[var(--color-background)]",
|
|
24
|
-
hover: "fill-[var(--color-
|
|
22
|
+
hover: "fill-[var(--color-surface)]",
|
|
25
23
|
disabled: "fill-[var(--color-background-disabled)]",
|
|
26
24
|
},
|
|
27
25
|
opacity: {
|
|
@@ -30,31 +28,28 @@ const chartTheme = {
|
|
|
30
28
|
disabled: "opacity-50",
|
|
31
29
|
},
|
|
32
30
|
transitions: {
|
|
33
|
-
default: "transition-all duration-
|
|
34
|
-
hover: "transition-all duration-
|
|
31
|
+
default: "transition-all duration-[var(--motion-duration-base)]",
|
|
32
|
+
hover: "transition-all duration-[var(--motion-duration-fast)]",
|
|
35
33
|
},
|
|
36
34
|
},
|
|
37
35
|
variants: {
|
|
38
36
|
default: {
|
|
39
37
|
colors: [
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"fill-[var(--color-warning-400)] stroke-[var(--color-warning-400)]",
|
|
46
|
-
"fill-[var(--color-success-400)] stroke-[var(--color-success-400)]",
|
|
47
|
-
"fill-[var(--color-danger-400)] stroke-[var(--color-danger-400)]",
|
|
38
|
+
"var(--color-chart-1)",
|
|
39
|
+
"var(--color-chart-2)",
|
|
40
|
+
"var(--color-chart-3)",
|
|
41
|
+
"var(--color-chart-4)",
|
|
42
|
+
"var(--color-chart-5)",
|
|
48
43
|
],
|
|
49
44
|
},
|
|
50
45
|
minimal: {
|
|
51
46
|
colors: [
|
|
52
|
-
"fill-[var(--color-
|
|
53
|
-
"fill-[var(--color-
|
|
54
|
-
"fill-[var(--color-
|
|
55
|
-
"fill-[var(--color-
|
|
56
|
-
"fill-[var(--color-
|
|
57
|
-
"fill-[var(--color-
|
|
47
|
+
"fill-[var(--color-mono-600)] stroke-[var(--color-mono-600)]",
|
|
48
|
+
"fill-[var(--color-mono-500)] stroke-[var(--color-mono-500)]",
|
|
49
|
+
"fill-[var(--color-mono-400)] stroke-[var(--color-mono-400)]",
|
|
50
|
+
"fill-[var(--color-mono-300)] stroke-[var(--color-mono-300)]",
|
|
51
|
+
"fill-[var(--color-mono-700)] stroke-[var(--color-mono-700)]",
|
|
52
|
+
"fill-[var(--color-mono-800)] stroke-[var(--color-mono-800)]",
|
|
58
53
|
],
|
|
59
54
|
},
|
|
60
55
|
gradient: {
|
|
@@ -52,8 +52,6 @@ export declare const CHART_DEFAULTS: {
|
|
|
52
52
|
readonly showYAxis: true;
|
|
53
53
|
readonly barRadius: 32;
|
|
54
54
|
readonly dotRadius: 3;
|
|
55
|
-
readonly cellRadius: 4;
|
|
56
|
-
readonly radius: 20;
|
|
57
55
|
readonly strokeWidth: 2;
|
|
58
56
|
readonly gap: 4;
|
|
59
57
|
readonly categoryGap: 16;
|
|
@@ -62,7 +60,6 @@ export declare const CHART_DEFAULTS: {
|
|
|
62
60
|
readonly fillOpacity: 0.3;
|
|
63
61
|
readonly showStroke: true;
|
|
64
62
|
readonly showDots: false;
|
|
65
|
-
readonly orientation: "vertical" | "horizontal";
|
|
66
63
|
readonly stacked: false;
|
|
67
64
|
readonly variant: ChartVariant;
|
|
68
65
|
readonly enableKeyboardNavigation: true;
|
|
@@ -93,10 +90,18 @@ export interface StandardChartDisplayProps {
|
|
|
93
90
|
variant?: ChartVariant;
|
|
94
91
|
theme?: ChartThemeOverrides;
|
|
95
92
|
}
|
|
93
|
+
/**
|
|
94
|
+
* The union of every chart's visual props.
|
|
95
|
+
*
|
|
96
|
+
* 🔴 Narrow this with `Omit` per chart — never `extends StandardVisualProps` wholesale.
|
|
97
|
+
* Doing so advertises other charts' props: they type-check, reach the generative schema,
|
|
98
|
+
* and do nothing. `BaseChartProps` does not extend HTMLAttributes, so they can't even be
|
|
99
|
+
* forwarded via `{...props}` — they land on a <div> as unknown attributes. Add a prop
|
|
100
|
+
* back to a chart only alongside an implementation that reads it.
|
|
101
|
+
*/
|
|
96
102
|
export interface StandardVisualProps {
|
|
97
103
|
barRadius?: number;
|
|
98
104
|
dotRadius?: number;
|
|
99
|
-
cellRadius?: number;
|
|
100
105
|
radius?: number;
|
|
101
106
|
strokeWidth?: number;
|
|
102
107
|
gap?: number;
|
|
@@ -108,7 +113,6 @@ export interface StandardVisualProps {
|
|
|
108
113
|
stacked?: boolean;
|
|
109
114
|
}
|
|
110
115
|
export interface BarChartSpecificProps {
|
|
111
|
-
orientation?: 'vertical' | 'horizontal';
|
|
112
116
|
categoryGap?: number;
|
|
113
117
|
}
|
|
114
118
|
export interface StandardAxisConfig {
|
|
@@ -14,10 +14,8 @@ const CHART_DEFAULTS = {
|
|
|
14
14
|
// Visual properties
|
|
15
15
|
barRadius: 32, // For bar corners (rounded top)
|
|
16
16
|
dotRadius: 3, // For line/area dot markers
|
|
17
|
-
cellRadius: 4, // For heatmap cells
|
|
18
|
-
radius: 20, // @deprecated Use barRadius, dotRadius, or cellRadius instead
|
|
19
17
|
strokeWidth: 2,
|
|
20
|
-
gap: 4, // For bars
|
|
18
|
+
gap: 4, // For bars
|
|
21
19
|
categoryGap: 16, // For bar categories
|
|
22
20
|
// Line/Area specific
|
|
23
21
|
curved: true,
|
|
@@ -25,12 +23,8 @@ const CHART_DEFAULTS = {
|
|
|
25
23
|
fillOpacity: 0.3,
|
|
26
24
|
showStroke: true,
|
|
27
25
|
showDots: false,
|
|
28
|
-
// Bar specific
|
|
29
|
-
orientation: 'vertical',
|
|
30
26
|
// Layout
|
|
31
27
|
stacked: false,
|
|
32
|
-
// Theme
|
|
33
|
-
variant: 'default',
|
|
34
28
|
// Accessibility
|
|
35
29
|
enableKeyboardNavigation: true,
|
|
36
30
|
};
|
|
@@ -132,10 +132,6 @@ export declare const CIRCULAR_CHART_ANIMATIONS: {
|
|
|
132
132
|
export declare const CROSSHAIR_FADE_TRANSITION: Transition;
|
|
133
133
|
/** Crosshair line tracking the pointer between data points. */
|
|
134
134
|
export declare const CROSSHAIR_FOLLOW_TRANSITION: Transition;
|
|
135
|
-
/** Tooltip pop-in: springy position/scale with a quick opacity/scale settle. */
|
|
136
|
-
export declare const TOOLTIP_ENTER_TRANSITION: Transition;
|
|
137
|
-
/** Tooltip pop-out. */
|
|
138
|
-
export declare const TOOLTIP_EXIT_TRANSITION: Transition;
|
|
139
135
|
/** Circular-chart segment hover dim/lift (opacity fade + scale pop). */
|
|
140
136
|
export declare const SEGMENT_HOVER_TRANSITION: Transition;
|
|
141
137
|
/** Rise/draw duration for line & area entrances (and the shared LineRenderer). */
|
|
@@ -150,9 +146,6 @@ export declare const STACKED_BAR_STAGGER = 0.08;
|
|
|
150
146
|
export declare const BAR_STACK_CATEGORY_DELAY = 0.25;
|
|
151
147
|
/** Shared BarRenderer stacked-mode per-segment stagger. */
|
|
152
148
|
export declare const BAR_STACK_SEGMENT_STAGGER = 0.12;
|
|
153
|
-
/** ScatterPlot per-point stagger + grow duration. */
|
|
154
|
-
export declare const SCATTER_POINT_STAGGER = 0.01;
|
|
155
|
-
export declare const SCATTER_POINT_DURATION = 0.3;
|
|
156
149
|
/** Marker pop-in spring (line/area dots). */
|
|
157
150
|
export declare const DOT_SPRING: {
|
|
158
151
|
type: "spring";
|
|
@@ -204,3 +197,15 @@ export declare function barEntranceTransition(delay: number, hasAnimated: boolea
|
|
|
204
197
|
* `barEntranceTransition`.
|
|
205
198
|
*/
|
|
206
199
|
export declare function stackedSegmentTransition(delay: number, hasAnimated: boolean): Transition;
|
|
200
|
+
/** Heatmap cell fade-in duration (seconds). */
|
|
201
|
+
export declare const HEATMAP_CELL_FADE_DURATION = 0.35;
|
|
202
|
+
/** Per-diagonal stagger for the heatmap cell entrance (seconds). */
|
|
203
|
+
export declare const HEATMAP_CELL_STAGGER = 0.02;
|
|
204
|
+
/** Cap on the entrance stagger, so a large grid still settles quickly (seconds). */
|
|
205
|
+
export declare const HEATMAP_CELL_MAX_DELAY = 0.3;
|
|
206
|
+
/** Deterministic entrance delay for the cell at (row, col). */
|
|
207
|
+
export declare function heatmapCellDelay(row: number, col: number): number;
|
|
208
|
+
/** Cell hover scale-up (`whileHover`). */
|
|
209
|
+
export declare const HEATMAP_CELL_HOVER_TRANSITION: Transition;
|
|
210
|
+
/** Cell press scale-down (`whileTap`). */
|
|
211
|
+
export declare const HEATMAP_CELL_TAP_TRANSITION: Transition;
|