@tollerud/ui 1.0.2 → 1.0.3

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 (2) hide show
  1. package/README.md +36 -4
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -4,6 +4,10 @@ A complete, browsable UI library built around **monochrome + yellow accent**. No
4
4
 
5
5
  **[Live docs →](https://tollerud.github.io/design-system/)** — browse every token, component, and pattern live with copy-paste code.
6
6
 
7
+ **Requirements:** React ≥ 18 · TypeScript supported (types included) · Tailwind CSS v3 or v4
8
+
9
+ → **[Component reference →](COMPONENTS.md)** · **[Setup guide →](GETTING_STARTED.md)** · **[Changelog →](CHANGELOG.md)**
10
+
7
11
  ## Philosophy
8
12
 
9
13
  > Clean lines. Sharp contrast. Yellow where it counts.
@@ -15,12 +19,16 @@ Tollerud DS is minimal but not cold. It uses a near-black foundation with warm y
15
19
  ### npm package (recommended)
16
20
 
17
21
  ```bash
18
- npm install @tollerud/ui clsx tailwind-merge
19
- # Optional — for NoirGlowBackground:
22
+ npm install @tollerud/ui clsx tailwind-merge tailwindcss
23
+ ```
24
+
25
+ `@paper-design/shaders-react` is an **optional** peer dependency — the package installs and works without it. Install it only if you use `NoirGlowBackground`; all other components fall back to CSS automatically.
26
+
27
+ ```bash
20
28
  npm install @paper-design/shaders-react
21
29
  ```
22
30
 
23
- **Tailwind** — add the preset in `tailwind.config.ts`:
31
+ **Tailwind v3** — add the preset in `tailwind.config.ts`:
24
32
 
25
33
  ```ts
26
34
  import type { Config } from 'tailwindcss'
@@ -37,6 +45,28 @@ const config: Config = {
37
45
  export default config
38
46
  ```
39
47
 
48
+ **Tailwind v4** — use `@config` and `@source` in your CSS instead of a config file:
49
+
50
+ ```css
51
+ /* app/globals.css */
52
+ @import 'tailwindcss';
53
+ @import '@tollerud/ui/globals.css';
54
+
55
+ /* Pull in the preset tokens as a v4 plugin */
56
+ @config './tailwind.config.ts';
57
+
58
+ /* Scan the package dist so utility classes aren't purged */
59
+ @source '../node_modules/@tollerud/ui/dist';
60
+ ```
61
+
62
+ If you're not using a `tailwind.config.ts` in v4, copy the contents of `tollerud-preset.js` into a `@theme {}` block manually, or keep a minimal config just for the preset:
63
+
64
+ ```ts
65
+ // tailwind.config.ts (v4 shim)
66
+ import tollerudPreset from '@tollerud/ui/preset'
67
+ export default { presets: [tollerudPreset] }
68
+ ```
69
+
40
70
  **CSS** — import tokens and component classes in `app/globals.css`:
41
71
 
42
72
  ```css
@@ -49,6 +79,8 @@ export default config
49
79
  import { Button, Card, Badge, StatusDot, CodeBlock, Kbd, CommandMenu, NoirGlowBackground } from '@tollerud/ui'
50
80
  ```
51
81
 
82
+ TypeScript types are included — no `@types/*` package needed. See **[COMPONENTS.md](COMPONENTS.md)** for the full prop reference for every component.
83
+
52
84
  Publish a new version by creating a GitHub Release; CI runs `npm publish` when `NPM_TOKEN` is configured.
53
85
 
54
86
  ### Copy from repo (alternative)
@@ -168,7 +200,7 @@ cp globals.css src/app/
168
200
  cp tollerud-preset.js .
169
201
  ```
170
202
 
171
- See `GETTING_STARTED.md` for full setup guide.
203
+ See [GETTING_STARTED.md](GETTING_STARTED.md) for the full setup guide.
172
204
 
173
205
  ## File Structure
174
206
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tollerud/ui",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "Tollerud User Interface — dark, monochrome + yellow accent. Noir aesthetic meets modern utility.",
5
5
  "private": false,
6
6
  "type": "module",