@valiify/dashboard-ui 0.5.1 → 0.7.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 +456 -1
- package/COMPONENTS.md +2117 -704
- package/README.md +40 -7
- package/class-manifest.json +263 -2
- package/dist/dashboard-ui.css +4249 -1469
- package/dist/index.css +4056 -1453
- package/package.json +9 -8
- package/src/components/add-funds-form.css +69 -0
- package/src/components/alert.css +33 -56
- package/src/components/avatar.css +38 -2
- package/src/components/button.css +52 -29
- package/src/components/card.css +1 -1
- package/src/components/checklist-group.css +116 -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 +133 -0
- package/src/components/data-list.css +91 -0
- package/src/components/data-row.css +84 -19
- package/src/components/dropdown-field.css +9 -0
- package/src/components/dropdown-menu.css +6 -2
- package/src/components/entity-header.css +61 -0
- package/src/components/field-verification.css +118 -38
- package/src/components/final-decision.css +51 -0
- package/src/components/finding-card.css +157 -0
- package/src/components/finding-option.css +45 -0
- package/src/components/finding-row.css +45 -0
- package/src/components/funding-status.css +61 -0
- package/src/components/funding-total.css +57 -0
- package/src/components/funding-transaction.css +108 -0
- package/src/components/index.css +36 -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 +38 -10
- package/src/components/modal.css +29 -2
- package/src/components/navigation-rail.css +322 -2
- package/src/components/overlay-scrim.css +26 -0
- package/src/components/owner-row.css +170 -0
- package/src/components/owner-table-header.css +57 -0
- package/src/components/ownership.css +73 -0
- package/src/components/panel-section-header.css +56 -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/radio-select.css +5 -2
- package/src/components/record.css +56 -0
- package/src/components/resize-handle.css +131 -0
- package/src/components/resolved-row.css +50 -0
- package/src/components/scoring-details.css +79 -0
- package/src/components/scrollbar.css +47 -0
- package/src/components/section-edit.css +109 -0
- package/src/components/severity-count.css +63 -0
- package/src/components/severity-marker.css +66 -0
- package/src/components/snapshot-metric.css +72 -0
- package/src/components/step.css +1 -1
- package/src/components/summary-panel.css +250 -0
- package/src/components/summary-preview.css +76 -0
- package/src/components/switch.css +10 -1
- package/src/components/tabs.css +3 -2
- package/src/components/tag.css +24 -2
- package/src/components/textarea.css +4 -0
- package/src/components/toast.css +10 -6
- package/src/components/tooltip.css +14 -8
- package/src/themes/valiify-tokens.css +241 -7
- package/src/themes/valiify.css +244 -7
- package/types/components.d.ts +386 -9
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scrollbar
|
|
3
|
+
*
|
|
4
|
+
* A subtle overlay-style scrollbar for any scroll container. From Figma
|
|
5
|
+
* Scrollbar (2038:33066) — a single symbol: a 6px-thick thumb in
|
|
6
|
+
* Overlay/Scrollbar with a 3px radius. Figma: "Subtle overlay scrollbar thumb."
|
|
7
|
+
*
|
|
8
|
+
* <div class="vd-scrollbar" style="overflow: auto">…</div>
|
|
9
|
+
*
|
|
10
|
+
* A CLASS YOU ADD TO THE SCROLLER, not an element: the thumb is the browser's.
|
|
11
|
+
* It behaves like a utility and ships in every entry point.
|
|
12
|
+
*
|
|
13
|
+
* TWO MECHANISMS, DELIBERATELY NOT BOTH AT ONCE. WebKit and Blink style the
|
|
14
|
+
* scrollbar through ::-webkit-scrollbar, which is what gives the exact 6px
|
|
15
|
+
* thumb and 3px radius. Firefox has only the standard `scrollbar-width` /
|
|
16
|
+
* `scrollbar-color`, which cannot set a pixel width — `thin` is the closest.
|
|
17
|
+
* Chrome 121+ supports the standard properties too and, when they are set,
|
|
18
|
+
* IGNORES the pseudo-elements — so the standard pair is wrapped in
|
|
19
|
+
* `@supports not selector(::-webkit-scrollbar)` and reaches Firefox only.
|
|
20
|
+
*
|
|
21
|
+
* The track is transparent, and the thumb is Overlay/Scrollbar in every state:
|
|
22
|
+
* Figma draws one thumb and no hover.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
@layer components {
|
|
26
|
+
.vd-scrollbar::-webkit-scrollbar {
|
|
27
|
+
width: 6px;
|
|
28
|
+
height: 6px;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.vd-scrollbar::-webkit-scrollbar-track,
|
|
32
|
+
.vd-scrollbar::-webkit-scrollbar-corner {
|
|
33
|
+
background: transparent;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.vd-scrollbar::-webkit-scrollbar-thumb {
|
|
37
|
+
background-color: var(--color-overlay-scrollbar);
|
|
38
|
+
@apply rounded-[3px]; /* raw in Figma — half the 6px thumb; not on the radius scale */
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
@supports not selector(::-webkit-scrollbar) {
|
|
42
|
+
.vd-scrollbar {
|
|
43
|
+
scrollbar-width: thin;
|
|
44
|
+
scrollbar-color: var(--color-overlay-scrollbar) transparent;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Section Edit
|
|
3
|
+
*
|
|
4
|
+
* A record section in edit mode: its fields in named groups, and a footer that
|
|
5
|
+
* takes a reason before it saves. Extracted from Figma Section Edit / Business
|
|
6
|
+
* (2038:34369), a single symbol. New in 0.7.0 — through 0.6.0 it was a recipe
|
|
7
|
+
* with no box.
|
|
8
|
+
*
|
|
9
|
+
* <form class="vd-section-edit" aria-labelledby="edit-title">
|
|
10
|
+
* <div class="vd-section-edit-header">
|
|
11
|
+
* <h3 class="vd-section-edit-title" id="edit-title">Editing Business</h3>
|
|
12
|
+
* <p class="vd-section-edit-hint">Changes re-run the checks for this section.</p>
|
|
13
|
+
* </div>
|
|
14
|
+
* <div class="vd-section-edit-group" role="group" aria-labelledby="g1">
|
|
15
|
+
* <h4 class="vd-section-edit-group-title" id="g1">Registration</h4>
|
|
16
|
+
* <div class="vd-section-edit-row">…field containers…</div>
|
|
17
|
+
* </div>
|
|
18
|
+
* <div class="vd-section-edit-footer">
|
|
19
|
+
* <div class="vd-section-edit-reason">…Dropdown Field…</div>
|
|
20
|
+
* <div class="vd-section-edit-note">…Input…</div>
|
|
21
|
+
* <button type="button" class="vd-btn vd-btn-empty">Cancel</button>
|
|
22
|
+
* <button class="vd-btn vd-btn-primary">Save changes</button>
|
|
23
|
+
* </div>
|
|
24
|
+
* </form>
|
|
25
|
+
*
|
|
26
|
+
* The box is Add Funds Form's: no fill, a 10px radius (raw in Figma, off the
|
|
27
|
+
* radius scale), 16 / 18 / 14 / 18 padding. Its stroke is the heavier
|
|
28
|
+
* 1px Stroke/Border, where Add Funds Form's is Stroke/Divider.
|
|
29
|
+
*
|
|
30
|
+
* header title Heading/Compact, hint Body/Dense in Content/Tertiary, on one
|
|
31
|
+
* baseline, 10px apart, 6px under them
|
|
32
|
+
* group a hairline above, 12px above the title, 12px between its rows,
|
|
33
|
+
* 10px below
|
|
34
|
+
* row field containers sharing the width, 16px apart
|
|
35
|
+
* toggle a Switch and its label, 10px apart
|
|
36
|
+
* footer a hairline above and 12px under it; a 220px reason, a note that
|
|
37
|
+
* takes the rest, Cancel and Save, 8px apart
|
|
38
|
+
*
|
|
39
|
+
* Every field is an existing component (Input, Search Field, Dropdown Field,
|
|
40
|
+
* Switch, Button). The hairlines are inset shadows so they take no height.
|
|
41
|
+
*
|
|
42
|
+
* Type is raw in the file — 14 Semi Bold, 13 Regular, 12 Semi Bold, with Auto
|
|
43
|
+
* line heights and no styles bound — so the styles those sizes belong to ship:
|
|
44
|
+
* Heading/Compact, Body/Dense and Action/Compact Active, as on Add Funds Form
|
|
45
|
+
* and Funding Total (designer-list item 102).
|
|
46
|
+
*
|
|
47
|
+
* A group is a `role="group"` named by its title, not a <fieldset>: a legend
|
|
48
|
+
* cannot sit below the group's own top rule.
|
|
49
|
+
*/
|
|
50
|
+
|
|
51
|
+
@layer components {
|
|
52
|
+
.vd-section-edit {
|
|
53
|
+
@apply flex w-full flex-col;
|
|
54
|
+
@apply px-[18px] pt-4 pb-3.5; /* 18px / 16px / 14px */
|
|
55
|
+
@apply rounded-[10px]; /* raw in Figma, as Add Funds Form */
|
|
56
|
+
@apply border border-[length:var(--border-line)] border-stroke-border;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.vd-section-edit-header {
|
|
60
|
+
@apply flex flex-wrap items-baseline gap-x-2.5 pb-1.5; /* 10px / 6px */
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.vd-section-edit-title {
|
|
64
|
+
@apply text-heading-compact text-content-primary;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.vd-section-edit-hint {
|
|
68
|
+
@apply text-body-dense text-content-tertiary; /* 13 / 18 / 400 */
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.vd-section-edit-group {
|
|
72
|
+
@apply flex flex-col gap-3; /* 12px */
|
|
73
|
+
@apply pt-3 pb-2.5; /* 12px / 10px */
|
|
74
|
+
box-shadow: inset 0 1px 0 var(--color-stroke-divider);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.vd-section-edit-group-title {
|
|
78
|
+
@apply text-action-compact-active text-content-tertiary; /* 12 / 16 / 600 */
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.vd-section-edit-row {
|
|
82
|
+
@apply flex items-start gap-4; /* 16px */
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.vd-section-edit-row > * {
|
|
86
|
+
@apply flex-1;
|
|
87
|
+
min-width: 0;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.vd-section-edit-toggle {
|
|
91
|
+
@apply inline-flex cursor-pointer items-center gap-2.5 self-start; /* 10px */
|
|
92
|
+
@apply text-body-dense text-content-secondary; /* 13 / 18 / 400 */
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.vd-section-edit-footer {
|
|
96
|
+
@apply flex items-center gap-2; /* 8px */
|
|
97
|
+
@apply pt-3; /* 12px */
|
|
98
|
+
box-shadow: inset 0 1px 0 var(--color-stroke-divider);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.vd-section-edit-reason {
|
|
102
|
+
@apply w-[220px] shrink-0;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.vd-section-edit-note {
|
|
106
|
+
@apply flex-1;
|
|
107
|
+
min-width: 0;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Severity Count
|
|
3
|
+
*
|
|
4
|
+
* A row's open-item count: a Severity Marker plus a number. Extracted from
|
|
5
|
+
* Figma Severity Count (2016:43181) — 6 variants across Severity (Critical /
|
|
6
|
+
* Review / Neutral) × State (Rest / Hover), plus a `Count` text property.
|
|
7
|
+
* Figma: "Click opens the finding. Replaces the old '✓ 5 – 1' tally and
|
|
8
|
+
* '1 Conflict' alert."
|
|
9
|
+
*
|
|
10
|
+
* <button class="vd-severity-count" aria-label="1 critical finding">
|
|
11
|
+
* <span class="vd-severity-marker vd-severity-marker-critical" aria-hidden="true"></span>
|
|
12
|
+
* 1
|
|
13
|
+
* </button>
|
|
14
|
+
*
|
|
15
|
+
* THE SEVERITY IS THE MARKER'S, NOT THIS COMPONENT'S. The three Severity values
|
|
16
|
+
* change nothing but the nested Severity Marker instance, so there are no
|
|
17
|
+
* severity classes here — pick the marker. Figma's "Neutral" nests the marker's
|
|
18
|
+
* Info variant; the two axes name the same thing differently.
|
|
19
|
+
*
|
|
20
|
+
* 24px tall (a raw frame height, bound to no Height variable — so it is
|
|
21
|
+
* content-driven here, 3 + 18 + 3), 7px padding-x, 6px gap, 6px radius. The count is raw 13px Medium in Figma with
|
|
22
|
+
* no text style bound; Action/Default (13/18/500) carries the same size and
|
|
23
|
+
* weight and is what ships. Hover is Action/Hover.
|
|
24
|
+
*
|
|
25
|
+
* IN A ROW'S STATUS COLUMN IT IS FLUSH. Every instance the page frames nest
|
|
26
|
+
* in a status column — Content Row's, and an owner row's status cell —
|
|
27
|
+
* overrides the left padding to 0 (the right stays 7), so the 16px marker
|
|
28
|
+
* starts at the column's edge and the hover fill starts at the marker.
|
|
29
|
+
* `.vd-severity-count-flush` is that override. It is not a variant in the set;
|
|
30
|
+
* the six variants all draw 7px each side.
|
|
31
|
+
*
|
|
32
|
+
* It is a control — "click opens the finding" — so it is a <button> and takes
|
|
33
|
+
* the focus ring. The marker is `aria-hidden` inside it and the button's
|
|
34
|
+
* `aria-label` says both the count and the severity: a bare "1" names nothing.
|
|
35
|
+
*/
|
|
36
|
+
|
|
37
|
+
@layer components {
|
|
38
|
+
.vd-severity-count {
|
|
39
|
+
@apply inline-flex shrink-0 items-center gap-1.5; /* 6px */
|
|
40
|
+
/* 24 tall — 3 + Action/Default's 18px line + 3. Not pinned and not on a
|
|
41
|
+
control token: Figma's frame is a raw 24, bound to no Height variable. */
|
|
42
|
+
@apply px-1.75 py-0.75; /* 7px, 3px */
|
|
43
|
+
@apply rounded-control; /* 6px */
|
|
44
|
+
|
|
45
|
+
@apply appearance-none border-none bg-transparent no-underline;
|
|
46
|
+
@apply text-action-default text-content-secondary; /* 13 / 18 / 500 */
|
|
47
|
+
@apply cursor-pointer transition-colors duration-150;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/* In a status column: no left padding, so the marker starts at the column's
|
|
51
|
+
edge. The right 7px stays. From the page frames' instance overrides. */
|
|
52
|
+
.vd-severity-count-flush {
|
|
53
|
+
@apply pl-0;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.vd-severity-count:hover:not(:disabled) {
|
|
57
|
+
@apply bg-action-hover;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.vd-severity-count:focus-visible {
|
|
61
|
+
@apply focus-ring;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Severity Marker
|
|
3
|
+
*
|
|
4
|
+
* The severity shape for a finding. Extracted from Figma Severity Marker
|
|
5
|
+
* (2016:43156) — 3 variants on a `Severity` axis. Figma's description:
|
|
6
|
+
* "Critical = diamond, Review = solid dot, Info = hollow ring. Shape carries
|
|
7
|
+
* meaning without colour (ADA)."
|
|
8
|
+
*
|
|
9
|
+
* <span class="vd-severity-marker vd-severity-marker-critical"
|
|
10
|
+
* role="img" aria-label="Critical"></span>
|
|
11
|
+
*
|
|
12
|
+
* severity shape colour
|
|
13
|
+
* critical 7×7 square, 1.5px radius, rotated 45° Critical/Main
|
|
14
|
+
* review 8×8 solid dot Warning/Main
|
|
15
|
+
* info 8×8 ring, 1.5px Neutral/Main
|
|
16
|
+
*
|
|
17
|
+
* THE SHAPE IS THE MESSAGE, so each severity is a different silhouette, not one
|
|
18
|
+
* shape in three colours. It replaces the amber #triangle-alert glyph Field
|
|
19
|
+
* Verification used for a mismatch (decided 2026-11-19).
|
|
20
|
+
*
|
|
21
|
+
* ONE ELEMENT. The box is a fixed 16×16 (the same footprint as Section Marker,
|
|
22
|
+
* so the two align in a column) and the shape is its ::before — no child, no
|
|
23
|
+
* sprite glyph. The marker has no text, so it needs `role="img"` and an
|
|
24
|
+
* `aria-label`, or `aria-hidden="true"` when a label beside it says the same.
|
|
25
|
+
*
|
|
26
|
+
* THE RING IS A GRADIENT, NOT A BORDER. Chrome floors a fractional
|
|
27
|
+
* border-width — 1.5px computes to 1px — so the info ring is a radial-gradient
|
|
28
|
+
* stop at `100% - 1.5px`, the same reason Loading Indicator's ring is a mask.
|
|
29
|
+
*
|
|
30
|
+
* A bare `.vd-severity-marker` draws nothing and still occupies 16px.
|
|
31
|
+
*
|
|
32
|
+
* The info ring is Neutral/Main as bound: 2.81:1 on Paper in Light, under the
|
|
33
|
+
* 3:1 graphics bar — the lowest severity is deliberately the quietest mark.
|
|
34
|
+
* Designer-list item 77.
|
|
35
|
+
*/
|
|
36
|
+
|
|
37
|
+
@layer components {
|
|
38
|
+
.vd-severity-marker {
|
|
39
|
+
@apply inline-flex size-4 shrink-0 items-center justify-center; /* 16×16 */
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.vd-severity-marker::before {
|
|
43
|
+
content: "";
|
|
44
|
+
@apply block shrink-0;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* Critical — the diamond */
|
|
48
|
+
.vd-severity-marker-critical::before {
|
|
49
|
+
@apply size-[7px] rotate-45 rounded-[1.5px] bg-critical;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/* Review — the solid dot */
|
|
53
|
+
.vd-severity-marker-review::before {
|
|
54
|
+
@apply size-2 rounded-pill bg-warning; /* 8px */
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/* Info — the hollow ring, 1.5px, painted as a gradient (see the header) */
|
|
58
|
+
.vd-severity-marker-info::before {
|
|
59
|
+
@apply size-2 rounded-pill; /* 8px */
|
|
60
|
+
background: radial-gradient(
|
|
61
|
+
closest-side,
|
|
62
|
+
transparent calc(100% - 1.5px),
|
|
63
|
+
var(--color-neutral) calc(100% - 1.5px)
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Snapshot Metric
|
|
3
|
+
*
|
|
4
|
+
* One figure in a record's snapshot: a label over a value. Extracted from
|
|
5
|
+
* Figma Snapshot Metric (2042:34359) — 4 variants on a `Type` axis.
|
|
6
|
+
*
|
|
7
|
+
* <div class="vd-snapshot-metric">
|
|
8
|
+
* <p class="vd-snapshot-metric-label">KYB</p>
|
|
9
|
+
* <p class="vd-snapshot-metric-values">
|
|
10
|
+
* <span class="vd-snapshot-metric-value">Pass</span>
|
|
11
|
+
* <span class="vd-snapshot-metric-detail">14/16</span>
|
|
12
|
+
* </p>
|
|
13
|
+
* </div>
|
|
14
|
+
*
|
|
15
|
+
* type after the value
|
|
16
|
+
* Value + detail a Body/Default detail, on the value's baseline
|
|
17
|
+
* Value + download an Icon Button (inline, 18), centred
|
|
18
|
+
* Count + dots 6px status dots, centred, 4px apart
|
|
19
|
+
* Count + unit a Body/Default unit, on the value's baseline
|
|
20
|
+
*
|
|
21
|
+
* The four types are ONE layout with different trailing content, so there are
|
|
22
|
+
* no type classes: the label is Label/Compact in Content/Tertiary, the value
|
|
23
|
+
* Heading/Section (18/24/600) in Content/Primary, a detail or unit
|
|
24
|
+
* Body/Default in Content/Secondary. 120px wide, 2px between label and value.
|
|
25
|
+
*
|
|
26
|
+
* BASELINE OR CENTRE. Text after the value sits on its baseline; a control or
|
|
27
|
+
* dots sit centred. `.vd-snapshot-metric-values-center` switches the row.
|
|
28
|
+
*
|
|
29
|
+
* THE DOTS: `.vd-snapshot-metric-dot` is a filled 6px Approved/Main dot, and
|
|
30
|
+
* `-dot-open` a 1px Warning/Main ring — an owner who has not finished. Two
|
|
31
|
+
* classes rather than Chip's Dot because the open form has no Dot equivalent.
|
|
32
|
+
* Each needs an accessible name on the group ("2 of 3 owners verified").
|
|
33
|
+
*
|
|
34
|
+
* PINNED DIVERGENCE: every type is 42px tall here. Figma's Count + dots frame
|
|
35
|
+
* is 34 — its count keeps the 24px line but sits in a 16px box — which would
|
|
36
|
+
* set that one metric 8px short of its neighbours. Designer-list item 83.
|
|
37
|
+
*/
|
|
38
|
+
|
|
39
|
+
@layer components {
|
|
40
|
+
.vd-snapshot-metric {
|
|
41
|
+
@apply flex w-30 shrink-0 flex-col items-start gap-0.5; /* 120px, 2px */
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.vd-snapshot-metric-label {
|
|
45
|
+
@apply text-label-compact text-content-tertiary; /* 12 / 16 / 600 */
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.vd-snapshot-metric-values {
|
|
49
|
+
@apply flex items-baseline gap-1; /* 4px */
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.vd-snapshot-metric-values-center {
|
|
53
|
+
@apply items-center;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.vd-snapshot-metric-value {
|
|
57
|
+
@apply text-heading-section text-content-primary; /* 18 / 24 / 600 */
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.vd-snapshot-metric-detail {
|
|
61
|
+
@apply text-body-default text-content-secondary; /* 14 / 20 / 400 */
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.vd-snapshot-metric-dot {
|
|
65
|
+
@apply inline-block size-1.5 shrink-0 rounded-pill bg-approved; /* 6px */
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.vd-snapshot-metric-dot-open {
|
|
69
|
+
@apply bg-transparent;
|
|
70
|
+
box-shadow: inset 0 0 0 1px var(--color-warning);
|
|
71
|
+
}
|
|
72
|
+
}
|
package/src/components/step.css
CHANGED
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
* -upcoming Surface/Paper 1px Content/Faint number Neutral/Strong, Regular
|
|
31
31
|
*
|
|
32
32
|
* THE LABEL RAMP IS INVERTED AND THAT IS NOT A TRANSCRIPTION ERROR. A completed
|
|
33
|
-
* step's label is `Content/Tertiary` (#
|
|
33
|
+
* step's label is `Content/Tertiary` (#6a6a78 since 0.7.0) while an upcoming one is
|
|
34
34
|
* `Neutral/Strong` (#4e4e59) — so the step you have already finished is drawn
|
|
35
35
|
* LIGHTER than the one you have not reached. The weights disagree in the other
|
|
36
36
|
* direction: completed and active are Medium, upcoming is Regular. Reproduced
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Summary Panel
|
|
3
|
+
*
|
|
4
|
+
* The body of the review panel's Summary tab: a record at a glance — where it
|
|
5
|
+
* stands, who has it, what kind of thing it is, its risk score, its open
|
|
6
|
+
* findings, the key checks and the products applied for. Extracted from the
|
|
7
|
+
* body of Figma Summary (1606:98568) and from Summary Assignee Row
|
|
8
|
+
* (1774:53470). New in 0.7.0.
|
|
9
|
+
*
|
|
10
|
+
* <div class="vd-summary-panel">
|
|
11
|
+
* <section class="vd-summary-panel-section" aria-label="Status">
|
|
12
|
+
* <dl class="vd-summary-panel-rows">
|
|
13
|
+
* <div class="vd-summary-panel-row">
|
|
14
|
+
* <dt class="vd-summary-panel-row-label">Status</dt>
|
|
15
|
+
* <dd class="vd-summary-panel-row-value">
|
|
16
|
+
* <span class="vd-panel-status"><span class="vd-dot vd-dot-sm vd-dot-warning"></span>Pending Review</span>
|
|
17
|
+
* </dd>
|
|
18
|
+
* </div>
|
|
19
|
+
* </dl>
|
|
20
|
+
* </section>
|
|
21
|
+
* <section class="vd-summary-panel-section" aria-labelledby="ki">
|
|
22
|
+
* <h3 class="vd-summary-panel-title" id="ki">Key Indicators</h3>
|
|
23
|
+
* …rows…
|
|
24
|
+
* </section>
|
|
25
|
+
* </div>
|
|
26
|
+
*
|
|
27
|
+
* THE PANEL is a column with 20px at the sides. Each SECTION has 16px above
|
|
28
|
+
* and below, 16px between its blocks, and a hairline under it (not the last).
|
|
29
|
+
* A section title is Label/Compact in Content/Secondary.
|
|
30
|
+
*
|
|
31
|
+
* ROWS — a label and a value, 32px each, butting. The label is a fixed 120px
|
|
32
|
+
* column in Body/Dense / Content/Secondary; the value starts 8px after it, in
|
|
33
|
+
* Body/Dense Strong / Content/Primary, and may lead with a 6px Dot or an
|
|
34
|
+
* Avatar sm, 8px before the text. `.vd-summary-panel-row-meta` is the quieter
|
|
35
|
+
* tail of a value ("· 2h ago"): Regular, Content/Tertiary.
|
|
36
|
+
*
|
|
37
|
+
* `.vd-summary-panel-row-button` makes a row a control — the assignee, which
|
|
38
|
+
* opens a menu. It bleeds 6px past the column on both sides so its
|
|
39
|
+
* Action/Subtle hover fill can, takes a 4px radius, and shows
|
|
40
|
+
* `.vd-summary-panel-row-chevron` (14px, Content/Secondary) at its far end on
|
|
41
|
+
* hover, on focus and while `aria-expanded="true"`, when the chevron also
|
|
42
|
+
* turns over. Figma swaps the glyph for #chevron-up; one glyph turned is the
|
|
43
|
+
* same drawing.
|
|
44
|
+
*
|
|
45
|
+
* TAGS — `.vd-summary-panel-tags` wraps the record's Tags, 8px apart each way.
|
|
46
|
+
*
|
|
47
|
+
* SCORE — the number (Heading/Page) beside a label (Action/Compact,
|
|
48
|
+
* Content/Secondary) and a detail line (Supporting/Caption, Content/Primary),
|
|
49
|
+
* over a 4px bar of equal segments 4px apart. A segment is Surface/Neutral
|
|
50
|
+
* until `--progress` (0–100, set inline) fills it from the left in
|
|
51
|
+
* Content/Primary. Scoring Details goes underneath.
|
|
52
|
+
*
|
|
53
|
+
* FINDINGS — a bordered summary of what is open (1px Stroke/Divider, 8px
|
|
54
|
+
* radius, 6 / 4 / 6 / 12 padding): a Body/Default Strong title over a row of
|
|
55
|
+
* counts, each a 6px Dot and a Supporting/Caption label 6px apart, 12px between
|
|
56
|
+
* counts; an Icon Button sm at the far end.
|
|
57
|
+
*
|
|
58
|
+
* PRODUCTS — one 32px line each: the name in Body/Dense / Content/Primary, its
|
|
59
|
+
* id at the far end in Data/Compact (mono) / Content/Secondary.
|
|
60
|
+
*
|
|
61
|
+
* NOTE — a closing line in Body/Dense / Content/Tertiary ("Created …").
|
|
62
|
+
*
|
|
63
|
+
* NOT SHIPPED, from the same Figma symbol: its own header (three underline
|
|
64
|
+
* Tabs and an Icon Button — build it from Tabs), the collapsed 41px strip
|
|
65
|
+
* (the findings panel collapses to Panel Strip Buttons instead), and the
|
|
66
|
+
* "Review Checklist" bar at the foot, which is the older Checklist the library
|
|
67
|
+
* does not ship.
|
|
68
|
+
*
|
|
69
|
+
* Differences from the file, on the designer list (item 103): "Key Indicators"
|
|
70
|
+
* binds Supporting/Caption Strong where "Product · 2" binds Label/Compact, and
|
|
71
|
+
* one title style ships; the risk bar's segments are unnamed rectangles with no
|
|
72
|
+
* progress semantics, so give the bar `role="img"` and say the score in its
|
|
73
|
+
* label; and the hairlines are inset shadows so they take no height.
|
|
74
|
+
*/
|
|
75
|
+
|
|
76
|
+
@layer components {
|
|
77
|
+
.vd-summary-panel {
|
|
78
|
+
@apply flex w-full flex-col;
|
|
79
|
+
@apply px-5; /* 20px */
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/* --- Section ------------------------------------------------------------ */
|
|
83
|
+
|
|
84
|
+
.vd-summary-panel-section {
|
|
85
|
+
@apply flex w-full flex-col gap-4; /* 16px */
|
|
86
|
+
@apply py-4; /* 16px */
|
|
87
|
+
box-shadow: inset 0 -1px 0 var(--color-stroke-divider);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.vd-summary-panel-section:last-child {
|
|
91
|
+
box-shadow: none;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.vd-summary-panel-title {
|
|
95
|
+
@apply text-label-compact text-content-secondary; /* 12 / 16 / 600 */
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/* --- Rows --------------------------------------------------------------- */
|
|
99
|
+
|
|
100
|
+
.vd-summary-panel-rows {
|
|
101
|
+
@apply m-0 flex w-full flex-col;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.vd-summary-panel-row {
|
|
105
|
+
@apply flex h-8 w-full items-center gap-2; /* 32px, 8px */
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.vd-summary-panel-row-label {
|
|
109
|
+
@apply m-0 w-30 shrink-0 truncate; /* 120px */
|
|
110
|
+
@apply text-left text-body-dense text-content-secondary; /* 13 / 18 / 400 */
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.vd-summary-panel-row-value {
|
|
114
|
+
@apply m-0 flex flex-1 items-center gap-2; /* 8px, to a leading Dot or Avatar */
|
|
115
|
+
min-width: 0;
|
|
116
|
+
@apply text-left text-body-dense-strong text-content-primary; /* 13 / 18 / 500 */
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.vd-summary-panel-row-meta {
|
|
120
|
+
@apply text-body-dense text-content-tertiary;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/* A row that is a control. The 6px bleed is Figma's Row Fill, 292px wide
|
|
124
|
+
behind a 280px row. */
|
|
125
|
+
.vd-summary-panel-row-button {
|
|
126
|
+
@apply -mx-1.5 px-1.5; /* 6px */
|
|
127
|
+
width: calc(100% + 12px);
|
|
128
|
+
@apply rounded-tight; /* 4px */
|
|
129
|
+
@apply appearance-none border-none bg-transparent;
|
|
130
|
+
@apply cursor-pointer transition-colors duration-150;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.vd-summary-panel-row-button:hover:not(:disabled),
|
|
134
|
+
.vd-summary-panel-row-button[aria-expanded="true"] {
|
|
135
|
+
@apply bg-action-subtle;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.vd-summary-panel-row-button:focus-visible {
|
|
139
|
+
@apply focus-ring;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.vd-summary-panel-row-chevron {
|
|
143
|
+
@apply ml-auto shrink-0 text-content-secondary opacity-0;
|
|
144
|
+
@apply transition-[opacity,transform] duration-150;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.vd-summary-panel-row-button:hover:not(:disabled) .vd-summary-panel-row-chevron,
|
|
148
|
+
.vd-summary-panel-row-button:focus-visible .vd-summary-panel-row-chevron,
|
|
149
|
+
.vd-summary-panel-row-button[aria-expanded="true"] .vd-summary-panel-row-chevron {
|
|
150
|
+
@apply opacity-100;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.vd-summary-panel-row-button[aria-expanded="true"] .vd-summary-panel-row-chevron {
|
|
154
|
+
@apply rotate-180;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/* --- Tags --------------------------------------------------------------- */
|
|
158
|
+
|
|
159
|
+
.vd-summary-panel-tags {
|
|
160
|
+
@apply flex w-full flex-wrap gap-2; /* 8px */
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/* --- Score -------------------------------------------------------------- */
|
|
164
|
+
|
|
165
|
+
.vd-summary-panel-score {
|
|
166
|
+
@apply flex w-full flex-col gap-2; /* 8px */
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.vd-summary-panel-score-head {
|
|
170
|
+
@apply flex items-center gap-2; /* 8px */
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/* Figma's number sits in a fixed 34px box, which two digits fill. */
|
|
174
|
+
.vd-summary-panel-score-value {
|
|
175
|
+
@apply shrink-0 text-heading-page text-content-primary; /* 19 / 24 / 600 */
|
|
176
|
+
min-width: 34px;
|
|
177
|
+
font-variant-numeric: tabular-nums;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.vd-summary-panel-score-text {
|
|
181
|
+
@apply flex flex-1 flex-col;
|
|
182
|
+
min-width: 0;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.vd-summary-panel-score-label {
|
|
186
|
+
@apply text-action-compact text-content-secondary; /* 12 / 16 / 500 */
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.vd-summary-panel-score-detail {
|
|
190
|
+
@apply text-supporting-caption text-content-primary; /* 12 / 18 / 400 */
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.vd-summary-panel-score-bar {
|
|
194
|
+
@apply flex h-1 w-full gap-1 overflow-hidden; /* 4px tall, 4px apart */
|
|
195
|
+
@apply rounded-pill;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.vd-summary-panel-score-segment {
|
|
199
|
+
@apply h-full flex-1;
|
|
200
|
+
background: linear-gradient(
|
|
201
|
+
to right,
|
|
202
|
+
var(--color-content-primary) calc(var(--progress, 0) * 1%),
|
|
203
|
+
var(--color-surface-neutral) 0
|
|
204
|
+
);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/* --- Findings ----------------------------------------------------------- */
|
|
208
|
+
|
|
209
|
+
.vd-summary-panel-findings {
|
|
210
|
+
@apply flex w-full items-center justify-between gap-4;
|
|
211
|
+
@apply py-1.5 pr-1 pl-3; /* 6px / 4px / 12px */
|
|
212
|
+
@apply rounded-surface; /* 8px */
|
|
213
|
+
@apply border border-[length:var(--border-line)] border-stroke-divider;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.vd-summary-panel-findings-text {
|
|
217
|
+
@apply flex flex-1 flex-col;
|
|
218
|
+
min-width: 0;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.vd-summary-panel-findings-title {
|
|
222
|
+
@apply text-body-default-strong text-content-primary; /* 14 / 20 / 500 */
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.vd-summary-panel-findings-counts {
|
|
226
|
+
@apply flex flex-wrap gap-x-3; /* 12px */
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.vd-summary-panel-findings-count {
|
|
230
|
+
@apply inline-flex items-center gap-1.5; /* 6px */
|
|
231
|
+
@apply text-supporting-caption text-content-secondary; /* 12 / 18 / 400 */
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
/* --- Products ----------------------------------------------------------- */
|
|
235
|
+
|
|
236
|
+
.vd-summary-panel-product {
|
|
237
|
+
@apply flex h-8 w-full items-center justify-between gap-1; /* 32px, 4px */
|
|
238
|
+
@apply text-body-dense text-content-primary; /* 13 / 18 / 400 */
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.vd-summary-panel-product-id {
|
|
242
|
+
@apply shrink-0 text-data-compact font-mono text-content-secondary; /* 12 / 16.5 / 400 */
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
/* --- Note --------------------------------------------------------------- */
|
|
246
|
+
|
|
247
|
+
.vd-summary-panel-note {
|
|
248
|
+
@apply text-body-dense text-content-tertiary; /* 13 / 18 / 400 */
|
|
249
|
+
}
|
|
250
|
+
}
|