@chroma-yesid/tokens 0.0.0-stage → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +14 -0
- package/dist/index.js +104 -0
- package/dist/native.css +66 -0
- package/dist/tokens.json +321 -0
- package/dist/tw-merge.d.ts +4 -0
- package/dist/tw-merge.js +8 -0
- package/dist/web.css +119 -0
- package/package.json +44 -3
- package/README.md +0 -3
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Generado por @chroma-yesid/tokens. No editar a mano.
|
|
2
|
+
export type ColorToken = "background" | "foreground" | "muted-foreground" | "primary" | "primary-foreground" | "secondary" | "secondary-foreground" | "border" | "ring" | "muted" | "destructive" | "destructive-foreground";
|
|
3
|
+
export type RadiusToken = "sm" | "md" | "lg" | "xl";
|
|
4
|
+
export type TextToken = "caption" | "body-sm" | "body-md" | "body-lg" | "title";
|
|
5
|
+
export type ThemeName = 'light' | 'dark';
|
|
6
|
+
|
|
7
|
+
export declare const colors: Record<ThemeName, Record<ColorToken, string>>;
|
|
8
|
+
export declare const radius: Record<RadiusToken, number>;
|
|
9
|
+
export declare const text: Record<TextToken, { size: number; lineHeight: number }>;
|
|
10
|
+
export declare const shadow: Record<'sm' | 'md' | 'lg', string>;
|
|
11
|
+
export declare const duration: Record<'fast' | 'base' | 'slow', number>;
|
|
12
|
+
export declare const ease: Record<'standard' | 'in' | 'out', string>;
|
|
13
|
+
export declare const breakpoint: Record<'sm' | 'md' | 'lg' | 'xl', number>;
|
|
14
|
+
export declare const fontFamily: Record<'sans' | 'mono', { web: string; ios: string; android: string }>;
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
// Generado por @chroma-yesid/tokens. No editar a mano.
|
|
2
|
+
export const colors = {
|
|
3
|
+
"light": {
|
|
4
|
+
"background": "#ffffff",
|
|
5
|
+
"foreground": "#09090b",
|
|
6
|
+
"muted-foreground": "#52525b",
|
|
7
|
+
"primary": "#4f46e5",
|
|
8
|
+
"primary-foreground": "#ffffff",
|
|
9
|
+
"secondary": "#f4f4f5",
|
|
10
|
+
"secondary-foreground": "#18181b",
|
|
11
|
+
"border": "#e4e4e7",
|
|
12
|
+
"ring": "#6366f1",
|
|
13
|
+
"muted": "#f4f4f5",
|
|
14
|
+
"destructive": "#b91c1c",
|
|
15
|
+
"destructive-foreground": "#ffffff"
|
|
16
|
+
},
|
|
17
|
+
"dark": {
|
|
18
|
+
"background": "#09090b",
|
|
19
|
+
"foreground": "#fafafa",
|
|
20
|
+
"muted-foreground": "#a1a1aa",
|
|
21
|
+
"primary": "#818cf8",
|
|
22
|
+
"primary-foreground": "#09090b",
|
|
23
|
+
"secondary": "#27272a",
|
|
24
|
+
"secondary-foreground": "#fafafa",
|
|
25
|
+
"border": "#27272a",
|
|
26
|
+
"ring": "#818cf8",
|
|
27
|
+
"muted": "#27272a",
|
|
28
|
+
"destructive": "#f87171",
|
|
29
|
+
"destructive-foreground": "#09090b"
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
/** Radios en px. */
|
|
34
|
+
export const radius = {
|
|
35
|
+
"sm": 4,
|
|
36
|
+
"md": 8,
|
|
37
|
+
"lg": 12,
|
|
38
|
+
"xl": 16
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
/** Tamaño de fuente y alto de línea en px. */
|
|
42
|
+
export const text = {
|
|
43
|
+
"caption": {
|
|
44
|
+
"size": 12,
|
|
45
|
+
"lineHeight": 16
|
|
46
|
+
},
|
|
47
|
+
"body-sm": {
|
|
48
|
+
"size": 14,
|
|
49
|
+
"lineHeight": 20
|
|
50
|
+
},
|
|
51
|
+
"body-md": {
|
|
52
|
+
"size": 16,
|
|
53
|
+
"lineHeight": 24
|
|
54
|
+
},
|
|
55
|
+
"body-lg": {
|
|
56
|
+
"size": 18,
|
|
57
|
+
"lineHeight": 28
|
|
58
|
+
},
|
|
59
|
+
"title": {
|
|
60
|
+
"size": 24,
|
|
61
|
+
"lineHeight": 32
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
/** Sombras como valor CSS box-shadow (web y React Native 0.76+). */
|
|
66
|
+
export const shadow = {
|
|
67
|
+
"sm": "0 1px 2px 0 rgb(0 0 0 / 0.08)",
|
|
68
|
+
"md": "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",
|
|
69
|
+
"lg": "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)"
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
/** Duraciones en ms. */
|
|
73
|
+
export const duration = {
|
|
74
|
+
"fast": 150,
|
|
75
|
+
"base": 200,
|
|
76
|
+
"slow": 300
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
export const ease = {
|
|
80
|
+
"standard": "cubic-bezier(0.2, 0, 0, 1)",
|
|
81
|
+
"in": "cubic-bezier(0.4, 0, 1, 1)",
|
|
82
|
+
"out": "cubic-bezier(0, 0, 0.2, 1)"
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
/** Breakpoints en px. */
|
|
86
|
+
export const breakpoint = {
|
|
87
|
+
"sm": 640,
|
|
88
|
+
"md": 768,
|
|
89
|
+
"lg": 1024,
|
|
90
|
+
"xl": 1280
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
export const fontFamily = {
|
|
94
|
+
"sans": {
|
|
95
|
+
"web": "Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif",
|
|
96
|
+
"ios": "System",
|
|
97
|
+
"android": "sans-serif"
|
|
98
|
+
},
|
|
99
|
+
"mono": {
|
|
100
|
+
"web": "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace",
|
|
101
|
+
"ios": "Menlo",
|
|
102
|
+
"android": "monospace"
|
|
103
|
+
}
|
|
104
|
+
};
|
package/dist/native.css
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/* Generado por @chroma-yesid/tokens (pnpm --filter @chroma-yesid/tokens build). No editar a mano. */
|
|
2
|
+
@theme {
|
|
3
|
+
--radius-sm: 4px;
|
|
4
|
+
--radius-md: 8px;
|
|
5
|
+
--radius-lg: 12px;
|
|
6
|
+
--radius-xl: 16px;
|
|
7
|
+
|
|
8
|
+
--text-caption: 12px;
|
|
9
|
+
--text-caption--line-height: 16px;
|
|
10
|
+
--text-body-sm: 14px;
|
|
11
|
+
--text-body-sm--line-height: 20px;
|
|
12
|
+
--text-body-md: 16px;
|
|
13
|
+
--text-body-md--line-height: 24px;
|
|
14
|
+
--text-body-lg: 18px;
|
|
15
|
+
--text-body-lg--line-height: 28px;
|
|
16
|
+
--text-title: 24px;
|
|
17
|
+
--text-title--line-height: 32px;
|
|
18
|
+
|
|
19
|
+
--shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.08);
|
|
20
|
+
--shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
|
|
21
|
+
--shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@layer theme {
|
|
25
|
+
:root {
|
|
26
|
+
@variant ios {
|
|
27
|
+
--font-sans: System;
|
|
28
|
+
--font-mono: Menlo;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@variant android {
|
|
32
|
+
--font-sans: sans-serif;
|
|
33
|
+
--font-mono: monospace;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@variant light {
|
|
37
|
+
--color-background: #ffffff;
|
|
38
|
+
--color-foreground: #09090b;
|
|
39
|
+
--color-muted-foreground: #52525b;
|
|
40
|
+
--color-primary: #4f46e5;
|
|
41
|
+
--color-primary-foreground: #ffffff;
|
|
42
|
+
--color-secondary: #f4f4f5;
|
|
43
|
+
--color-secondary-foreground: #18181b;
|
|
44
|
+
--color-border: #e4e4e7;
|
|
45
|
+
--color-ring: #6366f1;
|
|
46
|
+
--color-muted: #f4f4f5;
|
|
47
|
+
--color-destructive: #b91c1c;
|
|
48
|
+
--color-destructive-foreground: #ffffff;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@variant dark {
|
|
52
|
+
--color-background: #09090b;
|
|
53
|
+
--color-foreground: #fafafa;
|
|
54
|
+
--color-muted-foreground: #a1a1aa;
|
|
55
|
+
--color-primary: #818cf8;
|
|
56
|
+
--color-primary-foreground: #09090b;
|
|
57
|
+
--color-secondary: #27272a;
|
|
58
|
+
--color-secondary-foreground: #fafafa;
|
|
59
|
+
--color-border: #27272a;
|
|
60
|
+
--color-ring: #818cf8;
|
|
61
|
+
--color-muted: #27272a;
|
|
62
|
+
--color-destructive: #f87171;
|
|
63
|
+
--color-destructive-foreground: #09090b;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
package/dist/tokens.json
ADDED
|
@@ -0,0 +1,321 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"name": "background",
|
|
4
|
+
"type": "color",
|
|
5
|
+
"cssVar": "--color-background",
|
|
6
|
+
"values": {
|
|
7
|
+
"light": "#ffffff",
|
|
8
|
+
"dark": "#09090b"
|
|
9
|
+
},
|
|
10
|
+
"description": "Fondo de la página"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"name": "foreground",
|
|
14
|
+
"type": "color",
|
|
15
|
+
"cssVar": "--color-foreground",
|
|
16
|
+
"values": {
|
|
17
|
+
"light": "#09090b",
|
|
18
|
+
"dark": "#fafafa"
|
|
19
|
+
},
|
|
20
|
+
"description": "Texto principal"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"name": "muted-foreground",
|
|
24
|
+
"type": "color",
|
|
25
|
+
"cssVar": "--color-muted-foreground",
|
|
26
|
+
"values": {
|
|
27
|
+
"light": "#52525b",
|
|
28
|
+
"dark": "#a1a1aa"
|
|
29
|
+
},
|
|
30
|
+
"description": "Texto secundario"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"name": "primary",
|
|
34
|
+
"type": "color",
|
|
35
|
+
"cssVar": "--color-primary",
|
|
36
|
+
"values": {
|
|
37
|
+
"light": "#4f46e5",
|
|
38
|
+
"dark": "#818cf8"
|
|
39
|
+
},
|
|
40
|
+
"description": "Acción principal"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"name": "primary-foreground",
|
|
44
|
+
"type": "color",
|
|
45
|
+
"cssVar": "--color-primary-foreground",
|
|
46
|
+
"values": {
|
|
47
|
+
"light": "#ffffff",
|
|
48
|
+
"dark": "#09090b"
|
|
49
|
+
},
|
|
50
|
+
"description": "Texto sobre primary"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"name": "secondary",
|
|
54
|
+
"type": "color",
|
|
55
|
+
"cssVar": "--color-secondary",
|
|
56
|
+
"values": {
|
|
57
|
+
"light": "#f4f4f5",
|
|
58
|
+
"dark": "#27272a"
|
|
59
|
+
},
|
|
60
|
+
"description": "Acción secundaria"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"name": "secondary-foreground",
|
|
64
|
+
"type": "color",
|
|
65
|
+
"cssVar": "--color-secondary-foreground",
|
|
66
|
+
"values": {
|
|
67
|
+
"light": "#18181b",
|
|
68
|
+
"dark": "#fafafa"
|
|
69
|
+
},
|
|
70
|
+
"description": "Texto sobre secondary"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"name": "border",
|
|
74
|
+
"type": "color",
|
|
75
|
+
"cssVar": "--color-border",
|
|
76
|
+
"values": {
|
|
77
|
+
"light": "#e4e4e7",
|
|
78
|
+
"dark": "#27272a"
|
|
79
|
+
},
|
|
80
|
+
"description": "Bordes y divisores"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"name": "ring",
|
|
84
|
+
"type": "color",
|
|
85
|
+
"cssVar": "--color-ring",
|
|
86
|
+
"values": {
|
|
87
|
+
"light": "#6366f1",
|
|
88
|
+
"dark": "#818cf8"
|
|
89
|
+
},
|
|
90
|
+
"description": "Anillo de foco"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"name": "muted",
|
|
94
|
+
"type": "color",
|
|
95
|
+
"cssVar": "--color-muted",
|
|
96
|
+
"values": {
|
|
97
|
+
"light": "#f4f4f5",
|
|
98
|
+
"dark": "#27272a"
|
|
99
|
+
},
|
|
100
|
+
"description": "Superficies atenuadas"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"name": "destructive",
|
|
104
|
+
"type": "color",
|
|
105
|
+
"cssVar": "--color-destructive",
|
|
106
|
+
"values": {
|
|
107
|
+
"light": "#b91c1c",
|
|
108
|
+
"dark": "#f87171"
|
|
109
|
+
},
|
|
110
|
+
"description": "Acciones destructivas y errores"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"name": "destructive-foreground",
|
|
114
|
+
"type": "color",
|
|
115
|
+
"cssVar": "--color-destructive-foreground",
|
|
116
|
+
"values": {
|
|
117
|
+
"light": "#ffffff",
|
|
118
|
+
"dark": "#09090b"
|
|
119
|
+
},
|
|
120
|
+
"description": "Texto sobre destructive"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"name": "sm",
|
|
124
|
+
"type": "radius",
|
|
125
|
+
"cssVar": "--radius-sm",
|
|
126
|
+
"values": {
|
|
127
|
+
"all": "4px"
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"name": "md",
|
|
132
|
+
"type": "radius",
|
|
133
|
+
"cssVar": "--radius-md",
|
|
134
|
+
"values": {
|
|
135
|
+
"all": "8px"
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"name": "lg",
|
|
140
|
+
"type": "radius",
|
|
141
|
+
"cssVar": "--radius-lg",
|
|
142
|
+
"values": {
|
|
143
|
+
"all": "12px"
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"name": "xl",
|
|
148
|
+
"type": "radius",
|
|
149
|
+
"cssVar": "--radius-xl",
|
|
150
|
+
"values": {
|
|
151
|
+
"all": "16px"
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"name": "caption",
|
|
156
|
+
"type": "text",
|
|
157
|
+
"cssVar": "--text-caption",
|
|
158
|
+
"values": {
|
|
159
|
+
"all": "12px / 16px"
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"name": "body-sm",
|
|
164
|
+
"type": "text",
|
|
165
|
+
"cssVar": "--text-body-sm",
|
|
166
|
+
"values": {
|
|
167
|
+
"all": "14px / 20px"
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"name": "body-md",
|
|
172
|
+
"type": "text",
|
|
173
|
+
"cssVar": "--text-body-md",
|
|
174
|
+
"values": {
|
|
175
|
+
"all": "16px / 24px"
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"name": "body-lg",
|
|
180
|
+
"type": "text",
|
|
181
|
+
"cssVar": "--text-body-lg",
|
|
182
|
+
"values": {
|
|
183
|
+
"all": "18px / 28px"
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"name": "title",
|
|
188
|
+
"type": "text",
|
|
189
|
+
"cssVar": "--text-title",
|
|
190
|
+
"values": {
|
|
191
|
+
"all": "24px / 32px"
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
"name": "sm",
|
|
196
|
+
"type": "shadow",
|
|
197
|
+
"cssVar": "--shadow-sm",
|
|
198
|
+
"values": {
|
|
199
|
+
"all": "0 1px 2px 0 rgb(0 0 0 / 0.08)"
|
|
200
|
+
},
|
|
201
|
+
"description": "Elementos sutilmente elevados"
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
"name": "md",
|
|
205
|
+
"type": "shadow",
|
|
206
|
+
"cssVar": "--shadow-md",
|
|
207
|
+
"values": {
|
|
208
|
+
"all": "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)"
|
|
209
|
+
},
|
|
210
|
+
"description": "Tarjetas y menús"
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
"name": "lg",
|
|
214
|
+
"type": "shadow",
|
|
215
|
+
"cssVar": "--shadow-lg",
|
|
216
|
+
"values": {
|
|
217
|
+
"all": "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)"
|
|
218
|
+
},
|
|
219
|
+
"description": "Diálogos y popovers"
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
"name": "fast",
|
|
223
|
+
"type": "duration",
|
|
224
|
+
"cssVar": "--ds-duration-fast",
|
|
225
|
+
"values": {
|
|
226
|
+
"all": "150ms"
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
"name": "base",
|
|
231
|
+
"type": "duration",
|
|
232
|
+
"cssVar": "--ds-duration-base",
|
|
233
|
+
"values": {
|
|
234
|
+
"all": "200ms"
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
"name": "slow",
|
|
239
|
+
"type": "duration",
|
|
240
|
+
"cssVar": "--ds-duration-slow",
|
|
241
|
+
"values": {
|
|
242
|
+
"all": "300ms"
|
|
243
|
+
}
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
"name": "standard",
|
|
247
|
+
"type": "ease",
|
|
248
|
+
"cssVar": "--ease-standard",
|
|
249
|
+
"values": {
|
|
250
|
+
"all": "cubic-bezier(0.2, 0, 0, 1)"
|
|
251
|
+
}
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
"name": "in",
|
|
255
|
+
"type": "ease",
|
|
256
|
+
"cssVar": "--ease-in",
|
|
257
|
+
"values": {
|
|
258
|
+
"all": "cubic-bezier(0.4, 0, 1, 1)"
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
"name": "out",
|
|
263
|
+
"type": "ease",
|
|
264
|
+
"cssVar": "--ease-out",
|
|
265
|
+
"values": {
|
|
266
|
+
"all": "cubic-bezier(0, 0, 0.2, 1)"
|
|
267
|
+
}
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
"name": "sm",
|
|
271
|
+
"type": "breakpoint",
|
|
272
|
+
"cssVar": "--breakpoint-sm",
|
|
273
|
+
"values": {
|
|
274
|
+
"all": "640px"
|
|
275
|
+
}
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
"name": "md",
|
|
279
|
+
"type": "breakpoint",
|
|
280
|
+
"cssVar": "--breakpoint-md",
|
|
281
|
+
"values": {
|
|
282
|
+
"all": "768px"
|
|
283
|
+
}
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
"name": "lg",
|
|
287
|
+
"type": "breakpoint",
|
|
288
|
+
"cssVar": "--breakpoint-lg",
|
|
289
|
+
"values": {
|
|
290
|
+
"all": "1024px"
|
|
291
|
+
}
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
"name": "xl",
|
|
295
|
+
"type": "breakpoint",
|
|
296
|
+
"cssVar": "--breakpoint-xl",
|
|
297
|
+
"values": {
|
|
298
|
+
"all": "1280px"
|
|
299
|
+
}
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
"name": "sans",
|
|
303
|
+
"type": "font",
|
|
304
|
+
"cssVar": "--font-sans",
|
|
305
|
+
"values": {
|
|
306
|
+
"web": "Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif",
|
|
307
|
+
"ios": "System",
|
|
308
|
+
"android": "sans-serif"
|
|
309
|
+
}
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
"name": "mono",
|
|
313
|
+
"type": "font",
|
|
314
|
+
"cssVar": "--font-mono",
|
|
315
|
+
"values": {
|
|
316
|
+
"web": "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace",
|
|
317
|
+
"ios": "Menlo",
|
|
318
|
+
"android": "monospace"
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
]
|
package/dist/tw-merge.js
ADDED
package/dist/web.css
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
/* Generado por @chroma-yesid/tokens (pnpm --filter @chroma-yesid/tokens build). No editar a mano. */
|
|
2
|
+
@custom-variant dark (&:where([data-theme="dark"], [data-theme="dark"] *));
|
|
3
|
+
|
|
4
|
+
@theme {
|
|
5
|
+
/* La paleta por defecto de Tailwind se elimina: solo existen colores semánticos. */
|
|
6
|
+
--color-*: initial;
|
|
7
|
+
--color-transparent: transparent;
|
|
8
|
+
--color-current: currentColor;
|
|
9
|
+
|
|
10
|
+
--radius-sm: 0.25rem;
|
|
11
|
+
--radius-md: 0.5rem;
|
|
12
|
+
--radius-lg: 0.75rem;
|
|
13
|
+
--radius-xl: 1rem;
|
|
14
|
+
|
|
15
|
+
--text-caption: 0.75rem;
|
|
16
|
+
--text-caption--line-height: 1rem;
|
|
17
|
+
--text-body-sm: 0.875rem;
|
|
18
|
+
--text-body-sm--line-height: 1.25rem;
|
|
19
|
+
--text-body-md: 1rem;
|
|
20
|
+
--text-body-md--line-height: 1.5rem;
|
|
21
|
+
--text-body-lg: 1.125rem;
|
|
22
|
+
--text-body-lg--line-height: 1.75rem;
|
|
23
|
+
--text-title: 1.5rem;
|
|
24
|
+
--text-title--line-height: 2rem;
|
|
25
|
+
|
|
26
|
+
--shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.08);
|
|
27
|
+
--shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
|
|
28
|
+
--shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
|
|
29
|
+
|
|
30
|
+
--ease-standard: cubic-bezier(0.2, 0, 0, 1);
|
|
31
|
+
--ease-in: cubic-bezier(0.4, 0, 1, 1);
|
|
32
|
+
--ease-out: cubic-bezier(0, 0, 0.2, 1);
|
|
33
|
+
|
|
34
|
+
--breakpoint-sm: 40rem;
|
|
35
|
+
--breakpoint-md: 48rem;
|
|
36
|
+
--breakpoint-lg: 64rem;
|
|
37
|
+
--breakpoint-xl: 80rem;
|
|
38
|
+
|
|
39
|
+
--font-sans: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
|
|
40
|
+
--font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/* Duraciones: no son un namespace de Tailwind; se usan como duration-(--ds-duration-base). */
|
|
44
|
+
:root {
|
|
45
|
+
--ds-duration-fast: 150ms;
|
|
46
|
+
--ds-duration-base: 200ms;
|
|
47
|
+
--ds-duration-slow: 300ms;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/* "inline" hace que bg-primary emita var(--ds-primary) directamente, así el cambio de
|
|
51
|
+
tema funciona aunque las variables vivan fuera de :root. */
|
|
52
|
+
@theme inline {
|
|
53
|
+
--color-background: var(--ds-background);
|
|
54
|
+
--color-foreground: var(--ds-foreground);
|
|
55
|
+
--color-muted-foreground: var(--ds-muted-foreground);
|
|
56
|
+
--color-primary: var(--ds-primary);
|
|
57
|
+
--color-primary-foreground: var(--ds-primary-foreground);
|
|
58
|
+
--color-secondary: var(--ds-secondary);
|
|
59
|
+
--color-secondary-foreground: var(--ds-secondary-foreground);
|
|
60
|
+
--color-border: var(--ds-border);
|
|
61
|
+
--color-ring: var(--ds-ring);
|
|
62
|
+
--color-muted: var(--ds-muted);
|
|
63
|
+
--color-destructive: var(--ds-destructive);
|
|
64
|
+
--color-destructive-foreground: var(--ds-destructive-foreground);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/* Tema claro por defecto; el oscuro se activa con data-theme="dark" en <html>. */
|
|
68
|
+
:root,
|
|
69
|
+
[data-theme="light"] {
|
|
70
|
+
color-scheme: light;
|
|
71
|
+
--ds-background: #ffffff;
|
|
72
|
+
--ds-foreground: #09090b;
|
|
73
|
+
--ds-muted-foreground: #52525b;
|
|
74
|
+
--ds-primary: #4f46e5;
|
|
75
|
+
--ds-primary-foreground: #ffffff;
|
|
76
|
+
--ds-secondary: #f4f4f5;
|
|
77
|
+
--ds-secondary-foreground: #18181b;
|
|
78
|
+
--ds-border: #e4e4e7;
|
|
79
|
+
--ds-ring: #6366f1;
|
|
80
|
+
--ds-muted: #f4f4f5;
|
|
81
|
+
--ds-destructive: #b91c1c;
|
|
82
|
+
--ds-destructive-foreground: #ffffff;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
[data-theme="dark"] {
|
|
86
|
+
color-scheme: dark;
|
|
87
|
+
--ds-background: #09090b;
|
|
88
|
+
--ds-foreground: #fafafa;
|
|
89
|
+
--ds-muted-foreground: #a1a1aa;
|
|
90
|
+
--ds-primary: #818cf8;
|
|
91
|
+
--ds-primary-foreground: #09090b;
|
|
92
|
+
--ds-secondary: #27272a;
|
|
93
|
+
--ds-secondary-foreground: #fafafa;
|
|
94
|
+
--ds-border: #27272a;
|
|
95
|
+
--ds-ring: #818cf8;
|
|
96
|
+
--ds-muted: #27272a;
|
|
97
|
+
--ds-destructive: #f87171;
|
|
98
|
+
--ds-destructive-foreground: #09090b;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/* Movimiento reducido: la preferencia del sistema gana a cualquier animación o transición,
|
|
102
|
+
también a las de componentes de terceros. Las duraciones no llegan a 0 para que los eventos
|
|
103
|
+
de fin de transición (transitionend) sigan disparándose. */
|
|
104
|
+
@media (prefers-reduced-motion: reduce) {
|
|
105
|
+
:root {
|
|
106
|
+
--ds-duration-fast: 1ms;
|
|
107
|
+
--ds-duration-base: 1ms;
|
|
108
|
+
--ds-duration-slow: 1ms;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
*,
|
|
112
|
+
*::before,
|
|
113
|
+
*::after {
|
|
114
|
+
animation-duration: 1ms !important;
|
|
115
|
+
animation-iteration-count: 1 !important;
|
|
116
|
+
transition-duration: 1ms !important;
|
|
117
|
+
scroll-behavior: auto !important;
|
|
118
|
+
}
|
|
119
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,47 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chroma-yesid/tokens",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Design tokens (DTCG) y sus salidas para Tailwind v4 (web), Uniwind (native) y TypeScript",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"**/*.css"
|
|
8
|
+
],
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"default": "./dist/index.js"
|
|
13
|
+
},
|
|
14
|
+
"./web.css": "./dist/web.css",
|
|
15
|
+
"./native.css": "./dist/native.css",
|
|
16
|
+
"./tokens.json": "./dist/tokens.json",
|
|
17
|
+
"./tw-merge": {
|
|
18
|
+
"types": "./dist/tw-merge.d.ts",
|
|
19
|
+
"default": "./dist/tw-merge.js"
|
|
20
|
+
},
|
|
21
|
+
"./package.json": "./package.json"
|
|
22
|
+
},
|
|
23
|
+
"files": [
|
|
24
|
+
"dist"
|
|
25
|
+
],
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@types/node": "^24.13.3",
|
|
28
|
+
"@chroma-yesid/tsconfig": "0.0.0",
|
|
29
|
+
"style-dictionary": "^5.7.0",
|
|
30
|
+
"tailwind-merge": "^3.7.0",
|
|
31
|
+
"typescript": "~6.0.3"
|
|
32
|
+
},
|
|
33
|
+
"publishConfig": {
|
|
34
|
+
"access": "public"
|
|
35
|
+
},
|
|
36
|
+
"license": "MIT",
|
|
37
|
+
"repository": {
|
|
38
|
+
"type": "git",
|
|
39
|
+
"url": "git+https://github.com/YesidCarrillo26/design-system.git",
|
|
40
|
+
"directory": "packages/tokens"
|
|
41
|
+
},
|
|
42
|
+
"scripts": {
|
|
43
|
+
"build": "node sd/build.ts",
|
|
44
|
+
"typecheck": "tsc --noEmit",
|
|
45
|
+
"test:unit": "node --test \"sd/**/*.test.ts\""
|
|
46
|
+
}
|
|
6
47
|
}
|
package/README.md
DELETED