@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
|
@@ -7,25 +7,25 @@
|
|
|
7
7
|
* (state × filled × size × error).
|
|
8
8
|
*
|
|
9
9
|
* Structure — mirrors the Input component:
|
|
10
|
-
* <div class="dropdown-field-container">
|
|
11
|
-
* <div class="dropdown-field-label">…</div> <!-- Optional -->
|
|
12
|
-
* <div class="dropdown"> <!-- Positioning -->
|
|
13
|
-
* <button class="dropdown-field" aria-expanded="false" aria-haspopup="listbox">
|
|
14
|
-
* <span class="avatar avatar-sm">NC</span> <!-- Optional -->
|
|
15
|
-
* <svg class="dropdown-field-icon icon icon-size-14">…</svg> <!-- Optional -->
|
|
16
|
-
* <span class="dropdown-field-placeholder">Select</span>
|
|
17
|
-
* <svg class="dropdown-field-chevron icon icon-size-14">
|
|
10
|
+
* <div class="vd-dropdown-field-container">
|
|
11
|
+
* <div class="vd-dropdown-field-label">…</div> <!-- Optional -->
|
|
12
|
+
* <div class="vd-dropdown"> <!-- Positioning -->
|
|
13
|
+
* <button class="vd-dropdown-field" aria-expanded="false" aria-haspopup="listbox">
|
|
14
|
+
* <span class="vd-avatar vd-avatar-sm">NC</span> <!-- Optional -->
|
|
15
|
+
* <svg class="vd-dropdown-field-icon vd-icon vd-icon-size-14">…</svg> <!-- Optional -->
|
|
16
|
+
* <span class="vd-dropdown-field-placeholder">Select</span>
|
|
17
|
+
* <svg class="vd-dropdown-field-chevron vd-icon vd-icon-size-14">
|
|
18
18
|
* <use href="#chevron-down" />
|
|
19
19
|
* </svg>
|
|
20
20
|
* </button>
|
|
21
|
-
* <div class="dropdown-panel" hidden>
|
|
22
|
-
* <div class="dropdown-menu" role="listbox">…</div>
|
|
21
|
+
* <div class="vd-dropdown-panel" hidden>
|
|
22
|
+
* <div class="vd-dropdown-menu" role="listbox">…</div>
|
|
23
23
|
* </div>
|
|
24
24
|
* </div>
|
|
25
|
-
* <div class="dropdown-field-error-message">…</div> <!-- Optional -->
|
|
25
|
+
* <div class="vd-dropdown-field-error-message">…</div> <!-- Optional -->
|
|
26
26
|
* </div>
|
|
27
27
|
*
|
|
28
|
-
* `.dropdown` / `.dropdown-panel` live in dropdown-menu.css.
|
|
28
|
+
* `.vd-dropdown` / `.vd-dropdown-panel` live in dropdown-menu.css.
|
|
29
29
|
*
|
|
30
30
|
* Open state is driven by `aria-expanded="true"` on the trigger: it takes the
|
|
31
31
|
* focus ring and rotates the chevron 180°. Toggling the attribute (and the
|
|
@@ -45,27 +45,27 @@
|
|
|
45
45
|
@layer components {
|
|
46
46
|
/* --- Container ------------------------------------------------------ */
|
|
47
47
|
|
|
48
|
-
.dropdown-field-container {
|
|
48
|
+
.vd-dropdown-field-container {
|
|
49
49
|
@apply flex w-full flex-col items-start;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
/* --- Label ---------------------------------------------------------- */
|
|
53
53
|
|
|
54
|
-
.dropdown-field-label {
|
|
54
|
+
.vd-dropdown-field-label {
|
|
55
55
|
@apply flex w-full items-center pb-1.5; /* 6px */
|
|
56
56
|
@apply text-[10px] font-semibold uppercase leading-[12px] tracking-[1px];
|
|
57
57
|
@apply text-content-tertiary;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
.dropdown-field-label > span {
|
|
60
|
+
.vd-dropdown-field-label > span {
|
|
61
61
|
@apply flex-1;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
/* Note: help button uses .icon-button .icon-button-xs from icon-button.css */
|
|
64
|
+
/* Note: help button uses .vd-icon-button .vd-icon-button-xs from icon-button.css */
|
|
65
65
|
|
|
66
66
|
/* --- Trigger (defaults to lg) --------------------------------------- */
|
|
67
67
|
|
|
68
|
-
.dropdown-field {
|
|
68
|
+
.vd-dropdown-field {
|
|
69
69
|
/* Layout */
|
|
70
70
|
@apply flex w-full items-center gap-2; /* 8px */
|
|
71
71
|
@apply px-3 py-1.75; /* 12px / 7px */
|
|
@@ -91,42 +91,42 @@
|
|
|
91
91
|
/* --- Parts ---------------------------------------------------------- */
|
|
92
92
|
|
|
93
93
|
/* Chosen value */
|
|
94
|
-
.dropdown-field-value {
|
|
94
|
+
.vd-dropdown-field-value {
|
|
95
95
|
@apply flex-1 truncate text-content-primary;
|
|
96
96
|
min-width: 0;
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
/* Nothing chosen yet */
|
|
100
|
-
.dropdown-field-placeholder {
|
|
100
|
+
.vd-dropdown-field-placeholder {
|
|
101
101
|
@apply flex-1 truncate text-content-faint;
|
|
102
102
|
min-width: 0;
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
/* Leading icon and trailing chevron — 14px at every size */
|
|
106
|
-
.dropdown-field-icon,
|
|
107
|
-
.dropdown-field-chevron {
|
|
106
|
+
.vd-dropdown-field-icon,
|
|
107
|
+
.vd-dropdown-field-chevron {
|
|
108
108
|
@apply shrink-0 text-content-secondary;
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
-
.dropdown-field-chevron {
|
|
111
|
+
.vd-dropdown-field-chevron {
|
|
112
112
|
@apply transition-transform duration-150;
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
/* --- Sizes ----------------------------------------------------------- */
|
|
116
116
|
|
|
117
|
-
.dropdown-field-sm {
|
|
117
|
+
.vd-dropdown-field-sm {
|
|
118
118
|
@apply gap-1.5 px-2 py-1.25; /* 6px / 8px / 5px */
|
|
119
119
|
@apply h-[25px];
|
|
120
120
|
@apply text-micro-l; /* 11px / normal / 400 */
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
-
.dropdown-field-md {
|
|
123
|
+
.vd-dropdown-field-md {
|
|
124
124
|
@apply gap-2 px-3 py-1.75; /* 8px / 12px / 7px */
|
|
125
125
|
@apply h-[29px];
|
|
126
126
|
@apply text-body-2; /* 12.5px / 12.5px / 400 */
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
-
.dropdown-field-lg {
|
|
129
|
+
.vd-dropdown-field-lg {
|
|
130
130
|
@apply gap-2 px-3 py-1.75; /* same as default */
|
|
131
131
|
@apply h-[35px];
|
|
132
132
|
@apply text-body-1;
|
|
@@ -137,32 +137,32 @@
|
|
|
137
137
|
BG property yet — this mirrors the Text Input Container's White/Neutral
|
|
138
138
|
pair so the three field types stay interchangeable in a form. */
|
|
139
139
|
|
|
140
|
-
.dropdown-field-bg-neutral {
|
|
140
|
+
.vd-dropdown-field-bg-neutral {
|
|
141
141
|
@apply bg-surface-card; /* Surface/Card #fafafb */
|
|
142
142
|
}
|
|
143
143
|
|
|
144
144
|
/* --- States ---------------------------------------------------------- */
|
|
145
145
|
|
|
146
|
-
.dropdown-field:hover:not(:disabled):not([aria-disabled="true"]) {
|
|
146
|
+
.vd-dropdown-field:hover:not(:disabled):not([aria-disabled="true"]) {
|
|
147
147
|
@apply border-stroke-border;
|
|
148
148
|
}
|
|
149
149
|
|
|
150
|
-
.dropdown-field:focus-visible {
|
|
150
|
+
.vd-dropdown-field:focus-visible {
|
|
151
151
|
@apply focus-ring;
|
|
152
152
|
}
|
|
153
153
|
|
|
154
154
|
/* Error — red hairline. The open ring deliberately wins over it, matching
|
|
155
155
|
the active + error variants in Figma. */
|
|
156
|
-
.dropdown-field.dropdown-field-error {
|
|
156
|
+
.vd-dropdown-field.vd-dropdown-field-error {
|
|
157
157
|
@apply border-critical;
|
|
158
158
|
}
|
|
159
159
|
|
|
160
160
|
/* Open */
|
|
161
|
-
.dropdown-field[aria-expanded="true"] {
|
|
161
|
+
.vd-dropdown-field[aria-expanded="true"] {
|
|
162
162
|
@apply focus-ring;
|
|
163
163
|
}
|
|
164
164
|
|
|
165
|
-
.dropdown-field[aria-expanded="true"] .dropdown-field-chevron {
|
|
165
|
+
.vd-dropdown-field[aria-expanded="true"] .vd-dropdown-field-chevron {
|
|
166
166
|
@apply rotate-180;
|
|
167
167
|
}
|
|
168
168
|
|
|
@@ -170,14 +170,14 @@
|
|
|
170
170
|
error still shows its crimson hairline, as Figma's disabled + error
|
|
171
171
|
variants do. Hover is already excluded via :not(:disabled) above, so no
|
|
172
172
|
border reset is needed here. */
|
|
173
|
-
.dropdown-field:disabled,
|
|
174
|
-
.dropdown-field[aria-disabled="true"] {
|
|
173
|
+
.vd-dropdown-field:disabled,
|
|
174
|
+
.vd-dropdown-field[aria-disabled="true"] {
|
|
175
175
|
@apply cursor-not-allowed bg-action-subtle;
|
|
176
176
|
}
|
|
177
177
|
|
|
178
178
|
/* --- Error Message ---------------------------------------------------- */
|
|
179
179
|
|
|
180
|
-
.dropdown-field-error-message {
|
|
180
|
+
.vd-dropdown-field-error-message {
|
|
181
181
|
@apply flex w-full items-center pt-1.5; /* 6px */
|
|
182
182
|
@apply text-[11px] font-normal leading-[normal];
|
|
183
183
|
@apply text-critical-strong;
|
|
@@ -9,17 +9,17 @@
|
|
|
9
9
|
* their own, so no extra width class is needed on each row.
|
|
10
10
|
*
|
|
11
11
|
* Structure:
|
|
12
|
-
* <div class="dropdown-menu" role="menu">
|
|
13
|
-
* <button class="menu-item" role="menuitem">…</button>
|
|
14
|
-
* <div class="dropdown-menu-divider"></div>
|
|
15
|
-
* <button class="menu-item" role="menuitem">…</button>
|
|
12
|
+
* <div class="vd-dropdown-menu" role="menu">
|
|
13
|
+
* <button class="vd-menu-item" role="menuitem">…</button>
|
|
14
|
+
* <div class="vd-dropdown-menu-divider"></div>
|
|
15
|
+
* <button class="vd-menu-item" role="menuitem">…</button>
|
|
16
16
|
* </div>
|
|
17
17
|
*
|
|
18
18
|
* Positioning is the consumer's job — this component only styles the panel.
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
21
|
@layer components {
|
|
22
|
-
.dropdown-menu {
|
|
22
|
+
.vd-dropdown-menu {
|
|
23
23
|
/* Layout */
|
|
24
24
|
@apply flex flex-col items-start;
|
|
25
25
|
@apply p-1; /* 4px */
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
Confirm the treatment with the designer before relying on it. */
|
|
43
43
|
/* `border-[length:…]` sets ALL four sides, so it cannot be combined with
|
|
44
44
|
`border-t` — the side-specific `border-t-[length:…]` is required here. */
|
|
45
|
-
.dropdown-menu-divider {
|
|
45
|
+
.vd-dropdown-menu-divider {
|
|
46
46
|
@apply my-1 w-full;
|
|
47
47
|
@apply border-t border-t-[length:var(--border-thin)] border-stroke-divider;
|
|
48
48
|
}
|
|
@@ -50,31 +50,31 @@
|
|
|
50
50
|
/* --- Positioning helpers --------------------------------------------- */
|
|
51
51
|
/* Wrap a trigger (Button, DropdownField, …) and a panel to anchor the menu
|
|
52
52
|
below the trigger. The library ships no JavaScript — open and close by
|
|
53
|
-
toggling `hidden` on .dropdown-panel and `aria-expanded` on the trigger. */
|
|
53
|
+
toggling `hidden` on .vd-dropdown-panel and `aria-expanded` on the trigger. */
|
|
54
54
|
|
|
55
|
-
.dropdown {
|
|
55
|
+
.vd-dropdown {
|
|
56
56
|
@apply relative w-full;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
/* No `display` is declared here on purpose, so the native `hidden`
|
|
60
60
|
attribute keeps working. The explicit guard below survives resets and
|
|
61
61
|
any consumer utility that would otherwise re-introduce a display value. */
|
|
62
|
-
.dropdown-panel {
|
|
62
|
+
.vd-dropdown-panel {
|
|
63
63
|
@apply absolute left-0 right-0 top-full z-50 mt-1;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
.dropdown-panel[hidden] {
|
|
66
|
+
.vd-dropdown-panel[hidden] {
|
|
67
67
|
display: none;
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
/* Panel stretches to the trigger, but never below the menu's own minimum */
|
|
71
|
-
.dropdown-panel > .dropdown-menu {
|
|
71
|
+
.vd-dropdown-panel > .vd-dropdown-menu {
|
|
72
72
|
@apply w-full;
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
/* --- States ---------------------------------------------------------- */
|
|
76
76
|
|
|
77
|
-
.dropdown-menu:focus-visible {
|
|
77
|
+
.vd-dropdown-menu:focus-visible {
|
|
78
78
|
@apply focus-ring;
|
|
79
79
|
}
|
|
80
80
|
}
|
|
@@ -6,24 +6,24 @@
|
|
|
6
6
|
* boolean.
|
|
7
7
|
*
|
|
8
8
|
* Usage — an inline row:
|
|
9
|
-
* <span class="field-verification field-verification-verified">
|
|
10
|
-
* <span class="section-marker section-marker-approve">
|
|
11
|
-
* <svg class="icon icon-size-14" aria-hidden="true"><use href="#check" /></svg>
|
|
9
|
+
* <span class="vd-field-verification vd-field-verification-verified">
|
|
10
|
+
* <span class="vd-section-marker vd-section-marker-approve">
|
|
11
|
+
* <svg class="vd-icon vd-icon-size-14" aria-hidden="true"><use href="#check" /></svg>
|
|
12
12
|
* </span>
|
|
13
|
-
* <span class="field-verification-label">Matches X</span>
|
|
13
|
+
* <span class="vd-field-verification-label">Matches X</span>
|
|
14
14
|
* </span>
|
|
15
15
|
*
|
|
16
16
|
* Usage — the expanded mismatch:
|
|
17
|
-
* <span class="field-verification field-verification-mismatch">
|
|
18
|
-
* <svg class="field-verification-icon icon icon-size-15" aria-hidden="true">
|
|
17
|
+
* <span class="vd-field-verification vd-field-verification-mismatch">
|
|
18
|
+
* <svg class="vd-field-verification-icon vd-icon vd-icon-size-15" aria-hidden="true">
|
|
19
19
|
* <use href="#triangle-alert" />
|
|
20
20
|
* </svg>
|
|
21
|
-
* <span class="field-verification-details">
|
|
22
|
-
* <span class="field-verification-label">Does not match KYC</span>
|
|
23
|
-
* <span class="field-verification-detail">Reported: 04/12/1988</span>
|
|
24
|
-
* <span class="field-verification-action">
|
|
21
|
+
* <span class="vd-field-verification-details">
|
|
22
|
+
* <span class="vd-field-verification-label">Does not match KYC</span>
|
|
23
|
+
* <span class="vd-field-verification-detail">Reported: 04/12/1988</span>
|
|
24
|
+
* <span class="vd-field-verification-action">
|
|
25
25
|
* Review discrepancy
|
|
26
|
-
* <svg class="icon icon-size-15" aria-hidden="true"><use href="#arrow-right" /></svg>
|
|
26
|
+
* <svg class="vd-icon vd-icon-size-15" aria-hidden="true"><use href="#arrow-right" /></svg>
|
|
27
27
|
* </span>
|
|
28
28
|
* </span>
|
|
29
29
|
* </span>
|
|
@@ -78,12 +78,12 @@
|
|
|
78
78
|
*/
|
|
79
79
|
|
|
80
80
|
@layer components {
|
|
81
|
-
.field-verification {
|
|
81
|
+
.vd-field-verification {
|
|
82
82
|
@apply inline-flex items-center gap-1.75; /* 7px */
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
/* The stacked variant tops-aligns its icon; the one-line rows centre theirs. */
|
|
86
|
-
.field-verification:has(.field-verification-details) {
|
|
86
|
+
.vd-field-verification:has(.vd-field-verification-details) {
|
|
87
87
|
@apply items-start;
|
|
88
88
|
}
|
|
89
89
|
|
|
@@ -93,29 +93,29 @@
|
|
|
93
93
|
which brings its own 16px box. Figma frames this glyph 15x18 and centres it
|
|
94
94
|
on the first line, so the BOX is what aligns, not the glyph; without the
|
|
95
95
|
height the expanded state sits 1.5px high. */
|
|
96
|
-
.field-verification-icon {
|
|
96
|
+
.vd-field-verification-icon {
|
|
97
97
|
@apply inline-flex h-[18px] shrink-0 items-center justify-center;
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
.field-verification-label {
|
|
100
|
+
.vd-field-verification-label {
|
|
101
101
|
@apply text-caption; /* 12px / 18px / 400 */
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
/* --- Expanded (State=mismatch - details) -------------------------------- */
|
|
105
105
|
|
|
106
|
-
.field-verification-details {
|
|
106
|
+
.vd-field-verification-details {
|
|
107
107
|
@apply flex flex-col items-start gap-1; /* 4px */
|
|
108
108
|
min-width: 0;
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
/* Data/Data xs needs font-mono — --text-* carries no family. See CLAUDE.md. */
|
|
112
|
-
.field-verification-detail {
|
|
112
|
+
.vd-field-verification-detail {
|
|
113
113
|
@apply text-data-xs font-mono; /* 12px / 16.5px / 400, JetBrains Mono */
|
|
114
114
|
@apply text-content-secondary;
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
/* Plain text plus an arrow, not a Text Button instance. See the header. */
|
|
118
|
-
.field-verification-action {
|
|
118
|
+
.vd-field-verification-action {
|
|
119
119
|
@apply inline-flex items-center gap-1.75; /* 7px */
|
|
120
120
|
@apply text-caption; /* 12px / 18px / 400 */
|
|
121
121
|
@apply cursor-pointer;
|
|
@@ -124,25 +124,25 @@
|
|
|
124
124
|
/* --- States ------------------------------------------------------------- */
|
|
125
125
|
|
|
126
126
|
/* verified: the only state whose icon and label differ in colour. */
|
|
127
|
-
.field-verification-verified {
|
|
127
|
+
.vd-field-verification-verified {
|
|
128
128
|
@apply text-content-tertiary;
|
|
129
129
|
}
|
|
130
|
-
.field-verification-verified .field-verification-icon {
|
|
130
|
+
.vd-field-verification-verified .vd-field-verification-icon {
|
|
131
131
|
@apply text-approved;
|
|
132
132
|
}
|
|
133
133
|
|
|
134
134
|
/* pending and none: Section Marker instances like verified, but bound to
|
|
135
135
|
Content/Tertiary where Section Marker's own `unverified` is Secondary/Main.
|
|
136
|
-
The colour cascades into the nested `.section-marker`, which sets none of
|
|
136
|
+
The colour cascades into the nested `.vd-section-marker`, which sets none of
|
|
137
137
|
its own without a status class. */
|
|
138
|
-
.field-verification-pending,
|
|
139
|
-
.field-verification-none {
|
|
138
|
+
.vd-field-verification-pending,
|
|
139
|
+
.vd-field-verification-none {
|
|
140
140
|
@apply text-content-tertiary;
|
|
141
141
|
}
|
|
142
142
|
|
|
143
143
|
/* mismatch: Critical/Main throughout, except the mono detail line, which
|
|
144
144
|
stays Content/Secondary. */
|
|
145
|
-
.field-verification-mismatch {
|
|
145
|
+
.vd-field-verification-mismatch {
|
|
146
146
|
@apply text-critical;
|
|
147
147
|
}
|
|
148
148
|
|
|
@@ -150,7 +150,7 @@
|
|
|
150
150
|
|
|
151
151
|
/* Figma boolean, hidden by default. Square, as on Section Marker — this box
|
|
152
152
|
has no radius either. */
|
|
153
|
-
.field-verification.with-ring {
|
|
153
|
+
.vd-field-verification.vd-with-ring {
|
|
154
154
|
@apply ring-[length:var(--border-micro)] ring-inset ring-primary;
|
|
155
155
|
}
|
|
156
156
|
}
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
* x Size, plus Text, Icon and Ring booleans.
|
|
7
7
|
*
|
|
8
8
|
* Usage:
|
|
9
|
-
* <div class="filter-segments">
|
|
10
|
-
* <button class="filter-segment filter-segment-first">Product</button>
|
|
11
|
-
* <button class="filter-segment">Is any of</button>
|
|
12
|
-
* <button class="filter-segment">Deposit Account</button>
|
|
13
|
-
* <span class="filter-segment filter-segment-last">
|
|
14
|
-
* <button class="icon-button icon-button-md" aria-label="Remove filter">
|
|
15
|
-
* <svg class="icon icon-size-14" aria-hidden="true"><use href="#x" /></svg>
|
|
9
|
+
* <div class="vd-filter-segments">
|
|
10
|
+
* <button class="vd-filter-segment vd-filter-segment-first">Product</button>
|
|
11
|
+
* <button class="vd-filter-segment">Is any of</button>
|
|
12
|
+
* <button class="vd-filter-segment">Deposit Account</button>
|
|
13
|
+
* <span class="vd-filter-segment vd-filter-segment-last">
|
|
14
|
+
* <button class="vd-icon-button vd-icon-button-md" aria-label="Remove filter">
|
|
15
|
+
* <svg class="vd-icon vd-icon-size-14" aria-hidden="true"><use href="#x" /></svg>
|
|
16
16
|
* </button>
|
|
17
17
|
* </span>
|
|
18
18
|
* </div>
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
* order; only the middle segment and the icon button were reachable.
|
|
58
58
|
*
|
|
59
59
|
* THE ICON SLOT IS AN ICON BUTTON INSTANCE — 18px box, 14px glyph — so it is
|
|
60
|
-
* `.icon-button icon-button-md`, not a new part. Note that nesting it inside a
|
|
60
|
+
* `.vd-icon-button icon-button-md`, not a new part. Note that nesting it inside a
|
|
61
61
|
* `<button>` segment is invalid HTML, so that one segment stays a non-button
|
|
62
62
|
* element wrapping the icon button, which is itself focusable. Whether the icon
|
|
63
63
|
* should take over the segment's own action is deliberately left open.
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
*/
|
|
72
72
|
|
|
73
73
|
@layer components {
|
|
74
|
-
.filter-segment {
|
|
74
|
+
.vd-filter-segment {
|
|
75
75
|
/* Layout */
|
|
76
76
|
@apply inline-flex shrink-0 items-center justify-center gap-2.5; /* 10px */
|
|
77
77
|
@apply px-2 py-1; /* 8px / 4px */
|
|
@@ -100,20 +100,20 @@
|
|
|
100
100
|
/* --- Position ----------------------------------------------------------- */
|
|
101
101
|
|
|
102
102
|
/* The group's left edge — the only segment that draws a left border. */
|
|
103
|
-
.filter-segment-first {
|
|
103
|
+
.vd-filter-segment-first {
|
|
104
104
|
@apply border-l border-l-[length:var(--border-thin)] border-l-stroke-divider;
|
|
105
105
|
@apply rounded-l-control; /* 6px */
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
/* Its own right border already closes the group. */
|
|
109
|
-
.filter-segment-last {
|
|
109
|
+
.vd-filter-segment-last {
|
|
110
110
|
@apply rounded-r-control; /* 6px */
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
/* --- Size --------------------------------------------------------------- */
|
|
114
114
|
|
|
115
115
|
/* Padding, gap and type are identical to sm — md is only a taller box. */
|
|
116
|
-
.filter-segment-md {
|
|
116
|
+
.vd-filter-segment-md {
|
|
117
117
|
@apply h-[28px];
|
|
118
118
|
}
|
|
119
119
|
|
|
@@ -122,25 +122,25 @@
|
|
|
122
122
|
/* Both states swap the opaque card fill for a translucent Action token, so
|
|
123
123
|
the page shows through rather than the card. Selected is excluded from
|
|
124
124
|
hover by name rather than by source order. */
|
|
125
|
-
.filter-segment:not([aria-pressed="true"]):not(
|
|
125
|
+
.vd-filter-segment:not([aria-pressed="true"]):not(
|
|
126
126
|
[aria-selected="true"]
|
|
127
127
|
):hover:not(:disabled):not([aria-disabled="true"]) {
|
|
128
128
|
@apply bg-action-hover text-content-primary;
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
-
.filter-segment[aria-pressed="true"],
|
|
132
|
-
.filter-segment[aria-selected="true"] {
|
|
131
|
+
.vd-filter-segment[aria-pressed="true"],
|
|
132
|
+
.vd-filter-segment[aria-selected="true"] {
|
|
133
133
|
@apply bg-action-selected text-content-primary;
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
-
.filter-segment:focus-visible {
|
|
136
|
+
.vd-filter-segment:focus-visible {
|
|
137
137
|
@apply focus-ring;
|
|
138
138
|
}
|
|
139
139
|
|
|
140
140
|
/* Not in Figma — house convention, so a disabled segment is not silently
|
|
141
141
|
clickable. Tokens rather than a blanket opacity, per the IconButton fix. */
|
|
142
|
-
.filter-segment:disabled,
|
|
143
|
-
.filter-segment[aria-disabled="true"] {
|
|
142
|
+
.vd-filter-segment:disabled,
|
|
143
|
+
.vd-filter-segment[aria-disabled="true"] {
|
|
144
144
|
@apply cursor-not-allowed text-content-faint;
|
|
145
145
|
}
|
|
146
146
|
|
|
@@ -148,7 +148,7 @@
|
|
|
148
148
|
three sides, 0 on the left) to sit over the borders each position actually
|
|
149
149
|
draws; a plain inset ring is within half a pixel and cannot overflow the
|
|
150
150
|
layout, the same normalisation Avatar documents. */
|
|
151
|
-
.filter-segment.with-ring {
|
|
151
|
+
.vd-filter-segment.vd-with-ring {
|
|
152
152
|
@apply ring-[length:var(--border-micro)] ring-inset ring-primary;
|
|
153
153
|
}
|
|
154
154
|
|
|
@@ -157,7 +157,7 @@
|
|
|
157
157
|
/* Figma's example composition is exactly this and nothing more: a bare row
|
|
158
158
|
with no gap, no padding and no fill of its own. The segments' shared edges
|
|
159
159
|
do all the work. */
|
|
160
|
-
.filter-segments {
|
|
160
|
+
.vd-filter-segments {
|
|
161
161
|
@apply inline-flex items-center;
|
|
162
162
|
}
|
|
163
163
|
}
|
|
@@ -5,15 +5,15 @@
|
|
|
5
5
|
* and secondary actions where space is limited. Extracted from Figma (78:210).
|
|
6
6
|
*
|
|
7
7
|
* Usage:
|
|
8
|
-
* <button class="icon-button icon-button-xs" aria-label="Close">
|
|
9
|
-
* <svg class="icon icon-size-12" aria-hidden="true">
|
|
8
|
+
* <button class="vd-icon-button vd-icon-button-xs" aria-label="Close">
|
|
9
|
+
* <svg class="vd-icon vd-icon-size-12" aria-hidden="true">
|
|
10
10
|
* <use href="#x" />
|
|
11
11
|
* </svg>
|
|
12
12
|
* </button>
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
@layer components {
|
|
16
|
-
.icon-button {
|
|
16
|
+
.vd-icon-button {
|
|
17
17
|
/* Layout */
|
|
18
18
|
@apply inline-flex items-center justify-center;
|
|
19
19
|
|
|
@@ -39,25 +39,25 @@
|
|
|
39
39
|
|
|
40
40
|
/* --- Size Variants -------------------------------------------------- */
|
|
41
41
|
|
|
42
|
-
.icon-button-xs {
|
|
42
|
+
.vd-icon-button-xs {
|
|
43
43
|
@apply size-3 p-0; /* 12×12px, no padding (icon fills button) */
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
.icon-button-md {
|
|
46
|
+
.vd-icon-button-md {
|
|
47
47
|
@apply size-[18px] p-0.5; /* 18×18px, 2px padding */
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
.icon-button-lg {
|
|
50
|
+
.vd-icon-button-lg {
|
|
51
51
|
@apply size-7 p-1.5; /* 28×28px, 6px padding (same as default) */
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
/* --- States --------------------------------------------------------- */
|
|
55
55
|
|
|
56
|
-
.icon-button:hover:not(:disabled) {
|
|
56
|
+
.vd-icon-button:hover:not(:disabled) {
|
|
57
57
|
@apply bg-action-hover text-secondary-strong;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
.icon-button:active:not(:disabled) {
|
|
60
|
+
.vd-icon-button:active:not(:disabled) {
|
|
61
61
|
@apply bg-action-focused text-secondary-strong;
|
|
62
62
|
}
|
|
63
63
|
|
|
@@ -66,18 +66,18 @@
|
|
|
66
66
|
dismiss control in Alert, Modal and Toast, those three inherit it too.
|
|
67
67
|
Figma models no focus state for this component; `focus-ring` is the
|
|
68
68
|
library-wide convention, not an invention for this file. */
|
|
69
|
-
.icon-button:focus-visible {
|
|
69
|
+
.vd-icon-button:focus-visible {
|
|
70
70
|
@apply focus-ring;
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
/* Figma dims the glyph with its own token rather than fading the whole
|
|
74
74
|
button — an earlier version used opacity-50, which is not the design. */
|
|
75
|
-
.icon-button:disabled {
|
|
75
|
+
.vd-icon-button:disabled {
|
|
76
76
|
@apply cursor-not-allowed text-secondary-disabled;
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
/* Optional ring state (for selected/active state) */
|
|
80
|
-
.icon-button.icon-ring {
|
|
80
|
+
.vd-icon-button.vd-icon-ring {
|
|
81
81
|
@apply ring-2 ring-primary;
|
|
82
82
|
}
|
|
83
83
|
}
|
package/src/components/icon.css
CHANGED
|
@@ -5,18 +5,18 @@
|
|
|
5
5
|
* Works with SVG sprite system (src/icons/sprite.svg).
|
|
6
6
|
*
|
|
7
7
|
* Usage with SVG sprite:
|
|
8
|
-
* <svg class="icon icon-size-20" aria-hidden="true">
|
|
8
|
+
* <svg class="vd-icon vd-icon-size-20" aria-hidden="true">
|
|
9
9
|
* <use href="#search" />
|
|
10
10
|
* </svg>
|
|
11
11
|
*
|
|
12
12
|
* With ring state (selected/active):
|
|
13
|
-
* <svg class="icon icon-size-20 icon-ring" aria-label="Active">
|
|
13
|
+
* <svg class="vd-icon vd-icon-size-20 vd-icon-ring" aria-label="Active">
|
|
14
14
|
* <use href="#check" />
|
|
15
15
|
* </svg>
|
|
16
16
|
*
|
|
17
17
|
* In buttons/components:
|
|
18
|
-
* <button class="btn btn-primary">
|
|
19
|
-
* <svg class="icon icon-size-20" aria-hidden="true">
|
|
18
|
+
* <button class="vd-btn vd-btn-primary">
|
|
19
|
+
* <svg class="vd-icon vd-icon-size-20" aria-hidden="true">
|
|
20
20
|
* <use href="#save" />
|
|
21
21
|
* </svg>
|
|
22
22
|
* Save
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
* box that has to reach 1.25px.
|
|
54
54
|
*
|
|
55
55
|
* `--icon-stroke` is a custom property so a consumer sizing an icon with raw
|
|
56
|
-
* utilities (`w-5 h-5`) instead of `.icon-size-20` can set the matching weight.
|
|
56
|
+
* utilities (`w-5 h-5`) instead of `.vd-icon-size-20` can set the matching weight.
|
|
57
57
|
*
|
|
58
58
|
* ONE SYMBOL IS EXEMPT: `custom-help` is the sprite's only non-24 viewBox
|
|
59
59
|
* (22x22) and its only symbol carrying a `stroke-width` presentation attribute.
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
*/
|
|
63
63
|
|
|
64
64
|
@layer components {
|
|
65
|
-
.icon {
|
|
65
|
+
.vd-icon {
|
|
66
66
|
/* Layout */
|
|
67
67
|
@apply inline-flex items-center justify-center;
|
|
68
68
|
@apply shrink-0; /* Prevent flex containers from squashing icons */
|
|
@@ -83,64 +83,64 @@
|
|
|
83
83
|
|
|
84
84
|
/* --- Size Variants -------------------------------------------------- */
|
|
85
85
|
|
|
86
|
-
.icon-size-10 {
|
|
86
|
+
.vd-icon-size-10 {
|
|
87
87
|
@apply w-[10px] h-[10px];
|
|
88
88
|
--icon-stroke: 1.8; /* 0.75px */
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
-
.icon-size-11 {
|
|
91
|
+
.vd-icon-size-11 {
|
|
92
92
|
@apply w-[11px] h-[11px];
|
|
93
93
|
--icon-stroke: 1.636364; /* 0.75px */
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
-
.icon-size-12 {
|
|
96
|
+
.vd-icon-size-12 {
|
|
97
97
|
@apply w-3 h-3; /* 12px */
|
|
98
98
|
--icon-stroke: 2; /* 1px */
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
-
.icon-size-13 {
|
|
101
|
+
.vd-icon-size-13 {
|
|
102
102
|
@apply w-[13px] h-[13px];
|
|
103
103
|
--icon-stroke: 1.846154; /* 1px */
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
-
.icon-size-14 {
|
|
106
|
+
.vd-icon-size-14 {
|
|
107
107
|
@apply w-3.5 h-3.5; /* 14px */
|
|
108
108
|
--icon-stroke: 2.142857; /* 1.25px */
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
-
.icon-size-15 {
|
|
111
|
+
.vd-icon-size-15 {
|
|
112
112
|
@apply w-[15px] h-[15px];
|
|
113
113
|
--icon-stroke: 2; /* 1.25px */
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
-
.icon-size-16 {
|
|
116
|
+
.vd-icon-size-16 {
|
|
117
117
|
@apply w-4 h-4; /* 16px */
|
|
118
118
|
--icon-stroke: 1.875; /* 1.25px */
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
-
.icon-size-18 {
|
|
121
|
+
.vd-icon-size-18 {
|
|
122
122
|
@apply w-[18px] h-[18px];
|
|
123
123
|
--icon-stroke: 1.666667; /* 1.25px */
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
-
.icon-size-20 {
|
|
126
|
+
.vd-icon-size-20 {
|
|
127
127
|
@apply w-5 h-5; /* 20px */
|
|
128
128
|
--icon-stroke: 1.8; /* 1.5px */
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
-
.icon-size-22 {
|
|
131
|
+
.vd-icon-size-22 {
|
|
132
132
|
@apply w-5.5 h-5.5; /* 22px */
|
|
133
133
|
--icon-stroke: 1.636364; /* 1.5px */
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
-
.icon-size-24 {
|
|
136
|
+
.vd-icon-size-24 {
|
|
137
137
|
@apply w-6 h-6; /* 24px */
|
|
138
138
|
--icon-stroke: 2; /* 2px */
|
|
139
139
|
}
|
|
140
140
|
|
|
141
141
|
/* --- States --------------------------------------------------------- */
|
|
142
142
|
|
|
143
|
-
.icon-ring {
|
|
143
|
+
.vd-icon-ring {
|
|
144
144
|
@apply rounded-full;
|
|
145
145
|
@apply border border-[length:var(--border-micro)] border-primary;
|
|
146
146
|
}
|