@okja/chi-themes 0.1.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/README.md ADDED
@@ -0,0 +1,122 @@
1
+ # @okja/chi-themes
2
+
3
+ Pre-composed CSS themes built on Chi Design System tokens. Import one file and get reset, tokens, and base styles.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @okja/chi-themes
9
+ ```
10
+
11
+ ## Quick Start
12
+
13
+ ```css
14
+ @import '@okja/chi-themes/default.css';
15
+ ```
16
+
17
+ Or in HTML:
18
+
19
+ ```html
20
+ <link rel="stylesheet" href="node_modules/@okja/chi-themes/dist/default.css">
21
+ ```
22
+
23
+ ## Available Themes
24
+
25
+ | Theme | Description |
26
+ |-------|-------------|
27
+ | `default.css` | Grayscale - wireframing, prototyping |
28
+ | `blue.css` | Corporate blue - healthcare, enterprise |
29
+ | `purple.css` | Creative purple - consumer apps |
30
+ | `reset.css` | Reset only - bring your own tokens |
31
+
32
+ ## Using Tokens
33
+
34
+ All themes include design tokens:
35
+
36
+ ```css
37
+ .card {
38
+ background: var(--color-surface-container);
39
+ padding: var(--space-4);
40
+ border-radius: var(--radius-md);
41
+ box-shadow: var(--shadow-2);
42
+ }
43
+
44
+ .button {
45
+ background: var(--color-primary);
46
+ color: var(--color-on-primary);
47
+ font-family: var(--font-sans);
48
+ padding: var(--space-2) var(--space-4);
49
+ border-radius: var(--radius-sm);
50
+ transition: opacity var(--duration-short2) var(--easing-standard);
51
+ }
52
+ ```
53
+
54
+ ### Available Tokens
55
+
56
+ **Colors** (auto light/dark via `prefers-color-scheme`)
57
+ - `--color-primary`, `--color-on-primary`
58
+ - `--color-secondary`, `--color-on-secondary`
59
+ - `--color-tertiary`, `--color-on-tertiary`
60
+ - `--color-error`, `--color-on-error`
61
+ - `--color-surface`, `--color-on-surface`
62
+ - `--color-surface-container`, `--color-surface-container-high`
63
+ - `--color-background`, `--color-outline`
64
+
65
+ **Spacing** (9-step scale)
66
+ - `--space-1` (4px) through `--space-9` (64px)
67
+
68
+ **Typography**
69
+ - `--font-sans`, `--font-serif`, `--font-mono`
70
+ - `--font-size-1` (12px) through `--font-size-9` (60px)
71
+ - `--font-weight-light`, `--font-weight-regular`, `--font-weight-medium`, `--font-weight-bold`
72
+ - `--line-height-1` through `--line-height-9`
73
+
74
+ **Border Radius**
75
+ - `--radius-none`, `--radius-xs`, `--radius-sm`, `--radius-md`, `--radius-lg`, `--radius-xl`, `--radius-full`
76
+
77
+ **Shadows**
78
+ - `--shadow-0` (none) through `--shadow-5`
79
+
80
+ **Motion**
81
+ - `--duration-short1` (50ms) through `--duration-extra-long4` (1000ms)
82
+ - `--easing-standard`, `--easing-emphasized`, `--easing-linear`
83
+
84
+ ## Dark Mode
85
+
86
+ Colors adapt automatically via `prefers-color-scheme`. No configuration needed.
87
+
88
+ ## Customization
89
+
90
+ ### Scaling
91
+
92
+ ```html
93
+ <html data-scaling="110%">
94
+ ```
95
+
96
+ Options: `90%`, `95%`, `100%` (default), `105%`, `110%`
97
+
98
+ ### Border Radius
99
+
100
+ ```html
101
+ <html data-radius="large">
102
+ ```
103
+
104
+ Options: `none`, `small`, `medium` (default), `large`
105
+
106
+ ## Architecture
107
+
108
+ Each theme uses CSS Cascade Layers:
109
+
110
+ ```css
111
+ @layer reset, tokens, base;
112
+ ```
113
+
114
+ - **reset** - Normalize browser defaults
115
+ - **tokens** - Design tokens from @okja/chi-tokens
116
+ - **base** - Typography, links, focus states
117
+
118
+ Your styles layer on top, giving you full cascade control.
119
+
120
+ ## License
121
+
122
+ MIT