@okja/chi-tokens 0.3.0 → 0.3.10

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,116 @@
1
+ # @okja/chi-tokens
2
+
3
+ Design tokens for the Chi design system - colors, typography, spacing, radius, shadow, and motion.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @okja/chi-tokens
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ### Import all tokens
14
+
15
+ ```javascript
16
+ import tokens from '@okja/chi-tokens';
17
+
18
+ console.log(tokens.spacing[4]); // "16px"
19
+ console.log(tokens.radius.md); // "12px"
20
+ ```
21
+
22
+ ### Import specific color palettes
23
+
24
+ ```javascript
25
+ import grayscale from '@okja/chi-tokens/colors/grayscale';
26
+ import blue from '@okja/chi-tokens/colors/blue';
27
+ import purple from '@okja/chi-tokens/colors/purple';
28
+
29
+ console.log(grayscale.light.primary); // "oklch(49.4% 0.163 264.05)"
30
+ console.log(grayscale.dark.surface); // "oklch(15% 0.005 264.05)"
31
+ ```
32
+
33
+ ## Available Tokens
34
+
35
+ ### Typography
36
+
37
+ | Token | Values |
38
+ |-------|--------|
39
+ | `font-family` | `sans`, `serif`, `mono` |
40
+ | `font-size` | `1`-`9` (12px-60px) |
41
+ | `font-weight` | `light`, `regular`, `medium`, `bold` |
42
+ | `line-height` | `1`-`9` (16px-60px) |
43
+ | `letter-spacing` | `1`-`3` |
44
+
45
+ ### Spacing
46
+
47
+ | Token | Value |
48
+ |-------|-------|
49
+ | `1` | 4px |
50
+ | `2` | 8px |
51
+ | `3` | 12px |
52
+ | `4` | 16px |
53
+ | `5` | 24px |
54
+ | `6` | 32px |
55
+ | `7` | 40px |
56
+ | `8` | 48px |
57
+ | `9` | 64px |
58
+
59
+ ### Radius
60
+
61
+ | Token | Value |
62
+ |-------|-------|
63
+ | `none` | 0 |
64
+ | `xs` | 4px |
65
+ | `sm` | 8px |
66
+ | `md` | 12px |
67
+ | `lg` | 16px |
68
+ | `xl` | 28px |
69
+ | `full` | 9999px |
70
+
71
+ ### Shadow
72
+
73
+ Shadows are provided for both `light` and `dark` modes with levels `1`-`5`.
74
+
75
+ ```javascript
76
+ tokens.shadow.light[3] // Light mode, level 3
77
+ tokens.shadow.dark[3] // Dark mode, level 3
78
+ ```
79
+
80
+ ### Motion
81
+
82
+ | Token | Values |
83
+ |-------|--------|
84
+ | `duration` | `instant`, `short1`-`short4`, `medium1`-`medium4`, `long1`-`long4`, `extra-long1`-`extra-long4` |
85
+ | `easing` | `linear`, `ease`, `ease-in`, `ease-out`, `ease-in-out`, `standard`, `emphasized`, etc. |
86
+
87
+ ### Other
88
+
89
+ | Token | Description |
90
+ |-------|-------------|
91
+ | `container` | Max-width breakpoints (`1`-`4`) |
92
+ | `icon-size` | Icon sizes (`sm`, `md`, `lg`, `xl`) |
93
+ | `scaling` | Scale factors (`90`-`110`) |
94
+ | `radius-factor` | Radius multipliers (`none`, `small`, `medium`, `large`) |
95
+
96
+ ## Color Palettes
97
+
98
+ Each color palette (`grayscale`, `blue`, `purple`) includes light and dark mode variants:
99
+
100
+ **Primary colors**: `primary`, `on-primary`, `primary-container`, `on-primary-container`
101
+
102
+ **Secondary colors**: `secondary`, `on-secondary`, `secondary-container`, `on-secondary-container`
103
+
104
+ **Tertiary colors**: `tertiary`, `on-tertiary`, `tertiary-container`, `on-tertiary-container`
105
+
106
+ **Error colors**: `error`, `on-error`, `error-container`, `on-error-container`
107
+
108
+ **Surface colors**: `surface`, `on-surface`, `surface-variant`, `on-surface-variant`, `surface-container`, `surface-container-low`, `surface-container-high`, `surface-container-highest`
109
+
110
+ **Utility colors**: `outline`, `outline-variant`, `inverse-surface`, `inverse-on-surface`, `inverse-primary`, `scrim`, `shadow`
111
+
112
+ Colors use the OKLCH color space for perceptual uniformity.
113
+
114
+ ## License
115
+
116
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@okja/chi-tokens",
3
- "version": "0.3.0",
3
+ "version": "0.3.10",
4
4
  "description": "Design tokens - colors, typography, spacing, radius, shadow, motion",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -10,10 +10,11 @@
10
10
  },
11
11
  "repository": {
12
12
  "type": "git",
13
- "url": "https://github.com/okja-engineering/chi-tokens"
13
+ "url": "git+https://github.com/Okja-Engineering/chi-tokens.git"
14
14
  },
15
15
  "publishConfig": {
16
- "access": "public"
16
+ "access": "public",
17
+ "provenance": true
17
18
  },
18
19
  "exports": {
19
20
  ".": "./src/tokens.json",
package/src/tokens.json CHANGED
@@ -131,5 +131,14 @@
131
131
  "small": 0.75,
132
132
  "medium": 1,
133
133
  "large": 1.5
134
+ },
135
+ "cursor": {
136
+ "default": "default",
137
+ "pointer": "pointer",
138
+ "not-allowed": "not-allowed",
139
+ "text": "text",
140
+ "move": "move",
141
+ "grab": "grab",
142
+ "grabbing": "grabbing"
134
143
  }
135
144
  }