@valiify/dashboard-ui 0.3.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/CHANGELOG.md +933 -10
  2. package/COMPONENTS.md +185 -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 +140 -71
  8. package/design-methodology/dashboard.md +92 -80
  9. package/dist/dashboard-ui.css +1525 -1078
  10. package/dist/index.css +1246 -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 +108 -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 +142 -24
  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,10 +1,27 @@
1
1
  /**
2
- * Dropdown Field Component
2
+ * Dropdown Field Component — Figma Dropdown Field 854:24966 (was Dropdown Field Container)
3
3
  *
4
4
  * Dropdown select field for choosing from a list of options. Supports avatar
5
- * and left icon, with interaction states across 3 sizes.
6
- * Extracted from Figma Dropdown Field Container (854:24966) — 36 variants
7
- * (state × filled × size × error).
5
+ * (a Figma boolean since 2026-09-24) and left icon, with interaction states
6
+ * across five sizes — 120 variants (state x filled x size x error x BG). The
7
+ * old Dropdown set 81:155 was deleted; its instances live here now.
8
+ *
9
+ * HEIGHTS ARE THE CONTROL LADDER. Figma binds Height/Control/XS..XL on the
10
+ * Input Row of every variant: xs 20 / sm 24 / md 28 / lg 32 / xl 40, applied
11
+ * as `h-control-*`. Vertical padding is 0 — the box is the token and
12
+ * `items-center` centres the row. Before this the ladder was 25 / 29 / 35 with
13
+ * per-size padding-y, matching Input's old values and sharing its defect
14
+ * against Button. Horizontal padding per Figma: 6 / 8 / 12 / 12 / 16; gap 6 at
15
+ * xs–sm, 8 from md up.
16
+ *
17
+ * BASE = md. The bare `.vd-dropdown-field` was lg (35); it now renders md
18
+ * (28), the library-wide convention. md's text is Body 2 (12.5 / 12.5), a
19
+ * style this family alone uses at that step; xs–sm are Micro L, lg–xl Body 1.
20
+ *
21
+ * AVATAR SLOT — a Figma boolean now, sized per step at the call site, the
22
+ * same way icon sizes are picked: `.vd-avatar-sm` (16) at xs–lg and
23
+ * `.vd-avatar-md` (20) at xl. The chevron and leading icon are 14px at every
24
+ * size except xs, where the chevron is 12 and there is no leading icon.
8
25
  *
9
26
  * Structure — mirrors the Input component:
10
27
  * <div class="vd-dropdown-field-container">
@@ -31,15 +48,13 @@
31
48
  * focus ring and rotates the chevron 180°. Toggling the attribute (and the
32
49
  * panel's `hidden`) is the consumer's job — this library ships no JavaScript.
33
50
  *
34
- * Heights are 35 / 29 / 25px (lg / md / sm), matching Input exactly so the two
35
- * field types line up in a form row.
51
+ * Heights are pinned with `height`, not `min-height`: Chrome rounds the 0.5px
52
+ * `--border-thin` hairline up to a full 1px and ADDS it to the box, and every
53
+ * bound frame has strokesIncludedInLayout=false, so the token is the border-box
54
+ * height. Same precedent as button.css and input.css.
36
55
  *
37
- * They are pinned with an explicit `height`, not `min-height`, for two reasons:
38
- * the sm line box comes from an Auto line height (font-dependent — see
39
- * CLAUDE.md), and Chrome rounds the 0.5px `--border-thin` hairline up to a
40
- * full 1px, which would otherwise push every field 1-2px past its Figma frame.
41
- * Figma draws its stroke inside the frame, so the border must not add height.
42
- * This follows the same precedent as button.css.
56
+ * Figma inconsistency, noted not reproduced: at lg and xl the flex/padding/gap
57
+ * sit on an unnamed wrapper one level below the Input Row.
43
58
  */
44
59
 
45
60
  @layer components {
@@ -53,7 +68,8 @@
53
68
 
54
69
  .vd-dropdown-field-label {
55
70
  @apply flex w-full items-center pb-1.5; /* 6px */
56
- @apply text-[10px] font-semibold uppercase leading-[12px] tracking-[1px];
71
+ /* Label/Compact — 12/16/600, MIXED CASE since Rev3 (see input.css). */
72
+ @apply text-label-compact;
57
73
  @apply text-content-tertiary;
58
74
  }
59
75
 
@@ -63,13 +79,12 @@
63
79
 
64
80
  /* Note: help button uses .vd-icon-button .vd-icon-button-xs from icon-button.css */
65
81
 
66
- /* --- Trigger (defaults to lg) --------------------------------------- */
82
+ /* --- Trigger (defaults to md) --------------------------------------- */
67
83
 
68
84
  .vd-dropdown-field {
69
- /* Layout */
70
- @apply flex w-full items-center gap-2; /* 8px */
71
- @apply px-3 py-1.75; /* 12px / 7px */
72
- @apply h-[35px];
85
+ /* Layout — md: Height/Control/MD, 12px padding-x, 8px gap, no padding-y */
86
+ @apply flex w-full items-center gap-2;
87
+ @apply h-control-md px-3;
73
88
 
74
89
  /* Shape */
75
90
  @apply rounded-control; /* 6px */
@@ -81,8 +96,8 @@
81
96
  /* Colors */
82
97
  @apply bg-surface-paper;
83
98
 
84
- /* Type */
85
- @apply text-body-1; /* 13px / 19.5px / 400 */
99
+ /* Type — Body/Dense (13/18) since Rev3; the old Body 2 step is gone */
100
+ @apply text-body-dense;
86
101
 
87
102
  /* Interaction */
88
103
  @apply cursor-pointer transition-colors duration-150;
@@ -96,13 +111,15 @@
96
111
  min-width: 0;
97
112
  }
98
113
 
99
- /* Nothing chosen yet */
114
+ /* Nothing chosen yet — Content/Tertiary family-wide by decision
115
+ (2026-09-30): Figma draws Faint here, 1.73:1 on Paper. Designer-list
116
+ divergence. */
100
117
  .vd-dropdown-field-placeholder {
101
- @apply flex-1 truncate text-content-faint;
118
+ @apply flex-1 truncate text-content-tertiary;
102
119
  min-width: 0;
103
120
  }
104
121
 
105
- /* Leading icon and trailing chevron — 14px at every size */
122
+ /* Leading icon and trailing chevron — 14px at every size (chevron 12 at xs) */
106
123
  .vd-dropdown-field-icon,
107
124
  .vd-dropdown-field-chevron {
108
125
  @apply shrink-0 text-content-secondary;
@@ -113,29 +130,37 @@
113
130
  }
114
131
 
115
132
  /* --- Sizes ----------------------------------------------------------- */
133
+ /* One Height/Control step each; padding-y is 0 everywhere. */
134
+
135
+ .vd-dropdown-field-xs {
136
+ @apply h-control-xs gap-1.5 px-1.5; /* 20px, 6px gap, 6px */
137
+ @apply text-supporting-caption; /* 12 / 18 / 400 (was Micro L 11) */
138
+ }
116
139
 
117
140
  .vd-dropdown-field-sm {
118
- @apply gap-1.5 px-2 py-1.25; /* 6px / 8px / 5px */
119
- @apply h-[25px];
120
- @apply text-micro-l; /* 11px / normal / 400 */
141
+ @apply h-control-sm gap-1.5 px-2; /* 24px, 6px gap, 8px */
142
+ @apply text-supporting-caption; /* 12 / 18 / 400 (was Micro L 11) */
121
143
  }
122
144
 
145
+ /* Identical to the bare base — md IS the default. */
123
146
  .vd-dropdown-field-md {
124
- @apply gap-2 px-3 py-1.75; /* 8px / 12px / 7px */
125
- @apply h-[29px];
126
- @apply text-body-2; /* 12.5px / 12.5px / 400 */
147
+ @apply h-control-md gap-2 px-3; /* 28px, 8px gap, 12px */
148
+ @apply text-body-dense; /* 13 / 18 / 400 — Rev3, was Body 2 12.5 */
127
149
  }
128
150
 
129
151
  .vd-dropdown-field-lg {
130
- @apply gap-2 px-3 py-1.75; /* same as default */
131
- @apply h-[35px];
132
- @apply text-body-1;
152
+ @apply h-control-lg gap-2 px-3; /* 32px, 8px gap, 12px — equals .vd-btn-lg / .vd-input-lg */
153
+ @apply text-body-dense; /* 13 / 18 / 400 */
154
+ }
155
+
156
+ .vd-dropdown-field-xl {
157
+ @apply h-control-xl gap-2 px-4; /* 40px, 8px gap, 16px */
158
+ @apply text-body-dense;
133
159
  }
134
160
 
135
161
  /* --- Background Variants ---------------------------------------------- */
136
- /* Matches Input and Textarea. The Dropdown Field Container in Figma has no
137
- BG property yet — this mirrors the Text Input Container's White/Neutral
138
- pair so the three field types stay interchangeable in a form. */
162
+ /* Matches Input and Textarea — Dropdown Field's BG axis mirrors Input Field's
163
+ White/Neutral pair so the three field types stay interchangeable in a form. */
139
164
 
140
165
  .vd-dropdown-field-bg-neutral {
141
166
  @apply bg-surface-card; /* Surface/Card #fafafb */
@@ -143,7 +168,11 @@
143
168
 
144
169
  /* --- States ---------------------------------------------------------- */
145
170
 
146
- .vd-dropdown-field:hover:not(:disabled):not([aria-disabled="true"]) {
171
+ /* Hover and the open/focused hairline exclude the error state BY NAME: their
172
+ :not() guards give them specificity (0,4,0), above the (0,2,0) error rule,
173
+ so without the exclusion a field in error turns grey on hover and blue on
174
+ focus, the states a user is in while fixing it. */
175
+ .vd-dropdown-field:hover:not(:disabled):not([aria-disabled="true"]):not(.vd-dropdown-field-error) {
147
176
  @apply border-stroke-border;
148
177
  }
149
178
 
@@ -151,15 +180,20 @@
151
180
  @apply focus-ring;
152
181
  }
153
182
 
154
- /* Error — red hairline. The open ring deliberately wins over it, matching
155
- the active + error variants in Figma. */
156
- .vd-dropdown-field.vd-dropdown-field-error {
157
- @apply border-critical;
183
+ /* Open / focused — Rev3's active state is the 0.5px hairline recoloured to
184
+ Primary/Main, not the 2px ring; the ring stays on :focus-visible above
185
+ for keyboard tab-through (requester decision 2026-09-30). */
186
+ .vd-dropdown-field:focus-within:not(:disabled):not([aria-disabled="true"]):not(.vd-dropdown-field-error),
187
+ .vd-dropdown-field[aria-expanded="true"]:not(.vd-dropdown-field-error) {
188
+ @apply border-primary;
158
189
  }
159
190
 
160
- /* Open */
161
- .vd-dropdown-field[aria-expanded="true"] {
162
- @apply focus-ring;
191
+ /* Error — red hairline. REV3 INVERTED THE PRECEDENCE: error now beats the
192
+ open/active hairline (Figma's active+error variants keep Critical/Main);
193
+ the old set let the open ring win. The hover and open/focused rules above
194
+ exclude this state by name, so nothing outranks it whatever the guards. */
195
+ .vd-dropdown-field.vd-dropdown-field-error {
196
+ @apply border-critical;
163
197
  }
164
198
 
165
199
  .vd-dropdown-field[aria-expanded="true"] .vd-dropdown-field-chevron {
@@ -175,6 +209,12 @@
175
209
  @apply cursor-not-allowed bg-action-subtle;
176
210
  }
177
211
 
212
+ /* Rev3 Neutral-BG disabled pair. */
213
+ .vd-dropdown-field-bg-neutral:disabled,
214
+ .vd-dropdown-field-bg-neutral[aria-disabled="true"] {
215
+ @apply bg-surface-neutral;
216
+ }
217
+
178
218
  /* --- Error Message ---------------------------------------------------- */
179
219
 
180
220
  .vd-dropdown-field-error-message {
@@ -1,20 +1,49 @@
1
1
  /**
2
- * Dropdown Menu Component
2
+ * Dropdown Menu Component — Figma Dropdown Menu 139:798 (rebuilt 2026-09-24)
3
3
  *
4
- * Dropdown menu panel containing a vertical list of menu rows. Use as the
5
- * overlay panel for dropdown triggers.
6
- * Extracted from Figma Dropdown Menu (139:798).
4
+ * Dropdown menu panel containing a vertical list of Menu Item rows, with
5
+ * optional Search, Header and Footer regions and dividers between them. Use as
6
+ * the overlay panel for dropdown triggers. Internal sets: _Menu Header
7
+ * 1306:34968, _Menu Divider 1306:34966. Figma places six usage examples beside
8
+ * the symbol (Actions Menu, People Picker, Reason List, Applicant Switcher,
9
+ * Submenu, and a base instance) — they are compositions, not variants.
7
10
  *
8
11
  * Pairs with the Menu Item component — rows stretch to the panel width on
9
- * their own, so no extra width class is needed on each row.
12
+ * their own, so no extra width class is needed on each row. The rows carry
13
+ * the control ladder (min-height floors); the panel itself is Hug and inherits
14
+ * Height/Control/MD only through them.
15
+ *
16
+ * REGIONS, top to bottom as Figma draws them. The panel has no gap of its own —
17
+ * each region carries its own height and padding, and the divider (4 + 1 + 4)
18
+ * is the only spacing between regions:
19
+ *
20
+ * .vd-dropdown-menu-search a Search Field row: 24px (Input Row), 8px
21
+ * padding-x, 14px search glyph, Micro L
22
+ * placeholder in Content/Faint. Pair the markup
23
+ * with .vd-input-field.vd-input-search.vd-input-sm.
24
+ * .vd-dropdown-menu-divider 9px frame — a 1px Stroke/Divider rule with 4px
25
+ * above and below. Was "not in Figma yet"; it is
26
+ * now (_Menu Divider).
27
+ * .vd-dropdown-menu-header 28px row, 12px padding-x, 8px top / 4px bottom (Rev3: grew from 24 with the Label/Compact line)
28
+ * (asymmetric in Figma), Label S Sans - Bold in
29
+ * Content/Tertiary, uppercase typed in the sample.
30
+ * .vd-dropdown-menu-footer 26px row, 12px / 4px, a single Caption link in
31
+ * Primary/Main — a raw text node in Figma, not a
32
+ * Text Button instance.
10
33
  *
11
34
  * Structure:
12
35
  * <div class="vd-dropdown-menu" role="menu">
13
- * <button class="vd-menu-item" role="menuitem">…</button>
36
+ * <div class="vd-dropdown-menu-search">…Search Field sm…</div>
14
37
  * <div class="vd-dropdown-menu-divider"></div>
38
+ * <div class="vd-dropdown-menu-header"><span class="vd-dropdown-menu-header-label">Select reason</span></div>
15
39
  * <button class="vd-menu-item" role="menuitem">…</button>
40
+ * <div class="vd-dropdown-menu-divider"></div>
41
+ * <a class="vd-dropdown-menu-footer" href="…">View all applicants</a>
16
42
  * </div>
17
43
  *
44
+ * Width: the symbol is a fixed 205 and every example renders 200 from its
45
+ * parent — read as hug with a ~200px minimum, which is what shipped already.
46
+ *
18
47
  * Positioning is the consumer's job — this component only styles the panel.
19
48
  */
20
49
 
@@ -22,31 +51,68 @@
22
51
  .vd-dropdown-menu {
23
52
  /* Layout */
24
53
  @apply flex flex-col items-start;
25
- @apply p-1; /* 4px */
54
+ @apply p-1; /* 4px — Spacing/4 */
26
55
  @apply min-w-[200px];
27
56
 
28
57
  /* Shape */
29
- @apply rounded-surface; /* 8px */
58
+ @apply rounded-surface; /* 8px — Radius/MD */
30
59
  @apply border border-[length:var(--border-thin)] border-stroke-divider;
31
60
 
32
61
  /* Colors */
33
62
  @apply bg-surface-paper;
34
63
 
35
- /* Elevation */
64
+ /* Elevation — General Drop Shadow */
36
65
  @apply shadow-panel;
37
66
  }
38
67
 
39
- /* --- Parts ---------------------------------------------------------- */
68
+ /* --- Regions -------------------------------------------------------- */
40
69
 
41
- /* NOT in Figma yet — composed from existing tokens for grouped menus.
42
- Confirm the treatment with the designer before relying on it. */
43
- /* `border-[length:…]` sets ALL four sides, so it cannot be combined with
44
- `border-t` — the side-specific `border-t-[length:…]` is required here. */
70
+ /* Search row — hosts a .vd-input-field.vd-input-search.vd-input-sm (24px). */
71
+ .vd-dropdown-menu-search {
72
+ @apply w-full;
73
+ }
74
+
75
+ /* _Menu Divider 1306:34966 — a 1px rule with 4px above and below (9px).
76
+ `border-[length:…]` sets ALL four sides, so it cannot be combined with
77
+ `border-t` — the side-specific `border-t-[length:…]` is required here.
78
+ Chrome rounds the hairline to 1px, which is what Figma draws anyway. */
45
79
  .vd-dropdown-menu-divider {
46
80
  @apply my-1 w-full;
47
81
  @apply border-t border-t-[length:var(--border-thin)] border-stroke-divider;
48
82
  }
49
83
 
84
+ /* _Menu Header 1306:34968 — 28px since Rev3, content-driven: 8 + the 16px
85
+ Label/Compact line box + 4 (was 24 on the 12px Label S line). A raw region
86
+ height in Figma (no Height/Control binding), so it is deliberately not
87
+ pinned — panels grow 4px with it. */
88
+ .vd-dropdown-menu-header {
89
+ @apply flex w-full items-center;
90
+ @apply px-3 pt-2 pb-1;
91
+ }
92
+
93
+ .vd-dropdown-menu-header-label {
94
+ /* Label/Compact — 12/16/600/0.08em, MIXED CASE since Rev3: the uppercase
95
+ died with Label S; sample strings carry their own casing. */
96
+ @apply text-label-compact text-content-tertiary;
97
+ }
98
+
99
+ /* Footer — a Caption link in Primary/Main; 26px, 12px / 4px. Figma draws a
100
+ raw text node here, not a Text Button, so it is its own part. */
101
+ .vd-dropdown-menu-footer {
102
+ @apply flex w-full items-center;
103
+ @apply px-3 py-1;
104
+ @apply text-supporting-caption text-primary no-underline; /* 12 / 18 / 400 — Rev3 name for the same values */
105
+ @apply cursor-pointer;
106
+ }
107
+
108
+ .vd-dropdown-menu-footer:hover {
109
+ @apply text-primary-dark;
110
+ }
111
+
112
+ .vd-dropdown-menu-footer:focus-visible {
113
+ @apply focus-ring;
114
+ }
115
+
50
116
  /* --- Positioning helpers --------------------------------------------- */
51
117
  /* Wrap a trigger (Button, DropdownField, …) and a panel to anchor the menu
52
118
  below the trigger. The library ships no JavaScript — open and close by
@@ -79,7 +79,10 @@
79
79
 
80
80
  @layer components {
81
81
  .vd-field-verification {
82
- @apply inline-flex items-center gap-1.75; /* 7px */
82
+ /* Rev3: a 24px row — 2 + Body/Default's 20px line + 2 (was ~18). Fits a
83
+ 38px Data Row with 7px clearance either side, exactly where Figma
84
+ places it (measured 2026-10-01). */
85
+ @apply inline-flex items-center gap-1.75 py-0.5; /* 7px, 2px */
83
86
  }
84
87
 
85
88
  /* The stacked variant tops-aligns its icon; the one-line rows centre theirs. */
@@ -98,7 +101,7 @@
98
101
  }
99
102
 
100
103
  .vd-field-verification-label {
101
- @apply text-caption; /* 12px / 18px / 400 */
104
+ @apply text-body-default; /* Rev3: 14 / 20 / 400 — grew from the 12px Caption */
102
105
  }
103
106
 
104
107
  /* --- Expanded (State=mismatch - details) -------------------------------- */
@@ -110,14 +113,14 @@
110
113
 
111
114
  /* Data/Data xs needs font-mono — --text-* carries no family. See CLAUDE.md. */
112
115
  .vd-field-verification-detail {
113
- @apply text-data-xs font-mono; /* 12px / 16.5px / 400, JetBrains Mono */
116
+ @apply text-data-compact font-mono; /* Rev3 Data/Compact: 12 / 16.5 / 400 — same metrics */
114
117
  @apply text-content-secondary;
115
118
  }
116
119
 
117
120
  /* Plain text plus an arrow, not a Text Button instance. See the header. */
118
121
  .vd-field-verification-action {
119
122
  @apply inline-flex items-center gap-1.75; /* 7px */
120
- @apply text-caption; /* 12px / 18px / 400 */
123
+ @apply text-action-compact; /* Rev3: 12 / 16 / 500 (was the 12/18/400 Caption) */
121
124
  @apply cursor-pointer;
122
125
  }
123
126
 
@@ -140,6 +143,17 @@
140
143
  @apply text-content-tertiary;
141
144
  }
142
145
 
146
+ /* none carries only the 16px marker; Figma pads it 1px (an 18px frame),
147
+ not the label rows' 2px. */
148
+ .vd-field-verification-none {
149
+ @apply py-0.25;
150
+ }
151
+
152
+ /* The expanded panel tops-aligns its own stack — no row padding. */
153
+ .vd-field-verification:has(.vd-field-verification-details) {
154
+ @apply py-0;
155
+ }
156
+
143
157
  /* mismatch: Critical/Main throughout, except the mono detail line, which
144
158
  stays Content/Secondary. */
145
159
  .vd-field-verification-mismatch {
@@ -150,7 +164,9 @@
150
164
 
151
165
  /* Figma boolean, hidden by default. Square, as on Section Marker — this box
152
166
  has no radius either. */
167
+ /* Rev3 draws Figma's Ring 2px Primary/Main OUTSIDE (was inset). */
153
168
  .vd-field-verification.vd-with-ring {
154
- @apply ring-[length:var(--border-micro)] ring-inset ring-primary;
169
+ outline: var(--border-micro) solid var(--color-primary);
170
+ outline-offset: 0;
155
171
  }
156
172
  }
@@ -11,7 +11,7 @@
11
11
  * <button class="vd-filter-segment">Is any of</button>
12
12
  * <button class="vd-filter-segment">Deposit Account</button>
13
13
  * <span class="vd-filter-segment vd-filter-segment-last">
14
- * <button class="vd-icon-button vd-icon-button-md" aria-label="Remove filter">
14
+ * <button class="vd-icon-button vd-icon-button-inline" aria-label="Remove filter">
15
15
  * <svg class="vd-icon vd-icon-size-14" aria-hidden="true"><use href="#x" /></svg>
16
16
  * </button>
17
17
  * </span>
@@ -65,17 +65,26 @@
65
65
  * NOT ENCODED — the Figma example (1018:33960) expresses "label vs value"
66
66
  * through instance overrides on the text, not through the component's states:
67
67
  * its operator reads `Content/Secondary` while its values read `Content/Primary`
68
- * and the chosen one steps to `Micro L - Bold`. All three keep the REST
68
+ * and the chosen one stepped to `Micro L - Bold` — Rev3 deleted the example, so
69
+ * the story now steps it to `Action/Compact Active` (600, a decision —
70
+ * designer-list item 52). All three keep the REST
69
71
  * background. That is a usage pattern, so it lives in the story rather than in
70
72
  * a class.
73
+ *
74
+ * HEIGHTS ARE THE CONTROL LADDER (2026-09-24). Figma binds Height/Control/XS
75
+ * to Size=sm (20px, was 21) and Height/Control/MD to Size=md (28px), applied
76
+ * as `h-control-xs` / `h-control-md`. Vertical padding is 0 — the box is the
77
+ * token and `items-center` centres the label. sm is the base and now has an
78
+ * explicit `.vd-filter-segment-sm` too. sm sits below WCAG 2.5.8's 24px by
79
+ * decision; recorded as debt in docs/handoff-report.md §4a.
71
80
  */
72
81
 
73
82
  @layer components {
74
83
  .vd-filter-segment {
75
84
  /* Layout */
76
85
  @apply inline-flex shrink-0 items-center justify-center gap-2.5; /* 10px */
77
- @apply px-2 py-1; /* 8px / 4px */
78
- @apply h-[21px]; /* sm — pinned, see the header */
86
+ @apply px-2; /* 8px; no padding-y — the box is the token */
87
+ @apply h-control-xs; /* sm = Height/Control/XS, 20px — see the header */
79
88
 
80
89
  /* Borders. Side-specific widths need the side-specific length utility, or
81
90
  `border-[length:…]` silently sets all four — see CLAUDE.md. Left is
@@ -91,7 +100,7 @@
91
100
  @apply bg-surface-card text-content-secondary;
92
101
 
93
102
  /* Type */
94
- @apply text-micro-l; /* 11px / 400 / Auto */
103
+ @apply text-action-compact; /* 11px / 400 / Auto */
95
104
 
96
105
  /* Interaction */
97
106
  @apply cursor-pointer transition-colors duration-150;
@@ -111,10 +120,18 @@
111
120
  }
112
121
 
113
122
  /* --- Size --------------------------------------------------------------- */
123
+ /* Two Height/Control steps. Padding-x, gap and type are identical across
124
+ them — md is only a taller box, and padding-y is 0 on both (the old md
125
+ kept sm's 4px padding-y as pure slack). */
126
+
127
+ /* Identical to the bare base — sm IS the default. Exists so the size can be
128
+ named at the call site. */
129
+ .vd-filter-segment-sm {
130
+ @apply h-control-xs; /* 20px */
131
+ }
114
132
 
115
- /* Padding, gap and type are identical to sm — md is only a taller box. */
116
133
  .vd-filter-segment-md {
117
- @apply h-[28px];
134
+ @apply h-control-md; /* 28px */
118
135
  }
119
136
 
120
137
  /* --- States ------------------------------------------------------------- */
@@ -148,8 +165,10 @@
148
165
  three sides, 0 on the left) to sit over the borders each position actually
149
166
  draws; a plain inset ring is within half a pixel and cannot overflow the
150
167
  layout, the same normalisation Avatar documents. */
168
+ /* Rev3: OUTSIDE, like the rest of the Ring family (was inset). */
151
169
  .vd-filter-segment.vd-with-ring {
152
- @apply ring-[length:var(--border-micro)] ring-inset ring-primary;
170
+ outline: var(--border-micro) solid var(--color-primary);
171
+ outline-offset: 0;
153
172
  }
154
173
 
155
174
  /* --- Group -------------------------------------------------------------- */
@@ -1,12 +1,31 @@
1
1
  /**
2
- * Icon Button Component
2
+ * Icon Button Component — Figma 78:210
3
3
  *
4
4
  * Compact button displaying only an icon. Use for toolbar actions, close buttons,
5
- * and secondary actions where space is limited. Extracted from Figma (78:210).
5
+ * and secondary actions where space is limited. 24 variants across Size
6
+ * (xs / inline / sm / md / lg / xl) x State.
7
+ *
8
+ * SIZES ARE THE CONTROL LADDER FROM sm UP. Figma binds Height/Control/SM..XL on
9
+ * both width and height of sm / md / lg / xl (24 / 28 / 32 / 40); xs (12) and
10
+ * inline (18) are raw and stay below the scale — inline marks, not row controls.
11
+ * The glyph pairs 12 / 14 / 14 / 16 / 18 / 20. Padding is not a lever here: the
12
+ * box is the token and the glyph is centred, so the sizes carry no padding
13
+ * (Figma authors Spacing/6 on xs and inline — on all four sides of a box that
14
+ * cannot contain it — reproduced as drawn: no padding).
15
+ *
16
+ * RENAMED 2026-09-24, a hard break recorded in CHANGELOG 0.4.0:
17
+ * .vd-icon-button-md WAS 18px -> is now 28px (the MD step)
18
+ * .vd-icon-button-lg WAS 28px -> is now 32px (the LG step)
19
+ * .vd-icon-button-inline is the 18px size (Figma's own name for it)
20
+ * No alias was possible: both old names are reused with new meanings. Codemod:
21
+ * vd-icon-button-md -> vd-icon-button-inline, then vd-icon-button-lg -> vd-icon-button-md.
22
+ * The bare .vd-icon-button still renders 28px — it re-points from the old lg to
23
+ * the new md, so nothing that used the base resizes. Base = md is the
24
+ * library-wide convention.
6
25
  *
7
26
  * Usage:
8
- * <button class="vd-icon-button vd-icon-button-xs" aria-label="Close">
9
- * <svg class="vd-icon vd-icon-size-12" aria-hidden="true">
27
+ * <button class="vd-icon-button vd-icon-button-inline" aria-label="Close">
28
+ * <svg class="vd-icon vd-icon-size-14" aria-hidden="true">
10
29
  * <use href="#x" />
11
30
  * </svg>
12
31
  * </button>
@@ -33,22 +52,38 @@
33
52
  @apply cursor-pointer;
34
53
  @apply transition-colors duration-150;
35
54
 
36
- /* Default size: Large (28×28px with 6px padding) */
37
- @apply size-7 p-1.5; /* 28px, 6px padding */
55
+ /* Default size: md — 28x28, Height/Control/MD on both axes. Tailwind's
56
+ size-* reads --size-*, not --height-*, so the square is h-control-*
57
+ plus aspect-square. No padding: the glyph is centred in the token box. */
58
+ @apply h-control-md aspect-square p-0;
38
59
  }
39
60
 
40
61
  /* --- Size Variants -------------------------------------------------- */
41
62
 
63
+ /* Below the scale — inline marks, unbound in Figma. */
42
64
  .vd-icon-button-xs {
43
- @apply size-3 p-0; /* 12×12px, no padding (icon fills button) */
65
+ @apply size-3 p-0; /* 12x12, 12px glyph */
66
+ }
67
+
68
+ .vd-icon-button-inline {
69
+ @apply size-[18px] p-0; /* 18x18, 14px glyph — the dismiss in Alert, Toast, Data Row, Sensitive Data */
70
+ }
71
+
72
+ /* On the scale — one Height/Control step each, square. */
73
+ .vd-icon-button-sm {
74
+ @apply h-control-sm aspect-square; /* 24, 14px glyph */
44
75
  }
45
76
 
46
77
  .vd-icon-button-md {
47
- @apply size-[18px] p-0.5; /* 18×18px, 2px padding */
78
+ @apply h-control-md aspect-square; /* 28, 16px glyph — the base */
48
79
  }
49
80
 
50
81
  .vd-icon-button-lg {
51
- @apply size-7 p-1.5; /* 28×28px, 6px padding (same as default) */
82
+ @apply h-control-lg aspect-square; /* 32, 18px glyph */
83
+ }
84
+
85
+ .vd-icon-button-xl {
86
+ @apply h-control-xl aspect-square; /* 40, 20px glyph */
52
87
  }
53
88
 
54
89
  /* --- States --------------------------------------------------------- */
@@ -77,7 +112,11 @@
77
112
  }
78
113
 
79
114
  /* Optional ring state (for selected/active state) */
115
+ /* Rev3 draws the Ring 2px Primary/Main OUTSIDE — the outline form the
116
+ whole family uses now (the box-shadow ring could be clipped by an
117
+ overflow-hidden host; outline cannot). */
80
118
  .vd-icon-button.vd-icon-ring {
81
- @apply ring-2 ring-primary;
119
+ outline: var(--border-micro) solid var(--color-primary);
120
+ outline-offset: 0;
82
121
  }
83
122
  }
@@ -12,6 +12,7 @@
12
12
  @import "./card.css";
13
13
  @import "./checkbox.css";
14
14
  @import "./chip.css";
15
+ @import "./composer.css";
15
16
  @import "./data-row.css";
16
17
  @import "./divider.css";
17
18
  @import "./dropdown-field.css";
@@ -32,6 +33,7 @@
32
33
  @import "./pill.css";
33
34
  @import "./progress-bar.css";
34
35
  @import "./radio-select.css";
36
+ @import "./recipient-input.css";
35
37
  @import "./section-marker.css";
36
38
  @import "./segment-selector.css";
37
39
  @import "./sensitive-data.css";