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