@tollerud/ui 1.0.1

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Tollerud
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,242 @@
1
+ # Tollerud User Interface
2
+
3
+ A complete, browsable UI library built around **monochrome + yellow accent**. Noir aesthetic meets modern utility.
4
+
5
+ **[Live docs →](https://tollerud.github.io/design-system/)** — browse every token, component, and pattern live with copy-paste code.
6
+
7
+ ## Philosophy
8
+
9
+ > Clean lines. Sharp contrast. Yellow where it counts.
10
+
11
+ Tollerud DS is minimal but not cold. It uses a near-black foundation with warm yellow accents for interaction points. Every element has purpose — nothing decorative for its own sake. The cross-hatching spirit lives in the sharp borders, the thin lines, the deliberate whitespace.
12
+
13
+ ## Quick Start
14
+
15
+ ### npm package (recommended)
16
+
17
+ ```bash
18
+ npm install @tollerud/ui clsx tailwind-merge
19
+ # Optional — for NoirGlowBackground:
20
+ npm install @paper-design/shaders-react
21
+ ```
22
+
23
+ **Tailwind** — add the preset in `tailwind.config.ts`:
24
+
25
+ ```ts
26
+ import type { Config } from 'tailwindcss'
27
+ import tollerudPreset from '@tollerud/ui/preset'
28
+
29
+ const config: Config = {
30
+ presets: [tollerudPreset],
31
+ content: [
32
+ './app/**/*.{ts,tsx}',
33
+ './components/**/*.{ts,tsx}',
34
+ './node_modules/@tollerud/ui/dist/**/*.{js,mjs}',
35
+ ],
36
+ }
37
+ export default config
38
+ ```
39
+
40
+ **CSS** — import tokens and component classes in `app/globals.css`:
41
+
42
+ ```css
43
+ @import '@tollerud/ui/globals.css';
44
+ ```
45
+
46
+ **Components:**
47
+
48
+ ```tsx
49
+ import { Button, Card, Badge, StatusDot, CodeBlock, Kbd, CommandMenu, NoirGlowBackground } from '@tollerud/ui'
50
+ ```
51
+
52
+ Publish a new version by creating a GitHub Release; CI runs `npm publish` when `NPM_TOKEN` is configured.
53
+
54
+ ### Copy from repo (alternative)
55
+
56
+ ```bash
57
+ npm install clsx tailwind-merge
58
+ cp tollerud-preset.js globals.css components/ -r <your-next-project>/
59
+ ```
60
+
61
+ Then use local paths instead of `@tollerud/ui` in the snippets above.
62
+
63
+ ### Next.js example
64
+
65
+ That's it. You now have all Tailwind colors (`bg-tollerud-yellow`, `text-tollerud-noir-200`), semantic CSS variables (`--primary`, `--background`, `--ring`), component utilities (`.tollerud-card`, `.tollerud-btn--terminal`), and React components ready to import:
66
+
67
+ ```tsx
68
+ import { Button, Card, Badge, StatusDot, CodeBlock, Kbd, CommandMenu, NoirGlowBackground } from '@tollerud/ui'
69
+
70
+ <section className="relative overflow-hidden bg-black">
71
+ <NoirGlowBackground intensity="medium" speed="slow" grain="soft" shape="corners" preserveCenter />
72
+ <div className="relative z-10">
73
+ <Button variant="terminal" size="lg">open_dashboard</Button>
74
+ </div>
75
+ </section>
76
+ <Card accent>
77
+ <StatusDot status="online" label="Emma — ready" />
78
+ </Card>
79
+ <CodeBlock>{`❯ systemctl status tollerud-agent`}</CodeBlock>
80
+ ```
81
+
82
+ ### Plain CSS
83
+
84
+ Include `tokens.css` or `globals.css` for CSS custom properties and utility classes:
85
+
86
+ ```html
87
+ <link rel="stylesheet" href="globals.css">
88
+ <div class="tollerud-card">
89
+ <h2 style="color: var(--tollerud-yellow)">Tollerud User Interface</h2>
90
+ <button class="tollerud-btn tollerud-btn--primary tollerud-btn--md">Get Started</button>
91
+ </div>
92
+ ```
93
+
94
+ ### Brand Mascot
95
+
96
+ The design system includes `tollerud-avatar.svg` — a full cel-shaded monochrome illustration of Tia in her black gakuran, available in `design-system/` for use in headers, landing pages, branding, or anywhere the Tia identity appears.
97
+
98
+ ## Palette Summary
99
+
100
+ | Token | Hex | Usage |
101
+ |-------|-----|-------|
102
+ | `--tollerud-yellow` | `#E8D500` | Primary actions, highlights, links |
103
+ | `--tollerud-acid` / `--tollerud-yellow-bright` | `#FFFF00` | Tollerud voltage, shader glow, hover peaks |
104
+ | `--tollerud-amber` | `#FFB800` | Warmth accents, secondary highlights |
105
+ | `--tollerud-black` | `#0A0A0A` | Default background |
106
+ | `--tollerud-noir-900` | `#121212` | Card / raised surface |
107
+ | `--tollerud-noir-800` | `#1A1A1A` | Overlay / modal surface |
108
+ | `--tollerud-noir-700` | `#252525` | Hover state surface |
109
+ | `--tollerud-noir-600` | `#333333` | Borders |
110
+ | `--tollerud-noir-400` | `#666666` | Muted text, disabled |
111
+ | `--tollerud-noir-200` | `#AAAAAA` | Secondary text |
112
+ | `--tollerud-noir-50` | `#E5E5E5` | Subtle dividers (light) |
113
+ | `--tollerud-white` | `#F5F5F5` | Primary text |
114
+
115
+ ## Typography
116
+
117
+ - **Display / Body:** Inter — clean, highly readable, Swiss-inspired
118
+ - **Monospace:** JetBrains Mono — for code, metrics, and terminal aesthetics
119
+ - **Scale:** 2xs (0.625rem) → 9xl (8rem)
120
+ - **Weights:** 400 (normal), 500 (medium), 600 (semibold), 700 (bold), 900 (black)
121
+
122
+ ## Usage Patterns
123
+
124
+ ### Buttons
125
+ ```html
126
+ <button class="tollerud-btn tollerud-btn--primary tollerud-btn--md">Action</button>
127
+ <button class="tollerud-btn tollerud-btn--secondary tollerud-btn--md">Cancel</button>
128
+ <button class="tollerud-btn tollerud-btn--ghost tollerud-btn--md">More</button>
129
+ ```
130
+
131
+ ### Cards
132
+ ```html
133
+ <div class="tollerud-card">
134
+ <h3 class="font-semibold mb-1">Title</h3>
135
+ <p class="text-tollerud-text-secondary text-sm">Content</p>
136
+ </div>
137
+ ```
138
+
139
+ ### Badges
140
+ ```html
141
+ <span class="tollerud-badge tollerud-badge--accent">New</span>
142
+ <span class="tollerud-badge tollerud-badge--success">Online</span>
143
+ <span class="tollerud-badge tollerud-badge--error">Offline</span>
144
+ ```
145
+
146
+ ### Code
147
+ ```html
148
+ <code class="font-mono text-sm text-tollerud-text-secondary">const x = 42;</code>
149
+ ```
150
+
151
+ ## Principles
152
+
153
+ 1. **Dark-first** — Light mode is secondary. Design starts in the dark.
154
+ 2. **Yellow is the signal** — Yellow is for interaction. If it's yellow, you can click it.
155
+ 3. **One color pop** — No rainbows. Yellow carries the weight. State colors (green, red, blue) are muted to avoid noise.
156
+ 4. **Sharp when it counts** — Radius is subtle. Full round only for pills. Sharp corners for the noir feel.
157
+ 5. **Glow with purpose** — Yellow glow only on hover/active states. Never decorative.
158
+
159
+ ## shadcn Registry
160
+
161
+ ```bash
162
+ # Install via shadcn CLI (future):
163
+ npx shadcn@latest add https://tollerud-noir.dev/registry
164
+
165
+ # Or copy manually (today):
166
+ cp -r components/ src/components/ui
167
+ cp globals.css src/app/
168
+ cp tollerud-preset.js .
169
+ ```
170
+
171
+ See `GETTING_STARTED.md` for full setup guide.
172
+
173
+ ## File Structure
174
+
175
+ ```
176
+ design-system/
177
+ ├── package.json # NPM package metadata
178
+ ├── README.md # This file
179
+ ├── CHANGELOG.md # Version history
180
+ ├── ACCESSIBILITY.md # Contrast, focus, reduced motion
181
+ ├── BACKGROUNDS.md # NoirGlowBackground usage + fallback docs
182
+ ├── COMPONENTS.md # Full component reference + state matrix
183
+ ├── KEYBOARD.md # Keyboard contract and shortcut reference
184
+ ├── VOICE.md # Copy guidelines and tone
185
+ ├── COMPLETENESS_ROADMAP.md # Research and future plans
186
+ ├── ULTIMATE_TIA_NOIR_RESEARCH.md # Deep research: Tollerud glow + Linear/Raycast/Geist inspiration
187
+ ├── tollerud-preset.js # 🏆 Drop-in Tailwind preset
188
+ ├── tailwind.config.js # (backward compat standalone config)
189
+ ├── globals.css # 🏆 Semantic tokens + all component classes
190
+ ├── tokens.css # (backward compat CSS vars only)
191
+ ├── preview.html # Visual reference
192
+ ├── tollerud-avatar.svg # Brand mascot
193
+ ├── components/
194
+ │ ├── index.ts # Barrel exports
195
+ │ ├── Button.tsx # 5 variants, 3 sizes
196
+ │ ├── Card.tsx # Surface cards with optional accent
197
+ │ ├── Badge.tsx # 6 variants
198
+ │ ├── StatusDot.tsx # Online/offline/warning/idle
199
+ │ ├── Input.tsx # With label + error state
200
+ │ ├── CodeBlock.tsx # Terminal/code display
201
+ │ ├── StatCard.tsx # Dashboard stat card
202
+ │ ├── NoirGlowBackground.tsx # Tollerud.no shader background primitive
203
+ │ ├── Kbd.tsx # Keyboard shortcut chip (⌘K style)
204
+ │ ├── ActionRow.tsx # Command/action item row
205
+ │ ├── CommandMenu.tsx # Raycast-style command palette
206
+ │ ├── ServiceHealthCard.tsx # Service status card
207
+ │ ├── HostCard.tsx # Server/VM card
208
+ │ ├── DockerStackCard.tsx # Docker Compose stack card
209
+ │ ├── IncidentCard.tsx # Severity-graded incident card
210
+ │ ├── ApprovalCard.tsx # Approve/reject card
211
+ │ ├── ActionDiff.tsx # Unified diff viewer
212
+ │ ├── RollbackPlan.tsx # Rollback step list
213
+ │ ├── LogViewer.tsx # Terminal-style log viewer
214
+ │ ├── AlertInbox.tsx # Alert feed with acknowledge
215
+ │ ├── Timeline.tsx # Vertical activity timeline
216
+ │ ├── BackupStatusPanel.tsx # Backup job overview
217
+ │ └── Container.tsx # Layout width constraint
218
+ └── examples/
219
+ └── nextjs/
220
+ ├── README.md # Setup instructions
221
+ ├── tailwind.config.ts # Example config using preset
222
+ └── app/
223
+ ├── globals.css # @import for globals.css
224
+ ├── layout.tsx # Root layout with fonts
225
+ └── page.tsx # Full dashboard landing page
226
+ ```
227
+
228
+ ## Graphify-inspired Components
229
+
230
+ New additions inspired by [Graphify Labs](https://graphifylabs.ai/):
231
+
232
+ | Component | CSS Class | Tailwind Alternative | Description |
233
+ |-----------|-----------|---------------------|-------------|
234
+ | Noir Glow Background | `.tollerud-noir-glow-*` | `bg-tollerud-noir-glow` | Tollerud.no-inspired acid-yellow glow fallback |
235
+ | Grid Background | `.tollerud-grid-bg` | `bg-tollerud-grid bg-[length:40px_40px]` | Subtle yellow grid pattern |
236
+ | Glass Nav | `.tollerud-glass` | `backdrop-blur-glass bg-opacity-88` | Frosted glass navigation bar |
237
+ | Terminal Button | `.tollerud-btn--terminal` | — | Monospace CTA with `❯` prefix |
238
+ | Pill Tag | `.tollerud-pill--outline` / `--muted` | — | Tiny label/tag components |
239
+ | Accent Bar | `.tollerud-accent-bar` | `bg-tollerud-gradient-bar h-[1px]` | Gradient divider bar |
240
+ | Gradient Text | `.tollerud-gradient-text` | `bg-tollerud-gradient-soft bg-clip-text text-transparent` | Yellow → amber gradient text |
241
+ | Display Heading | `.tollerud-display` | `tracking-tightest leading-[0.95] font-semibold text-white` | Tight, impactful display heads |
242
+ | Section Container | `.tollerud-section` | `max-w-[1100px] mx-auto px-6` | Content width constraint |