@flikk/ui 1.0.0-beta.1 → 1.0.0-beta.10
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 +2 -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 +143 -28
- 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 +181 -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.theme.js +2 -2
- 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.theme.js +46 -41
- package/dist/components/core/Button/Button.types.d.ts +3 -3
- 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 +6 -6
- package/dist/components/core/Card/Card.types.d.ts +5 -20
- package/dist/components/core/Card/CardSubtitle.d.ts +3 -0
- package/dist/components/core/Card/CardSubtitle.js +11 -0
- 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.js +2 -2
- package/dist/components/core/Drawer/Drawer.types.d.ts +21 -4
- package/dist/components/core/Drawer/DrawerHeader.d.ts +5 -0
- package/dist/components/core/Drawer/DrawerHeader.js +14 -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/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 +9 -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 +28 -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 +5 -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 +2 -2
- 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 +2 -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/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 +9 -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 +13 -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 +53 -21
- 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/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
|
@@ -8,11 +8,12 @@ import { Button } from '../Button/Button.js';
|
|
|
8
8
|
const defaultIcons = {
|
|
9
9
|
neutral: BellIcon,
|
|
10
10
|
primary: InformationCircleIcon,
|
|
11
|
+
secondary: InformationCircleIcon,
|
|
11
12
|
success: CheckCircleIcon,
|
|
12
13
|
warning: ExclamationTriangleIcon,
|
|
13
14
|
danger: XCircleIcon,
|
|
14
15
|
};
|
|
15
|
-
const Alert = React__default.forwardRef(({ variant = "default", color = "primary", title,
|
|
16
|
+
const Alert = React__default.forwardRef(({ variant = "default", color = "primary", title, subtitle, dismissible, icon, showIcon = true, avatar, actions, onDismiss, className, children, darkMode = false, ...props }, ref) => {
|
|
16
17
|
var _a;
|
|
17
18
|
const iconColor = (_a = alertTheme.iconColors[color]) !== null && _a !== void 0 ? _a : alertTheme.iconColors.primary;
|
|
18
19
|
const showDismiss = dismissible === true || (dismissible !== false && !!onDismiss);
|
|
@@ -32,7 +33,7 @@ const Alert = React__default.forwardRef(({ variant = "default", color = "primary
|
|
|
32
33
|
const IconComponent = defaultIcons[color];
|
|
33
34
|
return (jsx("div", { className: "flex-shrink-0 w-6 h-6 mt-1", "aria-hidden": "true", children: jsx(IconComponent, { className: cn("w-6 h-6", iconColor) }) }));
|
|
34
35
|
};
|
|
35
|
-
const alertNode = (jsxs("div", { ref: ref, className: cn(alertTheme.baseStyle, alertTheme.variants[variant], className), role: "alert", "aria-live": "assertive", "aria-atomic": "true", ...props, children: [renderIconOrAvatar(), jsxs("div", { className: `flex-1 min-w-0 ${showDismiss ? "mr-5" : ""}`, children: [title && (jsx("div", { className: cn("font-semibold text-[var(--color-text-primary)]"), children: title })),
|
|
36
|
+
const alertNode = (jsxs("div", { ref: ref, className: cn(alertTheme.baseStyle, alertTheme.variants[variant], className), role: "alert", "aria-live": "assertive", "aria-atomic": "true", ...props, children: [renderIconOrAvatar(), jsxs("div", { className: `flex-1 min-w-0 ${showDismiss ? "mr-5" : ""}`, children: [title && (jsx("div", { className: cn("font-semibold text-[var(--color-text-primary)]"), children: title })), subtitle && (jsx("div", { className: "text-[var(--color-text-secondary)]/90 mt-1", children: subtitle })), children && jsx("div", { className: "mt-2", children: children }), actions && (jsx("div", { className: "flex items-center gap-2 mt-6", children: actions }))] }), showDismiss && (jsx(Button, { variant: "link", color: "neutral", size: "sm", iconOnly: true, onClick: handleDismiss, "aria-label": "Dismiss alert", className: "rounded-full absolute top-2 right-2 flex-shrink-0", children: jsx(XMarkIcon, { className: "size-4", strokeWidth: 2 }) }))] }));
|
|
36
37
|
if (darkMode) {
|
|
37
38
|
return jsx("div", { className: "dark", children: alertNode });
|
|
38
39
|
}
|
|
@@ -1,23 +1,19 @@
|
|
|
1
|
+
import { semanticTextColors } from '../../../utils/colorUtils.js';
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* Default theme configuration for Alert component
|
|
3
5
|
* Uses flat color organization matching Badge pattern
|
|
4
6
|
*/
|
|
5
7
|
const alertTheme = {
|
|
6
8
|
// Base styles applied to all alerts
|
|
7
|
-
baseStyle: "relative flex items-start gap-3 rounded-[var(--alert-radius)] p-4 text-
|
|
9
|
+
baseStyle: "relative flex items-start gap-3 rounded-[var(--alert-radius)] p-4 text-base border border-[var(--color-border)] backdrop-blur-md bg-white dark:bg-[var(--color-background-secondary)]/80",
|
|
8
10
|
// Visual style variants (structure only, no colors)
|
|
9
11
|
variants: {
|
|
10
12
|
default: "",
|
|
11
13
|
glass: "glass-effect",
|
|
12
14
|
},
|
|
13
15
|
// Icon color styles per color
|
|
14
|
-
iconColors:
|
|
15
|
-
neutral: "text-[var(--color-text-primary)]",
|
|
16
|
-
primary: "text-[var(--color-primary)]",
|
|
17
|
-
success: "text-[var(--color-success)]",
|
|
18
|
-
warning: "text-[var(--color-warning)]",
|
|
19
|
-
danger: "text-[var(--color-danger)]",
|
|
20
|
-
},
|
|
16
|
+
iconColors: semanticTextColors,
|
|
21
17
|
// State styles
|
|
22
18
|
states: {
|
|
23
19
|
dismissible: "pr-10",
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
import { SemanticColor } from "../../../utils/colorUtils";
|
|
2
3
|
/**
|
|
3
4
|
* Alert semantic colors (intent)
|
|
4
5
|
*/
|
|
5
|
-
export type AlertColor =
|
|
6
|
+
export type AlertColor = SemanticColor;
|
|
6
7
|
/**
|
|
7
8
|
* Alert visual variant
|
|
8
9
|
*/
|
|
@@ -29,8 +30,8 @@ export interface AlertProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
29
30
|
color?: AlertColor;
|
|
30
31
|
/** The main title/message of the alert */
|
|
31
32
|
title?: string;
|
|
32
|
-
/** Additional
|
|
33
|
-
|
|
33
|
+
/** Additional subtitle text */
|
|
34
|
+
subtitle?: string;
|
|
34
35
|
/** Whether the alert can be dismissed */
|
|
35
36
|
dismissible?: boolean;
|
|
36
37
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AlertDialogProps } from "./AlertDialog.types";
|
|
2
2
|
export declare const AlertDialog: {
|
|
3
|
-
({ trigger, icon, title,
|
|
3
|
+
({ trigger, icon, title, subtitle, footer, className, }: AlertDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
displayName: string;
|
|
5
5
|
};
|
|
@@ -3,14 +3,14 @@ import { useState, isValidElement, cloneElement } from 'react';
|
|
|
3
3
|
import { Modal } from '../Modal/Modal.js';
|
|
4
4
|
import { cn } from '../../../utils/cn.js';
|
|
5
5
|
|
|
6
|
-
const AlertDialog = ({ trigger, icon, title,
|
|
6
|
+
const AlertDialog = ({ trigger, icon, title, subtitle, footer, className, }) => {
|
|
7
7
|
const [isOpen, setIsOpen] = useState(false);
|
|
8
8
|
const handleOpen = () => setIsOpen(true);
|
|
9
9
|
const handleClose = () => setIsOpen(false);
|
|
10
10
|
const triggerElement = isValidElement(trigger)
|
|
11
11
|
? cloneElement(trigger, { onClick: handleOpen })
|
|
12
12
|
: null;
|
|
13
|
-
return (jsxs(Fragment, { children: [triggerElement, jsxs(Modal, { isOpen: isOpen, onClose: handleClose, size: "sm", closeOnOverlayClick: false, closeOnEsc: false, showCloseButton: false, role: "alertdialog", className: cn("!overflow-visible", className), children: [jsxs(Modal.Header, { children: [icon && (jsx("div", { className: "text-2xl rounded-full p-3 mb-3 w-fit glass-effect shadow-xl shadow-black/5", "aria-hidden": "true", children: icon })), jsx(Modal.Title, { children: title })] }), jsx(Modal.Body, { className: "pt-2", children: jsx("div", { className: "text-[var(--color-text-secondary)] text-
|
|
13
|
+
return (jsxs(Fragment, { children: [triggerElement, jsxs(Modal, { isOpen: isOpen, onClose: handleClose, size: "sm", closeOnOverlayClick: false, closeOnEsc: false, showCloseButton: false, role: "alertdialog", className: cn("!overflow-visible", className), children: [jsxs(Modal.Header, { children: [icon && (jsx("div", { className: "text-2xl rounded-full p-3 mb-3 w-fit glass-effect shadow-xl shadow-black/5", "aria-hidden": "true", children: icon })), jsx(Modal.Title, { children: title })] }), jsx(Modal.Body, { className: "pt-2", children: jsx("div", { className: "text-[var(--color-text-secondary)] text-base", children: subtitle }) }), footer && (jsx(Modal.Footer, { className: "pb-6", children: footer(handleClose) }))] })] }));
|
|
14
14
|
};
|
|
15
15
|
AlertDialog.displayName = "AlertDialog";
|
|
16
16
|
|
|
@@ -6,8 +6,8 @@ export interface AlertDialogProps {
|
|
|
6
6
|
icon?: React.ReactNode;
|
|
7
7
|
/** The title of the dialog. */
|
|
8
8
|
title: React.ReactNode;
|
|
9
|
-
/** The main content/
|
|
10
|
-
|
|
9
|
+
/** The main content/subtitle of the dialog. */
|
|
10
|
+
subtitle: React.ReactNode;
|
|
11
11
|
/**
|
|
12
12
|
* A render prop for the footer, which receives a `close` function.
|
|
13
13
|
* Use this to render action buttons.
|
|
@@ -6,11 +6,11 @@ const avatarTheme = {
|
|
|
6
6
|
baseStyle: "relative inline-flex items-center justify-center overflow-hidden bg-neutral-200 text-[var(--color-text-primary)] font-semibold tracking-tighter rounded-[var(--avatar-radius)] ring-2 ring-[var(--color-primary)]/10 border border-[var(--border)] transition-all duration-200 focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-primary)] focus-visible:ring-offset-2 glass-effect",
|
|
7
7
|
// Size variants using CSS variables
|
|
8
8
|
sizes: {
|
|
9
|
-
xs: "size-[var(--avatar-size-xs)] text-
|
|
10
|
-
sm: "size-[var(--avatar-size-sm)] text-
|
|
11
|
-
md: "size-[var(--avatar-size-md)] text-
|
|
12
|
-
lg: "size-[var(--avatar-size-lg)] text-
|
|
13
|
-
xl: "size-[var(--avatar-size-xl)] text-
|
|
9
|
+
xs: "size-[var(--avatar-size-xs)] text-xs",
|
|
10
|
+
sm: "size-[var(--avatar-size-sm)] text-sm",
|
|
11
|
+
md: "size-[var(--avatar-size-md)] text-md",
|
|
12
|
+
lg: "size-[var(--avatar-size-lg)] text-lg",
|
|
13
|
+
xl: "size-[var(--avatar-size-xl)] text-xl",
|
|
14
14
|
},
|
|
15
15
|
// Status indicator styles
|
|
16
16
|
statuses: {
|
|
@@ -11,7 +11,7 @@ const avatarGroupTheme = {
|
|
|
11
11
|
loose: "-ml-2 z-10",
|
|
12
12
|
},
|
|
13
13
|
// Overflow avatar styles
|
|
14
|
-
overflowAvatarStyle: "bg-[var(--color-neutral-100)] text-[var(--color-text-primary)] font-semibold text-
|
|
14
|
+
overflowAvatarStyle: "bg-[var(--color-neutral-100)] text-[var(--color-text-primary)] font-semibold text-base flex items-center justify-center hover:bg-neutral-200 transition-colors duration-200",
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
export { avatarGroupTheme };
|
|
@@ -11,4 +11,4 @@ import { BadgeProps } from "./Badge.types";
|
|
|
11
11
|
* <Badge dismissible onDismiss={handleDismiss}>Removable</Badge>
|
|
12
12
|
* ```
|
|
13
13
|
*/
|
|
14
|
-
export declare const Badge: React.NamedExoticComponent<
|
|
14
|
+
export declare const Badge: React.NamedExoticComponent<BadgeProps & React.RefAttributes<HTMLSpanElement>>;
|
|
@@ -32,7 +32,7 @@ const getShouldAnimate = () => {
|
|
|
32
32
|
* ```
|
|
33
33
|
*/
|
|
34
34
|
const Badge = React__default.memo(React__default.forwardRef(({ children, variant = "filled", color = "primary", size = "md", pill = false, withDot = false, iconStart, avatar, dismissible = false, onDismiss, selectable = false, selected = false, onSelect, disabled = false, maxWidth, className, theme: customTheme = {}, onClick, darkMode = false, ...props }, ref) => {
|
|
35
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
|
35
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
|
36
36
|
// State management
|
|
37
37
|
const [isVisible, setIsVisible] = useState(true);
|
|
38
38
|
const [isSelected, setIsSelected] = useState(selected);
|
|
@@ -103,6 +103,10 @@ const Badge = React__default.memo(React__default.forwardRef(({ children, variant
|
|
|
103
103
|
...badgeTheme.pillSizes,
|
|
104
104
|
...customTheme.pillSizes,
|
|
105
105
|
},
|
|
106
|
+
radiusSizes: {
|
|
107
|
+
...badgeTheme.radiusSizes,
|
|
108
|
+
...customTheme.radiusSizes,
|
|
109
|
+
},
|
|
106
110
|
iconSizes: {
|
|
107
111
|
...badgeTheme.iconSizes,
|
|
108
112
|
...customTheme.iconSizes,
|
|
@@ -134,11 +138,11 @@ const Badge = React__default.memo(React__default.forwardRef(({ children, variant
|
|
|
134
138
|
const sizeStyle = ((_k = theme.sizes) === null || _k === void 0 ? void 0 : _k[size]) || "";
|
|
135
139
|
const shapeStyle = pill
|
|
136
140
|
? "rounded-full"
|
|
137
|
-
: "rounded-[var(--badge-radius)]";
|
|
138
|
-
const dotColorStyle = ((
|
|
141
|
+
: ((_l = theme.radiusSizes) === null || _l === void 0 ? void 0 : _l[size]) || "rounded-[var(--badge-radius)]";
|
|
142
|
+
const dotColorStyle = ((_m = theme.dotColors) === null || _m === void 0 ? void 0 : _m[color]) || "";
|
|
139
143
|
// Build base styles with all states
|
|
140
144
|
const isInteractive = selectable || dismissible;
|
|
141
|
-
const baseStyles = cn(theme.baseStyle, shapeStyle, variantStyles, colorStyles, sizeStyle, pill && ((
|
|
145
|
+
const baseStyles = cn(theme.baseStyle, shapeStyle, variantStyles, colorStyles, sizeStyle, pill && ((_o = theme.pillSizes) === null || _o === void 0 ? void 0 : _o[size]), isInteractive && "cursor-pointer", disabled && ((_p = theme.states) === null || _p === void 0 ? void 0 : _p.disabled), darkMode && "dark", className);
|
|
142
146
|
// Create data attributes for styling hooks
|
|
143
147
|
const dataAttributes = {
|
|
144
148
|
"data-variant": variant,
|
|
@@ -162,17 +166,15 @@ const Badge = React__default.memo(React__default.forwardRef(({ children, variant
|
|
|
162
166
|
? {
|
|
163
167
|
sm: "-ml-1.5", // Small pill: minimal overlap
|
|
164
168
|
md: "-ml-1.5", // Medium pill: moderate overlap
|
|
165
|
-
lg: "-ml-2", // Large pill: more overlap
|
|
166
169
|
}[size]
|
|
167
170
|
: {
|
|
168
171
|
sm: "-ml-1.5", // Small default: minimal overlap
|
|
169
172
|
md: "-ml-1", // Medium default: less overlap (has border ring)
|
|
170
|
-
lg: "-ml-1.5", // Large default: moderate overlap
|
|
171
173
|
}[size];
|
|
172
174
|
return (jsx(Avatar, { src: avatar.src, alt: avatar.alt, fallback: avatar.fallback, initialsCount: avatar.initialsCount, className: cn((_a = theme.avatarSizes) === null || _a === void 0 ? void 0 : _a[size], avatarMargin, "border-0", pill ? "rounded-full" : "rounded-md ring-0") }));
|
|
173
175
|
}
|
|
174
176
|
if (iconStart) {
|
|
175
|
-
return (jsx("span", { className: cn("flex-shrink-0", (_b = theme.iconSizes) === null || _b === void 0 ? void 0 : _b[size]), "aria-hidden": "true", children: iconStart }));
|
|
177
|
+
return (jsx("span", { className: cn("inline-flex items-center justify-center flex-shrink-0", (_b = theme.iconSizes) === null || _b === void 0 ? void 0 : _b[size]), "aria-hidden": "true", children: iconStart }));
|
|
176
178
|
}
|
|
177
179
|
if (withDot) {
|
|
178
180
|
if (shouldAnimate) {
|
|
@@ -192,7 +194,7 @@ const Badge = React__default.memo(React__default.forwardRef(({ children, variant
|
|
|
192
194
|
? `${maxWidth}px`
|
|
193
195
|
: maxWidth,
|
|
194
196
|
}
|
|
195
|
-
: undefined, children: children }), dismissible && (jsx("button", { type: "button", onClick: handleDismiss, className: cn("badge-dismiss-btn -ml-1 -mr-1 rounded-full p-0.5 cursor-pointer", (
|
|
197
|
+
: undefined, children: children }), dismissible && (jsx("button", { type: "button", onClick: handleDismiss, className: cn("badge-dismiss-btn -ml-1 -mr-1 rounded-full p-0.5 cursor-pointer", (_q = theme.dismissButtonSizes) === null || _q === void 0 ? void 0 : _q[size]), "aria-label": "Dismiss", disabled: disabled, children: jsx(XMarkIcon, { className: cn("badge-dismiss-icon", (_r = theme.dismissIconSizes) === null || _r === void 0 ? void 0 : _r[size]), "aria-hidden": "true" }) }))] })) : null;
|
|
196
198
|
}
|
|
197
199
|
return (jsx(AnimatePresence, { mode: "wait", children: isVisible && (jsxs(motion.span, { ref: ref, className: baseStyles, onClick: handleClick, role: selectable ? "button" : undefined, tabIndex: selectable && !disabled ? 0 : undefined, "aria-pressed": selectable ? isSelected : undefined, "aria-disabled": disabled || undefined, variants: dismissible ? dismissVariants : badgeVariants, initial: "initial", animate: "animate", exit: "exit", whileTap: selectable && !disabled ? { scale: 0.98 } : undefined, ...dataAttributes, ...props, children: [renderLeftContent(), jsx("span", { className: cn("badge-content", maxWidth && "truncate"), style: maxWidth
|
|
198
200
|
? {
|
|
@@ -200,7 +202,7 @@ const Badge = React__default.memo(React__default.forwardRef(({ children, variant
|
|
|
200
202
|
? `${maxWidth}px`
|
|
201
203
|
: maxWidth,
|
|
202
204
|
}
|
|
203
|
-
: undefined, children: children }), dismissible && (jsx(motion.button, { type: "button", onClick: handleDismiss, className: cn("badge-dismiss-btn -ml-1 -mr-1 rounded-full p-0.5 cursor-pointer", (
|
|
205
|
+
: undefined, children: children }), dismissible && (jsx(motion.button, { type: "button", onClick: handleDismiss, className: cn("badge-dismiss-btn -ml-1 -mr-1 rounded-full p-0.5 cursor-pointer", (_s = theme.dismissButtonSizes) === null || _s === void 0 ? void 0 : _s[size]), "aria-label": "Dismiss", disabled: disabled, variants: dismissButtonVariants, initial: "initial", whileHover: "hover", whileTap: "tap", children: jsx(XMarkIcon, { className: cn("badge-dismiss-icon", (_t = theme.dismissIconSizes) === null || _t === void 0 ? void 0 : _t[size]), "aria-hidden": "true" }) }))] })) }));
|
|
204
206
|
}));
|
|
205
207
|
Badge.displayName = "Badge";
|
|
206
208
|
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { semanticBgColors } from '../../../utils/colorUtils.js';
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* Default theme configuration for Badge component
|
|
3
5
|
* Uses variant-first color organization for reliable dark mode and className overrides
|
|
@@ -18,20 +20,24 @@ const badgeTheme = {
|
|
|
18
20
|
filled: {
|
|
19
21
|
neutral: "bg-[var(--color-neutral-900)] text-white ring-[var(--color-border)] " +
|
|
20
22
|
"dark:bg-[var(--color-neutral-700)] dark:ring-[var(--color-neutral-600)]",
|
|
21
|
-
primary: "bg-[var(--color-primary)] text-
|
|
23
|
+
primary: "bg-[var(--color-primary)] text-[var(--color-primary-contrast)] ring-[var(--color-primary-400)] " +
|
|
22
24
|
"dark:bg-[var(--color-primary-600)] dark:ring-[var(--color-primary-500)]",
|
|
23
|
-
|
|
25
|
+
secondary: "bg-[var(--color-secondary)] text-[var(--color-secondary-contrast)] ring-[var(--color-secondary-400)] " +
|
|
26
|
+
"dark:bg-[var(--color-secondary-600)] dark:ring-[var(--color-secondary-500)]",
|
|
27
|
+
success: "bg-[var(--color-success-600)] text-[var(--color-success-contrast)] ring-[var(--color-success-300)] " +
|
|
24
28
|
"dark:bg-[var(--color-success-600)] dark:ring-[var(--color-success-400)]",
|
|
25
|
-
warning: "bg-[var(--color-warning)] text-
|
|
29
|
+
warning: "bg-[var(--color-warning)] text-[var(--color-warning-contrast)] ring-[var(--color-warning-300)] " +
|
|
26
30
|
"dark:bg-[var(--color-warning-600)] dark:ring-[var(--color-warning-400)]",
|
|
27
|
-
danger: "bg-[var(--color-danger)] text-
|
|
31
|
+
danger: "bg-[var(--color-danger)] text-[var(--color-danger-contrast)] ring-[var(--color-danger-400)] " +
|
|
28
32
|
"dark:bg-[var(--color-danger-600)] dark:ring-[var(--color-danger-400)]",
|
|
29
33
|
},
|
|
30
34
|
// Outline variant - transparent bg with colored border
|
|
31
35
|
outline: {
|
|
32
|
-
neutral: "text-[var(--color-text-
|
|
36
|
+
neutral: "text-[var(--color-text-secondary)] border-[var(--color-border)] " + "",
|
|
33
37
|
primary: "text-[var(--color-primary)] border-[var(--color-border)] " +
|
|
34
38
|
"dark:text-[var(--color-primary-400)]",
|
|
39
|
+
secondary: "text-[var(--color-secondary)] border-[var(--color-border)] " +
|
|
40
|
+
"dark:text-[var(--color-secondary-400)]",
|
|
35
41
|
success: "text-[var(--color-success)] border-[var(--color-border)] " +
|
|
36
42
|
"dark:text-[var(--color-success-400)]",
|
|
37
43
|
warning: "text-[var(--color-warning)] border-[var(--color-border)] " +
|
|
@@ -41,10 +47,12 @@ const badgeTheme = {
|
|
|
41
47
|
},
|
|
42
48
|
// Ghost variant - subtle background tints
|
|
43
49
|
ghost: {
|
|
44
|
-
neutral: "bg-[var(--color-neutral-200)] text-[var(--color-text-
|
|
45
|
-
"dark:bg-[var(--color-neutral-900)]
|
|
50
|
+
neutral: "bg-[var(--color-neutral-200)] text-[var(--color-text-secondary)] " +
|
|
51
|
+
"dark:bg-[var(--color-neutral-900)] ",
|
|
46
52
|
primary: "bg-[var(--color-primary-100)] text-[var(--color-primary-700)] " +
|
|
47
53
|
"dark:bg-[var(--color-primary-600)]/30 dark:text-[var(--color-primary-400)]",
|
|
54
|
+
secondary: "bg-[var(--color-secondary-100)] text-[var(--color-secondary-700)] " +
|
|
55
|
+
"dark:bg-[var(--color-secondary-600)]/30 dark:text-[var(--color-secondary-400)]",
|
|
48
56
|
success: "bg-[var(--color-success-100)] text-[var(--color-success-600)] " +
|
|
49
57
|
"dark:bg-[var(--color-success-600)]/30 dark:text-[var(--color-success-400)]",
|
|
50
58
|
warning: "bg-[var(--color-warning-100)] text-[var(--color-warning-600)] " +
|
|
@@ -55,47 +63,43 @@ const badgeTheme = {
|
|
|
55
63
|
},
|
|
56
64
|
// Flat size structure (no nested objects)
|
|
57
65
|
sizes: {
|
|
58
|
-
sm: "text-xs px-1.5 py-0.5 gap-1",
|
|
59
|
-
md: "text-sm px-2 py-0.5 gap-1",
|
|
60
|
-
|
|
66
|
+
sm: "text-xs md:text-sm px-1.5 py-0.5 gap-1",
|
|
67
|
+
md: "text-sm md:text-base px-2 py-0.5 gap-1",
|
|
68
|
+
},
|
|
69
|
+
// Border radius per size (using CSS variable)
|
|
70
|
+
radiusSizes: {
|
|
71
|
+
sm: "rounded-[calc(var(--badge-radius)*0.75)]",
|
|
72
|
+
md: "rounded-[var(--badge-radius)]",
|
|
61
73
|
},
|
|
62
74
|
// Additional padding for pill shape
|
|
63
75
|
pillSizes: {
|
|
64
76
|
sm: "px-2",
|
|
65
77
|
md: "px-2.5",
|
|
66
|
-
lg: "px-3",
|
|
67
78
|
},
|
|
68
79
|
// Icon sizes
|
|
69
80
|
iconSizes: {
|
|
70
81
|
sm: "size-3",
|
|
71
82
|
md: "size-3.5",
|
|
72
|
-
lg: "size-4",
|
|
73
83
|
},
|
|
74
84
|
// Avatar sizes (base sizes without negative margin)
|
|
75
85
|
avatarSizes: {
|
|
76
86
|
sm: "size-4",
|
|
77
87
|
md: "size-4",
|
|
78
|
-
lg: "size-5",
|
|
79
88
|
},
|
|
80
89
|
// Dismiss button container sizes
|
|
81
90
|
dismissButtonSizes: {
|
|
82
91
|
sm: "size-3.5",
|
|
83
92
|
md: "size-4",
|
|
84
|
-
lg: "size-4.5",
|
|
85
93
|
},
|
|
86
94
|
// Dismiss icon sizes (inside button)
|
|
87
95
|
dismissIconSizes: {
|
|
88
96
|
sm: "size-2.5",
|
|
89
97
|
md: "size-3",
|
|
90
|
-
lg: "size-3.5",
|
|
91
98
|
},
|
|
92
99
|
// Dot indicator colors (simple, no dark mode needed - inherits from parent)
|
|
93
100
|
dotColors: {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
success: "bg-[var(--color-success-50)] dark:bg-[var(--color-success-300)]",
|
|
97
|
-
warning: "bg-[var(--color-warning-50)] dark:bg-[var(--color-warning-300)]",
|
|
98
|
-
danger: "bg-[var(--color-danger-50)] dark:bg-[var(--color-danger-300)]",
|
|
101
|
+
...semanticBgColors,
|
|
102
|
+
neutral: "bg-[var(--color-text-secondary)]",
|
|
99
103
|
},
|
|
100
104
|
// State styles
|
|
101
105
|
states: {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ReactNode, MouseEvent } from "react";
|
|
2
|
-
import {
|
|
1
|
+
import React, { ReactNode, MouseEvent } from "react";
|
|
2
|
+
import { SemanticColor } from "../../../utils/colorUtils";
|
|
3
3
|
export type BadgeVariant = "filled" | "outline" | "ghost";
|
|
4
|
-
export type BadgeColor =
|
|
5
|
-
export type BadgeSize = "sm" | "md"
|
|
4
|
+
export type BadgeColor = SemanticColor;
|
|
5
|
+
export type BadgeSize = "sm" | "md";
|
|
6
6
|
/**
|
|
7
7
|
* Theme configuration for Badge component
|
|
8
8
|
*/
|
|
@@ -28,6 +28,10 @@ export interface BadgeTheme {
|
|
|
28
28
|
* Additional padding for pill-shaped badges
|
|
29
29
|
*/
|
|
30
30
|
pillSizes: Record<BadgeSize, string>;
|
|
31
|
+
/**
|
|
32
|
+
* Border radius per badge size
|
|
33
|
+
*/
|
|
34
|
+
radiusSizes: Record<BadgeSize, string>;
|
|
31
35
|
/**
|
|
32
36
|
* Icon sizes for each badge size
|
|
33
37
|
*/
|
|
@@ -65,6 +69,7 @@ export interface BadgeThemeOverrides {
|
|
|
65
69
|
variantColors?: Partial<Record<BadgeVariant, Partial<Record<BadgeColor, string>>>>;
|
|
66
70
|
sizes?: Partial<Record<BadgeSize, string>>;
|
|
67
71
|
pillSizes?: Partial<Record<BadgeSize, string>>;
|
|
72
|
+
radiusSizes?: Partial<Record<BadgeSize, string>>;
|
|
68
73
|
iconSizes?: Partial<Record<BadgeSize, string>>;
|
|
69
74
|
avatarSizes?: Partial<Record<BadgeSize, string>>;
|
|
70
75
|
dismissButtonSizes?: Partial<Record<BadgeSize, string>>;
|
|
@@ -75,7 +80,7 @@ export interface BadgeThemeOverrides {
|
|
|
75
80
|
hover: string;
|
|
76
81
|
}>;
|
|
77
82
|
}
|
|
78
|
-
export interface BadgeProps extends Omit<
|
|
83
|
+
export interface BadgeProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "onSelect" | "inputMode"> {
|
|
79
84
|
/**
|
|
80
85
|
* The content to be displayed inside the badge
|
|
81
86
|
*/
|
|
@@ -43,7 +43,7 @@ const Breadcrumbs = ({ items, separator, maxItems = 4, variant = "default", clas
|
|
|
43
43
|
const renderItem = (item, index, isLast) => {
|
|
44
44
|
const isCurrentPage = isLast || !item.href;
|
|
45
45
|
const itemContent = (jsxs(Fragment, { children: [showIcons && item.iconStart && (jsx("span", { className: "mr-1.5 flex-shrink-0", children: item.iconStart })), item.label] }));
|
|
46
|
-
return (jsx("span", { className: "flex items-center text-
|
|
46
|
+
return (jsx("span", { className: "flex items-center text-base", children: isCurrentPage ? (jsx("span", { className: cn("flex items-center", theme.current), "aria-current": "page", children: itemContent })) : (jsx("a", { href: item.href, className: cn("flex items-center", theme.link), "aria-label": `Navigate to ${item.label}`, children: itemContent })) }, `${item.label}-${index}`));
|
|
47
47
|
};
|
|
48
48
|
// Render separator
|
|
49
49
|
const renderSeparator = (index) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { ButtonProps } from "./Button.types";
|
|
3
|
-
declare const Button: React.ForwardRefExoticComponent<
|
|
3
|
+
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
4
4
|
export { Button };
|
|
@@ -6,7 +6,7 @@ const buttonTheme = {
|
|
|
6
6
|
baseStyle: "relative inline-flex items-center justify-center gap-2 font-semibold focus:outline-none rounded-[var(--button-radius)] overflow-hidden cursor-pointer transition-all duration-300 ease-in-out min-w-fit flex-shrink-0 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 cursor-pointer",
|
|
7
7
|
// Visual style variants - STRUCTURE only (no colors)
|
|
8
8
|
variantStyles: {
|
|
9
|
-
filled: "border",
|
|
9
|
+
filled: "border hover:brightness-[0.9] dark:hover:brightness-[1.15]",
|
|
10
10
|
outline: "bg-transparent border",
|
|
11
11
|
ghost: "border-transparent",
|
|
12
12
|
link: "bg-transparent border-transparent",
|
|
@@ -15,56 +15,53 @@ const buttonTheme = {
|
|
|
15
15
|
variantColors: {
|
|
16
16
|
// Filled variant - solid backgrounds
|
|
17
17
|
filled: {
|
|
18
|
-
neutral: "bg-[var(--color-neutral-
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
"dark:hover:bg-[var(--color-neutral-600)]",
|
|
23
|
-
primary: "bg-[var(--color-primary)] text-white border-[var(--color-primary)] " +
|
|
24
|
-
"hover:bg-[var(--color-primary-700)] hover:ring-2 hover:ring-[var(--color-primary)]/20 " +
|
|
18
|
+
neutral: "bg-[var(--color-neutral-900)] text-white border-[var(--color-border)] " +
|
|
19
|
+
"focus-visible:outline-[var(--color-neutral-800)] " +
|
|
20
|
+
"dark:bg-[var(--color-neutral-200)] dark:text-[var(--color-neutral-900)] dark:border-[var(--color-neutral-200)]",
|
|
21
|
+
primary: "bg-[var(--color-primary)] text-[var(--color-primary-contrast)] border-[var(--color-primary)] " +
|
|
25
22
|
"focus-visible:outline-[var(--color-primary-600)] " +
|
|
26
|
-
"dark:bg-[var(--color-primary-600)] dark:border-[var(--color-primary-600)]
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
"
|
|
23
|
+
"dark:text-[var(--color-primary-contrast)] dark:bg-[var(--color-primary-600)] dark:border-[var(--color-primary-600)]",
|
|
24
|
+
secondary: "bg-[var(--color-secondary)] text-[var(--color-secondary-contrast)] border-[var(--color-secondary)] " +
|
|
25
|
+
"focus-visible:outline-[var(--color-secondary-600)] " +
|
|
26
|
+
"dark:text-[var(--color-secondary-contrast)] dark:bg-[var(--color-secondary-600)] dark:border-[var(--color-secondary-600)]",
|
|
27
|
+
success: "bg-[var(--color-success)] text-[var(--color-success-contrast)] border-[var(--color-success)] " +
|
|
30
28
|
"focus-visible:outline-[var(--color-success-600)] " +
|
|
31
|
-
"dark:bg-[var(--color-success-700)] dark:border-[var(--color-success-700)]
|
|
32
|
-
|
|
33
|
-
warning: "bg-[var(--color-warning)] text-white border-[var(--color-warning)] " +
|
|
34
|
-
"hover:bg-[var(--color-warning-600)] hover:ring-2 hover:ring-[var(--color-warning)]/20 " +
|
|
29
|
+
"dark:bg-[var(--color-success-700)] dark:border-[var(--color-success-700)]",
|
|
30
|
+
warning: "bg-[var(--color-warning)] text-[var(--color-warning-contrast)] border-[var(--color-warning)] " +
|
|
35
31
|
"focus-visible:outline-[var(--color-warning-600)] " +
|
|
36
|
-
"dark:bg-[var(--color-warning-600)] dark:border-[var(--color-warning-600)]
|
|
37
|
-
|
|
38
|
-
danger: "bg-[var(--color-danger)] text-white border-[var(--color-danger)] " +
|
|
39
|
-
"hover:bg-[var(--color-danger-600)] hover:ring-2 hover:ring-[var(--color-danger)]/20 " +
|
|
32
|
+
"dark:bg-[var(--color-warning-600)] dark:border-[var(--color-warning-600)]",
|
|
33
|
+
danger: "bg-[var(--color-danger)] text-[var(--color-danger-contrast)] border-[var(--color-danger)] " +
|
|
40
34
|
"focus-visible:outline-[var(--color-danger-600)] " +
|
|
41
|
-
"dark:bg-[var(--color-danger-600)] dark:border-[var(--color-danger-600)]
|
|
42
|
-
"dark:hover:bg-[var(--color-danger-500)]",
|
|
35
|
+
"dark:bg-[var(--color-danger-600)] dark:border-[var(--color-danger-600)]",
|
|
43
36
|
},
|
|
44
37
|
// Outline variant - transparent bg with colored border
|
|
45
38
|
outline: {
|
|
46
39
|
neutral: "text-[var(--color-text-primary)] border-[var(--color-border)] " +
|
|
47
|
-
"hover:bg-[var(--color-neutral-100)]
|
|
40
|
+
"hover:bg-[var(--color-neutral-100)] " +
|
|
48
41
|
"focus-visible:outline-[var(--color-text-secondary)] " +
|
|
49
|
-
"dark:
|
|
50
|
-
"dark:hover:bg-[var(--color-neutral-800)]",
|
|
42
|
+
"dark:hover:bg-[var(--color-background-secondary)]",
|
|
51
43
|
primary: "text-[var(--color-primary-600)] border-[var(--color-primary-600)] " +
|
|
52
|
-
"hover:bg-[var(--color-primary-50)]
|
|
44
|
+
"hover:bg-[var(--color-primary-50)] " +
|
|
53
45
|
"focus-visible:outline-[var(--color-primary-600)] " +
|
|
54
46
|
"dark:text-[var(--color-primary-300)] dark:border-[var(--color-primary-400)] " +
|
|
55
47
|
"dark:hover:bg-[var(--color-primary-900)]/30",
|
|
48
|
+
secondary: "text-[var(--color-secondary-600)] border-[var(--color-secondary-600)] " +
|
|
49
|
+
"hover:bg-[var(--color-secondary-50)] " +
|
|
50
|
+
"focus-visible:outline-[var(--color-secondary-600)] " +
|
|
51
|
+
"dark:text-[var(--color-secondary-300)] dark:border-[var(--color-secondary-400)] " +
|
|
52
|
+
"dark:hover:bg-[var(--color-secondary-900)]/30",
|
|
56
53
|
success: "text-[var(--color-success-600)] border-[var(--color-success-600)] " +
|
|
57
|
-
"hover:bg-[var(--color-success-50)]
|
|
54
|
+
"hover:bg-[var(--color-success-50)] " +
|
|
58
55
|
"focus-visible:outline-[var(--color-success-600)] " +
|
|
59
56
|
"dark:text-[var(--color-success-300)] dark:border-[var(--color-success-400)] " +
|
|
60
57
|
"dark:hover:bg-[var(--color-success-900)]/30",
|
|
61
58
|
warning: "text-[var(--color-warning-600)] border-[var(--color-warning-600)] " +
|
|
62
|
-
"hover:bg-[var(--color-warning-50)]
|
|
59
|
+
"hover:bg-[var(--color-warning-50)] " +
|
|
63
60
|
"focus-visible:outline-[var(--color-warning-600)] " +
|
|
64
61
|
"dark:text-[var(--color-warning-300)] dark:border-[var(--color-warning-400)] " +
|
|
65
62
|
"dark:hover:bg-[var(--color-warning-900)]/30",
|
|
66
63
|
danger: "text-[var(--color-danger-600)] border-[var(--color-danger-600)] " +
|
|
67
|
-
"hover:bg-[var(--color-danger-50)]
|
|
64
|
+
"hover:bg-[var(--color-danger-50)] " +
|
|
68
65
|
"focus-visible:outline-[var(--color-danger-600)] " +
|
|
69
66
|
"dark:text-[var(--color-danger-300)] dark:border-[var(--color-danger-400)] " +
|
|
70
67
|
"dark:hover:bg-[var(--color-danger-900)]/30",
|
|
@@ -72,39 +69,47 @@ const buttonTheme = {
|
|
|
72
69
|
// Ghost variant - subtle background tints
|
|
73
70
|
ghost: {
|
|
74
71
|
neutral: "text-[var(--color-text-primary)] bg-[var(--color-neutral-100)] " +
|
|
75
|
-
"hover:bg-[var(--color-neutral-200)]
|
|
72
|
+
"hover:bg-[var(--color-neutral-200)] " +
|
|
76
73
|
"focus-visible:outline-[var(--color-text-secondary)] " +
|
|
77
74
|
"dark:text-[var(--color-text-primary)] dark:bg-[var(--color-neutral-900)] " +
|
|
78
75
|
"dark:hover:bg-[var(--color-neutral-800)]",
|
|
79
76
|
primary: "text-[var(--color-primary-600)] bg-[var(--color-primary)]/10 " +
|
|
80
|
-
"hover:bg-[var(--color-primary-50)]
|
|
77
|
+
"hover:bg-[var(--color-primary-50)] " +
|
|
81
78
|
"focus-visible:outline-[var(--color-primary-600)] " +
|
|
82
79
|
"dark:text-[var(--color-primary-300)] dark:bg-[var(--color-primary-900)]/30 " +
|
|
83
80
|
"dark:hover:bg-[var(--color-primary-900)]/50",
|
|
81
|
+
secondary: "text-[var(--color-secondary-600)] bg-[var(--color-secondary)]/10 " +
|
|
82
|
+
"hover:bg-[var(--color-secondary-50)] " +
|
|
83
|
+
"focus-visible:outline-[var(--color-secondary-600)] " +
|
|
84
|
+
"dark:text-[var(--color-secondary-300)] dark:bg-[var(--color-secondary-900)]/30 " +
|
|
85
|
+
"dark:hover:bg-[var(--color-secondary-900)]/50",
|
|
84
86
|
success: "text-[var(--color-success-600)] bg-[var(--color-success)]/10 " +
|
|
85
|
-
"hover:bg-[var(--color-success-50)]
|
|
87
|
+
"hover:bg-[var(--color-success-50)] " +
|
|
86
88
|
"focus-visible:outline-[var(--color-success-600)] " +
|
|
87
89
|
"dark:text-[var(--color-success-300)] dark:bg-[var(--color-success-900)]/30 " +
|
|
88
90
|
"dark:hover:bg-[var(--color-success-900)]/50",
|
|
89
91
|
warning: "text-[var(--color-warning-600)] bg-[var(--color-warning)]/10 " +
|
|
90
|
-
"hover:bg-[var(--color-warning-50)]
|
|
92
|
+
"hover:bg-[var(--color-warning-50)] " +
|
|
91
93
|
"focus-visible:outline-[var(--color-warning-600)] " +
|
|
92
94
|
"dark:text-[var(--color-warning-300)] dark:bg-[var(--color-warning-900)]/30 " +
|
|
93
95
|
"dark:hover:bg-[var(--color-warning-900)]/50",
|
|
94
96
|
danger: "text-[var(--color-danger-600)] bg-[var(--color-danger)]/10 " +
|
|
95
|
-
"hover:bg-[var(--color-danger-50)]
|
|
97
|
+
"hover:bg-[var(--color-danger-50)] " +
|
|
96
98
|
"focus-visible:outline-[var(--color-danger-600)] " +
|
|
97
99
|
"dark:text-[var(--color-danger-300)] dark:bg-[var(--color-danger-900)]/30 " +
|
|
98
100
|
"dark:hover:bg-[var(--color-danger-900)]/50",
|
|
99
101
|
},
|
|
100
102
|
// Link variant - text-only with per-color styles
|
|
101
103
|
link: {
|
|
102
|
-
neutral: "text-[var(--color-text-
|
|
104
|
+
neutral: "text-[var(--color-text-secondary)] underline-offset-4 hover:underline hover:text-[var(--color-text-primary)] " +
|
|
103
105
|
"focus-visible:outline-[var(--color-text-secondary)] " +
|
|
104
106
|
"dark:text-[var(--color-text-primary)]",
|
|
105
107
|
primary: "text-[var(--color-primary-600)] underline-offset-4 hover:underline " +
|
|
106
108
|
"focus-visible:outline-[var(--color-primary-600)] " +
|
|
107
109
|
"dark:text-[var(--color-primary-300)]",
|
|
110
|
+
secondary: "text-[var(--color-secondary-600)] underline-offset-4 hover:underline " +
|
|
111
|
+
"focus-visible:outline-[var(--color-secondary-600)] " +
|
|
112
|
+
"dark:text-[var(--color-secondary-300)]",
|
|
108
113
|
success: "text-[var(--color-success-600)] underline-offset-4 hover:underline " +
|
|
109
114
|
"focus-visible:outline-[var(--color-success-600)] " +
|
|
110
115
|
"dark:text-[var(--color-success-300)]",
|
|
@@ -119,19 +124,19 @@ const buttonTheme = {
|
|
|
119
124
|
// Size variants
|
|
120
125
|
sizes: {
|
|
121
126
|
sm: {
|
|
122
|
-
default: "min-h-[var(--button-min-h-sm)] px-[var(--button-px-sm)] py-[var(--button-py-sm)] text-sm",
|
|
127
|
+
default: "min-h-[var(--button-min-h-sm)] px-[var(--button-px-sm)] py-[var(--button-py-sm)] text-sm md:text-base",
|
|
123
128
|
iconOnly: "size-[var(--button-icon-size-sm)] p-[var(--button-icon-p-sm)]",
|
|
124
|
-
link: "p-0 text-sm h-fit",
|
|
129
|
+
link: "p-0 text-sm md:text-base h-fit",
|
|
125
130
|
},
|
|
126
131
|
md: {
|
|
127
|
-
default: "min-h-[var(--button-min-h-md)] px-[var(--button-px-md)] py-[var(--button-py-md)] text-sm",
|
|
132
|
+
default: "min-h-[var(--button-min-h-md)] px-[var(--button-px-md)] py-[var(--button-py-md)] text-sm md:text-base",
|
|
128
133
|
iconOnly: "size-[var(--button-icon-size-md)] p-[var(--button-icon-p-md)]",
|
|
129
|
-
link: "p-0 text-sm h-fit",
|
|
134
|
+
link: "p-0 text-sm md:text-base h-fit",
|
|
130
135
|
},
|
|
131
136
|
lg: {
|
|
132
|
-
default: "min-h-[var(--button-min-h-lg)] px-[var(--button-px-lg)] py-[var(--button-py-lg)] text-base",
|
|
137
|
+
default: "min-h-[var(--button-min-h-lg)] px-[var(--button-px-lg)] py-[var(--button-py-lg)] text-base md:text-lg",
|
|
133
138
|
iconOnly: "size-[var(--button-icon-size-lg)] p-[var(--button-icon-p-lg)]",
|
|
134
|
-
link: "p-0 text-base h-fit",
|
|
139
|
+
link: "p-0 text-base md:text-lg h-fit",
|
|
135
140
|
},
|
|
136
141
|
},
|
|
137
142
|
// State styles
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { HTMLMotionProps } from "motion/react";
|
|
3
2
|
import { RippleEffectType } from "./Button.ripple";
|
|
3
|
+
import { SemanticColor } from "../../../utils/colorUtils";
|
|
4
4
|
/**
|
|
5
5
|
* Button component props
|
|
6
6
|
* @property {ButtonColor} color - The semantic color/intent of the button
|
|
@@ -14,7 +14,7 @@ import { RippleEffectType } from "./Button.ripple";
|
|
|
14
14
|
* @property {string} rippleClassName - Custom class name for ripple styling
|
|
15
15
|
* @property {number} rippleScale - Scale multiplier for ripple expansion (default: 10)
|
|
16
16
|
*/
|
|
17
|
-
export interface ButtonProps extends
|
|
17
|
+
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
18
18
|
/** The semantic color/intent of the button */
|
|
19
19
|
color?: ButtonColor;
|
|
20
20
|
/** The visual style variant of the button */
|
|
@@ -50,7 +50,7 @@ export interface ButtonProps extends HTMLMotionProps<"button"> {
|
|
|
50
50
|
*/
|
|
51
51
|
darkMode?: boolean;
|
|
52
52
|
}
|
|
53
|
-
export type ButtonColor =
|
|
53
|
+
export type ButtonColor = SemanticColor;
|
|
54
54
|
export type ButtonVariant = "filled" | "outline" | "ghost" | "link";
|
|
55
55
|
export type ButtonSize = "sm" | "md" | "lg";
|
|
56
56
|
export type ButtonState = "default" | "disabled" | "error" | "loading";
|
|
@@ -44,7 +44,7 @@ const buttonGroupTheme = {
|
|
|
44
44
|
vertical: "h-px self-stretch",
|
|
45
45
|
},
|
|
46
46
|
// Text styles for ButtonGroupText component
|
|
47
|
-
textStyles: "px-3 py-2 text-
|
|
47
|
+
textStyles: "px-3 py-2 text-base text-[var(--color-text-primary)] flex items-center",
|
|
48
48
|
};
|
|
49
49
|
|
|
50
50
|
export { buttonGroupTheme };
|