create-auto-app 1.33.0 → 1.35.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 (159) hide show
  1. package/package.json +2 -2
  2. package/templates/typical/.context/components-db.json +4006 -0
  3. package/templates/typical/.gitignore +1 -1
  4. package/templates/typical/auto.config.ts +85 -80
  5. package/templates/typical/client/.claude-auto/.claude.hooks.json +0 -28
  6. package/templates/typical/client/.gitignore +0 -4
  7. package/templates/typical/client/.storybook/main.ts +0 -66
  8. package/templates/typical/client/.storybook/manager-head.html +0 -154
  9. package/templates/typical/client/.storybook/manager.ts +0 -164
  10. package/templates/typical/client/.storybook/preview-head.html +0 -31
  11. package/templates/typical/client/.storybook/preview.tsx +0 -120
  12. package/templates/typical/client/codegen.ts +0 -17
  13. package/templates/typical/client/components.json +0 -29
  14. package/templates/typical/client/index.html +0 -12
  15. package/templates/typical/client/package.json +0 -69
  16. package/templates/typical/client/pnpm-lock.yaml +0 -7868
  17. package/templates/typical/client/public/blank.svg +0 -1
  18. package/templates/typical/client/public/mockServiceWorker.js +0 -336
  19. package/templates/typical/client/src/App.tsx +0 -29
  20. package/templates/typical/client/src/components/.gitkeep +0 -0
  21. package/templates/typical/client/src/components/ui/Accordion.stories.tsx +0 -47
  22. package/templates/typical/client/src/components/ui/Accordion.tsx +0 -51
  23. package/templates/typical/client/src/components/ui/Alert.stories.tsx +0 -27
  24. package/templates/typical/client/src/components/ui/Alert.tsx +0 -49
  25. package/templates/typical/client/src/components/ui/AlertDialog.stories.tsx +0 -65
  26. package/templates/typical/client/src/components/ui/AlertDialog.tsx +0 -163
  27. package/templates/typical/client/src/components/ui/AspectRatio.stories.tsx +0 -33
  28. package/templates/typical/client/src/components/ui/AspectRatio.tsx +0 -9
  29. package/templates/typical/client/src/components/ui/Avatar.stories.tsx +0 -42
  30. package/templates/typical/client/src/components/ui/Avatar.tsx +0 -87
  31. package/templates/typical/client/src/components/ui/Badge.stories.tsx +0 -36
  32. package/templates/typical/client/src/components/ui/Badge.tsx +0 -40
  33. package/templates/typical/client/src/components/ui/Breadcrumb.stories.tsx +0 -52
  34. package/templates/typical/client/src/components/ui/Breadcrumb.tsx +0 -92
  35. package/templates/typical/client/src/components/ui/Button.stories.tsx +0 -92
  36. package/templates/typical/client/src/components/ui/Button.tsx +0 -62
  37. package/templates/typical/client/src/components/ui/ButtonGroup.stories.tsx +0 -30
  38. package/templates/typical/client/src/components/ui/ButtonGroup.tsx +0 -75
  39. package/templates/typical/client/src/components/ui/Calendar.stories.tsx +0 -38
  40. package/templates/typical/client/src/components/ui/Calendar.tsx +0 -159
  41. package/templates/typical/client/src/components/ui/Card.stories.tsx +0 -42
  42. package/templates/typical/client/src/components/ui/Card.tsx +0 -56
  43. package/templates/typical/client/src/components/ui/Carousel.stories.tsx +0 -54
  44. package/templates/typical/client/src/components/ui/Carousel.tsx +0 -216
  45. package/templates/typical/client/src/components/ui/Chart.stories.tsx +0 -38
  46. package/templates/typical/client/src/components/ui/Chart.tsx +0 -296
  47. package/templates/typical/client/src/components/ui/Checkbox.stories.tsx +0 -31
  48. package/templates/typical/client/src/components/ui/Checkbox.tsx +0 -29
  49. package/templates/typical/client/src/components/ui/Collapsible.stories.tsx +0 -56
  50. package/templates/typical/client/src/components/ui/Collapsible.tsx +0 -15
  51. package/templates/typical/client/src/components/ui/Combobox.stories.tsx +0 -73
  52. package/templates/typical/client/src/components/ui/Combobox.tsx +0 -267
  53. package/templates/typical/client/src/components/ui/Command.stories.tsx +0 -69
  54. package/templates/typical/client/src/components/ui/Command.tsx +0 -137
  55. package/templates/typical/client/src/components/ui/ContextMenu.stories.tsx +0 -66
  56. package/templates/typical/client/src/components/ui/ContextMenu.tsx +0 -211
  57. package/templates/typical/client/src/components/ui/DesignSystem-Colors.mdx +0 -68
  58. package/templates/typical/client/src/components/ui/DesignSystem-Colors.stories.tsx +0 -117
  59. package/templates/typical/client/src/components/ui/DesignSystem-Layout.mdx +0 -64
  60. package/templates/typical/client/src/components/ui/DesignSystem-Layout.stories.tsx +0 -167
  61. package/templates/typical/client/src/components/ui/DesignSystem-Overview.stories.tsx +0 -748
  62. package/templates/typical/client/src/components/ui/DesignSystem-Typography.mdx +0 -31
  63. package/templates/typical/client/src/components/ui/DesignSystem-Typography.stories.tsx +0 -80
  64. package/templates/typical/client/src/components/ui/Dialog.stories.tsx +0 -72
  65. package/templates/typical/client/src/components/ui/Dialog.tsx +0 -136
  66. package/templates/typical/client/src/components/ui/Direction.stories.tsx +0 -36
  67. package/templates/typical/client/src/components/ui/Direction.tsx +0 -18
  68. package/templates/typical/client/src/components/ui/Drawer.stories.tsx +0 -68
  69. package/templates/typical/client/src/components/ui/Drawer.tsx +0 -106
  70. package/templates/typical/client/src/components/ui/DropdownMenu.stories.tsx +0 -72
  71. package/templates/typical/client/src/components/ui/DropdownMenu.tsx +0 -219
  72. package/templates/typical/client/src/components/ui/Empty.stories.tsx +0 -35
  73. package/templates/typical/client/src/components/ui/Empty.tsx +0 -85
  74. package/templates/typical/client/src/components/ui/Field.stories.tsx +0 -47
  75. package/templates/typical/client/src/components/ui/Field.tsx +0 -226
  76. package/templates/typical/client/src/components/ui/Form.stories.tsx +0 -44
  77. package/templates/typical/client/src/components/ui/Form.tsx +0 -136
  78. package/templates/typical/client/src/components/ui/HoverCard.stories.tsx +0 -47
  79. package/templates/typical/client/src/components/ui/HoverCard.tsx +0 -36
  80. package/templates/typical/client/src/components/ui/Input.stories.tsx +0 -38
  81. package/templates/typical/client/src/components/ui/Input.tsx +0 -21
  82. package/templates/typical/client/src/components/ui/InputGroup.stories.tsx +0 -50
  83. package/templates/typical/client/src/components/ui/InputGroup.tsx +0 -147
  84. package/templates/typical/client/src/components/ui/InputOTP.stories.tsx +0 -40
  85. package/templates/typical/client/src/components/ui/InputOTP.tsx +0 -68
  86. package/templates/typical/client/src/components/ui/Item.stories.tsx +0 -61
  87. package/templates/typical/client/src/components/ui/Item.tsx +0 -158
  88. package/templates/typical/client/src/components/ui/Kbd.stories.tsx +0 -54
  89. package/templates/typical/client/src/components/ui/Kbd.tsx +0 -18
  90. package/templates/typical/client/src/components/ui/Label.stories.tsx +0 -85
  91. package/templates/typical/client/src/components/ui/Label.tsx +0 -40
  92. package/templates/typical/client/src/components/ui/Menubar.stories.tsx +0 -76
  93. package/templates/typical/client/src/components/ui/Menubar.tsx +0 -236
  94. package/templates/typical/client/src/components/ui/NativeSelect.stories.tsx +0 -42
  95. package/templates/typical/client/src/components/ui/NativeSelect.tsx +0 -44
  96. package/templates/typical/client/src/components/ui/NavigationMenu.stories.tsx +0 -78
  97. package/templates/typical/client/src/components/ui/NavigationMenu.tsx +0 -142
  98. package/templates/typical/client/src/components/ui/Pagination.stories.tsx +0 -75
  99. package/templates/typical/client/src/components/ui/Pagination.tsx +0 -100
  100. package/templates/typical/client/src/components/ui/Popover.stories.tsx +0 -51
  101. package/templates/typical/client/src/components/ui/Popover.tsx +0 -52
  102. package/templates/typical/client/src/components/ui/Progress.stories.tsx +0 -28
  103. package/templates/typical/client/src/components/ui/Progress.tsx +0 -24
  104. package/templates/typical/client/src/components/ui/RadioGroup.stories.tsx +0 -48
  105. package/templates/typical/client/src/components/ui/RadioGroup.tsx +0 -31
  106. package/templates/typical/client/src/components/ui/Resizable.stories.tsx +0 -69
  107. package/templates/typical/client/src/components/ui/Resizable.tsx +0 -47
  108. package/templates/typical/client/src/components/ui/ScrollArea.stories.tsx +0 -43
  109. package/templates/typical/client/src/components/ui/ScrollArea.tsx +0 -46
  110. package/templates/typical/client/src/components/ui/Select.stories.tsx +0 -57
  111. package/templates/typical/client/src/components/ui/Select.tsx +0 -162
  112. package/templates/typical/client/src/components/ui/Separator.stories.tsx +0 -40
  113. package/templates/typical/client/src/components/ui/Separator.tsx +0 -26
  114. package/templates/typical/client/src/components/ui/Sheet.stories.tsx +0 -66
  115. package/templates/typical/client/src/components/ui/Sheet.tsx +0 -107
  116. package/templates/typical/client/src/components/ui/Sidebar.stories.tsx +0 -94
  117. package/templates/typical/client/src/components/ui/Sidebar.tsx +0 -675
  118. package/templates/typical/client/src/components/ui/Skeleton.stories.tsx +0 -38
  119. package/templates/typical/client/src/components/ui/Skeleton.tsx +0 -7
  120. package/templates/typical/client/src/components/ui/Slider.stories.tsx +0 -21
  121. package/templates/typical/client/src/components/ui/Slider.tsx +0 -54
  122. package/templates/typical/client/src/components/ui/Sonner.stories.tsx +0 -44
  123. package/templates/typical/client/src/components/ui/Sonner.tsx +0 -34
  124. package/templates/typical/client/src/components/ui/Spinner.stories.tsx +0 -23
  125. package/templates/typical/client/src/components/ui/Spinner.tsx +0 -9
  126. package/templates/typical/client/src/components/ui/Switch.stories.tsx +0 -35
  127. package/templates/typical/client/src/components/ui/Switch.tsx +0 -33
  128. package/templates/typical/client/src/components/ui/Table.stories.tsx +0 -65
  129. package/templates/typical/client/src/components/ui/Table.tsx +0 -75
  130. package/templates/typical/client/src/components/ui/Tabs.stories.tsx +0 -51
  131. package/templates/typical/client/src/components/ui/Tabs.tsx +0 -69
  132. package/templates/typical/client/src/components/ui/Textarea.stories.tsx +0 -24
  133. package/templates/typical/client/src/components/ui/Textarea.tsx +0 -18
  134. package/templates/typical/client/src/components/ui/Toast.stories.tsx +0 -112
  135. package/templates/typical/client/src/components/ui/Toast.tsx +0 -114
  136. package/templates/typical/client/src/components/ui/Toaster.tsx +0 -28
  137. package/templates/typical/client/src/components/ui/Toggle.stories.tsx +0 -40
  138. package/templates/typical/client/src/components/ui/Toggle.tsx +0 -41
  139. package/templates/typical/client/src/components/ui/ToggleGroup.stories.tsx +0 -58
  140. package/templates/typical/client/src/components/ui/ToggleGroup.tsx +0 -80
  141. package/templates/typical/client/src/components/ui/Tooltip.stories.tsx +0 -40
  142. package/templates/typical/client/src/components/ui/Tooltip.tsx +0 -42
  143. package/templates/typical/client/src/gql/execute.ts +0 -11
  144. package/templates/typical/client/src/gql/fragment-masking.ts +0 -83
  145. package/templates/typical/client/src/gql/gql.ts +0 -9
  146. package/templates/typical/client/src/gql/graphql.ts +0 -182
  147. package/templates/typical/client/src/gql/index.ts +0 -2
  148. package/templates/typical/client/src/graphql/mutations.ts +0 -0
  149. package/templates/typical/client/src/graphql/queries.ts +0 -0
  150. package/templates/typical/client/src/hooks/.gitkeep +0 -0
  151. package/templates/typical/client/src/hooks/use-mobile.ts +0 -19
  152. package/templates/typical/client/src/hooks/use-toast.ts +0 -186
  153. package/templates/typical/client/src/index.css +0 -121
  154. package/templates/typical/client/src/lib/utils.ts +0 -6
  155. package/templates/typical/client/src/main.tsx +0 -5
  156. package/templates/typical/client/tsconfig.app.json +0 -26
  157. package/templates/typical/client/tsconfig.json +0 -10
  158. package/templates/typical/client/tsconfig.staging.json +0 -8
  159. package/templates/typical/client/vite.config.ts +0 -50
@@ -1,211 +0,0 @@
1
- 'use client';
2
-
3
- import * as React from 'react';
4
- import { CheckIcon, ChevronRightIcon, CircleIcon } from 'lucide-react';
5
- import { ContextMenu as ContextMenuPrimitive } from 'radix-ui';
6
-
7
- import { cn } from '@/lib/utils';
8
-
9
- function ContextMenu({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Root>) {
10
- return <ContextMenuPrimitive.Root data-slot="context-menu" {...props} />;
11
- }
12
-
13
- function ContextMenuTrigger({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Trigger>) {
14
- return <ContextMenuPrimitive.Trigger data-slot="context-menu-trigger" {...props} />;
15
- }
16
-
17
- function ContextMenuGroup({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Group>) {
18
- return <ContextMenuPrimitive.Group data-slot="context-menu-group" {...props} />;
19
- }
20
-
21
- function ContextMenuPortal({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Portal>) {
22
- return <ContextMenuPrimitive.Portal data-slot="context-menu-portal" {...props} />;
23
- }
24
-
25
- function ContextMenuSub({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Sub>) {
26
- return <ContextMenuPrimitive.Sub data-slot="context-menu-sub" {...props} />;
27
- }
28
-
29
- function ContextMenuRadioGroup({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.RadioGroup>) {
30
- return <ContextMenuPrimitive.RadioGroup data-slot="context-menu-radio-group" {...props} />;
31
- }
32
-
33
- function ContextMenuSubTrigger({
34
- className,
35
- inset,
36
- children,
37
- ...props
38
- }: React.ComponentProps<typeof ContextMenuPrimitive.SubTrigger> & {
39
- inset?: boolean;
40
- }) {
41
- return (
42
- <ContextMenuPrimitive.SubTrigger
43
- data-slot="context-menu-sub-trigger"
44
- data-inset={inset}
45
- className={cn(
46
- "focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
47
- className,
48
- )}
49
- {...props}
50
- >
51
- {children}
52
- <ChevronRightIcon className="ml-auto" />
53
- </ContextMenuPrimitive.SubTrigger>
54
- );
55
- }
56
-
57
- function ContextMenuSubContent({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.SubContent>) {
58
- return (
59
- <ContextMenuPrimitive.SubContent
60
- data-slot="context-menu-sub-content"
61
- className={cn(
62
- 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg',
63
- className,
64
- )}
65
- {...props}
66
- />
67
- );
68
- }
69
-
70
- function ContextMenuContent({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Content>) {
71
- return (
72
- <ContextMenuPrimitive.Portal>
73
- <ContextMenuPrimitive.Content
74
- data-slot="context-menu-content"
75
- className={cn(
76
- 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md',
77
- className,
78
- )}
79
- {...props}
80
- />
81
- </ContextMenuPrimitive.Portal>
82
- );
83
- }
84
-
85
- function ContextMenuItem({
86
- className,
87
- inset,
88
- variant = 'default',
89
- ...props
90
- }: React.ComponentProps<typeof ContextMenuPrimitive.Item> & {
91
- inset?: boolean;
92
- variant?: 'default' | 'destructive';
93
- }) {
94
- return (
95
- <ContextMenuPrimitive.Item
96
- data-slot="context-menu-item"
97
- data-inset={inset}
98
- data-variant={variant}
99
- className={cn(
100
- "focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
101
- className,
102
- )}
103
- {...props}
104
- />
105
- );
106
- }
107
-
108
- function ContextMenuCheckboxItem({
109
- className,
110
- children,
111
- checked,
112
- ...props
113
- }: React.ComponentProps<typeof ContextMenuPrimitive.CheckboxItem>) {
114
- return (
115
- <ContextMenuPrimitive.CheckboxItem
116
- data-slot="context-menu-checkbox-item"
117
- className={cn(
118
- "focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
119
- className,
120
- )}
121
- checked={checked}
122
- {...props}
123
- >
124
- <span className="pointer-events-none absolute left-2 flex size-3.5 items-center justify-center">
125
- <ContextMenuPrimitive.ItemIndicator>
126
- <CheckIcon className="size-4" />
127
- </ContextMenuPrimitive.ItemIndicator>
128
- </span>
129
- {children}
130
- </ContextMenuPrimitive.CheckboxItem>
131
- );
132
- }
133
-
134
- function ContextMenuRadioItem({
135
- className,
136
- children,
137
- ...props
138
- }: React.ComponentProps<typeof ContextMenuPrimitive.RadioItem>) {
139
- return (
140
- <ContextMenuPrimitive.RadioItem
141
- data-slot="context-menu-radio-item"
142
- className={cn(
143
- "focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
144
- className,
145
- )}
146
- {...props}
147
- >
148
- <span className="pointer-events-none absolute left-2 flex size-3.5 items-center justify-center">
149
- <ContextMenuPrimitive.ItemIndicator>
150
- <CircleIcon className="size-2 fill-current" />
151
- </ContextMenuPrimitive.ItemIndicator>
152
- </span>
153
- {children}
154
- </ContextMenuPrimitive.RadioItem>
155
- );
156
- }
157
-
158
- function ContextMenuLabel({
159
- className,
160
- inset,
161
- ...props
162
- }: React.ComponentProps<typeof ContextMenuPrimitive.Label> & {
163
- inset?: boolean;
164
- }) {
165
- return (
166
- <ContextMenuPrimitive.Label
167
- data-slot="context-menu-label"
168
- data-inset={inset}
169
- className={cn('text-foreground px-2 py-1.5 text-sm font-medium data-[inset]:pl-8', className)}
170
- {...props}
171
- />
172
- );
173
- }
174
-
175
- function ContextMenuSeparator({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Separator>) {
176
- return (
177
- <ContextMenuPrimitive.Separator
178
- data-slot="context-menu-separator"
179
- className={cn('bg-border -mx-1 my-1 h-px', className)}
180
- {...props}
181
- />
182
- );
183
- }
184
-
185
- function ContextMenuShortcut({ className, ...props }: React.ComponentProps<'span'>) {
186
- return (
187
- <span
188
- data-slot="context-menu-shortcut"
189
- className={cn('text-muted-foreground ml-auto text-xs tracking-widest', className)}
190
- {...props}
191
- />
192
- );
193
- }
194
-
195
- export {
196
- ContextMenu,
197
- ContextMenuTrigger,
198
- ContextMenuContent,
199
- ContextMenuItem,
200
- ContextMenuCheckboxItem,
201
- ContextMenuRadioItem,
202
- ContextMenuLabel,
203
- ContextMenuSeparator,
204
- ContextMenuShortcut,
205
- ContextMenuGroup,
206
- ContextMenuPortal,
207
- ContextMenuSub,
208
- ContextMenuSubContent,
209
- ContextMenuSubTrigger,
210
- ContextMenuRadioGroup,
211
- };
@@ -1,68 +0,0 @@
1
- import { Meta, Stories } from '@storybook/addon-docs/blocks';
2
-
3
- <Meta title="Design System/Colors" />
4
-
5
- # Colors
6
-
7
- Semantic color tokens used throughout the design system. Each token is defined as a CSS custom property and mapped to a Tailwind CSS utility class via the theme configuration in `index.css`.
8
-
9
- ## Core
10
-
11
- | CSS Variable | Tailwind Class | Usage |
12
- |---|---|---|
13
- | `--primary` | `bg-primary` | Primary actions, active states |
14
- | `--primary-foreground` | `text-primary-foreground` | Text on primary backgrounds |
15
- | `--secondary` | `bg-secondary` | Secondary actions, less prominent UI |
16
- | `--secondary-foreground` | `text-secondary-foreground` | Text on secondary backgrounds |
17
- | `--accent` | `bg-accent` | Highlighted or accented areas |
18
- | `--accent-foreground` | `text-accent-foreground` | Text on accent backgrounds |
19
- | `--muted` | `bg-muted` | Subdued backgrounds, disabled states |
20
- | `--muted-foreground` | `text-muted-foreground` | De-emphasized text, placeholders |
21
- | `--destructive` | `bg-destructive` | Destructive actions, error states |
22
- | `--destructive-foreground` | `text-destructive-foreground` | Text on destructive backgrounds |
23
- | `--background` | `bg-background` | Page background |
24
- | `--foreground` | `text-foreground` | Default body text |
25
-
26
- ## Surface
27
-
28
- | CSS Variable | Tailwind Class | Usage |
29
- |---|---|---|
30
- | `--card` | `bg-card` | Card backgrounds |
31
- | `--card-foreground` | `text-card-foreground` | Text inside cards |
32
- | `--popover` | `bg-popover` | Popover and dropdown backgrounds |
33
- | `--popover-foreground` | `text-popover-foreground` | Text inside popovers |
34
-
35
- ## UI
36
-
37
- | CSS Variable | Tailwind Class | Usage |
38
- |---|---|---|
39
- | `--border` | `border-border` | Default border color |
40
- | `--input` | `border-input` | Input field borders |
41
- | `--ring` | `ring-ring` | Focus ring color |
42
-
43
- ## Charts
44
-
45
- | CSS Variable | Tailwind Class | Usage |
46
- |---|---|---|
47
- | `--chart-1` | `bg-chart-1` | Chart color 1 |
48
- | `--chart-2` | `bg-chart-2` | Chart color 2 |
49
- | `--chart-3` | `bg-chart-3` | Chart color 3 |
50
- | `--chart-4` | `bg-chart-4` | Chart color 4 |
51
- | `--chart-5` | `bg-chart-5` | Chart color 5 |
52
-
53
- ## Sidebar
54
-
55
- | CSS Variable | Tailwind Class | Usage |
56
- |---|---|---|
57
- | `--sidebar` | `bg-sidebar` | Sidebar background |
58
- | `--sidebar-foreground` | `text-sidebar-foreground` | Sidebar text |
59
- | `--sidebar-primary` | `bg-sidebar-primary` | Sidebar primary actions |
60
- | `--sidebar-primary-foreground` | `text-sidebar-primary-foreground` | Text on sidebar primary |
61
- | `--sidebar-accent` | `bg-sidebar-accent` | Sidebar accented areas |
62
- | `--sidebar-accent-foreground` | `text-sidebar-accent-foreground` | Text on sidebar accent |
63
- | `--sidebar-border` | `border-sidebar-border` | Sidebar border color |
64
- | `--sidebar-ring` | `ring-sidebar-ring` | Sidebar focus ring |
65
-
66
- ## Swatches
67
-
68
- <Stories />
@@ -1,117 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react-vite';
2
-
3
- interface ColorToken {
4
- variable: string;
5
- utility: string;
6
- }
7
-
8
- interface ColorGroup {
9
- label: string;
10
- tokens: ColorToken[];
11
- }
12
-
13
- const colorGroups: ColorGroup[] = [
14
- {
15
- label: 'Core',
16
- tokens: [
17
- { variable: '--primary', utility: 'bg-primary' },
18
- { variable: '--primary-foreground', utility: 'bg-primary-foreground' },
19
- { variable: '--secondary', utility: 'bg-secondary' },
20
- { variable: '--secondary-foreground', utility: 'bg-secondary-foreground' },
21
- { variable: '--accent', utility: 'bg-accent' },
22
- { variable: '--accent-foreground', utility: 'bg-accent-foreground' },
23
- { variable: '--muted', utility: 'bg-muted' },
24
- { variable: '--muted-foreground', utility: 'bg-muted-foreground' },
25
- { variable: '--destructive', utility: 'bg-destructive' },
26
- { variable: '--destructive-foreground', utility: 'bg-destructive-foreground' },
27
- { variable: '--background', utility: 'bg-background' },
28
- { variable: '--foreground', utility: 'bg-foreground' },
29
- ],
30
- },
31
- {
32
- label: 'Surface',
33
- tokens: [
34
- { variable: '--card', utility: 'bg-card' },
35
- { variable: '--card-foreground', utility: 'bg-card-foreground' },
36
- { variable: '--popover', utility: 'bg-popover' },
37
- { variable: '--popover-foreground', utility: 'bg-popover-foreground' },
38
- ],
39
- },
40
- {
41
- label: 'UI',
42
- tokens: [
43
- { variable: '--border', utility: 'bg-border' },
44
- { variable: '--input', utility: 'bg-input' },
45
- { variable: '--ring', utility: 'bg-ring' },
46
- ],
47
- },
48
- {
49
- label: 'Charts',
50
- tokens: [
51
- { variable: '--chart-1', utility: 'bg-chart-1' },
52
- { variable: '--chart-2', utility: 'bg-chart-2' },
53
- { variable: '--chart-3', utility: 'bg-chart-3' },
54
- { variable: '--chart-4', utility: 'bg-chart-4' },
55
- { variable: '--chart-5', utility: 'bg-chart-5' },
56
- ],
57
- },
58
- {
59
- label: 'Sidebar',
60
- tokens: [
61
- { variable: '--sidebar', utility: 'bg-sidebar' },
62
- { variable: '--sidebar-foreground', utility: 'bg-sidebar-foreground' },
63
- { variable: '--sidebar-primary', utility: 'bg-sidebar-primary' },
64
- {
65
- variable: '--sidebar-primary-foreground',
66
- utility: 'bg-sidebar-primary-foreground',
67
- },
68
- { variable: '--sidebar-accent', utility: 'bg-sidebar-accent' },
69
- {
70
- variable: '--sidebar-accent-foreground',
71
- utility: 'bg-sidebar-accent-foreground',
72
- },
73
- { variable: '--sidebar-border', utility: 'bg-sidebar-border' },
74
- { variable: '--sidebar-ring', utility: 'bg-sidebar-ring' },
75
- ],
76
- },
77
- ];
78
-
79
- function ColorSwatch({ variable, utility }: ColorToken) {
80
- return (
81
- <div className="flex flex-col items-center gap-1.5">
82
- <div className="h-16 w-16 rounded-md border border-border" style={{ backgroundColor: `var(${variable})` }} />
83
- <span className="text-xs font-mono text-foreground">{variable}</span>
84
- <span className="text-xs font-mono text-muted-foreground">{utility}</span>
85
- </div>
86
- );
87
- }
88
-
89
- function ColorSwatches() {
90
- return (
91
- <div className="flex flex-col gap-10 p-6">
92
- {colorGroups.map((group) => (
93
- <section key={group.label}>
94
- <h2 className="mb-4 text-lg font-semibold text-foreground">{group.label}</h2>
95
- <div className="flex flex-wrap gap-6">
96
- {group.tokens.map((token) => (
97
- <ColorSwatch key={token.variable} {...token} />
98
- ))}
99
- </div>
100
- </section>
101
- ))}
102
- </div>
103
- );
104
- }
105
-
106
- const meta: Meta = {
107
- title: 'Design System/Colors',
108
- component: ColorSwatches,
109
- tags: ['!autodocs', '!manifest'],
110
- };
111
- export default meta;
112
-
113
- type Story = StoryObj;
114
-
115
- export const Default: Story = {
116
- render: () => <ColorSwatches />,
117
- };
@@ -1,64 +0,0 @@
1
- import { Meta, Stories } from '@storybook/addon-docs/blocks';
2
-
3
- <Meta title="Design System/Layout" />
4
-
5
- # Layout
6
-
7
- Spacing, border radius, and shadow tokens used throughout the design system.
8
-
9
- ## Spacing
10
-
11
- The spacing scale uses Tailwind utility classes. Apply these consistently to maintain visual rhythm.
12
-
13
- | Purpose | Classes | When to use |
14
- | --- | --- | --- |
15
- | Section gaps | `space-y-16`, `py-16` | Between major page sections |
16
- | Content gaps | `space-y-6`, `space-y-8` | Between content blocks within a section |
17
- | Element gaps | `space-y-3`, `gap-3` | Between related elements (form fields, list items) |
18
- | Padding | `p-4` | Compact containers (cards, popovers) |
19
- | Padding | `p-6` | Standard containers |
20
- | Padding | `p-8` | Spacious containers (hero sections, modals) |
21
-
22
- ### Guidelines
23
-
24
- - Use `space-y-*` for vertical stacking of block elements.
25
- - Use `gap-*` with flex or grid layouts.
26
- - Prefer consistent padding within a component; avoid mixing `p-4` and `p-8` at the same level.
27
-
28
- ## Border Radius
29
-
30
- Border radius values are derived from the `--radius` CSS custom property (default `0.625rem`).
31
-
32
- | Class | CSS Variable | Value |
33
- | --- | --- | --- |
34
- | `rounded-sm` | `--radius-sm` | `calc(var(--radius) - 4px)` |
35
- | `rounded-md` | `--radius-md` | `calc(var(--radius) - 2px)` |
36
- | `rounded-lg` | `--radius-lg` | `var(--radius)` |
37
- | `rounded-xl` | `--radius-xl` | `calc(var(--radius) + 4px)` |
38
-
39
- ### Guidelines
40
-
41
- - `rounded-sm` -- Small inline elements (badges, tags).
42
- - `rounded-md` -- Inputs, buttons, and form controls.
43
- - `rounded-lg` -- Cards, dialogs, and container surfaces.
44
- - `rounded-xl` -- Large hero cards or featured sections.
45
-
46
- ## Shadows
47
-
48
- Shadows add depth and elevation. Use the Tailwind shadow utilities.
49
-
50
- | Class | Usage |
51
- | --- | --- |
52
- | `shadow-sm` | Subtle lift for cards and inputs at rest |
53
- | `shadow` | Default elevation for interactive surfaces |
54
- | `shadow-md` | Hover states, dropdown menus |
55
- | `shadow-lg` | Modals, popovers, floating panels |
56
- | `shadow-xl` | Prominent overlays, feature highlights |
57
-
58
- ### Guidelines
59
-
60
- - Shadows should increase with elevation: resting surfaces use `shadow-sm`, overlays use `shadow-lg` or `shadow-xl`.
61
- - Avoid applying shadows to flat, inline elements like text or badges.
62
- - Combine shadows with border radius for polished container surfaces.
63
-
64
- <Stories />
@@ -1,167 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react-vite';
2
-
3
- function SpacingScale() {
4
- const spacingItems = [
5
- { label: 'Section gaps', classes: 'space-y-16, py-16', demo: 'space-y-16 py-16' },
6
- { label: 'Content gaps', classes: 'space-y-6, space-y-8', demo: 'space-y-6' },
7
- { label: 'Element gaps', classes: 'space-y-3, gap-3', demo: 'gap-3' },
8
- { label: 'Padding', classes: 'p-4, p-6, p-8', demo: '' },
9
- ];
10
-
11
- return (
12
- <div className="space-y-8">
13
- <h2 className="text-xl font-semibold">Spacing Scale</h2>
14
-
15
- {/* Section gaps */}
16
- <div>
17
- <h3 className="mb-2 text-sm font-medium text-muted-foreground">
18
- Section gaps: <code className="text-xs">space-y-16</code>, <code className="text-xs">py-16</code>
19
- </h3>
20
- <div className="space-y-16 rounded-lg border border-border p-4">
21
- <div className="h-8 rounded bg-primary/20" />
22
- <div className="h-8 rounded bg-primary/20" />
23
- </div>
24
- </div>
25
-
26
- {/* Content gaps */}
27
- <div>
28
- <h3 className="mb-2 text-sm font-medium text-muted-foreground">
29
- Content gaps: <code className="text-xs">space-y-6</code>, <code className="text-xs">space-y-8</code>
30
- </h3>
31
- <div className="flex gap-8">
32
- <div className="flex-1">
33
- <p className="mb-1 text-xs text-muted-foreground">space-y-6</p>
34
- <div className="space-y-6 rounded-lg border border-border p-4">
35
- <div className="h-6 rounded bg-primary/20" />
36
- <div className="h-6 rounded bg-primary/20" />
37
- <div className="h-6 rounded bg-primary/20" />
38
- </div>
39
- </div>
40
- <div className="flex-1">
41
- <p className="mb-1 text-xs text-muted-foreground">space-y-8</p>
42
- <div className="space-y-8 rounded-lg border border-border p-4">
43
- <div className="h-6 rounded bg-primary/20" />
44
- <div className="h-6 rounded bg-primary/20" />
45
- <div className="h-6 rounded bg-primary/20" />
46
- </div>
47
- </div>
48
- </div>
49
- </div>
50
-
51
- {/* Element gaps */}
52
- <div>
53
- <h3 className="mb-2 text-sm font-medium text-muted-foreground">
54
- Element gaps: <code className="text-xs">space-y-3</code>, <code className="text-xs">gap-3</code>
55
- </h3>
56
- <div className="flex gap-8">
57
- <div className="flex-1">
58
- <p className="mb-1 text-xs text-muted-foreground">space-y-3</p>
59
- <div className="space-y-3 rounded-lg border border-border p-4">
60
- <div className="h-4 rounded bg-primary/20" />
61
- <div className="h-4 rounded bg-primary/20" />
62
- <div className="h-4 rounded bg-primary/20" />
63
- </div>
64
- </div>
65
- <div className="flex-1">
66
- <p className="mb-1 text-xs text-muted-foreground">gap-3</p>
67
- <div className="flex gap-3 rounded-lg border border-border p-4">
68
- <div className="h-4 flex-1 rounded bg-primary/20" />
69
- <div className="h-4 flex-1 rounded bg-primary/20" />
70
- <div className="h-4 flex-1 rounded bg-primary/20" />
71
- </div>
72
- </div>
73
- </div>
74
- </div>
75
-
76
- {/* Padding */}
77
- <div>
78
- <h3 className="mb-2 text-sm font-medium text-muted-foreground">
79
- Padding: <code className="text-xs">p-4</code>, <code className="text-xs">p-6</code>,{' '}
80
- <code className="text-xs">p-8</code>
81
- </h3>
82
- <div className="flex gap-6">
83
- {(['p-4', 'p-6', 'p-8'] as const).map((padding) => (
84
- <div key={padding} className="flex-1">
85
- <p className="mb-1 text-xs text-muted-foreground">{padding}</p>
86
- <div className={`${padding} rounded-lg border border-border`}>
87
- <div className="h-8 rounded bg-primary/20" />
88
- </div>
89
- </div>
90
- ))}
91
- </div>
92
- </div>
93
- </div>
94
- );
95
- }
96
-
97
- function BorderRadiusScale() {
98
- const radii = [
99
- { label: 'rounded-sm', variable: '--radius-sm', formula: 'calc(var(--radius) - 4px)' },
100
- { label: 'rounded-md', variable: '--radius-md', formula: 'calc(var(--radius) - 2px)' },
101
- { label: 'rounded-lg', variable: '--radius-lg', formula: 'var(--radius)' },
102
- { label: 'rounded-xl', variable: '--radius-xl', formula: 'calc(var(--radius) + 4px)' },
103
- ];
104
-
105
- return (
106
- <div className="space-y-8">
107
- <h2 className="text-xl font-semibold">Border Radius</h2>
108
- <div className="flex flex-wrap gap-6">
109
- {radii.map(({ label, variable, formula }) => (
110
- <div key={label} className="flex flex-col items-center gap-2">
111
- <div className={`flex h-24 w-24 items-center justify-center border border-border bg-primary/10 ${label}`}>
112
- <span className="text-xs text-muted-foreground">{label.replace('rounded-', '')}</span>
113
- </div>
114
- <code className="text-xs">{label}</code>
115
- <span className="text-xs text-muted-foreground">{formula}</span>
116
- </div>
117
- ))}
118
- </div>
119
- </div>
120
- );
121
- }
122
-
123
- function ShadowScale() {
124
- const shadows = ['shadow-sm', 'shadow', 'shadow-md', 'shadow-lg', 'shadow-xl'] as const;
125
-
126
- return (
127
- <div className="space-y-8">
128
- <h2 className="text-xl font-semibold">Shadows</h2>
129
- <div className="flex flex-wrap gap-8">
130
- {shadows.map((shadow) => (
131
- <div key={shadow} className="flex flex-col items-center gap-3">
132
- <div className={`flex h-24 w-24 items-center justify-center rounded-lg bg-background ${shadow}`}>
133
- <span className="text-xs text-muted-foreground">
134
- {shadow === 'shadow' ? 'default' : shadow.replace('shadow-', '')}
135
- </span>
136
- </div>
137
- <code className="text-xs">{shadow}</code>
138
- </div>
139
- ))}
140
- </div>
141
- </div>
142
- );
143
- }
144
-
145
- function LayoutShowcase() {
146
- return (
147
- <div className="space-y-16 p-8">
148
- <SpacingScale />
149
- <BorderRadiusScale />
150
- <ShadowScale />
151
- </div>
152
- );
153
- }
154
-
155
- const meta: Meta = {
156
- title: 'Design System/Layout',
157
- tags: ['!autodocs', '!manifest'],
158
- parameters: {
159
- layout: 'fullscreen',
160
- },
161
- };
162
- export default meta;
163
- type Story = StoryObj;
164
-
165
- export const Default: Story = {
166
- render: () => <LayoutShowcase />,
167
- };