@tenerife.music/ui 2.3.0 → 2.3.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/README.md +40 -155
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
# 🌴 TUI
|
|
2
2
|
|
|
3
3
|
**Token-driven UI architecture for long-living React products**
|
|
4
|
-
|
|
4
|
+
Predictable. Built for system-level consistency.
|
|
5
5
|
|
|
6
|
-

|
|
7
|
+

|
|
8
8
|

|
|
9
9
|

|
|
10
10
|

|
|
11
11
|

|
|
12
12
|
|
|
13
|
-
**Current Release:** [v2.3.
|
|
13
|
+
**Current Release:** [v2.3.1](CHANGELOG.md#231) (npm)
|
|
14
14
|
**Next Release:** [Unreleased] — See [CHANGELOG](CHANGELOG.md#unreleased)
|
|
15
15
|
|
|
16
16
|
<p align="center">
|
|
@@ -30,8 +30,7 @@ Strict. Predictable. Built for system-level consistency.
|
|
|
30
30
|
|
|
31
31
|
TUI is **not a beginner-friendly UI library**.
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
**architectural consistency, long-term scalability, and system-level thinking**
|
|
33
|
+
Built for teams who value **architectural consistency** and **long-term scalability**
|
|
35
34
|
over quick experimentation or visual convenience.
|
|
36
35
|
|
|
37
36
|
### This library is for you if:
|
|
@@ -39,7 +38,6 @@ over quick experimentation or visual convenience.
|
|
|
39
38
|
- You build **long-living products**, not throwaway interfaces
|
|
40
39
|
- You want to **prevent design entropy**, not fight it later
|
|
41
40
|
- You prefer **strict rules over flexible chaos**
|
|
42
|
-
- You see constraints as a **feature**, not a limitation
|
|
43
41
|
- You are comfortable trading short-term DX for long-term maintainability
|
|
44
42
|
|
|
45
43
|
### This library is NOT for you if:
|
|
@@ -53,11 +51,8 @@ over quick experimentation or visual convenience.
|
|
|
53
51
|
|
|
54
52
|
- **Tokens are the single source of truth**
|
|
55
53
|
- **The Foundation layer is locked and immutable**
|
|
56
|
-
- **Design decisions must be explicit and centralized**
|
|
57
|
-
- **Constraints exist to protect the system — even from its author**
|
|
58
54
|
|
|
59
|
-
If the system feels strict
|
|
60
|
-
that means it is working as intended.
|
|
55
|
+
If the system feels strict or limiting — that means it is working as intended.
|
|
61
56
|
|
|
62
57
|
---
|
|
63
58
|
|
|
@@ -93,7 +88,7 @@ import { Button } from "@tenerife.music/ui";
|
|
|
93
88
|
export default function App() {
|
|
94
89
|
return (
|
|
95
90
|
<ThemeProvider defaultMode="night">
|
|
96
|
-
<Button variant="
|
|
91
|
+
<Button variant="primary">Click me</Button>
|
|
97
92
|
</ThemeProvider>
|
|
98
93
|
);
|
|
99
94
|
}
|
|
@@ -125,99 +120,38 @@ but this is optional.
|
|
|
125
120
|
|
|
126
121
|
## 📚 Documentation
|
|
127
122
|
|
|
128
|
-
|
|
129
|
-
| ------------------------ | --------------------------------------- | -------------------------------------------------------------------------------------- |
|
|
130
|
-
| **Architecture Context** | Single source of truth (IMMUTABLE) | [docs/ARCHITECTURE_CONTEXT.md](docs/ARCHITECTURE_CONTEXT.md) |
|
|
131
|
-
| **Foundation Lock** | Authoritative source of truth | [docs/architecture/FOUNDATION_LOCK.md](docs/architecture/FOUNDATION_LOCK.md) |
|
|
132
|
-
| **Architecture Lock** | Canonical architectural constraints | [docs/architecture/ARCHITECTURE_LOCK.md](docs/architecture/ARCHITECTURE_LOCK.md) |
|
|
133
|
-
| **A11Y Lock** | Accessibility system lock (WCAG 2.1 AA) | [docs/architecture/locks/A11Y_LOCK.md](docs/architecture/locks/A11Y_LOCK.md) |
|
|
134
|
-
| **Tokens Overview** | Design token structure and philosophy | [docs/reference/TOKENS_OVERVIEW.md](docs/reference/TOKENS_OVERVIEW.md) |
|
|
135
|
-
| **Theme System** | Theme architecture and tooling | [docs/theming/THEME_SYSTEM_ARCHITECTURE.md](docs/theming/THEME_SYSTEM_ARCHITECTURE.md) |
|
|
136
|
-
| **API Reference** | Public API documentation | [docs/reference/API_REFERENCE.md](docs/reference/API_REFERENCE.md) |
|
|
137
|
-
| **Components Inventory** | Complete component list | [docs/reference/COMPONENTS_INVENTORY.md](docs/reference/COMPONENTS_INVENTORY.md) |
|
|
138
|
-
| **Documentation Hub** | Complete documentation index | [docs/README.md](docs/README.md) |
|
|
139
|
-
| Storybook | Component examples and contracts | Run `pnpm storybook` locally |
|
|
140
|
-
|
|
141
|
-
### Development Resources
|
|
142
|
-
|
|
143
|
-
- **Component Creation**: [Extension Component Creation Checklist](docs/workflows/tasks/COMPONENT_CREATION_CHECKLIST.md)
|
|
144
|
-
- **CLI Generator**: Use `pnpm component:generate -- <ComponentName> [--category <category>]` to generate component scaffold
|
|
145
|
-
- See checklist for complete process and requirements
|
|
146
|
-
- **Component Refactoring**: [Component Refactoring Pipeline (18A)](docs/workflows/foundation/FOUNDATION_STEP_PIPELINE.md)
|
|
147
|
-
- **Canonical process** for reviewing, improving, and validating existing components
|
|
148
|
-
- Mandatory 12-step pipeline (STEP 0-11) for Foundation and Extension components
|
|
149
|
-
- See pipeline for complete refactoring process and requirements
|
|
150
|
-
- **Component Examples**: [Extension Component Examples](docs/reference/EXTENSION_COMPONENT_EXAMPLES.md)
|
|
151
|
-
- **Component Needs**: [Component Needs Inventory](docs/workflows/tasks/COMPONENT_NEEDS_INVENTORY.md)
|
|
152
|
-
- **Feedback Process**: [Usage Feedback Process](docs/workflows/tasks/FEEDBACK_COLLECTION_PROCESS.md)
|
|
123
|
+
### Public Docs
|
|
153
124
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
**Status:** ✅ **LOCKED** (Foundation Closed - 2026-01-02)
|
|
163
|
-
**Purpose:** Tokens and theme system only
|
|
164
|
-
|
|
165
|
-
The Foundation layer is **immutable** and **closed**. All Foundation Authority Contracts are **LOCKED**.
|
|
166
|
-
|
|
167
|
-
**Reference:** [FOUNDATION_LOCK.md](docs/architecture/FOUNDATION_LOCK.md)
|
|
168
|
-
|
|
169
|
-
### Primitives Layer (Locked)
|
|
170
|
-
|
|
171
|
-
**Status:** ✅ **CANONICAL**
|
|
172
|
-
**Purpose:** Atomic UI components, no orchestration
|
|
173
|
-
|
|
174
|
-
**Location:** `src/PRIMITIVES/`
|
|
175
|
-
|
|
176
|
-
**Examples:**
|
|
177
|
-
|
|
178
|
-
- Button, Input, Textarea, Checkbox, Radio, Switch
|
|
179
|
-
- Badge, Alert, Heading, Text, Icon, Image
|
|
180
|
-
- Progress, Skeleton, Divider, Field, Label, Link
|
|
181
|
-
|
|
182
|
-
**Rule:** PRIMITIVES **MUST NOT** contain orchestration logic or overlay infrastructure.
|
|
183
|
-
|
|
184
|
-
### Composition Layer (Canonical)
|
|
185
|
-
|
|
186
|
-
**Status:** ✅ **CANONICAL**
|
|
187
|
-
**Purpose:** Layout, overlays, interaction orchestration
|
|
188
|
-
|
|
189
|
-
**Location:** `src/COMPOSITION/`
|
|
190
|
-
|
|
191
|
-
**Sub-layers:**
|
|
192
|
-
|
|
193
|
-
- `COMPOSITION/overlays/` - All overlay components (Modal, Popover, ContextMenu, Toast, Dialog, Tooltip)
|
|
194
|
-
- `COMPOSITION/layout/` - Layout components (Card, Flex, Grid, Stack, Container, Section)
|
|
195
|
-
- `COMPOSITION/navigation/` - Navigation components (Tabs, Breadcrumbs, Pagination)
|
|
196
|
-
- `COMPOSITION/controls/` - Control components (Select)
|
|
197
|
-
|
|
198
|
-
**Rule:** All overlays **MUST** live in COMPOSITION layer only.
|
|
199
|
-
|
|
200
|
-
### Patterns Layer (Canonical)
|
|
125
|
+
| Document | Description | Link |
|
|
126
|
+
| ------------------------ | ------------------------------------- | -------------------------------------------------------------------------------- |
|
|
127
|
+
| **Getting Started** | Integration and setup guide | [docs/reference/INTEGRATION_GUIDE.md](docs/reference/INTEGRATION_GUIDE.md) |
|
|
128
|
+
| **API Reference** | Public API documentation | [docs/reference/API_REFERENCE.md](docs/reference/API_REFERENCE.md) |
|
|
129
|
+
| **Tokens Overview** | Design token structure and philosophy | [docs/reference/TOKENS_OVERVIEW.md](docs/reference/TOKENS_OVERVIEW.md) |
|
|
130
|
+
| **Components Inventory** | Complete component list | [docs/reference/COMPONENTS_INVENTORY.md](docs/reference/COMPONENTS_INVENTORY.md) |
|
|
131
|
+
| **Documentation Hub** | Complete documentation index | [docs/README.md](docs/README.md) |
|
|
201
132
|
|
|
202
|
-
|
|
203
|
-
**Purpose:** Business/UI patterns (no overlays)
|
|
133
|
+
Storybook is used as an internal visual contract and can be run locally.
|
|
204
134
|
|
|
205
|
-
|
|
135
|
+
### Advanced Architecture
|
|
206
136
|
|
|
207
|
-
**
|
|
137
|
+
- **Architecture Context**: [docs/ARCHITECTURE_CONTEXT.md](docs/ARCHITECTURE_CONTEXT.md)
|
|
138
|
+
- **Foundation Lock**: [docs/architecture/FOUNDATION_LOCK.md](docs/architecture/FOUNDATION_LOCK.md)
|
|
139
|
+
- **Architecture Lock**: [docs/architecture/ARCHITECTURE_LOCK.md](docs/architecture/ARCHITECTURE_LOCK.md)
|
|
140
|
+
- **A11Y Lock**: [docs/architecture/locks/A11Y_LOCK.md](docs/architecture/locks/A11Y_LOCK.md)
|
|
208
141
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
**Rule:** PATTERNS **MUST NOT** define overlay primitives or overlay infrastructure.
|
|
142
|
+
---
|
|
212
143
|
|
|
213
|
-
|
|
144
|
+
## 🏗 Architecture (High-level)
|
|
214
145
|
|
|
215
|
-
|
|
216
|
-
**Purpose:** App-specific sections
|
|
146
|
+
TUI is built on a strict multi-layer architecture:
|
|
217
147
|
|
|
218
|
-
|
|
148
|
+
- Foundation — locked tokens & primitives
|
|
149
|
+
- Primitives — atomic UI building blocks
|
|
150
|
+
- Composition — layout & interaction orchestration
|
|
151
|
+
- Patterns — reusable UI patterns
|
|
152
|
+
- Domain — product-specific components
|
|
219
153
|
|
|
220
|
-
|
|
154
|
+
→ Full architecture: [docs/ARCHITECTURE_CONTEXT.md](docs/ARCHITECTURE_CONTEXT.md)
|
|
221
155
|
|
|
222
156
|
---
|
|
223
157
|
|
|
@@ -235,45 +169,17 @@ Tokens are **immutable contracts**, not convenience variables.
|
|
|
235
169
|
|
|
236
170
|
---
|
|
237
171
|
|
|
238
|
-
## 🎨
|
|
239
|
-
|
|
240
|
-
TUI provides **build-time CLI tooling** for generating and validating themes.
|
|
241
|
-
|
|
242
|
-
**Theme Tooling is a build-time compiler, not a runtime system.**
|
|
243
|
-
|
|
244
|
-
- **Theme Generator** (`pnpm theme:generate`) — creates Theme Contract v1 compliant themes
|
|
245
|
-
- **Theme Validator** (`pnpm theme:validate`) — validates themes against contract
|
|
246
|
-
- **Parity Checker** (`pnpm theme:parity-check`) — ensures token consistency
|
|
247
|
-
|
|
248
|
-
**Key Points:**
|
|
249
|
-
|
|
250
|
-
- Themes are generated at **build time**, not runtime
|
|
251
|
-
- All themes live in `src/themes/` (canonical path)
|
|
252
|
-
- Validation is **mandatory** — invalid themes cannot be committed (CI enforced)
|
|
253
|
-
- UI library **never generates themes** — it only consumes pre-generated CSS
|
|
254
|
-
|
|
255
|
-
**Quick Start:**
|
|
256
|
-
|
|
257
|
-
```bash
|
|
258
|
-
# Generate a theme
|
|
259
|
-
pnpm theme:generate -- --palette my-brand --base-color "210 40% 50%" --modes light,dark
|
|
260
|
-
|
|
261
|
-
# Validate themes
|
|
262
|
-
pnpm theme:validate -- src/themes/*.css
|
|
263
|
-
```
|
|
264
|
-
|
|
265
|
-
**Documentation:**
|
|
172
|
+
## 🎨 Theming
|
|
266
173
|
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
- [Theme Validator](tools/theme-validator/README.md) - Validator documentation
|
|
174
|
+
TUI consumes pre-generated themes.
|
|
175
|
+
Theme authoring and validation tooling is documented separately: [tools/theme-contract/README.md](tools/theme-contract/README.md).
|
|
270
176
|
|
|
271
177
|
---
|
|
272
178
|
|
|
273
|
-
## 🧩
|
|
179
|
+
## 🧩 Product-Specific Extensions
|
|
274
180
|
|
|
275
|
-
The following components
|
|
276
|
-
and are
|
|
181
|
+
The following components exist as product-level extensions
|
|
182
|
+
and are not intended as generic UI primitives:
|
|
277
183
|
|
|
278
184
|
- EventCard
|
|
279
185
|
- VenueCard
|
|
@@ -281,8 +187,9 @@ and are **not generic UI primitives**:
|
|
|
281
187
|
- TicketCard
|
|
282
188
|
- PromoCard
|
|
283
189
|
|
|
284
|
-
> These components are tightly coupled to specific product domains
|
|
285
|
-
> and are documented for reference
|
|
190
|
+
> These components are tightly coupled to specific product domains,
|
|
191
|
+
> are not part of the public API, and are documented for reference only.
|
|
192
|
+
> Use `Card`, `Grid`, and other public components to build custom layouts.
|
|
286
193
|
|
|
287
194
|
---
|
|
288
195
|
|
|
@@ -314,29 +221,7 @@ npm view @tenerife.music/ui versions --json
|
|
|
314
221
|
|
|
315
222
|
See [CHANGELOG Version Canon Rules](CHANGELOG.md#version-canon-rules) and [Release Process](docs/RELEASE_PROCESS.md) for details.
|
|
316
223
|
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
To create a new Extension component:
|
|
320
|
-
|
|
321
|
-
1. **Check Component Needs**: Review [Component Needs Inventory](docs/workflows/tasks/COMPONENT_NEEDS_INVENTORY.md) to ensure the component is needed
|
|
322
|
-
2. **Use CLI Generator**: Run `pnpm component:generate -- <ComponentName> [--category <category>]`
|
|
323
|
-
3. **Follow Checklist**: Complete all items in [Extension Component Creation Checklist](docs/workflows/tasks/COMPONENT_CREATION_CHECKLIST.md)
|
|
324
|
-
4. **Reference Examples**: Use [Extension Component Examples](docs/reference/EXTENSION_COMPONENT_EXAMPLES.md) as patterns
|
|
325
|
-
|
|
326
|
-
### Requesting Components
|
|
327
|
-
|
|
328
|
-
To request a new component:
|
|
329
|
-
|
|
330
|
-
1. **Create GitHub Issue**: Use the [Component Request template](.github/ISSUE_TEMPLATE/component-request.md) (if available)
|
|
331
|
-
2. **Provide Use Case**: Describe the specific use case and frequency of need
|
|
332
|
-
3. **Document Workaround**: Explain current solution and pain points
|
|
333
|
-
4. **Wait for Review**: Requests are reviewed according to project governance (see [Feedback Collection Process](docs/workflows/tasks/FEEDBACK_COLLECTION_PROCESS.md))
|
|
334
|
-
|
|
335
|
-
### Development Tools
|
|
336
|
-
|
|
337
|
-
- **Component Analysis**: `pnpm component:analyze` - Analyzes codebase for component patterns
|
|
338
|
-
- **Feedback Collection**: `pnpm feedback:collect` - Collects and analyzes usage feedback
|
|
339
|
-
- **Component Generator**: `pnpm component:generate -- <Name> [--category <category>]` - Generates component scaffold
|
|
224
|
+
Contributing & internal workflows → see [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
340
225
|
|
|
341
226
|
---
|
|
342
227
|
|