@f-ewald/components 1.39.0 → 1.40.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.
Files changed (192) hide show
  1. package/README.md +48 -0
  2. package/custom-elements.json +1046 -131
  3. package/dist/address-autocomplete.js +2 -2
  4. package/dist/address-autocomplete.js.map +1 -1
  5. package/dist/app-shell.js +4 -4
  6. package/dist/app-shell.js.map +1 -1
  7. package/dist/app-sidebar.js +2 -2
  8. package/dist/app-sidebar.js.map +1 -1
  9. package/dist/audio-player.js +1 -1
  10. package/dist/audio-player.js.map +1 -1
  11. package/dist/autocomplete-input.js +2 -2
  12. package/dist/autocomplete-input.js.map +1 -1
  13. package/dist/breadcrumb-nav.d.ts +69 -0
  14. package/dist/breadcrumb-nav.d.ts.map +1 -0
  15. package/dist/breadcrumb-nav.js +235 -0
  16. package/dist/breadcrumb-nav.js.map +1 -0
  17. package/dist/button-group.js +2 -2
  18. package/dist/button-group.js.map +1 -1
  19. package/dist/calendar-day.js +3 -3
  20. package/dist/calendar-day.js.map +1 -1
  21. package/dist/calendar-month.d.ts.map +1 -1
  22. package/dist/calendar-month.js +4 -1
  23. package/dist/calendar-month.js.map +1 -1
  24. package/dist/calendar-week.js +4 -4
  25. package/dist/calendar-week.js.map +1 -1
  26. package/dist/chat-message.js +1 -1
  27. package/dist/chat-message.js.map +1 -1
  28. package/dist/comment-composer.js +1 -1
  29. package/dist/comment-composer.js.map +1 -1
  30. package/dist/confirm-dialog.d.ts.map +1 -1
  31. package/dist/confirm-dialog.js +5 -2
  32. package/dist/confirm-dialog.js.map +1 -1
  33. package/dist/content-divider.js +1 -1
  34. package/dist/content-divider.js.map +1 -1
  35. package/dist/cron-schedule.d.ts.map +1 -1
  36. package/dist/cron-schedule.js +6 -5
  37. package/dist/cron-schedule.js.map +1 -1
  38. package/dist/data-table.d.ts.map +1 -1
  39. package/dist/data-table.js +3 -2
  40. package/dist/data-table.js.map +1 -1
  41. package/dist/dropdown-button.d.ts.map +1 -1
  42. package/dist/dropdown-button.js +4 -2
  43. package/dist/dropdown-button.js.map +1 -1
  44. package/dist/editable-text.js +1 -1
  45. package/dist/editable-text.js.map +1 -1
  46. package/dist/empty-state.d.ts +42 -0
  47. package/dist/empty-state.d.ts.map +1 -0
  48. package/dist/empty-state.js +172 -0
  49. package/dist/empty-state.js.map +1 -0
  50. package/dist/form-field.js +1 -1
  51. package/dist/form-field.js.map +1 -1
  52. package/dist/form-select.js +3 -3
  53. package/dist/form-select.js.map +1 -1
  54. package/dist/frame-box.js +1 -1
  55. package/dist/frame-box.js.map +1 -1
  56. package/dist/fullscreen-button.js +1 -1
  57. package/dist/fullscreen-button.js.map +1 -1
  58. package/dist/icons.d.ts +2 -0
  59. package/dist/icons.d.ts.map +1 -1
  60. package/dist/icons.js +2 -0
  61. package/dist/icons.js.map +1 -1
  62. package/dist/index.d.ts +6 -1
  63. package/dist/index.d.ts.map +1 -1
  64. package/dist/index.js +6 -1
  65. package/dist/index.js.map +1 -1
  66. package/dist/kanban-card.js +1 -1
  67. package/dist/kanban-card.js.map +1 -1
  68. package/dist/kanban-column.js +3 -3
  69. package/dist/kanban-column.js.map +1 -1
  70. package/dist/kbd-hint.d.ts.map +1 -1
  71. package/dist/kbd-hint.js +2 -1
  72. package/dist/kbd-hint.js.map +1 -1
  73. package/dist/link-card.js +1 -1
  74. package/dist/link-card.js.map +1 -1
  75. package/dist/markdown-view.js +3 -3
  76. package/dist/markdown-view.js.map +1 -1
  77. package/dist/modal-dialog.js +1 -1
  78. package/dist/modal-dialog.js.map +1 -1
  79. package/dist/multi-select.js +5 -5
  80. package/dist/multi-select.js.map +1 -1
  81. package/dist/pagination-nav.d.ts.map +1 -1
  82. package/dist/pagination-nav.js +5 -1
  83. package/dist/pagination-nav.js.map +1 -1
  84. package/dist/photo-gallery.js +1 -1
  85. package/dist/photo-gallery.js.map +1 -1
  86. package/dist/popover-panel.d.ts.map +1 -1
  87. package/dist/popover-panel.js +4 -2
  88. package/dist/popover-panel.js.map +1 -1
  89. package/dist/progress-bar.d.ts.map +1 -1
  90. package/dist/progress-bar.js +1 -0
  91. package/dist/progress-bar.js.map +1 -1
  92. package/dist/radio-cards.js +1 -1
  93. package/dist/radio-cards.js.map +1 -1
  94. package/dist/radio-pills.js +1 -1
  95. package/dist/radio-pills.js.map +1 -1
  96. package/dist/reveal-button.js +1 -1
  97. package/dist/reveal-button.js.map +1 -1
  98. package/dist/scroll-to-bottom.js +1 -1
  99. package/dist/scroll-to-bottom.js.map +1 -1
  100. package/dist/scroll-to-top.js +1 -1
  101. package/dist/scroll-to-top.js.map +1 -1
  102. package/dist/skip-link.d.ts +30 -0
  103. package/dist/skip-link.d.ts.map +1 -0
  104. package/dist/skip-link.js +136 -0
  105. package/dist/skip-link.js.map +1 -0
  106. package/dist/slide-panel.js +1 -1
  107. package/dist/slide-panel.js.map +1 -1
  108. package/dist/spec-list.d.ts +49 -0
  109. package/dist/spec-list.d.ts.map +1 -0
  110. package/dist/spec-list.js +168 -0
  111. package/dist/spec-list.js.map +1 -0
  112. package/dist/stat-meter.d.ts.map +1 -1
  113. package/dist/stat-meter.js +1 -0
  114. package/dist/stat-meter.js.map +1 -1
  115. package/dist/tab-bar.js +1 -1
  116. package/dist/tab-bar.js.map +1 -1
  117. package/dist/text-area.js +1 -1
  118. package/dist/text-area.js.map +1 -1
  119. package/dist/tile-grid.js +1 -1
  120. package/dist/tile-grid.js.map +1 -1
  121. package/dist/tokens.css +42 -1
  122. package/dist/tokens.d.ts +50 -0
  123. package/dist/tokens.d.ts.map +1 -1
  124. package/dist/tokens.js +132 -0
  125. package/dist/tokens.js.map +1 -1
  126. package/dist/tree-view.js +2 -2
  127. package/dist/tree-view.js.map +1 -1
  128. package/dist/ui-admonition.js +1 -1
  129. package/dist/ui-admonition.js.map +1 -1
  130. package/dist/ui-button.js +1 -1
  131. package/dist/ui-button.js.map +1 -1
  132. package/dist/video-player.js +1 -1
  133. package/dist/video-player.js.map +1 -1
  134. package/dist/vote-control.d.ts +40 -0
  135. package/dist/vote-control.d.ts.map +1 -0
  136. package/dist/vote-control.js +311 -0
  137. package/dist/vote-control.js.map +1 -0
  138. package/docs/address-autocomplete.md +1 -0
  139. package/docs/app-shell.md +1 -0
  140. package/docs/app-sidebar.md +1 -0
  141. package/docs/audio-player.md +1 -0
  142. package/docs/autocomplete-input.md +1 -0
  143. package/docs/breadcrumb-nav.md +70 -0
  144. package/docs/button-group.md +1 -0
  145. package/docs/calendar-day.md +1 -0
  146. package/docs/calendar-month.md +1 -0
  147. package/docs/calendar-week.md +1 -0
  148. package/docs/chat-message.md +1 -0
  149. package/docs/comment-composer.md +1 -0
  150. package/docs/confirm-dialog.md +1 -0
  151. package/docs/content-divider.md +1 -0
  152. package/docs/cron-schedule.md +2 -0
  153. package/docs/data-table.md +2 -0
  154. package/docs/design-language.md +57 -5
  155. package/docs/dropdown-button.md +1 -0
  156. package/docs/editable-text.md +1 -0
  157. package/docs/empty-state.md +55 -0
  158. package/docs/form-field.md +1 -0
  159. package/docs/form-select.md +1 -0
  160. package/docs/frame-box.md +1 -0
  161. package/docs/fullscreen-button.md +1 -0
  162. package/docs/icons.md +1 -0
  163. package/docs/kanban-card.md +1 -0
  164. package/docs/kanban-column.md +1 -0
  165. package/docs/kbd-hint.md +1 -0
  166. package/docs/link-card.md +1 -0
  167. package/docs/markdown-view.md +1 -0
  168. package/docs/modal-dialog.md +1 -0
  169. package/docs/multi-select.md +1 -0
  170. package/docs/pagination-nav.md +2 -0
  171. package/docs/photo-gallery.md +1 -0
  172. package/docs/popover-panel.md +1 -0
  173. package/docs/progress-bar.md +1 -0
  174. package/docs/radio-cards.md +1 -0
  175. package/docs/radio-pills.md +1 -0
  176. package/docs/reveal-button.md +1 -0
  177. package/docs/scroll-to-bottom.md +1 -0
  178. package/docs/scroll-to-top.md +1 -0
  179. package/docs/skip-link.md +54 -0
  180. package/docs/slide-panel.md +1 -0
  181. package/docs/spec-list.md +71 -0
  182. package/docs/stat-meter.md +1 -0
  183. package/docs/tab-bar.md +1 -0
  184. package/docs/text-area.md +1 -0
  185. package/docs/tile-grid.md +1 -0
  186. package/docs/tree-view.md +1 -0
  187. package/docs/ui-admonition.md +1 -0
  188. package/docs/ui-button.md +1 -0
  189. package/docs/video-player.md +1 -0
  190. package/docs/vote-control.md +73 -0
  191. package/llms.txt +201 -49
  192. package/package.json +1 -1
@@ -0,0 +1,311 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { LitElement, css, html, nothing } from "lit";
8
+ import { customElement, property } from "lit/decorators.js";
9
+ import { iconChevronDown, iconChevronUp } from "./icons.js";
10
+ import { tokens } from "./tokens.js";
11
+ /**
12
+ * An up/down vote widget with a live score readout — the "vote an entry up or
13
+ * down toward a promotion threshold" pattern from a public register site,
14
+ * where one member casts a single vote that can be changed or withdrawn at any
15
+ * time. Two native `<button>`s flank a score; the button matching the user's
16
+ * own cast `vote` reads as pressed (`aria-pressed`), and clicking it again
17
+ * withdraws the vote. Set an optional `target` to render a thin progress meter
18
+ * toward the promotion threshold beneath (vertical) or beside (horizontal) the
19
+ * buttons.
20
+ *
21
+ * @element vote-control
22
+ * @fires vote-change - The user cast, switched, or withdrew their vote;
23
+ * detail: { vote: "up" | "down" | null, value: number }.
24
+ */
25
+ let VoteControl = class VoteControl extends LitElement {
26
+ constructor() {
27
+ super(...arguments);
28
+ /** The current net score shown between the buttons. */
29
+ this.value = 0;
30
+ /** This user's own cast vote, or `null` if they have not voted. Reflected so CSS can style the pressed button. */
31
+ this.vote = null;
32
+ /** Disables both buttons and dims the control. */
33
+ this.disabled = false;
34
+ /** Layout — `vertical` is the compact stacked box (default); `horizontal` is the wide inline variant. */
35
+ this.orientation = "vertical";
36
+ /** Promotion threshold. When > 0, a thin progress meter toward it renders; when 0 (default) no meter renders and no space is reserved for it. */
37
+ this.target = 0;
38
+ /** Accessible label naming the vote group. */
39
+ this.label = "Vote";
40
+ }
41
+ static { this.styles = [
42
+ tokens,
43
+ css `
44
+ :host {
45
+ display: inline-block;
46
+ font-family: var(
47
+ --ui-font,
48
+ ui-sans-serif,
49
+ system-ui,
50
+ sans-serif,
51
+ "Apple Color Emoji",
52
+ "Segoe UI Emoji",
53
+ "Segoe UI Symbol",
54
+ "Noto Color Emoji"
55
+ );
56
+ }
57
+ .control {
58
+ display: inline-flex;
59
+ box-sizing: border-box;
60
+ border: var(--ui-border-width, 1px) solid var(--ui-border, #e2e8f0);
61
+ border-radius: var(--ui-radius, 0.5rem);
62
+ background: var(--ui-surface, #ffffff);
63
+ }
64
+ /* Vertical (default): stacked box — up, score, down, optional meter. */
65
+ :host([orientation="vertical"]) .control {
66
+ flex-direction: column;
67
+ align-items: stretch;
68
+ padding: 0.25rem;
69
+ gap: 0.25rem;
70
+ }
71
+ /* Horizontal: wide inline row — up, score, down, optional meter beside. */
72
+ :host([orientation="horizontal"]) .control {
73
+ flex-direction: row;
74
+ align-items: center;
75
+ padding: 0.25rem 0.5rem;
76
+ gap: 0.5rem;
77
+ }
78
+ .buttons {
79
+ display: flex;
80
+ align-items: center;
81
+ justify-content: center;
82
+ gap: 0.25rem;
83
+ }
84
+ :host([orientation="vertical"]) .buttons {
85
+ flex-direction: column;
86
+ }
87
+ :host([orientation="horizontal"]) .buttons {
88
+ flex-direction: row;
89
+ }
90
+ .vote-btn {
91
+ display: inline-flex;
92
+ align-items: center;
93
+ justify-content: center;
94
+ width: 2rem;
95
+ height: 2rem;
96
+ padding: 0;
97
+ box-sizing: border-box;
98
+ border: none;
99
+ border-radius: var(--ui-radius-sm, 0.25rem);
100
+ background: none;
101
+ color: var(--ui-text-muted, #64748b);
102
+ cursor: pointer;
103
+ }
104
+ .vote-btn:hover:not(:disabled) {
105
+ background: var(--ui-surface-muted, #f8fafc);
106
+ color: var(--ui-text, #0f172a);
107
+ }
108
+ .vote-btn.up[aria-pressed="true"] {
109
+ color: var(--ui-success, #16a34a);
110
+ background: var(--ui-surface-muted, #f8fafc);
111
+ }
112
+ .vote-btn.down[aria-pressed="true"] {
113
+ color: var(--ui-danger, #dc2626);
114
+ background: var(--ui-surface-muted, #f8fafc);
115
+ }
116
+ .vote-btn:disabled {
117
+ cursor: not-allowed;
118
+ opacity: 0.5;
119
+ }
120
+ .vote-btn:focus-visible {
121
+ outline: none;
122
+ box-shadow: var(--ui-focus-ring, 0 0 0 3px rgb(79 70 229 / 0.35));
123
+ }
124
+ .score {
125
+ min-width: 2rem;
126
+ text-align: center;
127
+ font-size: var(--ui-font-size-lg, 1rem);
128
+ font-weight: var(--ui-font-weight-semibold, 600);
129
+ line-height: var(--ui-line-height-tight, 1.25);
130
+ color: var(--ui-text, #0f172a);
131
+ font-variant-numeric: var(--ui-numeric, normal);
132
+ }
133
+ .meter {
134
+ display: flex;
135
+ flex-direction: column;
136
+ gap: 0.25rem;
137
+ }
138
+ :host([orientation="horizontal"]) .meter {
139
+ min-width: 4rem;
140
+ }
141
+ .track {
142
+ display: block;
143
+ width: 100%;
144
+ height: 0.25rem;
145
+ border-radius: var(--ui-radius-pill, 9999px);
146
+ background: var(--ui-surface-muted, #f8fafc);
147
+ overflow: hidden;
148
+ }
149
+ .fill {
150
+ display: block;
151
+ height: 100%;
152
+ background: var(--ui-button-accent, var(--ui-primary, #4f46e5));
153
+ transition: width 200ms ease;
154
+ }
155
+ .caption {
156
+ font-size: var(--ui-font-size-xs, 0.6875rem);
157
+ font-weight: var(--ui-font-weight-medium, 500);
158
+ letter-spacing: var(--ui-tracking-wide, 0.04em);
159
+ line-height: var(--ui-line-height-tight, 1.25);
160
+ text-transform: var(--ui-label-transform, none);
161
+ color: var(--ui-text-muted, #64748b);
162
+ font-variant-numeric: var(--ui-numeric, normal);
163
+ text-align: center;
164
+ white-space: nowrap;
165
+ }
166
+ @media (prefers-reduced-motion: no-preference) {
167
+ .score.bump {
168
+ animation: vote-bump 220ms ease;
169
+ }
170
+ @keyframes vote-bump {
171
+ 0% {
172
+ transform: scale(1);
173
+ }
174
+ 40% {
175
+ transform: scale(1.25);
176
+ }
177
+ 100% {
178
+ transform: scale(1);
179
+ }
180
+ }
181
+ }
182
+ @media (prefers-reduced-motion: reduce) {
183
+ .fill {
184
+ transition: none;
185
+ }
186
+ }
187
+ @media (forced-colors: active) {
188
+ .control {
189
+ border: 1px solid CanvasText;
190
+ }
191
+ .vote-btn:focus-visible {
192
+ outline: 2px solid CanvasText;
193
+ outline-offset: 2px;
194
+ box-shadow: none;
195
+ }
196
+ .vote-btn[aria-pressed="true"] {
197
+ outline: 2px solid Highlight;
198
+ }
199
+ .vote-btn:disabled {
200
+ color: GrayText;
201
+ opacity: 1;
202
+ }
203
+ .track {
204
+ border: 1px solid CanvasText;
205
+ }
206
+ .fill {
207
+ background: Highlight;
208
+ }
209
+ }
210
+ `,
211
+ ]; }
212
+ updated(changed) {
213
+ if (changed.has("value") && changed.get("value") !== undefined) {
214
+ this.#restartBump();
215
+ }
216
+ }
217
+ #restartBump() {
218
+ const score = this.renderRoot?.querySelector(".score");
219
+ if (!score)
220
+ return;
221
+ score.classList.remove("bump");
222
+ // Force a reflow so removing/re-adding the class restarts the animation.
223
+ void score.offsetWidth;
224
+ score.classList.add("bump");
225
+ }
226
+ #cast(dir) {
227
+ if (this.disabled)
228
+ return;
229
+ const previous = this.vote;
230
+ const nextVote = previous === dir ? null : dir;
231
+ const contribution = (v) => (v === "up" ? 1 : v === "down" ? -1 : 0);
232
+ const delta = contribution(nextVote) - contribution(previous);
233
+ this.vote = nextVote;
234
+ this.value += delta;
235
+ this.dispatchEvent(new CustomEvent("vote-change", {
236
+ detail: { vote: this.vote, value: this.value },
237
+ bubbles: true,
238
+ composed: true,
239
+ }));
240
+ }
241
+ render() {
242
+ const showMeter = this.target > 0;
243
+ const progress = showMeter ? Math.min(100, Math.max(0, (this.value / this.target) * 100)) : 0;
244
+ return html `
245
+ <div class="control" role="group" aria-label=${this.label}>
246
+ <div class="buttons">
247
+ <button
248
+ type="button"
249
+ class="vote-btn up"
250
+ aria-label="Vote up"
251
+ aria-pressed=${this.vote === "up" ? "true" : "false"}
252
+ ?disabled=${this.disabled}
253
+ @click=${() => this.#cast("up")}
254
+ >
255
+ ${iconChevronUp(18)}
256
+ </button>
257
+ <span class="score" aria-live="polite" aria-atomic="true">${this.value}</span>
258
+ <button
259
+ type="button"
260
+ class="vote-btn down"
261
+ aria-label="Vote down"
262
+ aria-pressed=${this.vote === "down" ? "true" : "false"}
263
+ ?disabled=${this.disabled}
264
+ @click=${() => this.#cast("down")}
265
+ >
266
+ ${iconChevronDown(18)}
267
+ </button>
268
+ </div>
269
+ ${showMeter
270
+ ? html `
271
+ <div class="meter">
272
+ <span
273
+ class="track"
274
+ role="progressbar"
275
+ aria-valuenow=${this.value}
276
+ aria-valuemin="0"
277
+ aria-valuemax=${this.target}
278
+ >
279
+ <span class="fill" style=${`width: ${progress}%`}></span>
280
+ </span>
281
+ <span class="caption">${this.value} / ${this.target}</span>
282
+ </div>
283
+ `
284
+ : nothing}
285
+ </div>
286
+ `;
287
+ }
288
+ };
289
+ __decorate([
290
+ property({ type: Number, reflect: true })
291
+ ], VoteControl.prototype, "value", void 0);
292
+ __decorate([
293
+ property({ reflect: true })
294
+ ], VoteControl.prototype, "vote", void 0);
295
+ __decorate([
296
+ property({ type: Boolean, reflect: true })
297
+ ], VoteControl.prototype, "disabled", void 0);
298
+ __decorate([
299
+ property({ reflect: true })
300
+ ], VoteControl.prototype, "orientation", void 0);
301
+ __decorate([
302
+ property({ type: Number })
303
+ ], VoteControl.prototype, "target", void 0);
304
+ __decorate([
305
+ property()
306
+ ], VoteControl.prototype, "label", void 0);
307
+ VoteControl = __decorate([
308
+ customElement("vote-control")
309
+ ], VoteControl);
310
+ export { VoteControl };
311
+ //# sourceMappingURL=vote-control.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vote-control.js","sourceRoot":"","sources":["../src/vote-control.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAErD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC;;;;;;;;;;;;;GAaG;AAEI,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,UAAU;IAApC;;QA6KL,uDAAuD;QACZ,UAAK,GAAG,CAAC,CAAC;QAErD,kHAAkH;QACrF,SAAI,GAAyB,IAAI,CAAC;QAE/D,kDAAkD;QACN,aAAQ,GAAG,KAAK,CAAC;QAE7D,yGAAyG;QAC5E,gBAAW,GAA8B,UAAU,CAAC;QAEjF,iJAAiJ;QACrH,WAAM,GAAG,CAAC,CAAC;QAEvC,8CAA8C;QAClC,UAAK,GAAG,MAAM,CAAC;IAiF7B,CAAC;aA7QiB,WAAM,GAAG;QACvB,MAAM;QACN,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAuKF;KACF,AA1KqB,CA0KpB;IAoBO,OAAO,CAAC,OAA6B;QAC5C,IAAI,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,SAAS,EAAE,CAAC;YAC/D,IAAI,CAAC,YAAY,EAAE,CAAC;QACtB,CAAC;IACH,CAAC;IAED,YAAY;QACV,MAAM,KAAK,GAAG,IAAI,CAAC,UAAU,EAAE,aAAa,CAAc,QAAQ,CAAC,CAAC;QACpE,IAAI,CAAC,KAAK;YAAE,OAAO;QACnB,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAC/B,yEAAyE;QACzE,KAAK,KAAK,CAAC,WAAW,CAAC;QACvB,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAC9B,CAAC;IAED,KAAK,CAAC,GAAkB;QACtB,IAAI,IAAI,CAAC,QAAQ;YAAE,OAAO;QAC1B,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC;QAC3B,MAAM,QAAQ,GAAG,QAAQ,KAAK,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC;QAC/C,MAAM,YAAY,GAAG,CAAC,CAAuB,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC3F,MAAM,KAAK,GAAG,YAAY,CAAC,QAAQ,CAAC,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAC;QAC9D,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC;QACrB,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC;QACpB,IAAI,CAAC,aAAa,CAChB,IAAI,WAAW,CAAC,aAAa,EAAE;YAC7B,MAAM,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE;YAC9C,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,IAAI;SACf,CAAC,CACH,CAAC;IACJ,CAAC;IAEQ,MAAM;QACb,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;QAClC,MAAM,QAAQ,GAAG,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC9F,OAAO,IAAI,CAAA;qDACsC,IAAI,CAAC,KAAK;;;;;;2BAMpC,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO;wBACxC,IAAI,CAAC,QAAQ;qBAChB,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC;;cAE7B,aAAa,CAAC,EAAE,CAAC;;sEAEuC,IAAI,CAAC,KAAK;;;;;2BAKrD,IAAI,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO;wBAC1C,IAAI,CAAC,QAAQ;qBAChB,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC;;cAE/B,eAAe,CAAC,EAAE,CAAC;;;UAGvB,SAAS;YACT,CAAC,CAAC,IAAI,CAAA;;;;;kCAKkB,IAAI,CAAC,KAAK;;kCAEV,IAAI,CAAC,MAAM;;6CAEA,UAAU,QAAQ,GAAG;;wCAE1B,IAAI,CAAC,KAAK,MAAM,IAAI,CAAC,MAAM;;aAEtD;YACH,CAAC,CAAC,OAAO;;KAEd,CAAC;IACJ,CAAC;CACF,CAAA;AAhG4C;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;0CAAW;AAGxB;IAA5B,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;yCAAmC;AAGnB;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;6CAAkB;AAGhC;IAA5B,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;gDAAqD;AAGrD;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;2CAAY;AAG3B;IAAX,QAAQ,EAAE;0CAAgB;AA7LhB,WAAW;IADvB,aAAa,CAAC,cAAc,CAAC;GACjB,WAAW,CA8QvB","sourcesContent":["import { LitElement, css, html, nothing } from \"lit\";\nimport type { PropertyValues } from \"lit\";\nimport { customElement, property } from \"lit/decorators.js\";\nimport { iconChevronDown, iconChevronUp } from \"./icons.js\";\nimport { tokens } from \"./tokens.js\";\n\n/**\n * An up/down vote widget with a live score readout — the \"vote an entry up or\n * down toward a promotion threshold\" pattern from a public register site,\n * where one member casts a single vote that can be changed or withdrawn at any\n * time. Two native `<button>`s flank a score; the button matching the user's\n * own cast `vote` reads as pressed (`aria-pressed`), and clicking it again\n * withdraws the vote. Set an optional `target` to render a thin progress meter\n * toward the promotion threshold beneath (vertical) or beside (horizontal) the\n * buttons.\n *\n * @element vote-control\n * @fires vote-change - The user cast, switched, or withdrew their vote;\n * detail: { vote: \"up\" | \"down\" | null, value: number }.\n */\n@customElement(\"vote-control\")\nexport class VoteControl extends LitElement {\n static override styles = [\n tokens,\n css`\n :host {\n display: inline-block;\n font-family: var(\n --ui-font,\n ui-sans-serif,\n system-ui,\n sans-serif,\n \"Apple Color Emoji\",\n \"Segoe UI Emoji\",\n \"Segoe UI Symbol\",\n \"Noto Color Emoji\"\n );\n }\n .control {\n display: inline-flex;\n box-sizing: border-box;\n border: var(--ui-border-width, 1px) solid var(--ui-border, #e2e8f0);\n border-radius: var(--ui-radius, 0.5rem);\n background: var(--ui-surface, #ffffff);\n }\n /* Vertical (default): stacked box — up, score, down, optional meter. */\n :host([orientation=\"vertical\"]) .control {\n flex-direction: column;\n align-items: stretch;\n padding: 0.25rem;\n gap: 0.25rem;\n }\n /* Horizontal: wide inline row — up, score, down, optional meter beside. */\n :host([orientation=\"horizontal\"]) .control {\n flex-direction: row;\n align-items: center;\n padding: 0.25rem 0.5rem;\n gap: 0.5rem;\n }\n .buttons {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 0.25rem;\n }\n :host([orientation=\"vertical\"]) .buttons {\n flex-direction: column;\n }\n :host([orientation=\"horizontal\"]) .buttons {\n flex-direction: row;\n }\n .vote-btn {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 2rem;\n height: 2rem;\n padding: 0;\n box-sizing: border-box;\n border: none;\n border-radius: var(--ui-radius-sm, 0.25rem);\n background: none;\n color: var(--ui-text-muted, #64748b);\n cursor: pointer;\n }\n .vote-btn:hover:not(:disabled) {\n background: var(--ui-surface-muted, #f8fafc);\n color: var(--ui-text, #0f172a);\n }\n .vote-btn.up[aria-pressed=\"true\"] {\n color: var(--ui-success, #16a34a);\n background: var(--ui-surface-muted, #f8fafc);\n }\n .vote-btn.down[aria-pressed=\"true\"] {\n color: var(--ui-danger, #dc2626);\n background: var(--ui-surface-muted, #f8fafc);\n }\n .vote-btn:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n }\n .vote-btn:focus-visible {\n outline: none;\n box-shadow: var(--ui-focus-ring, 0 0 0 3px rgb(79 70 229 / 0.35));\n }\n .score {\n min-width: 2rem;\n text-align: center;\n font-size: var(--ui-font-size-lg, 1rem);\n font-weight: var(--ui-font-weight-semibold, 600);\n line-height: var(--ui-line-height-tight, 1.25);\n color: var(--ui-text, #0f172a);\n font-variant-numeric: var(--ui-numeric, normal);\n }\n .meter {\n display: flex;\n flex-direction: column;\n gap: 0.25rem;\n }\n :host([orientation=\"horizontal\"]) .meter {\n min-width: 4rem;\n }\n .track {\n display: block;\n width: 100%;\n height: 0.25rem;\n border-radius: var(--ui-radius-pill, 9999px);\n background: var(--ui-surface-muted, #f8fafc);\n overflow: hidden;\n }\n .fill {\n display: block;\n height: 100%;\n background: var(--ui-button-accent, var(--ui-primary, #4f46e5));\n transition: width 200ms ease;\n }\n .caption {\n font-size: var(--ui-font-size-xs, 0.6875rem);\n font-weight: var(--ui-font-weight-medium, 500);\n letter-spacing: var(--ui-tracking-wide, 0.04em);\n line-height: var(--ui-line-height-tight, 1.25);\n text-transform: var(--ui-label-transform, none);\n color: var(--ui-text-muted, #64748b);\n font-variant-numeric: var(--ui-numeric, normal);\n text-align: center;\n white-space: nowrap;\n }\n @media (prefers-reduced-motion: no-preference) {\n .score.bump {\n animation: vote-bump 220ms ease;\n }\n @keyframes vote-bump {\n 0% {\n transform: scale(1);\n }\n 40% {\n transform: scale(1.25);\n }\n 100% {\n transform: scale(1);\n }\n }\n }\n @media (prefers-reduced-motion: reduce) {\n .fill {\n transition: none;\n }\n }\n @media (forced-colors: active) {\n .control {\n border: 1px solid CanvasText;\n }\n .vote-btn:focus-visible {\n outline: 2px solid CanvasText;\n outline-offset: 2px;\n box-shadow: none;\n }\n .vote-btn[aria-pressed=\"true\"] {\n outline: 2px solid Highlight;\n }\n .vote-btn:disabled {\n color: GrayText;\n opacity: 1;\n }\n .track {\n border: 1px solid CanvasText;\n }\n .fill {\n background: Highlight;\n }\n }\n `,\n ];\n\n /** The current net score shown between the buttons. */\n @property({ type: Number, reflect: true }) value = 0;\n\n /** This user's own cast vote, or `null` if they have not voted. Reflected so CSS can style the pressed button. */\n @property({ reflect: true }) vote: \"up\" | \"down\" | null = null;\n\n /** Disables both buttons and dims the control. */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n /** Layout — `vertical` is the compact stacked box (default); `horizontal` is the wide inline variant. */\n @property({ reflect: true }) orientation: \"vertical\" | \"horizontal\" = \"vertical\";\n\n /** Promotion threshold. When > 0, a thin progress meter toward it renders; when 0 (default) no meter renders and no space is reserved for it. */\n @property({ type: Number }) target = 0;\n\n /** Accessible label naming the vote group. */\n @property() label = \"Vote\";\n\n override updated(changed: PropertyValues<this>) {\n if (changed.has(\"value\") && changed.get(\"value\") !== undefined) {\n this.#restartBump();\n }\n }\n\n #restartBump() {\n const score = this.renderRoot?.querySelector<HTMLElement>(\".score\");\n if (!score) return;\n score.classList.remove(\"bump\");\n // Force a reflow so removing/re-adding the class restarts the animation.\n void score.offsetWidth;\n score.classList.add(\"bump\");\n }\n\n #cast(dir: \"up\" | \"down\") {\n if (this.disabled) return;\n const previous = this.vote;\n const nextVote = previous === dir ? null : dir;\n const contribution = (v: \"up\" | \"down\" | null) => (v === \"up\" ? 1 : v === \"down\" ? -1 : 0);\n const delta = contribution(nextVote) - contribution(previous);\n this.vote = nextVote;\n this.value += delta;\n this.dispatchEvent(\n new CustomEvent(\"vote-change\", {\n detail: { vote: this.vote, value: this.value },\n bubbles: true,\n composed: true,\n }),\n );\n }\n\n override render() {\n const showMeter = this.target > 0;\n const progress = showMeter ? Math.min(100, Math.max(0, (this.value / this.target) * 100)) : 0;\n return html`\n <div class=\"control\" role=\"group\" aria-label=${this.label}>\n <div class=\"buttons\">\n <button\n type=\"button\"\n class=\"vote-btn up\"\n aria-label=\"Vote up\"\n aria-pressed=${this.vote === \"up\" ? \"true\" : \"false\"}\n ?disabled=${this.disabled}\n @click=${() => this.#cast(\"up\")}\n >\n ${iconChevronUp(18)}\n </button>\n <span class=\"score\" aria-live=\"polite\" aria-atomic=\"true\">${this.value}</span>\n <button\n type=\"button\"\n class=\"vote-btn down\"\n aria-label=\"Vote down\"\n aria-pressed=${this.vote === \"down\" ? \"true\" : \"false\"}\n ?disabled=${this.disabled}\n @click=${() => this.#cast(\"down\")}\n >\n ${iconChevronDown(18)}\n </button>\n </div>\n ${showMeter\n ? html`\n <div class=\"meter\">\n <span\n class=\"track\"\n role=\"progressbar\"\n aria-valuenow=${this.value}\n aria-valuemin=\"0\"\n aria-valuemax=${this.target}\n >\n <span class=\"fill\" style=${`width: ${progress}%`}></span>\n </span>\n <span class=\"caption\">${this.value} / ${this.target}</span>\n </div>\n `\n : nothing}\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"vote-control\": VoteControl;\n }\n}\n"]}
@@ -67,6 +67,7 @@ _None._
67
67
  | Custom property |
68
68
  | --- |
69
69
  | `--ui-border` |
70
+ | `--ui-border-width` |
70
71
  | `--ui-danger` |
71
72
  | `--ui-focus-ring` |
72
73
  | `--ui-font` |
package/docs/app-shell.md CHANGED
@@ -101,6 +101,7 @@ _None._
101
101
  | Custom property |
102
102
  | --- |
103
103
  | `--ui-border` |
104
+ | `--ui-border-width` |
104
105
  | `--ui-focus-ring` |
105
106
  | `--ui-font-size-sm` |
106
107
  | `--ui-line-height-tight` |
@@ -54,6 +54,7 @@ _None._
54
54
  | Custom property |
55
55
  | --- |
56
56
  | `--ui-border` |
57
+ | `--ui-border-width` |
57
58
  | `--ui-focus-ring` |
58
59
  | `--ui-font` |
59
60
  | `--ui-font-size-sm` |
@@ -52,6 +52,7 @@ _None._
52
52
  | Custom property |
53
53
  | --- |
54
54
  | `--ui-border` |
55
+ | `--ui-border-width` |
55
56
  | `--ui-danger` |
56
57
  | `--ui-font` |
57
58
  | `--ui-font-size-sm` |
@@ -77,6 +77,7 @@ _None._
77
77
  | Custom property |
78
78
  | --- |
79
79
  | `--ui-border` |
80
+ | `--ui-border-width` |
80
81
  | `--ui-danger` |
81
82
  | `--ui-focus-ring` |
82
83
  | `--ui-font` |
@@ -0,0 +1,70 @@
1
+ # `<breadcrumb-nav>`
2
+
3
+ A breadcrumb trail: a `<nav aria-label="Breadcrumb">` wrapping an ordered
4
+ list, with chevron separators and the current page rendered as plain,
5
+ non-interactive text. Designed to drop into `page-header`'s `breadcrumb`
6
+ slot, but usable on its own anywhere a trail is needed.
7
+
8
+ The last `items` entry is always treated as the current page: it renders as
9
+ text with `aria-current="page"` even if it carries an `href`. Middle entries
10
+ without an `href` render as plain text too; only middle entries with an
11
+ `href` are real anchors.
12
+
13
+ When `max-visible` is greater than zero and the trail is longer than that,
14
+ the middle collapses behind an overflow button that always keeps the first
15
+ and current crumbs visible; activating it toggles `expanded` to reveal the
16
+ hidden crumbs in place.
17
+
18
+ ## Install
19
+
20
+ ```js
21
+ import "@f-ewald/components/breadcrumb-nav.js";
22
+ ```
23
+
24
+ ## Usage
25
+
26
+ ```html
27
+ <breadcrumb-nav></breadcrumb-nav>
28
+ <script type="module">
29
+ const trail = document.querySelector("breadcrumb-nav");
30
+ trail.items = [
31
+ { label: "Home", href: "/" },
32
+ { label: "Settings", href: "/settings" },
33
+ { label: "Members" },
34
+ ];
35
+ trail.addEventListener("breadcrumb-navigate", (e) => console.log(e.detail.item.label, e.detail.index));
36
+ </script>
37
+ ```
38
+
39
+ ## Attributes / properties
40
+
41
+ | Property | Attribute | Type | Default | Description |
42
+ | --- | --- | --- | --- | --- |
43
+ | `items` | `items` | `BreadcrumbItem[]` | `[]` | The crumbs, root first. The last entry is the current page and is rendered as non-interactive text with `aria-current="page"`. |
44
+ | `maxVisible` | `max-visible` | `number` | `0` | When greater than zero and the trail has more items than this, collapse the middle of the trail behind an overflow button (the first and current crumbs always stay visible). `0` (the default) never collapses. |
45
+ | `expanded` | `expanded` | `boolean` | `false` | Whether a collapsed trail is currently expanded to show its hidden crumbs. |
46
+
47
+ ## Events
48
+
49
+ | Event | Description |
50
+ | --- | --- |
51
+ | `breadcrumb-navigate` | A crumb link was activated; `detail` is `{ item: BreadcrumbItem; index: number }`. This is an additional notification hook only — the anchor's native navigation is never prevented, so crumbs stay real, middle-clickable, right-clickable links. |
52
+
53
+ ## Slots
54
+
55
+ _None._
56
+
57
+ ## CSS custom properties
58
+
59
+ | Custom property |
60
+ | --- |
61
+ | `--ui-focus-ring` |
62
+ | `--ui-font` |
63
+ | `--ui-font-size-sm` |
64
+ | `--ui-font-weight-medium` |
65
+ | `--ui-font-weight-regular` |
66
+ | `--ui-line-height-glyph` |
67
+ | `--ui-line-height-tight` |
68
+ | `--ui-radius-sm` |
69
+ | `--ui-text` |
70
+ | `--ui-text-muted` |
@@ -63,6 +63,7 @@ _None._
63
63
  | Custom property |
64
64
  | --- |
65
65
  | `--ui-border` |
66
+ | `--ui-border-width` |
66
67
  | `--ui-button-background` |
67
68
  | `--ui-button-highlight` |
68
69
  | `--ui-button-secondary-background` |
@@ -55,6 +55,7 @@ _None._
55
55
  | Custom property |
56
56
  | --- |
57
57
  | `--ui-border` |
58
+ | `--ui-border-width` |
58
59
  | `--ui-danger` |
59
60
  | `--ui-focus-ring` |
60
61
  | `--ui-font` |
@@ -65,6 +65,7 @@ _None._
65
65
  | Custom property |
66
66
  | --- |
67
67
  | `--ui-border` |
68
+ | `--ui-border-width` |
68
69
  | `--ui-danger` |
69
70
  | `--ui-focus-ring` |
70
71
  | `--ui-font` |
@@ -54,6 +54,7 @@ _None._
54
54
  | Custom property |
55
55
  | --- |
56
56
  | `--ui-border` |
57
+ | `--ui-border-width` |
57
58
  | `--ui-danger` |
58
59
  | `--ui-focus-ring` |
59
60
  | `--ui-font` |
@@ -50,6 +50,7 @@ _None._
50
50
  | Custom property |
51
51
  | --- |
52
52
  | `--ui-border` |
53
+ | `--ui-border-width` |
53
54
  | `--ui-focus-ring` |
54
55
  | `--ui-font` |
55
56
  | `--ui-font-mono` |
@@ -62,6 +62,7 @@ _None._
62
62
  | Custom property |
63
63
  | --- |
64
64
  | `--ui-border` |
65
+ | `--ui-border-width` |
65
66
  | `--ui-focus-ring` |
66
67
  | `--ui-font` |
67
68
  | `--ui-font-size` |
@@ -51,6 +51,7 @@ import "@f-ewald/components/confirm-dialog.js";
51
51
  | Custom property |
52
52
  | --- |
53
53
  | `--ui-border` |
54
+ | `--ui-border-width` |
54
55
  | `--ui-button-background` |
55
56
  | `--ui-button-background-active` |
56
57
  | `--ui-button-background-hover` |
@@ -45,6 +45,7 @@ _None._
45
45
  | Custom property |
46
46
  | --- |
47
47
  | `--ui-border` |
48
+ | `--ui-border-width` |
48
49
  | `--ui-font` |
49
50
  | `--ui-font-size-sm` |
50
51
  | `--ui-font-weight-medium` |
@@ -64,12 +64,14 @@ _None._
64
64
  | Custom property |
65
65
  | --- |
66
66
  | `--ui-border` |
67
+ | `--ui-border-width` |
67
68
  | `--ui-focus-ring` |
68
69
  | `--ui-font` |
69
70
  | `--ui-font-mono` |
70
71
  | `--ui-font-size-sm` |
71
72
  | `--ui-font-size-xs` |
72
73
  | `--ui-font-weight-medium` |
74
+ | `--ui-label-transform` |
73
75
  | `--ui-line-height-tight` |
74
76
  | `--ui-primary` |
75
77
  | `--ui-radius` |
@@ -57,10 +57,12 @@ _None._
57
57
  | Custom property |
58
58
  | --- |
59
59
  | `--ui-border` |
60
+ | `--ui-border-width` |
60
61
  | `--ui-focus-ring` |
61
62
  | `--ui-font` |
62
63
  | `--ui-font-size-sm` |
63
64
  | `--ui-font-weight-semibold` |
65
+ | `--ui-label-transform` |
64
66
  | `--ui-surface-muted` |
65
67
  | `--ui-text` |
66
68
  | `--ui-text-muted` |
@@ -23,15 +23,32 @@ defines the details used when creating or reviewing components.
23
23
  fallback, and any newly introduced `--ui-*` usage must add/carry one too.
24
24
  - Themes are single-valued and mutually exclusive, selected by `data-theme` on
25
25
  `<html>`: `dark` and `light` force one of the two flat palettes, `gradient`
26
- glosses buttons and toasts, and `metro` squares corners and flattens shadows
27
- over a blue accent. `dark` aside, each is layered on the light palette and
26
+ glosses buttons and toasts, `metro` squares corners and flattens shadows over
27
+ a blue accent, and `blueprint` restyles the palette as a monospace technical
28
+ spec sheet — ink on paper, one pure-blue accent, square corners, and
29
+ structure carried by 1.5px hairline rules instead of shadows. `dark` aside,
30
+ each is layered on the light palette and
28
31
  must be excluded from `tokens.css`'s `prefers-color-scheme: dark` media query
29
32
  — that selector outranks a bare `[data-theme]`, so a missing exclusion yields
30
33
  a half-dark hybrid rather than an outright failure. Adding a theme therefore
31
34
  means adding it to `lightThemes` in `generate-tokens-css.mjs`, which derives
32
35
  both the block and the exclusion from that one list.
33
- - Colors are the normal subject of a theme; `metro` is the sole precedent for
34
- overriding shape, and type metrics are never themed.
36
+ - Colors are the normal subject of a theme. Three other axes are themeable, each
37
+ introduced by exactly one theme and each defaulting to the behavior that
38
+ predates it:
39
+ - **Shape** — `metro` and `blueprint` set every `--ui-radius*` to `0`.
40
+ - **Border weight** — `--ui-border-width` (`1px`), which `blueprint` takes to
41
+ `1.5px`. Every genuine surface or control border reads it; see "Borders"
42
+ below for what is deliberately excluded.
43
+ - **Label case** — `--ui-label-transform` (`none`), which `blueprint` takes to
44
+ `uppercase`, and `--ui-numeric` (`normal`), which it takes to
45
+ `tabular-nums`.
46
+ - **Type family** — `--ui-font` only. `blueprint` retargets it to a monospace
47
+ stack led by "Space Mono", which falls through to the system mono stack when
48
+ no webfont is loaded, so the theme still renders correctly with zero
49
+ external CSS.
50
+ Type *metrics* — size, weight, line height, tracking — are never themed in any
51
+ theme: they encode hierarchy rather than style.
35
52
  - Semantic states use `primary`, `info`, `success`, `warning`, and `danger`.
36
53
  - Foregrounds on solid semantic fills use `--ui-on-accent`.
37
54
  - Elevated dark tooltips use `--ui-tooltip`; modal backdrops use
@@ -86,6 +103,20 @@ literal values are migrated onto them.
86
103
  labels, and `--ui-line-height-normal` (1.5) for running body text.
87
104
  - **Tracking:** `--ui-tracking-normal` (0) is the default; `--ui-tracking-wide`
88
105
  (0.04em) is the single widened step for uppercase micro-labels.
106
+ - **Label case:** chrome micro-labels — the small, wide-tracked text that names
107
+ a region, a field, or a column (`spec-list` keys, `data-table` headers,
108
+ `stat-meter` and `cron-schedule` group labels) — carry
109
+ `text-transform: var(--ui-label-transform, none)` so a theme can set them in
110
+ caps. Never apply it to user-supplied content: shouting someone's data is not
111
+ a theme's decision, and `text-transform` is presentational, so the text still
112
+ copies out in its original casing. Components that are uppercase by design in
113
+ every theme (`frame-box`'s legend, `app-sidebar`'s section heading) keep a
114
+ literal `uppercase` — the token exists to *add* caps, not to remove them.
115
+ - **Numerals:** figures that change in place or stack into a column
116
+ (`pagination-nav`'s status, `progress-bar`'s value, `vote-control`'s score)
117
+ use `font-variant-numeric: var(--ui-numeric, normal)`. Readouts that must be
118
+ tabular in every theme — a ticking clock, a calendar grid — keep a literal
119
+ `tabular-nums` instead, since the token's default would undo them.
89
120
  - **Exemptions:** SVG presentation attributes (`font-size="…"`,
90
121
  `font-weight="…"`) can't take `var()` and stay literal at the token's
91
122
  fallback value; `line-height: 0` used purely to collapse an inline
@@ -95,9 +126,30 @@ literal values are migrated onto them.
95
126
 
96
127
  - `padding`, `margin`, and `gap` use literal multiples of `0.25rem`; spacing is
97
128
  not tokenized. Convert CSS layout pixels to rems.
98
- - Documented spacing exceptions: 1px borders, SVG/canvas geometry, percentages,
129
+ - Documented spacing exceptions: SVG/canvas geometry, percentages,
99
130
  aspect ratios, animation timing, proportional calculations derived from a
100
131
  public size, `0.125rem` optical alignment nudges, and domain geometry.
132
+
133
+ ### Borders
134
+
135
+ - A surface or control border goes through `--ui-border-width` (`1px`):
136
+ `border: var(--ui-border-width, 1px) solid var(--ui-border, #e2e8f0);`. A
137
+ border is chrome, not layout, which is why it is tokenized while spacing is
138
+ not — under `blueprint` these rules do the work a shadow does elsewhere, and
139
+ at 1px they read as a faint table rather than as drawn structure.
140
+ - Three kinds of 1px border stay literal, by design:
141
+ - `@media (forced-colors: active)` borders (`1px solid CanvasText`), which
142
+ answer to the user's palette rather than to a theme.
143
+ - Data-mark geometry — `calendar-month`'s entry-footer rule is drawn in the
144
+ entry's own color and divides one mark's content.
145
+ - Decorative edges whose width is the effect: `range-slider`'s white thumb
146
+ ring, `tab-bar`'s 2px active underline.
147
+ - Anything with a fixed height or width *and* a themeable border must also set
148
+ `box-sizing: border-box`, or a heavier border pushes it past the shared `2rem`
149
+ control target.
150
+
151
+ ### Radius
152
+
101
153
  - Use `--ui-radius-sm` (`0.25rem` ≈ 4px) for controls, `--ui-radius`
102
154
  (`0.5rem` ≈ 8px) for cards/dialogs/surfaces, and `--ui-radius-pill`
103
155
  (`9999px`) / `--ui-radius-circle` (`50%`) for intentional pill and circle
@@ -72,6 +72,7 @@ _None._
72
72
  | Custom property |
73
73
  | --- |
74
74
  | `--ui-border` |
75
+ | `--ui-border-width` |
75
76
  | `--ui-button-background` |
76
77
  | `--ui-button-background-active` |
77
78
  | `--ui-button-background-hover` |
@@ -43,6 +43,7 @@ _None._
43
43
  | Custom property |
44
44
  | --- |
45
45
  | `--ui-border` |
46
+ | `--ui-border-width` |
46
47
  | `--ui-focus-ring` |
47
48
  | `--ui-primary` |
48
49
  | `--ui-radius-sm` |