@veevarts/design-system 1.0.0-alpha.15 → 1.0.0-alpha.17

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.
@@ -0,0 +1,541 @@
1
+ import { colors } from '../tokens/colors';
2
+ import { typography } from '../tokens/typography';
3
+ import { spacing } from '../tokens/spacing';
4
+ export { colors, typography, spacing };
5
+ export interface ColorPalette {
6
+ 50: string;
7
+ 100: string;
8
+ 200: string;
9
+ 300: string;
10
+ 400: string;
11
+ 500: string;
12
+ 600: string;
13
+ 700: string;
14
+ 800: string;
15
+ 900: string;
16
+ DEFAULT: string;
17
+ }
18
+ export interface HeroUIColorOverrides {
19
+ primary?: string | Partial<ColorPalette>;
20
+ secondary?: string | Partial<ColorPalette>;
21
+ success?: string | Partial<ColorPalette>;
22
+ warning?: string | Partial<ColorPalette>;
23
+ danger?: string | Partial<ColorPalette>;
24
+ }
25
+ export interface HeroUIConfigOverrides {
26
+ colors?: HeroUIColorOverrides;
27
+ themes?: Record<string, unknown>;
28
+ }
29
+ export interface HeroUIThemeColors {
30
+ primary: ColorPalette;
31
+ secondary: ColorPalette;
32
+ danger: ColorPalette;
33
+ success: ColorPalette;
34
+ warning: ColorPalette;
35
+ }
36
+ export interface HeroUIConfig {
37
+ themes: {
38
+ light: {
39
+ colors: HeroUIThemeColors;
40
+ };
41
+ };
42
+ }
43
+ /**
44
+ * Tailwind theme extension with Veevart tokens
45
+ */
46
+ export declare const tailwindTheme: {
47
+ colors: {
48
+ secondary: "#000000";
49
+ success: "#057A54";
50
+ warning: "#F5A524";
51
+ danger: "#B62214";
52
+ info: "#2563EB";
53
+ white: "#FFFFFF";
54
+ black: "#000000";
55
+ gray: {
56
+ readonly 50: "#F9FAFB";
57
+ readonly 100: "#F3F4F6";
58
+ readonly 200: "#E5E7EB";
59
+ readonly 300: "#D1D5DB";
60
+ readonly 400: "#9CA3AF";
61
+ readonly 500: "#6B7280";
62
+ readonly 600: "#4B5563";
63
+ readonly 700: "#374151";
64
+ readonly 800: "#1F2937";
65
+ readonly 900: "#111827";
66
+ };
67
+ primary: {
68
+ readonly 50: "#fef5f1";
69
+ readonly 100: "#fde8e0";
70
+ readonly 200: "#fbd5c7";
71
+ readonly 300: "#f7b79f";
72
+ readonly 400: "#f18d68";
73
+ readonly 500: "#C14615";
74
+ readonly 600: "#a83b11";
75
+ readonly 700: "#8b2f0e";
76
+ readonly 800: "#73260d";
77
+ readonly 900: "#5f210c";
78
+ readonly DEFAULT: "#C14615";
79
+ };
80
+ };
81
+ fontFamily: {
82
+ readonly primary: "\"NeueMontreal\", system-ui, sans-serif";
83
+ readonly secondary: "\"Scholar\", Georgia, serif";
84
+ readonly sans: "\"NeueMontreal\", system-ui, sans-serif";
85
+ readonly serif: "\"Scholar\", Georgia, serif";
86
+ readonly mono: "\"JetBrains Mono\", Consolas, monospace";
87
+ };
88
+ spacing: {
89
+ readonly xs: "0.25rem";
90
+ readonly sm: "0.5rem";
91
+ readonly md: "1rem";
92
+ readonly lg: "1.5rem";
93
+ readonly xl: "2rem";
94
+ readonly '2xl': "3rem";
95
+ readonly '3xl': "4rem";
96
+ readonly '4xl': "6rem";
97
+ readonly '5xl': "8rem";
98
+ };
99
+ fontSize: {
100
+ readonly xs: "0.75rem";
101
+ readonly sm: "0.875rem";
102
+ readonly base: "1rem";
103
+ readonly lg: "1.125rem";
104
+ readonly xl: "1.25rem";
105
+ readonly '2xl': "1.5rem";
106
+ readonly '3xl': "1.875rem";
107
+ readonly '4xl': "2.25rem";
108
+ readonly '5xl': "3rem";
109
+ };
110
+ fontWeight: {
111
+ readonly normal: "400";
112
+ readonly semibold: "600";
113
+ readonly bold: "700";
114
+ };
115
+ lineHeight: {
116
+ readonly tight: "1.25";
117
+ readonly normal: "1.5";
118
+ readonly relaxed: "1.75";
119
+ };
120
+ };
121
+ /**
122
+ * Deep merge utility for objects
123
+ */
124
+ export declare function deepMerge<T>(target: T, source: Partial<T>): T;
125
+ /**
126
+ * Creates a color palette from a single color value
127
+ * If a string is provided, it creates a basic palette with that color as the base
128
+ * If an object with shades is provided, it uses those directly
129
+ */
130
+ export declare function normalizeColorPalette(color: string | Partial<ColorPalette>, defaultPalette: ColorPalette): ColorPalette;
131
+ /**
132
+ * Default HeroUI theme configuration
133
+ */
134
+ export declare const defaultHeroUITheme: {
135
+ light: {
136
+ colors: {
137
+ primary: {
138
+ readonly 50: "#fef5f1";
139
+ readonly 100: "#fde8e0";
140
+ readonly 200: "#fbd5c7";
141
+ readonly 300: "#f7b79f";
142
+ readonly 400: "#f18d68";
143
+ readonly 500: "#C14615";
144
+ readonly 600: "#a83b11";
145
+ readonly 700: "#8b2f0e";
146
+ readonly 800: "#73260d";
147
+ readonly 900: "#5f210c";
148
+ readonly DEFAULT: "#C14615";
149
+ };
150
+ secondary: {
151
+ readonly 50: "#f9fafb";
152
+ readonly 100: "#f3f4f6";
153
+ readonly 200: "#e5e7eb";
154
+ readonly 300: "#d1d5db";
155
+ readonly 400: "#9ca3af";
156
+ readonly 500: "#000000";
157
+ readonly 600: "#000000";
158
+ readonly 700: "#000000";
159
+ readonly 800: "#000000";
160
+ readonly 900: "#000000";
161
+ readonly DEFAULT: "#000000";
162
+ };
163
+ danger: {
164
+ readonly 50: "#fef2f2";
165
+ readonly 100: "#fee2e2";
166
+ readonly 200: "#fecaca";
167
+ readonly 300: "#fca5a5";
168
+ readonly 400: "#f87171";
169
+ readonly 500: "#B62214";
170
+ readonly 600: "#a31e12";
171
+ readonly 700: "#8b1a0f";
172
+ readonly 800: "#73160d";
173
+ readonly 900: "#5c120a";
174
+ readonly DEFAULT: "#B62214";
175
+ };
176
+ success: {
177
+ readonly 50: "#ecfdf5";
178
+ readonly 100: "#d1fae5";
179
+ readonly 200: "#a7f3d0";
180
+ readonly 300: "#6ee7b7";
181
+ readonly 400: "#34d399";
182
+ readonly 500: "#057A54";
183
+ readonly 600: "#046c4a";
184
+ readonly 700: "#035e40";
185
+ readonly 800: "#025035";
186
+ readonly 900: "#01422b";
187
+ readonly DEFAULT: "#057A54";
188
+ };
189
+ warning: {
190
+ readonly 50: "#fffbeb";
191
+ readonly 100: "#fef3c7";
192
+ readonly 200: "#fde68a";
193
+ readonly 300: "#fcd34d";
194
+ readonly 400: "#fbbf24";
195
+ readonly 500: "#F5A524";
196
+ readonly 600: "#d97706";
197
+ readonly 700: "#b45309";
198
+ readonly 800: "#92400e";
199
+ readonly 900: "#78350f";
200
+ readonly DEFAULT: "#F5A524";
201
+ };
202
+ };
203
+ };
204
+ };
205
+ /**
206
+ * Creates HeroUI configuration with optional overrides
207
+ *
208
+ * @param overrides - Configuration overrides
209
+ * @returns HeroUI plugin configuration
210
+ *
211
+ * @example
212
+ * // Simple color override
213
+ * createHeroUIConfig({
214
+ * colors: {
215
+ * primary: '#FF0000',
216
+ * },
217
+ * });
218
+ *
219
+ * @example
220
+ * // Full palette override
221
+ * createHeroUIConfig({
222
+ * colors: {
223
+ * primary: {
224
+ * 50: '#fff1f1',
225
+ * 100: '#ffe1e1',
226
+ * 500: '#FF0000',
227
+ * DEFAULT: '#FF0000',
228
+ * },
229
+ * },
230
+ * });
231
+ */
232
+ export declare function createHeroUIConfig(overrides?: HeroUIConfigOverrides): HeroUIConfig;
233
+ /**
234
+ * Veevart Design System Tailwind preset
235
+ *
236
+ * Use this preset in your tailwind.config.js to get all Veevart tokens
237
+ * and styling defaults.
238
+ *
239
+ * @example
240
+ * const { veevartPreset } = require('@veevarts/design-system/tailwind');
241
+ *
242
+ * module.exports = {
243
+ * presets: [veevartPreset],
244
+ * content: [...],
245
+ * };
246
+ */
247
+ export declare const veevartPreset: {
248
+ theme: {
249
+ extend: {
250
+ colors: {
251
+ secondary: "#000000";
252
+ success: "#057A54";
253
+ warning: "#F5A524";
254
+ danger: "#B62214";
255
+ info: "#2563EB";
256
+ white: "#FFFFFF";
257
+ black: "#000000";
258
+ gray: {
259
+ readonly 50: "#F9FAFB";
260
+ readonly 100: "#F3F4F6";
261
+ readonly 200: "#E5E7EB";
262
+ readonly 300: "#D1D5DB";
263
+ readonly 400: "#9CA3AF";
264
+ readonly 500: "#6B7280";
265
+ readonly 600: "#4B5563";
266
+ readonly 700: "#374151";
267
+ readonly 800: "#1F2937";
268
+ readonly 900: "#111827";
269
+ };
270
+ primary: {
271
+ readonly 50: "#fef5f1";
272
+ readonly 100: "#fde8e0";
273
+ readonly 200: "#fbd5c7";
274
+ readonly 300: "#f7b79f";
275
+ readonly 400: "#f18d68";
276
+ readonly 500: "#C14615";
277
+ readonly 600: "#a83b11";
278
+ readonly 700: "#8b2f0e";
279
+ readonly 800: "#73260d";
280
+ readonly 900: "#5f210c";
281
+ readonly DEFAULT: "#C14615";
282
+ };
283
+ };
284
+ fontFamily: {
285
+ readonly primary: "\"NeueMontreal\", system-ui, sans-serif";
286
+ readonly secondary: "\"Scholar\", Georgia, serif";
287
+ readonly sans: "\"NeueMontreal\", system-ui, sans-serif";
288
+ readonly serif: "\"Scholar\", Georgia, serif";
289
+ readonly mono: "\"JetBrains Mono\", Consolas, monospace";
290
+ };
291
+ spacing: {
292
+ readonly xs: "0.25rem";
293
+ readonly sm: "0.5rem";
294
+ readonly md: "1rem";
295
+ readonly lg: "1.5rem";
296
+ readonly xl: "2rem";
297
+ readonly '2xl': "3rem";
298
+ readonly '3xl': "4rem";
299
+ readonly '4xl': "6rem";
300
+ readonly '5xl': "8rem";
301
+ };
302
+ fontSize: {
303
+ readonly xs: "0.75rem";
304
+ readonly sm: "0.875rem";
305
+ readonly base: "1rem";
306
+ readonly lg: "1.125rem";
307
+ readonly xl: "1.25rem";
308
+ readonly '2xl': "1.5rem";
309
+ readonly '3xl': "1.875rem";
310
+ readonly '4xl': "2.25rem";
311
+ readonly '5xl': "3rem";
312
+ };
313
+ fontWeight: {
314
+ readonly normal: "400";
315
+ readonly semibold: "600";
316
+ readonly bold: "700";
317
+ };
318
+ lineHeight: {
319
+ readonly tight: "1.25";
320
+ readonly normal: "1.5";
321
+ readonly relaxed: "1.75";
322
+ };
323
+ };
324
+ };
325
+ darkMode: "class";
326
+ };
327
+ /**
328
+ * All tokens bundled together for convenience
329
+ */
330
+ export declare const tokens: {
331
+ colors: {
332
+ readonly brand: {
333
+ readonly primary: {
334
+ readonly 50: "#fef5f1";
335
+ readonly 100: "#fde8e0";
336
+ readonly 200: "#fbd5c7";
337
+ readonly 300: "#f7b79f";
338
+ readonly 400: "#f18d68";
339
+ readonly 500: "#C14615";
340
+ readonly 600: "#a83b11";
341
+ readonly 700: "#8b2f0e";
342
+ readonly 800: "#73260d";
343
+ readonly 900: "#5f210c";
344
+ readonly DEFAULT: "#C14615";
345
+ };
346
+ };
347
+ readonly semantic: {
348
+ readonly secondary: "#000000";
349
+ readonly success: "#057A54";
350
+ readonly warning: "#F5A524";
351
+ readonly danger: "#B62214";
352
+ readonly info: "#2563EB";
353
+ };
354
+ readonly neutral: {
355
+ readonly white: "#FFFFFF";
356
+ readonly black: "#000000";
357
+ readonly gray: {
358
+ readonly 50: "#F9FAFB";
359
+ readonly 100: "#F3F4F6";
360
+ readonly 200: "#E5E7EB";
361
+ readonly 300: "#D1D5DB";
362
+ readonly 400: "#9CA3AF";
363
+ readonly 500: "#6B7280";
364
+ readonly 600: "#4B5563";
365
+ readonly 700: "#374151";
366
+ readonly 800: "#1F2937";
367
+ readonly 900: "#111827";
368
+ };
369
+ };
370
+ readonly palettes: {
371
+ readonly secondary: {
372
+ readonly 50: "#f9fafb";
373
+ readonly 100: "#f3f4f6";
374
+ readonly 200: "#e5e7eb";
375
+ readonly 300: "#d1d5db";
376
+ readonly 400: "#9ca3af";
377
+ readonly 500: "#000000";
378
+ readonly 600: "#000000";
379
+ readonly 700: "#000000";
380
+ readonly 800: "#000000";
381
+ readonly 900: "#000000";
382
+ readonly DEFAULT: "#000000";
383
+ };
384
+ readonly danger: {
385
+ readonly 50: "#fef2f2";
386
+ readonly 100: "#fee2e2";
387
+ readonly 200: "#fecaca";
388
+ readonly 300: "#fca5a5";
389
+ readonly 400: "#f87171";
390
+ readonly 500: "#B62214";
391
+ readonly 600: "#a31e12";
392
+ readonly 700: "#8b1a0f";
393
+ readonly 800: "#73160d";
394
+ readonly 900: "#5c120a";
395
+ readonly DEFAULT: "#B62214";
396
+ };
397
+ readonly success: {
398
+ readonly 50: "#ecfdf5";
399
+ readonly 100: "#d1fae5";
400
+ readonly 200: "#a7f3d0";
401
+ readonly 300: "#6ee7b7";
402
+ readonly 400: "#34d399";
403
+ readonly 500: "#057A54";
404
+ readonly 600: "#046c4a";
405
+ readonly 700: "#035e40";
406
+ readonly 800: "#025035";
407
+ readonly 900: "#01422b";
408
+ readonly DEFAULT: "#057A54";
409
+ };
410
+ readonly warning: {
411
+ readonly 50: "#fffbeb";
412
+ readonly 100: "#fef3c7";
413
+ readonly 200: "#fde68a";
414
+ readonly 300: "#fcd34d";
415
+ readonly 400: "#fbbf24";
416
+ readonly 500: "#F5A524";
417
+ readonly 600: "#d97706";
418
+ readonly 700: "#b45309";
419
+ readonly 800: "#92400e";
420
+ readonly 900: "#78350f";
421
+ readonly DEFAULT: "#F5A524";
422
+ };
423
+ };
424
+ };
425
+ typography: {
426
+ readonly fontFamily: {
427
+ readonly primary: "\"NeueMontreal\", system-ui, sans-serif";
428
+ readonly secondary: "\"Scholar\", Georgia, serif";
429
+ readonly sans: "\"NeueMontreal\", system-ui, sans-serif";
430
+ readonly serif: "\"Scholar\", Georgia, serif";
431
+ readonly mono: "\"JetBrains Mono\", Consolas, monospace";
432
+ };
433
+ readonly fontSize: {
434
+ readonly xs: "0.75rem";
435
+ readonly sm: "0.875rem";
436
+ readonly base: "1rem";
437
+ readonly lg: "1.125rem";
438
+ readonly xl: "1.25rem";
439
+ readonly '2xl': "1.5rem";
440
+ readonly '3xl': "1.875rem";
441
+ readonly '4xl': "2.25rem";
442
+ readonly '5xl': "3rem";
443
+ };
444
+ readonly fontWeight: {
445
+ readonly normal: "400";
446
+ readonly semibold: "600";
447
+ readonly bold: "700";
448
+ };
449
+ readonly lineHeight: {
450
+ readonly tight: "1.25";
451
+ readonly normal: "1.5";
452
+ readonly relaxed: "1.75";
453
+ };
454
+ };
455
+ spacing: {
456
+ readonly xs: "0.25rem";
457
+ readonly sm: "0.5rem";
458
+ readonly md: "1rem";
459
+ readonly lg: "1.5rem";
460
+ readonly xl: "2rem";
461
+ readonly '2xl': "3rem";
462
+ readonly '3xl': "4rem";
463
+ readonly '4xl': "6rem";
464
+ readonly '5xl': "8rem";
465
+ };
466
+ tailwindTheme: {
467
+ colors: {
468
+ secondary: "#000000";
469
+ success: "#057A54";
470
+ warning: "#F5A524";
471
+ danger: "#B62214";
472
+ info: "#2563EB";
473
+ white: "#FFFFFF";
474
+ black: "#000000";
475
+ gray: {
476
+ readonly 50: "#F9FAFB";
477
+ readonly 100: "#F3F4F6";
478
+ readonly 200: "#E5E7EB";
479
+ readonly 300: "#D1D5DB";
480
+ readonly 400: "#9CA3AF";
481
+ readonly 500: "#6B7280";
482
+ readonly 600: "#4B5563";
483
+ readonly 700: "#374151";
484
+ readonly 800: "#1F2937";
485
+ readonly 900: "#111827";
486
+ };
487
+ primary: {
488
+ readonly 50: "#fef5f1";
489
+ readonly 100: "#fde8e0";
490
+ readonly 200: "#fbd5c7";
491
+ readonly 300: "#f7b79f";
492
+ readonly 400: "#f18d68";
493
+ readonly 500: "#C14615";
494
+ readonly 600: "#a83b11";
495
+ readonly 700: "#8b2f0e";
496
+ readonly 800: "#73260d";
497
+ readonly 900: "#5f210c";
498
+ readonly DEFAULT: "#C14615";
499
+ };
500
+ };
501
+ fontFamily: {
502
+ readonly primary: "\"NeueMontreal\", system-ui, sans-serif";
503
+ readonly secondary: "\"Scholar\", Georgia, serif";
504
+ readonly sans: "\"NeueMontreal\", system-ui, sans-serif";
505
+ readonly serif: "\"Scholar\", Georgia, serif";
506
+ readonly mono: "\"JetBrains Mono\", Consolas, monospace";
507
+ };
508
+ spacing: {
509
+ readonly xs: "0.25rem";
510
+ readonly sm: "0.5rem";
511
+ readonly md: "1rem";
512
+ readonly lg: "1.5rem";
513
+ readonly xl: "2rem";
514
+ readonly '2xl': "3rem";
515
+ readonly '3xl': "4rem";
516
+ readonly '4xl': "6rem";
517
+ readonly '5xl': "8rem";
518
+ };
519
+ fontSize: {
520
+ readonly xs: "0.75rem";
521
+ readonly sm: "0.875rem";
522
+ readonly base: "1rem";
523
+ readonly lg: "1.125rem";
524
+ readonly xl: "1.25rem";
525
+ readonly '2xl': "1.5rem";
526
+ readonly '3xl': "1.875rem";
527
+ readonly '4xl': "2.25rem";
528
+ readonly '5xl': "3rem";
529
+ };
530
+ fontWeight: {
531
+ readonly normal: "400";
532
+ readonly semibold: "600";
533
+ readonly bold: "700";
534
+ };
535
+ lineHeight: {
536
+ readonly tight: "1.25";
537
+ readonly normal: "1.5";
538
+ readonly relaxed: "1.75";
539
+ };
540
+ };
541
+ };
@@ -0,0 +1,293 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/tailwind/index.ts
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
+ colors: () => colors,
24
+ createHeroUIConfig: () => createHeroUIConfig,
25
+ deepMerge: () => deepMerge,
26
+ defaultHeroUITheme: () => defaultHeroUITheme,
27
+ normalizeColorPalette: () => normalizeColorPalette,
28
+ spacing: () => spacing,
29
+ tailwindTheme: () => tailwindTheme,
30
+ tokens: () => tokens,
31
+ typography: () => typography,
32
+ veevartPreset: () => veevartPreset
33
+ });
34
+ module.exports = __toCommonJS(index_exports);
35
+
36
+ // src/tokens/colors.ts
37
+ var colors = {
38
+ brand: {
39
+ primary: {
40
+ 50: "#fef5f1",
41
+ 100: "#fde8e0",
42
+ 200: "#fbd5c7",
43
+ 300: "#f7b79f",
44
+ 400: "#f18d68",
45
+ 500: "#C14615",
46
+ 600: "#a83b11",
47
+ 700: "#8b2f0e",
48
+ 800: "#73260d",
49
+ 900: "#5f210c",
50
+ DEFAULT: "#C14615"
51
+ }
52
+ },
53
+ semantic: {
54
+ secondary: "#000000",
55
+ success: "#057A54",
56
+ warning: "#F5A524",
57
+ danger: "#B62214",
58
+ info: "#2563EB"
59
+ },
60
+ neutral: {
61
+ white: "#FFFFFF",
62
+ black: "#000000",
63
+ gray: {
64
+ 50: "#F9FAFB",
65
+ 100: "#F3F4F6",
66
+ 200: "#E5E7EB",
67
+ 300: "#D1D5DB",
68
+ 400: "#9CA3AF",
69
+ 500: "#6B7280",
70
+ 600: "#4B5563",
71
+ 700: "#374151",
72
+ 800: "#1F2937",
73
+ 900: "#111827"
74
+ }
75
+ },
76
+ palettes: {
77
+ secondary: {
78
+ 50: "#f9fafb",
79
+ 100: "#f3f4f6",
80
+ 200: "#e5e7eb",
81
+ 300: "#d1d5db",
82
+ 400: "#9ca3af",
83
+ 500: "#000000",
84
+ 600: "#000000",
85
+ 700: "#000000",
86
+ 800: "#000000",
87
+ 900: "#000000",
88
+ DEFAULT: "#000000"
89
+ },
90
+ danger: {
91
+ 50: "#fef2f2",
92
+ 100: "#fee2e2",
93
+ 200: "#fecaca",
94
+ 300: "#fca5a5",
95
+ 400: "#f87171",
96
+ 500: "#B62214",
97
+ 600: "#a31e12",
98
+ 700: "#8b1a0f",
99
+ 800: "#73160d",
100
+ 900: "#5c120a",
101
+ DEFAULT: "#B62214"
102
+ },
103
+ success: {
104
+ 50: "#ecfdf5",
105
+ 100: "#d1fae5",
106
+ 200: "#a7f3d0",
107
+ 300: "#6ee7b7",
108
+ 400: "#34d399",
109
+ 500: "#057A54",
110
+ 600: "#046c4a",
111
+ 700: "#035e40",
112
+ 800: "#025035",
113
+ 900: "#01422b",
114
+ DEFAULT: "#057A54"
115
+ },
116
+ warning: {
117
+ 50: "#fffbeb",
118
+ 100: "#fef3c7",
119
+ 200: "#fde68a",
120
+ 300: "#fcd34d",
121
+ 400: "#fbbf24",
122
+ 500: "#F5A524",
123
+ 600: "#d97706",
124
+ 700: "#b45309",
125
+ 800: "#92400e",
126
+ 900: "#78350f",
127
+ DEFAULT: "#F5A524"
128
+ }
129
+ }
130
+ };
131
+
132
+ // src/tokens/typography.ts
133
+ var typography = {
134
+ fontFamily: {
135
+ primary: '"NeueMontreal", system-ui, sans-serif',
136
+ secondary: '"Scholar", Georgia, serif',
137
+ sans: '"NeueMontreal", system-ui, sans-serif',
138
+ serif: '"Scholar", Georgia, serif',
139
+ mono: '"JetBrains Mono", Consolas, monospace'
140
+ },
141
+ fontSize: {
142
+ xs: "0.75rem",
143
+ // 12px
144
+ sm: "0.875rem",
145
+ // 14px
146
+ base: "1rem",
147
+ // 16px
148
+ lg: "1.125rem",
149
+ // 18px
150
+ xl: "1.25rem",
151
+ // 20px
152
+ "2xl": "1.5rem",
153
+ // 24px
154
+ "3xl": "1.875rem",
155
+ // 30px
156
+ "4xl": "2.25rem",
157
+ // 36px
158
+ "5xl": "3rem"
159
+ // 48px
160
+ },
161
+ fontWeight: {
162
+ normal: "400",
163
+ // Available for both NeueMontreal and Scholar
164
+ semibold: "600",
165
+ // Available for NeueMontreal only
166
+ bold: "700"
167
+ // Available for NeueMontreal only
168
+ },
169
+ lineHeight: {
170
+ tight: "1.25",
171
+ normal: "1.5",
172
+ relaxed: "1.75"
173
+ }
174
+ };
175
+
176
+ // src/tokens/spacing.ts
177
+ var spacing = {
178
+ xs: "0.25rem",
179
+ // 4px - Fine control (½ of base unit)
180
+ sm: "0.5rem",
181
+ // 8px - Base unit
182
+ md: "1rem",
183
+ // 16px
184
+ lg: "1.5rem",
185
+ // 24px
186
+ xl: "2rem",
187
+ // 32px
188
+ "2xl": "3rem",
189
+ // 48px
190
+ "3xl": "4rem",
191
+ // 64px
192
+ "4xl": "6rem",
193
+ // 96px
194
+ "5xl": "8rem"
195
+ // 128px
196
+ };
197
+
198
+ // src/tailwind/index.ts
199
+ var tailwindTheme = {
200
+ colors: {
201
+ ...colors.brand,
202
+ ...colors.neutral,
203
+ ...colors.semantic
204
+ },
205
+ fontFamily: typography.fontFamily,
206
+ spacing,
207
+ fontSize: typography.fontSize,
208
+ fontWeight: typography.fontWeight,
209
+ lineHeight: typography.lineHeight
210
+ };
211
+ function deepMerge(target, source) {
212
+ if (!source || typeof source !== "object") {
213
+ return target;
214
+ }
215
+ const result = { ...target };
216
+ for (const key of Object.keys(source)) {
217
+ const sourceValue = source[key];
218
+ const targetValue = target[key];
219
+ if (sourceValue && typeof sourceValue === "object" && !Array.isArray(sourceValue) && targetValue && typeof targetValue === "object" && !Array.isArray(targetValue)) {
220
+ result[key] = deepMerge(targetValue, sourceValue);
221
+ } else if (sourceValue !== void 0) {
222
+ result[key] = sourceValue;
223
+ }
224
+ }
225
+ return result;
226
+ }
227
+ function normalizeColorPalette(color, defaultPalette) {
228
+ if (typeof color === "string") {
229
+ return {
230
+ ...defaultPalette,
231
+ 500: color,
232
+ DEFAULT: color
233
+ };
234
+ }
235
+ return { ...defaultPalette, ...color };
236
+ }
237
+ var defaultHeroUITheme = {
238
+ light: {
239
+ colors: {
240
+ primary: colors.brand.primary,
241
+ secondary: colors.palettes.secondary,
242
+ danger: colors.palettes.danger,
243
+ success: colors.palettes.success,
244
+ warning: colors.palettes.warning
245
+ }
246
+ }
247
+ };
248
+ function createHeroUIConfig(overrides = {}) {
249
+ const { colors: colorOverrides = {}, themes: themeOverrides = {} } = overrides;
250
+ const lightColors = {
251
+ primary: colorOverrides.primary ? normalizeColorPalette(colorOverrides.primary, colors.brand.primary) : colors.brand.primary,
252
+ secondary: colorOverrides.secondary ? normalizeColorPalette(colorOverrides.secondary, colors.palettes.secondary) : colors.palettes.secondary,
253
+ danger: colorOverrides.danger ? normalizeColorPalette(colorOverrides.danger, colors.palettes.danger) : colors.palettes.danger,
254
+ success: colorOverrides.success ? normalizeColorPalette(colorOverrides.success, colors.palettes.success) : colors.palettes.success,
255
+ warning: colorOverrides.warning ? normalizeColorPalette(colorOverrides.warning, colors.palettes.warning) : colors.palettes.warning
256
+ };
257
+ const baseConfig = {
258
+ themes: {
259
+ light: {
260
+ colors: lightColors
261
+ }
262
+ }
263
+ };
264
+ if (themeOverrides && Object.keys(themeOverrides).length > 0) {
265
+ return deepMerge(baseConfig, { themes: themeOverrides });
266
+ }
267
+ return baseConfig;
268
+ }
269
+ var veevartPreset = {
270
+ theme: {
271
+ extend: tailwindTheme
272
+ },
273
+ darkMode: "class"
274
+ };
275
+ var tokens = {
276
+ colors,
277
+ typography,
278
+ spacing,
279
+ tailwindTheme
280
+ };
281
+ // Annotate the CommonJS export names for ESM import in node:
282
+ 0 && (module.exports = {
283
+ colors,
284
+ createHeroUIConfig,
285
+ deepMerge,
286
+ defaultHeroUITheme,
287
+ normalizeColorPalette,
288
+ spacing,
289
+ tailwindTheme,
290
+ tokens,
291
+ typography,
292
+ veevartPreset
293
+ });
package/package.json CHANGED
@@ -1,17 +1,30 @@
1
1
  {
2
2
  "name": "@veevarts/design-system",
3
3
  "private": false,
4
- "version": "1.0.0-alpha.15",
4
+ "version": "1.0.0-alpha.17",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
8
8
  "types": "dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.js",
13
+ "require": "./dist/index.cjs"
14
+ },
15
+ "./tailwind": {
16
+ "types": "./dist/tailwind/index.d.ts",
17
+ "require": "./dist/tailwind/index.js",
18
+ "import": "./dist/tailwind/index.js"
19
+ }
20
+ },
9
21
  "files": [
10
22
  "dist"
11
23
  ],
12
24
  "scripts": {
13
25
  "dev": "vite",
14
- "build": "vite build",
26
+ "build": "vite build && npm run build:tailwind",
27
+ "build:tailwind": "esbuild src/tailwind/index.ts --bundle --platform=node --format=cjs --outfile=dist/tailwind/index.js && tsc -p src/tailwind/tsconfig.json",
15
28
  "lint": "eslint .",
16
29
  "preview": "vite preview",
17
30
  "test": "vitest --run",