@valiify/dashboard-ui 0.5.0 → 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.
Files changed (58) hide show
  1. package/CHANGELOG.md +247 -0
  2. package/COMPONENTS.md +1072 -12
  3. package/README.md +40 -7
  4. package/class-manifest.json +188 -2
  5. package/dist/dashboard-ui.css +2297 -194
  6. package/dist/index.css +2841 -915
  7. package/package.json +4 -3
  8. package/src/components/add-funds-form.css +68 -0
  9. package/src/components/alert.css +33 -56
  10. package/src/components/avatar.css +38 -2
  11. package/src/components/button.css +24 -19
  12. package/src/components/card.css +1 -1
  13. package/src/components/checklist-group.css +115 -0
  14. package/src/components/checklist-task.css +125 -0
  15. package/src/components/chip.css +145 -0
  16. package/src/components/comment-date.css +36 -0
  17. package/src/components/comment-item.css +59 -0
  18. package/src/components/content-row.css +108 -0
  19. package/src/components/data-row.css +71 -19
  20. package/src/components/dropdown-field.css +9 -0
  21. package/src/components/entity-header.css +61 -0
  22. package/src/components/field-verification.css +113 -38
  23. package/src/components/finding-card.css +117 -0
  24. package/src/components/finding-option.css +39 -0
  25. package/src/components/finding-row.css +45 -0
  26. package/src/components/funding-status.css +61 -0
  27. package/src/components/funding-total.css +56 -0
  28. package/src/components/funding-transaction.css +103 -0
  29. package/src/components/index.css +29 -0
  30. package/src/components/inline-confirm.css +42 -0
  31. package/src/components/input.css +19 -0
  32. package/src/components/keycap.css +27 -0
  33. package/src/components/menu-item.css +10 -0
  34. package/src/components/modal.css +10 -2
  35. package/src/components/navigation-rail.css +200 -0
  36. package/src/components/overlay-scrim.css +26 -0
  37. package/src/components/owner-table-header.css +42 -0
  38. package/src/components/ownership.css +73 -0
  39. package/src/components/panel-section-header.css +53 -0
  40. package/src/components/panel-status.css +23 -0
  41. package/src/components/panel-strip-button.css +31 -0
  42. package/src/components/progress-circle.css +89 -0
  43. package/src/components/resize-handle.css +131 -0
  44. package/src/components/resolved-row.css +50 -0
  45. package/src/components/scrollbar.css +47 -0
  46. package/src/components/severity-count.css +50 -0
  47. package/src/components/severity-marker.css +66 -0
  48. package/src/components/snapshot-metric.css +72 -0
  49. package/src/components/summary-preview.css +72 -0
  50. package/src/components/switch.css +10 -1
  51. package/src/components/tabs.css +14 -0
  52. package/src/components/tag.css +20 -0
  53. package/src/components/textarea.css +4 -0
  54. package/src/components/toast.css +9 -5
  55. package/src/components/tooltip.css +14 -8
  56. package/src/themes/valiify-tokens.css +240 -6
  57. package/src/themes/valiify.css +243 -6
  58. package/types/components.d.ts +294 -9
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Panel Strip Button
3
+ *
4
+ * An icon button with a count, for the collapsed findings panel's strip.
5
+ * Extracted from Figma Panel Strip Button (2038:39320) — a single symbol.
6
+ *
7
+ * <span class="vd-panel-strip-button">
8
+ * <button class="vd-icon-button" aria-label="Findings, 3 open">…</button>
9
+ * <span class="vd-badge vd-badge-critical vd-panel-strip-button-count" aria-hidden="true">3</span>
10
+ * </span>
11
+ *
12
+ * A 36×36 box centring an Icon Button md (28). The count is Chip's badge,
13
+ * pinned to the top-right corner: Figma places the 16px badge at x 22, y −2,
14
+ * so it overhangs the box by 2px above and to the right.
15
+ * `.vd-panel-strip-button-count` is additive on the badge and only positions it.
16
+ *
17
+ * The badge is decorative next to the button: fold the count into the
18
+ * button's `aria-label` and hide the badge from assistive tech.
19
+ */
20
+
21
+ @layer components {
22
+ .vd-panel-strip-button {
23
+ @apply relative inline-flex size-9 shrink-0 items-center justify-center; /* 36px */
24
+ }
25
+
26
+ .vd-panel-strip-button-count {
27
+ @apply pointer-events-none absolute;
28
+ top: -2px;
29
+ left: 22px;
30
+ }
31
+ }
@@ -0,0 +1,89 @@
1
+ /**
2
+ * Progress Circle
3
+ *
4
+ * A determinate circular progress mark. Extracted from Figma Progress Circle
5
+ * (1628:17711) — 20 variants across Size (XS / SM / MD / LG) × Progress (0 / 25
6
+ * / 50 / 75 / 100%). Figma: "matching Loading Indicator sizes… Arcs fill
7
+ * clockwise from 12 o'clock; 100% replaces the ring with a filled circle and
8
+ * white checkmark."
9
+ *
10
+ * <span class="vd-progress-circle vd-progress-circle-md" style="--progress: 50"
11
+ * role="progressbar" aria-valuenow="50" aria-valuemin="0"
12
+ * aria-valuemax="100" aria-label="Review progress"></span>
13
+ *
14
+ * size box ring
15
+ * XS 12 1.5 (the base)
16
+ * SM 16 2
17
+ * MD 24 2.5
18
+ * LG 32 3
19
+ *
20
+ * ANY VALUE, NOT FIVE. Figma draws 0 / 25 / 50 / 75 / 100 as design states;
21
+ * here `--progress` (0–100) drives a conic-gradient, so 37 works too. Set it
22
+ * inline and mirror it in aria-valuenow — the same contract as Progress Bar's
23
+ * fill width. The track is Stroke/Border, the arc Content/Primary (NOT Primary).
24
+ *
25
+ * A MASKED CONIC-GRADIENT, like Loading Indicator's ring: Chrome floors
26
+ * fractional border widths, so 1.5 and 2.5 cannot be borders.
27
+ *
28
+ * PINNED DIVERGENCE: the arc's ends are square. Figma strokes the arc with
29
+ * round caps, which a conic-gradient cannot draw. Invisible at 12–16px, a
30
+ * half-stroke-width difference at 24–32. Designer-list item 78.
31
+ *
32
+ * COMPLETE IS A CLASS. `.vd-progress-circle-complete` swaps the ring for a
33
+ * filled Content/Primary circle holding a check glyph in Surface/Paper. It is
34
+ * a class and not a `--progress: 100` rule because CSS cannot select on a
35
+ * custom property's value. The check is the sprite's #check as a child; Figma
36
+ * draws it two-thirds of the box (16px in the 24px MD), which gives icon sizes
37
+ * 10 / 11 / 16 / 22 for XS / SM / MD / LG — only MD was measured, the others
38
+ * are that ratio on the nearest icon size.
39
+ */
40
+
41
+ @layer components {
42
+ .vd-progress-circle {
43
+ --progress: 0;
44
+ --progress-ring: 1.5px; /* XS */
45
+ @apply inline-flex size-3 shrink-0 items-center justify-center; /* 12px */
46
+ @apply rounded-pill;
47
+
48
+ background: conic-gradient(
49
+ from 0deg,
50
+ var(--color-content-primary) calc(var(--progress) * 1%),
51
+ var(--color-stroke-border) 0
52
+ );
53
+ mask: radial-gradient(
54
+ farthest-side,
55
+ transparent calc(100% - var(--progress-ring)),
56
+ black calc(100% - var(--progress-ring))
57
+ );
58
+ }
59
+
60
+ /* --- Sizes ------------------------------------------------------------ */
61
+
62
+ .vd-progress-circle-xs {
63
+ --progress-ring: 1.5px;
64
+ @apply size-3; /* 12px */
65
+ }
66
+
67
+ .vd-progress-circle-sm {
68
+ --progress-ring: 2px;
69
+ @apply size-4; /* 16px */
70
+ }
71
+
72
+ .vd-progress-circle-md {
73
+ --progress-ring: 2.5px;
74
+ @apply size-6; /* 24px */
75
+ }
76
+
77
+ .vd-progress-circle-lg {
78
+ --progress-ring: 3px;
79
+ @apply size-8; /* 32px */
80
+ }
81
+
82
+ /* --- Complete --------------------------------------------------------- */
83
+
84
+ .vd-progress-circle-complete {
85
+ @apply bg-content-primary text-surface-paper;
86
+ background-image: none;
87
+ mask: none;
88
+ }
89
+ }
@@ -0,0 +1,131 @@
1
+ /**
2
+ * Resize Handle
3
+ *
4
+ * The grip on a resizable panel's edge — drawn for the navigation sidebar,
5
+ * usable on any vertical edge. Extracted from Figma Resize Handle (2053:96322)
6
+ * — 3 variants on a `State` axis (Rest / Hover / Dragging) plus a `Readout`
7
+ * text property.
8
+ *
9
+ * <div class="vd-resize-handle" role="separator" aria-orientation="vertical"
10
+ * aria-label="Resize sidebar" tabindex="0"
11
+ * aria-valuenow="240" aria-valuemin="60" aria-valuemax="480">
12
+ * <span class="vd-resize-handle-knob">
13
+ * <span class="vd-resize-handle-readout">240</span>
14
+ * </span>
15
+ * </div>
16
+ *
17
+ * state what is drawn
18
+ * rest nothing — a 12px-wide hit strip, invisible
19
+ * hover a 12×20 knob: Surface/Paper, 1px Stroke/Divider, 6px radius,
20
+ * two 1.5×10 grip bars in Content/Tertiary at 80%, 2px apart
21
+ * dragging the knob widens to hold the READOUT (the panel's width) with
22
+ * 7px padding-x; the grip bars are gone
23
+ *
24
+ * THE STRIP IS THE CONTROL, THE KNOB IS ITS AFFORDANCE. Figma's frame is 12×120
25
+ * — 12 is the hit width, 120 is just the sample height. Here the strip takes
26
+ * the height of the edge it sits on (`align-self: stretch`), and the knob is
27
+ * centred in it and allowed to overflow: at 37px wide while dragging it is
28
+ * three times the strip, which is why Figma's Dragging frame is 56 wide.
29
+ *
30
+ * THE GRIP BARS ARE PSEUDO-ELEMENTS, so the markup is the same in every state:
31
+ * the readout is always in the DOM and only shown while dragging.
32
+ *
33
+ * DRAGGING IS A CLASS, `.vd-resize-handle-dragging`, because nothing in ARIA
34
+ * says "being dragged" (aria-grabbed is deprecated). The library ships no
35
+ * JavaScript: the consumer adds the class on pointerdown and removes it on
36
+ * pointerup, and writes the width into BOTH the readout and aria-valuenow.
37
+ *
38
+ * FOCUS IS NOT DRAWN IN FIGMA. A separator with a value is a focusable widget
39
+ * (the WAI-ARIA window-splitter pattern: Left / Right arrows resize, Home / End
40
+ * jump to the limits), so `:focus-visible` shows the knob — the same reveal as
41
+ * hover — plus the library's focus ring on the knob. A library addition, the
42
+ * same shape as Data Row's actions being revealed by focus as well as hover.
43
+ *
44
+ * THE READOUT IS 12px MEDIUM — Supporting/Caption Strong's size and weight.
45
+ * Figma authors it as raw Inter Medium 12 with an Auto line height and no text
46
+ * style bound (it was a raw 11 until 2026-11-19; the library's 12 came first
47
+ * and the file followed). The line box is held to the grip bars' 10px so the
48
+ * knob stays 20 tall; Figma's dragging knob is 39 wide for the sample "290".
49
+ * `tabular-nums` is added so the knob does not jitter as the digits change.
50
+ *
51
+ * Positioning is the consumer's, as with Tooltip: put it on the panel's edge
52
+ * (typically `position: absolute; top: 0; bottom: 0; right: -6px`).
53
+ */
54
+
55
+ @layer components {
56
+ .vd-resize-handle {
57
+ /* Layout — a 12px strip, as tall as the edge it is placed on */
58
+ @apply relative flex w-3 shrink-0 items-center justify-center self-stretch;
59
+
60
+ /* Reset so it works on a div or a button alike */
61
+ @apply appearance-none border-none bg-transparent p-0;
62
+
63
+ @apply cursor-col-resize;
64
+ touch-action: none; /* the drag is the consumer's; do not scroll instead */
65
+ }
66
+
67
+ /* --- Parts ------------------------------------------------------------ */
68
+
69
+ .vd-resize-handle-knob {
70
+ /* 12 × 20 at hover: 1px border + 4px padding + the 10px bars. Nothing is
71
+ pinned — the box is its border, padding and content. */
72
+ @apply inline-flex shrink-0 items-center justify-center gap-0.5; /* 2px */
73
+ @apply py-1; /* 4px */
74
+ min-width: 12px;
75
+
76
+ @apply rounded-control; /* 6px */
77
+ @apply border border-[length:var(--border-line)] border-stroke-divider;
78
+ @apply bg-surface-paper;
79
+
80
+ /* Hidden at rest — laid out, not painted, so hover moves nothing */
81
+ @apply opacity-0 transition-opacity duration-150;
82
+ }
83
+
84
+ /* The two grip bars */
85
+ .vd-resize-handle-knob::before,
86
+ .vd-resize-handle-knob::after {
87
+ content: "";
88
+ @apply block rounded-[0.75px] bg-content-tertiary opacity-80;
89
+ width: 1.5px;
90
+ block-size: 10px;
91
+ }
92
+
93
+ /* Only shown while dragging. 12 / 500, as Figma draws it — see the header. */
94
+ .vd-resize-handle-readout {
95
+ @apply hidden text-supporting-caption-strong text-content-secondary;
96
+ line-height: 10px; /* the bars' height, so the knob stays 20 tall */
97
+ font-variant-numeric: tabular-nums;
98
+ }
99
+
100
+ /* --- States ----------------------------------------------------------- */
101
+
102
+ .vd-resize-handle:hover .vd-resize-handle-knob,
103
+ .vd-resize-handle:focus-visible .vd-resize-handle-knob,
104
+ .vd-resize-handle.vd-resize-handle-dragging .vd-resize-handle-knob {
105
+ @apply opacity-100;
106
+ }
107
+
108
+ /* The strip itself takes no ring — a 12px-wide, full-height outline would
109
+ read as a border on the panel. The knob carries it. */
110
+ .vd-resize-handle:focus-visible {
111
+ @apply outline-none;
112
+ }
113
+
114
+ .vd-resize-handle:focus-visible .vd-resize-handle-knob {
115
+ @apply focus-ring;
116
+ }
117
+
118
+ /* Dragging — the knob holds the readout instead of the bars */
119
+ .vd-resize-handle-dragging .vd-resize-handle-knob {
120
+ @apply px-[7px];
121
+ }
122
+
123
+ .vd-resize-handle-dragging .vd-resize-handle-knob::before,
124
+ .vd-resize-handle-dragging .vd-resize-handle-knob::after {
125
+ @apply hidden;
126
+ }
127
+
128
+ .vd-resize-handle-dragging .vd-resize-handle-readout {
129
+ @apply block;
130
+ }
131
+ }
@@ -0,0 +1,50 @@
1
+ /**
2
+ * Resolved Row
3
+ *
4
+ * A resolved finding in the panel. Extracted from Figma Resolved Row
5
+ * (2038:35880) — a single symbol with Title and Outcome text properties.
6
+ * Figma: "green check, title, outcome · who · date."
7
+ *
8
+ * <div class="vd-resolved-row">
9
+ * <svg class="vd-resolved-row-icon vd-icon vd-icon-size-16" aria-hidden="true"><use href="#check" /></svg>
10
+ * <div class="vd-resolved-row-text">
11
+ * <p class="vd-resolved-row-title">Address not verified</p>
12
+ * <p class="vd-resolved-row-meta">Document accepted · N. Cooper · Mar 15</p>
13
+ * </div>
14
+ * </div>
15
+ *
16
+ * An outlined row — a 1px Stroke/Divider, 8px radius, no fill — with 12/9
17
+ * padding and a 12px gap, 57px tall (1 + 9 + 18 + 1 + 18 + 9 + 1, not pinned).
18
+ * A 16px #check in Approved/Main; the title is Body/Dense in Content/SECONDARY
19
+ * (a resolved finding steps back), the outcome line Supporting/Caption in
20
+ * Content/Tertiary.
21
+ *
22
+ * A trailing control — the application's "Reopen" — goes after the text; it is
23
+ * not drawn in the symbol, and a Text Button fits.
24
+ */
25
+
26
+ @layer components {
27
+ .vd-resolved-row {
28
+ @apply flex w-full items-center gap-3; /* 12px */
29
+ @apply px-3 py-2.25; /* 12px / 9px */
30
+ @apply rounded-surface; /* 8px */
31
+ @apply border border-[length:var(--border-line)] border-stroke-divider;
32
+ }
33
+
34
+ .vd-resolved-row-icon {
35
+ @apply shrink-0 text-approved;
36
+ }
37
+
38
+ .vd-resolved-row-text {
39
+ @apply flex flex-1 flex-col gap-px; /* 1px */
40
+ min-width: 0;
41
+ }
42
+
43
+ .vd-resolved-row-title {
44
+ @apply truncate text-body-dense text-content-secondary; /* 13 / 18 / 400 */
45
+ }
46
+
47
+ .vd-resolved-row-meta {
48
+ @apply truncate text-supporting-caption text-content-tertiary; /* 12 / 18 / 400 */
49
+ }
50
+ }
@@ -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,50 @@
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
+ * It is a control — "click opens the finding" — so it is a <button> and takes
26
+ * the focus ring. The marker is `aria-hidden` inside it and the button's
27
+ * `aria-label` says both the count and the severity: a bare "1" names nothing.
28
+ */
29
+
30
+ @layer components {
31
+ .vd-severity-count {
32
+ @apply inline-flex shrink-0 items-center gap-1.5; /* 6px */
33
+ /* 24 tall — 3 + Action/Default's 18px line + 3. Not pinned and not on a
34
+ control token: Figma's frame is a raw 24, bound to no Height variable. */
35
+ @apply px-1.75 py-0.75; /* 7px, 3px */
36
+ @apply rounded-control; /* 6px */
37
+
38
+ @apply appearance-none border-none bg-transparent no-underline;
39
+ @apply text-action-default text-content-secondary; /* 13 / 18 / 500 */
40
+ @apply cursor-pointer transition-colors duration-150;
41
+ }
42
+
43
+ .vd-severity-count:hover:not(:disabled) {
44
+ @apply bg-action-hover;
45
+ }
46
+
47
+ .vd-severity-count:focus-visible {
48
+ @apply focus-ring;
49
+ }
50
+ }
@@ -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
+ }
@@ -0,0 +1,72 @@
1
+ /**
2
+ * Summary Preview
3
+ *
4
+ * The gutter label beside a section of a record: its name, an optional
5
+ * selector, and a count of the comments on it. Extracted from Figma Summary
6
+ * Preview (548:22173) — 2 variants on `Icon Label`, plus Pill Selector, Comment
7
+ * Preview, Subtitle and Ring booleans.
8
+ *
9
+ * <div class="vd-summary-preview">
10
+ * <p class="vd-summary-preview-label">Business</p>
11
+ * <button class="vd-summary-preview-count" aria-label="2 comments on Business">
12
+ * <svg class="vd-icon vd-icon-size-10" aria-hidden="true"><use href="#message-circle" /></svg>
13
+ * 2
14
+ * </button>
15
+ * </div>
16
+ *
17
+ * A 140px column with 28px of top padding — it sits in the gutter and lines its
18
+ * label up with the first row of the section beside it — a 16px right inset
19
+ * and a 6px gap.
20
+ *
21
+ * label Label/Compact (12/16/600, 0.08em), Content/Secondary; with
22
+ * `Icon Label` a 13px glyph leads it, 4px apart
23
+ * subtitle Supporting/Caption, Content/Secondary (Subtitle boolean)
24
+ * selector a Pill instance — `.vd-pill`, nothing new
25
+ * count a 10px glyph + Supporting/Caption count, 6px apart
26
+ *
27
+ * THE COUNT IS A CONTROL in the application (the gutter counts filter the
28
+ * comments), so `.vd-summary-preview-count` is written for a <button> — it
29
+ * resets the element and takes the focus ring. Figma draws no hover for it;
30
+ * the label stepping to Content/Primary on hover is a library decision
31
+ * (designer-list item 82). Casing is the caller's.
32
+ */
33
+
34
+ @layer components {
35
+ .vd-summary-preview {
36
+ @apply flex w-35 shrink-0 flex-col items-start gap-1.5; /* 140px, 6px */
37
+ @apply pt-7 pr-4; /* 28px / 16px */
38
+ }
39
+
40
+ .vd-summary-preview-label {
41
+ @apply flex items-center gap-1; /* 4px, to the Icon Label glyph */
42
+ @apply text-label-compact text-content-secondary; /* 12 / 16 / 600 */
43
+ }
44
+
45
+ .vd-summary-preview-subtitle {
46
+ @apply text-supporting-caption text-content-secondary; /* 12 / 18 / 400 */
47
+ }
48
+
49
+ .vd-summary-preview-count {
50
+ @apply inline-flex items-center gap-1.5; /* 6px */
51
+ @apply appearance-none border-none bg-transparent p-0;
52
+ @apply text-supporting-caption text-content-secondary; /* 12 / 18 / 400 */
53
+ @apply rounded-tight;
54
+ }
55
+
56
+ button.vd-summary-preview-count {
57
+ @apply cursor-pointer transition-colors duration-150;
58
+ }
59
+
60
+ button.vd-summary-preview-count:hover {
61
+ @apply text-content-primary;
62
+ }
63
+
64
+ .vd-summary-preview-count:focus-visible {
65
+ @apply focus-ring;
66
+ }
67
+
68
+ .vd-summary-preview.vd-with-ring {
69
+ outline: var(--border-micro) solid var(--color-primary);
70
+ outline-offset: 0;
71
+ }
72
+ }
@@ -48,7 +48,10 @@
48
48
  @apply block;
49
49
  @apply w-[14px] h-[14px]; /* Exact 14px knob */
50
50
  @apply rounded-pill;
51
- @apply bg-surface-paper;
51
+ /* Control/Knob since 0.6.0 (was Surface/Paper). White in Light, as before;
52
+ #dadadf in Onyx, where Surface/Paper is #111113 and the knob vanished
53
+ against the off track (1.22:1). */
54
+ @apply bg-control-knob;
52
55
 
53
56
  /* Knob shadow from Figma */
54
57
  box-shadow: var(--shadow-knob);
@@ -90,6 +93,12 @@
90
93
  /* Knob position when checked - slide to end */
91
94
  .vd-switch:has(.vd-switch-input:checked)::before {
92
95
  transform: translateX(14px); /* Slide exactly one knob width */
96
+ /* ON, the knob binds Content/Contrast — the ink on an accent fill — in
97
+ every Active=yes variant, disabled included (re-read 2026-11-19); OFF it
98
+ stays Control/Knob. Both are white in Light. In Onyx Control/Knob
99
+ (#dadadf) was 2.42:1 on the Primary/Main track; Content/Contrast
100
+ (#111113) is 6.0:1. */
101
+ @apply bg-content-contrast;
93
102
  }
94
103
 
95
104
  /* Focus ring - keyboard navigation */
@@ -216,6 +216,20 @@
216
216
  @apply text-action-compact; /* 12 / 16 / 500 */
217
217
  }
218
218
 
219
+ /* Full-height tab (0.5.1). Figma stretches a Tabs instance to fill a
220
+ fixed-height header row (a 40px panel header draws its underline tabs
221
+ h-full, with the 2px active rule on the row's bottom edge). The control
222
+ ladder pins 24 / 32, so a pinned tab inside a taller row centres and its
223
+ rule floats above the row's edge. This drops the pinned height and
224
+ stretches the tab to its flex row instead; type, padding, gap and the
225
+ rule are untouched. The row (`.vd-tabs`, or whatever flex parent holds
226
+ the tabs) must have the height to fill — the consumer sets it.
227
+ Must stay AFTER .vd-tab-underline and .vd-tab-sm: it ties with both on
228
+ specificity, so source order decides. */
229
+ .vd-tab-stretch {
230
+ @apply h-auto self-stretch;
231
+ }
232
+
219
233
  /* --- States ------------------------------------------------------------ */
220
234
 
221
235
  /* Underline hover reaches the ACTIVE colour but keeps rest's weight and gains