@valiify/dashboard-ui 0.1.2 → 0.2.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.
Files changed (93) hide show
  1. package/CHANGELOG.md +493 -4
  2. package/CLAUDE.md +884 -768
  3. package/COMPONENTS.md +520 -520
  4. package/GETTING_STARTED.md +63 -14
  5. package/QUICK_REFERENCE.md +22 -22
  6. package/README.md +45 -6
  7. package/TROUBLESHOOTING.md +46 -6
  8. package/class-manifest.json +664 -0
  9. package/design-methodology/dashboard.md +496 -0
  10. package/dist/dashboard-ui.css +4891 -0
  11. package/dist/index.css +502 -502
  12. package/examples/README.md +42 -0
  13. package/examples/basic/index.html +8 -8
  14. package/examples/daisyui-starter/README.md +58 -0
  15. package/examples/daisyui-starter/check-no-bleed.mjs +249 -0
  16. package/examples/daisyui-starter/index.html +72 -0
  17. package/examples/daisyui-starter/linked.html +74 -0
  18. package/examples/daisyui-starter/package-lock.json +2221 -0
  19. package/examples/daisyui-starter/package.json +22 -0
  20. package/examples/daisyui-starter/postcss.config.js +1 -0
  21. package/examples/daisyui-starter/src/host.css +14 -0
  22. package/examples/daisyui-starter/src/only-import.css +4 -0
  23. package/examples/daisyui-starter/src/styles.css +36 -0
  24. package/examples/daisyui-starter/tailwind.config.js +13 -0
  25. package/examples/postcss-starter/index.html +8 -8
  26. package/examples/postcss-starter/package.json +1 -1
  27. package/examples/sveltekit-starter/README.md +32 -0
  28. package/examples/sveltekit-starter/check-scoped-styles.mjs +103 -0
  29. package/examples/sveltekit-starter/package-lock.json +1300 -0
  30. package/examples/sveltekit-starter/package.json +24 -0
  31. package/examples/sveltekit-starter/src/app.css +17 -0
  32. package/examples/sveltekit-starter/src/app.html +11 -0
  33. package/examples/sveltekit-starter/src/lib/GlobalReset.svelte +20 -0
  34. package/examples/sveltekit-starter/src/lib/ScopedRemedy.svelte +27 -0
  35. package/examples/sveltekit-starter/src/lib/ScopedReset.svelte +22 -0
  36. package/examples/sveltekit-starter/src/routes/+layout.svelte +6 -0
  37. package/examples/sveltekit-starter/src/routes/+page.svelte +10 -0
  38. package/examples/sveltekit-starter/svelte.config.js +4 -0
  39. package/examples/sveltekit-starter/vite.config.js +6 -0
  40. package/examples/vite-starter/README.md +4 -4
  41. package/examples/vite-starter/package.json +1 -1
  42. package/examples/vite-starter/src/main.js +41 -41
  43. package/package.json +21 -4
  44. package/src/build/components.css +35 -0
  45. package/src/build/utilities.css +46 -0
  46. package/src/components/ICON-SYSTEM.md +39 -39
  47. package/src/components/alert.css +26 -26
  48. package/src/components/avatar.css +9 -9
  49. package/src/components/breadcrumbs.css +15 -15
  50. package/src/components/button.css +21 -21
  51. package/src/components/card.css +10 -10
  52. package/src/components/checkbox.css +21 -21
  53. package/src/components/chip.css +43 -43
  54. package/src/components/data-row.css +19 -19
  55. package/src/components/divider.css +23 -23
  56. package/src/components/dropdown-field.css +34 -34
  57. package/src/components/dropdown-menu.css +12 -12
  58. package/src/components/field-verification.css +25 -25
  59. package/src/components/filter-segment.css +20 -20
  60. package/src/components/icon-button.css +11 -11
  61. package/src/components/icon.css +18 -18
  62. package/src/components/input.css +29 -29
  63. package/src/components/link.css +28 -28
  64. package/src/components/loading-indicator.css +20 -20
  65. package/src/components/loading-inline.css +8 -8
  66. package/src/components/menu-item.css +28 -28
  67. package/src/components/modal.css +36 -36
  68. package/src/components/navigation-rail.css +95 -95
  69. package/src/components/pagination-item.css +22 -22
  70. package/src/components/pagination.css +24 -24
  71. package/src/components/pill.css +14 -14
  72. package/src/components/progress-bar.css +28 -28
  73. package/src/components/radio-select.css +13 -13
  74. package/src/components/section-marker.css +12 -12
  75. package/src/components/segment-selector.css +9 -9
  76. package/src/components/sensitive-data.css +8 -8
  77. package/src/components/skeleton.css +29 -29
  78. package/src/components/step.css +14 -14
  79. package/src/components/stepper.css +15 -15
  80. package/src/components/switch.css +12 -12
  81. package/src/components/tabs.css +40 -40
  82. package/src/components/tag.css +20 -20
  83. package/src/components/text-button.css +24 -24
  84. package/src/components/textarea.css +23 -23
  85. package/src/components/toast.css +29 -29
  86. package/src/components/tooltip.css +11 -11
  87. package/src/icons/README.md +16 -10
  88. package/src/icons/sprite.svg +1 -1
  89. package/src/themes/valiify-tokens.css +285 -0
  90. package/src/themes/valiify-type-prefixed.css +37 -0
  91. package/src/utilities/index.css +1 -1
  92. package/src/utility-surface.css +321 -0
  93. package/types/components.d.ts +235 -236
@@ -19,31 +19,31 @@
19
19
  * declarations, not a second implementation.
20
20
  *
21
21
  * Structure:
22
- * <nav class="nav-rail">
23
- * <a class="nav-title">
24
- * <span class="nav-title-logo"><img …></span>
25
- * <span class="nav-title-details">
26
- * <span class="nav-title-name">Central Williamette</span>
27
- * <span class="nav-title-subtitle">Main st branch</span>
22
+ * <nav class="vd-nav-rail">
23
+ * <a class="vd-nav-title">
24
+ * <span class="vd-nav-title-logo"><img …></span>
25
+ * <span class="vd-nav-title-details">
26
+ * <span class="vd-nav-title-name">Central Williamette</span>
27
+ * <span class="vd-nav-title-subtitle">Main st branch</span>
28
28
  * </span>
29
- * <span class="nav-title-action"><svg class="icon icon-size-14">…</svg></span>
30
- * <span class="nav-title-action"><svg class="icon icon-size-14">…</svg></span>
29
+ * <span class="vd-nav-title-action"><svg class="vd-icon vd-icon-size-14">…</svg></span>
30
+ * <span class="vd-nav-title-action"><svg class="vd-icon vd-icon-size-14">…</svg></span>
31
31
  * </a>
32
32
  *
33
- * <button class="nav-group" aria-expanded="true" aria-controls="analyze">
34
- * <span class="nav-group-label">Analyze</span>
35
- * <svg class="nav-group-chevron icon icon-size-16"><use href="#chevron-down" /></svg>
36
- * <span class="nav-group-rule"></span>
33
+ * <button class="vd-nav-group" aria-expanded="true" aria-controls="analyze">
34
+ * <span class="vd-nav-group-label">Analyze</span>
35
+ * <svg class="vd-nav-group-chevron vd-icon vd-icon-size-16"><use href="#chevron-down" /></svg>
36
+ * <span class="vd-nav-group-rule"></span>
37
37
  * </button>
38
- * <div class="nav-rail-items" id="analyze">
38
+ * <div class="vd-nav-rail-items" id="analyze">
39
39
  * ...nav items the group controls...
40
40
  * </div>
41
41
  *
42
- * <a class="nav-item" aria-current="page">
43
- * <svg class="nav-item-icon icon icon-size-16"><use href="#inbox" /></svg>
44
- * <span class="nav-item-label">Inbox</span>
45
- * <span class="nav-badge">Beta</span>
46
- * <span class="nav-item-count">41</span>
42
+ * <a class="vd-nav-item" aria-current="page">
43
+ * <svg class="vd-nav-item-icon vd-icon vd-icon-size-16"><use href="#inbox" /></svg>
44
+ * <span class="vd-nav-item-label">Inbox</span>
45
+ * <span class="vd-nav-badge">Beta</span>
46
+ * <span class="vd-nav-item-count">41</span>
47
47
  * </a>
48
48
  * </nav>
49
49
  *
@@ -103,12 +103,12 @@
103
103
  Put the rail in something sized: a `h-screen` wrapper, a grid row, or a
104
104
  flex parent with a height. Nothing breaks without it; the footer just
105
105
  stops being bottom-pinned. */
106
- .nav-rail {
106
+ .vd-nav-rail {
107
107
  @apply flex h-full w-60 flex-col items-start justify-between; /* 240px */
108
108
  @apply px-2; /* 8px, both states */
109
109
  }
110
110
 
111
- .nav-rail-collapsed {
111
+ .vd-nav-rail-collapsed {
112
112
  @apply w-15; /* 60px */
113
113
  }
114
114
 
@@ -119,7 +119,7 @@
119
119
  nothing in the file says which subtree scrolls. This is the only sensible
120
120
  candidate (684px of content in an 897px frame) and a rail with more items
121
121
  than fit has to scroll somewhere. Flagged as an engineering decision. */
122
- .nav-rail-content {
122
+ .vd-nav-rail-content {
123
123
  @apply flex w-full flex-col gap-5 overflow-y-auto; /* 20px between sections */
124
124
  }
125
125
 
@@ -127,14 +127,14 @@
127
127
  a section is 0, and the breathing room comes from the 32px row height
128
128
  against a 19.5px line box. Not every section has a header: the first
129
129
  ("Apps") has none. */
130
- .nav-rail-section {
130
+ .vd-nav-rail-section {
131
131
  @apply flex w-full flex-col gap-0;
132
132
  }
133
133
 
134
134
  /* Bottom-pinned. Holds ordinary nav items — Settings and Collapse are rows,
135
135
  not a bespoke control, and the collapse toggle is a footer item rather than
136
136
  the floating edge chevron this pattern usually gets. */
137
- .nav-rail-footer {
137
+ .vd-nav-rail-footer {
138
138
  @apply flex w-full flex-col gap-0;
139
139
  }
140
140
 
@@ -142,7 +142,7 @@
142
142
  /* Nav Title — Figma 727:18963, 4 variants (Hover x Expanded) */
143
143
  /* ================================================================== */
144
144
 
145
- .nav-title {
145
+ .vd-nav-title {
146
146
  /* Layout */
147
147
  @apply flex items-center gap-2; /* 8px */
148
148
  @apply px-2; /* 8px; no vertical padding — 46px height centres instead */
@@ -159,42 +159,42 @@
159
159
 
160
160
  /* Figma's only hover delta on this component is the background. Text and
161
161
  icon colours, width, padding and radius are all unchanged. */
162
- .nav-title:hover:not(:disabled):not([aria-disabled="true"]) {
162
+ .vd-nav-title:hover:not(:disabled):not([aria-disabled="true"]) {
163
163
  @apply bg-action-hover;
164
164
  }
165
165
 
166
- .nav-title:focus-visible {
166
+ .vd-nav-title:focus-visible {
167
167
  @apply focus-ring;
168
168
  }
169
169
 
170
170
  /* 30px tile carrying the institution logo. The Figma logo is a raster crop
171
171
  out of a larger image and cannot be reproduced faithfully, so this is a
172
172
  slot: put an <img> or an <svg> inside it. */
173
- .nav-title-logo {
173
+ .vd-nav-title-logo {
174
174
  @apply flex size-7.5 shrink-0 items-center justify-center; /* 30px */
175
175
  @apply overflow-hidden rounded-control; /* Radius/SM 6px */
176
176
  @apply border border-[length:var(--border-thin)] border-stroke-divider;
177
177
  @apply bg-surface-paper;
178
178
  }
179
179
 
180
- .nav-title-logo > img,
181
- .nav-title-logo > svg {
180
+ .vd-nav-title-logo > img,
181
+ .vd-nav-title-logo > svg {
182
182
  @apply size-5 object-contain; /* 20px */
183
183
  }
184
184
 
185
185
  /* Fixed 119px in Figma, so long names wrap rather than widening the row.
186
186
  Kept fixed to stay faithful — see the note in CLAUDE.md. */
187
- .nav-title-details {
187
+ .vd-nav-title-details {
188
188
  @apply flex w-[119px] shrink-0 flex-col items-start justify-center;
189
189
  min-width: 0;
190
190
  }
191
191
 
192
- .nav-title-name {
192
+ .vd-nav-title-name {
193
193
  @apply w-full truncate;
194
194
  @apply text-body-1-bold text-content-primary; /* 13px / 19.5 / 500 */
195
195
  }
196
196
 
197
- .nav-title-subtitle {
197
+ .vd-nav-title-subtitle {
198
198
  @apply w-full truncate;
199
199
  @apply text-micro-l text-content-secondary; /* 11px / normal / 400 */
200
200
  }
@@ -202,7 +202,7 @@
202
202
  /* 18px hit box around a 14px glyph. Figma also puts 6px padding on this
203
203
  box, which with a 14px glyph would need 26px — the glyph overflows its own
204
204
  padded frame in the file. Rendered as an 18px box centring a 14px glyph. */
205
- .nav-title-action {
205
+ .vd-nav-title-action {
206
206
  @apply flex size-4.5 shrink-0 items-center justify-center; /* 18px */
207
207
  @apply rounded-control text-secondary; /* Radius/SM, Secondary/Main */
208
208
  @apply cursor-pointer;
@@ -215,24 +215,24 @@
215
215
  8 + 30 + 8 = 46. Width is held at Figma's 44 and the padding tightened to
216
216
  7px so the tile actually fits; the 2px is a file discrepancy, not a
217
217
  deliberate overflow. */
218
- .nav-title-collapsed,
219
- .nav-rail-collapsed .nav-title {
218
+ .vd-nav-title-collapsed,
219
+ .vd-nav-rail-collapsed .vd-nav-title {
220
220
  @apply w-11 justify-center px-1.75; /* 44px, 7px */
221
221
  }
222
222
 
223
- /* The details block carries the institution name, which is `.nav-title`'s
223
+ /* The details block carries the institution name, which is `.vd-nav-title`'s
224
224
  accessible name — `sr-only` so the collapsed logo tile is still a labelled
225
225
  link rather than an anonymous one. */
226
- .nav-title-collapsed .nav-title-details,
227
- .nav-rail-collapsed .nav-title-details {
226
+ .vd-nav-title-collapsed .vd-nav-title-details,
227
+ .vd-nav-rail-collapsed .vd-nav-title-details {
228
228
  @apply sr-only;
229
229
  }
230
230
 
231
231
  /* The two action icons are genuinely removed, not hidden: they are separate
232
232
  controls (a switcher and a search), and Figma drops them. Keeping them in
233
233
  the accessibility tree would announce controls that cannot be seen. */
234
- .nav-title-collapsed .nav-title-action,
235
- .nav-rail-collapsed .nav-title-action {
234
+ .vd-nav-title-collapsed .vd-nav-title-action,
235
+ .vd-nav-rail-collapsed .vd-nav-title-action {
236
236
  @apply hidden;
237
237
  }
238
238
 
@@ -242,11 +242,11 @@
242
242
 
243
243
  /* Two axes in Figma that both sound like "collapsed", and they are NOT the
244
244
  same thing:
245
- Expanded = the whole RAIL is expanded vs icon-only -> .nav-group-collapsed
245
+ Expanded = the whole RAIL is expanded vs icon-only -> .vd-nav-group-collapsed
246
246
  Collapsed = THIS GROUP's own disclosure state -> aria-expanded
247
247
  Modelled with two different mechanisms so they cannot be confused. */
248
248
 
249
- .nav-group {
249
+ .vd-nav-group {
250
250
  /* Layout */
251
251
  @apply flex items-center gap-0.75; /* 3px */
252
252
  @apply px-2; /* 8px; no vertical padding — 26px height centres */
@@ -262,19 +262,19 @@
262
262
  @apply cursor-pointer transition-colors duration-150;
263
263
  }
264
264
 
265
- .nav-group:hover:not(.nav-group-collapsed):not(:disabled):not(
265
+ .vd-nav-group:hover:not(.vd-nav-group-collapsed):not(:disabled):not(
266
266
  [aria-disabled="true"]
267
267
  ) {
268
268
  @apply bg-action-hover;
269
269
  }
270
270
 
271
- .nav-group:focus-visible {
271
+ .vd-nav-group:focus-visible {
272
272
  @apply focus-ring;
273
273
  }
274
274
 
275
275
  /* Style name is "Micro L - Bold" but the file resolves it to Medium / 500,
276
276
  and the label is NOT uppercase — Figma renders "Analyze" in mixed case. */
277
- .nav-group-label {
277
+ .vd-nav-group-label {
278
278
  @apply text-micro-l-bold text-content-tertiary; /* 11px / normal / 500 */
279
279
  }
280
280
 
@@ -294,22 +294,22 @@
294
294
  state indicator. Touch users still get no chevron; `:focus-visible` is
295
295
  included below so keyboard users reach parity with mouse users, which is an
296
296
  addition to the design rather than a reading of it. */
297
- .nav-group-chevron {
297
+ .vd-nav-group-chevron {
298
298
  @apply hidden shrink-0 text-content-tertiary;
299
299
  @apply transition-transform duration-150;
300
300
  }
301
301
 
302
- .nav-group:hover:not(.nav-group-collapsed):not(:disabled):not(
302
+ .vd-nav-group:hover:not(.vd-nav-group-collapsed):not(:disabled):not(
303
303
  [aria-disabled="true"]
304
304
  )
305
- .nav-group-chevron,
306
- .nav-group:focus-visible .nav-group-chevron {
305
+ .vd-nav-group-chevron,
306
+ .vd-nav-group:focus-visible .vd-nav-group-chevron {
307
307
  @apply block;
308
308
  }
309
309
 
310
310
  /* Collapsed group: the same chevron instance rotated, not a swapped glyph.
311
311
  Down when open, pointing right when closed. */
312
- .nav-group[aria-expanded="false"] .nav-group-chevron {
312
+ .vd-nav-group[aria-expanded="false"] .vd-nav-group-chevron {
313
313
  @apply -rotate-90;
314
314
  }
315
315
 
@@ -321,8 +321,8 @@
321
321
 
322
322
  Two markup shapes are supported, because a library cannot dictate one:
323
323
 
324
- wrapped .nav-group + .nav-rail-items <- recommended
325
- flat .nav-group ~ .nav-item
324
+ wrapped .vd-nav-group + .vd-nav-rail-items <- recommended
325
+ flat .vd-nav-group ~ .vd-nav-item
326
326
 
327
327
  Prefer wrapped. It is the only shape that lets you point `aria-controls`
328
328
  at a real element, which is what makes this an actual ARIA disclosure
@@ -330,8 +330,8 @@
330
330
 
331
331
  This library ships no JavaScript, so flipping `aria-expanded` is the
332
332
  consumer's job — one line on click. The CSS is the whole contract. */
333
- .nav-group[aria-expanded="false"] + .nav-rail-items,
334
- .nav-group[aria-expanded="false"] ~ .nav-item {
333
+ .vd-nav-group[aria-expanded="false"] + .vd-nav-rail-items,
334
+ .vd-nav-group[aria-expanded="false"] ~ .vd-nav-item {
335
335
  @apply hidden;
336
336
  }
337
337
 
@@ -340,17 +340,17 @@
340
340
  with no chevron — so honouring disclosure would strand those rows with no
341
341
  affordance to bring them back. Rows stay visible; the state is remembered
342
342
  and reapplies when the rail expands. */
343
- .nav-rail-collapsed .nav-group[aria-expanded="false"] ~ .nav-item {
343
+ .vd-nav-rail-collapsed .vd-nav-group[aria-expanded="false"] ~ .vd-nav-item {
344
344
  @apply flex;
345
345
  }
346
346
 
347
- .nav-rail-collapsed .nav-group[aria-expanded="false"] + .nav-rail-items {
347
+ .vd-nav-rail-collapsed .vd-nav-group[aria-expanded="false"] + .vd-nav-rail-items {
348
348
  @apply flex;
349
349
  }
350
350
 
351
351
  /* Optional wrapper for the rows a group controls. Give it an id and point the
352
352
  header's `aria-controls` at it. */
353
- .nav-rail-items {
353
+ .vd-nav-rail-items {
354
354
  @apply flex w-full flex-col gap-0;
355
355
  }
356
356
 
@@ -365,35 +365,35 @@
365
365
 
366
366
  Not a control in this state — it is a divider, so the base hover rule
367
367
  above excludes it rather than applying a background and cancelling it. */
368
- .nav-group-collapsed,
369
- .nav-rail-collapsed .nav-group {
368
+ .vd-nav-group-collapsed,
369
+ .vd-nav-rail-collapsed .vd-nav-group {
370
370
  @apply justify-center;
371
371
  @apply cursor-default;
372
372
  }
373
373
 
374
- .nav-group-collapsed .nav-group-chevron,
375
- .nav-rail-collapsed .nav-group-chevron {
374
+ .vd-nav-group-collapsed .vd-nav-group-chevron,
375
+ .vd-nav-rail-collapsed .vd-nav-group-chevron {
376
376
  @apply hidden;
377
377
  }
378
378
 
379
379
  /* `sr-only`, NOT `hidden`. Figma drops the label in the collapsed rail, but
380
- `.nav-group` is a <button>, and a button whose only remaining child is a
380
+ `.vd-nav-group` is a <button>, and a button whose only remaining child is a
381
381
  decorative rule has no accessible name — axe `button-name`, and a keyboard
382
382
  user lands on an unlabelled tab stop. Hiding it visually while leaving it
383
383
  in the accessibility tree keeps Figma's appearance and the name both.
384
384
  `sr-only` is absolutely positioned, so it takes no space in the row. */
385
- .nav-group-collapsed .nav-group-label,
386
- .nav-rail-collapsed .nav-group-label {
385
+ .vd-nav-group-collapsed .vd-nav-group-label,
386
+ .vd-nav-rail-collapsed .vd-nav-group-label {
387
387
  @apply sr-only;
388
388
  }
389
389
 
390
- .nav-group-rule {
390
+ .vd-nav-group-rule {
391
391
  @apply hidden h-0 w-[22.5px] shrink-0;
392
392
  @apply border-t border-t-[length:var(--border-line)] border-stroke-divider;
393
393
  }
394
394
 
395
- .nav-group-collapsed .nav-group-rule,
396
- .nav-rail-collapsed .nav-group-rule {
395
+ .vd-nav-group-collapsed .vd-nav-group-rule,
396
+ .vd-nav-rail-collapsed .vd-nav-group-rule {
397
397
  @apply block;
398
398
  }
399
399
 
@@ -401,7 +401,7 @@
401
401
  /* Nav Item — Figma 723:18649, 10 variants */
402
402
  /* ================================================================== */
403
403
 
404
- .nav-item {
404
+ .vd-nav-item {
405
405
  /* Layout */
406
406
  @apply relative flex items-center gap-3; /* 12px */
407
407
  @apply px-2; /* 8px; no vertical padding — 32px height centres */
@@ -421,17 +421,17 @@
421
421
  @apply cursor-pointer transition-colors duration-150;
422
422
  }
423
423
 
424
- .nav-item-icon {
424
+ .vd-nav-item-icon {
425
425
  @apply shrink-0 text-content-tertiary;
426
426
  }
427
427
 
428
- .nav-item-label {
428
+ .vd-nav-item-label {
429
429
  @apply flex-1 truncate;
430
430
  @apply text-body-1-bold; /* 13px / 19.5 / 500 */
431
431
  }
432
432
 
433
433
  /* Trailing count — mono, and keeps Content/Tertiary in every state */
434
- .nav-item-count {
434
+ .vd-nav-item-count {
435
435
  @apply shrink-0 whitespace-nowrap;
436
436
  @apply text-data-xs font-mono text-content-tertiary; /* 12px / 16.5 / 400 */
437
437
  }
@@ -447,17 +447,17 @@
447
447
  Primary/Main — so the colour is a modifier rather than baked in. Neutral is
448
448
  the base because an unqualified status dot is informational; the other two
449
449
  say something. */
450
- .nav-item-status {
450
+ .vd-nav-item-status {
451
451
  @apply absolute size-1.25 rounded-pill bg-neutral; /* 5px, Neutral/Main */
452
452
  top: 6px;
453
453
  left: 27px;
454
454
  }
455
455
 
456
- .nav-item-status-warning {
456
+ .vd-nav-item-status-warning {
457
457
  @apply bg-warning; /* Warning/Main — Alerts */
458
458
  }
459
459
 
460
- .nav-item-status-primary {
460
+ .vd-nav-item-status-primary {
461
461
  @apply bg-primary; /* Primary/Main — Analytics, Email automation */
462
462
  }
463
463
 
@@ -465,49 +465,49 @@
465
465
 
466
466
  /* In every state but rest the label and icon share one colour, so the icon
467
467
  simply follows the row instead of each state setting it twice. */
468
- .nav-item:hover:not(:disabled):not([aria-disabled="true"]) .nav-item-icon,
469
- .nav-item:active:not(:disabled):not([aria-disabled="true"]) .nav-item-icon,
470
- .nav-item-active .nav-item-icon,
471
- .nav-item[aria-current="page"] .nav-item-icon,
472
- .nav-item:hover:not(:disabled):not([aria-disabled="true"]) {
468
+ .vd-nav-item:hover:not(:disabled):not([aria-disabled="true"]) .vd-nav-item-icon,
469
+ .vd-nav-item:active:not(:disabled):not([aria-disabled="true"]) .vd-nav-item-icon,
470
+ .vd-nav-item-active .vd-nav-item-icon,
471
+ .vd-nav-item[aria-current="page"] .vd-nav-item-icon,
472
+ .vd-nav-item:hover:not(:disabled):not([aria-disabled="true"]) {
473
473
  @apply bg-action-hover text-content-primary;
474
474
  }
475
475
 
476
476
  /* Figma "Pressed" — note it binds Action/Focused, not an Action/Pressed
477
477
  token, which does not exist. */
478
- .nav-item:active:not(:disabled):not([aria-disabled="true"]) {
478
+ .vd-nav-item:active:not(:disabled):not([aria-disabled="true"]) {
479
479
  @apply bg-action-focused text-content-primary;
480
480
  }
481
481
 
482
- .nav-item:focus-visible {
482
+ .vd-nav-item:focus-visible {
483
483
  @apply focus-ring;
484
484
  }
485
485
 
486
486
  /* Figma "Active" — the neutral grey highlight. See the header: this is NOT
487
487
  the current page. */
488
- .nav-item-active {
488
+ .vd-nav-item-active {
489
489
  @apply bg-action-selected text-content-primary;
490
490
  }
491
491
 
492
492
  /* Figma "Passive" — the blue current-page look. See the header. */
493
- .nav-item[aria-current="page"] {
493
+ .vd-nav-item[aria-current="page"] {
494
494
  @apply bg-primary-soft text-primary;
495
495
  }
496
496
 
497
- .nav-item:disabled,
498
- .nav-item[aria-disabled="true"] {
497
+ .vd-nav-item:disabled,
498
+ .vd-nav-item[aria-disabled="true"] {
499
499
  @apply cursor-not-allowed text-content-faint;
500
500
  }
501
501
 
502
502
  /* Collapsed rail: 44px, icon centred. Figma REMOVES the label rather than
503
503
  hiding it, so the gap and padding stop mattering — `justify-center` is what
504
504
  positions the icon, not the 8px padding, which Figma still declares. */
505
- .nav-item-collapsed,
506
- .nav-rail-collapsed .nav-item {
505
+ .vd-nav-item-collapsed,
506
+ .vd-nav-rail-collapsed .vd-nav-item {
507
507
  @apply justify-center;
508
508
  }
509
509
 
510
- /* `sr-only`, NOT `hidden` — same reason as the group label. `.nav-item` is an
510
+ /* `sr-only`, NOT `hidden` — same reason as the group label. `.vd-nav-item` is an
511
511
  <a>/<button>, and its label is its only text: `display:none` takes it out
512
512
  of the accessibility tree and leaves an unnamed control in the tab order.
513
513
  Measured with axe and Playwright's ariaSnapshot BEFORE this fix: 16 of 21
@@ -517,10 +517,10 @@
517
517
  The count goes the same way rather than being dropped: it is real
518
518
  information ("Inbox, 41"), and keeping it means the collapsed rail
519
519
  announces exactly what the expanded one does. */
520
- .nav-item-collapsed .nav-item-label,
521
- .nav-item-collapsed .nav-item-count,
522
- .nav-rail-collapsed .nav-item-label,
523
- .nav-rail-collapsed .nav-item-count {
520
+ .vd-nav-item-collapsed .vd-nav-item-label,
521
+ .vd-nav-item-collapsed .vd-nav-item-count,
522
+ .vd-nav-rail-collapsed .vd-nav-item-label,
523
+ .vd-nav-rail-collapsed .vd-nav-item-count {
524
524
  @apply sr-only;
525
525
  }
526
526
 
@@ -528,8 +528,8 @@
528
528
  decorative duplication next to a 44px icon. It also has to go: left
529
529
  visible it rendered 30.4px inside a 44px row, overflowing by 7px
530
530
  (scrollWidth 51 vs width 44). */
531
- .nav-item-collapsed .nav-badge,
532
- .nav-rail-collapsed .nav-badge {
531
+ .vd-nav-item-collapsed .vd-nav-badge,
532
+ .vd-nav-rail-collapsed .vd-nav-badge {
533
533
  @apply hidden;
534
534
  }
535
535
 
@@ -546,7 +546,7 @@
546
546
 
547
547
  The resting border binds Primary/Disabled, which is an odd token for a
548
548
  non-disabled element, but it is what the file specifies. */
549
- .nav-badge {
549
+ .vd-nav-badge {
550
550
  @apply inline-flex shrink-0 items-center justify-center;
551
551
  @apply h-3.5 px-1; /* 14px, 4px */
552
552
  @apply rounded-micro; /* Radius/Micro 2px */
@@ -6,11 +6,11 @@
6
6
  * `State` axis. Composes inside the Pagination bar.
7
7
  *
8
8
  * Usage:
9
- * <button class="pagination-item">2</button>
10
- * <button class="pagination-item pagination-item-active" aria-current="page">3</button>
11
- * <span class="pagination-item pagination-item-ellipsis" aria-hidden="true">...</span>
12
- * <button class="pagination-item pagination-item-nav" aria-label="Next page">
13
- * <svg class="icon icon-size-14" aria-hidden="true"><use href="#chevron-right" /></svg>
9
+ * <button class="vd-pagination-item">2</button>
10
+ * <button class="vd-pagination-item vd-pagination-item-active" aria-current="page">3</button>
11
+ * <span class="vd-pagination-item vd-pagination-item-ellipsis" aria-hidden="true">...</span>
12
+ * <button class="vd-pagination-item vd-pagination-item-nav" aria-label="Next page">
13
+ * <svg class="vd-icon vd-icon-size-14" aria-hidden="true"><use href="#chevron-right" /></svg>
14
14
  * </button>
15
15
  *
16
16
  * A 32x32 box in every state. Four kinds, three of which take hover and
@@ -92,7 +92,7 @@
92
92
  */
93
93
 
94
94
  @layer components {
95
- .pagination-item {
95
+ .vd-pagination-item {
96
96
  /* Layout — a fixed 32x32 cell in every state */
97
97
  @apply inline-flex size-8 shrink-0 items-center justify-center;
98
98
 
@@ -122,19 +122,19 @@
122
122
  that :hover would otherwise still match. Equal-specificity rules resolved
123
123
  by ordering are exactly the fragility the library audit flagged, so the
124
124
  exclusions are explicit. */
125
- .pagination-item:not(.pagination-item-active):not(
126
- .pagination-item-ellipsis
125
+ .vd-pagination-item:not(.vd-pagination-item-active):not(
126
+ .vd-pagination-item-ellipsis
127
127
  ):hover:not(:disabled):not([aria-disabled="true"]) {
128
128
  @apply bg-action-hover text-secondary-strong;
129
129
  }
130
130
 
131
- .pagination-item:not(.pagination-item-active):not(
132
- .pagination-item-ellipsis
131
+ .vd-pagination-item:not(.vd-pagination-item-active):not(
132
+ .vd-pagination-item-ellipsis
133
133
  ):active:not(:disabled):not([aria-disabled="true"]) {
134
134
  @apply bg-action-selected text-content-primary;
135
135
  }
136
136
 
137
- .pagination-item:focus-visible {
137
+ .vd-pagination-item:focus-visible {
138
138
  @apply focus-ring;
139
139
  }
140
140
 
@@ -142,24 +142,24 @@
142
142
 
143
143
  /* Figma draws no stroke here. A transparent border keeps the box arithmetic
144
144
  identical to the other kinds, and the fill paints under it. */
145
- .pagination-item-active {
145
+ .vd-pagination-item-active {
146
146
  @apply border-transparent bg-primary text-content-contrast;
147
147
  @apply font-bold; /* JetBrains Mono Bold — heavier than default's Medium */
148
148
  }
149
149
 
150
150
  /* Figma lightens on hover; the library darkens everywhere else. See header. */
151
- .pagination-item-active:hover:not(:disabled):not([aria-disabled="true"]) {
151
+ .vd-pagination-item-active:hover:not(:disabled):not([aria-disabled="true"]) {
152
152
  @apply bg-primary-dark;
153
153
  }
154
154
 
155
- .pagination-item-active:active:not(:disabled):not([aria-disabled="true"]) {
155
+ .vd-pagination-item-active:active:not(:disabled):not([aria-disabled="true"]) {
156
156
  @apply bg-primary-pressed;
157
157
  }
158
158
 
159
159
  /* Disabled must not repaint an active cell white — see the disabled rule at
160
160
  the foot of the file, which is deliberately scoped away from active. */
161
- .pagination-item-active:disabled,
162
- .pagination-item-active[aria-disabled="true"] {
161
+ .vd-pagination-item-active:disabled,
162
+ .vd-pagination-item-active[aria-disabled="true"] {
163
163
  @apply border-transparent bg-primary-disabled text-content-contrast;
164
164
  }
165
165
 
@@ -167,7 +167,7 @@
167
167
 
168
168
  /* The same box as default. Only the content differs — a 14px icon, which the
169
169
  call site sizes, as everywhere else in the library. */
170
- .pagination-item-nav {
170
+ .vd-pagination-item-nav {
171
171
  @apply text-secondary;
172
172
  }
173
173
 
@@ -175,7 +175,7 @@
175
175
 
176
176
  /* Not a control: no fill, no stroke, and Figma draws no hover or pressed.
177
177
  Ships as a <span>, so the interactive rules above never apply. */
178
- .pagination-item-ellipsis {
178
+ .vd-pagination-item-ellipsis {
179
179
  @apply border-transparent bg-transparent text-content-tertiary;
180
180
  @apply font-normal; /* JetBrains Mono Regular — lighter than default's Medium */
181
181
  @apply cursor-default;
@@ -183,14 +183,14 @@
183
183
 
184
184
  /* --- Disabled (house convention — see header) --------------------------- */
185
185
 
186
- .pagination-item:not(.pagination-item-active):disabled,
187
- .pagination-item:not(.pagination-item-active)[aria-disabled="true"] {
186
+ .vd-pagination-item:not(.vd-pagination-item-active):disabled,
187
+ .vd-pagination-item:not(.vd-pagination-item-active)[aria-disabled="true"] {
188
188
  @apply cursor-not-allowed bg-surface-paper text-content-faint;
189
189
  @apply border-stroke-disabled;
190
190
  }
191
191
 
192
- .pagination-item-active:disabled,
193
- .pagination-item-active[aria-disabled="true"] {
192
+ .vd-pagination-item-active:disabled,
193
+ .vd-pagination-item-active[aria-disabled="true"] {
194
194
  @apply cursor-not-allowed;
195
195
  }
196
196
  }