@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
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
/**
|
|
3
|
+
* Shared press/hover interaction physics for clickable core components
|
|
4
|
+
* (Button, Pill, Badge dismiss). One source of truth so every pressable
|
|
5
|
+
* surface in the library reacts with the same speed and character.
|
|
6
|
+
*
|
|
7
|
+
* Press-down is a fast tween — feedback must land within ~1 frame of the
|
|
8
|
+
* pointer, so no spring ramp-up on the way in. Release is a stiff spring
|
|
9
|
+
* with a hint of overshoot for tactile character on the way out.
|
|
10
|
+
*
|
|
11
|
+
* NOTE: pair with CSS transitions that do NOT include `transform`
|
|
12
|
+
* (no `transition-all`) — motion drives transform directly every frame,
|
|
13
|
+
* and a CSS transition on transform re-interpolates those per-frame
|
|
14
|
+
* values and makes the press feel mushy.
|
|
15
|
+
*/
|
|
16
|
+
const PRESS_TRANSITION = {
|
|
17
|
+
duration: 0.08,
|
|
18
|
+
ease: "easeOut",
|
|
19
|
+
};
|
|
20
|
+
const RELEASE_TRANSITION = {
|
|
21
|
+
type: "spring",
|
|
22
|
+
stiffness: 600,
|
|
23
|
+
damping: 25,
|
|
24
|
+
mass: 0.6,
|
|
25
|
+
};
|
|
26
|
+
const HOVER_TRANSITION = {
|
|
27
|
+
duration: 0.15,
|
|
28
|
+
ease: "easeOut",
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Build press variants for a pressable component.
|
|
32
|
+
* Use with `animate="rest"` (so release uses RELEASE_TRANSITION) and
|
|
33
|
+
* `whileTap="press"`; pass `hoverScale` and `whileHover="hover"` for
|
|
34
|
+
* components that should also lift on hover.
|
|
35
|
+
*/
|
|
36
|
+
const createPressVariants = (pressScale = 0.97, hoverScale) => ({
|
|
37
|
+
rest: { scale: 1, transition: RELEASE_TRANSITION },
|
|
38
|
+
...(hoverScale !== undefined
|
|
39
|
+
? { hover: { scale: hoverScale, transition: HOVER_TRANSITION } }
|
|
40
|
+
: {}),
|
|
41
|
+
press: { scale: pressScale, transition: PRESS_TRANSITION },
|
|
42
|
+
});
|
|
43
|
+
/**
|
|
44
|
+
* Selection ripple for choice controls (Checkbox, Radio): a soft primary
|
|
45
|
+
* pulse that expands out of the control when it becomes checked.
|
|
46
|
+
*
|
|
47
|
+
* Spread onto a `motion.div` rendered inside `<AnimatePresence initial={false}>`
|
|
48
|
+
* gated on the checked state — `initial={false}` is required so a control
|
|
49
|
+
* that MOUNTS already checked (controlled/defaultChecked) doesn't fire the
|
|
50
|
+
* burst; only user-visible state changes do.
|
|
51
|
+
*/
|
|
52
|
+
const CHECK_RIPPLE_MOTION = {
|
|
53
|
+
initial: { scale: 0.5, opacity: 0.8 },
|
|
54
|
+
animate: { scale: 2.0, opacity: 0 },
|
|
55
|
+
exit: { opacity: 0 },
|
|
56
|
+
transition: { duration: 0.35, ease: "easeOut" },
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export { CHECK_RIPPLE_MOTION, HOVER_TRANSITION, PRESS_TRANSITION, RELEASE_TRANSITION, createPressVariants };
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import React__default, { createContext, useMemo, useState, useCallback, useContext } from 'react';
|
|
4
4
|
import { useReducedMotion, motion } from 'motion/react';
|
|
5
|
-
import {
|
|
5
|
+
import { CaretUpDown } from '@phosphor-icons/react';
|
|
6
6
|
import { cn } from '../../../utils/cn.js';
|
|
7
7
|
import { feedTheme } from './Feed.theme.js';
|
|
8
8
|
import { collapseLayerExitTiming, collapseLayerEnterTiming, EASE, expandLayerEnterTiming, expandLayerExitTiming, STAGGER_BASE_DELAY, STAGGER_IN, STAGGER_OUT } from './Feed.animations.js';
|
|
@@ -106,7 +106,7 @@ const FeedCollapse = ({ label = "Show {count} more", icon, defaultExpanded = fal
|
|
|
106
106
|
}
|
|
107
107
|
return child;
|
|
108
108
|
});
|
|
109
|
-
const collapseIcon = icon !== null && icon !== void 0 ? icon : (jsx(
|
|
109
|
+
const collapseIcon = icon !== null && icon !== void 0 ? icon : (jsx(CaretUpDown, { className: "size-4 text-[var(--color-primary)]" }));
|
|
110
110
|
/* ---- Reduced motion: instant toggle, no staged animations ---- */
|
|
111
111
|
if (shouldReduceMotion) {
|
|
112
112
|
return (jsxs("li", { className: cn(theme.collapseStyle, className), children: [expanded && (jsx("span", { "aria-hidden": "true", className: "absolute left-5 -translate-x-1/2 top-0 h-full w-0.5 bg-[var(--color-border)]/60" })), !expanded ? (jsxs("div", { className: "relative", style: { height: COLLAPSED_HEIGHT }, children: [jsx("svg", { "aria-hidden": "true", className: theme.collapseSvgStyle, style: { left: "calc(1.25rem - 1px)" }, width: SVG_WIDTH, height: COLLAPSED_HEIGHT, fill: "none", children: jsx("path", { d: CURVE_PATH, stroke: "var(--color-border)", strokeOpacity: "0.6", strokeWidth: STROKE_WIDTH }) }), jsxs("button", { type: "button", className: "absolute top-1/2 -translate-y-1/2 flex items-center gap-2.5 cursor-pointer bg-transparent border-none p-0", style: {
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
const ganttChartTheme = {
|
|
2
|
-
baseStyle: "flex flex-col w-full overflow-hidden rounded-
|
|
3
|
-
toolbarStyle: "flex flex-wrap items-center justify-between gap-2 px-3 py-2 border-b border-[var(--color-border)] bg-[var(--color-
|
|
2
|
+
baseStyle: "flex flex-col w-full overflow-hidden rounded-[var(--gantt-chart-radius)] border border-[var(--color-border)] bg-[var(--color-background)] text-sm shadow-sm",
|
|
3
|
+
toolbarStyle: "flex flex-wrap items-center justify-between gap-2 px-3 py-2 border-b border-[var(--color-border)] bg-[var(--color-surface)]/80",
|
|
4
4
|
tablePanelStyle: "flex flex-col shrink-0 overflow-hidden border-r border-[var(--color-border)] bg-[var(--color-background)]",
|
|
5
5
|
chartPanelStyle: "flex flex-col flex-1 min-w-0 overflow-hidden",
|
|
6
|
-
tableHeaderStyle: "flex items-center h-[56px] border-b border-[var(--color-border)] bg-[var(--color-
|
|
6
|
+
tableHeaderStyle: "flex items-center h-[56px] border-b border-[var(--color-border)] bg-[var(--color-surface)]/80",
|
|
7
7
|
tableHeaderCellStyle: "px-3 text-[11px] font-semibold uppercase tracking-wide text-[var(--color-text-muted)] truncate",
|
|
8
|
-
tableGroupRowStyle: "flex items-center cursor-pointer select-none border-b border-[var(--color-border)]/30 bg-[var(--color-
|
|
9
|
-
tableTaskRowStyle: "flex items-center border-b border-[var(--color-border)]/20 hover:bg-[var(--color-
|
|
8
|
+
tableGroupRowStyle: "flex items-center cursor-pointer select-none border-b border-[var(--color-border)]/30 bg-[var(--color-surface)]/35 hover:bg-[var(--color-surface)] transition-colors",
|
|
9
|
+
tableTaskRowStyle: "flex items-center border-b border-[var(--color-border)]/20 hover:bg-[var(--color-surface)]/70 transition-colors",
|
|
10
10
|
tableCellStyle: "px-3 truncate text-[var(--color-text-primary)]",
|
|
11
11
|
timelineHeaderStyle: "bg-[var(--color-background)] border-b border-[var(--color-border)] shadow-[0_1px_0_var(--color-border)]",
|
|
12
|
-
timelineMonthStyle: "text-[11px] font-semibold uppercase tracking-wide text-[var(--color-text-secondary)] px-2 border-b border-[var(--color-border)] flex items-center bg-[var(--color-
|
|
12
|
+
timelineMonthStyle: "text-[11px] font-semibold uppercase tracking-wide text-[var(--color-text-secondary)] px-2 border-b border-[var(--color-border)] flex items-center bg-[var(--color-surface)]/45",
|
|
13
13
|
timelineDayStyle: "text-[10px] text-[var(--color-text-muted)] flex items-center justify-center border-r border-[var(--color-border)]/20",
|
|
14
14
|
gridLineStyle: "border-r border-[var(--color-border)]/20",
|
|
15
|
-
weekendStyle: "bg-[var(--color-
|
|
15
|
+
weekendStyle: "bg-[var(--color-surface)]/35",
|
|
16
16
|
todayMarkerStyle: "bg-[var(--color-primary)] w-0.5",
|
|
17
17
|
todayColumnStyle: "bg-[var(--color-primary)]/10",
|
|
18
18
|
taskBarStyle: "absolute cursor-pointer flex items-center overflow-hidden shadow-sm ring-1 ring-black/10",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
3
|
import { forwardRef, useEffect, useCallback } from 'react';
|
|
4
|
-
import {
|
|
4
|
+
import { CalendarDots } from '@phosphor-icons/react';
|
|
5
5
|
import { cn } from '../../../utils/cn.js';
|
|
6
6
|
import { useGanttContext, useGanttInteraction } from './GanttChartContext.js';
|
|
7
7
|
import { GanttTimelineHeader } from './GanttTimelineHeader.js';
|
|
@@ -65,7 +65,7 @@ const GanttChartPanel = forwardRef(({ onScroll, days, monthSpans }, ref) => {
|
|
|
65
65
|
}
|
|
66
66
|
}, [rows, focusedTaskId, setFocusedTaskId, onTaskClick]);
|
|
67
67
|
if (tasks.length === 0) {
|
|
68
|
-
return (jsx("div", { className: cn(theme.chartPanelStyle, "items-center justify-center"), children: emptyState !== null && emptyState !== void 0 ? emptyState : (jsxs("div", { className: cn(theme.emptyStateStyle), children: [jsx(
|
|
68
|
+
return (jsx("div", { className: cn(theme.chartPanelStyle, "items-center justify-center"), children: emptyState !== null && emptyState !== void 0 ? emptyState : (jsxs("div", { className: cn(theme.emptyStateStyle), children: [jsx(CalendarDots, { className: "size-10 opacity-40" }), jsx("div", { className: "text-base font-medium text-[var(--color-text-secondary)]", children: "No tasks to display" }), jsx("div", { className: "text-sm opacity-70", children: "Add tasks to see them on the timeline" })] })) }));
|
|
69
69
|
}
|
|
70
70
|
return (jsx("div", { className: cn(theme.chartPanelStyle), children: jsx("div", { ref: ref, className: "overflow-auto flex-1 min-h-0 focus:outline-none", onScroll: onScroll, onKeyDown: handleKeyDown, tabIndex: 0, role: "grid", "aria-label": "Gantt chart timeline", "data-gantt-chart-scroll": true, children: jsxs("div", { style: { width: totalWidth }, children: [jsx("div", { className: "sticky top-0 z-10", children: jsx(GanttTimelineHeader, { days: days, monthSpans: monthSpans }) }), jsxs("div", { className: "relative", style: { height: bodyHeight }, children: [jsx(GanttTimelineGrid, { days: days, height: bodyHeight }), showDependencies && jsx(GanttDependencyArrows, {}), rows.map((row, i) => {
|
|
71
71
|
const top = i * rowHeight;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import React__default from 'react';
|
|
4
4
|
import { motion } from 'motion/react';
|
|
5
|
-
import {
|
|
5
|
+
import { CaretRight, Plus } from '@phosphor-icons/react';
|
|
6
6
|
import { cn } from '../../../utils/cn.js';
|
|
7
7
|
import { useGanttContext } from './GanttChartContext.js';
|
|
8
8
|
import { chevronVariants } from './GanttChart.animations.js';
|
|
@@ -15,10 +15,10 @@ const GanttTableGroupRow = React__default.memo(({ row, }) => {
|
|
|
15
15
|
e.preventDefault();
|
|
16
16
|
toggleGroup(row.group.id);
|
|
17
17
|
}
|
|
18
|
-
}, role: "button", tabIndex: 0, "aria-expanded": !isCollapsed, "aria-label": `${row.group.title} — ${row.completedCount} of ${row.taskCount} completed`, children: [jsxs("div", { className: "flex items-center gap-2 px-3 flex-1 min-w-0", children: [jsx(motion.div, { variants: chevronVariants, animate: isCollapsed ? "collapsed" : "open", children: jsx(
|
|
18
|
+
}, role: "button", tabIndex: 0, "aria-expanded": !isCollapsed, "aria-label": `${row.group.title} — ${row.completedCount} of ${row.taskCount} completed`, children: [jsxs("div", { className: "flex items-center gap-2 px-3 flex-1 min-w-0", children: [jsx(motion.div, { variants: chevronVariants, animate: isCollapsed ? "collapsed" : "open", children: jsx(CaretRight, { className: "size-4 text-[var(--color-text-muted)]" }) }), jsx("div", { className: "size-2.5 rounded-full shrink-0", style: { backgroundColor: row.group.color } }), jsx("span", { className: "font-medium text-[var(--color-text-primary)] truncate", children: row.group.title }), jsxs("span", { className: "text-sm text-[var(--color-text-muted)] shrink-0", children: [row.completedCount, "/", row.taskCount] })] }), onTaskAdd && !readonly && (jsx("button", { className: "p-1 mr-2 rounded hover:bg-[var(--color-surface-hover)] text-[var(--color-text-muted)] opacity-0 group-hover:opacity-100 focus:opacity-100 transition-opacity", "aria-label": `Add task to ${row.group.title}`, onClick: (e) => {
|
|
19
19
|
e.stopPropagation();
|
|
20
20
|
onTaskAdd(row.group.id);
|
|
21
|
-
}, children: jsx(
|
|
21
|
+
}, children: jsx(Plus, { className: "size-4" }) }))] }));
|
|
22
22
|
});
|
|
23
23
|
|
|
24
24
|
export { GanttTableGroupRow };
|
|
@@ -5,7 +5,7 @@ import { motion } from 'motion/react';
|
|
|
5
5
|
import { cn } from '../../../utils/cn.js';
|
|
6
6
|
import { useGanttContext, useGanttInteraction } from './GanttChartContext.js';
|
|
7
7
|
import { getDayOffset, calculateExpectedProgress, formatDateShort, formatDuration } from './GanttChart.utils.js';
|
|
8
|
-
import { ChartTooltip } from '../../
|
|
8
|
+
import { ChartTooltip } from '../../core/shared/ChartTooltip/ChartTooltip.js';
|
|
9
9
|
import { Avatar } from '../../core/Avatar/Avatar.js';
|
|
10
10
|
import { GanttTaskContextMenu } from './GanttTaskContextMenu.js';
|
|
11
11
|
import { taskBarVariants } from './GanttChart.animations.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
3
|
-
import {
|
|
3
|
+
import { CheckCircle, Copy, Trash } from '@phosphor-icons/react';
|
|
4
4
|
import { ContextMenu } from '../../core/ContextMenu/ContextMenu.js';
|
|
5
5
|
import '../../core/ContextMenu/ContextMenu.theme.js';
|
|
6
6
|
import { useGanttContext } from './GanttChartContext.js';
|
|
@@ -12,7 +12,7 @@ const GanttTaskContextMenu = ({ task, children, }) => {
|
|
|
12
12
|
if (readonly || (!onTaskUpdate && !onTaskDuplicate && !onTaskDelete)) {
|
|
13
13
|
return jsx(Fragment, { children: children });
|
|
14
14
|
}
|
|
15
|
-
return (jsxs(ContextMenu, { children: [jsx(ContextMenu.Trigger, { children: children }), jsxs(ContextMenu.Body, { children: [onTaskUpdate && (
|
|
15
|
+
return (jsxs(ContextMenu, { children: [jsx(ContextMenu.Trigger, { children: children }), jsxs(ContextMenu.Body, { children: [onTaskUpdate && (jsx(ContextMenu.Item, { onSelect: () => onTaskUpdate(task.id, { completed: !task.completed, progress: task.completed ? 0 : 100 }), startContent: jsx(CheckCircle, { className: "size-4" }), children: task.completed ? "Mark as incomplete" : "Mark as done" })), onTaskUpdate && (jsxs(ContextMenu.Sub, { children: [jsx(ContextMenu.SubTrigger, { children: "Progress" }), jsx(ContextMenu.SubBody, { children: PROGRESS_STEPS.map((val) => (jsxs(ContextMenu.Item, { onSelect: () => onTaskUpdate(task.id, { progress: val, completed: val === 100 }), children: [val, "%"] }, val))) })] })), (onTaskDuplicate || onTaskDelete) && jsx(ContextMenu.Separator, {}), onTaskDuplicate && (jsx(ContextMenu.Item, { onSelect: () => onTaskDuplicate(task.id), startContent: jsx(Copy, { className: "size-4" }), children: "Duplicate" })), onTaskDelete && (jsx(ContextMenu.Item, { onSelect: () => onTaskDelete(task.id), className: "text-[var(--color-danger)]", startContent: jsx(Trash, { className: "size-4" }), children: "Delete" }))] })] }));
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
export { GanttTaskContextMenu };
|
|
@@ -61,7 +61,7 @@ const GanttTimelineHeader = ({ days, monthSpans, }) => {
|
|
|
61
61
|
return (jsxs("div", { className: cn(theme.timelineHeaderStyle), style: { width: totalWidth }, children: [jsx("div", { className: "flex", style: { height: 28 }, children: headerSpans.map((span) => (jsx("div", { className: cn(theme.timelineMonthStyle), style: { width: span.span * dayWidth }, children: span.label }, `${span.label}-${span.startIndex}`))) }), jsx("div", { className: "flex", style: { height: 28 }, children: days.map((day, i) => {
|
|
62
62
|
const isToday = isSameDay(day, today);
|
|
63
63
|
const weekend = isWeekend(day);
|
|
64
|
-
return (jsx("div", { className: cn(theme.timelineDayStyle, weekend && "bg-[var(--color-
|
|
64
|
+
return (jsx("div", { className: cn(theme.timelineDayStyle, weekend && "bg-[var(--color-surface)]/50", isToday && "font-semibold text-[var(--color-primary)]"), style: { width: dayWidth }, children: getDayLabel(day, zoom) }, i));
|
|
65
65
|
}) })] }));
|
|
66
66
|
};
|
|
67
67
|
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
-
import {
|
|
3
|
+
import { Calendar, Plus } from '@phosphor-icons/react';
|
|
4
4
|
import { cn } from '../../../utils/cn.js';
|
|
5
5
|
import { useGanttContext } from './GanttChartContext.js';
|
|
6
6
|
import { Segmented } from '../../core/Segmented/Segmented.js';
|
|
7
7
|
import { Button } from '../../core/Button/Button.js';
|
|
8
|
-
import 'react';
|
|
9
8
|
import { Checkbox } from '../../forms/Checkbox/Checkbox.js';
|
|
10
9
|
|
|
11
10
|
const ZOOM_OPTIONS = [
|
|
@@ -24,7 +23,7 @@ const GanttToolbar = () => {
|
|
|
24
23
|
const targetScroll = todayOffset * dayWidth - container.clientWidth / 2;
|
|
25
24
|
container.scrollTo({ left: targetScroll, behavior: "smooth" });
|
|
26
25
|
};
|
|
27
|
-
return (jsxs("div", { className: cn(theme.toolbarStyle), children: [jsxs("div", { className: "flex min-w-0 flex-wrap items-center gap-2", children: [toolbar.today && todayOffset !== null && (jsxs(Button, { variant: "outline", color: "
|
|
26
|
+
return (jsxs("div", { className: cn(theme.toolbarStyle), children: [jsxs("div", { className: "flex min-w-0 flex-wrap items-center gap-2", children: [toolbar.today && todayOffset !== null && (jsxs(Button, { variant: "outline", color: "mono", size: "sm", onClick: handleScrollToToday, children: [jsx(Calendar, { className: "size-4" }), "Today"] })), toolbar.zoom && (jsx(Segmented, { value: zoom, onChange: (val) => setZoom(val), size: "sm", "aria-label": "Gantt zoom", className: "max-w-full overflow-x-auto", children: ZOOM_OPTIONS.map((opt) => (jsx(Segmented.Item, { value: opt.value, children: opt.label }, opt.value))) })), toolbar.hideCompleted && (jsx(Checkbox, { id: "gantt-hide-completed", name: "hideCompleted", value: "hideCompleted", checked: hideCompleted, onChange: (checked) => setHideCompleted(checked), label: "Hide completed", size: "sm" }))] }), jsx("div", { className: "flex items-center gap-2", children: toolbar.addGroup && onGroupAdd && !readonly && (jsxs(Button, { variant: "soft", size: "sm", onClick: onGroupAdd, children: [jsx(Plus, { className: "size-3.5" }), "Add group"] })) })] }));
|
|
28
27
|
};
|
|
29
28
|
|
|
30
29
|
export { GanttToolbar };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import React__default, { useMemo } from 'react';
|
|
4
|
-
import {
|
|
5
|
-
import { ArrowUpRightIcon, ArrowDownRightIcon } from '@heroicons/react/20/solid';
|
|
4
|
+
import { ArrowUpRight, ArrowDownRight } from '@phosphor-icons/react';
|
|
6
5
|
import { cn } from '../../../utils/cn.js';
|
|
6
|
+
import { Progress } from '../../core/Progress/Progress.js';
|
|
7
7
|
import { kpiTheme } from './KPI.theme.js';
|
|
8
8
|
|
|
9
9
|
const KPI = React__default.forwardRef(({ value, label, trend, trendLabel, progress, barCount = 24, subtitle, icon, size = "md", color = "primary", className, theme: customTheme = {}, ...props }, ref) => {
|
|
@@ -32,28 +32,19 @@ const KPI = React__default.forwardRef(({ value, label, trend, trendLabel, progre
|
|
|
32
32
|
: trend < 0
|
|
33
33
|
? "down"
|
|
34
34
|
: "neutral";
|
|
35
|
-
//
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
const barSize = kpiTheme.barSizes[size];
|
|
35
|
+
// KPI owns its own bar geometry; hand it to Progress as segment sizing.
|
|
36
|
+
// (`width` predates the flex-1 cells and is unused.)
|
|
37
|
+
const segmentSizes = useMemo(() => Object.fromEntries(Object.entries(kpiTheme.barSizes).map(([key, { height, gap }]) => [
|
|
38
|
+
key,
|
|
39
|
+
{ height, gap },
|
|
40
|
+
])), []);
|
|
42
41
|
return (jsxs("div", { ref: ref, className: cn(theme.baseStyle, className), ...props, children: [jsxs("div", { className: "flex items-start justify-between", children: [jsxs("div", { className: "flex items-baseline gap-2", children: [jsx("span", { className: cn(theme.valueSizes[size]), children: value }), label &&
|
|
43
42
|
(typeof label === "string" ? (jsxs("span", { className: cn(theme.labelStyle, theme.labelSizes[size]), children: [icon && (jsx("span", { className: "inline-flex items-center mr-1", children: icon })), label] })) : (label))] }), formattedTrend &&
|
|
44
43
|
trendDirection &&
|
|
45
|
-
(typeof formattedTrend === "string" ? (jsxs("span", { className: cn("inline-flex items-center gap-0.5 font-medium", theme.trendSizes[size], trendDirection === "up" && theme.trendPositive, trendDirection === "down" && theme.trendNegative, trendDirection === "neutral" && theme.trendNeutral), children: [formattedTrend, trendDirection === "up" && (jsx(
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
? 0.4 + (fadeDistance / 3) * 0.6
|
|
50
|
-
: 1;
|
|
51
|
-
return (jsx("div", { className: cn("relative rounded-sm flex-1", barSize.height, theme.barEmptyColor), children: isFilled && (jsx(motion.div, { className: cn("absolute inset-0 rounded-sm", theme.barFilledColors[color]), initial: { opacity: 0 }, animate: { opacity: fillOpacity }, transition: {
|
|
52
|
-
duration: 0.25,
|
|
53
|
-
ease: "easeOut",
|
|
54
|
-
delay: i * 0.03,
|
|
55
|
-
} })) }, i));
|
|
56
|
-
}) })), subtitle &&
|
|
44
|
+
(typeof formattedTrend === "string" ? (jsxs("span", { className: cn("inline-flex items-center gap-0.5 font-medium", theme.trendSizes[size], trendDirection === "up" && theme.trendPositive, trendDirection === "down" && theme.trendNegative, trendDirection === "neutral" && theme.trendNeutral), children: [formattedTrend, trendDirection === "up" && (jsx(ArrowUpRight, { className: "size-4" })), trendDirection === "down" && (jsx(ArrowDownRight, { className: "size-4" }))] })) : (formattedTrend))] }), progress !== undefined && (jsx(Progress, { value: progress, segments: barCount, segmentFade: true, size: size, className: theme.barFilledColors[color], "aria-label": `Progress: ${progress}%`, theme: {
|
|
45
|
+
segmentEmptyStyle: theme.barEmptyColor,
|
|
46
|
+
segmentSizes,
|
|
47
|
+
} })), subtitle &&
|
|
57
48
|
(typeof subtitle === "string" ? (jsx("span", { className: cn(theme.subtitleStyle), children: subtitle })) : (subtitle))] }));
|
|
58
49
|
});
|
|
59
50
|
KPI.displayName = "KPI";
|
|
@@ -3,9 +3,9 @@ import { semanticBgColors } from '../../../utils/colorUtils.js';
|
|
|
3
3
|
const kpiTheme = {
|
|
4
4
|
baseStyle: "flex flex-col gap-3",
|
|
5
5
|
valueSizes: {
|
|
6
|
-
sm: "text-
|
|
7
|
-
md: "text-
|
|
8
|
-
lg: "text-
|
|
6
|
+
sm: "text-[length:var(--kpi-value-size-sm)]/[var(--kpi-value-line-height-sm)] font-bold text-[var(--color-text-primary)]",
|
|
7
|
+
md: "text-[length:var(--kpi-value-size-md)]/[var(--kpi-value-line-height-md)] font-bold text-[var(--color-text-primary)]",
|
|
8
|
+
lg: "text-[length:var(--kpi-value-size-lg)]/[var(--kpi-value-line-height-lg)] font-bold text-[var(--color-text-primary)]",
|
|
9
9
|
},
|
|
10
10
|
labelStyle: "text-[var(--color-text-primary)] font-medium",
|
|
11
11
|
labelSizes: {
|
|
@@ -23,7 +23,11 @@ const kpiTheme = {
|
|
|
23
23
|
},
|
|
24
24
|
barFilledColors: {
|
|
25
25
|
...semanticBgColors,
|
|
26
|
-
|
|
26
|
+
// The gray role, not a text token (§8: never paint a fill with --color-text-*).
|
|
27
|
+
// These bars carry no text, so they take the role's own weight rather than a
|
|
28
|
+
// -contrast pairing; --color-mono is the mono token that flips per mode
|
|
29
|
+
// (900 light / 200 dark), which a fixed ramp rung would not.
|
|
30
|
+
mono: "bg-[var(--color-mono)]",
|
|
27
31
|
},
|
|
28
32
|
barEmptyColor: "bg-[var(--color-surface-sunken)]",
|
|
29
33
|
barSizes: {
|
|
@@ -4,10 +4,10 @@ import { cn } from '../../../utils/cn.js';
|
|
|
4
4
|
import { metricTheme } from './Metric.theme.js';
|
|
5
5
|
import { Badge } from '../../core/Badge/Badge.js';
|
|
6
6
|
import { Card } from '../../core/Card/Card.js';
|
|
7
|
-
import {
|
|
7
|
+
import { TrendUp, TrendDown } from '@phosphor-icons/react';
|
|
8
8
|
|
|
9
9
|
const Metric = React__default.forwardRef(({ value, label, subtitle, trendValue, trendDirection = "up", trendChart, size = "md", variant = "filled", color = "primary", icon, className, ...props }, ref) => {
|
|
10
|
-
const trendIcon = trendDirection === "up" ? (jsx(
|
|
10
|
+
const trendIcon = trendDirection === "up" ? (jsx(TrendUp, { className: "size-3", weight: "bold" })) : (jsx(TrendDown, { className: "size-3", weight: "bold" }));
|
|
11
11
|
const variantStyles = metricTheme.variants[variant];
|
|
12
12
|
// Ghost has no surface, so it renders flush (no inset) to align with
|
|
13
13
|
// surrounding content; filled keeps its size-based content padding.
|
|
@@ -4,16 +4,22 @@
|
|
|
4
4
|
* Record<Size, string> per sub-element, CSS variables for all theming.
|
|
5
5
|
*/
|
|
6
6
|
const metricTheme = {
|
|
7
|
-
// Base container (shared across all variants).
|
|
8
|
-
//
|
|
9
|
-
|
|
7
|
+
// Base container (shared across all variants). Overflow + resting surface
|
|
8
|
+
// come from the Card shell Metric renders into (see Metric.tsx), but Metric
|
|
9
|
+
// is a compact stat tile, not a freeform Card — it overrides the shell's
|
|
10
|
+
// --card-radius with its own --metric-radius (same "rounded-[...]" utility
|
|
11
|
+
// group, so this wins via source order) rather than inheriting Card's
|
|
12
|
+
// radius verbatim.
|
|
13
|
+
baseStyle: "transition-colors duration-[var(--motion-duration-base)] rounded-[var(--metric-radius)]",
|
|
10
14
|
// Visual style variants — container surface + structure.
|
|
11
15
|
// `filled` adds nothing: it inherits the Card shell's --color-surface-raised.
|
|
12
16
|
// `ghost` clears that fill (`!` beats Card's bg utility regardless of
|
|
13
|
-
// source order)
|
|
17
|
+
// source order) and cancels the Card shell's elevation shadow (`shadow-none`
|
|
18
|
+
// is registered in the same tailwind-merge `shadow` group as `shadow-surface-*`
|
|
19
|
+
// in cn.ts, so it reliably overrides it) so it sits fully flush/flat.
|
|
14
20
|
variants: {
|
|
15
21
|
filled: "",
|
|
16
|
-
ghost: "!bg-transparent overflow-visible",
|
|
22
|
+
ghost: "!bg-transparent overflow-visible shadow-none",
|
|
17
23
|
},
|
|
18
24
|
// Icon chip base per variant — classes shared across all colors of that variant
|
|
19
25
|
iconContainerVariants: {
|
|
@@ -22,14 +28,18 @@ const metricTheme = {
|
|
|
22
28
|
},
|
|
23
29
|
// Icon tint per semantic color — shared by every variant (the one thing color drives)
|
|
24
30
|
iconColors: {
|
|
25
|
-
|
|
31
|
+
mono: "text-[var(--color-text-primary)]",
|
|
26
32
|
primary: "text-[var(--color-primary)] dark:text-[var(--color-primary-400)]",
|
|
27
33
|
success: "text-[var(--color-success)] dark:text-[var(--color-success-400)]",
|
|
28
34
|
warning: "text-[var(--color-warning)] dark:text-[var(--color-warning-400)]",
|
|
29
35
|
danger: "text-[var(--color-danger)] dark:text-[var(--color-danger-400)]",
|
|
30
36
|
},
|
|
31
37
|
// Size variants — one Record<Size, string> per sub-element
|
|
32
|
-
contentPaddingSizes: {
|
|
38
|
+
contentPaddingSizes: {
|
|
39
|
+
sm: "p-[var(--metric-content-p-sm)]",
|
|
40
|
+
md: "p-[var(--metric-content-p-md)]",
|
|
41
|
+
lg: "p-[var(--metric-content-p-lg)]",
|
|
42
|
+
},
|
|
33
43
|
iconContainerSizes: { sm: "size-8", md: "size-10", lg: "size-12" },
|
|
34
44
|
// Heights mirror iconContainerSizes — with an icon, the label box spans the
|
|
35
45
|
// chip's height and centers its text against it (mb-3 spacing is dropped;
|
|
@@ -40,7 +50,14 @@ const metricTheme = {
|
|
|
40
50
|
md: "text-sm font-medium tracking-tight",
|
|
41
51
|
lg: "text-sm font-medium tracking-tight",
|
|
42
52
|
},
|
|
43
|
-
|
|
53
|
+
// text-[length:...] (not bare text-[var(...)]) is required — Tailwind's
|
|
54
|
+
// arbitrary text-[...] syntax is ambiguous between color/font-size and a
|
|
55
|
+
// bare var() resolves to color, silently no-oping the size change.
|
|
56
|
+
valueSizes: {
|
|
57
|
+
sm: "text-[length:var(--metric-value-size-sm)]/[var(--metric-value-line-height-sm)]",
|
|
58
|
+
md: "text-[length:var(--metric-value-size-md)]/[var(--metric-value-line-height-md)]",
|
|
59
|
+
lg: "text-[length:var(--metric-value-size-lg)]/[var(--metric-value-line-height-lg)]",
|
|
60
|
+
},
|
|
44
61
|
subtitleSizes: { sm: "text-xs mt-1", md: "text-xs mt-0.5", lg: "text-sm mt-1" },
|
|
45
62
|
// Common element styles
|
|
46
63
|
labelStyle: "font-semibold text-[var(--color-text-secondary)] mb-2",
|
|
@@ -11,19 +11,19 @@ const tableTheme = {
|
|
|
11
11
|
// border, or by the pagination footer's `border-t` when pagination is shown.
|
|
12
12
|
// `bordered` is a full grid and keeps its closing edge.
|
|
13
13
|
variants: {
|
|
14
|
-
default: "border-[var(--color-border)] dark:border-[var(--color-
|
|
14
|
+
default: "border-[var(--color-border)] dark:border-[var(--color-mono-700)] " +
|
|
15
15
|
"[&>tbody>tr:last-child>td]:border-b-0 " +
|
|
16
16
|
"[&_td]:px-3 [&_td]:py-2.5 [&_th]:px-3 [&_th]:py-2.5",
|
|
17
|
-
striped: "border-[var(--color-border)] dark:border-[var(--color-
|
|
18
|
-
"[&>tbody>tr:nth-child(odd)]:bg-[var(--color-
|
|
17
|
+
striped: "border-[var(--color-border)] dark:border-[var(--color-mono-700)] " +
|
|
18
|
+
"[&>tbody>tr:nth-child(odd)]:bg-[var(--color-mono-50)] dark:[&>tbody>tr:nth-child(odd)]:bg-[var(--color-mono-800)] " +
|
|
19
19
|
"[&>tbody>tr:last-child>td]:border-b-0 " +
|
|
20
20
|
"[&_td]:px-3 [&_td]:py-2.5 [&_th]:px-3 [&_th]:py-2.5",
|
|
21
|
-
bordered: "border-t border-l border-[var(--color-border)] dark:border-[var(--color-
|
|
21
|
+
bordered: "border-t border-l border-[var(--color-border)] dark:border-[var(--color-mono-700)] " +
|
|
22
22
|
"[&_td]:border-b [&_td]:border-r [&_th]:border-b [&_th]:border-r " +
|
|
23
23
|
"[&_td]:border-[var(--color-border)] [&_th]:border-[var(--color-border)] " +
|
|
24
|
-
"dark:[&_td]:border-[var(--color-
|
|
24
|
+
"dark:[&_td]:border-[var(--color-mono-700)] dark:[&_th]:border-[var(--color-mono-700)] " +
|
|
25
25
|
"[&_td]:px-3 [&_td]:py-2.5 [&_th]:px-3 [&_th]:py-2.5",
|
|
26
|
-
compact: "border-[var(--color-border)] dark:border-[var(--color-
|
|
26
|
+
compact: "border-[var(--color-border)] dark:border-[var(--color-mono-700)] " +
|
|
27
27
|
"[&>tbody>tr:last-child>td]:border-b-0 " +
|
|
28
28
|
"[&_td]:px-3 [&_td]:py-1 [&_th]:px-3 [&_th]:py-1",
|
|
29
29
|
},
|
|
@@ -45,7 +45,7 @@ const tableTheme = {
|
|
|
45
45
|
// <tr> (inset shadow) so a shifted cell can't drag a notch into it.
|
|
46
46
|
"[&>tbody>tr>td]:border-b-0 " +
|
|
47
47
|
"[&>tbody>tr]:shadow-[inset_0_-1px_0_0_var(--color-border)] [&>tbody>tr:last-child]:shadow-none " +
|
|
48
|
-
"[&>tbody>tr>td]:transition-transform [&>tbody>tr>td]:duration-
|
|
48
|
+
"[&>tbody>tr>td]:transition-transform [&>tbody>tr>td]:duration-[var(--motion-duration-slow)] " +
|
|
49
49
|
// first cell eases right (its left padding); last cell eases left only when
|
|
50
50
|
// right-aligned (matches `pr-4` — invisible on left-aligned content).
|
|
51
51
|
"[&>tbody>tr:hover>td:first-child]:translate-x-2 " +
|
|
@@ -60,8 +60,8 @@ const tableTheme = {
|
|
|
60
60
|
"text-[var(--color-text-primary)] ",
|
|
61
61
|
// Row styles — hover and layout only (borders moved to cells)
|
|
62
62
|
// Light: neutral-50 hover | Dark: neutral-800 hover
|
|
63
|
-
rowStyle: "group transition-all duration-
|
|
64
|
-
"hover:bg-[var(--color-
|
|
63
|
+
rowStyle: "group transition-all duration-[var(--motion-duration-slow)] relative " +
|
|
64
|
+
"hover:bg-[var(--color-mono-50)] " +
|
|
65
65
|
"dark:hover:bg-[var(--color-surface-hover)]",
|
|
66
66
|
// Selected row styles — background is applied per-cell (in TableCell) so that
|
|
67
67
|
// sticky/frozen columns repaint correctly. The row only carries the left indicator.
|
|
@@ -72,8 +72,8 @@ const tableTheme = {
|
|
|
72
72
|
frozenColumnStyle: "sticky left-0 z-10",
|
|
73
73
|
lastFrozenColumnStyle: "sticky right-0 z-10",
|
|
74
74
|
frozenHeaderStyle: "sticky top-0 z-20 " +
|
|
75
|
-
"shadow-lg shadow-[var(--color-
|
|
76
|
-
"dark:shadow-[var(--color-
|
|
75
|
+
"shadow-lg shadow-[var(--color-mono-200)]/50 " +
|
|
76
|
+
"dark:shadow-[var(--color-mono-900)]/50",
|
|
77
77
|
// Utility controls - Column manager button
|
|
78
78
|
// Surface-like control; surface/border/hover tokens flip automatically between light/dark
|
|
79
79
|
columnManagerButton: "inline-flex items-center gap-2 rounded-[calc(var(--radius-base)*0.75)] px-3 py-2 text-sm font-medium " +
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
3
|
import { useMemo, useCallback } from 'react';
|
|
4
|
+
import { DotsThree } from '@phosphor-icons/react';
|
|
4
5
|
import { cn } from '../../../utils/cn.js';
|
|
5
6
|
import { Dropdown } from '../../core/Dropdown/Dropdown.js';
|
|
6
7
|
import '../../core/Dropdown/DropdownTrigger.js';
|
|
@@ -10,7 +11,6 @@ import '../../core/Dropdown/DropdownSection.js';
|
|
|
10
11
|
import '../../core/Dropdown/DropdownSeparator.js';
|
|
11
12
|
import '../../core/Dropdown/Dropdown.theme.js';
|
|
12
13
|
import { Button } from '../../core/Button/Button.js';
|
|
13
|
-
import { EllipsisHorizontalIcon } from '@heroicons/react/20/solid';
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* TableActions component with smart display logic
|
|
@@ -50,7 +50,7 @@ const TableActions = ({ actions, row, maxVisibleActions = 2, className, }) => {
|
|
|
50
50
|
});
|
|
51
51
|
};
|
|
52
52
|
const renderOverflowMenu = () => {
|
|
53
|
-
return (jsxs(Dropdown, { placement: "bottom-end", offset: 4, disabledKeys: disabledKeys, onAction: handleAction, children: [jsx(Dropdown.Trigger, { children: jsx(Button, { color: "
|
|
53
|
+
return (jsxs(Dropdown, { placement: "bottom-end", offset: 4, disabledKeys: disabledKeys, onAction: handleAction, children: [jsx(Dropdown.Trigger, { children: jsx(Button, { color: "mono", variant: "ghost", size: "sm", iconOnly: true, "aria-label": "More actions", className: "text-[var(--color-text-muted)] hover:text-[var(--color-text-primary)] !border-none", children: jsx(DotsThree, { className: "size-4" }) }) }), jsx(Dropdown.Menu, { "aria-label": "Row actions", children: sortedActions.map((action) => {
|
|
54
54
|
const Icon = action.icon;
|
|
55
55
|
return (jsx(Dropdown.Item, { itemKey: action.id, isDanger: action.variant === "danger", startContent: jsx(Icon, { className: "size-4" }), children: action.label }, action.id));
|
|
56
56
|
}) })] }));
|
|
@@ -19,7 +19,7 @@ const TableActionsMenu = ({ actions, row, onClose, className, }) => {
|
|
|
19
19
|
var _a;
|
|
20
20
|
const isDisabled = (_a = action.disabled) === null || _a === void 0 ? void 0 : _a.call(action, row);
|
|
21
21
|
const Icon = action.icon;
|
|
22
|
-
return (jsxs(Button, { variant: "ghost", color: action.variant === 'danger' ? 'danger' : '
|
|
22
|
+
return (jsxs(Button, { variant: "ghost", color: action.variant === 'danger' ? 'danger' : 'mono', size: "sm", onClick: () => handleActionClick(action), disabled: isDisabled, className: "w-full justify-start gap-3", role: "menuitem", "aria-label": action.label, children: [jsx(Icon, { className: "size-4 flex-shrink-0" }), jsx("span", { children: action.label })] }, action.id));
|
|
23
23
|
}) }));
|
|
24
24
|
};
|
|
25
25
|
|
|
@@ -3,9 +3,8 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
3
3
|
import { Popover } from '../../core/Popover/Popover.js';
|
|
4
4
|
import '../../core/Popover/PopoverContext.js';
|
|
5
5
|
import '../../core/Popover/PopoverBody.js';
|
|
6
|
-
import {
|
|
6
|
+
import { Gear } from '@phosphor-icons/react';
|
|
7
7
|
import { Button } from '../../core/Button/Button.js';
|
|
8
|
-
import 'react';
|
|
9
8
|
import { Checkbox } from '../../forms/Checkbox/Checkbox.js';
|
|
10
9
|
import { Sortable, SortableItem } from '../../core/Sortable/Sortable.js';
|
|
11
10
|
|
|
@@ -19,7 +18,7 @@ function TableColumnManagerComponent({ columns, visibleColumns, columnOrder, onT
|
|
|
19
18
|
const displayName = typeof column.header === 'string' ? column.header : column.id;
|
|
20
19
|
return (jsx(Checkbox, { id: `column-checkbox-${column.id}`, name: `column-${column.id}`, value: column.id, checked: isVisible, onChange: () => onToggleColumn(column.id), "aria-label": `Toggle visibility for ${displayName} column`, label: displayName, state: isLocked ? 'disabled' : 'default' }));
|
|
21
20
|
};
|
|
22
|
-
return (jsxs(Popover, { placement: "bottom-end", offset: 8, children: [jsx(Popover.Trigger, { children: jsxs(Button, { color: "
|
|
21
|
+
return (jsxs(Popover, { placement: "bottom-end", offset: 8, children: [jsx(Popover.Trigger, { children: jsxs(Button, { color: "mono", variant: "filled", "aria-label": "Manage column visibility", children: [jsx(Gear, { className: "size-5", "aria-hidden": "true" }), "Manage Columns"] }) }), jsx(Popover.Body, { className: "p-0", children: jsxs("div", { className: "w-64 p-3 overflow-hidden", role: "dialog", "aria-labelledby": "column-manager-title", "aria-describedby": "column-manager-description", "aria-modal": "true", children: [jsx("div", { id: "column-manager-title", className: "text-sm uppercase font-bold mb-3 text-[var(--color-text-placeholder)]", children: "Manage Columns" }), jsx("div", { id: "column-manager-description", className: "sr-only", children: "Use checkboxes to control which columns are visible in the table. Locked columns cannot be hidden." }), jsx("div", { className: "space-y-0.5", role: "group", "aria-label": "Column visibility options", children: onColumnReorder ? (jsx(Sortable, { onReorder: onColumnReorder, showDragHandle: true, className: "space-y-0.5", children: orderedColumns.map((column) => (jsx(SortableItem, { id: column.id, disabled: column.locked === true, className: `hover:bg-[var(--color-surface-hover)] rounded-lg p-1.5 transition-colors ${column.locked ? 'bg-[var(--color-surface)]' : ''}`, children: renderColumnItem(column) }, column.id))) })) : (orderedColumns.map((column) => (jsx("div", { className: `hover:bg-[var(--color-surface-hover)] rounded-lg p-1.5 transition-colors ${column.locked ? 'bg-[var(--color-surface)]' : ''}`, children: renderColumnItem(column) }, column.id)))) }), jsx("div", { className: "mt-3 flex justify-end", children: jsx(Button, { color: "mono", variant: "filled", className: "w-full", onClick: onResetToDefault, children: "Reset to Default" }) })] }) })] }));
|
|
23
22
|
}
|
|
24
23
|
const TableColumnManager = TableColumnManagerComponent;
|
|
25
24
|
|
|
@@ -4,7 +4,7 @@ import React__default, { useContext } from 'react';
|
|
|
4
4
|
import { TableContext } from './TableContext.js';
|
|
5
5
|
import { cn } from '../../../utils/cn.js';
|
|
6
6
|
import { alignmentClasses } from './Table.utils.js';
|
|
7
|
-
import {
|
|
7
|
+
import { CaretUp, CaretDown } from '@phosphor-icons/react';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Declarative Table Header component
|
|
@@ -58,8 +58,8 @@ const HeaderCellComponent = ({ children, isFrozen = false, isLastFrozen = false,
|
|
|
58
58
|
'justify-end': align === 'right',
|
|
59
59
|
'justify-center': align === 'center',
|
|
60
60
|
}), children: [children, isSortable && sortDirection && (jsx("span", { className: "ml-1", children: sortDirection === 'asc'
|
|
61
|
-
? jsx(
|
|
62
|
-
: jsx(
|
|
61
|
+
? jsx(CaretUp, { className: "size-3.5" })
|
|
62
|
+
: jsx(CaretDown, { className: "size-3.5" }) }))] }) }));
|
|
63
63
|
};
|
|
64
64
|
HeaderCellComponent.displayName = 'Table.HeaderCell';
|
|
65
65
|
const HeaderCell = React__default.memo(HeaderCellComponent);
|