@vialiq/flux-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 +409 -0
- package/_index.scss +13 -0
- package/components/_button.scss +25 -0
- package/components/_index.scss +3 -0
- package/flux-ui.css +1 -0
- package/flux-ui.css.map +1 -0
- package/flux-ui.scss +15 -0
- package/index.d.ts +11 -0
- package/index.js +205 -0
- package/package.json +37 -0
- package/styles/_index.scss +7 -0
- package/styles/_layout.scss +223 -0
- package/styles/_reset.scss +192 -0
- package/styles/_root.scss +112 -0
- package/styles/_theme.scss +175 -0
- package/styles/_utilities.scss +434 -0
- package/styles/_variables.scss +323 -0
- package/styles/index.d.ts +26 -0
- package/styles/index.js +10 -0
- package/tokens/index.d.ts +218 -0
- package/tokens/index.js +205 -0
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Design Tokens: SCSS Bridge Variables
|
|
3
|
+
* =====================================
|
|
4
|
+
* Pattern: $token: var(--vi-token, <compile-time-fallback>);
|
|
5
|
+
*
|
|
6
|
+
* SCSS variables emit var() at CSS level so runtime theming works.
|
|
7
|
+
* The hardcoded fallback is used by pre-processors, SSR, and unit tests.
|
|
8
|
+
*
|
|
9
|
+
* CSS custom property definitions (:root, scoped themes) live in the theming
|
|
10
|
+
* layer — this file is intentionally theme-agnostic.
|
|
11
|
+
*
|
|
12
|
+
* NOTE: Breakpoints and z-index stay as raw SCSS values — CSS custom properties
|
|
13
|
+
* are not supported inside @media queries or as integer math operands.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
// Declare CSS layer order up-front so cascade is predictable regardless of
|
|
17
|
+
// import order. Between layers, later ones win. Within a layer, normal selector
|
|
18
|
+
// specificity still applies. Order: reset (lowest) → components → utilities (highest)
|
|
19
|
+
@layer reset, components, utilities;
|
|
20
|
+
|
|
21
|
+
// ============================================================================
|
|
22
|
+
// SCSS BRIDGE VARIABLES
|
|
23
|
+
// ============================================================================
|
|
24
|
+
|
|
25
|
+
// -- Palette: Grey (Tailwind gray — UI chrome, text, borders) ---------------
|
|
26
|
+
|
|
27
|
+
$color-grey-100: var(--vi-color-grey-100, #f3f4f6);
|
|
28
|
+
$color-grey-200: var(--vi-color-grey-200, #e5e7eb);
|
|
29
|
+
$color-grey-300: var(--vi-color-grey-300, #d1d5db);
|
|
30
|
+
$color-grey-400: var(--vi-color-grey-400, #9ca3af);
|
|
31
|
+
$color-grey-500: var(--vi-color-grey-500, #6b7280);
|
|
32
|
+
$color-grey-600: var(--vi-color-grey-600, #4b5563);
|
|
33
|
+
$color-grey-700: var(--vi-color-grey-700, #374151);
|
|
34
|
+
$color-grey-800: var(--vi-color-grey-800, #1f2937);
|
|
35
|
+
$color-grey-900: var(--vi-color-grey-900, #111827);
|
|
36
|
+
|
|
37
|
+
// -- Palette: Red (Tailwind red) --------------------------------------------
|
|
38
|
+
|
|
39
|
+
$color-red-100: var(--vi-color-red-100, #fee2e2);
|
|
40
|
+
$color-red-200: var(--vi-color-red-200, #fecaca);
|
|
41
|
+
$color-red-300: var(--vi-color-red-300, #fca5a5);
|
|
42
|
+
$color-red-400: var(--vi-color-red-400, #f87171);
|
|
43
|
+
$color-red-500: var(--vi-color-red-500, #ef4444);
|
|
44
|
+
$color-red-600: var(--vi-color-red-600, #dc2626);
|
|
45
|
+
$color-red-700: var(--vi-color-red-700, #b91c1c);
|
|
46
|
+
$color-red-800: var(--vi-color-red-800, #991b1b);
|
|
47
|
+
$color-red-900: var(--vi-color-red-900, #7f1d1d);
|
|
48
|
+
|
|
49
|
+
// -- Palette: Yellow (Tailwind yellow) --------------------------------------
|
|
50
|
+
|
|
51
|
+
$color-yellow-100: var(--vi-color-yellow-100, #fef9c3);
|
|
52
|
+
$color-yellow-200: var(--vi-color-yellow-200, #fef08a);
|
|
53
|
+
$color-yellow-300: var(--vi-color-yellow-300, #fde047);
|
|
54
|
+
$color-yellow-400: var(--vi-color-yellow-400, #facc15);
|
|
55
|
+
$color-yellow-500: var(--vi-color-yellow-500, #eab308);
|
|
56
|
+
$color-yellow-600: var(--vi-color-yellow-600, #ca8a04);
|
|
57
|
+
$color-yellow-700: var(--vi-color-yellow-700, #a16207);
|
|
58
|
+
$color-yellow-800: var(--vi-color-yellow-800, #854d0e);
|
|
59
|
+
$color-yellow-900: var(--vi-color-yellow-900, #713f12);
|
|
60
|
+
|
|
61
|
+
// -- Palette: Green (Tailwind green) ----------------------------------------
|
|
62
|
+
|
|
63
|
+
$color-green-100: var(--vi-color-green-100, #dcfce7);
|
|
64
|
+
$color-green-200: var(--vi-color-green-200, #bbf7d0);
|
|
65
|
+
$color-green-300: var(--vi-color-green-300, #86efac);
|
|
66
|
+
$color-green-400: var(--vi-color-green-400, #4ade80);
|
|
67
|
+
$color-green-500: var(--vi-color-green-500, #22c55e);
|
|
68
|
+
$color-green-600: var(--vi-color-green-600, #16a34a);
|
|
69
|
+
$color-green-700: var(--vi-color-green-700, #15803d);
|
|
70
|
+
$color-green-800: var(--vi-color-green-800, #166534);
|
|
71
|
+
$color-green-900: var(--vi-color-green-900, #14532d);
|
|
72
|
+
|
|
73
|
+
// -- Palette: Blue (Tailwind blue) ------------------------------------------
|
|
74
|
+
|
|
75
|
+
$color-blue-100: var(--vi-color-blue-100, #dbeafe);
|
|
76
|
+
$color-blue-200: var(--vi-color-blue-200, #bfdbfe);
|
|
77
|
+
$color-blue-300: var(--vi-color-blue-300, #93c5fd);
|
|
78
|
+
$color-blue-400: var(--vi-color-blue-400, #60a5fa);
|
|
79
|
+
$color-blue-500: var(--vi-color-blue-500, #3b82f6);
|
|
80
|
+
$color-blue-600: var(--vi-color-blue-600, #2563eb);
|
|
81
|
+
$color-blue-700: var(--vi-color-blue-700, #1d4ed8);
|
|
82
|
+
$color-blue-800: var(--vi-color-blue-800, #1e40af);
|
|
83
|
+
$color-blue-900: var(--vi-color-blue-900, #1e3a8a);
|
|
84
|
+
|
|
85
|
+
// -- Palette: Purple (Tailwind purple) --------------------------------------
|
|
86
|
+
|
|
87
|
+
$color-purple-100: var(--vi-color-purple-100, #f3e8ff);
|
|
88
|
+
$color-purple-200: var(--vi-color-purple-200, #e9d5ff);
|
|
89
|
+
$color-purple-300: var(--vi-color-purple-300, #d8b4fe);
|
|
90
|
+
$color-purple-400: var(--vi-color-purple-400, #c084fc);
|
|
91
|
+
$color-purple-500: var(--vi-color-purple-500, #a855f7);
|
|
92
|
+
$color-purple-600: var(--vi-color-purple-600, #9333ea);
|
|
93
|
+
$color-purple-700: var(--vi-color-purple-700, #7e22ce);
|
|
94
|
+
$color-purple-800: var(--vi-color-purple-800, #6b21a8);
|
|
95
|
+
$color-purple-900: var(--vi-color-purple-900, #581c87);
|
|
96
|
+
|
|
97
|
+
// -- Semantic colors (brand + status) ----------------------------------------
|
|
98
|
+
// These map named design intents onto palette values.
|
|
99
|
+
|
|
100
|
+
$color-primary: var(--vi-color-primary, #0066cc);
|
|
101
|
+
$color-secondary: var(--vi-color-secondary, #f0f4f8);
|
|
102
|
+
$color-success: var(--vi-color-success, #22c55e); // green-500
|
|
103
|
+
$color-warning: var(--vi-color-warning, #eab308); // yellow-500
|
|
104
|
+
$color-error: var(--vi-color-error, #ef4444); // red-500
|
|
105
|
+
$color-info: var(--vi-color-info, #3b82f6); // blue-500
|
|
106
|
+
|
|
107
|
+
// -- Functional colors -------------------------------------------------------
|
|
108
|
+
|
|
109
|
+
$color-background: var(--vi-color-background, #ffffff);
|
|
110
|
+
$color-foreground: var(--vi-color-foreground, #111827); // grey-900
|
|
111
|
+
$color-border: var(--vi-color-border, #e5e7eb); // grey-200
|
|
112
|
+
|
|
113
|
+
// -- Primitive: Spacing ------------------------------------------------------
|
|
114
|
+
|
|
115
|
+
$spacing-unit: var(--vi-spacing-unit, 8px);
|
|
116
|
+
$spacing-xs: var(--vi-spacing-xs, 8px);
|
|
117
|
+
$spacing-sm: var(--vi-spacing-sm, 16px);
|
|
118
|
+
$spacing-md: var(--vi-spacing-md, 24px);
|
|
119
|
+
$spacing-lg: var(--vi-spacing-lg, 32px);
|
|
120
|
+
$spacing-xl: var(--vi-spacing-xl, 40px);
|
|
121
|
+
$spacing-2xl: var(--vi-spacing-2xl, 48px);
|
|
122
|
+
$spacing-3xl: var(--vi-spacing-3xl, 56px);
|
|
123
|
+
|
|
124
|
+
// -- Primitive: Typography ---------------------------------------------------
|
|
125
|
+
|
|
126
|
+
$font-family-base: var(--vi-font-family-base, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
|
|
127
|
+
$font-family-mono: var(--vi-font-family-mono, 'Menlo', 'Monaco', 'Courier New', monospace);
|
|
128
|
+
|
|
129
|
+
$font-size-xs: var(--vi-font-size-xs, 12px);
|
|
130
|
+
$font-size-sm: var(--vi-font-size-sm, 14px);
|
|
131
|
+
$font-size-base: var(--vi-font-size-base, 16px);
|
|
132
|
+
$font-size-lg: var(--vi-font-size-lg, 18px);
|
|
133
|
+
$font-size-xl: var(--vi-font-size-xl, 20px);
|
|
134
|
+
$font-size-2xl: var(--vi-font-size-2xl, 24px);
|
|
135
|
+
$font-size-3xl: var(--vi-font-size-3xl, 30px);
|
|
136
|
+
|
|
137
|
+
$font-weight-light: var(--vi-font-weight-light, 300);
|
|
138
|
+
$font-weight-normal: var(--vi-font-weight-normal, 400);
|
|
139
|
+
$font-weight-medium: var(--vi-font-weight-medium, 500);
|
|
140
|
+
$font-weight-semibold: var(--vi-font-weight-semibold, 600);
|
|
141
|
+
$font-weight-bold: var(--vi-font-weight-bold, 700);
|
|
142
|
+
|
|
143
|
+
$line-height-tight: var(--vi-line-height-tight, 1.2);
|
|
144
|
+
$line-height-normal: var(--vi-line-height-normal, 1.5);
|
|
145
|
+
$line-height-relaxed: var(--vi-line-height-relaxed, 1.75);
|
|
146
|
+
|
|
147
|
+
// -- Primitive: Shadows ------------------------------------------------------
|
|
148
|
+
|
|
149
|
+
$shadow-sm: var(--vi-shadow-sm, 0 1px 2px 0 rgba(0, 0, 0, 0.05));
|
|
150
|
+
$shadow-md: var(--vi-shadow-md, 0 4px 6px -1px rgba(0, 0, 0, 0.1));
|
|
151
|
+
$shadow-lg: var(--vi-shadow-lg, 0 10px 15px -3px rgba(0, 0, 0, 0.1));
|
|
152
|
+
$shadow-xl: var(--vi-shadow-xl, 0 20px 25px -5px rgba(0, 0, 0, 0.1));
|
|
153
|
+
|
|
154
|
+
// -- Primitive: Border radius ------------------------------------------------
|
|
155
|
+
|
|
156
|
+
$border-radius-sm: var(--vi-border-radius-sm, 2px);
|
|
157
|
+
$border-radius-md: var(--vi-border-radius-md, 4px);
|
|
158
|
+
$border-radius-lg: var(--vi-border-radius-lg, 8px);
|
|
159
|
+
$border-radius-xl: var(--vi-border-radius-xl, 12px);
|
|
160
|
+
|
|
161
|
+
// -- Primitive: Border widths ------------------------------------------------
|
|
162
|
+
|
|
163
|
+
$border-width-thin: var(--vi-border-width-thin, 1px);
|
|
164
|
+
$border-width-base: var(--vi-border-width-base, 2px);
|
|
165
|
+
$border-width-thick: var(--vi-border-width-thick, 3px);
|
|
166
|
+
|
|
167
|
+
// ============================================================================
|
|
168
|
+
// SCSS MAPS (for programmatic class generation via @each)
|
|
169
|
+
// ============================================================================
|
|
170
|
+
|
|
171
|
+
// Per-palette maps — used by the $palette-maps registry below.
|
|
172
|
+
|
|
173
|
+
$color-grey-map: (
|
|
174
|
+
'100': $color-grey-100,
|
|
175
|
+
'200': $color-grey-200,
|
|
176
|
+
'300': $color-grey-300,
|
|
177
|
+
'400': $color-grey-400,
|
|
178
|
+
'500': $color-grey-500,
|
|
179
|
+
'600': $color-grey-600,
|
|
180
|
+
'700': $color-grey-700,
|
|
181
|
+
'800': $color-grey-800,
|
|
182
|
+
'900': $color-grey-900,
|
|
183
|
+
);
|
|
184
|
+
|
|
185
|
+
$color-red-map: (
|
|
186
|
+
'100': $color-red-100,
|
|
187
|
+
'200': $color-red-200,
|
|
188
|
+
'300': $color-red-300,
|
|
189
|
+
'400': $color-red-400,
|
|
190
|
+
'500': $color-red-500,
|
|
191
|
+
'600': $color-red-600,
|
|
192
|
+
'700': $color-red-700,
|
|
193
|
+
'800': $color-red-800,
|
|
194
|
+
'900': $color-red-900,
|
|
195
|
+
);
|
|
196
|
+
|
|
197
|
+
$color-yellow-map: (
|
|
198
|
+
'100': $color-yellow-100,
|
|
199
|
+
'200': $color-yellow-200,
|
|
200
|
+
'300': $color-yellow-300,
|
|
201
|
+
'400': $color-yellow-400,
|
|
202
|
+
'500': $color-yellow-500,
|
|
203
|
+
'600': $color-yellow-600,
|
|
204
|
+
'700': $color-yellow-700,
|
|
205
|
+
'800': $color-yellow-800,
|
|
206
|
+
'900': $color-yellow-900,
|
|
207
|
+
);
|
|
208
|
+
|
|
209
|
+
$color-green-map: (
|
|
210
|
+
'100': $color-green-100,
|
|
211
|
+
'200': $color-green-200,
|
|
212
|
+
'300': $color-green-300,
|
|
213
|
+
'400': $color-green-400,
|
|
214
|
+
'500': $color-green-500,
|
|
215
|
+
'600': $color-green-600,
|
|
216
|
+
'700': $color-green-700,
|
|
217
|
+
'800': $color-green-800,
|
|
218
|
+
'900': $color-green-900,
|
|
219
|
+
);
|
|
220
|
+
|
|
221
|
+
$color-blue-map: (
|
|
222
|
+
'100': $color-blue-100,
|
|
223
|
+
'200': $color-blue-200,
|
|
224
|
+
'300': $color-blue-300,
|
|
225
|
+
'400': $color-blue-400,
|
|
226
|
+
'500': $color-blue-500,
|
|
227
|
+
'600': $color-blue-600,
|
|
228
|
+
'700': $color-blue-700,
|
|
229
|
+
'800': $color-blue-800,
|
|
230
|
+
'900': $color-blue-900,
|
|
231
|
+
);
|
|
232
|
+
|
|
233
|
+
$color-purple-map: (
|
|
234
|
+
'100': $color-purple-100,
|
|
235
|
+
'200': $color-purple-200,
|
|
236
|
+
'300': $color-purple-300,
|
|
237
|
+
'400': $color-purple-400,
|
|
238
|
+
'500': $color-purple-500,
|
|
239
|
+
'600': $color-purple-600,
|
|
240
|
+
'700': $color-purple-700,
|
|
241
|
+
'800': $color-purple-800,
|
|
242
|
+
'900': $color-purple-900,
|
|
243
|
+
);
|
|
244
|
+
|
|
245
|
+
// Palette registry — loop over this in utilities to generate all shade classes
|
|
246
|
+
// e.g. .text-grey-500, .bg-red-100, .text-purple-900
|
|
247
|
+
$palette-maps: (
|
|
248
|
+
'grey': $color-grey-map,
|
|
249
|
+
'red': $color-red-map,
|
|
250
|
+
'yellow': $color-yellow-map,
|
|
251
|
+
'green': $color-green-map,
|
|
252
|
+
'blue': $color-blue-map,
|
|
253
|
+
'purple': $color-purple-map,
|
|
254
|
+
);
|
|
255
|
+
|
|
256
|
+
// Semantic map — used for .text-primary, .bg-success, etc.
|
|
257
|
+
$color-map: (
|
|
258
|
+
'primary': $color-primary,
|
|
259
|
+
'secondary': $color-secondary,
|
|
260
|
+
'success': $color-success,
|
|
261
|
+
'warning': $color-warning,
|
|
262
|
+
'error': $color-error,
|
|
263
|
+
'info': $color-info,
|
|
264
|
+
);
|
|
265
|
+
|
|
266
|
+
$spacing-map: (
|
|
267
|
+
'xs': $spacing-xs,
|
|
268
|
+
'sm': $spacing-sm,
|
|
269
|
+
'md': $spacing-md,
|
|
270
|
+
'lg': $spacing-lg,
|
|
271
|
+
'xl': $spacing-xl,
|
|
272
|
+
'2xl': $spacing-2xl,
|
|
273
|
+
'3xl': $spacing-3xl,
|
|
274
|
+
);
|
|
275
|
+
|
|
276
|
+
$shadow-map: (
|
|
277
|
+
'sm': $shadow-sm,
|
|
278
|
+
'md': $shadow-md,
|
|
279
|
+
'lg': $shadow-lg,
|
|
280
|
+
'xl': $shadow-xl,
|
|
281
|
+
);
|
|
282
|
+
|
|
283
|
+
// Raw values — CSS custom properties are not valid in @media queries
|
|
284
|
+
$breakpoint-xs: 0;
|
|
285
|
+
$breakpoint-sm: 640px;
|
|
286
|
+
$breakpoint-md: 768px;
|
|
287
|
+
$breakpoint-lg: 1024px;
|
|
288
|
+
$breakpoint-xl: 1280px;
|
|
289
|
+
$breakpoint-2xl: 1536px;
|
|
290
|
+
|
|
291
|
+
$breakpoint-map: (
|
|
292
|
+
'xs': $breakpoint-xs,
|
|
293
|
+
'sm': $breakpoint-sm,
|
|
294
|
+
'md': $breakpoint-md,
|
|
295
|
+
'lg': $breakpoint-lg,
|
|
296
|
+
'xl': $breakpoint-xl,
|
|
297
|
+
'2xl': $breakpoint-2xl,
|
|
298
|
+
);
|
|
299
|
+
|
|
300
|
+
// Raw integers — used as z-index values (integer arithmetic context)
|
|
301
|
+
$z-index-hide: -1;
|
|
302
|
+
$z-index-auto: auto;
|
|
303
|
+
$z-index-base: 0;
|
|
304
|
+
$z-index-dropdown: 1000;
|
|
305
|
+
$z-index-sticky: 1020;
|
|
306
|
+
$z-index-fixed: 1030;
|
|
307
|
+
$z-index-backdrop: 1040;
|
|
308
|
+
$z-index-modal: 1050;
|
|
309
|
+
$z-index-popover: 1060;
|
|
310
|
+
$z-index-tooltip: 1070;
|
|
311
|
+
|
|
312
|
+
$z-index-map: (
|
|
313
|
+
'hide': $z-index-hide,
|
|
314
|
+
'auto': $z-index-auto,
|
|
315
|
+
'base': $z-index-base,
|
|
316
|
+
'dropdown': $z-index-dropdown,
|
|
317
|
+
'sticky': $z-index-sticky,
|
|
318
|
+
'fixed': $z-index-fixed,
|
|
319
|
+
'backdrop': $z-index-backdrop,
|
|
320
|
+
'modal': $z-index-modal,
|
|
321
|
+
'popover': $z-index-popover,
|
|
322
|
+
'tooltip': $z-index-tooltip,
|
|
323
|
+
);
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Flux UI — Styles Entry Point
|
|
3
|
+
* =============================
|
|
4
|
+
*
|
|
5
|
+
* This is a built entry point (@vi/flux-ui/styles) that exports the paths
|
|
6
|
+
* to each SCSS partial shipped in the package. Use the paths below in your
|
|
7
|
+
* application's SCSS to import individual layers, or import all at once:
|
|
8
|
+
*
|
|
9
|
+
* In your global styles.scss:
|
|
10
|
+
*
|
|
11
|
+
* @use '@vi/flux-ui/styles/_variables.scss' as *;
|
|
12
|
+
* @use '@vi/flux-ui/styles/_reset.scss';
|
|
13
|
+
* @use '@vi/flux-ui/styles/_layout.scss';
|
|
14
|
+
* @use '@vi/flux-ui/styles/_utilities.scss';
|
|
15
|
+
*
|
|
16
|
+
* Import order matters: variables first (provides CSS custom properties
|
|
17
|
+
* via :root and the @layer order declaration), then reset, layout, utilities.
|
|
18
|
+
*/
|
|
19
|
+
export declare const fluxUiStyles: {
|
|
20
|
+
readonly variables: "@vi/flux-ui/styles/_variables.scss";
|
|
21
|
+
readonly reset: "@vi/flux-ui/styles/_reset.scss";
|
|
22
|
+
readonly layout: "@vi/flux-ui/styles/_layout.scss";
|
|
23
|
+
readonly utilities: "@vi/flux-ui/styles/_utilities.scss";
|
|
24
|
+
};
|
|
25
|
+
export type FluxUiStyleKey = keyof typeof fluxUiStyles;
|
|
26
|
+
//# sourceMappingURL=index.d.ts.map
|
package/styles/index.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// libs/flux-ui/src/styles/index.ts
|
|
2
|
+
var fluxUiStyles = {
|
|
3
|
+
variables: "@vi/flux-ui/styles/_variables.scss",
|
|
4
|
+
reset: "@vi/flux-ui/styles/_reset.scss",
|
|
5
|
+
layout: "@vi/flux-ui/styles/_layout.scss",
|
|
6
|
+
utilities: "@vi/flux-ui/styles/_utilities.scss"
|
|
7
|
+
};
|
|
8
|
+
export {
|
|
9
|
+
fluxUiStyles
|
|
10
|
+
};
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Design System Tokens
|
|
3
|
+
* ======================
|
|
4
|
+
* Central source of truth for all design system values.
|
|
5
|
+
* These tokens are exported as both TypeScript constants and CSS custom properties.
|
|
6
|
+
*
|
|
7
|
+
* Structure:
|
|
8
|
+
* - colors: Brand, semantic, and functional colors
|
|
9
|
+
* - spacing: Spacing scale based on 8px unit system
|
|
10
|
+
* - typography: Font families, sizes, weights, line heights
|
|
11
|
+
* - shadows: Shadow definitions for depth
|
|
12
|
+
* - borders: Border radius and widths
|
|
13
|
+
* - breakpoints: Responsive breakpoints
|
|
14
|
+
*/
|
|
15
|
+
export declare const tokens: {
|
|
16
|
+
/**
|
|
17
|
+
* COLOR TOKENS
|
|
18
|
+
* Primary brand colors, semantic colors for states, and functional colors
|
|
19
|
+
*/
|
|
20
|
+
readonly colors: {
|
|
21
|
+
readonly primary: "var(--vi-color-primary)";
|
|
22
|
+
readonly secondary: "var(--vi-color-secondary)";
|
|
23
|
+
readonly success: "var(--vi-color-success)";
|
|
24
|
+
readonly warning: "var(--vi-color-warning)";
|
|
25
|
+
readonly error: "var(--vi-color-error)";
|
|
26
|
+
readonly info: "var(--vi-color-info)";
|
|
27
|
+
readonly neutral: {
|
|
28
|
+
readonly 100: "var(--vi-color-grey-100)";
|
|
29
|
+
readonly 200: "var(--vi-color-grey-200)";
|
|
30
|
+
readonly 300: "var(--vi-color-grey-300)";
|
|
31
|
+
readonly 400: "var(--vi-color-grey-400)";
|
|
32
|
+
readonly 500: "var(--vi-color-grey-500)";
|
|
33
|
+
readonly 600: "var(--vi-color-grey-600)";
|
|
34
|
+
readonly 700: "var(--vi-color-grey-700)";
|
|
35
|
+
readonly 800: "var(--vi-color-grey-800)";
|
|
36
|
+
readonly 900: "var(--vi-color-grey-900)";
|
|
37
|
+
};
|
|
38
|
+
readonly palettes: {
|
|
39
|
+
readonly grey: {
|
|
40
|
+
readonly 100: "var(--vi-color-grey-100)";
|
|
41
|
+
readonly 200: "var(--vi-color-grey-200)";
|
|
42
|
+
readonly 300: "var(--vi-color-grey-300)";
|
|
43
|
+
readonly 400: "var(--vi-color-grey-400)";
|
|
44
|
+
readonly 500: "var(--vi-color-grey-500)";
|
|
45
|
+
readonly 600: "var(--vi-color-grey-600)";
|
|
46
|
+
readonly 700: "var(--vi-color-grey-700)";
|
|
47
|
+
readonly 800: "var(--vi-color-grey-800)";
|
|
48
|
+
readonly 900: "var(--vi-color-grey-900)";
|
|
49
|
+
};
|
|
50
|
+
readonly red: {
|
|
51
|
+
readonly 100: "var(--vi-color-red-100)";
|
|
52
|
+
readonly 200: "var(--vi-color-red-200)";
|
|
53
|
+
readonly 300: "var(--vi-color-red-300)";
|
|
54
|
+
readonly 400: "var(--vi-color-red-400)";
|
|
55
|
+
readonly 500: "var(--vi-color-red-500)";
|
|
56
|
+
readonly 600: "var(--vi-color-red-600)";
|
|
57
|
+
readonly 700: "var(--vi-color-red-700)";
|
|
58
|
+
readonly 800: "var(--vi-color-red-800)";
|
|
59
|
+
readonly 900: "var(--vi-color-red-900)";
|
|
60
|
+
};
|
|
61
|
+
readonly yellow: {
|
|
62
|
+
readonly 100: "var(--vi-color-yellow-100)";
|
|
63
|
+
readonly 200: "var(--vi-color-yellow-200)";
|
|
64
|
+
readonly 300: "var(--vi-color-yellow-300)";
|
|
65
|
+
readonly 400: "var(--vi-color-yellow-400)";
|
|
66
|
+
readonly 500: "var(--vi-color-yellow-500)";
|
|
67
|
+
readonly 600: "var(--vi-color-yellow-600)";
|
|
68
|
+
readonly 700: "var(--vi-color-yellow-700)";
|
|
69
|
+
readonly 800: "var(--vi-color-yellow-800)";
|
|
70
|
+
readonly 900: "var(--vi-color-yellow-900)";
|
|
71
|
+
};
|
|
72
|
+
readonly green: {
|
|
73
|
+
readonly 100: "var(--vi-color-green-100)";
|
|
74
|
+
readonly 200: "var(--vi-color-green-200)";
|
|
75
|
+
readonly 300: "var(--vi-color-green-300)";
|
|
76
|
+
readonly 400: "var(--vi-color-green-400)";
|
|
77
|
+
readonly 500: "var(--vi-color-green-500)";
|
|
78
|
+
readonly 600: "var(--vi-color-green-600)";
|
|
79
|
+
readonly 700: "var(--vi-color-green-700)";
|
|
80
|
+
readonly 800: "var(--vi-color-green-800)";
|
|
81
|
+
readonly 900: "var(--vi-color-green-900)";
|
|
82
|
+
};
|
|
83
|
+
readonly blue: {
|
|
84
|
+
readonly 100: "var(--vi-color-blue-100)";
|
|
85
|
+
readonly 200: "var(--vi-color-blue-200)";
|
|
86
|
+
readonly 300: "var(--vi-color-blue-300)";
|
|
87
|
+
readonly 400: "var(--vi-color-blue-400)";
|
|
88
|
+
readonly 500: "var(--vi-color-blue-500)";
|
|
89
|
+
readonly 600: "var(--vi-color-blue-600)";
|
|
90
|
+
readonly 700: "var(--vi-color-blue-700)";
|
|
91
|
+
readonly 800: "var(--vi-color-blue-800)";
|
|
92
|
+
readonly 900: "var(--vi-color-blue-900)";
|
|
93
|
+
};
|
|
94
|
+
readonly purple: {
|
|
95
|
+
readonly 100: "var(--vi-color-purple-100)";
|
|
96
|
+
readonly 200: "var(--vi-color-purple-200)";
|
|
97
|
+
readonly 300: "var(--vi-color-purple-300)";
|
|
98
|
+
readonly 400: "var(--vi-color-purple-400)";
|
|
99
|
+
readonly 500: "var(--vi-color-purple-500)";
|
|
100
|
+
readonly 600: "var(--vi-color-purple-600)";
|
|
101
|
+
readonly 700: "var(--vi-color-purple-700)";
|
|
102
|
+
readonly 800: "var(--vi-color-purple-800)";
|
|
103
|
+
readonly 900: "var(--vi-color-purple-900)";
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
readonly background: "var(--vi-color-background)";
|
|
107
|
+
readonly foreground: "var(--vi-color-foreground)";
|
|
108
|
+
readonly border: "var(--vi-color-border)";
|
|
109
|
+
};
|
|
110
|
+
/**
|
|
111
|
+
* SPACING TOKENS
|
|
112
|
+
* 8px base unit system: xs (8px), sm (16px), md (24px), lg (32px), xl (40px), etc.
|
|
113
|
+
*/
|
|
114
|
+
readonly spacing: {
|
|
115
|
+
readonly xs: "var(--vi-spacing-xs)";
|
|
116
|
+
readonly sm: "var(--vi-spacing-sm)";
|
|
117
|
+
readonly md: "var(--vi-spacing-md)";
|
|
118
|
+
readonly lg: "var(--vi-spacing-lg)";
|
|
119
|
+
readonly xl: "var(--vi-spacing-xl)";
|
|
120
|
+
readonly '2xl': "var(--vi-spacing-2xl)";
|
|
121
|
+
readonly '3xl': "var(--vi-spacing-3xl)";
|
|
122
|
+
};
|
|
123
|
+
/**
|
|
124
|
+
* TYPOGRAPHY TOKENS
|
|
125
|
+
* Font families, sizes, weights, and line heights
|
|
126
|
+
*/
|
|
127
|
+
readonly typography: {
|
|
128
|
+
readonly fontFamily: {
|
|
129
|
+
readonly base: "var(--vi-font-family-base)";
|
|
130
|
+
readonly mono: "var(--vi-font-family-mono)";
|
|
131
|
+
};
|
|
132
|
+
readonly fontSize: {
|
|
133
|
+
readonly xs: "var(--vi-font-size-xs)";
|
|
134
|
+
readonly sm: "var(--vi-font-size-sm)";
|
|
135
|
+
readonly base: "var(--vi-font-size-base)";
|
|
136
|
+
readonly lg: "var(--vi-font-size-lg)";
|
|
137
|
+
readonly xl: "var(--vi-font-size-xl)";
|
|
138
|
+
readonly '2xl': "var(--vi-font-size-2xl)";
|
|
139
|
+
readonly '3xl': "var(--vi-font-size-3xl)";
|
|
140
|
+
};
|
|
141
|
+
readonly fontWeight: {
|
|
142
|
+
readonly light: 300;
|
|
143
|
+
readonly normal: 400;
|
|
144
|
+
readonly medium: 500;
|
|
145
|
+
readonly semibold: 600;
|
|
146
|
+
readonly bold: 700;
|
|
147
|
+
};
|
|
148
|
+
readonly lineHeight: {
|
|
149
|
+
readonly tight: 1.2;
|
|
150
|
+
readonly normal: 1.5;
|
|
151
|
+
readonly relaxed: 1.75;
|
|
152
|
+
};
|
|
153
|
+
};
|
|
154
|
+
/**
|
|
155
|
+
* SHADOW TOKENS
|
|
156
|
+
* Depth levels for elevation
|
|
157
|
+
*/
|
|
158
|
+
readonly shadows: {
|
|
159
|
+
readonly sm: "var(--vi-shadow-sm)";
|
|
160
|
+
readonly md: "var(--vi-shadow-md)";
|
|
161
|
+
readonly lg: "var(--vi-shadow-lg)";
|
|
162
|
+
readonly xl: "var(--vi-shadow-xl)";
|
|
163
|
+
};
|
|
164
|
+
/**
|
|
165
|
+
* BORDER TOKENS
|
|
166
|
+
* Border radius and widths
|
|
167
|
+
*/
|
|
168
|
+
readonly borders: {
|
|
169
|
+
readonly radius: {
|
|
170
|
+
readonly sm: "var(--vi-border-radius-sm)";
|
|
171
|
+
readonly md: "var(--vi-border-radius-md)";
|
|
172
|
+
readonly lg: "var(--vi-border-radius-lg)";
|
|
173
|
+
readonly xl: "var(--vi-border-radius-xl)";
|
|
174
|
+
};
|
|
175
|
+
readonly width: {
|
|
176
|
+
readonly thin: "var(--vi-border-width-thin)";
|
|
177
|
+
readonly base: "var(--vi-border-width-base)";
|
|
178
|
+
readonly thick: "var(--vi-border-width-thick)";
|
|
179
|
+
};
|
|
180
|
+
};
|
|
181
|
+
/**
|
|
182
|
+
* BREAKPOINT TOKENS
|
|
183
|
+
* Responsive design breakpoints (raw pixel values, not CSS vars)
|
|
184
|
+
* Use in a JS template literal: `@media (min-width: ${tokens.breakpoints.sm})`
|
|
185
|
+
* Use in plain CSS: @media (min-width: 640px)
|
|
186
|
+
*/
|
|
187
|
+
readonly breakpoints: {
|
|
188
|
+
readonly xs: "0";
|
|
189
|
+
readonly sm: "640px";
|
|
190
|
+
readonly md: "768px";
|
|
191
|
+
readonly lg: "1024px";
|
|
192
|
+
readonly xl: "1280px";
|
|
193
|
+
readonly '2xl': "1536px";
|
|
194
|
+
};
|
|
195
|
+
/**
|
|
196
|
+
* Z-INDEX TOKENS
|
|
197
|
+
* Stacking context levels (raw integers, not CSS vars)
|
|
198
|
+
* Use in CSS: z-index: tokens.zIndex.modal (e.g. 1050)
|
|
199
|
+
*/
|
|
200
|
+
readonly zIndex: {
|
|
201
|
+
readonly hide: -1;
|
|
202
|
+
readonly auto: "auto";
|
|
203
|
+
readonly base: 0;
|
|
204
|
+
readonly dropdown: 1000;
|
|
205
|
+
readonly sticky: 1020;
|
|
206
|
+
readonly fixed: 1030;
|
|
207
|
+
readonly backdrop: 1040;
|
|
208
|
+
readonly modal: 1050;
|
|
209
|
+
readonly popover: 1060;
|
|
210
|
+
readonly tooltip: 1070;
|
|
211
|
+
};
|
|
212
|
+
};
|
|
213
|
+
/**
|
|
214
|
+
* Type-safe token value extractor
|
|
215
|
+
* Preserves exact string/number types from tokens object
|
|
216
|
+
*/
|
|
217
|
+
export type TokenValue = typeof tokens;
|
|
218
|
+
//# sourceMappingURL=index.d.ts.map
|