ai-design-system 0.1.0
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/README.md +307 -0
- package/components/ai-elements/actions.tsx +65 -0
- package/components/ai-elements/artifact.tsx +147 -0
- package/components/ai-elements/branch.tsx +212 -0
- package/components/ai-elements/canvas.tsx +24 -0
- package/components/ai-elements/chain-of-thought.tsx +228 -0
- package/components/ai-elements/code-block.tsx +179 -0
- package/components/ai-elements/confirmation.tsx +169 -0
- package/components/ai-elements/connection.tsx +28 -0
- package/components/ai-elements/context.tsx +408 -0
- package/components/ai-elements/controls.tsx +18 -0
- package/components/ai-elements/conversation.tsx +97 -0
- package/components/ai-elements/edge.tsx +140 -0
- package/components/ai-elements/image.tsx +24 -0
- package/components/ai-elements/inline-citation.tsx +287 -0
- package/components/ai-elements/loader.tsx +96 -0
- package/components/ai-elements/message.tsx +80 -0
- package/components/ai-elements/node.tsx +71 -0
- package/components/ai-elements/open-in-chat.tsx +363 -0
- package/components/ai-elements/panel.tsx +15 -0
- package/components/ai-elements/plan.tsx +142 -0
- package/components/ai-elements/prompt-input.tsx +1352 -0
- package/components/ai-elements/queue.tsx +274 -0
- package/components/ai-elements/reasoning.tsx +178 -0
- package/components/ai-elements/response.tsx +22 -0
- package/components/ai-elements/shimmer.tsx +64 -0
- package/components/ai-elements/sources.tsx +77 -0
- package/components/ai-elements/suggestion.tsx +56 -0
- package/components/ai-elements/task.tsx +87 -0
- package/components/ai-elements/tool.tsx +179 -0
- package/components/ai-elements/toolbar.tsx +16 -0
- package/components/ai-elements/web-preview.tsx +263 -0
- package/components/blocks/AIConversation/AIConversation.stories.tsx +164 -0
- package/components/blocks/AIConversation/AIConversation.tsx +186 -0
- package/components/blocks/AIConversation/index.ts +8 -0
- package/components/blocks/AppSidebar/AppSidebar.stories.tsx +63 -0
- package/components/blocks/AppSidebar/AppSidebar.tsx +87 -0
- package/components/blocks/AppSidebar/index.ts +2 -0
- package/components/blocks/DocumentEditorWithComments/DocumentEditorWithComments.stories.tsx +341 -0
- package/components/blocks/DocumentEditorWithComments/DocumentEditorWithComments.tsx +255 -0
- package/components/blocks/DocumentEditorWithComments/index.ts +9 -0
- package/components/blocks/FileChangeQueue/FileChangeQueue.stories.tsx +207 -0
- package/components/blocks/FileChangeQueue/FileChangeQueue.tsx +143 -0
- package/components/blocks/FileChangeQueue/index.ts +7 -0
- package/components/blocks/LayoutProvider/LayoutProvider.tsx +34 -0
- package/components/blocks/LayoutProvider/index.ts +1 -0
- package/components/blocks/index.ts +2 -0
- package/components/composites/AgentIndicator/AgentIndicator.stories.tsx +154 -0
- package/components/composites/AgentIndicator/AgentIndicator.tsx +102 -0
- package/components/composites/AgentIndicator/index.ts +8 -0
- package/components/composites/AppHeader/AppHeader.stories.tsx +46 -0
- package/components/composites/AppHeader/AppHeader.tsx +24 -0
- package/components/composites/AppHeader/index.ts +2 -0
- package/components/composites/CommentBox/CommentBox.stories.tsx +192 -0
- package/components/composites/CommentBox/CommentBox.tsx +364 -0
- package/components/composites/CommentBox/index.ts +8 -0
- package/components/composites/Confirmation/Confirmation.stories.tsx +151 -0
- package/components/composites/Confirmation/Confirmation.tsx +93 -0
- package/components/composites/Confirmation/index.ts +7 -0
- package/components/composites/DataTable/DataTable.stories.tsx +35 -0
- package/components/composites/DataTable/DataTable.tsx +95 -0
- package/components/composites/DataTable/index.ts +2 -0
- package/components/composites/DocumentEditor/DocumentEditor.css +106 -0
- package/components/composites/DocumentEditor/DocumentEditor.stories.tsx +927 -0
- package/components/composites/DocumentEditor/DocumentEditor.tsx +279 -0
- package/components/composites/DocumentEditor/index.ts +8 -0
- package/components/composites/FileQueue/FileQueue.stories.tsx +175 -0
- package/components/composites/FileQueue/FileQueue.tsx +161 -0
- package/components/composites/FileQueue/FileStatusBadge.tsx +74 -0
- package/components/composites/FileQueue/index.ts +24 -0
- package/components/composites/InteractiveChart/InteractiveChart.stories.tsx +49 -0
- package/components/composites/InteractiveChart/InteractiveChart.tsx +69 -0
- package/components/composites/InteractiveChart/index.ts +2 -0
- package/components/composites/ModeToggle/ModeToggle.stories.tsx +212 -0
- package/components/composites/ModeToggle/ModeToggle.tsx +100 -0
- package/components/composites/ModeToggle/index.ts +7 -0
- package/components/composites/NavUser/NavUser.stories.tsx +50 -0
- package/components/composites/NavUser/NavUser.tsx +60 -0
- package/components/composites/NavUser/index.ts +2 -0
- package/components/composites/NavigationList/NavigationList.stories.tsx +46 -0
- package/components/composites/NavigationList/NavigationList.tsx +46 -0
- package/components/composites/NavigationList/index.ts +2 -0
- package/components/composites/OrchestratorMessage/OrchestratorMessage.stories.tsx +188 -0
- package/components/composites/OrchestratorMessage/OrchestratorMessage.tsx +72 -0
- package/components/composites/OrchestratorMessage/index.ts +8 -0
- package/components/composites/PageContainer/PageContainer.stories.tsx +41 -0
- package/components/composites/PageContainer/PageContainer.tsx +24 -0
- package/components/composites/PageContainer/index.ts +2 -0
- package/components/composites/PromptInput/PromptInput.stories.tsx +200 -0
- package/components/composites/PromptInput/PromptInput.tsx +129 -0
- package/components/composites/PromptInput/index.ts +8 -0
- package/components/composites/SpecialistMessage/SpecialistMessage.stories.tsx +286 -0
- package/components/composites/SpecialistMessage/SpecialistMessage.tsx +107 -0
- package/components/composites/SpecialistMessage/index.ts +8 -0
- package/components/composites/StatsCard/StatsCard.stories.tsx +76 -0
- package/components/composites/StatsCard/StatsCard.tsx +81 -0
- package/components/composites/StatsCard/index.ts +2 -0
- package/components/composites/TablePagination/TablePagination.stories.tsx +38 -0
- package/components/composites/TablePagination/TablePagination.tsx +119 -0
- package/components/composites/TablePagination/index.ts +2 -0
- package/components/composites/TableToolbar/TableToolbar.stories.tsx +60 -0
- package/components/composites/TableToolbar/TableToolbar.tsx +66 -0
- package/components/composites/TableToolbar/index.ts +2 -0
- package/components/composites/ThemeSelector/ThemeSelector.stories.tsx +48 -0
- package/components/composites/ThemeSelector/ThemeSelector.tsx +79 -0
- package/components/composites/ThemeSelector/index.ts +2 -0
- package/components/composites/ToolCallDisplay/ToolCallDisplay.stories.tsx +49 -0
- package/components/composites/ToolCallDisplay/ToolCallDisplay.tsx +108 -0
- package/components/composites/ToolCallDisplay/index.ts +8 -0
- package/components/composites/UserMessage/UserMessage.stories.tsx +59 -0
- package/components/composites/UserMessage/UserMessage.tsx +52 -0
- package/components/composites/UserMessage/index.ts +8 -0
- package/components/composites/index.ts +90 -0
- package/components/features/AIDocEditor/AIDocEditor.behaviors.stories.tsx +451 -0
- package/components/features/AIDocEditor/AIDocEditor.mocks.ts +96 -0
- package/components/features/AIDocEditor/AIDocEditor.stories.tsx +140 -0
- package/components/features/AIDocEditor/AIDocEditor.tsx +130 -0
- package/components/features/AIDocEditor/index.ts +8 -0
- package/components/features/AIDocEditor/useAIDocEditor.d.ts +97 -0
- package/components/features/AIDocEditor/useAIDocEditor.mock.ts +83 -0
- package/components/features/PageLayout/PageLayout.behaviors.stories.tsx +119 -0
- package/components/features/PageLayout/PageLayout.mocks.ts +27 -0
- package/components/features/PageLayout/PageLayout.stories.tsx +142 -0
- package/components/features/PageLayout/PageLayout.tsx +94 -0
- package/components/features/PageLayout/index.ts +4 -0
- package/components/features/PageLayout/usePageLayout.d.ts +24 -0
- package/components/features/PageLayout/usePageLayout.mock.ts +19 -0
- package/components/features/RefinementPanel/README.md +189 -0
- package/components/features/RefinementPanel/RefinementPanel.behaviors.stories.tsx +475 -0
- package/components/features/RefinementPanel/RefinementPanel.mocks.ts +131 -0
- package/components/features/RefinementPanel/RefinementPanel.stories.tsx +141 -0
- package/components/features/RefinementPanel/RefinementPanel.tsx +160 -0
- package/components/features/RefinementPanel/index.ts +25 -0
- package/components/features/RefinementPanel/useRefinementPanel.d.ts +74 -0
- package/components/features/RefinementPanel/useRefinementPanel.mock.ts +121 -0
- package/components/features/SpecNavigator/SpecNavigator.behaviors.stories.tsx +379 -0
- package/components/features/SpecNavigator/SpecNavigator.mocks.ts +131 -0
- package/components/features/SpecNavigator/SpecNavigator.stories.tsx +122 -0
- package/components/features/SpecNavigator/SpecNavigator.tsx +43 -0
- package/components/features/SpecNavigator/index.ts +2 -0
- package/components/features/SpecNavigator/useSpecNavigator.d.ts +122 -0
- package/components/features/SpecNavigator/useSpecNavigator.mock.ts +93 -0
- package/components/features/index.ts +18 -0
- package/components/index.ts +14 -0
- package/components/primitives/Accordion/Accordion.stories.tsx +87 -0
- package/components/primitives/Accordion/Accordion.tsx +66 -0
- package/components/primitives/Accordion/index.ts +13 -0
- package/components/primitives/Alert/Alert.stories.tsx +422 -0
- package/components/primitives/Alert/Alert.tsx +61 -0
- package/components/primitives/Alert/index.ts +8 -0
- package/components/primitives/AlertDialog/AlertDialog.stories.tsx +367 -0
- package/components/primitives/AlertDialog/AlertDialog.tsx +182 -0
- package/components/primitives/AlertDialog/index.ts +25 -0
- package/components/primitives/Avatar/Avatar.stories.tsx +321 -0
- package/components/primitives/Avatar/Avatar.tsx +63 -0
- package/components/primitives/Avatar/index.ts +8 -0
- package/components/primitives/Badge/Badge.stories.tsx +74 -0
- package/components/primitives/Badge/Badge.tsx +49 -0
- package/components/primitives/Badge/index.ts +2 -0
- package/components/primitives/Button/Button.stories.tsx +445 -0
- package/components/primitives/Button/Button.tsx +89 -0
- package/components/primitives/Button/index.ts +7 -0
- package/components/primitives/Card/Card.stories.tsx +831 -0
- package/components/primitives/Card/Card.tsx +242 -0
- package/components/primitives/Card/index.ts +30 -0
- package/components/primitives/Carousel/Carousel.stories.tsx +32 -0
- package/components/primitives/Carousel/Carousel.tsx +63 -0
- package/components/primitives/Carousel/index.ts +13 -0
- package/components/primitives/Chart/Chart.stories.tsx +346 -0
- package/components/primitives/Chart/Chart.tsx +117 -0
- package/components/primitives/Chart/index.ts +20 -0
- package/components/primitives/Checkbox/Checkbox.stories.tsx +87 -0
- package/components/primitives/Checkbox/Checkbox.tsx +38 -0
- package/components/primitives/Checkbox/index.ts +2 -0
- package/components/primitives/Collapsible/Collapsible.stories.tsx +38 -0
- package/components/primitives/Collapsible/Collapsible.tsx +39 -0
- package/components/primitives/Collapsible/index.ts +8 -0
- package/components/primitives/Command/Command.stories.tsx +150 -0
- package/components/primitives/Command/Command.tsx +147 -0
- package/components/primitives/Command/index.ts +20 -0
- package/components/primitives/Dialog/Dialog.stories.tsx +390 -0
- package/components/primitives/Dialog/Dialog.tsx +140 -0
- package/components/primitives/Dialog/index.ts +22 -0
- package/components/primitives/Drawer/Drawer.stories.tsx +327 -0
- package/components/primitives/Drawer/Drawer.tsx +208 -0
- package/components/primitives/Drawer/index.ts +27 -0
- package/components/primitives/DropdownMenu/DropdownMenu.stories.tsx +150 -0
- package/components/primitives/DropdownMenu/DropdownMenu.tsx +73 -0
- package/components/primitives/DropdownMenu/index.ts +1 -0
- package/components/primitives/HoverCard/HoverCard.stories.tsx +26 -0
- package/components/primitives/HoverCard/HoverCard.tsx +39 -0
- package/components/primitives/HoverCard/index.ts +8 -0
- package/components/primitives/Icon/Icon.stories.tsx +281 -0
- package/components/primitives/Icon/Icon.tsx +87 -0
- package/components/primitives/Icon/index.ts +8 -0
- package/components/primitives/Input/Input.stories.tsx +370 -0
- package/components/primitives/Input/Input.tsx +88 -0
- package/components/primitives/Input/index.ts +7 -0
- package/components/primitives/InputGroup/InputGroup.stories.tsx +40 -0
- package/components/primitives/InputGroup/InputGroup.tsx +72 -0
- package/components/primitives/InputGroup/index.ts +14 -0
- package/components/primitives/Label/Label.stories.tsx +227 -0
- package/components/primitives/Label/Label.tsx +53 -0
- package/components/primitives/Label/index.ts +7 -0
- package/components/primitives/Popover/Popover.stories.tsx +42 -0
- package/components/primitives/Popover/Popover.tsx +107 -0
- package/components/primitives/Popover/index.ts +2 -0
- package/components/primitives/Progress/Progress.stories.tsx +340 -0
- package/components/primitives/Progress/Progress.tsx +31 -0
- package/components/primitives/Progress/index.ts +1 -0
- package/components/primitives/ScrollArea/ScrollArea.stories.tsx +26 -0
- package/components/primitives/ScrollArea/ScrollArea.tsx +28 -0
- package/components/primitives/ScrollArea/index.ts +6 -0
- package/components/primitives/Select/Select.stories.tsx +288 -0
- package/components/primitives/Select/Select.tsx +162 -0
- package/components/primitives/Select/index.ts +22 -0
- package/components/primitives/Separator/Separator.stories.tsx +264 -0
- package/components/primitives/Separator/Separator.tsx +48 -0
- package/components/primitives/Separator/index.ts +7 -0
- package/components/primitives/Sidebar/Sidebar.stories.tsx +358 -0
- package/components/primitives/Sidebar/Sidebar.tsx +317 -0
- package/components/primitives/Sidebar/index.ts +41 -0
- package/components/primitives/Table/Table.stories.tsx +389 -0
- package/components/primitives/Table/Table.tsx +191 -0
- package/components/primitives/Table/index.ts +26 -0
- package/components/primitives/Tabs/Tabs.stories.tsx +129 -0
- package/components/primitives/Tabs/Tabs.tsx +70 -0
- package/components/primitives/Tabs/index.ts +13 -0
- package/components/primitives/Textarea/Textarea.stories.tsx +358 -0
- package/components/primitives/Textarea/Textarea.tsx +91 -0
- package/components/primitives/Textarea/index.ts +7 -0
- package/components/primitives/ToggleGroup/ToggleGroup.stories.tsx +87 -0
- package/components/primitives/ToggleGroup/ToggleGroup.tsx +52 -0
- package/components/primitives/ToggleGroup/index.ts +6 -0
- package/components/primitives/Tooltip/Tooltip.stories.tsx +336 -0
- package/components/primitives/Tooltip/Tooltip.tsx +78 -0
- package/components/primitives/Tooltip/index.ts +10 -0
- package/components/primitives/index.ts +34 -0
- package/components/ui/accordion.tsx +66 -0
- package/components/ui/alert-dialog.tsx +157 -0
- package/components/ui/alert.tsx +66 -0
- package/components/ui/avatar.tsx +53 -0
- package/components/ui/badge.tsx +46 -0
- package/components/ui/button.tsx +60 -0
- package/components/ui/card.tsx +117 -0
- package/components/ui/carousel.tsx +241 -0
- package/components/ui/chart.tsx +334 -0
- package/components/ui/checkbox.tsx +32 -0
- package/components/ui/collapsible.tsx +33 -0
- package/components/ui/command.tsx +184 -0
- package/components/ui/dialog.tsx +143 -0
- package/components/ui/drawer.tsx +118 -0
- package/components/ui/dropdown-menu.tsx +257 -0
- package/components/ui/hover-card.tsx +44 -0
- package/components/ui/input-group.tsx +170 -0
- package/components/ui/input.tsx +48 -0
- package/components/ui/label.tsx +26 -0
- package/components/ui/popover.tsx +33 -0
- package/components/ui/progress.tsx +31 -0
- package/components/ui/scroll-area.tsx +58 -0
- package/components/ui/select.tsx +187 -0
- package/components/ui/separator.tsx +31 -0
- package/components/ui/sidebar.tsx +577 -0
- package/components/ui/table.tsx +120 -0
- package/components/ui/tabs.tsx +66 -0
- package/components/ui/textarea.tsx +46 -0
- package/components/ui/toggle-group.tsx +83 -0
- package/components/ui/toggle.tsx +47 -0
- package/components/ui/tooltip.tsx +61 -0
- package/dist/index.cjs +7389 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.css +75 -0
- package/dist/index.css.map +1 -0
- package/dist/index.js +7160 -0
- package/dist/index.js.map +1 -0
- package/hooks/useAIDocReviewer.d.ts +0 -0
- package/lib/utils.ts +6 -0
- package/package.json +140 -0
- package/tokens/color/base.json +14 -0
- package/tokens/color/dark.json +40 -0
- package/tokens/color/green.json +21 -0
- package/tokens/color/light.json +52 -0
- package/tokens/color/neutral.json +20 -0
- package/tokens/color/violet.json +21 -0
- package/tokens/spacing.json +22 -0
- package/utils/ai-editor/format-date.ts +41 -0
- package/utils/ai-editor/index.ts +22 -0
- package/utils/ai-editor/type-guards.ts +72 -0
- package/utils/ai-editor/validation.ts +130 -0
- package/utils/editor-annotations.ts +122 -0
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
import {
|
|
3
|
+
Sidebar as ShadcnSidebar,
|
|
4
|
+
SidebarContent as ShadcnSidebarContent,
|
|
5
|
+
SidebarFooter as ShadcnSidebarFooter,
|
|
6
|
+
SidebarGroup as ShadcnSidebarGroup,
|
|
7
|
+
SidebarGroupAction as ShadcnSidebarGroupAction,
|
|
8
|
+
SidebarGroupContent as ShadcnSidebarGroupContent,
|
|
9
|
+
SidebarGroupLabel as ShadcnSidebarGroupLabel,
|
|
10
|
+
SidebarHeader as ShadcnSidebarHeader,
|
|
11
|
+
SidebarInset as ShadcnSidebarInset,
|
|
12
|
+
SidebarMenu as ShadcnSidebarMenu,
|
|
13
|
+
SidebarMenuButton as ShadcnSidebarMenuButton,
|
|
14
|
+
SidebarMenuItem as ShadcnSidebarMenuItem,
|
|
15
|
+
SidebarProvider as ShadcnSidebarProvider,
|
|
16
|
+
SidebarSeparator as ShadcnSidebarSeparator,
|
|
17
|
+
SidebarTrigger as ShadcnSidebarTrigger,
|
|
18
|
+
useSidebar,
|
|
19
|
+
} from "../../ui/sidebar"
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Sidebar Primitive
|
|
23
|
+
*
|
|
24
|
+
* A foundational sidebar component that wraps shadcn/ui Sidebar with design system
|
|
25
|
+
* enhancements. This primitive serves as the single source of truth for all sidebar
|
|
26
|
+
* navigation across the application.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```tsx
|
|
30
|
+
* <SidebarProvider>
|
|
31
|
+
* <Sidebar>
|
|
32
|
+
* <SidebarHeader>Header</SidebarHeader>
|
|
33
|
+
* <SidebarContent>
|
|
34
|
+
* <SidebarMenu>
|
|
35
|
+
* <SidebarMenuItem>
|
|
36
|
+
* <SidebarMenuButton>Item</SidebarMenuButton>
|
|
37
|
+
* </SidebarMenuItem>
|
|
38
|
+
* </SidebarMenu>
|
|
39
|
+
* </SidebarContent>
|
|
40
|
+
* </Sidebar>
|
|
41
|
+
* <SidebarInset>Main content</SidebarInset>
|
|
42
|
+
* </SidebarProvider>
|
|
43
|
+
* ```
|
|
44
|
+
*
|
|
45
|
+
* @see https://ui.shadcn.com/docs/components/sidebar - shadcn/ui Sidebar documentation
|
|
46
|
+
*/
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* SidebarProvider component props
|
|
50
|
+
*/
|
|
51
|
+
export type SidebarProviderProps = React.ComponentProps<typeof ShadcnSidebarProvider>
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* SidebarProvider component
|
|
55
|
+
*
|
|
56
|
+
* Context provider for sidebar state management.
|
|
57
|
+
*/
|
|
58
|
+
export const SidebarProvider = ShadcnSidebarProvider
|
|
59
|
+
|
|
60
|
+
SidebarProvider.displayName = "SidebarProvider"
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Sidebar component props
|
|
64
|
+
*/
|
|
65
|
+
export type SidebarProps = React.ComponentProps<typeof ShadcnSidebar>
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Sidebar component
|
|
69
|
+
*
|
|
70
|
+
* Main sidebar container with collapsible behavior.
|
|
71
|
+
*/
|
|
72
|
+
export const Sidebar = React.memo(
|
|
73
|
+
React.forwardRef<HTMLDivElement, SidebarProps>((props, ref) => {
|
|
74
|
+
return <ShadcnSidebar ref={ref} {...props} />
|
|
75
|
+
})
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
Sidebar.displayName = "Sidebar"
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* SidebarInset component props
|
|
82
|
+
*/
|
|
83
|
+
export type SidebarInsetProps = React.ComponentProps<typeof ShadcnSidebarInset>
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* SidebarInset component
|
|
87
|
+
*
|
|
88
|
+
* Main content area that adjusts based on sidebar state.
|
|
89
|
+
*/
|
|
90
|
+
export const SidebarInset = React.memo(
|
|
91
|
+
React.forwardRef<HTMLDivElement, SidebarInsetProps>((props, ref) => {
|
|
92
|
+
return <ShadcnSidebarInset ref={ref} {...props} />
|
|
93
|
+
})
|
|
94
|
+
)
|
|
95
|
+
|
|
96
|
+
SidebarInset.displayName = "SidebarInset"
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* SidebarHeader component props
|
|
100
|
+
*/
|
|
101
|
+
export type SidebarHeaderProps = React.ComponentProps<typeof ShadcnSidebarHeader>
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* SidebarHeader component
|
|
105
|
+
*
|
|
106
|
+
* Header section of the sidebar.
|
|
107
|
+
*/
|
|
108
|
+
export const SidebarHeader = React.memo(
|
|
109
|
+
React.forwardRef<HTMLDivElement, SidebarHeaderProps>((props, ref) => {
|
|
110
|
+
return <ShadcnSidebarHeader ref={ref} {...props} />
|
|
111
|
+
})
|
|
112
|
+
)
|
|
113
|
+
|
|
114
|
+
SidebarHeader.displayName = "SidebarHeader"
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* SidebarContent component props
|
|
118
|
+
*/
|
|
119
|
+
export type SidebarContentProps = React.ComponentProps<typeof ShadcnSidebarContent>
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* SidebarContent component
|
|
123
|
+
*
|
|
124
|
+
* Scrollable content area of the sidebar.
|
|
125
|
+
*/
|
|
126
|
+
export const SidebarContent = React.memo(
|
|
127
|
+
React.forwardRef<HTMLDivElement, SidebarContentProps>((props, ref) => {
|
|
128
|
+
return <ShadcnSidebarContent ref={ref} {...props} />
|
|
129
|
+
})
|
|
130
|
+
)
|
|
131
|
+
|
|
132
|
+
SidebarContent.displayName = "SidebarContent"
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* SidebarFooter component props
|
|
136
|
+
*/
|
|
137
|
+
export type SidebarFooterProps = React.ComponentProps<typeof ShadcnSidebarFooter>
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* SidebarFooter component
|
|
141
|
+
*
|
|
142
|
+
* Footer section of the sidebar.
|
|
143
|
+
*/
|
|
144
|
+
export const SidebarFooter = React.memo(
|
|
145
|
+
React.forwardRef<HTMLDivElement, SidebarFooterProps>((props, ref) => {
|
|
146
|
+
return <ShadcnSidebarFooter ref={ref} {...props} />
|
|
147
|
+
})
|
|
148
|
+
)
|
|
149
|
+
|
|
150
|
+
SidebarFooter.displayName = "SidebarFooter"
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* SidebarMenu component props
|
|
154
|
+
*/
|
|
155
|
+
export type SidebarMenuProps = React.ComponentProps<typeof ShadcnSidebarMenu>
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* SidebarMenu component
|
|
159
|
+
*
|
|
160
|
+
* Container for sidebar menu items.
|
|
161
|
+
*/
|
|
162
|
+
export const SidebarMenu = React.memo(
|
|
163
|
+
React.forwardRef<HTMLUListElement, SidebarMenuProps>((props, ref) => {
|
|
164
|
+
return <ShadcnSidebarMenu ref={ref} {...props} />
|
|
165
|
+
})
|
|
166
|
+
)
|
|
167
|
+
|
|
168
|
+
SidebarMenu.displayName = "SidebarMenu"
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* SidebarMenuItem component props
|
|
172
|
+
*/
|
|
173
|
+
export type SidebarMenuItemProps = React.ComponentProps<typeof ShadcnSidebarMenuItem>
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* SidebarMenuItem component
|
|
177
|
+
*
|
|
178
|
+
* Individual menu item in the sidebar.
|
|
179
|
+
*/
|
|
180
|
+
export const SidebarMenuItem = React.memo(
|
|
181
|
+
React.forwardRef<HTMLLIElement, SidebarMenuItemProps>((props, ref) => {
|
|
182
|
+
return <ShadcnSidebarMenuItem ref={ref} {...props} />
|
|
183
|
+
})
|
|
184
|
+
)
|
|
185
|
+
|
|
186
|
+
SidebarMenuItem.displayName = "SidebarMenuItem"
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* SidebarMenuButton component props
|
|
190
|
+
*/
|
|
191
|
+
export type SidebarMenuButtonProps = React.ComponentProps<typeof ShadcnSidebarMenuButton>
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* SidebarMenuButton component
|
|
195
|
+
*
|
|
196
|
+
* Button for sidebar menu items with tooltip support.
|
|
197
|
+
*/
|
|
198
|
+
export const SidebarMenuButton = React.memo(
|
|
199
|
+
React.forwardRef<HTMLButtonElement, SidebarMenuButtonProps>((props, ref) => {
|
|
200
|
+
return <ShadcnSidebarMenuButton ref={ref} {...props} />
|
|
201
|
+
})
|
|
202
|
+
)
|
|
203
|
+
|
|
204
|
+
SidebarMenuButton.displayName = "SidebarMenuButton"
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* SidebarTrigger component props
|
|
208
|
+
*/
|
|
209
|
+
export type SidebarTriggerProps = React.ComponentProps<typeof ShadcnSidebarTrigger>
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* SidebarTrigger component
|
|
213
|
+
*
|
|
214
|
+
* Button to toggle sidebar open/closed.
|
|
215
|
+
*/
|
|
216
|
+
export const SidebarTrigger = React.memo(
|
|
217
|
+
React.forwardRef<HTMLButtonElement, SidebarTriggerProps>((props, ref) => {
|
|
218
|
+
return <ShadcnSidebarTrigger ref={ref} {...props} />
|
|
219
|
+
})
|
|
220
|
+
)
|
|
221
|
+
|
|
222
|
+
SidebarTrigger.displayName = "SidebarTrigger"
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* SidebarGroup component props
|
|
226
|
+
*/
|
|
227
|
+
export type SidebarGroupProps = React.ComponentProps<typeof ShadcnSidebarGroup>
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* SidebarGroup component
|
|
231
|
+
*
|
|
232
|
+
* Groups related sidebar items together.
|
|
233
|
+
*/
|
|
234
|
+
export const SidebarGroup = React.memo(
|
|
235
|
+
React.forwardRef<HTMLDivElement, SidebarGroupProps>((props, ref) => {
|
|
236
|
+
return <ShadcnSidebarGroup ref={ref} {...props} />
|
|
237
|
+
})
|
|
238
|
+
)
|
|
239
|
+
|
|
240
|
+
SidebarGroup.displayName = "SidebarGroup"
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* SidebarGroupContent component props
|
|
244
|
+
*/
|
|
245
|
+
export type SidebarGroupContentProps = React.ComponentProps<typeof ShadcnSidebarGroupContent>
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* SidebarGroupContent component
|
|
249
|
+
*
|
|
250
|
+
* Content area for sidebar groups.
|
|
251
|
+
*/
|
|
252
|
+
export const SidebarGroupContent = React.memo(
|
|
253
|
+
React.forwardRef<HTMLDivElement, SidebarGroupContentProps>((props, ref) => {
|
|
254
|
+
return <ShadcnSidebarGroupContent ref={ref} {...props} />
|
|
255
|
+
})
|
|
256
|
+
)
|
|
257
|
+
|
|
258
|
+
SidebarGroupContent.displayName = "SidebarGroupContent"
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* SidebarGroupLabel component props
|
|
262
|
+
*/
|
|
263
|
+
export type SidebarGroupLabelProps = React.ComponentProps<typeof ShadcnSidebarGroupLabel>
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* SidebarGroupLabel component
|
|
267
|
+
*
|
|
268
|
+
* Label for sidebar groups.
|
|
269
|
+
*/
|
|
270
|
+
export const SidebarGroupLabel = React.memo(
|
|
271
|
+
React.forwardRef<HTMLDivElement, SidebarGroupLabelProps>((props, ref) => {
|
|
272
|
+
return <ShadcnSidebarGroupLabel ref={ref} {...props} />
|
|
273
|
+
})
|
|
274
|
+
)
|
|
275
|
+
|
|
276
|
+
SidebarGroupLabel.displayName = "SidebarGroupLabel"
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* SidebarGroupAction component props
|
|
280
|
+
*/
|
|
281
|
+
export type SidebarGroupActionProps = React.ComponentProps<typeof ShadcnSidebarGroupAction>
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* SidebarGroupAction component
|
|
285
|
+
*
|
|
286
|
+
* Action button for sidebar groups.
|
|
287
|
+
*/
|
|
288
|
+
export const SidebarGroupAction = React.memo(
|
|
289
|
+
React.forwardRef<HTMLButtonElement, SidebarGroupActionProps>((props, ref) => {
|
|
290
|
+
return <ShadcnSidebarGroupAction ref={ref} {...props} />
|
|
291
|
+
})
|
|
292
|
+
)
|
|
293
|
+
|
|
294
|
+
SidebarGroupAction.displayName = "SidebarGroupAction"
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* SidebarSeparator component props
|
|
298
|
+
*/
|
|
299
|
+
export type SidebarSeparatorProps = React.ComponentProps<typeof ShadcnSidebarSeparator>
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* SidebarSeparator component
|
|
303
|
+
*
|
|
304
|
+
* Visual separator for sidebar sections.
|
|
305
|
+
*/
|
|
306
|
+
export const SidebarSeparator = React.memo(
|
|
307
|
+
React.forwardRef<HTMLHRElement, SidebarSeparatorProps>((props, ref) => {
|
|
308
|
+
return <ShadcnSidebarSeparator ref={ref} {...props} />
|
|
309
|
+
})
|
|
310
|
+
)
|
|
311
|
+
|
|
312
|
+
SidebarSeparator.displayName = "SidebarSeparator"
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* Re-export useSidebar hook for accessing sidebar state
|
|
316
|
+
*/
|
|
317
|
+
export { useSidebar }
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sidebar Primitive
|
|
3
|
+
*
|
|
4
|
+
* Central export point for the Sidebar primitive component and its related types.
|
|
5
|
+
*/
|
|
6
|
+
export {
|
|
7
|
+
Sidebar,
|
|
8
|
+
SidebarProvider,
|
|
9
|
+
SidebarInset,
|
|
10
|
+
SidebarHeader,
|
|
11
|
+
SidebarContent,
|
|
12
|
+
SidebarFooter,
|
|
13
|
+
SidebarMenu,
|
|
14
|
+
SidebarMenuItem,
|
|
15
|
+
SidebarMenuButton,
|
|
16
|
+
SidebarTrigger,
|
|
17
|
+
SidebarGroup,
|
|
18
|
+
SidebarGroupContent,
|
|
19
|
+
SidebarGroupLabel,
|
|
20
|
+
SidebarGroupAction,
|
|
21
|
+
SidebarSeparator,
|
|
22
|
+
useSidebar,
|
|
23
|
+
} from './Sidebar'
|
|
24
|
+
|
|
25
|
+
export type {
|
|
26
|
+
SidebarProps,
|
|
27
|
+
SidebarProviderProps,
|
|
28
|
+
SidebarInsetProps,
|
|
29
|
+
SidebarHeaderProps,
|
|
30
|
+
SidebarContentProps,
|
|
31
|
+
SidebarFooterProps,
|
|
32
|
+
SidebarMenuProps,
|
|
33
|
+
SidebarMenuItemProps,
|
|
34
|
+
SidebarMenuButtonProps,
|
|
35
|
+
SidebarTriggerProps,
|
|
36
|
+
SidebarGroupProps,
|
|
37
|
+
SidebarGroupContentProps,
|
|
38
|
+
SidebarGroupLabelProps,
|
|
39
|
+
SidebarGroupActionProps,
|
|
40
|
+
SidebarSeparatorProps,
|
|
41
|
+
} from './Sidebar'
|