@valiify/dashboard-ui 0.5.1 → 0.6.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 +233 -1
- package/COMPONENTS.md +1058 -12
- package/README.md +40 -7
- package/class-manifest.json +187 -2
- package/dist/dashboard-ui.css +3017 -918
- package/dist/index.css +2370 -448
- package/package.json +3 -2
- package/src/components/add-funds-form.css +68 -0
- package/src/components/alert.css +33 -56
- package/src/components/avatar.css +38 -2
- package/src/components/button.css +24 -19
- package/src/components/card.css +1 -1
- package/src/components/checklist-group.css +115 -0
- package/src/components/checklist-task.css +125 -0
- package/src/components/chip.css +145 -0
- package/src/components/comment-date.css +36 -0
- package/src/components/comment-item.css +59 -0
- package/src/components/content-row.css +108 -0
- package/src/components/data-row.css +71 -19
- package/src/components/dropdown-field.css +9 -0
- package/src/components/entity-header.css +61 -0
- package/src/components/field-verification.css +113 -38
- package/src/components/finding-card.css +117 -0
- package/src/components/finding-option.css +39 -0
- package/src/components/finding-row.css +45 -0
- package/src/components/funding-status.css +61 -0
- package/src/components/funding-total.css +56 -0
- package/src/components/funding-transaction.css +103 -0
- package/src/components/index.css +29 -0
- package/src/components/inline-confirm.css +42 -0
- package/src/components/input.css +19 -0
- package/src/components/keycap.css +27 -0
- package/src/components/menu-item.css +10 -0
- package/src/components/modal.css +10 -2
- package/src/components/navigation-rail.css +200 -0
- package/src/components/overlay-scrim.css +26 -0
- package/src/components/owner-table-header.css +42 -0
- package/src/components/ownership.css +73 -0
- package/src/components/panel-section-header.css +53 -0
- package/src/components/panel-status.css +23 -0
- package/src/components/panel-strip-button.css +31 -0
- package/src/components/progress-circle.css +89 -0
- package/src/components/resize-handle.css +131 -0
- package/src/components/resolved-row.css +50 -0
- package/src/components/scrollbar.css +47 -0
- package/src/components/severity-count.css +50 -0
- package/src/components/severity-marker.css +66 -0
- package/src/components/snapshot-metric.css +72 -0
- package/src/components/summary-preview.css +72 -0
- package/src/components/switch.css +10 -1
- package/src/components/tag.css +20 -0
- package/src/components/textarea.css +4 -0
- package/src/components/toast.css +9 -5
- package/src/components/tooltip.css +14 -8
- package/src/themes/valiify-tokens.css +240 -6
- package/src/themes/valiify.css +243 -6
- package/types/components.d.ts +291 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@valiify/dashboard-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Tailwind CSS component library for Valiify Dashboard applications",
|
|
5
5
|
"style": "dist/index.css",
|
|
6
6
|
"types": "types/index.d.ts",
|
|
@@ -52,6 +52,7 @@
|
|
|
52
52
|
"verify:vocabulary": "node scripts/verify-vocabulary.mjs",
|
|
53
53
|
"verify:bundle": "node scripts/verify-bundle.mjs",
|
|
54
54
|
"verify:reset": "node scripts/verify-reset.mjs",
|
|
55
|
+
"verify:theme": "node scripts/verify-theme.mjs",
|
|
55
56
|
"verify:markup": "node scripts/verify-markup.mjs",
|
|
56
57
|
"verify:package": "node scripts/verify-package.mjs",
|
|
57
58
|
"verify:height-scale": "node scripts/verify-height-scale.mjs",
|
|
@@ -95,7 +96,7 @@
|
|
|
95
96
|
"@storybook/addon-themes": "^10.5.10",
|
|
96
97
|
"@storybook/html-vite": "^10.5.10",
|
|
97
98
|
"@tailwindcss/postcss": "^4.3.3",
|
|
98
|
-
"@valiify/val-core": "^0.
|
|
99
|
+
"@valiify/val-core": "^0.10.0",
|
|
99
100
|
"chromatic": "^18.7.2",
|
|
100
101
|
"lucide-static": "^1.33.0",
|
|
101
102
|
"pixelmatch": "^7.2.0",
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Add Funds Form
|
|
3
|
+
*
|
|
4
|
+
* The inline form that adds a funding transaction. Extracted from Figma Add
|
|
5
|
+
* Funds Form (2038:32986) — a single symbol. Figma: "amount, method, Cancel,
|
|
6
|
+
* Add funds."
|
|
7
|
+
*
|
|
8
|
+
* <form class="vd-add-funds-form">
|
|
9
|
+
* <div class="vd-add-funds-form-header">
|
|
10
|
+
* <h4 class="vd-add-funds-form-title">Add funds</h4>
|
|
11
|
+
* <p class="vd-add-funds-form-hint">Charged to the applicant's card on file</p>
|
|
12
|
+
* </div>
|
|
13
|
+
* <div class="vd-add-funds-form-fields">…an Input container, a Dropdown Field container…</div>
|
|
14
|
+
* <div class="vd-add-funds-form-actions">
|
|
15
|
+
* <button type="button" class="vd-btn vd-btn-empty">Cancel</button>
|
|
16
|
+
* <button class="vd-btn vd-btn-primary">Add funds</button>
|
|
17
|
+
* </div>
|
|
18
|
+
* </form>
|
|
19
|
+
*
|
|
20
|
+
* An outlined panel — a 1px Stroke/Divider, no fill — with 18px padding on
|
|
21
|
+
* the sides, 16 above and 14 below, and 12px between its three rows. 560px at
|
|
22
|
+
* most. THE 10px RADIUS IS RAW in Figma and off the radius scale (8 is the
|
|
23
|
+
* panel step), like Modal's 12; it is written raw.
|
|
24
|
+
*
|
|
25
|
+
* header a title and a hint on one baseline, 10px apart — raw Inter Semi
|
|
26
|
+
* Bold 14 and Regular 13 in Figma; Heading/Compact (14/20/600)
|
|
27
|
+
* and Body/Dense (13/18) are those sizes
|
|
28
|
+
* fields Input Field and Dropdown Field (md, with labels), 12px apart,
|
|
29
|
+
* sharing the width
|
|
30
|
+
* actions Button empty and Button primary (md), 8px apart
|
|
31
|
+
*
|
|
32
|
+
* Everything inside is an existing component; the form adds only the panel
|
|
33
|
+
* and the three rows.
|
|
34
|
+
*/
|
|
35
|
+
|
|
36
|
+
@layer components {
|
|
37
|
+
.vd-add-funds-form {
|
|
38
|
+
@apply flex w-full max-w-[560px] flex-col gap-3; /* 12px */
|
|
39
|
+
@apply px-[18px] pt-4 pb-3.5; /* 18px / 16px / 14px */
|
|
40
|
+
@apply rounded-[10px]; /* raw in Figma — see the header */
|
|
41
|
+
@apply border border-[length:var(--border-line)] border-stroke-divider;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.vd-add-funds-form-header {
|
|
45
|
+
@apply flex items-baseline gap-2.5; /* 10px */
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.vd-add-funds-form-title {
|
|
49
|
+
@apply text-heading-compact text-content-primary; /* 14 / 20 / 600 */
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.vd-add-funds-form-hint {
|
|
53
|
+
@apply text-body-dense text-content-tertiary; /* 13 / 18 / 400 */
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.vd-add-funds-form-fields {
|
|
57
|
+
@apply flex items-start gap-3; /* 12px */
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.vd-add-funds-form-fields > * {
|
|
61
|
+
@apply flex-1;
|
|
62
|
+
min-width: 0;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.vd-add-funds-form-actions {
|
|
66
|
+
@apply flex items-center gap-2; /* 8px */
|
|
67
|
+
}
|
|
68
|
+
}
|
package/src/components/alert.css
CHANGED
|
@@ -27,58 +27,33 @@
|
|
|
27
27
|
* base class is the mistake Tabs already taught us — "explicit beats clever".
|
|
28
28
|
* A bare `.alert` renders transparent, which reads as the authoring error it is.
|
|
29
29
|
*
|
|
30
|
-
* Type drives exactly two colours
|
|
31
|
-
* one:
|
|
30
|
+
* Type drives exactly two colours — the fill and the icon:
|
|
32
31
|
*
|
|
33
|
-
* type fill
|
|
32
|
+
* type fill icon
|
|
34
33
|
* critical Critical/Soft Critical/Main
|
|
35
|
-
* warning Warning/Soft Warning/
|
|
34
|
+
* warning Warning/Soft Warning/STRONG
|
|
36
35
|
* success Approved/Soft Approved/Main
|
|
37
|
-
* info Info/Soft Info/Main
|
|
38
|
-
* neutral Neutral/Soft Neutral/
|
|
36
|
+
* info Info/Soft Info/Main
|
|
37
|
+
* neutral Neutral/Soft Neutral/CONTENT
|
|
39
38
|
*
|
|
40
|
-
*
|
|
41
|
-
* added a real Info ramp (Info/Main #4c6285, Strong, Soft, Content) but the
|
|
42
|
-
* Alert set's info variant was never rebound — it still draws Primary/Soft +
|
|
43
|
-
* Primary/Main. Re-pointed here per the standing migration decision
|
|
44
|
-
* (approved 2026-09-30); contrast verified (Info/Main on Info/Soft 5.46 on
|
|
45
|
-
* Paper, 4.93 on Frame; every text state 5.3+). Designer-list item asks for
|
|
46
|
-
* the Figma rebind.
|
|
39
|
+
* REDRAWN IN 0.6.0 (re-read 2026-11-19). Three things changed in the file:
|
|
47
40
|
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
41
|
+
* 1. THE RAIL IS GONE. Every type is a tinted, clipped 8px box with no rail
|
|
42
|
+
* layer and no stroke. Through 0.5.x a 3px left rail in the type's Main
|
|
43
|
+
* colour was drawn here as a left border; removing it moves the content
|
|
44
|
+
* 3px left. (Designer-list item 66 asks only whether that was deliberate.)
|
|
45
|
+
* 2. The title is Body/Default Strong (14/20/500), up from Body/Dense Strong
|
|
46
|
+
* (13/18). Title 20 + message 20 + action 20 with two 4px gaps is 68, so
|
|
47
|
+
* the banner is 16 + 68 + 16 = Figma's 100 (it was 98).
|
|
48
|
+
* 3. The warning glyph binds Warning/Strong (was Warning/Main, 2.74:1 on the
|
|
49
|
+
* tint — designer-list item 36, now fixed at source), and the info type
|
|
50
|
+
* binds the Info ramp, which the library already shipped as a pinned
|
|
51
|
+
* divergence (item 35, resolved).
|
|
52
52
|
*
|
|
53
|
-
* THE WARNING ICON MEASURES 2.74:1 against Warning/Soft on Paper (2.48 on
|
|
54
|
-
* Frame) — the only glyph under the 3:1 graphics rule; every other type is
|
|
55
|
-
* 4.3+. Shipped as drawn (approved 2026-09-30): the icon is aria-hidden and
|
|
56
|
-
* the adjacent title carries the meaning. Rev3 added Warning/Strong, which
|
|
57
|
-
* is the fix on the designer's side; on the designer list.
|
|
58
|
-
*
|
|
59
|
-
* SCREEN READERS — the role is type-dependent (0.5.0 guidance):
|
|
60
|
-
* critical, warning role="alert" (implicit assertive)
|
|
61
|
-
* success, info, neutral role="status" (implicit polite + atomic)
|
|
62
53
|
* Either role announces only when the node is INSERTED into the DOM — a
|
|
63
54
|
* banner already present at page load announces nothing extra and needs no
|
|
64
55
|
* live role at all.
|
|
65
56
|
*
|
|
66
|
-
* NEUTRAL'S ICON IS THE ODD ONE OUT. Verified by sampling the Figma render, not
|
|
67
|
-
* assumed: its rail is `Neutral/Main` (#9999a6) while its glyph is
|
|
68
|
-
* `Neutral/Content` (#65656e). Every other type uses one colour for both. This
|
|
69
|
-
* is why `Neutral/Content` appears in that variant's variable set and nowhere
|
|
70
|
-
* else. Reproduced faithfully; on the designer list.
|
|
71
|
-
*
|
|
72
|
-
* THE RAIL IS A BORDER, NOT A CHILD. Figma models the 3px accent as a clipped
|
|
73
|
-
* rectangle layer inside an `overflow: clip` frame; here it is the left border,
|
|
74
|
-
* which saves consumers a DOM node and a class.
|
|
75
|
-
*
|
|
76
|
-
* This was verified rather than assumed — both renders were traced pixel by
|
|
77
|
-
* pixel down the top-left corner. Figma's rail is 2px wide through the arc and
|
|
78
|
-
* reaches its full 3px seven rows down; ours reaches 3px on the eighth. A
|
|
79
|
-
* one-row antialiasing difference in how the two renderers clip, with identical
|
|
80
|
-
* geometry either side of it.
|
|
81
|
-
*
|
|
82
57
|
* WIDTH IS NOT PINNED. Figma's 828px is the leftover of a 1007px artboard with
|
|
83
58
|
* 36px margins, not a specification — an inline banner spans its container.
|
|
84
59
|
* Contrast Modal (480) and Toast (356), which are genuinely fixed floating
|
|
@@ -100,11 +75,9 @@
|
|
|
100
75
|
/* Layout — a banner, so it fills its container */
|
|
101
76
|
@apply flex w-full items-start;
|
|
102
77
|
|
|
103
|
-
/* Shape
|
|
104
|
-
Figma's `overflow: clip` frame achieves around its rectangle layer. */
|
|
78
|
+
/* Shape — a clipped 8px box. No rail since 0.6.0. */
|
|
105
79
|
@apply rounded-surface; /* 8px */
|
|
106
80
|
@apply overflow-hidden;
|
|
107
|
-
@apply border-l-[3px] border-l-transparent;
|
|
108
81
|
|
|
109
82
|
/* No fill of its own — the type class supplies it. */
|
|
110
83
|
@apply bg-transparent;
|
|
@@ -128,9 +101,9 @@
|
|
|
128
101
|
min-width: 0;
|
|
129
102
|
}
|
|
130
103
|
|
|
131
|
-
/*
|
|
104
|
+
/* Body/Default Strong since 0.6.0 — 14/20, Medium/500 (was 13/18). */
|
|
132
105
|
.vd-alert-title {
|
|
133
|
-
@apply text-body-
|
|
106
|
+
@apply text-body-default-strong; /* 14px / 20px / 500 */
|
|
134
107
|
@apply text-content-primary;
|
|
135
108
|
}
|
|
136
109
|
|
|
@@ -141,42 +114,46 @@
|
|
|
141
114
|
}
|
|
142
115
|
|
|
143
116
|
/* --- Types -------------------------------------------------------------- */
|
|
117
|
+
/* Fill and icon only — there is no rail since 0.6.0 (see the header). */
|
|
144
118
|
|
|
145
119
|
.vd-alert-critical {
|
|
146
|
-
@apply
|
|
120
|
+
@apply bg-critical-soft;
|
|
147
121
|
}
|
|
122
|
+
|
|
148
123
|
.vd-alert-critical .vd-alert-icon {
|
|
149
124
|
@apply text-critical;
|
|
150
125
|
}
|
|
151
126
|
|
|
152
127
|
.vd-alert-warning {
|
|
153
|
-
@apply
|
|
128
|
+
@apply bg-warning-soft;
|
|
154
129
|
}
|
|
130
|
+
|
|
131
|
+
/* Warning/Strong, not Main — rebound in Figma for 0.6.0. */
|
|
155
132
|
.vd-alert-warning .vd-alert-icon {
|
|
156
|
-
@apply text-warning;
|
|
133
|
+
@apply text-warning-strong;
|
|
157
134
|
}
|
|
158
135
|
|
|
159
136
|
.vd-alert-success {
|
|
160
|
-
@apply
|
|
137
|
+
@apply bg-approved-soft;
|
|
161
138
|
}
|
|
139
|
+
|
|
162
140
|
.vd-alert-success .vd-alert-icon {
|
|
163
141
|
@apply text-approved;
|
|
164
142
|
}
|
|
165
143
|
|
|
166
|
-
/* The Info ramp, NOT the Primary ramp Figma still binds — see the header. */
|
|
167
144
|
.vd-alert-info {
|
|
168
|
-
@apply
|
|
145
|
+
@apply bg-info-soft;
|
|
169
146
|
}
|
|
147
|
+
|
|
170
148
|
.vd-alert-info .vd-alert-icon {
|
|
171
149
|
@apply text-info;
|
|
172
150
|
}
|
|
173
151
|
|
|
174
152
|
.vd-alert-neutral {
|
|
175
|
-
@apply
|
|
153
|
+
@apply bg-neutral-soft;
|
|
176
154
|
}
|
|
177
155
|
|
|
178
|
-
/* Neutral/Content,
|
|
179
|
-
differ. Verified against the Figma render. See the header. */
|
|
156
|
+
/* Neutral/Content, as Figma binds the glyph (Neutral/Main is too faint). */
|
|
180
157
|
.vd-alert-neutral .vd-alert-icon {
|
|
181
158
|
@apply text-neutral-content;
|
|
182
159
|
}
|
|
@@ -84,9 +84,45 @@
|
|
|
84
84
|
/* --- States ----------------------------------------------------------- */
|
|
85
85
|
|
|
86
86
|
/* Not an interactive element, so there is no :disabled to hook — a modifier
|
|
87
|
-
class, matching .vd-input-disabled.
|
|
87
|
+
class, matching .vd-input-disabled.
|
|
88
|
+
REDRAWN IN 0.6.0 (re-read 2026-11-19): Action/Selected fill with
|
|
89
|
+
Content/Tertiary initials, in both modes. Through 0.5.x only the fill
|
|
90
|
+
changed — Primary/Disabled under Content/Contrast initials — which was
|
|
91
|
+
2.03:1 in Light and 1.53 in Onyx, so a disabled avatar could not say whose
|
|
92
|
+
it was. Light changes too: a disabled avatar is now grey, not pale blue. */
|
|
88
93
|
.vd-avatar-disabled {
|
|
89
|
-
@apply bg-
|
|
94
|
+
@apply bg-action-selected text-content-tertiary;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/* --- Shape ------------------------------------------------------------ */
|
|
98
|
+
/* Figma's Shape axis (0.6.0): Circle (the base) or Square. A square avatar
|
|
99
|
+
marks an applicant or an owner; staff stay round. The radius steps with
|
|
100
|
+
the size and is RAW in Figma — 3 / 4 / 5 / 7 / 8 for 12 / 16 / 20 / 28 / 34,
|
|
101
|
+
a quarter of the box rounded — so three of the five are off the radius
|
|
102
|
+
scale and are written raw. After the size classes on purpose: each rule
|
|
103
|
+
here is (0,2,0) and has to outrank the base's rounded-pill either way. */
|
|
104
|
+
.vd-avatar-square {
|
|
105
|
+
@apply rounded-[5px]; /* md, the base size */
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.vd-avatar-square.vd-avatar-xs {
|
|
109
|
+
@apply rounded-[3px];
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.vd-avatar-square.vd-avatar-sm {
|
|
113
|
+
@apply rounded-tight; /* 4px */
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.vd-avatar-square.vd-avatar-md {
|
|
117
|
+
@apply rounded-[5px];
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.vd-avatar-square.vd-avatar-lg {
|
|
121
|
+
@apply rounded-[7px];
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.vd-avatar-square.vd-avatar-xl {
|
|
125
|
+
@apply rounded-surface; /* 8px */
|
|
90
126
|
}
|
|
91
127
|
|
|
92
128
|
/* Figma's Ring boolean: 2px Primary/Main aligned OUTSIDE since Rev3 (it was
|
|
@@ -143,37 +143,39 @@
|
|
|
143
143
|
@apply bg-transparent text-content-primary;
|
|
144
144
|
}
|
|
145
145
|
|
|
146
|
-
/*
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
146
|
+
/* Display=critical — IN BUTTON'S FIGMA SET SINCE 0.6.0 (20 variants, five
|
|
147
|
+
sizes × rest / hover / selected / disabled). Until then it existed only as
|
|
148
|
+
an instance override on Modal's destructive confirm, and everything but
|
|
149
|
+
the rest fill was the library's guess. Confirmed against the set
|
|
150
|
+
(2026-11-19): rest Critical/Main, hover AND selected Critical/Strong,
|
|
151
|
+
label Content/Contrast — and the same Stroke/Divider hairline primary
|
|
152
|
+
carries at rest, which this rule used to leave transparent. There is still
|
|
153
|
+
no critical-pressed, so :active matches hover.
|
|
154
|
+
|
|
155
|
+
DISABLED IS THE FILL AT 40% (re-read 2026-11-19): Critical/Main at 40%
|
|
156
|
+
paint opacity under the same Content/Contrast label — the shape primary's
|
|
157
|
+
disabled has, where Primary/Disabled is Primary/Main at 40%. There is no
|
|
158
|
+
Critical/Disabled variable, so the 40% is written on the token here.
|
|
159
|
+
(Figma first drew disabled identically to rest; until this re-read the
|
|
160
|
+
library shipped its own Critical/Soft + Content/Tertiary.) */
|
|
157
161
|
.vd-btn-critical {
|
|
158
|
-
@apply border-
|
|
162
|
+
@apply border-stroke-divider bg-critical text-content-contrast;
|
|
159
163
|
|
|
160
164
|
&:hover:not(:disabled) {
|
|
161
165
|
@apply bg-critical-strong;
|
|
162
166
|
}
|
|
163
167
|
|
|
164
168
|
&:active:not(:disabled) {
|
|
165
|
-
@apply border-
|
|
169
|
+
@apply border-stroke-divider bg-critical-strong text-content-contrast;
|
|
166
170
|
}
|
|
167
171
|
|
|
168
|
-
/* Not in Figma either — but without it the base ramp would grey out a
|
|
169
|
-
selected critical button. Matches its own pressed value. */
|
|
170
172
|
&[aria-pressed="true"],
|
|
171
173
|
&[aria-selected="true"] {
|
|
172
174
|
@apply bg-critical-strong;
|
|
173
175
|
}
|
|
174
176
|
|
|
175
177
|
&:disabled {
|
|
176
|
-
@apply bg-critical
|
|
178
|
+
@apply bg-critical/40;
|
|
177
179
|
}
|
|
178
180
|
}
|
|
179
181
|
|
|
@@ -231,9 +233,12 @@
|
|
|
231
233
|
@apply cursor-not-allowed;
|
|
232
234
|
}
|
|
233
235
|
|
|
234
|
-
/* Figma dims the label on the non-filled variants.
|
|
235
|
-
|
|
236
|
-
|
|
236
|
+
/* Figma dims the label on the non-filled variants. The two filled displays
|
|
237
|
+
keep their Content/Contrast label, since their fill already drops —
|
|
238
|
+
primary to Primary/Disabled, critical to Critical/Main at 40%. (Critical
|
|
239
|
+
was missing from this exclusion until 0.6.0, so its disabled label was
|
|
240
|
+
dimmed whatever its own rule said.) */
|
|
241
|
+
.vd-btn:disabled:not(.vd-btn-primary):not(.vd-btn-critical) {
|
|
237
242
|
@apply text-content-tertiary;
|
|
238
243
|
}
|
|
239
244
|
|
package/src/components/card.css
CHANGED
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
|
|
34
34
|
.vd-card-title {
|
|
35
35
|
@apply mb-2; /* Figma Spacing/8 */
|
|
36
|
-
@apply text-heading-section; /*
|
|
36
|
+
@apply text-heading-section; /* 18 / 24 / 600 (17 / 22 before 0.6.0) — the Rev3 successor of H2, same size and weight */
|
|
37
37
|
@apply text-content-primary;
|
|
38
38
|
}
|
|
39
39
|
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checklist Group
|
|
3
|
+
*
|
|
4
|
+
* A group of checklist tasks with a sign-off. Extracted from Figma Checklist
|
|
5
|
+
* Group (1848:59498) — 5 variants on a `State` axis (Closed, Open, Item
|
|
6
|
+
* skipped, Ready to sign off, Signed off), plus a `Name` text property.
|
|
7
|
+
* Figma: "Sign-off opens once every item is ticked or skipped."
|
|
8
|
+
*
|
|
9
|
+
* <section class="vd-checklist-group vd-checklist-group-open">
|
|
10
|
+
* <header class="vd-checklist-group-header">
|
|
11
|
+
* <span class="vd-progress-circle vd-progress-circle-sm" style="--progress: 75" …></span>
|
|
12
|
+
* <h4 class="vd-checklist-group-name">KYB</h4>
|
|
13
|
+
* <span class="vd-checklist-group-count">4/5</span>
|
|
14
|
+
* <button class="vd-icon-button vd-icon-button-inline" aria-expanded="true" aria-label="KYB">…</button>
|
|
15
|
+
* </header>
|
|
16
|
+
* …Checklist Tasks…
|
|
17
|
+
* <div class="vd-checklist-group-footer"><button class="vd-btn vd-btn-primary" disabled>Sign off</button></div>
|
|
18
|
+
* </section>
|
|
19
|
+
*
|
|
20
|
+
* CLOSED IS A LINE; OPEN IS A CARD. Closed, the group is its 36px header and
|
|
21
|
+
* nothing else — no fill, no border. `.vd-checklist-group-open` makes it a
|
|
22
|
+
* card (Surface/Card, a 1px Stroke/Border, 8px radius, 12px bottom padding),
|
|
23
|
+
* grows the header to 40px and steps the name to Body/Default Strong.
|
|
24
|
+
*
|
|
25
|
+
* THE FIVE STATES ARE TWO SHAPES PLUS CONTENT. Item skipped and Ready to sign
|
|
26
|
+
* off are the open card with different tasks and an enabled button; Signed off
|
|
27
|
+
* is the open card holding a sign-off record instead of the tasks.
|
|
28
|
+
*
|
|
29
|
+
* header Progress Circle sm · name · count (Data/Compact, mono,
|
|
30
|
+
* Content/Tertiary) · an Icon Button (inline) that discloses
|
|
31
|
+
* footer 8px above it, a primary Button md stretched to the full width
|
|
32
|
+
* record Surface/Neutral, 6px radius, 10/8 padding, 2px gap: "Signed off"
|
|
33
|
+
* (Body/Dense Strong) with a Reopen action, then who and when
|
|
34
|
+
* (Supporting/Caption, Content/Tertiary)
|
|
35
|
+
* more 8px above it, a "Show n items" action
|
|
36
|
+
*
|
|
37
|
+
* "Reopen" and "Show items" are drawn as plain Action/Compact text
|
|
38
|
+
* (Content/Secondary and Primary/Main); they are `.vd-text-button
|
|
39
|
+
* vd-text-button-text` and `-primary`. The record is the same box as Finding
|
|
40
|
+
* Card's decision — two components, one treatment (designer-list item 89).
|
|
41
|
+
*/
|
|
42
|
+
|
|
43
|
+
@layer components {
|
|
44
|
+
.vd-checklist-group {
|
|
45
|
+
@apply flex w-full flex-col px-3; /* 12px */
|
|
46
|
+
@apply rounded-surface; /* 8px */
|
|
47
|
+
@apply border border-[length:var(--border-line)] border-transparent;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/* 36px closed — 8 + the 20px line + 8. */
|
|
51
|
+
.vd-checklist-group-header {
|
|
52
|
+
@apply flex items-center gap-3 py-2; /* 12px, 8px */
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.vd-checklist-group-name {
|
|
56
|
+
@apply flex-1 truncate;
|
|
57
|
+
@apply text-body-default text-content-primary; /* 14 / 20 / 400 */
|
|
58
|
+
min-width: 0;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.vd-checklist-group-count {
|
|
62
|
+
@apply shrink-0 text-data-compact font-mono text-content-tertiary; /* 12 / 16.5 */
|
|
63
|
+
font-variant-numeric: tabular-nums;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.vd-checklist-group-footer {
|
|
67
|
+
@apply flex pt-2; /* 8px */
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/* Figma stretches the Sign off button across the card. */
|
|
71
|
+
.vd-checklist-group-footer > * {
|
|
72
|
+
@apply flex-1;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.vd-checklist-group-record {
|
|
76
|
+
@apply flex flex-col gap-0.5; /* 2px */
|
|
77
|
+
@apply px-2.5 py-2; /* 10px / 8px */
|
|
78
|
+
@apply rounded-control; /* 6px */
|
|
79
|
+
@apply bg-surface-neutral;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.vd-checklist-group-record-top {
|
|
83
|
+
@apply flex items-center justify-between gap-2;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.vd-checklist-group-record-title {
|
|
87
|
+
@apply text-body-dense-strong text-content-primary; /* 13 / 18 / 500 */
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/* Figma binds Content/Tertiary, which is 4.20:1 on this box's Surface/Neutral
|
|
91
|
+
in Light — 12px text needs 4.5. Shipped Content/Secondary (5.93 Light, 6.65
|
|
92
|
+
Onyx); a pinned divergence, designer-list item 95. */
|
|
93
|
+
.vd-checklist-group-record-meta {
|
|
94
|
+
@apply text-supporting-caption text-content-secondary; /* 12 / 18 / 400 */
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.vd-checklist-group-more {
|
|
98
|
+
@apply flex pt-2; /* 8px */
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/* --- Open ------------------------------------------------------------- */
|
|
102
|
+
|
|
103
|
+
.vd-checklist-group-open {
|
|
104
|
+
@apply border-stroke-border bg-surface-card pb-3; /* 12px */
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/* 40px — 10 + 20 + 10. */
|
|
108
|
+
.vd-checklist-group-open .vd-checklist-group-header {
|
|
109
|
+
@apply py-2.5;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.vd-checklist-group-open .vd-checklist-group-name {
|
|
113
|
+
@apply text-body-default-strong; /* 14 / 20 / 500 */
|
|
114
|
+
}
|
|
115
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checklist Task
|
|
3
|
+
*
|
|
4
|
+
* One item in a Checklist Group. Extracted from Figma Checklist Task
|
|
5
|
+
* (1848:59085) — 5 variants on a `State` axis (Unchecked, Unchecked hover,
|
|
6
|
+
* Checked, Held, Skipped), plus a `Label` text property. Figma: "Skipped takes
|
|
7
|
+
* the item out of play… Held items clear only through their finding."
|
|
8
|
+
*
|
|
9
|
+
* <label class="vd-checklist-task">
|
|
10
|
+
* <span class="vd-checklist-task-box">
|
|
11
|
+
* <span class="vd-checkbox-control">
|
|
12
|
+
* <input type="checkbox" class="vd-checkbox-input" />
|
|
13
|
+
* <svg class="vd-checkbox-check vd-icon vd-icon-size-10" aria-hidden="true"><use href="#check" /></svg>
|
|
14
|
+
* </span>
|
|
15
|
+
* </span>
|
|
16
|
+
* <span class="vd-checklist-task-text"><span class="vd-checklist-task-label">Online presence reviewed</span></span>
|
|
17
|
+
* <button type="button" class="vd-checklist-task-action">Skip</button>
|
|
18
|
+
* </label>
|
|
19
|
+
*
|
|
20
|
+
* 30px with one line (6 + 18 + 6), 50 with a detail line. Top-aligned, 10px
|
|
21
|
+
* gap: the 15px Checkbox control in a box with 2px above it (so it centres on
|
|
22
|
+
* the label's 18px line), then the text, then a trailing action.
|
|
23
|
+
*
|
|
24
|
+
* state box label detail / action
|
|
25
|
+
* unchecked Checkbox Content/Primary "Skip" on hover
|
|
26
|
+
* checked Checkbox, checked Content/Primary —
|
|
27
|
+
* held Checkbox, disabled Content/Secondary why it is held
|
|
28
|
+
* skipped a dash in a Surface/Neutral Content/Secondary who skipped it;
|
|
29
|
+
* box, 4px radius "Undo", always
|
|
30
|
+
*
|
|
31
|
+
* IT IS A <label> AROUND THE REAL CHECKBOX, so the whole row toggles it and
|
|
32
|
+
* names it. Checked and held come from the input's own :checked and :disabled
|
|
33
|
+
* — only held's dimmed label needs a class, `.vd-checklist-task-held`, since
|
|
34
|
+
* CSS cannot tell "disabled because held" from any other disabled.
|
|
35
|
+
*
|
|
36
|
+
* PINNED DIVERGENCE: hover does not move the content. Figma's hover variant
|
|
37
|
+
* adds 8px of padding-x inside the same 320px row, so the checkbox and label
|
|
38
|
+
* jump 8px right on pointer-enter. Here the row always carries that padding
|
|
39
|
+
* and pulls itself 8px wider with a negative margin, so the fill bleeds past
|
|
40
|
+
* the content instead. Designer-list item 90.
|
|
41
|
+
*
|
|
42
|
+
* The action is Action/Compact: Primary/Main for Skip, revealed on hover and
|
|
43
|
+
* focus; Content/Secondary for Undo, always visible. The label is Body/Dense,
|
|
44
|
+
* the detail Supporting/Caption in Content/Tertiary.
|
|
45
|
+
*/
|
|
46
|
+
|
|
47
|
+
@layer components {
|
|
48
|
+
.vd-checklist-task {
|
|
49
|
+
@apply flex items-start gap-2.5; /* 10px */
|
|
50
|
+
@apply -mx-2 px-2 py-1.5; /* 8px bleed (see the header), 6px */
|
|
51
|
+
@apply rounded-control; /* 6px */
|
|
52
|
+
@apply cursor-pointer transition-colors duration-150;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.vd-checklist-task:hover {
|
|
56
|
+
@apply bg-surface-neutral;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/* --- Parts ------------------------------------------------------------ */
|
|
60
|
+
|
|
61
|
+
/* 2px above the 15px control centres it on the 18px label line. */
|
|
62
|
+
.vd-checklist-task-box {
|
|
63
|
+
@apply inline-flex shrink-0 pt-0.5; /* 2px */
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.vd-checklist-task-text {
|
|
67
|
+
@apply flex flex-1 flex-col gap-0.5; /* 2px */
|
|
68
|
+
min-width: 0;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.vd-checklist-task-label {
|
|
72
|
+
@apply text-body-dense text-content-primary; /* 13 / 18 / 400 */
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.vd-checklist-task-detail {
|
|
76
|
+
@apply text-supporting-caption text-content-tertiary; /* 12 / 18 / 400 */
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/* "Skip" — revealed on hover and focus, like Data Row's actions. */
|
|
80
|
+
.vd-checklist-task-action {
|
|
81
|
+
@apply shrink-0 appearance-none border-none bg-transparent p-0;
|
|
82
|
+
@apply text-action-compact text-primary; /* 12 / 16 / 500 */
|
|
83
|
+
@apply mt-px cursor-pointer rounded-tight; /* 1px — centres the 16px line on the 18px one */
|
|
84
|
+
@apply opacity-0 transition-opacity duration-150;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.vd-checklist-task:hover .vd-checklist-task-action,
|
|
88
|
+
.vd-checklist-task:focus-within .vd-checklist-task-action {
|
|
89
|
+
@apply opacity-100;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.vd-checklist-task-action:focus-visible {
|
|
93
|
+
@apply focus-ring;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/* The skipped box: a dash where the checkbox was. */
|
|
97
|
+
.vd-checklist-task-skip-box {
|
|
98
|
+
@apply inline-flex size-[15px] shrink-0 items-center justify-center;
|
|
99
|
+
@apply rounded-tight bg-surface-neutral; /* 4px */
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.vd-checklist-task-skip-box::before {
|
|
103
|
+
content: "";
|
|
104
|
+
@apply block bg-content-secondary;
|
|
105
|
+
width: 7px;
|
|
106
|
+
block-size: 1.5px;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/* --- States ----------------------------------------------------------- */
|
|
110
|
+
|
|
111
|
+
.vd-checklist-task-held,
|
|
112
|
+
.vd-checklist-task-skipped {
|
|
113
|
+
@apply cursor-default;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.vd-checklist-task-held .vd-checklist-task-label,
|
|
117
|
+
.vd-checklist-task-skipped .vd-checklist-task-label {
|
|
118
|
+
@apply text-content-secondary;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/* "Undo" is always visible, and quieter. */
|
|
122
|
+
.vd-checklist-task-skipped .vd-checklist-task-action {
|
|
123
|
+
@apply text-content-secondary opacity-100;
|
|
124
|
+
}
|
|
125
|
+
}
|