@alexgorbatchev/shadcn 0.0.49 → 0.0.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/{chunk-jhvy8jay.js → chunk-f43963xy.js} +361 -434
- package/dist/{chunk-880zr7gb.js → chunk-p894n7r6.js} +9 -22
- package/dist/{chunk-t6w8vcvf.js → chunk-rc99vk8d.js} +19 -1
- package/dist/chunk-xfryhw7e.js +225 -0
- package/dist/{chunk-trwye0d6.js → chunk-yrp7xtb5.js} +21 -1
- package/dist/{chunk-62ggz655.js → chunk-zs4h45d8.js} +8 -9
- package/dist/components/OptionSelect.d.ts +29 -0
- package/dist/components/PageIntro.d.ts +22 -0
- package/dist/components/assistant-ui/native/McpConfigDialog.js +2 -1
- package/dist/components/assistant-ui/native/index.js +2 -1
- package/dist/components/calendar/Calendar.d.ts +3 -2
- package/dist/components/calendar/index.js +2 -1
- package/dist/components/data-grid/index.js +2 -2
- package/dist/components/gantt/index.js +9 -19
- package/dist/components/json-render/index.js +9 -8
- package/dist/components/persian-calendar/index.js +5 -3
- package/dist/components/virtual-data-grid/index.js +2 -2
- package/dist/index.d.ts +4 -1
- package/dist/index.js +18 -20
- package/dist/prototype.js +1 -1
- package/llms/components/data-display/Table.md +1 -1
- package/llms/components/forms/OptionSelect.md +100 -0
- package/llms/components/layout/PageIntro.md +102 -0
- package/llms/components/navigation/ContextMenu.md +25 -25
- package/llms/setup.md +2 -2
- package/llms.txt +2 -1
- package/package.json +1 -1
- package/templates/prototype/src/components/Workbench.tsx +45 -35
- package/templates/prototype/src/prototypes/dashboard/components/Dashboard.tsx +8 -7
- package/dist/chunk-sp4g23m0.js +0 -60
- package/dist/components/NativeSelect.d.ts +0 -12
- package/llms/components/forms/NativeSelect.md +0 -136
package/dist/index.d.ts
CHANGED
|
@@ -67,7 +67,8 @@ export { Collapsible, CollapsibleTrigger, CollapsibleContent } from "./component
|
|
|
67
67
|
export { Spinner } from "./components/Spinner.js";
|
|
68
68
|
export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption, TableColumnGroup, TableColumn, } from "./components/Table.js";
|
|
69
69
|
export type { TableTextAlign, TableVisibility } from "./components/Table.js";
|
|
70
|
-
export {
|
|
70
|
+
export { OptionSelect } from "./components/OptionSelect.js";
|
|
71
|
+
export type { OptionSelectOption, OptionSelectProps } from "./components/OptionSelect.js";
|
|
71
72
|
export { Kbd, KbdGroup } from "./components/Kbd.js";
|
|
72
73
|
export { Item, ItemMedia, ItemContent, ItemActions, ItemGroup, ItemSeparator, ItemTitle, ItemDescription, ItemHeader, ItemFooter, } from "./components/Item.js";
|
|
73
74
|
export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, } from "./components/Pagination.js";
|
|
@@ -119,6 +120,8 @@ export { WeatherForecast } from "./components/WeatherForecast.js";
|
|
|
119
120
|
export type { WeatherForecastDay, WeatherForecastProps } from "./components/WeatherForecast.js";
|
|
120
121
|
export { PageHeader } from "./components/PageHeader.js";
|
|
121
122
|
export type { PageHeaderProps } from "./components/PageHeader.js";
|
|
123
|
+
export { PageIntro } from "./components/PageIntro.js";
|
|
124
|
+
export type { PageIntroHighlight, PageIntroProps } from "./components/PageIntro.js";
|
|
122
125
|
export { WorkspaceSwitcher } from "./components/WorkspaceSwitcher.js";
|
|
123
126
|
export type { WorkspaceSwitcherProps } from "./components/WorkspaceSwitcher.js";
|
|
124
127
|
export { AccountMenu } from "./components/AccountMenu.js";
|
package/dist/index.js
CHANGED
|
@@ -30,16 +30,6 @@ import {
|
|
|
30
30
|
AlertDialogDescription2,
|
|
31
31
|
AlertDialogAction2,
|
|
32
32
|
AlertDialogCancel2,
|
|
33
|
-
Select2,
|
|
34
|
-
SelectGroup2,
|
|
35
|
-
SelectValue2,
|
|
36
|
-
SelectTrigger2,
|
|
37
|
-
SelectContent2,
|
|
38
|
-
SelectLabel2,
|
|
39
|
-
SelectItem2,
|
|
40
|
-
SelectSeparator2,
|
|
41
|
-
SelectScrollUpButton2,
|
|
42
|
-
SelectScrollDownButton2,
|
|
43
33
|
DensityProvider2,
|
|
44
34
|
collectLayoutViolations2,
|
|
45
35
|
LayoutGuard2,
|
|
@@ -169,6 +159,7 @@ import {
|
|
|
169
159
|
WeatherSummary2,
|
|
170
160
|
WeatherForecast2,
|
|
171
161
|
PageHeader2,
|
|
162
|
+
PageIntro2,
|
|
172
163
|
WorkspaceSwitcher2,
|
|
173
164
|
AccountMenu2,
|
|
174
165
|
StatCard2,
|
|
@@ -180,7 +171,7 @@ import {
|
|
|
180
171
|
StatusTracker2,
|
|
181
172
|
DashboardLayout2,
|
|
182
173
|
BillingUsage2
|
|
183
|
-
} from "./chunk-
|
|
174
|
+
} from "./chunk-f43963xy.js";
|
|
184
175
|
import {
|
|
185
176
|
Tabs2,
|
|
186
177
|
tabsListVariants2,
|
|
@@ -195,7 +186,7 @@ import {
|
|
|
195
186
|
useDropTarget2,
|
|
196
187
|
DropTarget2,
|
|
197
188
|
Kanban2
|
|
198
|
-
} from "./chunk-
|
|
189
|
+
} from "./chunk-zs4h45d8.js";
|
|
199
190
|
import {
|
|
200
191
|
Toolbar2,
|
|
201
192
|
ToolbarButton2,
|
|
@@ -229,11 +220,6 @@ import {
|
|
|
229
220
|
NumberFieldScrubArea2,
|
|
230
221
|
NumberFieldScrubAreaCursor2
|
|
231
222
|
} from "./chunk-31wptjv4.js";
|
|
232
|
-
import {
|
|
233
|
-
NativeSelect2,
|
|
234
|
-
NativeSelectOption2,
|
|
235
|
-
NativeSelectOptGroup2
|
|
236
|
-
} from "./chunk-sp4g23m0.js";
|
|
237
223
|
import {
|
|
238
224
|
Slider2
|
|
239
225
|
} from "./chunk-7cq1s2ey.js";
|
|
@@ -408,6 +394,19 @@ import {
|
|
|
408
394
|
PopoverTitle2,
|
|
409
395
|
PopoverDescription2
|
|
410
396
|
} from "./chunk-bf8kbj33.js";
|
|
397
|
+
import {
|
|
398
|
+
Select2,
|
|
399
|
+
SelectGroup2,
|
|
400
|
+
SelectValue2,
|
|
401
|
+
SelectTrigger2,
|
|
402
|
+
SelectContent2,
|
|
403
|
+
SelectLabel2,
|
|
404
|
+
SelectItem2,
|
|
405
|
+
SelectSeparator2,
|
|
406
|
+
SelectScrollUpButton2,
|
|
407
|
+
SelectScrollDownButton2,
|
|
408
|
+
OptionSelect2
|
|
409
|
+
} from "./chunk-xfryhw7e.js";
|
|
411
410
|
import {
|
|
412
411
|
Dialog2,
|
|
413
412
|
DialogTrigger2,
|
|
@@ -707,9 +706,6 @@ export {
|
|
|
707
706
|
MeterLabel2 as MeterLabel,
|
|
708
707
|
MeterTrack2 as MeterTrack,
|
|
709
708
|
MeterValue2 as MeterValue,
|
|
710
|
-
NativeSelect2 as NativeSelect,
|
|
711
|
-
NativeSelectOptGroup2 as NativeSelectOptGroup,
|
|
712
|
-
NativeSelectOption2 as NativeSelectOption,
|
|
713
709
|
NavigationMenu2 as NavigationMenu,
|
|
714
710
|
NavigationMenuContent2 as NavigationMenuContent,
|
|
715
711
|
NavigationMenuIndicator2 as NavigationMenuIndicator,
|
|
@@ -725,7 +721,9 @@ export {
|
|
|
725
721
|
NumberFieldInput2 as NumberFieldInput,
|
|
726
722
|
NumberFieldScrubArea2 as NumberFieldScrubArea,
|
|
727
723
|
NumberFieldScrubAreaCursor2 as NumberFieldScrubAreaCursor,
|
|
724
|
+
OptionSelect2 as OptionSelect,
|
|
728
725
|
PageHeader2 as PageHeader,
|
|
726
|
+
PageIntro2 as PageIntro,
|
|
729
727
|
PageMessage2 as PageMessage,
|
|
730
728
|
Pagination2 as Pagination,
|
|
731
729
|
PaginationContent2 as PaginationContent,
|
package/dist/prototype.js
CHANGED
|
@@ -2051,7 +2051,7 @@ var program = new Command;
|
|
|
2051
2051
|
// package.json
|
|
2052
2052
|
var package_default = {
|
|
2053
2053
|
name: "@alexgorbatchev/shadcn",
|
|
2054
|
-
version: "0.0.
|
|
2054
|
+
version: "0.0.50",
|
|
2055
2055
|
description: "Sharp, monospace React components with compact and comfortable densities.",
|
|
2056
2056
|
license: "MIT",
|
|
2057
2057
|
repository: {
|
|
@@ -8,7 +8,7 @@ Source: src/components/stories/data-display/Table.stories.tsx
|
|
|
8
8
|
## Public imports
|
|
9
9
|
|
|
10
10
|
```tsx
|
|
11
|
-
import { Dialog, DialogContent, DialogTitle, DialogDescription, DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuItem, Table, TableBody, TableCaption, TableCell, TableColumn, TableColumnGroup, TableFooter, TableHead, TableHeader, TableRow, Button, DirectionProvider, Checkbox, Input, Field, FieldGroup, FieldLabel,
|
|
11
|
+
import { Dialog, DialogContent, DialogTitle, DialogDescription, DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuItem, Table, TableBody, TableCaption, TableCell, TableColumn, TableColumnGroup, TableFooter, TableHead, TableHeader, TableRow, Button, DirectionProvider, Checkbox, Input, Field, FieldGroup, FieldLabel, OptionSelect } from "@alexgorbatchev/shadcn";
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
## Supporting imports
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# OptionSelect
|
|
2
|
+
|
|
3
|
+
Story: @alexgorbatchev/shadcn/components/forms/OptionSelect
|
|
4
|
+
Source: src/components/stories/forms/OptionSelect.stories.tsx
|
|
5
|
+
|
|
6
|
+
[Full source and local helpers](https://github.com/alexgorbatchev/shadcn/blob/main/src/components/stories/forms/OptionSelect.stories.tsx)
|
|
7
|
+
|
|
8
|
+
## Public imports
|
|
9
|
+
|
|
10
|
+
```tsx
|
|
11
|
+
import { Button, OptionSelect } from "@alexgorbatchev/shadcn";
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Supporting imports
|
|
15
|
+
|
|
16
|
+
```tsx
|
|
17
|
+
import { useState } from "react";
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Default component
|
|
21
|
+
|
|
22
|
+
```tsx
|
|
23
|
+
OptionSelect
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Default args
|
|
27
|
+
|
|
28
|
+
```tsx
|
|
29
|
+
{ options, defaultValue: "bun", "aria-label": "Runtime", onValueChange }
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Examples
|
|
33
|
+
|
|
34
|
+
Storybook CSF excerpts. Default args and render apply unless overridden. Local helpers, fixtures, decorators, and providers may be required; these are reference excerpts, not standalone consumer modules. Interaction tests are omitted.
|
|
35
|
+
|
|
36
|
+
### Default
|
|
37
|
+
|
|
38
|
+
```tsx
|
|
39
|
+
{}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### EmptyStringIsAnOption
|
|
43
|
+
|
|
44
|
+
```tsx
|
|
45
|
+
{
|
|
46
|
+
args: { defaultValue: "" }
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Placeholder
|
|
51
|
+
|
|
52
|
+
```tsx
|
|
53
|
+
{
|
|
54
|
+
args: { defaultValue: undefined, options: options.slice(1), placeholder: "Pick a runtime" }
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Disabled
|
|
59
|
+
|
|
60
|
+
```tsx
|
|
61
|
+
{
|
|
62
|
+
args: { disabled: true }
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Controlled
|
|
67
|
+
|
|
68
|
+
```tsx
|
|
69
|
+
{
|
|
70
|
+
render: () => <ControlledExample />
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### SubmitsWithAForm
|
|
75
|
+
|
|
76
|
+
```tsx
|
|
77
|
+
{
|
|
78
|
+
render: (args) => (<form onSubmit={(event) => {
|
|
79
|
+
event.preventDefault();
|
|
80
|
+
onSubmit(new FormData(event.currentTarget).get("runtime"));
|
|
81
|
+
}}>
|
|
82
|
+
<OptionSelect {...args} name="runtime"/>
|
|
83
|
+
<Button type="submit">Save</Button>
|
|
84
|
+
</form>),
|
|
85
|
+
args: { defaultValue: "" }
|
|
86
|
+
}
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### FullWidth
|
|
90
|
+
|
|
91
|
+
```tsx
|
|
92
|
+
{
|
|
93
|
+
args: { width: "full" },
|
|
94
|
+
decorators: [
|
|
95
|
+
(Story) => (<div className="w-96">
|
|
96
|
+
<Story />
|
|
97
|
+
</div>),
|
|
98
|
+
]
|
|
99
|
+
}
|
|
100
|
+
```
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# PageIntro
|
|
2
|
+
|
|
3
|
+
Story: @alexgorbatchev/shadcn/components/layout/PageIntro
|
|
4
|
+
Source: src/components/stories/layout/PageIntro.stories.tsx
|
|
5
|
+
|
|
6
|
+
[Full source and local helpers](https://github.com/alexgorbatchev/shadcn/blob/main/src/components/stories/layout/PageIntro.stories.tsx)
|
|
7
|
+
|
|
8
|
+
## Public imports
|
|
9
|
+
|
|
10
|
+
```tsx
|
|
11
|
+
import { PageIntro, Button } from "@alexgorbatchev/shadcn";
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Supporting imports
|
|
15
|
+
|
|
16
|
+
```tsx
|
|
17
|
+
import { BookmarkIcon, CalendarIcon, HeartIcon, SparklesIcon } from "lucide-react";
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Default component
|
|
21
|
+
|
|
22
|
+
```tsx
|
|
23
|
+
PageIntro
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Default args
|
|
27
|
+
|
|
28
|
+
```tsx
|
|
29
|
+
{
|
|
30
|
+
icon: <BookmarkIcon />,
|
|
31
|
+
title: "Projects",
|
|
32
|
+
description: "Everything your team is working on, in one place you will actually want to open.",
|
|
33
|
+
actions: <Button onClick={action}>New project</Button>,
|
|
34
|
+
highlights,
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Examples
|
|
39
|
+
|
|
40
|
+
Storybook CSF excerpts. Default args and render apply unless overridden. Local helpers, fixtures, decorators, and providers may be required; these are reference excerpts, not standalone consumer modules. Interaction tests are omitted.
|
|
41
|
+
|
|
42
|
+
### Default
|
|
43
|
+
|
|
44
|
+
```tsx
|
|
45
|
+
{}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### WithoutHighlights
|
|
49
|
+
|
|
50
|
+
```tsx
|
|
51
|
+
{
|
|
52
|
+
args: { highlights: undefined }
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### EmptyHighlights
|
|
57
|
+
|
|
58
|
+
```tsx
|
|
59
|
+
{
|
|
60
|
+
args: { highlights: [] }
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### WithEyebrow
|
|
65
|
+
|
|
66
|
+
```tsx
|
|
67
|
+
{
|
|
68
|
+
args: { eyebrow: "WEEKEND CREW", actions: undefined }
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### TextOnly
|
|
73
|
+
|
|
74
|
+
```tsx
|
|
75
|
+
{
|
|
76
|
+
args: { icon: undefined, actions: undefined, highlights: undefined }
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### Narrow
|
|
81
|
+
|
|
82
|
+
```tsx
|
|
83
|
+
{
|
|
84
|
+
decorators: [
|
|
85
|
+
(Story) => (<div className="w-80 max-w-full">
|
|
86
|
+
<Story />
|
|
87
|
+
</div>),
|
|
88
|
+
]
|
|
89
|
+
}
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### Wide
|
|
93
|
+
|
|
94
|
+
```tsx
|
|
95
|
+
{
|
|
96
|
+
decorators: [
|
|
97
|
+
(Story) => (<div className="w-5xl max-w-full">
|
|
98
|
+
<Story />
|
|
99
|
+
</div>),
|
|
100
|
+
]
|
|
101
|
+
}
|
|
102
|
+
```
|
|
@@ -8,7 +8,7 @@ Source: src/components/stories/navigation/ContextMenu.stories.tsx
|
|
|
8
8
|
## Public imports
|
|
9
9
|
|
|
10
10
|
```tsx
|
|
11
|
-
import { Button, DirectionProvider, Toggle,
|
|
11
|
+
import { Button, DirectionProvider, Toggle, OptionSelect, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger } from "@alexgorbatchev/shadcn";
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
## Supporting imports
|
|
@@ -44,10 +44,10 @@ Storybook CSF excerpts. Default args and render apply unless overridden. Local h
|
|
|
44
44
|
<Toggle aria-label="Show details" pressed={checked} onPressedChange={setChecked}>
|
|
45
45
|
Show details
|
|
46
46
|
</Toggle>
|
|
47
|
-
<
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
47
|
+
<OptionSelect aria-label="Sort projects" value={sort} onValueChange={setSort} options={[
|
|
48
|
+
{ value: "name", label: "Sort by name" },
|
|
49
|
+
{ value: "date", label: "Sort by date" },
|
|
50
|
+
]}/>
|
|
51
51
|
<ContextMenu {...args}>
|
|
52
52
|
<ContextMenuTrigger className="border border-border p-panel">Right click the project</ContextMenuTrigger>
|
|
53
53
|
<ContextMenuContent aria-label="Project actions">
|
|
@@ -99,10 +99,10 @@ Storybook CSF excerpts. Default args and render apply unless overridden. Local h
|
|
|
99
99
|
<Toggle aria-label="Show details" pressed={checked} onPressedChange={setChecked}>
|
|
100
100
|
Show details
|
|
101
101
|
</Toggle>
|
|
102
|
-
<
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
102
|
+
<OptionSelect aria-label="Sort projects" value={sort} onValueChange={setSort} options={[
|
|
103
|
+
{ value: "name", label: "Sort by name" },
|
|
104
|
+
{ value: "date", label: "Sort by date" },
|
|
105
|
+
]}/>
|
|
106
106
|
<ContextMenu {...args}>
|
|
107
107
|
<ContextMenuTrigger className="border border-border p-panel">Right click the project</ContextMenuTrigger>
|
|
108
108
|
<ContextMenuContent aria-label="Project actions">
|
|
@@ -155,10 +155,10 @@ Storybook CSF excerpts. Default args and render apply unless overridden. Local h
|
|
|
155
155
|
<Toggle aria-label="Show details" pressed={checked} onPressedChange={setChecked}>
|
|
156
156
|
Show details
|
|
157
157
|
</Toggle>
|
|
158
|
-
<
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
158
|
+
<OptionSelect aria-label="Sort projects" value={sort} onValueChange={setSort} options={[
|
|
159
|
+
{ value: "name", label: "Sort by name" },
|
|
160
|
+
{ value: "date", label: "Sort by date" },
|
|
161
|
+
]}/>
|
|
162
162
|
<ContextMenu {...args}>
|
|
163
163
|
<ContextMenuTrigger className="border border-border p-panel">Right click the project</ContextMenuTrigger>
|
|
164
164
|
<ContextMenuContent aria-label="Project actions">
|
|
@@ -220,10 +220,10 @@ Storybook CSF excerpts. Default args and render apply unless overridden. Local h
|
|
|
220
220
|
<Toggle aria-label="Show details" pressed={checked} onPressedChange={setChecked}>
|
|
221
221
|
Show details
|
|
222
222
|
</Toggle>
|
|
223
|
-
<
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
223
|
+
<OptionSelect aria-label="Sort projects" value={sort} onValueChange={setSort} options={[
|
|
224
|
+
{ value: "name", label: "Sort by name" },
|
|
225
|
+
{ value: "date", label: "Sort by date" },
|
|
226
|
+
]}/>
|
|
227
227
|
<ContextMenu>
|
|
228
228
|
<ContextMenuTrigger className={args.triggerClassName}>Right click for callbacks</ContextMenuTrigger>
|
|
229
229
|
<ContextMenuContent aria-label="Callback actions" className={args.contentClassName}>
|
|
@@ -276,10 +276,10 @@ Storybook CSF excerpts. Default args and render apply unless overridden. Local h
|
|
|
276
276
|
<Toggle aria-label="Show details" pressed={checked} onPressedChange={setChecked}>
|
|
277
277
|
Show details
|
|
278
278
|
</Toggle>
|
|
279
|
-
<
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
279
|
+
<OptionSelect aria-label="Sort projects" value={sort} onValueChange={setSort} options={[
|
|
280
|
+
{ value: "name", label: "Sort by name" },
|
|
281
|
+
{ value: "date", label: "Sort by date" },
|
|
282
|
+
]}/>
|
|
283
283
|
<ContextMenu {...args}>
|
|
284
284
|
<ContextMenuTrigger className="border border-border p-panel">Right click the project</ContextMenuTrigger>
|
|
285
285
|
<ContextMenuContent aria-label="Project actions">
|
|
@@ -339,10 +339,10 @@ Storybook CSF excerpts. Default args and render apply unless overridden. Local h
|
|
|
339
339
|
<Toggle aria-label="Show details" pressed={checked} onPressedChange={setChecked}>
|
|
340
340
|
Show details
|
|
341
341
|
</Toggle>
|
|
342
|
-
<
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
342
|
+
<OptionSelect aria-label="Sort projects" value={sort} onValueChange={setSort} options={[
|
|
343
|
+
{ value: "name", label: "Sort by name" },
|
|
344
|
+
{ value: "date", label: "Sort by date" },
|
|
345
|
+
]}/>
|
|
346
346
|
<ContextMenu {...args}>
|
|
347
347
|
<ContextMenuTrigger className="border border-border p-panel">Right click the project</ContextMenuTrigger>
|
|
348
348
|
<ContextMenuContent aria-label="Project actions">
|
package/llms/setup.md
CHANGED
|
@@ -261,9 +261,9 @@ The npm package includes the same index at `llms.txt` in its root and its linked
|
|
|
261
261
|
| Area | Components |
|
|
262
262
|
| :----------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
263
263
|
| Actions and status | Alert, Badge, Button, ButtonGroup, ButtonLink, Sonner, Toast, Toggle, ToggleGroup |
|
|
264
|
-
| Forms and selections | AuthForm, Calendar, Checkbox, Combobox, Command, EmailCodeAuthForm, Field, Input, InputGroup, InputOTP, Label,
|
|
264
|
+
| Forms and selections | AuthForm, Calendar, Checkbox, Combobox, Command, EmailCodeAuthForm, Field, Input, InputGroup, InputOTP, Label, OptionSelect, Questionnaire, RadioGroup, Select, Slider, Switch, Textarea |
|
|
265
265
|
| Structure and navigation | Accordion, AspectRatio, Avatar, Breadcrumb, Card, Carousel, Chart, Collapsible, Empty, Item, Kbd, Menubar, NavigationMenu, Pagination, Resizable, ScrollArea, Separator, Sidebar, Table, Tabs |
|
|
266
|
-
| Layout and typography | AppShell, Container, Grid, GridItem, Heading, PageHeader, Stack, Text
|
|
266
|
+
| Layout and typography | AppShell, Container, Grid, GridItem, Heading, PageHeader, PageIntro, Stack, Text |
|
|
267
267
|
| Data display | WeatherForecast, WeatherSummary |
|
|
268
268
|
| Overlays | AlertDialog, ContextMenu, Dialog, Drawer, DropdownMenu, HoverCard, Popover, Sheet, Tooltip |
|
|
269
269
|
| Loading | Progress, Skeleton, Spinner |
|
package/llms.txt
CHANGED
|
@@ -396,8 +396,8 @@ Generated from the public package exports and Storybook sources.
|
|
|
396
396
|
- [InputGroup](./llms/components/forms/InputGroup.md)
|
|
397
397
|
- [InputOTP](./llms/components/forms/InputOTP.md)
|
|
398
398
|
- [Label](./llms/components/forms/Label.md)
|
|
399
|
-
- [NativeSelect](./llms/components/forms/NativeSelect.md)
|
|
400
399
|
- [NumberField](./llms/components/forms/NumberField.md)
|
|
400
|
+
- [OptionSelect](./llms/components/forms/OptionSelect.md)
|
|
401
401
|
- [Questionnaire](./llms/components/forms/Questionnaire.md)
|
|
402
402
|
- [RadioGroup](./llms/components/forms/RadioGroup.md)
|
|
403
403
|
- [RichTextEditor](./llms/components/forms/RichTextEditor.md)
|
|
@@ -422,6 +422,7 @@ Generated from the public package exports and Storybook sources.
|
|
|
422
422
|
- [DashboardLayout](./llms/components/layout/DashboardLayout.md)
|
|
423
423
|
- [Grid](./llms/components/layout/Grid.md): Grid lays out equal columns without consumer classes. `columns` is 1–6 or 12, or a viewport breakpoint map such as `{ base: 1, md: 2, xl: 4 }`. `minColumnWidth` (xs 8rem, sm 12rem, md 16rem, lg 22rem) instead fits as many columns as the grid's own width allows, which suits card grids inside panes of any size. `gap` defaults to the density-aware `panel` token. GridItem `span` (1–6 or `full`, optionally per breakpoint) widens a cell; `full` always spans every column. Both accept `render` for semantic elements such as `<ul />` and `<li />`.
|
|
424
424
|
- [PageHeader](./llms/components/layout/PageHeader.md)
|
|
425
|
+
- [PageIntro](./llms/components/layout/PageIntro.md)
|
|
425
426
|
- [Resizable](./llms/components/layout/Resizable.md)
|
|
426
427
|
- [ScrollArea](./llms/components/layout/ScrollArea.md)
|
|
427
428
|
- [Separator](./llms/components/layout/Separator.md)
|
package/package.json
CHANGED
|
@@ -5,8 +5,7 @@ import {
|
|
|
5
5
|
Field,
|
|
6
6
|
FieldGroup,
|
|
7
7
|
FieldLabel,
|
|
8
|
-
|
|
9
|
-
NativeSelectOption,
|
|
8
|
+
OptionSelect,
|
|
10
9
|
ThemeProvider,
|
|
11
10
|
} from "@alexgorbatchev/shadcn";
|
|
12
11
|
import type { PrototypeDefinition, Scenario } from "../types";
|
|
@@ -50,60 +49,71 @@ export function Workbench(): ReactElement {
|
|
|
50
49
|
<div className="grid grid-cols-2 items-end gap-4 md:grid-cols-4 xl:grid-cols-7">
|
|
51
50
|
<Field>
|
|
52
51
|
<FieldLabel htmlFor="prototype">Prototype</FieldLabel>
|
|
53
|
-
<
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
))}
|
|
59
|
-
|
|
52
|
+
<OptionSelect
|
|
53
|
+
id="prototype"
|
|
54
|
+
width="full"
|
|
55
|
+
value={selected}
|
|
56
|
+
onValueChange={setSelected}
|
|
57
|
+
options={prototypes.map((prototype) => ({ value: prototype.id, label: prototype.title }))}
|
|
58
|
+
/>
|
|
60
59
|
</Field>
|
|
61
60
|
<Field>
|
|
62
61
|
<FieldLabel htmlFor="scenario">Scenario</FieldLabel>
|
|
63
|
-
<
|
|
62
|
+
<OptionSelect
|
|
64
63
|
id="scenario"
|
|
64
|
+
width="full"
|
|
65
65
|
value={scenario}
|
|
66
|
-
|
|
67
|
-
const value = event.target.value;
|
|
66
|
+
onValueChange={(value) => {
|
|
68
67
|
if (value === "populated" || value === "empty" || value === "loading" || value === "error")
|
|
69
68
|
setScenario(value);
|
|
70
69
|
}}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
70
|
+
options={[
|
|
71
|
+
{ value: "populated", label: "Populated" },
|
|
72
|
+
{ value: "empty", label: "Empty" },
|
|
73
|
+
{ value: "loading", label: "Loading" },
|
|
74
|
+
{ value: "error", label: "Error" },
|
|
75
|
+
]}
|
|
76
|
+
/>
|
|
77
77
|
</Field>
|
|
78
78
|
<Field>
|
|
79
79
|
<FieldLabel htmlFor="theme">Theme</FieldLabel>
|
|
80
|
-
<
|
|
80
|
+
<OptionSelect
|
|
81
81
|
id="theme"
|
|
82
|
+
width="full"
|
|
82
83
|
value={theme}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
84
|
+
onValueChange={(value) => setTheme(value === "light" ? "light" : "dark")}
|
|
85
|
+
options={[
|
|
86
|
+
{ value: "dark", label: "Dark" },
|
|
87
|
+
{ value: "light", label: "Light" },
|
|
88
|
+
]}
|
|
89
|
+
/>
|
|
88
90
|
</Field>
|
|
89
91
|
<Field>
|
|
90
92
|
<FieldLabel htmlFor="density">Density</FieldLabel>
|
|
91
|
-
<
|
|
93
|
+
<OptionSelect
|
|
92
94
|
id="density"
|
|
95
|
+
width="full"
|
|
93
96
|
value={density}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
97
|
+
onValueChange={(value) => setDensity(value === "compact" ? "compact" : "comfortable")}
|
|
98
|
+
options={[
|
|
99
|
+
{ value: "comfortable", label: "Comfortable" },
|
|
100
|
+
{ value: "compact", label: "Compact" },
|
|
101
|
+
]}
|
|
102
|
+
/>
|
|
99
103
|
</Field>
|
|
100
104
|
<Field>
|
|
101
105
|
<FieldLabel htmlFor="viewport">Viewport</FieldLabel>
|
|
102
|
-
<
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
106
|
+
<OptionSelect
|
|
107
|
+
id="viewport"
|
|
108
|
+
width="full"
|
|
109
|
+
value={viewport}
|
|
110
|
+
onValueChange={setViewport}
|
|
111
|
+
options={[
|
|
112
|
+
{ value: "responsive", label: "Responsive" },
|
|
113
|
+
{ value: "390", label: "Mobile · 390px" },
|
|
114
|
+
{ value: "1280", label: "Desktop · 1280px" },
|
|
115
|
+
]}
|
|
116
|
+
/>
|
|
107
117
|
</Field>
|
|
108
118
|
<Button onClick={() => setRevision((value) => value + 1)}>Reset data</Button>
|
|
109
119
|
<a className="text-sm underline" href={`?${canvasParameters}`} target="_blank" rel="noreferrer">
|
|
@@ -11,8 +11,7 @@ import {
|
|
|
11
11
|
FieldGroup,
|
|
12
12
|
FieldLabel,
|
|
13
13
|
Grid,
|
|
14
|
-
|
|
15
|
-
NativeSelectOption,
|
|
14
|
+
OptionSelect,
|
|
16
15
|
PageHeader,
|
|
17
16
|
StatCard,
|
|
18
17
|
Table,
|
|
@@ -36,11 +35,13 @@ export function Dashboard({ scenario }: PrototypeProps): ReactElement {
|
|
|
36
35
|
<FieldGroup>
|
|
37
36
|
<Field>
|
|
38
37
|
<FieldLabel htmlFor="team">Team</FieldLabel>
|
|
39
|
-
<
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
38
|
+
<OptionSelect
|
|
39
|
+
id="team"
|
|
40
|
+
width="full"
|
|
41
|
+
value={team}
|
|
42
|
+
onValueChange={setTeam}
|
|
43
|
+
options={["All teams", "Product", "Engineering"].map((value) => ({ value, label: value }))}
|
|
44
|
+
/>
|
|
44
45
|
</Field>
|
|
45
46
|
</FieldGroup>
|
|
46
47
|
<Grid columns={{ base: 1, sm: 2 }} gap="panel">
|