@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
@@ -1,18 +1,48 @@
1
1
  /**
2
- * Chip Component — Figma "Status" (79:275)
2
+ * Chip Component — Figma "Chip" (79:275)
3
3
  *
4
4
  * Status indicator available as chip, dot, or badge to communicate semantic
5
- * states. 54 variants across Type x Color x BG x Size, plus a Ring boolean.
5
+ * states. 81 variants across Type x Color x BG x Size (XS / SM / MD), plus a
6
+ * set-wide Ring boolean.
7
+ *
8
+ * REBUILT 2026-09-29 for the Revision 3 redesign (a 0.5.0 hard break — see
9
+ * CHANGELOG and scripts/codemods/0.5.0-chip-sizes.mjs):
10
+ *
11
+ * - XS is the new Figma default (the set's default variant is
12
+ * `Type=chip, Size=XS`), so the bare classes render XS. The old 20px SM
13
+ * maps onto XS — bare chips keep their height and their markup.
14
+ * - Chips sit on the control ladder: XS/SM/MD = Height/Control/XS/SM/MD
15
+ * (20/24/28), bound in Figma on every chip variant.
16
+ * - The micro type styles are gone from chips: labels are Action/Compact
17
+ * (12/16/500) at XS and SM, Action/Default (13/18/500) at MD. Weight is
18
+ * 500 at every size — no active bump.
19
+ * - Badges hug: fixed height 16/16/20 with raw min-widths 16/16/20 (NOT
20
+ * control tokens), so a multi-digit count grows the box into a pill
21
+ * instead of overflowing a circle. XS and SM are identical.
22
+ * - Dots are 4/6/8, bound to Spacing/4/6/8 — deliberately not the control
23
+ * ladder; a dot is an inline mark. (The set briefly shipped stale inner
24
+ * ink rects — a 5px rect inside the 4px XS frame; the designer fixed them
25
+ * 2026-09-29 and the inner shapes now fill their frames exactly, matching
26
+ * what this file already rendered.)
27
+ * - CONTRAST PASS (2026-09-29): chip and badge LABELS bind the Content ramp
28
+ * (Warning/Content, Critical/Content, Approved/Content, Neutral/Content;
29
+ * primary stays Primary/Main) — the darker steps that clear AA on the
30
+ * soft tints. THE CHIP'S INNER DOT DOES NOT FOLLOW: it keeps the Main
31
+ * colour (Neutral/Strong on neutral chips), so the dot is decoupled from
32
+ * the label and no longer inherits via currentColor. Critical/Content was
33
+ * de-aliased from Critical/Strong in the same pass (raw #b3363f). The
34
+ * standalone neutral dot moved Neutral/Strong -> Neutral/Main.
6
35
  *
7
36
  * Usage:
8
- * <!-- Chip with optional dot -->
37
+ * <!-- Chip with optional dot (bare = XS, 20px) -->
9
38
  * <span class="vd-chip vd-chip-warning">
10
39
  * <span class="vd-chip-dot"></span>
11
40
  * <span>Warning</span>
12
41
  * </span>
13
42
  *
14
- * <!-- Badge (circular number) -->
43
+ * <!-- Badge (count; hugs a multi-digit value) -->
15
44
  * <span class="vd-badge vd-badge-critical">3</span>
45
+ * <span class="vd-badge vd-badge-critical">128</span>
16
46
  *
17
47
  * <!-- Dot (indicator only) -->
18
48
  * <span class="vd-dot vd-dot-success"></span>
@@ -22,119 +52,134 @@
22
52
  * <span class="vd-chip-dot"></span>
23
53
  * <span>Warning</span>
24
54
  * </span>
25
- * <span class="vd-badge vd-badge-critical vd-badge-bg-no">3</span>
26
55
  *
27
56
  * THE BG AXIS. Figma ships every colour both filled (`BG=yes`) and unfilled
28
57
  * (`BG=no`). Only the fill changes — the text and dot keep the same colour
29
- * token either way, and there is NO hairline or border in the unfilled form.
30
- * Verified by sampling the Figma render: a warning chip is #faf4eb filled
31
- * (Warning/Soft over white, exact) and #ffffff unfilled.
32
- *
33
- * `BG=yes` IS THE DEFAULT, so it needs no class and the pre-existing markup is
34
- * unchanged. Read from the variant set rather than assumed: the three
35
- * lowest-id variants (79:272, 79:273, 79:274 — one per Type) are all `BG=yes`,
36
- * and the BG=yes group occupies the left half of the set frame with BG=no
37
- * starting at x=515. The naming mirrors the `-bg-*` convention already used by
38
- * Input, Textarea and DropdownField, where the default value takes no class and
39
- * the other value is named after its Figma value.
58
+ * token either way, and there is NO hairline or border in the unfilled form
59
+ * (each variant declares a 0.5 strokeWeight with an EMPTY strokes array —
60
+ * vestigial). Since the rebuild this holds for the badge too: BG=no removes
61
+ * its fill but keeps the box, where the old badge lost its circle entirely.
40
62
  *
41
- * BG IS A NO-OP FOR `dot`, so no `.dot-bg-no` exists. Figma draws all 18 dot
42
- * variants, but a dot IS its fill: sampling `BG=yes` and `BG=no` returns
43
- * byte-identical pixels (#c9881f both). Nine of those variants are therefore
44
- * redundant. On the designer list.
63
+ * `BG=yes` IS THE DEFAULT, so it needs no class; `primary` exists only at
64
+ * BG=no in Figma, which is why `.vd-chip-primary` and `.vd-badge-primary` are
65
+ * already transparent. BG is a no-op for `dot` — a dot IS its fill — so no
66
+ * `.dot-bg-no` exists (still on the designer list).
45
67
  *
46
- * `primary` EXISTS ONLY AT BG=no in Figma — there is no filled primary — which
47
- * is why `.vd-chip-primary` and `.vd-badge-primary` are already transparent. Adding
48
- * `.vd-chip-bg-no` to a primary chip is harmless but redundant.
68
+ * CASING IS THE CALLER'S — reconfirmed on the rebuilt set. The bound label
69
+ * styles (`Action/Compact`, `Action/Default`) apply no text-transform, and the
70
+ * rendered variants type their caps into the sample strings (`REVIEW`,
71
+ * textCase ORIGINAL). A label passed as "Review" stays "Review".
49
72
  *
50
- * CASING IS THE CALLER'S — CONFIRMED 2026-08-26. Figma renders the labels
51
- * UPPERCASE (REVIEW, FLAGGED), and for a long time nothing distinguished a
52
- * `text-transform` on the component from the casing of the sample strings. The
53
- * designer has since bound a text style to the label — `Micro Text/Micro S -
54
- * Bold` — and it applies NO text-case: the rendered variant emits `REVIEW` with
55
- * no `uppercase`. So the caps are typed into the sample strings, and leaving
56
- * casing alone was right. A label passed as "Review" stays "Review".
57
- *
58
- * There is still deliberately no `text-transform: none` assertion, because
59
- * nothing sets one to guard against. Contrast Pill, where the same question was
60
- * answered differently and the spec does pin it. Divider reached the same
61
- * behaviour from the other direction, by dropping the `type-label-*` form.
73
+ * THE RING SITS OUTSIDE NOW. Figma draws the Ring layer as a full-size frame
74
+ * with a 2px Primary/Main stroke aligned OUTSIDE, so the ring's inner edge
75
+ * hugs the component and it extends 2px beyond the box. The pre-rebuild set
76
+ * drew it inset; this file followed. Outline (offset 0) reproduces the
77
+ * outside alignment and follows the element's own radius. One faithful
78
+ * divergence: Figma's dot Ring frame has no corner radius (a square ring
79
+ * around a round dot); the outline stays round with the dot.
62
80
  */
63
81
 
64
82
  @layer components {
65
83
  /* --- Chip (text with optional dot) --------------------------------- */
66
84
 
85
+ /* Bare chip = XS, the Figma default variant. */
67
86
  .vd-chip {
68
- /* Layout */
69
- @apply inline-flex items-center gap-1;
70
- @apply px-2.25 py-1.25; /* 9px x 5px from Figma */
71
- @apply h-5; /* 20px — pinned, not derived from the 8px Auto line box */
87
+ /* Layout — height is the control token; the box centres its content,
88
+ so Figma's padding-y (2/4/5) is absorbed and only padding-x ships. */
89
+ @apply inline-flex items-center gap-0.75; /* 3px gap */
90
+ @apply px-1.5; /* 6px */
91
+ @apply h-control-xs; /* 20 — Height/Control/XS, bound in Figma */
72
92
 
73
93
  /* Shape */
74
94
  @apply rounded-pill; /* 9999px */
75
95
 
76
- /* Type */
77
- @apply text-micro-s-bold; /* 8px/600/normal/0.4% */
96
+ /* Type — Action/Compact (12/16/500). The old 8px Micro S is gone. */
97
+ @apply text-action-compact;
78
98
  }
79
99
 
80
- /* Chip dot indicator (optional child element) */
100
+ /* Chip dot indicator (optional child element). 4px at XS; SM and MD grow
101
+ it to 5 — see the size section. Since the contrast pass the dot does NOT
102
+ inherit the label colour: labels are the Content ramp, dots stay Main
103
+ (Strong on neutral) — the per-variant rules below carry the fill. */
81
104
  .vd-chip-dot {
82
- @apply size-[5px] rounded-pill;
83
- @apply bg-current; /* Inherits text color from parent chip variant */
105
+ @apply size-1 rounded-pill; /* 4px */
84
106
  }
85
107
 
86
108
  /* --- Chip Variants -------------------------------------------------- */
109
+ /* Label = Content ramp (AA on the soft tint); dot = Main. Primary is the
110
+ exception: no Content step, label and dot both Primary/Main. */
87
111
 
88
112
  .vd-chip-warning {
89
- @apply bg-warning-soft text-warning;
113
+ @apply bg-warning-soft text-warning-content;
114
+ .vd-chip-dot {
115
+ @apply bg-warning;
116
+ }
90
117
  }
91
118
 
92
119
  .vd-chip-critical {
93
- @apply bg-critical-soft text-critical;
120
+ @apply bg-critical-soft text-critical-content;
121
+ .vd-chip-dot {
122
+ @apply bg-critical;
123
+ }
94
124
  }
95
125
 
96
126
  .vd-chip-success {
97
- @apply bg-approved-soft text-approved;
127
+ @apply bg-approved-soft text-approved-content;
128
+ .vd-chip-dot {
129
+ @apply bg-approved;
130
+ }
98
131
  }
99
132
 
100
133
  .vd-chip-neutral {
101
- @apply bg-neutral-soft text-neutral-strong;
134
+ @apply bg-neutral-soft text-neutral-content;
135
+ .vd-chip-dot {
136
+ @apply bg-neutral-strong; /* the one dot NOT on Main — as drawn */
137
+ }
102
138
  }
103
139
 
104
140
  .vd-chip-primary {
105
141
  @apply bg-transparent text-primary;
142
+ .vd-chip-dot {
143
+ @apply bg-primary;
144
+ }
106
145
  }
107
146
 
108
- /* --- Badge (circular number indicator) ------------------------------ */
147
+ /* --- Badge (count indicator) ----------------------------------------- */
109
148
 
149
+ /* Bare badge = XS (identical to SM in Figma): a 16px-high pill that hugs
150
+ its count with a 16px minimum width — a single digit reads as a circle,
151
+ a multi-digit count grows the box. The min-widths are raw values in
152
+ Figma, not control tokens. */
110
153
  .vd-badge {
111
154
  /* Layout */
112
155
  @apply inline-flex items-center justify-center;
113
- @apply size-[15px] p-1; /* 15px x 15px, 4px padding */
156
+ @apply h-4 min-w-4 px-1; /* 16 high, min 16 wide, 4px padding-x */
114
157
 
115
158
  /* Shape */
116
159
  @apply rounded-pill; /* 9999px */
117
160
 
118
- /* Type */
119
- @apply text-data-micro-s font-mono; /* 8px/500/normal, JetBrains Mono */
161
+ /* Type — Utility/Badge Count (10/12/500, JetBrains Mono) at EVERY size */
162
+ @apply text-utility-badge-count font-mono;
120
163
  }
121
164
 
122
165
  /* --- Badge Variants ------------------------------------------------- */
123
166
 
167
+ /* Count = Content ramp, same contrast rationale as the chip label. */
168
+
124
169
  .vd-badge-warning {
125
- @apply bg-warning-soft text-warning;
170
+ @apply bg-warning-soft text-warning-content;
126
171
  }
127
172
 
128
173
  .vd-badge-critical {
129
- @apply bg-critical-soft text-critical;
174
+ @apply bg-critical-soft text-critical-content;
130
175
  }
131
176
 
132
177
  .vd-badge-success {
133
- @apply bg-approved-soft text-approved;
178
+ @apply bg-approved-soft text-approved-content;
134
179
  }
135
180
 
136
181
  .vd-badge-neutral {
137
- @apply bg-neutral-soft text-neutral-strong;
182
+ @apply bg-neutral-soft text-neutral-content;
138
183
  }
139
184
 
140
185
  .vd-badge-primary {
@@ -143,8 +188,10 @@
143
188
 
144
189
  /* --- Dot (indicator only) ------------------------------------------- */
145
190
 
191
+ /* Bare dot = XS (4px). Bound to Spacing/4/6/8 in Figma, not the control
192
+ ladder — a dot is an inline mark, not a control. */
146
193
  .vd-dot {
147
- @apply inline-block size-[5px] rounded-pill;
194
+ @apply inline-block size-1 rounded-pill; /* 4px */
148
195
  }
149
196
 
150
197
  /* --- Dot Variants --------------------------------------------------- */
@@ -162,6 +209,12 @@
162
209
  }
163
210
 
164
211
  .vd-dot-neutral {
212
+ /* DELIBERATE DIVERGENCE (requester decision 2026-09-29): Figma's contrast
213
+ pass moved the standalone neutral dot to Neutral/Main (#9999a6) while
214
+ the neutral CHIP's inner dot kept Neutral/Strong. A severity dot at
215
+ #9999a6 on the frame surface is near-invisible, and the two dots
216
+ disagreeing is worse than either value — so both stay on Strong and the
217
+ Figma binding is questioned instead (designer-list item 22). */
165
218
  @apply bg-neutral-strong;
166
219
  }
167
220
 
@@ -170,46 +223,66 @@
170
223
  }
171
224
 
172
225
  /* --- Sizes ----------------------------------------------------------- */
173
- /* Figma's Size property, added 2026-08-22. SM is the pre-existing default,
174
- so bare .vd-chip / .vd-badge / .vd-dot stay SM and nothing breaks.
175
- What MD actually changes is narrower than you would guess:
176
- chip — gap 4->6 and type 8px->11px. Padding is IDENTICAL (9 / 5), and
177
- the inner .vd-chip-dot stays 5px at both sizes.
178
- badge — box 15 -> 19px, padding 4 -> 6px, type 8px -> 11px.
179
- dot — size only, 5px -> 7px. */
226
+ /* Rev3 scale (2026-09-29). XS is the default; each explicit class restates
227
+ its whole size so the classes compose predictably:
228
+ chip — 20/24/28 on the control ladder; padding-x 6/9/9; gap 3/4/6;
229
+ label Action/Compact at XS+SM, Action/Default at MD; inner
230
+ .vd-chip-dot 4/5/5.
231
+ badge — 16/16/20 high with min-width 16/16/20 (XS == SM); padding-x
232
+ 4/4/6; type identical at every size.
233
+ dot — 4/6/8.
234
+ THE OLD NAMES MEAN NEW THINGS: pre-0.5.0 `-sm` (20) is now `-xs`, and
235
+ pre-0.5.0 chip `-md` (23) is now `-sm` (24). Codemod:
236
+ scripts/codemods/0.5.0-chip-sizes.mjs. */
237
+
238
+ .vd-chip-xs {
239
+ @apply h-control-xs gap-0.75 px-1.5; /* 20, 3px gap, 6px padding-x */
240
+ @apply text-action-compact; /* 12 / 16 / 500 */
241
+ }
180
242
 
181
243
  .vd-chip-sm {
182
- @apply h-5 gap-1; /* 20px, 4px gap */
183
- @apply text-micro-s-bold; /* 8px / 600 / 0.4% */
244
+ @apply h-control-sm gap-1 px-2.25; /* 24, 4px gap, 9px padding-x */
245
+ @apply text-action-compact; /* 12 / 16 / 500 */
184
246
  }
185
247
 
186
248
  .vd-chip-md {
187
- @apply h-[23px] gap-1.5; /* 23px, 6px gap */
188
- @apply text-micro-l-bold; /* 11px / 500, Inter Medium */
249
+ @apply h-control-md gap-1.5 px-2.25; /* 28, 6px gap, 9px padding-x */
250
+ @apply text-action-default; /* 13 / 18 / 500 */
251
+ }
252
+
253
+ /* The inner dot steps once, XS -> SM; MD keeps SM's 5px. */
254
+ .vd-chip-sm .vd-chip-dot,
255
+ .vd-chip-md .vd-chip-dot {
256
+ @apply size-1.25; /* 5px */
189
257
  }
190
258
 
259
+ .vd-badge-xs,
191
260
  .vd-badge-sm {
192
- @apply text-data-micro-s font-mono; /* 8px / 500, JetBrains Mono */
261
+ @apply h-4 min-w-4 px-1; /* 16, identical in Figma */
193
262
  }
194
263
 
195
264
  .vd-badge-md {
196
- @apply size-[19px] p-1.5; /* 19px box, 6px padding */
197
- @apply text-data-micro-l font-mono; /* 11px / 500, JetBrains Mono */
265
+ @apply h-5 min-w-5 px-1.5; /* 20, 6px padding-x */
266
+ }
267
+
268
+ .vd-dot-xs {
269
+ @apply size-1; /* 4px */
198
270
  }
199
271
 
200
272
  .vd-dot-sm {
201
- @apply size-[5px];
273
+ @apply size-1.5; /* 6px */
202
274
  }
203
275
 
204
276
  .vd-dot-md {
205
- @apply size-[7px];
277
+ @apply size-2; /* 8px */
206
278
  }
207
279
 
208
280
  /* --- BG (Figma's BG axis) -------------------------------------------- */
209
281
 
210
282
  /* BG=yes is the default and lives on the colour variants above. This is the
211
283
  opt-out: it removes the fill and nothing else — same text colour, same dot
212
- colour, and deliberately NO border, which the Figma render confirms.
284
+ colour, same box, and deliberately NO border, which the Figma variants
285
+ confirm (empty strokes arrays throughout).
213
286
 
214
287
  Written as a compound selector so it beats `.vd-chip-warning` on specificity
215
288
  rather than on source order, matching how `.vd-chip.vd-with-ring` is written
@@ -221,14 +294,17 @@
221
294
 
222
295
  /* --- States (with-ring variant) ------------------------------------- */
223
296
 
224
- /* Figma's Ring layer is `inset: 0` with a 2px Primary/Main border — drawn
225
- INSIDE the component's own bounds, at zero offset, in primary regardless
226
- of the status colour. An earlier version used the variant's own colour and
227
- pushed the ring 2px outward; both were wrong.
297
+ /* Figma's Ring layer is a full-size frame with a 2px Primary/Main stroke
298
+ aligned OUTSIDE — the ring's inner edge hugs the component and extends
299
+ 2px beyond it. Outline at zero offset reproduces the outside alignment
300
+ exactly and follows each element's own radius (Figma's dot ring frame is
301
+ square; the outline stays round with the dot — see the header). The
302
+ pre-0.5.0 set drew this ring inset; the rebuild moved it out.
228
303
  Ring is orthogonal to the BG property — it combines with either. */
229
304
  .vd-chip.vd-with-ring,
230
305
  .vd-badge.vd-with-ring,
231
306
  .vd-dot.vd-with-ring {
232
- @apply ring-[length:var(--border-micro)] ring-inset ring-primary;
307
+ outline: var(--border-micro) solid var(--color-primary);
308
+ outline-offset: 0;
233
309
  }
234
310
  }
@@ -0,0 +1,145 @@
1
+ /**
2
+ * Comment Composer Component — Figma Comment Composer 1289:3690
3
+ *
4
+ * A comment / note composer: a bordered shell holding a growing text body, an
5
+ * optional row of Tag chips, and a footer with actions and a Post button; a
6
+ * helper line sits under the shell. 24 variants: State (rest / hover / focus /
7
+ * error …) x Error x Rows (1 / 3 / 5). One size — xl.
8
+ *
9
+ * THIS IS A FLOOR COMPONENT. Figma binds Height/Control/XL (40) to the
10
+ * Shell's MIN-height with the frame on Hug — applied as `min-h-control-xl`.
11
+ * The shell's own floor never binds in practice, because the body has floors
12
+ * of its own that Rows sets: 20 / 58 / 98 (`.vd-composer-rows-1 / -3 / -5`).
13
+ * Those three are RAW BY DESIGN — a Rows axis, not the control ladder — and
14
+ * are exempt in verify:height-scale with that reason. Frame heights reconcile
15
+ * exactly: 118 / 156 / 196 = body floor + a constant 98px of chrome (shell
16
+ * padding 20, tags row 20, footer 24, gaps 12, helper ~14, root gap 8).
17
+ *
18
+ * The footer's controls carry the ladder themselves — two Icon Button sm and a
19
+ * Button sm (Action S "Post"), all 24 — so the footer row is content-driven at
20
+ * 24 and is not pinned. The tags row holds Tag sm chips (20). Shell padding is
21
+ * 16 / 9 (x / y) — Figma's 10 minus the rendered 1px hairline per side, the
22
+ * floor-tier rule, which is what makes the frames land on 118 / 156 / 196
23
+ * exactly rather than +2 — with a 6px gap between its rows; the root gap
24
+ * (shell to helper) is 8.
25
+ *
26
+ * Structure:
27
+ * <div class="vd-composer">
28
+ * <div class="vd-composer-shell">
29
+ * <div class="vd-composer-body vd-composer-rows-3">
30
+ * <textarea class="vd-composer-textarea" rows="3" placeholder="Add a comment…"></textarea>
31
+ * </div>
32
+ * <div class="vd-composer-tags">…Tag sm chips…</div> <!-- Optional -->
33
+ * <div class="vd-composer-footer">
34
+ * <div class="vd-composer-actions">…Icon Button sm x2…</div>
35
+ * <button class="vd-btn vd-btn-primary vd-btn-sm">Post</button>
36
+ * </div>
37
+ * </div>
38
+ * <p class="vd-composer-helper">
39
+ * <svg class="vd-icon vd-icon-size-14" aria-hidden="true">…</svg> Visible to the applicant
40
+ * </p>
41
+ * </div>
42
+ */
43
+
44
+ @layer components {
45
+ .vd-composer {
46
+ @apply flex w-full flex-col gap-2; /* 8px — shell to helper */
47
+ }
48
+
49
+ /* --- Shell — the bordered box, a FLOOR of Height/Control/XL ------------- */
50
+
51
+ .vd-composer-shell {
52
+ /* Layout */
53
+ @apply flex w-full flex-col gap-1.5; /* 6px between body / tags / footer */
54
+ @apply min-h-control-xl px-4 py-2.25; /* floor 40, 16px / 9px (Figma 10 − hairline) */
55
+
56
+ /* Shape */
57
+ @apply rounded-control; /* 6px */
58
+ @apply border border-[length:var(--border-thin)] border-stroke-divider;
59
+
60
+ /* Colors */
61
+ @apply bg-surface-paper;
62
+
63
+ /* Interaction */
64
+ @apply transition-colors duration-150;
65
+ }
66
+
67
+ .vd-composer-shell:hover:not(:has(:disabled)) {
68
+ @apply border-stroke-border;
69
+ }
70
+
71
+ .vd-composer-shell:focus-within {
72
+ @apply focus-ring;
73
+ }
74
+
75
+ .vd-composer-error .vd-composer-shell {
76
+ @apply border-critical;
77
+ }
78
+
79
+ /* --- Body — grows with content above a Rows floor ------------------------ */
80
+
81
+ .vd-composer-body {
82
+ @apply flex w-full;
83
+ }
84
+
85
+ /* Rows floors — RAW BY DESIGN (a Rows axis, not the ladder). */
86
+ .vd-composer-rows-1 {
87
+ @apply min-h-[20px];
88
+ }
89
+
90
+ .vd-composer-rows-3 {
91
+ @apply min-h-[58px];
92
+ }
93
+
94
+ .vd-composer-rows-5 {
95
+ @apply min-h-[98px];
96
+ }
97
+
98
+ .vd-composer-textarea {
99
+ @apply block w-full flex-1;
100
+ min-width: 0;
101
+ @apply appearance-none border-none bg-transparent p-0 m-0 outline-none;
102
+ @apply resize-none;
103
+ @apply text-body-dense text-content-primary; /* 13 / 18 / 400 — Rev3. The
104
+ Rows floors (20/58/98) are unchanged in the re-cut, so a full row-count
105
+ now sits UNDER its floor (3 × 18 = 54 < 58) instead of half a pixel
106
+ over — the floor clamps and rows land exact. */
107
+
108
+ /* Content/Tertiary family-wide by decision (2026-09-30) — Figma's Faint
109
+ is 1.73:1 on Paper. Designer-list divergence. */
110
+ &::placeholder {
111
+ @apply text-content-tertiary;
112
+ }
113
+ }
114
+
115
+ .vd-composer-textarea:disabled {
116
+ @apply cursor-not-allowed;
117
+ }
118
+
119
+ /* --- Tags row — Tag sm chips (20) ------------------------------------- */
120
+
121
+ .vd-composer-tags {
122
+ @apply flex w-full flex-wrap items-center gap-1; /* 4px */
123
+ }
124
+
125
+ /* --- Footer — content-driven 24 from its Button sm / Icon Button sm ------ */
126
+
127
+ .vd-composer-footer {
128
+ @apply flex w-full items-center justify-between gap-2;
129
+ }
130
+
131
+ .vd-composer-actions {
132
+ @apply flex items-center gap-1; /* 4px between the Icon Buttons */
133
+ }
134
+
135
+ /* --- Helper — under the shell ------------------------------------------- */
136
+
137
+ .vd-composer-helper {
138
+ @apply flex items-center gap-1.5; /* 6px */
139
+ @apply m-0 text-supporting-caption text-content-tertiary; /* 12 (was 11) */
140
+ }
141
+
142
+ .vd-composer-error .vd-composer-helper {
143
+ @apply text-critical-strong;
144
+ }
145
+ }
@@ -16,7 +16,7 @@
16
16
  * </span>
17
17
  * <span class="vd-field-verification-label">Matches Plaid KYC</span>
18
18
  * </span>
19
- * <button class="vd-icon-button vd-icon-button-md vd-data-row-action" aria-label="Field help">
19
+ * <button class="vd-icon-button vd-icon-button-inline vd-data-row-action" aria-label="Field help">
20
20
  * <svg class="vd-icon vd-icon-size-14" aria-hidden="true"><use href="#circle-question-mark" /></svg>
21
21
  * </button>
22
22
  * </div>
@@ -95,21 +95,23 @@
95
95
 
96
96
  /* --- Columns --------------------------------------------------------- */
97
97
 
98
- /* Body 2, truncating — Figma fixes the label column and clips overflow. */
98
+ /* Rev3: Body/Dense (13/18, was Body 2 12.5/12.5), truncating — Figma fixes
99
+ the label column and clips overflow. */
99
100
  .vd-data-row-field {
100
101
  @apply w-[200px] shrink-0 truncate;
101
- @apply text-body-2 text-content-tertiary;
102
+ @apply text-body-dense text-content-tertiary;
102
103
  }
103
104
 
104
105
  .vd-data-row-value {
105
106
  @apply w-[400px] shrink-0;
106
- @apply text-body-2 text-content-primary;
107
+ @apply text-body-dense text-content-primary; /* Rev3: 13 / 18 */
107
108
  }
108
109
 
109
110
  /* Data Row overrides Sensitive Data's Caption to Body 2 so the masked value
110
111
  sits on the same baseline as the field label. See the header. */
111
112
  .vd-data-row-value .vd-sensitive-data-value {
112
- @apply text-body-2;
113
+ @apply text-body-dense; /* Rev3: Figma's Data Row still overrides the
114
+ standalone Caption — now to Body/Dense, so value and masked value match */
113
115
  }
114
116
 
115
117
  /* Additive, for the Field Verification slot — Figma stretches it. */
@@ -136,7 +138,9 @@
136
138
 
137
139
  /* Figma's Ring boolean, hidden by default — 2px Primary/Main, and the only
138
140
  ring in the library that follows a radius, since the row has one. */
141
+ /* Rev3: OUTSIDE, like the rest of the Ring family (was inset). */
139
142
  .vd-data-row.vd-with-ring {
140
- @apply ring-[length:var(--border-micro)] ring-inset ring-primary;
143
+ outline: var(--border-micro) solid var(--color-primary);
144
+ outline-offset: 0;
141
145
  }
142
146
  }
@@ -51,30 +51,25 @@
51
51
  * the border-box trap entirely — nothing in this component gains height from a
52
52
  * hairline, so no height needs pinning.
53
53
  *
54
- * NO TEXT STYLE IS BOUND ANYWHERE IN THIS COMPONENT, on either type — verified,
55
- * `get_variable_defs(880:31253)` returns only Stroke/Line, Stroke/Divider,
56
- * Content/Tertiary and Spacing/16. An earlier revision claimed the labeled type
57
- * was "byte-for-byte Label S Sans - Bold"; its VALUES match that style
58
- * (10px/12px/600/0.1em) but nothing binds it, and the distinction matters
59
- * because of the casing below.
54
+ * BEFORE REV3 NO TEXT STYLE WAS BOUND in this component (the labeled label
55
+ * only matched Label S Sans - Bold's values). Rev3 binds Label/Compact on the
56
+ * label and Supporting/Caption on the metadata row.
60
57
  *
61
58
  * CASING IS THE CONSUMER'S, and this is a deliberate reversal. The label used
62
59
  * `type-label-s-bold`, whose utility form adds `text-transform: uppercase` —
63
60
  * but Figma applies no transform: the caps are typed into the sample string,
64
61
  * whose node is literally named "BENEFICIAL OWNERS". Forcing them meant a label
65
- * passed as "Beneficial owners" came back shouted. It now uses
66
- * `text-label-s-bold`, which carries the same size, weight and tracking without
67
- * imposing case.
62
+ * passed as "Beneficial owners" came back shouted. It now uses Rev3
63
+ * `text-label-compact`, which imposes no case.
68
64
  *
69
65
  * This also settles a question the library had answered two ways: Chip left
70
66
  * casing alone for exactly this reason — typed caps and a transform are
71
67
  * indistinguishable through the API — while this component imposed it. Both now
72
68
  * leave it to the caller.
73
69
  *
74
- * THE METADATA TYPE IS ALSO RAW: keys are 12px Inter Regular and values 12px
75
- * Inter Medium, both with Auto leading, so `--text-caption` is the wrong fit
76
- * despite matching the size — its 18px line-height would make the row 18px
77
- * where Figma is 16.
70
+ * THE METADATA TYPE IS BOUND since Rev3 (it was raw, with Auto leading): keys
71
+ * Supporting/Caption, values Supporting/Caption Strong, so the row is 18px
72
+ * (it was 16).
78
73
  *
79
74
  * MONO IS A CALL-SITE CHOICE. Figma's sample renders its date value in JetBrains
80
75
  * Mono Medium while the other two values are Inter Medium. That is an instance
@@ -103,12 +98,11 @@
103
98
  min-width: 0;
104
99
  }
105
100
 
106
- /* Matches Label S Sans - Bold's VALUES; Figma binds no style — see the header.
107
- `text-label-s-bold`, not `type-label-s-bold`: the utility form adds
108
- `text-transform: uppercase`, which Figma does not apply. */
101
+ /* Bound to Label/Compact since Rev3; no text-transform, which Figma does not
102
+ apply either — see the header. */
109
103
  .vd-divider-label {
110
104
  @apply shrink-0;
111
- @apply text-label-s-bold; /* 10px / 12px / 600 / 0.1em */
105
+ @apply text-label-compact; /* Rev3 Label/Compact: 12 / 16 / 600 / 0.08em — bound now, still no transform */
112
106
  @apply text-content-tertiary;
113
107
  }
114
108
 
@@ -122,16 +116,17 @@
122
116
  @apply inline-flex shrink-0 items-center gap-1.5; /* 6px */
123
117
  }
124
118
 
125
- /* Raw 12px type with Auto leading — see the header on why not --text-caption. */
119
+ /* Rev3 binds the metadata type (it was raw 12px with Auto leading, a 16px
120
+ row): key Supporting/Caption, value Supporting/Caption Strong — an 18px
121
+ row now. The mono date is Data/Compact at the call site (font-mono +
122
+ text-data-compact), as before an instance choice, not a rule. */
126
123
  .vd-divider-metadata-key {
127
- @apply text-[12px] font-normal;
128
- @apply leading-[normal]; /* Figma Auto — NOT Tailwind's leading-normal (1.5) */
124
+ @apply text-supporting-caption; /* 12 / 18 / 400 */
129
125
  @apply text-content-tertiary;
130
126
  }
131
127
 
132
128
  .vd-divider-metadata-value {
133
- @apply text-[12px] font-medium;
134
- @apply leading-[normal];
129
+ @apply text-supporting-caption-strong; /* 12 / 18 / 500 */
135
130
  @apply text-content-primary;
136
131
  }
137
132