@veevarts/design-system 1.0.0-alpha.16 → 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.
- package/dist/tailwind/index.d.ts +491 -126
- package/dist/tailwind/index.js +271 -402
- package/package.json +2 -2
package/dist/tailwind/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { colors } from '../tokens/colors';
|
|
2
|
+
import { typography } from '../tokens/typography';
|
|
3
|
+
import { spacing } from '../tokens/spacing';
|
|
4
|
+
export { colors, typography, spacing };
|
|
5
5
|
export interface ColorPalette {
|
|
6
6
|
50: string;
|
|
7
7
|
100: string;
|
|
@@ -15,54 +15,6 @@ export interface ColorPalette {
|
|
|
15
15
|
900: string;
|
|
16
16
|
DEFAULT: string;
|
|
17
17
|
}
|
|
18
|
-
|
|
19
|
-
export interface Colors {
|
|
20
|
-
brand: {
|
|
21
|
-
primary: ColorPalette;
|
|
22
|
-
};
|
|
23
|
-
semantic: {
|
|
24
|
-
secondary: string;
|
|
25
|
-
success: string;
|
|
26
|
-
warning: string;
|
|
27
|
-
danger: string;
|
|
28
|
-
info: string;
|
|
29
|
-
};
|
|
30
|
-
neutral: {
|
|
31
|
-
white: string;
|
|
32
|
-
black: string;
|
|
33
|
-
gray: Omit<ColorPalette, 'DEFAULT'>;
|
|
34
|
-
};
|
|
35
|
-
palettes: {
|
|
36
|
-
secondary: ColorPalette;
|
|
37
|
-
danger: ColorPalette;
|
|
38
|
-
success: ColorPalette;
|
|
39
|
-
warning: ColorPalette;
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export interface Typography {
|
|
44
|
-
fontFamily: {
|
|
45
|
-
sans: string[];
|
|
46
|
-
mono: string[];
|
|
47
|
-
};
|
|
48
|
-
fontSize: Record<string, [string, { lineHeight: string }]>;
|
|
49
|
-
fontWeight: Record<string, string>;
|
|
50
|
-
lineHeight: Record<string, string>;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export interface Spacing {
|
|
54
|
-
[key: string]: string;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export interface TailwindTheme {
|
|
58
|
-
colors: Record<string, unknown>;
|
|
59
|
-
fontFamily: Typography['fontFamily'];
|
|
60
|
-
spacing: Spacing;
|
|
61
|
-
fontSize: Typography['fontSize'];
|
|
62
|
-
fontWeight: Typography['fontWeight'];
|
|
63
|
-
lineHeight: Typography['lineHeight'];
|
|
64
|
-
}
|
|
65
|
-
|
|
66
18
|
export interface HeroUIColorOverrides {
|
|
67
19
|
primary?: string | Partial<ColorPalette>;
|
|
68
20
|
secondary?: string | Partial<ColorPalette>;
|
|
@@ -70,53 +22,186 @@ export interface HeroUIColorOverrides {
|
|
|
70
22
|
warning?: string | Partial<ColorPalette>;
|
|
71
23
|
danger?: string | Partial<ColorPalette>;
|
|
72
24
|
}
|
|
73
|
-
|
|
74
25
|
export interface HeroUIConfigOverrides {
|
|
75
26
|
colors?: HeroUIColorOverrides;
|
|
76
27
|
themes?: Record<string, unknown>;
|
|
77
28
|
}
|
|
78
|
-
|
|
29
|
+
export interface HeroUIThemeColors {
|
|
30
|
+
primary: ColorPalette;
|
|
31
|
+
secondary: ColorPalette;
|
|
32
|
+
danger: ColorPalette;
|
|
33
|
+
success: ColorPalette;
|
|
34
|
+
warning: ColorPalette;
|
|
35
|
+
}
|
|
79
36
|
export interface HeroUIConfig {
|
|
80
37
|
themes: {
|
|
81
38
|
light: {
|
|
82
|
-
colors:
|
|
83
|
-
primary: ColorPalette;
|
|
84
|
-
secondary: ColorPalette;
|
|
85
|
-
danger: ColorPalette;
|
|
86
|
-
success: ColorPalette;
|
|
87
|
-
warning: ColorPalette;
|
|
88
|
-
};
|
|
39
|
+
colors: HeroUIThemeColors;
|
|
89
40
|
};
|
|
90
41
|
};
|
|
91
42
|
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
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
|
+
};
|
|
96
80
|
};
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
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
|
+
};
|
|
107
121
|
/**
|
|
108
|
-
*
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
*
|
|
115
|
-
* content: [...],
|
|
116
|
-
* };
|
|
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
|
|
117
129
|
*/
|
|
118
|
-
export
|
|
119
|
-
|
|
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
|
+
};
|
|
120
205
|
/**
|
|
121
206
|
* Creates HeroUI configuration with optional overrides
|
|
122
207
|
*
|
|
@@ -124,53 +209,333 @@ export const veevartPreset: VeevartPreset;
|
|
|
124
209
|
* @returns HeroUI plugin configuration
|
|
125
210
|
*
|
|
126
211
|
* @example
|
|
212
|
+
* // Simple color override
|
|
127
213
|
* createHeroUIConfig({
|
|
128
214
|
* colors: {
|
|
129
215
|
* primary: '#FF0000',
|
|
130
216
|
* },
|
|
131
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
|
+
* });
|
|
132
231
|
*/
|
|
133
|
-
export function createHeroUIConfig(overrides?: HeroUIConfigOverrides): HeroUIConfig;
|
|
134
|
-
|
|
135
|
-
/**
|
|
136
|
-
* Design System tokens
|
|
137
|
-
*/
|
|
138
|
-
export const tokens: Tokens;
|
|
139
|
-
|
|
140
|
-
/**
|
|
141
|
-
* Color tokens
|
|
142
|
-
*/
|
|
143
|
-
export const colors: Colors;
|
|
144
|
-
|
|
145
|
-
/**
|
|
146
|
-
* Typography tokens
|
|
147
|
-
*/
|
|
148
|
-
export const typography: Typography;
|
|
149
|
-
|
|
150
|
-
/**
|
|
151
|
-
* Spacing tokens
|
|
152
|
-
*/
|
|
153
|
-
export const spacing: Spacing;
|
|
154
|
-
|
|
155
|
-
/**
|
|
156
|
-
* Tailwind theme extension
|
|
157
|
-
*/
|
|
158
|
-
export const tailwindTheme: TailwindTheme;
|
|
159
|
-
|
|
160
|
-
/**
|
|
161
|
-
* Default HeroUI theme configuration
|
|
162
|
-
*/
|
|
163
|
-
export const defaultHeroUITheme: HeroUIConfig['themes'];
|
|
164
|
-
|
|
232
|
+
export declare function createHeroUIConfig(overrides?: HeroUIConfigOverrides): HeroUIConfig;
|
|
165
233
|
/**
|
|
166
|
-
*
|
|
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
|
+
* };
|
|
167
246
|
*/
|
|
168
|
-
export
|
|
169
|
-
|
|
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
|
+
};
|
|
170
327
|
/**
|
|
171
|
-
*
|
|
328
|
+
* All tokens bundled together for convenience
|
|
172
329
|
*/
|
|
173
|
-
export
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
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
|
+
};
|
package/dist/tailwind/index.js
CHANGED
|
@@ -1,424 +1,293 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
* const { veevartPreset } = require('@veevarts/design-system/tailwind');
|
|
10
|
-
*
|
|
11
|
-
* module.exports = {
|
|
12
|
-
* presets: [veevartPreset],
|
|
13
|
-
* content: [...],
|
|
14
|
-
* };
|
|
15
|
-
*
|
|
16
|
-
* @example
|
|
17
|
-
* // With custom overrides (e.g., client-specific primary color)
|
|
18
|
-
* const { createHeroUIConfig, tokens } = require('@veevarts/design-system/tailwind');
|
|
19
|
-
* const { heroui } = require('@heroui/react');
|
|
20
|
-
*
|
|
21
|
-
* const clientPrimaryColor = '#FF0000'; // From API
|
|
22
|
-
*
|
|
23
|
-
* module.exports = {
|
|
24
|
-
* theme: { extend: tokens.tailwindTheme },
|
|
25
|
-
* plugins: [
|
|
26
|
-
* heroui(createHeroUIConfig({
|
|
27
|
-
* colors: {
|
|
28
|
-
* primary: clientPrimaryColor,
|
|
29
|
-
* },
|
|
30
|
-
* })),
|
|
31
|
-
* ],
|
|
32
|
-
* };
|
|
33
|
-
*/
|
|
34
|
-
|
|
35
|
-
// =============================================================================
|
|
36
|
-
// TOKENS
|
|
37
|
-
// =============================================================================
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Color tokens for the Design System
|
|
41
|
-
*/
|
|
42
|
-
const colors = {
|
|
43
|
-
brand: {
|
|
44
|
-
primary: {
|
|
45
|
-
50: '#fef5f1',
|
|
46
|
-
100: '#fde8e0',
|
|
47
|
-
200: '#fbd5c7',
|
|
48
|
-
300: '#f7b79f',
|
|
49
|
-
400: '#f18d68',
|
|
50
|
-
500: '#C14615',
|
|
51
|
-
600: '#a83b11',
|
|
52
|
-
700: '#8b2f0e',
|
|
53
|
-
800: '#73260d',
|
|
54
|
-
900: '#5f210c',
|
|
55
|
-
DEFAULT: '#C14615',
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
semantic: {
|
|
59
|
-
secondary: '#000000',
|
|
60
|
-
success: '#057A54',
|
|
61
|
-
warning: '#F5A524',
|
|
62
|
-
danger: '#B62214',
|
|
63
|
-
info: '#2563EB',
|
|
64
|
-
},
|
|
65
|
-
neutral: {
|
|
66
|
-
white: '#FFFFFF',
|
|
67
|
-
black: '#000000',
|
|
68
|
-
gray: {
|
|
69
|
-
50: '#F9FAFB',
|
|
70
|
-
100: '#F3F4F6',
|
|
71
|
-
200: '#E5E7EB',
|
|
72
|
-
300: '#D1D5DB',
|
|
73
|
-
400: '#9CA3AF',
|
|
74
|
-
500: '#6B7280',
|
|
75
|
-
600: '#4B5563',
|
|
76
|
-
700: '#374151',
|
|
77
|
-
800: '#1F2937',
|
|
78
|
-
900: '#111827',
|
|
79
|
-
},
|
|
80
|
-
},
|
|
81
|
-
palettes: {
|
|
82
|
-
secondary: {
|
|
83
|
-
50: '#f9fafb',
|
|
84
|
-
100: '#f3f4f6',
|
|
85
|
-
200: '#e5e7eb',
|
|
86
|
-
300: '#d1d5db',
|
|
87
|
-
400: '#9ca3af',
|
|
88
|
-
500: '#000000',
|
|
89
|
-
600: '#000000',
|
|
90
|
-
700: '#000000',
|
|
91
|
-
800: '#000000',
|
|
92
|
-
900: '#000000',
|
|
93
|
-
DEFAULT: '#000000',
|
|
94
|
-
},
|
|
95
|
-
danger: {
|
|
96
|
-
50: '#fef2f2',
|
|
97
|
-
100: '#fee2e2',
|
|
98
|
-
200: '#fecaca',
|
|
99
|
-
300: '#fca5a5',
|
|
100
|
-
400: '#f87171',
|
|
101
|
-
500: '#B62214',
|
|
102
|
-
600: '#a31e12',
|
|
103
|
-
700: '#8b1a0f',
|
|
104
|
-
800: '#73160d',
|
|
105
|
-
900: '#5c120a',
|
|
106
|
-
DEFAULT: '#B62214',
|
|
107
|
-
},
|
|
108
|
-
success: {
|
|
109
|
-
50: '#ecfdf5',
|
|
110
|
-
100: '#d1fae5',
|
|
111
|
-
200: '#a7f3d0',
|
|
112
|
-
300: '#6ee7b7',
|
|
113
|
-
400: '#34d399',
|
|
114
|
-
500: '#057A54',
|
|
115
|
-
600: '#046c4a',
|
|
116
|
-
700: '#035e40',
|
|
117
|
-
800: '#025035',
|
|
118
|
-
900: '#01422b',
|
|
119
|
-
DEFAULT: '#057A54',
|
|
120
|
-
},
|
|
121
|
-
warning: {
|
|
122
|
-
50: '#fffbeb',
|
|
123
|
-
100: '#fef3c7',
|
|
124
|
-
200: '#fde68a',
|
|
125
|
-
300: '#fcd34d',
|
|
126
|
-
400: '#fbbf24',
|
|
127
|
-
500: '#F5A524',
|
|
128
|
-
600: '#d97706',
|
|
129
|
-
700: '#b45309',
|
|
130
|
-
800: '#92400e',
|
|
131
|
-
900: '#78350f',
|
|
132
|
-
DEFAULT: '#F5A524',
|
|
133
|
-
},
|
|
134
|
-
},
|
|
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 });
|
|
135
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);
|
|
136
19
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
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"
|
|
154
89
|
},
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
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"
|
|
160
102
|
},
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
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"
|
|
165
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
|
+
}
|
|
166
130
|
};
|
|
167
131
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
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
|
+
}
|
|
207
174
|
};
|
|
208
175
|
|
|
209
|
-
//
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
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
|
|
227
196
|
};
|
|
228
197
|
|
|
229
|
-
//
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
danger: colors.palettes.danger,
|
|
242
|
-
success: colors.palettes.success,
|
|
243
|
-
warning: colors.palettes.warning,
|
|
244
|
-
},
|
|
245
|
-
},
|
|
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
|
|
246
210
|
};
|
|
247
|
-
|
|
248
|
-
/**
|
|
249
|
-
* Deep merge utility for objects
|
|
250
|
-
* @param {object} target - Target object
|
|
251
|
-
* @param {object} source - Source object to merge
|
|
252
|
-
* @returns {object} Merged object
|
|
253
|
-
*/
|
|
254
211
|
function deepMerge(target, source) {
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
) {
|
|
267
|
-
result[key] = deepMerge(target[key], source[key]);
|
|
268
|
-
} else {
|
|
269
|
-
result[key] = source[key];
|
|
270
|
-
}
|
|
271
|
-
}
|
|
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;
|
|
272
223
|
}
|
|
273
|
-
|
|
274
|
-
|
|
224
|
+
}
|
|
225
|
+
return result;
|
|
275
226
|
}
|
|
276
|
-
|
|
277
|
-
/**
|
|
278
|
-
* Creates a color palette from a single color value
|
|
279
|
-
* If a string is provided, it creates a basic palette with that color as the base
|
|
280
|
-
* If an object with shades is provided, it uses those directly
|
|
281
|
-
*
|
|
282
|
-
* @param {string|object} color - Color value or palette object
|
|
283
|
-
* @param {object} defaultPalette - Default palette to use as base
|
|
284
|
-
* @returns {object} Color palette
|
|
285
|
-
*/
|
|
286
227
|
function normalizeColorPalette(color, defaultPalette) {
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
228
|
+
if (typeof color === "string") {
|
|
229
|
+
return {
|
|
230
|
+
...defaultPalette,
|
|
231
|
+
500: color,
|
|
232
|
+
DEFAULT: color
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
return { ...defaultPalette, ...color };
|
|
295
236
|
}
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
* @param {object} overrides.themes - Additional theme configuration
|
|
308
|
-
* @returns {object} HeroUI plugin configuration
|
|
309
|
-
*
|
|
310
|
-
* @example
|
|
311
|
-
* // Simple color override
|
|
312
|
-
* createHeroUIConfig({
|
|
313
|
-
* colors: {
|
|
314
|
-
* primary: '#FF0000',
|
|
315
|
-
* },
|
|
316
|
-
* });
|
|
317
|
-
*
|
|
318
|
-
* @example
|
|
319
|
-
* // Full palette override
|
|
320
|
-
* createHeroUIConfig({
|
|
321
|
-
* colors: {
|
|
322
|
-
* primary: {
|
|
323
|
-
* 50: '#fff1f1',
|
|
324
|
-
* 100: '#ffe1e1',
|
|
325
|
-
* // ... more shades
|
|
326
|
-
* 500: '#FF0000',
|
|
327
|
-
* DEFAULT: '#FF0000',
|
|
328
|
-
* },
|
|
329
|
-
* },
|
|
330
|
-
* });
|
|
331
|
-
*/
|
|
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
|
+
};
|
|
332
248
|
function createHeroUIConfig(overrides = {}) {
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
success: colorOverrides.success
|
|
347
|
-
? normalizeColorPalette(colorOverrides.success, colors.palettes.success)
|
|
348
|
-
: colors.palettes.success,
|
|
349
|
-
warning: colorOverrides.warning
|
|
350
|
-
? normalizeColorPalette(colorOverrides.warning, colors.palettes.warning)
|
|
351
|
-
: colors.palettes.warning,
|
|
352
|
-
};
|
|
353
|
-
|
|
354
|
-
const baseConfig = {
|
|
355
|
-
themes: {
|
|
356
|
-
light: {
|
|
357
|
-
colors: lightColors,
|
|
358
|
-
},
|
|
359
|
-
},
|
|
360
|
-
};
|
|
361
|
-
|
|
362
|
-
// Merge with additional theme overrides if provided
|
|
363
|
-
if (themeOverrides && Object.keys(themeOverrides).length > 0) {
|
|
364
|
-
return deepMerge(baseConfig, { themes: themeOverrides });
|
|
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
|
+
}
|
|
365
262
|
}
|
|
366
|
-
|
|
367
|
-
|
|
263
|
+
};
|
|
264
|
+
if (themeOverrides && Object.keys(themeOverrides).length > 0) {
|
|
265
|
+
return deepMerge(baseConfig, { themes: themeOverrides });
|
|
266
|
+
}
|
|
267
|
+
return baseConfig;
|
|
368
268
|
}
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
/**
|
|
375
|
-
* Veevart Design System Tailwind preset
|
|
376
|
-
*
|
|
377
|
-
* Use this preset in your tailwind.config.js to get all Veevart tokens
|
|
378
|
-
* and styling defaults.
|
|
379
|
-
*
|
|
380
|
-
* @example
|
|
381
|
-
* const { veevartPreset } = require('@veevarts/design-system/tailwind');
|
|
382
|
-
*
|
|
383
|
-
* module.exports = {
|
|
384
|
-
* presets: [veevartPreset],
|
|
385
|
-
* content: [...],
|
|
386
|
-
* };
|
|
387
|
-
*/
|
|
388
|
-
const veevartPreset = {
|
|
389
|
-
theme: {
|
|
390
|
-
extend: tailwindTheme,
|
|
391
|
-
},
|
|
392
|
-
darkMode: 'class',
|
|
269
|
+
var veevartPreset = {
|
|
270
|
+
theme: {
|
|
271
|
+
extend: tailwindTheme
|
|
272
|
+
},
|
|
273
|
+
darkMode: "class"
|
|
393
274
|
};
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
module.exports = {
|
|
400
|
-
// Main exports
|
|
401
|
-
veevartPreset,
|
|
402
|
-
createHeroUIConfig,
|
|
403
|
-
|
|
404
|
-
// Tokens for direct access
|
|
405
|
-
tokens: {
|
|
406
|
-
colors,
|
|
407
|
-
typography,
|
|
408
|
-
spacing,
|
|
409
|
-
tailwindTheme,
|
|
410
|
-
},
|
|
411
|
-
|
|
412
|
-
// Individual token exports
|
|
413
|
-
colors,
|
|
414
|
-
typography,
|
|
415
|
-
spacing,
|
|
416
|
-
tailwindTheme,
|
|
417
|
-
|
|
418
|
-
// Default HeroUI theme (for reference)
|
|
419
|
-
defaultHeroUITheme,
|
|
420
|
-
|
|
421
|
-
// Utilities
|
|
422
|
-
deepMerge,
|
|
423
|
-
normalizeColorPalette,
|
|
275
|
+
var tokens = {
|
|
276
|
+
colors,
|
|
277
|
+
typography,
|
|
278
|
+
spacing,
|
|
279
|
+
tailwindTheme
|
|
424
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,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veevarts/design-system",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.0.0-alpha.
|
|
4
|
+
"version": "1.0.0-alpha.17",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"scripts": {
|
|
25
25
|
"dev": "vite",
|
|
26
26
|
"build": "vite build && npm run build:tailwind",
|
|
27
|
-
"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",
|
|
28
28
|
"lint": "eslint .",
|
|
29
29
|
"preview": "vite preview",
|
|
30
30
|
"test": "vitest --run",
|