@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,58 +1,58 @@
|
|
|
1
|
-
import { useState } from 'react';
|
|
2
1
|
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
3
|
-
import {
|
|
2
|
+
import { useState } from 'react';
|
|
4
3
|
import { Button } from '@/components/ui/Button';
|
|
4
|
+
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '@/components/ui/Collapsible';
|
|
5
5
|
|
|
6
6
|
const meta: Meta<typeof Collapsible> = {
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
title: 'UI Components/Collapsible',
|
|
8
|
+
component: Collapsible,
|
|
9
9
|
};
|
|
10
10
|
export default meta;
|
|
11
11
|
type Story = StoryObj<typeof Collapsible>;
|
|
12
12
|
|
|
13
13
|
function CollapsibleDemo() {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
14
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
15
|
+
return (
|
|
16
|
+
<Collapsible open={isOpen} onOpenChange={setIsOpen} className="w-[350px] space-y-2">
|
|
17
|
+
<div className="flex items-center justify-between space-x-4 px-4">
|
|
18
|
+
<h4 className="text-sm font-semibold">3 items tagged</h4>
|
|
19
|
+
<CollapsibleTrigger asChild>
|
|
20
|
+
<Button variant="ghost" size="sm">
|
|
21
|
+
{isOpen ? 'Hide' : 'Show'}
|
|
22
|
+
</Button>
|
|
23
|
+
</CollapsibleTrigger>
|
|
24
|
+
</div>
|
|
25
|
+
<div className="rounded-md border px-4 py-2 font-mono text-sm shadow-sm">@radix-ui/primitives</div>
|
|
26
|
+
<CollapsibleContent className="space-y-2">
|
|
27
|
+
<div className="rounded-md border px-4 py-2 font-mono text-sm shadow-sm">@radix-ui/colors</div>
|
|
28
|
+
<div className="rounded-md border px-4 py-2 font-mono text-sm shadow-sm">@stitches/react</div>
|
|
29
|
+
</CollapsibleContent>
|
|
30
|
+
</Collapsible>
|
|
31
|
+
);
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
/** Shows a controlled collapsible section that starts closed and can be toggled with a button. */
|
|
35
35
|
export const Default: Story = {
|
|
36
|
-
|
|
36
|
+
render: () => <CollapsibleDemo />,
|
|
37
37
|
};
|
|
38
38
|
|
|
39
39
|
/** Shows a collapsible section that starts in the open state using `defaultOpen`. */
|
|
40
40
|
export const DefaultOpen: Story = {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
41
|
+
render: () => (
|
|
42
|
+
<Collapsible defaultOpen className="w-[350px] space-y-2">
|
|
43
|
+
<div className="flex items-center justify-between space-x-4 px-4">
|
|
44
|
+
<h4 className="text-sm font-semibold">Additional details</h4>
|
|
45
|
+
<CollapsibleTrigger asChild>
|
|
46
|
+
<Button variant="ghost" size="sm">
|
|
47
|
+
Toggle
|
|
48
|
+
</Button>
|
|
49
|
+
</CollapsibleTrigger>
|
|
50
|
+
</div>
|
|
51
|
+
<CollapsibleContent className="space-y-2">
|
|
52
|
+
<div className="rounded-md border px-4 py-2 text-sm shadow-sm">
|
|
53
|
+
This section is open by default and can be collapsed.
|
|
54
|
+
</div>
|
|
55
|
+
</CollapsibleContent>
|
|
56
|
+
</Collapsible>
|
|
57
|
+
),
|
|
58
58
|
};
|
|
@@ -2,17 +2,17 @@ import { Collapsible as CollapsiblePrimitive } from 'radix-ui';
|
|
|
2
2
|
|
|
3
3
|
/** A disclosure widget that toggles content visibility. Compose with CollapsibleTrigger and CollapsibleContent. */
|
|
4
4
|
function Collapsible({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.Root>) {
|
|
5
|
-
|
|
5
|
+
return <CollapsiblePrimitive.Root data-slot="collapsible" {...props} />;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
/** The interactive element that toggles the CollapsibleContent open or closed. */
|
|
9
9
|
function CollapsibleTrigger({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>) {
|
|
10
|
-
|
|
10
|
+
return <CollapsiblePrimitive.CollapsibleTrigger data-slot="collapsible-trigger" {...props} />;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
/** The content region that is shown or hidden when the Collapsible is toggled. */
|
|
14
14
|
function CollapsibleContent({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>) {
|
|
15
|
-
|
|
15
|
+
return <CollapsiblePrimitive.CollapsibleContent data-slot="collapsible-content" {...props} />;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
export { Collapsible, CollapsibleTrigger, CollapsibleContent };
|
|
@@ -1,75 +1,75 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import * as React from 'react';
|
|
3
3
|
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
Combobox,
|
|
5
|
+
ComboboxContent,
|
|
6
|
+
ComboboxEmpty,
|
|
7
|
+
ComboboxInput,
|
|
8
|
+
ComboboxItem,
|
|
9
|
+
ComboboxList,
|
|
10
10
|
} from '@/components/ui/Combobox';
|
|
11
11
|
|
|
12
12
|
const frameworks = [
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
{ value: 'react', label: 'React' },
|
|
14
|
+
{ value: 'vue', label: 'Vue' },
|
|
15
|
+
{ value: 'angular', label: 'Angular' },
|
|
16
|
+
{ value: 'svelte', label: 'Svelte' },
|
|
17
|
+
{ value: 'solid', label: 'SolidJS' },
|
|
18
18
|
];
|
|
19
19
|
|
|
20
20
|
function SearchableCombobox() {
|
|
21
|
-
|
|
21
|
+
const [value, setValue] = React.useState<string | null>(null);
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
23
|
+
return (
|
|
24
|
+
<Combobox value={value} onValueChange={setValue}>
|
|
25
|
+
<ComboboxInput placeholder="Search frameworks..." />
|
|
26
|
+
<ComboboxContent>
|
|
27
|
+
<ComboboxList>
|
|
28
|
+
{frameworks.map((fw) => (
|
|
29
|
+
<ComboboxItem key={fw.value} value={fw.value}>
|
|
30
|
+
{fw.label}
|
|
31
|
+
</ComboboxItem>
|
|
32
|
+
))}
|
|
33
|
+
<ComboboxEmpty>No framework found.</ComboboxEmpty>
|
|
34
|
+
</ComboboxList>
|
|
35
|
+
</ComboboxContent>
|
|
36
|
+
</Combobox>
|
|
37
|
+
);
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
function ClearableCombobox() {
|
|
41
|
-
|
|
41
|
+
const [value, setValue] = React.useState<string | null>(null);
|
|
42
42
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
43
|
+
return (
|
|
44
|
+
<Combobox value={value} onValueChange={setValue}>
|
|
45
|
+
<ComboboxInput placeholder="Pick a framework..." showClear />
|
|
46
|
+
<ComboboxContent>
|
|
47
|
+
<ComboboxList>
|
|
48
|
+
{frameworks.map((fw) => (
|
|
49
|
+
<ComboboxItem key={fw.value} value={fw.value}>
|
|
50
|
+
{fw.label}
|
|
51
|
+
</ComboboxItem>
|
|
52
|
+
))}
|
|
53
|
+
<ComboboxEmpty>No framework found.</ComboboxEmpty>
|
|
54
|
+
</ComboboxList>
|
|
55
|
+
</ComboboxContent>
|
|
56
|
+
</Combobox>
|
|
57
|
+
);
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
const meta: Meta = {
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
title: 'UI Components/Combobox',
|
|
62
|
+
component: ComboboxInput,
|
|
63
63
|
};
|
|
64
64
|
export default meta;
|
|
65
65
|
type Story = StoryObj;
|
|
66
66
|
|
|
67
67
|
/** Shows a searchable combobox with type-ahead filtering of framework options. */
|
|
68
68
|
export const Default: Story = {
|
|
69
|
-
|
|
69
|
+
render: () => <SearchableCombobox />,
|
|
70
70
|
};
|
|
71
71
|
|
|
72
72
|
/** Demonstrates the combobox with a clear button that resets the selection. */
|
|
73
73
|
export const WithClear: Story = {
|
|
74
|
-
|
|
74
|
+
render: () => <ClearableCombobox />,
|
|
75
75
|
};
|