@flikk/ui 1.0.0-beta.1 → 1.0.0-beta.11
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/dist/components/ai/ApprovalCard/ApprovalCard.js +3 -2
- package/dist/components/ai/ApprovalCard/ApprovalCard.types.d.ts +2 -2
- package/dist/components/ai/CodeBlock/CodeBlock.theme.js +2 -2
- package/dist/components/ai/PromptInput/PromptInput.animations.d.ts +25 -0
- package/dist/components/ai/PromptInput/PromptInput.animations.js +61 -0
- package/dist/components/ai/PromptInput/PromptInput.js +264 -31
- package/dist/components/ai/PromptInput/PromptInput.theme.js +6 -1
- package/dist/components/ai/PromptInput/PromptInput.types.d.ts +68 -0
- package/dist/components/ai/PromptInput/VoiceRecorder.d.ts +10 -0
- package/dist/components/ai/PromptInput/VoiceRecorder.js +258 -0
- package/dist/components/ai/PromptInput/VoiceRecorder.types.d.ts +17 -0
- package/dist/components/ai/PromptInput/index.d.ts +1 -0
- package/dist/components/ai/PromptSuggestions/PromptSuggestion.theme.js +1 -1
- package/dist/components/ai/StreamingResponse/MarkdownRenderer.d.ts +5 -2
- package/dist/components/ai/StreamingResponse/MarkdownRenderer.js +51 -27
- package/dist/components/ai/StreamingResponse/StreamingCursor.d.ts +4 -5
- package/dist/components/ai/StreamingResponse/StreamingCursor.js +5 -12
- package/dist/components/ai/StreamingResponse/StreamingResponse.animations.d.ts +7 -0
- package/dist/components/ai/StreamingResponse/StreamingResponse.animations.js +20 -1
- package/dist/components/ai/StreamingResponse/StreamingResponse.js +2 -2
- package/dist/components/ai/StreamingResponse/StreamingResponse.theme.js +4 -4
- package/dist/components/ai/StreamingResponse/StreamingResponse.types.d.ts +2 -0
- package/dist/components/ai/StreamingResponse/WordAnimationContext.d.ts +27 -0
- package/dist/components/ai/StreamingResponse/WordAnimationContext.js +134 -0
- package/dist/components/ai/StreamingResponse/index.d.ts +3 -1
- package/dist/components/ai/ThinkingIndicator/ThinkingIndicator.theme.js +2 -2
- package/dist/components/ai/TokenCounter/TokenCounter.theme.js +6 -6
- package/dist/components/ai/index.js +1 -0
- package/dist/components/charts/ActivityRings/ActivityRings.js +1 -1
- package/dist/components/charts/ActivityRings/ActivityRings.theme.js +2 -2
- package/dist/components/charts/BarChart/BarChart.js +3 -3
- package/dist/components/charts/ChartContainer.js +1 -1
- package/dist/components/charts/ComboChart/ComboChart.js +2 -2
- package/dist/components/charts/DonutChart/DonutChart.theme.js +1 -1
- package/dist/components/charts/DonutChart/DonutChart.types.d.ts +1 -2
- package/dist/components/charts/DonutChart/MultiSegmentDonutChart.js +1 -1
- package/dist/components/charts/DonutChart/MultiSegmentDonutChart.theme.js +1 -1
- package/dist/components/charts/DonutChart/MultiSegmentDonutChart.types.d.ts +1 -2
- package/dist/components/charts/FunnelChart/FunnelChart.js +7 -7
- package/dist/components/charts/Heatmap/Heatmap.theme.js +1 -1
- package/dist/components/charts/Heatmap/HeatmapCell.js +1 -1
- package/dist/components/charts/Heatmap/HeatmapLegend.js +1 -1
- package/dist/components/charts/RadarChart/RadarChart.theme.js +2 -2
- package/dist/components/charts/ScatterPlot/ScatterPlot.js +1 -1
- package/dist/components/charts/ScatterPlot/ScatterPlot.theme.js +2 -2
- package/dist/components/charts/StackedBarChart/StackedBarChart.js +2 -2
- package/dist/components/charts/shared/ChartErrorBoundary/ChartErrorBoundary.js +1 -1
- package/dist/components/charts/shared/ChartLegend/ChartLegendContent.js +1 -1
- package/dist/components/charts/shared/ChartText/ChartText.js +1 -1
- package/dist/components/charts/shared/ChartText/ChartText.theme.js +1 -1
- package/dist/components/charts/shared/ChartTooltip/ChartTooltip.theme.js +4 -4
- package/dist/components/core/Accordion/Accordion.animations.d.ts +6 -1
- package/dist/components/core/Accordion/Accordion.animations.js +15 -1
- package/dist/components/core/Accordion/Accordion.theme.js +5 -5
- package/dist/components/core/Accordion/Accordion.types.d.ts +25 -0
- package/dist/components/core/Accordion/AccordionContent.js +1 -1
- package/dist/components/core/Accordion/AccordionTrigger.js +11 -6
- package/dist/components/core/Alert/Alert.js +3 -2
- package/dist/components/core/Alert/Alert.theme.js +4 -8
- package/dist/components/core/Alert/Alert.types.d.ts +4 -3
- package/dist/components/core/AlertDialog/AlertDialog.d.ts +1 -1
- package/dist/components/core/AlertDialog/AlertDialog.js +2 -2
- package/dist/components/core/AlertDialog/AlertDialog.types.d.ts +2 -2
- package/dist/components/core/Avatar/Avatar.theme.js +5 -5
- package/dist/components/core/AvatarGroup/AvatarGroup.theme.js +1 -1
- package/dist/components/core/Badge/Badge.d.ts +1 -1
- package/dist/components/core/Badge/Badge.js +11 -9
- package/dist/components/core/Badge/Badge.theme.js +24 -20
- package/dist/components/core/Badge/Badge.types.d.ts +10 -5
- package/dist/components/core/Breadcrumbs/Breadcrumbs.js +1 -1
- package/dist/components/core/Button/Button.d.ts +1 -1
- package/dist/components/core/Button/Button.js +21 -18
- package/dist/components/core/Button/Button.ripple.d.ts +5 -1
- package/dist/components/core/Button/Button.ripple.js +27 -17
- package/dist/components/core/Button/Button.theme.d.ts +1 -2
- package/dist/components/core/Button/Button.theme.js +46 -41
- package/dist/components/core/Button/Button.types.d.ts +3 -3
- package/dist/components/core/Button/index.d.ts +2 -0
- package/dist/components/core/ButtonGroup/ButtonGroup.theme.js +1 -1
- package/dist/components/core/Calendar/Calendar.js +1 -1
- package/dist/components/core/Calendar/Calendar.theme.js +9 -9
- package/dist/components/core/Calendar/CalendarMini/CalendarMini.js +1 -1
- package/dist/components/core/Card/Card.d.ts +2 -2
- package/dist/components/core/Card/Card.js +6 -7
- package/dist/components/core/Card/Card.theme.js +2 -2
- package/dist/components/core/Card/Card.types.d.ts +7 -27
- package/dist/components/core/Card/CardSubtitle.d.ts +3 -0
- package/dist/components/core/Card/CardSubtitle.js +11 -0
- package/dist/components/core/Card/CardTitle.d.ts +1 -1
- package/dist/components/core/Card/index.d.ts +2 -2
- package/dist/components/core/CommandPalette/CommandItem.d.ts +1 -1
- package/dist/components/core/CommandPalette/CommandItem.js +2 -2
- package/dist/components/core/CommandPalette/CommandPalette.js +2 -2
- package/dist/components/core/CommandPalette/CommandPalette.theme.js +6 -6
- package/dist/components/core/CommandPalette/CommandPalette.types.d.ts +2 -2
- package/dist/components/core/ContextMenu/ContextMenu.theme.js +3 -3
- package/dist/components/core/ContextMenu/ContextMenu.types.d.ts +1 -1
- package/dist/components/core/ContextMenu/ContextMenuItem.js +3 -3
- package/dist/components/core/Drawer/Drawer.d.ts +13 -1
- package/dist/components/core/Drawer/Drawer.js +23 -10
- package/dist/components/core/Drawer/Drawer.theme.d.ts +2 -0
- package/dist/components/core/Drawer/Drawer.theme.js +15 -13
- package/dist/components/core/Drawer/Drawer.types.d.ts +26 -9
- package/dist/components/core/Drawer/DrawerContent.js +1 -1
- package/dist/components/core/Drawer/DrawerHeader.d.ts +5 -0
- package/dist/components/core/Drawer/DrawerHeader.js +15 -0
- package/dist/components/core/Drawer/DrawerSubtitle.d.ts +5 -0
- package/dist/components/core/Drawer/DrawerSubtitle.js +11 -0
- package/dist/components/core/Drawer/DrawerTitle.d.ts +5 -0
- package/dist/components/core/Drawer/DrawerTitle.js +11 -0
- package/dist/components/core/Drawer/index.d.ts +1 -1
- package/dist/components/core/Dropdown/Dropdown.theme.js +1 -1
- package/dist/components/core/Dropdown/Dropdown.types.d.ts +4 -4
- package/dist/components/core/Dropdown/DropdownItem.js +2 -2
- package/dist/components/core/Dropdown/DropdownMenu.js +1 -0
- package/dist/components/core/Empty/Empty.js +2 -2
- package/dist/components/core/Empty/Empty.theme.d.ts +1 -1
- package/dist/components/core/Empty/Empty.theme.js +3 -3
- package/dist/components/core/Empty/Empty.types.d.ts +2 -2
- package/dist/components/core/Kbd/Kbd.theme.js +3 -3
- package/dist/components/core/Link/Link.d.ts +1 -1
- package/dist/components/core/Link/Link.types.d.ts +2 -2
- package/dist/components/core/Loader/Loader.theme.js +1 -1
- package/dist/components/core/MenuItem/MenuItem.js +2 -2
- package/dist/components/core/MenuItem/MenuItem.theme.d.ts +1 -2
- package/dist/components/core/MenuItem/MenuItem.theme.js +9 -11
- package/dist/components/core/MenuItem/MenuItem.types.d.ts +1 -1
- package/dist/components/core/Message/Message.d.ts +3 -2
- package/dist/components/core/Message/Message.js +30 -24
- package/dist/components/core/Message/Message.theme.d.ts +1 -1
- package/dist/components/core/Message/Message.theme.js +22 -24
- package/dist/components/core/Message/Message.types.d.ts +0 -7
- package/dist/components/core/Message/MessageList.animations.d.ts +6 -0
- package/dist/components/core/Message/MessageList.animations.js +32 -0
- package/dist/components/core/Message/MessageList.d.ts +5 -0
- package/dist/components/core/Message/MessageList.js +78 -0
- package/dist/components/core/Message/MessageList.theme.d.ts +2 -0
- package/dist/components/core/Message/MessageList.theme.js +6 -0
- package/dist/components/core/Message/MessageList.types.d.ts +32 -0
- package/dist/components/core/Message/index.d.ts +2 -0
- package/dist/components/core/Modal/Modal.d.ts +2 -2
- package/dist/components/core/Modal/Modal.js +5 -5
- package/dist/components/core/Modal/Modal.theme.js +6 -6
- package/dist/components/core/Modal/Modal.types.d.ts +4 -4
- package/dist/components/core/Modal/ModalHeader.js +1 -0
- package/dist/components/core/Modal/ModalSubtitle.d.ts +5 -0
- package/dist/components/core/Modal/ModalSubtitle.js +11 -0
- package/dist/components/core/ModalStack/ModalStack.animations.js +3 -3
- package/dist/components/core/ModalStack/ModalStackModal.js +3 -3
- package/dist/components/core/NavItem/NavItem.js +1 -1
- package/dist/components/core/NavItem/NavItem.theme.js +1 -1
- package/dist/components/core/OfflineIndicator/OfflineIndicator.theme.js +3 -3
- package/dist/components/core/PageHeading/PageHeading.d.ts +8 -0
- package/dist/components/core/PageHeading/PageHeading.js +28 -0
- package/dist/components/core/PageHeading/PageHeading.theme.d.ts +2 -0
- package/dist/components/core/PageHeading/PageHeading.theme.js +11 -0
- package/dist/components/core/PageHeading/PageHeading.types.d.ts +55 -0
- package/dist/components/core/PageHeading/PageHeadingActions.d.ts +3 -0
- package/dist/components/core/PageHeading/PageHeadingActions.js +11 -0
- package/dist/components/core/PageHeading/PageHeadingBackButton.d.ts +3 -0
- package/dist/components/core/PageHeading/PageHeadingBackButton.js +12 -0
- package/dist/components/core/PageHeading/PageHeadingIcon.d.ts +3 -0
- package/dist/components/core/PageHeading/PageHeadingIcon.js +11 -0
- package/dist/components/core/PageHeading/PageHeadingSubtitle.d.ts +3 -0
- package/dist/components/core/PageHeading/PageHeadingSubtitle.js +11 -0
- package/dist/components/core/PageHeading/PageHeadingTitle.d.ts +3 -0
- package/dist/components/core/PageHeading/PageHeadingTitle.js +11 -0
- package/dist/components/core/PageHeading/index.d.ts +2 -0
- package/dist/components/core/Pagination/Pagination.theme.js +2 -2
- package/dist/components/core/Pill/Pill.theme.js +3 -3
- package/dist/components/core/Popover/Popover.theme.js +1 -1
- package/dist/components/core/Popover/Popover.types.d.ts +6 -0
- package/dist/components/core/Popover/PopoverContent.js +8 -2
- package/dist/components/core/Progress/Progress.theme.js +10 -7
- package/dist/components/core/Progress/Progress.types.d.ts +2 -1
- package/dist/components/core/Segmented/Segmented.theme.js +5 -5
- package/dist/components/core/Sidebar/Sidebar.js +1 -0
- package/dist/components/core/Sidebar/SidebarNavGroup.js +1 -1
- package/dist/components/core/SocialIcon/SocialIcon.d.ts +3 -0
- package/dist/components/core/SocialIcon/SocialIcon.js +30 -0
- package/dist/components/core/SocialIcon/SocialIcon.theme.d.ts +2 -0
- package/dist/components/core/SocialIcon/SocialIcon.theme.js +12 -0
- package/dist/components/core/SocialIcon/SocialIcon.types.d.ts +18 -0
- package/dist/components/core/SocialIcon/index.d.ts +2 -0
- package/dist/components/core/SocialIcon/platforms.d.ts +17 -0
- package/dist/components/core/SocialIcon/platforms.js +234 -0
- package/dist/components/core/Spinner/Spinner.theme.js +3 -5
- package/dist/components/core/Spinner/Spinner.types.d.ts +2 -1
- package/dist/components/core/Tabs/Tabs.theme.js +2 -2
- package/dist/components/core/Tag/Tag.d.ts +2 -2
- package/dist/components/core/Tag/Tag.js +21 -4
- package/dist/components/core/Tag/Tag.theme.js +12 -4
- package/dist/components/core/Tag/Tag.types.d.ts +24 -1
- package/dist/components/core/Toast/Toast.js +4 -4
- package/dist/components/core/Toast/Toast.theme.js +4 -4
- package/dist/components/core/Toast/Toast.types.d.ts +9 -9
- package/dist/components/core/Toast/useToast.js +6 -6
- package/dist/components/core/Tooltip/Tooltip.theme.js +1 -1
- package/dist/components/core/Tree/Tree.theme.js +1 -1
- package/dist/components/core/index.d.ts +2 -7
- package/dist/components/core/index.js +10 -19
- package/dist/components/data-display/DescriptionList/DescriptionList.theme.js +8 -0
- package/dist/components/{core → data-display}/Feed/Feed.js +3 -3
- package/dist/components/{core → data-display}/Feed/Feed.theme.js +2 -2
- package/dist/components/data-display/GanttChart/GanttChart.animations.d.ts +4 -0
- package/dist/components/data-display/GanttChart/GanttChart.animations.js +21 -0
- package/dist/components/data-display/GanttChart/GanttChart.d.ts +8 -0
- package/dist/components/data-display/GanttChart/GanttChart.js +170 -0
- package/dist/components/data-display/GanttChart/GanttChart.theme.d.ts +2 -0
- package/dist/components/data-display/GanttChart/GanttChart.theme.js +23 -0
- package/dist/components/data-display/GanttChart/GanttChart.types.d.ts +162 -0
- package/dist/components/data-display/GanttChart/GanttChart.types.js +9 -0
- package/dist/components/data-display/GanttChart/GanttChart.utils.d.ts +80 -0
- package/dist/components/data-display/GanttChart/GanttChart.utils.js +274 -0
- package/dist/components/data-display/GanttChart/GanttChartPanel.d.ts +9 -0
- package/dist/components/data-display/GanttChart/GanttChartPanel.js +82 -0
- package/dist/components/data-display/GanttChart/GanttDependencyArrows.d.ts +2 -0
- package/dist/components/data-display/GanttChart/GanttDependencyArrows.js +35 -0
- package/dist/components/data-display/GanttChart/GanttGroupBar.d.ts +8 -0
- package/dist/components/data-display/GanttChart/GanttGroupBar.js +26 -0
- package/dist/components/data-display/GanttChart/GanttMilestone.d.ts +9 -0
- package/dist/components/data-display/GanttChart/GanttMilestone.js +44 -0
- package/dist/components/data-display/GanttChart/GanttProgressCircle.d.ts +9 -0
- package/dist/components/data-display/GanttChart/GanttProgressCircle.js +11 -0
- package/dist/components/data-display/GanttChart/GanttSplitter.d.ts +2 -0
- package/dist/components/data-display/GanttChart/GanttSplitter.js +39 -0
- package/dist/components/data-display/GanttChart/GanttTableGroupRow.d.ts +7 -0
- package/dist/components/data-display/GanttChart/GanttTableGroupRow.js +23 -0
- package/dist/components/data-display/GanttChart/GanttTableHeader.d.ts +2 -0
- package/dist/components/data-display/GanttChart/GanttTableHeader.js +13 -0
- package/dist/components/data-display/GanttChart/GanttTablePanel.d.ts +6 -0
- package/dist/components/data-display/GanttChart/GanttTablePanel.js +20 -0
- package/dist/components/data-display/GanttChart/GanttTableTaskRow.d.ts +8 -0
- package/dist/components/data-display/GanttChart/GanttTableTaskRow.js +30 -0
- package/dist/components/data-display/GanttChart/GanttTaskBar.d.ts +9 -0
- package/dist/components/data-display/GanttChart/GanttTaskBar.js +206 -0
- package/dist/components/data-display/GanttChart/GanttTaskContextMenu.d.ts +8 -0
- package/dist/components/data-display/GanttChart/GanttTaskContextMenu.js +17 -0
- package/dist/components/data-display/GanttChart/GanttTimelineGrid.d.ts +7 -0
- package/dist/components/data-display/GanttChart/GanttTimelineGrid.js +33 -0
- package/dist/components/data-display/GanttChart/GanttTimelineHeader.d.ts +8 -0
- package/dist/components/data-display/GanttChart/GanttTimelineHeader.js +43 -0
- package/dist/components/data-display/GanttChart/GanttToolbar.d.ts +2 -0
- package/dist/components/data-display/GanttChart/GanttToolbar.js +29 -0
- package/dist/components/data-display/GanttChart/hooks/useGanttDates.d.ts +12 -0
- package/dist/components/data-display/GanttChart/hooks/useGanttDates.js +25 -0
- package/dist/components/data-display/GanttChart/hooks/useGanttDrag.d.ts +25 -0
- package/dist/components/data-display/GanttChart/hooks/useGanttDrag.js +144 -0
- package/dist/components/data-display/GanttChart/hooks/useGanttLayout.d.ts +2 -0
- package/dist/components/data-display/GanttChart/hooks/useGanttLayout.js +33 -0
- package/dist/components/data-display/GanttChart/hooks/useGanttScrollSync.d.ts +6 -0
- package/dist/components/data-display/GanttChart/hooks/useGanttScrollSync.js +32 -0
- package/dist/components/data-display/GanttChart/index.d.ts +3 -0
- package/dist/components/{core → data-display}/KPI/KPI.js +10 -8
- package/dist/components/{core → data-display}/KPI/KPI.theme.js +12 -12
- package/dist/components/{core → data-display}/KPI/KPI.types.d.ts +6 -5
- package/dist/components/{core → data-display}/KPI/index.d.ts +1 -0
- package/dist/components/{core → data-display}/Metric/Metric.js +4 -7
- package/dist/components/{core → data-display}/Metric/Metric.theme.js +17 -13
- package/dist/components/{core → data-display}/Metric/Metric.types.d.ts +8 -7
- package/dist/components/{core → data-display}/Table/Table.theme.js +4 -4
- package/dist/components/{core → data-display}/Table/TableActions.js +8 -8
- package/dist/components/{core → data-display}/Table/TableActionsMenu.js +1 -1
- package/dist/components/{core → data-display}/Table/TableColumnManager.js +6 -5
- package/dist/components/{core → data-display}/Table/TableFilter.js +6 -6
- package/dist/components/{core → data-display}/Table/TableHeader.js +1 -1
- package/dist/components/data-display/Table/TablePagination.js +25 -0
- package/dist/components/{core → data-display}/Table/TableRow.js +1 -1
- package/dist/components/{core → data-display}/Table/TableSelectionHeader.js +3 -3
- package/dist/components/{core → data-display}/Timeline/Timeline.theme.js +2 -2
- package/dist/components/data-display/index.d.ts +7 -0
- package/dist/components/data-display/index.js +20 -0
- package/dist/components/effects/3d/index.d.ts +6 -0
- package/dist/components/effects/3d/index.js +3 -0
- package/dist/components/effects/Aurora/Aurora.d.ts +24 -0
- package/dist/components/effects/Aurora/Aurora.js +119 -0
- package/dist/components/effects/Aurora/Aurora.types.d.ts +15 -0
- package/dist/components/effects/Aurora/index.d.ts +2 -0
- package/dist/components/effects/CustomCursor/CustomCursor.d.ts +2 -2
- package/dist/components/effects/CustomCursor/CustomCursor.js +1 -1
- package/dist/components/effects/CustomCursor/CustomCursor.theme.js +3 -1
- package/dist/components/effects/CustomCursor/CustomCursor.types.d.ts +5 -4
- package/dist/components/effects/DotPattern/DotPattern.d.ts +18 -0
- package/dist/components/effects/DotPattern/DotPattern.js +65 -0
- package/dist/components/effects/DotPattern/DotPattern.types.d.ts +47 -0
- package/dist/components/effects/DotPattern/index.d.ts +2 -0
- package/dist/components/effects/GridPattern/GridPattern.d.ts +18 -0
- package/dist/components/effects/GridPattern/GridPattern.js +64 -0
- package/dist/components/effects/GridPattern/GridPattern.types.d.ts +47 -0
- package/dist/components/effects/GridPattern/index.d.ts +2 -0
- package/dist/components/effects/MagneticElement/MagneticElement.d.ts +30 -0
- package/dist/components/effects/MagneticElement/MagneticElement.js +110 -0
- package/dist/components/effects/MagneticElement/MagneticElement.types.d.ts +44 -0
- package/dist/components/effects/MagneticElement/index.d.ts +2 -0
- package/dist/components/effects/MorphingText/MorphingText.d.ts +17 -0
- package/dist/components/effects/MorphingText/MorphingText.js +91 -0
- package/dist/components/effects/MorphingText/MorphingText.types.d.ts +18 -0
- package/dist/components/effects/MorphingText/index.d.ts +2 -0
- package/dist/components/effects/NoiseOverlay/NoiseOverlay.d.ts +28 -0
- package/dist/components/effects/NoiseOverlay/NoiseOverlay.js +61 -0
- package/dist/components/effects/NoiseOverlay/NoiseOverlay.types.d.ts +35 -0
- package/dist/components/effects/NoiseOverlay/index.d.ts +2 -0
- package/dist/components/effects/ParallaxSection/ParallaxSection.d.ts +26 -0
- package/dist/components/effects/ParallaxSection/ParallaxSection.js +71 -0
- package/dist/components/effects/ParallaxSection/ParallaxSection.types.d.ts +11 -0
- package/dist/components/effects/ParallaxSection/index.d.ts +2 -0
- package/dist/components/effects/Particles/Particles.d.ts +22 -0
- package/dist/components/effects/Particles/Particles.js +33 -0
- package/dist/components/effects/Particles/Particles.scene.d.ts +3 -0
- package/dist/components/effects/Particles/Particles.scene.js +284 -0
- package/dist/components/effects/Particles/Particles.types.d.ts +65 -0
- package/dist/components/effects/Particles/index.d.ts +2 -0
- package/dist/components/effects/ProgressiveBlur/ProgressiveBlur.d.ts +3 -0
- package/dist/components/effects/ProgressiveBlur/ProgressiveBlur.js +75 -0
- package/dist/components/effects/ProgressiveBlur/ProgressiveBlur.theme.d.ts +7 -0
- package/dist/components/effects/ProgressiveBlur/ProgressiveBlur.theme.js +12 -0
- package/dist/components/effects/ProgressiveBlur/ProgressiveBlur.types.d.ts +47 -0
- package/dist/components/effects/ProgressiveBlur/index.d.ts +2 -0
- package/dist/components/effects/ScrollReveal/ScrollReveal.d.ts +29 -0
- package/dist/components/effects/ScrollReveal/ScrollReveal.js +121 -0
- package/dist/components/effects/ScrollReveal/ScrollReveal.types.d.ts +25 -0
- package/dist/components/effects/ScrollReveal/index.d.ts +2 -0
- package/dist/components/effects/Spotlight/Spotlight.d.ts +36 -0
- package/dist/components/effects/Spotlight/Spotlight.js +112 -0
- package/dist/components/effects/Spotlight/Spotlight.types.d.ts +29 -0
- package/dist/components/effects/Spotlight/index.d.ts +2 -0
- package/dist/components/effects/StickyScroll/StickyScroll.d.ts +30 -0
- package/dist/components/effects/StickyScroll/StickyScroll.js +128 -0
- package/dist/components/effects/StickyScroll/StickyScroll.types.d.ts +19 -0
- package/dist/components/effects/StickyScroll/index.d.ts +2 -0
- package/dist/components/effects/index.d.ts +22 -4
- package/dist/components/effects/index.js +11 -2
- package/dist/components/forms/Checkbox/Checkbox.d.ts +3 -4
- package/dist/components/forms/Checkbox/Checkbox.js +36 -12
- package/dist/components/forms/Checkbox/Checkbox.theme.js +9 -5
- package/dist/components/forms/Checkbox/Checkbox.types.d.ts +28 -2
- package/dist/components/forms/Checkbox/CheckboxContext.d.ts +14 -0
- package/dist/components/forms/Checkbox/CheckboxContext.js +12 -0
- package/dist/components/forms/Checkbox/CheckboxGroup.d.ts +3 -0
- package/dist/components/forms/Checkbox/CheckboxGroup.js +40 -0
- package/dist/components/forms/Checkbox/index.d.ts +1 -1
- package/dist/components/forms/ColorPicker/ColorPicker.js +1 -1
- package/dist/components/forms/ColorPicker/ColorPicker.theme.js +3 -3
- package/dist/components/forms/ColorPicker/ColorPickerInput.js +7 -7
- package/dist/components/forms/CronInput/CronInput.d.ts +3 -0
- package/dist/components/forms/CronInput/CronInput.js +107 -0
- package/dist/components/forms/CronInput/CronInput.theme.d.ts +6 -0
- package/dist/components/forms/CronInput/CronInput.theme.js +84 -0
- package/dist/components/forms/CronInput/CronInput.types.d.ts +98 -0
- package/dist/components/forms/CronInput/CronInput.utils.d.ts +67 -0
- package/dist/components/forms/CronInput/CronInput.utils.js +505 -0
- package/dist/components/forms/CronInput/index.d.ts +4 -0
- package/dist/components/forms/DatePicker/DatePicker.theme.js +3 -3
- package/dist/components/forms/DatePicker/DatePickerContent.js +1 -1
- package/dist/components/forms/FileUpload/FileUpload.js +80 -2
- package/dist/components/forms/FileUpload/FileUpload.theme.js +4 -4
- package/dist/components/forms/FormLabel/FormLabel.theme.js +1 -1
- package/dist/components/forms/Input/Input.theme.js +1 -1
- package/dist/components/forms/InputCounter/InputCounter.d.ts +1 -1
- package/dist/components/forms/InputCounter/InputCounter.theme.js +1 -1
- package/dist/components/forms/InputCounter/InputCounter.types.d.ts +3 -2
- package/dist/components/forms/InputOTP/InputOTP.theme.js +2 -2
- package/dist/components/forms/InputTag/InputTag.js +1 -1
- package/dist/components/forms/Mention/Mention.d.ts +3 -0
- package/dist/components/forms/Mention/Mention.js +607 -0
- package/dist/components/forms/Mention/Mention.theme.d.ts +6 -0
- package/dist/components/forms/Mention/Mention.theme.js +55 -0
- package/dist/components/forms/Mention/Mention.types.d.ts +151 -0
- package/dist/components/forms/Mention/Mention.utils.d.ts +42 -0
- package/dist/components/forms/Mention/Mention.utils.js +285 -0
- package/dist/components/forms/Mention/index.d.ts +3 -0
- package/dist/components/forms/Radio/Radio.d.ts +3 -4
- package/dist/components/forms/Radio/Radio.js +25 -12
- package/dist/components/forms/Radio/Radio.theme.js +34 -5
- package/dist/components/forms/Radio/Radio.types.d.ts +30 -4
- package/dist/components/forms/Radio/RadioContext.d.ts +14 -0
- package/dist/components/forms/Radio/RadioContext.js +12 -0
- package/dist/components/forms/Radio/RadioGroup.d.ts +3 -0
- package/dist/components/forms/Radio/RadioGroup.js +36 -0
- package/dist/components/forms/Radio/index.d.ts +1 -1
- package/dist/components/forms/RichTextEditor/RichTextEditor.js +2 -2
- package/dist/components/forms/RichTextEditor/RichTextEditor.theme.js +1 -1
- package/dist/components/forms/Select/Select.theme.js +1 -1
- package/dist/components/forms/SelectableCard/SelectableCard.animations.d.ts +2 -0
- package/dist/components/forms/SelectableCard/SelectableCard.animations.js +9 -0
- package/dist/components/forms/SelectableCard/SelectableCard.d.ts +5 -0
- package/dist/components/forms/SelectableCard/SelectableCard.js +58 -0
- package/dist/components/forms/SelectableCard/SelectableCard.theme.d.ts +2 -0
- package/dist/components/forms/SelectableCard/SelectableCard.theme.js +38 -0
- package/dist/components/forms/SelectableCard/SelectableCard.types.d.ts +33 -0
- package/dist/components/forms/SelectableCard/SelectableCardContext.d.ts +3 -0
- package/dist/components/forms/SelectableCard/SelectableCardContext.js +12 -0
- package/dist/components/forms/SelectableCard/SelectableCardGroup.d.ts +3 -0
- package/dist/components/forms/SelectableCard/SelectableCardGroup.js +37 -0
- package/dist/components/forms/SelectableCard/index.d.ts +3 -0
- package/dist/components/forms/Signature/Signature.theme.js +1 -1
- package/dist/components/forms/Slider/Slider.theme.js +3 -3
- package/dist/components/forms/Switch/Switch.theme.js +1 -1
- package/dist/components/forms/TimePicker/TimePicker.theme.js +2 -2
- package/dist/components/forms/TimePicker/TimePickerContent.js +78 -1
- package/dist/components/forms/TransferList/TransferList.animations.d.ts +10 -0
- package/dist/components/forms/TransferList/TransferList.animations.js +32 -0
- package/dist/components/forms/TransferList/TransferList.d.ts +28 -0
- package/dist/components/forms/TransferList/TransferList.js +199 -0
- package/dist/components/forms/TransferList/TransferList.theme.d.ts +6 -0
- package/dist/components/forms/TransferList/TransferList.theme.js +60 -0
- package/dist/components/forms/TransferList/TransferList.types.d.ts +101 -0
- package/dist/components/forms/TransferList/index.d.ts +3 -0
- package/dist/components/forms/forms.theme.js +6 -6
- package/dist/components/forms/index.d.ts +15 -2
- package/dist/components/forms/index.js +87 -0
- package/dist/components/layout/FormLayout/FormLayout.d.ts +8 -0
- package/dist/components/layout/FormLayout/FormLayout.js +22 -0
- package/dist/components/layout/FormLayout/FormLayout.theme.d.ts +2 -0
- package/dist/components/layout/FormLayout/FormLayout.theme.js +16 -0
- package/dist/components/layout/FormLayout/FormLayout.types.d.ts +61 -0
- package/dist/components/layout/FormLayout/FormLayoutBody.d.ts +3 -0
- package/dist/components/layout/FormLayout/FormLayoutBody.js +91 -0
- package/dist/components/layout/FormLayout/FormLayoutFooter.d.ts +3 -0
- package/dist/components/layout/FormLayout/FormLayoutFooter.js +12 -0
- package/dist/components/layout/FormLayout/FormLayoutHeader.d.ts +3 -0
- package/dist/components/layout/FormLayout/FormLayoutHeader.js +12 -0
- package/dist/components/layout/FormLayout/FormLayoutSection.d.ts +3 -0
- package/dist/components/layout/FormLayout/FormLayoutSection.js +12 -0
- package/dist/components/layout/FormLayout/index.d.ts +3 -0
- package/dist/components/layout/PageLayout/PageLayout.d.ts +7 -0
- package/dist/components/layout/PageLayout/PageLayout.js +33 -0
- package/dist/components/layout/PageLayout/PageLayout.theme.d.ts +2 -0
- package/dist/components/layout/PageLayout/PageLayout.theme.js +10 -0
- package/dist/components/layout/PageLayout/PageLayout.types.d.ts +39 -0
- package/dist/components/layout/PageLayout/PageLayoutContent.d.ts +3 -0
- package/dist/components/layout/PageLayout/PageLayoutContent.js +12 -0
- package/dist/components/layout/PageLayout/PageLayoutHeader.d.ts +3 -0
- package/dist/components/layout/PageLayout/PageLayoutHeader.js +12 -0
- package/dist/components/layout/PageLayout/PageLayoutSidebar.d.ts +3 -0
- package/dist/components/layout/PageLayout/PageLayoutSidebar.js +12 -0
- package/dist/components/layout/PageLayout/index.d.ts +3 -0
- package/dist/components/layout/index.d.ts +2 -0
- package/dist/hooks/useSelectPortal.d.ts +4 -2
- package/dist/hooks/useSelectPortal.js +139 -51
- package/dist/index.d.ts +2 -0
- package/dist/index.js +206 -167
- package/dist/styles.css +1 -1
- package/dist/utils/colorUtils.d.ts +23 -0
- package/dist/utils/colorUtils.js +45 -0
- package/dist/utils/dateUtils.d.ts +30 -0
- package/dist/utils/dateUtils.js +58 -1
- package/dist/utils/index.d.ts +2 -1
- package/package.json +38 -26
- package/src/global.scss +673 -0
- package/src/styles/theme.css +378 -0
- package/src/theme-plugin.css +11 -0
- package/dist/components/core/Button/Button.animations.d.ts +0 -5
- package/dist/components/core/Card/CardDescription.d.ts +0 -3
- package/dist/components/core/Card/CardDescription.js +0 -11
- package/dist/components/core/DescriptionList/DescriptionList.theme.js +0 -8
- package/dist/components/core/Modal/ModalDescription.d.ts +0 -5
- package/dist/components/core/Modal/ModalDescription.js +0 -11
- package/dist/components/core/ProgressiveBlur/ProgressiveBlur.d.ts +0 -34
- package/dist/components/core/ProgressiveBlur/ProgressiveBlur.js +0 -218
- package/dist/components/core/ProgressiveBlur/ProgressiveBlur.theme.d.ts +0 -9
- package/dist/components/core/ProgressiveBlur/ProgressiveBlur.types.d.ts +0 -48
- package/dist/components/core/ProgressiveBlur/index.d.ts +0 -2
- package/dist/components/core/Table/TablePagination.js +0 -25
- /package/dist/components/{core → data-display}/DescriptionList/DescriptionList.d.ts +0 -0
- /package/dist/components/{core → data-display}/DescriptionList/DescriptionList.js +0 -0
- /package/dist/components/{core → data-display}/DescriptionList/DescriptionList.theme.d.ts +0 -0
- /package/dist/components/{core → data-display}/DescriptionList/DescriptionList.types.d.ts +0 -0
- /package/dist/components/{core → data-display}/DescriptionList/index.d.ts +0 -0
- /package/dist/components/{core → data-display}/Feed/Feed.d.ts +0 -0
- /package/dist/components/{core → data-display}/Feed/Feed.theme.d.ts +0 -0
- /package/dist/components/{core → data-display}/Feed/Feed.types.d.ts +0 -0
- /package/dist/components/{core → data-display}/Feed/index.d.ts +0 -0
- /package/dist/components/{core → data-display}/KPI/KPI.d.ts +0 -0
- /package/dist/components/{core → data-display}/KPI/KPI.theme.d.ts +0 -0
- /package/dist/components/{core → data-display}/Metric/Metric.d.ts +0 -0
- /package/dist/components/{core → data-display}/Metric/Metric.theme.d.ts +0 -0
- /package/dist/components/{core → data-display}/Metric/index.d.ts +0 -0
- /package/dist/components/{core → data-display}/Table/Table.animations.d.ts +0 -0
- /package/dist/components/{core → data-display}/Table/Table.animations.js +0 -0
- /package/dist/components/{core → data-display}/Table/Table.d.ts +0 -0
- /package/dist/components/{core → data-display}/Table/Table.filterUtils.d.ts +0 -0
- /package/dist/components/{core → data-display}/Table/Table.filterUtils.js +0 -0
- /package/dist/components/{core → data-display}/Table/Table.js +0 -0
- /package/dist/components/{core → data-display}/Table/Table.theme.d.ts +0 -0
- /package/dist/components/{core → data-display}/Table/Table.types.d.ts +0 -0
- /package/dist/components/{core → data-display}/Table/Table.utils.d.ts +0 -0
- /package/dist/components/{core → data-display}/Table/Table.utils.js +0 -0
- /package/dist/components/{core → data-display}/Table/TableActions.d.ts +0 -0
- /package/dist/components/{core → data-display}/Table/TableActionsMenu.d.ts +0 -0
- /package/dist/components/{core → data-display}/Table/TableBody.d.ts +0 -0
- /package/dist/components/{core → data-display}/Table/TableBody.js +0 -0
- /package/dist/components/{core → data-display}/Table/TableCell.d.ts +0 -0
- /package/dist/components/{core → data-display}/Table/TableCell.js +0 -0
- /package/dist/components/{core → data-display}/Table/TableColumnManager.d.ts +0 -0
- /package/dist/components/{core → data-display}/Table/TableDeclarative.d.ts +0 -0
- /package/dist/components/{core → data-display}/Table/TableDeclarative.js +0 -0
- /package/dist/components/{core → data-display}/Table/TableFilter.d.ts +0 -0
- /package/dist/components/{core → data-display}/Table/TableHeader.d.ts +0 -0
- /package/dist/components/{core → data-display}/Table/TablePagination.d.ts +0 -0
- /package/dist/components/{core → data-display}/Table/TableRow.d.ts +0 -0
- /package/dist/components/{core → data-display}/Table/TableSelectionHeader.d.ts +0 -0
- /package/dist/components/{core → data-display}/Table/hooks/index.d.ts +0 -0
- /package/dist/components/{core → data-display}/Table/hooks/useTableColumns.d.ts +0 -0
- /package/dist/components/{core → data-display}/Table/hooks/useTableColumns.js +0 -0
- /package/dist/components/{core → data-display}/Table/hooks/useTableExpansion.d.ts +0 -0
- /package/dist/components/{core → data-display}/Table/hooks/useTableExpansion.js +0 -0
- /package/dist/components/{core → data-display}/Table/hooks/useTableFilter.d.ts +0 -0
- /package/dist/components/{core → data-display}/Table/hooks/useTableFilter.js +0 -0
- /package/dist/components/{core → data-display}/Table/hooks/useTablePagination.d.ts +0 -0
- /package/dist/components/{core → data-display}/Table/hooks/useTablePagination.js +0 -0
- /package/dist/components/{core → data-display}/Table/hooks/useTableSelection.d.ts +0 -0
- /package/dist/components/{core → data-display}/Table/hooks/useTableSelection.js +0 -0
- /package/dist/components/{core → data-display}/Table/index.d.ts +0 -0
- /package/dist/components/{core → data-display}/Table/index.js +0 -0
- /package/dist/components/{core → data-display}/Timeline/Timeline.animations.d.ts +0 -0
- /package/dist/components/{core → data-display}/Timeline/Timeline.animations.js +0 -0
- /package/dist/components/{core → data-display}/Timeline/Timeline.d.ts +0 -0
- /package/dist/components/{core → data-display}/Timeline/Timeline.js +0 -0
- /package/dist/components/{core → data-display}/Timeline/Timeline.theme.d.ts +0 -0
- /package/dist/components/{core → data-display}/Timeline/Timeline.types.d.ts +0 -0
- /package/dist/components/{core → data-display}/Timeline/TimelineContent.d.ts +0 -0
- /package/dist/components/{core → data-display}/Timeline/TimelineContent.js +0 -0
- /package/dist/components/{core → data-display}/Timeline/TimelineItem.d.ts +0 -0
- /package/dist/components/{core → data-display}/Timeline/TimelineItem.js +0 -0
- /package/dist/components/{core → data-display}/Timeline/TimelineMarker.d.ts +0 -0
- /package/dist/components/{core → data-display}/Timeline/TimelineMarker.js +0 -0
- /package/dist/components/{core → data-display}/Timeline/index.d.ts +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { Drawer } from "./Drawer";
|
|
2
|
-
export type { DrawerProps, DrawerPosition, DrawerSize, DrawerThemeOverrides } from "./Drawer.types";
|
|
2
|
+
export type { DrawerProps, DrawerPosition, DrawerSize, DrawerThemeOverrides, DrawerHeaderProps, DrawerTitleProps, DrawerSubtitleProps, DrawerContentProps, DrawerFooterProps, } from "./Drawer.types";
|
|
@@ -9,7 +9,7 @@ const dropdownTheme = {
|
|
|
9
9
|
itemDangerStyle: menuItemTheme.dangerStyle,
|
|
10
10
|
itemFocusStyle: menuItemTheme.focusStyle,
|
|
11
11
|
// Section title styling
|
|
12
|
-
sectionTitleStyle: "px-2 py-1.5 text-
|
|
12
|
+
sectionTitleStyle: "px-2 py-1.5 text-sm font-semibold text-[var(--color-text-muted)] uppercase tracking-tight",
|
|
13
13
|
// Section container styling
|
|
14
14
|
sectionStyle: "py-1",
|
|
15
15
|
// Separator between sections
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { ReactNode } from "react";
|
|
2
2
|
import { DropdownTheme } from "./Dropdown.theme";
|
|
3
3
|
export type DropdownPlacement = "top" | "top-start" | "top-end" | "right" | "right-start" | "right-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end";
|
|
4
|
-
export type SelectionMode =
|
|
4
|
+
export type SelectionMode = "none" | "single" | "multiple";
|
|
5
5
|
export interface DropdownContextValue {
|
|
6
6
|
isOpen: boolean;
|
|
7
7
|
onOpenChange: (isOpen: boolean) => void;
|
|
@@ -53,14 +53,14 @@ export interface DropdownMenuProps extends React.HTMLAttributes<HTMLDivElement>
|
|
|
53
53
|
horizontal?: boolean;
|
|
54
54
|
"aria-label"?: string;
|
|
55
55
|
}
|
|
56
|
-
export interface DropdownItemProps extends Omit<React.HTMLAttributes<HTMLDivElement>,
|
|
56
|
+
export interface DropdownItemProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "color" | "onSelect"> {
|
|
57
57
|
itemKey: string;
|
|
58
58
|
children: ReactNode;
|
|
59
59
|
className?: string;
|
|
60
60
|
startContent?: ReactNode;
|
|
61
61
|
endContent?: ReactNode;
|
|
62
|
-
|
|
63
|
-
shortcut?:
|
|
62
|
+
subtitle?: string;
|
|
63
|
+
shortcut?: ReactNode;
|
|
64
64
|
isDisabled?: boolean;
|
|
65
65
|
isDanger?: boolean;
|
|
66
66
|
onAction?: () => void;
|
|
@@ -9,7 +9,7 @@ import { MenuItem } from '../MenuItem/MenuItem.js';
|
|
|
9
9
|
* DropdownItem component - individual menu item for action menus.
|
|
10
10
|
* Built on shared MenuItem, adds selection mode and Dropdown context integration.
|
|
11
11
|
*/
|
|
12
|
-
const DropdownItem = React__default.forwardRef(({ itemKey, children, className, startContent, endContent,
|
|
12
|
+
const DropdownItem = React__default.forwardRef(({ itemKey, children, className, startContent, endContent, subtitle, shortcut, isDisabled = false, isDanger = false, onAction, ...props }, ref) => {
|
|
13
13
|
const { closeOnSelect, onOpenChange, disabledKeys, selectedKeys, selectionMode, onAction: contextOnAction, onSelectionChange, theme, } = useDropdownContext();
|
|
14
14
|
// Check if item is disabled
|
|
15
15
|
const disabled = isDisabled || disabledKeys.has(itemKey);
|
|
@@ -63,7 +63,7 @@ const DropdownItem = React__default.forwardRef(({ itemKey, children, className,
|
|
|
63
63
|
// Build end content: user's endContent OR selection checkmark
|
|
64
64
|
const resolvedEndContent = endContent ||
|
|
65
65
|
(selectionMode !== "none" ? (jsx("div", { className: cn("flex items-center justify-center flex-shrink-0 w-5 h-5"), children: isSelected && (jsx(CheckIcon, { className: "size-4 text-[var(--color-text-secondary)]" })) })) : undefined);
|
|
66
|
-
return (jsx(MenuItem, { ref: ref, role: itemRole, disabled: disabled, isDanger: isDanger, startContent: startContent, endContent: resolvedEndContent,
|
|
66
|
+
return (jsx(MenuItem, { ref: ref, role: itemRole, disabled: disabled, isDanger: isDanger, startContent: startContent, endContent: resolvedEndContent, subtitle: subtitle, shortcut: shortcut, onActivate: handleActivate, "data-selected": isSelected, ...(selectionMode !== "none" ? { "aria-checked": isSelected } : {}), className: className, theme: {
|
|
67
67
|
baseStyle: theme.itemBaseStyle,
|
|
68
68
|
dangerStyle: theme.itemDangerStyle,
|
|
69
69
|
focusStyle: theme.itemFocusStyle,
|
|
@@ -57,6 +57,7 @@ const DropdownMenu = React__default.forwardRef(({ children, className, animation
|
|
|
57
57
|
placement: placement,
|
|
58
58
|
offset: offset || 4,
|
|
59
59
|
autoWidth: false,
|
|
60
|
+
stickyTracking: true,
|
|
60
61
|
});
|
|
61
62
|
// Get all menu items (not separators or sections)
|
|
62
63
|
const getMenuItems = useCallback(() => {
|
|
@@ -3,7 +3,7 @@ import React__default from 'react';
|
|
|
3
3
|
import { emptyTheme } from './Empty.theme.js';
|
|
4
4
|
import { cn } from '../../../utils/cn.js';
|
|
5
5
|
|
|
6
|
-
const Empty = React__default.forwardRef(({ title,
|
|
6
|
+
const Empty = React__default.forwardRef(({ title, subtitle, image, imageAlt, icon, action, className, children, ...props }, ref) => {
|
|
7
7
|
// Fixed image and icon dimensions
|
|
8
8
|
const imageDimensions = "size-32";
|
|
9
9
|
const iconDimensions = "size-16";
|
|
@@ -11,7 +11,7 @@ const Empty = React__default.forwardRef(({ title, description, image, imageAlt,
|
|
|
11
11
|
if (children) {
|
|
12
12
|
return (jsx("div", { ref: ref, className: cn(emptyTheme.baseStyle, className), role: "region", "aria-label": "Empty state", ...props, children: children }));
|
|
13
13
|
}
|
|
14
|
-
return (jsxs("div", { ref: ref, className: cn(emptyTheme.baseStyle, className), role: "region", "aria-label": "Empty state", ...props, children: [image ? (jsx("div", { className: "flex-shrink-0 mb-6", children: jsx("img", { src: image, alt: imageAlt || "Empty state illustration", className: cn("mx-auto object-cover", imageDimensions), loading: "lazy" }) })) : icon ? (jsx("div", { className: cn("flex-shrink-0 mx-auto text-[var(--color-text-muted)] mb-6", iconDimensions), "aria-hidden": "true", children: icon })) : null, jsxs("div", { className: "flex flex-col items-center justify-center gap-1", children: [title && jsx("div", { className: emptyTheme.titleStyle, children: title }),
|
|
14
|
+
return (jsxs("div", { ref: ref, className: cn(emptyTheme.baseStyle, className), role: "region", "aria-label": "Empty state", ...props, children: [image ? (jsx("div", { className: "flex-shrink-0 mb-6", children: jsx("img", { src: image, alt: imageAlt || "Empty state illustration", className: cn("mx-auto object-cover", imageDimensions), loading: "lazy" }) })) : icon ? (jsx("div", { className: cn("flex-shrink-0 mx-auto text-[var(--color-text-muted)] mb-6", iconDimensions), "aria-hidden": "true", children: icon })) : null, jsxs("div", { className: "flex flex-col items-center justify-center gap-1", children: [title && jsx("div", { className: emptyTheme.titleStyle, children: title }), subtitle && (jsx("div", { className: emptyTheme.subtitleStyle, children: subtitle }))] }), action && (jsx("div", { className: "flex flex-col sm:flex-row gap-2 justify-center items-center mt-3", children: action }))] }));
|
|
15
15
|
});
|
|
16
16
|
// Set display name for dev tools and Storybook
|
|
17
17
|
Empty.displayName = "Empty";
|
|
@@ -5,9 +5,9 @@ const emptyTheme = {
|
|
|
5
5
|
// Base container styles - customizable spacing, colors, and layout
|
|
6
6
|
baseStyle: "flex flex-col items-center justify-center text-center w-full max-w-md mx-auto space-y-3 py-12 px-6 ",
|
|
7
7
|
// Title text styles - customizable typography and colors
|
|
8
|
-
titleStyle: "text-
|
|
9
|
-
// Description text styles - customizable typography and colors
|
|
10
|
-
|
|
8
|
+
titleStyle: "text-lg font-semibold text-[var(--color-text-primary)]",
|
|
9
|
+
// Description text styles - customizable typography and colors
|
|
10
|
+
subtitleStyle: "text-base text-[var(--color-text-muted)]",
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
export { emptyTheme };
|
|
@@ -5,8 +5,8 @@ import React from "react";
|
|
|
5
5
|
export interface EmptyProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
6
6
|
/** Primary title/heading text */
|
|
7
7
|
title?: React.ReactNode;
|
|
8
|
-
/**
|
|
9
|
-
|
|
8
|
+
/** Subtitle text explaining the empty state */
|
|
9
|
+
subtitle?: React.ReactNode;
|
|
10
10
|
/**
|
|
11
11
|
* Optional image source for illustration
|
|
12
12
|
* Note: If both image and icon are provided, image takes precedence
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
const kbdTheme = {
|
|
5
5
|
baseStyle: 'inline-flex items-center justify-center font-sans font-medium rounded-[calc(var(--radius-base)*0.75)] bg-neutral-100 border border-[var(--color-border)] text-[var(--color-text-secondary)] glass-effect',
|
|
6
6
|
sizes: {
|
|
7
|
-
sm: 'text-
|
|
8
|
-
md: 'text-
|
|
7
|
+
sm: 'text-sm px-1 py-0.5 min-w-[1.25rem]',
|
|
8
|
+
md: 'text-base px-1.5 py-0.5 min-w-[1.5rem]',
|
|
9
9
|
},
|
|
10
|
-
separatorStyle: 'text-[var(--color-text-muted)] text-
|
|
10
|
+
separatorStyle: 'text-[var(--color-text-muted)] text-sm',
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
export { kbdTheme };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { LinkProps } from "./Link.types";
|
|
3
|
-
declare const Link: React.ForwardRefExoticComponent<
|
|
3
|
+
declare const Link: React.ForwardRefExoticComponent<LinkProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
4
4
|
export { Link };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from "react";
|
|
2
2
|
import { ButtonSize } from "../Button";
|
|
3
3
|
export type LinkSize = ButtonSize | "inherit";
|
|
4
4
|
/**
|
|
5
5
|
* Link component props
|
|
6
6
|
* Extends standard anchor attributes.
|
|
7
7
|
*/
|
|
8
|
-
export interface LinkProps extends Omit<
|
|
8
|
+
export interface LinkProps extends Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'color'> {
|
|
9
9
|
/**
|
|
10
10
|
* The size of the link.
|
|
11
11
|
* @default "inherit"
|
|
@@ -14,7 +14,7 @@ const loaderTheme = {
|
|
|
14
14
|
// Linear bar (foreground)
|
|
15
15
|
linearBarStyle: "h-full rounded-full transition-all duration-300 ease-out",
|
|
16
16
|
// Label text for linear variant
|
|
17
|
-
linearLabelStyle: "text-
|
|
17
|
+
linearLabelStyle: "text-base font-medium text-[var(--color-text-secondary)] min-w-[3ch] tabular-nums",
|
|
18
18
|
// Size variants for both circular and linear
|
|
19
19
|
sizes: {
|
|
20
20
|
sm: {
|
|
@@ -9,7 +9,7 @@ import { menuItemTheme } from './MenuItem.theme.js';
|
|
|
9
9
|
* Handles visual layout, base styling, keyboard activation, and focus tracking.
|
|
10
10
|
* Context-specific behavior (selection, checked state) is handled by consumers.
|
|
11
11
|
*/
|
|
12
|
-
const MenuItem = React__default.forwardRef(({ children, className, startContent, endContent,
|
|
12
|
+
const MenuItem = React__default.forwardRef(({ children, className, startContent, endContent, subtitle, shortcut, disabled = false, isDanger = false, onActivate, theme: themeOverrides, role = "menuitem", ...props }, ref) => {
|
|
13
13
|
const [isFocused, setIsFocused] = useState(false);
|
|
14
14
|
const theme = {
|
|
15
15
|
...menuItemTheme,
|
|
@@ -26,7 +26,7 @@ const MenuItem = React__default.forwardRef(({ children, className, startContent,
|
|
|
26
26
|
handleClick();
|
|
27
27
|
}
|
|
28
28
|
}, [handleClick]);
|
|
29
|
-
return (jsxs("div", { ref: ref, role: role, tabIndex: disabled ? undefined : -1, "aria-disabled": disabled, "data-focused": isFocused, "data-disabled": disabled, className: cn(theme.baseStyle, theme.focusStyle, isDanger && theme.dangerStyle, className), onClick: handleClick, onKeyDown: handleKeyDown, onFocus: () => setIsFocused(true), onBlur: () => setIsFocused(false), ...props, children: [startContent && (jsx("div", { className: "flex items-center justify-center flex-shrink-0", children: startContent })), jsxs("div", { className: "flex-1 min-w-0", children: [jsxs("div", { className: "flex items-center justify-between gap-2", children: [jsx("span", { className: "truncate", children: children }), shortcut && (jsx("
|
|
29
|
+
return (jsxs("div", { ref: ref, role: role, tabIndex: disabled ? undefined : -1, "aria-disabled": disabled, "data-focused": isFocused, "data-disabled": disabled, className: cn(theme.baseStyle, theme.focusStyle, isDanger && theme.dangerStyle, className), onClick: handleClick, onKeyDown: handleKeyDown, onFocus: () => setIsFocused(true), onBlur: () => setIsFocused(false), ...props, children: [startContent && (jsx("div", { className: "flex items-center justify-center flex-shrink-0", children: startContent })), jsxs("div", { className: "flex-1 min-w-0", children: [jsxs("div", { className: "flex items-center justify-between gap-2", children: [jsx("span", { className: "truncate", children: children }), shortcut && (jsx("span", { className: "ml-auto flex-shrink-0", children: shortcut }))] }), subtitle && jsx("div", { className: theme.subtitleStyle, children: subtitle })] }), endContent && (jsx("div", { className: "flex items-center justify-center ml-2", children: endContent }))] }));
|
|
30
30
|
});
|
|
31
31
|
MenuItem.displayName = "MenuItem";
|
|
32
32
|
|
|
@@ -1,27 +1,25 @@
|
|
|
1
1
|
const menuItemTheme = {
|
|
2
2
|
// Base item styling with hover, focus, and disabled states
|
|
3
|
-
baseStyle: "relative flex items-center gap-2 px-2 py-1.5 text-
|
|
4
|
-
"hover:bg-[var(--color-background-
|
|
5
|
-
"data-[focused=true]:bg-[var(--color-background-
|
|
3
|
+
baseStyle: "relative flex items-center gap-2 px-2.5 py-1.5 text-base font-[500] text-[var(--color-text-primary)] cursor-pointer outline-none select-none rounded-[var(--radius-base)] transition-colors duration-300 " +
|
|
4
|
+
"hover:bg-[var(--color-background-secondary)] focus:bg-[var(--color-background-secondary)] " +
|
|
5
|
+
"data-[focused=true]:bg-[var(--color-background-secondary)] " +
|
|
6
6
|
"data-[selected=true]:bg-[var(--color-primary)]/5 data-[selected=true]:text-[var(--color-primary)] " +
|
|
7
7
|
"mb-px last-of-type:mb-0 " +
|
|
8
8
|
"data-[disabled=true]:opacity-60 data-[disabled=true]:cursor-not-allowed data-[disabled=true]:pointer-events-none " +
|
|
9
9
|
// Dark mode
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"dark:data-[focused=true]:bg-[var(--color-
|
|
10
|
+
" " +
|
|
11
|
+
" " +
|
|
12
|
+
"dark:data-[focused=true]:bg-[var(--color-background-secondary)] " +
|
|
13
13
|
"dark:hover:bg-[var(--color-neutral-700)] " +
|
|
14
14
|
"dark:data-[selected=true]:bg-[var(--color-neutral-600)]/50 dark:data-[selected=true]:text-[var(--color-text-primary)]",
|
|
15
15
|
// Danger item styling (e.g., Delete actions)
|
|
16
|
-
dangerStyle: "text-[var(--color-danger)] hover:bg-[var(--color-danger)] hover:text-
|
|
17
|
-
"dark:text-[var(--color-danger-400)] dark:hover:bg-[var(--color-danger-600)] dark:hover:text-
|
|
16
|
+
dangerStyle: "text-[var(--color-danger)] hover:bg-[var(--color-danger)] hover:text-[var(--color-danger-contrast)] " +
|
|
17
|
+
"dark:text-[var(--color-danger-400)] dark:hover:bg-[var(--color-danger-600)] dark:hover:text-[var(--color-danger-contrast)]",
|
|
18
18
|
// Focus visible styling for keyboard navigation
|
|
19
19
|
focusStyle: "focus-visible:ring-2 focus-visible:ring-[var(--color-primary)] focus-visible:ring-offset-2 " +
|
|
20
20
|
"dark:focus-visible:ring-[var(--color-primary-400)] dark:focus-visible:ring-offset-[var(--color-neutral-900)]",
|
|
21
|
-
// Keyboard shortcut display
|
|
22
|
-
shortcutStyle: "text-xs text-[var(--color-text-muted)] font-sans border border-[var(--color-border)] rounded px-1.5 py-0.5",
|
|
23
21
|
// Description text below the label
|
|
24
|
-
|
|
22
|
+
subtitleStyle: "text-sm text-[var(--color-text-muted)] mt-0.5 truncate",
|
|
25
23
|
};
|
|
26
24
|
|
|
27
25
|
export { menuItemTheme };
|
|
@@ -10,7 +10,7 @@ export interface MenuItemProps extends Omit<React.HTMLAttributes<HTMLDivElement>
|
|
|
10
10
|
/** Icon or element at the end (right side) */
|
|
11
11
|
endContent?: ReactNode;
|
|
12
12
|
/** Secondary text below the label */
|
|
13
|
-
|
|
13
|
+
subtitle?: string;
|
|
14
14
|
/** Keyboard shortcut display */
|
|
15
15
|
shortcut?: ReactNode;
|
|
16
16
|
/** Whether the item is disabled */
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { MessageProps } from
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { MessageProps } from "./Message.types";
|
|
3
3
|
export declare const Message: React.ForwardRefExoticComponent<MessageProps & React.RefAttributes<HTMLDivElement>> & {
|
|
4
4
|
Avatar: React.ForwardRefExoticComponent<import("./MessageAvatar").MessageAvatarComponentProps & React.RefAttributes<HTMLDivElement>>;
|
|
5
5
|
Content: React.ForwardRefExoticComponent<import("./MessageContent").MessageContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
6
|
Actions: React.ForwardRefExoticComponent<import("./MessageActions").MessageActionsProps & React.RefAttributes<HTMLDivElement>>;
|
|
7
7
|
Timestamp: React.ForwardRefExoticComponent<import("./MessageTimestamp").MessageTimestampProps & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
List: React.ForwardRefExoticComponent<import("./MessageList.types").MessageListProps & React.RefAttributes<import("..").ScrollAreaRef>>;
|
|
8
9
|
};
|
|
@@ -4,6 +4,7 @@ import { cn } from '../../../utils/cn.js';
|
|
|
4
4
|
import { formatTimestamp } from '../../../utils/dateUtils.js';
|
|
5
5
|
import { messageTheme } from './Message.theme.js';
|
|
6
6
|
import { Avatar } from '../Avatar/Avatar.js';
|
|
7
|
+
import { Button } from '../Button/Button.js';
|
|
7
8
|
import { motion } from 'motion/react';
|
|
8
9
|
import { DocumentDuplicateIcon, ArrowPathIcon } from '@heroicons/react/24/outline';
|
|
9
10
|
import { MessageContext } from './MessageContext.js';
|
|
@@ -11,37 +12,42 @@ import { MessageAvatar } from './MessageAvatar.js';
|
|
|
11
12
|
import { MessageContent } from './MessageContent.js';
|
|
12
13
|
import { MessageActions } from './MessageActions.js';
|
|
13
14
|
import { MessageTimestamp } from './MessageTimestamp.js';
|
|
15
|
+
import { MessageList } from './MessageList.js';
|
|
14
16
|
import { TypeWriter } from './TypeWriter.js';
|
|
15
17
|
|
|
16
18
|
const MessageFooter = ({ isStreaming, streamingIndicator, showTimestamp, timestamp, actions, timestampStyle, streamingIndicatorStyle, actionsContainerStyle, variant, }) => {
|
|
17
19
|
if (isStreaming) {
|
|
18
|
-
return (jsx("div", { className: cn(
|
|
20
|
+
return (jsx("div", { className: cn("flex flex-row items-center gap-3 mt-1", variant === "receiver" ? "ml-2" : "mr-3"), children: jsx("div", { className: cn(timestampStyle, streamingIndicatorStyle), children: streamingIndicator || (jsxs(Fragment, { children: [jsx("span", { children: "Typing" }), jsx(motion.span, { animate: { opacity: [0.4, 1, 0.4] }, transition: {
|
|
19
21
|
duration: 1.5,
|
|
20
22
|
repeat: Infinity,
|
|
21
|
-
ease:
|
|
23
|
+
ease: "easeInOut",
|
|
22
24
|
}, children: "\u2022\u2022\u2022" })] })) }) }));
|
|
23
25
|
}
|
|
24
26
|
// For system variant, only show timestamp (no actions)
|
|
25
|
-
if (variant ===
|
|
26
|
-
return showTimestamp && timestamp ? (jsx("div", { className: timestampStyle, children: jsx("time", { dateTime: typeof timestamp ===
|
|
27
|
+
if (variant === "system") {
|
|
28
|
+
return showTimestamp && timestamp ? (jsx("div", { className: timestampStyle, children: jsx("time", { dateTime: typeof timestamp === "string" ? timestamp : timestamp.toISOString(), className: "select-none", children: formatTimestamp(timestamp) }) })) : null;
|
|
27
29
|
}
|
|
28
30
|
// For sender/receiver variants, show timestamp and actions in a row
|
|
29
|
-
return (jsxs("div", { className: cn(`flex flex-row items-center gap-3 mt-
|
|
31
|
+
return (jsxs("div", { className: cn(`flex flex-row items-center gap-3 mt-3`, variant === "receiver" ? "-ml-0" : "mr-3"), children: [showTimestamp && timestamp && (jsx("div", { className: timestampStyle, children: jsx("time", { dateTime: typeof timestamp === "string"
|
|
30
32
|
? timestamp
|
|
31
33
|
: timestamp.toISOString(), className: "select-none", children: formatTimestamp(timestamp) }) })), actions && jsx("div", { className: cn(actionsContainerStyle), children: actions })] }));
|
|
32
34
|
};
|
|
33
|
-
const MessageRoot = React__default.forwardRef(({ role, variant: variantProp, content,
|
|
34
|
-
timestamp, avatar, showTimestamp = true, isStreaming = false, streamingIndicator, typingSpeed = 100, actions, onCopy, onRegenerate, showActions, className, theme: customTheme = {}, children, ...props }, ref) => {
|
|
35
|
+
const MessageRoot = React__default.forwardRef(({ role, variant: variantProp, content, timestamp, avatar, showTimestamp = false, isStreaming = false, streamingIndicator, typingSpeed = 100, actions, onCopy, onRegenerate, showActions, className, theme: customTheme = {}, children, ...props }, ref) => {
|
|
35
36
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
36
37
|
// Determine the variant: role takes precedence over variant prop
|
|
37
38
|
let variant;
|
|
38
39
|
if (role) {
|
|
39
40
|
// Map role to variant
|
|
40
|
-
variant =
|
|
41
|
+
variant =
|
|
42
|
+
role === "user"
|
|
43
|
+
? "sender"
|
|
44
|
+
: role === "assistant"
|
|
45
|
+
? "receiver"
|
|
46
|
+
: "system";
|
|
41
47
|
}
|
|
42
48
|
else {
|
|
43
49
|
// Use variant prop or default
|
|
44
|
-
variant = variantProp ||
|
|
50
|
+
variant = variantProp || "receiver";
|
|
45
51
|
}
|
|
46
52
|
// Detect if using compound API (has children)
|
|
47
53
|
const isCompoundAPI = !!children;
|
|
@@ -52,11 +58,10 @@ timestamp, avatar, showTimestamp = true, isStreaming = false, streamingIndicator
|
|
|
52
58
|
isStreaming,
|
|
53
59
|
typingSpeed,
|
|
54
60
|
}), [role, variant, isStreaming, typingSpeed]);
|
|
55
|
-
|
|
56
|
-
const messageContent = content !== null && content !== void 0 ? content : message;
|
|
61
|
+
const messageContent = content;
|
|
57
62
|
// Determine if we should show default actions
|
|
58
63
|
const shouldShowDefaultActions = showActions !== false &&
|
|
59
|
-
(variant ===
|
|
64
|
+
(variant === "receiver" || role === "assistant") &&
|
|
60
65
|
(onCopy || onRegenerate);
|
|
61
66
|
if (isCompoundAPI) {
|
|
62
67
|
// Compound API - Render with context
|
|
@@ -64,8 +69,8 @@ timestamp, avatar, showTimestamp = true, isStreaming = false, streamingIndicator
|
|
|
64
69
|
// Build container style
|
|
65
70
|
const containerStyle = cn(messageTheme.containerBaseStyle, variantTheme.containerModifier, customTheme.containerBaseStyle, (_b = (_a = customTheme.variants) === null || _a === void 0 ? void 0 : _a[variant]) === null || _b === void 0 ? void 0 : _b.containerModifier,
|
|
66
71
|
// Backward compatibility
|
|
67
|
-
variant ===
|
|
68
|
-
return (jsx(MessageContext.Provider, { value: contextValue, children: jsx("div", { ref: ref, className: cn(
|
|
72
|
+
variant === "sender" && customTheme.senderContainerStyle, variant === "receiver" && customTheme.receiverContainerStyle, variant === "system" && customTheme.systemContainerStyle);
|
|
73
|
+
return (jsx(MessageContext.Provider, { value: contextValue, children: jsx("div", { ref: ref, className: cn("w-full max-w-full group", className), "data-variant": variant, "data-role": role, ...props, children: jsx("div", { className: containerStyle, children: children }) }) }));
|
|
69
74
|
}
|
|
70
75
|
// Props API - Render inline
|
|
71
76
|
// Get variant-specific theme
|
|
@@ -73,37 +78,38 @@ timestamp, avatar, showTimestamp = true, isStreaming = false, streamingIndicator
|
|
|
73
78
|
// Build container styles
|
|
74
79
|
const containerStyle = cn(messageTheme.containerBaseStyle, variantTheme.containerModifier, customTheme.containerBaseStyle, (_d = (_c = customTheme.variants) === null || _c === void 0 ? void 0 : _c[variant]) === null || _d === void 0 ? void 0 : _d.containerModifier,
|
|
75
80
|
// Backward compatibility
|
|
76
|
-
variant ===
|
|
81
|
+
variant === "sender" && customTheme.senderContainerStyle, variant === "receiver" && customTheme.receiverContainerStyle, variant === "system" && customTheme.systemContainerStyle);
|
|
77
82
|
// Build bubble styles
|
|
78
83
|
const bubbleStyle = cn(messageTheme.bubbleBaseStyle, variantTheme.bubbleStyle, customTheme.bubbleBaseStyle, (_f = (_e = customTheme.variants) === null || _e === void 0 ? void 0 : _e[variant]) === null || _f === void 0 ? void 0 : _f.bubbleStyle,
|
|
79
84
|
// Backward compatibility
|
|
80
|
-
variant ===
|
|
85
|
+
variant === "sender" && customTheme.senderBubbleStyle, variant === "receiver" && customTheme.receiverBubbleStyle, variant === "system" && customTheme.systemBubbleStyle);
|
|
81
86
|
// Build timestamp styles
|
|
82
87
|
const timestampStyle = cn(messageTheme.timestampStyle, variantTheme.timestampModifier, customTheme.timestampStyle, (_h = (_g = customTheme.variants) === null || _g === void 0 ? void 0 : _g[variant]) === null || _h === void 0 ? void 0 : _h.timestampModifier,
|
|
83
88
|
// Backward compatibility
|
|
84
|
-
variant ===
|
|
89
|
+
variant === "sender" && customTheme.senderTimestampStyle, variant === "receiver" && customTheme.receiverTimestampStyle, variant === "system" && customTheme.systemTimestampStyle);
|
|
85
90
|
// Build default action buttons if needed
|
|
86
|
-
const defaultActionButtons = shouldShowDefaultActions ? (jsxs("div", { className: cn(messageTheme.actionsContainerStyle, customTheme.actionsContainerStyle), children: [onCopy && (jsx(
|
|
91
|
+
const defaultActionButtons = shouldShowDefaultActions ? (jsxs("div", { className: cn(messageTheme.actionsContainerStyle, customTheme.actionsContainerStyle), children: [onCopy && (jsx(Button, { variant: "link", color: "neutral", size: "sm", onClick: onCopy, "aria-label": "Copy message", className: "opacity-40 hover:opacity-100", children: jsx(DocumentDuplicateIcon, { className: "size-4" }) })), onRegenerate && (jsx(Button, { variant: "link", color: "neutral", size: "sm", onClick: onRegenerate, "aria-label": "Regenerate response", className: "opacity-40 hover:opacity-100", children: jsx(ArrowPathIcon, { className: "size-4" }) }))] })) : undefined;
|
|
87
92
|
// Use custom actions if provided, otherwise use default actions
|
|
88
93
|
const finalActions = actions !== null && actions !== void 0 ? actions : defaultActionButtons;
|
|
89
94
|
// Use TypeWriter for streaming receiver/assistant messages with string content (props API)
|
|
90
|
-
const shouldAnimate = (variant ===
|
|
95
|
+
const shouldAnimate = (variant === "receiver" || role === "assistant") &&
|
|
91
96
|
isStreaming &&
|
|
92
|
-
typeof messageContent ===
|
|
97
|
+
typeof messageContent === "string";
|
|
93
98
|
const renderedContent = shouldAnimate ? (jsx(TypeWriter, { text: messageContent, speed: typingSpeed, enabled: true, className: "break-words" })) : (messageContent);
|
|
94
99
|
// System messages render differently (centered, no avatar)
|
|
95
|
-
if (variant ===
|
|
96
|
-
return (jsx("div", { ref: ref, className: cn(
|
|
100
|
+
if (variant === "system") {
|
|
101
|
+
return (jsx("div", { ref: ref, className: cn("w-full max-w-full", className), "data-variant": "system", "data-role": role, ...props, children: jsxs("div", { className: containerStyle, children: [jsx("div", { className: bubbleStyle, children: typeof renderedContent === "string" ? (jsx("p", { className: "text-base", children: renderedContent })) : (renderedContent) }), jsx(MessageFooter, { isStreaming: isStreaming, streamingIndicator: streamingIndicator, showTimestamp: showTimestamp, timestamp: timestamp, actions: undefined, timestampStyle: timestampStyle, streamingIndicatorStyle: cn(messageTheme.streamingIndicatorStyle, customTheme.streamingIndicatorStyle), actionsContainerStyle: undefined, variant: "system" })] }) }));
|
|
97
102
|
}
|
|
98
|
-
return (jsx("div", { ref: ref, className: cn(
|
|
103
|
+
return (jsx("div", { ref: ref, className: cn("w-full max-w-full group", className), "data-variant": variant, "data-role": role, ...props, children: jsxs("div", { className: containerStyle, children: [avatar && (jsx("div", { className: "flex-shrink-0", children: jsx(Avatar, { src: avatar.src, alt: avatar.alt, fallback: avatar.fallback, size: "xs" }) })), jsxs("div", { className: cn("flex flex-col", variant === "sender" ? "items-end" : "items-start"), children: [jsx("div", { className: bubbleStyle, children: typeof renderedContent === "string" ? (jsx("p", { className: "break-words", children: renderedContent })) : (renderedContent) }), jsx(MessageFooter, { isStreaming: isStreaming, streamingIndicator: streamingIndicator, showTimestamp: showTimestamp, timestamp: timestamp, actions: finalActions, timestampStyle: timestampStyle, streamingIndicatorStyle: cn(messageTheme.streamingIndicatorStyle, customTheme.streamingIndicatorStyle), actionsContainerStyle: cn(messageTheme.actionsContainerStyle, customTheme.actionsContainerStyle), variant: variant })] })] }) }));
|
|
99
104
|
});
|
|
100
|
-
MessageRoot.displayName =
|
|
105
|
+
MessageRoot.displayName = "Message";
|
|
101
106
|
// Attach compound components
|
|
102
107
|
const Message = Object.assign(MessageRoot, {
|
|
103
108
|
Avatar: MessageAvatar,
|
|
104
109
|
Content: MessageContent,
|
|
105
110
|
Actions: MessageActions,
|
|
106
111
|
Timestamp: MessageTimestamp,
|
|
112
|
+
List: MessageList,
|
|
107
113
|
});
|
|
108
114
|
|
|
109
115
|
export { Message };
|
|
@@ -4,43 +4,41 @@
|
|
|
4
4
|
*/
|
|
5
5
|
const messageTheme = {
|
|
6
6
|
// Shared base styles (apply to all variants)
|
|
7
|
-
bubbleBaseStyle:
|
|
8
|
-
containerBaseStyle:
|
|
9
|
-
timestampStyle:
|
|
7
|
+
bubbleBaseStyle: "max-w-[80%] sm:max-w-[85%] rounded-[calc(var(--radius-base)*1.5)] px-3 py-2 w-fit min-w-fit h-fit",
|
|
8
|
+
containerBaseStyle: "flex items-start gap-3 h-fit text-base",
|
|
9
|
+
timestampStyle: "text-sm text-[var(--color-text-placeholder)] dark:text-[var(--color-neutral-500)]",
|
|
10
10
|
// Variant-specific modifiers (only differences)
|
|
11
11
|
variants: {
|
|
12
12
|
sender: {
|
|
13
|
-
containerModifier:
|
|
14
|
-
bubbleStyle:
|
|
15
|
-
|
|
13
|
+
containerModifier: "flex-row-reverse", // Reverse direction for right alignment
|
|
14
|
+
bubbleStyle: "bg-[var(--color-background-secondary)] text-[var(--color-text-secondary)] " +
|
|
15
|
+
"rounded-tr-xs " +
|
|
16
16
|
// Dark mode - slightly darker gradient for better contrast
|
|
17
|
-
|
|
18
|
-
timestampModifier:
|
|
17
|
+
" ",
|
|
18
|
+
timestampModifier: "text-right pr-1",
|
|
19
19
|
},
|
|
20
20
|
receiver: {
|
|
21
|
-
containerModifier:
|
|
22
|
-
bubbleStyle:
|
|
23
|
-
|
|
21
|
+
containerModifier: "", // Default direction (no modifier needed)
|
|
22
|
+
bubbleStyle: " text-[var(--color-text-secondary)] rounded-tl-xs py-0 px-0 " +
|
|
23
|
+
" " +
|
|
24
24
|
// Dark mode - dark background with lighter text
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
timestampModifier:
|
|
25
|
+
" " +
|
|
26
|
+
"",
|
|
27
|
+
timestampModifier: "text-left pl-1",
|
|
28
28
|
},
|
|
29
29
|
system: {
|
|
30
|
-
containerModifier:
|
|
31
|
-
bubbleStyle:
|
|
32
|
-
|
|
30
|
+
containerModifier: "justify-center", // Center alignment
|
|
31
|
+
bubbleStyle: "bg-[var(--color-background)] text-[var(--color-text-muted)]/80 rounded-[calc(var(--radius-base)*0.75)] px-1 py-0.5 " +
|
|
32
|
+
"text-sm border-none " +
|
|
33
33
|
// Dark mode
|
|
34
|
-
|
|
35
|
-
timestampModifier:
|
|
34
|
+
"",
|
|
35
|
+
timestampModifier: "text-center",
|
|
36
36
|
},
|
|
37
37
|
},
|
|
38
38
|
// Feature styles (streaming, actions)
|
|
39
|
-
streamingIndicatorStyle:
|
|
40
|
-
|
|
41
|
-
actionsContainerStyle:
|
|
42
|
-
actionButtonStyle: 'text-[var(--color-text-placeholder)] hover:text-[var(--color-text-primary)] ' +
|
|
43
|
-
'transition-colors cursor-pointer dark:text-[var(--color-neutral-500)] dark:hover:text-[var(--color-neutral-300)]',
|
|
39
|
+
streamingIndicatorStyle: "flex items-center gap-1 text-[var(--color-text-placeholder)] text-sm " +
|
|
40
|
+
"dark:text-[var(--color-neutral-500)]",
|
|
41
|
+
actionsContainerStyle: "flex items-start gap-3",
|
|
44
42
|
};
|
|
45
43
|
|
|
46
44
|
export { messageTheme };
|
|
@@ -50,11 +50,6 @@ export interface MessageProps extends Omit<React.HTMLAttributes<HTMLDivElement>,
|
|
|
50
50
|
* Note: Optional when using compound API with Message.Content
|
|
51
51
|
*/
|
|
52
52
|
content?: ReactNode;
|
|
53
|
-
/**
|
|
54
|
-
* Deprecated alias for content (for backward compatibility)
|
|
55
|
-
* @deprecated Use content instead
|
|
56
|
-
*/
|
|
57
|
-
message?: ReactNode;
|
|
58
53
|
/**
|
|
59
54
|
* The timestamp of the message
|
|
60
55
|
*/
|
|
@@ -131,7 +126,6 @@ export interface MessageTheme {
|
|
|
131
126
|
};
|
|
132
127
|
streamingIndicatorStyle: string;
|
|
133
128
|
actionsContainerStyle: string;
|
|
134
|
-
actionButtonStyle: string;
|
|
135
129
|
}
|
|
136
130
|
/**
|
|
137
131
|
* Theme overrides for Message component
|
|
@@ -147,7 +141,6 @@ export interface MessageThemeOverrides {
|
|
|
147
141
|
};
|
|
148
142
|
streamingIndicatorStyle?: string;
|
|
149
143
|
actionsContainerStyle?: string;
|
|
150
|
-
actionButtonStyle?: string;
|
|
151
144
|
/** @deprecated Use variants.sender.containerModifier instead */
|
|
152
145
|
senderContainerStyle?: string;
|
|
153
146
|
/** @deprecated Use variants.sender.bubbleStyle instead */
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Variants } from 'motion/react';
|
|
2
|
+
/**
|
|
3
|
+
* Returns animation variants for message list items, or undefined
|
|
4
|
+
* when animations should be disabled (reduced motion or shouldAnimate=false).
|
|
5
|
+
*/
|
|
6
|
+
export declare const getMessageItemVariants: (shouldReduceMotion: boolean | null, shouldAnimate: boolean) => Variants | undefined;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns animation variants for message list items, or undefined
|
|
3
|
+
* when animations should be disabled (reduced motion or shouldAnimate=false).
|
|
4
|
+
*/
|
|
5
|
+
const getMessageItemVariants = (shouldReduceMotion, shouldAnimate) => {
|
|
6
|
+
if (shouldReduceMotion || !shouldAnimate)
|
|
7
|
+
return undefined;
|
|
8
|
+
return {
|
|
9
|
+
initial: {
|
|
10
|
+
opacity: 0,
|
|
11
|
+
y: 10,
|
|
12
|
+
},
|
|
13
|
+
animate: {
|
|
14
|
+
opacity: 1,
|
|
15
|
+
y: 0,
|
|
16
|
+
transition: {
|
|
17
|
+
duration: 0.3,
|
|
18
|
+
ease: [0.2, 0.65, 0.3, 0.9],
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
exit: {
|
|
22
|
+
opacity: 0,
|
|
23
|
+
scale: 0.97,
|
|
24
|
+
transition: {
|
|
25
|
+
duration: 0.15,
|
|
26
|
+
ease: 'easeIn',
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export { getMessageItemVariants };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ScrollAreaRef } from '../ScrollArea/ScrollArea.types';
|
|
3
|
+
import type { MessageListProps } from './MessageList.types';
|
|
4
|
+
declare const MessageList: React.ForwardRefExoticComponent<MessageListProps & React.RefAttributes<ScrollAreaRef>>;
|
|
5
|
+
export { MessageList };
|