tokka 0.2.0 → 0.2.1

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 (71) hide show
  1. package/components/accordion.tsx +55 -0
  2. package/components/alert-dialog.tsx +138 -0
  3. package/components/alert.tsx +58 -0
  4. package/components/aspect-ratio.tsx +5 -0
  5. package/components/avatar.tsx +47 -0
  6. package/components/badge.tsx +35 -0
  7. package/components/breadcrumb.tsx +114 -0
  8. package/components/button.tsx +56 -0
  9. package/components/calendar.tsx +63 -0
  10. package/components/card.tsx +74 -0
  11. package/components/carousel.tsx +259 -0
  12. package/components/chart.tsx +9 -0
  13. package/components/checkbox.tsx +27 -0
  14. package/components/collapsible.tsx +9 -0
  15. package/components/combobox.tsx +8 -0
  16. package/components/command.tsx +152 -0
  17. package/components/context-menu.tsx +197 -0
  18. package/components/data-table.tsx +9 -0
  19. package/components/date-picker.tsx +8 -0
  20. package/components/dialog.tsx +119 -0
  21. package/components/drawer.tsx +115 -0
  22. package/components/dropdown-menu.tsx +197 -0
  23. package/components/form.tsx +175 -0
  24. package/components/hover-card.tsx +26 -0
  25. package/components/input-otp.tsx +68 -0
  26. package/components/input.tsx +48 -0
  27. package/components/label.tsx +23 -0
  28. package/components/lib/utils.ts +6 -0
  29. package/components/menubar.tsx +233 -0
  30. package/components/native-select.tsx +29 -0
  31. package/components/navigation-menu.tsx +127 -0
  32. package/components/pagination.tsx +116 -0
  33. package/components/popover.tsx +28 -0
  34. package/components/progress.tsx +25 -0
  35. package/components/radio-group.tsx +41 -0
  36. package/components/resizable.tsx +42 -0
  37. package/components/scroll-area.tsx +45 -0
  38. package/components/select.tsx +157 -0
  39. package/components/separator.tsx +28 -0
  40. package/components/sheet.tsx +137 -0
  41. package/components/sidebar.tsx +249 -0
  42. package/components/skeleton.tsx +15 -0
  43. package/components/slider.tsx +25 -0
  44. package/components/sonner.tsx +25 -0
  45. package/components/spinner.tsx +33 -0
  46. package/components/switch.tsx +26 -0
  47. package/components/table.tsx +116 -0
  48. package/components/tabs.tsx +52 -0
  49. package/components/textarea.tsx +23 -0
  50. package/components/toggle-group.tsx +58 -0
  51. package/components/toggle.tsx +42 -0
  52. package/components/tooltip.tsx +27 -0
  53. package/dist/index.js +49 -2
  54. package/package.json +4 -2
  55. package/systems/README.md +56 -0
  56. package/systems/accessible/system.json +17 -0
  57. package/systems/accessible/tokens/primitives.json +9 -0
  58. package/systems/accessible/tokens/semantics.json +11 -0
  59. package/systems/brutalist/system.json +17 -0
  60. package/systems/brutalist/tokens/primitives.json +10 -0
  61. package/systems/brutalist/tokens/semantics.json +12 -0
  62. package/systems/corporate/system.json +20 -0
  63. package/systems/corporate/tokens/primitives.json +60 -0
  64. package/systems/corporate/tokens/semantics.json +68 -0
  65. package/systems/dark-mode/system.json +17 -0
  66. package/systems/dark-mode/tokens/primitives.json +10 -0
  67. package/systems/dark-mode/tokens/semantics.json +11 -0
  68. package/systems/package.json +14 -0
  69. package/systems/soft-saas/system.json +20 -0
  70. package/systems/soft-saas/tokens/primitives.json +235 -0
  71. package/systems/soft-saas/tokens/semantics.json +190 -0
@@ -0,0 +1,25 @@
1
+ import { Toaster as Sonner } from "sonner"
2
+
3
+ type ToasterProps = React.ComponentProps<typeof Sonner>
4
+
5
+ const Toaster = ({ ...props }: ToasterProps) => {
6
+ return (
7
+ <Sonner
8
+ className="toaster group"
9
+ toastOptions={{
10
+ classNames: {
11
+ toast:
12
+ "group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",
13
+ description: "group-[.toast]:text-muted-foreground",
14
+ actionButton:
15
+ "group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",
16
+ cancelButton:
17
+ "group-[.toast]:bg-muted group-[.toast]:text-muted-foreground",
18
+ },
19
+ }}
20
+ {...props}
21
+ />
22
+ )
23
+ }
24
+
25
+ export { Toaster }
@@ -0,0 +1,33 @@
1
+ import * as React from "react"
2
+ import { Loader2 } from "lucide-react"
3
+ import { cva, type VariantProps } from "class-variance-authority"
4
+ import { cn } from "./lib/utils"
5
+
6
+ const spinnerVariants = cva("animate-spin text-muted-foreground", {
7
+ variants: {
8
+ size: {
9
+ default: "size-4",
10
+ sm: "size-3",
11
+ lg: "size-6",
12
+ xl: "size-8",
13
+ },
14
+ },
15
+ defaultVariants: {
16
+ size: "default",
17
+ },
18
+ })
19
+
20
+ export interface SpinnerProps
21
+ extends React.HTMLAttributes<HTMLDivElement>,
22
+ VariantProps<typeof spinnerVariants> {}
23
+
24
+ const Spinner = React.forwardRef<HTMLDivElement, SpinnerProps>(
25
+ ({ className, size, ...props }, ref) => (
26
+ <div ref={ref} {...props}>
27
+ <Loader2 className={cn(spinnerVariants({ size }), className)} />
28
+ </div>
29
+ )
30
+ )
31
+ Spinner.displayName = "Spinner"
32
+
33
+ export { Spinner }
@@ -0,0 +1,26 @@
1
+ import * as React from "react"
2
+ import * as SwitchPrimitives from "@radix-ui/react-switch"
3
+ import { cn } from "./lib/utils"
4
+
5
+ const Switch = React.forwardRef<
6
+ React.ElementRef<typeof SwitchPrimitives.Root>,
7
+ React.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root>
8
+ >(({ className, ...props }, ref) => (
9
+ <SwitchPrimitives.Root
10
+ className={cn(
11
+ "peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",
12
+ className
13
+ )}
14
+ {...props}
15
+ ref={ref}
16
+ >
17
+ <SwitchPrimitives.Thumb
18
+ className={cn(
19
+ "pointer-events-none block size-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0"
20
+ )}
21
+ />
22
+ </SwitchPrimitives.Root>
23
+ ))
24
+ Switch.displayName = SwitchPrimitives.Root.displayName
25
+
26
+ export { Switch }
@@ -0,0 +1,116 @@
1
+ import * as React from "react"
2
+ import { cn } from "./lib/utils"
3
+
4
+ const Table = React.forwardRef<
5
+ HTMLTableElement,
6
+ React.HTMLAttributes<HTMLTableElement>
7
+ >(({ className, ...props }, ref) => (
8
+ <div className="relative w-full overflow-auto">
9
+ <table
10
+ ref={ref}
11
+ className={cn("w-full caption-bottom text-sm", className)}
12
+ {...props}
13
+ />
14
+ </div>
15
+ ))
16
+ Table.displayName = "Table"
17
+
18
+ const TableHeader = React.forwardRef<
19
+ HTMLTableSectionElement,
20
+ React.HTMLAttributes<HTMLTableSectionElement>
21
+ >(({ className, ...props }, ref) => (
22
+ <thead ref={ref} className={cn("[&_tr]:border-b", className)} {...props} />
23
+ ))
24
+ TableHeader.displayName = "TableHeader"
25
+
26
+ const TableBody = React.forwardRef<
27
+ HTMLTableSectionElement,
28
+ React.HTMLAttributes<HTMLTableSectionElement>
29
+ >(({ className, ...props }, ref) => (
30
+ <tbody
31
+ ref={ref}
32
+ className={cn("[&_tr:last-child]:border-0", className)}
33
+ {...props}
34
+ />
35
+ ))
36
+ TableBody.displayName = "TableBody"
37
+
38
+ const TableFooter = React.forwardRef<
39
+ HTMLTableSectionElement,
40
+ React.HTMLAttributes<HTMLTableSectionElement>
41
+ >(({ className, ...props }, ref) => (
42
+ <tfoot
43
+ ref={ref}
44
+ className={cn(
45
+ "border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",
46
+ className
47
+ )}
48
+ {...props}
49
+ />
50
+ ))
51
+ TableFooter.displayName = "TableFooter"
52
+
53
+ const TableRow = React.forwardRef<
54
+ HTMLTableRowElement,
55
+ React.HTMLAttributes<HTMLTableRowElement>
56
+ >(({ className, ...props }, ref) => (
57
+ <tr
58
+ ref={ref}
59
+ className={cn(
60
+ "border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",
61
+ className
62
+ )}
63
+ {...props}
64
+ />
65
+ ))
66
+ TableRow.displayName = "TableRow"
67
+
68
+ const TableHead = React.forwardRef<
69
+ HTMLTableCellElement,
70
+ React.ThHTMLAttributes<HTMLTableCellElement>
71
+ >(({ className, ...props }, ref) => (
72
+ <th
73
+ ref={ref}
74
+ className={cn(
75
+ "h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",
76
+ className
77
+ )}
78
+ {...props}
79
+ />
80
+ ))
81
+ TableHead.displayName = "TableHead"
82
+
83
+ const TableCell = React.forwardRef<
84
+ HTMLTableCellElement,
85
+ React.TdHTMLAttributes<HTMLTableCellElement>
86
+ >(({ className, ...props }, ref) => (
87
+ <td
88
+ ref={ref}
89
+ className={cn("p-4 align-middle [&:has([role=checkbox])]:pr-0", className)}
90
+ {...props}
91
+ />
92
+ ))
93
+ TableCell.displayName = "TableCell"
94
+
95
+ const TableCaption = React.forwardRef<
96
+ HTMLTableCaptionElement,
97
+ React.HTMLAttributes<HTMLTableCaptionElement>
98
+ >(({ className, ...props }, ref) => (
99
+ <caption
100
+ ref={ref}
101
+ className={cn("mt-4 text-sm text-muted-foreground", className)}
102
+ {...props}
103
+ />
104
+ ))
105
+ TableCaption.displayName = "TableCaption"
106
+
107
+ export {
108
+ Table,
109
+ TableHeader,
110
+ TableBody,
111
+ TableFooter,
112
+ TableHead,
113
+ TableRow,
114
+ TableCell,
115
+ TableCaption,
116
+ }
@@ -0,0 +1,52 @@
1
+ import * as React from "react"
2
+ import * as TabsPrimitive from "@radix-ui/react-tabs"
3
+ import { cn } from "./lib/utils"
4
+
5
+ const Tabs = TabsPrimitive.Root
6
+
7
+ const TabsList = React.forwardRef<
8
+ React.ElementRef<typeof TabsPrimitive.List>,
9
+ React.ComponentPropsWithoutRef<typeof TabsPrimitive.List>
10
+ >(({ className, ...props }, ref) => (
11
+ <TabsPrimitive.List
12
+ ref={ref}
13
+ className={cn(
14
+ "inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",
15
+ className
16
+ )}
17
+ {...props}
18
+ />
19
+ ))
20
+ TabsList.displayName = TabsPrimitive.List.displayName
21
+
22
+ const TabsTrigger = React.forwardRef<
23
+ React.ElementRef<typeof TabsPrimitive.Trigger>,
24
+ React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>
25
+ >(({ className, ...props }, ref) => (
26
+ <TabsPrimitive.Trigger
27
+ ref={ref}
28
+ className={cn(
29
+ "inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",
30
+ className
31
+ )}
32
+ {...props}
33
+ />
34
+ ))
35
+ TabsTrigger.displayName = TabsPrimitive.Trigger.displayName
36
+
37
+ const TabsContent = React.forwardRef<
38
+ React.ElementRef<typeof TabsPrimitive.Content>,
39
+ React.ComponentPropsWithoutRef<typeof TabsPrimitive.Content>
40
+ >(({ className, ...props }, ref) => (
41
+ <TabsPrimitive.Content
42
+ ref={ref}
43
+ className={cn(
44
+ "mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
45
+ className
46
+ )}
47
+ {...props}
48
+ />
49
+ ))
50
+ TabsContent.displayName = TabsPrimitive.Content.displayName
51
+
52
+ export { Tabs, TabsList, TabsTrigger, TabsContent }
@@ -0,0 +1,23 @@
1
+ import * as React from "react"
2
+ import { cn } from "./lib/utils"
3
+
4
+ export interface TextareaProps
5
+ extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {}
6
+
7
+ const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(
8
+ ({ className, ...props }, ref) => {
9
+ return (
10
+ <textarea
11
+ className={cn(
12
+ "flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
13
+ className
14
+ )}
15
+ ref={ref}
16
+ {...props}
17
+ />
18
+ )
19
+ }
20
+ )
21
+ Textarea.displayName = "Textarea"
22
+
23
+ export { Textarea }
@@ -0,0 +1,58 @@
1
+ import * as React from "react"
2
+ import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group"
3
+ import { type VariantProps } from "class-variance-authority"
4
+ import { cn } from "./lib/utils"
5
+ import { toggleVariants } from "./toggle"
6
+
7
+ const ToggleGroupContext = React.createContext<
8
+ VariantProps<typeof toggleVariants>
9
+ >({
10
+ size: "default",
11
+ variant: "default",
12
+ })
13
+
14
+ const ToggleGroup = React.forwardRef<
15
+ React.ElementRef<typeof ToggleGroupPrimitive.Root>,
16
+ React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Root> &
17
+ VariantProps<typeof toggleVariants>
18
+ >(({ className, variant, size, children, ...props }, ref) => (
19
+ <ToggleGroupPrimitive.Root
20
+ ref={ref}
21
+ className={cn("flex items-center justify-center gap-1", className)}
22
+ {...props}
23
+ >
24
+ <ToggleGroupContext.Provider value={{ variant, size }}>
25
+ {children}
26
+ </ToggleGroupContext.Provider>
27
+ </ToggleGroupPrimitive.Root>
28
+ ))
29
+
30
+ ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName
31
+
32
+ const ToggleGroupItem = React.forwardRef<
33
+ React.ElementRef<typeof ToggleGroupPrimitive.Item>,
34
+ React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Item> &
35
+ VariantProps<typeof toggleVariants>
36
+ >(({ className, children, variant, size, ...props }, ref) => {
37
+ const context = React.useContext(ToggleGroupContext)
38
+
39
+ return (
40
+ <ToggleGroupPrimitive.Item
41
+ ref={ref}
42
+ className={cn(
43
+ toggleVariants({
44
+ variant: context.variant || variant,
45
+ size: context.size || size,
46
+ }),
47
+ className
48
+ )}
49
+ {...props}
50
+ >
51
+ {children}
52
+ </ToggleGroupPrimitive.Item>
53
+ )
54
+ })
55
+
56
+ ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName
57
+
58
+ export { ToggleGroup, ToggleGroupItem }
@@ -0,0 +1,42 @@
1
+ import * as React from "react"
2
+ import * as TogglePrimitive from "@radix-ui/react-toggle"
3
+ import { cva, type VariantProps } from "class-variance-authority"
4
+ import { cn } from "./lib/utils"
5
+
6
+ const toggleVariants = cva(
7
+ "inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",
8
+ {
9
+ variants: {
10
+ variant: {
11
+ default: "bg-transparent",
12
+ outline:
13
+ "border border-input bg-transparent hover:bg-accent hover:text-accent-foreground",
14
+ },
15
+ size: {
16
+ default: "h-10 px-3",
17
+ sm: "h-9 px-2.5",
18
+ lg: "h-11 px-5",
19
+ },
20
+ },
21
+ defaultVariants: {
22
+ variant: "default",
23
+ size: "default",
24
+ },
25
+ }
26
+ )
27
+
28
+ const Toggle = React.forwardRef<
29
+ React.ElementRef<typeof TogglePrimitive.Root>,
30
+ React.ComponentPropsWithoutRef<typeof TogglePrimitive.Root> &
31
+ VariantProps<typeof toggleVariants>
32
+ >(({ className, variant, size, ...props }, ref) => (
33
+ <TogglePrimitive.Root
34
+ ref={ref}
35
+ className={cn(toggleVariants({ variant, size, className }))}
36
+ {...props}
37
+ />
38
+ ))
39
+
40
+ Toggle.displayName = TogglePrimitive.Root.displayName
41
+
42
+ export { Toggle, toggleVariants }
@@ -0,0 +1,27 @@
1
+ import * as React from "react"
2
+ import * as TooltipPrimitive from "@radix-ui/react-tooltip"
3
+ import { cn } from "./lib/utils"
4
+
5
+ const TooltipProvider = TooltipPrimitive.Provider
6
+
7
+ const Tooltip = TooltipPrimitive.Root
8
+
9
+ const TooltipTrigger = TooltipPrimitive.Trigger
10
+
11
+ const TooltipContent = React.forwardRef<
12
+ React.ElementRef<typeof TooltipPrimitive.Content>,
13
+ React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>
14
+ >(({ className, sideOffset = 4, ...props }, ref) => (
15
+ <TooltipPrimitive.Content
16
+ ref={ref}
17
+ sideOffset={sideOffset}
18
+ className={cn(
19
+ "z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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",
20
+ className
21
+ )}
22
+ {...props}
23
+ />
24
+ ))
25
+ TooltipContent.displayName = TooltipPrimitive.Content.displayName
26
+
27
+ export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider }
package/dist/index.js CHANGED
@@ -131,10 +131,57 @@ import kleur2 from "kleur";
131
131
  var __filename2 = fileURLToPath2(import.meta.url);
132
132
  var __dirname2 = path2.dirname(__filename2);
133
133
  var COMPONENT_REGISTRY = {
134
+ accordion: "accordion.tsx",
135
+ alert: "alert.tsx",
136
+ "alert-dialog": "alert-dialog.tsx",
137
+ "aspect-ratio": "aspect-ratio.tsx",
138
+ avatar: "avatar.tsx",
139
+ badge: "badge.tsx",
140
+ breadcrumb: "breadcrumb.tsx",
134
141
  button: "button.tsx",
142
+ calendar: "calendar.tsx",
143
+ card: "card.tsx",
144
+ carousel: "carousel.tsx",
145
+ chart: "chart.tsx",
146
+ checkbox: "checkbox.tsx",
147
+ collapsible: "collapsible.tsx",
148
+ combobox: "combobox.tsx",
149
+ command: "command.tsx",
150
+ "context-menu": "context-menu.tsx",
151
+ "data-table": "data-table.tsx",
152
+ "date-picker": "date-picker.tsx",
153
+ dialog: "dialog.tsx",
154
+ drawer: "drawer.tsx",
155
+ "dropdown-menu": "dropdown-menu.tsx",
156
+ form: "form.tsx",
157
+ "hover-card": "hover-card.tsx",
135
158
  input: "input.tsx",
136
- card: "card.tsx"
137
- // Will add more components later
159
+ "input-otp": "input-otp.tsx",
160
+ label: "label.tsx",
161
+ menubar: "menubar.tsx",
162
+ "native-select": "native-select.tsx",
163
+ "navigation-menu": "navigation-menu.tsx",
164
+ pagination: "pagination.tsx",
165
+ popover: "popover.tsx",
166
+ progress: "progress.tsx",
167
+ "radio-group": "radio-group.tsx",
168
+ resizable: "resizable.tsx",
169
+ "scroll-area": "scroll-area.tsx",
170
+ select: "select.tsx",
171
+ separator: "separator.tsx",
172
+ sheet: "sheet.tsx",
173
+ sidebar: "sidebar.tsx",
174
+ skeleton: "skeleton.tsx",
175
+ slider: "slider.tsx",
176
+ sonner: "sonner.tsx",
177
+ spinner: "spinner.tsx",
178
+ switch: "switch.tsx",
179
+ table: "table.tsx",
180
+ tabs: "tabs.tsx",
181
+ textarea: "textarea.tsx",
182
+ toggle: "toggle.tsx",
183
+ "toggle-group": "toggle-group.tsx",
184
+ tooltip: "tooltip.tsx"
138
185
  };
139
186
  async function addCommand(components) {
140
187
  const cwd = process.cwd();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tokka",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "type": "module",
5
5
  "description": "A shadcn-compatible UI foundation with a real token system and optional Figma exports",
6
6
  "bin": "./dist/index.js",
@@ -11,7 +11,9 @@
11
11
  }
12
12
  },
13
13
  "files": [
14
- "dist"
14
+ "dist",
15
+ "systems",
16
+ "components"
15
17
  ],
16
18
  "scripts": {
17
19
  "build": "tsup src/index.ts --format esm --dts --clean",
@@ -0,0 +1,56 @@
1
+ # Design Systems
2
+
3
+ This directory contains starter design systems for tokka.
4
+
5
+ ## v1 Systems
6
+
7
+ 1. **soft-saas** (default) - Low contrast, friendly, rounded
8
+ 2. **corporate** - High contrast, sharp, dense, professional
9
+ 3. **dark-mode** - Dark-first design with vibrant accents
10
+ 4. **accessible** - WCAG AAA compliant, high contrast
11
+ 5. **brutalist** - Raw aesthetic, no radius, bold
12
+
13
+ ## System Structure
14
+
15
+ Each system directory contains:
16
+
17
+ ```
18
+ system-name/
19
+ ├── system.json # System metadata
20
+ ├── tokens/
21
+ │ ├── primitives.json # Primitive tokens
22
+ │ ├── semantics.json # Semantic tokens
23
+ │ └── components/ # Component tokens (optional, Tier 2)
24
+ └── preview/ # Preview assets
25
+ ├── thumbnail.png
26
+ └── README.md
27
+ ```
28
+
29
+ ## Contributing Systems
30
+
31
+ The registry format supports 100+ systems. To contribute:
32
+
33
+ 1. Follow the system quality bar:
34
+ - Coherent color strategy (brand + neutrals + semantic states)
35
+ - Typography set (body + heading scales)
36
+ - Spacing, radius, motion, shadow policies
37
+
38
+ 2. Test your system:
39
+ ```bash
40
+ tokka init --system your-system
41
+ tokka build
42
+ ```
43
+
44
+ 3. Submit a PR with your system directory
45
+
46
+ ## System Quality Bar
47
+
48
+ Each system must include:
49
+ - Brand colors + neutral palette
50
+ - Semantic states (success, warning, error, info)
51
+ - Typography scale
52
+ - Spacing scale
53
+ - Radius policy
54
+ - Motion policy
55
+ - Shadow/elevation policy
56
+ - Both light and dark modes
@@ -0,0 +1,17 @@
1
+ {
2
+ "id": "accessible",
3
+ "name": "Accessible",
4
+ "description": "WCAG AAA compliant - high contrast, large text, clear focus states",
5
+ "tags": ["accessibility", "wcag", "high-contrast"],
6
+ "modes": ["light", "dark"],
7
+ "policies": {
8
+ "radius": "rounded",
9
+ "density": "spacious",
10
+ "contrast": "high",
11
+ "motion": "none"
12
+ },
13
+ "defaults": {
14
+ "font": "system-ui",
15
+ "iconStyle": "solid"
16
+ }
17
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "tokens": [
3
+ {"id": "color.black", "type": "color", "description": "Black", "source": "primitive", "value": "0 0% 0%"},
4
+ {"id": "color.white", "type": "color", "description": "White", "source": "primitive", "value": "0 0% 100%"},
5
+ {"id": "color.blue.700", "type": "color", "description": "Dark blue", "source": "primitive", "value": "220 90% 35%"},
6
+ {"id": "space.6", "type": "dimension", "description": "Spacious", "source": "primitive", "value": "1.5rem"},
7
+ {"id": "radius.md", "type": "radius", "description": "Medium radius", "source": "primitive", "value": "0.375rem"}
8
+ ]
9
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "tokens": [
3
+ {"id": "surface.brand", "type": "color", "description": "Brand", "source": "semantic", "references": ["color.blue.700"], "modes": {"light": "220 90% 35%", "dark": "220 90% 55%"}},
4
+ {"id": "surface.default", "type": "color", "description": "Background", "source": "semantic", "modes": {"light": "0 0% 100%", "dark": "0 0% 0%"}},
5
+ {"id": "text.default", "type": "color", "description": "Text", "source": "semantic", "modes": {"light": "0 0% 0%", "dark": "0 0% 100%"}},
6
+ {"id": "text.on-brand", "type": "color", "description": "Text on brand", "source": "semantic", "references": ["color.white"], "value": "0 0% 100%"},
7
+ {"id": "border.default", "type": "color", "description": "Border", "source": "semantic", "modes": {"light": "0 0% 20%", "dark": "0 0% 80%"}},
8
+ {"id": "radius.default", "type": "radius", "description": "Default radius", "source": "semantic", "references": ["radius.md"], "value": "0.375rem"},
9
+ {"id": "space.default", "type": "dimension", "description": "Spacious", "source": "semantic", "references": ["space.6"], "value": "1.5rem"}
10
+ ]
11
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "id": "brutalist",
3
+ "name": "Brutalist",
4
+ "description": "Raw aesthetic - no radius, bold colors, no shadows, stark contrast",
5
+ "tags": ["brutalist", "bold", "stark", "raw"],
6
+ "modes": ["light", "dark"],
7
+ "policies": {
8
+ "radius": "sharp",
9
+ "density": "comfortable",
10
+ "contrast": "high",
11
+ "motion": "none"
12
+ },
13
+ "defaults": {
14
+ "font": "monospace",
15
+ "iconStyle": "solid"
16
+ }
17
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "tokens": [
3
+ {"id": "color.black", "type": "color", "description": "Black", "source": "primitive", "value": "0 0% 0%"},
4
+ {"id": "color.white", "type": "color", "description": "White", "source": "primitive", "value": "0 0% 100%"},
5
+ {"id": "color.yellow.400", "type": "color", "description": "Bold yellow", "source": "primitive", "value": "45 100% 50%"},
6
+ {"id": "color.red.600", "type": "color", "description": "Bold red", "source": "primitive", "value": "0 100% 45%"},
7
+ {"id": "space.4", "type": "dimension", "description": "Base spacing", "source": "primitive", "value": "1rem"},
8
+ {"id": "radius.none", "type": "radius", "description": "No radius", "source": "primitive", "value": "0"}
9
+ ]
10
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "tokens": [
3
+ {"id": "surface.brand", "type": "color", "description": "Brand", "source": "semantic", "references": ["color.yellow.400"], "modes": {"light": "45 100% 50%", "dark": "45 100% 55%"}},
4
+ {"id": "surface.default", "type": "color", "description": "Background", "source": "semantic", "modes": {"light": "0 0% 100%", "dark": "0 0% 0%"}},
5
+ {"id": "surface.destructive", "type": "color", "description": "Destructive", "source": "semantic", "references": ["color.red.600"], "value": "0 100% 45%"},
6
+ {"id": "text.default", "type": "color", "description": "Text", "source": "semantic", "modes": {"light": "0 0% 0%", "dark": "0 0% 100%"}},
7
+ {"id": "text.on-brand", "type": "color", "description": "Text on brand", "source": "semantic", "references": ["color.black"], "value": "0 0% 0%"},
8
+ {"id": "border.default", "type": "color", "description": "Bold border", "source": "semantic", "modes": {"light": "0 0% 0%", "dark": "0 0% 100%"}},
9
+ {"id": "radius.default", "type": "radius", "description": "No radius", "source": "semantic", "references": ["radius.none"], "value": "0"},
10
+ {"id": "space.default", "type": "dimension", "description": "Spacing", "source": "semantic", "references": ["space.4"], "value": "1rem"}
11
+ ]
12
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "id": "corporate",
3
+ "name": "Corporate",
4
+ "description": "High contrast, sharp edges, dense spacing - designed for enterprise applications",
5
+ "tags": ["enterprise", "sharp", "dense", "professional"],
6
+ "modes": ["light", "dark"],
7
+ "policies": {
8
+ "radius": "sharp",
9
+ "density": "compact",
10
+ "contrast": "high",
11
+ "motion": "none"
12
+ },
13
+ "defaults": {
14
+ "font": "system-ui",
15
+ "iconStyle": "solid"
16
+ },
17
+ "figma": {
18
+ "collections": ["Color", "Typography", "Space"]
19
+ }
20
+ }