nave-ui-library 1.0.0-beta.4 → 1.0.0-beta.41

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.
Files changed (57) hide show
  1. package/README.md +1130 -0
  2. package/dist/lit/index.cjs +275 -0
  3. package/dist/lit/index.d.cts +1901 -0
  4. package/dist/lit/index.d.ts +1901 -0
  5. package/dist/lit/index.js +275 -0
  6. package/dist/react/index.cjs +12986 -0
  7. package/dist/react/index.d.cts +1901 -0
  8. package/dist/react/index.d.ts +1901 -0
  9. package/dist/react/index.js +12980 -0
  10. package/dist/styles.css +1 -0
  11. package/dist/wc/index.cjs +275 -0
  12. package/dist/wc/index.d.cts +1901 -0
  13. package/dist/wc/index.d.ts +1901 -0
  14. package/dist/wc/index.js +275 -0
  15. package/package.json +53 -42
  16. package/dist/components/base/Badge.d.ts +0 -11
  17. package/dist/components/base/Badge.js +0 -29
  18. package/dist/components/base/Button.d.ts +0 -8
  19. package/dist/components/base/Button.js +0 -40
  20. package/dist/components/base/Checkbox.d.ts +0 -8
  21. package/dist/components/base/Checkbox.js +0 -27
  22. package/dist/components/base/Icon.d.ts +0 -26
  23. package/dist/components/base/Icon.js +0 -39
  24. package/dist/components/base/Input.d.ts +0 -7
  25. package/dist/components/base/Input.js +0 -18
  26. package/dist/components/base/Label.d.ts +0 -8
  27. package/dist/components/base/Label.js +0 -18
  28. package/dist/components/base/Radio.d.ts +0 -2
  29. package/dist/components/base/Radio.js +0 -34
  30. package/dist/components/base/Select.d.ts +0 -16
  31. package/dist/components/base/Select.js +0 -31
  32. package/dist/components/base/Switch.d.ts +0 -8
  33. package/dist/components/base/Switch.js +0 -42
  34. package/dist/components/base/Tooltip.d.ts +0 -12
  35. package/dist/components/base/Tooltip.js +0 -41
  36. package/dist/components/base/index.d.ts +0 -10
  37. package/dist/components/base/index.js +0 -10
  38. package/dist/components/base/native-only-animated-view.d.ts +0 -12
  39. package/dist/components/base/native-only-animated-view.js +0 -22
  40. package/dist/components/index.d.ts +0 -1
  41. package/dist/components/index.js +0 -1
  42. package/dist/index.d.ts +0 -3
  43. package/dist/index.js +0 -3
  44. package/dist/native/button.native.d.ts +0 -7
  45. package/dist/native/button.native.js +0 -6
  46. package/dist/native/index.d.ts +0 -1
  47. package/dist/native/index.js +0 -1
  48. package/dist/theme/index.d.ts +0 -3
  49. package/dist/theme/index.js +0 -3
  50. package/dist/theme/theme-context.d.ts +0 -3
  51. package/dist/theme/theme-context.js +0 -13
  52. package/dist/theme/theme-resolver.d.ts +0 -55
  53. package/dist/theme/theme-resolver.js +0 -74
  54. package/dist/theme/theme.d.ts +0 -3
  55. package/dist/theme/theme.js +0 -7
  56. package/dist/utils/cn.d.ts +0 -2
  57. package/dist/utils/cn.js +0 -5
package/README.md ADDED
@@ -0,0 +1,1130 @@
1
+ # Nave Design System – Component Showcase
2
+
3
+ Esta página es una **demo interactiva** y documentación viva del _Nave Design System_, donde se visualizan y prueban todos los componentes principales bajo distintos **tokens de tema**.
4
+
5
+ ---
6
+
7
+ ## 🎯 Objetivo
8
+
9
+ - Mostrar el catálogo completo de componentes UI
10
+ - Validar consistencia visual entre variantes
11
+ - Permitir cambio dinámico de tema mediante tokens
12
+ - Servir como referencia clara para desarrollo
13
+
14
+ ---
15
+
16
+ ## 🧩 Setup general
17
+
18
+ Toda la UI está envuelta por un `ThemeProvider`, que expone los tokens a los componentes.
19
+
20
+ ```tsx
21
+ <ThemeProvider theme={theme}>{/* UI */}</ThemeProvider>
22
+ ```
23
+
24
+ ---
25
+
26
+ ## 🔘 Buttons
27
+
28
+ ### Import
29
+
30
+ ```ts
31
+ import { Button } from '@packages/ui-library/dist';
32
+ ```
33
+
34
+ ### Uso básico
35
+
36
+ ```tsx
37
+ <Button>Default</Button>
38
+ ```
39
+
40
+ ### Variantes
41
+
42
+ ```tsx
43
+ <Button variant="primary">Primary</Button>
44
+ <Button variant="secondary">Secondary</Button>
45
+ <Button variant="tertiary">Tertiary</Button>
46
+ <Button variant="link">Link</Button>
47
+ ```
48
+
49
+ ---
50
+
51
+ ## ✍️ Inputs & Forms
52
+
53
+ ### Input
54
+
55
+ ```ts
56
+ import { Input } from '@packages/ui-library/dist';
57
+ ```
58
+
59
+ ```tsx
60
+ <Input placeholder="Email" />
61
+ <Input type="password" placeholder="Password" />
62
+ ```
63
+
64
+ ### Textarea
65
+
66
+ ```ts
67
+ import { Textarea } from '@packages/ui-library/dist';
68
+ ```
69
+
70
+ ```tsx
71
+ <Textarea placeholder="Write something..." />
72
+ ```
73
+
74
+ ### Label
75
+
76
+ ```ts
77
+ import { Label } from '@packages/ui-library/dist';
78
+ ```
79
+
80
+ ```tsx
81
+ <Label>Email</Label>
82
+ ```
83
+
84
+ ### Select
85
+
86
+ ```ts
87
+ import { Select } from '@packages/ui-library/dist';
88
+ ```
89
+
90
+ ```tsx
91
+ <Select
92
+ placeholder="Select option"
93
+ items={[
94
+ { label: 'Option 1', value: '1' },
95
+ { label: 'Option 2', value: '2' },
96
+ ]}
97
+ />
98
+ ```
99
+
100
+ ---
101
+
102
+ ## ☑️ Selection Controls
103
+
104
+ ### Checkbox
105
+
106
+ ```ts
107
+ import { Checkbox } from '@packages/ui-library/dist';
108
+ ```
109
+
110
+ ```tsx
111
+ <Checkbox />
112
+ ```
113
+
114
+ ### Switch
115
+
116
+ ```ts
117
+ import { Switch } from '@packages/ui-library/dist';
118
+ ```
119
+
120
+ ```tsx
121
+ <Switch />
122
+ ```
123
+
124
+ ### Radio Group
125
+
126
+ ```ts
127
+ import { RadioGroup, RadioGroupItem } from '@packages/ui-library/dist';
128
+ ```
129
+
130
+ ```tsx
131
+ <RadioGroup defaultValue="a">
132
+ <RadioGroupItem value="a" />
133
+ <RadioGroupItem value="b" />
134
+ </RadioGroup>
135
+ ```
136
+
137
+ ---
138
+
139
+ ## 🧭 Navigation
140
+
141
+ ### Breadcrumb
142
+
143
+ ```ts
144
+ import {
145
+ Breadcrumb,
146
+ BreadcrumbList,
147
+ BreadcrumbItem,
148
+ BreadcrumbLink,
149
+ BreadcrumbPage,
150
+ BreadcrumbSeparator,
151
+ } from '@packages/ui-library/dist';
152
+ ```
153
+
154
+ ```tsx
155
+ <Breadcrumb>
156
+ <BreadcrumbList>
157
+ <BreadcrumbItem>
158
+ <BreadcrumbLink href="/">Home</BreadcrumbLink>
159
+ </BreadcrumbItem>
160
+ <BreadcrumbSeparator />
161
+ <BreadcrumbItem>
162
+ <BreadcrumbPage>Dashboard</BreadcrumbPage>
163
+ </BreadcrumbItem>
164
+ </BreadcrumbList>
165
+ </Breadcrumb>
166
+ ```
167
+
168
+ ### Tabs
169
+
170
+ ```ts
171
+ import {
172
+ Tabs,
173
+ TabsList,
174
+ TabsTrigger,
175
+ TabsContent,
176
+ } from '@packages/ui-library/dist';
177
+ ```
178
+
179
+ ```tsx
180
+ <Tabs defaultValue="tab1">
181
+ <TabsList>
182
+ <TabsTrigger value="tab1">Tab 1</TabsTrigger>
183
+ <TabsTrigger value="tab2">Tab 2</TabsTrigger>
184
+ </TabsList>
185
+ <TabsContent value="tab1">Content 1</TabsContent>
186
+ <TabsContent value="tab2">Content 2</TabsContent>
187
+ </Tabs>
188
+ ```
189
+
190
+ ### Pagination
191
+
192
+ ```ts
193
+ import {
194
+ Pagination,
195
+ PaginationContent,
196
+ PaginationItem,
197
+ PaginationLink,
198
+ PaginationNext,
199
+ PaginationPrevious,
200
+ } from '@packages/ui-library/dist';
201
+ ```
202
+
203
+ ```tsx
204
+ <Pagination>
205
+ <PaginationContent>
206
+ <PaginationItem>
207
+ <PaginationPrevious />
208
+ </PaginationItem>
209
+ <PaginationItem>
210
+ <PaginationLink isActive>1</PaginationLink>
211
+ </PaginationItem>
212
+ <PaginationItem>
213
+ <PaginationNext />
214
+ </PaginationItem>
215
+ </PaginationContent>
216
+ </Pagination>
217
+ ```
218
+
219
+ ---
220
+
221
+ ## 🪟 Overlays
222
+
223
+ ### Dropdown Menu
224
+
225
+ ```ts
226
+ import {
227
+ DropdownMenu,
228
+ DropdownMenuTrigger,
229
+ DropdownMenuContent,
230
+ DropdownMenuItem,
231
+ } from '@packages/ui-library/dist';
232
+ ```
233
+
234
+ ```tsx
235
+ <DropdownMenu>
236
+ <DropdownMenuTrigger>Open</DropdownMenuTrigger>
237
+ <DropdownMenuContent>
238
+ <DropdownMenuItem>Item 1</DropdownMenuItem>
239
+ <DropdownMenuItem>Item 2</DropdownMenuItem>
240
+ </DropdownMenuContent>
241
+ </DropdownMenu>
242
+ ```
243
+
244
+ ### Tooltip
245
+
246
+ ```ts
247
+ import {
248
+ Tooltip,
249
+ TooltipTrigger,
250
+ TooltipContent,
251
+ } from '@packages/ui-library/dist';
252
+ ```
253
+
254
+ ```tsx
255
+ <Tooltip>
256
+ <TooltipTrigger>Hover</TooltipTrigger>
257
+ <TooltipContent>Tooltip text</TooltipContent>
258
+ </Tooltip>
259
+ ```
260
+
261
+ ### Alert Dialog
262
+
263
+ ```ts
264
+ import {
265
+ AlertDialog,
266
+ AlertDialogTrigger,
267
+ AlertDialogContent,
268
+ AlertDialogTitle,
269
+ AlertDialogDescription,
270
+ AlertDialogAction,
271
+ AlertDialogCancel,
272
+ } from '@packages/ui-library/dist';
273
+ ```
274
+
275
+ ```tsx
276
+ <AlertDialog>
277
+ <AlertDialogTrigger>Open</AlertDialogTrigger>
278
+ <AlertDialogContent>
279
+ <AlertDialogTitle>Are you sure?</AlertDialogTitle>
280
+ <AlertDialogDescription>Action cannot be undone.</AlertDialogDescription>
281
+ <AlertDialogCancel>Cancel</AlertDialogCancel>
282
+ <AlertDialogAction>Confirm</AlertDialogAction>
283
+ </AlertDialogContent>
284
+ </AlertDialog>
285
+ ```
286
+
287
+ ---
288
+
289
+ ## 📊 Data Display
290
+
291
+ ### Table
292
+
293
+ ```ts
294
+ import {
295
+ Table,
296
+ TableHeader,
297
+ TableBody,
298
+ TableRow,
299
+ TableHead,
300
+ TableCell,
301
+ } from '@packages/ui-library/dist';
302
+ ```
303
+
304
+ ```tsx
305
+ <Table>
306
+ <TableHeader>
307
+ <TableRow>
308
+ <TableHead>Name</TableHead>
309
+ <TableHead>Status</TableHead>
310
+ </TableRow>
311
+ </TableHeader>
312
+ <TableBody>
313
+ <TableRow>
314
+ <TableCell>Item 1</TableCell>
315
+ <TableCell>Active</TableCell>
316
+ </TableRow>
317
+ </TableBody>
318
+ </Table>
319
+ ```
320
+
321
+ ### Badge
322
+
323
+ ```ts
324
+ import { Badge } from '@packages/ui-library/dist';
325
+ ```
326
+
327
+ ```tsx
328
+ <Badge>New</Badge>
329
+ ```
330
+
331
+ ### Progress
332
+
333
+ ```ts
334
+ import { Progress } from '@packages/ui-library/dist';
335
+ ```
336
+
337
+ ```tsx
338
+ <Progress value={60} />
339
+ ```
340
+
341
+ ---
342
+
343
+ ## 🚨 Feedback
344
+
345
+ ### Alert
346
+
347
+ ```ts
348
+ import { Alert, AlertTitle, AlertDescription } from '@packages/ui-library/dist';
349
+ ```
350
+
351
+ ```tsx
352
+ <Alert>
353
+ <AlertTitle>Error</AlertTitle>
354
+ <AlertDescription>Something went wrong</AlertDescription>
355
+ </Alert>
356
+ ```
357
+
358
+ ### Loader
359
+
360
+ ```ts
361
+ import { Loader } from '@packages/ui-library/dist';
362
+ ```
363
+
364
+ ```tsx
365
+ <Loader />
366
+ ```
367
+
368
+ ---
369
+
370
+ ## 🎨 Temas y Tokens
371
+
372
+ - Todos los estilos se resuelven mediante **tokens de diseño**
373
+ - El cambio de tema es dinámico
374
+ - Los componentes reaccionan automáticamente sin re-render manual
375
+
376
+ ### Ejemplo completo de tokens de tema
377
+
378
+ A continuación se muestra un ejemplo real de cómo definir un tema completo y pasarlo al `ThemeProvider`.
379
+
380
+ ````md
381
+ ```ts
382
+ const NaveTheme = {
383
+ {
384
+ name: 'Nave',
385
+ tokens: {
386
+ "meta": {
387
+ "version": "2.0.0",
388
+ "theme": "light",
389
+ "radiusScale": "md"
390
+ },
391
+ "foundations": {
392
+ "colors": {
393
+ "brand": {
394
+ "primary": "#652BDF",
395
+ "hover": "#3C168E",
396
+ "secondary": "#F67E07"
397
+ },
398
+ "semantic": {
399
+ "success": "#16A34A",
400
+ "warning": "#F59E0B",
401
+ "danger": "#DC2626",
402
+ "info": "#2563EB"
403
+ },
404
+ "neutral": {
405
+ "0": "#FFFFFF",
406
+ "100": "#F9FAFB",
407
+ "200": "#E5E7EB",
408
+ "300": "#D1D5DB",
409
+ "400": "#9CA3AF",
410
+ "500": "#6B7280",
411
+ "700": "#374151",
412
+ "900": "#111827"
413
+ }
414
+ },
415
+ "typography": {
416
+ "fontFamily": "inherit",
417
+ "sizes": {
418
+ "xs": "12px",
419
+ "sm": "14px",
420
+ "md": "16px",
421
+ "lg": "18px"
422
+ },
423
+ "weights": {
424
+ "regular": 400,
425
+ "medium": 500,
426
+ "semibold": 700,
427
+ "bold": 700
428
+ },
429
+ "lineHeights": {
430
+ "tight": "1.2",
431
+ "normal": "1.4",
432
+ "relaxed": "1.6"
433
+ }
434
+ },
435
+ "radius": {
436
+ "sm": "4px",
437
+ "md": "8px",
438
+ "lg": "12px",
439
+ "full": "9999px"
440
+ },
441
+ "spacing": {
442
+ "xs": "4px",
443
+ "sm": "8px",
444
+ "md": "12px",
445
+ "lg": "16px",
446
+ "xl": "24px"
447
+ },
448
+ "motion": {
449
+ "duration": {
450
+ "fast": "150ms",
451
+ "normal": "250ms"
452
+ },
453
+ "easing": {
454
+ "standard": "ease",
455
+ "out": "ease-out"
456
+ }
457
+ },
458
+ "shadow": {
459
+ "sm": "0 1px 2px rgba(0,0,0,0.05)",
460
+ "md": "0 4px 12px rgba(0,0,0,0.1)"
461
+ }
462
+ },
463
+ "semanticTokens": {
464
+ "text": {
465
+ "primary": "{foundations.colors.neutral.900}",
466
+ "secondary": "{foundations.colors.neutral.700}",
467
+ "muted": "{foundations.colors.neutral.500}",
468
+ "inverse": "{foundations.colors.neutral.0}"
469
+ },
470
+ "surface": {
471
+ "default": "{foundations.colors.neutral.0}",
472
+ "muted": "{foundations.colors.neutral.100}",
473
+ "hover": "{foundations.colors.neutral.200}"
474
+ },
475
+ "border": {
476
+ "default": "{foundations.colors.neutral.300}",
477
+ "focus": "{foundations.colors.brand.primary}"
478
+ },
479
+ "action": {
480
+ "primary": "{foundations.colors.brand.primary}",
481
+ "secondary": "{foundations.colors.brand.secondary}",
482
+ "primaryHover": "{foundations.colors.brand.hover}",
483
+ "disabled": "{foundations.colors.neutral.300}"
484
+ }
485
+ },
486
+ "components": {
487
+ "button": {
488
+ "base": {
489
+ "radius": "{foundations.radius.md}",
490
+ "fontWeight": "{foundations.typography.weights.regular}",
491
+ "transition": "{foundations.motion.duration.fast}"
492
+ },
493
+ "variants": {
494
+ "primary": {
495
+ "background": "{semanticTokens.action.primary}",
496
+ "backgroundHover": "{semanticTokens.action.primaryHover}",
497
+ "color": "{semanticTokens.text.inverse}"
498
+ },
499
+ "secondary": {
500
+ "background": "{semanticTokens.surface.muted}",
501
+ "color": "{semanticTokens.text.primary}"
502
+ }
503
+ }
504
+ },
505
+ "label": {
506
+ "fontSize": "{foundations.typography.sizes.sm}",
507
+ "color": "{semanticTokens.text.primary}",
508
+ "padding": "{foundations.spacing.xs} {foundations.spacing.sm}",
509
+ "fontWeight": "{foundations.typography.weights.medium}"
510
+ },
511
+ "input": {
512
+ "background": "{semanticTokens.surface.default}",
513
+ "color": "{semanticTokens.text.primary}",
514
+ "border": "{semanticTokens.border.default}",
515
+ "focusBorder": "{semanticTokens.border.focus}",
516
+ "radius": "{foundations.radius.md}"
517
+ },
518
+ "select": {
519
+ "background": "{semanticTokens.surface.default}",
520
+ "color": "{semanticTokens.text.primary}",
521
+ "border": "{semanticTokens.border.default}",
522
+ "focusBorder": "{semanticTokens.border.focus}",
523
+ "radius": "{foundations.radius.md}"
524
+ },
525
+ "tooltip": {
526
+ "background": "{foundations.colors.neutral.700}",
527
+ "color": "{semanticTokens.text.inverse}",
528
+ "radius": "{foundations.radius.sm}"
529
+ },
530
+ "accordion": {
531
+ "text": "{semanticTokens.text.primary}",
532
+ "border": "{semanticTokens.border.default}",
533
+ "radius": "{foundations.radius.sm}",
534
+ "focusBorder": "{semanticTokens.border.focus}"
535
+ },
536
+ "checkbox": {
537
+ "track": {
538
+ "width": "36px",
539
+ "height": "20px",
540
+ "radius": "{foundations.radius.md}",
541
+ "background": "{semanticTokens.surface.muted}",
542
+ "border": "{semanticTokens.border.default}",
543
+ "focusBorder": "{semanticTokens.border.focus}"
544
+ },
545
+ "checked": {
546
+ "background": "{semanticTokens.action.primary}",
547
+ "backgroundHover": "{semanticTokens.action.primaryHover}"
548
+ },
549
+ "disabled": {
550
+ "background": "{semanticTokens.surface.muted}",
551
+ "thumb": "{semanticTokens.surface.default}"
552
+ },
553
+ "thumb": {
554
+ "size": "16px",
555
+ "color": "{semanticTokens.surface.default}"
556
+ },
557
+ "motion": {
558
+ "duration": "{foundations.motion.duration.fast}"
559
+ }
560
+ },
561
+ "badge": {
562
+ "base": {
563
+ "fontWeight": "550",
564
+ "lineHeight": "1.3"
565
+ },
566
+ "sizes": {
567
+ "small": {
568
+ "fontSize": "12px",
569
+ "padding": "2px 8px"
570
+ },
571
+ "medium": {
572
+ "fontSize": "14px",
573
+ "padding": "4px 10px"
574
+ },
575
+ "large": {
576
+ "fontSize": "16px",
577
+ "padding": "6px 12px"
578
+ }
579
+ },
580
+ "shapes": {
581
+ "rounded": {
582
+ "radius": "{foundations.radius.full}"
583
+ },
584
+ "square": {
585
+ "radius": "{foundations.radius.md}"
586
+ }
587
+ },
588
+ "tones": {
589
+ "success": {
590
+ "background": "#F2FDF8",
591
+ "color": "#128751"
592
+ },
593
+ "warning": {
594
+ "background": "#FEFAF0",
595
+ "color": "#C26E04"
596
+ },
597
+ "error": {
598
+ "background": "#FEEEEB",
599
+ "color": "#C2040C"
600
+ },
601
+ "info": {
602
+ "background": "#F0F5FE",
603
+ "color": "#0465C2"
604
+ },
605
+ "neutral": {
606
+ "background": "#F9F9FA",
607
+ "color": "#3A3F4B",
608
+ "border": "#E2E5E9"
609
+ },
610
+ "brand": {
611
+ "background": "#F6F2FD",
612
+ "color": "#652BDF"
613
+ }
614
+ }
615
+ },
616
+ "banner": {
617
+ "base": {
618
+ "radius": "{foundations.radius.lg}",
619
+ "paddingX": "16px",
620
+ "paddingY": "16px"
621
+ },
622
+ "sizes": {
623
+ "full": {
624
+ "maxWidth": "1184px"
625
+ },
626
+ "compact": {
627
+ "maxWidth": "360px"
628
+ }
629
+ },
630
+ "tones": {
631
+ "success": {
632
+ "background": "#F2FDF8",
633
+ "border": "#128751",
634
+ "text": "{semanticTokens.text.primary}",
635
+ "iconBg": "{semanticTokens.feedback.success.iconBg}",
636
+ "iconColor": "#128751",
637
+ "action": "{semanticTokens.feedback.success.action}"
638
+ },
639
+ "warning": {
640
+ "background": "#FEFAF0",
641
+ "border": "#C26E04",
642
+ "text": "{semanticTokens.text.primary}",
643
+ "iconBg": "{semanticTokens.surface.muted}",
644
+ "iconColor": "#C26E04",
645
+ "action": "{semanticTokens.text.primary}"
646
+ },
647
+ "error": {
648
+ "background": "#FEEEEB",
649
+ "border": "#C2040C",
650
+ "text": "{semanticTokens.text.primary}",
651
+ "iconBg": "{semanticTokens.surface.muted}",
652
+ "iconColor": "#C2040C",
653
+ "action": "{semanticTokens.text.primary}"
654
+ },
655
+ "info": {
656
+ "background": "#F0F5FE",
657
+ "border": "#0465C2",
658
+ "text": "{semanticTokens.text.primary}",
659
+ "iconBg": "{semanticTokens.surface.muted}",
660
+ "iconColor": "#0465C2",
661
+ "action": "{semanticTokens.text.primary}"
662
+ },
663
+ "neutral": {
664
+ "background": "#F9F9FA",
665
+ "border": "#E2E5E9",
666
+ "text": "{semanticTokens.text.primary}",
667
+ "iconBg": "{semanticTokens.surface.muted}",
668
+ "iconColor": "#3A3F4B",
669
+ "action": "{semanticTokens.text.primary}"
670
+ },
671
+ "brand": {
672
+ "background": "#F6F2FD",
673
+ "color": "#652BDF",
674
+ "text": "{semanticTokens.text.primary}",
675
+ "iconBg": "{semanticTokens.surface.muted}",
676
+ "iconColor": "#652BDF",
677
+ "action": "{semanticTokens.text.primary}"
678
+ }
679
+ }
680
+ },
681
+ "promoBanner": {
682
+ "primary": {
683
+ "background": "{semanticTokens.action.primary}",
684
+ "color": "{semanticTokens.text.inverse}",
685
+ "linkColor": "{semanticTokens.text.inverse}",
686
+ "linkUnderline": true,
687
+ "borderRadius": "16px",
688
+ "padding": "12px 16px",
689
+ "imageBg": "lightgray"
690
+ },
691
+ "secondary": {
692
+ "background": "{foundations.colors.brand.secondary}",
693
+ "color": "{semanticTokens.text.primary}",
694
+ "linkColor": "{foundations.colors.brand.primary}",
695
+ "linkUnderline": false,
696
+ "borderRadius": "16px",
697
+ "padding": "12px 16px",
698
+ "imageBg": "#E5E7EB"
699
+ },
700
+ "tertiary": {
701
+ "background": "{foundations.colors.feedback.warning}",
702
+ "color": "{semanticTokens.text.primary}",
703
+ "linkColor": "{foundations.colors.feedback.warning}",
704
+ "linkUnderline": true,
705
+ "borderRadius": "16px",
706
+ "padding": "12px 16px",
707
+ "imageBg": "#FEF3C7"
708
+ }
709
+ },
710
+ "alert": {
711
+ "base": {
712
+ "radius": "{foundations.radius.lg}",
713
+ "paddingX": "16px",
714
+ "paddingY": "12px"
715
+ },
716
+ "tones": {
717
+ "success": {
718
+ "background": "#F2FDF8",
719
+ "border": "#128751",
720
+ "text": "{semanticTokens.text.primary}",
721
+ "iconBg": "{semanticTokens.feedback.success.iconBg}",
722
+ "iconColor": "#128751",
723
+ "action": "{semanticTokens.feedback.success.action}"
724
+ },
725
+ "warning": {
726
+ "background": "#FEFAF0",
727
+ "border": "#C26E04",
728
+ "text": "{semanticTokens.text.primary}",
729
+ "iconBg": "{semanticTokens.surface.muted}",
730
+ "iconColor": "#C26E04",
731
+ "action": "{semanticTokens.text.primary}"
732
+ },
733
+ "error": {
734
+ "background": "#FEEEEB",
735
+ "border": "#C2040C",
736
+ "text": "{semanticTokens.text.primary}",
737
+ "iconBg": "{semanticTokens.surface.muted}",
738
+ "iconColor": "#C2040C",
739
+ "action": "{semanticTokens.text.primary}"
740
+ },
741
+ "info": {
742
+ "background": "#F0F5FE",
743
+ "border": "#0465C2",
744
+ "text": "{semanticTokens.text.primary}",
745
+ "iconBg": "{semanticTokens.surface.muted}",
746
+ "iconColor": "#0465C2",
747
+ "action": "{semanticTokens.text.primary}"
748
+ },
749
+ "neutral": {
750
+ "background": "#F9F9FA",
751
+ "border": "#E2E5E9",
752
+ "text": "{semanticTokens.text.primary}",
753
+ "iconBg": "{semanticTokens.surface.muted}",
754
+ "iconColor": "#3A3F4B",
755
+ "action": "{semanticTokens.text.primary}"
756
+ },
757
+ "destructive": {
758
+ "background": "#FEF2F2",
759
+ "border": "#DC2626",
760
+ "text": "{semanticTokens.text.primary}",
761
+ "iconBg": "{semanticTokens.surface.muted}",
762
+ "iconColor": "#DC2626",
763
+ "action": "{semanticTokens.text.primary}"
764
+ }
765
+ }
766
+ },
767
+ "avatar": {
768
+ "sizes": {
769
+ "sm": {
770
+ "size": "32px",
771
+ "fontSize": "12px"
772
+ },
773
+ "md": {
774
+ "size": "40px",
775
+ "fontSize": "14px"
776
+ },
777
+ "lg": {
778
+ "size": "56px",
779
+ "fontSize": "18px"
780
+ }
781
+ },
782
+ "shape": {
783
+ "radius": "{foundations.radius.full}"
784
+ },
785
+ "fallback": {
786
+ "background": "{semanticTokens.surface.muted}",
787
+ "color": "{semanticTokens.text.primary}",
788
+ "fontWeight": "{foundations.typography.weights.medium}"
789
+ }
790
+ },
791
+ "radio": {
792
+ "outer": {
793
+ "size": "16px",
794
+ "radius": "50%",
795
+ "background": "{semanticTokens.surface.default}",
796
+ "border": "{semanticTokens.border.default}",
797
+ "focusBorder": "{semanticTokens.border.focus}"
798
+ },
799
+ "checked": {
800
+ "background": "{semanticTokens.action.primary}",
801
+ "backgroundHover": "{semanticTokens.action.primaryHover}"
802
+ },
803
+ "dot": {
804
+ "size": "8px",
805
+ "color": "{semanticTokens.surface.default}"
806
+ },
807
+ "disabled": {
808
+ "background": "{semanticTokens.surface.muted}",
809
+ "border": "{semanticTokens.border.default}",
810
+ "dot": "{semanticTokens.surface.default}"
811
+ },
812
+ "motion": {
813
+ "duration": "{foundations.motion.duration.fast}"
814
+ }
815
+ },
816
+ "switch": {
817
+ "track": {
818
+ "width": "36px",
819
+ "height": "20px",
820
+ "radius": "{foundations.radius.full}",
821
+ "offBackground": "{foundations.colors.neutral.300}",
822
+ "onBackground": "{semanticTokens.action.primary}",
823
+ "focusBorder": "{semanticTokens.border.focus}"
824
+ },
825
+ "handle": {
826
+ "size": "12px",
827
+ "color": "{semanticTokens.text.inverse}"
828
+ },
829
+ "disabled": {
830
+ "track": "{semanticTokens.surface.muted}",
831
+ "handle": "{semanticTokens.surface.default}"
832
+ },
833
+ "motion": {
834
+ "duration": "{foundations.motion.duration.fast}"
835
+ }
836
+ },
837
+ "dropdown": {
838
+ "background": "{semanticTokens.surface.default}",
839
+ "border": "{semanticTokens.border.default}",
840
+ "radius": "{foundations.radius.md}",
841
+ "shadow": "{foundations.shadow.md}"
842
+ },
843
+ "alertDialog": {
844
+ "overlay": {
845
+ "background": "rgba(0,0,0,0.5)"
846
+ },
847
+ "content": {
848
+ "background": "{semanticTokens.surface.default}",
849
+ "radius": "{foundations.radius.lg}",
850
+ "border": "{semanticTokens.border.default}"
851
+ },
852
+ "title": {
853
+ "color": "{semanticTokens.text.primary}",
854
+ "fontWeight": "{foundations.typography.weights.semibold}"
855
+ },
856
+ "description": {
857
+ "color": "{semanticTokens.text.secondary}"
858
+ }
859
+ },
860
+ "card": {
861
+ "background": "{semanticTokens.surface.default}",
862
+ "border": "{semanticTokens.border.default}",
863
+ "radius": "{foundations.radius.lg}",
864
+ "shadow": "{foundations.shadow.sm}"
865
+ },
866
+ "calendar": {
867
+ "background": "{semanticTokens.surface.default}",
868
+ "text": "{semanticTokens.text.primary}",
869
+ "mutedText": "{semanticTokens.text.muted}",
870
+ "accent": "#F6F2FD",
871
+ "accentForeground": "{semanticTokens.text.inverse}",
872
+ "radius": "{foundations.radius.md}"
873
+ },
874
+ "popover": {
875
+ "background": "{semanticTokens.surface.default}",
876
+ "border": "{semanticTokens.border.default}",
877
+ "radius": "{foundations.radius.md}",
878
+ "shadow": "{foundations.shadow.md}"
879
+ },
880
+ "pagination": {
881
+ "background": "{semanticTokens.surface.default}",
882
+ "activeBackground": "#F4F0FF",
883
+ "activeText": "{semanticTokens.action.primary}",
884
+ "hoverBackground": "{semanticTokens.surface.hover}",
885
+ "border": "{semanticTokens.border.default}",
886
+ "radius": "{foundations.radius.md}"
887
+ },
888
+ "tabs": {
889
+ "tabsList": {
890
+ "background": "{semanticTokens.surface.muted}",
891
+ "color": "{semanticTokens.text.primary}",
892
+ "border": "{foundations.radius.md}"
893
+ },
894
+ "tabsTrigger": {
895
+ "color": "{semanticTokens.text.primary}",
896
+ "active": {
897
+ "background": "{semanticTokens.action.primary}",
898
+ "border": "{semanticTokens.border.default}",
899
+ "color": "{semanticTokens.text.inverse}"
900
+ },
901
+ "disabled": {
902
+ "opacity": 0.5
903
+ }
904
+ },
905
+ "tabsFocusRing": {
906
+ "innerColor": "{semanticTokens.surface.default}",
907
+ "outerColor": "{semanticTokens.border.focus}",
908
+ "innerSize": "2px",
909
+ "outerSize": "4px"
910
+ }
911
+ },
912
+ "table": {
913
+ "background": "{semanticTokens.surface.default}",
914
+ "color": "{semanticTokens.text.primary}",
915
+ "border": "{semanticTokens.border.default}",
916
+ "radius": "{foundations.radius.md}",
917
+ "hoverBackground": "{semanticTokens.surface.hover}",
918
+ "selectedBackground": "#F4F0FF",
919
+ "shadow": "{foundations.shadow.md}"
920
+ },
921
+ "breadcrumb": {
922
+ "link": {
923
+ "color": "{semanticTokens.action.primary}",
924
+ "fontWeight": "{foundations.typography.weights.semibold}",
925
+ "hoverBackground": "{semanticTokens.surface.hover}"
926
+ },
927
+ "page": {
928
+ "color": "{semanticTokens.text.muted}"
929
+ },
930
+ "separator": {
931
+ "color": "{foundations.colors.neutral.400}"
932
+ }
933
+ },
934
+ "loader": {
935
+ "sizes": {
936
+ "sm": 16,
937
+ "md": 24,
938
+ "lg": 32
939
+ },
940
+ "base": {
941
+ "color": "{semanticTokens.text.muted}"
942
+ },
943
+ "variants": {
944
+ "default": {
945
+ "color": "{semanticTokens.text.muted}"
946
+ },
947
+ "primary": {
948
+ "color": "{semanticTokens.action.primary}"
949
+ },
950
+ "secondary": {
951
+ "color": "{foundations.colors.brand.secondary}"
952
+ }
953
+ }
954
+ },
955
+ "progress": {
956
+ "track": {
957
+ "height": "4px",
958
+ "radius": "{foundations.radius.md}",
959
+ "background": "{semanticTokens.surface.muted}"
960
+ },
961
+ "indicator": {
962
+ "background": "{semanticTokens.action.primary}"
963
+ },
964
+ "motion": {
965
+ "duration": "{foundations.motion.duration.fast}",
966
+ "easing": "{foundations.motion.easing.out}"
967
+ }
968
+ },
969
+ "sidebar": {
970
+ "container": {
971
+ "background": "{semanticTokens.surface.default}",
972
+ "border": "{semanticTokens.border.default}",
973
+ "width": "240px",
974
+ "collapsedWidth": "64px"
975
+ },
976
+ "header": {
977
+ "titleColor": "{semanticTokens.text.muted}"
978
+ },
979
+ "item": {
980
+ "color": "{semanticTokens.text.muted}",
981
+ "hover": {
982
+ "background": "{semanticTokens.surface.hover}",
983
+ "color": "{semanticTokens.text.primary}"
984
+ },
985
+ "active": {
986
+ "background": "#F4F0FF",
987
+ "color": "{semanticTokens.action.primary}"
988
+ }
989
+ },
990
+ "toggle": {
991
+ "color": "{foundations.colors.neutral.400}",
992
+ "hoverColor": "{foundations.colors.neutral.500}"
993
+ },
994
+ "motion": {
995
+ "duration": "{foundations.motion.duration.normal}"
996
+ }
997
+ },
998
+ "navbar": {
999
+ "container": {
1000
+ "height": "64px",
1001
+ "background": "{semanticTokens.surface.default}",
1002
+ "border": "{semanticTokens.border.default}",
1003
+ "radius": "{foundations.radius.md}"
1004
+ },
1005
+ "content": {
1006
+ "maxWidth": "1440px",
1007
+ "paddingX": "{foundations.spacing.lg}"
1008
+ },
1009
+ "merchant": {
1010
+ "color": "{semanticTokens.text.primary}",
1011
+ "chevronColor": "{semanticTokens.text.muted}"
1012
+ },
1013
+ "action": {
1014
+ "gap": "{foundations.spacing.sm}"
1015
+ },
1016
+ "user": {
1017
+ "nameColor": "{semanticTokens.text.primary}",
1018
+ "roleColor": "{semanticTokens.text.muted}"
1019
+ },
1020
+ "motion": {
1021
+ "duration": "{foundations.motion.duration.fast}"
1022
+ }
1023
+ },
1024
+ "drawer": {
1025
+ "container": {
1026
+ "background": "{semanticTokens.surface.default}",
1027
+ "color": "{semanticTokens.text.primary}",
1028
+ "radius": "{foundations.radius.sm}",
1029
+ "borderWidth": "{foundations.borderWidths.sm}",
1030
+ "borderColor": "{semanticTokens.border.default}",
1031
+ "shadow": "{foundations.shadow.md}",
1032
+ "padding": "24px",
1033
+ "maxHeight": "80vh"
1034
+ },
1035
+ "overlay": {
1036
+ "background": "{semanticTokens.overlay.background}",
1037
+ "opacity": "{semanticTokens.overlay.opacity}",
1038
+ "backdropBlur": "{semanticTokens.overlay.backdropBlur}"
1039
+ },
1040
+ "title": {
1041
+ "fontSize": "{foundations.fontSizes.xl}",
1042
+ "fontWeight": "{foundations.typography.weights.semibold}",
1043
+ "lineHeight": "{foundations.lineHeights.relaxed}",
1044
+ "color": "{semanticTokens.text.primary}"
1045
+ },
1046
+ "description": {
1047
+ "fontSize": "{foundations.fontSizes.md}",
1048
+ "lineHeight": "{foundations.lineHeights.normal}",
1049
+ "color": "{semanticTokens.text.secondary}"
1050
+ },
1051
+ "close": {
1052
+ "size": "{foundations.spacing.lg}",
1053
+ "radius": "{foundations.radius.md}",
1054
+ "color": "{semanticTokens.text.secondary}",
1055
+ "hoverBackground": "{foundations.colors.neutral.100}",
1056
+ "focusRing": "{foundations.colors.neutral.200}"
1057
+ }
1058
+ },
1059
+ "icon": {
1060
+ "base": {
1061
+ "color": "{semanticTokens.action.primary}"
1062
+ },
1063
+ "sizes": {
1064
+ "xs": 12,
1065
+ "sm": 16,
1066
+ "md": 20,
1067
+ "lg": 24,
1068
+ "xl": 32
1069
+ },
1070
+ "variants": {
1071
+ "default": {
1072
+ "color": "{semanticTokens.action.primary}"
1073
+ },
1074
+ "muted": {
1075
+ "color": "{semanticTokens.text.muted}"
1076
+ },
1077
+ "danger": {
1078
+ "color": "{foundations.colors.semantic.danger}"
1079
+ },
1080
+ "success": {
1081
+ "color": "{foundations.colors.semantic.success}"
1082
+ }
1083
+ }
1084
+ }
1085
+ }
1086
+ }
1087
+ ```
1088
+ ````
1089
+
1090
+ Uso con `ThemeProvider`:
1091
+
1092
+ ```tsx
1093
+ <ThemeProvider theme={NaveTheme}>
1094
+ <App />
1095
+ </ThemeProvider>
1096
+ ```
1097
+
1098
+ Todos los componentes consumirán automáticamente estos tokens.
1099
+
1100
+ ---
1101
+
1102
+ ## ✅ Conclusión
1103
+
1104
+ Este README funciona como:
1105
+
1106
+ - 📘 Documentación oficial del Design System
1107
+ - 🧪 Playground de referencia visual
1108
+ - 🧩 Base sólida para escalar nuevos componentes
1109
+
1110
+ Estructura JSON contrato
1111
+
1112
+ ```json
1113
+ {
1114
+ "name": "XXXXX",
1115
+ "schema": "ui.theme.v1",
1116
+ "version": "4.0.0",
1117
+ "tokens": {
1118
+ "meta": {
1119
+ "theme": "light"
1120
+ },
1121
+ "foundations": {},
1122
+ "semanticTokens": {},
1123
+ "components": {}
1124
+ }
1125
+ }
1126
+ ```
1127
+
1128
+ ```env
1129
+ NEXT_PUBLIC_THEME_VERSION=4.0.1
1130
+ ```