@rainersoft/design-tokens 1.0.0
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/LICENSE +149 -0
- package/README.md +544 -0
- package/dist/index.cjs +944 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +4623 -0
- package/dist/index.d.ts +4623 -0
- package/dist/index.js +898 -0
- package/dist/index.js.map +1 -0
- package/formats/css-vars.css +237 -0
- package/formats/tailwind.config.ts +247 -0
- package/formats/tokens.json +46 -0
- package/package.json +118 -0
- package/themes/dark.ts +89 -0
- package/themes/index.ts +99 -0
- package/themes/light.ts +88 -0
- package/tokens/accessibility.ts +280 -0
- package/tokens/colors/dark.json +173 -0
- package/tokens/colors/light.json +149 -0
- package/tokens/index.ts +263 -0
- package/tokens/radius.json +16 -0
- package/tokens/shadows.json +33 -0
- package/tokens/spacing.json +42 -0
- package/tokens/typography.json +264 -0
- package/tokens/utilities.ts +177 -0
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Configuração do Tailwind CSS gerada a partir dos design tokens
|
|
3
|
+
*
|
|
4
|
+
* @description
|
|
5
|
+
* Configuração do Tailwind CSS gerada automaticamente a partir dos design tokens
|
|
6
|
+
* para integração perfeita. Use esta configuração no seu tailwind.config.js
|
|
7
|
+
* através de theme.extend para ter acesso a todos os tokens como classes utilitárias.
|
|
8
|
+
*
|
|
9
|
+
* @module formats/tailwind.config
|
|
10
|
+
* @version 4.0.0
|
|
11
|
+
* @author Rainer Teixeira
|
|
12
|
+
* @since 1.0.0
|
|
13
|
+
* @generated This file is auto-generated. Do not edit manually.
|
|
14
|
+
* @source tokens/*.json
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```typescript
|
|
18
|
+
* // tailwind.config.js
|
|
19
|
+
* const { tailwindConfig } = require('rainer-design-tokens/formats/tailwind.config');
|
|
20
|
+
*
|
|
21
|
+
* module.exports = {
|
|
22
|
+
* ...tailwindConfig,
|
|
23
|
+
* // Suas configurações adicionais
|
|
24
|
+
* };
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
import { tokens } from '../tokens';
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Configuração do Tailwind CSS baseada nos design tokens
|
|
32
|
+
*
|
|
33
|
+
* @description
|
|
34
|
+
* Objeto de configuração completo do Tailwind CSS que estende o tema padrão
|
|
35
|
+
* com todos os tokens de design do sistema. Inclui cores, tipografia,
|
|
36
|
+
* espaçamento, raios de borda e sombras.
|
|
37
|
+
*
|
|
38
|
+
* @type {Object}
|
|
39
|
+
* @property {Object} theme - Configurações de tema do Tailwind
|
|
40
|
+
* @property {Object} theme.extend - Extensões do tema padrão
|
|
41
|
+
* @property {Object} theme.extend.colors - Cores customizadas (brand, background, surface, text, border, status)
|
|
42
|
+
* @property {Object} theme.extend.fontFamily - Famílias de fontes customizadas
|
|
43
|
+
* @property {Object} theme.extend.fontSize - Tamanhos de fonte dos tokens
|
|
44
|
+
* @property {Object} theme.extend.fontWeight - Pesos de fonte dos tokens
|
|
45
|
+
* @property {Object} theme.extend.lineHeight - Alturas de linha dos tokens
|
|
46
|
+
* @property {Object} theme.extend.letterSpacing - Espaçamento entre letras dos tokens
|
|
47
|
+
* @property {Object} theme.extend.spacing - Espaçamentos dos tokens
|
|
48
|
+
* @property {Object} theme.extend.borderRadius - Raios de borda dos tokens
|
|
49
|
+
* @property {Object} theme.extend.boxShadow - Sombras dos tokens (incluindo efeitos glow)
|
|
50
|
+
* @property {string} darkMode - Modo escuro configurado como 'class'
|
|
51
|
+
*
|
|
52
|
+
* @constant
|
|
53
|
+
* @readonly
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```typescript
|
|
57
|
+
* import { tailwindConfig } from 'rainer-design-tokens/formats/tailwind.config';
|
|
58
|
+
*
|
|
59
|
+
* // Usar em tailwind.config.js
|
|
60
|
+
* export default {
|
|
61
|
+
* ...tailwindConfig,
|
|
62
|
+
* content: ['./src'],
|
|
63
|
+
* };
|
|
64
|
+
*
|
|
65
|
+
* // Agora você pode usar as classes em seus componentes
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
68
|
+
export const tailwindConfig = {
|
|
69
|
+
theme: {
|
|
70
|
+
extend: {
|
|
71
|
+
colors: {
|
|
72
|
+
// Primary colors
|
|
73
|
+
primary: {
|
|
74
|
+
base: '#0891b2',
|
|
75
|
+
hover: '#0e7490',
|
|
76
|
+
active: '#155e75',
|
|
77
|
+
disabled: '#d4d4d4',
|
|
78
|
+
focus: '#0891b2',
|
|
79
|
+
background: '#ecfeff',
|
|
80
|
+
backgroundHover: '#cffafe',
|
|
81
|
+
backgroundActive: '#a5f3fc',
|
|
82
|
+
border: '#0891b2',
|
|
83
|
+
borderHover: '#0e7490',
|
|
84
|
+
borderFocus: '#06b6d4',
|
|
85
|
+
text: '#ffffff',
|
|
86
|
+
textHover: '#ffffff',
|
|
87
|
+
textDisabled: '#a3a3a3',
|
|
88
|
+
},
|
|
89
|
+
// Secondary colors
|
|
90
|
+
secondary: {
|
|
91
|
+
base: '#9333ea',
|
|
92
|
+
hover: '#7e22ce',
|
|
93
|
+
active: '#6b21a8',
|
|
94
|
+
disabled: '#d4d4d4',
|
|
95
|
+
focus: '#9333ea',
|
|
96
|
+
background: '#faf5ff',
|
|
97
|
+
backgroundHover: '#f3e8ff',
|
|
98
|
+
backgroundActive: '#e9d5ff',
|
|
99
|
+
border: '#9333ea',
|
|
100
|
+
borderHover: '#7e22ce',
|
|
101
|
+
borderFocus: '#a855f7',
|
|
102
|
+
text: '#ffffff',
|
|
103
|
+
textHover: '#ffffff',
|
|
104
|
+
textDisabled: '#a3a3a3',
|
|
105
|
+
},
|
|
106
|
+
// Accent colors
|
|
107
|
+
accent: {
|
|
108
|
+
base: '#db2777',
|
|
109
|
+
hover: '#be185d',
|
|
110
|
+
active: '#9f1239',
|
|
111
|
+
disabled: '#d4d4d4',
|
|
112
|
+
focus: '#db2777',
|
|
113
|
+
background: '#fdf2f8',
|
|
114
|
+
backgroundHover: '#fce7f3',
|
|
115
|
+
backgroundActive: '#fbcfe8',
|
|
116
|
+
border: '#db2777',
|
|
117
|
+
borderHover: '#be185d',
|
|
118
|
+
borderFocus: '#ec4899',
|
|
119
|
+
text: '#ffffff',
|
|
120
|
+
textHover: '#ffffff',
|
|
121
|
+
textDisabled: '#a3a3a3',
|
|
122
|
+
},
|
|
123
|
+
// Background colors
|
|
124
|
+
background: {
|
|
125
|
+
primary: '#ffffff',
|
|
126
|
+
secondary: '#fafafa',
|
|
127
|
+
tertiary: '#f5f5f5',
|
|
128
|
+
inverse: '#0a0a0f',
|
|
129
|
+
overlay: 'rgba(0, 0, 0, 0.5)',
|
|
130
|
+
muted: '#f9fafb',
|
|
131
|
+
},
|
|
132
|
+
// Surface colors
|
|
133
|
+
surface: {
|
|
134
|
+
primary: '#ffffff',
|
|
135
|
+
secondary: '#fafafa',
|
|
136
|
+
tertiary: '#f5f5f5',
|
|
137
|
+
elevated: '#ffffff',
|
|
138
|
+
overlay: 'rgba(0, 0, 0, 0.5)',
|
|
139
|
+
hover: '#f9fafb',
|
|
140
|
+
active: '#f3f4f6',
|
|
141
|
+
},
|
|
142
|
+
// Text colors
|
|
143
|
+
text: {
|
|
144
|
+
primary: '#171717',
|
|
145
|
+
secondary: '#404040',
|
|
146
|
+
tertiary: '#737373',
|
|
147
|
+
inverse: '#ffffff',
|
|
148
|
+
disabled: '#a3a3a3',
|
|
149
|
+
link: '#0891b2',
|
|
150
|
+
linkHover: '#0e7490',
|
|
151
|
+
linkActive: '#155e75',
|
|
152
|
+
linkVisited: '#7e22ce',
|
|
153
|
+
onPrimary: '#ffffff',
|
|
154
|
+
onSecondary: '#ffffff',
|
|
155
|
+
onAccent: '#ffffff',
|
|
156
|
+
onBackground: '#171717',
|
|
157
|
+
onSurface: '#171717',
|
|
158
|
+
},
|
|
159
|
+
// Border colors
|
|
160
|
+
border: {
|
|
161
|
+
primary: '#e5e5e5',
|
|
162
|
+
secondary: '#d4d4d4',
|
|
163
|
+
tertiary: '#a3a3a3',
|
|
164
|
+
focus: '#0891b2',
|
|
165
|
+
focusRing: '#06b6d4',
|
|
166
|
+
inverse: '#404040',
|
|
167
|
+
hover: '#d4d4d4',
|
|
168
|
+
active: '#a3a3a3',
|
|
169
|
+
disabled: '#e5e5e5',
|
|
170
|
+
},
|
|
171
|
+
// Status colors
|
|
172
|
+
success: {
|
|
173
|
+
base: '#22c55e',
|
|
174
|
+
hover: '#16a34a',
|
|
175
|
+
active: '#15803d',
|
|
176
|
+
background: '#f0fdf4',
|
|
177
|
+
backgroundHover: '#dcfce7',
|
|
178
|
+
border: '#86efac',
|
|
179
|
+
text: '#ffffff',
|
|
180
|
+
textOnBackground: '#166534',
|
|
181
|
+
},
|
|
182
|
+
warning: {
|
|
183
|
+
base: '#f59e0b',
|
|
184
|
+
hover: '#d97706',
|
|
185
|
+
active: '#b45309',
|
|
186
|
+
background: '#fffbeb',
|
|
187
|
+
backgroundHover: '#fef3c7',
|
|
188
|
+
border: '#fcd34d',
|
|
189
|
+
text: '#ffffff',
|
|
190
|
+
textOnBackground: '#92400e',
|
|
191
|
+
},
|
|
192
|
+
error: {
|
|
193
|
+
base: '#ef4444',
|
|
194
|
+
hover: '#dc2626',
|
|
195
|
+
active: '#b91c1c',
|
|
196
|
+
background: '#fef2f2',
|
|
197
|
+
backgroundHover: '#fee2e2',
|
|
198
|
+
border: '#fca5a5',
|
|
199
|
+
text: '#ffffff',
|
|
200
|
+
textOnBackground: '#991b1b',
|
|
201
|
+
},
|
|
202
|
+
info: {
|
|
203
|
+
base: '#3b82f6',
|
|
204
|
+
hover: '#2563eb',
|
|
205
|
+
active: '#1d4ed8',
|
|
206
|
+
background: '#eff6ff',
|
|
207
|
+
backgroundHover: '#dbeafe',
|
|
208
|
+
border: '#93c5fd',
|
|
209
|
+
text: '#ffffff',
|
|
210
|
+
textOnBackground: '#1e40af',
|
|
211
|
+
},
|
|
212
|
+
},
|
|
213
|
+
fontFamily: {
|
|
214
|
+
sans: ["ui-sans-serif","system-ui","-apple-system","BlinkMacSystemFont","'Segoe UI'","Roboto","'Helvetica Neue'","Arial","'Noto Sans'","sans-serif","'Apple Color Emoji'","'Segoe UI Emoji'","'Segoe UI Symbol'","'Noto Color Emoji'"],
|
|
215
|
+
serif: ["ui-serif","Georgia","Cambria","'Times New Roman'","Times","serif"],
|
|
216
|
+
mono: ["ui-monospace","SFMono-Regular","Menlo","Monaco","Consolas","'Liberation Mono'","'Courier New'","monospace"],
|
|
217
|
+
display: 'var(--font-orbitron, ui-sans-serif)',
|
|
218
|
+
body: 'var(--font-inter, ui-sans-serif)',
|
|
219
|
+
},
|
|
220
|
+
fontSize: tokens.typography.fontSize,
|
|
221
|
+
fontWeight: tokens.typography.fontWeight,
|
|
222
|
+
lineHeight: tokens.typography.lineHeight,
|
|
223
|
+
letterSpacing: tokens.typography.letterSpacing,
|
|
224
|
+
spacing: tokens.spacing,
|
|
225
|
+
borderRadius: tokens.radius,
|
|
226
|
+
boxShadow: {
|
|
227
|
+
...tokens.shadows.light,
|
|
228
|
+
'glow-cyan': '0 0 20px rgba(0, 230, 255, 0.5), 0 0 40px rgba(0, 230, 255, 0.3)',
|
|
229
|
+
'glow-pink': '0 0 20px rgba(255, 0, 255, 0.5), 0 0 40px rgba(255, 0, 255, 0.3)',
|
|
230
|
+
'glow-purple': '0 0 20px rgba(125, 0, 255, 0.5), 0 0 40px rgba(125, 0, 255, 0.3)',
|
|
231
|
+
'glow-green': '0 0 20px rgba(0, 255, 0, 0.5), 0 0 40px rgba(0, 255, 0, 0.3)',
|
|
232
|
+
},
|
|
233
|
+
},
|
|
234
|
+
},
|
|
235
|
+
darkMode: 'class',
|
|
236
|
+
} as const;
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* Exportação padrão da configuração do Tailwind
|
|
240
|
+
*
|
|
241
|
+
* @description
|
|
242
|
+
* Exporta a configuração do Tailwind CSS como exportação padrão do módulo.
|
|
243
|
+
*
|
|
244
|
+
* @type {typeof tailwindConfig}
|
|
245
|
+
* @default tailwindConfig
|
|
246
|
+
*/
|
|
247
|
+
export default tailwindConfig;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/rainer-design-tokens.json",
|
|
3
|
+
"name": "@rainersoft/design-tokens",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"description": "Universal design tokens export for Rainer Design System",
|
|
6
|
+
"$generated": "This file is auto-generated. Do not edit manually.",
|
|
7
|
+
"$source": "tokens/*.json",
|
|
8
|
+
"colors": {
|
|
9
|
+
"light": {
|
|
10
|
+
"$type": "color",
|
|
11
|
+
"$value": "See tokens/colors/light.json",
|
|
12
|
+
"$path": "tokens/colors/light.json"
|
|
13
|
+
},
|
|
14
|
+
"dark": {
|
|
15
|
+
"$type": "color",
|
|
16
|
+
"$value": "See tokens/colors/dark.json",
|
|
17
|
+
"$path": "tokens/colors/dark.json"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"typography": {
|
|
21
|
+
"$type": "typography",
|
|
22
|
+
"$value": "See tokens/typography.json",
|
|
23
|
+
"$path": "tokens/typography.json"
|
|
24
|
+
},
|
|
25
|
+
"spacing": {
|
|
26
|
+
"$type": "dimension",
|
|
27
|
+
"$value": "See tokens/spacing.json",
|
|
28
|
+
"$path": "tokens/spacing.json"
|
|
29
|
+
},
|
|
30
|
+
"radius": {
|
|
31
|
+
"$type": "dimension",
|
|
32
|
+
"$value": "See tokens/radius.json",
|
|
33
|
+
"$path": "tokens/radius.json"
|
|
34
|
+
},
|
|
35
|
+
"shadows": {
|
|
36
|
+
"$type": "shadow",
|
|
37
|
+
"$value": "See tokens/shadows.json",
|
|
38
|
+
"$path": "tokens/shadows.json"
|
|
39
|
+
},
|
|
40
|
+
"meta": {
|
|
41
|
+
"repository": "https://github.com/RainerTeixeira/rainer-design-tokens.git",
|
|
42
|
+
"author": "Rainer Teixeira <suporte@rainersoft.com.br>",
|
|
43
|
+
"license": "MIT",
|
|
44
|
+
"generatedAt": "2025-11-18T02:55:52.740Z"
|
|
45
|
+
}
|
|
46
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@rainersoft/design-tokens",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Design tokens profissionais seguindo padrões W3C/DTCG, com estrutura modular e suporte a tokens primitivos e semânticos.",
|
|
6
|
+
"author": "Rainer Teixeira <suporte@rainersoft.com.br>",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"keywords": [
|
|
9
|
+
"design-tokens",
|
|
10
|
+
"@rainersoft/design-tokens",
|
|
11
|
+
"w3c",
|
|
12
|
+
"dtcg",
|
|
13
|
+
"storybook",
|
|
14
|
+
"tailwind",
|
|
15
|
+
"react",
|
|
16
|
+
"nextjs",
|
|
17
|
+
"design-system",
|
|
18
|
+
"tokens",
|
|
19
|
+
"css",
|
|
20
|
+
"typescript",
|
|
21
|
+
"primitive-tokens",
|
|
22
|
+
"semantic-tokens",
|
|
23
|
+
"theme",
|
|
24
|
+
"dark-mode",
|
|
25
|
+
"8pt-grid",
|
|
26
|
+
"modular-scale"
|
|
27
|
+
],
|
|
28
|
+
"main": "./dist/index.js",
|
|
29
|
+
"module": "./dist/index.mjs",
|
|
30
|
+
"types": "./dist/index.d.ts",
|
|
31
|
+
"exports": {
|
|
32
|
+
".": {
|
|
33
|
+
"types": "./dist/index.d.ts",
|
|
34
|
+
"import": "./dist/index.mjs",
|
|
35
|
+
"require": "./dist/index.js"
|
|
36
|
+
},
|
|
37
|
+
"./css": {
|
|
38
|
+
"types": "./dist/css.d.ts",
|
|
39
|
+
"import": "./dist/css.mjs",
|
|
40
|
+
"require": "./dist/css.js"
|
|
41
|
+
},
|
|
42
|
+
"./tailwind": {
|
|
43
|
+
"types": "./dist/tailwind.d.ts",
|
|
44
|
+
"import": "./dist/tailwind.mjs",
|
|
45
|
+
"require": "./dist/tailwind.js"
|
|
46
|
+
},
|
|
47
|
+
"./formats/css-vars.css": "./formats/css-vars.css",
|
|
48
|
+
"./formats/tokens.json": "./formats/tokens.json",
|
|
49
|
+
"./package.json": "./package.json"
|
|
50
|
+
},
|
|
51
|
+
"files": [
|
|
52
|
+
"dist",
|
|
53
|
+
"formats",
|
|
54
|
+
"tokens",
|
|
55
|
+
"themes",
|
|
56
|
+
"README.md",
|
|
57
|
+
"LICENSE"
|
|
58
|
+
],
|
|
59
|
+
"scripts": {
|
|
60
|
+
"build": "pnpm run build:formats && tsup",
|
|
61
|
+
"build:formats": "tsx scripts/build-formats.ts",
|
|
62
|
+
"build:css": "tsx scripts/build-css.ts",
|
|
63
|
+
"build:tailwind": "tsx scripts/build-tailwind.ts",
|
|
64
|
+
"build:tokens-json": "tsx scripts/build-tokens-json.ts",
|
|
65
|
+
"dev": "tsup --watch",
|
|
66
|
+
"type-check": "tsc --noEmit",
|
|
67
|
+
"lint": "pnpm exec eslint .",
|
|
68
|
+
"test": "echo \"No tests configured\" && exit 0",
|
|
69
|
+
"test:watch": "jest --watch",
|
|
70
|
+
"test:coverage": "jest --coverage",
|
|
71
|
+
"prepare:publish": "node scripts/prepare-publish.js",
|
|
72
|
+
"setup:auth": "node scripts/setup-npm-auth.js",
|
|
73
|
+
"prepublishOnly": "pnpm run build && pnpm run type-check",
|
|
74
|
+
"clean": "node -e \"require('fs').rmSync('dist', {recursive: true, force: true})\"",
|
|
75
|
+
"storybook": "storybook dev -p 6006",
|
|
76
|
+
"build-storybook": "storybook build",
|
|
77
|
+
"update:dates": "tsx scripts/update-dates.ts",
|
|
78
|
+
"setup": "pnpm install",
|
|
79
|
+
"setup:clean": "pnpm run clean:all && pnpm install",
|
|
80
|
+
"clean:all": "pnpm exec rimraf node_modules pnpm-lock.yaml dist .storybook-build"
|
|
81
|
+
},
|
|
82
|
+
"peerDependencies": {
|
|
83
|
+
"react": ">=18.0.0"
|
|
84
|
+
},
|
|
85
|
+
"devDependencies": {
|
|
86
|
+
"@eslint/js": "^9.39.1",
|
|
87
|
+
"@storybook/addon-docs": "^10.0.8",
|
|
88
|
+
"@storybook/addon-onboarding": "^10.0.8",
|
|
89
|
+
"@storybook/react": "^10.0.8",
|
|
90
|
+
"@storybook/react-vite": "^10.0.8",
|
|
91
|
+
"@types/jest": "^29.5.11",
|
|
92
|
+
"@types/node": "^20.10.0",
|
|
93
|
+
"@types/react": "^18.2.45",
|
|
94
|
+
"@typescript-eslint/eslint-plugin": "^8.18.2",
|
|
95
|
+
"@typescript-eslint/parser": "^8.18.2",
|
|
96
|
+
"debug": "^4.4.3",
|
|
97
|
+
"eslint": "^9.39.1",
|
|
98
|
+
"eslint-plugin-storybook": "^10.0.8",
|
|
99
|
+
"globals": "^16.5.0",
|
|
100
|
+
"jest": "^29.7.0",
|
|
101
|
+
"react": "^19.2.0",
|
|
102
|
+
"react-dom": "^19.2.0",
|
|
103
|
+
"storybook": "^10.0.8",
|
|
104
|
+
"ts-jest": "^29.1.1",
|
|
105
|
+
"tsup": "^8.0.1",
|
|
106
|
+
"tsx": "^4.20.6",
|
|
107
|
+
"typescript": "^5.3.3",
|
|
108
|
+
"typescript-eslint": "^8.47.0"
|
|
109
|
+
},
|
|
110
|
+
"repository": {
|
|
111
|
+
"type": "git",
|
|
112
|
+
"url": "https://github.com/RainerTeixeira/rainer-design-tokens.git"
|
|
113
|
+
},
|
|
114
|
+
"bugs": {
|
|
115
|
+
"url": "https://github.com/RainerTeixeira/rainer-design-tokens/issues"
|
|
116
|
+
},
|
|
117
|
+
"homepage": "https://github.com/RainerTeixeira/rainer-design-tokens#readme"
|
|
118
|
+
}
|
package/themes/dark.ts
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Tema Escuro - Edição Cyberpunk
|
|
3
|
+
*
|
|
4
|
+
* @description
|
|
5
|
+
* Combina tokens de design em um tema escuro inspirado no estilo cyberpunk.
|
|
6
|
+
* Possui cores neon vibrantes e efeitos de brilho (glow) para uso noturno.
|
|
7
|
+
* Este tema oferece uma experiência visual única e moderna, ideal para
|
|
8
|
+
* aplicações que buscam um visual futurista e impactante.
|
|
9
|
+
*
|
|
10
|
+
* @module themes/dark
|
|
11
|
+
* @version 4.0.0
|
|
12
|
+
* @author Rainer Teixeira
|
|
13
|
+
* @since 1.0.0
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
import { tokens } from '../tokens';
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Objeto contendo os tokens para o tema escuro
|
|
20
|
+
*
|
|
21
|
+
* @description
|
|
22
|
+
* Tema completo que agrupa todos os tokens de design necessários
|
|
23
|
+
* para uma aplicação com tema escuro cyberpunk. Inclui cores neon,
|
|
24
|
+
* tipografia, espaçamento, raios de borda e sombras com efeitos de brilho.
|
|
25
|
+
*
|
|
26
|
+
* @type {Object}
|
|
27
|
+
* @property {Object} colors - Tokens de cores para o tema escuro (cyberpunk)
|
|
28
|
+
* @property {Object} typography - Tokens de tipografia (fontes, tamanhos, pesos, etc.)
|
|
29
|
+
* @property {Object} spacing - Tokens de espaçamento (margens, paddings)
|
|
30
|
+
* @property {Object} radius - Tokens de raio de borda
|
|
31
|
+
* @property {Object} shadows - Tokens de sombras com efeitos de brilho para o tema escuro
|
|
32
|
+
*
|
|
33
|
+
* @constant
|
|
34
|
+
* @readonly
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```typescript
|
|
38
|
+
* import { darkTheme } from 'rainer-design-tokens';
|
|
39
|
+
*
|
|
40
|
+
* // Acessar cores neon do tema escuro
|
|
41
|
+
* const neonCyan = darkTheme.colors.accent.cyan;
|
|
42
|
+
*
|
|
43
|
+
* // Acessar efeitos de brilho
|
|
44
|
+
* const glowShadow = darkTheme.shadows.glow.cyan;
|
|
45
|
+
*
|
|
46
|
+
* // Aplicar em componente
|
|
47
|
+
* <div style={{
|
|
48
|
+
* backgroundColor: darkTheme.colors.background.primary,
|
|
49
|
+
* boxShadow: darkTheme.shadows.glow.purple,
|
|
50
|
+
* padding: darkTheme.spacing.md
|
|
51
|
+
* }}>
|
|
52
|
+
* Conteúdo Cyberpunk
|
|
53
|
+
* </div>
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
export const darkTheme = {
|
|
57
|
+
colors: tokens.colors.dark,
|
|
58
|
+
typography: tokens.typography,
|
|
59
|
+
spacing: tokens.spacing,
|
|
60
|
+
radius: tokens.radius,
|
|
61
|
+
shadows: tokens.shadows.dark,
|
|
62
|
+
} as const;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Tipo TypeScript do tema escuro
|
|
66
|
+
*
|
|
67
|
+
* @typedef {Object} DarkTheme
|
|
68
|
+
* @description
|
|
69
|
+
* Tipo que representa a estrutura completa do tema escuro.
|
|
70
|
+
* Útil para type-checking e autocomplete em IDEs.
|
|
71
|
+
*
|
|
72
|
+
* @property {Object} colors - Cores do tema escuro (cyberpunk)
|
|
73
|
+
* @property {Object} typography - Tokens de tipografia
|
|
74
|
+
* @property {Object} spacing - Tokens de espaçamento
|
|
75
|
+
* @property {Object} radius - Tokens de raio de borda
|
|
76
|
+
* @property {Object} shadows - Sombras com efeitos de brilho do tema escuro
|
|
77
|
+
*/
|
|
78
|
+
export type DarkTheme = typeof darkTheme;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Exportação padrão do tema escuro
|
|
82
|
+
*
|
|
83
|
+
* @description
|
|
84
|
+
* Exporta o tema escuro como exportação padrão do módulo.
|
|
85
|
+
*
|
|
86
|
+
* @type {DarkTheme}
|
|
87
|
+
* @default darkTheme
|
|
88
|
+
*/
|
|
89
|
+
export default darkTheme;
|
package/themes/index.ts
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Ponto de entrada dos temas
|
|
3
|
+
*
|
|
4
|
+
* @description
|
|
5
|
+
* Exporta os temas claro e escuro para fácil consumo.
|
|
6
|
+
* Cada tema agrupa todos os tokens de design de forma organizada,
|
|
7
|
+
* facilitando a aplicação de temas completos na aplicação.
|
|
8
|
+
*
|
|
9
|
+
* @module themes
|
|
10
|
+
* @version 4.0.0
|
|
11
|
+
* @author Rainer Teixeira
|
|
12
|
+
* @since 1.0.0
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```typescript
|
|
16
|
+
* import { themes, lightTheme, darkTheme } from '@rainersoft/design-tokens';
|
|
17
|
+
*
|
|
18
|
+
* // Usar tema completo
|
|
19
|
+
* const currentTheme = themes.light;
|
|
20
|
+
*
|
|
21
|
+
* // Ou importar diretamente
|
|
22
|
+
* const colors = lightTheme.colors;
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Exporta o tema claro e seu tipo
|
|
28
|
+
*
|
|
29
|
+
* @description
|
|
30
|
+
* Tema claro profissional e limpo, adequado para uso diurno.
|
|
31
|
+
*
|
|
32
|
+
* @see {LightTheme} Para o tipo TypeScript do tema claro
|
|
33
|
+
*/
|
|
34
|
+
export { lightTheme, type LightTheme } from './light';
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Exporta o tema escuro e seu tipo
|
|
38
|
+
*
|
|
39
|
+
* @description
|
|
40
|
+
* Tema escuro inspirado no estilo cyberpunk com cores neon e efeitos de brilho.
|
|
41
|
+
*
|
|
42
|
+
* @see {DarkTheme} Para o tipo TypeScript do tema escuro
|
|
43
|
+
*/
|
|
44
|
+
export { darkTheme, type DarkTheme } from './dark';
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Objeto contendo todos os temas disponíveis
|
|
48
|
+
*
|
|
49
|
+
* @description
|
|
50
|
+
* Objeto que agrupa todos os temas do sistema, permitindo acesso
|
|
51
|
+
* fácil e organizado aos diferentes temas disponíveis.
|
|
52
|
+
*
|
|
53
|
+
* @type {Object}
|
|
54
|
+
* @property {LightTheme} light - Tema claro
|
|
55
|
+
* @property {DarkTheme} dark - Tema escuro (cyberpunk)
|
|
56
|
+
*
|
|
57
|
+
* @constant
|
|
58
|
+
* @readonly
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* ```typescript
|
|
62
|
+
* import { themes } from 'rainer-design-tokens';
|
|
63
|
+
*
|
|
64
|
+
* // Acessar tema claro
|
|
65
|
+
* const lightColors = themes.light.colors;
|
|
66
|
+
*
|
|
67
|
+
* // Acessar tema escuro
|
|
68
|
+
* const darkShadows = themes.dark.shadows;
|
|
69
|
+
* ```
|
|
70
|
+
*/
|
|
71
|
+
import { lightTheme } from './light';
|
|
72
|
+
import { darkTheme } from './dark';
|
|
73
|
+
|
|
74
|
+
export const themes = {
|
|
75
|
+
light: lightTheme,
|
|
76
|
+
dark: darkTheme,
|
|
77
|
+
} as const;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Tipo TypeScript para todos os temas
|
|
81
|
+
*
|
|
82
|
+
* @typedef {Object} Themes
|
|
83
|
+
* @description
|
|
84
|
+
* Tipo que representa a estrutura completa de todos os temas disponíveis.
|
|
85
|
+
* Útil para type-checking e autocomplete em IDEs.
|
|
86
|
+
*/
|
|
87
|
+
export type Themes = typeof themes;
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Exportação padrão dos temas
|
|
91
|
+
*
|
|
92
|
+
* @description
|
|
93
|
+
* Exporta o objeto principal contendo todos os temas disponíveis.
|
|
94
|
+
*
|
|
95
|
+
* @type {Themes}
|
|
96
|
+
* @default themes
|
|
97
|
+
*/
|
|
98
|
+
export default themes;
|
|
99
|
+
|
package/themes/light.ts
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Tema Claro - Rainer Design System
|
|
3
|
+
*
|
|
4
|
+
* @description
|
|
5
|
+
* Agrupa os design tokens em um tema claro profissional e limpo,
|
|
6
|
+
* adequado para uso diurno. Este tema oferece uma experiência visual
|
|
7
|
+
* clara e moderna, ideal para aplicações que requerem legibilidade
|
|
8
|
+
* e profissionalismo.
|
|
9
|
+
*
|
|
10
|
+
* @module themes/light
|
|
11
|
+
* @version 4.0.0
|
|
12
|
+
* @author Rainer Teixeira
|
|
13
|
+
* @since 1.0.0
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
import { tokens } from '../tokens';
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Objeto contendo os tokens para o tema claro
|
|
20
|
+
*
|
|
21
|
+
* @description
|
|
22
|
+
* Tema completo que agrupa todos os tokens de design necessários
|
|
23
|
+
* para uma aplicação com tema claro. Inclui cores, tipografia,
|
|
24
|
+
* espaçamento, raios de borda e sombras.
|
|
25
|
+
*
|
|
26
|
+
* @type {Object}
|
|
27
|
+
* @property {Object} colors - Tokens de cores para o tema claro
|
|
28
|
+
* @property {Object} typography - Tokens de tipografia (fontes, tamanhos, pesos, etc.)
|
|
29
|
+
* @property {Object} spacing - Tokens de espaçamento (margens, paddings)
|
|
30
|
+
* @property {Object} radius - Tokens de raio de borda
|
|
31
|
+
* @property {Object} shadows - Tokens de sombras para o tema claro
|
|
32
|
+
*
|
|
33
|
+
* @constant
|
|
34
|
+
* @readonly
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```typescript
|
|
38
|
+
* import { lightTheme } from 'rainer-design-tokens';
|
|
39
|
+
*
|
|
40
|
+
* // Acessar cores do tema claro
|
|
41
|
+
* const primaryColor = lightTheme.colors.brand.primary;
|
|
42
|
+
*
|
|
43
|
+
* // Acessar tipografia
|
|
44
|
+
* const fontSize = lightTheme.typography.fontSize.lg;
|
|
45
|
+
*
|
|
46
|
+
* // Aplicar em componente
|
|
47
|
+
* <div style={{
|
|
48
|
+
* backgroundColor: lightTheme.colors.background.primary,
|
|
49
|
+
* padding: lightTheme.spacing.md
|
|
50
|
+
* }}>
|
|
51
|
+
* Conteúdo
|
|
52
|
+
* </div>
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
export const lightTheme = {
|
|
56
|
+
colors: tokens.colors.light,
|
|
57
|
+
typography: tokens.typography,
|
|
58
|
+
spacing: tokens.spacing,
|
|
59
|
+
radius: tokens.radius,
|
|
60
|
+
shadows: tokens.shadows.light,
|
|
61
|
+
} as const;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Tipo TypeScript do tema claro
|
|
65
|
+
*
|
|
66
|
+
* @typedef {Object} LightTheme
|
|
67
|
+
* @description
|
|
68
|
+
* Tipo que representa a estrutura completa do tema claro.
|
|
69
|
+
* Útil para type-checking e autocomplete em IDEs.
|
|
70
|
+
*
|
|
71
|
+
* @property {Object} colors - Cores do tema claro
|
|
72
|
+
* @property {Object} typography - Tokens de tipografia
|
|
73
|
+
* @property {Object} spacing - Tokens de espaçamento
|
|
74
|
+
* @property {Object} radius - Tokens de raio de borda
|
|
75
|
+
* @property {Object} shadows - Sombras do tema claro
|
|
76
|
+
*/
|
|
77
|
+
export type LightTheme = typeof lightTheme;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Exportação padrão do tema claro
|
|
81
|
+
*
|
|
82
|
+
* @description
|
|
83
|
+
* Exporta o tema claro como exportação padrão do módulo.
|
|
84
|
+
*
|
|
85
|
+
* @type {LightTheme}
|
|
86
|
+
* @default lightTheme
|
|
87
|
+
*/
|
|
88
|
+
export default lightTheme;
|