@valiify/dashboard-ui 0.6.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/CHANGELOG.md +433 -2
  2. package/COMPONENTS.md +448 -73
  3. package/README.md +3 -3
  4. package/class-manifest.json +173 -4
  5. package/design-methodology/dashboard.md +676 -308
  6. package/dist/dashboard-ui.css +1258 -206
  7. package/dist/index.css +929 -181
  8. package/package.json +8 -8
  9. package/src/components/add-funds-form.css +2 -1
  10. package/src/components/button.css +40 -21
  11. package/src/components/checkbox.css +4 -2
  12. package/src/components/checklist-group.css +14 -6
  13. package/src/components/composer.css +11 -9
  14. package/src/components/content-row.css +29 -4
  15. package/src/components/data-list.css +91 -0
  16. package/src/components/data-row.css +14 -1
  17. package/src/components/divider.css +1 -1
  18. package/src/components/dropdown-field.css +30 -18
  19. package/src/components/dropdown-menu.css +12 -6
  20. package/src/components/field-verification.css +6 -1
  21. package/src/components/filter-segment.css +2 -1
  22. package/src/components/final-decision.css +51 -0
  23. package/src/components/finding-card.css +60 -17
  24. package/src/components/finding-option.css +10 -4
  25. package/src/components/funding-status.css +3 -2
  26. package/src/components/funding-total.css +8 -3
  27. package/src/components/funding-transaction.css +28 -5
  28. package/src/components/index.css +7 -0
  29. package/src/components/input.css +60 -21
  30. package/src/components/keycap.css +1 -1
  31. package/src/components/link.css +6 -2
  32. package/src/components/loading-indicator.css +5 -5
  33. package/src/components/menu-item.css +109 -21
  34. package/src/components/modal.css +21 -2
  35. package/src/components/navigation-rail.css +136 -6
  36. package/src/components/owner-row.css +170 -0
  37. package/src/components/owner-table-header.css +28 -13
  38. package/src/components/panel-section-header.css +5 -2
  39. package/src/components/pill.css +3 -2
  40. package/src/components/radio-select.css +5 -2
  41. package/src/components/recipient-input.css +4 -4
  42. package/src/components/record.css +56 -0
  43. package/src/components/scoring-details.css +79 -0
  44. package/src/components/section-edit.css +109 -0
  45. package/src/components/section-marker.css +4 -3
  46. package/src/components/sensitive-data.css +8 -4
  47. package/src/components/severity-count.css +13 -0
  48. package/src/components/step.css +1 -1
  49. package/src/components/summary-panel.css +250 -0
  50. package/src/components/summary-preview.css +5 -1
  51. package/src/components/tabs.css +7 -7
  52. package/src/components/tag.css +15 -9
  53. package/src/components/textarea.css +38 -18
  54. package/src/components/toast.css +13 -10
  55. package/src/components/tooltip.css +4 -1
  56. package/src/themes/valiify-tokens.css +1 -1
  57. package/src/themes/valiify.css +1 -1
  58. package/src/utility-surface.css +93 -1
  59. package/types/components.d.ts +100 -5
@@ -9,7 +9,7 @@
9
9
  * <h3 class="vd-panel-section-header-title">Findings</h3>
10
10
  * <span class="vd-panel-section-header-count">5</span>
11
11
  * <button class="vd-icon-button vd-icon-button-inline" aria-expanded="true"
12
- * aria-controls="findings" aria-label="Findings">…#chevron-down…</button>
12
+ * aria-controls="findings" aria-label="Findings">…#chevron-up…</button>
13
13
  * </div>
14
14
  *
15
15
  * 24px tall (3 + the 18px Icon Button + 3 — not pinned), 12px padding-x, 8px
@@ -47,7 +47,10 @@
47
47
  @apply transition-transform duration-150;
48
48
  }
49
49
 
50
+ /* The glyph is #chevron-up, as Figma nests it; closed, it turns over to
51
+ point down (0.7.0). Through 0.6.0 the docs used #chevron-down with a −90°
52
+ turn, which is the wrong glyph and, on the right one, points left. */
50
53
  .vd-panel-section-header [aria-expanded="false"] .vd-icon {
51
- @apply -rotate-90;
54
+ @apply rotate-180;
52
55
  }
53
56
  }
@@ -44,8 +44,9 @@
44
44
  .vd-pill {
45
45
  /* Layout */
46
46
  @apply inline-flex shrink-0 items-center gap-1.25; /* 5px gap */
47
- @apply px-2.25 py-0.5; /* 9px / 2px */
48
- @apply h-[17px];
47
+ @apply px-2.25 py-0.5; /* 9px / 2px — 22px tall: 2 + the 18px line + 2 */
48
+ /* No height pin since 2026-11-30: Figma's Pill hugs at 22 (it was pinned
49
+ to 17 — designer-list item 49, answered by the file). */
49
50
 
50
51
  /* Shape — no border at any state */
51
52
  @apply rounded-pill;
@@ -18,8 +18,11 @@
18
18
 
19
19
  @layer components {
20
20
  .vd-radio-select {
21
- /* Layout - horizontal with gap between radio and label */
22
- @apply inline-flex items-center gap-2.25; /* Figma Spacing/9 (9px) */
21
+ /* Layout - horizontal with gap between radio and label.
22
+ 22px tall since 0.7.0: 2px above and below the 18px label line, as
23
+ Figma's Radio frame is (139:1049 — 2 + 18 + 2). It was the bare 18px
24
+ line through 0.6.0, so a stack of radios is 4px taller per row. */
25
+ @apply inline-flex items-center gap-2.25 py-0.5; /* Figma Spacing/9 (9px), Spacing/2 */
23
26
  @apply cursor-pointer;
24
27
  }
25
28
 
@@ -43,7 +43,7 @@
43
43
  .vd-recipient-input-shell {
44
44
  /* Layout — chips wrap; lg: 12 / 5 padding, 4px chip gap */
45
45
  @apply flex w-full flex-wrap items-center gap-1;
46
- @apply min-h-control-lg px-3 py-1.25; /* 12 / 5 (Figma 6 − hairline) */
46
+ @apply min-h-control-lg px-2.75 py-1.25; /* 11 / 5 (Figma 12 / 6 − hairline) */
47
47
 
48
48
  /* Shape */
49
49
  @apply rounded-control; /* 6px */
@@ -98,19 +98,19 @@
98
98
 
99
99
  /* Identical to the bare base — lg IS the default (there is no md). */
100
100
  .vd-recipient-input-lg .vd-recipient-input-shell {
101
- @apply min-h-control-lg gap-1 px-3 py-1.25; /* floor 32; 12 / 5 (Figma 6 − hairline); chip gap 4 */
101
+ @apply min-h-control-lg gap-1 px-2.75 py-1.25; /* floor 32; 11 / 5 (Figma 12 / 6 − hairline); chip gap 4 */
102
102
  @apply text-supporting-caption; /* 12 / 18 (was Micro L 11) */
103
103
  }
104
104
 
105
105
  .vd-recipient-input-xl .vd-recipient-input-shell {
106
- @apply min-h-control-xl gap-1.5 px-4 py-0.75; /* floor 40; 16 / 3 (Figma 4 − hairline); chip gap 6 */
106
+ @apply min-h-control-xl gap-x-1 gap-y-1.5 px-3.75 py-0.75; /* floor 40; 15 / 3 (Figma 16 / 4 − hairline); chips 4 apart, rows 6 apart */
107
107
  @apply text-body-dense; /* 13 / 18 / 400 */
108
108
  }
109
109
 
110
110
  /* --- Helper -------------------------------------------------------------- */
111
111
 
112
112
  .vd-recipient-input-helper {
113
- @apply m-0 pl-4 text-supporting-caption text-content-tertiary; /* 12 (was 11), 16px inset */
113
+ @apply m-0 pl-1 text-supporting-caption text-content-tertiary; /* 12; 4px inset (Figma's Helper, was 16) */
114
114
  }
115
115
 
116
116
  .vd-recipient-input-error .vd-recipient-input-helper {
@@ -0,0 +1,56 @@
1
+ /**
2
+ * Record
3
+ *
4
+ * The column grid a record's rows share. Not a Figma component — the page
5
+ * frames draw every row of a record on one grid (a 536px text column, the
6
+ * status column, a 78px action group) and the rows used to carry that 536 as a
7
+ * fixed width each, so a narrow page could only squeeze the status column, down
8
+ * to nothing. New in 0.7.0.
9
+ *
10
+ * <div class="vd-record">
11
+ * <div class="vd-content-row">…</div>
12
+ * <div class="vd-data-row">…</div>
13
+ * <div class="vd-funding-transaction">…</div>
14
+ * </div>
15
+ *
16
+ * Put it on the element that holds the rows. It does two things:
17
+ *
18
+ * 1. makes that element a size container (`container-type: inline-size`), and
19
+ * 2. defines `--vd-record-text`, the width of the text column, from it:
20
+ * 536px while the container can afford it, then whatever is left once the
21
+ * status column is down to 88px.
22
+ *
23
+ * Every row that sits on the grid reads the property — Content Row's text,
24
+ * Data Row's value (the property minus the 200px label and the 16px gap),
25
+ * Funding Transaction's and Funding Total's summary — so their status columns
26
+ * stay in line at any width. Outside a `.vd-record` the property is unset and
27
+ * each row keeps its 536px, exactly as before 0.7.0.
28
+ *
29
+ * THE OWNER LIST IS NOT ON THIS GRID (decided 2026-11-19). Owner Table Header
30
+ * and Owner Row keep a fixed 268px at the right edge (three status columns and
31
+ * the chevron) and let the owner column give way; they do not read the
32
+ * property. In the frames' 828px row their statuses start at x 556, on this
33
+ * grid's status column — 268 is this grid's own right side there (174 + 16 +
34
+ * 78). At a narrower width the owner list keeps its own columns under its own
35
+ * header, and the two part company: in C5, 450 against 556.
36
+ *
37
+ * The arithmetic, for a container W wide: a row is 4 + text + 16 + status + 16
38
+ * + 78 + 4, so text + status = W − 118. In the 960 page frames the row is 828,
39
+ * which is 536 + 174 — the frames' own numbers (re-read 2026-11-19). The
40
+ * status column gives way first, to 88px (W = 742); below that the text column
41
+ * does. It stops at 280px, where Data Row's value is 64px — narrower than that
42
+ * and the rows overflow, so give the page a minimum width.
43
+ *
44
+ * The 88px floor, the order the columns give way in and the 280px stop are
45
+ * library decisions: Figma draws one narrow frame (C5) and no rule
46
+ * (designer-list item 99). An inline-size container cannot take its width from
47
+ * its content, so the element needs a width of its own — a block or a flex
48
+ * item that fills, not something shrink-wrapped.
49
+ */
50
+
51
+ @layer components {
52
+ .vd-record {
53
+ container-type: inline-size;
54
+ --vd-record-text: max(280px, min(536px, 100cqw - 206px));
55
+ }
56
+ }
@@ -0,0 +1,79 @@
1
+ /**
2
+ * Scoring Details
3
+ *
4
+ * Where a risk score came from: a one-line summary that opens the rules behind
5
+ * it. Extracted from Figma Scoring details (1627:102932) — 2 variants on
6
+ * `Expanded`. New in 0.7.0.
7
+ *
8
+ * <div class="vd-scoring-details">
9
+ * <p class="vd-scoring-details-summary">
10
+ * From 3 scoring rules
11
+ * <button class="vd-icon-button vd-icon-button-xs" aria-expanded="true"
12
+ * aria-controls="score-rules" aria-label="Scoring rules">
13
+ * <svg class="vd-icon vd-icon-size-12" aria-hidden="true"><use href="#chevron-down" /></svg>
14
+ * </button>
15
+ * </p>
16
+ * <dl class="vd-scoring-details-rules" id="score-rules">
17
+ * <div class="vd-scoring-details-rule">
18
+ * <dt>Prior applications</dt>
19
+ * <dd class="vd-scoring-details-points">+15</dd>
20
+ * </div>
21
+ * </dl>
22
+ * </div>
23
+ *
24
+ * The summary is Supporting/Caption in Content/Secondary with an Icon Button xs
25
+ * (12px) 8px after it. Each rule is one line: its name in Supporting/Caption /
26
+ * Content/Primary and its points at the far end in Data/Compact (JetBrains
27
+ * Mono) / Content/Secondary. 8px between lines.
28
+ *
29
+ * The rules are hidden with the native `hidden` attribute; the library ships no
30
+ * JavaScript, so the consumer flips it with `aria-expanded`. `.vd-scoring-details-rules`
31
+ * is `display: flex`, which would beat the attribute, so a `[hidden]` guard
32
+ * restores it.
33
+ *
34
+ * Two library decisions, since Figma's two variants draw the same glyph the
35
+ * same way up: the chevron turns over when its button is expanded, and it is a
36
+ * #chevron-down (the glyph is nested too deep in the file to read a name from).
37
+ * Designer-list item 101.
38
+ */
39
+
40
+ @layer components {
41
+ .vd-scoring-details {
42
+ @apply flex w-full flex-col gap-2; /* 8px */
43
+ }
44
+
45
+ .vd-scoring-details-summary {
46
+ @apply inline-flex items-center gap-2; /* 8px */
47
+ @apply text-supporting-caption text-content-secondary; /* 12 / 18 / 400 */
48
+ }
49
+
50
+ .vd-scoring-details-summary [aria-expanded] .vd-icon {
51
+ @apply transition-transform duration-150;
52
+ }
53
+
54
+ .vd-scoring-details-summary [aria-expanded="true"] .vd-icon {
55
+ @apply rotate-180;
56
+ }
57
+
58
+ .vd-scoring-details-rules {
59
+ @apply m-0 flex flex-col gap-2; /* 8px */
60
+ }
61
+
62
+ .vd-scoring-details-rules[hidden] {
63
+ display: none;
64
+ }
65
+
66
+ .vd-scoring-details-rule {
67
+ @apply flex items-start justify-between gap-4;
68
+ @apply text-supporting-caption text-content-primary; /* 12 / 18 / 400 */
69
+ }
70
+
71
+ .vd-scoring-details-rule > * {
72
+ @apply m-0;
73
+ }
74
+
75
+ .vd-scoring-details-points {
76
+ @apply shrink-0 text-data-compact font-mono text-content-secondary; /* 12 / 16.5 / 400 */
77
+ font-variant-numeric: tabular-nums;
78
+ }
79
+ }
@@ -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
+ }
@@ -57,10 +57,11 @@
57
57
 
58
58
  /* --- Parts -------------------------------------------------------------- */
59
59
 
60
- /* mismatch's mark. A filled 8px circle — not an icon, and not `.vd-dot`, whose
61
- Figma sizes are 5px and 7px. Colour comes from the status class. */
60
+ /* mismatch's mark. A filled 6px circle since 2026-11-30 — Figma now nests a
61
+ Chip dot SM (6px) centred in the 16px box (it was an 8px dot). Colour comes
62
+ from the status class. */
62
63
  .vd-section-marker-dot {
63
- @apply size-2; /* 8px, leaving Figma's 4px inset in the 16px box */
64
+ @apply size-1.5; /* 6px */
64
65
  @apply rounded-pill;
65
66
  @apply bg-current;
66
67
  }
@@ -58,13 +58,17 @@
58
58
 
59
59
  @layer components {
60
60
  .vd-sensitive-data {
61
- /* Layout — 4px (Spacing/4) between the value and its toggle. */
62
- @apply inline-flex items-center gap-1;
61
+ /* Layout — 4px (Spacing/4) between the value and its toggle; 24px tall
62
+ (2 + the 20px line + 2), as the set draws it since 2026-11-30. */
63
+ @apply inline-flex items-center gap-1 py-0.5;
63
64
  }
64
65
 
65
- /* Rev3: Supporting/Caption — the same 12 / 18 / 400 metrics Caption had. */
66
+ /* Body/Default (14 / 20) since 2026-11-30 — the value Data Row already gave
67
+ it — masked and revealed alike, so the value does not change size when it
68
+ is toggled (decided 2026-11-30; Figma's revealed state was Body/Dense and
69
+ is fixed in the file, item 116). */
66
70
  .vd-sensitive-data-value {
67
- @apply text-supporting-caption text-content-primary;
71
+ @apply text-body-default text-content-primary;
68
72
  }
69
73
 
70
74
  /* --- States --------------------------------------------------------- */
@@ -22,6 +22,13 @@
22
22
  * no text style bound; Action/Default (13/18/500) carries the same size and
23
23
  * weight and is what ships. Hover is Action/Hover.
24
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
+ *
25
32
  * It is a control — "click opens the finding" — so it is a <button> and takes
26
33
  * the focus ring. The marker is `aria-hidden` inside it and the button's
27
34
  * `aria-label` says both the count and the severity: a bare "1" names nothing.
@@ -40,6 +47,12 @@
40
47
  @apply cursor-pointer transition-colors duration-150;
41
48
  }
42
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
+
43
56
  .vd-severity-count:hover:not(:disabled) {
44
57
  @apply bg-action-hover;
45
58
  }
@@ -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` (#727280) while an upcoming one is
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
+ }
@@ -32,8 +32,12 @@
32
32
  */
33
33
 
34
34
  @layer components {
35
+ /* 140px is the set's frame. The Application page resizes every instance to
36
+ its 112px gutter, so treat the width as the host's: set `width` on it (or
37
+ `--vd-summary-preview-width`, 0.7.0) where the gutter is narrower. */
35
38
  .vd-summary-preview {
36
- @apply flex w-35 shrink-0 flex-col items-start gap-1.5; /* 140px, 6px */
39
+ @apply flex shrink-0 flex-col items-start gap-1.5; /* 6px */
40
+ width: var(--vd-summary-preview-width, 140px);
37
41
  @apply pt-7 pr-4; /* 28px / 16px */
38
42
  }
39
43