@threelight/ui 0.2.0-alpha.1 → 0.3.0-alpha.0

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.
@@ -3,125 +3,164 @@
3
3
  <head>
4
4
  <meta charset="utf-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1" />
6
- <title>ThreeLight UI core examples</title>
7
6
  <link rel="stylesheet" href="../css/base.css" />
7
+ <title>ThreeLight UI alpha reset example</title>
8
8
  </head>
9
9
  <body data-tl-root data-tl-theme="default" data-tl-mode="light">
10
- <main class="tl-layout-section tl-layout-stack" style="--tl-gap: 2rem">
11
- <header class="tl-pattern-page-header">
12
- <div class="tl-pattern-page-header__content">
13
- <p class="tl-component-label">Normal PageHeader</p>
14
- <h1 class="tl-component-display">Release readiness</h1>
15
- <p class="tl-component-body">
16
- Governed HTML/CSS foundations with readable defaults and stable
17
- adapter-ready class names.
18
- </p>
19
- </div>
20
- <div class="tl-pattern-page-header__actions">
21
- <button class="tl-component-button" type="button">Preview</button>
22
- <button class="tl-component-button" type="button" data-tl-tone="primary">
23
- Approve
10
+ <div class="tl-app-shell">
11
+ <aside class="tl-app-shell__sidebar">
12
+ <nav class="tl-side-nav" aria-label="Example navigation">
13
+ <div class="tl-side-nav__group">
14
+ <div class="tl-side-nav__label">System</div>
15
+ <a class="tl-side-nav__item" href="#overview" aria-current="page">Overview</a>
16
+ <a class="tl-side-nav__item" href="#components">Components</a>
17
+ </div>
18
+ <div class="tl-side-nav__group">
19
+ <div class="tl-side-nav__label">Service templates</div>
20
+ <a class="tl-side-nav__item" href="#dashboard">Dashboard</a>
21
+ <a class="tl-side-nav__item" href="#settings">Settings</a>
22
+ </div>
23
+ </nav>
24
+ </aside>
25
+ <main class="tl-app-shell__main">
26
+ <header class="tl-app-shell__topbar">
27
+ <span class="tl-mono">threelight/ui</span>
28
+ <button
29
+ class="tl-button"
30
+ data-tl-variant="solid"
31
+ data-tl-tone="primary"
32
+ type="button"
33
+ >
34
+ Export
24
35
  </button>
25
- </div>
26
- </header>
27
-
28
- <section class="tl-layout-grid" style="--tl-grid-min: 14rem">
29
- <article class="tl-component-card tl-layout-stack" data-tl-tone="success">
30
- <span class="tl-component-badge" data-tl-tone="success">Passing</span>
31
- <p class="tl-component-metric">98%</p>
32
- <p class="tl-component-body">
33
- Generated labels meet the readable text floor.
34
- </p>
35
- </article>
36
-
37
- <article class="tl-component-card tl-layout-stack" data-tl-tone="warning">
38
- <span class="tl-component-badge" data-tl-tone="warning">Pending</span>
39
- <p class="tl-component-metric">3</p>
40
- <p class="tl-component-body">
41
- Surface tone changes need a second review.
42
- </p>
43
- </article>
36
+ </header>
37
+ <div class="tl-app-shell__content tl-stack" style="--tl-stack-gap: var(--tl-space-6)">
38
+ <section class="tl-stack" id="overview">
39
+ <p class="tl-caption">Alpha reset</p>
40
+ <h1 class="tl-heading" style="--tl-heading-size: 1.8rem">
41
+ Short-class service UI contract
42
+ </h1>
43
+ <p class="tl-text">
44
+ Components use short public classes, role tokens, and data attributes for
45
+ tone, variant, size, density, and state.
46
+ </p>
47
+ </section>
44
48
 
45
- <article class="tl-component-card tl-layout-stack" data-tl-tone="info">
46
- <span class="tl-component-badge" data-tl-tone="info">Quiet</span>
47
- <p class="tl-component-metric">0</p>
48
- <p class="tl-component-body">
49
- No active regressions in the release window.
50
- </p>
51
- </article>
52
- </section>
49
+ <section class="tl-metric-group" aria-label="Example metrics">
50
+ <article class="tl-metric-card">
51
+ <span class="tl-metric-card__label">Active users</span>
52
+ <strong class="tl-metric-card__value">48,210</strong>
53
+ <span class="tl-metric-card__delta" data-tl-tone="success">+12.4%</span>
54
+ </article>
55
+ <article class="tl-metric-card">
56
+ <span class="tl-metric-card__label">MRR</span>
57
+ <strong class="tl-metric-card__value">$82.4k</strong>
58
+ <span class="tl-metric-card__delta" data-tl-tone="success">+4.1%</span>
59
+ </article>
60
+ <article class="tl-metric-card">
61
+ <span class="tl-metric-card__label">Churn</span>
62
+ <strong class="tl-metric-card__value">2.3%</strong>
63
+ <span class="tl-metric-card__delta" data-tl-tone="danger">+0.4%</span>
64
+ </article>
65
+ </section>
53
66
 
54
- <section class="tl-pattern-page-header">
55
- <div class="tl-pattern-page-header__content">
56
- <p class="tl-component-label">Long-text PageHeader</p>
57
- <h2 class="tl-component-heading">
58
- Generated release summary with Korean text, long English words,
59
- numbers, and a URL
60
- </h2>
61
- <p class="tl-component-body">
62
- 한국어문장이공백없이길게이어져도부모폭을깨지않아야합니다.
63
- The generated identifier
64
- supercalifragilisticexpialidocious-release-window-20260611-00000000000000000042
65
- and URL
66
- <code class="tl-component-code"
67
- >https://example.com/releases/2026/06/readability-window-review?candidate=alpha-contract-update</code
68
- >
69
- should wrap inside the container.
70
- </p>
71
- </div>
72
- <div class="tl-pattern-page-header__actions">
73
- <button class="tl-component-button" type="button">Copy summary</button>
74
- <button class="tl-component-button" type="button" data-tl-tone="info">
75
- Open preview
76
- </button>
77
- <button class="tl-component-button" type="button" data-tl-tone="danger">
78
- Request changes
79
- </button>
80
- </div>
81
- </section>
67
+ <section class="tl-panel" id="components">
68
+ <div class="tl-panel__header">
69
+ <div>
70
+ <h2 class="tl-panel__title">Components</h2>
71
+ <p class="tl-panel__description">
72
+ Core and candidate surfaces share the same token contract.
73
+ </p>
74
+ </div>
75
+ <span class="tl-badge" data-tl-tone="info">candidate enabled</span>
76
+ </div>
77
+ <div class="tl-panel__body tl-stack">
78
+ <div class="tl-cluster">
79
+ <button
80
+ class="tl-button"
81
+ data-tl-variant="solid"
82
+ data-tl-tone="primary"
83
+ type="button"
84
+ >
85
+ Primary
86
+ </button>
87
+ <button class="tl-button" data-tl-variant="outline" type="button">
88
+ Neutral
89
+ </button>
90
+ <button
91
+ class="tl-button"
92
+ data-tl-variant="soft"
93
+ data-tl-tone="danger"
94
+ type="button"
95
+ >
96
+ Danger
97
+ </button>
98
+ <span class="tl-badge" data-tl-tone="success">Active</span>
99
+ </div>
100
+ <div class="tl-alert" data-tl-tone="warning" role="status">
101
+ <span class="tl-alert__icon" aria-hidden="true">!</span>
102
+ <div class="tl-alert__content">
103
+ <div class="tl-alert__title">Token review required</div>
104
+ <p class="tl-alert__description">
105
+ Candidate patterns can change during the alpha reset.
106
+ </p>
107
+ </div>
108
+ </div>
109
+ </div>
110
+ </section>
82
111
 
83
- <section class="tl-pattern-empty-state" data-tl-state="empty">
84
- <div class="tl-pattern-empty-state__content">
85
- <p class="tl-component-label">EmptyState</p>
86
- <h2 class="tl-component-heading">No reports are queued</h2>
87
- <p class="tl-component-body">
88
- Add a report or import a generated note. The empty state keeps the
89
- text centered, wrapped, and readable without app-specific classes.
90
- </p>
91
- </div>
92
- <div class="tl-pattern-empty-state__actions">
93
- <button class="tl-component-button" type="button" data-tl-tone="primary">
94
- Add report
95
- </button>
96
- <button class="tl-component-button" type="button">
97
- Import generated note
98
- </button>
99
- </div>
100
- </section>
112
+ <section class="tl-panel" id="dashboard">
113
+ <div class="tl-panel__header">
114
+ <h2 class="tl-panel__title">Recent events</h2>
115
+ <button class="tl-button" data-tl-size="sm" type="button">View all</button>
116
+ </div>
117
+ <div class="tl-panel__body">
118
+ <table class="tl-table">
119
+ <thead>
120
+ <tr>
121
+ <th>Event</th>
122
+ <th>User</th>
123
+ <th>Status</th>
124
+ <th>Time</th>
125
+ </tr>
126
+ </thead>
127
+ <tbody>
128
+ <tr>
129
+ <td>Workspace created</td>
130
+ <td>linnea@acme.io</td>
131
+ <td><span class="tl-badge" data-tl-tone="success">Success</span></td>
132
+ <td>2m</td>
133
+ </tr>
134
+ <tr>
135
+ <td>Webhook retry</td>
136
+ <td>system</td>
137
+ <td><span class="tl-badge" data-tl-tone="warning">Pending</span></td>
138
+ <td>21m</td>
139
+ </tr>
140
+ </tbody>
141
+ </table>
142
+ </div>
143
+ </section>
101
144
 
102
- <section
103
- class="tl-component-alert tl-layout-stack"
104
- data-tl-tone="danger"
105
- data-tl-state="error"
106
- role="status"
107
- >
108
- <h2 class="tl-component-heading">Stress case</h2>
109
- <p class="tl-component-body">
110
- Error copy can contain 한국어긴텍스트와VeryLongEnglishTokenWithoutSpaces,
111
- the number 202606110000000000000000000000000000000042, and a URL:
112
- <code class="tl-component-code"
113
- >https://example.com/errors/readability/overflow-detection/follow-up</code
114
- >.
115
- </p>
116
- <div class="tl-layout-cluster">
117
- <button class="tl-component-button" type="button" data-tl-tone="primary">
118
- Retry
119
- </button>
120
- <button class="tl-component-button" type="button">
121
- View diagnostics
122
- </button>
145
+ <section class="tl-settings-section" id="settings">
146
+ <div class="tl-settings-section__summary">
147
+ <h2 class="tl-heading">Settings</h2>
148
+ <p class="tl-text">Readable form sections with explicit helper text.</p>
149
+ </div>
150
+ <div class="tl-settings-section__content tl-stack">
151
+ <label class="tl-field">
152
+ <span class="tl-field__label">Workspace name</span>
153
+ <input class="tl-input" value="Northwind" />
154
+ <span class="tl-field__help">Visible to members and reports.</span>
155
+ </label>
156
+ <button class="tl-switch" role="switch" aria-checked="true" type="button">
157
+ <span class="tl-switch__track"><span class="tl-switch__thumb"></span></span>
158
+ <span class="tl-switch__label">Require two-factor authentication</span>
159
+ </button>
160
+ </div>
161
+ </section>
123
162
  </div>
124
- </section>
125
- </main>
163
+ </main>
164
+ </div>
126
165
  </body>
127
166
  </html>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@threelight/ui",
3
- "version": "0.2.0-alpha.1",
4
- "description": "Framework-neutral governed UI primitives for readable HTML/CSS interfaces.",
3
+ "version": "0.3.0-alpha.0",
4
+ "description": "Short-class CSS, role tokens, and metadata for service UI systems.",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "sideEffects": [