@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
package/CHANGELOG.md CHANGED
@@ -22,6 +22,8 @@ change quietly:
22
22
  `./fonts`, `./icons/sprite.svg`, `./manifest`, `./types`.
23
23
  4. **Custom utilities** — `focus-ring` (the six `type-label-*` were removed in
24
24
  0.5.0). Unprefixed on `./source`; on `./styles.css` spelled `vd:focus-ring`.
25
+ 5. **The theme attribute** — `data-theme="onyx"` (0.6.0). Light is the absence
26
+ of the attribute.
25
27
 
26
28
  **Token names are part of the public API. Renaming or removing one is a breaking
27
29
  change**, even though the value lives in a generated file. Downstream apps write
@@ -34,6 +36,251 @@ whole point of tokens. Changing its _name_ is.
34
36
  When a rename is genuinely needed, ship the new name alongside the old one, note
35
37
  the deprecation here, and remove the old name in a later release.
36
38
 
39
+ ## 0.6.0 — unreleased
40
+
41
+ Brings the library up to the Figma file as of 2026-11-19: the Onyx theme, 60
42
+ new colour tokens, and 30 new components for records, findings, funding and
43
+ navigation — 70 in all. Not published. Three existing components changed size
44
+ or colour; they are under **Breaking**.
45
+
46
+ ### Breaking
47
+
48
+ - **DataRow is 44px tall (46 with a SensitiveData value); it was 38.** Figma
49
+ redrew the row: padding 4 / 11 around 22px slots, top-aligned and no longer
50
+ pinned, so a taller slot grows the row. Also:
51
+ - the value column is **320px** (was 400) and its text is `Body/Default`
52
+ 14/20 (was 13/18); a SensitiveData value inside a row is 14px too;
53
+ - the status slot takes the new **compact** FieldVerification
54
+ (`.vd-field-verification-compact`, 22px, the marker alone). The inline row
55
+ with its label still works and makes the DataRow 46;
56
+ - trailing actions go in a new `.vd-data-row-actions` group (right-aligned,
57
+ 12px gap). A lone `.vd-data-row-action` as a direct child still works.
58
+ Layouts that stack DataRows grow by 6px a row.
59
+ - **Alert lost its left rail and is 2px taller.** Figma removed the 3px rail
60
+ from all five types and moved the title to `Body/Default Strong` (14/20, was
61
+ 13/18): an alert is now a tinted box with an icon, 100px tall with a title,
62
+ message and action (was 98), and its content sits 3px further left. The
63
+ warning icon is `Warning/Strong` (was `Warning/Main`). No markup changes.
64
+ - **A disabled Avatar is grey in both themes** — an `Action/Selected` fill
65
+ with `Content/Tertiary` initials. It was a pale primary fill under white
66
+ initials (2.03:1 in Light), so **Light changes too**.
67
+ - **A FieldVerification mismatch is amber, not red.** Figma re-toned
68
+ `.vd-field-verification-mismatch` from `Critical/Main` to `Warning/Content`;
69
+ its detail line is `Body/Default` 14px (was mono 12px), and an expanded
70
+ title is `Body/Default Strong`. The inline rows also gained 4px of left
71
+ padding and a 12px marker-to-label gap (was 7), and the verified label is
72
+ `Content/Secondary` (was Tertiary). For a red, blocking finding use the new
73
+ `.vd-field-verification-critical`.
74
+ - **The Modal backdrop is lighter in Light** (28%, was an invented 40%); see
75
+ Changed.
76
+
77
+ ### Added — the Onyx theme
78
+
79
+ - **A second theme.** Figma's Valiify collection has two modes, Light and Onyx,
80
+ and both ship. Light is unchanged and still needs nothing. Onyx is one
81
+ attribute:
82
+
83
+ ```html
84
+ <html data-theme="onyx">
85
+ ```
86
+
87
+ It overrides all 108 colour tokens (and `--ring-focus-color`, which is
88
+ Primary/Main), so components, token utilities and the `vd:` utilities follow.
89
+ It works on a subtree too; give that element its own background and text
90
+ colour, since `color` is inherited from outside it. Radii, widths, heights,
91
+ type and shadows are the same in both themes. The block also sets
92
+ `color-scheme: dark`, a library decision, so native scrollbars and form
93
+ internals go dark with it. On `./styles.css` the host still owns the page
94
+ background, as in Light.
95
+ - **In every entry point**, including the prebuilt bundle, which defines each
96
+ token twice (`--color-*` for components, `--vd-color-*` for the `vd:`
97
+ utilities) and so carries the Onyx block under both spellings.
98
+ - **`npm run verify:theme`** (in CI) measures the switch in Chromium: every
99
+ colour, in Light, in Onyx on `<html>` and in Onyx on a subtree, in
100
+ `dist/index.css` and in the bundle under both spellings. Two canaries: with the
101
+ Onyx blocks deleted it reports all 109 tokens; with only the bundle's prefixed
102
+ block deleted, the unprefixed tokens still pass and all 109 prefixed ones fail.
103
+ - **`--theme onyx`** on `verify:visual` and `verify:a11y`, and a theme switch in
104
+ the Storybook toolbar. The visual specs need no second copy: a colour asserted
105
+ by token resolves under whichever theme is active.
106
+
107
+ ### Added — tokens
108
+
109
+ - **60 colour tokens**, 48 → 108, each with a Light and an Onyx value:
110
+ - **The misc palette**, 18 hues × `dot` / `soft` / `text`:
111
+ `--color-misc-<hue>-dot`, `-soft`, `-text` for blue, indigo, violet, purple,
112
+ pink, rose, red, orange, amber, yellow, lime, green, emerald, teal, cyan, sky,
113
+ slate and stone. Categorical colour, not status. (`--color-misc-purple`, the
114
+ older one-off, is unchanged and is a different purple from
115
+ `--color-misc-purple-dot`.)
116
+ - **`--color-inverse-surface` / `-content` / `-muted`**, the bubble that
117
+ contrasts with the page in both themes.
118
+ - **`--color-overlay-scrim` / `-scrollbar`**.
119
+ - **`--color-control-knob`**, the Switch knob: white in Light, #dadadf in
120
+ Onyx.
121
+ - **`--color-misc-purple` is deprecated** — Figma's `misc/Purple` now says "use
122
+ Misc/Purple/Dot", so use `--color-misc-purple-dot`. The token stays for now
123
+ and is marked deprecated in the generated theme; it will be removed in a
124
+ later release, with notice here.
125
+ - **`--height-textarea-xs` … `-xl`** (64 / 80 / 96 / 120 / 160), Figma's drawn
126
+ Text Area heights. Tokens only: `.vd-textarea-*` is unchanged and still floors
127
+ on the control heights.
128
+ - The generator fails when a colour has a Light value and no Onyx value (or the
129
+ reverse), when a colour's group is missing from the emit order, and when two
130
+ Figma names map to one custom property.
131
+
132
+ ### Added — components and variants
133
+
134
+ - **Funding parts**: **FundingStatus** (`.vd-funding-status` + `-pending` /
135
+ `-funded` / `-refunded` / `-failed`), **FundingTransaction**,
136
+ **FundingTotal**, **AddFundsForm** and **InlineConfirm**.
137
+ - **NavigationRail sidebar parts**: `.vd-nav-split` (a neutral split button),
138
+ `.vd-nav-jump`, `.vd-nav-session` (+ `-collapsed`, `-dot`) and `.vd-nav-user`.
139
+ - **Recipes in COMPONENTS.md** (no new classes): the Application actions menu,
140
+ the Run KYC submenu, the Assign menu with search, the Account menu, Section
141
+ Edit and Page Breadcrumbs.
142
+ - **Findings panel parts** (the panel itself is a composition, not a class):
143
+ **PanelStatus**, **PanelSectionHeader**, **PanelStripButton**,
144
+ **FindingRow**, **FindingCard** (choosing / requesting / requested as
145
+ compositions of its parts), **FindingOption** (additive on a RadioSelect
146
+ label), **ResolvedRow**, **CommentItem**, **CommentDate**, **ChecklistGroup**
147
+ and **ChecklistTask**. The older Checklist + Checklist Item pair in Figma is
148
+ not shipped.
149
+ - **Record parts**: **ContentRow** (`.vd-content-row`, a collapsed section line
150
+ with hover tools and a disclosure chevron), **SummaryPreview**
151
+ (`.vd-summary-preview`, the gutter label with a comment count),
152
+ **SnapshotMetric** (`.vd-snapshot-metric`), **EntityHeader**
153
+ (`.vd-entity-header`), **Ownership** (`.vd-ownership`, a ProgressBar
154
+ modifier with a summary line) and **OwnerTableHeader**
155
+ (`.vd-owner-table-header`).
156
+ - **SeverityMarker** (`.vd-severity-marker` + `-critical` / `-review` / `-info`)
157
+ — a diamond, a dot and a ring: the severity of a finding as a shape, so it
158
+ reads without colour. One element, 16px.
159
+ - **SeverityCount** (`.vd-severity-count`) — a marker plus a count, as a button.
160
+ - **ProgressCircle** (`.vd-progress-circle`, `-xs` … `-lg`,
161
+ `.vd-progress-circle-complete`) — a determinate ring driven by a `--progress`
162
+ custom property, 0–100.
163
+ - **Keycap** (`.vd-keycap`) — a keyboard-shortcut hint for a `<kbd>`.
164
+ - **Scrollbar** (`.vd-scrollbar`) — a 6px overlay-style scrollbar for any
165
+ scroll container.
166
+ - **OverlayScrim** (`.vd-overlay-scrim`) — the backdrop behind a peeking rail
167
+ or a custom overlay.
168
+ - **ResizeHandle** (`.vd-resize-handle`, `-knob`, `-readout`,
169
+ `.vd-resize-handle-dragging`) — the grip on a resizable panel edge, from
170
+ Figma's Resize Handle: nothing at rest, a 12×20 knob on hover or focus, and
171
+ the panel's width while dragging. A `role="separator"`; the dragging is your
172
+ JavaScript (the OnAPanel story has it).
173
+ - **The misc palette on Chip, Badge and Dot** — `.vd-chip-misc`,
174
+ `.vd-badge-misc`, `.vd-dot-misc` plus one hue class, `.vd-misc-blue` …
175
+ `.vd-misc-stone` (18). For categorical colour, not status. Also
176
+ `.vd-dot-info`.
177
+ - **Tag `.vd-tag-label`** — a boxed tag with a coloured group dot (the dot is a
178
+ Dot: channel = info, entity = misc purple, source = misc teal, status =
179
+ neutral). One size, 22px.
180
+ - **Avatar `.vd-avatar-square`** — Figma's Shape axis. Square for applicants and
181
+ owners; the radius steps with the size (3 / 4 / 5 / 7 / 8).
182
+ - **MenuItem `.vd-menu-item-switch`** — a trailing Switch. The row is a
183
+ `<label>` wrapping the switch's input.
184
+ - **NavigationRail**: `.vd-nav-rail-peek` (the rail floated over the page, with
185
+ the new `--shadow-peek`), a `hidden` guard so the attribute works without
186
+ Preflight, and `.vd-nav-item-status-critical`.
187
+ - **DataRow `.vd-data-row-linked`** (a 2px primary stroke on the left edge of
188
+ the row tied to an open finding; no fill) and **`.vd-data-row-actions`**;
189
+ **FieldVerification `.vd-field-verification-compact`**.
190
+ - **FieldVerification findings**: `.vd-field-verification-warning` and
191
+ `-critical` (a title and a reason beside a SeverityMarker), `-resolved`,
192
+ and the parts `.vd-field-verification-mark` and `-meta`. The Resolve and Link
193
+ actions Figma draws are not shipped: a field-level alert says what and why,
194
+ and acting on it happens in the findings panel.
195
+ - **A 3px active halo on fields.** A focused Input or Textarea and an open or
196
+ focused DropdownField draw a `Primary/Soft` halo, as Figma's active state
197
+ does. It is a `box-shadow`: an ancestor with `overflow: hidden` clips it.
198
+
199
+ ### Changed
200
+
201
+ - **`Heading/Section` is 18/24** (was 17/22) — Figma's text style changed and
202
+ the token follows: `text-heading-section` and `.vd-text-heading-section` are
203
+ 1px larger with a 2px taller line. The name is unchanged. In the library only
204
+ the placeholder Card used it before 0.6.0.
205
+ - **Button critical matches Figma's new Display=critical**: it carries the
206
+ same `Stroke/Divider` hairline primary does at rest (invisible on the fill),
207
+ and **disabled is the critical fill at 40% under the normal label** — it was
208
+ a soft fill with dimmed text. Hover and selected were already
209
+ `Critical/Strong`.
210
+ - **A count after a tab label** is the existing badge slot; nothing was added.
211
+ - **Tooltip and the Simple toast use the Inverse tokens.** The fill is
212
+ `Inverse/Surface` and the text `Inverse/Content`, as Figma now binds them
213
+ (were `Content/Primary` and `Content/Contrast`), and Tooltip's title and
214
+ subtext are `Inverse/Muted` (were `Content/Faint`). **The fill and body render
215
+ exactly as before in Light**; the muted lines are a touch brighter (white at
216
+ 72%, 9.73:1, where Content/Faint was 10.4). In Onyx the bubble is near-white with dark
217
+ text, 14.9:1.
218
+ - **The Switch knob is `Control/Knob` when off and `Content/Contrast` when
219
+ on** (was `Surface/Paper`). Light is the same white in both states. In Onyx
220
+ `Surface/Paper` is near-black and the knob disappeared against its track.
221
+ - **`Content/Contrast` is no longer "white".** It is the ink that contrasts
222
+ with an accent fill: white in Light, **#111113 in Onyx**, where the accent
223
+ fills are light tints. Labels on primary and critical buttons, Avatar
224
+ initials, the active Pagination cell and a selected Tag are therefore dark in
225
+ Onyx. If your own CSS uses `text-content-contrast` for light text on a dark
226
+ surface that is not an accent fill, switch it to `text-inverse-content` on
227
+ `bg-inverse-surface`.
228
+ - **The Modal backdrop is `Overlay/Scrim`**, the variable Figma's Overlay Scrim
229
+ component binds: #0f0f1a at 28% in Light, black at 55% in Onyx. It was an
230
+ invented #141428 at 40%, so **the Light backdrop is lighter than in 0.5.x**.
231
+
232
+ ### Differs from Figma
233
+
234
+ - **ResizeHandle has a focus state** (the knob shows and takes the focus ring).
235
+ Figma draws none for a control that is keyboard-operable.
236
+ - **A label Tag's status dot is `Neutral/Strong`** (`.vd-dot-neutral`); Figma
237
+ binds `Neutral/Main`, 2.81:1 on the tag's fill. Designer-list items 22, 76.
238
+ - **FieldVerification's findings use the SeverityMarker shapes** (a dot for
239
+ warning and mismatch, the diamond for critical); the file still nests the
240
+ amber triangle glyph. Item 80.
241
+ - **ChecklistTask's hover does not move its content**; Figma's hover variant
242
+ adds 8px of padding and shifts the row. Item 90.
243
+ - **FindingRow has a hover fill and FindingCard's fields are the library's**
244
+ DropdownField and Textarea; Figma draws rest only, and raw frames. Item 87.
245
+ - **The meta line in a sign-off record and in FindingCard's decision box is
246
+ `Content/Secondary`**; Figma binds `Content/Tertiary`, which is 4.20:1 on
247
+ those boxes' `Surface/Neutral` fill in Light. Item 95.
248
+ - **ContentRow's chevron turns when expanded**; Figma's two Expanded variants
249
+ are identical. Item 81.
250
+ - **Every SnapshotMetric type is 42px tall**; Figma's Count + dots is 34.
251
+ Item 83.
252
+ - **ProgressCircle's arc has square ends**; Figma's are round. Item 78.
253
+ - **An Input in error has a `Neutral/Soft` halo**, while Search, Dropdown and
254
+ Text Area in error keep `Primary/Soft`. That is Figma as drawn: each
255
+ follows its own set. Item 65.
256
+
257
+ ### Not in 0.6.0 (follow-ups)
258
+
259
+ - DataRow: the `Previous value` slot.
260
+ - Empty State, the real Card, Cell, Selectable row, Checkbox container, the
261
+ Summary panel, Summary Assignee Row, Scoring details, Small nav, Nav Section
262
+ Header, and Section Marker's warning and failed statuses.
263
+
264
+ - **The Simple toast's check icon takes the label colour** (`Inverse/Content`).
265
+ Figma binds it to `Content/Contrast`, which has the same value in both
266
+ themes today; the library follows the label so it stays right if the two ever
267
+ differ. Designer-list item 53.
268
+
269
+ ## 0.5.1 — unreleased (ships with 0.6.0)
270
+
271
+ ### Added
272
+
273
+ - **`.vd-tab-stretch` — a full-height tab.** Figma stretches a Tabs instance to
274
+ fill a fixed-height header row: the right-panel header on the business account
275
+ review page is 40px, and its underline tabs are drawn `h-full` with the 2px
276
+ active rule on the row's bottom edge. The control ladder pins underline sm at
277
+ 24, so a library tab in that row centred and its rule floated 8px above the
278
+ edge. The modifier drops the pinned height (`height: auto; align-self:
279
+ stretch`); type, padding, gap and the rule are unchanged, and the consumer
280
+ gives the row its height. Additive: no existing class changes. The
281
+ `StretchInHeader` story and visual spec assert 40px height, 12px type, 6px
282
+ padding and the 2px rule.
283
+
37
284
  ## 0.5.0 — 2026-10-01
38
285
 
39
286
  > **Upgrading from npm means upgrading from 0.3.0.** 0.4.0 was released in