@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
|
@@ -50,7 +50,7 @@ const useDarkMode = () => {
|
|
|
50
50
|
/**
|
|
51
51
|
* PopoverContent component displays the content of the popover
|
|
52
52
|
*/
|
|
53
|
-
const PopoverContent = React__default.forwardRef(({ children, className, animation = true, portal = true, ...props }, ref) => {
|
|
53
|
+
const PopoverContent = React__default.forwardRef(({ children, className, animation = true, portal = true, scrollable = false, maxHeight, ...props }, ref) => {
|
|
54
54
|
const { isOpen, onOpenChange, triggerRef, contentRef, placement, offset, triggerType, closeOnClickOutside, closeOnEsc, preventClose, hasBackdrop, theme, contentId, } = usePopoverContext();
|
|
55
55
|
const shouldReduceMotion = useReducedMotion();
|
|
56
56
|
const localRef = useRef(null);
|
|
@@ -61,6 +61,9 @@ const PopoverContent = React__default.forwardRef(({ children, className, animati
|
|
|
61
61
|
placement: placement,
|
|
62
62
|
offset: offset || 8,
|
|
63
63
|
autoWidth: true,
|
|
64
|
+
onClose: () => { if (!preventClose)
|
|
65
|
+
onOpenChange(false); },
|
|
66
|
+
stickyTracking: true,
|
|
64
67
|
});
|
|
65
68
|
// Click outside detection (active when no backdrop — with backdrop, Overlay handles it)
|
|
66
69
|
useClickOutside(localRef, (e) => {
|
|
@@ -108,12 +111,15 @@ const PopoverContent = React__default.forwardRef(({ children, className, animati
|
|
|
108
111
|
const isClient = useIsClient();
|
|
109
112
|
// Extract DOM props to avoid type conflicts with Framer Motion
|
|
110
113
|
const { onDrag, onDragStart, onDragEnd, onAnimationStart, onAnimationEnd, ...domProps } = props;
|
|
111
|
-
const contentClasses = cn(theme.baseStyle, theme.contentStyle, "popover-content", className);
|
|
114
|
+
const contentClasses = cn(theme.baseStyle, theme.contentStyle, "popover-content", scrollable && "overflow-y-auto", className);
|
|
112
115
|
const contentPositionStyle = {
|
|
113
116
|
...cssVariables,
|
|
114
117
|
position: "fixed",
|
|
115
118
|
top: `${position.top}px`,
|
|
116
119
|
left: `${position.left}px`,
|
|
120
|
+
...(scrollable && {
|
|
121
|
+
maxHeight: maxHeight || "var(--select-content-available-height, 400px)",
|
|
122
|
+
}),
|
|
117
123
|
};
|
|
118
124
|
// When hasBackdrop is true, delegate backdrop + escape + click-outside to Overlay
|
|
119
125
|
if (hasBackdrop) {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { semanticBgColors } from '../../../utils/colorUtils.js';
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* Default theme configuration for Progress component
|
|
3
5
|
*/
|
|
@@ -9,9 +11,9 @@ const progressTheme = {
|
|
|
9
11
|
// Fill (progress bar) styles
|
|
10
12
|
fillStyle: "h-full rounded-full",
|
|
11
13
|
// Label text styles
|
|
12
|
-
labelStyle: "text-
|
|
14
|
+
labelStyle: "text-base font-medium text-[var(--color-text-secondary)] tabular-nums min-w-[2.5rem] text-right",
|
|
13
15
|
// Inside label styles (when label is positioned inside the bar)
|
|
14
|
-
insideLabelStyle: "absolute inset-0 flex items-center justify-center text-
|
|
16
|
+
insideLabelStyle: "absolute inset-0 flex items-center justify-center text-sm font-medium text-[var(--color-primary-contrast)] tabular-nums",
|
|
15
17
|
// Size variants for track height
|
|
16
18
|
sizes: {
|
|
17
19
|
sm: "h-1.5",
|
|
@@ -20,11 +22,12 @@ const progressTheme = {
|
|
|
20
22
|
},
|
|
21
23
|
// Color variants for the fill
|
|
22
24
|
colors: {
|
|
23
|
-
neutral:
|
|
24
|
-
primary:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
neutral: semanticBgColors.neutral + " dark:bg-[var(--color-neutral-500)]",
|
|
26
|
+
primary: semanticBgColors.primary + " dark:bg-[var(--color-primary-400)]",
|
|
27
|
+
secondary: semanticBgColors.secondary + " dark:bg-[var(--color-secondary-400)]",
|
|
28
|
+
success: semanticBgColors.success + " dark:bg-[var(--color-success-400)]",
|
|
29
|
+
warning: semanticBgColors.warning + " dark:bg-[var(--color-warning-400)]",
|
|
30
|
+
danger: semanticBgColors.danger + " dark:bg-[var(--color-danger-400)]",
|
|
28
31
|
},
|
|
29
32
|
// Indeterminate animation styles
|
|
30
33
|
indeterminateStyle: "animate-[progress-indeterminate_1.5s_ease-in-out_infinite]",
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import { SemanticColor } from "../../../utils/colorUtils";
|
|
2
3
|
export type ProgressSize = "sm" | "md" | "lg";
|
|
3
|
-
export type ProgressColor =
|
|
4
|
+
export type ProgressColor = SemanticColor;
|
|
4
5
|
export type ProgressLabelPosition = "right" | "top" | "bottom" | "inside";
|
|
5
6
|
/**
|
|
6
7
|
* Theme configuration for Progress component
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
const segmentedTheme = {
|
|
5
5
|
// Base styles for the segmented container
|
|
6
|
-
baseStyle: "relative flex rounded-[var(--segmented-radius)]
|
|
6
|
+
baseStyle: "relative flex rounded-[var(--segmented-radius)] bg-[var(--color-background)] border border-[var(--color-border)] p-0",
|
|
7
7
|
// Size variants using CSS variables
|
|
8
8
|
sizes: {
|
|
9
9
|
sm: "min-h-[var(--segmented-min-h-sm)]",
|
|
@@ -15,7 +15,7 @@ const segmentedTheme = {
|
|
|
15
15
|
// Disabled style
|
|
16
16
|
disabledStyle: "opacity-50 cursor-not-allowed pointer-events-none",
|
|
17
17
|
// Sliding background style with CSS variables
|
|
18
|
-
slidingBackgroundStyle: "absolute top-[
|
|
18
|
+
slidingBackgroundStyle: "absolute top-[0px] left-[0px] rounded-[calc(var(--segmented-radius)-0.5px)] transition-transform duration-200 ease-out pointer-events-none z-0 bg-[var(--color-background-secondary)] shadow-real-md glass-effect",
|
|
19
19
|
};
|
|
20
20
|
/**
|
|
21
21
|
* Default theme for the SegmentedItem component
|
|
@@ -25,9 +25,9 @@ const segmentedItemTheme = {
|
|
|
25
25
|
baseStyle: "relative flex min-h-full min-w-fit flex-1 items-center justify-center transition-all duration-200 rounded-[calc(var(--segmented-radius)-1.5px)] font-medium cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-primary-500)] focus-visible:ring-offset-1",
|
|
26
26
|
// Size variants using CSS variables
|
|
27
27
|
sizes: {
|
|
28
|
-
sm: "text-
|
|
29
|
-
md: "text-
|
|
30
|
-
lg: "text-
|
|
28
|
+
sm: "text-base px-[var(--segmented-px-sm)]",
|
|
29
|
+
md: "text-base px-[var(--segmented-px-md)]",
|
|
30
|
+
lg: "text-base px-[var(--segmented-px-lg)]",
|
|
31
31
|
},
|
|
32
32
|
// Selected state
|
|
33
33
|
selectedStyle: "text-[var(--color-text-primary)] z-10",
|
|
@@ -32,6 +32,7 @@ const SidebarContainer = React__default.forwardRef(({ side = "left", variant = "
|
|
|
32
32
|
const sidebarClasses = cn(theme.baseStyle, theme.variants[variant], theme.sides[side], className);
|
|
33
33
|
const animateValue = useMemo(() => ({
|
|
34
34
|
width: collapsed ? collapsedWidth : expandedWidth,
|
|
35
|
+
maxWidth: "100vw",
|
|
35
36
|
}), [collapsed, collapsedWidth, expandedWidth]);
|
|
36
37
|
return (jsx(motion.div, { ref: ref, className: sidebarClasses, "data-side": side, "data-variant": variant, "data-collapsed": collapsed, initial: false, animate: animateValue, transition: SIDEBAR_TRANSITION, ...props, children: children }));
|
|
37
38
|
});
|
|
@@ -7,7 +7,7 @@ const SidebarNavGroup = React__default.forwardRef(({ title, showTitleWhenCollaps
|
|
|
7
7
|
const sidebarContext = useSidebarContext();
|
|
8
8
|
const collapsed = (sidebarContext === null || sidebarContext === void 0 ? void 0 : sidebarContext.collapsed) || false;
|
|
9
9
|
const showTitle = title && (!collapsed || showTitleWhenCollapsed);
|
|
10
|
-
return (jsxs("div", { ref: ref, className: cn("space-y-1", className), ...props, children: [showTitle && (jsx("div", { className: "px-2 py-2", children: jsx("h3", { className: "text-
|
|
10
|
+
return (jsxs("div", { ref: ref, className: cn("space-y-1", className), ...props, children: [showTitle && (jsx("div", { className: "px-2 py-2", children: jsx("h3", { className: "text-sm font-semibold text-[var(--color-text-muted)] uppercase tracking-wider", children: title }) })), collapsed && !showTitleWhenCollapsed && (jsx("div", { className: "h-px bg-[var(--color-border)] mx-2 my-2" })), jsx("div", { className: "space-y-1", children: children })] }));
|
|
11
11
|
});
|
|
12
12
|
SidebarNavGroup.displayName = "SidebarNavGroup";
|
|
13
13
|
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import { cn } from '../../../utils/cn.js';
|
|
4
|
+
import { socialIconTheme } from './SocialIcon.theme.js';
|
|
5
|
+
import { platforms } from './platforms.js';
|
|
6
|
+
|
|
7
|
+
const SocialIcon = React__default.forwardRef(({ icon, size = 'md', colorMode = 'brand', className, theme: customTheme, ...props }, ref) => {
|
|
8
|
+
var _a;
|
|
9
|
+
const platform = platforms[icon];
|
|
10
|
+
if (!platform) {
|
|
11
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
12
|
+
console.warn(`[SocialIcon]: Unknown icon "${icon}". Available icons: ${Object.keys(platforms).join(', ')}`);
|
|
13
|
+
}
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
const theme = {
|
|
17
|
+
...socialIconTheme,
|
|
18
|
+
...customTheme,
|
|
19
|
+
sizes: { ...socialIconTheme.sizes, ...customTheme === null || customTheme === void 0 ? void 0 : customTheme.sizes },
|
|
20
|
+
};
|
|
21
|
+
const resolvedSize = typeof size === 'number' ? size : (_a = theme.sizes[size]) !== null && _a !== void 0 ? _a : 24;
|
|
22
|
+
const fill = colorMode === 'brand' ? platform.brandColor : 'currentColor';
|
|
23
|
+
return (jsx("svg", { ref: ref, xmlns: "http://www.w3.org/2000/svg", viewBox: platform.viewBox, width: resolvedSize, height: resolvedSize, fill: fill, role: "img", "aria-label": `${platform.label} icon`, "data-icon": icon, "data-color-mode": colorMode, "data-size": size, className: cn(theme.baseStyle, className), ...props, children: platform.shapes.map((shape, i) => {
|
|
24
|
+
var _a;
|
|
25
|
+
return (jsx("path", { d: shape.d, fill: (_a = shape.fill) !== null && _a !== void 0 ? _a : undefined }, i));
|
|
26
|
+
}) }));
|
|
27
|
+
});
|
|
28
|
+
SocialIcon.displayName = 'SocialIcon';
|
|
29
|
+
|
|
30
|
+
export { SocialIcon };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export type SocialIconName = 'github' | 'x' | 'linkedin' | 'instagram' | 'facebook' | 'youtube' | 'discord' | 'dribbble' | 'tiktok' | 'reddit' | 'twitch' | 'slack' | 'medium' | 'pinterest' | 'snapchat' | 'whatsapp' | 'telegram' | 'google' | 'apple';
|
|
2
|
+
export type SocialIconSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
3
|
+
export type SocialIconColorMode = 'brand' | 'mono';
|
|
4
|
+
export interface SocialIconTheme {
|
|
5
|
+
baseStyle: string;
|
|
6
|
+
sizes: Record<SocialIconSize, number>;
|
|
7
|
+
}
|
|
8
|
+
export interface SocialIconThemeOverrides {
|
|
9
|
+
baseStyle?: string;
|
|
10
|
+
sizes?: Partial<Record<SocialIconSize, number>>;
|
|
11
|
+
}
|
|
12
|
+
export interface SocialIconProps extends React.SVGProps<SVGSVGElement> {
|
|
13
|
+
icon: SocialIconName;
|
|
14
|
+
size?: SocialIconSize | number;
|
|
15
|
+
colorMode?: SocialIconColorMode;
|
|
16
|
+
className?: string;
|
|
17
|
+
theme?: SocialIconThemeOverrides;
|
|
18
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SVG path data and brand colors for social media platforms.
|
|
3
|
+
* Paths sourced from Simple Icons (https://simpleicons.org/).
|
|
4
|
+
* All icons use a 24x24 viewBox.
|
|
5
|
+
*/
|
|
6
|
+
export interface PlatformShape {
|
|
7
|
+
type: 'path';
|
|
8
|
+
d: string;
|
|
9
|
+
fill?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface PlatformData {
|
|
12
|
+
viewBox: string;
|
|
13
|
+
brandColor: string;
|
|
14
|
+
label: string;
|
|
15
|
+
shapes: PlatformShape[];
|
|
16
|
+
}
|
|
17
|
+
export declare const platforms: Record<string, PlatformData>;
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SVG path data and brand colors for social media platforms.
|
|
3
|
+
* Paths sourced from Simple Icons (https://simpleicons.org/).
|
|
4
|
+
* All icons use a 24x24 viewBox.
|
|
5
|
+
*/
|
|
6
|
+
const platforms = {
|
|
7
|
+
github: {
|
|
8
|
+
viewBox: '0 0 24 24',
|
|
9
|
+
brandColor: '#181717',
|
|
10
|
+
label: 'GitHub',
|
|
11
|
+
shapes: [
|
|
12
|
+
{
|
|
13
|
+
type: 'path',
|
|
14
|
+
d: 'M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12',
|
|
15
|
+
},
|
|
16
|
+
],
|
|
17
|
+
},
|
|
18
|
+
x: {
|
|
19
|
+
viewBox: '0 0 24 24',
|
|
20
|
+
brandColor: '#000000',
|
|
21
|
+
label: 'X',
|
|
22
|
+
shapes: [
|
|
23
|
+
{
|
|
24
|
+
type: 'path',
|
|
25
|
+
d: 'M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z',
|
|
26
|
+
},
|
|
27
|
+
],
|
|
28
|
+
},
|
|
29
|
+
linkedin: {
|
|
30
|
+
viewBox: '0 0 24 24',
|
|
31
|
+
brandColor: '#0A66C2',
|
|
32
|
+
label: 'LinkedIn',
|
|
33
|
+
shapes: [
|
|
34
|
+
{
|
|
35
|
+
type: 'path',
|
|
36
|
+
d: 'M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z',
|
|
37
|
+
},
|
|
38
|
+
],
|
|
39
|
+
},
|
|
40
|
+
instagram: {
|
|
41
|
+
viewBox: '0 0 24 24',
|
|
42
|
+
brandColor: '#E4405F',
|
|
43
|
+
label: 'Instagram',
|
|
44
|
+
shapes: [
|
|
45
|
+
{
|
|
46
|
+
type: 'path',
|
|
47
|
+
d: 'M7.0301.084c-1.2768.0602-2.1487.264-2.911.5634-.7888.3075-1.4575.72-2.1228 1.3877-.6652.6677-1.075 1.3368-1.3802 2.127-.2954.7638-.4956 1.6365-.552 2.914-.0564 1.2775-.0689 1.6882-.0626 4.947.0062 3.2586.0206 3.6671.0825 4.9473.061 1.2765.264 2.1482.5635 2.9107.308.7889.72 1.4573 1.388 2.1228.6679.6655 1.3365 1.0743 2.1285 1.38.7632.295 1.6361.4961 2.9134.552 1.2773.056 1.6884.069 4.9462.0627 3.2578-.0062 3.668-.0207 4.9478-.0814 1.28-.0607 2.147-.2652 2.9098-.5633.7889-.3086 1.4578-.72 2.1228-1.3881.665-.6682 1.0745-1.3378 1.3795-2.1284.2957-.7632.4966-1.636.552-2.9124.056-1.2809.0692-1.6898.063-4.948-.0063-3.2583-.021-3.6668-.0817-4.9465-.0607-1.2797-.264-2.1487-.5633-2.9117-.3084-.7889-.72-1.4568-1.3876-2.1228C21.2982 1.33 20.628.9208 19.8378.6165 19.074.321 18.2017.1197 16.9244.0645 15.6471.0093 15.236-.005 11.977.0014 8.718.0076 8.31.0215 7.0301.0839m.1402 21.6932c-1.17-.0509-1.8053-.2453-2.2287-.408-.5606-.216-.96-.4771-1.3819-.895-.422-.4178-.6811-.8186-.8981-1.3783-.1644-.4234-.3624-1.058-.4171-2.228-.0595-1.2645-.072-1.6442-.079-4.848-.007-3.2037.0053-3.583.0607-4.848.05-1.169.2456-1.805.408-2.2282.216-.5613.4762-.96.895-1.3816.4188-.4217.8184-.6814 1.3783-.8988.4227-.1645 1.0573-.3617 2.2274-.4174 1.2645-.0595 1.6447-.072 4.848-.079 3.2033-.007 3.5835.005 4.8495.0608 1.169.0508 1.8053.2445 2.228.408.5608.216.96.4754 1.3816.895.4217.4194.6816.8176.8988 1.3783.1645.4217.3617 1.056.4174 2.2274.0595 1.2645.072 1.6447.079 4.848.007 3.2033-.0053 3.5835-.0607 4.848-.051 1.17-.245 1.8055-.408 2.2294-.216.5604-.4763.96-.8954 1.3814-.419.4215-.8181.6811-1.3783.8988-.4224.1649-1.0577.3617-2.2262.4174-1.2656.0595-1.6448.072-4.8493.079-3.2045.007-3.5825-.006-4.848-.0608M16.953 5.5864A1.44 1.44 0 1 0 18.39 4.144a1.44 1.44 0 0 0-1.437 1.4424M5.8385 12.012c.0067 3.4032 2.7706 6.1557 6.1736 6.1493 3.4026-.0065 6.157-2.7701 6.1506-6.1733-.0065-3.4032-2.771-6.1565-6.174-6.1498-3.403.0067-6.156 2.771-6.1502 6.1738M8 12.0077a4 4 0 1 1 4.008 3.9921A3.9996 3.9996 0 0 1 8 12.0077',
|
|
48
|
+
},
|
|
49
|
+
],
|
|
50
|
+
},
|
|
51
|
+
facebook: {
|
|
52
|
+
viewBox: '0 0 24 24',
|
|
53
|
+
brandColor: '#0866FF',
|
|
54
|
+
label: 'Facebook',
|
|
55
|
+
shapes: [
|
|
56
|
+
{
|
|
57
|
+
type: 'path',
|
|
58
|
+
d: 'M9.101 23.691v-7.98H6.627v-3.667h2.474v-1.58c0-4.085 1.848-5.978 5.858-5.978.401 0 1.09.044 1.613.115v3.146c-.427-.044-.602-.044-.855-.044-1.245 0-1.729.473-1.729 1.704v2.637h4.332l-.744 3.667h-3.588v7.98C18.343 23.166 22.344 19.073 24 14.02c.522-1.593.8-3.289.8-5.05C24.8 4.025 19.975-.8 13.95-.8S3.1 4.024 3.1 8.97c0 6.068 4.759 11.027 10.88 11.504-.16-.165-.328-.328-.505-.486a12.13 12.13 0 0 1-4.374-3.297z',
|
|
59
|
+
},
|
|
60
|
+
],
|
|
61
|
+
},
|
|
62
|
+
youtube: {
|
|
63
|
+
viewBox: '0 0 24 24',
|
|
64
|
+
brandColor: '#FF0000',
|
|
65
|
+
label: 'YouTube',
|
|
66
|
+
shapes: [
|
|
67
|
+
{
|
|
68
|
+
type: 'path',
|
|
69
|
+
d: 'M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z',
|
|
70
|
+
},
|
|
71
|
+
],
|
|
72
|
+
},
|
|
73
|
+
discord: {
|
|
74
|
+
viewBox: '0 0 24 24',
|
|
75
|
+
brandColor: '#5865F2',
|
|
76
|
+
label: 'Discord',
|
|
77
|
+
shapes: [
|
|
78
|
+
{
|
|
79
|
+
type: 'path',
|
|
80
|
+
d: 'M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z',
|
|
81
|
+
},
|
|
82
|
+
],
|
|
83
|
+
},
|
|
84
|
+
dribbble: {
|
|
85
|
+
viewBox: '0 0 24 24',
|
|
86
|
+
brandColor: '#EA4C89',
|
|
87
|
+
label: 'Dribbble',
|
|
88
|
+
shapes: [
|
|
89
|
+
{
|
|
90
|
+
type: 'path',
|
|
91
|
+
d: 'M12 24C5.385 24 0 18.615 0 12S5.385 0 12 0s12 5.385 12 12-5.385 12-12 12zm10.12-10.358c-.35-.11-3.17-.953-6.384-.438 1.34 3.684 1.887 6.684 1.992 7.308 2.3-1.555 3.936-4.02 4.395-6.87zm-6.115 7.808c-.153-.9-.75-4.032-2.19-7.77l-.066.02c-5.79 2.015-7.86 6.025-8.04 6.4 1.73 1.358 3.92 2.166 6.29 2.166 1.42 0 2.77-.29 4-.814zm-11.62-2.58c.232-.4 3.045-5.055 8.332-6.765.135-.045.27-.084.405-.12-.26-.585-.54-1.167-.832-1.74C7.17 11.775 2.206 11.71 1.756 11.7l-.004.312c0 2.633.998 5.037 2.634 6.855zm-2.42-8.955c.46.008 4.683.026 9.477-1.248-1.698-3.018-3.53-5.558-3.8-5.928-2.868 1.35-5.01 3.99-5.676 7.17zM9.6 2.052c.282.38 2.145 2.914 3.822 6 3.645-1.365 5.19-3.44 5.373-3.702-1.81-1.61-4.19-2.586-6.795-2.586-.825 0-1.63.1-2.4.285zm10.335 3.483c-.218.29-1.91 2.493-5.724 4.04.24.49.47.985.68 1.486.08.18.15.36.22.53 3.41-.43 6.8.26 7.14.33-.02-2.42-.88-4.64-2.31-6.38z',
|
|
92
|
+
},
|
|
93
|
+
],
|
|
94
|
+
},
|
|
95
|
+
tiktok: {
|
|
96
|
+
viewBox: '0 0 24 24',
|
|
97
|
+
brandColor: '#000000',
|
|
98
|
+
label: 'TikTok',
|
|
99
|
+
shapes: [
|
|
100
|
+
{
|
|
101
|
+
type: 'path',
|
|
102
|
+
d: 'M12.525.02c1.31-.02 2.61-.01 3.91-.02.08 1.53.63 3.09 1.75 4.17 1.12 1.11 2.7 1.62 4.24 1.79v4.03c-1.44-.05-2.89-.35-4.2-.97-.57-.26-1.1-.59-1.62-.93-.01 2.92.01 5.84-.02 8.75-.08 1.4-.54 2.79-1.35 3.94-1.31 1.92-3.58 3.17-5.91 3.21-1.43.08-2.86-.31-4.08-1.03-2.02-1.19-3.44-3.37-3.65-5.71-.02-.5-.03-1-.01-1.49.18-1.9 1.12-3.72 2.58-4.96 1.66-1.44 3.98-2.13 6.15-1.72.02 1.48-.04 2.96-.04 4.44-.99-.32-2.15-.23-3.02.37-.63.41-1.11 1.04-1.36 1.75-.21.51-.15 1.07-.14 1.61.24 1.64 1.82 3.02 3.5 2.87 1.12-.01 2.19-.66 2.77-1.61.19-.33.4-.67.41-1.06.1-1.79.06-3.57.07-5.36.01-4.03-.01-8.05.02-12.07z',
|
|
103
|
+
},
|
|
104
|
+
],
|
|
105
|
+
},
|
|
106
|
+
reddit: {
|
|
107
|
+
viewBox: '0 0 24 24',
|
|
108
|
+
brandColor: '#FF4500',
|
|
109
|
+
label: 'Reddit',
|
|
110
|
+
shapes: [
|
|
111
|
+
{
|
|
112
|
+
type: 'path',
|
|
113
|
+
d: 'M12 0C5.373 0 0 5.373 0 12c0 6.627 5.373 12 12 12s12-5.373 12-12c0-6.627-5.373-12-12-12zm6.066 9.645c.183.049.3.212.3.395 0 .04-.009.077-.023.114.161.404.254.854.254 1.33 0 2.705-2.725 4.9-6.097 4.9-3.372 0-6.097-2.195-6.097-4.9 0-.46.085-.895.235-1.29a.493.493 0 01-.032-.147c0-.282.23-.512.513-.512.147 0 .278.063.37.163A8.345 8.345 0 0112 8.066a8.344 8.344 0 014.524 1.641.487.487 0 01.353-.15c.166 0 .313.08.406.196l.783-.45a.49.49 0 01-.064-.236c0-.282.23-.513.513-.513.282 0 .512.23.512.513 0 .282-.23.512-.512.512a.51.51 0 01-.449-.268zm-7.066 3.66c-.67 0-1.217-.547-1.217-1.217 0-.67.547-1.217 1.217-1.217.67 0 1.216.547 1.216 1.217 0 .67-.547 1.217-1.216 1.217zm4.982.018c-.67 0-1.216-.547-1.216-1.217 0-.67.547-1.216 1.216-1.216.67 0 1.217.547 1.217 1.216 0 .67-.547 1.217-1.217 1.217zM14.893 16c-.243.337-.608.575-1.024.69-.416.115-.856.13-1.264.045a2.504 2.504 0 01-1.159-.55 1.762 1.762 0 01-.122-.115.282.282 0 01.399-.399l.053.052c.258.237.578.396.925.461.348.065.707.05 1.035-.048.328-.099.62-.271.842-.502a.282.282 0 11.415.38l-.1-.014z',
|
|
114
|
+
},
|
|
115
|
+
],
|
|
116
|
+
},
|
|
117
|
+
twitch: {
|
|
118
|
+
viewBox: '0 0 24 24',
|
|
119
|
+
brandColor: '#9146FF',
|
|
120
|
+
label: 'Twitch',
|
|
121
|
+
shapes: [
|
|
122
|
+
{
|
|
123
|
+
type: 'path',
|
|
124
|
+
d: 'M11.571 4.714h1.715v5.143H11.57zm4.715 0H18v5.143h-1.714zM6 0L1.714 4.286v15.428h5.143V24l4.286-4.286h3.428L22.286 12V0zm14.571 11.143l-3.428 3.428h-3.429l-3 3v-3H6.857V1.714h13.714Z',
|
|
125
|
+
},
|
|
126
|
+
],
|
|
127
|
+
},
|
|
128
|
+
slack: {
|
|
129
|
+
viewBox: '0 0 24 24',
|
|
130
|
+
brandColor: '#4A154B',
|
|
131
|
+
label: 'Slack',
|
|
132
|
+
shapes: [
|
|
133
|
+
{
|
|
134
|
+
type: 'path',
|
|
135
|
+
d: 'M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zM6.313 15.165a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313zM8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zM8.834 6.313a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312zM18.956 8.834a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zM17.688 8.834a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.528 2.528 0 0 1 2.523 2.522v6.312zM15.165 18.956a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zM15.165 17.688a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.313A2.527 2.527 0 0 1 24 15.165a2.528 2.528 0 0 1-2.522 2.523h-6.313z',
|
|
136
|
+
},
|
|
137
|
+
],
|
|
138
|
+
},
|
|
139
|
+
medium: {
|
|
140
|
+
viewBox: '0 0 24 24',
|
|
141
|
+
brandColor: '#000000',
|
|
142
|
+
label: 'Medium',
|
|
143
|
+
shapes: [
|
|
144
|
+
{
|
|
145
|
+
type: 'path',
|
|
146
|
+
d: 'M13.54 12a6.8 6.8 0 01-6.77 6.82A6.8 6.8 0 010 12a6.8 6.8 0 016.77-6.82A6.8 6.8 0 0113.54 12zM20.96 12c0 3.54-1.51 6.42-3.38 6.42-1.86 0-3.38-2.88-3.38-6.42 0-3.54 1.52-6.42 3.38-6.42 1.87 0 3.38 2.88 3.38 6.42M24 12c0 3.17-.53 5.75-1.19 5.75-.66 0-1.19-2.58-1.19-5.75s.53-5.75 1.19-5.75C23.47 6.25 24 8.83 24 12z',
|
|
147
|
+
},
|
|
148
|
+
],
|
|
149
|
+
},
|
|
150
|
+
pinterest: {
|
|
151
|
+
viewBox: '0 0 24 24',
|
|
152
|
+
brandColor: '#BD081C',
|
|
153
|
+
label: 'Pinterest',
|
|
154
|
+
shapes: [
|
|
155
|
+
{
|
|
156
|
+
type: 'path',
|
|
157
|
+
d: 'M12.017 0C5.396 0 .029 5.367.029 11.987c0 5.079 3.158 9.417 7.618 11.162-.105-.949-.199-2.403.041-3.439.219-.937 1.406-5.957 1.406-5.957s-.359-.72-.359-1.781c0-1.668.967-2.914 2.171-2.914 1.023 0 1.518.769 1.518 1.69 0 1.029-.655 2.568-.994 3.995-.283 1.194.599 2.169 1.777 2.169 2.133 0 3.772-2.249 3.772-5.495 0-2.873-2.064-4.882-5.012-4.882-3.414 0-5.418 2.561-5.418 5.207 0 1.031.397 2.138.893 2.738a.36.36 0 01.083.345l-.333 1.36c-.053.22-.174.267-.402.161-1.499-.698-2.436-2.889-2.436-4.649 0-3.785 2.75-7.262 7.929-7.262 4.163 0 7.398 2.967 7.398 6.931 0 4.136-2.607 7.464-6.227 7.464-1.216 0-2.359-.631-2.75-1.378l-.748 2.853c-.271 1.043-1.002 2.35-1.492 3.146C9.57 23.812 10.763 24 12.017 24c6.624 0 11.99-5.367 11.99-11.988C24.007 5.367 18.641.001 12.017.001z',
|
|
158
|
+
},
|
|
159
|
+
],
|
|
160
|
+
},
|
|
161
|
+
snapchat: {
|
|
162
|
+
viewBox: '0 0 24 24',
|
|
163
|
+
brandColor: '#FFFC00',
|
|
164
|
+
label: 'Snapchat',
|
|
165
|
+
shapes: [
|
|
166
|
+
{
|
|
167
|
+
type: 'path',
|
|
168
|
+
d: 'M12.206.793c.99 0 4.347.276 5.93 3.821.529 1.193.403 3.219.299 4.847l-.003.06c-.012.18-.022.345-.03.51.075.045.203.09.401.09.3-.016.659-.12.922-.214.12-.042.176-.065.249-.088a.863.863 0 01.304-.058c.279 0 .543.098.744.268a.72.72 0 01.075.96c-.106.143-.244.231-.389.3a2.458 2.458 0 01-.605.228c-.096.03-.204.064-.324.107a3.147 3.147 0 00-.723.37.985.985 0 00-.38.588c-.024.138-.008.28.058.45.221.545.547 1.058.91 1.513.258.33.554.63.876.905.402.341.82.59 1.206.746.286.118.571.187.82.215a.826.826 0 01.349.09c.206.112.262.322.2.505-.104.307-.457.543-.997.687a3.23 3.23 0 01-.357.08c-.128.027-.271.058-.423.1-.367.101-.589.247-.7.465a4.065 4.065 0 01-.484-.032c-.252-.028-.511-.057-.784-.057a4.233 4.233 0 00-.882.104 4.593 4.593 0 00-.564.207c-.326.155-.648.385-.975.72-.988 1.012-2.068 1.53-3.21 1.53-.044 0-.088-.001-.132-.004a5.53 5.53 0 01-.127.004c-1.142 0-2.222-.518-3.21-1.53a3.764 3.764 0 00-.975-.72 4.573 4.573 0 00-.564-.207 4.22 4.22 0 00-.882-.104c-.273 0-.531.03-.784.058a4.032 4.032 0 01-.483.031c-.112-.217-.334-.363-.7-.465a4.962 4.962 0 00-.424-.1 3.236 3.236 0 01-.356-.08c-.54-.143-.893-.38-.997-.686-.062-.183-.006-.393.2-.505a.826.826 0 01.349-.09c.25-.027.534-.097.82-.215a4.49 4.49 0 001.207-.746c.32-.275.616-.575.876-.905.362-.455.688-.968.91-1.514.065-.17.082-.311.057-.449a.985.985 0 00-.38-.588 3.157 3.157 0 00-.722-.37 5.19 5.19 0 00-.325-.108 2.459 2.459 0 01-.604-.228 1.022 1.022 0 01-.39-.299.72.72 0 01.076-.96.856.856 0 01.744-.268c.073.001.127.012.249.058.264.094.622.198.922.214.2 0 .326-.045.401-.09a11.58 11.58 0 01-.033-.57c-.104-1.628-.23-3.654.3-4.847C6.661 1.07 10.017.793 11.007.793h.39a.39.39 0 00-.191 0z',
|
|
169
|
+
},
|
|
170
|
+
],
|
|
171
|
+
},
|
|
172
|
+
whatsapp: {
|
|
173
|
+
viewBox: '0 0 24 24',
|
|
174
|
+
brandColor: '#25D366',
|
|
175
|
+
label: 'WhatsApp',
|
|
176
|
+
shapes: [
|
|
177
|
+
{
|
|
178
|
+
type: 'path',
|
|
179
|
+
d: 'M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413Z',
|
|
180
|
+
},
|
|
181
|
+
],
|
|
182
|
+
},
|
|
183
|
+
telegram: {
|
|
184
|
+
viewBox: '0 0 24 24',
|
|
185
|
+
brandColor: '#26A5E4',
|
|
186
|
+
label: 'Telegram',
|
|
187
|
+
shapes: [
|
|
188
|
+
{
|
|
189
|
+
type: 'path',
|
|
190
|
+
d: 'M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.479.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z',
|
|
191
|
+
},
|
|
192
|
+
],
|
|
193
|
+
},
|
|
194
|
+
google: {
|
|
195
|
+
viewBox: '0 0 24 24',
|
|
196
|
+
brandColor: '#4285F4',
|
|
197
|
+
label: 'Google',
|
|
198
|
+
shapes: [
|
|
199
|
+
{
|
|
200
|
+
type: 'path',
|
|
201
|
+
d: 'M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 0 1-2.2 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1z',
|
|
202
|
+
fill: '#4285F4',
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
type: 'path',
|
|
206
|
+
d: 'M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z',
|
|
207
|
+
fill: '#34A853',
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
type: 'path',
|
|
211
|
+
d: 'M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z',
|
|
212
|
+
fill: '#FBBC05',
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
type: 'path',
|
|
216
|
+
d: 'M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z',
|
|
217
|
+
fill: '#EA4335',
|
|
218
|
+
},
|
|
219
|
+
],
|
|
220
|
+
},
|
|
221
|
+
apple: {
|
|
222
|
+
viewBox: '0 0 24 24',
|
|
223
|
+
brandColor: '#000000',
|
|
224
|
+
label: 'Apple',
|
|
225
|
+
shapes: [
|
|
226
|
+
{
|
|
227
|
+
type: 'path',
|
|
228
|
+
d: 'M17.05 20.28c-.98.95-2.05.8-3.08.35-1.09-.46-2.09-.48-3.24 0-1.44.62-2.2.44-3.06-.35C2.79 15.25 3.51 7.59 9.05 7.31c1.35.07 2.29.74 3.08.8 1.18-.24 2.31-.93 3.57-.84 1.51.12 2.65.72 3.4 1.8-3.12 1.87-2.38 5.98.48 7.13-.57 1.5-1.31 2.99-2.54 4.09zM12.03 7.25c-.15-2.23 1.66-4.07 3.74-4.25.29 2.58-2.34 4.5-3.74 4.25z',
|
|
229
|
+
},
|
|
230
|
+
],
|
|
231
|
+
},
|
|
232
|
+
};
|
|
233
|
+
|
|
234
|
+
export { platforms };
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { semanticSpinnerColors } from '../../../utils/colorUtils.js';
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* Default theme for the Spinner component
|
|
3
5
|
*/
|
|
@@ -12,12 +14,8 @@ const spinnerTheme = {
|
|
|
12
14
|
},
|
|
13
15
|
// Color variants
|
|
14
16
|
colors: {
|
|
15
|
-
|
|
17
|
+
...semanticSpinnerColors,
|
|
16
18
|
dark: "border-[var(--color-background-quinary)] border-t-transparent",
|
|
17
|
-
primary: "border-[var(--color-primary)] border-t-transparent",
|
|
18
|
-
success: "border-[var(--color-success)] border-t-transparent",
|
|
19
|
-
warning: "border-[var(--color-warning)] border-t-transparent",
|
|
20
|
-
danger: "border-[var(--color-danger)] border-t-transparent",
|
|
21
19
|
},
|
|
22
20
|
// Animation class with drop shadow
|
|
23
21
|
animation: "animate-[spin_1s_linear_infinite] rounded-full",
|
|
@@ -21,8 +21,9 @@ export interface SpinnerProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
21
21
|
*/
|
|
22
22
|
theme?: SpinnerThemeOverrides;
|
|
23
23
|
}
|
|
24
|
+
import { SemanticColor } from "../../../utils/colorUtils";
|
|
24
25
|
export type SpinnerSize = "sm" | "md" | "lg";
|
|
25
|
-
export type SpinnerColor =
|
|
26
|
+
export type SpinnerColor = SemanticColor | "dark";
|
|
26
27
|
export interface SpinnerThemeOverrides {
|
|
27
28
|
baseStyle?: string;
|
|
28
29
|
sizes?: Partial<Record<SpinnerSize, string>>;
|
|
@@ -10,8 +10,8 @@ const tabsTheme = {
|
|
|
10
10
|
triggerStyle: "relative inline-flex items-center justify-center whitespace-nowrap font-medium transition-all duration-300 cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-primary)] focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 text-[var(--color-text-muted)] hover:text-[var(--color-text-primary)] data-[state=active]:text-[var(--color-primary)]",
|
|
11
11
|
// TabsTrigger size variants using CSS variables where applicable
|
|
12
12
|
triggerSizes: {
|
|
13
|
-
sm: "px-2 py-1.5 text-
|
|
14
|
-
md: "px-2 py-2 text-
|
|
13
|
+
sm: "px-2 py-1.5 text-base gap-1",
|
|
14
|
+
md: "px-2 py-2 text-base gap-1",
|
|
15
15
|
},
|
|
16
16
|
// TabsContent styles with proper CSS variables
|
|
17
17
|
contentStyle: "focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-primary)] focus-visible:ring-offset-2",
|
|
@@ -7,8 +7,8 @@ import { TagProps } from "./Tag.types";
|
|
|
7
7
|
* @example
|
|
8
8
|
* ```tsx
|
|
9
9
|
* <Tag onRemove={() => handleRemove('tag1')}>JavaScript</Tag>
|
|
10
|
-
* <Tag
|
|
11
|
-
* <Tag
|
|
10
|
+
* <Tag avatar={{ src: "/avatar.jpg", alt: "Alice" }} onRemove={() => {}}>Alice</Tag>
|
|
11
|
+
* <Tag startContent={<CodeIcon className="size-4" />} onRemove={() => {}}>React</Tag>
|
|
12
12
|
* ```
|
|
13
13
|
*/
|
|
14
14
|
export declare const Tag: React.ForwardRefExoticComponent<TagProps & React.RefAttributes<HTMLSpanElement>>;
|
|
@@ -3,6 +3,7 @@ import React__default from 'react';
|
|
|
3
3
|
import { motion } from 'motion/react';
|
|
4
4
|
import { XMarkIcon } from '@heroicons/react/24/outline';
|
|
5
5
|
import { cn } from '../../../utils/cn.js';
|
|
6
|
+
import { Avatar } from '../Avatar/Avatar.js';
|
|
6
7
|
import { tagTheme } from './Tag.theme.js';
|
|
7
8
|
import { tagVariants, tagLayoutTransition } from './Tag.animations.js';
|
|
8
9
|
|
|
@@ -13,16 +14,21 @@ import { tagVariants, tagLayoutTransition } from './Tag.animations.js';
|
|
|
13
14
|
* @example
|
|
14
15
|
* ```tsx
|
|
15
16
|
* <Tag onRemove={() => handleRemove('tag1')}>JavaScript</Tag>
|
|
16
|
-
* <Tag
|
|
17
|
-
* <Tag
|
|
17
|
+
* <Tag avatar={{ src: "/avatar.jpg", alt: "Alice" }} onRemove={() => {}}>Alice</Tag>
|
|
18
|
+
* <Tag startContent={<CodeIcon className="size-4" />} onRemove={() => {}}>React</Tag>
|
|
18
19
|
* ```
|
|
19
20
|
*/
|
|
20
|
-
const Tag = React__default.forwardRef(({ children, size = "md", removable = true, onRemove, disabled = false, className, theme: customTheme, ...props }, ref) => {
|
|
21
|
+
const Tag = React__default.forwardRef(({ children, size = "md", removable = true, onRemove, avatar, startContent, disabled = false, className, theme: customTheme, ...props }, ref) => {
|
|
21
22
|
var _a, _b, _c;
|
|
22
23
|
// Merge default theme with custom theme overrides
|
|
23
24
|
const theme = {
|
|
24
25
|
baseStyle: (_a = customTheme === null || customTheme === void 0 ? void 0 : customTheme.baseStyle) !== null && _a !== void 0 ? _a : tagTheme.baseStyle,
|
|
25
26
|
sizes: { ...tagTheme.sizes, ...customTheme === null || customTheme === void 0 ? void 0 : customTheme.sizes },
|
|
27
|
+
avatarSizes: { ...tagTheme.avatarSizes, ...customTheme === null || customTheme === void 0 ? void 0 : customTheme.avatarSizes },
|
|
28
|
+
startContentSizes: {
|
|
29
|
+
...tagTheme.startContentSizes,
|
|
30
|
+
...customTheme === null || customTheme === void 0 ? void 0 : customTheme.startContentSizes,
|
|
31
|
+
},
|
|
26
32
|
disabledStyle: (_b = customTheme === null || customTheme === void 0 ? void 0 : customTheme.disabledStyle) !== null && _b !== void 0 ? _b : tagTheme.disabledStyle,
|
|
27
33
|
removeButtonStyle: (_c = customTheme === null || customTheme === void 0 ? void 0 : customTheme.removeButtonStyle) !== null && _c !== void 0 ? _c : tagTheme.removeButtonStyle,
|
|
28
34
|
removeIconSizes: {
|
|
@@ -30,6 +36,7 @@ const Tag = React__default.forwardRef(({ children, size = "md", removable = true
|
|
|
30
36
|
...customTheme === null || customTheme === void 0 ? void 0 : customTheme.removeIconSizes,
|
|
31
37
|
},
|
|
32
38
|
};
|
|
39
|
+
const hasLeadingContent = !!(avatar || startContent);
|
|
33
40
|
const showRemoveButton = removable && onRemove && !disabled;
|
|
34
41
|
const handleRemove = (e) => {
|
|
35
42
|
e.stopPropagation();
|
|
@@ -37,7 +44,17 @@ const Tag = React__default.forwardRef(({ children, size = "md", removable = true
|
|
|
37
44
|
onRemove();
|
|
38
45
|
}
|
|
39
46
|
};
|
|
40
|
-
|
|
47
|
+
// Avatar takes precedence over startContent
|
|
48
|
+
const renderLeadingContent = () => {
|
|
49
|
+
if (avatar) {
|
|
50
|
+
return (jsx(Avatar, { src: avatar.src, alt: avatar.alt, fallback: avatar.fallback, initialsCount: avatar.initialsCount, className: cn(theme.avatarSizes[size], "rounded-full border-0") }));
|
|
51
|
+
}
|
|
52
|
+
if (startContent) {
|
|
53
|
+
return (jsx("span", { className: cn("inline-flex items-center", theme.startContentSizes[size]), children: startContent }));
|
|
54
|
+
}
|
|
55
|
+
return null;
|
|
56
|
+
};
|
|
57
|
+
return (jsxs(motion.span, { ref: ref, className: cn(theme.baseStyle, theme.sizes[size], hasLeadingContent && "pl-0.5", showRemoveButton && "pr-0.5", disabled && theme.disabledStyle, className), layout: true, transition: tagLayoutTransition, variants: tagVariants, initial: "initial", animate: "animate", exit: "exit", "data-size": size, "data-disabled": disabled ? "true" : "false", "data-removable": removable ? "true" : "false", "data-has-avatar": avatar ? "true" : "false", ...props, children: [renderLeadingContent(), children, showRemoveButton && (jsx("button", { type: "button", onClick: handleRemove, className: theme.removeButtonStyle, "aria-label": `Remove ${typeof children === "string" ? children : "tag"}`, children: jsx(XMarkIcon, { className: theme.removeIconSizes[size] }) }))] }));
|
|
41
58
|
});
|
|
42
59
|
Tag.displayName = "Tag";
|
|
43
60
|
|
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
const tagTheme = {
|
|
2
|
-
baseStyle: "inline-flex items-center gap-
|
|
3
|
-
"bg-
|
|
2
|
+
baseStyle: "inline-flex items-center gap-1 font-medium rounded-full " +
|
|
3
|
+
"bg-[var(--color-background-surface)] dark:bg-[var(--color-background-secondary)] border border-[var(--color-border)] " +
|
|
4
4
|
"text-[var(--color-text-primary)]",
|
|
5
5
|
sizes: {
|
|
6
|
-
sm: "text-
|
|
7
|
-
md: "text-
|
|
6
|
+
sm: "text-sm px-2.5 py-0.5",
|
|
7
|
+
md: "text-base px-2.5 py-0.5",
|
|
8
|
+
},
|
|
9
|
+
avatarSizes: {
|
|
10
|
+
sm: "size-4 ml-0.5",
|
|
11
|
+
md: "size-5 ml-1",
|
|
12
|
+
},
|
|
13
|
+
startContentSizes: {
|
|
14
|
+
sm: "ml-0.5",
|
|
15
|
+
md: "ml-1",
|
|
8
16
|
},
|
|
9
17
|
disabledStyle: "opacity-50 cursor-not-allowed",
|
|
10
18
|
removeButtonStyle: "inline-flex items-center justify-center rounded-full p-1 " +
|