@tomny-dev/uzi 0.1.3 → 0.1.5

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 CHANGED
@@ -11,27 +11,93 @@ pnpm add @tomny-dev/uzi
11
11
  ## Usage
12
12
 
13
13
  ```tsx
14
- import { Button, Card, Modal, useToast } from "@tomny-dev/uzi";
14
+ import { Button, Card, Modal, ThemeProvider, useToast } from "@tomny-dev/uzi";
15
15
  ```
16
16
 
17
+ If you want the packaged component styles, import the exported stylesheet once in your app:
18
+
19
+ ```css
20
+ @import "@tomny-dev/uzi/styles.css";
21
+ ```
22
+
23
+ ## Themes
24
+
25
+ `uzi` ships with built-in light/dark tokens and a small accent palette layer.
26
+
27
+ ```tsx
28
+ "use client";
29
+
30
+ import { Button, ThemeProvider, useTheme } from "@tomny-dev/uzi";
31
+
32
+ function ThemeToggle() {
33
+ const { resolvedTheme, toggleTheme, accent, setAccent } = useTheme();
34
+
35
+ return (
36
+ <div>
37
+ <Button onClick={toggleTheme}>
38
+ {resolvedTheme === "dark" ? "Switch to light" : "Switch to dark"}
39
+ </Button>
40
+ <Button variant="outline" onClick={() => setAccent(accent === "violet" ? "blue" : "violet")}>
41
+ Toggle accent
42
+ </Button>
43
+ </div>
44
+ );
45
+ }
46
+
47
+ export function App() {
48
+ return (
49
+ <ThemeProvider defaultTheme="system" defaultAccent="blue">
50
+ <ThemeToggle />
51
+ </ThemeProvider>
52
+ );
53
+ }
54
+ ```
55
+
56
+ Supported themes:
57
+
58
+ - `light`
59
+ - `dark`
60
+ - `system`
61
+
62
+ Supported accent palettes:
63
+
64
+ - `blue`
65
+ - `cyan`
66
+ - `violet`
67
+ - `emerald`
68
+ - `amber`
69
+ - `rose`
70
+
17
71
  ## Components
18
72
 
19
- | Component | Description |
20
- |--------------|------------------------------------------|
21
- | `Button` | Primary, secondary, outline, ghost variants |
22
- | `Card` | Surface container with tone/padding control |
23
- | `Pill` | Inline badge/tag |
24
- | `Modal` | Accessible overlay dialog |
25
- | `Dropdown` | Select-style dropdown |
26
- | `AppShell` | Responsive layout with collapsible sidebar |
27
- | `SidebarNav` | Sidebar navigation list |
73
+ | Component | Description |
74
+ |---|---|
75
+ | `Avatar` | Profile image with fallback states |
76
+ | `Button` | Primary, secondary, outline, ghost variants |
77
+ | `Card` | Surface container with tone/padding control |
78
+ | `Checkbox` | Checkbox form primitive |
79
+ | `Input` | Text input primitive |
80
+ | `Label` | Form label primitive |
81
+ | `Pill` | Inline badge/tag |
82
+ | `Modal` | Accessible overlay dialog |
83
+ | `Dropdown` | Select-style dropdown |
84
+ | `DropdownMenu` | Radix-based action menu primitives |
85
+ | `AppShell` | Responsive layout with collapsible sidebar |
86
+ | `SidebarNav` | Sidebar navigation list |
87
+ | `TopBar` | Composable header shell for brand, nav triggers, and actions |
88
+ | `ThemeToggleButton` | Reusable light/dark toggle wired to `ThemeProvider` |
89
+ | `ThemeProvider` / `useTheme` | Light/dark + accent palette theming |
28
90
  | `ToastProvider` / `useToast` | Toast notification system |
29
91
 
30
- ## Development
92
+ `TopBar` supports:
31
93
 
32
- ```bash
33
- pnpm install
34
- pnpm dev # watch mode
35
- pnpm build # production build
36
- pnpm lint # type check
37
- ```
94
+ - `brandingLocation="left" | "center"`
95
+ - `isSticky={true | false}`
96
+ - `showThemeToggle`
97
+ - `themeToggleProps`
98
+
99
+ ## Notes
100
+
101
+ - No Tailwind — components use CSS modules internally
102
+ - `"use client"` is handled by the bundle — no need to wrap imports
103
+ - `react` and `react-dom` are peer dependencies, provided by your app