@auto-engineer/generate-react-client 1.63.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 +45 -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,748 +1,767 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import * as React from 'react';
|
|
4
3
|
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
4
|
+
import {
|
|
5
|
+
ArchiveIcon,
|
|
6
|
+
ArrowLeftIcon,
|
|
7
|
+
ArrowUpIcon,
|
|
8
|
+
BadgeCheckIcon,
|
|
9
|
+
CalendarPlusIcon,
|
|
10
|
+
ChevronRightIcon,
|
|
11
|
+
ClockIcon,
|
|
12
|
+
InfoIcon,
|
|
13
|
+
ListFilterIcon,
|
|
14
|
+
MailCheckIcon,
|
|
15
|
+
MoreHorizontalIcon,
|
|
16
|
+
PlusIcon,
|
|
17
|
+
SearchIcon,
|
|
18
|
+
TagIcon,
|
|
19
|
+
Trash2Icon,
|
|
20
|
+
} from 'lucide-react';
|
|
21
|
+
import * as React from 'react';
|
|
5
22
|
import { Avatar, AvatarFallback, AvatarGroup, AvatarImage } from '@/components/ui/Avatar';
|
|
6
23
|
import { Badge } from '@/components/ui/Badge';
|
|
7
24
|
import { Button } from '@/components/ui/Button';
|
|
8
25
|
import { ButtonGroup } from '@/components/ui/ButtonGroup';
|
|
9
26
|
import { Checkbox } from '@/components/ui/Checkbox';
|
|
10
27
|
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
28
|
+
DropdownMenu,
|
|
29
|
+
DropdownMenuContent,
|
|
30
|
+
DropdownMenuGroup,
|
|
31
|
+
DropdownMenuItem,
|
|
32
|
+
DropdownMenuRadioGroup,
|
|
33
|
+
DropdownMenuRadioItem,
|
|
34
|
+
DropdownMenuSeparator,
|
|
35
|
+
DropdownMenuSub,
|
|
36
|
+
DropdownMenuSubContent,
|
|
37
|
+
DropdownMenuSubTrigger,
|
|
38
|
+
DropdownMenuTrigger,
|
|
22
39
|
} from '@/components/ui/DropdownMenu';
|
|
40
|
+
import { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle } from '@/components/ui/Empty';
|
|
23
41
|
import {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
FieldContent,
|
|
34
|
-
FieldDescription,
|
|
35
|
-
FieldGroup,
|
|
36
|
-
FieldLabel,
|
|
37
|
-
FieldLegend,
|
|
38
|
-
FieldSeparator,
|
|
39
|
-
FieldSet,
|
|
40
|
-
FieldTitle,
|
|
42
|
+
Field,
|
|
43
|
+
FieldContent,
|
|
44
|
+
FieldDescription,
|
|
45
|
+
FieldGroup,
|
|
46
|
+
FieldLabel,
|
|
47
|
+
FieldLegend,
|
|
48
|
+
FieldSeparator,
|
|
49
|
+
FieldSet,
|
|
50
|
+
FieldTitle,
|
|
41
51
|
} from '@/components/ui/Field';
|
|
42
52
|
import { Input } from '@/components/ui/Input';
|
|
43
53
|
import {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
54
|
+
InputGroup,
|
|
55
|
+
InputGroupAddon,
|
|
56
|
+
InputGroupButton,
|
|
57
|
+
InputGroupInput,
|
|
58
|
+
InputGroupText,
|
|
59
|
+
InputGroupTextarea,
|
|
50
60
|
} from '@/components/ui/InputGroup';
|
|
51
61
|
import { Item, ItemActions, ItemContent, ItemDescription, ItemMedia, ItemTitle } from '@/components/ui/Item';
|
|
52
62
|
import { RadioGroup, RadioGroupItem } from '@/components/ui/RadioGroup';
|
|
53
|
-
import {
|
|
54
|
-
Select,
|
|
55
|
-
SelectContent,
|
|
56
|
-
SelectGroup,
|
|
57
|
-
SelectItem,
|
|
58
|
-
SelectTrigger,
|
|
59
|
-
SelectValue,
|
|
60
|
-
} from '@/components/ui/Select';
|
|
63
|
+
import { Select, SelectContent, SelectGroup, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/Select';
|
|
61
64
|
import { Slider } from '@/components/ui/Slider';
|
|
62
65
|
import { Spinner } from '@/components/ui/Spinner';
|
|
63
66
|
import { Switch } from '@/components/ui/Switch';
|
|
64
67
|
import { Textarea } from '@/components/ui/Textarea';
|
|
65
|
-
import {
|
|
66
|
-
ArchiveIcon,
|
|
67
|
-
ArrowLeftIcon,
|
|
68
|
-
ArrowUpIcon,
|
|
69
|
-
BadgeCheckIcon,
|
|
70
|
-
CalendarPlusIcon,
|
|
71
|
-
ChevronRightIcon,
|
|
72
|
-
ClockIcon,
|
|
73
|
-
InfoIcon,
|
|
74
|
-
ListFilterIcon,
|
|
75
|
-
MailCheckIcon,
|
|
76
|
-
MoreHorizontalIcon,
|
|
77
|
-
PlusIcon,
|
|
78
|
-
SearchIcon,
|
|
79
|
-
TagIcon,
|
|
80
|
-
Trash2Icon,
|
|
81
|
-
} from 'lucide-react';
|
|
82
68
|
|
|
83
69
|
function PaymentMethodDemo() {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
70
|
+
return (
|
|
71
|
+
<div className="w-full max-w-sm">
|
|
72
|
+
<form>
|
|
73
|
+
<FieldGroup>
|
|
74
|
+
<FieldSet>
|
|
75
|
+
<FieldLegend>Payment Method</FieldLegend>
|
|
76
|
+
<FieldDescription>All transactions are secure and encrypted</FieldDescription>
|
|
77
|
+
<FieldGroup>
|
|
78
|
+
<Field>
|
|
79
|
+
<FieldLabel htmlFor="card-name">Name on Card</FieldLabel>
|
|
80
|
+
<Input id="card-name" placeholder="John Doe" />
|
|
81
|
+
</Field>
|
|
82
|
+
<div className="grid grid-cols-4 gap-4">
|
|
83
|
+
<Field className="col-span-3">
|
|
84
|
+
<FieldLabel htmlFor="card-number">Card Number</FieldLabel>
|
|
85
|
+
<Input id="card-number" placeholder="1234 5678 9012 3456" />
|
|
86
|
+
</Field>
|
|
87
|
+
<Field className="col-span-1">
|
|
88
|
+
<FieldLabel htmlFor="cvv">CVV</FieldLabel>
|
|
89
|
+
<Input id="cvv" placeholder="123" />
|
|
90
|
+
</Field>
|
|
91
|
+
</div>
|
|
92
|
+
<FieldDescription className="-mt-2">Enter your 16-digit number.</FieldDescription>
|
|
93
|
+
<div className="grid grid-cols-2 gap-4">
|
|
94
|
+
<Field>
|
|
95
|
+
<FieldLabel htmlFor="exp-month">Month</FieldLabel>
|
|
96
|
+
<Select defaultValue="">
|
|
97
|
+
<SelectTrigger id="exp-month">
|
|
98
|
+
<SelectValue placeholder="MM" />
|
|
99
|
+
</SelectTrigger>
|
|
100
|
+
<SelectContent>
|
|
101
|
+
<SelectGroup>
|
|
102
|
+
{['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12'].map((month) => (
|
|
103
|
+
<SelectItem key={month} value={month}>
|
|
104
|
+
{month}
|
|
105
|
+
</SelectItem>
|
|
106
|
+
))}
|
|
107
|
+
</SelectGroup>
|
|
108
|
+
</SelectContent>
|
|
109
|
+
</Select>
|
|
110
|
+
</Field>
|
|
111
|
+
<Field>
|
|
112
|
+
<FieldLabel htmlFor="exp-year">Year</FieldLabel>
|
|
113
|
+
<Select defaultValue="">
|
|
114
|
+
<SelectTrigger id="exp-year">
|
|
115
|
+
<SelectValue placeholder="YYYY" />
|
|
116
|
+
</SelectTrigger>
|
|
117
|
+
<SelectContent>
|
|
118
|
+
<SelectGroup>
|
|
119
|
+
{[2024, 2025, 2026, 2027, 2028, 2029].map((year) => (
|
|
120
|
+
<SelectItem key={year} value={String(year)}>
|
|
121
|
+
{year}
|
|
122
|
+
</SelectItem>
|
|
123
|
+
))}
|
|
124
|
+
</SelectGroup>
|
|
125
|
+
</SelectContent>
|
|
126
|
+
</Select>
|
|
127
|
+
</Field>
|
|
128
|
+
</div>
|
|
129
|
+
</FieldGroup>
|
|
130
|
+
</FieldSet>
|
|
131
|
+
<FieldSeparator />
|
|
132
|
+
<FieldSet>
|
|
133
|
+
<FieldLegend>Billing Address</FieldLegend>
|
|
134
|
+
<FieldDescription>The billing address associated with your payment method</FieldDescription>
|
|
135
|
+
<FieldGroup>
|
|
136
|
+
<Field orientation="horizontal">
|
|
137
|
+
<Checkbox id="same-as-shipping" defaultChecked />
|
|
138
|
+
<FieldLabel htmlFor="same-as-shipping" className="font-normal">
|
|
139
|
+
Same as shipping address
|
|
140
|
+
</FieldLabel>
|
|
141
|
+
</Field>
|
|
142
|
+
</FieldGroup>
|
|
143
|
+
</FieldSet>
|
|
144
|
+
<FieldSeparator />
|
|
145
|
+
<FieldSet>
|
|
146
|
+
<FieldGroup>
|
|
147
|
+
<Field>
|
|
148
|
+
<FieldLabel htmlFor="comments">Comments</FieldLabel>
|
|
149
|
+
<Textarea id="comments" placeholder="Add any additional comments" />
|
|
150
|
+
</Field>
|
|
151
|
+
</FieldGroup>
|
|
152
|
+
</FieldSet>
|
|
153
|
+
<Field orientation="horizontal">
|
|
154
|
+
<Button type="submit">Submit</Button>
|
|
155
|
+
<Button variant="outline" type="button">
|
|
156
|
+
Cancel
|
|
157
|
+
</Button>
|
|
158
|
+
</Field>
|
|
159
|
+
</FieldGroup>
|
|
160
|
+
</form>
|
|
161
|
+
</div>
|
|
162
|
+
);
|
|
177
163
|
}
|
|
178
164
|
|
|
179
165
|
function EmptyAvatarGroupDemo() {
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
166
|
+
return (
|
|
167
|
+
<Empty className="flex-none py-4">
|
|
168
|
+
<EmptyHeader>
|
|
169
|
+
<EmptyMedia>
|
|
170
|
+
<AvatarGroup>
|
|
171
|
+
<Avatar>
|
|
172
|
+
<AvatarImage src="https://randomuser.me/api/portraits/women/44.jpg" alt="Sarah" />
|
|
173
|
+
<AvatarFallback>SA</AvatarFallback>
|
|
174
|
+
</Avatar>
|
|
175
|
+
<Avatar>
|
|
176
|
+
<AvatarImage src="https://randomuser.me/api/portraits/men/32.jpg" alt="James" />
|
|
177
|
+
<AvatarFallback>JA</AvatarFallback>
|
|
178
|
+
</Avatar>
|
|
179
|
+
<Avatar>
|
|
180
|
+
<AvatarImage src="https://randomuser.me/api/portraits/women/68.jpg" alt="Maya" />
|
|
181
|
+
<AvatarFallback>MA</AvatarFallback>
|
|
182
|
+
</Avatar>
|
|
183
|
+
</AvatarGroup>
|
|
184
|
+
</EmptyMedia>
|
|
185
|
+
<EmptyTitle>No Team Members</EmptyTitle>
|
|
186
|
+
<EmptyDescription>Invite your team to collaborate on this project.</EmptyDescription>
|
|
187
|
+
</EmptyHeader>
|
|
188
|
+
<EmptyContent>
|
|
189
|
+
<Button size="sm">
|
|
190
|
+
<PlusIcon className="mr-2 size-4" />
|
|
191
|
+
Invite Members
|
|
192
|
+
</Button>
|
|
193
|
+
</EmptyContent>
|
|
194
|
+
</Empty>
|
|
195
|
+
);
|
|
210
196
|
}
|
|
211
197
|
|
|
212
198
|
function SpinnerBadgeDemo() {
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
199
|
+
return (
|
|
200
|
+
<div className="flex items-center gap-2">
|
|
201
|
+
<Badge>
|
|
202
|
+
<Spinner className="mr-1" />
|
|
203
|
+
Syncing
|
|
204
|
+
</Badge>
|
|
205
|
+
<Badge variant="secondary">
|
|
206
|
+
<Spinner className="mr-1" />
|
|
207
|
+
Updating
|
|
208
|
+
</Badge>
|
|
209
|
+
<Badge variant="outline">
|
|
210
|
+
<Spinner className="mr-1" />
|
|
211
|
+
Loading
|
|
212
|
+
</Badge>
|
|
213
|
+
</div>
|
|
214
|
+
);
|
|
229
215
|
}
|
|
230
216
|
|
|
231
217
|
function ButtonGroupDemo() {
|
|
232
|
-
|
|
218
|
+
const [label, setLabel] = React.useState('personal');
|
|
233
219
|
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
220
|
+
return (
|
|
221
|
+
<ButtonGroup>
|
|
222
|
+
<ButtonGroup className="hidden sm:flex">
|
|
223
|
+
<Button variant="outline" size="sm" aria-label="Go Back">
|
|
224
|
+
<ArrowLeftIcon className="size-4" />
|
|
225
|
+
</Button>
|
|
226
|
+
</ButtonGroup>
|
|
227
|
+
<ButtonGroup>
|
|
228
|
+
<Button variant="outline" size="sm">
|
|
229
|
+
Archive
|
|
230
|
+
</Button>
|
|
231
|
+
<Button variant="outline" size="sm">
|
|
232
|
+
Report
|
|
233
|
+
</Button>
|
|
234
|
+
</ButtonGroup>
|
|
235
|
+
<ButtonGroup>
|
|
236
|
+
<Button variant="outline" size="sm">
|
|
237
|
+
Snooze
|
|
238
|
+
</Button>
|
|
239
|
+
<DropdownMenu>
|
|
240
|
+
<DropdownMenuTrigger asChild>
|
|
241
|
+
<Button variant="outline" size="sm" aria-label="More Options">
|
|
242
|
+
<MoreHorizontalIcon className="size-4" />
|
|
243
|
+
</Button>
|
|
244
|
+
</DropdownMenuTrigger>
|
|
245
|
+
<DropdownMenuContent align="end" className="w-48">
|
|
246
|
+
<DropdownMenuGroup>
|
|
247
|
+
<DropdownMenuItem>
|
|
248
|
+
<MailCheckIcon className="mr-2 size-4" />
|
|
249
|
+
Mark as Read
|
|
250
|
+
</DropdownMenuItem>
|
|
251
|
+
<DropdownMenuItem>
|
|
252
|
+
<ArchiveIcon className="mr-2 size-4" />
|
|
253
|
+
Archive
|
|
254
|
+
</DropdownMenuItem>
|
|
255
|
+
</DropdownMenuGroup>
|
|
256
|
+
<DropdownMenuSeparator />
|
|
257
|
+
<DropdownMenuGroup>
|
|
258
|
+
<DropdownMenuItem>
|
|
259
|
+
<ClockIcon className="mr-2 size-4" />
|
|
260
|
+
Snooze
|
|
261
|
+
</DropdownMenuItem>
|
|
262
|
+
<DropdownMenuItem>
|
|
263
|
+
<CalendarPlusIcon className="mr-2 size-4" />
|
|
264
|
+
Add to Calendar
|
|
265
|
+
</DropdownMenuItem>
|
|
266
|
+
<DropdownMenuItem>
|
|
267
|
+
<ListFilterIcon className="mr-2 size-4" />
|
|
268
|
+
Add to List
|
|
269
|
+
</DropdownMenuItem>
|
|
270
|
+
<DropdownMenuSub>
|
|
271
|
+
<DropdownMenuSubTrigger>
|
|
272
|
+
<TagIcon className="mr-2 size-4" />
|
|
273
|
+
Label As...
|
|
274
|
+
</DropdownMenuSubTrigger>
|
|
275
|
+
<DropdownMenuSubContent>
|
|
276
|
+
<DropdownMenuRadioGroup value={label} onValueChange={setLabel}>
|
|
277
|
+
<DropdownMenuRadioItem value="personal">Personal</DropdownMenuRadioItem>
|
|
278
|
+
<DropdownMenuRadioItem value="work">Work</DropdownMenuRadioItem>
|
|
279
|
+
<DropdownMenuRadioItem value="other">Other</DropdownMenuRadioItem>
|
|
280
|
+
</DropdownMenuRadioGroup>
|
|
281
|
+
</DropdownMenuSubContent>
|
|
282
|
+
</DropdownMenuSub>
|
|
283
|
+
</DropdownMenuGroup>
|
|
284
|
+
<DropdownMenuSeparator />
|
|
285
|
+
<DropdownMenuGroup>
|
|
286
|
+
<DropdownMenuItem className="text-destructive">
|
|
287
|
+
<Trash2Icon className="mr-2 size-4" />
|
|
288
|
+
Trash
|
|
289
|
+
</DropdownMenuItem>
|
|
290
|
+
</DropdownMenuGroup>
|
|
291
|
+
</DropdownMenuContent>
|
|
292
|
+
</DropdownMenu>
|
|
293
|
+
</ButtonGroup>
|
|
294
|
+
</ButtonGroup>
|
|
295
|
+
);
|
|
310
296
|
}
|
|
311
297
|
|
|
312
298
|
function FieldSliderDemo() {
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
299
|
+
const [value, setValue] = React.useState([200, 800]);
|
|
300
|
+
return (
|
|
301
|
+
<div className="w-full max-w-xs">
|
|
302
|
+
<Field>
|
|
303
|
+
<FieldTitle>Price Range</FieldTitle>
|
|
304
|
+
<FieldDescription>
|
|
305
|
+
Set your budget range ($<span className="font-medium tabular-nums">{value[0]}</span> -{' '}
|
|
306
|
+
<span className="font-medium tabular-nums">{value[1]}</span>).
|
|
307
|
+
</FieldDescription>
|
|
308
|
+
<Slider value={value} onValueChange={setValue} max={1000} min={0} step={10} className="mt-2 w-full" />
|
|
309
|
+
</Field>
|
|
310
|
+
</div>
|
|
311
|
+
);
|
|
326
312
|
}
|
|
327
313
|
|
|
328
314
|
function InputGroupDemo() {
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
315
|
+
return (
|
|
316
|
+
<div className="grid w-full max-w-xs gap-6">
|
|
317
|
+
<InputGroup>
|
|
318
|
+
<InputGroupInput placeholder="Search..." />
|
|
319
|
+
<InputGroupAddon>
|
|
320
|
+
<SearchIcon className="size-4" />
|
|
321
|
+
</InputGroupAddon>
|
|
322
|
+
<InputGroupAddon align="inline-end">12 results</InputGroupAddon>
|
|
323
|
+
</InputGroup>
|
|
324
|
+
<InputGroup>
|
|
325
|
+
<InputGroupInput placeholder="example.com" className="!pl-1" />
|
|
326
|
+
<InputGroupAddon>
|
|
327
|
+
<InputGroupText>https://</InputGroupText>
|
|
328
|
+
</InputGroupAddon>
|
|
329
|
+
<InputGroupAddon align="inline-end">
|
|
330
|
+
<InputGroupButton className="rounded-full" size="sm" aria-label="Info">
|
|
331
|
+
<InfoIcon className="size-4" />
|
|
332
|
+
</InputGroupButton>
|
|
333
|
+
</InputGroupAddon>
|
|
334
|
+
</InputGroup>
|
|
335
|
+
<InputGroup>
|
|
336
|
+
<InputGroupTextarea placeholder="Ask, Search or Chat..." />
|
|
337
|
+
<InputGroupAddon align="block-end">
|
|
338
|
+
<InputGroupButton variant="outline" className="rounded-full" size="sm" aria-label="Add">
|
|
339
|
+
<PlusIcon className="size-4" />
|
|
340
|
+
</InputGroupButton>
|
|
341
|
+
<InputGroupText className="ml-auto">52% used</InputGroupText>
|
|
342
|
+
<InputGroupButton variant="default" className="rounded-full" size="sm">
|
|
343
|
+
<ArrowUpIcon className="size-4" />
|
|
344
|
+
<span className="sr-only">Send</span>
|
|
345
|
+
</InputGroupButton>
|
|
346
|
+
</InputGroupAddon>
|
|
347
|
+
</InputGroup>
|
|
348
|
+
</div>
|
|
349
|
+
);
|
|
364
350
|
}
|
|
365
351
|
|
|
366
352
|
function ItemDemo() {
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
353
|
+
return (
|
|
354
|
+
<div className="flex w-full max-w-xs flex-col gap-6">
|
|
355
|
+
<Item variant="outline">
|
|
356
|
+
<ItemContent>
|
|
357
|
+
<ItemTitle>Two-factor authentication</ItemTitle>
|
|
358
|
+
<ItemDescription>Verify via email or phone number.</ItemDescription>
|
|
359
|
+
</ItemContent>
|
|
360
|
+
<ItemActions>
|
|
361
|
+
<Button size="sm">Enable</Button>
|
|
362
|
+
</ItemActions>
|
|
363
|
+
</Item>
|
|
364
|
+
<Item variant="outline" size="sm" asChild>
|
|
365
|
+
<a href="/profile">
|
|
366
|
+
<ItemMedia>
|
|
367
|
+
<BadgeCheckIcon className="size-5" />
|
|
368
|
+
</ItemMedia>
|
|
369
|
+
<ItemContent>
|
|
370
|
+
<ItemTitle>Your profile has been verified.</ItemTitle>
|
|
371
|
+
</ItemContent>
|
|
372
|
+
<ItemActions>
|
|
373
|
+
<ChevronRightIcon className="size-4" />
|
|
374
|
+
</ItemActions>
|
|
375
|
+
</a>
|
|
376
|
+
</Item>
|
|
377
|
+
</div>
|
|
378
|
+
);
|
|
393
379
|
}
|
|
394
380
|
|
|
395
381
|
function AppearanceSettingsDemo() {
|
|
396
|
-
|
|
382
|
+
const [gpuCount, setGpuCount] = React.useState(8);
|
|
397
383
|
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
384
|
+
return (
|
|
385
|
+
<FieldSet>
|
|
386
|
+
<FieldGroup>
|
|
387
|
+
<FieldSet>
|
|
388
|
+
<FieldLegend>Compute Environment</FieldLegend>
|
|
389
|
+
<FieldDescription>Select the compute environment for your cluster.</FieldDescription>
|
|
390
|
+
<RadioGroup defaultValue="kubernetes">
|
|
391
|
+
<FieldLabel htmlFor="kubernetes">
|
|
392
|
+
<Field orientation="horizontal">
|
|
393
|
+
<FieldContent>
|
|
394
|
+
<FieldTitle>Kubernetes</FieldTitle>
|
|
395
|
+
<FieldDescription>
|
|
396
|
+
Run GPU workloads on a K8s configured cluster. This is the default.
|
|
397
|
+
</FieldDescription>
|
|
398
|
+
</FieldContent>
|
|
399
|
+
<RadioGroupItem value="kubernetes" id="kubernetes" aria-label="Kubernetes" />
|
|
400
|
+
</Field>
|
|
401
|
+
</FieldLabel>
|
|
402
|
+
<FieldLabel htmlFor="vm">
|
|
403
|
+
<Field orientation="horizontal">
|
|
404
|
+
<FieldContent>
|
|
405
|
+
<FieldTitle>Virtual Machine</FieldTitle>
|
|
406
|
+
<FieldDescription>Access a VM configured cluster to run workloads. (Coming soon)</FieldDescription>
|
|
407
|
+
</FieldContent>
|
|
408
|
+
<RadioGroupItem value="vm" id="vm" aria-label="Virtual Machine" />
|
|
409
|
+
</Field>
|
|
410
|
+
</FieldLabel>
|
|
411
|
+
</RadioGroup>
|
|
412
|
+
</FieldSet>
|
|
413
|
+
<FieldSeparator />
|
|
414
|
+
<Field orientation="horizontal">
|
|
415
|
+
<FieldContent>
|
|
416
|
+
<FieldLabel htmlFor="number-of-gpus">Number of GPUs</FieldLabel>
|
|
417
|
+
<FieldDescription>You can add more later.</FieldDescription>
|
|
418
|
+
</FieldContent>
|
|
419
|
+
<div className="flex items-center rounded-md border">
|
|
420
|
+
<Button
|
|
421
|
+
variant="ghost"
|
|
422
|
+
size="sm"
|
|
423
|
+
type="button"
|
|
424
|
+
aria-label="Decrement"
|
|
425
|
+
className="h-9 w-10 rounded-none border-r"
|
|
426
|
+
onClick={() => setGpuCount(Math.max(1, gpuCount - 1))}
|
|
427
|
+
>
|
|
428
|
+
-
|
|
429
|
+
</Button>
|
|
430
|
+
<span className="flex h-9 w-14 items-center justify-center font-mono text-sm">{gpuCount}</span>
|
|
431
|
+
<Button
|
|
432
|
+
variant="ghost"
|
|
433
|
+
size="sm"
|
|
434
|
+
type="button"
|
|
435
|
+
aria-label="Increment"
|
|
436
|
+
className="h-9 w-10 rounded-none border-l"
|
|
437
|
+
onClick={() => setGpuCount(Math.min(99, gpuCount + 1))}
|
|
438
|
+
>
|
|
439
|
+
+
|
|
440
|
+
</Button>
|
|
441
|
+
</div>
|
|
442
|
+
</Field>
|
|
443
|
+
<FieldSeparator />
|
|
444
|
+
<Field orientation="horizontal">
|
|
445
|
+
<FieldContent>
|
|
446
|
+
<FieldLabel htmlFor="tinting">Wallpaper Tinting</FieldLabel>
|
|
447
|
+
<FieldDescription>Allow the wallpaper to be tinted.</FieldDescription>
|
|
448
|
+
</FieldContent>
|
|
449
|
+
<Switch id="tinting" defaultChecked />
|
|
450
|
+
</Field>
|
|
451
|
+
</FieldGroup>
|
|
452
|
+
</FieldSet>
|
|
453
|
+
);
|
|
466
454
|
}
|
|
467
455
|
|
|
468
456
|
function SpinnerEmptyDemo() {
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
457
|
+
return (
|
|
458
|
+
<Empty className="w-full max-w-xs py-4">
|
|
459
|
+
<EmptyHeader>
|
|
460
|
+
<EmptyMedia variant="icon">
|
|
461
|
+
<Spinner />
|
|
462
|
+
</EmptyMedia>
|
|
463
|
+
<EmptyTitle>Processing your request</EmptyTitle>
|
|
464
|
+
<EmptyDescription>Please wait while we process your request. Do not refresh the page.</EmptyDescription>
|
|
465
|
+
</EmptyHeader>
|
|
466
|
+
<EmptyContent>
|
|
467
|
+
<Button variant="outline" size="sm">
|
|
468
|
+
Cancel
|
|
469
|
+
</Button>
|
|
470
|
+
</EmptyContent>
|
|
471
|
+
</Empty>
|
|
472
|
+
);
|
|
485
473
|
}
|
|
486
474
|
|
|
487
475
|
function FieldCheckboxDemo() {
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
476
|
+
return (
|
|
477
|
+
<FieldLabel htmlFor="checkbox-demo">
|
|
478
|
+
<Field orientation="horizontal">
|
|
479
|
+
<Checkbox id="checkbox-demo" defaultChecked />
|
|
480
|
+
<FieldLabel htmlFor="checkbox-demo" className="font-normal">
|
|
481
|
+
I agree to the terms and conditions
|
|
482
|
+
</FieldLabel>
|
|
483
|
+
</Field>
|
|
484
|
+
</FieldLabel>
|
|
485
|
+
);
|
|
498
486
|
}
|
|
499
487
|
|
|
500
488
|
function Tile({ children, className }: { children: React.ReactNode; className?: string }) {
|
|
501
|
-
|
|
502
|
-
<div className={`rounded-xl border bg-card p-6 ${className ?? ''}`}>
|
|
503
|
-
{children}
|
|
504
|
-
</div>
|
|
505
|
-
);
|
|
489
|
+
return <div className={`rounded-xl border bg-card p-6 ${className ?? ''}`}>{children}</div>;
|
|
506
490
|
}
|
|
507
491
|
|
|
508
492
|
function NotionPromptDemo() {
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
493
|
+
return (
|
|
494
|
+
<div className="w-full">
|
|
495
|
+
<InputGroup>
|
|
496
|
+
<InputGroupAddon>
|
|
497
|
+
<Button variant="outline" size="sm" className="h-6 gap-0.5 px-1.5 text-[10px]">
|
|
498
|
+
<PlusIcon className="size-2.5" />
|
|
499
|
+
Add context
|
|
500
|
+
</Button>
|
|
501
|
+
</InputGroupAddon>
|
|
502
|
+
<InputGroupInput placeholder="Ask, search, or make anything..." />
|
|
503
|
+
</InputGroup>
|
|
504
|
+
</div>
|
|
505
|
+
);
|
|
522
506
|
}
|
|
523
507
|
|
|
524
508
|
function SourceSelectorDemo() {
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
509
|
+
return (
|
|
510
|
+
<div className="flex items-center gap-2">
|
|
511
|
+
<Button variant="ghost" size="sm" className="h-8 gap-1.5">
|
|
512
|
+
<span className="size-4 rounded border" />
|
|
513
|
+
Auto
|
|
514
|
+
</Button>
|
|
515
|
+
<Button variant="ghost" size="sm" className="h-8 gap-1.5">
|
|
516
|
+
<span className="size-4 rounded-full border" />
|
|
517
|
+
All Sources
|
|
518
|
+
</Button>
|
|
519
|
+
<Button variant="default" size="sm" className="ml-auto size-8 rounded-full p-0">
|
|
520
|
+
<ArrowUpIcon className="size-4" />
|
|
521
|
+
</Button>
|
|
522
|
+
</div>
|
|
523
|
+
);
|
|
540
524
|
}
|
|
541
525
|
|
|
542
526
|
function UrlBookmarkDemo() {
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
527
|
+
return (
|
|
528
|
+
<InputGroup>
|
|
529
|
+
<InputGroupAddon>
|
|
530
|
+
<svg
|
|
531
|
+
className="size-4 text-muted-foreground"
|
|
532
|
+
viewBox="0 0 24 24"
|
|
533
|
+
fill="none"
|
|
534
|
+
stroke="currentColor"
|
|
535
|
+
strokeWidth="2"
|
|
536
|
+
aria-hidden="true"
|
|
537
|
+
>
|
|
538
|
+
<circle cx="12" cy="12" r="10" />
|
|
539
|
+
<path d="M2 12h20" />
|
|
540
|
+
<path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z" />
|
|
541
|
+
</svg>
|
|
542
|
+
</InputGroupAddon>
|
|
543
|
+
<InputGroupInput placeholder="https://" />
|
|
544
|
+
<InputGroupAddon align="inline-end">
|
|
545
|
+
<Button variant="ghost" size="sm" className="size-6 p-0">
|
|
546
|
+
<svg
|
|
547
|
+
className="size-4"
|
|
548
|
+
viewBox="0 0 24 24"
|
|
549
|
+
fill="none"
|
|
550
|
+
stroke="currentColor"
|
|
551
|
+
strokeWidth="2"
|
|
552
|
+
aria-hidden="true"
|
|
553
|
+
>
|
|
554
|
+
<polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2" />
|
|
555
|
+
</svg>
|
|
556
|
+
</Button>
|
|
557
|
+
</InputGroupAddon>
|
|
558
|
+
</InputGroup>
|
|
559
|
+
);
|
|
562
560
|
}
|
|
563
561
|
|
|
564
562
|
function PaginationDemo() {
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
563
|
+
return (
|
|
564
|
+
<div className="flex items-center gap-2">
|
|
565
|
+
<ButtonGroup>
|
|
566
|
+
<Button variant="outline" size="sm" className="size-8 p-0">
|
|
567
|
+
1
|
|
568
|
+
</Button>
|
|
569
|
+
<Button variant="outline" size="sm" className="size-8 p-0">
|
|
570
|
+
2
|
|
571
|
+
</Button>
|
|
572
|
+
<Button variant="outline" size="sm" className="size-8 p-0">
|
|
573
|
+
3
|
|
574
|
+
</Button>
|
|
575
|
+
</ButtonGroup>
|
|
576
|
+
<ButtonGroup>
|
|
577
|
+
<Button variant="outline" size="sm" className="size-8 p-0">
|
|
578
|
+
<ArrowLeftIcon className="size-4" />
|
|
579
|
+
</Button>
|
|
580
|
+
<Button variant="outline" size="sm" className="size-8 p-0">
|
|
581
|
+
<ChevronRightIcon className="size-4" />
|
|
582
|
+
</Button>
|
|
583
|
+
</ButtonGroup>
|
|
584
|
+
</div>
|
|
585
|
+
);
|
|
582
586
|
}
|
|
583
587
|
|
|
584
588
|
function CopilotDropdownDemo() {
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
589
|
+
return (
|
|
590
|
+
<DropdownMenu>
|
|
591
|
+
<DropdownMenuTrigger asChild>
|
|
592
|
+
<Button variant="outline" size="sm" className="gap-1.5">
|
|
593
|
+
<svg
|
|
594
|
+
className="size-4"
|
|
595
|
+
viewBox="0 0 24 24"
|
|
596
|
+
fill="none"
|
|
597
|
+
stroke="currentColor"
|
|
598
|
+
strokeWidth="2"
|
|
599
|
+
aria-hidden="true"
|
|
600
|
+
>
|
|
601
|
+
<rect x="3" y="3" width="18" height="18" rx="2" />
|
|
602
|
+
<path d="M3 9h18" />
|
|
603
|
+
</svg>
|
|
604
|
+
Copilot
|
|
605
|
+
</Button>
|
|
606
|
+
</DropdownMenuTrigger>
|
|
607
|
+
<DropdownMenuContent align="end">
|
|
608
|
+
<DropdownMenuItem>Option 1</DropdownMenuItem>
|
|
609
|
+
<DropdownMenuItem>Option 2</DropdownMenuItem>
|
|
610
|
+
</DropdownMenuContent>
|
|
611
|
+
</DropdownMenu>
|
|
612
|
+
);
|
|
602
613
|
}
|
|
603
614
|
|
|
604
615
|
function SurveyOptionsDemo() {
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
616
|
+
return (
|
|
617
|
+
<Field className="max-w-xs">
|
|
618
|
+
<FieldTitle>How did you hear about us?</FieldTitle>
|
|
619
|
+
<FieldDescription>Select the option that best describes how you...</FieldDescription>
|
|
620
|
+
<div className="mt-3 flex flex-wrap gap-2">
|
|
621
|
+
<div className="inline-flex cursor-pointer items-center gap-1.5 rounded-md border border-input bg-background px-3 py-1.5 text-sm font-medium shadow-xs hover:bg-accent hover:text-accent-foreground">
|
|
622
|
+
<Checkbox className="size-4" defaultChecked />
|
|
623
|
+
Social Media
|
|
624
|
+
</div>
|
|
625
|
+
<Button variant="outline" size="sm">
|
|
626
|
+
Search Engine
|
|
627
|
+
</Button>
|
|
628
|
+
<Button variant="outline" size="sm">
|
|
629
|
+
Referral
|
|
630
|
+
</Button>
|
|
631
|
+
<Button variant="outline" size="sm">
|
|
632
|
+
Other
|
|
633
|
+
</Button>
|
|
634
|
+
</div>
|
|
635
|
+
</Field>
|
|
636
|
+
);
|
|
620
637
|
}
|
|
621
638
|
|
|
622
639
|
function DesignSystemOverview() {
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
640
|
+
return (
|
|
641
|
+
<div className="mx-auto max-w-7xl p-6">
|
|
642
|
+
<header className="mb-10 text-center">
|
|
643
|
+
<h1 className="text-3xl font-bold tracking-tight">Design System</h1>
|
|
644
|
+
<p className="mt-2 text-muted-foreground">
|
|
645
|
+
Reusable components that power your UI — explore the sidebar to see each in detail
|
|
646
|
+
</p>
|
|
647
|
+
<p className="mt-2 text-s italic text-muted-foreground/70">Bring your own design system — coming soon!</p>
|
|
648
|
+
</header>
|
|
649
|
+
<div className="flex flex-col gap-4 sm:flex-row sm:items-start">
|
|
650
|
+
{/* Column 1 - Payment Method needs more space */}
|
|
651
|
+
<div className="flex flex-[1.3] flex-col gap-4">
|
|
652
|
+
<Tile>
|
|
653
|
+
<PaymentMethodDemo />
|
|
654
|
+
</Tile>
|
|
655
|
+
<Tile>
|
|
656
|
+
<SourceSelectorDemo />
|
|
657
|
+
</Tile>
|
|
658
|
+
<Tile>
|
|
659
|
+
<CopilotDropdownDemo />
|
|
660
|
+
</Tile>
|
|
661
|
+
</div>
|
|
643
662
|
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
663
|
+
{/* Column 2 */}
|
|
664
|
+
<div className="flex flex-1 flex-col gap-4">
|
|
665
|
+
<Tile>
|
|
666
|
+
<EmptyAvatarGroupDemo />
|
|
667
|
+
</Tile>
|
|
668
|
+
<Tile>
|
|
669
|
+
<InputGroupDemo />
|
|
670
|
+
</Tile>
|
|
671
|
+
<Tile>
|
|
672
|
+
<FieldSliderDemo />
|
|
673
|
+
</Tile>
|
|
674
|
+
</div>
|
|
656
675
|
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
676
|
+
{/* Column 3 */}
|
|
677
|
+
<div className="hidden flex-1 flex-col gap-4 lg:flex">
|
|
678
|
+
<Tile>
|
|
679
|
+
<UrlBookmarkDemo />
|
|
680
|
+
</Tile>
|
|
681
|
+
<Tile>
|
|
682
|
+
<ItemDemo />
|
|
683
|
+
</Tile>
|
|
684
|
+
<Tile>
|
|
685
|
+
<SpinnerBadgeDemo />
|
|
686
|
+
</Tile>
|
|
687
|
+
<Tile>
|
|
688
|
+
<AppearanceSettingsDemo />
|
|
689
|
+
</Tile>
|
|
690
|
+
</div>
|
|
672
691
|
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
692
|
+
{/* Column 4 */}
|
|
693
|
+
<div className="hidden flex-1 flex-col gap-4 2xl:flex">
|
|
694
|
+
<Tile>
|
|
695
|
+
<ButtonGroupDemo />
|
|
696
|
+
</Tile>
|
|
697
|
+
<Tile>
|
|
698
|
+
<FieldCheckboxDemo />
|
|
699
|
+
</Tile>
|
|
700
|
+
<Tile>
|
|
701
|
+
<NotionPromptDemo />
|
|
702
|
+
</Tile>
|
|
703
|
+
<Tile>
|
|
704
|
+
<PaginationDemo />
|
|
705
|
+
</Tile>
|
|
706
|
+
<Tile>
|
|
707
|
+
<SurveyOptionsDemo />
|
|
708
|
+
</Tile>
|
|
709
|
+
<Tile>
|
|
710
|
+
<SpinnerEmptyDemo />
|
|
711
|
+
</Tile>
|
|
712
|
+
</div>
|
|
713
|
+
</div>
|
|
695
714
|
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
715
|
+
{/* Overflow for column 3 on small/medium screens */}
|
|
716
|
+
<div className="mt-4 grid grid-cols-1 gap-4 sm:grid-cols-2 lg:hidden">
|
|
717
|
+
<Tile>
|
|
718
|
+
<UrlBookmarkDemo />
|
|
719
|
+
</Tile>
|
|
720
|
+
<Tile>
|
|
721
|
+
<ItemDemo />
|
|
722
|
+
</Tile>
|
|
723
|
+
<Tile>
|
|
724
|
+
<SpinnerBadgeDemo />
|
|
725
|
+
</Tile>
|
|
726
|
+
<Tile>
|
|
727
|
+
<AppearanceSettingsDemo />
|
|
728
|
+
</Tile>
|
|
729
|
+
</div>
|
|
711
730
|
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
731
|
+
{/* Overflow for column 4 on medium/large screens */}
|
|
732
|
+
<div className="mt-4 grid grid-cols-2 gap-4 lg:grid-cols-3 2xl:hidden">
|
|
733
|
+
<Tile>
|
|
734
|
+
<ButtonGroupDemo />
|
|
735
|
+
</Tile>
|
|
736
|
+
<Tile>
|
|
737
|
+
<FieldCheckboxDemo />
|
|
738
|
+
</Tile>
|
|
739
|
+
<Tile>
|
|
740
|
+
<NotionPromptDemo />
|
|
741
|
+
</Tile>
|
|
742
|
+
<Tile>
|
|
743
|
+
<PaginationDemo />
|
|
744
|
+
</Tile>
|
|
745
|
+
<Tile>
|
|
746
|
+
<SurveyOptionsDemo />
|
|
747
|
+
</Tile>
|
|
748
|
+
<Tile>
|
|
749
|
+
<SpinnerEmptyDemo />
|
|
750
|
+
</Tile>
|
|
751
|
+
</div>
|
|
752
|
+
</div>
|
|
753
|
+
);
|
|
735
754
|
}
|
|
736
755
|
|
|
737
756
|
const meta: Meta = {
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
757
|
+
title: 'Design System/Overview',
|
|
758
|
+
component: DesignSystemOverview,
|
|
759
|
+
tags: ['!autodocs', '!manifest'],
|
|
741
760
|
};
|
|
742
761
|
export default meta;
|
|
743
762
|
|
|
744
763
|
type Story = StoryObj;
|
|
745
764
|
|
|
746
765
|
export const Default: Story = {
|
|
747
|
-
|
|
766
|
+
render: () => <DesignSystemOverview />,
|
|
748
767
|
};
|