@axzydev/axzy_ui_system 1.0.156

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/package.json ADDED
@@ -0,0 +1,65 @@
1
+ {
2
+ "name": "@axzydev/axzy_ui_system",
3
+ "author": "axzydev <aamaro@axzy.dev>",
4
+ "private": false,
5
+ "license": "MIT",
6
+ "version": "1.0.156",
7
+ "type": "module",
8
+ "main": "dist/index.js",
9
+ "types": "dist/index.d.ts",
10
+ "files": [
11
+ "dist",
12
+ "src/theme"
13
+ ],
14
+ "scripts": {
15
+ "dev": "vite",
16
+ "build": "tsc -b && vite build",
17
+ "lint": "eslint .",
18
+ "preview": "vite preview",
19
+ "bundle": "tsup src/index.ts",
20
+ "storybook": "storybook dev -p 6006",
21
+ "build-storybook": "storybook build"
22
+ },
23
+ "dependencies": {
24
+ "autoprefixer": "^10.4.20",
25
+ "clsx": "^2.1.1",
26
+ "date-fns": "^4.1.0",
27
+ "formik": "^2.4.6",
28
+ "postcss": "^8.4.0",
29
+ "react": "19.0.0",
30
+ "react-dom": "19.0.0",
31
+ "react-dropzone": "^14.3.8",
32
+ "react-icons": "^5.4.0",
33
+ "tailwind-merge": "^3.4.0",
34
+ "tailwindcss": "3.4.17",
35
+ "tsup": "^8.3.6",
36
+ "vite-plugin-dts": "^4.5.0",
37
+ "yup": "^1.6.1"
38
+ },
39
+ "devDependencies": {
40
+ "@eslint/js": "9.19.0",
41
+ "@types/node": "^22.13.1",
42
+ "@types/react": "19.0.8",
43
+ "@types/react-dom": "19.0.3",
44
+ "@vitejs/plugin-react-swc": "3.8.0",
45
+ "eslint": "9.19.0",
46
+ "eslint-plugin-react-hooks": "5.0.0",
47
+ "eslint-plugin-react-refresh": "0.4.18",
48
+ "globals": "15.14.0",
49
+ "typescript": "~5.7.2",
50
+ "typescript-eslint": "8.22.0",
51
+ "vite": "6.1.0",
52
+ "storybook": "^10.2.0",
53
+ "@storybook/react-vite": "^10.2.0",
54
+ "@chromatic-com/storybook": "^5.0.0",
55
+ "@storybook/addon-vitest": "^10.2.0",
56
+ "@storybook/addon-a11y": "^10.2.0",
57
+ "@storybook/addon-docs": "^10.2.0",
58
+ "@storybook/addon-onboarding": "^10.2.0",
59
+ "eslint-plugin-storybook": "^10.2.0",
60
+ "vitest": "^4.0.18",
61
+ "playwright": "^1.58.0",
62
+ "@vitest/browser-playwright": "^4.0.18",
63
+ "@vitest/coverage-v8": "^4.0.18"
64
+ }
65
+ }
@@ -0,0 +1,412 @@
1
+ import colors from "tailwindcss/colors";
2
+
3
+ /**
4
+ * 1. Paleta base (colores crudos) - Actualizada a tonos azules
5
+ */
6
+ export const palette = {
7
+ blue: {
8
+ 50: '#eff6ff',
9
+ 100: '#dbeafe',
10
+ 200: '#bfdbfe',
11
+ 300: '#93c5fd',
12
+ 400: '#60a5fa',
13
+ 500: '#3b82f6',
14
+ 600: '#2563eb',
15
+ 700: '#1d4ed8',
16
+ 800: '#1e40af',
17
+ 900: '#1e3a8a',
18
+ 950: '#172554',
19
+ },
20
+
21
+ cyan: {
22
+ 50: '#ecfeff',
23
+ 100: '#cffafe',
24
+ 200: '#a5f3fc',
25
+ 300: '#67e8f9',
26
+ 400: '#22d3ee',
27
+ 500: '#06b6d4',
28
+ 600: '#0891b2',
29
+ 700: '#0e7490',
30
+ 800: '#155e75',
31
+ 900: '#164e63',
32
+ 950: '#083344',
33
+ },
34
+
35
+ gray: {
36
+ 50: '#f8fafc',
37
+ 100: '#f1f5f9',
38
+ 200: '#e2e8f0',
39
+ 300: '#cbd5e1',
40
+ 400: '#94a3b8',
41
+ 500: '#64748b',
42
+ 600: '#475569',
43
+ 700: '#334155',
44
+ 800: '#1e293b',
45
+ 900: '#0f172a',
46
+ 950: '#020617',
47
+ },
48
+
49
+ // Mantenemos los colores de estado pero actualizamos a tonos más suaves
50
+ success: colors.emerald,
51
+ danger: colors.rose,
52
+ warning: colors.amber,
53
+ purple: colors.violet,
54
+ info: colors.sky,
55
+ };
56
+
57
+ /**
58
+ * 2. Colores semánticos (qué representa cada color)
59
+ */
60
+ export const semanticColors = {
61
+ primary: palette.blue,
62
+ secondary: palette.gray,
63
+ success: palette.success,
64
+ danger: palette.danger,
65
+ warning: palette.warning,
66
+ info: palette.cyan, // Usamos cyan para info en lugar de sky
67
+ purple: palette.purple,
68
+ error: palette.danger,
69
+ gray: palette.gray,
70
+ };
71
+
72
+ /**
73
+ * 3. Tokens de componentes (heredan de semantic)
74
+ */
75
+ export const components = {
76
+ layout: {
77
+ backgroundColor: semanticColors.gray[50], // Very light gray background for the main content area
78
+ contentPadding: '1.5rem', // p-6
79
+ },
80
+ topbar: {
81
+ backgroundColor: 'rgba(255, 255, 255, 0.90)', // Glassmorphism base
82
+ borderColor: semanticColors.gray[200],
83
+ iconColor: semanticColors.gray[500],
84
+ iconHoverColor: semanticColors.gray[700],
85
+ shadow: '0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.025)',
86
+ textColor: semanticColors.gray[700],
87
+ textHoverColor: semanticColors.gray[900],
88
+ userMenu: {
89
+ backgroundColor: semanticColors.gray[50],
90
+ hoverBackground: semanticColors.gray[100],
91
+ textColor: semanticColors.gray[900],
92
+ subtitleColor: semanticColors.gray[500],
93
+ dropdown: {
94
+ backgroundColor: '#ffffff',
95
+ borderColor: semanticColors.gray[200],
96
+ itemHoverBackground: semanticColors.gray[50],
97
+ }
98
+ }
99
+ },
100
+ sidebar: {
101
+ backgroundColor: 'rgba(255, 255, 255, 0.90)', // Glassmorphism base like topbar
102
+ borderColor: semanticColors.gray[200],
103
+ label: {
104
+ color: semanticColors.gray[700],
105
+ size: '0.9rem',
106
+ weight: '500',
107
+ },
108
+ icon: {
109
+ color: semanticColors.gray[500],
110
+ size: '1.25rem',
111
+ },
112
+ hover: {
113
+ backgroundColor: semanticColors.gray[100],
114
+ },
115
+ active: {
116
+ backgroundColor: semanticColors.gray[50], // Very subtle active bg in light mode
117
+ color: semanticColors.gray[900],
118
+ iconColor: '#10b981', // Emerald green
119
+ },
120
+ badge: {
121
+ backgroundColor: '#10b981',
122
+ color: '#ffffff',
123
+ },
124
+ },
125
+
126
+ button: {
127
+ primary: {
128
+ backgroundColor: '#06b6d4', // Cyan-500
129
+ color: '#ffffff',
130
+ hover: '#0891b2', // Cyan-600
131
+ active: '#0e7490', // Cyan-700
132
+ focus: '0 0 0 2px #a5f3fc', // Cyan-200
133
+ borderRadius: '0.375rem', // 6px - rounded-md
134
+ padding: '0.5rem 1rem',
135
+ fontSize: '0.875rem',
136
+ fontWeight: '600',
137
+ transition: 'all 150ms ease-in-out',
138
+ },
139
+
140
+ secondary: {
141
+ backgroundColor: '#64748b', // Slate-500
142
+ color: '#ffffff', // Text white for filled secondary per screenshot
143
+ hover: '#475569', // Slate-600
144
+ focus: '0 0 0 2px #e2e8f0',
145
+ borderRadius: '0.375rem',
146
+ padding: '0.5rem 1rem',
147
+ fontSize: '0.875rem',
148
+ fontWeight: '600',
149
+ },
150
+
151
+ success: {
152
+ backgroundColor: '#22c55e', // Green-500
153
+ color: '#ffffff',
154
+ hover: '#16a34a', // Green-600
155
+ focus: `0 0 0 2px ${semanticColors.success[200]}`,
156
+ borderRadius: '0.375rem',
157
+ },
158
+
159
+ danger: {
160
+ backgroundColor: '#ef4444', // Red-500
161
+ color: '#ffffff',
162
+ hover: '#dc2626', // Red-600
163
+ focus: `0 0 0 2px ${semanticColors.danger[200]}`,
164
+ borderRadius: '0.375rem',
165
+ },
166
+
167
+ error: {
168
+ backgroundColor: '#ef4444',
169
+ color: '#ffffff',
170
+ hover: '#dc2626',
171
+ borderRadius: '0.375rem',
172
+ },
173
+
174
+ warning: {
175
+ backgroundColor: '#f97316', // Orange-500
176
+ color: '#ffffff',
177
+ hover: '#ea580c', // Orange-600
178
+ focus: `0 0 0 2px ${semanticColors.warning[200]}`,
179
+ borderRadius: '0.375rem',
180
+ },
181
+
182
+ info: {
183
+ backgroundColor: '#0ea5e9', // Sky-500
184
+ color: '#ffffff',
185
+ hover: '#0284c7', // Sky-600
186
+ focus: `0 0 0 2px ${semanticColors.info[200]}`,
187
+ borderRadius: '0.375rem',
188
+ },
189
+
190
+ purple: {
191
+ backgroundColor: '#8b5cf6', // Violet-500
192
+ color: '#ffffff',
193
+ hover: '#7c3aed', // Violet-600
194
+ focus: `0 0 0 2px ${semanticColors.purple[200]}`,
195
+ borderRadius: '0.375rem',
196
+ },
197
+
198
+ outline: {
199
+ backgroundColor: 'transparent',
200
+ color: semanticColors.primary[600],
201
+ borderColor: semanticColors.primary[600],
202
+ borderWidth: '2px', // Slightly thicker for modern look
203
+ hover: semanticColors.primary[50],
204
+ borderRadius: '0.375rem',
205
+ },
206
+ },
207
+
208
+ badge: {
209
+ primary: {
210
+ backgroundColor: semanticColors.primary[100],
211
+ color: semanticColors.primary[800],
212
+ borderColor: semanticColors.primary[200],
213
+ borderRadius: '9999px',
214
+ padding: '0.25rem 0.75rem',
215
+ fontSize: '0.75rem',
216
+ fontWeight: '500',
217
+ },
218
+ secondary: {
219
+ backgroundColor: semanticColors.secondary[100],
220
+ color: semanticColors.secondary[800],
221
+ borderColor: semanticColors.secondary[200],
222
+ borderRadius: '9999px',
223
+ },
224
+ success: {
225
+ backgroundColor: semanticColors.success[100],
226
+ color: semanticColors.success[800],
227
+ borderColor: semanticColors.success[200],
228
+ borderRadius: '9999px',
229
+ },
230
+ danger: {
231
+ backgroundColor: semanticColors.danger[100],
232
+ color: semanticColors.danger[800],
233
+ borderColor: semanticColors.danger[200],
234
+ borderRadius: '9999px',
235
+ },
236
+ warning: {
237
+ backgroundColor: semanticColors.warning[100],
238
+ color: semanticColors.warning[800],
239
+ borderColor: semanticColors.warning[200],
240
+ borderRadius: '9999px',
241
+ },
242
+ info: {
243
+ backgroundColor: semanticColors.info[100],
244
+ color: semanticColors.info[800],
245
+ borderColor: semanticColors.info[200],
246
+ borderRadius: '9999px',
247
+ },
248
+ purple: {
249
+ backgroundColor: semanticColors.purple[100],
250
+ color: semanticColors.purple[800],
251
+ borderColor: semanticColors.purple[200],
252
+ borderRadius: '9999px',
253
+ },
254
+ error: {
255
+ backgroundColor: semanticColors.danger[100],
256
+ color: semanticColors.danger[800],
257
+ borderColor: semanticColors.danger[200],
258
+ borderRadius: '9999px',
259
+ },
260
+ },
261
+
262
+ card: {
263
+ backgroundColor: '#ffffff',
264
+ borderRadius: '1rem', // 16px - más moderno
265
+ borderColor: semanticColors.gray[200],
266
+ borderWidth: '1px',
267
+ shadow: '0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)',
268
+ hover: {
269
+ shadow: '0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)',
270
+ },
271
+ header: {
272
+ backgroundColor: semanticColors.gray[50],
273
+ borderBottom: `1px solid ${semanticColors.gray[200]}`,
274
+ padding: '1rem 1.5rem',
275
+ borderTopLeftRadius: '1rem',
276
+ borderTopRightRadius: '1rem',
277
+ },
278
+ body: {
279
+ padding: '1.5rem',
280
+ },
281
+ },
282
+
283
+ input: {
284
+ backgroundColor: '#ffffff',
285
+ borderColor: semanticColors.gray[300],
286
+ borderRadius: '0.5rem',
287
+ padding: '0.5rem 0.75rem',
288
+ fontSize: '0.875rem',
289
+ focus: {
290
+ borderColor: semanticColors.primary[500],
291
+ ring: `0 0 0 3px ${semanticColors.primary[100]}`,
292
+ },
293
+ placeholder: semanticColors.gray[400],
294
+ disabled: {
295
+ backgroundColor: semanticColors.gray[100],
296
+ borderColor: semanticColors.gray[200],
297
+ },
298
+ error: {
299
+ borderColor: semanticColors.danger[500],
300
+ ring: `0 0 0 3px ${semanticColors.danger[100]}`,
301
+ },
302
+ },
303
+
304
+ table: {
305
+ header: {
306
+ backgroundColor: semanticColors.gray[50],
307
+ color: semanticColors.gray[700],
308
+ fontSize: '0.75rem',
309
+ fontWeight: '600',
310
+ textTransform: 'uppercase',
311
+ letterSpacing: '0.05em',
312
+ },
313
+ row: {
314
+ hover: semanticColors.primary[50],
315
+ borderBottom: `1px solid ${semanticColors.gray[200]}`,
316
+ },
317
+ cell: {
318
+ padding: '1rem 1.5rem',
319
+ },
320
+ },
321
+
322
+ alert: {
323
+ info: {
324
+ backgroundColor: semanticColors.info[50],
325
+ borderColor: semanticColors.info[200],
326
+ color: semanticColors.info[800],
327
+ icon: semanticColors.info[500],
328
+ },
329
+ success: {
330
+ backgroundColor: semanticColors.success[50],
331
+ borderColor: semanticColors.success[200],
332
+ color: semanticColors.success[800],
333
+ icon: semanticColors.success[500],
334
+ },
335
+ warning: {
336
+ backgroundColor: semanticColors.warning[50],
337
+ borderColor: semanticColors.warning[200],
338
+ color: semanticColors.warning[800],
339
+ icon: semanticColors.warning[500],
340
+ },
341
+ error: {
342
+ backgroundColor: semanticColors.danger[50],
343
+ borderColor: semanticColors.danger[200],
344
+ color: semanticColors.danger[800],
345
+ icon: semanticColors.danger[500],
346
+ },
347
+ },
348
+
349
+ modal: {
350
+ overlay: {
351
+ backgroundColor: 'rgba(15, 23, 42, 0.75)', // gray[900] con opacidad
352
+ },
353
+ content: {
354
+ backgroundColor: '#ffffff',
355
+ borderRadius: '1rem',
356
+ shadow: '0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)',
357
+ },
358
+ header: {
359
+ padding: '1.5rem 1.5rem 0.5rem 1.5rem',
360
+ borderBottom: `1px solid ${semanticColors.gray[200]}`,
361
+ },
362
+ body: {
363
+ padding: '1.5rem',
364
+ },
365
+ footer: {
366
+ padding: '1rem 1.5rem',
367
+ borderTop: `1px solid ${semanticColors.gray[200]}`,
368
+ backgroundColor: semanticColors.gray[50],
369
+ },
370
+ },
371
+ };
372
+
373
+ /**
374
+ * 4. Configuración global de tipografía y espaciado
375
+ */
376
+ export const typography = {
377
+ fontFamily: {
378
+ sans: ['Inter', 'system-ui', '-apple-system', 'sans-serif'],
379
+ mono: ['Fira Code', 'monospace'],
380
+ },
381
+ fontSize: {
382
+ xs: '0.75rem',
383
+ sm: '0.875rem',
384
+ base: '1rem',
385
+ lg: '1.125rem',
386
+ xl: '1.25rem',
387
+ '2xl': '1.5rem',
388
+ '3xl': '1.875rem',
389
+ '4xl': '2.25rem',
390
+ },
391
+ fontWeight: {
392
+ normal: '400',
393
+ medium: '500',
394
+ semibold: '600',
395
+ bold: '700',
396
+ },
397
+ lineHeight: {
398
+ tight: '1.25',
399
+ normal: '1.5',
400
+ relaxed: '1.75',
401
+ },
402
+ };
403
+
404
+ /**
405
+ * 5. Theme final exportado
406
+ */
407
+ export const theme = {
408
+ palette,
409
+ colors: semanticColors,
410
+ typography,
411
+ ...components,
412
+ };