@alexgorbatchev/shadcn 0.0.38 → 0.0.41

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 (35) hide show
  1. package/README.md +34 -0
  2. package/THIRD_PARTY_NOTICES.md +4 -0
  3. package/dist/{chunk-6grcm62s.js → chunk-1hj251b8.js} +1 -1
  4. package/dist/{chunk-r9qrb6b6.js → chunk-5bw5h08v.js} +1 -1
  5. package/dist/{chunk-kmvvw1vr.js → chunk-sb00e3gj.js} +1 -1
  6. package/dist/{chunk-f71469fs.js → chunk-v0va5w5c.js} +1 -1
  7. package/dist/components/data-grid/index.js +2 -2
  8. package/dist/components/gantt/index.js +2 -2
  9. package/dist/components/json-render/index.js +3 -3
  10. package/dist/components/virtual-data-grid/index.js +2 -2
  11. package/dist/index.js +3 -3
  12. package/dist/prototype.js +3665 -0
  13. package/licenses/commander-MIT.txt +22 -0
  14. package/llms/components/forms/NativeSelect.md +8 -0
  15. package/llms/setup.md +34 -0
  16. package/package.json +9 -3
  17. package/templates/prototype/AGENTS.md +23 -0
  18. package/templates/prototype/gitignore +5 -0
  19. package/templates/prototype/index.html +12 -0
  20. package/templates/prototype/justfile +18 -0
  21. package/templates/prototype/src/components/ScenarioContent.tsx +41 -0
  22. package/templates/prototype/src/components/Workbench.tsx +132 -0
  23. package/templates/prototype/src/main.tsx +12 -0
  24. package/templates/prototype/src/prototypes/dashboard/components/Dashboard.tsx +80 -0
  25. package/templates/prototype/src/prototypes/dashboard/data.ts +5 -0
  26. package/templates/prototype/src/prototypes/dashboard/prototype.ts +9 -0
  27. package/templates/prototype/src/prototypes/projects/components/Projects.tsx +151 -0
  28. package/templates/prototype/src/prototypes/projects/data.ts +5 -0
  29. package/templates/prototype/src/prototypes/projects/prototype.ts +9 -0
  30. package/templates/prototype/src/prototypes/settings/components/Settings.tsx +72 -0
  31. package/templates/prototype/src/prototypes/settings/prototype.ts +9 -0
  32. package/templates/prototype/src/styles.css +7 -0
  33. package/templates/prototype/src/types.ts +9 -0
  34. package/templates/prototype/tsconfig.json +13 -0
  35. package/templates/prototype/vite.config.ts +8 -0
@@ -0,0 +1,72 @@
1
+ import { useState, type ReactElement } from "react";
2
+ import {
3
+ AppShell,
4
+ Button,
5
+ Card,
6
+ CardHeader,
7
+ CardTitle,
8
+ CardDescription,
9
+ CardContent,
10
+ CardFooter,
11
+ Field,
12
+ FieldGroup,
13
+ FieldLabel,
14
+ Input,
15
+ PageHeader,
16
+ Switch,
17
+ } from "@alexgorbatchev/shadcn";
18
+ import type { PrototypeProps } from "../../../types";
19
+ import { ScenarioContent } from "../../../components/ScenarioContent";
20
+
21
+ export function Settings({ scenario }: PrototypeProps): ReactElement {
22
+ const [name, setName] = useState("Northstar");
23
+ const [email, setEmail] = useState("team@example.com");
24
+ const [notifications, setNotifications] = useState(true);
25
+ const [message, setMessage] = useState("");
26
+ return (
27
+ <AppShell brand="Northstar" header="Settings" navigation={[]}>
28
+ <PageHeader title="Workspace settings" description="Manage the profile and preferences for your team." />
29
+ <ScenarioContent scenario={scenario}>
30
+ <form
31
+ onSubmit={(event) => {
32
+ event.preventDefault();
33
+ setMessage(`Saved ${name}. Email updates ${notifications ? "enabled" : "disabled"} for ${email}.`);
34
+ }}
35
+ >
36
+ <Card>
37
+ <CardHeader>
38
+ <CardTitle>Workspace profile</CardTitle>
39
+ <CardDescription>These settings use local sample data.</CardDescription>
40
+ </CardHeader>
41
+ <CardContent>
42
+ <FieldGroup>
43
+ <Field>
44
+ <FieldLabel htmlFor="workspace-name">Workspace name</FieldLabel>
45
+ <Input id="workspace-name" required value={name} onChange={(event) => setName(event.target.value)} />
46
+ </Field>
47
+ <Field>
48
+ <FieldLabel htmlFor="email">Contact email</FieldLabel>
49
+ <Input
50
+ id="email"
51
+ type="email"
52
+ required
53
+ value={email}
54
+ onChange={(event) => setEmail(event.target.value)}
55
+ />
56
+ </Field>
57
+ <Field orientation="horizontal">
58
+ <Switch id="notifications" checked={notifications} onCheckedChange={setNotifications} />
59
+ <FieldLabel htmlFor="notifications">Email updates</FieldLabel>
60
+ </Field>
61
+ </FieldGroup>
62
+ </CardContent>
63
+ <CardFooter>
64
+ <Button type="submit">Save settings</Button>
65
+ </CardFooter>
66
+ </Card>
67
+ </form>
68
+ <p role="status">{message}</p>
69
+ </ScenarioContent>
70
+ </AppShell>
71
+ );
72
+ }
@@ -0,0 +1,9 @@
1
+ import type { PrototypeDefinition } from "../../types";
2
+ import { Settings } from "./components/Settings";
3
+
4
+ const prototype: PrototypeDefinition = {
5
+ title: "Settings",
6
+ description: "Edit a workspace profile and notification preferences.",
7
+ component: Settings,
8
+ };
9
+ export default prototype;
@@ -0,0 +1,7 @@
1
+ @import "tailwindcss";
2
+ @import "@alexgorbatchev/shadcn/theme.css";
3
+ @source "../node_modules/@alexgorbatchev/shadcn/dist";
4
+
5
+ #root {
6
+ isolation: isolate;
7
+ }
@@ -0,0 +1,9 @@
1
+ import type { ComponentType } from "react";
2
+
3
+ export type Scenario = "populated" | "empty" | "loading" | "error";
4
+ export type PrototypeProps = { scenario: Scenario };
5
+ export type PrototypeDefinition = {
6
+ title: string;
7
+ description: string;
8
+ component: ComponentType<PrototypeProps>;
9
+ };
@@ -0,0 +1,13 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ESNext",
4
+ "module": "ESNext",
5
+ "moduleResolution": "Bundler",
6
+ "jsx": "react-jsx",
7
+ "strict": true,
8
+ "skipLibCheck": true,
9
+ "noEmit": true,
10
+ "types": ["vite/client", "bun"]
11
+ },
12
+ "include": ["src", "vite.config.ts"]
13
+ }
@@ -0,0 +1,8 @@
1
+ import { defineConfig } from "vite";
2
+ import react from "@vitejs/plugin-react";
3
+ import tailwindcss from "@tailwindcss/vite";
4
+
5
+ export default defineConfig({
6
+ plugins: [react(), tailwindcss()],
7
+ server: { host: "127.0.0.1", strictPort: true, headers: { "Cache-Control": "no-store" } },
8
+ });