@valiify/dashboard-ui 0.1.1 → 0.2.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 (76) hide show
  1. package/CHANGELOG.md +411 -4
  2. package/CLAUDE.md +809 -768
  3. package/COMPONENTS.md +520 -520
  4. package/GETTING_STARTED.md +14 -14
  5. package/QUICK_REFERENCE.md +22 -22
  6. package/README.md +28 -6
  7. package/TROUBLESHOOTING.md +6 -6
  8. package/class-manifest.json +664 -0
  9. package/design-methodology/dashboard.md +496 -0
  10. package/dist/dashboard-ui.css +4897 -0
  11. package/dist/index.css +502 -502
  12. package/examples/basic/index.html +8 -8
  13. package/examples/daisyui-starter/README.md +35 -0
  14. package/examples/daisyui-starter/check-no-bleed.mjs +81 -0
  15. package/examples/daisyui-starter/index.html +45 -0
  16. package/examples/daisyui-starter/package-lock.json +2221 -0
  17. package/examples/daisyui-starter/package.json +22 -0
  18. package/examples/daisyui-starter/postcss.config.js +1 -0
  19. package/examples/daisyui-starter/src/styles.css +20 -0
  20. package/examples/daisyui-starter/tailwind.config.js +12 -0
  21. package/examples/postcss-starter/index.html +8 -8
  22. package/examples/postcss-starter/package.json +1 -1
  23. package/examples/vite-starter/README.md +4 -4
  24. package/examples/vite-starter/package.json +1 -1
  25. package/examples/vite-starter/src/main.js +41 -41
  26. package/package.json +23 -4
  27. package/src/build/components.css +29 -0
  28. package/src/build/utilities.css +42 -0
  29. package/src/components/ICON-SYSTEM.md +39 -39
  30. package/src/components/alert.css +26 -26
  31. package/src/components/avatar.css +9 -9
  32. package/src/components/breadcrumbs.css +15 -15
  33. package/src/components/button.css +21 -21
  34. package/src/components/card.css +10 -10
  35. package/src/components/checkbox.css +21 -21
  36. package/src/components/chip.css +43 -43
  37. package/src/components/data-row.css +19 -19
  38. package/src/components/divider.css +23 -23
  39. package/src/components/dropdown-field.css +34 -34
  40. package/src/components/dropdown-menu.css +12 -12
  41. package/src/components/field-verification.css +25 -25
  42. package/src/components/filter-segment.css +20 -20
  43. package/src/components/icon-button.css +11 -11
  44. package/src/components/icon.css +18 -18
  45. package/src/components/input.css +29 -29
  46. package/src/components/link.css +28 -28
  47. package/src/components/loading-indicator.css +20 -20
  48. package/src/components/loading-inline.css +8 -8
  49. package/src/components/menu-item.css +28 -28
  50. package/src/components/modal.css +36 -36
  51. package/src/components/navigation-rail.css +95 -95
  52. package/src/components/pagination-item.css +22 -22
  53. package/src/components/pagination.css +24 -24
  54. package/src/components/pill.css +14 -14
  55. package/src/components/progress-bar.css +28 -28
  56. package/src/components/radio-select.css +13 -13
  57. package/src/components/section-marker.css +12 -12
  58. package/src/components/segment-selector.css +9 -9
  59. package/src/components/sensitive-data.css +8 -8
  60. package/src/components/skeleton.css +29 -29
  61. package/src/components/step.css +14 -14
  62. package/src/components/stepper.css +15 -15
  63. package/src/components/switch.css +12 -12
  64. package/src/components/tabs.css +40 -40
  65. package/src/components/tag.css +20 -20
  66. package/src/components/text-button.css +24 -24
  67. package/src/components/textarea.css +23 -23
  68. package/src/components/toast.css +29 -29
  69. package/src/components/tooltip.css +11 -11
  70. package/src/icons/README.md +16 -10
  71. package/src/icons/sprite.svg +1 -1
  72. package/src/themes/valiify-tokens.css +285 -0
  73. package/src/themes/valiify-type-prefixed.css +37 -0
  74. package/src/utilities/index.css +1 -1
  75. package/src/utility-surface.css +321 -0
  76. package/types/components.d.ts +235 -236
@@ -8,17 +8,17 @@
8
8
  *
9
9
  * Usage — a skeleton is decorative; the CONTAINER announces the loading state:
10
10
  * <div role="status" aria-busy="true" aria-label="Loading profile">
11
- * <span class="skeleton skeleton-circle skeleton-lg" aria-hidden="true"></span>
12
- * <span class="skeleton skeleton-heading skeleton-lg" aria-hidden="true"></span>
13
- * <span class="skeleton skeleton-line skeleton-md" aria-hidden="true"></span>
11
+ * <span class="vd-skeleton vd-skeleton-circle vd-skeleton-lg" aria-hidden="true"></span>
12
+ * <span class="vd-skeleton vd-skeleton-heading vd-skeleton-lg" aria-hidden="true"></span>
13
+ * <span class="vd-skeleton vd-skeleton-line vd-skeleton-md" aria-hidden="true"></span>
14
14
  * </div>
15
15
  *
16
16
  * BOTH A SHAPE AND A SIZE CLASS ARE REQUIRED. Neither axis has a default in
17
17
  * Figma, and the dimensions are a 5x3 matrix rather than one box with three
18
18
  * scales — a Line SM is 120x12 while a Circle SM is 32x32. Baking a default
19
- * into `.skeleton` would mean every other combination overriding two
19
+ * into `.vd-skeleton` would mean every other combination overriding two
20
20
  * properties, which is the `:not()`-chain specificity trap Tabs already walked
21
- * into. A bare `.skeleton` therefore has fill and motion but no size, which
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
24
  * SHAPE CARRIES THE RADIUS, and it is a different token per shape — this is the
@@ -30,7 +30,7 @@
30
30
  * Circle full Radius/Rounded -> rounded-pill
31
31
  *
32
32
  * SIZE CARRIES THE DIMENSIONS, which is why the size classes are compound
33
- * (`.skeleton-line.skeleton-sm`) rather than standalone. Every one of the 15
33
+ * (`.vd-skeleton-line.vd-skeleton-sm`) rather than standalone. Every one of the 15
34
34
  * pairs maps to a standard Tailwind step — 120px is `w-30`, 180px is `h-45` —
35
35
  * so none needs arbitrary syntax.
36
36
  *
@@ -38,7 +38,7 @@
38
38
  * "stretch instances with fill in auto-layout to match real content widths",
39
39
  * while "heights should generally stay close to defaults to match the replaced
40
40
  * element". A consumer utility beats a component class under our layer order,
41
- * so `class="skeleton skeleton-line skeleton-md w-full"` just works.
41
+ * so `class="vd-skeleton vd-skeleton-line vd-skeleton-md w-full"` just works.
42
42
  *
43
43
  * THE ANIMATION IS A PULSE, AND FIGMA SPECIFIES IT PRECISELY — unusually, since
44
44
  * it draws no motion itself ("Animation is handled in code, not in Figma"):
@@ -79,7 +79,7 @@
79
79
  */
80
80
 
81
81
  @layer components {
82
- .skeleton {
82
+ .vd-skeleton {
83
83
  @apply block shrink-0;
84
84
  @apply bg-surface-neutral; /* Surface/Neutral #f1f1f4 — the only bound token */
85
85
 
@@ -89,73 +89,73 @@
89
89
 
90
90
  /* --- Shape: radius only ---------------------------------------------- */
91
91
 
92
- .skeleton-line,
93
- .skeleton-heading {
92
+ .vd-skeleton-line,
93
+ .vd-skeleton-heading {
94
94
  @apply rounded-tight; /* 4px — Radius/XS */
95
95
  }
96
96
 
97
- .skeleton-button {
97
+ .vd-skeleton-button {
98
98
  @apply rounded-control; /* 6px — Radius/SM */
99
99
  }
100
100
 
101
- .skeleton-rectangle {
101
+ .vd-skeleton-rectangle {
102
102
  @apply rounded-surface; /* 8px — Radius/MD */
103
103
  }
104
104
 
105
- .skeleton-circle {
105
+ .vd-skeleton-circle {
106
106
  @apply rounded-pill; /* Radius/Rounded */
107
107
  }
108
108
 
109
109
  /* --- Shape x Size: dimensions ---------------------------------------- */
110
110
  /* Defaults, not a spec — override the width with a utility. See the header. */
111
111
 
112
- .skeleton-line.skeleton-sm {
112
+ .vd-skeleton-line.vd-skeleton-sm {
113
113
  @apply h-3 w-30; /* 120 x 12 */
114
114
  }
115
- .skeleton-line.skeleton-md {
115
+ .vd-skeleton-line.vd-skeleton-md {
116
116
  @apply h-4 w-50; /* 200 x 16 */
117
117
  }
118
- .skeleton-line.skeleton-lg {
118
+ .vd-skeleton-line.vd-skeleton-lg {
119
119
  @apply h-5 w-80; /* 320 x 20 */
120
120
  }
121
121
 
122
- .skeleton-heading.skeleton-sm {
122
+ .vd-skeleton-heading.vd-skeleton-sm {
123
123
  @apply h-5 w-40; /* 160 x 20 */
124
124
  }
125
- .skeleton-heading.skeleton-md {
125
+ .vd-skeleton-heading.vd-skeleton-md {
126
126
  @apply h-6 w-60; /* 240 x 24 */
127
127
  }
128
- .skeleton-heading.skeleton-lg {
128
+ .vd-skeleton-heading.vd-skeleton-lg {
129
129
  @apply h-8 w-90; /* 360 x 32 */
130
130
  }
131
131
 
132
- .skeleton-circle.skeleton-sm {
132
+ .vd-skeleton-circle.vd-skeleton-sm {
133
133
  @apply size-8; /* 32 */
134
134
  }
135
- .skeleton-circle.skeleton-md {
135
+ .vd-skeleton-circle.vd-skeleton-md {
136
136
  @apply size-10; /* 40 */
137
137
  }
138
- .skeleton-circle.skeleton-lg {
138
+ .vd-skeleton-circle.vd-skeleton-lg {
139
139
  @apply size-14; /* 56 */
140
140
  }
141
141
 
142
- .skeleton-rectangle.skeleton-sm {
142
+ .vd-skeleton-rectangle.vd-skeleton-sm {
143
143
  @apply h-20 w-30; /* 120 x 80 */
144
144
  }
145
- .skeleton-rectangle.skeleton-md {
145
+ .vd-skeleton-rectangle.vd-skeleton-md {
146
146
  @apply h-30 w-50; /* 200 x 120 */
147
147
  }
148
- .skeleton-rectangle.skeleton-lg {
148
+ .vd-skeleton-rectangle.vd-skeleton-lg {
149
149
  @apply h-45 w-80; /* 320 x 180 */
150
150
  }
151
151
 
152
- .skeleton-button.skeleton-sm {
152
+ .vd-skeleton-button.vd-skeleton-sm {
153
153
  @apply h-8 w-16; /* 64 x 32 */
154
154
  }
155
- .skeleton-button.skeleton-md {
155
+ .vd-skeleton-button.vd-skeleton-md {
156
156
  @apply h-9 w-24; /* 96 x 36 */
157
157
  }
158
- .skeleton-button.skeleton-lg {
158
+ .vd-skeleton-button.vd-skeleton-lg {
159
159
  @apply h-10 w-32; /* 128 x 40 */
160
160
  }
161
161
 
@@ -165,7 +165,7 @@
165
165
  placeholder still communicates "loading" through the container's
166
166
  role="status"; the pulse is decoration, so it is safe to drop entirely. */
167
167
  @media (prefers-reduced-motion: reduce) {
168
- .skeleton {
168
+ .vd-skeleton {
169
169
  animation: none;
170
170
  }
171
171
  }
@@ -5,16 +5,16 @@
5
5
  * (1032:2012) — 3 variants on a `State` axis, plus a Step Title boolean.
6
6
  *
7
7
  * Usage:
8
- * <div class="step">
9
- * <span class="step-marker">
10
- * <svg class="icon icon-size-12" aria-hidden="true"><use href="#check" /></svg>
8
+ * <div class="vd-step">
9
+ * <span class="vd-step-marker">
10
+ * <svg class="vd-icon vd-icon-size-12" aria-hidden="true"><use href="#check" /></svg>
11
11
  * </span>
12
- * <span class="step-label">Intake</span>
12
+ * <span class="vd-step-label">Intake</span>
13
13
  * </div>
14
14
  *
15
- * <div class="step step-active" aria-current="step">
16
- * <span class="step-marker">3</span>
17
- * <span class="step-label">Review</span>
15
+ * <div class="vd-step vd-step-active" aria-current="step">
16
+ * <span class="vd-step-marker">3</span>
17
+ * <span class="vd-step-label">Review</span>
18
18
  * </div>
19
19
  *
20
20
  * COMPLETED IS THE BASE, being Figma's default variant. A bare `.step` is a
@@ -47,7 +47,7 @@
47
47
  */
48
48
 
49
49
  @layer components {
50
- .step {
50
+ .vd-step {
51
51
  @apply inline-flex shrink-0 flex-col items-center gap-1.5; /* 6px */
52
52
  }
53
53
 
@@ -55,7 +55,7 @@
55
55
 
56
56
  /* Completed: a filled circle. The transparent border keeps the outer box at
57
57
  24px so all three states align on a shared baseline. */
58
- .step-marker {
58
+ .vd-step-marker {
59
59
  @apply inline-flex size-6 shrink-0 items-center justify-center overflow-hidden;
60
60
  @apply rounded-pill;
61
61
 
@@ -69,7 +69,7 @@
69
69
  @apply text-[11px] font-medium leading-[normal];
70
70
  }
71
71
 
72
- .step-label {
72
+ .vd-step-label {
73
73
  @apply text-[10px] font-medium leading-[normal];
74
74
  @apply text-center uppercase tracking-[0.5px];
75
75
  @apply text-content-tertiary;
@@ -77,19 +77,19 @@
77
77
 
78
78
  /* --- State = active --------------------------------------------------- */
79
79
 
80
- .step-active .step-marker {
80
+ .vd-step-active .vd-step-marker {
81
81
  @apply bg-surface-paper text-primary;
82
82
  border-width: var(--border-micro); /* 2px — Stroke/Micro */
83
83
  @apply border-primary;
84
84
  }
85
85
 
86
- .step-active .step-label {
86
+ .vd-step-active .vd-step-label {
87
87
  @apply text-primary;
88
88
  }
89
89
 
90
90
  /* --- State = upcoming -------------------------------------------------- */
91
91
 
92
- .step-upcoming .step-marker {
92
+ .vd-step-upcoming .vd-step-marker {
93
93
  @apply bg-surface-paper text-neutral-strong;
94
94
  border-width: var(
95
95
  --border-line
@@ -99,7 +99,7 @@
99
99
 
100
100
  /* Regular, where completed and active are Medium — and DARKER than
101
101
  completed's label. See the header. */
102
- .step-upcoming .step-label {
102
+ .vd-step-upcoming .vd-step-label {
103
103
  @apply font-normal;
104
104
  @apply text-neutral-strong;
105
105
  }
@@ -5,16 +5,16 @@
5
5
  * (1032:2013) — a single symbol with a Stepper Title boolean.
6
6
  *
7
7
  * Usage:
8
- * <div class="stepper">
9
- * <p class="stepper-title">Stepped progression flow</p>
10
- * <div class="stepper-steps">
11
- * <div class="step"><span class="step-marker">…</span><span class="step-label">Intake</span></div>
12
- * <span class="stepper-connector stepper-connector-complete"></span>
13
- * <div class="step"><span class="step-marker">…</span><span class="step-label">Verify</span></div>
14
- * <span class="stepper-connector stepper-connector-complete"></span>
15
- * <div class="step step-active"><span class="step-marker">3</span><span class="step-label">Review</span></div>
16
- * <span class="stepper-connector"></span>
17
- * <div class="step step-upcoming"><span class="step-marker">4</span><span class="step-label">Decision</span></div>
8
+ * <div class="vd-stepper">
9
+ * <p class="vd-stepper-title">Stepped progression flow</p>
10
+ * <div class="vd-stepper-steps">
11
+ * <div class="vd-step"><span class="vd-step-marker">…</span><span class="vd-step-label">Intake</span></div>
12
+ * <span class="vd-stepper-connector vd-stepper-connector-complete"></span>
13
+ * <div class="vd-step"><span class="vd-step-marker">…</span><span class="vd-step-label">Verify</span></div>
14
+ * <span class="vd-stepper-connector vd-stepper-connector-complete"></span>
15
+ * <div class="vd-step vd-step-active"><span class="vd-step-marker">3</span><span class="vd-step-label">Review</span></div>
16
+ * <span class="vd-stepper-connector"></span>
17
+ * <div class="vd-step vd-step-upcoming"><span class="vd-step-marker">4</span><span class="vd-step-label">Decision</span></div>
18
18
  * </div>
19
19
  * </div>
20
20
  *
@@ -62,11 +62,11 @@
62
62
  */
63
63
 
64
64
  @layer components {
65
- .stepper {
65
+ .vd-stepper {
66
66
  @apply flex w-full flex-col items-start gap-4; /* 16px */
67
67
  }
68
68
 
69
- .stepper-title {
69
+ .vd-stepper-title {
70
70
  @apply w-full;
71
71
  @apply text-[11px] font-medium leading-[normal];
72
72
  @apply uppercase tracking-[0.5px];
@@ -74,20 +74,20 @@
74
74
  }
75
75
 
76
76
  /* 10px of side padding keeps the end markers off the container edge. */
77
- .stepper-steps {
77
+ .vd-stepper-steps {
78
78
  @apply flex w-full items-center overflow-hidden;
79
79
  @apply px-2.5; /* 10px */
80
80
  }
81
81
 
82
82
  /* Fills the space between two steps, so the row distributes itself however
83
83
  wide the labels turn out to be. */
84
- .stepper-connector {
84
+ .vd-stepper-connector {
85
85
  @apply h-0.5 min-w-px flex-1; /* 2px tall */
86
86
  @apply rounded-pill; /* 1px in Figma = half the height, so identical */
87
87
  @apply bg-stroke-border;
88
88
  }
89
89
 
90
- .stepper-connector-complete {
90
+ .vd-stepper-connector-complete {
91
91
  @apply bg-primary;
92
92
  }
93
93
  }
@@ -11,13 +11,13 @@
11
11
  * - States: off (default), on (:checked), hover, disabled, focus
12
12
  *
13
13
  * Usage:
14
- * <label class="switch">
15
- * <input type="checkbox" class="switch-input" />
14
+ * <label class="vd-switch">
15
+ * <input type="checkbox" class="vd-switch-input" />
16
16
  * </label>
17
17
  */
18
18
 
19
19
  @layer components {
20
- .switch {
20
+ .vd-switch {
21
21
  /* Layout */
22
22
  @apply inline-flex items-center;
23
23
  @apply relative;
@@ -38,12 +38,12 @@
38
38
  }
39
39
 
40
40
  /* The actual checkbox input - visually hidden but accessible */
41
- .switch-input {
41
+ .vd-switch-input {
42
42
  @apply sr-only;
43
43
  }
44
44
 
45
45
  /* Knob - implemented as ::before pseudo-element */
46
- .switch::before {
46
+ .vd-switch::before {
47
47
  content: "";
48
48
  @apply block;
49
49
  @apply w-[14px] h-[14px]; /* Exact 14px knob */
@@ -61,39 +61,39 @@
61
61
  /* --- States --------------------------------------------------------- */
62
62
 
63
63
  /* Hover - off state */
64
- .switch:has(.switch-input:hover:not(:disabled):not(:checked)) {
64
+ .vd-switch:has(.vd-switch-input:hover:not(:disabled):not(:checked)) {
65
65
  @apply bg-content-faint;
66
66
  }
67
67
 
68
68
  /* Disabled - off state */
69
- .switch:has(.switch-input:disabled:not(:checked)) {
69
+ .vd-switch:has(.vd-switch-input:disabled:not(:checked)) {
70
70
  @apply bg-secondary-soft;
71
71
  @apply cursor-not-allowed;
72
72
  }
73
73
 
74
74
  /* Checked (on) - default */
75
- .switch:has(.switch-input:checked) {
75
+ .vd-switch:has(.vd-switch-input:checked) {
76
76
  @apply bg-primary;
77
77
  }
78
78
 
79
79
  /* Checked (on) - hover */
80
- .switch:has(.switch-input:checked:hover:not(:disabled)) {
80
+ .vd-switch:has(.vd-switch-input:checked:hover:not(:disabled)) {
81
81
  @apply bg-primary-dark;
82
82
  }
83
83
 
84
84
  /* Checked (on) - disabled */
85
- .switch:has(.switch-input:checked:disabled) {
85
+ .vd-switch:has(.vd-switch-input:checked:disabled) {
86
86
  @apply bg-primary-disabled;
87
87
  @apply cursor-not-allowed;
88
88
  }
89
89
 
90
90
  /* Knob position when checked - slide to end */
91
- .switch:has(.switch-input:checked)::before {
91
+ .vd-switch:has(.vd-switch-input:checked)::before {
92
92
  transform: translateX(14px); /* Slide exactly one knob width */
93
93
  }
94
94
 
95
95
  /* Focus ring - keyboard navigation */
96
- .switch:has(.switch-input:focus-visible) {
96
+ .vd-switch:has(.vd-switch-input:focus-visible) {
97
97
  @apply focus-ring;
98
98
  }
99
99
  }
@@ -9,14 +9,14 @@
9
9
  * SELECTOR OR NAVIGATOR — the markup differs, the styling does not.
10
10
  *
11
11
  * Navigator (switches views):
12
- * <div class="tabs" role="tablist">
13
- * <button class="tab" role="tab" aria-selected="true" aria-controls="p1">Overview</button>
12
+ * <div class="vd-tabs" role="tablist">
13
+ * <button class="vd-tab" role="tab" aria-selected="true" aria-controls="p1">Overview</button>
14
14
  * </div>
15
15
  * <div id="p1" role="tabpanel">…</div>
16
16
  *
17
17
  * Selector (picks a value):
18
- * <div class="tabs" role="radiogroup" aria-label="View">
19
- * <button class="tab tab-segment" role="radio" aria-checked="true">Overview</button>
18
+ * <div class="vd-tabs" role="radiogroup" aria-label="View">
19
+ * <button class="vd-tab vd-tab-segment" role="radio" aria-checked="true">Overview</button>
20
20
  * </div>
21
21
  *
22
22
  * Both `aria-selected` and `aria-checked` drive the active styling, so the
@@ -52,33 +52,33 @@
52
52
 
53
53
  Only Segment has chrome; the other two are bare rows that differ in
54
54
  spacing. `.tabs` defaults to the underline row because it is the common
55
- case; `.tabs-chip` overrides it.
55
+ case; `.vd-tabs-chip` overrides it.
56
56
 
57
57
  Deliberately NOT encoded: Figma's Tab variant frame is a fixed 409×35 with
58
58
  18px horizontal and 3px vertical slack it has no padding to account for,
59
59
  and its children stretch to 35px rather than their natural 32. That reads
60
60
  as a hand-resized frame, not intent, so the row is derived from gap + item
61
61
  height instead. Raised with the designer. */
62
- .tabs {
62
+ .vd-tabs {
63
63
  @apply inline-flex items-center gap-2; /* 8px */
64
64
  }
65
65
 
66
- .tabs-chip {
66
+ .vd-tabs-chip {
67
67
  @apply gap-3 px-3 py-1.5; /* 12px gap, 12px / 6px inset padding */
68
68
  }
69
69
 
70
70
  /* --- Item (defaults to underline, lg) ---------------------------------- */
71
71
 
72
72
  /* Shared chrome only. A tab ALWAYS needs one of the three type classes —
73
- Type is a required axis in Figma with no default, and giving `.tab` a
73
+ Type is a required axis in Figma with no default, and giving `.vd-tab` a
74
74
  built-in default forced `:not()` chains whose specificity then outranked
75
- `.tab-sm`. Explicit is cheaper than clever here.
75
+ `.vd-tab-sm`. Explicit is cheaper than clever here.
76
76
 
77
77
  Note there is deliberately no `border-none`: it sets `--tw-border-style:
78
78
  none`, which the underline's active rule then inherits through
79
79
  `border-bottom-style: var(--tw-border-style)`, computing the 2px rule to
80
80
  zero. Tailwind's preflight already gives buttons a 0-width border. */
81
- .tab {
81
+ .vd-tab {
82
82
  /* Layout */
83
83
  @apply inline-flex shrink-0 items-center justify-center;
84
84
 
@@ -93,34 +93,34 @@
93
93
 
94
94
  /* Optional second line. 8px semibold in primary — note it is NOT the muted
95
95
  colour you would expect of a subtitle. */
96
- .tab-subtitle {
96
+ .vd-tab-subtitle {
97
97
  @apply block;
98
98
  @apply text-micro-s-bold text-primary; /* 8px / 600 / 0.4% */
99
99
  }
100
100
 
101
- /* The badge slot is `.badge badge-neutral` from chip.css — no part here. */
101
+ /* The badge slot is `.vd-badge badge-neutral` from chip.css — no part here. */
102
102
 
103
103
  /* --- Types ------------------------------------------------------------- */
104
104
 
105
- .tab-underline {
105
+ .vd-tab-underline {
106
106
  @apply h-8 gap-2 px-1.5 py-2; /* 32px, 8px gap, 6px / 8px */
107
107
  @apply rounded-none;
108
108
  @apply text-action-l text-secondary; /* 13px / 500 */
109
109
  }
110
110
 
111
111
  /* chip and segment share everything but radius and active fill */
112
- .tab-chip,
113
- .tab-segment {
112
+ .vd-tab-chip,
113
+ .vd-tab-segment {
114
114
  @apply h-[26px] gap-1 px-3; /* 26px, 4px gap, 12px padding-x */
115
115
  @apply text-action-s; /* 12px / 14px / 500 — no weight change when active */
116
116
  @apply text-content-tertiary;
117
117
  }
118
118
 
119
- .tab-chip {
119
+ .vd-tab-chip {
120
120
  @apply rounded-control; /* 6px */
121
121
  }
122
122
 
123
- .tab-segment {
123
+ .vd-tab-segment {
124
124
  @apply rounded-micro; /* 2px */
125
125
  }
126
126
 
@@ -130,9 +130,9 @@
130
130
  the type ramp; padding and indicator thickness are untouched. */
131
131
  /* underline only — Figma draws no small chip or segment. Changes height and
132
132
  the type ramp; padding and indicator thickness are untouched.
133
- Must stay AFTER .tab-underline: both this and its active rule tie on
133
+ Must stay AFTER .vd-tab-underline: both this and its active rule tie on
134
134
  specificity with the underline rules, so source order decides. */
135
- .tab-sm {
135
+ .vd-tab-sm {
136
136
  @apply h-[26px] gap-2.5 py-1.5; /* 26px, 10px gap, 6px */
137
137
  @apply text-action-s; /* 12px / 14px / 500 */
138
138
  }
@@ -145,60 +145,60 @@
145
145
  which resolves to the same #5b5b68 as rest's `Secondary/Main`. The designer
146
146
  rebound it to `Content/Primary`, so the visual spec now asserts hover and
147
147
  rest differ, which it previously could not. */
148
- .tab-underline:hover:not(:disabled):not([aria-disabled="true"]) {
148
+ .vd-tab-underline:hover:not(:disabled):not([aria-disabled="true"]) {
149
149
  @apply gap-2.5 text-content-primary; /* 10px — lg widens on hover too */
150
150
  }
151
151
 
152
- .tab-chip:hover:not(:disabled):not([aria-disabled="true"]),
153
- .tab-segment:hover:not(:disabled):not([aria-disabled="true"]) {
152
+ .vd-tab-chip:hover:not(:disabled):not([aria-disabled="true"]),
153
+ .vd-tab-segment:hover:not(:disabled):not([aria-disabled="true"]) {
154
154
  @apply bg-action-subtle text-content-secondary;
155
155
  }
156
156
 
157
- .tab:focus-visible {
157
+ .vd-tab:focus-visible {
158
158
  @apply focus-ring;
159
159
  }
160
160
 
161
161
  /* Active — `aria-selected` for a tablist, `aria-checked` for a radiogroup. */
162
- .tab[aria-selected="true"],
163
- .tab[aria-checked="true"] {
162
+ .vd-tab[aria-selected="true"],
163
+ .vd-tab[aria-checked="true"] {
164
164
  @apply text-content-primary;
165
165
  }
166
166
 
167
167
  /* Underline: a 2px bottom rule, and the label steps up to semibold. */
168
- .tab-underline[aria-selected="true"],
169
- .tab-underline[aria-checked="true"] {
168
+ .vd-tab-underline[aria-selected="true"],
169
+ .vd-tab-underline[aria-checked="true"] {
170
170
  @apply gap-2.5; /* 10px — Figma widens the gap when active */
171
171
  @apply border-b border-b-[length:var(--border-micro)] border-primary;
172
172
  @apply text-action-l-bold; /* 13px / 600 */
173
173
  }
174
174
 
175
- .tab-sm[aria-selected="true"],
176
- .tab-sm[aria-checked="true"] {
175
+ .vd-tab-sm[aria-selected="true"],
176
+ .vd-tab-sm[aria-checked="true"] {
177
177
  @apply text-action-s-bold; /* 12px / 600 */
178
178
  }
179
179
 
180
180
  /* chip and segment: a fill swap plus a hairline. No weight change. */
181
- .tab-chip[aria-selected="true"],
182
- .tab-chip[aria-checked="true"],
183
- .tab-segment[aria-selected="true"],
184
- .tab-segment[aria-checked="true"] {
181
+ .vd-tab-chip[aria-selected="true"],
182
+ .vd-tab-chip[aria-checked="true"],
183
+ .vd-tab-segment[aria-selected="true"],
184
+ .vd-tab-segment[aria-checked="true"] {
185
185
  @apply border border-[length:var(--border-thin)] border-stroke-border;
186
186
  }
187
187
 
188
- .tab-chip[aria-selected="true"],
189
- .tab-chip[aria-checked="true"] {
188
+ .vd-tab-chip[aria-selected="true"],
189
+ .vd-tab-chip[aria-checked="true"] {
190
190
  @apply bg-action-selected; /* grey tint */
191
191
  }
192
192
 
193
- .tab-segment[aria-selected="true"],
194
- .tab-segment[aria-checked="true"] {
193
+ .vd-tab-segment[aria-selected="true"],
194
+ .vd-tab-segment[aria-checked="true"] {
195
195
  @apply bg-surface-paper; /* white */
196
196
  }
197
197
 
198
198
  /* Not in Figma — house convention, so a disabled tab is not silently
199
199
  clickable. */
200
- .tab:disabled,
201
- .tab[aria-disabled="true"] {
200
+ .vd-tab:disabled,
201
+ .vd-tab[aria-disabled="true"] {
202
202
  @apply cursor-not-allowed opacity-50;
203
203
  }
204
204
 
@@ -207,7 +207,7 @@
207
207
  active underline so the ring wraps the rule, `-0.5px` on active chip and
208
208
  segment so it clears the hairline). A uniform inset ring is close enough
209
209
  for a rarely-used affordance; flagged rather than silently claimed exact. */
210
- .tab.with-ring {
210
+ .vd-tab.vd-with-ring {
211
211
  @apply ring-[length:var(--border-micro)] ring-inset ring-primary;
212
212
  }
213
213
  }