@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,4 +1,4 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
2
|
/**
|
|
3
3
|
* Tag component props
|
|
4
4
|
*/
|
|
@@ -11,6 +11,23 @@ export interface TagProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "o
|
|
|
11
11
|
removable?: boolean;
|
|
12
12
|
/** Callback when the remove button is clicked */
|
|
13
13
|
onRemove?: () => void;
|
|
14
|
+
/**
|
|
15
|
+
* Avatar configuration — renders a sized avatar to the left of the label.
|
|
16
|
+
* The component controls avatar sizing and styling internally.
|
|
17
|
+
* Takes precedence over startContent.
|
|
18
|
+
*/
|
|
19
|
+
avatar?: {
|
|
20
|
+
src?: string;
|
|
21
|
+
alt: string;
|
|
22
|
+
fallback?: ReactNode;
|
|
23
|
+
initialsCount?: number;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Generic content to display at the start (before the label).
|
|
27
|
+
* Use for icons, emojis, or any custom ReactNode.
|
|
28
|
+
* Ignored when avatar is provided.
|
|
29
|
+
*/
|
|
30
|
+
startContent?: ReactNode;
|
|
14
31
|
/** Whether the tag is disabled */
|
|
15
32
|
disabled?: boolean;
|
|
16
33
|
/** Additional class name for the tag */
|
|
@@ -24,6 +41,10 @@ export interface TagTheme {
|
|
|
24
41
|
baseStyle: string;
|
|
25
42
|
/** Size-specific styles */
|
|
26
43
|
sizes: Record<TagSize, string>;
|
|
44
|
+
/** Avatar sizes for each tag size */
|
|
45
|
+
avatarSizes: Record<TagSize, string>;
|
|
46
|
+
/** Start content sizes for each tag size */
|
|
47
|
+
startContentSizes: Record<TagSize, string>;
|
|
27
48
|
/** Disabled state style */
|
|
28
49
|
disabledStyle: string;
|
|
29
50
|
/** Remove button style */
|
|
@@ -34,6 +55,8 @@ export interface TagTheme {
|
|
|
34
55
|
export interface TagThemeOverrides {
|
|
35
56
|
baseStyle?: string;
|
|
36
57
|
sizes?: Partial<Record<TagSize, string>>;
|
|
58
|
+
avatarSizes?: Partial<Record<TagSize, string>>;
|
|
59
|
+
startContentSizes?: Partial<Record<TagSize, string>>;
|
|
37
60
|
disabledStyle?: string;
|
|
38
61
|
removeButtonStyle?: string;
|
|
39
62
|
removeIconSizes?: Partial<Record<TagSize, string>>;
|
|
@@ -20,8 +20,8 @@ onDismiss, index = 0, isExpanded = false, totalToasts = 1, onMouseEnter, onMouse
|
|
|
20
20
|
}
|
|
21
21
|
}, [ref]);
|
|
22
22
|
const shouldReduceMotion = useReducedMotion();
|
|
23
|
-
const { id, variant = 'default', state = 'default', title,
|
|
24
|
-
const isTextOnly = !
|
|
23
|
+
const { id, variant = 'default', state = 'default', title, subtitle, icon, action, duration = 5000, dismissible = true, } = toast;
|
|
24
|
+
const isTextOnly = !subtitle && !action;
|
|
25
25
|
const defaultIcon = state === 'loading'
|
|
26
26
|
? (jsx(motion.div, { animate: { rotate: 360 }, transition: { repeat: Infinity, duration: 1, ease: "linear" }, children: jsx(ArrowPathIcon, { className: "w-5 h-5" }) }))
|
|
27
27
|
: jsx(InformationCircleIcon, { className: "w-5 h-5" });
|
|
@@ -41,7 +41,7 @@ onDismiss, index = 0, isExpanded = false, totalToasts = 1, onMouseEnter, onMouse
|
|
|
41
41
|
const height = internalRef.current.offsetHeight;
|
|
42
42
|
onHeightChange(id, height);
|
|
43
43
|
}
|
|
44
|
-
}, [id, onHeightChange, title,
|
|
44
|
+
}, [id, onHeightChange, title, subtitle]);
|
|
45
45
|
const handleDismiss = () => {
|
|
46
46
|
onDismiss === null || onDismiss === void 0 ? void 0 : onDismiss(id);
|
|
47
47
|
};
|
|
@@ -73,7 +73,7 @@ onDismiss, index = 0, isExpanded = false, totalToasts = 1, onMouseEnter, onMouse
|
|
|
73
73
|
}, [stackingStyle.zIndex, index]);
|
|
74
74
|
const toastNode = (jsxs(motion.div, { ref: setRefs, layout: true, initial: shouldReduceMotion ? false : toastAnimations.initial, animate: animateValue, exit: shouldReduceMotion
|
|
75
75
|
? { ...toastAnimations.exit, transition: { duration: 0 } }
|
|
76
|
-
: toastAnimations.exit, transition: shouldReduceMotion ? { duration: 0 } : toastAnimations.transition, className: cn(toastTheme.baseStyle, isTextOnly && 'items-center', ((_a = toastTheme.variants) === null || _a === void 0 ? void 0 : _a[variant]) || "", 'pointer-events-auto', index > 0 && !isExpanded && 'absolute top-0 left-0', className), style: styleValue, role: "alert", "aria-live": "polite", children: [jsx("div", { className: isTextOnly ? toastTheme.iconCenteredStyle : toastTheme.iconStyle, children: resolvedIcon }), jsxs("div", { className: "flex-1 min-w-0", children: [title && (jsx("div", { className: isTextOnly ? toastTheme.textOnlyStyle : toastTheme.titleStyle, children: title })),
|
|
76
|
+
: toastAnimations.exit, transition: shouldReduceMotion ? { duration: 0 } : toastAnimations.transition, className: cn(toastTheme.baseStyle, isTextOnly && 'items-center', ((_a = toastTheme.variants) === null || _a === void 0 ? void 0 : _a[variant]) || "", 'pointer-events-auto', index > 0 && !isExpanded && 'absolute top-0 left-0', className), style: styleValue, role: "alert", "aria-live": "polite", children: [jsx("div", { className: isTextOnly ? toastTheme.iconCenteredStyle : toastTheme.iconStyle, children: resolvedIcon }), jsxs("div", { className: "flex-1 min-w-0", children: [title && (jsx("div", { className: isTextOnly ? toastTheme.textOnlyStyle : toastTheme.titleStyle, children: title })), subtitle && (jsx("div", { className: toastTheme.subtitleStyle, children: subtitle })), action && (jsx("div", { className: "mt-2", children: jsx("button", { type: "button", className: toastTheme.actionStyle, onClick: handleActionClick, children: action.label }) }))] }), dismissible && (jsx("button", { type: "button", className: isTextOnly ? toastTheme.closeButtonCenteredStyle : toastTheme.closeButtonStyle, onClick: handleDismiss, "aria-label": "Dismiss notification", children: jsx(XMarkIcon, { className: "w-4 h-4" }) }))] }));
|
|
77
77
|
if (darkMode) {
|
|
78
78
|
return jsx("div", { className: "dark", children: toastNode });
|
|
79
79
|
}
|
|
@@ -8,10 +8,10 @@ const toastTheme = {
|
|
|
8
8
|
},
|
|
9
9
|
iconStyle: "flex-shrink-0 size-5 mt-0.5",
|
|
10
10
|
iconCenteredStyle: "flex-shrink-0 size-5",
|
|
11
|
-
titleStyle: "font-semibold text-
|
|
12
|
-
textOnlyStyle: "text-
|
|
13
|
-
|
|
14
|
-
actionStyle: "text-
|
|
11
|
+
titleStyle: "font-semibold text-base",
|
|
12
|
+
textOnlyStyle: "text-base",
|
|
13
|
+
subtitleStyle: "text-base mt-0.5 opacity-60",
|
|
14
|
+
actionStyle: "text-sm font-medium px-2 py-1 rounded border bg-white/80 hover:bg-white transition-colors cursor-pointer " +
|
|
15
15
|
"dark:bg-white/10 dark:border-white/20 dark:hover:bg-white/20 dark:text-white",
|
|
16
16
|
closeButtonStyle: "absolute top-2 right-2 flex-shrink-0 w-4 h-4 opacity-70 hover:opacity-100 transition-opacity cursor-pointer",
|
|
17
17
|
closeButtonCenteredStyle: "flex-shrink-0 w-4 h-4 opacity-70 hover:opacity-100 transition-opacity cursor-pointer",
|
|
@@ -19,7 +19,7 @@ export interface ToastTheme {
|
|
|
19
19
|
iconCenteredStyle: string;
|
|
20
20
|
titleStyle: string;
|
|
21
21
|
textOnlyStyle: string;
|
|
22
|
-
|
|
22
|
+
subtitleStyle: string;
|
|
23
23
|
actionStyle: string;
|
|
24
24
|
closeButtonStyle: string;
|
|
25
25
|
closeButtonCenteredStyle: string;
|
|
@@ -32,7 +32,7 @@ export interface ToastThemeOverrides {
|
|
|
32
32
|
iconCenteredStyle?: string;
|
|
33
33
|
titleStyle?: string;
|
|
34
34
|
textOnlyStyle?: string;
|
|
35
|
-
|
|
35
|
+
subtitleStyle?: string;
|
|
36
36
|
actionStyle?: string;
|
|
37
37
|
closeButtonStyle?: string;
|
|
38
38
|
closeButtonCenteredStyle?: string;
|
|
@@ -43,7 +43,7 @@ export interface ToastData {
|
|
|
43
43
|
variant?: ToastVariant;
|
|
44
44
|
state?: ToastState;
|
|
45
45
|
title?: string;
|
|
46
|
-
|
|
46
|
+
subtitle?: string;
|
|
47
47
|
icon?: ReactNode;
|
|
48
48
|
action?: ToastAction;
|
|
49
49
|
duration?: number;
|
|
@@ -107,22 +107,22 @@ export interface UseToastOptions {
|
|
|
107
107
|
}
|
|
108
108
|
export interface UseToastReturn {
|
|
109
109
|
toast: (title: string, options?: UseToastOptions & {
|
|
110
|
-
|
|
110
|
+
subtitle?: string;
|
|
111
111
|
}) => string;
|
|
112
112
|
success: (title: string, options?: UseToastOptions & {
|
|
113
|
-
|
|
113
|
+
subtitle?: string;
|
|
114
114
|
}) => string;
|
|
115
115
|
error: (title: string, options?: UseToastOptions & {
|
|
116
|
-
|
|
116
|
+
subtitle?: string;
|
|
117
117
|
}) => string;
|
|
118
118
|
warning: (title: string, options?: UseToastOptions & {
|
|
119
|
-
|
|
119
|
+
subtitle?: string;
|
|
120
120
|
}) => string;
|
|
121
121
|
info: (title: string, options?: UseToastOptions & {
|
|
122
|
-
|
|
122
|
+
subtitle?: string;
|
|
123
123
|
}) => string;
|
|
124
124
|
loading: (title: string, options?: Omit<UseToastOptions, 'state'> & {
|
|
125
|
-
|
|
125
|
+
subtitle?: string;
|
|
126
126
|
}) => string;
|
|
127
127
|
dismiss: (id: string) => void;
|
|
128
128
|
dismissAll: () => void;
|
|
@@ -14,7 +14,7 @@ const useToast = () => {
|
|
|
14
14
|
title,
|
|
15
15
|
variant: options === null || options === void 0 ? void 0 : options.variant,
|
|
16
16
|
state: (options === null || options === void 0 ? void 0 : options.state) || 'default',
|
|
17
|
-
|
|
17
|
+
subtitle: options === null || options === void 0 ? void 0 : options.subtitle,
|
|
18
18
|
duration: options === null || options === void 0 ? void 0 : options.duration,
|
|
19
19
|
dismissible: options === null || options === void 0 ? void 0 : options.dismissible,
|
|
20
20
|
action: options === null || options === void 0 ? void 0 : options.action,
|
|
@@ -26,7 +26,7 @@ const useToast = () => {
|
|
|
26
26
|
title,
|
|
27
27
|
variant: options === null || options === void 0 ? void 0 : options.variant,
|
|
28
28
|
state: (options === null || options === void 0 ? void 0 : options.state) || 'default',
|
|
29
|
-
|
|
29
|
+
subtitle: options === null || options === void 0 ? void 0 : options.subtitle,
|
|
30
30
|
duration: options === null || options === void 0 ? void 0 : options.duration,
|
|
31
31
|
dismissible: options === null || options === void 0 ? void 0 : options.dismissible,
|
|
32
32
|
action: options === null || options === void 0 ? void 0 : options.action,
|
|
@@ -38,7 +38,7 @@ const useToast = () => {
|
|
|
38
38
|
title,
|
|
39
39
|
variant: options === null || options === void 0 ? void 0 : options.variant,
|
|
40
40
|
state: (options === null || options === void 0 ? void 0 : options.state) || 'default',
|
|
41
|
-
|
|
41
|
+
subtitle: options === null || options === void 0 ? void 0 : options.subtitle,
|
|
42
42
|
duration: options === null || options === void 0 ? void 0 : options.duration,
|
|
43
43
|
dismissible: options === null || options === void 0 ? void 0 : options.dismissible,
|
|
44
44
|
action: options === null || options === void 0 ? void 0 : options.action,
|
|
@@ -50,7 +50,7 @@ const useToast = () => {
|
|
|
50
50
|
title,
|
|
51
51
|
variant: options === null || options === void 0 ? void 0 : options.variant,
|
|
52
52
|
state: (options === null || options === void 0 ? void 0 : options.state) || 'default',
|
|
53
|
-
|
|
53
|
+
subtitle: options === null || options === void 0 ? void 0 : options.subtitle,
|
|
54
54
|
duration: options === null || options === void 0 ? void 0 : options.duration,
|
|
55
55
|
dismissible: options === null || options === void 0 ? void 0 : options.dismissible,
|
|
56
56
|
action: options === null || options === void 0 ? void 0 : options.action,
|
|
@@ -62,7 +62,7 @@ const useToast = () => {
|
|
|
62
62
|
title,
|
|
63
63
|
variant: options === null || options === void 0 ? void 0 : options.variant,
|
|
64
64
|
state: (options === null || options === void 0 ? void 0 : options.state) || 'default',
|
|
65
|
-
|
|
65
|
+
subtitle: options === null || options === void 0 ? void 0 : options.subtitle,
|
|
66
66
|
duration: options === null || options === void 0 ? void 0 : options.duration,
|
|
67
67
|
dismissible: options === null || options === void 0 ? void 0 : options.dismissible,
|
|
68
68
|
action: options === null || options === void 0 ? void 0 : options.action,
|
|
@@ -75,7 +75,7 @@ const useToast = () => {
|
|
|
75
75
|
title,
|
|
76
76
|
variant: options === null || options === void 0 ? void 0 : options.variant,
|
|
77
77
|
state: 'loading',
|
|
78
|
-
|
|
78
|
+
subtitle: options === null || options === void 0 ? void 0 : options.subtitle,
|
|
79
79
|
duration: (_a = options === null || options === void 0 ? void 0 : options.duration) !== null && _a !== void 0 ? _a : 0, // Loading toasts don't auto-dismiss by default
|
|
80
80
|
dismissible: (_b = options === null || options === void 0 ? void 0 : options.dismissible) !== null && _b !== void 0 ? _b : false, // Loading toasts are not dismissible by default
|
|
81
81
|
action: options === null || options === void 0 ? void 0 : options.action,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const tooltipTheme = {
|
|
2
2
|
// Base style for the tooltip - using fixed positioning for portal rendering
|
|
3
|
-
baseStyle: "fixed z-[99] rounded-[var(--tooltip-radius)] py-1 px-2 text-
|
|
3
|
+
baseStyle: "fixed z-[99] rounded-[var(--tooltip-radius)] py-1 px-2 text-sm text-[var(--color-text-primary)] focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-primary)] focus-visible:ring-offset-2 pointer-events-none bg-white/60 backdrop-blur-md outline outline-[var(--color-border)] shadow-lg border-t-[1px] border-white " +
|
|
4
4
|
"dark:bg-neutral-800/80 dark:outline-[var(--color-border)]/80 dark:border-[var(--color-border)]",
|
|
5
5
|
};
|
|
6
6
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const treeTheme = {
|
|
2
2
|
baseStyle: 'flex flex-col w-full',
|
|
3
3
|
nodeStyle: 'flex items-center py-1 pr-1 rounded-[calc(var(--radius-base)*0.75)] hover:bg-[var(--color-background-secondary)] cursor-pointer transition-colors select-none gap-2',
|
|
4
|
-
labelStyle: 'flex-1 text-
|
|
4
|
+
labelStyle: 'flex-1 text-lg text-[var(--color-text-primary)] truncate',
|
|
5
5
|
iconStyle: 'flex-shrink-0 text-[var(--color-text-muted)]',
|
|
6
6
|
expandIconStyle: 'flex-shrink-0 mr-1 text-[var(--color-text-muted)] hover:text-[var(--color-text-primary)] transition-colors cursor-pointer size-4 flex items-center justify-center',
|
|
7
7
|
indentSize: '1rem',
|
|
@@ -16,24 +16,21 @@ export * from "./Separator";
|
|
|
16
16
|
export * from "./Drawer";
|
|
17
17
|
export * from "./Dropdown";
|
|
18
18
|
export * from "./Kbd";
|
|
19
|
-
export * from "./KPI";
|
|
20
19
|
export * from "./MenuItem";
|
|
21
20
|
export * from "./Link";
|
|
22
21
|
export * from "./Loader";
|
|
23
|
-
export * from "./Metric";
|
|
24
22
|
export * from "./Modal";
|
|
25
23
|
export * from "./ModalStack";
|
|
24
|
+
export * from "./PageHeading";
|
|
26
25
|
export * from "./Pagination";
|
|
27
26
|
export * from "./Popover";
|
|
28
27
|
export * from "./Progress";
|
|
29
|
-
export * from "./ProgressiveBlur";
|
|
30
28
|
export * from "./Rating";
|
|
31
29
|
export * from "./ScrollArea";
|
|
32
30
|
export * from "./Segmented";
|
|
33
31
|
export * from "./Skeleton";
|
|
34
32
|
export * from "./SlidingNumber";
|
|
35
33
|
export * from "./Tabs";
|
|
36
|
-
export * from "./Timeline";
|
|
37
34
|
export * from "./Tooltip";
|
|
38
35
|
export * from "./Tree";
|
|
39
36
|
export * from "./Tag";
|
|
@@ -42,14 +39,12 @@ export * from "./Toast";
|
|
|
42
39
|
export * from "./Spinner";
|
|
43
40
|
export * from "./Message";
|
|
44
41
|
export * from "./Empty";
|
|
45
|
-
export * from "./Feed";
|
|
46
42
|
export * from "./Masonry";
|
|
47
|
-
export * from "./Table";
|
|
48
43
|
export * from "./DragDrop";
|
|
49
44
|
export * from "./Sortable";
|
|
50
45
|
export * from "./NavItem";
|
|
51
46
|
export * from "./Sidebar";
|
|
52
47
|
export * from "./OfflineIndicator";
|
|
53
48
|
export * from "./ContextMenu";
|
|
54
|
-
export * from "./DescriptionList";
|
|
55
49
|
export * from "./Pill";
|
|
50
|
+
export * from "./SocialIcon";
|
|
@@ -7,6 +7,7 @@ export { Badge } from './Badge/Badge.js';
|
|
|
7
7
|
export { Breadcrumbs } from './Breadcrumbs/Breadcrumbs.js';
|
|
8
8
|
export { breadcrumbsTheme, breadcrumbsVariants, defaultSeparator } from './Breadcrumbs/Breadcrumbs.theme.js';
|
|
9
9
|
export { Button } from './Button/Button.js';
|
|
10
|
+
export { getRippleAnimation, getRippleColorClass, useRipple } from './Button/Button.ripple.js';
|
|
10
11
|
export { ButtonGroup } from './ButtonGroup/ButtonGroup.js';
|
|
11
12
|
export { ButtonGroupSeparator } from './ButtonGroup/ButtonGroupSeparator.js';
|
|
12
13
|
export { ButtonGroupText } from './ButtonGroup/ButtonGroupText.js';
|
|
@@ -30,20 +31,17 @@ export { DropdownSection } from './Dropdown/DropdownSection.js';
|
|
|
30
31
|
export { DropdownSeparator } from './Dropdown/DropdownSeparator.js';
|
|
31
32
|
export { dropdownTheme } from './Dropdown/Dropdown.theme.js';
|
|
32
33
|
export { Kbd } from './Kbd/Kbd.js';
|
|
33
|
-
export { KPI } from './KPI/KPI.js';
|
|
34
34
|
export { MenuItem } from './MenuItem/MenuItem.js';
|
|
35
35
|
export { menuItemTheme } from './MenuItem/MenuItem.theme.js';
|
|
36
36
|
export { Link } from './Link/Link.js';
|
|
37
37
|
export { Loader } from './Loader/Loader.js';
|
|
38
|
-
export { Metric } from './Metric/Metric.js';
|
|
39
|
-
export { metricTheme } from './Metric/Metric.theme.js';
|
|
40
38
|
export { Modal } from './Modal/Modal.js';
|
|
41
39
|
export { ModalStack } from './ModalStack/ModalStack.js';
|
|
40
|
+
export { PageHeading } from './PageHeading/PageHeading.js';
|
|
42
41
|
export { Pagination } from './Pagination/Pagination.js';
|
|
43
42
|
export { Popover } from './Popover/Popover.js';
|
|
44
43
|
export { PopoverContext, usePopoverContext } from './Popover/PopoverContext.js';
|
|
45
44
|
export { Progress } from './Progress/Progress.js';
|
|
46
|
-
export { ProgressiveBlur } from './ProgressiveBlur/ProgressiveBlur.js';
|
|
47
45
|
export { Rating } from './Rating/Rating.js';
|
|
48
46
|
export { ScrollArea } from './ScrollArea/ScrollArea.js';
|
|
49
47
|
export { scrollAreaTheme } from './ScrollArea/ScrollArea.theme.js';
|
|
@@ -56,7 +54,6 @@ export { TabsList } from './Tabs/TabsList.js';
|
|
|
56
54
|
export { TabsTrigger } from './Tabs/TabsTrigger.js';
|
|
57
55
|
export { TabsContent } from './Tabs/TabsContent.js';
|
|
58
56
|
export { TabsContext, useTabsContext } from './Tabs/TabsContext.js';
|
|
59
|
-
export { Timeline } from './Timeline/Timeline.js';
|
|
60
57
|
export { Tooltip } from './Tooltip/Tooltip.js';
|
|
61
58
|
export { baseTooltipVariants, getTooltipVariants, tooltipSpringConfig } from './Tooltip/Tooltip.animations.js';
|
|
62
59
|
export { Tree } from './Tree/Tree.js';
|
|
@@ -72,13 +69,12 @@ export { toastTheme } from './Toast/Toast.theme.js';
|
|
|
72
69
|
export { Spinner } from './Spinner/Spinner.js';
|
|
73
70
|
export { Message } from './Message/Message.js';
|
|
74
71
|
export { messageTheme } from './Message/Message.theme.js';
|
|
72
|
+
export { messageListTheme } from './Message/MessageList.theme.js';
|
|
75
73
|
export { TypeWriter } from './Message/TypeWriter.js';
|
|
76
74
|
export { Empty } from './Empty/Empty.js';
|
|
77
75
|
export { emptyTheme } from './Empty/Empty.theme.js';
|
|
78
|
-
export { Feed } from './Feed/Feed.js';
|
|
79
76
|
export { Masonry } from './Masonry/Masonry.js';
|
|
80
77
|
export { getMasonryTheme, masonryTheme } from './Masonry/Masonry.theme.js';
|
|
81
|
-
export { Table } from './Table/index.js';
|
|
82
78
|
export { DragDropProvider, Draggable, Droppable } from './DragDrop/DragDrop.js';
|
|
83
79
|
export { Sortable, SortableItem } from './Sortable/Sortable.js';
|
|
84
80
|
export { NavItem } from './NavItem/NavItem.js';
|
|
@@ -95,22 +91,17 @@ export { OfflineIndicator } from './OfflineIndicator/OfflineIndicator.js';
|
|
|
95
91
|
export { offlineIndicatorTheme } from './OfflineIndicator/OfflineIndicator.theme.js';
|
|
96
92
|
export { ContextMenu } from './ContextMenu/ContextMenu.js';
|
|
97
93
|
export { contextMenuTheme } from './ContextMenu/ContextMenu.theme.js';
|
|
98
|
-
export { DescriptionList } from './DescriptionList/DescriptionList.js';
|
|
99
94
|
export { Pill } from './Pill/Pill.js';
|
|
100
95
|
export { pillTheme } from './Pill/Pill.theme.js';
|
|
96
|
+
export { SocialIcon } from './SocialIcon/SocialIcon.js';
|
|
101
97
|
export { AnimatePresence } from 'motion/react';
|
|
102
98
|
export { CardContent } from './Card/CardContent.js';
|
|
103
|
-
export { CardDescription } from './Card/CardDescription.js';
|
|
104
99
|
export { CardFooter } from './Card/CardFooter.js';
|
|
105
100
|
export { CardHeader } from './Card/CardHeader.js';
|
|
101
|
+
export { CardSubtitle } from './Card/CardSubtitle.js';
|
|
106
102
|
export { CardTitle } from './Card/CardTitle.js';
|
|
107
|
-
export {
|
|
108
|
-
export {
|
|
109
|
-
export {
|
|
110
|
-
export {
|
|
111
|
-
export {
|
|
112
|
-
export { useTableColumns } from './Table/hooks/useTableColumns.js';
|
|
113
|
-
export { useTableExpansion } from './Table/hooks/useTableExpansion.js';
|
|
114
|
-
export { useTableFilter } from './Table/hooks/useTableFilter.js';
|
|
115
|
-
export { useTablePagination } from './Table/hooks/useTablePagination.js';
|
|
116
|
-
export { useTableSelection } from './Table/hooks/useTableSelection.js';
|
|
103
|
+
export { PageHeadingActions } from './PageHeading/PageHeadingActions.js';
|
|
104
|
+
export { PageHeadingBackButton } from './PageHeading/PageHeadingBackButton.js';
|
|
105
|
+
export { PageHeadingIcon } from './PageHeading/PageHeadingIcon.js';
|
|
106
|
+
export { PageHeadingSubtitle } from './PageHeading/PageHeadingSubtitle.js';
|
|
107
|
+
export { PageHeadingTitle } from './PageHeading/PageHeadingTitle.js';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
const descriptionListTheme = {
|
|
2
|
+
baseStyle: "divide-y divide-[var(--color-border)] min-w-0",
|
|
3
|
+
itemStyle: "px-4 py-3",
|
|
4
|
+
termStyle: "text-base/6 font-medium text-[var(--color-text-primary)]",
|
|
5
|
+
detailStyle: "mt-1 text-base/6 text-[var(--color-text-secondary)]",
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export { descriptionListTheme };
|
|
@@ -2,8 +2,8 @@ import { jsx, jsxs } from 'react/jsx-runtime';
|
|
|
2
2
|
import React__default, { createContext, useMemo, useState, useContext } from 'react';
|
|
3
3
|
import { cn } from '../../../utils/cn.js';
|
|
4
4
|
import { feedTheme } from './Feed.theme.js';
|
|
5
|
-
import { Avatar } from '
|
|
6
|
-
import { Button } from '
|
|
5
|
+
import { Avatar } from '../../core/Avatar/Avatar.js';
|
|
6
|
+
import { Button } from '../../core/Button/Button.js';
|
|
7
7
|
import { Textarea } from '../../forms/Textarea/Textarea.js';
|
|
8
8
|
import '../../forms/Textarea/Textarea.theme.js';
|
|
9
9
|
|
|
@@ -54,7 +54,7 @@ const FeedItem = React__default.forwardRef(({ variant = "default", title, timest
|
|
|
54
54
|
case "icon":
|
|
55
55
|
return (jsxs("div", { className: cn(theme.contentStyle, "py-1.5"), children: [jsxs("p", { className: theme.actionTextStyle, children: [title && jsxs("span", { className: theme.titleStyle, children: [title, " "] }), children] }), timestamp && jsx("p", { className: theme.timestampStyle, children: timestamp })] }));
|
|
56
56
|
case "avatar":
|
|
57
|
-
return (jsxs("div", { className: theme.contentStyle, children: [title && (jsx("p", { className: cn(theme.titleStyle, "text-
|
|
57
|
+
return (jsxs("div", { className: theme.contentStyle, children: [title && (jsx("p", { className: cn(theme.titleStyle, "text-base"), children: title })), jsx("p", { className: cn(theme.actionTextStyle, "mt-0.5"), children: children }), timestamp && jsx("p", { className: theme.timestampStyle, children: timestamp })] }));
|
|
58
58
|
case "comment-input": {
|
|
59
59
|
const handleSubmit = () => {
|
|
60
60
|
const trimmed = inputValue.trim();
|
|
@@ -12,8 +12,8 @@ const feedTheme = {
|
|
|
12
12
|
// Content
|
|
13
13
|
contentStyle: "min-w-0 flex-1",
|
|
14
14
|
titleStyle: "font-medium text-[var(--color-text-primary)]",
|
|
15
|
-
actionTextStyle: "text-
|
|
16
|
-
timestampStyle: "mt-1 text-
|
|
15
|
+
actionTextStyle: "text-base text-[var(--color-text-secondary)]",
|
|
16
|
+
timestampStyle: "mt-1 text-sm text-[var(--color-text-muted)]/80 whitespace-nowrap font-medium",
|
|
17
17
|
// Comment input
|
|
18
18
|
commentInputWrapperStyle: "min-w-0 flex-1 space-y-2",
|
|
19
19
|
commentInputFooterStyle: "flex justify-end",
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const chevronVariants = {
|
|
2
|
+
open: { rotate: 90, transition: { duration: 0.15 } },
|
|
3
|
+
collapsed: { rotate: 0, transition: { duration: 0.15 } },
|
|
4
|
+
};
|
|
5
|
+
const taskBarVariants = {
|
|
6
|
+
hidden: {
|
|
7
|
+
scaleX: 0,
|
|
8
|
+
opacity: 0,
|
|
9
|
+
transition: { duration: 0 },
|
|
10
|
+
},
|
|
11
|
+
visible: {
|
|
12
|
+
scaleX: 1,
|
|
13
|
+
opacity: 1,
|
|
14
|
+
transition: {
|
|
15
|
+
duration: 0.4,
|
|
16
|
+
ease: [0.4, 0, 0.2, 1],
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export { chevronVariants, taskBarVariants };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { GanttChartProps, GanttContextValue, GanttInteractionValue } from "./GanttChart.types";
|
|
2
|
+
export declare function useGanttContext(): GanttContextValue;
|
|
3
|
+
export declare function useGanttInteraction(): GanttInteractionValue;
|
|
4
|
+
declare function GanttChartComponent({ data, groups, columns, startDate, endDate, todayMarker, scrollToToday, readonly: readonlyProp, readonlyDates: readonlyDatesProp, readonlyProgress: readonlyProgressProp, zoom: zoomProp, defaultZoom, onZoomChange, collapsedGroups: collapsedProp, defaultCollapsedGroups, onCollapsedGroupsChange, hideCompleted: hideCompletedProp, defaultHideCompleted, onHideCompletedChange, tablePanelWidth: tablePanelWidthProp, defaultTablePanelWidth, onTablePanelWidthChange, onTaskUpdate, onTaskDelete, onTaskDuplicate, onTaskAdd, onGroupAdd, onTaskClick, holidays: holidaysProp, gridLines, className, theme: themeOverrides, rowHeight, }: GanttChartProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare namespace GanttChartComponent {
|
|
6
|
+
var displayName: string;
|
|
7
|
+
}
|
|
8
|
+
export { GanttChartComponent as GanttChart };
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { useContext, createContext, useState, useCallback, useMemo } from 'react';
|
|
3
|
+
import { cn } from '../../../utils/cn.js';
|
|
4
|
+
import { ganttChartTheme } from './GanttChart.theme.js';
|
|
5
|
+
import { useGanttDates } from './hooks/useGanttDates.js';
|
|
6
|
+
import { useGanttLayout } from './hooks/useGanttLayout.js';
|
|
7
|
+
import { useGanttScrollSync } from './hooks/useGanttScrollSync.js';
|
|
8
|
+
import { GanttToolbar } from './GanttToolbar.js';
|
|
9
|
+
import { GanttTablePanel } from './GanttTablePanel.js';
|
|
10
|
+
import { GanttChartPanel } from './GanttChartPanel.js';
|
|
11
|
+
import { GanttSplitter } from './GanttSplitter.js';
|
|
12
|
+
import { formatDuration } from './GanttChart.utils.js';
|
|
13
|
+
import { GanttProgressCircle } from './GanttProgressCircle.js';
|
|
14
|
+
|
|
15
|
+
// ---------------------------------------------------------------------------
|
|
16
|
+
// Context
|
|
17
|
+
// ---------------------------------------------------------------------------
|
|
18
|
+
const GanttContext = createContext(undefined);
|
|
19
|
+
const GanttInteractionContext = createContext(undefined);
|
|
20
|
+
function useGanttContext() {
|
|
21
|
+
const ctx = useContext(GanttContext);
|
|
22
|
+
if (!ctx) {
|
|
23
|
+
throw new Error("useGanttContext must be used within <GanttChart>");
|
|
24
|
+
}
|
|
25
|
+
return ctx;
|
|
26
|
+
}
|
|
27
|
+
function useGanttInteraction() {
|
|
28
|
+
const ctx = useContext(GanttInteractionContext);
|
|
29
|
+
if (!ctx) {
|
|
30
|
+
throw new Error("useGanttInteraction must be used within <GanttChart>");
|
|
31
|
+
}
|
|
32
|
+
return ctx;
|
|
33
|
+
}
|
|
34
|
+
// ---------------------------------------------------------------------------
|
|
35
|
+
// Default columns
|
|
36
|
+
// ---------------------------------------------------------------------------
|
|
37
|
+
const defaultColumns = [
|
|
38
|
+
{
|
|
39
|
+
id: "title",
|
|
40
|
+
header: "Task",
|
|
41
|
+
accessor: "title",
|
|
42
|
+
width: 200,
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
id: "duration",
|
|
46
|
+
header: "Duration",
|
|
47
|
+
accessor: (task) => formatDuration(task.startDate, task.endDate),
|
|
48
|
+
width: 70,
|
|
49
|
+
align: "center",
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
id: "progress",
|
|
53
|
+
header: "Status",
|
|
54
|
+
accessor: "progress",
|
|
55
|
+
cell: (task, group) => {
|
|
56
|
+
var _a;
|
|
57
|
+
return (jsx(GanttProgressCircle, { progress: task.progress, color: (_a = task.color) !== null && _a !== void 0 ? _a : group.color, size: 20 }));
|
|
58
|
+
},
|
|
59
|
+
width: 56,
|
|
60
|
+
align: "center",
|
|
61
|
+
},
|
|
62
|
+
];
|
|
63
|
+
// ---------------------------------------------------------------------------
|
|
64
|
+
// Component
|
|
65
|
+
// ---------------------------------------------------------------------------
|
|
66
|
+
function GanttChartComponent({ data, groups, columns, startDate, endDate, todayMarker = true, scrollToToday = true, readonly: readonlyProp = false, readonlyDates: readonlyDatesProp = false, readonlyProgress: readonlyProgressProp = false, zoom: zoomProp, defaultZoom = "day", onZoomChange, collapsedGroups: collapsedProp, defaultCollapsedGroups = [], onCollapsedGroupsChange, hideCompleted: hideCompletedProp, defaultHideCompleted = false, onHideCompletedChange, tablePanelWidth: tablePanelWidthProp, defaultTablePanelWidth = 400, onTablePanelWidthChange, onTaskUpdate, onTaskDelete, onTaskDuplicate, onTaskAdd, onGroupAdd, onTaskClick, holidays: holidaysProp = [], gridLines = "both", className, theme: themeOverrides, rowHeight = 40, }) {
|
|
67
|
+
// ----- Controlled / uncontrolled state -----
|
|
68
|
+
const [uncontrolledZoom, setUncontrolledZoom] = useState(defaultZoom);
|
|
69
|
+
const isZoomControlled = zoomProp !== undefined;
|
|
70
|
+
const zoom = isZoomControlled ? zoomProp : uncontrolledZoom;
|
|
71
|
+
const [uncontrolledCollapsed, setUncontrolledCollapsed] = useState(defaultCollapsedGroups);
|
|
72
|
+
const isCollapsedControlled = collapsedProp !== undefined;
|
|
73
|
+
const collapsedGroups = isCollapsedControlled ? collapsedProp : uncontrolledCollapsed;
|
|
74
|
+
const [uncontrolledHide, setUncontrolledHide] = useState(defaultHideCompleted);
|
|
75
|
+
const isHideControlled = hideCompletedProp !== undefined;
|
|
76
|
+
const hideCompleted = isHideControlled ? hideCompletedProp : uncontrolledHide;
|
|
77
|
+
const [uncontrolledWidth, setUncontrolledWidth] = useState(defaultTablePanelWidth);
|
|
78
|
+
const isWidthControlled = tablePanelWidthProp !== undefined;
|
|
79
|
+
const tablePanelWidth = isWidthControlled ? tablePanelWidthProp : uncontrolledWidth;
|
|
80
|
+
// ----- Hover / focus / drag state -----
|
|
81
|
+
const [hoveredTaskId, setHoveredTaskId] = useState(null);
|
|
82
|
+
const [focusedTaskId, setFocusedTaskId] = useState(null);
|
|
83
|
+
const [activeDrag, setActiveDrag] = useState(null);
|
|
84
|
+
// ----- Handlers -----
|
|
85
|
+
const setZoom = useCallback((val) => {
|
|
86
|
+
if (!isZoomControlled)
|
|
87
|
+
setUncontrolledZoom(val);
|
|
88
|
+
onZoomChange === null || onZoomChange === void 0 ? void 0 : onZoomChange(val);
|
|
89
|
+
}, [isZoomControlled, onZoomChange]);
|
|
90
|
+
const toggleGroup = useCallback((groupId) => {
|
|
91
|
+
const next = collapsedGroups.includes(groupId)
|
|
92
|
+
? collapsedGroups.filter((id) => id !== groupId)
|
|
93
|
+
: [...collapsedGroups, groupId];
|
|
94
|
+
if (!isCollapsedControlled)
|
|
95
|
+
setUncontrolledCollapsed(next);
|
|
96
|
+
onCollapsedGroupsChange === null || onCollapsedGroupsChange === void 0 ? void 0 : onCollapsedGroupsChange(next);
|
|
97
|
+
}, [collapsedGroups, isCollapsedControlled, onCollapsedGroupsChange]);
|
|
98
|
+
const setHideCompleted = useCallback((val) => {
|
|
99
|
+
if (!isHideControlled)
|
|
100
|
+
setUncontrolledHide(val);
|
|
101
|
+
onHideCompletedChange === null || onHideCompletedChange === void 0 ? void 0 : onHideCompletedChange(val);
|
|
102
|
+
}, [isHideControlled, onHideCompletedChange]);
|
|
103
|
+
const setTablePanelWidth = useCallback((val) => {
|
|
104
|
+
if (!isWidthControlled)
|
|
105
|
+
setUncontrolledWidth(val);
|
|
106
|
+
onTablePanelWidthChange === null || onTablePanelWidthChange === void 0 ? void 0 : onTablePanelWidthChange(val);
|
|
107
|
+
}, [isWidthControlled, onTablePanelWidthChange]);
|
|
108
|
+
// ----- Derived data -----
|
|
109
|
+
const resolvedColumns = columns !== null && columns !== void 0 ? columns : defaultColumns;
|
|
110
|
+
const dates = useGanttDates(data, zoom, startDate, endDate);
|
|
111
|
+
const rows = useGanttLayout(groups, data, collapsedGroups, hideCompleted);
|
|
112
|
+
const { tableRef, chartRef, handleTableScroll, handleChartScroll } = useGanttScrollSync();
|
|
113
|
+
const theme = useMemo(() => ({ ...ganttChartTheme, ...(themeOverrides || {}) }), [themeOverrides]);
|
|
114
|
+
// ----- Context -----
|
|
115
|
+
const contextValue = useMemo(() => ({
|
|
116
|
+
groups,
|
|
117
|
+
tasks: data,
|
|
118
|
+
columns: resolvedColumns,
|
|
119
|
+
rows,
|
|
120
|
+
rangeStart: dates.rangeStart,
|
|
121
|
+
rangeEnd: dates.rangeEnd,
|
|
122
|
+
totalDays: dates.totalDays,
|
|
123
|
+
dayWidth: dates.dayWidth,
|
|
124
|
+
zoom,
|
|
125
|
+
collapsedGroups,
|
|
126
|
+
hideCompleted,
|
|
127
|
+
tablePanelWidth,
|
|
128
|
+
readonly: readonlyProp,
|
|
129
|
+
readonlyDates: readonlyDatesProp,
|
|
130
|
+
readonlyProgress: readonlyProgressProp,
|
|
131
|
+
onTaskUpdate,
|
|
132
|
+
onTaskDelete,
|
|
133
|
+
onTaskDuplicate,
|
|
134
|
+
onTaskAdd,
|
|
135
|
+
onGroupAdd,
|
|
136
|
+
onTaskClick,
|
|
137
|
+
toggleGroup,
|
|
138
|
+
setZoom,
|
|
139
|
+
setHideCompleted,
|
|
140
|
+
setTablePanelWidth,
|
|
141
|
+
theme,
|
|
142
|
+
todayMarker,
|
|
143
|
+
todayOffset: dates.todayOffset,
|
|
144
|
+
scrollToToday,
|
|
145
|
+
holidays: holidaysProp,
|
|
146
|
+
gridLines,
|
|
147
|
+
rowHeight,
|
|
148
|
+
}), [
|
|
149
|
+
groups, data, resolvedColumns, rows, dates, zoom, collapsedGroups,
|
|
150
|
+
hideCompleted, tablePanelWidth, readonlyProp, readonlyDatesProp,
|
|
151
|
+
readonlyProgressProp, onTaskUpdate, onTaskDelete, onTaskDuplicate,
|
|
152
|
+
onTaskAdd, onGroupAdd, onTaskClick, toggleGroup, setZoom,
|
|
153
|
+
setHideCompleted, setTablePanelWidth,
|
|
154
|
+
theme, todayMarker, scrollToToday, holidaysProp, gridLines, rowHeight,
|
|
155
|
+
]);
|
|
156
|
+
// Interaction state changes frequently (hover, focus, drag) — kept in a
|
|
157
|
+
// separate context so that stable consumers don't re-render.
|
|
158
|
+
const interactionValue = useMemo(() => ({
|
|
159
|
+
hoveredTaskId,
|
|
160
|
+
setHoveredTaskId,
|
|
161
|
+
focusedTaskId,
|
|
162
|
+
setFocusedTaskId,
|
|
163
|
+
activeDrag,
|
|
164
|
+
setActiveDrag,
|
|
165
|
+
}), [hoveredTaskId, focusedTaskId, activeDrag]);
|
|
166
|
+
return (jsx(GanttContext.Provider, { value: contextValue, children: jsx(GanttInteractionContext.Provider, { value: interactionValue, children: jsxs("div", { className: cn(theme.baseStyle, className), children: [jsx(GanttToolbar, {}), jsxs("div", { className: "flex flex-1 min-h-0 overflow-x-auto", children: [jsx(GanttTablePanel, { ref: tableRef, onScroll: handleTableScroll }), jsx(GanttSplitter, {}), jsx(GanttChartPanel, { ref: chartRef, onScroll: handleChartScroll, days: dates.days, monthSpans: dates.monthSpans })] })] }) }) }));
|
|
167
|
+
}
|
|
168
|
+
GanttChartComponent.displayName = "GanttChart";
|
|
169
|
+
|
|
170
|
+
export { GanttChartComponent as GanttChart, useGanttContext, useGanttInteraction };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const ganttChartTheme = {
|
|
2
|
+
baseStyle: "flex flex-col w-full overflow-hidden text-base",
|
|
3
|
+
toolbarStyle: "flex flex-wrap items-center justify-between gap-3 px-3 py-2 border-b border-[var(--color-border)] bg-[var(--color-background-secondary)]",
|
|
4
|
+
tablePanelStyle: "hidden sm:flex flex-col shrink-0 overflow-hidden",
|
|
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-background-secondary)]",
|
|
7
|
+
tableHeaderCellStyle: "px-3 font-medium text-[var(--color-text-secondary)] truncate",
|
|
8
|
+
tableGroupRowStyle: "flex items-center cursor-pointer select-none hover:bg-[var(--color-background-secondary)] transition-colors",
|
|
9
|
+
tableTaskRowStyle: "flex items-center hover:bg-[var(--color-background-secondary)] transition-colors",
|
|
10
|
+
tableCellStyle: "px-3 truncate text-[var(--color-text-primary)]",
|
|
11
|
+
timelineHeaderStyle: "bg-[var(--color-background)] border-b border-[var(--color-border)]",
|
|
12
|
+
timelineMonthStyle: "text-sm font-medium text-[var(--color-text-secondary)] px-2 border-b border-[var(--color-border)] flex items-center",
|
|
13
|
+
timelineDayStyle: "text-[10px] text-[var(--color-text-muted)] flex items-center justify-center",
|
|
14
|
+
gridLineStyle: "border-r border-[var(--color-border)]/30",
|
|
15
|
+
weekendStyle: "bg-[var(--color-background-secondary)]/50",
|
|
16
|
+
todayMarkerStyle: "bg-[var(--color-primary)] w-px",
|
|
17
|
+
todayColumnStyle: "bg-[var(--color-primary)]/5",
|
|
18
|
+
taskBarStyle: "absolute rounded-md cursor-pointer flex items-center",
|
|
19
|
+
groupBarStyle: "absolute rounded-md opacity-25",
|
|
20
|
+
splitterStyle: "hidden sm:block w-1 cursor-col-resize bg-[var(--color-border)] hover:bg-[var(--color-primary)] transition-colors shrink-0",
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export { ganttChartTheme };
|