@valiify/dashboard-ui 0.1.0-alpha.1
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 +104 -0
- package/LICENSE +21 -0
- package/README.md +373 -0
- package/dist/index.css +3743 -0
- package/package.json +82 -0
- package/src/base/index.css +21 -0
- package/src/components/ICON-SYSTEM.md +425 -0
- package/src/components/_template.css +109 -0
- package/src/components/alert.css +156 -0
- package/src/components/avatar.css +87 -0
- package/src/components/breadcrumbs.css +158 -0
- package/src/components/button.css +177 -0
- package/src/components/card.css +63 -0
- package/src/components/checkbox.css +181 -0
- package/src/components/chip.css +234 -0
- package/src/components/data-row.css +142 -0
- package/src/components/divider.css +143 -0
- package/src/components/dropdown-field.css +185 -0
- package/src/components/dropdown-menu.css +80 -0
- package/src/components/field-verification.css +156 -0
- package/src/components/filter-segment.css +163 -0
- package/src/components/icon-button.css +83 -0
- package/src/components/icon.css +145 -0
- package/src/components/index.css +47 -0
- package/src/components/input.css +180 -0
- package/src/components/link.css +183 -0
- package/src/components/loading-indicator.css +184 -0
- package/src/components/loading-inline.css +75 -0
- package/src/components/menu-item.css +138 -0
- package/src/components/modal.css +203 -0
- package/src/components/navigation-rail.css +558 -0
- package/src/components/pagination-item.css +196 -0
- package/src/components/pagination.css +108 -0
- package/src/components/pill.css +108 -0
- package/src/components/progress-bar.css +157 -0
- package/src/components/radio-select.css +97 -0
- package/src/components/section-marker.css +96 -0
- package/src/components/segment-selector.css +78 -0
- package/src/components/sensitive-data.css +77 -0
- package/src/components/skeleton.css +184 -0
- package/src/components/step.css +106 -0
- package/src/components/stepper.css +93 -0
- package/src/components/switch.css +99 -0
- package/src/components/tabs.css +213 -0
- package/src/components/tag.css +133 -0
- package/src/components/text-button.css +170 -0
- package/src/components/textarea.css +156 -0
- package/src/components/toast.css +182 -0
- package/src/components/tooltip.css +70 -0
- package/src/fonts.css +23 -0
- package/src/icons/README.md +297 -0
- package/src/icons/custom/help.svg +3 -0
- package/src/icons/custom/valiify-logo.svg +6 -0
- package/src/icons/icon-list.txt +2036 -0
- package/src/icons/sprite.svg +12223 -0
- package/src/index.css +35 -0
- package/src/library.css +34 -0
- package/src/themes/valiify.css +319 -0
- package/src/utilities/index.css +35 -0
- package/types/components.d.ts +630 -0
- package/types/index.d.ts +15 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `@valiify/dashboard-ui`.
|
|
4
|
+
|
|
5
|
+
This project follows [Semantic Versioning](https://semver.org/). While the
|
|
6
|
+
version is `0.x-alpha`, breaking changes may land in minor releases — but they
|
|
7
|
+
will always be called out here under **Breaking**.
|
|
8
|
+
|
|
9
|
+
## Public API
|
|
10
|
+
|
|
11
|
+
These are the things consumers depend on, and therefore the things we cannot
|
|
12
|
+
change quietly:
|
|
13
|
+
|
|
14
|
+
1. **Component class names** — `.btn`, `.btn-primary`, `.card`, `.input`, and
|
|
15
|
+
their modifiers.
|
|
16
|
+
2. **Design token names** — every `--color-*`, `--radius-*`, `--border-*`,
|
|
17
|
+
`--text-*`, `--shadow-*`, and `--ring-*` custom property, **and the Tailwind
|
|
18
|
+
utilities generated from them** (`bg-approved`, `rounded-control`,
|
|
19
|
+
`text-body-1`, …).
|
|
20
|
+
3. **Entry points** — `.`, `./source`, `./fonts`, `./types`.
|
|
21
|
+
4. **Custom utilities** — `focus-ring`, `type-label-*`.
|
|
22
|
+
|
|
23
|
+
**Token names are part of the public API. Renaming or removing one is a breaking
|
|
24
|
+
change**, even though the value lives in a generated file. Downstream apps write
|
|
25
|
+
`bg-approved` and `var(--radius-control)` in their own code; a rename breaks them
|
|
26
|
+
exactly as surely as renaming `.btn` would.
|
|
27
|
+
|
|
28
|
+
Changing a token's _value_ is not breaking — that is a design update, and the
|
|
29
|
+
whole point of tokens. Changing its _name_ is.
|
|
30
|
+
|
|
31
|
+
When a rename is genuinely needed, ship the new name alongside the old one, note
|
|
32
|
+
the deprecation here, and remove the old name in a later release.
|
|
33
|
+
|
|
34
|
+
## Unreleased
|
|
35
|
+
|
|
36
|
+
### Breaking
|
|
37
|
+
|
|
38
|
+
- **Removed `.breadcrumb-mono`.** Figma restructured Breadcrumbs on 2026-08-25
|
|
39
|
+
(Item `1046:22649`, Separator `1046:22654`, container `880:31218`), and the
|
|
40
|
+
current crumb — the case the class existed for, `#BA-204417` — is now an
|
|
41
|
+
ordinary current item in Inter Medium 500 rather than JetBrains Mono 700. The
|
|
42
|
+
class no longer has any basis in the design. Replace
|
|
43
|
+
`class="breadcrumb breadcrumb-current breadcrumb-mono"` with
|
|
44
|
+
`class="breadcrumb breadcrumb-current"`; add `font-mono` yourself if you still
|
|
45
|
+
want a mono treatment at a call site.
|
|
46
|
+
|
|
47
|
+
### Added
|
|
48
|
+
|
|
49
|
+
- Real design tokens extracted from Figma (`Valiify-Dashboard-Component-Library`)
|
|
50
|
+
— 38 colors, 5 radii, 3 border widths, 37 text styles, 1 shadow, focus ring.
|
|
51
|
+
Generated from `tokens/figma-tokens.json` by `scripts/build-theme.mjs`, which
|
|
52
|
+
asserts every OKLCh color round-trips to its source hex within 1/255.
|
|
53
|
+
- `@valiify/dashboard-ui/source` documented as a supported entry point, for
|
|
54
|
+
consumers who want token-derived utilities and not just component classes.
|
|
55
|
+
- `@valiify/dashboard-ui/fonts` as an opt-in webfont import.
|
|
56
|
+
- `focus-ring` utility, from Figma Menu Item → Ring.
|
|
57
|
+
- `type-label-*` utilities, which bundle uppercase (and the mono family) with the
|
|
58
|
+
label text tokens, since `--text-*` can carry neither.
|
|
59
|
+
- Storybook **Foundations → Design Tokens** page rendering the whole token set
|
|
60
|
+
for side-by-side comparison against Figma.
|
|
61
|
+
- `npm run new:component <Name>` scaffold generator.
|
|
62
|
+
- `npm run typecheck`.
|
|
63
|
+
|
|
64
|
+
### Changed
|
|
65
|
+
|
|
66
|
+
- **Tailwind v4 throughout.** Removed `tailwind.config.js` and the no-op plugin
|
|
67
|
+
entry; the package is now genuinely CSS-only with no plugin to register.
|
|
68
|
+
- Consumers now import CSS rather than registering a plugin — see the README.
|
|
69
|
+
- Component heights are set explicitly (24 / 28 / 32px) from the Figma variant
|
|
70
|
+
frames rather than derived from padding.
|
|
71
|
+
|
|
72
|
+
### Fixed
|
|
73
|
+
|
|
74
|
+
- **Border radii and custom border widths were silently dropped.**
|
|
75
|
+
`rounded-[--token]` is Tailwind v3 syntax that compiles to invalid CSS under
|
|
76
|
+
v4, so every component rendered square with a 1px border instead of 0.5px.
|
|
77
|
+
- **Fonts never loaded.** The font `@import` sat inside a `@layer` block, where
|
|
78
|
+
CSS discards it. Now opt-in via `./fonts`, at a position where it is valid.
|
|
79
|
+
- **`dist/index.d.ts` was raw JavaScript**, not a declaration file.
|
|
80
|
+
- **Most tokens were missing from the published CSS.** A plain `@theme` emits
|
|
81
|
+
only referenced variables, so the artifact shipped 43 of 135 tokens. Now
|
|
82
|
+
`@theme static`.
|
|
83
|
+
- **Documentation prose leaked into the published CSS** — Tailwind scanned
|
|
84
|
+
markdown and emitted a utility for every class-shaped string it found. Fixed
|
|
85
|
+
with `source(none)`.
|
|
86
|
+
- **Typography was misread in two ways.** Figma's `lineHeight: 100` is "Auto"
|
|
87
|
+
(the font's own metrics, `normal` in CSS), not 100%; and every Figma
|
|
88
|
+
letter-spacing value is a percentage, not px.
|
|
89
|
+
- **CHANGELOG lacked the entry-point caveat for `focus-ring` / `type-label-*`.**
|
|
90
|
+
These utilities are absent from the prebuilt `.` entry by design — `source(none)`
|
|
91
|
+
plus on-demand `@utility` means they resolve only inside a Tailwind build via
|
|
92
|
+
`./source`. The README documents this; the CHANGELOG did not, so a consumer
|
|
93
|
+
reading only the changelog could reasonably expect `focus-ring` to work off the
|
|
94
|
+
prebuilt entry. They are public API (see the "Custom utilities" list above) and
|
|
95
|
+
are unchanged — this entry just records where they live.
|
|
96
|
+
|
|
97
|
+
### Known limitations
|
|
98
|
+
|
|
99
|
+
- Component **horizontal** padding is still inferred from Figma spacing steps
|
|
100
|
+
rather than measured per size. Heights are exact.
|
|
101
|
+
- `--radius-micro` and `--radius-tight` role names are provisional.
|
|
102
|
+
- Colour and number tokens come from component sweeps, so a token defined in
|
|
103
|
+
Figma but not yet applied to any layer may be missing. Typography is
|
|
104
|
+
exhaustive.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Valiify
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,373 @@
|
|
|
1
|
+
# @valiify/dashboard-ui
|
|
2
|
+
|
|
3
|
+
A Tailwind CSS component library for Valiify Dashboard applications.
|
|
4
|
+
|
|
5
|
+
## Status
|
|
6
|
+
|
|
7
|
+
**40 components**, each extracted from the Valiify Figma file and verified
|
|
8
|
+
against it. Not yet published to NPM.
|
|
9
|
+
|
|
10
|
+
Semantic component classes built on Tailwind CSS v4. **CSS-only** — zero
|
|
11
|
+
JavaScript dependencies, no Tailwind plugin to register, no
|
|
12
|
+
`tailwind.config.js` — so it works with React, Vue, Svelte or plain HTML
|
|
13
|
+
alike. Single light theme; no dark mode or per-tenant theming in V1.
|
|
14
|
+
|
|
15
|
+
## Installation
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install @valiify/dashboard-ui tailwindcss
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Quick Start
|
|
22
|
+
|
|
23
|
+
Requires Tailwind CSS v4. This is a CSS-only package — there is no Tailwind
|
|
24
|
+
plugin to register.
|
|
25
|
+
|
|
26
|
+
There are **two supported entry points**, and the difference matters.
|
|
27
|
+
|
|
28
|
+
> ### Import from CSS, never from JavaScript
|
|
29
|
+
>
|
|
30
|
+
> Both entry points are **stylesheets**. Import them from your CSS with
|
|
31
|
+
> `@import`. Importing the library from a `.js` / `.ts` file **breaks silently**:
|
|
32
|
+
>
|
|
33
|
+
> ```ts
|
|
34
|
+
> // main.ts
|
|
35
|
+
> import "@valiify/dashboard-ui/source"; // ❌ never do this
|
|
36
|
+
> ```
|
|
37
|
+
>
|
|
38
|
+
> Your bundler hands our stylesheet to PostCSS as its own file, with no Tailwind
|
|
39
|
+
> context. Every `@apply` in the library becomes unresolvable and the build
|
|
40
|
+
> aborts on the first one. **Your dev server still returns HTTP 200** — the page
|
|
41
|
+
> loads, your own styles apply, and every library style is missing with no
|
|
42
|
+
> obvious error. Do this instead:
|
|
43
|
+
>
|
|
44
|
+
> ```css
|
|
45
|
+
> /* app.css */
|
|
46
|
+
> @import "tailwindcss";
|
|
47
|
+
> @import "@valiify/dashboard-ui/source";
|
|
48
|
+
> ```
|
|
49
|
+
>
|
|
50
|
+
> ```ts
|
|
51
|
+
> // main.ts
|
|
52
|
+
> import "./app.css"; // ✅ import your own stylesheet
|
|
53
|
+
> ```
|
|
54
|
+
>
|
|
55
|
+
> Importing _your own_ CSS file from JavaScript is fine and normal. It is
|
|
56
|
+
> importing _ours_ directly from JavaScript that fails.
|
|
57
|
+
|
|
58
|
+
### `@valiify/dashboard-ui/source` — use this one
|
|
59
|
+
|
|
60
|
+
```css
|
|
61
|
+
@import "tailwindcss";
|
|
62
|
+
@import "@valiify/dashboard-ui/source";
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Your Tailwind processes our `@theme` block, so you get component classes, every
|
|
66
|
+
design token as a CSS custom property, **and** the token-derived utilities:
|
|
67
|
+
`bg-approved`, `text-content-secondary`, `rounded-pill`, `shadow-panel`,
|
|
68
|
+
`focus-ring`, `type-label-l`, and so on for every token.
|
|
69
|
+
|
|
70
|
+
It also leaves your setup alone. This entry ships no Preflight and no
|
|
71
|
+
`@import "tailwindcss"`, so your config, plugins and content detection stay in
|
|
72
|
+
charge, and **your own `@theme` survives** — a custom `--font-sans` stays yours.
|
|
73
|
+
(Our internal `source(none)` does not affect your content detection — verified
|
|
74
|
+
against a real packed install.)
|
|
75
|
+
|
|
76
|
+
### `@valiify/dashboard-ui` — prebuilt, for pages with no Tailwind build
|
|
77
|
+
|
|
78
|
+
```html
|
|
79
|
+
<link
|
|
80
|
+
rel="stylesheet"
|
|
81
|
+
href="node_modules/@valiify/dashboard-ui/dist/index.css"
|
|
82
|
+
/>
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
One compiled file: component classes plus every token as a CSS custom property
|
|
86
|
+
(`var(--color-approved)`, `var(--radius-pill)`). Use it for a **standalone page,
|
|
87
|
+
email preview, static prototype, or anything without a Tailwind build** — it is
|
|
88
|
+
the only entry that works without one.
|
|
89
|
+
|
|
90
|
+
Three trade-offs, all measured, so do not reach for it inside a Tailwind app:
|
|
91
|
+
|
|
92
|
+
- **No token-derived utilities.** `bg-approved`, `rounded-pill` and
|
|
93
|
+
`type-label-l` do not exist — Tailwind generates those from `@theme` at build
|
|
94
|
+
time, and this entry is already compiled.
|
|
95
|
+
- **It overrides your theme tokens.** It ships its own `@layer theme`, and
|
|
96
|
+
because it lands after your `@theme`, any token you both define becomes ours:
|
|
97
|
+
a custom `--font-sans` reverts to Inter. Tokens we do not define, such as the
|
|
98
|
+
spacing scale, are untouched.
|
|
99
|
+
- **It carries Tailwind Preflight.** In a Tailwind app the reset applies twice.
|
|
100
|
+
On a plain HTML page it resets your `h1` margins and strips `ul` bullets
|
|
101
|
+
whether or not you wanted that.
|
|
102
|
+
|
|
103
|
+
| | `/source` | `.` prebuilt |
|
|
104
|
+
| ---------------------------- | ---------- | ------------- |
|
|
105
|
+
| Component classes | ✅ | ✅ |
|
|
106
|
+
| Tokens as custom properties | ✅ | ✅ |
|
|
107
|
+
| Token-derived utilities | ✅ | ❌ |
|
|
108
|
+
| Your `@theme` survives | ✅ | ❌ |
|
|
109
|
+
| Preflight | yours only | applied twice |
|
|
110
|
+
| Works with no Tailwind build | ❌ | ✅ |
|
|
111
|
+
|
|
112
|
+
### Icons
|
|
113
|
+
|
|
114
|
+
Components render their glyphs from a shared sprite with
|
|
115
|
+
`<use href="#name" />`, which resolves against the current document — so load
|
|
116
|
+
the sprite once and inline it:
|
|
117
|
+
|
|
118
|
+
```ts
|
|
119
|
+
import spriteUrl from "@valiify/dashboard-ui/icons/sprite.svg?url";
|
|
120
|
+
|
|
121
|
+
fetch(spriteUrl)
|
|
122
|
+
.then((r) => r.text())
|
|
123
|
+
.then((svg) => {
|
|
124
|
+
const host = document.createElement("div");
|
|
125
|
+
host.style.display = "none";
|
|
126
|
+
host.innerHTML = svg;
|
|
127
|
+
document.body.prepend(host);
|
|
128
|
+
});
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Note the specifier has **no `src/`** — it is
|
|
132
|
+
`@valiify/dashboard-ui/icons/sprite.svg`. The `?url` suffix is Vite's; other
|
|
133
|
+
bundlers have an equivalent, or you can copy the file into your own static
|
|
134
|
+
assets.
|
|
135
|
+
|
|
136
|
+
### Fonts
|
|
137
|
+
|
|
138
|
+
Fonts are **not** bundled, because CSS requires every `@import` to precede all
|
|
139
|
+
other rules — a font import inside the compiled bundle is silently discarded the
|
|
140
|
+
moment you import that bundle into your own stylesheet.
|
|
141
|
+
|
|
142
|
+
Either self-host Inter and JetBrains Mono (usually better for performance and
|
|
143
|
+
privacy), or import ours **first**:
|
|
144
|
+
|
|
145
|
+
```css
|
|
146
|
+
@import "@valiify/dashboard-ui/fonts"; /* must be the first line */
|
|
147
|
+
@import "tailwindcss";
|
|
148
|
+
@import "@valiify/dashboard-ui/source";
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### Use components
|
|
152
|
+
|
|
153
|
+
```html
|
|
154
|
+
<!-- Button — a bare .btn is the outline display, at medium size -->
|
|
155
|
+
<button class="btn btn-primary">Save changes</button>
|
|
156
|
+
<button class="btn btn-outline btn-sm">Filter</button>
|
|
157
|
+
|
|
158
|
+
<!-- Button with an icon from the sprite -->
|
|
159
|
+
<button class="btn btn-primary">
|
|
160
|
+
<svg class="icon icon-size-14" aria-hidden="true"><use href="#save" /></svg>
|
|
161
|
+
Save
|
|
162
|
+
</button>
|
|
163
|
+
|
|
164
|
+
<!-- Input — the field is a wrapper; .input is the bare element inside it -->
|
|
165
|
+
<div class="input-container">
|
|
166
|
+
<div class="input-field input-md">
|
|
167
|
+
<svg class="input-icon-left icon icon-size-14" aria-hidden="true">
|
|
168
|
+
<use href="#mail" />
|
|
169
|
+
</svg>
|
|
170
|
+
<input type="email" class="input" placeholder="you@example.com" />
|
|
171
|
+
</div>
|
|
172
|
+
</div>
|
|
173
|
+
|
|
174
|
+
<!-- Status chip -->
|
|
175
|
+
<span class="chip chip-warning">
|
|
176
|
+
<span class="chip-dot"></span>
|
|
177
|
+
<span>Needs review</span>
|
|
178
|
+
</span>
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
## Available components
|
|
182
|
+
|
|
183
|
+
Base classes only — most components also carry variant, size and state classes.
|
|
184
|
+
**Storybook is the reference**, and [CLAUDE.md](CLAUDE.md) documents every
|
|
185
|
+
component in full, including what Figma got wrong and why we did or did not
|
|
186
|
+
reproduce it.
|
|
187
|
+
|
|
188
|
+
**Form controls**
|
|
189
|
+
|
|
190
|
+
| Component | Base class |
|
|
191
|
+
| ------------- | ------------------------------------------------------- |
|
|
192
|
+
| Button | `.btn` |
|
|
193
|
+
| IconButton | `.icon-button` |
|
|
194
|
+
| TextButton | `.text-button` |
|
|
195
|
+
| Input | `.input-container` › `.input-field` › `.input` |
|
|
196
|
+
| Textarea | `.textarea-container` › `.textarea-field` › `.textarea` |
|
|
197
|
+
| Checkbox | `.checkbox` |
|
|
198
|
+
| RadioSelect | `.radio-select` |
|
|
199
|
+
| Switch | `.switch` |
|
|
200
|
+
| DropdownField | `.dropdown-field` |
|
|
201
|
+
| SensitiveData | `.sensitive-data` |
|
|
202
|
+
|
|
203
|
+
**Data display**
|
|
204
|
+
|
|
205
|
+
| Component | Base class |
|
|
206
|
+
| ------------------ | ----------------------------------------------------- |
|
|
207
|
+
| Avatar | `.avatar` |
|
|
208
|
+
| Chip / Badge / Dot | `.chip` · `.badge` · `.dot` |
|
|
209
|
+
| Tag | `.tag` |
|
|
210
|
+
| Pill | `.pill` |
|
|
211
|
+
| DataRow | `.data-row` |
|
|
212
|
+
| Divider | `.divider` · `.divider-labeled` · `.divider-metadata` |
|
|
213
|
+
| Icon | `.icon` + `.icon-size-*` |
|
|
214
|
+
| Skeleton | `.skeleton` + a shape and a size class |
|
|
215
|
+
|
|
216
|
+
**Navigation**
|
|
217
|
+
|
|
218
|
+
| Component | Base class |
|
|
219
|
+
| --------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
|
|
220
|
+
| NavigationRail | `.nav-rail` (+ `-collapsed`) › `.nav-rail-content` / `-section` / `-footer` › `.nav-title` / `.nav-group` / `.nav-item` / `.nav-badge` |
|
|
221
|
+
| Tabs | `.tab` + a required type class |
|
|
222
|
+
| SegmentSelector | `.segment-selector` |
|
|
223
|
+
| FilterSegment | `.filter-segment` |
|
|
224
|
+
| Breadcrumbs | `.breadcrumbs` |
|
|
225
|
+
| Pagination | `.pagination` |
|
|
226
|
+
| PaginationItem | `.pagination-item` |
|
|
227
|
+
| MenuItem | `.menu-item` |
|
|
228
|
+
| DropdownMenu | `.dropdown-menu` |
|
|
229
|
+
| Link | `.link` · `.link-inline` |
|
|
230
|
+
|
|
231
|
+
**Feedback and progress**
|
|
232
|
+
|
|
233
|
+
| Component | Base class |
|
|
234
|
+
| ---------------- | -------------------------------- |
|
|
235
|
+
| Alert | `.alert` + a required type class |
|
|
236
|
+
| Toast | `.toast` |
|
|
237
|
+
| Modal | `.modal` |
|
|
238
|
+
| Tooltip | `.tooltip` |
|
|
239
|
+
| LoadingIndicator | `.loading-indicator` |
|
|
240
|
+
| LoadingInline | `.loading-inline` |
|
|
241
|
+
| ProgressBar | `.progress-bar` |
|
|
242
|
+
| Step | `.step` |
|
|
243
|
+
| Stepper | `.stepper` |
|
|
244
|
+
|
|
245
|
+
**Review-specific**
|
|
246
|
+
|
|
247
|
+
| Component | Base class |
|
|
248
|
+
| ----------------- | --------------------- |
|
|
249
|
+
| FieldVerification | `.field-verification` |
|
|
250
|
+
| SectionMarker | `.section-marker` |
|
|
251
|
+
|
|
252
|
+
> **`.card` is not a real component.** It is leftover proof-of-concept
|
|
253
|
+
> scaffolding — its padding, radius and structure were invented rather than
|
|
254
|
+
> extracted, and it is the one component deliberately excluded from
|
|
255
|
+
> `verify:visual`. Do not build product UI on it. It will be rewritten from
|
|
256
|
+
> scratch when a Card lands in Figma.
|
|
257
|
+
|
|
258
|
+
## Development
|
|
259
|
+
|
|
260
|
+
### Install dependencies
|
|
261
|
+
|
|
262
|
+
```bash
|
|
263
|
+
npm install
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
### Build the library
|
|
267
|
+
|
|
268
|
+
```bash
|
|
269
|
+
npm run build
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
### Run Storybook
|
|
273
|
+
|
|
274
|
+
```bash
|
|
275
|
+
npm run storybook
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
View all components with interactive controls and documentation at http://localhost:6006
|
|
279
|
+
|
|
280
|
+
### Add a component
|
|
281
|
+
|
|
282
|
+
```bash
|
|
283
|
+
npm run new:component Badge
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
Scaffolds the CSS file, registers its import, and creates a story and class-name
|
|
287
|
+
types. One name at a time.
|
|
288
|
+
|
|
289
|
+
Populating the CSS from Figma is the manual part — see
|
|
290
|
+
[docs/component-process.md](docs/component-process.md) for the full process,
|
|
291
|
+
including the Figma extraction brief and the verification steps.
|
|
292
|
+
|
|
293
|
+
### Type-check and format
|
|
294
|
+
|
|
295
|
+
```bash
|
|
296
|
+
npm run typecheck
|
|
297
|
+
npm run format
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
### Verify
|
|
301
|
+
|
|
302
|
+
Four gates, in the order CI runs them. They are complementary — none replaces
|
|
303
|
+
another.
|
|
304
|
+
|
|
305
|
+
```bash
|
|
306
|
+
npm run audit # coverage across the library
|
|
307
|
+
npm run verify:component Avatar # static: reads the source
|
|
308
|
+
npm run verify:layers # build output: the cascade-layer contract
|
|
309
|
+
npm run verify:visual # rendered: computed styles vs Figma
|
|
310
|
+
npm run verify:visual -- Input Button # scoped while iterating
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
| Gate | Reads | Catches |
|
|
314
|
+
| ------------------ | ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
315
|
+
| `audit` | the whole library | a component missing a type, story or spec |
|
|
316
|
+
| `verify:component` | the CSS source | hardcoded colours / radii / type, a missing `@layer components` wrapper, an unguarded `:hover`, an unregistered import |
|
|
317
|
+
| `verify:layers` | `dist/index.css` | loss of `@layer theme, base, components, utilities;` — the one line that lets a consumer's utilities override our component classes. Invisible from source, since Tailwind emits it at build time. |
|
|
318
|
+
| `verify:visual` | Storybook in headless Chromium | a component that compiles cleanly, uses every right token, and still renders at the wrong size |
|
|
319
|
+
|
|
320
|
+
`verify:visual` needs Storybook running (`npm run storybook`), or point it at a
|
|
321
|
+
static build with `-- --url http://127.0.0.1:6007`. It is the only check that
|
|
322
|
+
has ever caught a sizing error, and it has caught four.
|
|
323
|
+
|
|
324
|
+
All of the above run on every push and pull request —
|
|
325
|
+
[.github/workflows/ci.yml](.github/workflows/ci.yml).
|
|
326
|
+
|
|
327
|
+
## Architecture
|
|
328
|
+
|
|
329
|
+
- **CSS-only** - Zero JavaScript dependencies, no Tailwind plugin to register
|
|
330
|
+
- **Tailwind v4 `@theme`** - Design tokens generate utilities automatically
|
|
331
|
+
- **Single light theme** - V1 ships one theme; no dark mode or per-tenant theming
|
|
332
|
+
- **Framework-agnostic** - Works with React, Vue, Svelte, vanilla HTML, etc.
|
|
333
|
+
|
|
334
|
+
## Design System
|
|
335
|
+
|
|
336
|
+
Built on the Valiify design system in Figma (Commercial-Designs,
|
|
337
|
+
`FdcEV83HPv44bzLPAQU1hR`). **The tokens are real and extracted from that file** —
|
|
338
|
+
40 colours, 5 radii, 3 border widths, 37 composite text styles, 4 shadows and
|
|
339
|
+
6 label utilities.
|
|
340
|
+
|
|
341
|
+
They are **generated, not hand-written**:
|
|
342
|
+
|
|
343
|
+
```
|
|
344
|
+
tokens/figma-tokens.json ──scripts/build-theme.mjs──> src/themes/valiify.css
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
Edit the JSON and run `npm run build:theme`; never edit the CSS. Tokens live in
|
|
348
|
+
a Tailwind `@theme` block, so each one generates utilities — `--color-approved`
|
|
349
|
+
gives you `bg-approved`, `text-approved` and `border-approved`. On the
|
|
350
|
+
`/source` entry, prefer those over hand-written `var(--color-…)`.
|
|
351
|
+
|
|
352
|
+
Colours are authored in OKLch. Typography is Inter for UI and JetBrains Mono for
|
|
353
|
+
data — **neither is bundled**, see [Fonts](#fonts) above.
|
|
354
|
+
|
|
355
|
+
> **Token names are public API.** Consumers write `bg-approved` and
|
|
356
|
+
> `var(--radius-control)` in their own code, so renaming or removing a token is
|
|
357
|
+
> a breaking change. Changing a token's _value_ is not. See
|
|
358
|
+
> [CHANGELOG.md](CHANGELOG.md).
|
|
359
|
+
|
|
360
|
+
Browse the full set in Storybook under **Foundations → Design Tokens**.
|
|
361
|
+
|
|
362
|
+
## Links
|
|
363
|
+
|
|
364
|
+
- **Repository**: https://github.com/BubbaCoop/Valiify-dashboard-ui
|
|
365
|
+
- **Figma**: Commercial-Designs (fileKey: `FdcEV83HPv44bzLPAQU1hR`)
|
|
366
|
+
- **Component reference**: [CLAUDE.md](CLAUDE.md) — every component, in full
|
|
367
|
+
- **Build process**: [docs/component-process.md](docs/component-process.md)
|
|
368
|
+
- **Storybook**: TBD (not yet deployed)
|
|
369
|
+
- **NPM**: TBD (not yet published)
|
|
370
|
+
|
|
371
|
+
## License
|
|
372
|
+
|
|
373
|
+
MIT © Valiify
|