canvas-ui-sdk 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/README.md +97 -0
- package/dist/index.d.ts +4810 -0
- package/dist/index.mjs +24105 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +95 -0
- package/styles/tokens.reference.css +283 -0
package/README.md
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# Canvas UI SDK
|
|
2
|
+
|
|
3
|
+
A comprehensive UI component library with design tokens for building beautiful interfaces.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install canvas-ui-sdk
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```tsx
|
|
14
|
+
import { Button, DashboardShell, DataTable } from 'canvas-ui-sdk';
|
|
15
|
+
|
|
16
|
+
export default function MyPage() {
|
|
17
|
+
return (
|
|
18
|
+
<DashboardShell>
|
|
19
|
+
<Button variant="primary">Click me</Button>
|
|
20
|
+
<DataTable data={myData} columns={myColumns} />
|
|
21
|
+
</DashboardShell>
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## CSS Variables
|
|
27
|
+
|
|
28
|
+
This SDK uses CSS custom properties (variables) for theming. Define these in your project's `globals.css`:
|
|
29
|
+
|
|
30
|
+
```css
|
|
31
|
+
:root {
|
|
32
|
+
/* Colors */
|
|
33
|
+
--canvas-primary: #2563eb;
|
|
34
|
+
--canvas-secondary: #64748b;
|
|
35
|
+
--canvas-background: #ffffff;
|
|
36
|
+
--canvas-foreground: #0f172a;
|
|
37
|
+
--canvas-border: #e2e8f0;
|
|
38
|
+
|
|
39
|
+
/* Typography */
|
|
40
|
+
--typo-font-primary: 'Inter', sans-serif;
|
|
41
|
+
--typo-base-size: 16px;
|
|
42
|
+
|
|
43
|
+
/* Spacing */
|
|
44
|
+
--spacing-xs: 4px;
|
|
45
|
+
--spacing-sm: 8px;
|
|
46
|
+
--spacing-md: 16px;
|
|
47
|
+
--spacing-lg: 24px;
|
|
48
|
+
--spacing-xl: 32px;
|
|
49
|
+
|
|
50
|
+
/* Border Radius */
|
|
51
|
+
--radius-sm: 4px;
|
|
52
|
+
--radius-md: 8px;
|
|
53
|
+
--radius-lg: 12px;
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
See `styles/tokens.reference.css` for a complete list of available CSS variables.
|
|
58
|
+
|
|
59
|
+
## Components
|
|
60
|
+
|
|
61
|
+
### UI Components
|
|
62
|
+
- Button, Input, Select, Checkbox, Switch
|
|
63
|
+
- Dialog, Popover, Dropdown
|
|
64
|
+
- Avatar, Badge, Card
|
|
65
|
+
- And more...
|
|
66
|
+
|
|
67
|
+
### Blocks
|
|
68
|
+
- DataTable, ChatBubble, ProfileCard
|
|
69
|
+
- Marketing sections (Hero, Testimonials, CTA)
|
|
70
|
+
- Pricing components
|
|
71
|
+
- Graph and metric tiles
|
|
72
|
+
|
|
73
|
+
### Layouts
|
|
74
|
+
- DashboardShell
|
|
75
|
+
- IconSidebarShell
|
|
76
|
+
- DoubleSidebarShell
|
|
77
|
+
- StandardPageShell
|
|
78
|
+
- AccountSettingsShell
|
|
79
|
+
- MultistepShell
|
|
80
|
+
- MobileMenuShell
|
|
81
|
+
|
|
82
|
+
## Development
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
# Install dependencies
|
|
86
|
+
npm install
|
|
87
|
+
|
|
88
|
+
# Build the package
|
|
89
|
+
npm run build
|
|
90
|
+
|
|
91
|
+
# Watch mode for development
|
|
92
|
+
npm run dev
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## License
|
|
96
|
+
|
|
97
|
+
MIT
|