@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.
- package/CHANGELOG.md +933 -10
- package/COMPONENTS.md +185 -79
- package/GETTING_STARTED.md +116 -54
- package/QUICK_REFERENCE.md +48 -30
- package/README.md +107 -85
- 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 +17 -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 +1 -1
- 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 -3740
- 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
|
@@ -36,9 +36,13 @@
|
|
|
36
36
|
|
|
37
37
|
@layer components {
|
|
38
38
|
.vd-segment-selector {
|
|
39
|
-
/* Layout —
|
|
39
|
+
/* Layout — Rev3 (Navigation 994:31364): the frame is bound
|
|
40
|
+
Height/Control/MD (28) with 2px padding around the 24px segments
|
|
41
|
+
(it was a content-driven 26 on 1px padding). Pinned with height,
|
|
42
|
+
not min-height — there is no border, but the pin keeps the frame on
|
|
43
|
+
the ladder step it binds. */
|
|
40
44
|
@apply inline-flex items-center gap-0;
|
|
41
|
-
@apply p-0.
|
|
45
|
+
@apply h-control-md p-0.5; /* 28px, 2px */
|
|
42
46
|
|
|
43
47
|
/* Shape */
|
|
44
48
|
@apply rounded-tight; /* Radius/XS, 4px */
|
|
@@ -72,7 +76,9 @@
|
|
|
72
76
|
@apply focus-ring;
|
|
73
77
|
}
|
|
74
78
|
|
|
79
|
+
/* Rev3: OUTSIDE, like the rest of the Ring family (was inset). */
|
|
75
80
|
.vd-segment-selector.vd-with-ring {
|
|
76
|
-
|
|
81
|
+
outline: var(--border-micro) solid var(--color-primary);
|
|
82
|
+
outline-offset: 0;
|
|
77
83
|
}
|
|
78
84
|
}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* Usage:
|
|
10
10
|
* <span class="vd-sensitive-data">
|
|
11
11
|
* <span class="vd-sensitive-data-value">***-**-1234</span>
|
|
12
|
-
* <button class="vd-icon-button vd-icon-button-
|
|
12
|
+
* <button class="vd-icon-button vd-icon-button-inline" aria-pressed="true"
|
|
13
13
|
* aria-label="Show full value">
|
|
14
14
|
* <svg class="vd-icon vd-icon-size-14" aria-hidden="true"><use href="#eye-off" /></svg>
|
|
15
15
|
* </button>
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
* rendered structure — the same phantom binding as FilterSegment's, which is
|
|
47
47
|
* already an open designer question.
|
|
48
48
|
* - The toggle's `Spacing/6` padding cannot contain its own glyph: 18 - (6*2)
|
|
49
|
-
* leaves 6px for a 14px icon. `.vd-icon-button-
|
|
49
|
+
* leaves 6px for a 14px icon. `.vd-icon-button-inline`'s 2px fits exactly, so
|
|
50
50
|
* Figma's value is treated as vestigial.
|
|
51
51
|
* - `Spacing/10` is set as a gap on the toggle, which has one child.
|
|
52
52
|
*
|
|
@@ -62,16 +62,18 @@
|
|
|
62
62
|
@apply inline-flex items-center gap-1;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
/*
|
|
65
|
+
/* Rev3: Supporting/Caption — the same 12 / 18 / 400 metrics Caption had. */
|
|
66
66
|
.vd-sensitive-data-value {
|
|
67
|
-
@apply text-caption text-content-primary;
|
|
67
|
+
@apply text-supporting-caption text-content-primary;
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
/* --- States --------------------------------------------------------- */
|
|
71
71
|
|
|
72
72
|
/* Figma's Ring boolean, hidden by default — 2px Primary/Main drawn inside the
|
|
73
73
|
row's own bounds, matching Chip, Avatar and Tag. */
|
|
74
|
+
/* Rev3: OUTSIDE, like the rest of the Ring family (was inset). */
|
|
74
75
|
.vd-sensitive-data.vd-with-ring {
|
|
75
|
-
|
|
76
|
+
outline: var(--border-micro) solid var(--color-primary);
|
|
77
|
+
outline-offset: 0;
|
|
76
78
|
}
|
|
77
79
|
}
|
|
@@ -21,13 +21,17 @@
|
|
|
21
21
|
* into. A bare `.vd-skeleton` therefore has fill and motion but no size, which
|
|
22
22
|
* reads as the authoring error it is.
|
|
23
23
|
*
|
|
24
|
-
* SHAPE
|
|
25
|
-
*
|
|
24
|
+
* SHAPE SETS THE BASE RADIUS, AND SINCE REV3 THE LARGER SIZES STEP IT UP
|
|
25
|
+
* (read 2026-10-01; raw in Figma, all but 12 equal to a token):
|
|
26
26
|
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
27
|
+
* SM MD LG
|
|
28
|
+
* Line 4 4 6 tight / tight / control
|
|
29
|
+
* Heading 4 6 8 tight / control / surface
|
|
30
|
+
* Button 6 6 8 control / control / surface
|
|
31
|
+
* Rectangle 8 8 12 surface / surface / raw 12 (like Modal)
|
|
32
|
+
* Circle full at every size pill
|
|
33
|
+
*
|
|
34
|
+
* Before Rev3 the radius was one value per shape at every size.
|
|
31
35
|
*
|
|
32
36
|
* SIZE CARRIES THE DIMENSIONS, which is why the size classes are compound
|
|
33
37
|
* (`.vd-skeleton-line.vd-skeleton-sm`) rather than standalone. Every one of the 15
|
|
@@ -115,8 +119,12 @@
|
|
|
115
119
|
.vd-skeleton-line.vd-skeleton-md {
|
|
116
120
|
@apply h-4 w-50; /* 200 x 16 */
|
|
117
121
|
}
|
|
122
|
+
/* Rev3 radii step up with size (read 2026-10-01; all raw in Figma, all equal
|
|
123
|
+
to a radius token except Rectangle LG's 12, which is raw like Modal's).
|
|
124
|
+
Shape still sets the SM radius above; LG (and Heading MD) override it. */
|
|
118
125
|
.vd-skeleton-line.vd-skeleton-lg {
|
|
119
126
|
@apply h-5 w-80; /* 320 x 20 */
|
|
127
|
+
@apply rounded-control; /* 6px — Rev3 (was 4) */
|
|
120
128
|
}
|
|
121
129
|
|
|
122
130
|
.vd-skeleton-heading.vd-skeleton-sm {
|
|
@@ -124,9 +132,11 @@
|
|
|
124
132
|
}
|
|
125
133
|
.vd-skeleton-heading.vd-skeleton-md {
|
|
126
134
|
@apply h-6 w-60; /* 240 x 24 */
|
|
135
|
+
@apply rounded-control; /* 6px — Rev3 (was 4) */
|
|
127
136
|
}
|
|
128
137
|
.vd-skeleton-heading.vd-skeleton-lg {
|
|
129
138
|
@apply h-8 w-90; /* 360 x 32 */
|
|
139
|
+
@apply rounded-surface; /* 8px — Rev3 (was 4) */
|
|
130
140
|
}
|
|
131
141
|
|
|
132
142
|
.vd-skeleton-circle.vd-skeleton-sm {
|
|
@@ -147,6 +157,7 @@
|
|
|
147
157
|
}
|
|
148
158
|
.vd-skeleton-rectangle.vd-skeleton-lg {
|
|
149
159
|
@apply h-45 w-80; /* 320 x 180 */
|
|
160
|
+
@apply rounded-[12px]; /* Rev3 (was 8) — raw in Figma, past the radius scale, like Modal's 12 */
|
|
150
161
|
}
|
|
151
162
|
|
|
152
163
|
.vd-skeleton-button.vd-skeleton-sm {
|
|
@@ -157,6 +168,7 @@
|
|
|
157
168
|
}
|
|
158
169
|
.vd-skeleton-button.vd-skeleton-lg {
|
|
159
170
|
@apply h-10 w-32; /* 128 x 40 */
|
|
171
|
+
@apply rounded-surface; /* 8px — Rev3 (was 6) */
|
|
160
172
|
}
|
|
161
173
|
|
|
162
174
|
/* --- Reduced motion --------------------------------------------------- */
|
package/src/components/step.css
CHANGED
|
@@ -66,12 +66,21 @@
|
|
|
66
66
|
@apply bg-primary text-content-contrast;
|
|
67
67
|
|
|
68
68
|
/* The number the other two states show; completed swaps in a 12px icon. */
|
|
69
|
-
@apply text-
|
|
69
|
+
@apply text-supporting-caption-strong; /* Rev3: the number is 12 / 18 / 500 (was raw 11) */
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
+
/* Rev3: the completed check authors a 2px stroke at 12px where the icon
|
|
73
|
+
ramp's 12px step is 1px (Checkbox precedent): 2px at 12px = 4 user units. */
|
|
74
|
+
.vd-step-marker .vd-icon {
|
|
75
|
+
--icon-stroke: 4;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/* Rev3 binds the label per state — completed and active Label/Compact
|
|
79
|
+
(12/16/600, 0.08em), upcoming Supporting/Caption (12/18/400) — and none
|
|
80
|
+
transforms case: Figma renders "Step" mixed-case, so the old CSS
|
|
81
|
+
uppercase is gone. */
|
|
72
82
|
.vd-step-label {
|
|
73
|
-
@apply text-
|
|
74
|
-
@apply text-center uppercase tracking-[0.5px];
|
|
83
|
+
@apply text-label-compact text-center;
|
|
75
84
|
@apply text-content-tertiary;
|
|
76
85
|
}
|
|
77
86
|
|
|
@@ -99,8 +108,10 @@
|
|
|
99
108
|
|
|
100
109
|
/* Regular, where completed and active are Medium — and DARKER than
|
|
101
110
|
completed's label. See the header. */
|
|
111
|
+
/* Supporting/Caption carries no letter-spacing of its own, so the base
|
|
112
|
+
label's Label/Compact 0.08em would leak through — reset it explicitly. */
|
|
102
113
|
.vd-step-upcoming .vd-step-label {
|
|
103
|
-
@apply
|
|
114
|
+
@apply text-supporting-caption tracking-normal;
|
|
104
115
|
@apply text-neutral-strong;
|
|
105
116
|
}
|
|
106
117
|
}
|
|
@@ -66,10 +66,11 @@
|
|
|
66
66
|
@apply flex w-full flex-col items-start gap-4; /* 16px */
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
+
/* Rev3: Supporting/Caption Strong (12/18/500) — bound now — with no
|
|
70
|
+
text-transform: Figma types the caps into the sample string. */
|
|
69
71
|
.vd-stepper-title {
|
|
70
72
|
@apply w-full;
|
|
71
|
-
@apply text-
|
|
72
|
-
@apply uppercase tracking-[0.5px];
|
|
73
|
+
@apply text-supporting-caption-strong;
|
|
73
74
|
@apply text-content-secondary;
|
|
74
75
|
}
|
|
75
76
|
|
|
@@ -96,4 +96,11 @@
|
|
|
96
96
|
.vd-switch:has(.vd-switch-input:focus-visible) {
|
|
97
97
|
@apply focus-ring;
|
|
98
98
|
}
|
|
99
|
+
|
|
100
|
+
/* Ring — a Figma boolean since Rev3: 2px Primary/Main OUTSIDE, following
|
|
101
|
+
the track's pill radius. */
|
|
102
|
+
.vd-switch.vd-with-ring {
|
|
103
|
+
outline: var(--border-micro) solid var(--color-primary);
|
|
104
|
+
outline-offset: 0;
|
|
105
|
+
}
|
|
99
106
|
}
|
package/src/components/tabs.css
CHANGED
|
@@ -24,6 +24,48 @@
|
|
|
24
24
|
* actually does — a tab that swaps a panel is a tablist; one that sets a form
|
|
25
25
|
* value is a radiogroup.
|
|
26
26
|
*
|
|
27
|
+
* THE TABLIST KEYBOARD CONTRACT IS THE CONSUMER'S — the library ships no
|
|
28
|
+
* JavaScript. role="tab" promises arrow-key navigation: Left/Right (and
|
|
29
|
+
* Home/End) move focus along the list with a roving tabindex (the inactive
|
|
30
|
+
* tabs carry tabindex="-1"), Tab leaves the list, and each tab points at its
|
|
31
|
+
* panel with aria-controls. Without that wiring, role="tablist" over-promises
|
|
32
|
+
* to a screen reader — use plain links/buttons (no tab roles) when there is
|
|
33
|
+
* no script. The KeyboardReference story wires the full pattern.
|
|
34
|
+
*
|
|
35
|
+
* REV3 TYPE (2026-09-30) — the weight story INVERTED. underline lg binds
|
|
36
|
+
* Action/Default (13/18/500) in every state: the old 500 -> 600 active bump
|
|
37
|
+
* is GONE at lg. Every SM-height type (underline sm, chip, segment) binds
|
|
38
|
+
* Action/Compact (12/16/500) at rest and steps to Action/Compact Active
|
|
39
|
+
* (600) when active. The subtitle is Action/Compact Active in Primary/Main
|
|
40
|
+
* (it was 8px Micro S - Bold; it is 12px now).
|
|
41
|
+
*
|
|
42
|
+
* CHIP/SEGMENT REST INK IS Content/Secondary BY DECISION (2026-09-30), NOT
|
|
43
|
+
* FIGMA'S Content/Tertiary: Tertiary measures 4.26:1 on Surface/Frame — the
|
|
44
|
+
* segment selector's own fill — for 12px text. Hover feedback survives via
|
|
45
|
+
* the Action/Subtle fill; active is Content/Primary + 600. Pinned
|
|
46
|
+
* divergence; designer-list item.
|
|
47
|
+
*
|
|
48
|
+
* ACTIVE TABS DO NOT SHIFT THEIR NEIGHBOURS — RESERVE THE BOLD WIDTH. Every
|
|
49
|
+
* SM-height type steps 500 -> 600 when active, which widens the label: left
|
|
50
|
+
* alone, switching tabs moved widths by up to 3.8px and neighbours by ~3px
|
|
51
|
+
* (measured in Chromium; Figma itself draws the shift — its active chip is
|
|
52
|
+
* 80 wide against rest's 79). Wrap the label in `.vd-tab-label` with a
|
|
53
|
+
* matching `data-label`, and a hidden 600-weight ghost reserves the bold
|
|
54
|
+
* width at rest, so nothing reflows on selection:
|
|
55
|
+
*
|
|
56
|
+
* <button class="vd-tab vd-tab-chip" role="tab" aria-selected="false">
|
|
57
|
+
* <span class="vd-tab-label" data-label="Overview">Overview</span>
|
|
58
|
+
* </button>
|
|
59
|
+
*
|
|
60
|
+
* A deliberate divergence — rest tabs render at their bold width, ~1px wider
|
|
61
|
+
* than Figma's rest frames (designer-list item 44). Bare text still works and
|
|
62
|
+
* shifts exactly as Figma draws. underline lg never changes weight and does
|
|
63
|
+
* not need the wrapper.
|
|
64
|
+
*
|
|
65
|
+
* THE LABEL-BADGE GAP SHIPS AT A SINGLE 10px ON UNDERLINE. Figma authors
|
|
66
|
+
* Spacing/8 at rest but Spacing/10 on hover AND active — a gap that moves on
|
|
67
|
+
* hover reflows the row. One value, the majority's; designer-list item.
|
|
68
|
+
*
|
|
27
69
|
* CHIP AND SEGMENT ARE ONE CONTROL WITH TWO SKINS. They differ in exactly two
|
|
28
70
|
* declarations — radius (6px vs 2px) and active fill (a grey tint vs white).
|
|
29
71
|
* Height, padding, gap, every text colour, the hover fill and the active
|
|
@@ -31,10 +73,18 @@
|
|
|
31
73
|
*
|
|
32
74
|
* Size=sm exists for underline ONLY. Figma draws no small chip or segment.
|
|
33
75
|
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
* font-dependent.
|
|
76
|
+
* HEIGHTS ARE THE CONTROL LADDER (2026-09-24). Figma binds Height/Control on
|
|
77
|
+
* every variant: underline lg = LG (32), underline sm = SM (24, was 26),
|
|
78
|
+
* chip = SM (24, was 26), segment = SM (24, was 26). Applied as h-control-*,
|
|
79
|
+
* pinned with `height` (lg's line box is an Auto line height, font-dependent).
|
|
80
|
+
* Vertical padding is 0 — the box is the token and items-center centres the
|
|
81
|
+
* label; underline's old 8px / 6px padding-y and the chip's implied slack are
|
|
82
|
+
* gone. The active underline rule is a 2px bottom border inside the box.
|
|
83
|
+
*
|
|
84
|
+
* FIGMA LABEL DEFECT, mapped by measured height: chip and segment are
|
|
85
|
+
* labelled Size=lg in the file but BIND Height/Control/SM (24), while
|
|
86
|
+
* underline's Size=lg binds LG (32). One property value, two heights. The CSS
|
|
87
|
+
* follows the binding, not the label; the label is on the designer list.
|
|
38
88
|
*
|
|
39
89
|
* The badge slot is the existing Chip component — `.badge badge-neutral` maps
|
|
40
90
|
* onto it byte-for-byte. Do not build a new part for it. There is no icon slot
|
|
@@ -64,7 +114,7 @@
|
|
|
64
114
|
}
|
|
65
115
|
|
|
66
116
|
.vd-tabs-chip {
|
|
67
|
-
@apply gap-3 px-3 py-
|
|
117
|
+
@apply gap-3 px-3 py-2; /* 12px gap, 12px / 8px inset padding (Rev3 — was 6) */
|
|
68
118
|
}
|
|
69
119
|
|
|
70
120
|
/* --- Item (defaults to underline, lg) ---------------------------------- */
|
|
@@ -91,29 +141,58 @@
|
|
|
91
141
|
|
|
92
142
|
/* --- Parts ------------------------------------------------------------- */
|
|
93
143
|
|
|
94
|
-
/* Optional second line.
|
|
95
|
-
colour you would expect of a subtitle
|
|
144
|
+
/* Optional second line. Rev3: Action/Compact Active in Primary/Main — note
|
|
145
|
+
it is NOT the muted colour you would expect of a subtitle, and it grew
|
|
146
|
+
from the old 8px Micro S - Bold. */
|
|
96
147
|
.vd-tab-subtitle {
|
|
97
148
|
@apply block;
|
|
98
|
-
@apply text-
|
|
149
|
+
@apply text-action-compact-active text-primary; /* 12 / 16 / 600 */
|
|
99
150
|
}
|
|
100
151
|
|
|
101
152
|
/* The badge slot is `.vd-badge badge-neutral` from chip.css — no part here. */
|
|
102
153
|
|
|
154
|
+
/* The width-stable label (see the header). A single-column inline grid: the
|
|
155
|
+
visible text is row 1; the ::after ghost — the same string at the active
|
|
156
|
+
600 weight, from data-label — is a zero-height row 2, so the COLUMN is as
|
|
157
|
+
wide as the bold label in every state and selection reflows nothing. */
|
|
158
|
+
.vd-tab-label {
|
|
159
|
+
display: inline-grid;
|
|
160
|
+
justify-items: center;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.vd-tab-label::after {
|
|
164
|
+
content: attr(data-label);
|
|
165
|
+
font-weight: 600;
|
|
166
|
+
height: 0;
|
|
167
|
+
overflow: hidden;
|
|
168
|
+
visibility: hidden;
|
|
169
|
+
pointer-events: none;
|
|
170
|
+
user-select: none;
|
|
171
|
+
}
|
|
172
|
+
|
|
103
173
|
/* --- Types ------------------------------------------------------------- */
|
|
104
174
|
|
|
105
175
|
.vd-tab-underline {
|
|
106
|
-
|
|
176
|
+
/* Gap: a single 10px — Figma moves it 8 -> 10 on hover/active (see the
|
|
177
|
+
header); LG 32px, 6px padding-x, no padding-y */
|
|
178
|
+
@apply h-control-lg gap-2.5 px-1.5;
|
|
107
179
|
@apply rounded-none;
|
|
108
|
-
@apply text-action-
|
|
180
|
+
@apply text-action-default text-secondary; /* 13 / 18 / 500 */
|
|
109
181
|
}
|
|
110
182
|
|
|
111
183
|
/* chip and segment share everything but radius and active fill */
|
|
112
184
|
.vd-tab-chip,
|
|
113
185
|
.vd-tab-segment {
|
|
114
|
-
@apply h-
|
|
115
|
-
|
|
116
|
-
|
|
186
|
+
@apply h-control-sm gap-1 px-3; /* SM 24px (Figma labels it lg — see header), 4px gap, 12px padding-x */
|
|
187
|
+
/* The ACTIVE hairline, reserved transparent at rest: these boxes hug, so
|
|
188
|
+
a border that only appears when active widened the tab by the rendered
|
|
189
|
+
1px per side (measured Δ2px) and shifted its neighbours. Height is
|
|
190
|
+
pinned, so vertically it costs nothing. */
|
|
191
|
+
@apply border border-[length:var(--border-thin)] border-transparent;
|
|
192
|
+
@apply text-action-compact; /* 12 / 16 / 500 — active steps to 600 since Rev3 */
|
|
193
|
+
/* Content/Secondary by decision — Figma's Tertiary is 4.26 on the segment
|
|
194
|
+
selector's own Surface/Frame fill. See the header. */
|
|
195
|
+
@apply text-content-secondary;
|
|
117
196
|
}
|
|
118
197
|
|
|
119
198
|
.vd-tab-chip {
|
|
@@ -133,8 +212,8 @@
|
|
|
133
212
|
Must stay AFTER .vd-tab-underline: both this and its active rule tie on
|
|
134
213
|
specificity with the underline rules, so source order decides. */
|
|
135
214
|
.vd-tab-sm {
|
|
136
|
-
@apply h-
|
|
137
|
-
@apply text-action-
|
|
215
|
+
@apply h-control-sm gap-2.5; /* SM 24px, 10px gap, no padding-y */
|
|
216
|
+
@apply text-action-compact; /* 12 / 16 / 500 */
|
|
138
217
|
}
|
|
139
218
|
|
|
140
219
|
/* --- States ------------------------------------------------------------ */
|
|
@@ -146,7 +225,7 @@
|
|
|
146
225
|
rebound it to `Content/Primary`, so the visual spec now asserts hover and
|
|
147
226
|
rest differ, which it previously could not. */
|
|
148
227
|
.vd-tab-underline:hover:not(:disabled):not([aria-disabled="true"]) {
|
|
149
|
-
@apply
|
|
228
|
+
@apply text-content-primary; /* the gap no longer moves — see the header */
|
|
150
229
|
}
|
|
151
230
|
|
|
152
231
|
.vd-tab-chip:hover:not(:disabled):not([aria-disabled="true"]),
|
|
@@ -164,25 +243,26 @@
|
|
|
164
243
|
@apply text-content-primary;
|
|
165
244
|
}
|
|
166
245
|
|
|
167
|
-
/* Underline: a 2px bottom rule
|
|
246
|
+
/* Underline lg: a 2px bottom rule and nothing else — the old 500 -> 600
|
|
247
|
+
active bump is GONE at lg since Rev3 (Action/Default in every state). */
|
|
168
248
|
.vd-tab-underline[aria-selected="true"],
|
|
169
249
|
.vd-tab-underline[aria-checked="true"] {
|
|
170
|
-
@apply gap-2.5; /* 10px — Figma widens the gap when active */
|
|
171
250
|
@apply border-b border-b-[length:var(--border-micro)] border-primary;
|
|
172
|
-
@apply text-action-l-bold; /* 13px / 600 */
|
|
173
251
|
}
|
|
174
252
|
|
|
175
253
|
.vd-tab-sm[aria-selected="true"],
|
|
176
254
|
.vd-tab-sm[aria-checked="true"] {
|
|
177
|
-
@apply text-action-
|
|
255
|
+
@apply text-action-compact-active; /* 12 / 16 / 600 */
|
|
178
256
|
}
|
|
179
257
|
|
|
180
|
-
/* chip and segment: a fill swap
|
|
258
|
+
/* chip and segment: a fill swap, a hairline, and since Rev3 the 600 weight
|
|
259
|
+
step every SM-height type takes (Action/Compact Active). */
|
|
181
260
|
.vd-tab-chip[aria-selected="true"],
|
|
182
261
|
.vd-tab-chip[aria-checked="true"],
|
|
183
262
|
.vd-tab-segment[aria-selected="true"],
|
|
184
263
|
.vd-tab-segment[aria-checked="true"] {
|
|
185
|
-
@apply border
|
|
264
|
+
@apply border-stroke-border; /* the hairline box is reserved at rest */
|
|
265
|
+
@apply text-action-compact-active; /* 12 / 16 / 600 */
|
|
186
266
|
}
|
|
187
267
|
|
|
188
268
|
.vd-tab-chip[aria-selected="true"],
|
|
@@ -202,12 +282,12 @@
|
|
|
202
282
|
@apply cursor-not-allowed opacity-50;
|
|
203
283
|
}
|
|
204
284
|
|
|
205
|
-
/* Ring — Figma boolean, hidden by default.
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
for a rarely-used affordance; flagged rather than silently claimed exact. */
|
|
285
|
+
/* Ring — Figma boolean, hidden by default. Rev3 draws it as a 2px
|
|
286
|
+
Primary/Main stroke aligned OUTSIDE, like Chip/Tag/Button/TextButton
|
|
287
|
+
(it was inset here): outline at zero offset, following each type's own
|
|
288
|
+
radius. */
|
|
210
289
|
.vd-tab.vd-with-ring {
|
|
211
|
-
|
|
290
|
+
outline: var(--border-micro) solid var(--color-primary);
|
|
291
|
+
outline-offset: 0;
|
|
212
292
|
}
|
|
213
293
|
}
|