@devxcrew/react-ui 0.0.0-stage → 0.1.7
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 +85 -2
- package/package.json +105 -4
- package/src/blocks/agent-chat-workspace/agent-chat-workspace.tsx +162 -0
- package/src/blocks/agent-chat-workspace/index.ts +2 -0
- package/src/blocks/agent-provider-settings/agent-provider-settings.tsx +183 -0
- package/src/blocks/agent-provider-settings/index.ts +2 -0
- package/src/blocks/agent-task-workspace/agent-task-workspace.tsx +48 -0
- package/src/blocks/agent-task-workspace/index.ts +2 -0
- package/src/blocks/analysis-context/analysis-context.tsx +6 -0
- package/src/blocks/analysis-context/index.ts +1 -0
- package/src/blocks/app-header/app-header.tsx +159 -0
- package/src/blocks/app-header/index.ts +2 -0
- package/src/blocks/archived-chat-workspace/archived-chat-workspace.tsx +29 -0
- package/src/blocks/archived-chat-workspace/index.ts +2 -0
- package/src/blocks/auth/README.md +32 -0
- package/src/blocks/auth/admin-login-page.tsx +15 -0
- package/src/blocks/auth/admin-password-forgot-page.tsx +5 -0
- package/src/blocks/auth/auth-page-layout.tsx +90 -0
- package/src/blocks/auth/client-login-page.tsx +20 -0
- package/src/blocks/auth/client-password-forgot-page.tsx +5 -0
- package/src/blocks/auth/identity-management-desk.tsx +530 -0
- package/src/blocks/auth/index.ts +12 -0
- package/src/blocks/auth/login-page.tsx +206 -0
- package/src/blocks/auth/password-forgot-page.tsx +60 -0
- package/src/blocks/auth/portal-pages.tsx +32 -0
- package/src/blocks/auth/privileged-desk.tsx +55 -0
- package/src/blocks/auth/register-page.tsx +117 -0
- package/src/blocks/auth/session-boundary.tsx +296 -0
- package/src/blocks/auth/super-admin-login-page.tsx +15 -0
- package/src/blocks/auth/super-admin-password-forgot-page.tsx +5 -0
- package/src/blocks/blog/blog-card.tsx +156 -0
- package/src/blocks/blog/blog-reader.tsx +175 -0
- package/src/blocks/blog/blog-types.ts +47 -0
- package/src/blocks/blog/index.ts +3 -0
- package/src/blocks/chat-composer/chat-composer.tsx +140 -0
- package/src/blocks/chat-composer/index.ts +1 -0
- package/src/blocks/chat-history/chat-history.tsx +59 -0
- package/src/blocks/chat-history/index.ts +1 -0
- package/src/blocks/chat-response-progress/chat-response-progress.tsx +34 -0
- package/src/blocks/chat-response-progress/index.ts +2 -0
- package/src/blocks/chat-runtime-controls/chat-runtime-controls.tsx +56 -0
- package/src/blocks/chat-runtime-controls/index.ts +2 -0
- package/src/blocks/chat-runtime-trace/chat-runtime-trace.tsx +71 -0
- package/src/blocks/chat-runtime-trace/index.ts +2 -0
- package/src/blocks/codex-connection-settings/codex-connection-settings.tsx +42 -0
- package/src/blocks/codex-connection-settings/index.ts +1 -0
- package/src/blocks/dropzone/dropzone-file-item.tsx +113 -0
- package/src/blocks/dropzone/dropzone-types.ts +32 -0
- package/src/blocks/dropzone/dropzone.tsx +216 -0
- package/src/blocks/dropzone/index.ts +3 -0
- package/src/blocks/ecommerce/cart/cart-drawer.tsx +228 -0
- package/src/blocks/ecommerce/cart/cart-types.ts +27 -0
- package/src/blocks/ecommerce/cart/index.ts +2 -0
- package/src/blocks/ecommerce/categories/categories-types.ts +23 -0
- package/src/blocks/ecommerce/categories/category-showcase.tsx +125 -0
- package/src/blocks/ecommerce/categories/index.ts +2 -0
- package/src/blocks/ecommerce/checkout/checkout-types.ts +48 -0
- package/src/blocks/ecommerce/checkout/checkout-wizard.tsx +468 -0
- package/src/blocks/ecommerce/checkout/index.ts +2 -0
- package/src/blocks/ecommerce/comparison/comparison-types.ts +28 -0
- package/src/blocks/ecommerce/comparison/index.ts +2 -0
- package/src/blocks/ecommerce/comparison/product-comparison.tsx +174 -0
- package/src/blocks/ecommerce/coupon-wallet/coupon-wallet-types.ts +21 -0
- package/src/blocks/ecommerce/coupon-wallet/coupon-wallet.tsx +154 -0
- package/src/blocks/ecommerce/coupon-wallet/index.ts +2 -0
- package/src/blocks/ecommerce/delivery-tracker/delivery-tracker-types.ts +20 -0
- package/src/blocks/ecommerce/delivery-tracker/delivery-tracker.tsx +169 -0
- package/src/blocks/ecommerce/delivery-tracker/index.ts +2 -0
- package/src/blocks/ecommerce/index.ts +12 -0
- package/src/blocks/ecommerce/payment-methods/index.ts +2 -0
- package/src/blocks/ecommerce/payment-methods/payment-method-selector.tsx +224 -0
- package/src/blocks/ecommerce/payment-methods/payment-methods-types.ts +21 -0
- package/src/blocks/ecommerce/price-history/index.ts +2 -0
- package/src/blocks/ecommerce/price-history/price-history-chart.tsx +217 -0
- package/src/blocks/ecommerce/price-history/price-history-types.ts +16 -0
- package/src/blocks/ecommerce/reviews/index.ts +2 -0
- package/src/blocks/ecommerce/reviews/reviews-section.tsx +309 -0
- package/src/blocks/ecommerce/reviews/reviews-types.ts +26 -0
- package/src/blocks/ecommerce/wishlist/index.ts +2 -0
- package/src/blocks/ecommerce/wishlist/wishlist-grid.tsx +149 -0
- package/src/blocks/ecommerce/wishlist/wishlist-types.ts +19 -0
- package/src/blocks/execution-status/README.md +25 -0
- package/src/blocks/execution-status/execution-status.tsx +135 -0
- package/src/blocks/execution-status/index.ts +2 -0
- package/src/blocks/file-tree/file-icons.tsx +84 -0
- package/src/blocks/file-tree/file-tree-node.tsx +158 -0
- package/src/blocks/file-tree/file-tree-types.ts +33 -0
- package/src/blocks/file-tree/file-tree.tsx +163 -0
- package/src/blocks/file-tree/index.ts +5 -0
- package/src/blocks/filter-builder/filter-builder.tsx +169 -0
- package/src/blocks/filter-builder/filter-row.tsx +164 -0
- package/src/blocks/filter-builder/filter-types.ts +61 -0
- package/src/blocks/filter-builder/index.ts +12 -0
- package/src/blocks/footer/footer-types.ts +35 -0
- package/src/blocks/footer/index.ts +2 -0
- package/src/blocks/footer/site-footer.tsx +212 -0
- package/src/blocks/form/form-block.tsx +113 -0
- package/src/blocks/form/form-lookup-field.tsx +60 -0
- package/src/blocks/form/index.ts +4 -0
- package/src/blocks/handover-stack/handover-stack.tsx +41 -0
- package/src/blocks/handover-stack/index.ts +1 -0
- package/src/blocks/idea-handover/idea-handover-readiness.ts +41 -0
- package/src/blocks/idea-handover/idea-handover-workspace.tsx +150 -0
- package/src/blocks/idea-handover/index.ts +4 -0
- package/src/blocks/kanban/index.ts +11 -0
- package/src/blocks/kanban/kanban-board.tsx +146 -0
- package/src/blocks/kanban/kanban-card.tsx +149 -0
- package/src/blocks/kanban/kanban-column.tsx +102 -0
- package/src/blocks/kanban/kanban-types.ts +38 -0
- package/src/blocks/loader/global-loader.tsx +90 -0
- package/src/blocks/loader/index.ts +1 -0
- package/src/blocks/mascot/README.md +21 -0
- package/src/blocks/mascot/index.ts +2 -0
- package/src/blocks/mascot/mascot.tsx +202 -0
- package/src/blocks/master-list/README.md +21 -0
- package/src/blocks/master-list/index.ts +12 -0
- package/src/blocks/master-list/master-form.tsx +157 -0
- package/src/blocks/master-list/master-list-desk.tsx +370 -0
- package/src/blocks/master-list/master-list.tsx +189 -0
- package/src/blocks/master-list/types.ts +18 -0
- package/src/blocks/mermaid-preview/index.ts +1 -0
- package/src/blocks/mermaid-preview/mermaid-preview.tsx +164 -0
- package/src/blocks/notifications/README.md +7 -0
- package/src/blocks/notifications/index.ts +1 -0
- package/src/blocks/notifications/notification-center-page.tsx +73 -0
- package/src/blocks/pricing/index.ts +7 -0
- package/src/blocks/pricing/pricing-table.tsx +173 -0
- package/src/blocks/pricing/pricing-types.ts +34 -0
- package/src/blocks/product-card/index.ts +2 -0
- package/src/blocks/product-card/product-card-types.ts +35 -0
- package/src/blocks/product-card/product-card.tsx +183 -0
- package/src/blocks/table/data-table-block.tsx +313 -0
- package/src/blocks/table/data-table-filter-menu.tsx +48 -0
- package/src/blocks/table/data-table-icon-menu-trigger.tsx +44 -0
- package/src/blocks/table/data-table-menu-content.tsx +32 -0
- package/src/blocks/table/data-table-pagination.tsx +149 -0
- package/src/blocks/table/data-table-row-actions.tsx +53 -0
- package/src/blocks/table/data-table-status.tsx +42 -0
- package/src/blocks/table/data-table-toolbar.tsx +124 -0
- package/src/blocks/table/data-table-totals.tsx +31 -0
- package/src/blocks/table/index.ts +13 -0
- package/src/blocks/workspace/index.ts +19 -0
- package/src/blocks/workspace/workspace-action-card.tsx +73 -0
- package/src/blocks/workspace/workspace-application-header.tsx +67 -0
- package/src/blocks/workspace/workspace-entity-card.tsx +48 -0
- package/src/blocks/workspace/workspace-health-summary.tsx +15 -0
- package/src/blocks/workspace/workspace-metric-card.tsx +97 -0
- package/src/blocks/workspace/workspace-page-header.tsx +43 -0
- package/src/blocks/workspace/workspace-publish-status.tsx +15 -0
- package/src/blocks/workspace/workspace-route-checklist.tsx +28 -0
- package/src/blocks/workspace/workspace-runtime-status.tsx +48 -0
- package/src/blocks/workspace/workspace-section-card.tsx +42 -0
- package/src/components/accordion.tsx +65 -0
- package/src/components/alert-dialog.tsx +160 -0
- package/src/components/alert.tsx +68 -0
- package/src/components/aspect-ratio.tsx +22 -0
- package/src/components/attachment.tsx +195 -0
- package/src/components/avatar.tsx +90 -0
- package/src/components/badge.tsx +55 -0
- package/src/components/breadcrumb.tsx +100 -0
- package/src/components/bubble.tsx +123 -0
- package/src/components/button-group.tsx +79 -0
- package/src/components/button.tsx +71 -0
- package/src/components/calendar.tsx +185 -0
- package/src/components/card.tsx +100 -0
- package/src/components/carousel.tsx +229 -0
- package/src/components/chart.tsx +338 -0
- package/src/components/checkbox.tsx +27 -0
- package/src/components/collapsible.tsx +15 -0
- package/src/components/combobox.tsx +269 -0
- package/src/components/command.tsx +181 -0
- package/src/components/compact-model-switcher.tsx +128 -0
- package/src/components/context-menu.tsx +244 -0
- package/src/components/dialog.tsx +138 -0
- package/src/components/direction.tsx +1 -0
- package/src/components/drawer.tsx +208 -0
- package/src/components/dropdown-menu.tsx +257 -0
- package/src/components/empty.tsx +93 -0
- package/src/components/field.tsx +232 -0
- package/src/components/hover-card.tsx +45 -0
- package/src/components/input-group.tsx +146 -0
- package/src/components/input-otp.tsx +83 -0
- package/src/components/input.tsx +19 -0
- package/src/components/item.tsx +188 -0
- package/src/components/kbd.tsx +26 -0
- package/src/components/label.tsx +17 -0
- package/src/components/markdown-content.tsx +113 -0
- package/src/components/marker.tsx +67 -0
- package/src/components/menubar.tsx +267 -0
- package/src/components/message-scroller.tsx +91 -0
- package/src/components/message.tsx +84 -0
- package/src/components/native-select.tsx +54 -0
- package/src/components/navigation-menu.tsx +160 -0
- package/src/components/pagination.tsx +118 -0
- package/src/components/popover.tsx +74 -0
- package/src/components/progress.tsx +82 -0
- package/src/components/questionnaire.tsx +150 -0
- package/src/components/radio-group.tsx +35 -0
- package/src/components/resizable.tsx +41 -0
- package/src/components/rich-text-editor.tsx +604 -0
- package/src/components/scroll-area.tsx +47 -0
- package/src/components/select.tsx +189 -0
- package/src/components/separator.tsx +18 -0
- package/src/components/sheet.tsx +125 -0
- package/src/components/sidebar.tsx +693 -0
- package/src/components/skeleton.tsx +13 -0
- package/src/components/slider.tsx +51 -0
- package/src/components/sonner.tsx +45 -0
- package/src/components/sparkline.tsx +231 -0
- package/src/components/spinner.tsx +20 -0
- package/src/components/status-badge.tsx +114 -0
- package/src/components/switch.tsx +31 -0
- package/src/components/table.tsx +91 -0
- package/src/components/tabs.tsx +72 -0
- package/src/components/textarea.tsx +17 -0
- package/src/components/toast.tsx +222 -0
- package/src/components/toggle-group.tsx +85 -0
- package/src/components/toggle.tsx +42 -0
- package/src/components/tooltip.tsx +53 -0
- package/src/design-system/README.md +55 -0
- package/src/design-system/action-intents.ts +21 -0
- package/src/design-system/agent-manifest.ts +83 -0
- package/src/design-system/block-registry.ts +272 -0
- package/src/design-system/component-registry.ts +142 -0
- package/src/design-system/contracts.ts +69 -0
- package/src/design-system/defaults.ts +3 -0
- package/src/design-system/index.ts +29 -0
- package/src/design-system/mcp-server.ts +156 -0
- package/src/design-system/page-registry.ts +74 -0
- package/src/design-system/selection.ts +67 -0
- package/src/design-system/template-registry.ts +33 -0
- package/src/features/interface-topology/index.ts +14 -0
- package/src/features/interface-topology/interface-topology.types.ts +40 -0
- package/src/features/interface-topology/topology-control.tsx +18 -0
- package/src/features/interface-topology/topology-inspector.tsx +228 -0
- package/src/features/interface-topology/topology-marker.tsx +47 -0
- package/src/features/interface-topology/topology-region.tsx +44 -0
- package/src/features/interface-topology/use-interface-topology.ts +178 -0
- package/src/hooks/use-mobile.ts +19 -0
- package/src/hooks/use-scroll-follow.ts +22 -0
- package/src/index.ts +11 -0
- package/src/layouts/README.md +65 -0
- package/src/layouts/agent-workspace/agent-activity-rail.tsx +101 -0
- package/src/layouts/agent-workspace/agent-workspace.tsx +27 -0
- package/src/layouts/agent-workspace/agent-workspace.types.ts +28 -0
- package/src/layouts/agent-workspace/index.ts +7 -0
- package/src/layouts/blog-header/blog-header-types.ts +25 -0
- package/src/layouts/blog-header/blog-header.tsx +172 -0
- package/src/layouts/blog-header/index.ts +2 -0
- package/src/layouts/documentation-workspace/README.md +8 -0
- package/src/layouts/documentation-workspace/documentation-workspace.tsx +34 -0
- package/src/layouts/documentation-workspace/index.ts +1 -0
- package/src/layouts/ecommerce-header/ecommerce-actions.tsx +89 -0
- package/src/layouts/ecommerce-header/ecommerce-announcement.tsx +43 -0
- package/src/layouts/ecommerce-header/ecommerce-drawer.tsx +97 -0
- package/src/layouts/ecommerce-header/ecommerce-header-types.ts +59 -0
- package/src/layouts/ecommerce-header/ecommerce-header.tsx +47 -0
- package/src/layouts/ecommerce-header/ecommerce-navigation.tsx +98 -0
- package/src/layouts/ecommerce-header/ecommerce-search.tsx +86 -0
- package/src/layouts/ecommerce-header/index.ts +2 -0
- package/src/layouts/main-workspace/index.ts +28 -0
- package/src/layouts/mdi/index.ts +1 -0
- package/src/layouts/mdi/mdi.tsx +20 -0
- package/src/layouts/mdi-main/index.ts +27 -0
- package/src/layouts/mdi-main/mdi-app-catalog.generated.ts +159 -0
- package/src/layouts/mdi-main/mdi-app-catalog.ts +76 -0
- package/src/layouts/mdi-main/mdi-app-switcher.tsx +107 -0
- package/src/layouts/mdi-main/mdi-feature-settings.tsx +135 -0
- package/src/layouts/mdi-main/mdi-global-search.tsx +192 -0
- package/src/layouts/mdi-main/mdi-main.tsx +241 -0
- package/src/layouts/mdi-main/mdi-notifications-menu.tsx +197 -0
- package/src/layouts/mdi-main/mdi-profile-menu.tsx +79 -0
- package/src/layouts/mdi-main/mdi-sidebar-navigation.tsx +226 -0
- package/src/layouts/mdi-main/mdi-sidebar.tsx +110 -0
- package/src/layouts/mdi-main/mdi-status-bar.tsx +26 -0
- package/src/layouts/mdi-main/mdi-top-menu-control.ts +4 -0
- package/src/layouts/mdi-main/mdi-top-menu.tsx +117 -0
- package/src/layouts/mdi-main/mdi-topology.tsx +297 -0
- package/src/layouts/mdi-main/mdi-tweak-panel.tsx +104 -0
- package/src/layouts/mdi-main/mdi-types.ts +131 -0
- package/src/layouts/mdi-main/use-mdi-features.ts +36 -0
- package/src/layouts/mdi-main/use-mdi-sidebar-state.ts +59 -0
- package/src/layouts/site-header/announcement-bar.tsx +55 -0
- package/src/layouts/site-header/category-strip.tsx +41 -0
- package/src/layouts/site-header/index.ts +16 -0
- package/src/layouts/site-header/main-navbar.tsx +179 -0
- package/src/layouts/site-header/mobile-drawer.tsx +140 -0
- package/src/layouts/site-header/site-header-types.ts +63 -0
- package/src/layouts/site-header/site-header.tsx +58 -0
- package/src/lib/random-id.ts +19 -0
- package/src/lib/utils.ts +6 -0
- package/src/providers/pdf-provider.ts +137 -0
- package/src/styles/globals.css +374 -0
- package/src/templates/README.md +12 -0
- package/src/templates/dashboard-01/components/app-sidebar.tsx +177 -0
- package/src/templates/dashboard-01/components/chart-area-interactive.tsx +276 -0
- package/src/templates/dashboard-01/components/data-table-cell-viewer.tsx +213 -0
- package/src/templates/dashboard-01/components/data-table.tsx +577 -0
- package/src/templates/dashboard-01/components/nav-documents.tsx +79 -0
- package/src/templates/dashboard-01/components/nav-main.tsx +55 -0
- package/src/templates/dashboard-01/components/nav-secondary.tsx +39 -0
- package/src/templates/dashboard-01/components/nav-user.tsx +97 -0
- package/src/templates/dashboard-01/components/section-cards.tsx +99 -0
- package/src/templates/dashboard-01/components/site-header.tsx +14 -0
- package/src/templates/dashboard-01/data.json +614 -0
- package/src/templates/dashboard-01/index.ts +7 -0
- package/src/templates/documentation-sidebar/app-sidebar.tsx +95 -0
- package/src/templates/documentation-sidebar/index.ts +2 -0
- package/src/templates/sidebar-07/components/app-sidebar.tsx +175 -0
- package/src/templates/sidebar-07/components/nav-main.tsx +64 -0
- package/src/templates/sidebar-07/components/nav-projects.tsx +79 -0
- package/src/templates/sidebar-07/components/nav-user.tsx +105 -0
- package/src/templates/sidebar-07/components/team-switcher.tsx +94 -0
- package/src/templates/sidebar-07/index.ts +1 -0
- package/src/templates/ui-page/index.ts +7 -0
- package/src/templates/ui-page/ui-browser-frame.tsx +27 -0
- package/src/templates/ui-page/ui-template-code.tsx +48 -0
- package/src/templates/ui-page/ui-template-header.tsx +87 -0
- package/src/templates/ui-page/ui-template-navigation.tsx +60 -0
- package/src/templates/ui-page/ui-template-page.tsx +97 -0
- package/src/theme/index.ts +12 -0
- package/src/theme/theme-config.ts +30 -0
- package/src/theme/theme-provider.tsx +142 -0
- package/src/theme/theme-selector.tsx +75 -0
- package/src/tokens/index.ts +15 -0
- package/src/vite-env.d.ts +3 -0
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import * as React from 'react'
|
|
2
|
+
import { BookOpen, ChevronRightIcon } from 'lucide-react'
|
|
3
|
+
import {
|
|
4
|
+
Collapsible,
|
|
5
|
+
CollapsibleContent,
|
|
6
|
+
CollapsibleTrigger,
|
|
7
|
+
} from '@devxcrew/react-ui/components/collapsible'
|
|
8
|
+
import {
|
|
9
|
+
Sidebar,
|
|
10
|
+
SidebarContent,
|
|
11
|
+
SidebarGroup,
|
|
12
|
+
SidebarHeader,
|
|
13
|
+
SidebarMenu,
|
|
14
|
+
SidebarMenuButton,
|
|
15
|
+
SidebarMenuItem,
|
|
16
|
+
SidebarMenuSub,
|
|
17
|
+
SidebarMenuSubButton,
|
|
18
|
+
SidebarMenuSubItem,
|
|
19
|
+
SidebarRail,
|
|
20
|
+
} from '@devxcrew/react-ui/components/sidebar'
|
|
21
|
+
|
|
22
|
+
export type DocumentationNavigation = {
|
|
23
|
+
items: Array<{ isActive?: boolean; onSelect?: () => void; title: string; url: string }>
|
|
24
|
+
title: string
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/** Shared, data-driven form of the Shadcn sidebar-03 block. */
|
|
28
|
+
export function AppSidebar({
|
|
29
|
+
navigation,
|
|
30
|
+
...props
|
|
31
|
+
}: React.ComponentProps<typeof Sidebar> & {
|
|
32
|
+
navigation: DocumentationNavigation[]
|
|
33
|
+
}) {
|
|
34
|
+
return (
|
|
35
|
+
<Sidebar {...props}>
|
|
36
|
+
<SidebarHeader>
|
|
37
|
+
<SidebarMenu>
|
|
38
|
+
<SidebarMenuItem>
|
|
39
|
+
<SidebarMenuButton size="lg" className="h-auto items-start overflow-visible py-3">
|
|
40
|
+
<span className="flex items-start gap-2 whitespace-normal">
|
|
41
|
+
<div className="flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground">
|
|
42
|
+
<BookOpen className="size-4" />
|
|
43
|
+
</div>
|
|
44
|
+
<div className="flex min-w-0 flex-col gap-0.5 leading-none">
|
|
45
|
+
<span className="font-medium">Documentation</span>
|
|
46
|
+
<span className="text-xs text-sidebar-foreground/70">Repository handbook</span>
|
|
47
|
+
</div>
|
|
48
|
+
</span>
|
|
49
|
+
</SidebarMenuButton>
|
|
50
|
+
</SidebarMenuItem>
|
|
51
|
+
</SidebarMenu>
|
|
52
|
+
</SidebarHeader>
|
|
53
|
+
<SidebarContent>
|
|
54
|
+
<SidebarGroup>
|
|
55
|
+
<SidebarMenu>
|
|
56
|
+
{navigation.map((section) => (
|
|
57
|
+
<Collapsible
|
|
58
|
+
key={section.title}
|
|
59
|
+
defaultOpen={section.items.some((item) => item.isActive)}
|
|
60
|
+
className="group/collapsible"
|
|
61
|
+
render={<SidebarMenuItem />}
|
|
62
|
+
>
|
|
63
|
+
<CollapsibleTrigger
|
|
64
|
+
render={<SidebarMenuButton className="h-auto overflow-visible py-1.5" />}
|
|
65
|
+
>
|
|
66
|
+
<span className="whitespace-normal text-xs font-semibold tracking-wide text-sidebar-foreground/70">
|
|
67
|
+
{section.title}
|
|
68
|
+
</span>
|
|
69
|
+
<ChevronRightIcon className="ml-auto size-4 shrink-0 transition-transform duration-200 group-data-open/collapsible:rotate-90" />
|
|
70
|
+
</CollapsibleTrigger>
|
|
71
|
+
<CollapsibleContent>
|
|
72
|
+
<SidebarMenuSub>
|
|
73
|
+
{section.items.map((item) => (
|
|
74
|
+
<SidebarMenuSubItem key={item.url}>
|
|
75
|
+
<SidebarMenuSubButton
|
|
76
|
+
href={item.url}
|
|
77
|
+
isActive={item.isActive}
|
|
78
|
+
onClick={item.onSelect}
|
|
79
|
+
className="h-auto overflow-visible whitespace-normal py-1.5 leading-5"
|
|
80
|
+
>
|
|
81
|
+
{item.title}
|
|
82
|
+
</SidebarMenuSubButton>
|
|
83
|
+
</SidebarMenuSubItem>
|
|
84
|
+
))}
|
|
85
|
+
</SidebarMenuSub>
|
|
86
|
+
</CollapsibleContent>
|
|
87
|
+
</Collapsible>
|
|
88
|
+
))}
|
|
89
|
+
</SidebarMenu>
|
|
90
|
+
</SidebarGroup>
|
|
91
|
+
</SidebarContent>
|
|
92
|
+
<SidebarRail />
|
|
93
|
+
</Sidebar>
|
|
94
|
+
)
|
|
95
|
+
}
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import * as React from 'react'
|
|
4
|
+
|
|
5
|
+
import { NavMain } from './nav-main'
|
|
6
|
+
import { NavProjects } from './nav-projects'
|
|
7
|
+
import { NavUser } from './nav-user'
|
|
8
|
+
import { TeamSwitcher } from './team-switcher'
|
|
9
|
+
import {
|
|
10
|
+
Sidebar,
|
|
11
|
+
SidebarContent,
|
|
12
|
+
SidebarFooter,
|
|
13
|
+
SidebarHeader,
|
|
14
|
+
SidebarRail,
|
|
15
|
+
} from '@devxcrew/react-ui/components/sidebar'
|
|
16
|
+
import {
|
|
17
|
+
GalleryVerticalEndIcon,
|
|
18
|
+
AudioLinesIcon,
|
|
19
|
+
TerminalIcon,
|
|
20
|
+
TerminalSquareIcon,
|
|
21
|
+
BotIcon,
|
|
22
|
+
BookOpenIcon,
|
|
23
|
+
Settings2Icon,
|
|
24
|
+
FrameIcon,
|
|
25
|
+
PieChartIcon,
|
|
26
|
+
MapIcon,
|
|
27
|
+
} from 'lucide-react'
|
|
28
|
+
|
|
29
|
+
// This is sample data.
|
|
30
|
+
const data = {
|
|
31
|
+
user: {
|
|
32
|
+
name: 'shadcn',
|
|
33
|
+
email: 'm@example.com',
|
|
34
|
+
avatar: '/avatars/shadcn.jpg',
|
|
35
|
+
},
|
|
36
|
+
teams: [
|
|
37
|
+
{
|
|
38
|
+
name: 'Acme Inc',
|
|
39
|
+
logo: <GalleryVerticalEndIcon />,
|
|
40
|
+
plan: 'Enterprise',
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
name: 'Acme Corp.',
|
|
44
|
+
logo: <AudioLinesIcon />,
|
|
45
|
+
plan: 'Startup',
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: 'Evil Corp.',
|
|
49
|
+
logo: <TerminalIcon />,
|
|
50
|
+
plan: 'Free',
|
|
51
|
+
},
|
|
52
|
+
],
|
|
53
|
+
navMain: [
|
|
54
|
+
{
|
|
55
|
+
title: 'Playground',
|
|
56
|
+
url: '#',
|
|
57
|
+
icon: <TerminalSquareIcon />,
|
|
58
|
+
isActive: true,
|
|
59
|
+
items: [
|
|
60
|
+
{
|
|
61
|
+
title: 'History',
|
|
62
|
+
url: '#',
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
title: 'Starred',
|
|
66
|
+
url: '#',
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
title: 'Settings',
|
|
70
|
+
url: '#',
|
|
71
|
+
},
|
|
72
|
+
],
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
title: 'Models',
|
|
76
|
+
url: '#',
|
|
77
|
+
icon: <BotIcon />,
|
|
78
|
+
items: [
|
|
79
|
+
{
|
|
80
|
+
title: 'Genesis',
|
|
81
|
+
url: '#',
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
title: 'Explorer',
|
|
85
|
+
url: '#',
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
title: 'Quantum',
|
|
89
|
+
url: '#',
|
|
90
|
+
},
|
|
91
|
+
],
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
title: 'Documentation',
|
|
95
|
+
url: '#',
|
|
96
|
+
icon: <BookOpenIcon />,
|
|
97
|
+
items: [
|
|
98
|
+
{
|
|
99
|
+
title: 'Introduction',
|
|
100
|
+
url: '#',
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
title: 'Get Started',
|
|
104
|
+
url: '#',
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
title: 'Tutorials',
|
|
108
|
+
url: '#',
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
title: 'Changelog',
|
|
112
|
+
url: '#',
|
|
113
|
+
},
|
|
114
|
+
],
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
title: 'Settings',
|
|
118
|
+
url: '#',
|
|
119
|
+
icon: <Settings2Icon />,
|
|
120
|
+
items: [
|
|
121
|
+
{
|
|
122
|
+
title: 'General',
|
|
123
|
+
url: '#',
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
title: 'Team',
|
|
127
|
+
url: '#',
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
title: 'Billing',
|
|
131
|
+
url: '#',
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
title: 'Limits',
|
|
135
|
+
url: '#',
|
|
136
|
+
},
|
|
137
|
+
],
|
|
138
|
+
},
|
|
139
|
+
],
|
|
140
|
+
projects: [
|
|
141
|
+
{
|
|
142
|
+
name: 'Design Engineering',
|
|
143
|
+
url: '#',
|
|
144
|
+
icon: <FrameIcon />,
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
name: 'Sales & Marketing',
|
|
148
|
+
url: '#',
|
|
149
|
+
icon: <PieChartIcon />,
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
name: 'Travel',
|
|
153
|
+
url: '#',
|
|
154
|
+
icon: <MapIcon />,
|
|
155
|
+
},
|
|
156
|
+
],
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export function AppSidebar({ ...props }: React.ComponentProps<typeof Sidebar>) {
|
|
160
|
+
return (
|
|
161
|
+
<Sidebar collapsible="icon" {...props}>
|
|
162
|
+
<SidebarHeader>
|
|
163
|
+
<TeamSwitcher teams={data.teams} />
|
|
164
|
+
</SidebarHeader>
|
|
165
|
+
<SidebarContent>
|
|
166
|
+
<NavMain items={data.navMain} />
|
|
167
|
+
<NavProjects projects={data.projects} />
|
|
168
|
+
</SidebarContent>
|
|
169
|
+
<SidebarFooter>
|
|
170
|
+
<NavUser user={data.user} />
|
|
171
|
+
</SidebarFooter>
|
|
172
|
+
<SidebarRail />
|
|
173
|
+
</Sidebar>
|
|
174
|
+
)
|
|
175
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Collapsible,
|
|
3
|
+
CollapsibleContent,
|
|
4
|
+
CollapsibleTrigger,
|
|
5
|
+
} from '@devxcrew/react-ui/components/collapsible'
|
|
6
|
+
import {
|
|
7
|
+
SidebarGroup,
|
|
8
|
+
SidebarGroupLabel,
|
|
9
|
+
SidebarMenu,
|
|
10
|
+
SidebarMenuButton,
|
|
11
|
+
SidebarMenuItem,
|
|
12
|
+
SidebarMenuSub,
|
|
13
|
+
SidebarMenuSubButton,
|
|
14
|
+
SidebarMenuSubItem,
|
|
15
|
+
} from '@devxcrew/react-ui/components/sidebar'
|
|
16
|
+
import { ChevronRightIcon } from 'lucide-react'
|
|
17
|
+
|
|
18
|
+
export function NavMain({
|
|
19
|
+
items,
|
|
20
|
+
}: {
|
|
21
|
+
items: {
|
|
22
|
+
title: string
|
|
23
|
+
url: string
|
|
24
|
+
icon?: React.ReactNode
|
|
25
|
+
isActive?: boolean
|
|
26
|
+
items?: {
|
|
27
|
+
title: string
|
|
28
|
+
url: string
|
|
29
|
+
}[]
|
|
30
|
+
}[]
|
|
31
|
+
}) {
|
|
32
|
+
return (
|
|
33
|
+
<SidebarGroup>
|
|
34
|
+
<SidebarGroupLabel>Platform</SidebarGroupLabel>
|
|
35
|
+
<SidebarMenu>
|
|
36
|
+
{items.map((item) => (
|
|
37
|
+
<Collapsible
|
|
38
|
+
key={item.title}
|
|
39
|
+
defaultOpen={item.isActive}
|
|
40
|
+
className="group/collapsible"
|
|
41
|
+
render={<SidebarMenuItem />}
|
|
42
|
+
>
|
|
43
|
+
<CollapsibleTrigger render={<SidebarMenuButton tooltip={item.title} />}>
|
|
44
|
+
{item.icon}
|
|
45
|
+
<span>{item.title}</span>
|
|
46
|
+
<ChevronRightIcon className="ml-auto transition-transform duration-200 group-data-open/collapsible:rotate-90" />
|
|
47
|
+
</CollapsibleTrigger>
|
|
48
|
+
<CollapsibleContent>
|
|
49
|
+
<SidebarMenuSub>
|
|
50
|
+
{item.items?.map((subItem) => (
|
|
51
|
+
<SidebarMenuSubItem key={subItem.title}>
|
|
52
|
+
<SidebarMenuSubButton render={<a href={subItem.url} />}>
|
|
53
|
+
<span>{subItem.title}</span>
|
|
54
|
+
</SidebarMenuSubButton>
|
|
55
|
+
</SidebarMenuSubItem>
|
|
56
|
+
))}
|
|
57
|
+
</SidebarMenuSub>
|
|
58
|
+
</CollapsibleContent>
|
|
59
|
+
</Collapsible>
|
|
60
|
+
))}
|
|
61
|
+
</SidebarMenu>
|
|
62
|
+
</SidebarGroup>
|
|
63
|
+
)
|
|
64
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
DropdownMenu,
|
|
5
|
+
DropdownMenuContent,
|
|
6
|
+
DropdownMenuItem,
|
|
7
|
+
DropdownMenuSeparator,
|
|
8
|
+
DropdownMenuTrigger,
|
|
9
|
+
} from '@devxcrew/react-ui/components/dropdown-menu'
|
|
10
|
+
import {
|
|
11
|
+
SidebarGroup,
|
|
12
|
+
SidebarGroupLabel,
|
|
13
|
+
SidebarMenu,
|
|
14
|
+
SidebarMenuAction,
|
|
15
|
+
SidebarMenuButton,
|
|
16
|
+
SidebarMenuItem,
|
|
17
|
+
useSidebar,
|
|
18
|
+
} from '@devxcrew/react-ui/components/sidebar'
|
|
19
|
+
import { MoreHorizontalIcon, FolderIcon, ArrowRightIcon, Trash2Icon } from 'lucide-react'
|
|
20
|
+
|
|
21
|
+
export function NavProjects({
|
|
22
|
+
projects,
|
|
23
|
+
}: {
|
|
24
|
+
projects: {
|
|
25
|
+
name: string
|
|
26
|
+
url: string
|
|
27
|
+
icon: React.ReactNode
|
|
28
|
+
}[]
|
|
29
|
+
}) {
|
|
30
|
+
const { isMobile } = useSidebar()
|
|
31
|
+
return (
|
|
32
|
+
<SidebarGroup className="group-data-[collapsible=icon]:hidden">
|
|
33
|
+
<SidebarGroupLabel>Projects</SidebarGroupLabel>
|
|
34
|
+
<SidebarMenu>
|
|
35
|
+
{projects.map((item) => (
|
|
36
|
+
<SidebarMenuItem key={item.name}>
|
|
37
|
+
<SidebarMenuButton render={<a href={item.url} />}>
|
|
38
|
+
{item.icon}
|
|
39
|
+
<span>{item.name}</span>
|
|
40
|
+
</SidebarMenuButton>
|
|
41
|
+
<DropdownMenu>
|
|
42
|
+
<DropdownMenuTrigger
|
|
43
|
+
render={<SidebarMenuAction showOnHover className="aria-expanded:bg-muted" />}
|
|
44
|
+
>
|
|
45
|
+
<MoreHorizontalIcon />
|
|
46
|
+
<span className="sr-only">More</span>
|
|
47
|
+
</DropdownMenuTrigger>
|
|
48
|
+
<DropdownMenuContent
|
|
49
|
+
className="w-fit"
|
|
50
|
+
side={isMobile ? 'bottom' : 'right'}
|
|
51
|
+
align={isMobile ? 'end' : 'start'}
|
|
52
|
+
>
|
|
53
|
+
<DropdownMenuItem>
|
|
54
|
+
<FolderIcon />
|
|
55
|
+
<span>View Project</span>
|
|
56
|
+
</DropdownMenuItem>
|
|
57
|
+
<DropdownMenuItem>
|
|
58
|
+
<ArrowRightIcon />
|
|
59
|
+
<span>Share Project</span>
|
|
60
|
+
</DropdownMenuItem>
|
|
61
|
+
<DropdownMenuSeparator />
|
|
62
|
+
<DropdownMenuItem variant="destructive">
|
|
63
|
+
<Trash2Icon />
|
|
64
|
+
<span>Delete Project</span>
|
|
65
|
+
</DropdownMenuItem>
|
|
66
|
+
</DropdownMenuContent>
|
|
67
|
+
</DropdownMenu>
|
|
68
|
+
</SidebarMenuItem>
|
|
69
|
+
))}
|
|
70
|
+
<SidebarMenuItem>
|
|
71
|
+
<SidebarMenuButton className="text-sidebar-foreground/70">
|
|
72
|
+
<MoreHorizontalIcon className="text-sidebar-foreground/70" />
|
|
73
|
+
<span>More</span>
|
|
74
|
+
</SidebarMenuButton>
|
|
75
|
+
</SidebarMenuItem>
|
|
76
|
+
</SidebarMenu>
|
|
77
|
+
</SidebarGroup>
|
|
78
|
+
)
|
|
79
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { Avatar, AvatarFallback, AvatarImage } from '@devxcrew/react-ui/components/avatar'
|
|
2
|
+
import {
|
|
3
|
+
DropdownMenu,
|
|
4
|
+
DropdownMenuContent,
|
|
5
|
+
DropdownMenuGroup,
|
|
6
|
+
DropdownMenuItem,
|
|
7
|
+
DropdownMenuLabel,
|
|
8
|
+
DropdownMenuSeparator,
|
|
9
|
+
DropdownMenuTrigger,
|
|
10
|
+
} from '@devxcrew/react-ui/components/dropdown-menu'
|
|
11
|
+
import {
|
|
12
|
+
SidebarMenu,
|
|
13
|
+
SidebarMenuButton,
|
|
14
|
+
SidebarMenuItem,
|
|
15
|
+
useSidebar,
|
|
16
|
+
} from '@devxcrew/react-ui/components/sidebar'
|
|
17
|
+
import {
|
|
18
|
+
ChevronsUpDownIcon,
|
|
19
|
+
SparklesIcon,
|
|
20
|
+
BadgeCheckIcon,
|
|
21
|
+
CreditCardIcon,
|
|
22
|
+
BellIcon,
|
|
23
|
+
LogOutIcon,
|
|
24
|
+
} from 'lucide-react'
|
|
25
|
+
|
|
26
|
+
export function NavUser({
|
|
27
|
+
user,
|
|
28
|
+
}: {
|
|
29
|
+
user: {
|
|
30
|
+
name: string
|
|
31
|
+
email: string
|
|
32
|
+
avatar: string
|
|
33
|
+
}
|
|
34
|
+
}) {
|
|
35
|
+
const { isMobile } = useSidebar()
|
|
36
|
+
return (
|
|
37
|
+
<SidebarMenu>
|
|
38
|
+
<SidebarMenuItem>
|
|
39
|
+
<DropdownMenu>
|
|
40
|
+
<DropdownMenuTrigger
|
|
41
|
+
render={<SidebarMenuButton size="lg" className="aria-expanded:bg-muted" />}
|
|
42
|
+
>
|
|
43
|
+
<Avatar>
|
|
44
|
+
<AvatarImage src={user.avatar} alt={user.name} />
|
|
45
|
+
<AvatarFallback>CN</AvatarFallback>
|
|
46
|
+
</Avatar>
|
|
47
|
+
<div className="grid flex-1 text-left text-sm leading-tight">
|
|
48
|
+
<span className="truncate font-medium">{user.name}</span>
|
|
49
|
+
<span className="truncate text-xs">{user.email}</span>
|
|
50
|
+
</div>
|
|
51
|
+
<ChevronsUpDownIcon className="ml-auto size-4" />
|
|
52
|
+
</DropdownMenuTrigger>
|
|
53
|
+
<DropdownMenuContent
|
|
54
|
+
className="w-fit"
|
|
55
|
+
side={isMobile ? 'bottom' : 'right'}
|
|
56
|
+
align="end"
|
|
57
|
+
sideOffset={4}
|
|
58
|
+
>
|
|
59
|
+
<DropdownMenuGroup>
|
|
60
|
+
<DropdownMenuLabel className="p-0 font-normal">
|
|
61
|
+
<div className="flex items-center gap-2 px-1 py-1.5 text-left text-sm">
|
|
62
|
+
<Avatar>
|
|
63
|
+
<AvatarImage src={user.avatar} alt={user.name} />
|
|
64
|
+
<AvatarFallback>CN</AvatarFallback>
|
|
65
|
+
</Avatar>
|
|
66
|
+
<div className="grid flex-1 text-left text-sm leading-tight">
|
|
67
|
+
<span className="truncate font-medium">{user.name}</span>
|
|
68
|
+
<span className="truncate text-xs">{user.email}</span>
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
</DropdownMenuLabel>
|
|
72
|
+
</DropdownMenuGroup>
|
|
73
|
+
<DropdownMenuSeparator />
|
|
74
|
+
<DropdownMenuGroup>
|
|
75
|
+
<DropdownMenuItem>
|
|
76
|
+
<SparklesIcon />
|
|
77
|
+
Upgrade to Pro
|
|
78
|
+
</DropdownMenuItem>
|
|
79
|
+
</DropdownMenuGroup>
|
|
80
|
+
<DropdownMenuSeparator />
|
|
81
|
+
<DropdownMenuGroup>
|
|
82
|
+
<DropdownMenuItem>
|
|
83
|
+
<BadgeCheckIcon />
|
|
84
|
+
Account
|
|
85
|
+
</DropdownMenuItem>
|
|
86
|
+
<DropdownMenuItem>
|
|
87
|
+
<CreditCardIcon />
|
|
88
|
+
Billing
|
|
89
|
+
</DropdownMenuItem>
|
|
90
|
+
<DropdownMenuItem>
|
|
91
|
+
<BellIcon />
|
|
92
|
+
Notifications
|
|
93
|
+
</DropdownMenuItem>
|
|
94
|
+
</DropdownMenuGroup>
|
|
95
|
+
<DropdownMenuSeparator />
|
|
96
|
+
<DropdownMenuItem>
|
|
97
|
+
<LogOutIcon />
|
|
98
|
+
Log out
|
|
99
|
+
</DropdownMenuItem>
|
|
100
|
+
</DropdownMenuContent>
|
|
101
|
+
</DropdownMenu>
|
|
102
|
+
</SidebarMenuItem>
|
|
103
|
+
</SidebarMenu>
|
|
104
|
+
)
|
|
105
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import * as React from 'react'
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
DropdownMenu,
|
|
7
|
+
DropdownMenuContent,
|
|
8
|
+
DropdownMenuGroup,
|
|
9
|
+
DropdownMenuItem,
|
|
10
|
+
DropdownMenuLabel,
|
|
11
|
+
DropdownMenuSeparator,
|
|
12
|
+
DropdownMenuShortcut,
|
|
13
|
+
DropdownMenuTrigger,
|
|
14
|
+
} from '@devxcrew/react-ui/components/dropdown-menu'
|
|
15
|
+
import {
|
|
16
|
+
SidebarMenu,
|
|
17
|
+
SidebarMenuButton,
|
|
18
|
+
SidebarMenuItem,
|
|
19
|
+
useSidebar,
|
|
20
|
+
} from '@devxcrew/react-ui/components/sidebar'
|
|
21
|
+
import { ChevronsUpDownIcon, PlusIcon } from 'lucide-react'
|
|
22
|
+
|
|
23
|
+
export function TeamSwitcher({
|
|
24
|
+
teams,
|
|
25
|
+
}: {
|
|
26
|
+
teams: {
|
|
27
|
+
name: string
|
|
28
|
+
logo: React.ReactNode
|
|
29
|
+
plan: string
|
|
30
|
+
}[]
|
|
31
|
+
}) {
|
|
32
|
+
const { isMobile } = useSidebar()
|
|
33
|
+
const [activeTeam, setActiveTeam] = React.useState(teams[0])
|
|
34
|
+
if (!activeTeam) {
|
|
35
|
+
return null
|
|
36
|
+
}
|
|
37
|
+
return (
|
|
38
|
+
<SidebarMenu>
|
|
39
|
+
<SidebarMenuItem>
|
|
40
|
+
<DropdownMenu>
|
|
41
|
+
<DropdownMenuTrigger
|
|
42
|
+
render={
|
|
43
|
+
<SidebarMenuButton
|
|
44
|
+
size="lg"
|
|
45
|
+
className="data-open:bg-sidebar-accent data-open:text-sidebar-accent-foreground"
|
|
46
|
+
/>
|
|
47
|
+
}
|
|
48
|
+
>
|
|
49
|
+
<div className="flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground">
|
|
50
|
+
{activeTeam.logo}
|
|
51
|
+
</div>
|
|
52
|
+
<div className="grid flex-1 text-left text-sm leading-tight">
|
|
53
|
+
<span className="truncate font-medium">{activeTeam.name}</span>
|
|
54
|
+
<span className="truncate text-xs">{activeTeam.plan}</span>
|
|
55
|
+
</div>
|
|
56
|
+
<ChevronsUpDownIcon className="ml-auto" />
|
|
57
|
+
</DropdownMenuTrigger>
|
|
58
|
+
<DropdownMenuContent
|
|
59
|
+
className="w-fit"
|
|
60
|
+
align="start"
|
|
61
|
+
side={isMobile ? 'bottom' : 'right'}
|
|
62
|
+
sideOffset={4}
|
|
63
|
+
>
|
|
64
|
+
<DropdownMenuGroup>
|
|
65
|
+
<DropdownMenuLabel className="text-xs text-muted-foreground">Teams</DropdownMenuLabel>
|
|
66
|
+
{teams.map((team, index) => (
|
|
67
|
+
<DropdownMenuItem
|
|
68
|
+
key={team.name}
|
|
69
|
+
onClick={() => setActiveTeam(team)}
|
|
70
|
+
className="gap-2 p-2"
|
|
71
|
+
>
|
|
72
|
+
<div className="flex size-6 items-center justify-center rounded-md border">
|
|
73
|
+
{team.logo}
|
|
74
|
+
</div>
|
|
75
|
+
{team.name}
|
|
76
|
+
<DropdownMenuShortcut>⌘{index + 1}</DropdownMenuShortcut>
|
|
77
|
+
</DropdownMenuItem>
|
|
78
|
+
))}
|
|
79
|
+
</DropdownMenuGroup>
|
|
80
|
+
<DropdownMenuSeparator />
|
|
81
|
+
<DropdownMenuGroup>
|
|
82
|
+
<DropdownMenuItem className="gap-2 p-2">
|
|
83
|
+
<div className="flex size-6 items-center justify-center rounded-md border bg-transparent">
|
|
84
|
+
<PlusIcon className="size-4" />
|
|
85
|
+
</div>
|
|
86
|
+
<div className="font-medium text-muted-foreground">Add team</div>
|
|
87
|
+
</DropdownMenuItem>
|
|
88
|
+
</DropdownMenuGroup>
|
|
89
|
+
</DropdownMenuContent>
|
|
90
|
+
</DropdownMenu>
|
|
91
|
+
</SidebarMenuItem>
|
|
92
|
+
</SidebarMenu>
|
|
93
|
+
)
|
|
94
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { AppSidebar } from './components/app-sidebar'
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { UiTemplateCode } from "./ui-template-code";
|
|
2
|
+
export { UiTemplateHeader } from "./ui-template-header";
|
|
3
|
+
export type { UiTemplateKind } from "./ui-template-header";
|
|
4
|
+
export { UiTemplateNavigation } from "./ui-template-navigation";
|
|
5
|
+
export type { UiTemplateNavigationItem } from "./ui-template-navigation";
|
|
6
|
+
export { UiTemplatePage } from "./ui-template-page";
|
|
7
|
+
export type { UiTemplatePageProps } from "./ui-template-page";
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import { cn } from "../../lib/utils";
|
|
3
|
+
|
|
4
|
+
export type UiBrowserFrameProps = {
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
title: string;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export function UiBrowserFrame({ children, className, title }: UiBrowserFrameProps) {
|
|
11
|
+
return (
|
|
12
|
+
<section
|
|
13
|
+
aria-label={`${title} preview`}
|
|
14
|
+
className={cn("overflow-hidden rounded-xl border border-border bg-background shadow-sm", className)}
|
|
15
|
+
>
|
|
16
|
+
<header className="flex h-9 items-center justify-between gap-4 border-b bg-muted/20 px-3">
|
|
17
|
+
<div aria-hidden="true" className="flex shrink-0 items-center gap-1.5">
|
|
18
|
+
<span className="size-2 rounded-full bg-red-400" />
|
|
19
|
+
<span className="size-2 rounded-full bg-amber-400" />
|
|
20
|
+
<span className="size-2 rounded-full bg-emerald-400" />
|
|
21
|
+
</div>
|
|
22
|
+
<span className="truncate text-xs font-medium tracking-[0.12em] text-muted-foreground uppercase">{title}</span>
|
|
23
|
+
</header>
|
|
24
|
+
<div className="min-w-0">{children}</div>
|
|
25
|
+
</section>
|
|
26
|
+
);
|
|
27
|
+
}
|