@auto-engineer/generate-react-client 1.64.0 → 1.65.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/CHANGELOG.md +21 -0
- package/dist/starter/.storybook/main.ts +17 -22
- package/dist/starter/.storybook/manager-head.html +31 -31
- package/dist/starter/.storybook/manager.ts +133 -133
- package/dist/starter/.storybook/preview-head.html +12 -12
- package/dist/starter/.storybook/preview.tsx +79 -79
- package/dist/starter/biome.json +126 -0
- package/dist/starter/codegen.ts +11 -11
- package/dist/starter/components.json +27 -27
- package/dist/starter/package.json +86 -80
- package/dist/starter/public/mockServiceWorker.js +261 -261
- package/dist/starter/scripts/build-component-db.ts +17 -20
- package/dist/starter/src/App.tsx +15 -17
- package/dist/starter/src/components/ui/Accordion.stories.tsx +35 -35
- package/dist/starter/src/components/ui/Accordion.tsx +33 -33
- package/dist/starter/src/components/ui/Alert.stories.tsx +15 -15
- package/dist/starter/src/components/ui/Alert.tsx +32 -32
- package/dist/starter/src/components/ui/AlertDialog.stories.tsx +50 -50
- package/dist/starter/src/components/ui/AlertDialog.tsx +114 -115
- package/dist/starter/src/components/ui/AspectRatio.stories.tsx +20 -20
- package/dist/starter/src/components/ui/AspectRatio.tsx +1 -1
- package/dist/starter/src/components/ui/Avatar.stories.tsx +27 -27
- package/dist/starter/src/components/ui/Avatar.tsx +63 -63
- package/dist/starter/src/components/ui/Badge.stories.tsx +14 -14
- package/dist/starter/src/components/ui/Badge.tsx +27 -27
- package/dist/starter/src/components/ui/Breadcrumb.stories.tsx +38 -38
- package/dist/starter/src/components/ui/Breadcrumb.tsx +63 -62
- package/dist/starter/src/components/ui/Button.stories.tsx +55 -55
- package/dist/starter/src/components/ui/Button.tsx +49 -49
- package/dist/starter/src/components/ui/ButtonGroup.stories.tsx +17 -17
- package/dist/starter/src/components/ui/ButtonGroup.tsx +52 -53
- package/dist/starter/src/components/ui/Calendar.stories.tsx +20 -19
- package/dist/starter/src/components/ui/Calendar.tsx +142 -143
- package/dist/starter/src/components/ui/Card.stories.tsx +29 -29
- package/dist/starter/src/components/ui/Card.tsx +31 -31
- package/dist/starter/src/components/ui/Carousel.stories.tsx +41 -41
- package/dist/starter/src/components/ui/Carousel.tsx +171 -172
- package/dist/starter/src/components/ui/Chart.stories.tsx +21 -21
- package/dist/starter/src/components/ui/Chart.tsx +244 -247
- package/dist/starter/src/components/ui/Checkbox.stories.tsx +11 -11
- package/dist/starter/src/components/ui/Checkbox.tsx +18 -18
- package/dist/starter/src/components/ui/Collapsible.stories.tsx +40 -40
- package/dist/starter/src/components/ui/Collapsible.tsx +3 -3
- package/dist/starter/src/components/ui/Combobox.stories.tsx +48 -48
- package/dist/starter/src/components/ui/Combobox.tsx +204 -205
- package/dist/starter/src/components/ui/Command.stories.tsx +55 -55
- package/dist/starter/src/components/ui/Command.tsx +102 -103
- package/dist/starter/src/components/ui/ContextMenu.stories.tsx +52 -52
- package/dist/starter/src/components/ui/ContextMenu.tsx +151 -151
- package/dist/starter/src/components/ui/DesignSystem-Colors.stories.tsx +92 -92
- package/dist/starter/src/components/ui/DesignSystem-Layout.stories.tsx +139 -139
- package/dist/starter/src/components/ui/DesignSystem-Overview.stories.tsx +676 -657
- package/dist/starter/src/components/ui/DesignSystem-Typography.stories.tsx +59 -59
- package/dist/starter/src/components/ui/Dialog.stories.tsx +56 -56
- package/dist/starter/src/components/ui/Dialog.tsx +97 -98
- package/dist/starter/src/components/ui/Direction.stories.tsx +20 -20
- package/dist/starter/src/components/ui/Direction.tsx +7 -7
- package/dist/starter/src/components/ui/Drawer.stories.tsx +54 -54
- package/dist/starter/src/components/ui/Drawer.tsx +70 -70
- package/dist/starter/src/components/ui/DropdownMenu.stories.tsx +58 -58
- package/dist/starter/src/components/ui/DropdownMenu.tsx +157 -157
- package/dist/starter/src/components/ui/Empty.stories.tsx +22 -22
- package/dist/starter/src/components/ui/Empty.tsx +58 -58
- package/dist/starter/src/components/ui/Field.stories.tsx +31 -31
- package/dist/starter/src/components/ui/Field.tsx +180 -181
- package/dist/starter/src/components/ui/Form.stories.tsx +29 -29
- package/dist/starter/src/components/ui/Form.tsx +93 -96
- package/dist/starter/src/components/ui/HoverCard.stories.tsx +34 -34
- package/dist/starter/src/components/ui/HoverCard.tsx +21 -21
- package/dist/starter/src/components/ui/Input.stories.tsx +18 -18
- package/dist/starter/src/components/ui/Input.tsx +14 -14
- package/dist/starter/src/components/ui/InputGroup.stories.tsx +34 -34
- package/dist/starter/src/components/ui/InputGroup.tsx +110 -111
- package/dist/starter/src/components/ui/InputOTP.stories.tsx +28 -28
- package/dist/starter/src/components/ui/InputOTP.tsx +43 -43
- package/dist/starter/src/components/ui/Item.stories.tsx +45 -45
- package/dist/starter/src/components/ui/Item.tsx +113 -114
- package/dist/starter/src/components/ui/Kbd.stories.tsx +31 -31
- package/dist/starter/src/components/ui/Kbd.tsx +11 -11
- package/dist/starter/src/components/ui/Label.stories.tsx +62 -62
- package/dist/starter/src/components/ui/Label.tsx +26 -25
- package/dist/starter/src/components/ui/Menubar.stories.tsx +62 -62
- package/dist/starter/src/components/ui/Menubar.tsx +173 -173
- package/dist/starter/src/components/ui/NativeSelect.stories.tsx +26 -26
- package/dist/starter/src/components/ui/NativeSelect.tsx +29 -29
- package/dist/starter/src/components/ui/NavigationMenu.stories.tsx +64 -64
- package/dist/starter/src/components/ui/NavigationMenu.tsx +103 -103
- package/dist/starter/src/components/ui/Pagination.stories.tsx +61 -61
- package/dist/starter/src/components/ui/Pagination.tsx +69 -71
- package/dist/starter/src/components/ui/Popover.stories.tsx +38 -38
- package/dist/starter/src/components/ui/Popover.tsx +25 -25
- package/dist/starter/src/components/ui/Progress.stories.tsx +9 -9
- package/dist/starter/src/components/ui/Progress.tsx +14 -14
- package/dist/starter/src/components/ui/RadioGroup.stories.tsx +35 -35
- package/dist/starter/src/components/ui/RadioGroup.tsx +19 -19
- package/dist/starter/src/components/ui/Resizable.stories.tsx +54 -54
- package/dist/starter/src/components/ui/Resizable.tsx +29 -29
- package/dist/starter/src/components/ui/ScrollArea.stories.tsx +27 -27
- package/dist/starter/src/components/ui/ScrollArea.tsx +34 -34
- package/dist/starter/src/components/ui/Select.stories.tsx +43 -43
- package/dist/starter/src/components/ui/Select.tsx +120 -120
- package/dist/starter/src/components/ui/Separator.stories.tsx +27 -27
- package/dist/starter/src/components/ui/Separator.tsx +17 -17
- package/dist/starter/src/components/ui/Sheet.stories.tsx +53 -53
- package/dist/starter/src/components/ui/Sheet.tsx +69 -69
- package/dist/starter/src/components/ui/Sidebar.stories.tsx +77 -77
- package/dist/starter/src/components/ui/Sidebar.tsx +563 -564
- package/dist/starter/src/components/ui/Skeleton.stories.tsx +25 -25
- package/dist/starter/src/components/ui/Skeleton.tsx +1 -1
- package/dist/starter/src/components/ui/Slider.stories.tsx +5 -5
- package/dist/starter/src/components/ui/Slider.tsx +45 -44
- package/dist/starter/src/components/ui/Sonner.stories.tsx +32 -32
- package/dist/starter/src/components/ui/Sonner.tsx +23 -23
- package/dist/starter/src/components/ui/Spinner.stories.tsx +8 -8
- package/dist/starter/src/components/ui/Spinner.tsx +1 -1
- package/dist/starter/src/components/ui/Switch.stories.tsx +16 -17
- package/dist/starter/src/components/ui/Switch.tsx +24 -24
- package/dist/starter/src/components/ui/Table.stories.tsx +50 -50
- package/dist/starter/src/components/ui/Table.tsx +45 -45
- package/dist/starter/src/components/ui/Tabs.stories.tsx +39 -39
- package/dist/starter/src/components/ui/Tabs.tsx +47 -47
- package/dist/starter/src/components/ui/Textarea.stories.tsx +9 -9
- package/dist/starter/src/components/ui/Textarea.tsx +11 -11
- package/dist/starter/src/components/ui/Toast.stories.tsx +77 -77
- package/dist/starter/src/components/ui/Toast.tsx +75 -75
- package/dist/starter/src/components/ui/Toaster.tsx +17 -19
- package/dist/starter/src/components/ui/Toggle.stories.tsx +20 -20
- package/dist/starter/src/components/ui/Toggle.tsx +26 -26
- package/dist/starter/src/components/ui/ToggleGroup.stories.tsx +41 -41
- package/dist/starter/src/components/ui/ToggleGroup.tsx +61 -62
- package/dist/starter/src/components/ui/Tooltip.stories.tsx +26 -26
- package/dist/starter/src/components/ui/Tooltip.tsx +24 -24
- package/dist/starter/src/gql/execute.ts +1 -1
- package/dist/starter/src/gql/fragment-masking.ts +1 -1
- package/dist/starter/src/gql/graphql.ts +3 -0
- package/dist/starter/src/hooks/use-mobile.ts +11 -11
- package/dist/starter/src/hooks/use-toast.ts +135 -135
- package/dist/starter/src/index.css +105 -105
- package/dist/starter/src/lib/utils.ts +1 -1
- package/dist/starter/src/main.tsx +4 -1
- package/dist/starter/tsconfig.app.json +24 -24
- package/dist/starter/tsconfig.json +8 -8
- package/dist/starter/vite.config.ts +38 -37
- package/package.json +3 -3
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import * as React from 'react';
|
|
4
3
|
import { XIcon } from 'lucide-react';
|
|
5
4
|
import { Dialog as SheetPrimitive } from 'radix-ui';
|
|
5
|
+
import type * as React from 'react';
|
|
6
6
|
|
|
7
7
|
import { cn } from '@/lib/utils';
|
|
8
8
|
|
|
@@ -12,104 +12,104 @@ import { cn } from '@/lib/utils';
|
|
|
12
12
|
* Compose with SheetTrigger, SheetContent, SheetHeader, SheetTitle, and SheetDescription.
|
|
13
13
|
*/
|
|
14
14
|
function Sheet({ ...props }: React.ComponentProps<typeof SheetPrimitive.Root>) {
|
|
15
|
-
|
|
15
|
+
return <SheetPrimitive.Root data-slot="sheet" {...props} />;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
function SheetTrigger({ ...props }: React.ComponentProps<typeof SheetPrimitive.Trigger>) {
|
|
19
|
-
|
|
19
|
+
return <SheetPrimitive.Trigger data-slot="sheet-trigger" {...props} />;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
function SheetClose({ ...props }: React.ComponentProps<typeof SheetPrimitive.Close>) {
|
|
23
|
-
|
|
23
|
+
return <SheetPrimitive.Close data-slot="sheet-close" {...props} />;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
function SheetPortal({ ...props }: React.ComponentProps<typeof SheetPrimitive.Portal>) {
|
|
27
|
-
|
|
27
|
+
return <SheetPrimitive.Portal data-slot="sheet-portal" {...props} />;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
function SheetOverlay({ className, ...props }: React.ComponentProps<typeof SheetPrimitive.Overlay>) {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
31
|
+
return (
|
|
32
|
+
<SheetPrimitive.Overlay
|
|
33
|
+
data-slot="sheet-overlay"
|
|
34
|
+
className={cn(
|
|
35
|
+
'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50',
|
|
36
|
+
className,
|
|
37
|
+
)}
|
|
38
|
+
{...props}
|
|
39
|
+
/>
|
|
40
|
+
);
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
/** The sliding panel content. Use the side prop to control which edge it slides from (top, right, bottom, left). */
|
|
44
44
|
function SheetContent({
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
45
|
+
className,
|
|
46
|
+
children,
|
|
47
|
+
/** Which edge the panel slides from: top, right, bottom, or left. */
|
|
48
|
+
side = 'right',
|
|
49
|
+
/** Whether to show the X close button in the top-right corner. */
|
|
50
|
+
showCloseButton = true,
|
|
51
|
+
...props
|
|
52
52
|
}: React.ComponentProps<typeof SheetPrimitive.Content> & {
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
54
|
+
showCloseButton?: boolean;
|
|
55
55
|
}) {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
56
|
+
return (
|
|
57
|
+
<SheetPortal>
|
|
58
|
+
<SheetOverlay />
|
|
59
|
+
<SheetPrimitive.Content
|
|
60
|
+
data-slot="sheet-content"
|
|
61
|
+
className={cn(
|
|
62
|
+
'bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500',
|
|
63
|
+
side === 'right' &&
|
|
64
|
+
'data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm',
|
|
65
|
+
side === 'left' &&
|
|
66
|
+
'data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm',
|
|
67
|
+
side === 'top' &&
|
|
68
|
+
'data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b',
|
|
69
|
+
side === 'bottom' &&
|
|
70
|
+
'data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t',
|
|
71
|
+
className,
|
|
72
|
+
)}
|
|
73
|
+
{...props}
|
|
74
|
+
>
|
|
75
|
+
{children}
|
|
76
|
+
{showCloseButton && (
|
|
77
|
+
<SheetPrimitive.Close className="ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none">
|
|
78
|
+
<XIcon className="size-4" />
|
|
79
|
+
<span className="sr-only">Close</span>
|
|
80
|
+
</SheetPrimitive.Close>
|
|
81
|
+
)}
|
|
82
|
+
</SheetPrimitive.Content>
|
|
83
|
+
</SheetPortal>
|
|
84
|
+
);
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
function SheetHeader({ className, ...props }: React.ComponentProps<'div'>) {
|
|
88
|
-
|
|
88
|
+
return <div data-slot="sheet-header" className={cn('flex flex-col gap-1.5 p-4', className)} {...props} />;
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
function SheetFooter({ className, ...props }: React.ComponentProps<'div'>) {
|
|
92
|
-
|
|
92
|
+
return <div data-slot="sheet-footer" className={cn('mt-auto flex flex-col gap-2 p-4', className)} {...props} />;
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
function SheetTitle({ className, ...props }: React.ComponentProps<typeof SheetPrimitive.Title>) {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
96
|
+
return (
|
|
97
|
+
<SheetPrimitive.Title
|
|
98
|
+
data-slot="sheet-title"
|
|
99
|
+
className={cn('text-foreground font-semibold', className)}
|
|
100
|
+
{...props}
|
|
101
|
+
/>
|
|
102
|
+
);
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
function SheetDescription({ className, ...props }: React.ComponentProps<typeof SheetPrimitive.Description>) {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
106
|
+
return (
|
|
107
|
+
<SheetPrimitive.Description
|
|
108
|
+
data-slot="sheet-description"
|
|
109
|
+
className={cn('text-muted-foreground text-sm', className)}
|
|
110
|
+
{...props}
|
|
111
|
+
/>
|
|
112
|
+
);
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
export { Sheet, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription };
|
|
@@ -1,96 +1,96 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
-
import { HomeIcon, SettingsIcon, UsersIcon
|
|
2
|
+
import { HomeIcon, InboxIcon, SettingsIcon, UsersIcon } from 'lucide-react';
|
|
3
3
|
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
4
|
+
Sidebar,
|
|
5
|
+
SidebarContent,
|
|
6
|
+
SidebarFooter,
|
|
7
|
+
SidebarGroup,
|
|
8
|
+
SidebarGroupLabel,
|
|
9
|
+
SidebarHeader,
|
|
10
|
+
SidebarMenu,
|
|
11
|
+
SidebarMenuButton,
|
|
12
|
+
SidebarMenuItem,
|
|
13
|
+
SidebarProvider,
|
|
14
|
+
SidebarTrigger,
|
|
15
15
|
} from '@/components/ui/Sidebar';
|
|
16
16
|
|
|
17
17
|
const meta: Meta<typeof Sidebar> = {
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
title: 'UI Components/Sidebar',
|
|
19
|
+
component: Sidebar,
|
|
20
20
|
};
|
|
21
21
|
export default meta;
|
|
22
22
|
type Story = StoryObj<typeof Sidebar>;
|
|
23
23
|
|
|
24
24
|
const menuItems = [
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
{ label: 'Home', icon: HomeIcon },
|
|
26
|
+
{ label: 'Inbox', icon: InboxIcon },
|
|
27
|
+
{ label: 'Users', icon: UsersIcon },
|
|
28
|
+
{ label: 'Settings', icon: SettingsIcon },
|
|
29
29
|
];
|
|
30
30
|
|
|
31
31
|
/** Shows a complete sidebar with header, navigation group, footer, and a toggle trigger in the main area. */
|
|
32
32
|
export const Default: Story = {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
33
|
+
render: () => (
|
|
34
|
+
<SidebarProvider>
|
|
35
|
+
<Sidebar>
|
|
36
|
+
<SidebarHeader>
|
|
37
|
+
<span className="px-2 text-lg font-semibold">My App</span>
|
|
38
|
+
</SidebarHeader>
|
|
39
|
+
<SidebarContent>
|
|
40
|
+
<SidebarGroup>
|
|
41
|
+
<SidebarGroupLabel>Navigation</SidebarGroupLabel>
|
|
42
|
+
<SidebarMenu>
|
|
43
|
+
{menuItems.map((item) => (
|
|
44
|
+
<SidebarMenuItem key={item.label}>
|
|
45
|
+
<SidebarMenuButton>
|
|
46
|
+
<item.icon />
|
|
47
|
+
<span>{item.label}</span>
|
|
48
|
+
</SidebarMenuButton>
|
|
49
|
+
</SidebarMenuItem>
|
|
50
|
+
))}
|
|
51
|
+
</SidebarMenu>
|
|
52
|
+
</SidebarGroup>
|
|
53
|
+
</SidebarContent>
|
|
54
|
+
<SidebarFooter>
|
|
55
|
+
<span className="px-2 text-xs text-muted-foreground">v1.0.0</span>
|
|
56
|
+
</SidebarFooter>
|
|
57
|
+
</Sidebar>
|
|
58
|
+
<main className="flex-1 p-4">
|
|
59
|
+
<SidebarTrigger />
|
|
60
|
+
<p className="mt-4 text-sm text-muted-foreground">Main content area</p>
|
|
61
|
+
</main>
|
|
62
|
+
</SidebarProvider>
|
|
63
|
+
),
|
|
64
64
|
};
|
|
65
65
|
|
|
66
66
|
/** Shows the sidebar with the first menu item highlighted as the active page. */
|
|
67
67
|
export const WithActiveItem: Story = {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
68
|
+
render: () => (
|
|
69
|
+
<SidebarProvider>
|
|
70
|
+
<Sidebar>
|
|
71
|
+
<SidebarHeader>
|
|
72
|
+
<span className="px-2 text-lg font-semibold">My App</span>
|
|
73
|
+
</SidebarHeader>
|
|
74
|
+
<SidebarContent>
|
|
75
|
+
<SidebarGroup>
|
|
76
|
+
<SidebarGroupLabel>Navigation</SidebarGroupLabel>
|
|
77
|
+
<SidebarMenu>
|
|
78
|
+
{menuItems.map((item, index) => (
|
|
79
|
+
<SidebarMenuItem key={item.label}>
|
|
80
|
+
<SidebarMenuButton isActive={index === 0}>
|
|
81
|
+
<item.icon />
|
|
82
|
+
<span>{item.label}</span>
|
|
83
|
+
</SidebarMenuButton>
|
|
84
|
+
</SidebarMenuItem>
|
|
85
|
+
))}
|
|
86
|
+
</SidebarMenu>
|
|
87
|
+
</SidebarGroup>
|
|
88
|
+
</SidebarContent>
|
|
89
|
+
</Sidebar>
|
|
90
|
+
<main className="flex-1 p-4">
|
|
91
|
+
<SidebarTrigger />
|
|
92
|
+
<p className="mt-4 text-sm text-muted-foreground">Main content area</p>
|
|
93
|
+
</main>
|
|
94
|
+
</SidebarProvider>
|
|
95
|
+
),
|
|
96
96
|
};
|