@kiranshub/dashboard-ui 0.0.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/README.md
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# particle-ui
|
|
2
|
+
|
|
3
|
+
Angular UI component library featuring a dashboard layout with sidebar navigation, buttons, icons, and more.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install particle-ui
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Components
|
|
12
|
+
|
|
13
|
+
### Dashboard
|
|
14
|
+
|
|
15
|
+
A full dashboard layout with collapsible sidebar, theme toggle, and user dropdown menu.
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import { DashboardComponent, type NavListItem } from 'particle-ui';
|
|
19
|
+
|
|
20
|
+
@Component({
|
|
21
|
+
imports: [DashboardComponent],
|
|
22
|
+
...
|
|
23
|
+
})
|
|
24
|
+
export class AppComponent {
|
|
25
|
+
readonly navItems: readonly NavListItem[] = [
|
|
26
|
+
{ label: 'Home', icon: 'home', route: '/home' },
|
|
27
|
+
{ label: 'Analytics', icon: 'chart-bar', route: '/analytics' },
|
|
28
|
+
{ label: 'Settings', icon: 'cog', route: '/settings' },
|
|
29
|
+
];
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
```html
|
|
34
|
+
<particle-dashboard [appTitle]="'My App'" [navItems]="navItems" [userInitials]="'JD'">
|
|
35
|
+
<!-- Your content here -->
|
|
36
|
+
<h1>Welcome</h1>
|
|
37
|
+
</particle-dashboard>
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Inputs
|
|
41
|
+
|
|
42
|
+
| Input | Type | Default | Description |
|
|
43
|
+
| --------------- | ------------------------ | ------------- | -------------------------- |
|
|
44
|
+
| `appTitle` | `string` | `'Dashboard'` | Title displayed in sidebar |
|
|
45
|
+
| `navItems` | `readonly NavListItem[]` | `[]` | Navigation items |
|
|
46
|
+
| `userInitials` | `string` | `''` | User initials to display |
|
|
47
|
+
| `userMenuItems` | `readonly NavListItem[]` | Default menu | Dropdown menu items |
|
|
48
|
+
|
|
49
|
+
### NavListItem
|
|
50
|
+
|
|
51
|
+
```typescript
|
|
52
|
+
interface NavListItem {
|
|
53
|
+
label: string;
|
|
54
|
+
icon: IconName;
|
|
55
|
+
route?: string;
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Icon Names
|
|
60
|
+
|
|
61
|
+
Available icons: `menu`, `chevron-left`, `chevron-right`, `xmark`, `home`, `chart-bar`, `users`, `cog`, `sun`, `moon`, `bell`, `folder`, `shopping-cart`, `mail`, `information-circle`, `user`, `logout`
|
|
62
|
+
|
|
63
|
+
## Button
|
|
64
|
+
|
|
65
|
+
```typescript
|
|
66
|
+
import { ParticleButton, type ButtonVariant, type ButtonSize } from 'particle-ui';
|
|
67
|
+
|
|
68
|
+
@Component({
|
|
69
|
+
imports: [ParticleButton],
|
|
70
|
+
...
|
|
71
|
+
})
|
|
72
|
+
export class AppComponent {
|
|
73
|
+
readonly variant: ButtonVariant = 'primary';
|
|
74
|
+
readonly size: ButtonSize = 'medium';
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
```html
|
|
79
|
+
<particle-button [variant]="variant" [size]="size"> Click me </particle-button>
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## Icon
|
|
83
|
+
|
|
84
|
+
```typescript
|
|
85
|
+
import { ParticleIcon, type IconName } from 'particle-ui';
|
|
86
|
+
|
|
87
|
+
@Component({
|
|
88
|
+
imports: [ParticleIcon],
|
|
89
|
+
...
|
|
90
|
+
})
|
|
91
|
+
export class AppComponent {
|
|
92
|
+
readonly icon: IconName = 'home';
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
```html
|
|
97
|
+
<particle-icon [name]="icon" size="medium" />
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## License
|
|
101
|
+
|
|
102
|
+
MIT
|