@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.
- package/CHANGELOG.md +411 -4
- package/CLAUDE.md +809 -768
- package/COMPONENTS.md +520 -520
- package/GETTING_STARTED.md +14 -14
- package/QUICK_REFERENCE.md +22 -22
- package/README.md +28 -6
- package/TROUBLESHOOTING.md +6 -6
- package/class-manifest.json +664 -0
- package/design-methodology/dashboard.md +496 -0
- package/dist/dashboard-ui.css +4897 -0
- package/dist/index.css +502 -502
- package/examples/basic/index.html +8 -8
- package/examples/daisyui-starter/README.md +35 -0
- package/examples/daisyui-starter/check-no-bleed.mjs +81 -0
- package/examples/daisyui-starter/index.html +45 -0
- package/examples/daisyui-starter/package-lock.json +2221 -0
- package/examples/daisyui-starter/package.json +22 -0
- package/examples/daisyui-starter/postcss.config.js +1 -0
- package/examples/daisyui-starter/src/styles.css +20 -0
- package/examples/daisyui-starter/tailwind.config.js +12 -0
- package/examples/postcss-starter/index.html +8 -8
- package/examples/postcss-starter/package.json +1 -1
- package/examples/vite-starter/README.md +4 -4
- package/examples/vite-starter/package.json +1 -1
- package/examples/vite-starter/src/main.js +41 -41
- package/package.json +23 -4
- package/src/build/components.css +29 -0
- package/src/build/utilities.css +42 -0
- package/src/components/ICON-SYSTEM.md +39 -39
- package/src/components/alert.css +26 -26
- package/src/components/avatar.css +9 -9
- package/src/components/breadcrumbs.css +15 -15
- package/src/components/button.css +21 -21
- package/src/components/card.css +10 -10
- package/src/components/checkbox.css +21 -21
- package/src/components/chip.css +43 -43
- package/src/components/data-row.css +19 -19
- package/src/components/divider.css +23 -23
- package/src/components/dropdown-field.css +34 -34
- package/src/components/dropdown-menu.css +12 -12
- package/src/components/field-verification.css +25 -25
- package/src/components/filter-segment.css +20 -20
- package/src/components/icon-button.css +11 -11
- package/src/components/icon.css +18 -18
- package/src/components/input.css +29 -29
- package/src/components/link.css +28 -28
- package/src/components/loading-indicator.css +20 -20
- package/src/components/loading-inline.css +8 -8
- package/src/components/menu-item.css +28 -28
- package/src/components/modal.css +36 -36
- package/src/components/navigation-rail.css +95 -95
- package/src/components/pagination-item.css +22 -22
- package/src/components/pagination.css +24 -24
- package/src/components/pill.css +14 -14
- package/src/components/progress-bar.css +28 -28
- package/src/components/radio-select.css +13 -13
- package/src/components/section-marker.css +12 -12
- package/src/components/segment-selector.css +9 -9
- package/src/components/sensitive-data.css +8 -8
- package/src/components/skeleton.css +29 -29
- package/src/components/step.css +14 -14
- package/src/components/stepper.css +15 -15
- package/src/components/switch.css +12 -12
- package/src/components/tabs.css +40 -40
- package/src/components/tag.css +20 -20
- package/src/components/text-button.css +24 -24
- package/src/components/textarea.css +23 -23
- package/src/components/toast.css +29 -29
- package/src/components/tooltip.css +11 -11
- package/src/icons/README.md +16 -10
- package/src/icons/sprite.svg +1 -1
- package/src/themes/valiify-tokens.css +285 -0
- package/src/themes/valiify-type-prefixed.css +37 -0
- package/src/utilities/index.css +1 -1
- package/src/utility-surface.css +321 -0
- package/types/components.d.ts +235 -236
|
@@ -5,29 +5,29 @@
|
|
|
5
5
|
* Pagination (880:31248) — 2 variants on a single `Type` axis.
|
|
6
6
|
*
|
|
7
7
|
* Usage — numbered:
|
|
8
|
-
* <nav class="pagination" aria-label="Pagination">
|
|
9
|
-
* <div class="pagination-pages">
|
|
10
|
-
* <button class="pagination-item pagination-item-nav" aria-label="Previous page">…</button>
|
|
11
|
-
* <button class="pagination-item pagination-item-active" aria-current="page">1</button>
|
|
12
|
-
* <button class="pagination-item">2</button>
|
|
13
|
-
* <span class="pagination-item pagination-item-ellipsis" aria-hidden="true">...</span>
|
|
14
|
-
* <button class="pagination-item pagination-item-nav" aria-label="Next page">…</button>
|
|
8
|
+
* <nav class="vd-pagination" aria-label="Pagination">
|
|
9
|
+
* <div class="vd-pagination-pages">
|
|
10
|
+
* <button class="vd-pagination-item vd-pagination-item-nav" aria-label="Previous page">…</button>
|
|
11
|
+
* <button class="vd-pagination-item vd-pagination-item-active" aria-current="page">1</button>
|
|
12
|
+
* <button class="vd-pagination-item">2</button>
|
|
13
|
+
* <span class="vd-pagination-item vd-pagination-item-ellipsis" aria-hidden="true">...</span>
|
|
14
|
+
* <button class="vd-pagination-item vd-pagination-item-nav" aria-label="Next page">…</button>
|
|
15
15
|
* </div>
|
|
16
|
-
* <p class="pagination-summary">1-20 of 352</p>
|
|
16
|
+
* <p class="vd-pagination-summary">1-20 of 352</p>
|
|
17
17
|
* </nav>
|
|
18
18
|
*
|
|
19
19
|
* Usage — simple:
|
|
20
|
-
* <nav class="pagination" aria-label="Pagination">
|
|
21
|
-
* <button class="btn btn-outline btn-sm">
|
|
22
|
-
* <svg class="icon icon-size-13" aria-hidden="true"><use href="#chevron-left" /></svg>
|
|
20
|
+
* <nav class="vd-pagination" aria-label="Pagination">
|
|
21
|
+
* <button class="vd-btn vd-btn-outline vd-btn-sm">
|
|
22
|
+
* <svg class="vd-icon vd-icon-size-13" aria-hidden="true"><use href="#chevron-left" /></svg>
|
|
23
23
|
* Prev
|
|
24
24
|
* </button>
|
|
25
|
-
* <p class="pagination-status">
|
|
26
|
-
* Page <span class="pagination-status-current">7</span> of 18
|
|
25
|
+
* <p class="vd-pagination-status">
|
|
26
|
+
* Page <span class="vd-pagination-status-current">7</span> of 18
|
|
27
27
|
* </p>
|
|
28
|
-
* <button class="btn btn-outline btn-sm">
|
|
28
|
+
* <button class="vd-btn vd-btn-outline vd-btn-sm">
|
|
29
29
|
* Next
|
|
30
|
-
* <svg class="icon icon-size-13" aria-hidden="true"><use href="#chevron-right" /></svg>
|
|
30
|
+
* <svg class="vd-icon vd-icon-size-13" aria-hidden="true"><use href="#chevron-right" /></svg>
|
|
31
31
|
* </button>
|
|
32
32
|
* </nav>
|
|
33
33
|
*
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
* `.pagination-item` cells; the simple type's Prev and Next are literal Button
|
|
40
40
|
* instances, and their Figma geometry — 24px tall, 8px/5px padding, 5px gap,
|
|
41
41
|
* 6px radius, 0.5px `Stroke/Divider`, `Action S` 12/500 in `Content/Primary` —
|
|
42
|
-
* is `.btn .btn-outline .btn-sm` down to the pixel, with a 13px icon. Nothing
|
|
42
|
+
* is `.vd-btn .vd-btn-outline .vd-btn-sm` down to the pixel, with a 13px icon. Nothing
|
|
43
43
|
* new is defined for either.
|
|
44
44
|
*
|
|
45
45
|
* TWO FIGMA ODDITIES, reported rather than reproduced:
|
|
@@ -56,13 +56,13 @@
|
|
|
56
56
|
* are genuinely fixed and are pinned.
|
|
57
57
|
*
|
|
58
58
|
* The 4px gap between cells is `Spacing/4`, and it belongs to the bar rather
|
|
59
|
-
* than the item — `.pagination-item` sets no margin, so cells used outside this
|
|
59
|
+
* than the item — `.vd-pagination-item` sets no margin, so cells used outside this
|
|
60
60
|
* container space themselves.
|
|
61
61
|
*
|
|
62
62
|
* TWO TYPE READINGS ARE RAW, not named Figma styles:
|
|
63
|
-
* - `.pagination-summary` is 12px JetBrains Mono Regular, which is exactly
|
|
63
|
+
* - `.vd-pagination-summary` is 12px JetBrains Mono Regular, which is exactly
|
|
64
64
|
* `--text-data-xs`, so it maps cleanly.
|
|
65
|
-
* - `.pagination-status` is 13px Inter Regular with its current page in
|
|
65
|
+
* - `.vd-pagination-status` is 13px Inter Regular with its current page in
|
|
66
66
|
* Semi Bold. `--text-body-1` supplies 13px/400 but carries a 19.5px
|
|
67
67
|
* line-height where Figma is Auto, and there is no 13px Inter 600 token —
|
|
68
68
|
* `--text-body-1-bold` is Medium/500 — so the weight is stepped explicitly.
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
*/
|
|
72
72
|
|
|
73
73
|
@layer components {
|
|
74
|
-
.pagination {
|
|
74
|
+
.vd-pagination {
|
|
75
75
|
/* Both types. Full width so the ends sit against the table's edges. */
|
|
76
76
|
@apply flex w-full items-center justify-between;
|
|
77
77
|
}
|
|
@@ -79,12 +79,12 @@
|
|
|
79
79
|
/* --- Numbered ----------------------------------------------------------- */
|
|
80
80
|
|
|
81
81
|
/* The cell row. 4px gap — Spacing/4, owned by the bar, not the cell. */
|
|
82
|
-
.pagination-pages {
|
|
82
|
+
.vd-pagination-pages {
|
|
83
83
|
@apply flex shrink-0 items-center gap-1;
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
/* "1-20 of 352" */
|
|
87
|
-
.pagination-summary {
|
|
87
|
+
.vd-pagination-summary {
|
|
88
88
|
@apply shrink-0;
|
|
89
89
|
@apply text-data-xs font-mono; /* 12px / 16.5px / 400, JetBrains Mono */
|
|
90
90
|
@apply text-content-secondary;
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
/* --- Simple ------------------------------------------------------------- */
|
|
94
94
|
|
|
95
95
|
/* "Page 7 of 18" */
|
|
96
|
-
.pagination-status {
|
|
96
|
+
.vd-pagination-status {
|
|
97
97
|
@apply shrink-0;
|
|
98
98
|
@apply text-body-1; /* 13px / 400 — Figma's leading is Auto; see the header */
|
|
99
99
|
@apply text-content-secondary;
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
|
|
102
102
|
/* The page number inside the status. Inter Semi Bold in Figma, which no 13px
|
|
103
103
|
token carries — --text-body-1-bold is Medium. Stepped explicitly. */
|
|
104
|
-
.pagination-status-current {
|
|
104
|
+
.vd-pagination-status-current {
|
|
105
105
|
@apply font-semibold;
|
|
106
106
|
@apply text-content-primary;
|
|
107
107
|
}
|
package/src/components/pill.css
CHANGED
|
@@ -8,15 +8,15 @@
|
|
|
8
8
|
* selections and filter options."
|
|
9
9
|
*
|
|
10
10
|
* Usage — as a dropdown trigger:
|
|
11
|
-
* <button class="pill" aria-haspopup="listbox" aria-expanded="false">
|
|
11
|
+
* <button class="vd-pill" aria-haspopup="listbox" aria-expanded="false">
|
|
12
12
|
* John Smith
|
|
13
|
-
* <svg class="pill-chevron icon icon-size-13" aria-hidden="true">
|
|
13
|
+
* <svg class="vd-pill-chevron vd-icon vd-icon-size-13" aria-hidden="true">
|
|
14
14
|
* <use href="#chevron-down" />
|
|
15
15
|
* </svg>
|
|
16
16
|
* </button>
|
|
17
17
|
*
|
|
18
18
|
* Usage — as a filter toggle (no chevron):
|
|
19
|
-
* <button class="pill" aria-pressed="false">Overdue</button>
|
|
19
|
+
* <button class="vd-pill" aria-pressed="false">Overdue</button>
|
|
20
20
|
*
|
|
21
21
|
* ACTIVE MEANS TWO THINGS, and which one depends on the chevron. Figma draws a
|
|
22
22
|
* single "active" treatment but ships both a Dropdown=Yes and a Dropdown=No
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
*/
|
|
41
41
|
|
|
42
42
|
@layer components {
|
|
43
|
-
.pill {
|
|
43
|
+
.vd-pill {
|
|
44
44
|
/* Layout */
|
|
45
45
|
@apply inline-flex shrink-0 items-center gap-1.25; /* 5px gap */
|
|
46
46
|
@apply px-2.25 py-0.5; /* 9px / 2px */
|
|
@@ -66,43 +66,43 @@
|
|
|
66
66
|
/* --- Parts ------------------------------------------------------------ */
|
|
67
67
|
|
|
68
68
|
/* 13px trailing chevron. Present only on the Dropdown=Yes variant. */
|
|
69
|
-
.pill-chevron {
|
|
69
|
+
.vd-pill-chevron {
|
|
70
70
|
@apply shrink-0;
|
|
71
71
|
@apply transition-transform duration-150;
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
/* --- States ----------------------------------------------------------- */
|
|
75
75
|
|
|
76
|
-
.pill:hover:not(:disabled):not([aria-disabled="true"]) {
|
|
76
|
+
.vd-pill:hover:not(:disabled):not([aria-disabled="true"]) {
|
|
77
77
|
@apply bg-action-focused;
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
.pill:focus-visible {
|
|
80
|
+
.vd-pill:focus-visible {
|
|
81
81
|
@apply focus-ring;
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
/* Active — open (with a chevron) or selected (without one). */
|
|
85
|
-
.pill[aria-expanded="true"],
|
|
86
|
-
.pill[aria-pressed="true"],
|
|
87
|
-
.pill[aria-selected="true"] {
|
|
85
|
+
.vd-pill[aria-expanded="true"],
|
|
86
|
+
.vd-pill[aria-pressed="true"],
|
|
87
|
+
.vd-pill[aria-selected="true"] {
|
|
88
88
|
@apply bg-primary-soft text-primary;
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
/* Only an open menu flips the chevron. A selected pill does not. */
|
|
92
|
-
.pill[aria-expanded="true"] .pill-chevron {
|
|
92
|
+
.vd-pill[aria-expanded="true"] .vd-pill-chevron {
|
|
93
93
|
@apply rotate-180;
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
/* Figma has no disabled variant. Following the house convention so the
|
|
97
97
|
control is not silently clickable when a consumer disables it. */
|
|
98
|
-
.pill:disabled,
|
|
99
|
-
.pill[aria-disabled="true"] {
|
|
98
|
+
.vd-pill:disabled,
|
|
99
|
+
.vd-pill[aria-disabled="true"] {
|
|
100
100
|
@apply cursor-not-allowed opacity-50;
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
/* Ring — Figma boolean, hidden by default. Same 2px inset Primary/Main
|
|
104
104
|
treatment as Chip and Avatar. */
|
|
105
|
-
.pill.with-ring {
|
|
105
|
+
.vd-pill.vd-with-ring {
|
|
106
106
|
@apply ring-[length:var(--border-micro)] ring-inset ring-primary;
|
|
107
107
|
}
|
|
108
108
|
}
|
|
@@ -5,25 +5,25 @@
|
|
|
5
5
|
* and Bottom Content booleans and two text properties.
|
|
6
6
|
*
|
|
7
7
|
* Usage:
|
|
8
|
-
* <div class="progress-bar">
|
|
9
|
-
* <div class="progress-bar-header">
|
|
10
|
-
* <span class="progress-bar-title">Review completion</span>
|
|
11
|
-
* <span class="progress-bar-value">68%</span>
|
|
8
|
+
* <div class="vd-progress-bar">
|
|
9
|
+
* <div class="vd-progress-bar-header">
|
|
10
|
+
* <span class="vd-progress-bar-title">Review completion</span>
|
|
11
|
+
* <span class="vd-progress-bar-value">68%</span>
|
|
12
12
|
* </div>
|
|
13
13
|
*
|
|
14
|
-
* <div class="progress-bar-track" role="progressbar"
|
|
14
|
+
* <div class="vd-progress-bar-track" role="progressbar"
|
|
15
15
|
* aria-valuenow="68" aria-valuemin="0" aria-valuemax="100">
|
|
16
|
-
* <div class="progress-bar-fill" style="width: 68%"></div>
|
|
16
|
+
* <div class="vd-progress-bar-fill" style="width: 68%"></div>
|
|
17
17
|
* </div>
|
|
18
18
|
*
|
|
19
|
-
* <div class="progress-bar-legend">
|
|
20
|
-
* <span class="progress-bar-legend-item">
|
|
21
|
-
* <span class="progress-bar-legend-swatch"></span>
|
|
22
|
-
* <span class="progress-bar-legend-label">68% verified</span>
|
|
19
|
+
* <div class="vd-progress-bar-legend">
|
|
20
|
+
* <span class="vd-progress-bar-legend-item">
|
|
21
|
+
* <span class="vd-progress-bar-legend-swatch"></span>
|
|
22
|
+
* <span class="vd-progress-bar-legend-label">68% verified</span>
|
|
23
23
|
* </span>
|
|
24
|
-
* <span class="progress-bar-legend-item">
|
|
25
|
-
* <span class="progress-bar-legend-swatch progress-bar-legend-swatch-neutral"></span>
|
|
26
|
-
* <span class="progress-bar-legend-label">32% unaccounted</span>
|
|
24
|
+
* <span class="vd-progress-bar-legend-item">
|
|
25
|
+
* <span class="vd-progress-bar-legend-swatch vd-progress-bar-legend-swatch-neutral"></span>
|
|
26
|
+
* <span class="vd-progress-bar-legend-label">32% unaccounted</span>
|
|
27
27
|
* </span>
|
|
28
28
|
* </div>
|
|
29
29
|
* </div>
|
|
@@ -69,17 +69,17 @@
|
|
|
69
69
|
*/
|
|
70
70
|
|
|
71
71
|
@layer components {
|
|
72
|
-
.progress-bar {
|
|
72
|
+
.vd-progress-bar {
|
|
73
73
|
@apply flex w-full flex-col items-start gap-3; /* 12px */
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
/* --- Label row (Figma's Top Content boolean) ---------------------------- */
|
|
77
77
|
|
|
78
|
-
.progress-bar-header {
|
|
78
|
+
.vd-progress-bar-header {
|
|
79
79
|
@apply flex w-full items-center justify-between;
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
.progress-bar-title {
|
|
82
|
+
.vd-progress-bar-title {
|
|
83
83
|
@apply shrink-0;
|
|
84
84
|
@apply text-[11px] font-medium uppercase;
|
|
85
85
|
@apply leading-[normal] tracking-[0.5px];
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
/* Colour comes from the scheme — see the bottom of the file. */
|
|
90
|
-
.progress-bar-value {
|
|
90
|
+
.vd-progress-bar-value {
|
|
91
91
|
@apply shrink-0;
|
|
92
92
|
@apply text-[13px] font-medium;
|
|
93
93
|
@apply leading-[normal];
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
/* --- Track and fill ------------------------------------------------------ */
|
|
98
98
|
|
|
99
99
|
/* Full width by choice; Figma's 360 is a slip. See the header. */
|
|
100
|
-
.progress-bar-track {
|
|
100
|
+
.vd-progress-bar-track {
|
|
101
101
|
@apply flex w-full items-start overflow-hidden;
|
|
102
102
|
@apply h-[5px];
|
|
103
103
|
@apply rounded-pill;
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
/* The consumer sets the width — `style="width: 68%"` or a utility. */
|
|
108
|
-
.progress-bar-fill {
|
|
108
|
+
.vd-progress-bar-fill {
|
|
109
109
|
@apply h-full shrink-0;
|
|
110
110
|
@apply rounded-pill;
|
|
111
111
|
@apply bg-primary;
|
|
@@ -113,26 +113,26 @@
|
|
|
113
113
|
|
|
114
114
|
/* --- Legend row (Figma's Bottom Content boolean) ------------------------- */
|
|
115
115
|
|
|
116
|
-
.progress-bar-legend {
|
|
116
|
+
.vd-progress-bar-legend {
|
|
117
117
|
@apply flex w-full items-start gap-4; /* 16px */
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
-
.progress-bar-legend-item {
|
|
120
|
+
.vd-progress-bar-legend-item {
|
|
121
121
|
@apply inline-flex shrink-0 items-center gap-1.5; /* 6px */
|
|
122
122
|
}
|
|
123
123
|
|
|
124
|
-
.progress-bar-legend-swatch {
|
|
124
|
+
.vd-progress-bar-legend-swatch {
|
|
125
125
|
@apply size-2 shrink-0; /* 8px */
|
|
126
126
|
@apply rounded-micro; /* 2px */
|
|
127
127
|
@apply bg-primary;
|
|
128
128
|
}
|
|
129
129
|
|
|
130
130
|
/* The unaccounted remainder is Neutral/Main in both schemes. */
|
|
131
|
-
.progress-bar-legend-swatch-neutral {
|
|
131
|
+
.vd-progress-bar-legend-swatch-neutral {
|
|
132
132
|
@apply bg-neutral;
|
|
133
133
|
}
|
|
134
134
|
|
|
135
|
-
.progress-bar-legend-label {
|
|
135
|
+
.vd-progress-bar-legend-label {
|
|
136
136
|
@apply text-[12px] font-normal;
|
|
137
137
|
@apply leading-[normal];
|
|
138
138
|
@apply text-content-secondary;
|
|
@@ -142,16 +142,16 @@
|
|
|
142
142
|
|
|
143
143
|
/* Compound selectors so the scheme beats the base on specificity rather than
|
|
144
144
|
on source order, and so the neutral swatch is never recoloured. */
|
|
145
|
-
.progress-bar-success .progress-bar-value {
|
|
145
|
+
.vd-progress-bar-success .vd-progress-bar-value {
|
|
146
146
|
@apply text-approved-content;
|
|
147
147
|
}
|
|
148
148
|
|
|
149
|
-
.progress-bar-success .progress-bar-fill {
|
|
149
|
+
.vd-progress-bar-success .vd-progress-bar-fill {
|
|
150
150
|
@apply bg-approved;
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
-
.progress-bar-success
|
|
154
|
-
.progress-bar-legend-swatch:not(.progress-bar-legend-swatch-neutral) {
|
|
153
|
+
.vd-progress-bar-success
|
|
154
|
+
.vd-progress-bar-legend-swatch:not(.vd-progress-bar-legend-swatch-neutral) {
|
|
155
155
|
@apply bg-approved;
|
|
156
156
|
}
|
|
157
157
|
}
|
|
@@ -10,20 +10,20 @@
|
|
|
10
10
|
* Typography: var(--text-caption) for label
|
|
11
11
|
*
|
|
12
12
|
* Usage:
|
|
13
|
-
* <label class="radio-select">
|
|
14
|
-
* <input type="radio" name="group" class="radio-select-input" />
|
|
15
|
-
* <span class="radio-select-label">Label text</span>
|
|
13
|
+
* <label class="vd-radio-select">
|
|
14
|
+
* <input type="radio" name="group" class="vd-radio-select-input" />
|
|
15
|
+
* <span class="vd-radio-select-label">Label text</span>
|
|
16
16
|
* </label>
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
19
|
@layer components {
|
|
20
|
-
.radio-select {
|
|
20
|
+
.vd-radio-select {
|
|
21
21
|
/* Layout - horizontal with gap between radio and label */
|
|
22
22
|
@apply inline-flex items-center gap-2.25; /* Figma Spacing/9 (9px) */
|
|
23
23
|
@apply cursor-pointer;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
.radio-select-input {
|
|
26
|
+
.vd-radio-select-input {
|
|
27
27
|
/* Reset native appearance */
|
|
28
28
|
@apply appearance-none;
|
|
29
29
|
@apply m-0 p-0;
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
/* Inner dot (selected state) - created with ::before pseudo-element */
|
|
50
|
-
.radio-select-input:checked::before {
|
|
50
|
+
.vd-radio-select-input:checked::before {
|
|
51
51
|
@apply content-[''];
|
|
52
52
|
@apply absolute;
|
|
53
53
|
@apply inset-0 m-auto; /* Center the 8px dot in the 15px circle */
|
|
@@ -57,33 +57,33 @@
|
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
/* Hover state */
|
|
60
|
-
.radio-select-input:hover:not(:disabled) {
|
|
60
|
+
.vd-radio-select-input:hover:not(:disabled) {
|
|
61
61
|
@apply border-secondary; /* Figma Secondary/Main */
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
/* Active/Selected state - border changes to primary */
|
|
65
|
-
.radio-select-input:checked {
|
|
65
|
+
.vd-radio-select-input:checked {
|
|
66
66
|
@apply border-primary; /* Figma Primary/Main */
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
/* Focused state - keyboard navigation ring */
|
|
70
|
-
.radio-select-input:focus-visible {
|
|
70
|
+
.vd-radio-select-input:focus-visible {
|
|
71
71
|
@apply focus-ring; /* Figma Menu Item > Ring: 2px Primary/Main */
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
/* Disabled state */
|
|
75
|
-
.radio-select-input:disabled {
|
|
75
|
+
.vd-radio-select-input:disabled {
|
|
76
76
|
@apply cursor-not-allowed;
|
|
77
77
|
@apply border-stroke-divider bg-surface-paper; /* Figma Stroke/Divider */
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
/* Disabled selected state - keep the dot but with disabled styling */
|
|
81
|
-
.radio-select-input:disabled:checked::before {
|
|
81
|
+
.vd-radio-select-input:disabled:checked::before {
|
|
82
82
|
@apply bg-stroke-divider; /* Match the disabled border */
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
/* Label text */
|
|
86
|
-
.radio-select-label {
|
|
86
|
+
.vd-radio-select-label {
|
|
87
87
|
/* Typography from Figma */
|
|
88
88
|
@apply text-caption; /* Figma Body Content/Caption (12px/18px/400) */
|
|
89
89
|
@apply text-content-primary; /* Default text color */
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
/* Disabled label text */
|
|
94
|
-
.radio-select:has(.radio-select-input:disabled) .radio-select-label {
|
|
94
|
+
.vd-radio-select:has(.vd-radio-select-input:disabled) .vd-radio-select-label {
|
|
95
95
|
@apply text-content-tertiary; /* Figma Content/Tertiary */
|
|
96
96
|
}
|
|
97
97
|
}
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
* `Status` axis, plus a Ring boolean.
|
|
7
7
|
*
|
|
8
8
|
* Usage:
|
|
9
|
-
* <span class="section-marker section-marker-approve" role="img" aria-label="Approved">
|
|
10
|
-
* <svg class="icon icon-size-14" aria-hidden="true"><use href="#check" /></svg>
|
|
9
|
+
* <span class="vd-section-marker vd-section-marker-approve" role="img" aria-label="Approved">
|
|
10
|
+
* <svg class="vd-icon vd-icon-size-14" aria-hidden="true"><use href="#check" /></svg>
|
|
11
11
|
* </span>
|
|
12
12
|
*
|
|
13
|
-
* <span class="section-marker section-marker-mismatch" role="img" aria-label="Mismatch">
|
|
14
|
-
* <span class="section-marker-dot"></span>
|
|
13
|
+
* <span class="vd-section-marker vd-section-marker-mismatch" role="img" aria-label="Mismatch">
|
|
14
|
+
* <span class="vd-section-marker-dot"></span>
|
|
15
15
|
* </span>
|
|
16
16
|
*
|
|
17
17
|
* A 16x16 box in every status. What goes inside it is NOT uniform, which is the
|
|
@@ -51,16 +51,16 @@
|
|
|
51
51
|
*/
|
|
52
52
|
|
|
53
53
|
@layer components {
|
|
54
|
-
.section-marker {
|
|
54
|
+
.vd-section-marker {
|
|
55
55
|
/* A fixed 16x16 box in every status, so a column of markers aligns. */
|
|
56
56
|
@apply inline-flex size-4 shrink-0 items-center justify-center;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
/* --- Parts -------------------------------------------------------------- */
|
|
60
60
|
|
|
61
|
-
/* mismatch's mark. A filled 8px circle — not an icon, and not `.dot`, whose
|
|
61
|
+
/* mismatch's mark. A filled 8px circle — not an icon, and not `.vd-dot`, whose
|
|
62
62
|
Figma sizes are 5px and 7px. Colour comes from the status class. */
|
|
63
|
-
.section-marker-dot {
|
|
63
|
+
.vd-section-marker-dot {
|
|
64
64
|
@apply size-2; /* 8px, leaving Figma's 4px inset in the 16px box */
|
|
65
65
|
@apply rounded-pill;
|
|
66
66
|
@apply bg-current;
|
|
@@ -69,19 +69,19 @@
|
|
|
69
69
|
/* --- Statuses ----------------------------------------------------------- */
|
|
70
70
|
|
|
71
71
|
/* Each sets only a colour; icons inherit it through currentColor, and
|
|
72
|
-
`.section-marker-dot` picks it up via bg-current. */
|
|
72
|
+
`.vd-section-marker-dot` picks it up via bg-current. */
|
|
73
73
|
|
|
74
|
-
.section-marker-approve {
|
|
74
|
+
.vd-section-marker-approve {
|
|
75
75
|
@apply text-approved;
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
-
.section-marker-mismatch {
|
|
78
|
+
.vd-section-marker-mismatch {
|
|
79
79
|
@apply text-critical;
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
/* Secondary/Main, not Content/Secondary — they resolve to the same #5b5b68,
|
|
83
83
|
but Figma binds the Secondary ramp here. */
|
|
84
|
-
.section-marker-unverified {
|
|
84
|
+
.vd-section-marker-unverified {
|
|
85
85
|
@apply text-secondary;
|
|
86
86
|
}
|
|
87
87
|
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
/* Figma boolean, hidden by default. Same 2px inset Primary/Main treatment as
|
|
91
91
|
Chip, Avatar, Pill, Tag and TextButton — square here, since the box has no
|
|
92
92
|
radius. */
|
|
93
|
-
.section-marker.with-ring {
|
|
93
|
+
.vd-section-marker.vd-with-ring {
|
|
94
94
|
@apply ring-[length:var(--border-micro)] ring-inset ring-primary;
|
|
95
95
|
}
|
|
96
96
|
}
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
* from `Tabs Type=segment` instances. So its children are `.tab tab-segment`;
|
|
11
11
|
* this file only styles the frame.
|
|
12
12
|
*
|
|
13
|
-
* <div class="segment-selector" role="radiogroup" aria-label="View">
|
|
14
|
-
* <button class="tab tab-segment" role="radio" aria-checked="true">Overview</button>
|
|
15
|
-
* <button class="tab tab-segment" role="radio" aria-checked="false">Detail</button>
|
|
13
|
+
* <div class="vd-segment-selector" role="radiogroup" aria-label="View">
|
|
14
|
+
* <button class="vd-tab vd-tab-segment" role="radio" aria-checked="true">Overview</button>
|
|
15
|
+
* <button class="vd-tab vd-tab-segment" role="radio" aria-checked="false">Detail</button>
|
|
16
16
|
* </div>
|
|
17
17
|
*
|
|
18
18
|
* Use `role="tablist"` + `role="tab"` + `aria-selected` instead when the
|
|
@@ -29,13 +29,13 @@
|
|
|
29
29
|
* rather than compressing the segments, and there is no overflow handling,
|
|
30
30
|
* which is why the description caps it at 2-5 options.
|
|
31
31
|
*
|
|
32
|
-
* `.segment-selector-fill` is an addition, not from Figma: it distributes the
|
|
32
|
+
* `.vd-segment-selector-fill` is an addition, not from Figma: it distributes the
|
|
33
33
|
* segments equally, which is what most people expect of a segmented control
|
|
34
34
|
* and what you want when the labels differ in length. Opt in.
|
|
35
35
|
*/
|
|
36
36
|
|
|
37
37
|
@layer components {
|
|
38
|
-
.segment-selector {
|
|
38
|
+
.vd-segment-selector {
|
|
39
39
|
/* Layout — 1px frame around the segments, no gap between them */
|
|
40
40
|
@apply inline-flex items-center gap-0;
|
|
41
41
|
@apply p-0.25; /* 1px */
|
|
@@ -50,11 +50,11 @@
|
|
|
50
50
|
|
|
51
51
|
/* --- Equal-width segments (NOT from Figma) ---------------------------- */
|
|
52
52
|
|
|
53
|
-
.segment-selector-fill {
|
|
53
|
+
.vd-segment-selector-fill {
|
|
54
54
|
@apply flex w-full;
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
.segment-selector-fill > .tab {
|
|
57
|
+
.vd-segment-selector-fill > .vd-tab {
|
|
58
58
|
@apply flex-1;
|
|
59
59
|
}
|
|
60
60
|
|
|
@@ -68,11 +68,11 @@
|
|
|
68
68
|
|
|
69
69
|
It does carry Figma's Ring boolean, at the container's own 4px radius
|
|
70
70
|
rather than the segments' 2px. */
|
|
71
|
-
.segment-selector:focus-visible {
|
|
71
|
+
.vd-segment-selector:focus-visible {
|
|
72
72
|
@apply focus-ring;
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
.segment-selector.with-ring {
|
|
75
|
+
.vd-segment-selector.vd-with-ring {
|
|
76
76
|
@apply ring-[length:var(--border-micro)] ring-inset ring-primary;
|
|
77
77
|
}
|
|
78
78
|
}
|
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
* and the usual hidden Ring boolean.
|
|
8
8
|
*
|
|
9
9
|
* Usage:
|
|
10
|
-
* <span class="sensitive-data">
|
|
11
|
-
* <span class="sensitive-data-value">***-**-1234</span>
|
|
12
|
-
* <button class="icon-button icon-button-md" aria-pressed="true"
|
|
10
|
+
* <span class="vd-sensitive-data">
|
|
11
|
+
* <span class="vd-sensitive-data-value">***-**-1234</span>
|
|
12
|
+
* <button class="vd-icon-button vd-icon-button-md" aria-pressed="true"
|
|
13
13
|
* aria-label="Show full value">
|
|
14
|
-
* <svg class="icon icon-size-14" aria-hidden="true"><use href="#eye-off" /></svg>
|
|
14
|
+
* <svg class="vd-icon vd-icon-size-14" aria-hidden="true"><use href="#eye-off" /></svg>
|
|
15
15
|
* </button>
|
|
16
16
|
* </span>
|
|
17
17
|
*
|
|
@@ -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. `.icon-button-md`'s 2px fits exactly, so
|
|
49
|
+
* leaves 6px for a 14px icon. `.vd-icon-button-md`'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
|
*
|
|
@@ -57,13 +57,13 @@
|
|
|
57
57
|
*/
|
|
58
58
|
|
|
59
59
|
@layer components {
|
|
60
|
-
.sensitive-data {
|
|
60
|
+
.vd-sensitive-data {
|
|
61
61
|
/* Layout — 4px (Spacing/4) between the value and its toggle. */
|
|
62
62
|
@apply inline-flex items-center gap-1;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
/* Body Content/Caption, 12px / 18px / 400. */
|
|
66
|
-
.sensitive-data-value {
|
|
66
|
+
.vd-sensitive-data-value {
|
|
67
67
|
@apply text-caption text-content-primary;
|
|
68
68
|
}
|
|
69
69
|
|
|
@@ -71,7 +71,7 @@
|
|
|
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
|
-
.sensitive-data.with-ring {
|
|
74
|
+
.vd-sensitive-data.vd-with-ring {
|
|
75
75
|
@apply ring-[length:var(--border-micro)] ring-inset ring-primary;
|
|
76
76
|
}
|
|
77
77
|
}
|