@tollerud/ui 1.1.3 → 1.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/AGENTS.md +39 -2
- package/SKILL.md +60 -2
- package/globals.css +28 -0
- package/package.json +1 -2
- package/tollerud-preset.js +55 -50
package/AGENTS.md
CHANGED
|
@@ -394,15 +394,52 @@ npx tsup # verify the bundle builds
|
|
|
394
394
|
Edit `package.json` version, then update these to match:
|
|
395
395
|
- `COMPLETENESS_ROADMAP.md` — header line `### npm package (components/*.tsx) — vX.X.X`
|
|
396
396
|
- `registry.json` — top-level `"version"` field
|
|
397
|
+
- `ds/app.jsx` — sidebar brand line `user interface · vX.X.X`
|
|
397
398
|
|
|
398
399
|
### 4. Always update these files in the same commit
|
|
399
400
|
|
|
400
|
-
- `CHANGELOG.md` — add an entry at the top following the
|
|
401
|
+
- `CHANGELOG.md` — add an entry at the top following the **exact format rules below**
|
|
401
402
|
- `COMPLETENESS_ROADMAP.md` — move completed items to the done list, strike through fixed quality items
|
|
402
403
|
- `SKILL.md` — add new components to the catalog, update version notes
|
|
403
404
|
- `AGENTS.md` (this file) — update the component import blocks if new exports were added
|
|
404
405
|
|
|
405
|
-
### 5.
|
|
406
|
+
### 5. CHANGELOG.md format rules
|
|
407
|
+
|
|
408
|
+
The docs site parses `CHANGELOG.md` at runtime. Wrong formatting causes entries to render as a wall of text or missing content. Follow these rules exactly:
|
|
409
|
+
|
|
410
|
+
**Entry heading** — always `## version — YYYY-MM-DD — Title`:
|
|
411
|
+
```
|
|
412
|
+
## 1.2.0 — 2026-07-01 — Add DataGrid component
|
|
413
|
+
```
|
|
414
|
+
|
|
415
|
+
**Blank lines are mandatory** between every distinct block (paragraph, heading, list, code fence). The parser breaks sections at blank lines — without them everything merges into one paragraph.
|
|
416
|
+
|
|
417
|
+
**Section headings inside an entry** — use `###` or a `**Bold line**` on its own line preceded by a blank line:
|
|
418
|
+
```
|
|
419
|
+
## 1.2.0 — 2026-07-01 — Add DataGrid component
|
|
420
|
+
|
|
421
|
+
Short summary of what changed.
|
|
422
|
+
|
|
423
|
+
### New components
|
|
424
|
+
|
|
425
|
+
- `DataGrid` — sortable, filterable data grid with ...
|
|
426
|
+
|
|
427
|
+
### Migration
|
|
428
|
+
|
|
429
|
+
Nothing breaking. Drop-in replacement for `DataTable` where needed.
|
|
430
|
+
```
|
|
431
|
+
|
|
432
|
+
**Never do this** — bold inline mid-paragraph acting as a heading with no blank line before it:
|
|
433
|
+
```
|
|
434
|
+
## 1.2.0 — bad example
|
|
435
|
+
Summary text. **New components** - DataGrid does X. **Migration** nothing breaking.
|
|
436
|
+
```
|
|
437
|
+
|
|
438
|
+
**Lists** — standard markdown `- item`. One blank line before the first item if preceded by a paragraph.
|
|
439
|
+
|
|
440
|
+
**Code blocks** — standard triple-backtick fences. Always close the fence, always a blank line before and after.
|
|
441
|
+
|
|
442
|
+
### 6. Commit and push
|
|
406
443
|
|
|
407
444
|
```bash
|
|
408
445
|
git add <changed files>
|
package/SKILL.md
CHANGED
|
@@ -31,6 +31,8 @@ const config: Config = {
|
|
|
31
31
|
export default config
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
+
As of **v1.1.5**, Tailwind colors are exposed under `tollerud.*` only. Use utilities like `text-tollerud-yellow`, `bg-tollerud-surface-raised`, and `border-tollerud-border`; do not use `tia-*` utility names.
|
|
35
|
+
|
|
34
36
|
Import base styles/tokens from `@tollerud/ui/globals.css` (or `@tollerud/ui/tokens.css`) in your root layout / `globals.css`, alongside Tailwind's own layers:
|
|
35
37
|
```css
|
|
36
38
|
@import "tailwindcss/preflight";
|
|
@@ -46,7 +48,33 @@ Import base styles/tokens from `@tollerud/ui/globals.css` (or `@tollerud/ui/toke
|
|
|
46
48
|
`@tollerud/ui` ships as a single bundled file marked `'use client'`. As of **v1.0.8**, importing anything from it — components, hooks, or plain helpers like `buttonVariants` and `cn` — works fine from a Server Component file; the import itself doesn't force your file to become a Client Component, since you're just pulling in already-client-bundled code or plain functions.
|
|
47
49
|
- **If you're on `< 1.0.8`, upgrade first** — older versions crash on any import from a Server Component (the bundle wasn't marked `'use client'`, despite containing hook-based components).
|
|
48
50
|
|
|
49
|
-
### 2.
|
|
51
|
+
### 2. Tailwind v4 — Alert tone colors missing (`@source` path issue)
|
|
52
|
+
|
|
53
|
+
`Alert` uses raw Tailwind color classes (`bg-red-500/5`, `border-red-500/30`, `text-red-400`, etc.) for its `error`, `info`, and `success` tones. In Tailwind v4, if your `@source` path doesn't correctly resolve to `node_modules/@tollerud/ui/dist`, these classes are never scanned and the colors silently don't apply.
|
|
54
|
+
|
|
55
|
+
**Fix (≥ 1.1.4):** `globals.css` now ships these classes in `@layer utilities` so they're always present regardless of your `@source` config. Just make sure you're importing `globals.css`:
|
|
56
|
+
|
|
57
|
+
```css
|
|
58
|
+
@import "@tollerud/ui/globals.css";
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
If you're on `< 1.1.4`, add this to your own CSS as a workaround:
|
|
62
|
+
|
|
63
|
+
```css
|
|
64
|
+
@layer utilities {
|
|
65
|
+
.bg-red-500\/5 { background-color: rgb(239 68 68 / 0.05); }
|
|
66
|
+
.bg-blue-500\/5 { background-color: rgb(59 130 246 / 0.05); }
|
|
67
|
+
.bg-green-500\/5 { background-color: rgb(34 197 94 / 0.05); }
|
|
68
|
+
.border-red-500\/30 { border-color: rgb(239 68 68 / 0.3); }
|
|
69
|
+
.border-blue-500\/30 { border-color: rgb(59 130 246 / 0.3); }
|
|
70
|
+
.border-green-500\/30 { border-color: rgb(34 197 94 / 0.3); }
|
|
71
|
+
.text-red-400 { color: rgb(248 113 113); }
|
|
72
|
+
.text-blue-400 { color: rgb(96 165 250); }
|
|
73
|
+
.text-green-400 { color: rgb(74 222 128); }
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### 3. `<Button>` only renders a native `<button>` — use `asChild` for links (≥ 1.0.7)
|
|
50
78
|
`Button` extends `ButtonHTMLAttributes<HTMLButtonElement>` and has no `href`. **Never nest `<a>` inside `<button>` or vice versa** — it's invalid HTML and breaks accessibility. Two ways to style a `<Link>`/`<a>` like a Button:
|
|
51
79
|
|
|
52
80
|
```tsx
|
|
@@ -71,7 +99,7 @@ import Link from 'next/link'
|
|
|
71
99
|
|
|
72
100
|
For a real `<button>` (form submit, logout, toggle, dialog/menu trigger), just use `<Button>` directly — no `asChild` needed.
|
|
73
101
|
|
|
74
|
-
###
|
|
102
|
+
### 4. `cn` is exported — use it, don't reimplement
|
|
75
103
|
`@tollerud/ui` exports `cn` (clsx + tailwind-merge). Use it for conditional/merged class names instead of template strings or writing your own helper.
|
|
76
104
|
|
|
77
105
|
---
|
|
@@ -450,3 +478,33 @@ Shadow scale: `--shadow-sm` `--shadow-md` `--shadow-lg` `--shadow-xl` `--shadow-
|
|
|
450
478
|
- **19 new components (`Divider`, `Pill`, `Avatar`/`AvatarGroup`, `Breadcrumb`, `Pagination`, `Segmented`, `Stepper`, `Panel`, `Meter`, `FormRow`, `Accordion`, `Slider`, `PasswordInput`, `Combobox`, `DatePicker`, `FileUpload`, `TagInput`, `PricingCard`) require `>= 1.0.9`**
|
|
451
479
|
- **`Combobox` + `DatePicker` close on window resize (≥ 1.1.0)** — earlier versions left the popover open and misaligned after viewport changes
|
|
452
480
|
- Always pin to the latest patch and check `CHANGELOG.md` in the design-system repo for breaking changes (e.g. the 1.0.5 yellow token rename: `tollerud-yellow-bright` → `tollerud-yellow`, old `tollerud-yellow` `#E8D500` → `tollerud-yellow-warm`)
|
|
481
|
+
|
|
482
|
+
---
|
|
483
|
+
|
|
484
|
+
## CHANGELOG.md format rules
|
|
485
|
+
|
|
486
|
+
The docs site at `design.tollerud.dev` parses `CHANGELOG.md` at runtime. Wrong formatting causes entries to render as a wall of text. Follow these rules whenever you write a changelog entry:
|
|
487
|
+
|
|
488
|
+
**Entry heading:** `## version — YYYY-MM-DD — Title`
|
|
489
|
+
```
|
|
490
|
+
## 1.2.0 — 2026-07-01 — Add DataGrid component
|
|
491
|
+
```
|
|
492
|
+
|
|
493
|
+
**Blank lines are required** between every distinct block. The parser splits sections at blank lines — missing blank lines cause everything to merge into one paragraph.
|
|
494
|
+
|
|
495
|
+
**Section headings inside an entry:** `###` heading or a `**Bold line**` on its own line, preceded by a blank line:
|
|
496
|
+
```
|
|
497
|
+
## 1.2.0 — 2026-07-01 — Add DataGrid component
|
|
498
|
+
|
|
499
|
+
Short summary.
|
|
500
|
+
|
|
501
|
+
### New components
|
|
502
|
+
|
|
503
|
+
- `DataGrid` — sortable, filterable grid ...
|
|
504
|
+
|
|
505
|
+
### Migration
|
|
506
|
+
|
|
507
|
+
Nothing breaking.
|
|
508
|
+
```
|
|
509
|
+
|
|
510
|
+
**Never** write bold inline mid-paragraph as a heading substitute with no blank line before it — it will merge with surrounding text into one unreadable block.
|
package/globals.css
CHANGED
|
@@ -918,3 +918,31 @@
|
|
|
918
918
|
padding-right: 1.5rem;
|
|
919
919
|
}
|
|
920
920
|
}
|
|
921
|
+
|
|
922
|
+
/* ═══════════════════════════════════════════════
|
|
923
|
+
Tailwind v4 safelist — Alert tone classes
|
|
924
|
+
═══════════════════════════════════════════════
|
|
925
|
+
These classes are used dynamically in Alert.tsx and would be missed
|
|
926
|
+
by @source scanning a pre-compiled dist file. Declaring them here
|
|
927
|
+
ensures Tailwind always generates them regardless of @source config.
|
|
928
|
+
═══════════════════════════════════════════════ */
|
|
929
|
+
|
|
930
|
+
/*
|
|
931
|
+
@source inline("
|
|
932
|
+
bg-red-500/5 border-red-500/30 text-red-400
|
|
933
|
+
bg-blue-500/5 border-blue-500/30 text-blue-400
|
|
934
|
+
bg-green-500/5 border-green-500/30 text-green-400
|
|
935
|
+
");
|
|
936
|
+
*/
|
|
937
|
+
|
|
938
|
+
@layer utilities {
|
|
939
|
+
.bg-red-500\/5 { background-color: rgb(239 68 68 / 0.05); }
|
|
940
|
+
.bg-blue-500\/5 { background-color: rgb(59 130 246 / 0.05); }
|
|
941
|
+
.bg-green-500\/5 { background-color: rgb(34 197 94 / 0.05); }
|
|
942
|
+
.border-red-500\/30 { border-color: rgb(239 68 68 / 0.3); }
|
|
943
|
+
.border-blue-500\/30 { border-color: rgb(59 130 246 / 0.3); }
|
|
944
|
+
.border-green-500\/30 { border-color: rgb(34 197 94 / 0.3); }
|
|
945
|
+
.text-red-400 { color: rgb(248 113 113); }
|
|
946
|
+
.text-blue-400 { color: rgb(96 165 250); }
|
|
947
|
+
.text-green-400 { color: rgb(74 222 128); }
|
|
948
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tollerud/ui",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.5",
|
|
4
4
|
"description": "Tollerud User Interface — dark, monochrome + yellow accent. Noir aesthetic meets modern utility.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
@@ -98,7 +98,6 @@
|
|
|
98
98
|
"dark-theme",
|
|
99
99
|
"monochrome",
|
|
100
100
|
"noir",
|
|
101
|
-
"tia",
|
|
102
101
|
"ui"
|
|
103
102
|
],
|
|
104
103
|
"publishConfig": {
|
package/tollerud-preset.js
CHANGED
|
@@ -13,56 +13,61 @@
|
|
|
13
13
|
* Or merge manually into an existing config.
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
+
const tollerudColors = {
|
|
17
|
+
// Brand
|
|
18
|
+
yellow: '#FFFF00',
|
|
19
|
+
'yellow-warm': '#E8D500',
|
|
20
|
+
acid: '#FFFF00',
|
|
21
|
+
accent: '#FFFF00',
|
|
22
|
+
'yellow-dim': '#B8A800',
|
|
23
|
+
amber: '#FFB800',
|
|
24
|
+
'amber-glow': '#FF8C00',
|
|
25
|
+
|
|
26
|
+
// Noir scale
|
|
27
|
+
black: '#0A0A0A',
|
|
28
|
+
'noir-black': '#0A0A0A',
|
|
29
|
+
'noir-950': '#0A0A0A',
|
|
30
|
+
'noir-900': '#121212',
|
|
31
|
+
'noir-850': '#161616',
|
|
32
|
+
'noir-800': '#1A1A1A',
|
|
33
|
+
'noir-700': '#252525',
|
|
34
|
+
'noir-600': '#333333',
|
|
35
|
+
'noir-500': '#4A4A4A',
|
|
36
|
+
'noir-400': '#666666',
|
|
37
|
+
'noir-300': '#888888',
|
|
38
|
+
'noir-200': '#AAAAAA',
|
|
39
|
+
'noir-100': '#CCCCCC',
|
|
40
|
+
'noir-50': '#E5E5E5',
|
|
41
|
+
'noir-white': '#F5F5F5',
|
|
42
|
+
white: '#F5F5F5',
|
|
43
|
+
|
|
44
|
+
// Surfaces
|
|
45
|
+
surface: '#0A0A0A',
|
|
46
|
+
'surface-raised': '#121212',
|
|
47
|
+
'surface-overlay': '#1A1A1A',
|
|
48
|
+
'surface-hover': '#252525',
|
|
49
|
+
|
|
50
|
+
// Text
|
|
51
|
+
foreground: '#F5F5F5',
|
|
52
|
+
'text-primary': '#F5F5F5',
|
|
53
|
+
'text-secondary': '#AAAAAA',
|
|
54
|
+
'text-muted': '#666666',
|
|
55
|
+
'text-inverse': '#0A0A0A',
|
|
56
|
+
|
|
57
|
+
// Borders
|
|
58
|
+
border: '#333333',
|
|
59
|
+
'border-subtle': '#252525',
|
|
60
|
+
'border-accent': '#FFFF00',
|
|
61
|
+
|
|
62
|
+
// States
|
|
63
|
+
success: '#22C55E',
|
|
64
|
+
warning: '#E8D500',
|
|
65
|
+
error: '#EF4444',
|
|
66
|
+
info: '#3B82F6',
|
|
67
|
+
}
|
|
68
|
+
|
|
16
69
|
const palette = {
|
|
17
|
-
|
|
18
|
-
// Brand
|
|
19
|
-
yellow: '#FFFF00',
|
|
20
|
-
'yellow-warm': '#E8D500',
|
|
21
|
-
acid: '#FFFF00',
|
|
22
|
-
'yellow-dim': '#B8A800',
|
|
23
|
-
amber: '#FFB800',
|
|
24
|
-
'amber-glow': '#FF8C00',
|
|
25
|
-
|
|
26
|
-
// Noir scale
|
|
27
|
-
'noir-black': '#0A0A0A',
|
|
28
|
-
'noir-900': '#121212',
|
|
29
|
-
'noir-800': '#1A1A1A',
|
|
30
|
-
'noir-700': '#252525',
|
|
31
|
-
'noir-600': '#333333',
|
|
32
|
-
'noir-500': '#4A4A4A',
|
|
33
|
-
'noir-400': '#666666',
|
|
34
|
-
'noir-300': '#888888',
|
|
35
|
-
'noir-200': '#AAAAAA',
|
|
36
|
-
'noir-100': '#CCCCCC',
|
|
37
|
-
'noir-50': '#E5E5E5',
|
|
38
|
-
'noir-white': '#F5F5F5',
|
|
39
|
-
|
|
40
|
-
// Surfaces
|
|
41
|
-
surface: '#0A0A0A',
|
|
42
|
-
'surface-raised': '#121212',
|
|
43
|
-
'surface-overlay': '#1A1A1A',
|
|
44
|
-
'surface-hover': '#252525',
|
|
45
|
-
|
|
46
|
-
// Text
|
|
47
|
-
'text-primary': '#F5F5F5',
|
|
48
|
-
'text-secondary': '#AAAAAA',
|
|
49
|
-
'text-muted': '#666666',
|
|
50
|
-
'text-inverse': '#0A0A0A',
|
|
51
|
-
|
|
52
|
-
// Borders
|
|
53
|
-
border: '#333333',
|
|
54
|
-
'border-subtle': '#252525',
|
|
55
|
-
'border-accent': '#FFFF00',
|
|
56
|
-
|
|
57
|
-
// States
|
|
58
|
-
success: '#22C55E',
|
|
59
|
-
warning: '#E8D500',
|
|
60
|
-
error: '#EF4444',
|
|
61
|
-
info: '#3B82F6',
|
|
62
|
-
|
|
63
|
-
// Shadows
|
|
64
|
-
glow: '0 0 15px rgba(255,255,0,0.3), 0 0 30px rgba(255,255,0,0.1)',
|
|
65
|
-
},
|
|
70
|
+
tollerud: tollerudColors,
|
|
66
71
|
}
|
|
67
72
|
|
|
68
73
|
/** @type {import('tailwindcss').Config} */
|
|
@@ -118,7 +123,7 @@ module.exports = {
|
|
|
118
123
|
// ─── Shadows ───
|
|
119
124
|
boxShadow: {
|
|
120
125
|
'tollerud-sm': '0 1px 2px 0 rgba(0,0,0,0.4)',
|
|
121
|
-
'
|
|
126
|
+
'tollerud': '0 1px 3px 0 rgba(0,0,0,0.5), 0 1px 2px -1px rgba(0,0,0,0.3)',
|
|
122
127
|
'tollerud-md': '0 4px 6px -1px rgba(0,0,0,0.5), 0 2px 4px -2px rgba(0,0,0,0.3)',
|
|
123
128
|
'tollerud-lg': '0 10px 15px -3px rgba(0,0,0,0.5), 0 4px 6px -4px rgba(0,0,0,0.3)',
|
|
124
129
|
'tollerud-glow':'0 0 15px rgba(255,255,0,0.3), 0 0 30px rgba(255,255,0,0.1)',
|