@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
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
# Valiify Dashboard Icons
|
|
2
|
+
|
|
3
|
+
Complete icon system with 2,034 Lucide icons + custom icons, delivered as an optimized SVG sprite.
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
### 1. Include the sprite
|
|
8
|
+
|
|
9
|
+
Load the sprite once in your HTML (typically in `<head>` or at the start of `<body>`):
|
|
10
|
+
|
|
11
|
+
```html
|
|
12
|
+
<!-- Option A: Inline (best for performance) -->
|
|
13
|
+
<div style="display: none;">
|
|
14
|
+
<?php include 'path/to/sprite.svg'; ?>
|
|
15
|
+
</div>
|
|
16
|
+
|
|
17
|
+
<!-- Option B: External reference -->
|
|
18
|
+
<!-- Icons will reference: /path/to/sprite.svg#icon-name -->
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### 2. Use an icon
|
|
22
|
+
|
|
23
|
+
```html
|
|
24
|
+
<!-- Basic usage -->
|
|
25
|
+
<svg class="icon" width="24" height="24">
|
|
26
|
+
<use href="#search" />
|
|
27
|
+
</svg>
|
|
28
|
+
|
|
29
|
+
<!-- With currentColor (inherits text color) -->
|
|
30
|
+
<svg class="icon" width="20" height="20" aria-hidden="true">
|
|
31
|
+
<use href="#check" />
|
|
32
|
+
</svg>
|
|
33
|
+
|
|
34
|
+
<!-- Custom icon (prefixed with 'custom-') -->
|
|
35
|
+
<svg class="icon" width="24" height="24">
|
|
36
|
+
<use href="#custom-valiify-logo" />
|
|
37
|
+
</svg>
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### 3. Style with CSS
|
|
41
|
+
|
|
42
|
+
Icons use `currentColor` by default and scale to their container:
|
|
43
|
+
|
|
44
|
+
```css
|
|
45
|
+
.icon {
|
|
46
|
+
display: inline-block;
|
|
47
|
+
width: 1em;
|
|
48
|
+
height: 1em;
|
|
49
|
+
stroke-width: 2;
|
|
50
|
+
fill: none;
|
|
51
|
+
stroke: currentColor;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/* Status icon colors */
|
|
55
|
+
.icon-success { color: var(--color-approved); }
|
|
56
|
+
.icon-error { color: var(--color-critical); }
|
|
57
|
+
.icon-warning { color: var(--color-warning); }
|
|
58
|
+
|
|
59
|
+
/* Sizes */
|
|
60
|
+
.icon-sm { width: 16px; height: 16px; }
|
|
61
|
+
.icon-md { width: 20px; height: 20px; }
|
|
62
|
+
.icon-lg { width: 24px; height: 24px; }
|
|
63
|
+
.icon-xl { width: 32px; height: 32px; }
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Icon Library
|
|
67
|
+
|
|
68
|
+
### Lucide Icons (2,034 icons)
|
|
69
|
+
|
|
70
|
+
All Lucide icons are available with their original names. Browse the full list:
|
|
71
|
+
- **Online**: https://lucide.dev/icons/
|
|
72
|
+
- **Local**: See `icon-list.txt` for all available names
|
|
73
|
+
|
|
74
|
+
Popular icons:
|
|
75
|
+
- **UI Actions**: `search`, `filter`, `settings`, `menu`, `more-horizontal`, `more-vertical`
|
|
76
|
+
- **Navigation**: `arrow-left`, `arrow-right`, `chevron-down`, `chevron-up`, `x`, `check`
|
|
77
|
+
- **File/Data**: `file`, `folder`, `download`, `upload`, `save`, `trash-2`, `edit-3`
|
|
78
|
+
- **Status**: `check-circle`, `x-circle`, `alert-circle`, `info`, `help-circle`
|
|
79
|
+
- **User**: `user`, `users`, `user-plus`, `log-in`, `log-out`
|
|
80
|
+
|
|
81
|
+
### Custom Icons
|
|
82
|
+
|
|
83
|
+
Custom icons are prefixed with `custom-` to avoid naming conflicts.
|
|
84
|
+
|
|
85
|
+
**Current custom icons:**
|
|
86
|
+
- `custom-valiify-logo` - Valiify brand logo
|
|
87
|
+
|
|
88
|
+
## Adding Custom Icons
|
|
89
|
+
|
|
90
|
+
1. **Create your SVG file** in `src/icons/custom/`:
|
|
91
|
+
```bash
|
|
92
|
+
# Example: adding a custom status icon
|
|
93
|
+
touch src/icons/custom/status-verified.svg
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
2. **Format requirements**:
|
|
97
|
+
- 24×24 viewBox (or specify custom viewBox)
|
|
98
|
+
- Use `currentColor` for stroke/fill to inherit text color
|
|
99
|
+
- Clean, optimized SVG (remove editor metadata)
|
|
100
|
+
- Meaningful filename (becomes icon ID)
|
|
101
|
+
|
|
102
|
+
```xml
|
|
103
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"
|
|
104
|
+
fill="none" stroke="currentColor"
|
|
105
|
+
stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
106
|
+
<path d="M9 11l3 3L22 4"/>
|
|
107
|
+
<path d="M21 12v7a2 2 0 01-2 2H5a2 2 0 01-2-2V5a2 2 0 012-2h11"/>
|
|
108
|
+
</svg>
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
3. **Rebuild the sprite**:
|
|
112
|
+
```bash
|
|
113
|
+
npm run build:icons
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
4. **Use your icon**:
|
|
117
|
+
```html
|
|
118
|
+
<svg class="icon" width="24" height="24">
|
|
119
|
+
<use href="#custom-status-verified" />
|
|
120
|
+
</svg>
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
## Icon Component Example
|
|
124
|
+
|
|
125
|
+
For framework-specific usage, here's a reusable icon component pattern:
|
|
126
|
+
|
|
127
|
+
### React/JSX
|
|
128
|
+
```jsx
|
|
129
|
+
function Icon({ name, size = 24, className = '', ...props }) {
|
|
130
|
+
return (
|
|
131
|
+
<svg
|
|
132
|
+
className={`icon ${className}`}
|
|
133
|
+
width={size}
|
|
134
|
+
height={size}
|
|
135
|
+
aria-hidden="true"
|
|
136
|
+
{...props}
|
|
137
|
+
>
|
|
138
|
+
<use href={`#${name}`} />
|
|
139
|
+
</svg>
|
|
140
|
+
);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// Usage
|
|
144
|
+
<Icon name="search" size={20} className="text-primary" />
|
|
145
|
+
<Icon name="custom-valiify-logo" size={32} />
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### Vue
|
|
149
|
+
```vue
|
|
150
|
+
<template>
|
|
151
|
+
<svg
|
|
152
|
+
:class="['icon', className]"
|
|
153
|
+
:width="size"
|
|
154
|
+
:height="size"
|
|
155
|
+
aria-hidden="true"
|
|
156
|
+
>
|
|
157
|
+
<use :href="`#${name}`" />
|
|
158
|
+
</svg>
|
|
159
|
+
</template>
|
|
160
|
+
|
|
161
|
+
<script>
|
|
162
|
+
export default {
|
|
163
|
+
props: {
|
|
164
|
+
name: { type: String, required: true },
|
|
165
|
+
size: { type: Number, default: 24 },
|
|
166
|
+
className: { type: String, default: '' }
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
</script>
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
### Vanilla HTML/CSS (Framework-agnostic)
|
|
173
|
+
```html
|
|
174
|
+
<!-- Just use SVG directly -->
|
|
175
|
+
<button class="btn btn-primary">
|
|
176
|
+
<svg class="icon" width="20" height="20" aria-hidden="true">
|
|
177
|
+
<use href="#search" />
|
|
178
|
+
</svg>
|
|
179
|
+
Search
|
|
180
|
+
</button>
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
## Accessibility
|
|
184
|
+
|
|
185
|
+
### Decorative icons (most common)
|
|
186
|
+
```html
|
|
187
|
+
<!-- Icon next to text label -->
|
|
188
|
+
<button>
|
|
189
|
+
<svg class="icon" width="20" height="20" aria-hidden="true">
|
|
190
|
+
<use href="#save" />
|
|
191
|
+
</svg>
|
|
192
|
+
Save Changes
|
|
193
|
+
</button>
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
### Standalone icons (icon-only buttons)
|
|
197
|
+
```html
|
|
198
|
+
<!-- Icon is the only label -->
|
|
199
|
+
<button aria-label="Close dialog">
|
|
200
|
+
<svg class="icon" width="20" height="20" aria-hidden="true">
|
|
201
|
+
<use href="#x" />
|
|
202
|
+
</svg>
|
|
203
|
+
</button>
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
### Meaningful icons (convey information)
|
|
207
|
+
```html
|
|
208
|
+
<!-- Icon conveys status/information -->
|
|
209
|
+
<div class="status">
|
|
210
|
+
<svg class="icon icon-success" width="16" height="16" role="img" aria-label="Verified">
|
|
211
|
+
<use href="#check-circle" />
|
|
212
|
+
</svg>
|
|
213
|
+
<span>Account verified</span>
|
|
214
|
+
</div>
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
## Build & Development
|
|
218
|
+
|
|
219
|
+
```bash
|
|
220
|
+
# Generate sprite from Lucide + custom icons
|
|
221
|
+
npm run build:icons
|
|
222
|
+
|
|
223
|
+
# Full build (includes icons)
|
|
224
|
+
npm run build
|
|
225
|
+
|
|
226
|
+
# Watch for changes (CSS only - run build:icons manually for icon changes)
|
|
227
|
+
npm run dev
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
## File Structure
|
|
231
|
+
|
|
232
|
+
```
|
|
233
|
+
src/icons/
|
|
234
|
+
├── README.md # This file
|
|
235
|
+
├── sprite.svg # Generated sprite (2034+ icons)
|
|
236
|
+
├── icon-list.txt # Searchable list of all icon names
|
|
237
|
+
└── custom/ # Your custom icons
|
|
238
|
+
└── valiify-logo.svg
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
## Distribution
|
|
242
|
+
|
|
243
|
+
The icon sprite is included in the published package:
|
|
244
|
+
|
|
245
|
+
```json
|
|
246
|
+
{
|
|
247
|
+
"exports": {
|
|
248
|
+
"./icons/sprite.svg": "./src/icons/sprite.svg"
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
Consumers can import it:
|
|
254
|
+
```js
|
|
255
|
+
import spriteUrl from '@valiify/dashboard-ui/icons/sprite.svg';
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
## Tips & Best Practices
|
|
259
|
+
|
|
260
|
+
### Icon Sizing
|
|
261
|
+
- Use design token sizes: 16px (sm), 20px (md), 24px (lg), 32px (xl)
|
|
262
|
+
- Icons scale with font-size when using `width: 1em; height: 1em;`
|
|
263
|
+
- Maintain consistent sizes within a component
|
|
264
|
+
|
|
265
|
+
### Performance
|
|
266
|
+
- **Inline the sprite** for zero network requests (best for critical icons)
|
|
267
|
+
- **External sprite** is cacheable but requires one request
|
|
268
|
+
- Sprite is ~300KB with 2034 icons (gzips well)
|
|
269
|
+
|
|
270
|
+
### Naming Conventions
|
|
271
|
+
- **Lucide icons**: Use original name (`search`, `user`, `file-text`)
|
|
272
|
+
- **Custom icons**: Prefix with `custom-` (`custom-valiify-logo`)
|
|
273
|
+
- **Variants**: Use descriptive suffixes (`custom-icon-filled`, `custom-icon-outline`)
|
|
274
|
+
|
|
275
|
+
### Stroke Width
|
|
276
|
+
- Lucide default: `stroke-width: 2`
|
|
277
|
+
- Adjust per icon if needed: `<svg style="stroke-width: 1.5;">`
|
|
278
|
+
- Maintain consistency within the same UI context
|
|
279
|
+
|
|
280
|
+
## Updating Lucide Icons
|
|
281
|
+
|
|
282
|
+
To get the latest Lucide icons:
|
|
283
|
+
|
|
284
|
+
```bash
|
|
285
|
+
# Update lucide-static package
|
|
286
|
+
npm update lucide-static
|
|
287
|
+
|
|
288
|
+
# Rebuild sprite
|
|
289
|
+
npm run build:icons
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
Check release notes: https://github.com/lucide-icons/lucide/releases
|
|
293
|
+
|
|
294
|
+
## License
|
|
295
|
+
|
|
296
|
+
- **Lucide Icons**: ISC License (https://lucide.dev/license)
|
|
297
|
+
- **Custom Icons**: Valiify proprietary (add your license)
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg preserveAspectRatio="none" overflow="visible" style="display: block;" width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path id="Vector" d="M8.09009 8.00008C8.32519 7.33175 8.78924 6.76819 9.40004 6.40921C10.0108 6.05024 10.729 5.91902 11.4273 6.03879C12.1255 6.15857 12.7589 6.52161 13.2152 7.06361C13.6714 7.60561 13.9211 8.2916 13.9201 9.00008C13.9201 11.0001 10.9201 12.0001 10.9201 12.0001M11 16H11.01M21 11C21 16.5228 16.5228 21 11 21C5.47715 21 1 16.5228 1 11C1 5.47715 5.47715 1 11 1C16.5228 1 21 5.47715 21 11Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
2
|
+
<!-- Sample custom Valiify logo icon -->
|
|
3
|
+
<path d="M12 2L2 7l10 5 10-5-10-5z"/>
|
|
4
|
+
<path d="M2 17l10 5 10-5"/>
|
|
5
|
+
<path d="M2 12l10 5 10-5"/>
|
|
6
|
+
</svg>
|