@valiify/dashboard-ui 0.2.1 → 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.
- package/CHANGELOG.md +1025 -12
- package/COMPONENTS.md +185 -79
- package/GETTING_STARTED.md +138 -38
- package/QUICK_REFERENCE.md +48 -30
- package/README.md +134 -83
- package/TROUBLESHOOTING.md +52 -34
- package/class-manifest.json +140 -71
- package/design-methodology/dashboard.md +92 -80
- package/dist/dashboard-ui.css +1525 -1078
- package/dist/index.css +1246 -732
- package/package.json +19 -10
- package/scripts/codemods/0.5.0-chip-sizes.mjs +437 -0
- package/src/build/utilities.css +7 -10
- package/src/components/_template.css +12 -8
- package/src/components/alert.css +35 -8
- package/src/components/avatar.css +42 -30
- package/src/components/breadcrumbs.css +39 -22
- package/src/components/button.css +84 -14
- package/src/components/card.css +2 -2
- package/src/components/checkbox.css +16 -11
- package/src/components/chip.css +155 -79
- package/src/components/composer.css +145 -0
- package/src/components/data-row.css +10 -6
- package/src/components/divider.css +17 -22
- package/src/components/dropdown-field.css +83 -43
- package/src/components/dropdown-menu.css +80 -14
- package/src/components/field-verification.css +21 -5
- package/src/components/filter-segment.css +27 -8
- package/src/components/icon-button.css +49 -10
- package/src/components/index.css +2 -0
- package/src/components/input.css +88 -32
- package/src/components/link.css +27 -16
- package/src/components/loading-inline.css +15 -21
- package/src/components/menu-item.css +149 -49
- package/src/components/modal.css +8 -5
- package/src/components/navigation-rail.css +67 -31
- package/src/components/pagination-item.css +29 -28
- package/src/components/pagination.css +9 -14
- package/src/components/pill.css +16 -10
- package/src/components/progress-bar.css +8 -10
- package/src/components/radio-select.css +9 -2
- package/src/components/recipient-input.css +119 -0
- package/src/components/section-marker.css +5 -5
- package/src/components/segment-selector.css +9 -3
- package/src/components/sensitive-data.css +7 -5
- package/src/components/skeleton.css +18 -6
- package/src/components/step.css +15 -4
- package/src/components/stepper.css +3 -2
- package/src/components/switch.css +7 -0
- package/src/components/tabs.css +108 -28
- package/src/components/tag.css +156 -51
- package/src/components/text-button.css +54 -59
- package/src/components/textarea.css +87 -22
- package/src/components/toast.css +41 -15
- package/src/components/tooltip.css +13 -2
- package/src/fonts.css +2 -1
- package/src/library.css +1 -1
- package/src/reset.css +213 -0
- package/src/themes/valiify-tokens.css +101 -126
- package/src/themes/valiify.css +258 -157
- package/src/utility-surface.css +51 -49
- package/types/components.d.ts +142 -24
- package/CLAUDE.md +0 -3694
- package/examples/README.md +0 -198
- package/examples/basic/index.html +0 -155
- package/examples/daisyui-starter/README.md +0 -58
- package/examples/daisyui-starter/check-no-bleed.mjs +0 -249
- package/examples/daisyui-starter/index.html +0 -72
- package/examples/daisyui-starter/linked.html +0 -74
- package/examples/daisyui-starter/package-lock.json +0 -2221
- package/examples/daisyui-starter/package.json +0 -22
- package/examples/daisyui-starter/postcss.config.js +0 -1
- package/examples/daisyui-starter/src/host.css +0 -14
- package/examples/daisyui-starter/src/only-import.css +0 -4
- package/examples/daisyui-starter/src/styles.css +0 -36
- package/examples/daisyui-starter/tailwind.config.js +0 -13
- package/examples/postcss-starter/README.md +0 -47
- package/examples/postcss-starter/index.html +0 -54
- package/examples/postcss-starter/package.json +0 -19
- package/examples/postcss-starter/postcss.config.js +0 -5
- package/examples/postcss-starter/src/styles.css +0 -17
- package/examples/sveltekit-starter/README.md +0 -32
- package/examples/sveltekit-starter/check-scoped-styles.mjs +0 -103
- package/examples/sveltekit-starter/package-lock.json +0 -1300
- package/examples/sveltekit-starter/package.json +0 -24
- package/examples/sveltekit-starter/src/app.css +0 -17
- package/examples/sveltekit-starter/src/app.html +0 -11
- package/examples/sveltekit-starter/src/lib/GlobalReset.svelte +0 -20
- package/examples/sveltekit-starter/src/lib/ScopedRemedy.svelte +0 -27
- package/examples/sveltekit-starter/src/lib/ScopedReset.svelte +0 -22
- package/examples/sveltekit-starter/src/routes/+layout.svelte +0 -6
- package/examples/sveltekit-starter/src/routes/+page.svelte +0 -10
- package/examples/sveltekit-starter/svelte.config.js +0 -4
- package/examples/sveltekit-starter/vite.config.js +0 -6
- package/examples/vite-starter/README.md +0 -125
- package/examples/vite-starter/index.html +0 -12
- package/examples/vite-starter/package.json +0 -19
- package/examples/vite-starter/src/main.js +0 -188
- package/examples/vite-starter/src/styles.css +0 -22
- package/examples/vite-starter/vite.config.js +0 -6
- package/src/themes/valiify-type-prefixed.css +0 -37
package/src/components/tag.css
CHANGED
|
@@ -1,55 +1,98 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Tag Component
|
|
2
|
+
* Tag Component — Figma Tag 79:251
|
|
3
3
|
*
|
|
4
4
|
* Compact label for categorization and filtering — a label that happens to be
|
|
5
|
-
* clickable, as distinct from Pill, which is a toggle.
|
|
6
|
-
*
|
|
5
|
+
* clickable, as distinct from Pill, which is a toggle. 40 variants: Hover x
|
|
6
|
+
* Active x Disabled x Size (xs / sm / md / lg) x Kind (default / recipient /
|
|
7
|
+
* empty), plus boolean slots (Avatar, Count, Status Dot, Ring, Remove,
|
|
8
|
+
* External).
|
|
9
|
+
*
|
|
10
|
+
* REBUILT 2026-09-30 for the Revision 3 redesign (0.5.0 — see CHANGELOG):
|
|
11
|
+
*
|
|
12
|
+
* - Labels move off the retired scale onto Action/Compact (12/500 at
|
|
13
|
+
* xs/sm/md) and Action/Default (13/500 at lg).
|
|
14
|
+
* - xs grew 16 -> 20 and is now the same HEIGHT as sm (still raw/unbound in
|
|
15
|
+
* Figma) — the two differ only in padding (6 vs 9) and gap (6 vs 10).
|
|
16
|
+
* sm/md/lg still bind Height/Control/XS/SM/LG — the off-by-one labelling
|
|
17
|
+
* (tag `sm` on the XS token) persists as drawn.
|
|
18
|
+
* - ACTIVE steps the label to Action/Compact Active (600) at xs/sm/md while
|
|
19
|
+
* lg keeps 500 — the old md-only weight bump moved, and the inconsistency
|
|
20
|
+
* contradicts "600 for active regardless of size" (designer-list item 26;
|
|
21
|
+
* built as drawn).
|
|
22
|
+
* - The count is Inter now — Action/Compact in the same run as the label —
|
|
23
|
+
* no longer JetBrains Mono. Figma binds it Content/Tertiary, which fails
|
|
24
|
+
* AA on every filled state (4.46 on hover, 4.19 recipient-hover, 4.34
|
|
25
|
+
* External — measured); it ships as Content/Secondary instead
|
|
26
|
+
* (5.5–6.7 everywhere), a deliberate divergence on the designer list
|
|
27
|
+
* (item 27).
|
|
28
|
+
* - The status-dot slot is a Chip `dot SM` instance = 6px: use
|
|
29
|
+
* `.vd-dot vd-dot-sm vd-dot-warning`. (The 0.5.0 interim state rendered
|
|
30
|
+
* the bare 4px dot here; resolved.)
|
|
31
|
+
* - EXTERNAL is integrated: the boolean draws a full-size Warning/Soft
|
|
32
|
+
* overlay + a globe glyph (14 at sm, 16 at lg) + a nested status CHIP.
|
|
33
|
+
* The old Warning/Main hairline is gone — fill only. Figma literally
|
|
34
|
+
* nests a 24px SM chip inside the 20px sm tag (overflow — designer-list
|
|
35
|
+
* item 25); per the designer's guidance the sanctioned shape ships
|
|
36
|
+
* instead: an XS 20px `.vd-chip` inside a tag that HUGS TO 24 (the
|
|
37
|
+
* `:has()` rule below). `.vd-tag-flag`, the old hand-rolled mini-chip,
|
|
38
|
+
* is REMOVED — the nested chip is a real Chip.
|
|
39
|
+
* - The Ring boolean is a 2px Primary/Main stroke aligned OUTSIDE, like
|
|
40
|
+
* Chip's — outline at zero offset. (Figma's xs Ring frames are mis-sized,
|
|
41
|
+
* 26/22 on 20px tags — designer-list item 23.)
|
|
7
42
|
*
|
|
8
43
|
* Usage:
|
|
9
44
|
* <button class="vd-tag" aria-pressed="false">Design</button>
|
|
10
45
|
*
|
|
11
46
|
* <button class="vd-tag vd-tag-md" aria-pressed="false">
|
|
12
|
-
* <span class="vd-avatar vd-avatar-
|
|
47
|
+
* <span class="vd-avatar vd-avatar-sm">JS</span>
|
|
13
48
|
* Design
|
|
14
49
|
* <span class="vd-tag-count">1</span>
|
|
15
|
-
* <span class="vd-dot vd-dot-warning"></span>
|
|
50
|
+
* <span class="vd-dot vd-dot-sm vd-dot-warning"></span>
|
|
16
51
|
* </button>
|
|
17
52
|
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
53
|
+
* <!-- recipient with the Remove slot and the integrated External state -->
|
|
54
|
+
* <span class="vd-tag vd-tag-sm vd-tag-recipient vd-tag-external">
|
|
55
|
+
* <span class="vd-avatar vd-avatar-sm">MV</span>
|
|
56
|
+
* marcus@northwind.example
|
|
57
|
+
* <svg class="vd-icon vd-icon-size-14" aria-hidden="true"><use href="#globe" /></svg>
|
|
58
|
+
* <span class="vd-chip vd-chip-neutral"><span class="vd-chip-dot"></span><span>FLAGGED</span></span>
|
|
59
|
+
* <button class="vd-icon-button vd-icon-button-inline" aria-label="Remove">
|
|
60
|
+
* <svg class="vd-icon vd-icon-size-14" aria-hidden="true"><use href="#x" /></svg>
|
|
61
|
+
* </button>
|
|
62
|
+
* </span>
|
|
27
63
|
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
64
|
+
* KIND — three fills on the same box:
|
|
65
|
+
* default transparent, 0.5px Stroke/Divider, Content/Primary text
|
|
66
|
+
* recipient Action/Subtle fill (the only filled kind); hover steps to
|
|
67
|
+
* Action/Hover; exposes avatar, External and Remove
|
|
68
|
+
* empty DASHED 0.5px Stroke/Border (the heavier token), Content/Tertiary
|
|
69
|
+
* text, a fixed 14px hash glyph (markup, not a slot); ignores the
|
|
70
|
+
* active fill entirely
|
|
33
71
|
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
72
|
+
* md IS Kind=default ONLY — Figma draws 4 md variants against 12 for each of
|
|
73
|
+
* xs / sm / lg; recipient / empty / external are documented and tested only
|
|
74
|
+
* with -xs, -sm and -lg.
|
|
37
75
|
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
76
|
+
* THE SLOTS ARE EXISTING COMPONENTS, NOT NEW PARTS. The avatar is Avatar
|
|
77
|
+
* `Size=S` (16, `.vd-avatar-sm`) at sm–lg and Avatar `Size=XS` (12,
|
|
78
|
+
* `.vd-avatar-xs`) at xs-recipient — the 12px size Figma drew before the
|
|
79
|
+
* Avatar set offered it (designer-list item 24, resolved by the 0.5.0 Avatar
|
|
80
|
+
* rescale). Remove is Icon Button `inline` (18 / 14px glyph) at sm/lg and the
|
|
81
|
+
* 12px `xs` size at xs; the status dot is `.vd-dot vd-dot-sm` (6).
|
|
42
82
|
*
|
|
43
83
|
* Disabled changes the label colour and nothing else — not the border, not the
|
|
44
84
|
* background, and not the slots. A disabled Tag keeps a fully enabled Avatar.
|
|
85
|
+
*
|
|
86
|
+
* DEFAULT SIZE: Figma's default variant is lg; the base here stays sm — the
|
|
87
|
+
* pre-Rev3 default — because re-pointing bare tags 20 -> 32 is a large break
|
|
88
|
+
* and designer-list item 18 (which default is right?) is still unanswered.
|
|
45
89
|
*/
|
|
46
90
|
|
|
47
91
|
@layer components {
|
|
48
92
|
.vd-tag {
|
|
49
|
-
/* Layout */
|
|
93
|
+
/* Layout — sm is the base: Height/Control/XS, no padding-y */
|
|
50
94
|
@apply inline-flex shrink-0 items-center gap-2.5; /* 10px at sm */
|
|
51
|
-
@apply px-2.25
|
|
52
|
-
@apply h-[21px];
|
|
95
|
+
@apply h-control-xs px-2.25; /* 20px, 9px */
|
|
53
96
|
|
|
54
97
|
/* Shape */
|
|
55
98
|
@apply rounded-pill;
|
|
@@ -61,8 +104,8 @@
|
|
|
61
104
|
/* Colors — rest is transparent, not white. It reads as content. */
|
|
62
105
|
@apply bg-transparent text-content-primary;
|
|
63
106
|
|
|
64
|
-
/* Type —
|
|
65
|
-
@apply text-
|
|
107
|
+
/* Type — Action/Compact (12 / 16 / 500) */
|
|
108
|
+
@apply text-action-compact;
|
|
66
109
|
|
|
67
110
|
/* Interaction */
|
|
68
111
|
@apply cursor-pointer transition-colors duration-150;
|
|
@@ -70,41 +113,99 @@
|
|
|
70
113
|
|
|
71
114
|
/* --- Parts ------------------------------------------------------------ */
|
|
72
115
|
|
|
73
|
-
/* Not a badge
|
|
116
|
+
/* Not a badge — bare text, no box. Inter Action/Compact since Rev3 (the
|
|
117
|
+
mono form is gone). Figma binds Content/Tertiary, which fails AA on every
|
|
118
|
+
filled state (4.19–4.46 measured); Content/Secondary ships instead
|
|
119
|
+
(5.5–6.7 on every state) — designer-list item 27. md/lg only. */
|
|
74
120
|
.vd-tag-count {
|
|
75
121
|
@apply shrink-0;
|
|
76
|
-
@apply text-
|
|
77
|
-
@apply text-content-tertiary;
|
|
122
|
+
@apply text-action-compact text-content-secondary;
|
|
78
123
|
}
|
|
79
124
|
|
|
80
125
|
/* --- Sizes ------------------------------------------------------------ */
|
|
81
126
|
|
|
127
|
+
/* Raw 20 in Figma — unbound, and the same height as sm; only padding and
|
|
128
|
+
gap are denser. Was a raw 16 before Rev3. */
|
|
129
|
+
.vd-tag-xs {
|
|
130
|
+
@apply h-5 gap-1.5 px-1.5; /* 20px, 6px gap, 6px */
|
|
131
|
+
@apply text-action-compact;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/* Identical to the bare base — sm IS the default. */
|
|
82
135
|
.vd-tag-sm {
|
|
83
|
-
@apply h-
|
|
84
|
-
@apply text-
|
|
136
|
+
@apply h-control-xs gap-2.5 px-2.25; /* XS 20px, 10px gap, 9px */
|
|
137
|
+
@apply text-action-compact;
|
|
85
138
|
}
|
|
86
139
|
|
|
87
|
-
/*
|
|
88
|
-
would compute to 26px. Pinned, as button.css does. */
|
|
140
|
+
/* Kind=default only in Figma. */
|
|
89
141
|
.vd-tag-md {
|
|
90
|
-
@apply h-
|
|
91
|
-
@apply text-
|
|
142
|
+
@apply h-control-sm gap-2 px-2.25; /* SM 24px, 8px gap, 9px */
|
|
143
|
+
@apply text-action-compact;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.vd-tag-lg {
|
|
147
|
+
@apply h-control-lg gap-2 px-2.5; /* LG 32px, 8px gap, 10px (raw in Figma) */
|
|
148
|
+
@apply text-action-default; /* 13 / 18 / 500 */
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/* --- Kinds ------------------------------------------------------------ */
|
|
152
|
+
|
|
153
|
+
/* The only filled kind. Border and text as default; its hover lives in the
|
|
154
|
+
States section, AFTER the base hover it must outrank. */
|
|
155
|
+
.vd-tag-recipient {
|
|
156
|
+
@apply bg-action-subtle;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/* Dashed, on the heavier stroke token, dimmer text. Ignores hover and the
|
|
160
|
+
active fill — Figma draws it inert in both. */
|
|
161
|
+
.vd-tag-empty {
|
|
162
|
+
@apply border-dashed border-stroke-border text-content-tertiary;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/* External — integrated state: Warning/Soft fill (the old Warning/Main
|
|
166
|
+
hairline is gone from Figma; the border stays Divider). Pairs with the
|
|
167
|
+
globe glyph (14 at xs–sm, 16 at lg) and the nested status chip below. */
|
|
168
|
+
.vd-tag-external {
|
|
169
|
+
@apply bg-warning-soft;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/* The sanctioned nesting shape (designer guidance 2026-09-30): an XS 20px
|
|
173
|
+
Chip inside a tag that hugs to 24. Figma's literal drawing nests a 24px
|
|
174
|
+
SM chip inside the 20px sm tag — an overflow (designer-list item 25) —
|
|
175
|
+
so the wrapper grows instead of the chip overflowing. The compound
|
|
176
|
+
selector deliberately outranks the size classes. */
|
|
177
|
+
.vd-tag-external:has(.vd-chip) {
|
|
178
|
+
height: auto;
|
|
179
|
+
@apply min-h-control-sm; /* hugs: 20px chip + hairlines, floored at 24 */
|
|
92
180
|
}
|
|
93
181
|
|
|
94
182
|
/* --- States ----------------------------------------------------------- */
|
|
95
183
|
|
|
96
|
-
|
|
184
|
+
/* Hover excludes the active states by name: Figma's Active variants all
|
|
185
|
+
carry Hover=yes with the SOLID primary fill, so hover must never repaint
|
|
186
|
+
a selected tag (the old rule outranked active and did — a latent bug this
|
|
187
|
+
rewrite closes). */
|
|
188
|
+
.vd-tag:hover:not(:disabled):not([aria-disabled="true"]):not(.vd-tag-empty):not([aria-pressed="true"]):not([aria-selected="true"]) {
|
|
97
189
|
@apply bg-action-subtle;
|
|
98
190
|
}
|
|
99
191
|
|
|
192
|
+
/* recipient steps a level deeper on hover. Same guards as the base hover,
|
|
193
|
+
and later in source, so it wins deliberately. */
|
|
194
|
+
.vd-tag.vd-tag-recipient:hover:not(:disabled):not([aria-disabled="true"]):not([aria-pressed="true"]):not([aria-selected="true"]) {
|
|
195
|
+
@apply bg-action-hover;
|
|
196
|
+
}
|
|
197
|
+
|
|
100
198
|
.vd-tag:focus-visible {
|
|
101
199
|
@apply focus-ring;
|
|
102
200
|
}
|
|
103
201
|
|
|
104
|
-
/* Active — a solid, full-contrast fill, unlike Pill's soft tint.
|
|
105
|
-
|
|
106
|
-
|
|
202
|
+
/* Active — a solid, full-contrast fill, unlike Pill's soft tint. The label
|
|
203
|
+
steps to Action/Compact Active (600); lg is restored to 500 below. empty
|
|
204
|
+
ignores the fill entirely. */
|
|
205
|
+
.vd-tag[aria-pressed="true"]:not(.vd-tag-empty),
|
|
206
|
+
.vd-tag[aria-selected="true"]:not(.vd-tag-empty) {
|
|
107
207
|
@apply bg-primary text-content-contrast;
|
|
208
|
+
@apply text-action-compact-active; /* 12 / 16 / 600 */
|
|
108
209
|
}
|
|
109
210
|
|
|
110
211
|
.vd-tag[aria-pressed="true"] .vd-tag-count,
|
|
@@ -112,10 +213,12 @@
|
|
|
112
213
|
@apply text-content-contrast;
|
|
113
214
|
}
|
|
114
215
|
|
|
115
|
-
/*
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
216
|
+
/* lg keeps its rest style when active — the one size with no weight bump
|
|
217
|
+
(designer-list item 26; as drawn). Source order beats the rule above at
|
|
218
|
+
equal specificity. */
|
|
219
|
+
.vd-tag-lg[aria-pressed="true"]:not(.vd-tag-empty),
|
|
220
|
+
.vd-tag-lg[aria-selected="true"]:not(.vd-tag-empty) {
|
|
221
|
+
@apply text-action-default;
|
|
119
222
|
}
|
|
120
223
|
|
|
121
224
|
/* Disabled dims the label ONLY — border, background and slots are untouched,
|
|
@@ -125,9 +228,11 @@
|
|
|
125
228
|
@apply cursor-not-allowed text-content-tertiary;
|
|
126
229
|
}
|
|
127
230
|
|
|
128
|
-
/* Ring — Figma boolean, hidden by default.
|
|
129
|
-
|
|
231
|
+
/* Ring — Figma boolean, hidden by default. A 2px Primary/Main stroke
|
|
232
|
+
aligned OUTSIDE (like Chip since Rev3): outline at zero offset, following
|
|
233
|
+
the pill radius. Was inset before 0.5.0. */
|
|
130
234
|
.vd-tag.vd-with-ring {
|
|
131
|
-
|
|
235
|
+
outline: var(--border-micro) solid var(--color-primary);
|
|
236
|
+
outline-offset: 0;
|
|
132
237
|
}
|
|
133
238
|
}
|
|
@@ -5,6 +5,21 @@
|
|
|
5
5
|
* Button (679:21601) — 11 variants across Type x Hover x Pressed x Active,
|
|
6
6
|
* plus Icon and Ring booleans.
|
|
7
7
|
*
|
|
8
|
+
* REBUILT 2026-09-30 for the Revision 3 redesign (0.5.0):
|
|
9
|
+
*
|
|
10
|
+
* - All three types converge on Action/Compact (12/16/500): cell leaves the
|
|
11
|
+
* retired 11px Micro L, text/Primary leave the 12/400 Caption. The types
|
|
12
|
+
* now differ only in padding, background behaviour and colour ramp.
|
|
13
|
+
* - Heights are 20 everywhere (cell was a pinned 15; text/Primary were 18):
|
|
14
|
+
* 2px padding-y + the explicit 16px line = 20 exactly, so the pin the old
|
|
15
|
+
* Auto line height forced is gone — the box is content-driven and lands
|
|
16
|
+
* on 20 by arithmetic.
|
|
17
|
+
* - ACTIVE IS COLOUR-ONLY NOW. The old 400 -> "Bold"(500) weight bump died
|
|
18
|
+
* with the rest weight moving to 500; Figma's active variants keep
|
|
19
|
+
* Action/Compact and change fills/ink only.
|
|
20
|
+
* - The Ring boolean is a 2px Primary/Main stroke aligned OUTSIDE (was
|
|
21
|
+
* inset here), matching Chip/Tag/Button.
|
|
22
|
+
*
|
|
8
23
|
* Usage:
|
|
9
24
|
* <button class="vd-text-button vd-text-button-cell">Select all</button>
|
|
10
25
|
*
|
|
@@ -13,42 +28,26 @@
|
|
|
13
28
|
* Add row
|
|
14
29
|
* </button>
|
|
15
30
|
*
|
|
16
|
-
* THIS IS NOT A .btn VARIANT. Different Figma component, different
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* THE THREE TYPES ARE NOT THREE SKINS OF ONE CONTROL — cell is a genuinely
|
|
23
|
-
* different size from the other two:
|
|
31
|
+
* THIS IS NOT A .btn VARIANT. Different Figma component, different geometry —
|
|
32
|
+
* .vd-btn rides the control ladder (20–40), this hugs its text at 20. Reach for
|
|
33
|
+
* .vd-btn-empty when you want a real button that happens to look bare; reach
|
|
34
|
+
* for .vd-text-button for an inline affordance inside a table cell or a line
|
|
35
|
+
* of copy.
|
|
24
36
|
*
|
|
25
|
-
* cell
|
|
26
|
-
* text
|
|
27
|
-
* Primary
|
|
37
|
+
* cell 7px/2px padding, pill background on hover/press/active
|
|
38
|
+
* text no padding-x, colour-only states
|
|
39
|
+
* Primary no padding-x, colour-only states, Primary ramp
|
|
28
40
|
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
41
|
+
* (Figma spells the axis value `Primary`, capitalized — the one Type value
|
|
42
|
+
* that is; cosmetic authoring quirk.)
|
|
31
43
|
*
|
|
32
|
-
*
|
|
44
|
+
* FIGMA ODDITIES REPRODUCED, not corrected:
|
|
33
45
|
* - `text` draws Hover and Pressed identically (both Content/Primary, no
|
|
34
|
-
* background), so pressing a text button gives no feedback. cell
|
|
35
|
-
*
|
|
36
|
-
* - `Primary` has no Active variant
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
* Both are flagged with the designer.
|
|
40
|
-
*
|
|
41
|
-
* ACTIVE ALSO CHANGES WEIGHT, from 400 to 500 — `Micro L - Bold` for cell and
|
|
42
|
-
* `Caption - Bold` for text. Careful: both Figma styles say "Bold" and both
|
|
43
|
-
* report Medium / 500. Do not map "-Bold" to 700. Because the type token also
|
|
44
|
-
* carries size and line-height, this cannot be a bare `font-medium`.
|
|
45
|
-
*
|
|
46
|
-
* CELL'S HEIGHT IS PINNED AT 15px, and must be. `Micro L` carries a Figma
|
|
47
|
-
* "Auto" line height, so the line box is font-dependent — Figma resolves it to
|
|
48
|
-
* 13px and Chrome to 14px, which would ship the control a pixel tall. This is
|
|
49
|
-
* the same trap button.css and pill.css already document. `text` and `Primary`
|
|
50
|
-
* need no pin: their 18px line-height is explicit, so the box lands on 18
|
|
51
|
-
* either way.
|
|
46
|
+
* background), so pressing a text button gives no feedback. cell steps
|
|
47
|
+
* Action/Hover -> Action/Focused and stays distinct.
|
|
48
|
+
* - `Primary` has no Active variant, and since the Primary/Pressed -> Dark
|
|
49
|
+
* alias (2026-09-29) its hover and pressed are the SAME colour
|
|
50
|
+
* (designer-list item 20). Nothing is invented to fill either gap.
|
|
52
51
|
*
|
|
53
52
|
* NO DISABLED VARIANT EXISTS in Figma. The rule below is the house convention,
|
|
54
53
|
* so a disabled control is not silently clickable.
|
|
@@ -66,10 +65,10 @@
|
|
|
66
65
|
/* Reset so the class works on button / a / span alike */
|
|
67
66
|
@apply appearance-none border-none bg-transparent text-left no-underline;
|
|
68
67
|
|
|
69
|
-
/* Default geometry and type: cell, which is Figma's default variant
|
|
70
|
-
|
|
71
|
-
@apply
|
|
72
|
-
@apply text-
|
|
68
|
+
/* Default geometry and type: cell, which is Figma's default variant.
|
|
69
|
+
2 + 16 + 2 = 20 — content-driven since Rev3's explicit line-height. */
|
|
70
|
+
@apply px-1.75 py-0.5; /* 7px / 2px */
|
|
71
|
+
@apply text-action-compact; /* 12 / 16 / 500 */
|
|
73
72
|
@apply text-content-secondary;
|
|
74
73
|
|
|
75
74
|
/* Interaction */
|
|
@@ -80,22 +79,21 @@
|
|
|
80
79
|
|
|
81
80
|
/* Explicit form of the default. */
|
|
82
81
|
.vd-text-button-cell {
|
|
83
|
-
@apply px-1.75 py-0.
|
|
84
|
-
@apply
|
|
85
|
-
@apply text-micro-l; /* 11px / 400 / Auto */
|
|
82
|
+
@apply px-1.75 py-0.5; /* 7px / 2px */
|
|
83
|
+
@apply text-action-compact;
|
|
86
84
|
@apply text-content-secondary;
|
|
87
85
|
}
|
|
88
86
|
|
|
89
|
-
/* No padding
|
|
87
|
+
/* No padding-x — the 20px box is 2 + the 16px line + 2. */
|
|
90
88
|
.vd-text-button-text {
|
|
91
|
-
@apply
|
|
92
|
-
@apply text-
|
|
89
|
+
@apply px-0 py-0.5;
|
|
90
|
+
@apply text-action-compact;
|
|
93
91
|
@apply text-content-secondary;
|
|
94
92
|
}
|
|
95
93
|
|
|
96
94
|
.vd-text-button-primary {
|
|
97
|
-
@apply
|
|
98
|
-
@apply text-
|
|
95
|
+
@apply px-0 py-0.5;
|
|
96
|
+
@apply text-action-compact;
|
|
99
97
|
@apply text-primary;
|
|
100
98
|
}
|
|
101
99
|
|
|
@@ -121,7 +119,8 @@
|
|
|
121
119
|
|
|
122
120
|
/* Primary rides the Primary ramp instead of the Content ramp. Same
|
|
123
121
|
specificity as the shared rules above, so it must stay after them —
|
|
124
|
-
the ordering is load-bearing, exactly as in button.css.
|
|
122
|
+
the ordering is load-bearing, exactly as in button.css. Pressed equals
|
|
123
|
+
hover since the Primary/Pressed -> Dark alias (designer-list item 20). */
|
|
125
124
|
.vd-text-button-primary:hover:not(:disabled):not([aria-disabled="true"]) {
|
|
126
125
|
@apply text-primary-dark;
|
|
127
126
|
}
|
|
@@ -130,27 +129,21 @@
|
|
|
130
129
|
@apply text-primary-pressed;
|
|
131
130
|
}
|
|
132
131
|
|
|
133
|
-
/* Active — the selected/applied state.
|
|
134
|
-
|
|
135
|
-
swapped rather than just the weight. */
|
|
132
|
+
/* Active — the selected/applied state. COLOUR-ONLY since Rev3: rest is
|
|
133
|
+
already 500 and Figma's active variants keep Action/Compact. */
|
|
136
134
|
.vd-text-button-cell[aria-pressed="true"],
|
|
137
135
|
.vd-text-button-cell[aria-selected="true"] {
|
|
138
136
|
@apply bg-primary-soft text-primary;
|
|
139
|
-
@apply text-micro-l-bold; /* 11px / 500 / Auto */
|
|
140
137
|
}
|
|
141
138
|
|
|
142
139
|
.vd-text-button-text[aria-pressed="true"],
|
|
143
140
|
.vd-text-button-text[aria-selected="true"] {
|
|
144
141
|
@apply text-primary;
|
|
145
|
-
@apply text-caption-bold; /* 12px / 18px / 500 */
|
|
146
142
|
}
|
|
147
143
|
|
|
148
|
-
/* Figma draws no Active for Primary
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
.vd-text-button-primary[aria-selected="true"] {
|
|
152
|
-
@apply text-caption-bold; /* 12px / 18px / 500 */
|
|
153
|
-
}
|
|
144
|
+
/* Figma draws no Active for Primary, and it already sits at Primary/Main —
|
|
145
|
+
with the Rev3 weight flattening there is nothing left to express selection
|
|
146
|
+
with. Nothing invented; aria-pressed still matters to assistive tech. */
|
|
154
147
|
|
|
155
148
|
.vd-text-button:focus-visible {
|
|
156
149
|
@apply focus-ring;
|
|
@@ -162,9 +155,11 @@
|
|
|
162
155
|
@apply cursor-not-allowed text-content-tertiary;
|
|
163
156
|
}
|
|
164
157
|
|
|
165
|
-
/* Ring — Figma boolean, hidden by default.
|
|
166
|
-
|
|
158
|
+
/* Ring — Figma boolean, hidden by default. A 2px Primary/Main stroke
|
|
159
|
+
aligned OUTSIDE since Rev3 (was inset), matching Chip, Tag and Button:
|
|
160
|
+
outline at zero offset, following the pill radius. */
|
|
167
161
|
.vd-text-button.vd-with-ring {
|
|
168
|
-
|
|
162
|
+
outline: var(--border-micro) solid var(--color-primary);
|
|
163
|
+
outline-offset: 0;
|
|
169
164
|
}
|
|
170
165
|
}
|
|
@@ -1,24 +1,38 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Textarea Component
|
|
2
|
+
* Textarea Component — Figma Text Area 854:24876 (was Text Field Container)
|
|
3
3
|
*
|
|
4
4
|
* Multi-line text input field with labels, help text, and error messages.
|
|
5
|
-
*
|
|
6
|
-
* (state × filled × error).
|
|
5
|
+
* 120 variants (state x filled x error x BG x size).
|
|
7
6
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
7
|
+
* THIS IS A FLOOR COMPONENT. Figma binds Height/Control/XS..XL to the Input
|
|
8
|
+
* Row's MIN-height (2026-09-24, option (c)) with the outer frame on Hug:
|
|
9
|
+
* xs 20 / sm 24 / md 28 / lg 32 / xl 40, applied as `min-h-control-*`. The
|
|
10
|
+
* box grows with content — `rows`, typing, or the resize handle — and never
|
|
11
|
+
* shrinks below its step. Before this the field had no height of its own and
|
|
12
|
+
* no Size property; the raw 60 / 72 / 84 / 96 / 120 floors that briefly
|
|
13
|
+
* existed in Figma (3x the ladder) were rebound to the ladder itself.
|
|
11
14
|
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
+
* VERTICAL PADDING IS NOT 0 HERE, unlike the pinned controls — a floor box is
|
|
16
|
+
* top-aligned and its padding is real geometry. THE FLOOR-TIER RULE: floor
|
|
17
|
+
* components subtract the rendered 1px hairline per side from their vertical
|
|
18
|
+
* padding; height-bound components don't need to, height clamps. Chrome floors
|
|
19
|
+
* the 0.5px hairline to 1px and ADDS it to a content-driven box (Figma's
|
|
20
|
+
* strokesIncludedInLayout=false draws it inside), so Figma's measured padding
|
|
21
|
+
* (3/5/4/6/10) would render every one-line field ~1.5px above its floor. The
|
|
22
|
+
* CSS twin of the Figma bug, not a property of the design. Padding-y is
|
|
23
|
+
* therefore (floor − 2 − lineBox) / 2, rounded down: xs 2, sm 4, md 3, lg 5,
|
|
24
|
+
* xl 9 (line boxes 14 for Micro L, 19.5 for Body 1) — and a one-line field
|
|
25
|
+
* sits on 20 / 24 / 28 / 32 / 40 exactly. Horizontal padding stays Figma's
|
|
26
|
+
* 6 / 8 / 10 / 12 / 16. verify:height-scale rule 3 REQUIRES min-h-control-*
|
|
27
|
+
* on this file and forbids a pinned `height`.
|
|
15
28
|
*
|
|
16
|
-
* .
|
|
29
|
+
* BASE = md. Type steps Micro L (11px) at xs/sm to Body 1 (13px / 19.5) from
|
|
30
|
+
* md up. `.vd-textarea-counter` is a library extension, not in the design file.
|
|
17
31
|
*
|
|
18
32
|
* Structure:
|
|
19
33
|
* <div class="vd-textarea-container">
|
|
20
34
|
* <div class="vd-textarea-label">...</div> <!-- Optional -->
|
|
21
|
-
* <div class="vd-textarea-field">...</div>
|
|
35
|
+
* <div class="vd-textarea-field vd-textarea-lg">...</div> <!-- Required; size optional (md) -->
|
|
22
36
|
* <div class="vd-textarea-error-message">...</div> <!-- Optional -->
|
|
23
37
|
* </div>
|
|
24
38
|
*
|
|
@@ -39,9 +53,10 @@
|
|
|
39
53
|
|
|
40
54
|
/* --- Label ------------------------------------------------------- */
|
|
41
55
|
|
|
56
|
+
/* Label/Compact — 12/16/600, MIXED CASE since Rev3 (see input.css). */
|
|
42
57
|
.vd-textarea-label {
|
|
43
58
|
@apply flex items-center w-full pb-1.5; /* 6px bottom padding */
|
|
44
|
-
@apply text-
|
|
59
|
+
@apply text-label-compact;
|
|
45
60
|
@apply text-content-tertiary;
|
|
46
61
|
}
|
|
47
62
|
|
|
@@ -56,10 +71,12 @@
|
|
|
56
71
|
.vd-textarea-field {
|
|
57
72
|
/* Layout */
|
|
58
73
|
@apply flex items-start w-full; /* items-start for top alignment */
|
|
59
|
-
@apply px-3 py-1.75; /* 12px / 7px, per Figma */
|
|
60
74
|
|
|
61
|
-
/*
|
|
62
|
-
|
|
75
|
+
/* Default size: md — a FLOOR of Height/Control/MD, 10px / 3px padding
|
|
76
|
+
(Figma's 4 minus the rendered hairline). The field hugs the <textarea>
|
|
77
|
+
above the floor, so the consumer still sets the working size with
|
|
78
|
+
`rows`, a height utility, or by dragging. */
|
|
79
|
+
@apply min-h-control-md px-2.5 py-0.75;
|
|
63
80
|
|
|
64
81
|
/* Shape */
|
|
65
82
|
@apply rounded-control; /* 6px */
|
|
@@ -91,19 +108,62 @@
|
|
|
91
108
|
@apply resize-y;
|
|
92
109
|
@apply block;
|
|
93
110
|
|
|
94
|
-
/* Typography */
|
|
95
|
-
@apply text-body-
|
|
111
|
+
/* Typography — Body/Dense (13/18) since Rev3 */
|
|
112
|
+
@apply text-body-dense;
|
|
96
113
|
@apply text-content-primary;
|
|
97
114
|
|
|
98
|
-
/* Placeholder
|
|
115
|
+
/* Placeholder — Content/Tertiary family-wide by decision (2026-09-30):
|
|
116
|
+
Figma draws Faint here (1.73:1 on Paper). Designer-list divergence. */
|
|
99
117
|
&::placeholder {
|
|
100
|
-
@apply text-content-
|
|
118
|
+
@apply text-content-tertiary;
|
|
101
119
|
}
|
|
102
120
|
}
|
|
103
121
|
|
|
104
|
-
/*
|
|
105
|
-
|
|
106
|
-
|
|
122
|
+
/* --- Size Variants ----------------------------------------------- */
|
|
123
|
+
/* One Height/Control step each as a min-height; padding-x is Figma's,
|
|
124
|
+
padding-y is Figma's minus the rendered 1px hairline (see the header). */
|
|
125
|
+
|
|
126
|
+
/* Rev3 recomputed the xs/sm floor paddings: Supporting/Caption's explicit
|
|
127
|
+
18px line is TALLER than the old Micro L auto line, so Figma's own
|
|
128
|
+
padding would push a one-line field past its floor (18 + 3+3 + hairlines
|
|
129
|
+
= 26 on a 20 floor). The floor-exact contract wins: pad-y is floor − line
|
|
130
|
+
− hairlines, i.e. 0 at xs and 2 at sm. md–xl keep the minus-hairline rule
|
|
131
|
+
— their 18px line sits under the floor either way. */
|
|
132
|
+
.vd-textarea-xs {
|
|
133
|
+
@apply min-h-control-xs px-1.5 py-0; /* floor 20 = 18 line + 2 hairlines */
|
|
134
|
+
@apply text-supporting-caption; /* 12 / 18 / 400 (was Micro L 11) */
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.vd-textarea-sm {
|
|
138
|
+
@apply min-h-control-sm px-2 py-0.5; /* floor 24 = 18 + 2+2 + hairlines */
|
|
139
|
+
@apply text-supporting-caption;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/* Identical to the bare base — md IS the default. */
|
|
143
|
+
.vd-textarea-md {
|
|
144
|
+
@apply min-h-control-md px-2.5 py-0.75; /* floor 28, 10 / 3 (Figma 4 − hairline) */
|
|
145
|
+
@apply text-body-dense; /* 13 / 18 / 400 */
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.vd-textarea-lg {
|
|
149
|
+
@apply min-h-control-lg px-3 py-1.25; /* floor 32, 12 / 5 (Figma 6 − hairline) */
|
|
150
|
+
@apply text-body-dense;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.vd-textarea-xl {
|
|
154
|
+
@apply min-h-control-xl px-4 py-2.25; /* floor 40, 16 / 9 (Figma 10 − hairline) */
|
|
155
|
+
@apply text-body-dense;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/* The textarea inherits the field's type so the size variants reach it */
|
|
159
|
+
.vd-textarea-xs .vd-textarea,
|
|
160
|
+
.vd-textarea-sm .vd-textarea,
|
|
161
|
+
.vd-textarea-md .vd-textarea,
|
|
162
|
+
.vd-textarea-lg .vd-textarea,
|
|
163
|
+
.vd-textarea-xl .vd-textarea {
|
|
164
|
+
font-size: inherit;
|
|
165
|
+
line-height: inherit;
|
|
166
|
+
}
|
|
107
167
|
|
|
108
168
|
/* --- Background Variants ----------------------------------------- */
|
|
109
169
|
|
|
@@ -134,6 +194,11 @@
|
|
|
134
194
|
@apply bg-action-subtle border-stroke-divider cursor-not-allowed;
|
|
135
195
|
}
|
|
136
196
|
|
|
197
|
+
.vd-textarea-bg-neutral:has(:disabled),
|
|
198
|
+
.vd-textarea-bg-neutral.vd-textarea-disabled {
|
|
199
|
+
@apply bg-surface-neutral; /* Rev3 Neutral-BG disabled fill */
|
|
200
|
+
}
|
|
201
|
+
|
|
137
202
|
.vd-textarea:disabled {
|
|
138
203
|
@apply cursor-not-allowed;
|
|
139
204
|
}
|