@valiify/dashboard-ui 0.3.0 → 0.5.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 (101) hide show
  1. package/CHANGELOG.md +948 -10
  2. package/COMPONENTS.md +199 -79
  3. package/GETTING_STARTED.md +116 -54
  4. package/QUICK_REFERENCE.md +48 -30
  5. package/README.md +107 -85
  6. package/TROUBLESHOOTING.md +52 -34
  7. package/class-manifest.json +141 -71
  8. package/design-methodology/dashboard.md +92 -80
  9. package/dist/dashboard-ui.css +1529 -1078
  10. package/dist/index.css +1250 -732
  11. package/package.json +17 -10
  12. package/scripts/codemods/0.5.0-chip-sizes.mjs +437 -0
  13. package/src/build/utilities.css +7 -10
  14. package/src/components/_template.css +12 -8
  15. package/src/components/alert.css +35 -8
  16. package/src/components/avatar.css +42 -30
  17. package/src/components/breadcrumbs.css +39 -22
  18. package/src/components/button.css +84 -14
  19. package/src/components/card.css +2 -2
  20. package/src/components/checkbox.css +16 -11
  21. package/src/components/chip.css +155 -79
  22. package/src/components/composer.css +145 -0
  23. package/src/components/data-row.css +10 -6
  24. package/src/components/divider.css +17 -22
  25. package/src/components/dropdown-field.css +83 -43
  26. package/src/components/dropdown-menu.css +80 -14
  27. package/src/components/field-verification.css +21 -5
  28. package/src/components/filter-segment.css +27 -8
  29. package/src/components/icon-button.css +49 -10
  30. package/src/components/index.css +2 -0
  31. package/src/components/input.css +88 -32
  32. package/src/components/link.css +27 -16
  33. package/src/components/loading-inline.css +15 -21
  34. package/src/components/menu-item.css +149 -49
  35. package/src/components/modal.css +8 -5
  36. package/src/components/navigation-rail.css +67 -31
  37. package/src/components/pagination-item.css +29 -28
  38. package/src/components/pagination.css +9 -14
  39. package/src/components/pill.css +16 -10
  40. package/src/components/progress-bar.css +8 -10
  41. package/src/components/radio-select.css +9 -2
  42. package/src/components/recipient-input.css +119 -0
  43. package/src/components/section-marker.css +5 -5
  44. package/src/components/segment-selector.css +9 -3
  45. package/src/components/sensitive-data.css +7 -5
  46. package/src/components/skeleton.css +18 -6
  47. package/src/components/step.css +15 -4
  48. package/src/components/stepper.css +3 -2
  49. package/src/components/switch.css +7 -0
  50. package/src/components/tabs.css +122 -28
  51. package/src/components/tag.css +156 -51
  52. package/src/components/text-button.css +54 -59
  53. package/src/components/textarea.css +87 -22
  54. package/src/components/toast.css +41 -15
  55. package/src/components/tooltip.css +13 -2
  56. package/src/fonts.css +2 -1
  57. package/src/library.css +1 -1
  58. package/src/reset.css +1 -1
  59. package/src/themes/valiify-tokens.css +101 -126
  60. package/src/themes/valiify.css +258 -157
  61. package/src/utility-surface.css +51 -49
  62. package/types/components.d.ts +145 -25
  63. package/CLAUDE.md +0 -3740
  64. package/examples/README.md +0 -198
  65. package/examples/basic/index.html +0 -155
  66. package/examples/daisyui-starter/README.md +0 -58
  67. package/examples/daisyui-starter/check-no-bleed.mjs +0 -249
  68. package/examples/daisyui-starter/index.html +0 -72
  69. package/examples/daisyui-starter/linked.html +0 -74
  70. package/examples/daisyui-starter/package-lock.json +0 -2221
  71. package/examples/daisyui-starter/package.json +0 -22
  72. package/examples/daisyui-starter/postcss.config.js +0 -1
  73. package/examples/daisyui-starter/src/host.css +0 -14
  74. package/examples/daisyui-starter/src/only-import.css +0 -4
  75. package/examples/daisyui-starter/src/styles.css +0 -36
  76. package/examples/daisyui-starter/tailwind.config.js +0 -13
  77. package/examples/postcss-starter/README.md +0 -47
  78. package/examples/postcss-starter/index.html +0 -54
  79. package/examples/postcss-starter/package.json +0 -19
  80. package/examples/postcss-starter/postcss.config.js +0 -5
  81. package/examples/postcss-starter/src/styles.css +0 -17
  82. package/examples/sveltekit-starter/README.md +0 -32
  83. package/examples/sveltekit-starter/check-scoped-styles.mjs +0 -103
  84. package/examples/sveltekit-starter/package-lock.json +0 -1300
  85. package/examples/sveltekit-starter/package.json +0 -24
  86. package/examples/sveltekit-starter/src/app.css +0 -17
  87. package/examples/sveltekit-starter/src/app.html +0 -11
  88. package/examples/sveltekit-starter/src/lib/GlobalReset.svelte +0 -20
  89. package/examples/sveltekit-starter/src/lib/ScopedRemedy.svelte +0 -27
  90. package/examples/sveltekit-starter/src/lib/ScopedReset.svelte +0 -22
  91. package/examples/sveltekit-starter/src/routes/+layout.svelte +0 -6
  92. package/examples/sveltekit-starter/src/routes/+page.svelte +0 -10
  93. package/examples/sveltekit-starter/svelte.config.js +0 -4
  94. package/examples/sveltekit-starter/vite.config.js +0 -6
  95. package/examples/vite-starter/README.md +0 -125
  96. package/examples/vite-starter/index.html +0 -12
  97. package/examples/vite-starter/package.json +0 -19
  98. package/examples/vite-starter/src/main.js +0 -188
  99. package/examples/vite-starter/src/styles.css +0 -22
  100. package/examples/vite-starter/vite.config.js +0 -6
  101. package/src/themes/valiify-type-prefixed.css +0 -37
@@ -2,30 +2,40 @@
2
2
  * Avatar Component
3
3
  *
4
4
  * Circular user marker showing initials. Extracted from Figma Avatar (79:230)
5
- * — 8 variants (4 sizes × Disabled), plus a Ring boolean.
5
+ * — 10 variants (5 sizes × Disabled), plus a Ring boolean.
6
6
  *
7
7
  * Usage:
8
8
  * <span class="vd-avatar vd-avatar-md">NC</span>
9
9
  *
10
- * FOUR SIZES, THREE TYPE STYLES. xs and sm share Micro S - Bold; only md and
11
- * lg step up. Do not assume one style per size.
10
+ * REV3 RESCALE (0.5.0, 2026-10-01). Figma's Size axis is XS / S / M / LG / XL,
11
+ * and the class names follow it:
12
12
  *
13
- * xs 16px Micro S - Bold 8px / 600 / 0.4%
14
- * sm 18px Micro S - Bold 8px / 600 / 0.4%
15
- * md 20px Micro M - Bold 8.5px / 500 (default)
16
- * lg 34px Micro L - Bold 11px / 500
13
+ * xs 12px NEW — what xs-recipient Tags nest (was an unprovided 12)
14
+ * sm 16px was .vd-avatar-xs; the old 18px sm is GONE
15
+ * md 20px the base, unchanged
16
+ * lg 28px NEW meaning — the old .vd-avatar-lg (34) is now .vd-avatar-xl
17
+ * xl 34px NEW name for the old lg
17
18
  *
18
- * Careful: Figma names the md and lg styles "- Bold" but both report Medium /
19
- * 500. Only Micro S - Bold is actually 600. Do not map "-Bold" to 700.
19
+ * Two names changed meaning, so the 0.5.0 codemod renames in one simultaneous
20
+ * pass: vd-avatar-lg -> vd-avatar-xl, vd-avatar-xs -> vd-avatar-sm. Markup that
21
+ * skips it silently renders lg at 28 (was 34) and xs at 12 (was 16).
20
22
  *
21
- * INITIALS ONLY. Figma's component description reads "User profile image
22
- * displayed as a circle", but no image layer, image fill, or swap slot exists
23
- * in any of the 8 variants — the only children are the text node and a hidden
24
- * Ring. No image support is implemented here rather than invent one; the
25
- * contradiction is flagged for the designer.
23
+ * ONE TYPE STYLE AT EVERY SIZE. All ten variants bind Utility/Avatar Initials
24
+ * (Inter Semi Bold 8 / 8 / 600) — the old three-styles-across-four-sizes ramp,
25
+ * and its "-Bold styles that are really Medium" trap, are gone. Reproduced as
26
+ * drawn, which has two consequences on the designer list: the 34px avatar
27
+ * carries the same 8px initials as the 12px one (it had 11px), and at 12px two
28
+ * initials span the full diameter.
29
+ *
30
+ * INITIALS ONLY. The component description still promises "User profile image
31
+ * displayed as a circle", but no image layer, fill or slot exists in any
32
+ * variant. No image support is implemented rather than invent one.
26
33
  *
27
34
  * Disabled changes the background and NOTHING else — the initials stay
28
35
  * Content/Contrast rather than dimming.
36
+ *
37
+ * Figma's DEFAULT variant is XS (12); the base stays md (20), the library-wide
38
+ * convention (designer-list item 34's default-variant family).
29
39
  */
30
40
 
31
41
  @layer components {
@@ -36,37 +46,39 @@
36
46
  /* Default size: md (20px) */
37
47
  @apply size-5;
38
48
 
39
- /* Shape */
40
- @apply rounded-pill; /* Radius/Rounded */
49
+ /* Shape — Radius/Rounded, with the 0.5px Stroke/Divider hairline Figma
50
+ draws inside. */
51
+ @apply rounded-pill;
41
52
  @apply border border-[length:var(--border-thin)] border-stroke-divider;
42
53
 
43
54
  /* Colors */
44
55
  @apply bg-primary text-content-contrast;
45
56
 
46
- /* Type — md */
47
- @apply text-micro-m-bold; /* 8.5px / 500 */
57
+ /* Type — Utility/Avatar Initials at every size (Rev3). */
58
+ @apply text-utility-avatar-initials; /* 8 / 8 / 600 */
48
59
  }
49
60
 
50
61
  /* --- Sizes ------------------------------------------------------------ */
62
+ /* Diameter only — the type is the same at every size. */
51
63
 
52
64
  .vd-avatar-xs {
53
- @apply size-4; /* 16px */
54
- @apply text-micro-s-bold; /* 8px / 600 / 0.4% */
65
+ @apply size-3; /* 12px */
55
66
  }
56
67
 
57
68
  .vd-avatar-sm {
58
- @apply size-4.5; /* 18px */
59
- @apply text-micro-s-bold; /* 8px / 600 / 0.4% */
69
+ @apply size-4; /* 16px */
60
70
  }
61
71
 
62
72
  .vd-avatar-md {
63
- @apply size-5; /* 20px — same as default */
64
- @apply text-micro-m-bold; /* 8.5px / 500 */
73
+ @apply size-5; /* 20px — same as the base */
65
74
  }
66
75
 
67
76
  .vd-avatar-lg {
77
+ @apply size-7; /* 28px */
78
+ }
79
+
80
+ .vd-avatar-xl {
68
81
  @apply size-8.5; /* 34px */
69
- @apply text-micro-l-bold; /* 11px / 500 */
70
82
  }
71
83
 
72
84
  /* --- States ----------------------------------------------------------- */
@@ -77,11 +89,11 @@
77
89
  @apply bg-primary-disabled;
78
90
  }
79
91
 
80
- /* Figma's Ring is a boolean property, hidden by default, and shares the 2px
81
- Primary/Main treatment used by Chip. Figma insets it -0.5px so its outer
82
- edge clears the hairline; normalised to a plain inset ring here, which is
83
- within half a pixel and cannot overflow the layout. */
92
+ /* Figma's Ring boolean: 2px Primary/Main aligned OUTSIDE since Rev3 (it was
93
+ an inset ring here), like the rest of the Ring family. The outline follows
94
+ the circle and never grows the layout box. */
84
95
  .vd-avatar.vd-with-ring {
85
- @apply ring-[length:var(--border-micro)] ring-inset ring-primary;
96
+ outline: var(--border-micro) solid var(--color-primary);
97
+ outline-offset: 0;
86
98
  }
87
99
  }
@@ -24,15 +24,24 @@
24
24
  * and a 4px radius (`Radius/XS`), which is what gives the focus ring something
25
25
  * to draw around — previously there was nothing but the glyphs.
26
26
  *
27
- * THE TYPE IS NOW BOUND TO TEXT STYLES, where the previous revision documented
28
- * it as "raw throughout". Both map exactly onto tokens we already ship:
27
+ * REV3 TYPE (2026-09-30):
29
28
  *
30
- * not current Body Content/Body 1 13 / 19.5 / 400 -> text-body-1
31
- * current Body Content/Body 1 - Bold 13 / 19.5 / 500 -> text-body-1-bold
29
+ * not current Body/Dense 13 / 18 / 400 -> text-body-dense
30
+ * current Body/Dense Strong 13 / 18 / 500 -> text-body-dense-strong
32
31
  *
33
- * So the current crumb now steps its WEIGHT as well as its colour. The old
34
- * `leading: normal` is gone — 19.5px is authored, and the visual spec used to
35
- * assert the exact opposite ("leading is Auto not 19.5").
32
+ * The current crumb steps weight and colour, as before. The item is
33
+ * 2 + 18 + 2 = 22 exactly now, and the ROW'S Height/Control/SM binding is
34
+ * GONE from the file — the container hugs its 22px items, so the old
35
+ * h-control-sm (24) is dropped. Separators bind Supporting/Caption (12/18)
36
+ * in Content/Tertiary; the loose middot binds Body/Dense (13) in
37
+ * Content/Tertiary — both were raw before.
38
+ *
39
+ * ARIA-CURRENT IS STYLED NOW (0.5.0). `[aria-current="page"]` selects
40
+ * alongside `.vd-breadcrumb-current`, closing the parked accessibility item
41
+ * — the attribute that names the current page to assistive tech also drives
42
+ * the styling, so the two cannot drift apart. The class remains for the
43
+ * slash variant's FIRST current half (#BA-204417), where two adjacent items
44
+ * are current but only the last carries aria-current.
36
45
  *
37
46
  * HOVER IS A 0.5px RULE IN `currentColor`. Figma draws it as a vector line
38
47
  * under the label, coloured to match that label — `#5b5b68` on an ancestor and
@@ -46,11 +55,11 @@
46
55
  * antialiased and has no such rounding, so it carries the authored 0.5 exactly.
47
56
  * This is the same trap, and the same fix, as the Loading Indicator ring.
48
57
  *
49
- * FOCUS IS THE SHARED RING. Figma draws a 2px `Primary/Main` border inside the
50
- * box; `focus-ring` is a 2px `Primary/Main` outline at a -2px offset, which is
51
- * the same width, colour and position. Using the ring rather than a real border
52
- * also keeps focus from reflowing the row — a border would add 4px to a box
53
- * whose height is content-driven.
58
+ * FOCUS IS THE SHARED RING. Rev3 re-authors the Focus state as a 2px
59
+ * `Primary/Main` stroke aligned OUTSIDE; the library keeps its shared
60
+ * `focus-ring` (2px outline at a negative offset) by decision (2026-09-30) —
61
+ * one focus affordance everywhere — and the outside-focus question is folded
62
+ * into designer-list item 21's ring-alignment conversation.
54
63
  *
55
64
  * THE SEPARATORS ARE NOW UNIFORM: both chevron and slash are 12px Inter Regular
56
65
  * in `Content/Tertiary`. The previous revision documented three inconsistent
@@ -85,6 +94,10 @@
85
94
  */
86
95
 
87
96
  @layer components {
97
+ /* THE ROW HUGS ITS ITEMS SINCE REV3. The Height/Control/SM binding the
98
+ container carried is gone from the file — the row is its 22px items
99
+ (2 + 18 + 2), read live 2026-09-30. Layouts that leaned on the 24px row
100
+ are on the 0.5.0 pre-publish consumer scan. */
88
101
  .vd-breadcrumbs {
89
102
  @apply flex w-full items-center gap-2; /* 8px */
90
103
  }
@@ -99,7 +112,7 @@
99
112
  @apply shrink-0;
100
113
  @apply px-1 py-0.5; /* 4px / 2px */
101
114
  @apply rounded-tight; /* 4px — Radius/XS */
102
- @apply text-body-1; /* 13 / 19.5 / 400 */
115
+ @apply text-body-dense; /* Rev3: 13 / 18 / 400 — the box is 22 exactly */
103
116
  @apply text-content-secondary no-underline;
104
117
  }
105
118
 
@@ -121,10 +134,12 @@
121
134
  }
122
135
 
123
136
  /* The current location. In the slash variant this covers TWO adjacent items,
124
- so it is a depth marker rather than "the last one". Now steps the weight
125
- to 500 as well as the colour. */
126
- .vd-breadcrumb-current {
127
- @apply text-body-1-bold; /* 13 / 19.5 / 500 */
137
+ so it is a depth marker rather than "the last one" — which is why the
138
+ class survives alongside the attribute: only the LAST current item
139
+ carries aria-current="page". Styled through both since 0.5.0. */
140
+ .vd-breadcrumb-current,
141
+ .vd-breadcrumb[aria-current="page"] {
142
+ @apply text-body-dense-strong; /* Rev3: 13 / 18 / 500 */
128
143
  @apply text-content-primary;
129
144
  }
130
145
 
@@ -136,10 +151,11 @@
136
151
 
137
152
  /* --- Separators ---------------------------------------------------------- */
138
153
 
139
- /* Both types are identical now. Always pair with aria-hidden="true". */
154
+ /* Both types are identical, and bound since Rev3: Supporting/Caption.
155
+ Always pair with aria-hidden="true". */
140
156
  .vd-breadcrumb-separator {
141
157
  @apply shrink-0 select-none;
142
- @apply text-[12px] font-normal leading-[normal];
158
+ @apply text-supporting-caption; /* 12 / 18 / 400 */
143
159
  @apply text-content-tertiary;
144
160
  }
145
161
 
@@ -150,9 +166,10 @@
150
166
  @apply text-[12px];
151
167
  }
152
168
 
153
- /* The loose middot from the slash variant — 13px where the separators are 12,
154
- and Regular where this used to be Bold. Not a Separator instance in Figma. */
169
+ /* The loose middot from the slash variant — Body/Dense (13) where the
170
+ separators are Caption (12). Not a Separator instance in Figma; bound
171
+ since Rev3. */
155
172
  .vd-breadcrumb-separator-dot {
156
- @apply text-[13px] font-normal;
173
+ @apply text-body-dense;
157
174
  }
158
175
  }
@@ -1,10 +1,41 @@
1
1
  /**
2
2
  * Button Component — Figma 73:180
3
3
  *
4
- * Interactive button for actions throughout the dashboard. 42 variants across
5
- * Size (sm/md/lg) x State (rest/hover/selected/active/disabled) x Display
6
- * (primary/outline/empty). Primary has no `active`, which is why it is 12
7
- * variants where the other two are 15.
4
+ * Interactive button for actions throughout the dashboard. 70 variants across
5
+ * Size (xs/sm/md/lg/xl) x State (rest/hover/selected/active/disabled) x Display
6
+ * (primary/outline/empty). Primary has no `active`, which is why it is 20
7
+ * variants where the other two are 25.
8
+ *
9
+ * HEIGHTS ARE THE CONTROL LADDER — Height/Control/XS..XL bound on every variant
10
+ * in Figma (2026-09-24), emitted as --height-control-* and applied as
11
+ * `h-control-*`. xs 20 / sm 24 / md 28 / lg 32 / xl 40. Vertical padding is 0:
12
+ * the box is the token and `items-center` centres the label. Base = md, the
13
+ * library-wide convention; `.vd-btn-md` exists so a call site can say so.
14
+ * NOTE: Figma's own default VARIANT is `Size=xl, State=rest, Display=outline`
15
+ * — an XL default that contradicts the designer's md-based ladder and smells
16
+ * like an authoring artifact; the md base is kept (designer-list item 29).
17
+ *
18
+ * REV3 TYPE (2026-09-30). Geometry did not move; the labels did:
19
+ * xs, sm Action/Compact ACTIVE (12/16/600) — Semi Bold AT REST, via a
20
+ * style literally named "Active" (designer-list item 28; as drawn)
21
+ * md, lg, xl Action/Default (13/18/500) — one style for all three, which
22
+ * resolves the old xl-binds-a-Body-style question (md moves
23
+ * 12.5 -> 13; xl moves 14 -> 13)
24
+ *
25
+ * TWO NEW FIGMA BOOLEANS (Rev3):
26
+ * Ring a 2px Primary/Main stroke aligned OUTSIDE — same treatment as
27
+ * Chip/Tag/TextButton; `.vd-btn.vd-with-ring` below.
28
+ * Count a nested Badge XS instance (16px, size-invariant at every button
29
+ * size) — the existing `.vd-badge`, not a new part:
30
+ * <button class="vd-btn vd-btn-outline">Inbox
31
+ * <span class="vd-badge vd-badge-neutral">3</span></button>
32
+ *
33
+ * PRIMARY'S STATES COLLAPSED WITH THE 2026-09-29 TOKEN ALIAS: Primary/Pressed
34
+ * now equals Primary/Dark, so a primary button's hover, pressed AND selected
35
+ * are all #163a6b — shipped faithfully, pending designer-list item 20. The
36
+ * outline/empty ramp keeps pressed fully distinct (Primary/Soft + blue).
37
+ * Primary also draws the Stroke/Divider hairline at rest now (it was
38
+ * border-transparent) — invisible on the fill, but it is what Figma binds.
8
39
  *
9
40
  * Usage:
10
41
  * <button class="vd-btn vd-btn-primary">Primary Button</button>
@@ -38,14 +69,14 @@
38
69
  .vd-btn {
39
70
  /* Layout */
40
71
  @apply inline-flex items-center justify-center gap-1.25;
41
- @apply h-7 px-3; /* Medium (28px) - default size, 5px gap */
72
+ @apply h-control-md px-3; /* md, 28px — Height/Control/MD; 12px padding, 5px gap */
42
73
 
43
74
  /* Shape */
44
75
  @apply rounded-control; /* 6px from Figma */
45
76
 
46
- /* Type — each size has its OWN Figma text style, they are not shared:
47
- sm = Action S (12px/14), md = Action M (12.5px/14), lg = Action L (13px/auto) */
48
- @apply text-action-m; /* Medium default */
77
+ /* Type — Rev3: md/lg/xl share Action/Default; xs/sm carry the 600 Compact
78
+ Active style (see the header). */
79
+ @apply text-action-default; /* 13 / 18 / 500 */
49
80
 
50
81
  /* Interaction */
51
82
  @apply cursor-pointer;
@@ -69,23 +100,32 @@
69
100
  @apply bg-primary-soft text-primary border-primary;
70
101
  }
71
102
 
103
+ /* Toggle state. aria-pressed is the correct attribute on a plain <button>
104
+ (0.5.0); aria-selected is kept for hosts whose role supports it —
105
+ option / tab / row / gridcell — so existing markup keeps rendering. */
106
+ .vd-btn[aria-pressed="true"],
72
107
  .vd-btn[aria-selected="true"] {
73
108
  @apply bg-action-hover;
74
109
  }
75
110
 
76
111
  /* --- Variants ------------------------------------------------------- */
77
112
 
113
+ /* Rev3 binds the Stroke/Divider hairline on primary at rest — dark-on-dark
114
+ and effectively invisible, but faithful; heights are border-box so it
115
+ costs nothing. hover == pressed == selected == #163a6b since the
116
+ Primary/Pressed -> Dark alias (designer-list item 20; as drawn). */
78
117
  .vd-btn-primary {
79
- @apply border-transparent bg-primary text-content-contrast;
118
+ @apply border-stroke-divider bg-primary text-content-contrast;
80
119
 
81
120
  &:hover:not(:disabled) {
82
121
  @apply bg-primary-dark;
83
122
  }
84
123
 
85
124
  &:active:not(:disabled) {
86
- @apply border-transparent bg-primary-pressed text-content-contrast;
125
+ @apply border-stroke-divider bg-primary-pressed text-content-contrast;
87
126
  }
88
127
 
128
+ &[aria-pressed="true"],
89
129
  &[aria-selected="true"] {
90
130
  @apply bg-primary-pressed;
91
131
  }
@@ -127,6 +167,7 @@
127
167
 
128
168
  /* Not in Figma either — but without it the base ramp would grey out a
129
169
  selected critical button. Matches its own pressed value. */
170
+ &[aria-pressed="true"],
130
171
  &[aria-selected="true"] {
131
172
  @apply bg-critical-strong;
132
173
  }
@@ -148,15 +189,36 @@
148
189
  }
149
190
 
150
191
  /* --- Sizes ---------------------------------------------------------- */
192
+ /* One Height/Control step each. Padding-x and gap are Figma's per size; xs
193
+ and xl carry raw values there (6/4 and 20/8) where sm/md/lg bind Spacing
194
+ tokens — reproduced as drawn. Icon pairing: 13 / 13 / 14 / 15 / 15. */
195
+
196
+ .vd-btn-xs {
197
+ @apply h-control-xs px-1.5 gap-1; /* 20px, 6px padding, 4px gap */
198
+ @apply text-action-compact-active; /* 12 / 16 / 600 — at rest, as drawn */
199
+ }
151
200
 
152
201
  .vd-btn-sm {
153
- @apply h-6 px-2 gap-1.25; /* 24px, 8px padding, 5px gap */
154
- @apply text-action-s; /* 12px / 14px / 500 */
202
+ @apply h-control-sm px-2 gap-1.25; /* 24px, 8px padding, 5px gap */
203
+ @apply text-action-compact-active; /* 12 / 16 / 600 — at rest, as drawn */
204
+ }
205
+
206
+ /* Identical to the bare base by design — md IS the default. Exists so the
207
+ size can be named at the call site, the way .vd-btn-outline names the
208
+ default Display. */
209
+ .vd-btn-md {
210
+ @apply h-control-md px-3 gap-1.25; /* 28px, 12px padding, 5px gap */
211
+ @apply text-action-default; /* 13 / 18 / 500 */
155
212
  }
156
213
 
157
214
  .vd-btn-lg {
158
- @apply h-8 px-4 gap-1.5; /* 32px, 16px padding, 6px gap */
159
- @apply text-action-l; /* 13px / normal / 500 */
215
+ @apply h-control-lg px-4 gap-1.5; /* 32px, 16px padding, 6px gap */
216
+ @apply text-action-default; /* 13 / 18 / 500 */
217
+ }
218
+
219
+ .vd-btn-xl {
220
+ @apply h-control-xl px-5 gap-2; /* 40px, 20px padding, 8px gap */
221
+ @apply text-action-default; /* 13 / 18 / 500 — the old Subtitle binding is gone */
160
222
  }
161
223
 
162
224
  /* --- States --------------------------------------------------------- */
@@ -174,4 +236,12 @@
174
236
  .vd-btn:disabled:not(.vd-btn-primary) {
175
237
  @apply text-content-tertiary;
176
238
  }
239
+
240
+ /* Ring — a Figma boolean since Rev3 (Button never had one before): a 2px
241
+ Primary/Main stroke aligned OUTSIDE, like Chip/Tag/TextButton. Outline at
242
+ zero offset follows the 6px radius. */
243
+ .vd-btn.vd-with-ring {
244
+ outline: var(--border-micro) solid var(--color-primary);
245
+ outline-offset: 0;
246
+ }
177
247
  }
@@ -33,12 +33,12 @@
33
33
 
34
34
  .vd-card-title {
35
35
  @apply mb-2; /* Figma Spacing/8 */
36
- @apply text-h2; /* Figma Body Content/H2 */
36
+ @apply text-heading-section; /* 17 / 22 / 600 — the Rev3 successor of H2, same size and weight */
37
37
  @apply text-content-primary;
38
38
  }
39
39
 
40
40
  .vd-card-body {
41
- @apply text-body-1; /* Figma Body Content/Body 1 */
41
+ @apply text-body-dense; /* 13 / 18 / 400 — the Rev3 successor of Body 1, same size and weight */
42
42
  @apply text-content-secondary;
43
43
  }
44
44
 
@@ -103,16 +103,20 @@
103
103
  @apply rounded-tight;
104
104
  @apply border border-[length:var(--border-line)];
105
105
 
106
- /* Rest */
107
- @apply border-stroke-divider;
106
+ /* Rest — Rev3 rebinds the box stroke to Neutral/Main (was Stroke/Divider);
107
+ hover keeps the same token and adds the Action/Hover fill. */
108
+ @apply border-neutral;
108
109
 
109
110
  @apply transition-colors duration-150;
110
111
  }
111
112
 
112
- /* Lucide `check`, 10px, Content/Contrast — hidden until checked. */
113
+ /* Lucide `check`, 10px, Content/Contrast — hidden until checked. Figma
114
+ authors a 1.5px stroke on this glyph where the icon ramp's 10px step is
115
+ 0.75 — half the authored weight. 1.5px at a 10px box is 3.6 user units. */
113
116
  .vd-checkbox-check {
114
117
  @apply pointer-events-none relative;
115
118
  @apply text-content-contrast opacity-0;
119
+ --icon-stroke: 3.6;
116
120
  }
117
121
 
118
122
  /* --- States --------------------------------------------------------- */
@@ -143,7 +147,7 @@
143
147
  out of contrast compliance. See icon-button.css and _template.css. */
144
148
  .vd-checkbox-input:disabled {
145
149
  @apply cursor-not-allowed;
146
- @apply border-stroke-disabled;
150
+ @apply border-stroke-border; /* Rev3 — was Stroke/Disabled */
147
151
  }
148
152
 
149
153
  .vd-checkbox:has(.vd-checkbox-input:disabled) {
@@ -154,7 +158,7 @@
154
158
 
155
159
  .vd-checkbox-label {
156
160
  @apply min-w-0 flex-1;
157
- @apply text-caption text-content-primary; /* 12px / 18px / 400 */
161
+ @apply text-supporting-caption text-content-primary; /* Rev3: 12 / 18 / 400 — same metrics */
158
162
  @apply select-none;
159
163
  }
160
164
 
@@ -165,17 +169,18 @@
165
169
  @apply text-content-tertiary;
166
170
  }
167
171
 
168
- /* Figma's subtitle boolean — Data/Data xs needs font-mono, since --text-*
169
- carries no family. */
172
+ /* Figma's subtitle boolean — Rev3 binds Data/Compact (the same 12/16.5
173
+ metrics Data xs carried); font-mono because --text-* carries no family. */
170
174
  .vd-checkbox-subtitle {
171
175
  @apply shrink-0 select-none;
172
- @apply text-data-xs font-mono; /* 12px / 16.5px / 400, JetBrains Mono */
176
+ @apply text-data-compact font-mono; /* 12 / 16.5 / 400, JetBrains Mono */
173
177
  @apply text-content-tertiary;
174
178
  }
175
179
 
176
- /* Figma's Ring boolean, hidden by default. Square, like Section Marker's —
177
- this row has no radius of its own. */
180
+ /* Figma's Ring boolean, hidden by default. Rev3 draws it OUTSIDE around
181
+ the whole label row, like the rest of the Ring family (was inset). */
178
182
  .vd-checkbox.vd-with-ring {
179
- @apply ring-[length:var(--border-micro)] ring-inset ring-primary;
183
+ outline: var(--border-micro) solid var(--color-primary);
184
+ outline-offset: 0;
180
185
  }
181
186
  }