@valiify/dashboard-ui 0.1.0-alpha.1 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLAUDE.md +3578 -0
- package/COMPONENTS.md +1675 -0
- package/GETTING_STARTED.md +420 -0
- package/QUICK_REFERENCE.md +161 -0
- package/README.md +302 -283
- package/TROUBLESHOOTING.md +410 -0
- package/dist/index.css +2 -0
- package/examples/README.md +156 -0
- package/examples/basic/index.html +155 -0
- package/examples/postcss-starter/README.md +47 -0
- package/examples/postcss-starter/index.html +54 -0
- package/examples/postcss-starter/package.json +19 -0
- package/examples/postcss-starter/postcss.config.js +5 -0
- package/examples/postcss-starter/src/styles.css +17 -0
- package/examples/vite-starter/README.md +125 -0
- package/examples/vite-starter/index.html +12 -0
- package/examples/vite-starter/package.json +19 -0
- package/examples/vite-starter/src/main.js +188 -0
- package/examples/vite-starter/src/styles.css +22 -0
- package/examples/vite-starter/vite.config.js +6 -0
- package/package.json +11 -3
- package/src/components/icon.css +2 -0
package/README.md
CHANGED
|
@@ -2,120 +2,129 @@
|
|
|
2
2
|
|
|
3
3
|
A Tailwind CSS component library for Valiify Dashboard applications.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
**40 verified components** extracted from Figma. CSS-only, framework-agnostic, zero JavaScript dependencies.
|
|
6
|
+
|
|
7
|
+
## ⚠️ Important: Read This First
|
|
8
|
+
|
|
9
|
+
**This package requires a build tool.** Installing `npm install @valiify/dashboard-ui tailwindcss` is not enough. You also need:
|
|
10
|
+
|
|
11
|
+
- **Vite:** `@tailwindcss/vite`
|
|
12
|
+
- **webpack:** `@tailwindcss/webpack`
|
|
13
|
+
- **PostCSS/Next.js:** `@tailwindcss/postcss`
|
|
14
|
+
- **No bundler:** `@tailwindcss/cli`
|
|
15
|
+
|
|
16
|
+
**Without one of these packages, nothing will work.** No errors, no styles. See [Installation](#installation) below.
|
|
6
17
|
|
|
7
|
-
|
|
8
|
-
against it. Not yet published to NPM.
|
|
18
|
+
## Quick Start (Recommended)
|
|
9
19
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
20
|
+
The fastest way to get started is to use our verified example:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
# Copy the Vite starter
|
|
24
|
+
npx degit BubbaCoop/Valiify-dashboard-ui/examples/vite-starter my-app
|
|
25
|
+
cd my-app
|
|
26
|
+
|
|
27
|
+
# Install and run
|
|
28
|
+
npm install
|
|
29
|
+
npm run dev
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Open [http://localhost:5173](http://localhost:5173) - if you see styled components with working icons, you're done.
|
|
33
|
+
|
|
34
|
+
**Or:** See the [complete installation guide](GETTING_STARTED.md) for manual setup with any build tool.
|
|
14
35
|
|
|
15
36
|
## Installation
|
|
16
37
|
|
|
38
|
+
### Step 1: Install Packages
|
|
39
|
+
|
|
40
|
+
Choose based on your build tool:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
# Vite (recommended)
|
|
44
|
+
npm install @valiify/dashboard-ui tailwindcss @tailwindcss/vite
|
|
45
|
+
|
|
46
|
+
# webpack
|
|
47
|
+
npm install @valiify/dashboard-ui tailwindcss @tailwindcss/webpack
|
|
48
|
+
|
|
49
|
+
# PostCSS / Next.js
|
|
50
|
+
npm install @valiify/dashboard-ui tailwindcss @tailwindcss/postcss
|
|
51
|
+
|
|
52
|
+
# Tailwind CLI (no bundler)
|
|
53
|
+
npm install @valiify/dashboard-ui tailwindcss @tailwindcss/cli
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
> ⚠️ **You need THREE packages, not two.** `tailwindcss` alone doesn't process CSS in v4. Missing the integration package (the third one above) causes silent failure.
|
|
57
|
+
|
|
58
|
+
### Step 2: Configure Your Build Tool
|
|
59
|
+
|
|
60
|
+
**Vite** - create/update `vite.config.js`:
|
|
61
|
+
|
|
62
|
+
```js
|
|
63
|
+
import { defineConfig } from "vite";
|
|
64
|
+
import tailwindcss from "@tailwindcss/vite";
|
|
65
|
+
|
|
66
|
+
export default defineConfig({
|
|
67
|
+
plugins: [tailwindcss()],
|
|
68
|
+
});
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
**PostCSS** - create/update `postcss.config.js`:
|
|
72
|
+
|
|
73
|
+
```js
|
|
74
|
+
export default {
|
|
75
|
+
plugins: {
|
|
76
|
+
"@tailwindcss/postcss": {},
|
|
77
|
+
},
|
|
78
|
+
};
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
**webpack** - add to your config:
|
|
82
|
+
|
|
83
|
+
```js
|
|
84
|
+
import tailwindcss from "@tailwindcss/webpack";
|
|
85
|
+
|
|
86
|
+
export default {
|
|
87
|
+
plugins: [tailwindcss()],
|
|
88
|
+
};
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
**Tailwind CLI** - no config needed, build with:
|
|
92
|
+
|
|
17
93
|
```bash
|
|
18
|
-
|
|
94
|
+
npx @tailwindcss/cli -i src/styles.css -o dist/styles.css --watch
|
|
19
95
|
```
|
|
20
96
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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
|
|
97
|
+
### Step 3: Create Your Stylesheet
|
|
98
|
+
|
|
99
|
+
Create a CSS file (e.g., `src/styles.css`):
|
|
59
100
|
|
|
60
101
|
```css
|
|
102
|
+
/* Optional: Load fonts */
|
|
103
|
+
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap");
|
|
104
|
+
|
|
105
|
+
/* Required: Tailwind first */
|
|
61
106
|
@import "tailwindcss";
|
|
107
|
+
|
|
108
|
+
/* Required: Valiify UI second */
|
|
62
109
|
@import "@valiify/dashboard-ui/source";
|
|
63
110
|
```
|
|
64
111
|
|
|
65
|
-
|
|
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.
|
|
112
|
+
> **⚠️ CRITICAL:** Import from CSS, never from JavaScript. See [Common Mistakes](GETTING_STARTED.md#common-mistakes).
|
|
69
113
|
|
|
70
|
-
|
|
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.)
|
|
114
|
+
### Step 4: Import Your Stylesheet
|
|
75
115
|
|
|
76
|
-
|
|
116
|
+
In your JavaScript entry point:
|
|
77
117
|
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
href="node_modules/@valiify/dashboard-ui/dist/index.css"
|
|
82
|
-
/>
|
|
118
|
+
```js
|
|
119
|
+
// main.js
|
|
120
|
+
import "./styles.css"; // ✅ Import YOUR stylesheet, not the library
|
|
83
121
|
```
|
|
84
122
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
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
|
|
123
|
+
### Step 5: Load Icons
|
|
124
|
+
|
|
125
|
+
Add to your JavaScript:
|
|
126
|
+
|
|
127
|
+
```js
|
|
119
128
|
import spriteUrl from "@valiify/dashboard-ui/icons/sprite.svg?url";
|
|
120
129
|
|
|
121
130
|
fetch(spriteUrl)
|
|
@@ -128,246 +137,256 @@ fetch(spriteUrl)
|
|
|
128
137
|
});
|
|
129
138
|
```
|
|
130
139
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
140
|
+
### Step 6: Use Components
|
|
141
|
+
|
|
142
|
+
```html
|
|
143
|
+
<button class="btn btn-primary">Click me</button>
|
|
144
|
+
|
|
145
|
+
<div class="input-container">
|
|
146
|
+
<div class="input-field">
|
|
147
|
+
<input type="text" class="input" placeholder="Enter text..." />
|
|
148
|
+
</div>
|
|
149
|
+
</div>
|
|
150
|
+
|
|
151
|
+
<span class="chip chip-success">
|
|
152
|
+
<span class="chip-dot"></span>
|
|
153
|
+
<span>Approved</span>
|
|
154
|
+
</span>
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
## Documentation
|
|
158
|
+
|
|
159
|
+
### Getting Started
|
|
160
|
+
|
|
161
|
+
- **[GETTING_STARTED.md](GETTING_STARTED.md)** - Complete installation guide for all build tools
|
|
162
|
+
- **[COMPONENTS.md](COMPONENTS.md)** - Full markup examples for every component
|
|
163
|
+
- **[TROUBLESHOOTING.md](TROUBLESHOOTING.md)** - Debug guide for common issues
|
|
164
|
+
|
|
165
|
+
### Examples
|
|
166
|
+
|
|
167
|
+
- **[examples/vite-starter/](examples/vite-starter/)** - Working Vite setup (recommended)
|
|
168
|
+
- **[examples/postcss-starter/](examples/postcss-starter/)** - PostCSS CLI setup
|
|
169
|
+
- **[examples/basic/](examples/basic/)** - Standalone HTML (prebuilt CSS)
|
|
170
|
+
|
|
171
|
+
### Reference
|
|
172
|
+
|
|
173
|
+
- **[CLAUDE.md](CLAUDE.md)** - Technical reference: every component's structure, states, and Figma differences
|
|
174
|
+
- **[CHANGELOG.md](CHANGELOG.md)** - Version history and breaking changes
|
|
175
|
+
|
|
176
|
+
## Available Components
|
|
177
|
+
|
|
178
|
+
### Form Controls
|
|
179
|
+
|
|
180
|
+
Button • IconButton • TextButton • Input • Textarea • Checkbox • RadioSelect • Switch • DropdownField • SensitiveData
|
|
181
|
+
|
|
182
|
+
### Data Display
|
|
183
|
+
|
|
184
|
+
Avatar • Chip • Badge • Dot • Tag • Pill • DataRow • Divider • Icon • Skeleton
|
|
185
|
+
|
|
186
|
+
### Navigation
|
|
187
|
+
|
|
188
|
+
NavigationRail • Tabs • SegmentSelector • FilterSegment • Breadcrumbs • Pagination • MenuItem • DropdownMenu • Link
|
|
189
|
+
|
|
190
|
+
### Feedback
|
|
191
|
+
|
|
192
|
+
Alert • Toast • Modal • Tooltip • LoadingIndicator • LoadingInline • ProgressBar • Stepper
|
|
193
|
+
|
|
194
|
+
### Review Components
|
|
135
195
|
|
|
136
|
-
|
|
196
|
+
FieldVerification • SectionMarker
|
|
137
197
|
|
|
138
|
-
|
|
139
|
-
other rules — a font import inside the compiled bundle is silently discarded the
|
|
140
|
-
moment you import that bundle into your own stylesheet.
|
|
198
|
+
> **Note:** Card is placeholder scaffolding, not a real component. Don't use it.
|
|
141
199
|
|
|
142
|
-
|
|
143
|
-
|
|
200
|
+
See [COMPONENTS.md](COMPONENTS.md) for complete markup of every component.
|
|
201
|
+
|
|
202
|
+
## Components That Need JavaScript
|
|
203
|
+
|
|
204
|
+
These components ship **zero JavaScript** - you must implement behavior:
|
|
205
|
+
|
|
206
|
+
- **DropdownField / DropdownMenu** - Toggle `aria-expanded`, show/hide panel, close on outside click
|
|
207
|
+
- **Tabs** - Toggle `aria-selected`, show/hide panels
|
|
208
|
+
- **Modal** - Open/close handlers (or use native `<dialog>` - recommended)
|
|
209
|
+
- **Tooltip** - Show/hide, positioning
|
|
210
|
+
- **NavigationRail** - Group disclosure (toggle `aria-expanded`)
|
|
211
|
+
|
|
212
|
+
See [GETTING_STARTED.md](GETTING_STARTED.md#components-that-need-javascript) for minimal implementation examples.
|
|
213
|
+
|
|
214
|
+
## Common Issues
|
|
215
|
+
|
|
216
|
+
### Styles don't apply at all
|
|
217
|
+
|
|
218
|
+
**Cause:** Missing integration package or wrong import.
|
|
219
|
+
|
|
220
|
+
**Fix:**
|
|
221
|
+
1. Install `@tailwindcss/vite` (or postcss/webpack/cli)
|
|
222
|
+
2. Register it in your config
|
|
223
|
+
3. Import from CSS, not JavaScript
|
|
224
|
+
|
|
225
|
+
See [TROUBLESHOOTING.md](TROUBLESHOOTING.md#styles-dont-apply-at-all).
|
|
226
|
+
|
|
227
|
+
### Icons don't show
|
|
228
|
+
|
|
229
|
+
**Cause:** Sprite didn't load.
|
|
230
|
+
|
|
231
|
+
**Fix:** Add sprite loading code (Step 5 above). See [TROUBLESHOOTING.md](TROUBLESHOOTING.md#icons-dont-show).
|
|
232
|
+
|
|
233
|
+
### Token utilities don't work
|
|
234
|
+
|
|
235
|
+
**Cause:** Using prebuilt `/` entry instead of `/source`.
|
|
236
|
+
|
|
237
|
+
**Fix:** Change `@import "@valiify/dashboard-ui"` to `@import "@valiify/dashboard-ui/source"`.
|
|
238
|
+
|
|
239
|
+
### Component looks broken
|
|
240
|
+
|
|
241
|
+
**Cause:** Missing wrapper elements.
|
|
242
|
+
|
|
243
|
+
**Fix:** Check [COMPONENTS.md](COMPONENTS.md) for required markup structure.
|
|
244
|
+
|
|
245
|
+
### Dropdown/Tabs/Modal don't work
|
|
246
|
+
|
|
247
|
+
**Cause:** These components need JavaScript.
|
|
248
|
+
|
|
249
|
+
**Fix:** See [Components That Need JavaScript](#components-that-need-javascript).
|
|
250
|
+
|
|
251
|
+
## Two Entry Points
|
|
144
252
|
|
|
145
253
|
```css
|
|
146
|
-
|
|
254
|
+
/* /source - for apps with Tailwind build (recommended) */
|
|
147
255
|
@import "tailwindcss";
|
|
148
256
|
@import "@valiify/dashboard-ui/source";
|
|
257
|
+
|
|
258
|
+
/* / (prebuilt) - for standalone HTML, no Tailwind build */
|
|
259
|
+
<link rel="stylesheet" href="node_modules/@valiify/dashboard-ui/dist/index.css">
|
|
149
260
|
```
|
|
150
261
|
|
|
151
|
-
|
|
262
|
+
**Use `/source` for:**
|
|
263
|
+
- Any app with a bundler (Vite, webpack, Next.js, etc.)
|
|
264
|
+
- When you want token utilities (`bg-approved`, `rounded-pill`, `type-label-l`)
|
|
265
|
+
- When your own `@theme` should survive
|
|
152
266
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
267
|
+
**Use `/` (prebuilt) only for:**
|
|
268
|
+
- Standalone HTML pages with no build process
|
|
269
|
+
- Email previews
|
|
270
|
+
- Static prototypes
|
|
157
271
|
|
|
158
|
-
|
|
159
|
-
<button class="btn btn-primary">
|
|
160
|
-
<svg class="icon icon-size-14" aria-hidden="true"><use href="#save" /></svg>
|
|
161
|
-
Save
|
|
162
|
-
</button>
|
|
272
|
+
See [GETTING_STARTED.md](GETTING_STARTED.md) for details.
|
|
163
273
|
|
|
164
|
-
|
|
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
|
-
```
|
|
274
|
+
## Design System
|
|
180
275
|
|
|
181
|
-
|
|
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.
|
|
276
|
+
Built on the Valiify Figma design system (Commercial-Designs, `FdcEV83HPv44bzLPAQU1hR`).
|
|
257
277
|
|
|
258
|
-
|
|
278
|
+
**40 colors** • **5 radii** • **3 border widths** • **37 text styles** • **4 shadows** • **6 label utilities**
|
|
259
279
|
|
|
260
|
-
|
|
280
|
+
All tokens are **extracted from Figma**, not hand-written. They live in a Tailwind `@theme` block, so each one generates utilities:
|
|
261
281
|
|
|
262
|
-
```
|
|
263
|
-
|
|
282
|
+
```css
|
|
283
|
+
/* Token → Utilities */
|
|
284
|
+
--color-approved → bg-approved, text-approved, border-approved
|
|
285
|
+
--radius-control → rounded-control
|
|
286
|
+
--text-body-1 → text-body-1 (size + line-height + weight + tracking)
|
|
264
287
|
```
|
|
265
288
|
|
|
266
|
-
|
|
289
|
+
Browse the full set in Storybook under **Foundations → Design Tokens**.
|
|
267
290
|
|
|
268
|
-
|
|
269
|
-
npm run build
|
|
270
|
-
```
|
|
291
|
+
**Typography:** Inter (UI) + JetBrains Mono (data). Not bundled - see [Fonts](#fonts).
|
|
271
292
|
|
|
272
|
-
|
|
293
|
+
**Colors:** OKLch notation for perceptual uniformity.
|
|
273
294
|
|
|
274
|
-
|
|
275
|
-
|
|
295
|
+
> **Token names are public API.** Renaming or removing a token is a breaking change. Changing a token's *value* is not.
|
|
296
|
+
|
|
297
|
+
## Fonts
|
|
298
|
+
|
|
299
|
+
Fonts are **not bundled**. Either self-host or import ours **first**:
|
|
300
|
+
|
|
301
|
+
```css
|
|
302
|
+
@import "@valiify/dashboard-ui/fonts"; /* must be first line */
|
|
303
|
+
@import "tailwindcss";
|
|
304
|
+
@import "@valiify/dashboard-ui/source";
|
|
276
305
|
```
|
|
277
306
|
|
|
278
|
-
|
|
307
|
+
Self-hosting is better for performance and privacy.
|
|
308
|
+
|
|
309
|
+
## Development
|
|
279
310
|
|
|
280
|
-
###
|
|
311
|
+
### Install
|
|
281
312
|
|
|
282
313
|
```bash
|
|
283
|
-
|
|
314
|
+
git clone https://github.com/BubbaCoop/Valiify-dashboard-ui.git
|
|
315
|
+
cd Valiify-dashboard-ui
|
|
316
|
+
npm install
|
|
284
317
|
```
|
|
285
318
|
|
|
286
|
-
|
|
287
|
-
types. One name at a time.
|
|
319
|
+
### Build
|
|
288
320
|
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
321
|
+
```bash
|
|
322
|
+
npm run build # Build library
|
|
323
|
+
npm run dev # Build + watch
|
|
324
|
+
npm run build:theme # Regenerate tokens from Figma JSON
|
|
325
|
+
```
|
|
292
326
|
|
|
293
|
-
###
|
|
327
|
+
### Storybook
|
|
294
328
|
|
|
295
329
|
```bash
|
|
296
|
-
npm run
|
|
297
|
-
npm run
|
|
330
|
+
npm run storybook # Dev server at http://localhost:6006
|
|
331
|
+
npm run build-storybook
|
|
298
332
|
```
|
|
299
333
|
|
|
300
334
|
### Verify
|
|
301
335
|
|
|
302
|
-
Four gates, in the order CI runs them. They are complementary — none replaces
|
|
303
|
-
another.
|
|
304
|
-
|
|
305
336
|
```bash
|
|
306
|
-
npm run audit #
|
|
307
|
-
npm run verify:component Avatar #
|
|
308
|
-
npm run verify:layers #
|
|
309
|
-
npm run verify:visual #
|
|
310
|
-
npm run verify:
|
|
337
|
+
npm run audit # Coverage check
|
|
338
|
+
npm run verify:component Avatar # Static source check
|
|
339
|
+
npm run verify:layers # Cascade-layer contract
|
|
340
|
+
npm run verify:visual # Rendered styles vs Figma
|
|
341
|
+
npm run verify:a11y # Accessibility scan
|
|
342
|
+
npm run typecheck # TypeScript
|
|
311
343
|
```
|
|
312
344
|
|
|
313
|
-
|
|
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 |
|
|
345
|
+
All verification runs in CI: [.github/workflows/ci.yml](.github/workflows/ci.yml)
|
|
319
346
|
|
|
320
|
-
|
|
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.
|
|
347
|
+
### Add a Component
|
|
323
348
|
|
|
324
|
-
|
|
325
|
-
|
|
349
|
+
```bash
|
|
350
|
+
npm run new:component Badge # Scaffold CSS, story, types
|
|
351
|
+
```
|
|
326
352
|
|
|
327
|
-
|
|
353
|
+
See [docs/component-process.md](docs/component-process.md) for the full process.
|
|
328
354
|
|
|
329
|
-
|
|
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.
|
|
355
|
+
## Architecture
|
|
333
356
|
|
|
334
|
-
|
|
357
|
+
- **CSS-only** - Zero JavaScript dependencies
|
|
358
|
+
- **Tailwind v4 `@theme`** - Tokens generate utilities automatically
|
|
359
|
+
- **No Tailwind plugin** - No `tailwind.config.js` to register
|
|
360
|
+
- **Single light theme** - V1 ships one theme; no dark mode yet
|
|
361
|
+
- **Framework-agnostic** - Works with React, Vue, Svelte, vanilla HTML
|
|
335
362
|
|
|
336
|
-
|
|
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.
|
|
363
|
+
## Status
|
|
340
364
|
|
|
341
|
-
|
|
365
|
+
**Current:** Phase 3 complete - 40 components built and verified
|
|
366
|
+
**Next:** Accessibility remediation, then publish to NPM
|
|
342
367
|
|
|
343
|
-
|
|
344
|
-
tokens/figma-tokens.json ──scripts/build-theme.mjs──> src/themes/valiify.css
|
|
345
|
-
```
|
|
368
|
+
## Links
|
|
346
369
|
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
370
|
+
- **Repository:** https://github.com/BubbaCoop/Valiify-dashboard-ui
|
|
371
|
+
- **Figma:** Commercial-Designs (`FdcEV83HPv44bzLPAQU1hR`)
|
|
372
|
+
- **NPM:** Not yet published
|
|
373
|
+
- **Storybook:** Not yet deployed
|
|
351
374
|
|
|
352
|
-
|
|
353
|
-
data — **neither is bundled**, see [Fonts](#fonts) above.
|
|
375
|
+
## Contributing
|
|
354
376
|
|
|
355
|
-
|
|
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).
|
|
377
|
+
Not accepting external contributions yet. This is a pre-release package under active development.
|
|
359
378
|
|
|
360
|
-
|
|
379
|
+
## License
|
|
361
380
|
|
|
362
|
-
|
|
381
|
+
MIT © Valiify
|
|
363
382
|
|
|
364
|
-
|
|
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)
|
|
383
|
+
---
|
|
370
384
|
|
|
371
|
-
##
|
|
385
|
+
## Still Having Issues?
|
|
372
386
|
|
|
373
|
-
|
|
387
|
+
1. **Check the examples** - `examples/vite-starter/` is a verified working setup
|
|
388
|
+
2. **Read [GETTING_STARTED.md](GETTING_STARTED.md)** - Covers all build tools
|
|
389
|
+
3. **Read [TROUBLESHOOTING.md](TROUBLESHOOTING.md)** - Debug guide
|
|
390
|
+
4. **Read [COMPONENTS.md](COMPONENTS.md)** - Complete markup reference
|
|
391
|
+
5. **Search issues** - https://github.com/BubbaCoop/Valiify-dashboard-ui/issues
|
|
392
|
+
6. **Open an issue** - Include your setup, config files, and what you've tried
|