@rainersoft/design-tokens 1.0.2 → 1.0.4
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/formats/tailwind.config.ts +45 -1
- package/formats/tokens.json +2 -2
- package/package.json +30 -24
- package/tokens/animations.json +59 -0
- package/tokens/index.ts +33 -0
|
@@ -33,7 +33,7 @@ import { tokens } from '../tokens';
|
|
|
33
33
|
* @description
|
|
34
34
|
* Objeto de configuração completo do Tailwind CSS que estende o tema padrão
|
|
35
35
|
* com todos os tokens de design do sistema. Inclui cores, tipografia,
|
|
36
|
-
* espaçamento, raios de borda e
|
|
36
|
+
* espaçamento, raios de borda, sombras e animações.
|
|
37
37
|
*
|
|
38
38
|
* @type {Object}
|
|
39
39
|
* @property {Object} theme - Configurações de tema do Tailwind
|
|
@@ -47,6 +47,8 @@ import { tokens } from '../tokens';
|
|
|
47
47
|
* @property {Object} theme.extend.spacing - Espaçamentos dos tokens
|
|
48
48
|
* @property {Object} theme.extend.borderRadius - Raios de borda dos tokens
|
|
49
49
|
* @property {Object} theme.extend.boxShadow - Sombras dos tokens (incluindo efeitos glow)
|
|
50
|
+
* @property {Object} theme.extend.animation - Animações dos tokens (nome, duração, timing)
|
|
51
|
+
* @property {Object} theme.extend.keyframes - Keyframes das animações
|
|
50
52
|
* @property {string} darkMode - Modo escuro configurado como 'class'
|
|
51
53
|
*
|
|
52
54
|
* @constant
|
|
@@ -230,6 +232,48 @@ export const tailwindConfig = {
|
|
|
230
232
|
'glow-purple': '0 0 20px rgba(125, 0, 255, 0.5), 0 0 40px rgba(125, 0, 255, 0.3)',
|
|
231
233
|
'glow-green': '0 0 20px rgba(0, 255, 0, 0.5), 0 0 40px rgba(0, 255, 0, 0.3)',
|
|
232
234
|
},
|
|
235
|
+
animation: {
|
|
236
|
+
'accordion-down': 'accordion-down 0.2s ease-out',
|
|
237
|
+
'accordion-up': 'accordion-up 0.2s ease-out',
|
|
238
|
+
'slide-in': 'slide-in 0.3s ease-out',
|
|
239
|
+
'fade-in': 'fade-in 0.5s ease-in',
|
|
240
|
+
},
|
|
241
|
+
keyframes: {
|
|
242
|
+
'accordion-down': {
|
|
243
|
+
'from': {
|
|
244
|
+
height: '0',
|
|
245
|
+
},
|
|
246
|
+
'to': {
|
|
247
|
+
height: 'var(--radix-accordion-content-height)',
|
|
248
|
+
},
|
|
249
|
+
},
|
|
250
|
+
'accordion-up': {
|
|
251
|
+
'from': {
|
|
252
|
+
height: 'var(--radix-accordion-content-height)',
|
|
253
|
+
},
|
|
254
|
+
'to': {
|
|
255
|
+
height: '0',
|
|
256
|
+
},
|
|
257
|
+
},
|
|
258
|
+
'slide-in': {
|
|
259
|
+
'0%': {
|
|
260
|
+
transform: 'translateY(-10px)',
|
|
261
|
+
opacity: '0',
|
|
262
|
+
},
|
|
263
|
+
'100%': {
|
|
264
|
+
transform: 'translateY(0)',
|
|
265
|
+
opacity: '1',
|
|
266
|
+
},
|
|
267
|
+
},
|
|
268
|
+
'fade-in': {
|
|
269
|
+
'0%': {
|
|
270
|
+
opacity: '0',
|
|
271
|
+
},
|
|
272
|
+
'100%': {
|
|
273
|
+
opacity: '1',
|
|
274
|
+
},
|
|
275
|
+
},
|
|
276
|
+
},
|
|
233
277
|
},
|
|
234
278
|
},
|
|
235
279
|
darkMode: 'class',
|
package/formats/tokens.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/rainer-design-tokens.json",
|
|
3
3
|
"name": "@rainersoft/design-tokens",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.4",
|
|
5
5
|
"description": "Universal design tokens export for Rainer Design System",
|
|
6
6
|
"$generated": "This file is auto-generated. Do not edit manually.",
|
|
7
7
|
"$source": "tokens/*.json",
|
|
@@ -41,6 +41,6 @@
|
|
|
41
41
|
"repository": "https://github.com/RainerTeixeira/rainer-design-tokens.git",
|
|
42
42
|
"author": "Rainer Teixeira <suporte@rainersoft.com.br>",
|
|
43
43
|
"license": "MIT",
|
|
44
|
-
"generatedAt": "2025-11-
|
|
44
|
+
"generatedAt": "2025-11-18T16:07:11.606Z"
|
|
45
45
|
}
|
|
46
46
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rainersoft/design-tokens",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Design tokens profissionais seguindo padrões W3C/DTCG, com estrutura modular e suporte a tokens primitivos e semânticos.",
|
|
6
6
|
"author": "Rainer Teixeira <suporte@rainersoft.com.br>",
|
|
@@ -46,6 +46,11 @@
|
|
|
46
46
|
},
|
|
47
47
|
"./formats/css-vars.css": "./formats/css-vars.css",
|
|
48
48
|
"./formats/tokens.json": "./formats/tokens.json",
|
|
49
|
+
"./formats/tailwind.config": {
|
|
50
|
+
"types": "./formats/tailwind.config.ts",
|
|
51
|
+
"import": "./formats/tailwind.config.ts",
|
|
52
|
+
"require": "./formats/tailwind.config.ts"
|
|
53
|
+
},
|
|
49
54
|
"./package.json": "./package.json"
|
|
50
55
|
},
|
|
51
56
|
"files": [
|
|
@@ -56,6 +61,29 @@
|
|
|
56
61
|
"README.md",
|
|
57
62
|
"LICENSE"
|
|
58
63
|
],
|
|
64
|
+
"scripts": {
|
|
65
|
+
"build": "pnpm run build:formats && tsup",
|
|
66
|
+
"build:formats": "tsx scripts/build-formats.ts",
|
|
67
|
+
"build:css": "tsx scripts/build-css.ts",
|
|
68
|
+
"build:tailwind": "tsx scripts/build-tailwind.ts",
|
|
69
|
+
"build:tokens-json": "tsx scripts/build-tokens-json.ts",
|
|
70
|
+
"dev": "tsup --watch",
|
|
71
|
+
"type-check": "tsc --noEmit",
|
|
72
|
+
"lint": "pnpm exec eslint .",
|
|
73
|
+
"test": "echo \"No tests configured\" && exit 0",
|
|
74
|
+
"test:watch": "jest --watch",
|
|
75
|
+
"test:coverage": "jest --coverage",
|
|
76
|
+
"prepare:publish": "node scripts/prepare-publish.js",
|
|
77
|
+
"setup:auth": "node scripts/setup-npm-auth.js",
|
|
78
|
+
"prepublishOnly": "pnpm run build:formats && pnpm run type-check",
|
|
79
|
+
"clean": "node -e \"require('fs').rmSync('dist', {recursive: true, force: true})\"",
|
|
80
|
+
"storybook": "storybook dev -p 6006",
|
|
81
|
+
"build-storybook": "storybook build",
|
|
82
|
+
"update:dates": "tsx scripts/update-dates.ts",
|
|
83
|
+
"setup": "pnpm install",
|
|
84
|
+
"setup:clean": "pnpm run clean:all && pnpm install",
|
|
85
|
+
"clean:all": "pnpm exec rimraf node_modules pnpm-lock.yaml dist .storybook-build"
|
|
86
|
+
},
|
|
59
87
|
"peerDependencies": {
|
|
60
88
|
"react": ">=18.0.0"
|
|
61
89
|
},
|
|
@@ -91,27 +119,5 @@
|
|
|
91
119
|
"bugs": {
|
|
92
120
|
"url": "https://github.com/RainerTeixeira/rainer-design-tokens/issues"
|
|
93
121
|
},
|
|
94
|
-
"homepage": "https://github.com/RainerTeixeira/rainer-design-tokens#readme"
|
|
95
|
-
"scripts": {
|
|
96
|
-
"build": "pnpm run build:formats && tsup",
|
|
97
|
-
"build:formats": "tsx scripts/build-formats.ts",
|
|
98
|
-
"build:css": "tsx scripts/build-css.ts",
|
|
99
|
-
"build:tailwind": "tsx scripts/build-tailwind.ts",
|
|
100
|
-
"build:tokens-json": "tsx scripts/build-tokens-json.ts",
|
|
101
|
-
"dev": "tsup --watch",
|
|
102
|
-
"type-check": "tsc --noEmit",
|
|
103
|
-
"lint": "pnpm exec eslint .",
|
|
104
|
-
"test": "echo \"No tests configured\" && exit 0",
|
|
105
|
-
"test:watch": "jest --watch",
|
|
106
|
-
"test:coverage": "jest --coverage",
|
|
107
|
-
"prepare:publish": "node scripts/prepare-publish.js",
|
|
108
|
-
"setup:auth": "node scripts/setup-npm-auth.js",
|
|
109
|
-
"clean": "node -e \"require('fs').rmSync('dist', {recursive: true, force: true})\"",
|
|
110
|
-
"storybook": "storybook dev -p 6006",
|
|
111
|
-
"build-storybook": "storybook build",
|
|
112
|
-
"update:dates": "tsx scripts/update-dates.ts",
|
|
113
|
-
"setup": "pnpm install",
|
|
114
|
-
"setup:clean": "pnpm run clean:all && pnpm install",
|
|
115
|
-
"clean:all": "pnpm exec rimraf node_modules pnpm-lock.yaml dist .storybook-build"
|
|
116
|
-
}
|
|
122
|
+
"homepage": "https://github.com/RainerTeixeira/rainer-design-tokens#readme"
|
|
117
123
|
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"animations": {
|
|
3
|
+
"accordion-down": {
|
|
4
|
+
"name": "accordion-down",
|
|
5
|
+
"duration": "0.2s",
|
|
6
|
+
"timingFunction": "ease-out",
|
|
7
|
+
"keyframes": {
|
|
8
|
+
"from": {
|
|
9
|
+
"height": "0"
|
|
10
|
+
},
|
|
11
|
+
"to": {
|
|
12
|
+
"height": "var(--radix-accordion-content-height)"
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"accordion-up": {
|
|
17
|
+
"name": "accordion-up",
|
|
18
|
+
"duration": "0.2s",
|
|
19
|
+
"timingFunction": "ease-out",
|
|
20
|
+
"keyframes": {
|
|
21
|
+
"from": {
|
|
22
|
+
"height": "var(--radix-accordion-content-height)"
|
|
23
|
+
},
|
|
24
|
+
"to": {
|
|
25
|
+
"height": "0"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"slide-in": {
|
|
30
|
+
"name": "slide-in",
|
|
31
|
+
"duration": "0.3s",
|
|
32
|
+
"timingFunction": "ease-out",
|
|
33
|
+
"keyframes": {
|
|
34
|
+
"0%": {
|
|
35
|
+
"transform": "translateY(-10px)",
|
|
36
|
+
"opacity": "0"
|
|
37
|
+
},
|
|
38
|
+
"100%": {
|
|
39
|
+
"transform": "translateY(0)",
|
|
40
|
+
"opacity": "1"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"fade-in": {
|
|
45
|
+
"name": "fade-in",
|
|
46
|
+
"duration": "0.5s",
|
|
47
|
+
"timingFunction": "ease-in",
|
|
48
|
+
"keyframes": {
|
|
49
|
+
"0%": {
|
|
50
|
+
"opacity": "0"
|
|
51
|
+
},
|
|
52
|
+
"100%": {
|
|
53
|
+
"opacity": "1"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
package/tokens/index.ts
CHANGED
|
@@ -18,6 +18,7 @@ import typography from './typography.json';
|
|
|
18
18
|
import spacing from './spacing.json';
|
|
19
19
|
import radius from './radius.json';
|
|
20
20
|
import shadows from './shadows.json';
|
|
21
|
+
import animations from './animations.json';
|
|
21
22
|
|
|
22
23
|
// Utility tokens (Tailwind CSS classes)
|
|
23
24
|
export * from './utilities';
|
|
@@ -40,6 +41,7 @@ export * from './accessibility';
|
|
|
40
41
|
* @property {Object} spacing - Tokens de espaçamento (margens, paddings)
|
|
41
42
|
* @property {Object} radius - Tokens de raio de borda
|
|
42
43
|
* @property {Object} shadows - Tokens de sombras para ambos os temas
|
|
44
|
+
* @property {Object} animations - Tokens de animações (keyframes e durações)
|
|
43
45
|
*
|
|
44
46
|
* @constant
|
|
45
47
|
* @readonly
|
|
@@ -64,6 +66,7 @@ export const tokens = {
|
|
|
64
66
|
spacing: spacing.spacing,
|
|
65
67
|
radius: radius.radius,
|
|
66
68
|
shadows: shadows.shadows,
|
|
69
|
+
animations: animations.animations,
|
|
67
70
|
} as const;
|
|
68
71
|
|
|
69
72
|
/**
|
|
@@ -186,6 +189,27 @@ export const radiusTokens = radius.radius;
|
|
|
186
189
|
*/
|
|
187
190
|
export const shadowTokens = shadows.shadows;
|
|
188
191
|
|
|
192
|
+
/**
|
|
193
|
+
* Tokens de animações
|
|
194
|
+
*
|
|
195
|
+
* @description
|
|
196
|
+
* Exporta todos os tokens de animações, incluindo keyframes, durações
|
|
197
|
+
* e funções de timing para transições e animações do sistema.
|
|
198
|
+
*
|
|
199
|
+
* @type {Object}
|
|
200
|
+
* @constant
|
|
201
|
+
* @readonly
|
|
202
|
+
*
|
|
203
|
+
* @example
|
|
204
|
+
* ```typescript
|
|
205
|
+
* import { animationTokens } from 'rainer-design-tokens';
|
|
206
|
+
*
|
|
207
|
+
* const slideIn = animationTokens['slide-in'];
|
|
208
|
+
* const fadeIn = animationTokens['fade-in'];
|
|
209
|
+
* ```
|
|
210
|
+
*/
|
|
211
|
+
export const animationTokens = animations.animations;
|
|
212
|
+
|
|
189
213
|
/**
|
|
190
214
|
* Tipo TypeScript para todos os tokens
|
|
191
215
|
*
|
|
@@ -250,6 +274,15 @@ export type Radius = typeof radius.radius;
|
|
|
250
274
|
*/
|
|
251
275
|
export type Shadows = typeof shadows.shadows;
|
|
252
276
|
|
|
277
|
+
/**
|
|
278
|
+
* Tipo TypeScript para tokens de animações
|
|
279
|
+
*
|
|
280
|
+
* @typedef {Object} Animations
|
|
281
|
+
* @description
|
|
282
|
+
* Tipo que representa todos os tokens de animações.
|
|
283
|
+
*/
|
|
284
|
+
export type Animations = typeof animations.animations;
|
|
285
|
+
|
|
253
286
|
/**
|
|
254
287
|
* Exportação padrão dos tokens
|
|
255
288
|
*
|