@rowkit/tokens 0.3.0 → 1.0.0-beta.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 +16 -12
- package/dist/color.d.ts +134 -495
- package/dist/css.d.ts +2 -4
- package/dist/index.d.ts +142 -352
- package/dist/index.js +212 -369
- package/dist/index.js.map +1 -1
- package/dist/motion.d.ts +1 -1
- package/dist/radius.d.ts +15 -17
- package/dist/shadow.d.ts +42 -20
- package/dist/tokens.css +111 -232
- package/dist/typography.d.ts +63 -46
- package/package.json +3 -4
- package/dist/blur.d.ts +0 -18
- package/dist/reference.html +0 -1275
package/README.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# @rowkit/tokens
|
|
2
2
|
|
|
3
|
-
[](https://www.npmjs.com/package/@rowkit/tokens)
|
|
4
4
|
[](https://github.com/NikolaiKushner/rowkit/blob/main/LICENSE)
|
|
5
5
|
|
|
6
|
-
The design tokens behind [rowkit](https://www.npmjs.com/package/rowkit) —
|
|
6
|
+
The design tokens behind [rowkit](https://www.npmjs.com/package/rowkit) — the Windows 98 palette, bevels, type, spacing, radii, layers and motion.
|
|
7
7
|
|
|
8
8
|
Usable on its own. Nothing here depends on Vue, so a chart library, a design tool or an email template can read the same values the components use.
|
|
9
9
|
|
|
@@ -12,14 +12,14 @@ Usable on its own. Nothing here depends on Vue, so a chart library, a design too
|
|
|
12
12
|
## Install
|
|
13
13
|
|
|
14
14
|
```bash
|
|
15
|
-
npm i @rowkit/tokens
|
|
15
|
+
npm i @rowkit/tokens@beta
|
|
16
16
|
```
|
|
17
17
|
|
|
18
18
|
## Two layers
|
|
19
19
|
|
|
20
|
-
**Primitives** are the raw
|
|
20
|
+
**Primitives** are the raw palette — the VGA colours and Windows 98's system colours: `--color-vga-navy` is one specific blue and means nothing on its own. **Semantic** tokens name a role — `--color-card`, `--color-muted-foreground`, `--color-border` — and point at a primitive through `var()`.
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
Rebranding is a matter of repointing semantic references rather than hunting hex codes. There is one theme; rowkit has no dark mode.
|
|
23
23
|
|
|
24
24
|
## Use
|
|
25
25
|
|
|
@@ -30,7 +30,7 @@ As a Tailwind v4 theme:
|
|
|
30
30
|
@import '@rowkit/tokens/css';
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
-
Every token becomes a theme value, so `bg-card`, `text-
|
|
33
|
+
Every token becomes a theme value, so `bg-card`, `text-ui`, `p-4` and `shadow-raised` resolve to the scales above.
|
|
34
34
|
|
|
35
35
|
As CSS custom properties, for anything Tailwind does not cover:
|
|
36
36
|
|
|
@@ -46,18 +46,22 @@ Or in TypeScript, fully typed, when a value has to reach JavaScript:
|
|
|
46
46
|
```ts
|
|
47
47
|
import { tokens } from '@rowkit/tokens'
|
|
48
48
|
|
|
49
|
-
tokens.color.
|
|
49
|
+
tokens.color.vga.silver // '#c0c0c0' — the face of every window
|
|
50
50
|
|
|
51
|
-
const series = [tokens.color.
|
|
51
|
+
const series = [tokens.color.vga.navy, tokens.color.vga.green, tokens.color.vga.maroon]
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
-
`tokens` is grouped by scale rather than flattened, so `tokens.color.
|
|
54
|
+
`tokens` is grouped by scale rather than flattened, so `tokens.color.vga.navy` narrows to its literal type and autocompletes at every level.
|
|
55
55
|
|
|
56
56
|
## Notes on the values
|
|
57
57
|
|
|
58
|
-
**Colour is
|
|
58
|
+
**Colour is the exact Windows 98 palette.** Primitives are `#rrggbb` values from the VGA palette and the default Windows 98 scheme, named as in the design's Figma variables.
|
|
59
59
|
|
|
60
|
-
**
|
|
60
|
+
**Depth is bevels, not elevation.** `shadow-raised`, `shadow-sunken`, `shadow-window` and the rest are hard inset lines in the four `bevel-*` colours. Corners are square: the radius scale multiplies `--radius`, which is `0rem` until you set it.
|
|
61
|
+
|
|
62
|
+
**Type is PT Sans and VT323.** The interface is set at 11px (`text-ui`). The font files are not shipped; load `@fontsource/pt-sans` and `@fontsource/vt323` in the app.
|
|
63
|
+
|
|
64
|
+
**Contrast is asserted, not claimed.** Every semantic text pairing is checked against WCAG AA, and every control boundary and focus ring against 3:1, in the package's own tests.
|
|
61
65
|
|
|
62
66
|
**Spacing keys are multiples of 4px.** `4` is 1rem, `2` is 8px — the convention most Vue and Tailwind developers already carry.
|
|
63
67
|
|
|
@@ -67,4 +71,4 @@ const series = [tokens.color.primary[500], tokens.color.success[500]]
|
|
|
67
71
|
|
|
68
72
|
MIT © Nikolai Kushner
|
|
69
73
|
|
|
70
|
-
|
|
74
|
+
The visual language is a tribute to Windows 98. rowkit is not affiliated with or endorsed by Microsoft.
|