@flikk/ui 1.0.0-beta.30 → 1.0.0-beta.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +375 -5
- package/dist/components/ai/AgentRequest/AgentRequest.animations.d.ts +25 -0
- package/dist/components/ai/AgentRequest/AgentRequest.animations.js +81 -0
- package/dist/components/ai/AgentRequest/AgentRequest.d.ts +3 -0
- package/dist/components/ai/AgentRequest/AgentRequest.js +435 -0
- package/dist/components/ai/AgentRequest/AgentRequest.theme.d.ts +2 -0
- package/dist/components/ai/AgentRequest/AgentRequest.theme.js +106 -0
- package/dist/components/ai/AgentRequest/AgentRequest.types.d.ts +241 -0
- package/dist/components/ai/AgentRequest/index.d.ts +3 -0
- package/dist/components/ai/AgentStatus/AgentStatus.d.ts +3 -0
- package/dist/components/ai/AgentStatus/AgentStatus.js +144 -0
- package/dist/components/ai/AgentStatus/AgentStatus.theme.d.ts +2 -0
- package/dist/components/ai/AgentStatus/AgentStatus.theme.js +37 -0
- package/dist/components/ai/AgentStatus/AgentStatus.types.d.ts +116 -0
- package/dist/components/ai/AgentStatus/index.d.ts +3 -0
- package/dist/components/ai/CodeBlock/CodeBlock.js +3 -3
- package/dist/components/ai/CodeBlock/CodeBlock.theme.js +2 -2
- package/dist/components/ai/PromptInput/PromptInput.js +13 -14
- package/dist/components/ai/PromptInput/PromptInput.theme.js +3 -3
- package/dist/components/ai/PromptInput/VoiceRecorder.js +3 -3
- package/dist/components/ai/PromptSuggestion/PromptSuggestion.theme.js +2 -2
- package/dist/components/ai/Reasoning/Reasoning.d.ts +5 -0
- package/dist/components/ai/Reasoning/Reasoning.js +40 -0
- package/dist/components/ai/Reasoning/Reasoning.theme.d.ts +6 -0
- package/dist/components/ai/Reasoning/Reasoning.theme.js +36 -0
- package/dist/components/ai/Reasoning/Reasoning.types.d.ts +73 -0
- package/dist/components/ai/Reasoning/ReasoningTrace.d.ts +11 -0
- package/dist/components/ai/Reasoning/ReasoningTrace.js +84 -0
- package/dist/components/ai/Reasoning/index.d.ts +3 -0
- package/dist/components/ai/SourceCitation/SourceCitation.d.ts +4 -0
- package/dist/components/ai/SourceCitation/SourceCitation.js +29 -0
- package/dist/components/ai/SourceCitation/SourceCitation.theme.d.ts +2 -0
- package/dist/components/ai/SourceCitation/SourceCitation.theme.js +23 -0
- package/dist/components/ai/SourceCitation/SourceCitation.types.d.ts +55 -0
- package/dist/components/ai/SourceCitation/index.d.ts +3 -0
- package/dist/components/ai/StreamingResponse/AnimatedText.d.ts +7 -0
- package/dist/components/ai/StreamingResponse/AnimatedText.js +8 -7
- package/dist/components/ai/StreamingResponse/ErrorDisplay.js +2 -2
- package/dist/components/ai/StreamingResponse/MarkdownRenderer.d.ts +5 -0
- package/dist/components/ai/StreamingResponse/MarkdownRenderer.js +4 -4
- package/dist/components/ai/StreamingResponse/StreamingCursor.d.ts +2 -2
- package/dist/components/ai/StreamingResponse/StreamingCursor.js +10 -7
- package/dist/components/ai/StreamingResponse/StreamingResponse.animations.d.ts +10 -0
- package/dist/components/ai/StreamingResponse/StreamingResponse.animations.js +59 -33
- package/dist/components/ai/StreamingResponse/StreamingResponse.js +14 -10
- package/dist/components/ai/StreamingResponse/StreamingResponse.theme.js +3 -1
- package/dist/components/ai/StreamingResponse/StreamingResponse.types.d.ts +33 -2
- package/dist/components/ai/StreamingResponse/StreamingSurface.d.ts +13 -0
- package/dist/components/ai/StreamingResponse/StreamingSurface.js +38 -0
- package/dist/components/ai/StreamingResponse/WordAnimationContext.d.ts +5 -0
- package/dist/components/ai/StreamingResponse/WordAnimationContext.js +5 -4
- package/dist/components/ai/StreamingResponse/index.d.ts +4 -2
- package/dist/components/ai/TokenCounter/TokenCounter.js +2 -2
- package/dist/components/ai/TokenCounter/TokenCounter.theme.js +1 -1
- package/dist/components/ai/index.d.ts +6 -2
- package/dist/components/ai/index.js +10 -3
- package/dist/components/ai/shared/StatusIndicator.d.ts +8 -0
- package/dist/components/ai/shared/StatusIndicator.js +34 -0
- package/dist/components/canvas/BaseNode.js +1 -1
- package/dist/components/canvas/CanvasToolbar.js +2 -3
- package/dist/components/canvas/Edge.js +2 -2
- package/dist/components/canvas/NodeControls.js +2 -3
- package/dist/components/canvas/NodeRenderer.js +4 -4
- package/dist/components/charts/ActivityRings/ActivityRings.js +4 -4
- package/dist/components/charts/ActivityRings/ActivityRings.theme.js +1 -1
- package/dist/components/charts/AreaChart/AreaChart.js +24 -35
- package/dist/components/charts/AreaChart/AreaChart.theme.d.ts +1 -6
- package/dist/components/charts/AreaChart/AreaChart.theme.js +10 -22
- package/dist/components/charts/AreaChart/AreaChart.types.d.ts +18 -11
- package/dist/components/charts/AreaChart/AreaChart.types.js +10 -3
- package/dist/components/charts/AreaChart/index.d.ts +1 -1
- package/dist/components/charts/BarChart/BarChart.js +13 -32
- package/dist/components/charts/BarChart/BarChart.types.d.ts +20 -16
- package/dist/components/charts/BarChart/BarChart.types.js +11 -4
- package/dist/components/charts/ComboChart/BarRenderer.js +10 -7
- package/dist/components/charts/ComboChart/BarRenderer.types.d.ts +1 -1
- package/dist/components/charts/ComboChart/ComboChart.js +11 -24
- package/dist/components/charts/ComboChart/ComboChart.types.d.ts +15 -13
- package/dist/components/charts/ComboChart/ComboChart.types.js +14 -2
- package/dist/components/charts/ComboChart/ComboChartCanvas.js +1 -1
- package/dist/components/charts/ComboChart/LineRenderer.js +16 -11
- package/dist/components/charts/ComboChart/LineRenderer.types.d.ts +1 -1
- package/dist/components/charts/DonutChart/DonutChart.theme.js +4 -4
- package/dist/components/charts/DonutChart/MultiSegmentDonutChart.theme.js +1 -1
- package/dist/components/charts/Heatmap/Heatmap.js +49 -42
- package/dist/components/charts/Heatmap/Heatmap.theme.d.ts +6 -2
- package/dist/components/charts/Heatmap/Heatmap.theme.js +20 -8
- package/dist/components/charts/Heatmap/Heatmap.types.d.ts +49 -82
- package/dist/components/charts/Heatmap/HeatmapCell.js +30 -81
- package/dist/components/charts/Heatmap/HeatmapLegend.d.ts +7 -6
- package/dist/components/charts/Heatmap/HeatmapLegend.js +6 -6
- package/dist/components/charts/Heatmap/index.d.ts +1 -1
- package/dist/components/charts/Heatmap/utils/heatmapUtils.d.ts +7 -12
- package/dist/components/charts/Heatmap/utils/heatmapUtils.js +16 -61
- package/dist/components/charts/Heatmap/utils/heatmapUtils.test.d.ts +1 -0
- package/dist/components/charts/HorizontalBarChart/HorizontalBarChart.d.ts +16 -0
- package/dist/components/charts/HorizontalBarChart/HorizontalBarChart.js +237 -0
- package/dist/components/charts/HorizontalBarChart/HorizontalBarChart.types.d.ts +62 -0
- package/dist/components/charts/HorizontalBarChart/HorizontalBarChart.types.js +21 -0
- package/dist/components/charts/HorizontalBarChart/index.d.ts +3 -0
- package/dist/components/charts/LineChart/LineChart.js +11 -28
- package/dist/components/charts/LineChart/LineChart.types.d.ts +11 -14
- package/dist/components/charts/LineChart/LineChart.types.js +11 -3
- package/dist/components/charts/LollipopChart/LollipopChart.d.ts +3 -0
- package/dist/components/charts/LollipopChart/LollipopChart.js +361 -0
- package/dist/components/charts/LollipopChart/LollipopChart.types.d.ts +42 -0
- package/dist/components/charts/LollipopChart/LollipopChart.types.js +12 -0
- package/dist/components/charts/LollipopChart/index.d.ts +3 -0
- package/dist/components/charts/RadarChart/RadarChart.js +1 -1
- package/dist/components/charts/StackedBarChart/StackedBarChart.js +151 -133
- package/dist/components/charts/StackedBarChart/StackedBarChart.types.d.ts +20 -18
- package/dist/components/charts/StackedBarChart/StackedBarChart.types.js +10 -4
- package/dist/components/charts/hooks/useChartAccessibility.d.ts +1 -1
- package/dist/components/charts/hooks/useChartAccessibility.js +12 -6
- package/dist/components/charts/hooks/useTooltipPosition.js +18 -6
- package/dist/components/charts/index.d.ts +10 -8
- package/dist/components/charts/index.js +8 -4
- package/dist/components/charts/shared/ChartAxis/CategoryYAxis.d.ts +14 -0
- package/dist/components/charts/shared/ChartAxis/CategoryYAxis.js +35 -0
- package/dist/components/charts/shared/ChartAxis/ChartAxis.types.d.ts +69 -8
- package/dist/components/charts/shared/ChartAxis/ValueXAxis.d.ts +14 -0
- package/dist/components/charts/shared/ChartAxis/ValueXAxis.js +64 -0
- package/dist/components/charts/shared/ChartAxis/XAxis.js +1 -1
- package/dist/components/charts/shared/ChartAxis/YAxis.js +2 -2
- package/dist/components/charts/shared/ChartAxis/index.d.ts +3 -1
- package/dist/components/charts/shared/ChartGrid/HorizontalGrid.d.ts +0 -2
- package/dist/components/charts/shared/ChartGrid/HorizontalGrid.js +1 -1
- package/dist/components/charts/shared/ChartGrid/VerticalGrid.d.ts +29 -0
- package/dist/components/charts/shared/ChartGrid/VerticalGrid.js +26 -0
- package/dist/components/charts/shared/ChartGrid/index.d.ts +2 -0
- package/dist/components/charts/shared/ChartMarker/ChartMarker.js +7 -1
- package/dist/components/charts/shared/ChartText/ChartText.theme.js +1 -1
- package/dist/components/charts/shared/index.d.ts +1 -1
- package/dist/components/charts/theme/chart.theme.js +21 -26
- package/dist/components/charts/types/chart.types.d.ts +9 -5
- package/dist/components/charts/types/chart.types.js +1 -7
- package/dist/components/charts/utils/animation-utils.d.ts +12 -7
- package/dist/components/charts/utils/animation-utils.js +19 -21
- package/dist/components/charts/utils/bar-emphasis.d.ts +32 -3
- package/dist/components/charts/utils/bar-emphasis.js +24 -8
- package/dist/components/charts/utils/index.d.ts +1 -0
- package/dist/components/charts/utils/series-color.d.ts +7 -0
- package/dist/components/charts/utils/series-color.js +20 -0
- package/dist/components/core/Accordion/Accordion.theme.js +3 -3
- package/dist/components/core/Accordion/AccordionTrigger.js +2 -2
- package/dist/components/core/Alert/Alert.animations.d.ts +11 -3
- package/dist/components/core/Alert/Alert.animations.js +30 -8
- package/dist/components/core/Alert/Alert.js +23 -9
- package/dist/components/core/Alert/Alert.theme.js +1 -1
- package/dist/components/core/Alert/Alert.types.d.ts +4 -2
- package/dist/components/core/AlertDialog/AlertDialog.js +2 -2
- package/dist/components/core/Avatar/Avatar.js +50 -42
- package/dist/components/core/Avatar/Avatar.theme.d.ts +8 -4
- package/dist/components/core/Avatar/Avatar.theme.js +64 -8
- package/dist/components/core/Avatar/Avatar.types.d.ts +13 -2
- package/dist/components/core/Avatar/index.d.ts +1 -1
- package/dist/components/core/AvatarGroup/AvatarGroup.js +6 -8
- package/dist/components/core/AvatarGroup/AvatarGroup.theme.d.ts +1 -2
- package/dist/components/core/AvatarGroup/AvatarGroup.theme.js +2 -6
- package/dist/components/core/AvatarGroup/AvatarGroup.types.d.ts +0 -6
- package/dist/components/core/AvatarGroup/index.d.ts +1 -1
- package/dist/components/core/Badge/Badge.animations.d.ts +0 -5
- package/dist/components/core/Badge/Badge.animations.js +5 -82
- package/dist/components/core/Badge/Badge.d.ts +7 -4
- package/dist/components/core/Badge/Badge.js +33 -65
- package/dist/components/core/Badge/Badge.theme.js +26 -24
- package/dist/components/core/Badge/Badge.types.d.ts +18 -34
- package/dist/components/core/Breadcrumbs/Breadcrumbs.theme.d.ts +1 -4
- package/dist/components/core/Breadcrumbs/Breadcrumbs.theme.js +6 -6
- package/dist/components/core/Button/Button.js +14 -58
- package/dist/components/core/Button/Button.theme.d.ts +2 -0
- package/dist/components/core/Button/Button.theme.js +35 -22
- package/dist/components/core/Button/Button.types.d.ts +26 -13
- package/dist/components/core/Button/index.d.ts +0 -2
- package/dist/components/core/Calendar/Calendar.js +20 -5
- package/dist/components/core/Calendar/Calendar.theme.js +15 -23
- package/dist/components/core/Calendar/Calendar.types.d.ts +0 -1
- package/dist/components/core/Calendar/CalendarMini/CalendarMini.js +3 -3
- package/dist/components/core/Calendar/CalendarMini/CalendarMini.theme.js +2 -2
- package/dist/components/core/Card/Card.js +7 -2
- package/dist/components/core/Card/Card.theme.js +40 -4
- package/dist/components/core/Card/Card.types.d.ts +20 -0
- package/dist/components/core/Card/CardBody.js +9 -1
- package/dist/components/core/Card/CardContext.d.ts +13 -0
- package/dist/components/core/Card/CardContext.js +14 -0
- package/dist/components/core/Card/CardFooter.js +1 -1
- package/dist/components/core/Card/CardHeader.js +4 -1
- package/dist/components/core/CommandPalette/CommandPalette.js +5 -4
- package/dist/components/core/CommandPalette/CommandPalette.theme.js +3 -7
- package/dist/components/core/CommandPalette/CommandPalette.types.d.ts +2 -0
- package/dist/components/core/ContextMenu/ContextMenu.theme.js +4 -3
- package/dist/components/core/ContextMenu/ContextMenu.types.d.ts +8 -1
- package/dist/components/core/ContextMenu/ContextMenuItem.js +2 -2
- package/dist/components/core/ContextMenu/ContextMenuSub.d.ts +11 -1
- package/dist/components/core/ContextMenu/ContextMenuSub.js +35 -22
- package/dist/components/core/ContextMenu/ContextMenuSubBody.js +14 -3
- package/dist/components/core/ContextMenu/ContextMenuSubTrigger.js +22 -9
- package/dist/components/core/DragDrop/DragDrop.theme.js +2 -2
- package/dist/components/core/Drawer/Drawer.theme.js +7 -4
- package/dist/components/core/Drawer/DrawerHeader.js +2 -3
- package/dist/components/core/Dropdown/Dropdown.theme.js +3 -1
- package/dist/components/core/Dropdown/DropdownItem.js +2 -2
- package/dist/components/core/Dropdown/DropdownMenu.js +22 -7
- package/dist/components/core/Dropdown/DropdownTrigger.js +16 -5
- package/dist/components/core/HeroCard/HeroCard.theme.js +5 -2
- package/dist/components/core/Kbd/Kbd.theme.js +4 -2
- package/dist/components/core/Link/Link.js +7 -5
- package/dist/components/core/Masonry/Masonry.theme.js +1 -1
- package/dist/components/core/MenuItem/MenuItem.js +2 -1
- package/dist/components/core/MenuItem/MenuItem.theme.js +13 -1
- package/dist/components/core/Message/Message.js +4 -2
- package/dist/components/core/Message/Message.theme.js +8 -10
- package/dist/components/core/Message/MessageAudio.js +2 -2
- package/dist/components/core/Message/MessageFile.js +2 -2
- package/dist/components/core/Message/MessageLink.js +2 -2
- package/dist/components/core/Message/MessageStatusIndicator.js +5 -5
- package/dist/components/core/Modal/Modal.animations.d.ts +1 -1
- package/dist/components/core/Modal/Modal.animations.js +50 -11
- package/dist/components/core/Modal/Modal.d.ts +1 -1
- package/dist/components/core/Modal/Modal.js +6 -2
- package/dist/components/core/Modal/Modal.theme.js +9 -4
- package/dist/components/core/Modal/ModalHeader.js +2 -3
- package/dist/components/core/ModalStack/ModalStackModal.js +4 -2
- package/dist/components/core/NavItem/NavItem.js +8 -7
- package/dist/components/core/NavItem/NavItem.theme.js +1 -1
- package/dist/components/core/OfflineIndicator/OfflineIndicator.animations.d.ts +22 -0
- package/dist/components/core/OfflineIndicator/OfflineIndicator.animations.js +54 -0
- package/dist/components/core/OfflineIndicator/OfflineIndicator.js +23 -24
- package/dist/components/core/OfflineIndicator/OfflineIndicator.theme.js +27 -6
- package/dist/components/core/OfflineIndicator/OfflineIndicator.types.d.ts +17 -0
- package/dist/components/core/PageHeading/PageHeading.theme.js +1 -1
- package/dist/components/core/PageHeading/PageHeadingBackButton.js +2 -2
- package/dist/components/core/Pagination/Pagination.js +3 -3
- package/dist/components/core/Pagination/Pagination.theme.js +5 -5
- package/dist/components/core/Pill/Pill.js +5 -2
- package/dist/components/core/Pill/Pill.theme.js +9 -5
- package/dist/components/core/Popover/PopoverBody.js +16 -5
- package/dist/components/core/Progress/Progress.d.ts +0 -25
- package/dist/components/core/Progress/Progress.js +79 -11
- package/dist/components/core/Progress/Progress.theme.js +17 -0
- package/dist/components/core/Progress/Progress.types.d.ts +47 -1
- package/dist/components/core/Rating/Rating.js +4 -5
- package/dist/components/core/Rating/Rating.theme.js +2 -2
- package/dist/components/core/Rating/Rating.types.d.ts +3 -2
- package/dist/components/core/ScrollArea/ScrollArea.js +1 -1
- package/dist/components/core/ScrollArea/ScrollArea.theme.js +1 -1
- package/dist/components/core/Segmented/Segmented.theme.js +10 -7
- package/dist/components/core/Segmented/SegmentedContext.js +1 -0
- package/dist/components/core/Sidebar/Sidebar.js +5 -2
- package/dist/components/core/Sidebar/Sidebar.theme.js +2 -2
- package/dist/components/core/Sidebar/Sidebar.types.d.ts +4 -2
- package/dist/components/core/Sidebar/SidebarContent.js +1 -1
- package/dist/components/core/Sidebar/SidebarHeader.js +3 -3
- package/dist/components/core/Sidebar/SidebarMobileTrigger.js +2 -2
- package/dist/components/core/Sidebar/SidebarSearch.js +4 -4
- package/dist/components/core/Sidebar/SidebarToggle.js +3 -3
- package/dist/components/core/Sidebar/SidebarUserProfile.js +3 -3
- package/dist/components/core/Sortable/Sortable.js +2 -2
- package/dist/components/core/Sortable/Sortable.theme.js +1 -1
- package/dist/components/core/Tabs/Tabs.theme.js +1 -1
- package/dist/components/core/Tag/Tag.js +2 -2
- package/dist/components/core/Tag/Tag.theme.js +5 -3
- package/dist/components/core/Toast/Toast.js +3 -3
- package/dist/components/core/Toast/Toast.types.d.ts +1 -1
- package/dist/components/core/Toast/ToastProvider.js +1 -1
- package/dist/components/core/Toast/useToast.js +5 -5
- package/dist/components/core/Tooltip/Tooltip.d.ts +1 -1
- package/dist/components/core/Tooltip/Tooltip.js +42 -10
- package/dist/components/core/Tooltip/Tooltip.types.d.ts +25 -0
- package/dist/components/core/Tree/Tree.js +2 -2
- package/dist/components/core/Tree/Tree.theme.js +1 -1
- package/dist/components/core/index.d.ts +0 -2
- package/dist/components/core/index.js +0 -4
- package/dist/components/core/shared/ChartTooltip/ChartTooltip.animations.d.ts +4 -0
- package/dist/components/core/shared/ChartTooltip/ChartTooltip.animations.js +20 -0
- package/dist/components/{charts → core}/shared/ChartTooltip/ChartTooltip.js +1 -1
- package/dist/components/core/shared/Ripple.d.ts +16 -0
- package/dist/components/core/shared/Ripple.js +141 -0
- package/dist/components/core/shared/interaction.animations.d.ts +51 -0
- package/dist/components/core/shared/interaction.animations.js +59 -0
- package/dist/components/data-display/Feed/Feed.js +2 -2
- package/dist/components/data-display/GanttChart/GanttChart.theme.js +7 -7
- package/dist/components/data-display/GanttChart/GanttChartPanel.js +2 -2
- package/dist/components/data-display/GanttChart/GanttTableGroupRow.js +3 -3
- package/dist/components/data-display/GanttChart/GanttTaskBar.js +1 -1
- package/dist/components/data-display/GanttChart/GanttTaskContextMenu.js +2 -2
- package/dist/components/data-display/GanttChart/GanttTimelineHeader.js +1 -1
- package/dist/components/data-display/GanttChart/GanttToolbar.js +2 -3
- package/dist/components/data-display/KPI/KPI.js +12 -21
- package/dist/components/data-display/KPI/KPI.theme.js +8 -4
- package/dist/components/data-display/Metric/Metric.js +2 -2
- package/dist/components/data-display/Metric/Metric.theme.js +25 -8
- package/dist/components/data-display/Metric/Metric.types.d.ts +1 -1
- package/dist/components/data-display/Table/Table.theme.js +11 -11
- package/dist/components/data-display/Table/TableActions.js +2 -2
- package/dist/components/data-display/Table/TableActionsMenu.js +1 -1
- package/dist/components/data-display/Table/TableColumnManager.js +2 -3
- package/dist/components/data-display/Table/TableContext.js +1 -0
- package/dist/components/data-display/Table/TableDeclarative.js +3 -3
- package/dist/components/data-display/Table/TableFilter.js +13 -6
- package/dist/components/data-display/Table/TableHeader.js +3 -3
- package/dist/components/data-display/Table/TableRow.js +2 -2
- package/dist/components/data-display/Table/TableSelectionHeader.js +4 -4
- package/dist/components/data-display/Timeline/Timeline.theme.js +1 -1
- package/dist/components/data-display/Timeline/TimelineMarker.js +2 -2
- package/dist/components/effects/CustomCursor/CustomCursor.d.ts +1 -1
- package/dist/components/effects/CustomCursor/CustomCursor.js +3 -3
- package/dist/components/effects/CustomCursor/CustomCursor.theme.js +4 -4
- package/dist/components/effects/DotPattern/DotPattern.js +6 -0
- package/dist/components/effects/DotPattern/DotPattern.types.d.ts +4 -2
- package/dist/components/effects/MeshGradient/MeshGradient.utils.d.ts +1 -1
- package/dist/components/effects/MeshGradient/MeshGradient.utils.js +1 -1
- package/dist/components/effects/Neumorphic/InsetCircleButton.js +1 -1
- package/dist/components/effects/Overlay/Overlay.js +7 -3
- package/dist/components/effects/index.d.ts +0 -32
- package/dist/components/effects/index.js +0 -16
- package/dist/components/effects/shared/ShaderCanvas/ShaderCanvas.d.ts +0 -2
- package/dist/components/effects/shared/ShaderCanvas/ShaderCanvas.js +1 -93
- package/dist/components/effects/shared/ShaderCanvas/ShaderCanvas.types.d.ts +0 -10
- package/dist/components/effects/shared/ShaderCanvas/index.d.ts +1 -1
- package/dist/components/effects/shared/index.d.ts +1 -3
- package/dist/components/effects/shared/shaderNoise.glsl.d.ts +1 -1
- package/dist/components/effects/shared/shaderNoise.glsl.js +2 -11
- package/dist/components/forms/Checkbox/Checkbox.js +2 -1
- package/dist/components/forms/Checkbox/Checkbox.theme.js +3 -3
- package/dist/components/forms/ColorPicker/ColorPickerEyeDropper.js +2 -2
- package/dist/components/forms/ColorPicker/ColorPickerGradient.js +2 -2
- package/dist/components/forms/ColorPicker/ColorPickerHeader.js +2 -2
- package/dist/components/forms/ColorPicker/ColorPickerImage.js +3 -3
- package/dist/components/forms/ColorPicker/ColorPickerInput.js +2 -2
- package/dist/components/forms/ColorPicker/ColorPickerPresets.js +2 -2
- package/dist/components/forms/ColorPicker/ColorPickerSavedColors.js +2 -2
- package/dist/components/forms/Combobox/Combobox.js +5 -3
- package/dist/components/forms/Combobox/Combobox.theme.js +2 -2
- package/dist/components/forms/DatePicker/DatePicker.animations.js +16 -25
- package/dist/components/forms/DatePicker/DatePicker.theme.js +2 -2
- package/dist/components/forms/DatePicker/DatePickerBody.js +1 -1
- package/dist/components/forms/DatePicker/DatePickerTrigger.js +2 -2
- package/dist/components/forms/DateRangePicker/DateRangePicker.theme.js +4 -4
- package/dist/components/forms/DateRangePicker/DateRangePickerBody.js +1 -1
- package/dist/components/forms/DateRangePicker/DateRangePickerContext.js +1 -0
- package/dist/components/forms/DateRangePicker/DateRangePickerPresets.js +2 -2
- package/dist/components/forms/DateRangePicker/DateRangePickerTrigger.js +2 -2
- package/dist/components/forms/FileUpload/FileUpload.js +4 -4
- package/dist/components/forms/FileUpload/FileUpload.theme.js +7 -3
- package/dist/components/forms/FileUpload/FileUploadProgress.js +7 -7
- package/dist/components/forms/FileUpload/FileUploadProgress.theme.js +1 -1
- package/dist/components/forms/Input/Input.js +6 -7
- package/dist/components/forms/Input/Input.theme.js +19 -15
- package/dist/components/forms/InputAddress/InputAddress.js +10 -3
- package/dist/components/forms/InputAddress/InputAddress.types.d.ts +2 -2
- package/dist/components/forms/InputCounter/InputCounter.js +3 -3
- package/dist/components/forms/InputOTP/InputOTP.d.ts +3 -12
- package/dist/components/forms/InputOTP/InputOTP.js +140 -151
- package/dist/components/forms/InputOTP/InputOTP.theme.d.ts +5 -1
- package/dist/components/forms/InputOTP/InputOTP.theme.js +40 -5
- package/dist/components/forms/InputOTP/InputOTP.types.d.ts +45 -2
- package/dist/components/forms/InputOTP/index.d.ts +1 -1
- package/dist/components/forms/InputTag/InputTag.js +5 -5
- package/dist/components/forms/InputTag/InputTag.theme.js +1 -2
- package/dist/components/forms/Mention/Mention.theme.js +3 -5
- package/dist/components/forms/Radio/Radio.js +3 -2
- package/dist/components/forms/Radio/Radio.theme.js +3 -3
- package/dist/components/forms/RichTextEditor/RichTextEditor.d.ts +12 -16
- package/dist/components/forms/RichTextEditor/RichTextEditor.js +165 -1681
- package/dist/components/forms/RichTextEditor/RichTextEditor.theme.d.ts +12 -56
- package/dist/components/forms/RichTextEditor/RichTextEditor.theme.js +60 -118
- package/dist/components/forms/RichTextEditor/RichTextEditor.types.d.ts +62 -126
- package/dist/components/forms/RichTextEditor/RichTextLinkField.d.ts +18 -0
- package/dist/components/forms/RichTextEditor/RichTextLinkField.js +46 -0
- package/dist/components/forms/RichTextEditor/RichTextToolbar.d.ts +15 -0
- package/dist/components/forms/RichTextEditor/RichTextToolbar.js +93 -0
- package/dist/components/forms/RichTextEditor/editorCommands.d.ts +50 -0
- package/dist/components/forms/RichTextEditor/editorCommands.js +58 -0
- package/dist/components/forms/RichTextEditor/editorState.d.ts +19 -0
- package/dist/components/forms/RichTextEditor/editorState.js +103 -0
- package/dist/components/forms/RichTextEditor/index.d.ts +5 -3
- package/dist/components/forms/RichTextEditor/sanitizeHtml.d.ts +38 -0
- package/dist/components/forms/RichTextEditor/sanitizeHtml.js +179 -0
- package/dist/components/forms/RichTextEditor/sanitizeHtml.test.d.ts +1 -0
- package/dist/components/forms/Select/Select.d.ts +5 -1
- package/dist/components/forms/Select/Select.js +14 -13
- package/dist/components/forms/Select/Select.theme.js +4 -4
- package/dist/components/forms/Select/Select.types.d.ts +74 -8
- package/dist/components/forms/Select/useSelectState.d.ts +9 -3
- package/dist/components/forms/Select/useSelectState.js +4 -1
- package/dist/components/forms/SelectableCard/SelectableCard.animations.d.ts +1 -2
- package/dist/components/forms/SelectableCard/SelectableCard.animations.js +6 -7
- package/dist/components/forms/SelectableCard/SelectableCard.js +3 -2
- package/dist/components/forms/SelectableCard/SelectableCard.theme.js +1 -1
- package/dist/components/forms/Signature/Signature.js +1 -1
- package/dist/components/forms/Slider/Slider.js +24 -11
- package/dist/components/forms/Slider/Slider.theme.js +9 -3
- package/dist/components/forms/Switch/Switch.theme.js +3 -3
- package/dist/components/forms/TimePicker/TimePicker.theme.js +7 -8
- package/dist/components/forms/TimePicker/TimePickerContent.js +1 -1
- package/dist/components/forms/TimePicker/TimePickerTrigger.js +3 -3
- package/dist/components/forms/forms.theme.js +38 -13
- package/dist/components/forms/index.js +2 -1
- package/dist/components/generative/FormShell.d.ts +22 -0
- package/dist/components/generative/FormShell.js +102 -0
- package/dist/components/generative/GenerativeView.d.ts +52 -1
- package/dist/components/generative/GenerativeView.js +203 -11
- package/dist/components/generative/actions.d.ts +5 -0
- package/dist/components/generative/ai-sdk/index.d.ts +1 -0
- package/dist/components/generative/ai-sdk/index.js +1 -0
- package/dist/components/generative/ai-sdk/useGenerativeChat.d.ts +52 -0
- package/dist/components/generative/ai-sdk/useGenerativeChat.js +73 -0
- package/dist/components/generative/ai-sdk/useGenerativeChat.test.d.ts +1 -0
- package/dist/components/generative/fieldBinding.d.ts +31 -0
- package/dist/components/generative/fieldBinding.js +33 -0
- package/dist/components/generative/fieldBinding.test.d.ts +1 -0
- package/dist/components/generative/formScope.d.ts +71 -0
- package/dist/components/generative/formScope.js +135 -0
- package/dist/components/generative/index.d.ts +4 -0
- package/dist/components/generative/index.js +4 -0
- package/dist/components/generative/registry.d.ts +2 -0
- package/dist/components/generative/registry.js +197 -4
- package/dist/components/generative/resolvers.js +16 -16
- package/dist/components/generative/schema.generated.js +2522 -328
- package/dist/components/generative/toToolResult.d.ts +21 -0
- package/dist/components/generative/toToolResult.js +15 -0
- package/dist/components/generative/toToolResult.test.d.ts +1 -0
- package/dist/components/generative/validate.d.ts +10 -1
- package/dist/components/generative/validate.js +126 -11
- package/dist/components/layout/Grid/Grid.js +1 -0
- package/dist/components/layout/Section/Section.theme.js +1 -1
- package/dist/components/layout/Stack/Stack.js +1 -0
- package/dist/generative.schema.json +2522 -328
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/useElapsedTime.d.ts +28 -0
- package/dist/hooks/useElapsedTime.js +37 -0
- package/dist/hooks/useSelectPortal.d.ts +10 -2
- package/dist/hooks/useSelectPortal.js +6 -3
- package/dist/index.js +2 -5
- package/dist/registry.json +3262 -2464
- package/dist/shadcn-compat.css +6 -6
- package/dist/styles/theme.test.d.ts +1 -0
- package/dist/styles.css +1 -1
- package/dist/test/render.d.ts +17 -0
- package/dist/theme.css +5 -1
- package/dist/themes/ember.css +131 -0
- package/dist/themes/iris.css +94 -0
- package/dist/themes/jade.css +139 -0
- package/dist/themes/precision.css +232 -0
- package/dist/tools.json +2557 -328
- package/dist/utils/colorUtils.d.ts +6 -6
- package/dist/utils/colorUtils.js +8 -8
- package/dist/utils/index.d.ts +0 -1
- package/package.json +39 -6
- package/src/global.scss +32 -28
- package/src/styles/theme.css +547 -176
- package/src/styles/theme.test.ts +119 -0
- package/tailwind.preset.cjs +66 -38
- package/dist/components/charts/FunnelChart/FunnelChart.animations.d.ts +0 -35
- package/dist/components/charts/FunnelChart/FunnelChart.animations.js +0 -59
- package/dist/components/charts/FunnelChart/FunnelChart.d.ts +0 -8
- package/dist/components/charts/FunnelChart/FunnelChart.js +0 -410
- package/dist/components/charts/FunnelChart/FunnelChart.theme.d.ts +0 -2
- package/dist/components/charts/FunnelChart/FunnelChart.theme.js +0 -12
- package/dist/components/charts/FunnelChart/FunnelChart.types.d.ts +0 -105
- package/dist/components/charts/FunnelChart/index.d.ts +0 -4
- package/dist/components/charts/ScatterPlot/ScatterPlot.d.ts +0 -9
- package/dist/components/charts/ScatterPlot/ScatterPlot.js +0 -207
- package/dist/components/charts/ScatterPlot/ScatterPlot.theme.d.ts +0 -18
- package/dist/components/charts/ScatterPlot/ScatterPlot.theme.js +0 -42
- package/dist/components/charts/ScatterPlot/ScatterPlot.types.d.ts +0 -65
- package/dist/components/charts/ScatterPlot/ScatterPlot.types.js +0 -12
- package/dist/components/charts/ScatterPlot/index.d.ts +0 -3
- package/dist/components/core/Button/Button.ripple.d.ts +0 -71
- package/dist/components/core/Button/Button.ripple.js +0 -236
- package/dist/components/core/Calendar/CalendarEvent/CalendarEvent.d.ts +0 -4
- package/dist/components/core/Calendar/CalendarEvent/CalendarEvent.theme.d.ts +0 -12
- package/dist/components/core/Calendar/CalendarEvent/CalendarEvent.types.d.ts +0 -23
- package/dist/components/core/Calendar/CalendarEvent/index.d.ts +0 -2
- package/dist/components/core/CardStack/CardStack.animations.d.ts +0 -47
- package/dist/components/core/CardStack/CardStack.d.ts +0 -3
- package/dist/components/core/CardStack/CardStack.js +0 -187
- package/dist/components/core/CardStack/CardStack.theme.d.ts +0 -6
- package/dist/components/core/CardStack/CardStack.theme.js +0 -33
- package/dist/components/core/CardStack/CardStack.types.d.ts +0 -139
- package/dist/components/core/CardStack/index.d.ts +0 -7
- package/dist/components/core/Carousel/Carousel.d.ts +0 -3
- package/dist/components/core/Carousel/Carousel.js +0 -83
- package/dist/components/core/Carousel/Carousel.theme.d.ts +0 -10
- package/dist/components/core/Carousel/Carousel.theme.js +0 -20
- package/dist/components/core/Carousel/Carousel.types.d.ts +0 -113
- package/dist/components/core/Carousel/CarouselBody.d.ts +0 -4
- package/dist/components/core/Carousel/CarouselBody.js +0 -59
- package/dist/components/core/Carousel/CarouselContext.d.ts +0 -3
- package/dist/components/core/Carousel/CarouselContext.js +0 -13
- package/dist/components/core/Carousel/CarouselItem.d.ts +0 -4
- package/dist/components/core/Carousel/CarouselItem.js +0 -11
- package/dist/components/core/Carousel/CarouselNext.d.ts +0 -4
- package/dist/components/core/Carousel/CarouselNext.js +0 -16
- package/dist/components/core/Carousel/CarouselPrevious.d.ts +0 -4
- package/dist/components/core/Carousel/CarouselPrevious.js +0 -16
- package/dist/components/core/Carousel/index.d.ts +0 -3
- package/dist/components/core/Pill/Pill.animations.d.ts +0 -32
- package/dist/components/core/Pill/Pill.animations.js +0 -16
- package/dist/components/effects/ColorPanels/ColorPanels.d.ts +0 -8
- package/dist/components/effects/ColorPanels/ColorPanels.js +0 -66
- package/dist/components/effects/ColorPanels/ColorPanels.shaders.d.ts +0 -12
- package/dist/components/effects/ColorPanels/ColorPanels.shaders.js +0 -218
- package/dist/components/effects/ColorPanels/ColorPanels.types.d.ts +0 -29
- package/dist/components/effects/ColorPanels/ColorPanels.types.js +0 -3
- package/dist/components/effects/ColorPanels/index.d.ts +0 -2
- package/dist/components/effects/FlutedGlass/FlutedGlass.d.ts +0 -9
- package/dist/components/effects/FlutedGlass/FlutedGlass.js +0 -80
- package/dist/components/effects/FlutedGlass/FlutedGlass.shaders.d.ts +0 -12
- package/dist/components/effects/FlutedGlass/FlutedGlass.shaders.js +0 -335
- package/dist/components/effects/FlutedGlass/FlutedGlass.types.d.ts +0 -61
- package/dist/components/effects/FlutedGlass/FlutedGlass.types.js +0 -16
- package/dist/components/effects/FlutedGlass/index.d.ts +0 -3
- package/dist/components/effects/GlassEffect/GlassEffect.d.ts +0 -15
- package/dist/components/effects/GlassEffect/GlassEffect.js +0 -38
- package/dist/components/effects/GlassEffect/GlassEffect.types.d.ts +0 -19
- package/dist/components/effects/GlassEffect/index.d.ts +0 -2
- package/dist/components/effects/GlassSurface/GlassSurface.d.ts +0 -8
- package/dist/components/effects/GlassSurface/GlassSurface.js +0 -250
- package/dist/components/effects/GlassSurface/GlassSurface.types.d.ts +0 -66
- package/dist/components/effects/GlassSurface/index.d.ts +0 -2
- package/dist/components/effects/GodRays/GodRays.d.ts +0 -8
- package/dist/components/effects/GodRays/GodRays.js +0 -68
- package/dist/components/effects/GodRays/GodRays.shaders.d.ts +0 -10
- package/dist/components/effects/GodRays/GodRays.shaders.js +0 -128
- package/dist/components/effects/GodRays/GodRays.types.d.ts +0 -25
- package/dist/components/effects/GodRays/GodRays.types.js +0 -3
- package/dist/components/effects/GodRays/index.d.ts +0 -2
- package/dist/components/effects/GridPattern/GridPattern.d.ts +0 -18
- package/dist/components/effects/GridPattern/GridPattern.js +0 -65
- package/dist/components/effects/GridPattern/GridPattern.types.d.ts +0 -47
- package/dist/components/effects/GridPattern/index.d.ts +0 -2
- package/dist/components/effects/HalftoneCmyk/HalftoneCmyk.d.ts +0 -10
- package/dist/components/effects/HalftoneCmyk/HalftoneCmyk.js +0 -78
- package/dist/components/effects/HalftoneCmyk/HalftoneCmyk.shaders.d.ts +0 -22
- package/dist/components/effects/HalftoneCmyk/HalftoneCmyk.shaders.js +0 -239
- package/dist/components/effects/HalftoneCmyk/HalftoneCmyk.types.d.ts +0 -52
- package/dist/components/effects/HalftoneCmyk/index.d.ts +0 -2
- package/dist/components/effects/HalftoneDots/HalftoneDots.d.ts +0 -9
- package/dist/components/effects/HalftoneDots/HalftoneDots.js +0 -68
- package/dist/components/effects/HalftoneDots/HalftoneDots.shaders.d.ts +0 -13
- package/dist/components/effects/HalftoneDots/HalftoneDots.shaders.js +0 -296
- package/dist/components/effects/HalftoneDots/HalftoneDots.types.d.ts +0 -43
- package/dist/components/effects/HalftoneDots/HalftoneDots.types.js +0 -12
- package/dist/components/effects/HalftoneDots/index.d.ts +0 -3
- package/dist/components/effects/ImageDithering/ImageDithering.d.ts +0 -9
- package/dist/components/effects/ImageDithering/ImageDithering.js +0 -68
- package/dist/components/effects/ImageDithering/ImageDithering.shaders.d.ts +0 -12
- package/dist/components/effects/ImageDithering/ImageDithering.shaders.js +0 -117
- package/dist/components/effects/ImageDithering/ImageDithering.types.d.ts +0 -30
- package/dist/components/effects/ImageDithering/ImageDithering.types.js +0 -8
- package/dist/components/effects/ImageDithering/index.d.ts +0 -3
- package/dist/components/effects/MagneticElement/MagneticElement.d.ts +0 -30
- package/dist/components/effects/MagneticElement/MagneticElement.js +0 -111
- package/dist/components/effects/MagneticElement/MagneticElement.types.d.ts +0 -44
- package/dist/components/effects/MagneticElement/index.d.ts +0 -2
- package/dist/components/effects/Metaballs/Metaballs.d.ts +0 -8
- package/dist/components/effects/Metaballs/Metaballs.js +0 -59
- package/dist/components/effects/Metaballs/Metaballs.shaders.d.ts +0 -10
- package/dist/components/effects/Metaballs/Metaballs.shaders.js +0 -102
- package/dist/components/effects/Metaballs/Metaballs.types.d.ts +0 -16
- package/dist/components/effects/Metaballs/Metaballs.types.js +0 -3
- package/dist/components/effects/Metaballs/index.d.ts +0 -2
- package/dist/components/effects/PaperTexture/PaperTexture.d.ts +0 -9
- package/dist/components/effects/PaperTexture/PaperTexture.js +0 -61
- package/dist/components/effects/PaperTexture/PaperTexture.shaders.d.ts +0 -22
- package/dist/components/effects/PaperTexture/PaperTexture.shaders.js +0 -145
- package/dist/components/effects/PaperTexture/PaperTexture.types.d.ts +0 -19
- package/dist/components/effects/PaperTexture/index.d.ts +0 -2
- package/dist/components/effects/PulsingBorder/PulsingBorder.d.ts +0 -27
- package/dist/components/effects/PulsingBorder/PulsingBorder.js +0 -174
- package/dist/components/effects/PulsingBorder/PulsingBorder.shaders.d.ts +0 -14
- package/dist/components/effects/PulsingBorder/PulsingBorder.shaders.js +0 -258
- package/dist/components/effects/PulsingBorder/PulsingBorder.types.d.ts +0 -75
- package/dist/components/effects/PulsingBorder/PulsingBorder.types.js +0 -3
- package/dist/components/effects/PulsingBorder/index.d.ts +0 -2
- package/dist/components/effects/SmokeRing/SmokeRing.d.ts +0 -8
- package/dist/components/effects/SmokeRing/SmokeRing.js +0 -62
- package/dist/components/effects/SmokeRing/SmokeRing.shaders.d.ts +0 -14
- package/dist/components/effects/SmokeRing/SmokeRing.shaders.js +0 -130
- package/dist/components/effects/SmokeRing/SmokeRing.types.d.ts +0 -22
- package/dist/components/effects/SmokeRing/SmokeRing.types.js +0 -3
- package/dist/components/effects/SmokeRing/index.d.ts +0 -2
- package/dist/components/effects/StaticGradientMesh/StaticGradientMesh.d.ts +0 -9
- package/dist/components/effects/StaticGradientMesh/StaticGradientMesh.js +0 -59
- package/dist/components/effects/StaticGradientMesh/StaticGradientMesh.shaders.d.ts +0 -14
- package/dist/components/effects/StaticGradientMesh/StaticGradientMesh.shaders.js +0 -129
- package/dist/components/effects/StaticGradientMesh/StaticGradientMesh.types.d.ts +0 -23
- package/dist/components/effects/StaticGradientMesh/StaticGradientMesh.types.js +0 -3
- package/dist/components/effects/StaticGradientMesh/index.d.ts +0 -2
- package/dist/components/effects/Water/Water.d.ts +0 -9
- package/dist/components/effects/Water/Water.js +0 -65
- package/dist/components/effects/Water/Water.shaders.d.ts +0 -11
- package/dist/components/effects/Water/Water.shaders.js +0 -123
- package/dist/components/effects/Water/Water.types.d.ts +0 -25
- package/dist/components/effects/Water/index.d.ts +0 -2
- package/dist/components/effects/shared/bayerMatrices.glsl.d.ts +0 -10
- package/dist/components/effects/shared/bayerMatrices.glsl.js +0 -44
- package/dist/components/effects/shared/imageUV.glsl.d.ts +0 -12
- package/dist/components/effects/shared/imageUV.glsl.js +0 -26
- package/dist/components/forms/RichTextEditor/RichTextEditor.animations.d.ts +0 -7
- package/dist/components/forms/RichTextEditor/RichTextEditor.animations.js +0 -32
- package/dist/utils/calendarUtils.d.ts +0 -60
- /package/dist/components/{charts → core}/shared/ChartTooltip/ChartTooltip.d.ts +0 -0
- /package/dist/components/{charts → core}/shared/ChartTooltip/ChartTooltip.theme.d.ts +0 -0
- /package/dist/components/{charts → core}/shared/ChartTooltip/ChartTooltip.theme.js +0 -0
- /package/dist/components/{charts → core}/shared/ChartTooltip/ChartTooltip.types.d.ts +0 -0
- /package/dist/components/{charts → core}/shared/ChartTooltip/ChartTooltipContent.d.ts +0 -0
- /package/dist/components/{charts → core}/shared/ChartTooltip/index.d.ts +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { ReactNode
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
2
|
import { SemanticColor } from "../../../utils/colorUtils";
|
|
3
3
|
import type { MeshPaletteName } from "../../effects/MeshGradient";
|
|
4
4
|
export type BadgeVariant = "filled" | "outline" | "soft";
|
|
@@ -25,6 +25,10 @@ export interface BadgeTheme {
|
|
|
25
25
|
* Styles for each badge size (flat structure)
|
|
26
26
|
*/
|
|
27
27
|
sizes: Record<BadgeSize, string>;
|
|
28
|
+
/**
|
|
29
|
+
* Corner radius for each badge size (ignored when `pill` is set)
|
|
30
|
+
*/
|
|
31
|
+
radiusSizes: Record<BadgeSize, string>;
|
|
28
32
|
/**
|
|
29
33
|
* Additional padding for pill-shaped badges
|
|
30
34
|
*/
|
|
@@ -37,21 +41,10 @@ export interface BadgeTheme {
|
|
|
37
41
|
* Avatar sizes for each badge size
|
|
38
42
|
*/
|
|
39
43
|
avatarSizes: Record<BadgeSize, string>;
|
|
40
|
-
/**
|
|
41
|
-
* Dismiss icon sizes (button sizes itself from icon + padding)
|
|
42
|
-
*/
|
|
43
|
-
dismissSizes: Record<BadgeSize, string>;
|
|
44
44
|
/**
|
|
45
45
|
* Color styles for dot indicators
|
|
46
46
|
*/
|
|
47
47
|
dotColors: Record<BadgeColor, string>;
|
|
48
|
-
/**
|
|
49
|
-
* State styles (disabled, hover, selected)
|
|
50
|
-
*/
|
|
51
|
-
states: {
|
|
52
|
-
disabled: string;
|
|
53
|
-
hover: string;
|
|
54
|
-
};
|
|
55
48
|
}
|
|
56
49
|
/**
|
|
57
50
|
* Theme overrides for Badge component
|
|
@@ -61,15 +54,11 @@ export interface BadgeThemeOverrides {
|
|
|
61
54
|
variants?: Partial<Record<BadgeVariant, string>>;
|
|
62
55
|
variantColors?: Partial<Record<BadgeVariant, Partial<Record<BadgeColor, string>>>>;
|
|
63
56
|
sizes?: Partial<Record<BadgeSize, string>>;
|
|
57
|
+
radiusSizes?: Partial<Record<BadgeSize, string>>;
|
|
64
58
|
pillSizes?: Partial<Record<BadgeSize, string>>;
|
|
65
59
|
iconSizes?: Partial<Record<BadgeSize, string>>;
|
|
66
60
|
avatarSizes?: Partial<Record<BadgeSize, string>>;
|
|
67
|
-
dismissSizes?: Partial<Record<BadgeSize, string>>;
|
|
68
61
|
dotColors?: Partial<Record<BadgeColor, string>>;
|
|
69
|
-
states?: Partial<{
|
|
70
|
-
disabled: string;
|
|
71
|
-
hover: string;
|
|
72
|
-
}>;
|
|
73
62
|
}
|
|
74
63
|
export interface BadgeProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "inputMode"> {
|
|
75
64
|
/**
|
|
@@ -77,8 +66,18 @@ export interface BadgeProps extends Omit<React.HTMLAttributes<HTMLSpanElement>,
|
|
|
77
66
|
*/
|
|
78
67
|
children: ReactNode;
|
|
79
68
|
/**
|
|
80
|
-
* The visual style variant of the badge
|
|
81
|
-
*
|
|
69
|
+
* The visual style variant of the badge.
|
|
70
|
+
*
|
|
71
|
+
* `soft` is the default because a badge is a STATUS/METADATA label, not an
|
|
72
|
+
* action — a tinted chip is the idiom, and a full-strength fill overstates a
|
|
73
|
+
* label sitting next to real controls. Pick a non-default deliberately:
|
|
74
|
+
* - `filled` — on imagery/gradients, or a genuine emphasis flag ("NEW")
|
|
75
|
+
* - `outline` — quiet keyword tags; in practice only reads well at `color="mono"`
|
|
76
|
+
*
|
|
77
|
+
* (Button defaults to `filled` — an action SHOULD be the loudest thing. Same
|
|
78
|
+
* vocabulary, opposite default, on purpose. See CLAUDE.md §8.)
|
|
79
|
+
*
|
|
80
|
+
* @default 'soft'
|
|
82
81
|
*/
|
|
83
82
|
variant?: BadgeVariant;
|
|
84
83
|
/**
|
|
@@ -127,21 +126,6 @@ export interface BadgeProps extends Omit<React.HTMLAttributes<HTMLSpanElement>,
|
|
|
127
126
|
/** Raw gradient color override; wins over `gradientVariant`. */
|
|
128
127
|
gradientColors?: string[];
|
|
129
128
|
};
|
|
130
|
-
/**
|
|
131
|
-
* Whether the badge is dismissible (shows close button)
|
|
132
|
-
* @default false
|
|
133
|
-
*/
|
|
134
|
-
dismissible?: boolean;
|
|
135
|
-
/**
|
|
136
|
-
* Callback when close button is clicked
|
|
137
|
-
* Required when dismissible is true
|
|
138
|
-
*/
|
|
139
|
-
onDismiss?: (event: MouseEvent<HTMLButtonElement>) => void;
|
|
140
|
-
/**
|
|
141
|
-
* Whether the badge is disabled
|
|
142
|
-
* @default false
|
|
143
|
-
*/
|
|
144
|
-
disabled?: boolean;
|
|
145
129
|
/**
|
|
146
130
|
* Maximum width before truncating the label
|
|
147
131
|
* Accepts CSS width value (e.g., '100px', '10rem') or number (pixels)
|
|
@@ -13,7 +13,4 @@ export declare const breadcrumbsVariants: Record<BreadcrumbsVariant, Partial<Bre
|
|
|
13
13
|
/**
|
|
14
14
|
* Default chevron separator element
|
|
15
15
|
*/
|
|
16
|
-
export declare const defaultSeparator: React.FunctionComponentElement<
|
|
17
|
-
title?: string;
|
|
18
|
-
titleId?: string;
|
|
19
|
-
} & React.RefAttributes<SVGSVGElement>>;
|
|
16
|
+
export declare const defaultSeparator: React.FunctionComponentElement<import("@phosphor-icons/react").IconProps>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { CaretRight } from '@phosphor-icons/react';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Default theme configuration for Breadcrumbs component
|
|
@@ -7,10 +7,10 @@ import { ChevronRightIcon } from '@heroicons/react/20/solid';
|
|
|
7
7
|
* Simple layout styles are inlined in the component
|
|
8
8
|
*/
|
|
9
9
|
const breadcrumbsTheme = {
|
|
10
|
-
link: "text-[var(--color-text-muted)] hover:text-[var(--color-text-primary)] transition-colors duration-
|
|
10
|
+
link: "text-[var(--color-text-muted)] hover:text-[var(--color-text-primary)] transition-colors duration-[var(--motion-duration-fast)] font-medium",
|
|
11
11
|
current: "text-[var(--color-text-primary)] font-medium",
|
|
12
12
|
separator: "text-[var(--color-text-muted)] select-none",
|
|
13
|
-
ellipsis: "text-sm text-[var(--color-text-muted)] hover:text-[var(--color-text-primary)] transition-colors duration-
|
|
13
|
+
ellipsis: "text-sm text-[var(--color-text-muted)] hover:text-[var(--color-text-primary)] transition-colors duration-[var(--motion-duration-fast)] cursor-pointer p-1 rounded hover:bg-[var(--color-surface-hover)]",
|
|
14
14
|
};
|
|
15
15
|
/**
|
|
16
16
|
* Variant styles for different breadcrumb appearances
|
|
@@ -18,15 +18,15 @@ const breadcrumbsTheme = {
|
|
|
18
18
|
const breadcrumbsVariants = {
|
|
19
19
|
default: {},
|
|
20
20
|
muted: {
|
|
21
|
-
link: "text-[var(--color-text-muted)] hover:text-[var(--color-text-secondary)] transition-colors duration-
|
|
21
|
+
link: "text-[var(--color-text-muted)] hover:text-[var(--color-text-secondary)] transition-colors duration-[var(--motion-duration-fast)] font-normal",
|
|
22
22
|
current: "text-[var(--color-text-secondary)] font-normal",
|
|
23
23
|
separator: "text-[var(--color-border)]",
|
|
24
|
-
ellipsis: "text-sm text-[var(--color-text-muted)] hover:text-[var(--color-text-secondary)] transition-colors duration-
|
|
24
|
+
ellipsis: "text-sm text-[var(--color-text-muted)] hover:text-[var(--color-text-secondary)] transition-colors duration-[var(--motion-duration-fast)] cursor-pointer p-1 rounded hover:bg-[var(--color-surface)]",
|
|
25
25
|
},
|
|
26
26
|
};
|
|
27
27
|
/**
|
|
28
28
|
* Default chevron separator element
|
|
29
29
|
*/
|
|
30
|
-
const defaultSeparator = React__default.createElement(
|
|
30
|
+
const defaultSeparator = React__default.createElement(CaretRight, { className: "size-4" });
|
|
31
31
|
|
|
32
32
|
export { breadcrumbsTheme, breadcrumbsVariants, defaultSeparator };
|
|
@@ -1,34 +1,19 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
-
import React__default, { useCallback
|
|
3
|
+
import React__default, { useCallback } from 'react';
|
|
4
4
|
import { useReducedMotion, motion } from 'motion/react';
|
|
5
5
|
import { buttonTheme } from './Button.theme.js';
|
|
6
6
|
import { cn } from '../../../utils/cn.js';
|
|
7
7
|
import { Spinner } from '../Spinner/Spinner.js';
|
|
8
|
-
import {
|
|
8
|
+
import { Ripple } from '../shared/Ripple.js';
|
|
9
|
+
import { createPressVariants } from '../shared/interaction.animations.js';
|
|
9
10
|
|
|
10
|
-
//
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
transition: {
|
|
15
|
-
duration: 0.1,
|
|
16
|
-
type: "spring",
|
|
17
|
-
stiffness: 400,
|
|
18
|
-
damping: 10,
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
};
|
|
22
|
-
const Button = React__default.forwardRef(({ children, className = "", iconOnly = false, state = "default", size = "md", color, variant, block = false, onClick, enableRipple = true, rippleEffect = "default", rippleClassName, rippleScale = 10, showReflection = true, darkMode = false, disabled: disabledProp, "aria-label": ariaLabelProp, onAnimationStart: _onAnimationStart, onAnimationEnd: _onAnimationEnd, onDrag: _onDrag, onDragStart: _onDragStart, onDragEnd: _onDragEnd, ...restProps }, ref) => {
|
|
23
|
-
var _a, _b, _c, _d, _e, _f;
|
|
11
|
+
// Shared press physics (module-level constant)
|
|
12
|
+
const BUTTON_PRESS_VARIANTS = createPressVariants(0.97);
|
|
13
|
+
const Button = React__default.forwardRef(({ children, iconStart, iconEnd, className = "", iconOnly = false, state = "default", size = "md", color, variant, block = false, onClick, enableRipple = true, showReflection = true, darkMode = false, disabled: disabledProp, "aria-label": ariaLabelProp, onAnimationStart: _onAnimationStart, onAnimationEnd: _onAnimationEnd, onDrag: _onDrag, onDragStart: _onDragStart, onDragEnd: _onDragEnd, ...restProps }, ref) => {
|
|
14
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
24
15
|
const shouldReduceMotion = useReducedMotion();
|
|
25
16
|
const shouldDisableAnimations = !!shouldReduceMotion;
|
|
26
|
-
// Initialize ripple hook
|
|
27
|
-
const { ripples, createRipple, buttonRef, effect } = useRipple({
|
|
28
|
-
scale: rippleScale,
|
|
29
|
-
duration: 600,
|
|
30
|
-
effect: rippleEffect,
|
|
31
|
-
});
|
|
32
17
|
// Resolve color and variant with defaults
|
|
33
18
|
const resolvedColor = color || "primary";
|
|
34
19
|
const resolvedVariant = variant || "filled";
|
|
@@ -43,13 +28,10 @@ const Button = React__default.forwardRef(({ children, className = "", iconOnly =
|
|
|
43
28
|
}
|
|
44
29
|
}
|
|
45
30
|
// Safe onClick handler - respect both state="disabled" and disabled={true}
|
|
31
|
+
// (the ripple wires itself to the DOM node — see <Ripple /> below)
|
|
46
32
|
const handleClick = useCallback((event) => {
|
|
47
33
|
if (isDisabled)
|
|
48
34
|
return;
|
|
49
|
-
// Create ripple effect if enabled
|
|
50
|
-
if (enableRipple && !shouldReduceMotion) {
|
|
51
|
-
createRipple(event);
|
|
52
|
-
}
|
|
53
35
|
try {
|
|
54
36
|
onClick === null || onClick === void 0 ? void 0 : onClick(event);
|
|
55
37
|
}
|
|
@@ -59,7 +41,7 @@ const Button = React__default.forwardRef(({ children, className = "", iconOnly =
|
|
|
59
41
|
console.error("Error in button click handler:", error);
|
|
60
42
|
}
|
|
61
43
|
}
|
|
62
|
-
}, [onClick, isDisabled
|
|
44
|
+
}, [onClick, isDisabled]);
|
|
63
45
|
// Compute theme classes (direct computation - faster than useMemo)
|
|
64
46
|
const sizeClasses = ((_b = (_a = buttonTheme.sizes) === null || _a === void 0 ? void 0 : _a[size]) === null || _b === void 0 ? void 0 : _b[iconOnly ? "iconOnly" : "default"]) || "";
|
|
65
47
|
const colorClasses = ((_c = buttonTheme.variantColors[resolvedVariant]) === null || _c === void 0 ? void 0 : _c[resolvedColor]) || "";
|
|
@@ -78,8 +60,9 @@ const Button = React__default.forwardRef(({ children, className = "", iconOnly =
|
|
|
78
60
|
const animationProps = shouldDisableAnimations
|
|
79
61
|
? {}
|
|
80
62
|
: {
|
|
81
|
-
|
|
82
|
-
|
|
63
|
+
animate: "rest",
|
|
64
|
+
whileTap: !isDisabled ? "press" : undefined,
|
|
65
|
+
variants: BUTTON_PRESS_VARIANTS,
|
|
83
66
|
};
|
|
84
67
|
// Spinner inherits the button's text color (the `-contrast` token on filled
|
|
85
68
|
// variants, the semantic color on outline/soft/ghost) so it always contrasts
|
|
@@ -92,36 +75,9 @@ const Button = React__default.forwardRef(({ children, className = "", iconOnly =
|
|
|
92
75
|
// single time below, instead of spreading `restProps` and then
|
|
93
76
|
// unconditionally overwriting it with `state`.
|
|
94
77
|
const consumerDataState = restProps["data-state"];
|
|
95
|
-
|
|
96
|
-
const forwardedRef = useRef(ref);
|
|
97
|
-
forwardedRef.current = ref;
|
|
98
|
-
// Merge refs - stable callback that won't cause DOM detach/attach cycles
|
|
99
|
-
const mergedRef = useCallback((node) => {
|
|
100
|
-
// Set ripple's buttonRef
|
|
101
|
-
if (buttonRef) {
|
|
102
|
-
buttonRef.current = node;
|
|
103
|
-
}
|
|
104
|
-
// Set forwarded ref
|
|
105
|
-
const fRef = forwardedRef.current;
|
|
106
|
-
if (typeof fRef === "function") {
|
|
107
|
-
fRef(node);
|
|
108
|
-
}
|
|
109
|
-
else if (fRef) {
|
|
110
|
-
fRef.current =
|
|
111
|
-
node;
|
|
112
|
-
}
|
|
113
|
-
}, [buttonRef]);
|
|
114
|
-
return (jsxs(motion.button, { type: "button", ...restProps, ...animationProps, ref: mergedRef, className: cn(buttonTheme.baseStyle, colorClasses, variantClasses, sizeClasses, blockStyle, stateClasses, darkMode && "dark", className), disabled: isDisabled, "data-state": consumerDataState !== null && consumerDataState !== void 0 ? consumerDataState : state, "data-color": resolvedColor, "data-variant": resolvedVariant, "data-size": size, "data-icon-only": iconOnly ? "true" : "false", "data-block": block ? "true" : "false", "aria-disabled": isDisabled || undefined, "aria-busy": isLoading || undefined, "aria-label": ariaLabel, onClick: handleClick, children: [showReflection &&
|
|
78
|
+
return (jsxs(motion.button, { type: "button", ...restProps, ...animationProps, ref: ref, className: cn(buttonTheme.baseStyle, colorClasses, variantClasses, sizeClasses, blockStyle, stateClasses, darkMode && "dark", className), disabled: isDisabled, "data-state": consumerDataState !== null && consumerDataState !== void 0 ? consumerDataState : state, "data-color": resolvedColor, "data-variant": resolvedVariant, "data-size": size, "data-icon-only": iconOnly ? "true" : "false", "data-block": block ? "true" : "false", "aria-disabled": isDisabled || undefined, "aria-busy": isLoading || undefined, "aria-label": ariaLabel, onClick: handleClick, children: [showReflection &&
|
|
115
79
|
resolvedVariant !== "ghost" &&
|
|
116
|
-
resolvedVariant !== "outline" && (jsx("div", { className: "pointer-events-none absolute inset-px border-t-[0.5px] border-white/50 rounded-[inherit] blur-[0.75px]" })), isLoading && (jsx("div", { className: "absolute inset-0 flex items-center justify-center", children: jsx(Spinner, { size: "sm", color: color, className: spinnerClassName }) })),
|
|
117
|
-
ripples.map((ripple) => {
|
|
118
|
-
const animation = getRippleAnimation(effect, ripple, rippleScale);
|
|
119
|
-
return (jsx(motion.span, { initial: animation.initial, animate: animation.animate, transition: animation.transition, className: cn("absolute rounded-full size-5 pointer-events-none ", animation.className, rippleClassName ||
|
|
120
|
-
getRippleColorClass(resolvedVariant, resolvedColor)), style: {
|
|
121
|
-
top: ripple.y - 10,
|
|
122
|
-
left: ripple.x - 10,
|
|
123
|
-
} }, ripple.id));
|
|
124
|
-
})] }));
|
|
80
|
+
resolvedVariant !== "outline" && (jsx("div", { className: "pointer-events-none absolute inset-px border-t-[0.5px] border-white/50 rounded-[inherit] blur-[0.75px]" })), isLoading && (jsx("div", { className: "absolute inset-0 flex items-center justify-center", children: jsx(Spinner, { size: "sm", color: color, className: spinnerClassName }) })), jsxs("span", { className: cn("inline-flex items-center gap-2 whitespace-nowrap", isLoading && "opacity-0"), children: [iconStart && (jsx("span", { className: cn("inline-flex shrink-0 items-center justify-center", (_g = buttonTheme.iconSizes) === null || _g === void 0 ? void 0 : _g[size]), "aria-hidden": "true", children: iconStart })), children, iconEnd && (jsx("span", { className: cn("inline-flex shrink-0 items-center justify-center", (_h = buttonTheme.iconSizes) === null || _h === void 0 ? void 0 : _h[size]), "aria-hidden": "true", children: iconEnd }))] }), enableRipple && jsx(Ripple, {})] }));
|
|
125
81
|
});
|
|
126
82
|
// Set display name for dev tools and Storybook
|
|
127
83
|
Button.displayName = "Button";
|
|
@@ -16,6 +16,8 @@ export interface ButtonTheme {
|
|
|
16
16
|
default: string;
|
|
17
17
|
iconOnly: string;
|
|
18
18
|
}>;
|
|
19
|
+
/** Wrapper sizing for the `iconStart`/`iconEnd` slots, per button size. */
|
|
20
|
+
iconSizes: Record<ButtonSize, string>;
|
|
19
21
|
states: Partial<Record<ButtonState, string>>;
|
|
20
22
|
blockStyle: string;
|
|
21
23
|
}
|
|
@@ -3,34 +3,39 @@
|
|
|
3
3
|
*/
|
|
4
4
|
const buttonTheme = {
|
|
5
5
|
// Base styles for the button element
|
|
6
|
-
baseStyle: "relative inline-flex items-center justify-center gap-2 focus:outline-none rounded-[var(--button-radius)] overflow-hidden cursor-pointer transition-
|
|
6
|
+
baseStyle: "relative inline-flex items-center justify-center gap-2 focus:outline-none rounded-[var(--button-radius)] overflow-hidden cursor-pointer transition-[color,background-color,border-color,box-shadow,filter,opacity] duration-[var(--motion-duration-fast)] ease-out min-w-fit flex-shrink-0 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 cursor-pointer backdrop-blur-sm",
|
|
7
7
|
// Visual style variants - STRUCTURE only (no colors)
|
|
8
8
|
variantStyles: {
|
|
9
|
-
filled: "border border-black/
|
|
9
|
+
filled: "border border-black/15 hover:brightness-[0.9] dark:hover:brightness-[1.15]",
|
|
10
10
|
outline: "bg-transparent border",
|
|
11
11
|
soft: "border-transparent",
|
|
12
12
|
ghost: "bg-transparent border-transparent",
|
|
13
13
|
},
|
|
14
14
|
// Color styles organized BY VARIANT for reliable dark: prefixes
|
|
15
15
|
variantColors: {
|
|
16
|
-
// Filled variant - solid backgrounds
|
|
16
|
+
// Filled variant - solid backgrounds.
|
|
17
|
+
// Border split: LIGHT edge is the universal `border-black/25` from
|
|
18
|
+
// variantStyles.filled (later in the stylesheet, it beats any light
|
|
19
|
+
// border-* set here — don't add one). DARK keeps color-matched
|
|
20
|
+
// `dark:border-*` per color (dark variants compile after black/25 and
|
|
21
|
+
// win; a black edge would be invisible on dark fills).
|
|
17
22
|
filled: {
|
|
18
|
-
|
|
19
|
-
"focus-visible:outline-[var(--color-
|
|
20
|
-
"dark:
|
|
21
|
-
primary: "bg-[var(--color-primary)] text-[var(--color-primary-contrast)]
|
|
23
|
+
mono: "bg-[var(--color-mono)] text-[var(--color-mono-contrast)] " +
|
|
24
|
+
"focus-visible:outline-[var(--color-mono-800)] " +
|
|
25
|
+
"dark:border-[var(--color-mono)]",
|
|
26
|
+
primary: "bg-[var(--color-primary)] text-[var(--color-primary-contrast)] " +
|
|
22
27
|
"focus-visible:outline-[var(--color-primary-600)] " +
|
|
23
|
-
"dark:
|
|
24
|
-
danger: "bg-[var(--color-danger)] text-[var(--color-danger-contrast)]
|
|
28
|
+
"dark:border-[var(--color-primary-600)]",
|
|
29
|
+
danger: "bg-[var(--color-danger)] text-[var(--color-danger-contrast)] " +
|
|
25
30
|
"focus-visible:outline-[var(--color-danger-600)] " +
|
|
26
31
|
"dark:bg-[var(--color-danger-600)] dark:border-[var(--color-danger-600)]",
|
|
27
32
|
},
|
|
28
33
|
// Outline variant - transparent bg with colored border
|
|
29
34
|
outline: {
|
|
30
|
-
|
|
31
|
-
"hover:bg-[var(--color-
|
|
35
|
+
mono: "text-[var(--color-text-primary)] border-[var(--color-border-secondary)] " +
|
|
36
|
+
"hover:bg-[var(--color-mono-100)] " +
|
|
32
37
|
"focus-visible:outline-[var(--color-text-secondary)] " +
|
|
33
|
-
"dark:hover:bg-[var(--color-
|
|
38
|
+
"dark:hover:bg-[var(--color-surface)]",
|
|
34
39
|
primary: "text-[var(--color-text-primary)] border-[var(--color-primary-600)]/30 " +
|
|
35
40
|
"hover:bg-[var(--color-primary-100)] " +
|
|
36
41
|
"focus-visible:outline-[var(--color-primary-600)] " +
|
|
@@ -44,11 +49,11 @@ const buttonTheme = {
|
|
|
44
49
|
},
|
|
45
50
|
// Soft variant - subtle background tints
|
|
46
51
|
soft: {
|
|
47
|
-
|
|
48
|
-
"hover:bg-[var(--color-
|
|
52
|
+
mono: "text-[var(--color-text-primary)] bg-[var(--color-mono-100)] " +
|
|
53
|
+
"hover:bg-[var(--color-mono-200)] " +
|
|
49
54
|
"focus-visible:outline-[var(--color-text-secondary)] " +
|
|
50
|
-
"dark:text-[var(--color-text-primary)] dark:bg-[var(--color-
|
|
51
|
-
"dark:hover:bg-[var(--color-
|
|
55
|
+
"dark:text-[var(--color-text-primary)] dark:bg-[var(--color-mono-900)] " +
|
|
56
|
+
"dark:hover:bg-[var(--color-mono-800)]",
|
|
52
57
|
primary: "text-[var(--color-primary-600)] bg-[var(--color-primary)]/10 " +
|
|
53
58
|
"hover:bg-[var(--color-primary-50)] " +
|
|
54
59
|
"focus-visible:outline-[var(--color-primary-600)] " +
|
|
@@ -62,10 +67,10 @@ const buttonTheme = {
|
|
|
62
67
|
},
|
|
63
68
|
// Ghost variant - transparent bg, subtle hover, full padding
|
|
64
69
|
ghost: {
|
|
65
|
-
|
|
66
|
-
"hover:bg-[var(--color-
|
|
70
|
+
mono: "text-[var(--color-text-primary)] " +
|
|
71
|
+
"hover:bg-[var(--color-mono-100)] " +
|
|
67
72
|
"focus-visible:outline-[var(--color-text-secondary)] " +
|
|
68
|
-
"dark:text-[var(--color-text-primary)] dark:hover:bg-[var(--color-
|
|
73
|
+
"dark:text-[var(--color-text-primary)] dark:hover:bg-[var(--color-mono-800)]",
|
|
69
74
|
primary: "text-[var(--color-primary-600)] " +
|
|
70
75
|
"hover:bg-[var(--color-primary-50)] " +
|
|
71
76
|
"focus-visible:outline-[var(--color-primary-600)] " +
|
|
@@ -81,18 +86,26 @@ const buttonTheme = {
|
|
|
81
86
|
sm: {
|
|
82
87
|
// Tighten the corner radius at sm so a short button doesn't read as a pill
|
|
83
88
|
// (overrides baseStyle's rounded-[var(--button-radius)] via twMerge).
|
|
84
|
-
default: "font-medium min-h-[var(--button-min-h-sm)] px-[var(--button-px-sm)] py-[var(--button-py-sm)] text-sm rounded-[calc(var(--button-radius)*0.75)]",
|
|
89
|
+
default: "font-medium min-h-[var(--button-min-h-sm)] px-[var(--button-px-sm)] py-[var(--button-py-sm)] text-[length:var(--button-text-size-sm)]/[var(--button-line-height-sm)] rounded-[calc(var(--button-radius)*0.75)]",
|
|
85
90
|
iconOnly: "size-[var(--button-icon-size-sm)] p-[var(--button-icon-p-sm)] rounded-[calc(var(--button-radius)*0.75)]",
|
|
86
91
|
},
|
|
87
92
|
md: {
|
|
88
|
-
default: "font-medium min-h-[var(--button-min-h-md)] px-[var(--button-px-md)] py-[var(--button-py-md)] text-
|
|
93
|
+
default: "font-medium min-h-[var(--button-min-h-md)] px-[var(--button-px-md)] py-[var(--button-py-md)] text-[length:var(--button-text-size-md)]/[var(--button-line-height-md)]",
|
|
89
94
|
iconOnly: "size-[var(--button-icon-size-md)] p-[var(--button-icon-p-md)]",
|
|
90
95
|
},
|
|
91
96
|
lg: {
|
|
92
|
-
default: "font-medium min-h-[var(--button-min-h-lg)] px-[var(--button-px-lg)] py-[var(--button-py-lg)] text-
|
|
97
|
+
default: "font-medium min-h-[var(--button-min-h-lg)] px-[var(--button-px-lg)] py-[var(--button-py-lg)] text-[length:var(--button-text-size-lg)]/[var(--button-line-height-lg)]",
|
|
93
98
|
iconOnly: "size-[var(--button-icon-size-lg)] p-[var(--button-icon-p-lg)]",
|
|
94
99
|
},
|
|
95
100
|
},
|
|
101
|
+
// Icon slot sizing. `[&>svg]:size-*` sizes the icon itself, so a caller passing a bare
|
|
102
|
+
// <SearchIcon /> with no className still lands at the right size — mirrors Badge's
|
|
103
|
+
// iconSizes. A caller's own className on the icon still wins.
|
|
104
|
+
iconSizes: {
|
|
105
|
+
sm: "size-3.5 [&>svg]:size-3.5",
|
|
106
|
+
md: "size-4 [&>svg]:size-4",
|
|
107
|
+
lg: "size-5 [&>svg]:size-5",
|
|
108
|
+
},
|
|
96
109
|
// State styles
|
|
97
110
|
states: {
|
|
98
111
|
disabled: "opacity-60 cursor-not-allowed pointer-events-none saturate-0",
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { RippleEffectType } from "./Button.ripple";
|
|
3
2
|
/**
|
|
4
3
|
* Button component props
|
|
5
4
|
* @property {ButtonColor} color - The semantic color/intent of the button
|
|
@@ -8,10 +7,7 @@ import { RippleEffectType } from "./Button.ripple";
|
|
|
8
7
|
* @property {ButtonState} state - The state of the button (default, loading, disabled)
|
|
9
8
|
* @property {boolean} iconOnly - Whether the button should display as icon-only (square padding)
|
|
10
9
|
* @property {boolean} block - Whether the button should be full width
|
|
11
|
-
* @property {boolean} enableRipple - Whether to enable
|
|
12
|
-
* @property {RippleEffectType} rippleEffect - Type of ripple effect (default, aurora, particle, glass, neon, echo)
|
|
13
|
-
* @property {string} rippleClassName - Custom class name for ripple styling
|
|
14
|
-
* @property {number} rippleScale - Scale multiplier for ripple expansion (default: 10)
|
|
10
|
+
* @property {boolean} enableRipple - Whether to enable the press ripple
|
|
15
11
|
*/
|
|
16
12
|
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
17
13
|
/** The semantic color/intent of the button */
|
|
@@ -26,18 +22,35 @@ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElemen
|
|
|
26
22
|
iconOnly?: boolean;
|
|
27
23
|
/** Whether the button should be full width */
|
|
28
24
|
block?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Small decorative icon before the label, auto-sized to the button's `size`.
|
|
27
|
+
*
|
|
28
|
+
* The SERIALIZABLE front door — composing the icon into `children` stays the
|
|
29
|
+
* idiomatic hand-written form (`<Button><SearchIcon className="size-4" />Search</Button>`)
|
|
30
|
+
* and is unchanged. This slot exists because a generative UI spec is JSON: it can name
|
|
31
|
+
* an icon but cannot pass a React element, so `children` alone leaves an LLM unable to
|
|
32
|
+
* put an icon on a button at all. Same "one contract, two front doors" shape as Card's
|
|
33
|
+
* `title`/`subtitle` slot-props and the collection `items` APIs (CLAUDE.md §2).
|
|
34
|
+
*
|
|
35
|
+
* Deliberately NO `contentStart`/`contentEnd` counterpart: those take arbitrary
|
|
36
|
+
* ReactNode, which is not serializable, so they would buy the generative path nothing
|
|
37
|
+
* — compose those into `children`.
|
|
38
|
+
*/
|
|
39
|
+
iconStart?: React.ReactNode;
|
|
40
|
+
/** Small decorative icon after the label, auto-sized to the button's `size`. See `iconStart`. */
|
|
41
|
+
iconEnd?: React.ReactNode;
|
|
29
42
|
/** Button contents */
|
|
30
43
|
children?: React.ReactNode;
|
|
31
44
|
/** Additional class names */
|
|
32
45
|
className?: string;
|
|
33
|
-
/**
|
|
46
|
+
/**
|
|
47
|
+
* Whether to show the press ripple.
|
|
48
|
+
*
|
|
49
|
+
* The ripple is pointer-only — keyboard activation gets the focus ring
|
|
50
|
+
* instead — and is suppressed automatically under `prefers-reduced-motion`.
|
|
51
|
+
* @default true
|
|
52
|
+
*/
|
|
34
53
|
enableRipple?: boolean;
|
|
35
|
-
/** Type of ripple effect: 'default' | 'aurora' | 'particle' | 'glass' | 'neon' | 'echo' */
|
|
36
|
-
rippleEffect?: RippleEffectType;
|
|
37
|
-
/** Custom class name for ripple styling */
|
|
38
|
-
rippleClassName?: string;
|
|
39
|
-
/** Scale multiplier for ripple expansion (default: 10) */
|
|
40
|
-
rippleScale?: number;
|
|
41
54
|
/** Whether to show the glass reflection effect (default: true) */
|
|
42
55
|
showReflection?: boolean;
|
|
43
56
|
/**
|
|
@@ -49,7 +62,7 @@ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElemen
|
|
|
49
62
|
*/
|
|
50
63
|
darkMode?: boolean;
|
|
51
64
|
}
|
|
52
|
-
export type ButtonColor = "
|
|
65
|
+
export type ButtonColor = "mono" | "primary" | "danger";
|
|
53
66
|
export type ButtonVariant = "filled" | "outline" | "soft" | "ghost";
|
|
54
67
|
export type ButtonSize = "sm" | "md" | "lg";
|
|
55
68
|
export type ButtonState = "default" | "disabled" | "loading";
|
|
@@ -2,10 +2,13 @@
|
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import React__default, { useState, useCallback, useEffect, useMemo } from 'react';
|
|
4
4
|
import { useReducedMotion, motion } from 'motion/react';
|
|
5
|
-
import {
|
|
5
|
+
import { CaretLeft, CaretRight } from '@phosphor-icons/react';
|
|
6
6
|
import { calendarTheme } from './Calendar.theme.js';
|
|
7
7
|
import { calendarAnimations } from './Calendar.animations.js';
|
|
8
8
|
import { cn } from '../../../utils/cn.js';
|
|
9
|
+
import '../../../theme/ThemeContext.js';
|
|
10
|
+
import '../../../theme/SurfaceContext.js';
|
|
11
|
+
import { springs } from '../../../theme/animations.js';
|
|
9
12
|
import { Select } from '../../forms/Select/Select.js';
|
|
10
13
|
import '../../forms/Select/Select.theme.js';
|
|
11
14
|
import { Button } from '../Button/Button.js';
|
|
@@ -113,7 +116,9 @@ const generateCalendarDays = (year, month, selectedValue, mode = 'single', today
|
|
|
113
116
|
}
|
|
114
117
|
return days;
|
|
115
118
|
};
|
|
116
|
-
const Calendar = React__default.forwardRef(({ mode = 'single', value, defaultValue, onChange, minDate, maxDate, isDateDisabled: customIsDateDisabled, showToday = true, selectTodayByDefault = false, weekdays = ["M", "T", "W", "T", "F", "S", "S"], months, size = "md", headerMode, enableMonthDropdown = true, enableYearDropdown = true, yearRange, viewDate: externalViewDate, onViewDateChange, onNavigatePrev, onNavigateNext, showOtherMonthDays = true, className,
|
|
119
|
+
const Calendar = React__default.forwardRef(({ mode = 'single', value, defaultValue, onChange, minDate, maxDate, isDateDisabled: customIsDateDisabled, showToday = true, selectTodayByDefault = false, weekdays = ["M", "T", "W", "T", "F", "S", "S"], months, size = "md", headerMode, enableMonthDropdown = true, enableYearDropdown = true, yearRange, viewDate: externalViewDate, onViewDateChange, onNavigatePrev, onNavigateNext, showOtherMonthDays = true, className,
|
|
120
|
+
// Destructure motion-conflicting props to avoid type issues
|
|
121
|
+
onAnimationStart: _onAnimationStart, onAnimationEnd: _onAnimationEnd, onDrag: _onDrag, onDragStart: _onDragStart, onDragEnd: _onDragEnd, ...props }, ref) => {
|
|
117
122
|
// Determine initial view date from value/defaultValue
|
|
118
123
|
const getInitialViewDate = () => {
|
|
119
124
|
if (value) {
|
|
@@ -298,6 +303,16 @@ const Calendar = React__default.forwardRef(({ mode = 'single', value, defaultVal
|
|
|
298
303
|
maxDate,
|
|
299
304
|
customIsDateDisabled,
|
|
300
305
|
]);
|
|
306
|
+
// Calculate days grid height dynamically to animate height smoothly without layout scale distortion
|
|
307
|
+
const gridHeight = useMemo(() => {
|
|
308
|
+
const rowCount = calendarDays.length / 7;
|
|
309
|
+
// Must mirror calendarTheme.dayButtonSizes (size-8/10/12 → 32/40/48px)
|
|
310
|
+
const rowHeight = size === 'sm' ? 32 : size === 'lg' ? 48 : 40;
|
|
311
|
+
// Row height * number of rows + gap-y (2px) * (number of rows - 1),
|
|
312
|
+
// plus the grid's py-1 (4px top + bottom) that keeps focus rings
|
|
313
|
+
// visible inside the overflow-hidden clip.
|
|
314
|
+
return rowCount * rowHeight + (rowCount - 1) * 2 + 8;
|
|
315
|
+
}, [calendarDays.length, size]);
|
|
301
316
|
// Reset the roving tabindex target whenever the visible month changes —
|
|
302
317
|
// prefer the selected day, then today, then the first day of the month.
|
|
303
318
|
// Deliberately does NOT depend on `selectedValue`/`calendarDays` so that
|
|
@@ -446,9 +461,9 @@ const Calendar = React__default.forwardRef(({ mode = 'single', value, defaultVal
|
|
|
446
461
|
}
|
|
447
462
|
}
|
|
448
463
|
}, [minDate, maxDate, customIsDateDisabled, currentMonth, currentYear, onViewDateChange, mode, value, onChange, selectedValue, rangeSelectionState]);
|
|
449
|
-
return (jsxs("div", { ref: ref, className: cn(calendarTheme.baseStyle, className), ...props, children: [jsxs("div", { className: calendarTheme.headerStyle, children: [onNavigatePrev !== null && (jsx(Button, { onClick: navigateToPreviousMonth, "aria-label": "Previous month", disabled: !canNavigateToPrev, iconOnly: true, variant: "ghost", color: "
|
|
464
|
+
return (jsxs("div", { ref: ref, className: cn(calendarTheme.baseStyle, className), ...props, children: [jsxs("div", { className: calendarTheme.headerStyle, children: [onNavigatePrev !== null && (jsx(Button, { onClick: navigateToPreviousMonth, "aria-label": "Previous month", disabled: !canNavigateToPrev, iconOnly: true, variant: "ghost", color: "mono", size: "sm", children: jsx(CaretLeft, { className: "size-4", weight: "bold" }) })), onNavigatePrev === null && jsx("div", { className: "w-8" }), resolvedHeaderMode === 'static' ? (jsxs("h2", { className: calendarTheme.titleStyle, children: [getMonthName(viewDate, months), " ", currentYear] })) : (jsxs("div", { className: calendarTheme.headerDropdownsStyle, children: [(resolvedHeaderMode === 'dropdown' || (resolvedHeaderMode === 'mixed' && enableMonthDropdown)) && (jsx(Select, { value: currentMonth.toString(), onChange: handleMonthChange, options: monthOptions, displayValue: currentAbbreviatedMonth, size: "sm", className: "font-medium" })), (resolvedHeaderMode === 'dropdown' || (resolvedHeaderMode === 'mixed' && enableYearDropdown)) && (jsx(Select, { value: currentYear.toString(), onChange: handleYearChange, options: yearOptions, size: "sm", className: "font-medium" }))] })), onNavigateNext !== null && (jsx(Button, { onClick: navigateToNextMonth, "aria-label": "Next month", disabled: !canNavigateToNext, iconOnly: true, variant: "ghost", color: "mono", size: "sm", children: jsx(CaretRight, { className: "size-4", weight: "bold" }) })), onNavigateNext === null && jsx("div", { className: "w-8" })] }), jsx("div", { className: calendarTheme.weekdaysStyle, children: weekdays.map((day, i) => (
|
|
450
465
|
// Index in the key: default labels (e.g. M,T,W,T,F,S,S) repeat, so `day` alone is not unique.
|
|
451
|
-
jsx("div", { className: calendarTheme.weekdayStyle, children: day }, `${day}-${i}`))) }), jsx(
|
|
466
|
+
jsx("div", { className: calendarTheme.weekdayStyle, children: day }, `${day}-${i}`))) }), jsx(motion.div, { animate: { height: gridHeight }, transition: springs.smooth, className: cn(calendarTheme.daysGridStyle, "content-start overflow-hidden py-1 -my-1"), children: calendarDays.map((day, index) => {
|
|
452
467
|
var _a;
|
|
453
468
|
const dayNumber = day.date.getDate();
|
|
454
469
|
const isInStrip = day.isRangeStart || day.isRangeEnd || day.isInRange;
|
|
@@ -483,7 +498,7 @@ const Calendar = React__default.forwardRef(({ mode = 'single', value, defaultVal
|
|
|
483
498
|
// the onFocus round-trip.
|
|
484
499
|
setFocusedIndex(index);
|
|
485
500
|
handleDateSelect(day.date);
|
|
486
|
-
}, onKeyDown: (e) => handleDayKeyDown(e, index), onFocus: () => setFocusedIndex(index), tabIndex: index === focusedIndex ? 0 : -1, disabled: day.isDisabled, className: cn(calendarTheme.dayButtonStyle, (_a = calendarTheme.dayButtonSizes) === null || _a === void 0 ? void 0 : _a[size]), "data-selected": day.isSelected, "data-range-start": day.isRangeStart, "data-range-end": day.isRangeEnd, "data-in-range": day.isInRange, "data-today": day.isToday && !day.isSelected && !day.isRangeStart && !day.isRangeEnd, "data-disabled": day.isDisabled, "data-other-month": !day.isCurrentMonth, "aria-label": `Select ${day.date.toLocaleDateString()}`, variants: shouldReduceMotion ? {} : calendarAnimations.dayButton, whileHover: shouldReduceMotion ? undefined : (!day.isDisabled ? "hover" : undefined), whileTap: shouldReduceMotion ? undefined : (!day.isDisabled ? "tap" : undefined), children: [jsx("time", { dateTime: day.date.toISOString().split("T")[0], children: dayNumber }), day.isToday && (jsx(motion.span, { className: "absolute z-10 bottom-1 left-1/2 -translate-x-1/2 w-1 h-1 bg-[var(--color-primary)] rounded-full", variants: shouldReduceMotion ? {} : calendarAnimations.todayDot, initial: shouldReduceMotion ? undefined : "initial", animate: shouldReduceMotion ? undefined : "animate" }))] }) }, day.date.toISOString()));
|
|
501
|
+
}, onKeyDown: (e) => handleDayKeyDown(e, index), onFocus: () => setFocusedIndex(index), tabIndex: index === focusedIndex ? 0 : -1, disabled: day.isDisabled, className: cn(calendarTheme.dayButtonStyle, (_a = calendarTheme.dayButtonSizes) === null || _a === void 0 ? void 0 : _a[size]), "data-selected": day.isSelected || day.isRangeStart || day.isRangeEnd, "data-range-start": day.isRangeStart, "data-range-end": day.isRangeEnd, "data-in-range": day.isInRange, "data-today": day.isToday && !day.isSelected && !day.isRangeStart && !day.isRangeEnd, "data-disabled": day.isDisabled, "data-other-month": !day.isCurrentMonth, "aria-label": `Select ${day.date.toLocaleDateString()}`, variants: shouldReduceMotion ? {} : calendarAnimations.dayButton, whileHover: shouldReduceMotion ? undefined : (!day.isDisabled ? "hover" : undefined), whileTap: shouldReduceMotion ? undefined : (!day.isDisabled ? "tap" : undefined), children: [jsx("time", { dateTime: day.date.toISOString().split("T")[0], children: dayNumber }), day.isToday && (jsx(motion.span, { className: "absolute z-10 bottom-1 left-1/2 -translate-x-1/2 w-1 h-1 bg-[var(--color-primary)] rounded-full", variants: shouldReduceMotion ? {} : calendarAnimations.todayDot, initial: shouldReduceMotion ? undefined : "initial", animate: shouldReduceMotion ? undefined : "animate" }))] }) }, day.date.toISOString()));
|
|
487
502
|
}) })] }));
|
|
488
503
|
});
|
|
489
504
|
Calendar.displayName = "Calendar";
|
|
@@ -7,47 +7,39 @@ const calendarTheme = {
|
|
|
7
7
|
headerStyle: "flex items-center justify-between mb-4",
|
|
8
8
|
titleStyle: "text-sm font-semibold text-[var(--color-text-primary)] " + "",
|
|
9
9
|
headerDropdownsStyle: "grid grid-cols-2 items-center gap-2 flex-1 justify-center mx-3",
|
|
10
|
-
navButtonStyle: "inline-flex items-center justify-center size-8 rounded-[calc(var(--radius-base)*0.75)] border-0 bg-transparent " +
|
|
11
|
-
"text-[var(--color-text-muted)] hover:text-[var(--color-text-primary)] hover:bg-[var(--color-primary-50)] " +
|
|
12
|
-
"focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-primary)] focus-visible:ring-offset-2 " +
|
|
13
|
-
"transition-colors disabled:opacity-50 disabled:cursor-not-allowed " +
|
|
14
|
-
// Dark mode
|
|
15
|
-
"dark:text-[var(--color-neutral-500)] dark:hover:text-[var(--color-neutral-200)] dark:hover:bg-[var(--color-neutral-800)] " +
|
|
16
|
-
"dark:focus-visible:ring-offset-[var(--color-neutral-900)]",
|
|
17
10
|
weekdaysStyle: "grid grid-cols-7 mb-2",
|
|
18
|
-
weekdayStyle: "flex items-center justify-center h-8 text-xs font-medium text-[var(--color-text-muted)]
|
|
19
|
-
"dark:text-[var(--color-neutral-500)]",
|
|
11
|
+
weekdayStyle: "flex items-center justify-center h-8 text-xs font-medium text-[var(--color-text-muted)]",
|
|
20
12
|
daysGridStyle: "grid grid-cols-7 gap-y-0.5 gap-x-0",
|
|
21
|
-
rangeCellStyle: "bg-[var(--color-primary-50)]/
|
|
13
|
+
rangeCellStyle: "bg-[var(--color-primary-300)]/50 dark:bg-[var(--color-primary-500)]/20 " +
|
|
22
14
|
"data-[range-pos=start]:rounded-l-full " +
|
|
23
15
|
"data-[range-pos=end]:rounded-r-full " +
|
|
24
|
-
"data-[range-pos=single]:rounded-full
|
|
25
|
-
"dark:bg-[var(--color-primary-900)]/50",
|
|
16
|
+
"data-[range-pos=single]:rounded-full",
|
|
26
17
|
dayButtonStyle: "relative z-10 flex items-center justify-center rounded-full border-0 bg-transparent font-medium cursor-pointer " +
|
|
27
|
-
"transition-all duration-
|
|
18
|
+
"transition-all duration-[var(--motion-duration-base)] focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-primary)] focus-visible:ring-offset-2 " +
|
|
28
19
|
// Base text color
|
|
29
|
-
"text-[var(--color-text-primary)]
|
|
20
|
+
"text-[var(--color-text-primary)] " +
|
|
30
21
|
// Hover state
|
|
31
|
-
"hover:bg-[var(--color-primary-50)] dark:hover:bg-[var(--color-
|
|
22
|
+
"hover:bg-[var(--color-primary-50)] dark:hover:bg-[var(--color-primary)]/30 " +
|
|
32
23
|
// Selected state
|
|
33
24
|
"data-[selected=true]:bg-[var(--color-primary)] data-[selected=true]:text-[var(--color-primary-contrast)] " +
|
|
34
|
-
"data-[selected=true]:hover:bg-[var(--color-primary-600)] data-[selected=true]:border-t data-[selected=true]:border-white/30 " +
|
|
25
|
+
"data-[selected=true]:hover:bg-[var(--color-primary-600)] data-[selected=true]:dark:hover:bg-[var(--color-primary)]/80 data-[selected=true]:border-t data-[selected=true]:border-white/30 " +
|
|
35
26
|
// Today indicator
|
|
36
27
|
"data-[today=true]:text-[var(--color-primary)] dark:data-[today=true]:text-[var(--color-primary-400)] " +
|
|
37
28
|
// Disabled state
|
|
38
29
|
"data-[disabled=true]:text-[var(--color-text-muted)] data-[disabled=true]:opacity-50 " +
|
|
39
30
|
"data-[disabled=true]:cursor-not-allowed data-[disabled=true]:hover:bg-transparent " +
|
|
40
|
-
"dark:data-[disabled=true]:text-[var(--color-neutral-600)] " +
|
|
41
31
|
// Other month state
|
|
42
32
|
"data-[other-month=true]:text-[var(--color-text-muted)] data-[other-month=true]:opacity-60 " +
|
|
43
|
-
|
|
44
|
-
//
|
|
45
|
-
|
|
46
|
-
|
|
33
|
+
// Range mode: endpoints (start/end) reuse the single-selected styling via
|
|
34
|
+
// data-selected (set in Calendar.tsx) — ONE source of truth for a selected
|
|
35
|
+
// day (fill, text, border, hover). In-range (between) days only override
|
|
36
|
+
// text colour for readability on the strip; their hover intentionally falls
|
|
37
|
+
// through to the base day-hover above, so a hovered day looks identical
|
|
38
|
+
// whether or not it sits inside a range.
|
|
47
39
|
"data-[in-range=true]:text-[var(--color-text-primary)] " +
|
|
48
|
-
"dark:data-[in-range=true]:text-[var(--color-
|
|
40
|
+
"dark:data-[in-range=true]:text-[var(--color-mono-200)] " +
|
|
49
41
|
// Focus offset for dark mode
|
|
50
|
-
"dark:focus-visible:ring-offset-[var(--color-
|
|
42
|
+
"dark:focus-visible:ring-offset-[var(--color-mono-900)]",
|
|
51
43
|
dayButtonSizes: {
|
|
52
44
|
sm: "size-8 text-sm",
|
|
53
45
|
md: "size-10 text-sm",
|