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/package.json
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "canvas-ui-sdk",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "A comprehensive UI component library with design tokens for building beautiful interfaces",
|
|
6
|
+
"main": "./dist/index.mjs",
|
|
7
|
+
"module": "./dist/index.mjs",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/index.mjs",
|
|
13
|
+
"default": "./dist/index.mjs"
|
|
14
|
+
},
|
|
15
|
+
"./styles": "./styles/tokens.reference.css"
|
|
16
|
+
},
|
|
17
|
+
"sideEffects": false,
|
|
18
|
+
"files": [
|
|
19
|
+
"dist",
|
|
20
|
+
"styles"
|
|
21
|
+
],
|
|
22
|
+
"scripts": {
|
|
23
|
+
"build": "tsup && node -e \"const fs = require('fs'); const content = fs.readFileSync('dist/index.mjs', 'utf8'); fs.writeFileSync('dist/index.mjs', '\\\"use client\\\";\\n' + content);\"",
|
|
24
|
+
"dev": "tsup --watch",
|
|
25
|
+
"lint": "eslint src/",
|
|
26
|
+
"typecheck": "tsc --noEmit",
|
|
27
|
+
"prepublishOnly": "npm run build",
|
|
28
|
+
"docs:dev": "cd docs && npm run dev",
|
|
29
|
+
"docs:build": "cd docs && npm run build",
|
|
30
|
+
"docs:install": "cd docs && npm install"
|
|
31
|
+
},
|
|
32
|
+
"peerDependencies": {
|
|
33
|
+
"react": ">=18.0.0",
|
|
34
|
+
"react-dom": ">=18.0.0"
|
|
35
|
+
},
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"@dnd-kit/core": "^6.3.1",
|
|
38
|
+
"@dnd-kit/utilities": "^3.2.2",
|
|
39
|
+
"@phosphor-icons/react": "^2.1.10",
|
|
40
|
+
"@radix-ui/react-avatar": "^1.1.11",
|
|
41
|
+
"@radix-ui/react-checkbox": "^1.3.3",
|
|
42
|
+
"@radix-ui/react-dialog": "^1.1.15",
|
|
43
|
+
"@radix-ui/react-dropdown-menu": "^2.1.16",
|
|
44
|
+
"@radix-ui/react-label": "^2.1.8",
|
|
45
|
+
"@radix-ui/react-popover": "^1.1.15",
|
|
46
|
+
"@radix-ui/react-radio-group": "^1.3.8",
|
|
47
|
+
"@radix-ui/react-scroll-area": "^1.2.10",
|
|
48
|
+
"@radix-ui/react-select": "^2.2.6",
|
|
49
|
+
"@radix-ui/react-separator": "^1.1.8",
|
|
50
|
+
"@radix-ui/react-slider": "^1.3.6",
|
|
51
|
+
"@radix-ui/react-slot": "^1.2.4",
|
|
52
|
+
"@radix-ui/react-switch": "^1.2.6",
|
|
53
|
+
"@radix-ui/react-tabs": "^1.1.13",
|
|
54
|
+
"@radix-ui/react-tooltip": "^1.2.8",
|
|
55
|
+
"@radix-ui/react-visually-hidden": "^1.2.4",
|
|
56
|
+
"@tiptap/extension-image": "^3.14.0",
|
|
57
|
+
"@tiptap/extension-link": "^3.14.0",
|
|
58
|
+
"@tiptap/extension-placeholder": "^3.14.0",
|
|
59
|
+
"@tiptap/pm": "^3.14.0",
|
|
60
|
+
"@tiptap/react": "^3.14.0",
|
|
61
|
+
"@tiptap/starter-kit": "^3.14.0",
|
|
62
|
+
"chart.js": "^4.5.1",
|
|
63
|
+
"class-variance-authority": "^0.7.1",
|
|
64
|
+
"clsx": "^2.1.1",
|
|
65
|
+
"date-fns": "^4.1.0",
|
|
66
|
+
"lucide-react": "^0.562.0",
|
|
67
|
+
"react-chartjs-2": "^5.3.1",
|
|
68
|
+
"react-day-picker": "^9.13.0",
|
|
69
|
+
"react-zoom-pan-pinch": "^3.7.0",
|
|
70
|
+
"reactflow": "^11.11.4",
|
|
71
|
+
"sonner": "^2.0.7",
|
|
72
|
+
"tailwind-merge": "^3.4.0"
|
|
73
|
+
},
|
|
74
|
+
"devDependencies": {
|
|
75
|
+
"@types/node": "^20",
|
|
76
|
+
"@types/react": "^19",
|
|
77
|
+
"@types/react-dom": "^19",
|
|
78
|
+
"eslint": "^9",
|
|
79
|
+
"tsup": "^8.0.0",
|
|
80
|
+
"typescript": "^5"
|
|
81
|
+
},
|
|
82
|
+
"keywords": [
|
|
83
|
+
"react",
|
|
84
|
+
"components",
|
|
85
|
+
"ui",
|
|
86
|
+
"design-system",
|
|
87
|
+
"tailwind",
|
|
88
|
+
"radix"
|
|
89
|
+
],
|
|
90
|
+
"license": "MIT",
|
|
91
|
+
"repository": {
|
|
92
|
+
"type": "git",
|
|
93
|
+
"url": "git+https://github.com/your-org/canvas-ui-sdk.git"
|
|
94
|
+
}
|
|
95
|
+
}
|
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Canvas UI SDK - CSS Variable Reference
|
|
3
|
+
*
|
|
4
|
+
* This file documents all CSS variables used by the SDK components.
|
|
5
|
+
* Copy these to your project's globals.css and customize as needed.
|
|
6
|
+
*
|
|
7
|
+
* Components read these variables at runtime, so changes are instant.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
:root {
|
|
11
|
+
/* ============================================
|
|
12
|
+
* COLOR TOKENS
|
|
13
|
+
* ============================================ */
|
|
14
|
+
|
|
15
|
+
/* Brand Colors */
|
|
16
|
+
--canvas-primary: #1165ef;
|
|
17
|
+
--canvas-primary-dark: #093378;
|
|
18
|
+
--canvas-primary-foreground: #ffffff;
|
|
19
|
+
--canvas-flair-bg: #093378;
|
|
20
|
+
--canvas-destructive: #ef4444;
|
|
21
|
+
--canvas-transparent: transparent;
|
|
22
|
+
|
|
23
|
+
/* Text Colors */
|
|
24
|
+
--canvas-text: #0d121c;
|
|
25
|
+
--canvas-text-muted: #4b5565;
|
|
26
|
+
--canvas-text-placeholder: #6c7684;
|
|
27
|
+
|
|
28
|
+
/* Surface Colors */
|
|
29
|
+
--canvas-background: #ffffff;
|
|
30
|
+
--canvas-surface: #f8fafc;
|
|
31
|
+
--canvas-surface-hover: #eef1f5;
|
|
32
|
+
--canvas-surface-brand: #ebf2ff;
|
|
33
|
+
--canvas-outline-bg: #ffffff;
|
|
34
|
+
|
|
35
|
+
/* Border Colors */
|
|
36
|
+
--canvas-border: #e9eef3;
|
|
37
|
+
--canvas-border-input: #d1d9e0;
|
|
38
|
+
--canvas-border-input-focus: #1165ef;
|
|
39
|
+
--canvas-border-input-invalid: #ef4444;
|
|
40
|
+
--canvas-border-disabled: #e3e8ef;
|
|
41
|
+
|
|
42
|
+
/* Light Sidebar */
|
|
43
|
+
--canvas-sidebar-light-bg: #ffffff;
|
|
44
|
+
--canvas-sidebar-light-active-bg: #ebf2ff;
|
|
45
|
+
--canvas-sidebar-light-active-text: #1165ef;
|
|
46
|
+
--canvas-sidebar-light-text: #4b5565;
|
|
47
|
+
--canvas-sidebar-light-border: #e9eef3;
|
|
48
|
+
|
|
49
|
+
/* Dark Sidebar */
|
|
50
|
+
--canvas-sidebar-dark-bg: #152135;
|
|
51
|
+
--canvas-sidebar-dark-active-bg: #091222;
|
|
52
|
+
--canvas-sidebar-dark-active-text: #ffffff;
|
|
53
|
+
--canvas-sidebar-dark-text: #7e92b0;
|
|
54
|
+
--canvas-sidebar-dark-border: #1e3a5f;
|
|
55
|
+
|
|
56
|
+
/* ============================================
|
|
57
|
+
* TYPOGRAPHY TOKENS
|
|
58
|
+
* ============================================ */
|
|
59
|
+
|
|
60
|
+
/* Global Font */
|
|
61
|
+
--typo-global-font: "Inter";
|
|
62
|
+
|
|
63
|
+
/* H1 - Hero Headlines */
|
|
64
|
+
--typo-h1-font: "";
|
|
65
|
+
--typo-h1-size: 72px;
|
|
66
|
+
--typo-h1-size-mobile: 48px;
|
|
67
|
+
--typo-h1-weight: 700;
|
|
68
|
+
--typo-h1-spacing: -0.02em;
|
|
69
|
+
--typo-h1-line-height: 1.1;
|
|
70
|
+
--typo-h1-color: var(--canvas-text);
|
|
71
|
+
--typo-h1-color-muted: var(--canvas-text-muted);
|
|
72
|
+
|
|
73
|
+
/* H2 - Major Section Headers */
|
|
74
|
+
--typo-h2-font: "";
|
|
75
|
+
--typo-h2-size: 60px;
|
|
76
|
+
--typo-h2-size-mobile: 40px;
|
|
77
|
+
--typo-h2-weight: 700;
|
|
78
|
+
--typo-h2-spacing: -0.02em;
|
|
79
|
+
--typo-h2-line-height: 1.15;
|
|
80
|
+
--typo-h2-color: var(--canvas-text);
|
|
81
|
+
--typo-h2-color-muted: var(--canvas-text-muted);
|
|
82
|
+
|
|
83
|
+
/* H3 - Banner Titles */
|
|
84
|
+
--typo-h3-font: "";
|
|
85
|
+
--typo-h3-size: 48px;
|
|
86
|
+
--typo-h3-size-mobile: 32px;
|
|
87
|
+
--typo-h3-weight: 700;
|
|
88
|
+
--typo-h3-spacing: -0.01em;
|
|
89
|
+
--typo-h3-line-height: 1.25;
|
|
90
|
+
--typo-h3-color: var(--canvas-text);
|
|
91
|
+
--typo-h3-color-muted: var(--canvas-text-muted);
|
|
92
|
+
|
|
93
|
+
/* H4 - Page Titles */
|
|
94
|
+
--typo-h4-font: "";
|
|
95
|
+
--typo-h4-size: 36px;
|
|
96
|
+
--typo-h4-size-mobile: 28px;
|
|
97
|
+
--typo-h4-weight: 600;
|
|
98
|
+
--typo-h4-spacing: -0.01em;
|
|
99
|
+
--typo-h4-line-height: 1.25;
|
|
100
|
+
--typo-h4-color: var(--canvas-text);
|
|
101
|
+
--typo-h4-color-muted: var(--canvas-text-muted);
|
|
102
|
+
|
|
103
|
+
/* H5 - Large Section Headers */
|
|
104
|
+
--typo-h5-font: "";
|
|
105
|
+
--typo-h5-size: 30px;
|
|
106
|
+
--typo-h5-size-mobile: 24px;
|
|
107
|
+
--typo-h5-weight: 600;
|
|
108
|
+
--typo-h5-spacing: 0em;
|
|
109
|
+
--typo-h5-line-height: 1.3;
|
|
110
|
+
--typo-h5-color: var(--canvas-text);
|
|
111
|
+
--typo-h5-color-muted: var(--canvas-text-muted);
|
|
112
|
+
|
|
113
|
+
/* H6 - Section Titles */
|
|
114
|
+
--typo-h6-font: "";
|
|
115
|
+
--typo-h6-size: 24px;
|
|
116
|
+
--typo-h6-size-mobile: 20px;
|
|
117
|
+
--typo-h6-weight: 600;
|
|
118
|
+
--typo-h6-spacing: 0em;
|
|
119
|
+
--typo-h6-line-height: 1.25;
|
|
120
|
+
--typo-h6-color: var(--canvas-text);
|
|
121
|
+
--typo-h6-color-muted: var(--canvas-text-muted);
|
|
122
|
+
|
|
123
|
+
/* Body XL - Lead Paragraphs */
|
|
124
|
+
--typo-body-xl-font: "";
|
|
125
|
+
--typo-body-xl-size: 20px;
|
|
126
|
+
--typo-body-xl-size-mobile: 18px;
|
|
127
|
+
--typo-body-xl-weight: 400;
|
|
128
|
+
--typo-body-xl-spacing: 0em;
|
|
129
|
+
--typo-body-xl-line-height: 1.5;
|
|
130
|
+
--typo-body-xl-color: var(--canvas-text);
|
|
131
|
+
--typo-body-xl-color-muted: var(--canvas-text-muted);
|
|
132
|
+
|
|
133
|
+
/* Body L - Descriptions */
|
|
134
|
+
--typo-body-l-font: "";
|
|
135
|
+
--typo-body-l-size: 18px;
|
|
136
|
+
--typo-body-l-size-mobile: 16px;
|
|
137
|
+
--typo-body-l-weight: 400;
|
|
138
|
+
--typo-body-l-spacing: 0em;
|
|
139
|
+
--typo-body-l-line-height: 1.55;
|
|
140
|
+
--typo-body-l-color: var(--canvas-text);
|
|
141
|
+
--typo-body-l-color-muted: var(--canvas-text-muted);
|
|
142
|
+
|
|
143
|
+
/* Body M - Standard Body Text */
|
|
144
|
+
--typo-body-m-font: "";
|
|
145
|
+
--typo-body-m-size: 16px;
|
|
146
|
+
--typo-body-m-size-mobile: 15px;
|
|
147
|
+
--typo-body-m-weight: 400;
|
|
148
|
+
--typo-body-m-spacing: 0em;
|
|
149
|
+
--typo-body-m-line-height: 1.5;
|
|
150
|
+
--typo-body-m-color: var(--canvas-text);
|
|
151
|
+
--typo-body-m-color-muted: var(--canvas-text-muted);
|
|
152
|
+
|
|
153
|
+
/* Body S - Captions, Metadata */
|
|
154
|
+
--typo-body-s-font: "";
|
|
155
|
+
--typo-body-s-size: 14px;
|
|
156
|
+
--typo-body-s-size-mobile: 13px;
|
|
157
|
+
--typo-body-s-weight: 400;
|
|
158
|
+
--typo-body-s-spacing: 0em;
|
|
159
|
+
--typo-body-s-line-height: 1.4;
|
|
160
|
+
--typo-body-s-color: var(--canvas-text);
|
|
161
|
+
--typo-body-s-color-muted: var(--canvas-text-muted);
|
|
162
|
+
|
|
163
|
+
/* Body XS - Fine Print, Labels */
|
|
164
|
+
--typo-body-xs-font: "";
|
|
165
|
+
--typo-body-xs-size: 12px;
|
|
166
|
+
--typo-body-xs-size-mobile: 11px;
|
|
167
|
+
--typo-body-xs-weight: 400;
|
|
168
|
+
--typo-body-xs-spacing: 0em;
|
|
169
|
+
--typo-body-xs-line-height: 1.4;
|
|
170
|
+
--typo-body-xs-color: var(--canvas-text);
|
|
171
|
+
--typo-body-xs-color-muted: var(--canvas-text-muted);
|
|
172
|
+
|
|
173
|
+
/* UI Typography */
|
|
174
|
+
--typo-menu-label-font: "";
|
|
175
|
+
--typo-menu-label-size: 18px;
|
|
176
|
+
--typo-sidebar-label-font: "";
|
|
177
|
+
--typo-sidebar-label-size: 12px;
|
|
178
|
+
--typo-sidebar-tab-font: "";
|
|
179
|
+
--typo-sidebar-tab-size: 14px;
|
|
180
|
+
--typo-sidebar-subtab-font: "";
|
|
181
|
+
--typo-sidebar-subtab-size: 14px;
|
|
182
|
+
--typo-header-font: "";
|
|
183
|
+
--typo-header-size: 14px;
|
|
184
|
+
--typo-input-label-font: "";
|
|
185
|
+
--typo-input-label-size: 14px;
|
|
186
|
+
--typo-button-font: "";
|
|
187
|
+
--typo-button-size: 14px;
|
|
188
|
+
|
|
189
|
+
/* ============================================
|
|
190
|
+
* BUTTON SIZE TOKENS
|
|
191
|
+
* ============================================ */
|
|
192
|
+
|
|
193
|
+
/* Mini */
|
|
194
|
+
--btn-mini-height: 28px;
|
|
195
|
+
--btn-mini-font-size: 12px;
|
|
196
|
+
--btn-mini-px: 10px;
|
|
197
|
+
--btn-mini-radius: 4px;
|
|
198
|
+
|
|
199
|
+
/* Small */
|
|
200
|
+
--btn-small-height: 32px;
|
|
201
|
+
--btn-small-font-size: 14px;
|
|
202
|
+
--btn-small-px: 12px;
|
|
203
|
+
--btn-small-radius: 6px;
|
|
204
|
+
|
|
205
|
+
/* Standard */
|
|
206
|
+
--btn-standard-height: 40px;
|
|
207
|
+
--btn-standard-font-size: 14px;
|
|
208
|
+
--btn-standard-px: 16px;
|
|
209
|
+
--btn-standard-radius: 8px;
|
|
210
|
+
|
|
211
|
+
/* Large */
|
|
212
|
+
--btn-large-height: 48px;
|
|
213
|
+
--btn-large-font-size: 16px;
|
|
214
|
+
--btn-large-px: 20px;
|
|
215
|
+
--btn-large-radius: 10px;
|
|
216
|
+
|
|
217
|
+
/* ============================================
|
|
218
|
+
* BUTTON COLOR TOKENS
|
|
219
|
+
* ============================================ */
|
|
220
|
+
|
|
221
|
+
/* Primary */
|
|
222
|
+
--btn-primary-bg: var(--canvas-primary);
|
|
223
|
+
--btn-primary-text: var(--canvas-primary-foreground);
|
|
224
|
+
--btn-primary-border: var(--canvas-primary);
|
|
225
|
+
--btn-primary-bg-hover: var(--canvas-primary-dark);
|
|
226
|
+
--btn-primary-text-hover: var(--canvas-primary-foreground);
|
|
227
|
+
--btn-primary-border-hover: var(--canvas-primary-dark);
|
|
228
|
+
|
|
229
|
+
/* Primary Outline */
|
|
230
|
+
--btn-primary-outline-bg: var(--canvas-outline-bg);
|
|
231
|
+
--btn-primary-outline-text: var(--canvas-primary);
|
|
232
|
+
--btn-primary-outline-border: var(--canvas-primary);
|
|
233
|
+
--btn-primary-outline-bg-hover: var(--canvas-surface-brand);
|
|
234
|
+
--btn-primary-outline-text-hover: var(--canvas-primary);
|
|
235
|
+
--btn-primary-outline-border-hover: var(--canvas-primary);
|
|
236
|
+
|
|
237
|
+
/* Neutral */
|
|
238
|
+
--btn-neutral-bg: var(--canvas-background);
|
|
239
|
+
--btn-neutral-text: var(--canvas-text);
|
|
240
|
+
--btn-neutral-border: var(--canvas-border-input);
|
|
241
|
+
--btn-neutral-bg-hover: var(--canvas-surface-brand);
|
|
242
|
+
--btn-neutral-text-hover: var(--canvas-text);
|
|
243
|
+
--btn-neutral-border-hover: var(--canvas-border-input);
|
|
244
|
+
|
|
245
|
+
/* Disabled */
|
|
246
|
+
--btn-disabled-bg: var(--canvas-background);
|
|
247
|
+
--btn-disabled-text: var(--canvas-text-muted);
|
|
248
|
+
--btn-disabled-border: var(--canvas-border);
|
|
249
|
+
|
|
250
|
+
/* Delete */
|
|
251
|
+
--btn-delete-bg: var(--canvas-destructive);
|
|
252
|
+
--btn-delete-text: var(--canvas-primary-foreground);
|
|
253
|
+
--btn-delete-border: var(--canvas-destructive);
|
|
254
|
+
--btn-delete-bg-hover: #dc2626;
|
|
255
|
+
|
|
256
|
+
/* ============================================
|
|
257
|
+
* INPUT SIZE TOKENS
|
|
258
|
+
* ============================================ */
|
|
259
|
+
|
|
260
|
+
/* Small */
|
|
261
|
+
--input-small-height: 30px;
|
|
262
|
+
--input-small-font-size: 13px;
|
|
263
|
+
--input-small-px: 10px;
|
|
264
|
+
--input-small-radius: 6px;
|
|
265
|
+
|
|
266
|
+
/* Standard */
|
|
267
|
+
--input-standard-height: 40px;
|
|
268
|
+
--input-standard-font-size: 14px;
|
|
269
|
+
--input-standard-px: 14px;
|
|
270
|
+
--input-standard-radius: 8px;
|
|
271
|
+
|
|
272
|
+
/* Large */
|
|
273
|
+
--input-large-height: 64px;
|
|
274
|
+
--input-large-font-size: 18px;
|
|
275
|
+
--input-large-px: 20px;
|
|
276
|
+
--input-large-radius: 12px;
|
|
277
|
+
|
|
278
|
+
/* Expandable */
|
|
279
|
+
--input-expandable-height: 80px;
|
|
280
|
+
--input-expandable-font-size: 14px;
|
|
281
|
+
--input-expandable-px: 14px;
|
|
282
|
+
--input-expandable-radius: 8px;
|
|
283
|
+
}
|