@flikk/ui 1.0.0-beta.31 → 1.0.0-beta.33
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 +497 -22
- 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/CodeBlock/CodeBlock.theme.js +1 -1
- package/dist/components/ai/PromptInput/PromptInput.js +2 -2
- package/dist/components/ai/PromptInput/PromptInput.theme.js +2 -2
- package/dist/components/ai/PromptSuggestion/PromptSuggestion.theme.js +2 -2
- package/dist/components/ai/Reasoning/Reasoning.js +27 -3
- 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 +58 -5
- 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 +2 -1
- package/dist/components/ai/StreamingResponse/AnimatedText.d.ts +7 -0
- package/dist/components/ai/StreamingResponse/AnimatedText.js +8 -7
- 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 +13 -7
- 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.theme.js +1 -1
- package/dist/components/ai/index.d.ts +3 -2
- package/dist/components/ai/index.js +4 -0
- package/dist/components/canvas/BaseNode.js +1 -1
- package/dist/components/canvas/CanvasToolbar.js +0 -1
- package/dist/components/canvas/Edge.js +2 -2
- package/dist/components/canvas/NodeControls.js +0 -1
- package/dist/components/canvas/NodeRenderer.js +2 -2
- package/dist/components/charts/ActivityRings/ActivityRings.js +2 -2
- package/dist/components/charts/ActivityRings/ActivityRings.theme.js +1 -1
- package/dist/components/charts/AreaChart/AreaChart.js +3 -3
- package/dist/components/charts/AreaChart/AreaChart.theme.js +3 -3
- package/dist/components/charts/BarChart/BarChart.js +4 -4
- package/dist/components/charts/ComboChart/BarRenderer.js +2 -2
- package/dist/components/charts/ComboChart/BarRenderer.types.d.ts +1 -1
- package/dist/components/charts/ComboChart/ComboChartCanvas.js +1 -1
- package/dist/components/charts/ComboChart/LineRenderer.js +1 -1
- 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.js +1 -1
- package/dist/components/charts/LineChart/LineChart.js +2 -2
- package/dist/components/charts/LollipopChart/LollipopChart.js +1 -1
- package/dist/components/charts/RadarChart/RadarChart.js +1 -1
- package/dist/components/charts/StackedBarChart/StackedBarChart.js +3 -3
- package/dist/components/charts/hooks/useChartAccessibility.js +9 -6
- package/dist/components/charts/index.d.ts +4 -8
- package/dist/components/charts/index.js +2 -4
- 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 +3 -3
- package/dist/components/charts/utils/animation-utils.d.ts +12 -7
- package/dist/components/charts/utils/animation-utils.js +19 -19
- package/dist/components/core/Accordion/Accordion.theme.js +1 -1
- package/dist/components/core/Alert/Alert.animations.d.ts +11 -4
- package/dist/components/core/Alert/Alert.animations.js +11 -4
- package/dist/components/core/Alert/Alert.js +16 -2
- 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.theme.js +1 -1
- package/dist/components/core/Badge/Badge.animations.d.ts +0 -5
- package/dist/components/core/Badge/Badge.animations.js +5 -84
- package/dist/components/core/Badge/Badge.d.ts +7 -4
- package/dist/components/core/Badge/Badge.js +27 -64
- package/dist/components/core/Badge/Badge.theme.js +8 -12
- package/dist/components/core/Badge/Badge.types.d.ts +18 -34
- package/dist/components/core/Breadcrumbs/Breadcrumbs.theme.js +4 -4
- package/dist/components/core/Button/Button.js +7 -43
- package/dist/components/core/Button/Button.theme.js +5 -5
- package/dist/components/core/Button/Button.types.d.ts +8 -12
- package/dist/components/core/Button/index.d.ts +0 -2
- package/dist/components/core/Calendar/Calendar.theme.js +1 -1
- 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 +29 -1
- 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/CardHeader.js +4 -1
- 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/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 +21 -8
- package/dist/components/core/DragDrop/DragDrop.theme.js +2 -2
- package/dist/components/core/Drawer/Drawer.theme.js +1 -1
- package/dist/components/core/Drawer/DrawerHeader.js +0 -1
- package/dist/components/core/Dropdown/DropdownMenu.js +22 -7
- package/dist/components/core/Link/Link.js +1 -1
- 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 +2 -0
- package/dist/components/core/Message/Message.theme.js +3 -3
- 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.js +5 -1
- package/dist/components/core/Modal/Modal.theme.js +1 -1
- package/dist/components/core/Modal/ModalHeader.js +0 -1
- package/dist/components/core/ModalStack/ModalStackModal.js +3 -1
- package/dist/components/core/NavItem/NavItem.js +3 -2
- package/dist/components/core/NavItem/NavItem.theme.js +1 -1
- package/dist/components/core/OfflineIndicator/OfflineIndicator.theme.js +4 -2
- package/dist/components/core/PageHeading/PageHeading.theme.js +1 -1
- package/dist/components/core/Pagination/Pagination.theme.js +2 -2
- package/dist/components/core/Pill/Pill.js +34 -18
- package/dist/components/core/Pill/Pill.theme.js +4 -2
- package/dist/components/core/Pill/Pill.types.d.ts +14 -1
- 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.theme.js +1 -1
- 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 +3 -3
- 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/SidebarContent.js +1 -1
- package/dist/components/core/Sidebar/SidebarHeader.js +1 -1
- package/dist/components/core/Sidebar/SidebarSearch.js +2 -2
- package/dist/components/core/Sidebar/SidebarToggle.js +1 -1
- package/dist/components/core/Sidebar/SidebarUserProfile.js +1 -1
- package/dist/components/core/SlidingNumber/SlidingNumber.d.ts +8 -0
- package/dist/components/core/SlidingNumber/SlidingNumber.js +12 -3
- 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.theme.js +1 -1
- package/dist/components/core/Toast/ToastProvider.js +1 -1
- 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/data-display/GanttChart/GanttChart.theme.js +6 -6
- package/dist/components/data-display/GanttChart/GanttTaskBar.js +1 -1
- package/dist/components/data-display/GanttChart/GanttTimelineHeader.js +1 -1
- package/dist/components/data-display/GanttChart/GanttToolbar.js +0 -1
- package/dist/components/data-display/KPI/KPI.js +11 -20
- package/dist/components/data-display/KPI/KPI.theme.js +8 -4
- package/dist/components/data-display/Metric/Metric.theme.js +4 -4
- package/dist/components/data-display/Table/Table.theme.js +2 -2
- package/dist/components/data-display/Table/TableColumnManager.js +1 -2
- package/dist/components/data-display/Table/TableContext.js +1 -0
- package/dist/components/data-display/Table/TableFilter.js +9 -2
- package/dist/components/data-display/Table/TableSelectionHeader.js +1 -1
- package/dist/components/data-display/Timeline/Timeline.theme.js +1 -1
- package/dist/components/effects/CustomCursor/CustomCursor.d.ts +1 -1
- package/dist/components/effects/CustomCursor/CustomCursor.js +1 -1
- package/dist/components/effects/CustomCursor/CustomCursor.theme.js +4 -4
- 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.theme.js +1 -1
- package/dist/components/forms/ColorPicker/ColorPicker.js +45 -3
- package/dist/components/forms/ColorPicker/ColorPickerBody.js +8 -4
- package/dist/components/forms/ColorPicker/ColorPickerHeader.js +1 -1
- package/dist/components/forms/ColorPicker/ColorPickerImage.js +1 -1
- package/dist/components/forms/Combobox/Combobox.js +10 -4
- package/dist/components/forms/Combobox/Combobox.theme.js +9 -0
- package/dist/components/forms/Combobox/Combobox.types.d.ts +13 -0
- package/dist/components/forms/DatePicker/DatePicker.js +19 -12
- package/dist/components/forms/DatePicker/DatePicker.theme.js +5 -0
- package/dist/components/forms/DatePicker/DatePicker.types.d.ts +8 -0
- package/dist/components/forms/DatePicker/DatePickerContext.d.ts +0 -1
- package/dist/components/forms/DatePicker/DatePickerTrigger.js +5 -3
- package/dist/components/forms/DateRangePicker/DateRangePicker.theme.js +6 -1
- package/dist/components/forms/DateRangePicker/DateRangePicker.types.d.ts +8 -0
- package/dist/components/forms/DateRangePicker/DateRangePickerContext.js +1 -0
- package/dist/components/forms/DateRangePicker/DateRangePickerTrigger.js +5 -3
- package/dist/components/forms/FileUpload/FileUpload.theme.js +2 -2
- package/dist/components/forms/FileUpload/FileUploadProgress.theme.js +1 -1
- package/dist/components/forms/Input/Input.js +17 -12
- package/dist/components/forms/Input/Input.theme.js +10 -0
- package/dist/components/forms/Input/Input.types.d.ts +14 -0
- package/dist/components/forms/InputAddress/InputAddress.js +5 -5
- package/dist/components/forms/InputAddress/InputAddress.types.d.ts +9 -2
- package/dist/components/forms/InputCounter/InputCounter.js +194 -17
- package/dist/components/forms/InputCounter/InputCounter.theme.d.ts +12 -0
- package/dist/components/forms/InputCounter/InputCounter.theme.js +92 -2
- package/dist/components/forms/InputCounter/InputCounter.types.d.ts +47 -4
- package/dist/components/forms/InputCreditCard/InputCreditCard.js +4 -4
- package/dist/components/forms/InputCreditCard/InputCreditCard.types.d.ts +7 -0
- package/dist/components/forms/Mention/Mention.js +13 -11
- package/dist/components/forms/Radio/Radio.theme.js +1 -1
- package/dist/components/forms/RichTextEditor/RichTextEditor.d.ts +12 -16
- package/dist/components/forms/RichTextEditor/RichTextEditor.js +174 -1680
- 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.js +19 -12
- package/dist/components/forms/Select/Select.theme.js +9 -1
- package/dist/components/forms/Select/Select.types.d.ts +86 -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.js +2 -1
- package/dist/components/forms/SelectableCard/SelectableCard.theme.js +1 -1
- package/dist/components/forms/Switch/Switch.theme.js +2 -2
- package/dist/components/forms/Textarea/Textarea.js +14 -25
- package/dist/components/forms/TimePicker/TimePicker.theme.js +10 -1
- package/dist/components/forms/TimePicker/TimePicker.types.d.ts +11 -0
- package/dist/components/forms/TimePicker/TimePickerTrigger.js +7 -5
- package/dist/components/forms/forms.theme.d.ts +57 -0
- package/dist/components/forms/forms.theme.js +102 -13
- package/dist/components/forms/index.js +1 -0
- 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 +11 -10
- package/dist/components/generative/schema.generated.js +199 -293
- 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 +199 -293
- package/dist/index.js +1 -4
- package/dist/registry.json +2765 -2450
- package/dist/shadcn-compat.css +5 -5
- 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/themes/precision.css +232 -0
- package/dist/tools.json +200 -295
- package/dist/utils/composeEventHandlers.d.ts +19 -0
- package/dist/utils/composeEventHandlers.js +26 -0
- package/dist/utils/composeEventHandlers.test.d.ts +1 -0
- package/dist/utils/index.d.ts +1 -1
- package/package.json +31 -1
- package/src/global.scss +21 -28
- package/src/styles/theme.css +157 -50
- package/src/styles/theme.test.ts +119 -0
- package/tailwind.preset.cjs +30 -20
- 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 -208
- 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 -60
- package/dist/components/charts/ScatterPlot/ScatterPlot.types.js +0 -19
- 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/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,10 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { useState,
|
|
2
|
+
import { useState, useId, useCallback, useMemo } from 'react';
|
|
3
3
|
|
|
4
4
|
function useChartAccessibility({ chartType, data, config, title, description, enableKeyboardNavigation = true, }) {
|
|
5
5
|
const [focusedElementIndex, setFocusedElementIndex] = useState(-1);
|
|
6
6
|
const [isKeyboardMode, setIsKeyboardMode] = useState(false);
|
|
7
|
-
|
|
7
|
+
// useId() (never Math.random()) — the id is rendered into markup on both the
|
|
8
|
+
// sr-only element and the container's aria-describedby, so a per-render
|
|
9
|
+
// random value mismatches across hydration.
|
|
10
|
+
const descriptionId = useId();
|
|
8
11
|
// Generate chart summary for screen readers
|
|
9
12
|
const generateChartSummary = useCallback(() => {
|
|
10
13
|
var _a;
|
|
@@ -102,16 +105,16 @@ function useChartAccessibility({ chartType, data, config, title, description, en
|
|
|
102
105
|
const chartAccessibilityProps = useMemo(() => ({
|
|
103
106
|
role: 'img',
|
|
104
107
|
'aria-label': ariaLabel,
|
|
105
|
-
'aria-describedby': description ? descriptionId
|
|
108
|
+
'aria-describedby': description ? descriptionId : undefined,
|
|
106
109
|
tabIndex: enableKeyboardNavigation ? 0 : -1,
|
|
107
110
|
onKeyDown: handleKeyDown,
|
|
108
|
-
}), [ariaLabel, description, enableKeyboardNavigation, handleKeyDown]);
|
|
111
|
+
}), [ariaLabel, description, descriptionId, enableKeyboardNavigation, handleKeyDown]);
|
|
109
112
|
// Description element props
|
|
110
113
|
const descriptionProps = useMemo(() => description ? {
|
|
111
|
-
id: descriptionId
|
|
114
|
+
id: descriptionId,
|
|
112
115
|
className: 'sr-only',
|
|
113
116
|
children: description,
|
|
114
|
-
} : null, [description]);
|
|
117
|
+
} : null, [description, descriptionId]);
|
|
115
118
|
return {
|
|
116
119
|
chartAccessibilityProps,
|
|
117
120
|
descriptionProps,
|
|
@@ -7,13 +7,11 @@ export { AreaChart } from "./AreaChart";
|
|
|
7
7
|
export { DonutChart } from "./DonutChart/DonutChart";
|
|
8
8
|
export { MultiSegmentDonutChart } from "./DonutChart/MultiSegmentDonutChart";
|
|
9
9
|
export { Heatmap } from "./Heatmap";
|
|
10
|
-
export { FunnelChart } from "./FunnelChart";
|
|
11
|
-
export { ScatterPlot } from "./ScatterPlot";
|
|
12
10
|
export { RadarChart } from "./RadarChart";
|
|
13
11
|
export { ComboChart } from "./ComboChart";
|
|
14
12
|
export { ActivityRings } from "./ActivityRings";
|
|
15
13
|
export { LollipopChart } from "./LollipopChart";
|
|
16
|
-
export { ChartTooltip } from "
|
|
14
|
+
export { ChartTooltip } from "../core/shared/ChartTooltip";
|
|
17
15
|
export { ChartLegend } from "./shared/ChartLegend";
|
|
18
16
|
export { XAxis, YAxis } from "./shared/ChartAxis";
|
|
19
17
|
export { ChartText } from "./shared/ChartText";
|
|
@@ -25,9 +23,9 @@ export { useTooltipPosition } from "./hooks/useTooltipPosition";
|
|
|
25
23
|
export { useChartAccessibility } from "./hooks/useChartAccessibility";
|
|
26
24
|
export { useChartValidation } from "./hooks/useChartValidation";
|
|
27
25
|
export { generateColorPalette, getContrastColor } from "./utils/color-utils";
|
|
28
|
-
export { processHeatmapData, calculateIntensity, createGridMatrix, getDefaultTooltipContent, formatAxisLabel,
|
|
26
|
+
export { processHeatmapData, calculateIntensity, createGridMatrix, getDefaultTooltipContent, formatAxisLabel, } from "./Heatmap/utils/heatmapUtils";
|
|
29
27
|
export type { ChartDataPoint, ChartConfig, ChartVariant, CurveType, ChartLegendPosition, BaseChartProps, StandardChartDisplayProps, StandardVisualProps, BarChartSpecificProps, StandardAxisConfig, ChartThemeOverrides, CHART_DEFAULTS, } from "./types/chart.types";
|
|
30
|
-
export type { ChartTooltipProps, ChartTooltipContentProps, } from "
|
|
28
|
+
export type { ChartTooltipProps, ChartTooltipContentProps, } from "../core/shared/ChartTooltip/ChartTooltip.types";
|
|
31
29
|
export type { ChartLegendProps, ChartLegendItem, } from "./shared/ChartLegend/ChartLegend.types";
|
|
32
30
|
export type { BaseAxisProps, XAxisProps, YAxisProps, AxisTickProps, } from "./shared/ChartAxis/ChartAxis.types";
|
|
33
31
|
export type { ChartTextProps, ChartTextTheme, } from "./shared/ChartText/ChartText.types";
|
|
@@ -41,9 +39,7 @@ export type { LineChartProps } from "./LineChart/LineChart.types";
|
|
|
41
39
|
export type { AreaChartProps } from "./AreaChart/AreaChart.types";
|
|
42
40
|
export type { DonutChartProps } from "./DonutChart/DonutChart.types";
|
|
43
41
|
export type { MultiSegmentDonutChartProps, DonutSegment, } from "./DonutChart/MultiSegmentDonutChart.types";
|
|
44
|
-
export type { HeatmapProps } from "./Heatmap/Heatmap.types";
|
|
45
|
-
export type { FunnelChartProps, FunnelChartDataPoint, } from "./FunnelChart/FunnelChart.types";
|
|
46
|
-
export type { ScatterPlotProps, ScatterPlotDataPoint, } from "./ScatterPlot/ScatterPlot.types";
|
|
42
|
+
export type { HeatmapProps, HeatmapVariant } from "./Heatmap/Heatmap.types";
|
|
47
43
|
export type { RadarChartProps, RadarChartSeries, } from "./RadarChart/RadarChart.types";
|
|
48
44
|
export type { ComboChartProps, ComboChartConfig, SeriesType, } from "./ComboChart/ComboChart.types";
|
|
49
45
|
export type { ActivityRingsProps, RingData, ActivityRingsThemeOverrides, } from "./ActivityRings/ActivityRings.types";
|
|
@@ -12,15 +12,13 @@ export { Heatmap } from './Heatmap/Heatmap.js';
|
|
|
12
12
|
import './Heatmap/HeatmapCell.js';
|
|
13
13
|
import 'react/jsx-runtime';
|
|
14
14
|
import '../../utils/cn.js';
|
|
15
|
-
export { calculateIntensity, createGridMatrix, formatAxisLabel,
|
|
16
|
-
export { FunnelChart } from './FunnelChart/FunnelChart.js';
|
|
17
|
-
export { ScatterPlot } from './ScatterPlot/ScatterPlot.js';
|
|
15
|
+
export { calculateIntensity, createGridMatrix, formatAxisLabel, getDefaultTooltipContent, processHeatmapData } from './Heatmap/utils/heatmapUtils.js';
|
|
18
16
|
export { RadarChart } from './RadarChart/RadarChart.js';
|
|
19
17
|
export { ComboChart } from './ComboChart/ComboChart.js';
|
|
20
18
|
export { ActivityRings } from './ActivityRings/ActivityRings.js';
|
|
21
19
|
export { LollipopChart } from './LollipopChart/LollipopChart.js';
|
|
22
20
|
export { LOLLIPOP_CHART_DEFAULTS } from './LollipopChart/LollipopChart.types.js';
|
|
23
|
-
export { ChartTooltip } from '
|
|
21
|
+
export { ChartTooltip } from '../core/shared/ChartTooltip/ChartTooltip.js';
|
|
24
22
|
export { ChartLegend } from './shared/ChartLegend/ChartLegend.js';
|
|
25
23
|
export { XAxis } from './shared/ChartAxis/XAxis.js';
|
|
26
24
|
export { YAxis } from './shared/ChartAxis/YAxis.js';
|
|
@@ -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';
|
|
@@ -19,7 +19,7 @@ const chartTheme = {
|
|
|
19
19
|
axis: "stroke-[var(--color-border)]",
|
|
20
20
|
text: "fill-[var(--color-text-secondary)]",
|
|
21
21
|
background: "fill-[var(--color-background)]",
|
|
22
|
-
hover: "fill-[var(--color-
|
|
22
|
+
hover: "fill-[var(--color-surface)]",
|
|
23
23
|
disabled: "fill-[var(--color-background-disabled)]",
|
|
24
24
|
},
|
|
25
25
|
opacity: {
|
|
@@ -28,8 +28,8 @@ const chartTheme = {
|
|
|
28
28
|
disabled: "opacity-50",
|
|
29
29
|
},
|
|
30
30
|
transitions: {
|
|
31
|
-
default: "transition-all duration-
|
|
32
|
-
hover: "transition-all duration-
|
|
31
|
+
default: "transition-all duration-[var(--motion-duration-base)]",
|
|
32
|
+
hover: "transition-all duration-[var(--motion-duration-fast)]",
|
|
33
33
|
},
|
|
34
34
|
},
|
|
35
35
|
variants: {
|
|
@@ -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;
|
|
@@ -144,21 +144,6 @@ const CROSSHAIR_FOLLOW_TRANSITION = {
|
|
|
144
144
|
duration: 0.2,
|
|
145
145
|
ease: "easeOut",
|
|
146
146
|
};
|
|
147
|
-
/** Tooltip pop-in: springy position/scale with a quick opacity/scale settle. */
|
|
148
|
-
const TOOLTIP_ENTER_TRANSITION = {
|
|
149
|
-
type: "spring",
|
|
150
|
-
stiffness: 400,
|
|
151
|
-
damping: 30,
|
|
152
|
-
opacity: { duration: 0.15 },
|
|
153
|
-
scale: { duration: 0.15 },
|
|
154
|
-
};
|
|
155
|
-
/** Tooltip pop-out. */
|
|
156
|
-
const TOOLTIP_EXIT_TRANSITION = {
|
|
157
|
-
type: "spring",
|
|
158
|
-
stiffness: 300,
|
|
159
|
-
damping: 25,
|
|
160
|
-
duration: 0.15,
|
|
161
|
-
};
|
|
162
147
|
/** Circular-chart segment hover dim/lift (opacity fade + scale pop). */
|
|
163
148
|
const SEGMENT_HOVER_TRANSITION = {
|
|
164
149
|
scale: { duration: 0.2 },
|
|
@@ -182,9 +167,6 @@ const BAR_GROUP_STAGGER = 0.05;
|
|
|
182
167
|
const BAR_STACK_CATEGORY_DELAY = 0.25;
|
|
183
168
|
/** Shared BarRenderer stacked-mode per-segment stagger. */
|
|
184
169
|
const BAR_STACK_SEGMENT_STAGGER = 0.12;
|
|
185
|
-
/** ScatterPlot per-point stagger + grow duration. */
|
|
186
|
-
const SCATTER_POINT_STAGGER = 0.01;
|
|
187
|
-
const SCATTER_POINT_DURATION = 0.3;
|
|
188
170
|
/** Marker pop-in spring (line/area dots). */
|
|
189
171
|
const DOT_SPRING = { type: "spring", stiffness: 260, damping: 20 };
|
|
190
172
|
/** Bar grow spring (grouped bars / stacked columns). */
|
|
@@ -258,5 +240,23 @@ function stackedSegmentTransition(delay, hasAnimated) {
|
|
|
258
240
|
},
|
|
259
241
|
};
|
|
260
242
|
}
|
|
243
|
+
/* ── Heatmap ───────────────────────────────────────────────────────────────
|
|
244
|
+
* Cells fade in along the (row + col) diagonal. Deterministic on purpose: the
|
|
245
|
+
* delay used to come from Math.random(), which mismatched between the server
|
|
246
|
+
* and client renders and made every snapshot non-reproducible. */
|
|
247
|
+
/** Heatmap cell fade-in duration (seconds). */
|
|
248
|
+
const HEATMAP_CELL_FADE_DURATION = 0.35;
|
|
249
|
+
/** Per-diagonal stagger for the heatmap cell entrance (seconds). */
|
|
250
|
+
const HEATMAP_CELL_STAGGER = 0.02;
|
|
251
|
+
/** Cap on the entrance stagger, so a large grid still settles quickly (seconds). */
|
|
252
|
+
const HEATMAP_CELL_MAX_DELAY = 0.3;
|
|
253
|
+
/** Deterministic entrance delay for the cell at (row, col). */
|
|
254
|
+
function heatmapCellDelay(row, col) {
|
|
255
|
+
return Math.min((row + col) * HEATMAP_CELL_STAGGER, HEATMAP_CELL_MAX_DELAY);
|
|
256
|
+
}
|
|
257
|
+
/** Cell hover scale-up (`whileHover`). */
|
|
258
|
+
const HEATMAP_CELL_HOVER_TRANSITION = { duration: 0.15, ease: "easeOut" };
|
|
259
|
+
/** Cell press scale-down (`whileTap`). */
|
|
260
|
+
const HEATMAP_CELL_TAP_TRANSITION = { duration: 0.1, ease: "easeOut" };
|
|
261
261
|
|
|
262
|
-
export { BAR_GROUP_STAGGER, BAR_SPRING, BAR_STACK_CATEGORY_DELAY, BAR_STACK_SEGMENT_STAGGER, CARTESIAN_ENTRANCE_DURATION, CIRCULAR_CHART_ANIMATIONS, CROSSHAIR_FADE_TRANSITION, CROSSHAIR_FOLLOW_TRANSITION, DOT_SPRING, HALO_FADE_TRANSITION,
|
|
262
|
+
export { BAR_GROUP_STAGGER, BAR_SPRING, BAR_STACK_CATEGORY_DELAY, BAR_STACK_SEGMENT_STAGGER, CARTESIAN_ENTRANCE_DURATION, CIRCULAR_CHART_ANIMATIONS, CROSSHAIR_FADE_TRANSITION, CROSSHAIR_FOLLOW_TRANSITION, DOT_SPRING, HALO_FADE_TRANSITION, HEATMAP_CELL_FADE_DURATION, HEATMAP_CELL_HOVER_TRANSITION, HEATMAP_CELL_MAX_DELAY, HEATMAP_CELL_STAGGER, HEATMAP_CELL_TAP_TRANSITION, LINE_DOT_STAGGER, RING_FADE_TRANSITION, RISE_FROM_BASELINE, SCALE_FROM_CENTER, SEGMENT_HOVER_TRANSITION, SPRING_PRESETS, barEntranceTransition, dotEntranceTransition, getSpringAnimation, getStaggerDelay, heatmapCellDelay, riseTransition, stackedSegmentTransition };
|
|
@@ -8,7 +8,7 @@ const accordionTheme = {
|
|
|
8
8
|
// Item styles for stacked variant (shared borders, no spacing)
|
|
9
9
|
itemStyleStacked: "bg-[var(--color-surface)] border-t border-[var(--color-border)] first-of-type:border-t-0",
|
|
10
10
|
// Trigger styles (shared across variants)
|
|
11
|
-
triggerStyle: "flex w-full gap-3 items-center px-4 py-2.5 text-left font-medium transition-all duration-
|
|
11
|
+
triggerStyle: "flex w-full gap-3 items-center px-4 py-2.5 text-left font-medium transition-all duration-[var(--motion-duration-base)] cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-primary)] focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 text-[var(--color-text-primary)] text-sm",
|
|
12
12
|
// Body styles (shared across variants)
|
|
13
13
|
bodyStyle: "data-[state=closed]:max-h-0 data-[state=open]:max-h-[320px] accordion-content overflow-hidden text-sm",
|
|
14
14
|
// Body inner wrapper styles
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import { Variants } from "motion/react";
|
|
2
2
|
/**
|
|
3
|
-
* Alert
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
3
|
+
* Alert dismiss animation variants.
|
|
4
|
+
*
|
|
5
|
+
* `visible` is the RESTING state, not an entrance — Alert mounts with
|
|
6
|
+
* `initial={false}` so it paints straight into `visible` and never plays these
|
|
7
|
+
* on mount. Only the `visible -> hidden` direction runs, when the alert is
|
|
8
|
+
* dismissed: fade + slide out while collapsing height/padding/margin so
|
|
9
|
+
* surrounding content closes the gap smoothly.
|
|
10
|
+
*
|
|
11
|
+
* `hidden` therefore keeps its full collapse geometry (that IS the dismiss),
|
|
12
|
+
* and `visible` keeps `y`/`opacity` so the collapse has somewhere to travel
|
|
13
|
+
* from. Uses library spring presets for a premium feel.
|
|
7
14
|
*/
|
|
8
15
|
export declare const alertVariants: Variants;
|
|
9
16
|
/**
|
|
@@ -4,10 +4,17 @@ import '../../../theme/SurfaceContext.js';
|
|
|
4
4
|
import { springs } from '../../../theme/animations.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
* Alert
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
7
|
+
* Alert dismiss animation variants.
|
|
8
|
+
*
|
|
9
|
+
* `visible` is the RESTING state, not an entrance — Alert mounts with
|
|
10
|
+
* `initial={false}` so it paints straight into `visible` and never plays these
|
|
11
|
+
* on mount. Only the `visible -> hidden` direction runs, when the alert is
|
|
12
|
+
* dismissed: fade + slide out while collapsing height/padding/margin so
|
|
13
|
+
* surrounding content closes the gap smoothly.
|
|
14
|
+
*
|
|
15
|
+
* `hidden` therefore keeps its full collapse geometry (that IS the dismiss),
|
|
16
|
+
* and `visible` keeps `y`/`opacity` so the collapse has somewhere to travel
|
|
17
|
+
* from. Uses library spring presets for a premium feel.
|
|
11
18
|
*/
|
|
12
19
|
const alertVariants = {
|
|
13
20
|
hidden: {
|
|
@@ -36,7 +36,15 @@ const Alert = React__default.forwardRef(({ color = "primary", title, subtitle, d
|
|
|
36
36
|
return null;
|
|
37
37
|
}
|
|
38
38
|
if (React__default.isValidElement(icon)) {
|
|
39
|
-
|
|
39
|
+
// A custom icon gets the SAME size + semantic color the default icon
|
|
40
|
+
// gets, applied as defaults so a consumer className still wins (§4).
|
|
41
|
+
// Without this the element inherited neither: Phosphor icons default to
|
|
42
|
+
// `1em`, so a custom icon rendered at the root's `text-sm` (14px) inside
|
|
43
|
+
// this 24px box, in the ambient text color rather than the intent color.
|
|
44
|
+
const customIcon = icon;
|
|
45
|
+
return (jsx("div", { className: "flex-shrink-0 w-6 h-6 mt-1", "aria-hidden": "true", children: React__default.cloneElement(customIcon, {
|
|
46
|
+
className: cn("w-6 h-6", iconColor, customIcon.props.className),
|
|
47
|
+
}) }));
|
|
40
48
|
}
|
|
41
49
|
const IconComponent = defaultIcons[color];
|
|
42
50
|
return (jsx("div", { className: "flex-shrink-0 w-6 h-6 mt-1", "aria-hidden": "true", children: jsx(IconComponent, { className: cn("w-6 h-6", iconColor) }) }));
|
|
@@ -47,7 +55,13 @@ const Alert = React__default.forwardRef(({ color = "primary", title, subtitle, d
|
|
|
47
55
|
: title), subtitle && (typeof subtitle === 'string'
|
|
48
56
|
? jsx("div", { className: "text-[var(--color-text-secondary)]/90 mt-1", children: subtitle })
|
|
49
57
|
: subtitle), children && jsx("div", { className: "mt-2", children: children }), actions && (jsx("div", { className: "flex items-center gap-2 mt-6", children: actions }))] }), showDismiss && (jsx(Button, { variant: "ghost", color: "mono", size: "sm", iconOnly: true, onClick: handleDismiss, "aria-label": "Dismiss alert", className: "rounded-full absolute top-2 right-2 flex-shrink-0", children: jsx(X, { className: "size-4", weight: "bold" }) }))] }));
|
|
50
|
-
const alertNode = (jsx(motion.div, { variants: shouldReduceMotion ? reducedMotionAlertVariants : alertVariants,
|
|
58
|
+
const alertNode = (jsx(motion.div, { variants: shouldReduceMotion ? reducedMotionAlertVariants : alertVariants,
|
|
59
|
+
// No mount animation. An Alert is page content, not a transient
|
|
60
|
+
// notification (that's Toast) — it is usually present at first paint, so
|
|
61
|
+
// animating `hidden -> visible` on mount meant every page load played an
|
|
62
|
+
// expand. `initial={false}` starts at the `visible` variant and animates
|
|
63
|
+
// only on a later state change, which is what the collapse below needs.
|
|
64
|
+
initial: false, animate: isDismissing ? "hidden" : "visible", onAnimationComplete: (definition) => {
|
|
51
65
|
if (definition === "hidden" && isDismissing) {
|
|
52
66
|
onDismiss === null || onDismiss === void 0 ? void 0 : onDismiss();
|
|
53
67
|
}
|
|
@@ -6,7 +6,7 @@ import { semanticTextColors } from '../../../utils/colorUtils.js';
|
|
|
6
6
|
*/
|
|
7
7
|
const alertTheme = {
|
|
8
8
|
// Base styles applied to all alerts
|
|
9
|
-
baseStyle: "relative flex items-start gap-3 rounded-[var(--alert-radius)] p-4 text-sm border border-[var(--color-border)] backdrop-blur-md bg-white dark:bg-[var(--color-
|
|
9
|
+
baseStyle: "relative flex items-start gap-3 rounded-[var(--alert-radius)] p-4 text-sm border border-[var(--color-border)] backdrop-blur-md bg-white dark:bg-[var(--color-surface)]/80",
|
|
10
10
|
// Icon color styles per color
|
|
11
11
|
iconColors: semanticTextColors,
|
|
12
12
|
// State styles
|
|
@@ -28,9 +28,11 @@ export interface AlertProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"
|
|
|
28
28
|
dismissible?: boolean;
|
|
29
29
|
/**
|
|
30
30
|
* Custom icon for the alert
|
|
31
|
-
* - Provide custom icon: overrides the default
|
|
31
|
+
* - Provide custom icon: overrides the default color icon. It inherits the
|
|
32
|
+
* default icon's size and semantic color; pass a `className` on the element
|
|
33
|
+
* to override either (e.g. `icon={<Fire className="size-5 text-purple-500" />}`).
|
|
32
34
|
* - Set to null: hides icon completely
|
|
33
|
-
* - Leave undefined: shows default
|
|
35
|
+
* - Leave undefined: shows default color icon
|
|
34
36
|
*/
|
|
35
37
|
icon?: ReactNode | null;
|
|
36
38
|
/** Whether to show the default icon for the variant */
|
|
@@ -15,7 +15,7 @@ import { useModalContext } from '../Modal/ModalContext.js';
|
|
|
15
15
|
*/
|
|
16
16
|
function AlertDialogSubtitle({ children }) {
|
|
17
17
|
const { subtitleId } = useModalContext();
|
|
18
|
-
return (jsx("div", { id: subtitleId, className: "text-[var(--color-text-secondary)] text-
|
|
18
|
+
return (jsx("div", { id: subtitleId, className: "text-[var(--color-text-secondary)] text-sm", children: children }));
|
|
19
19
|
}
|
|
20
20
|
const AlertDialog = ({ trigger, icon, title, subtitle, footer, className, }) => {
|
|
21
21
|
const [isOpen, setIsOpen] = useState(false);
|
|
@@ -24,7 +24,7 @@ const AlertDialog = ({ trigger, icon, title, subtitle, footer, className, }) =>
|
|
|
24
24
|
const triggerElement = isValidElement(trigger)
|
|
25
25
|
? cloneElement(trigger, { onClick: handleOpen })
|
|
26
26
|
: null;
|
|
27
|
-
return (jsxs(Fragment, { children: [triggerElement, jsxs(Modal, { isOpen: isOpen, onClose: handleClose, size: "sm", closeOnOverlayClick: false, closeOnEsc: !footer, showCloseButton: false, role: "alertdialog", className: cn("!overflow-visible", className), children: [jsxs(Modal.Header, { children: [icon && (jsx("div", { className: "text-2xl rounded-
|
|
27
|
+
return (jsxs(Fragment, { children: [triggerElement, jsxs(Modal, { isOpen: isOpen, onClose: handleClose, size: "sm", closeOnOverlayClick: false, closeOnEsc: !footer, showCloseButton: false, role: "alertdialog", className: cn("!overflow-visible", className), children: [jsxs(Modal.Header, { children: [icon && (jsx("div", { className: "text-2xl rounded-[var(--modal-radius)] p-3 mb-[var(--modal-py)] w-fit border border-[var(--color-border-secondary)]", "aria-hidden": "true", children: icon })), jsx(Modal.Title, { children: title })] }), jsx(Modal.Body, { className: "pt-2", children: jsx(AlertDialogSubtitle, { children: subtitle }) }), footer && (jsx(Modal.Footer, { className: "pt-6 pb-[var(--modal-py)]", children: footer(handleClose) }))] })] }));
|
|
28
28
|
};
|
|
29
29
|
AlertDialog.displayName = "AlertDialog";
|
|
30
30
|
|
|
@@ -5,7 +5,7 @@ const avatarTheme = {
|
|
|
5
5
|
// into the WRAPPER's context and painted over the sibling status dot, which
|
|
6
6
|
// sits at `z-index: auto`. Isolating keeps the circle's internal layering
|
|
7
7
|
// internal, so the dot and badge stack by DOM order as intended.
|
|
8
|
-
baseStyle: "relative isolate inline-flex items-center justify-center overflow-hidden bg-[var(--color-surface)] text-[var(--color-text-primary)] font-bold tracking-tighter rounded-[var(--avatar-radius)] border border-[var(--color-border)] transition-all duration-
|
|
8
|
+
baseStyle: "relative isolate inline-flex items-center justify-center overflow-hidden bg-[var(--color-surface)] text-[var(--color-text-primary)] font-bold tracking-tighter rounded-[var(--avatar-radius)] border border-[var(--color-border)] transition-all duration-[var(--motion-duration-base)] focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-primary)] focus-visible:ring-offset-2",
|
|
9
9
|
// One geometry class for EVERY size. The px value arrives through the
|
|
10
10
|
// `--avatar-size` custom property, which Avatar sets inline: a token maps to
|
|
11
11
|
// its `--avatar-size-*` var, a number to `${n}px`. It has to travel as a
|
|
@@ -1,8 +1,3 @@
|
|
|
1
1
|
import { Variants } from "motion/react";
|
|
2
2
|
export declare const badgeVariants: Variants;
|
|
3
3
|
export declare const dotVariants: Variants;
|
|
4
|
-
export declare const dismissButtonVariants: Variants;
|
|
5
|
-
export declare const dismissVariants: Variants;
|
|
6
|
-
export declare const animationTiming: {
|
|
7
|
-
dismissDelay: number;
|
|
8
|
-
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
//
|
|
2
|
+
// Badge is a static label — it does not animate in or out. This variant set
|
|
3
|
+
// exists so the root `motion.span` can PROPAGATE `initial`/`animate` down to the
|
|
4
|
+
// dot (motion cascades variant names to motion children). Removing it would stop
|
|
5
|
+
// the dot animating. Keep the values inert.
|
|
5
6
|
const badgeVariants = {
|
|
6
7
|
initial: {
|
|
7
8
|
opacity: 1,
|
|
@@ -10,23 +11,6 @@ const badgeVariants = {
|
|
|
10
11
|
animate: {
|
|
11
12
|
opacity: 1,
|
|
12
13
|
scale: 1,
|
|
13
|
-
transition: {
|
|
14
|
-
type: "spring",
|
|
15
|
-
stiffness: 500,
|
|
16
|
-
damping: 30,
|
|
17
|
-
mass: 1,
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
exit: {
|
|
21
|
-
opacity: 0,
|
|
22
|
-
scale: 0.2,
|
|
23
|
-
transition: {
|
|
24
|
-
type: "spring",
|
|
25
|
-
stiffness: 500,
|
|
26
|
-
damping: 25,
|
|
27
|
-
mass: 0.8,
|
|
28
|
-
duration: 0.3,
|
|
29
|
-
},
|
|
30
14
|
},
|
|
31
15
|
};
|
|
32
16
|
// Dot variants
|
|
@@ -44,69 +28,6 @@ const dotVariants = {
|
|
|
44
28
|
damping: 30,
|
|
45
29
|
},
|
|
46
30
|
},
|
|
47
|
-
exit: {
|
|
48
|
-
opacity: 0,
|
|
49
|
-
scale: 0,
|
|
50
|
-
transition: {
|
|
51
|
-
duration: 0.15,
|
|
52
|
-
ease: "easeIn",
|
|
53
|
-
},
|
|
54
|
-
},
|
|
55
|
-
};
|
|
56
|
-
// Dismiss button variants - optimized for performance
|
|
57
|
-
const dismissButtonVariants = {
|
|
58
|
-
initial: {
|
|
59
|
-
opacity: 0.75,
|
|
60
|
-
},
|
|
61
|
-
hover: {
|
|
62
|
-
opacity: 1,
|
|
63
|
-
transition: HOVER_TRANSITION,
|
|
64
|
-
},
|
|
65
|
-
tap: {
|
|
66
|
-
scale: 0.95,
|
|
67
|
-
transition: PRESS_TRANSITION,
|
|
68
|
-
},
|
|
69
|
-
};
|
|
70
|
-
// Optimized dismiss animation sequence
|
|
71
|
-
// This uses Framer Motion's built-in sequencing capabilities
|
|
72
|
-
const dismissVariants = {
|
|
73
|
-
initial: {
|
|
74
|
-
opacity: 0,
|
|
75
|
-
scale: 0.8,
|
|
76
|
-
},
|
|
77
|
-
animate: {
|
|
78
|
-
opacity: 1,
|
|
79
|
-
scale: 1,
|
|
80
|
-
transition: {
|
|
81
|
-
type: "spring",
|
|
82
|
-
stiffness: 500,
|
|
83
|
-
damping: 30,
|
|
84
|
-
mass: 1,
|
|
85
|
-
},
|
|
86
|
-
},
|
|
87
|
-
// First stage of exit - slight pop
|
|
88
|
-
exit: {
|
|
89
|
-
opacity: 0,
|
|
90
|
-
scale: 0.2,
|
|
91
|
-
transition: {
|
|
92
|
-
opacity: {
|
|
93
|
-
duration: 0.3,
|
|
94
|
-
ease: "easeOut",
|
|
95
|
-
},
|
|
96
|
-
scale: {
|
|
97
|
-
type: "spring",
|
|
98
|
-
stiffness: 300,
|
|
99
|
-
damping: 20,
|
|
100
|
-
// Add a slight delay to create the pop effect
|
|
101
|
-
delay: 0.05,
|
|
102
|
-
},
|
|
103
|
-
duration: 0.4,
|
|
104
|
-
},
|
|
105
|
-
},
|
|
106
|
-
};
|
|
107
|
-
// Animation timing constants (in ms)
|
|
108
|
-
const animationTiming = {
|
|
109
|
-
dismissDelay: 400, // Total animation duration
|
|
110
31
|
};
|
|
111
32
|
|
|
112
|
-
export {
|
|
33
|
+
export { badgeVariants, dotVariants };
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { BadgeProps } from "./Badge.types";
|
|
3
3
|
/**
|
|
4
|
-
* Badge
|
|
4
|
+
* Badge — a non-interactive status/metadata label.
|
|
5
|
+
*
|
|
6
|
+
* 🔴 Badge is deliberately a PURE LABEL: no dismiss, no disabled, no blessed
|
|
7
|
+
* click target. For a removable chip use `Tag`; for a selectable filter chip use
|
|
8
|
+
* `Pill`; for anything that performs an action use `Button`. See CLAUDE.md §8b.
|
|
5
9
|
*
|
|
6
10
|
* @component
|
|
7
11
|
* @example
|
|
8
12
|
* ```tsx
|
|
9
|
-
* <Badge
|
|
10
|
-
* <Badge
|
|
11
|
-
* <Badge dismissible onDismiss={handleDismiss}>Removable</Badge>
|
|
13
|
+
* <Badge color="primary" size="md" pill>New Feature</Badge>
|
|
14
|
+
* <Badge color="success" withDot>Ready</Badge>
|
|
12
15
|
* ```
|
|
13
16
|
*/
|
|
14
17
|
export declare const Badge: React.NamedExoticComponent<BadgeProps & React.RefAttributes<HTMLSpanElement>>;
|