@tollerud/ui 1.1.2 → 1.1.4
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 +58 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js.map +1 -1
- package/globals.css +28 -0
- package/package.json +2 -2
- package/tollerud-logo.svg +1 -1
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
|
@@ -46,7 +46,33 @@ Import base styles/tokens from `@tollerud/ui/globals.css` (or `@tollerud/ui/toke
|
|
|
46
46
|
`@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
47
|
- **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
48
|
|
|
49
|
-
### 2.
|
|
49
|
+
### 2. Tailwind v4 — Alert tone colors missing (`@source` path issue)
|
|
50
|
+
|
|
51
|
+
`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.
|
|
52
|
+
|
|
53
|
+
**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`:
|
|
54
|
+
|
|
55
|
+
```css
|
|
56
|
+
@import "@tollerud/ui/globals.css";
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
If you're on `< 1.1.4`, add this to your own CSS as a workaround:
|
|
60
|
+
|
|
61
|
+
```css
|
|
62
|
+
@layer utilities {
|
|
63
|
+
.bg-red-500\/5 { background-color: rgb(239 68 68 / 0.05); }
|
|
64
|
+
.bg-blue-500\/5 { background-color: rgb(59 130 246 / 0.05); }
|
|
65
|
+
.bg-green-500\/5 { background-color: rgb(34 197 94 / 0.05); }
|
|
66
|
+
.border-red-500\/30 { border-color: rgb(239 68 68 / 0.3); }
|
|
67
|
+
.border-blue-500\/30 { border-color: rgb(59 130 246 / 0.3); }
|
|
68
|
+
.border-green-500\/30 { border-color: rgb(34 197 94 / 0.3); }
|
|
69
|
+
.text-red-400 { color: rgb(248 113 113); }
|
|
70
|
+
.text-blue-400 { color: rgb(96 165 250); }
|
|
71
|
+
.text-green-400 { color: rgb(74 222 128); }
|
|
72
|
+
}
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### 3. `<Button>` only renders a native `<button>` — use `asChild` for links (≥ 1.0.7)
|
|
50
76
|
`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
77
|
|
|
52
78
|
```tsx
|
|
@@ -71,7 +97,7 @@ import Link from 'next/link'
|
|
|
71
97
|
|
|
72
98
|
For a real `<button>` (form submit, logout, toggle, dialog/menu trigger), just use `<Button>` directly — no `asChild` needed.
|
|
73
99
|
|
|
74
|
-
###
|
|
100
|
+
### 4. `cn` is exported — use it, don't reimplement
|
|
75
101
|
`@tollerud/ui` exports `cn` (clsx + tailwind-merge). Use it for conditional/merged class names instead of template strings or writing your own helper.
|
|
76
102
|
|
|
77
103
|
---
|
|
@@ -450,3 +476,33 @@ Shadow scale: `--shadow-sm` `--shadow-md` `--shadow-lg` `--shadow-xl` `--shadow-
|
|
|
450
476
|
- **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
477
|
- **`Combobox` + `DatePicker` close on window resize (≥ 1.1.0)** — earlier versions left the popover open and misaligned after viewport changes
|
|
452
478
|
- 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`)
|
|
479
|
+
|
|
480
|
+
---
|
|
481
|
+
|
|
482
|
+
## CHANGELOG.md format rules
|
|
483
|
+
|
|
484
|
+
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:
|
|
485
|
+
|
|
486
|
+
**Entry heading:** `## version — YYYY-MM-DD — Title`
|
|
487
|
+
```
|
|
488
|
+
## 1.2.0 — 2026-07-01 — Add DataGrid component
|
|
489
|
+
```
|
|
490
|
+
|
|
491
|
+
**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.
|
|
492
|
+
|
|
493
|
+
**Section headings inside an entry:** `###` heading or a `**Bold line**` on its own line, preceded by a blank line:
|
|
494
|
+
```
|
|
495
|
+
## 1.2.0 — 2026-07-01 — Add DataGrid component
|
|
496
|
+
|
|
497
|
+
Short summary.
|
|
498
|
+
|
|
499
|
+
### New components
|
|
500
|
+
|
|
501
|
+
- `DataGrid` — sortable, filterable grid ...
|
|
502
|
+
|
|
503
|
+
### Migration
|
|
504
|
+
|
|
505
|
+
Nothing breaking.
|
|
506
|
+
```
|
|
507
|
+
|
|
508
|
+
**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.
|