@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,177 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Tokens utilitários - Classes Tailwind CSS
|
|
3
|
+
*
|
|
4
|
+
* @description
|
|
5
|
+
* Tokens utilitários que exportam classes Tailwind CSS prontas para uso.
|
|
6
|
+
* Esses tokens são classes CSS que podem ser aplicadas diretamente nos componentes,
|
|
7
|
+
* facilitando o desenvolvimento e garantindo consistência visual.
|
|
8
|
+
*
|
|
9
|
+
* @module tokens/utilities
|
|
10
|
+
* @version 4.0.0
|
|
11
|
+
* @author Rainer Teixeira
|
|
12
|
+
* @since 1.0.0
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Direções de gradiente como classes Tailwind CSS
|
|
17
|
+
*
|
|
18
|
+
* @description
|
|
19
|
+
* Conjunto de constantes que representam as diferentes direções
|
|
20
|
+
* de gradiente disponíveis no Tailwind CSS.
|
|
21
|
+
*
|
|
22
|
+
* @type {Object}
|
|
23
|
+
* @property {string} TO_TOP - Gradiente de baixo para cima
|
|
24
|
+
* @property {string} TO_BOTTOM - Gradiente de cima para baixo
|
|
25
|
+
* @property {string} TO_LEFT - Gradiente da direita para esquerda
|
|
26
|
+
* @property {string} TO_RIGHT - Gradiente da esquerda para direita
|
|
27
|
+
* @property {string} TO_TL - Gradiente para cima-esquerda (top-left)
|
|
28
|
+
* @property {string} TO_TR - Gradiente para cima-direita (top-right)
|
|
29
|
+
* @property {string} TO_BL - Gradiente para baixo-esquerda (bottom-left)
|
|
30
|
+
* @property {string} TO_BR - Gradiente para baixo-direita (bottom-right)
|
|
31
|
+
*
|
|
32
|
+
* @constant
|
|
33
|
+
* @readonly
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```typescript
|
|
37
|
+
* import { GRADIENT_DIRECTIONS } from 'rainer-design-tokens';
|
|
38
|
+
*
|
|
39
|
+
* // Aplicar gradiente de cima para baixo
|
|
40
|
+
* <div className={GRADIENT_DIRECTIONS.TO_BOTTOM}>
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
export const GRADIENT_DIRECTIONS = {
|
|
44
|
+
TO_TOP: 'bg-gradient-to-t',
|
|
45
|
+
TO_BOTTOM: 'bg-gradient-to-b',
|
|
46
|
+
TO_LEFT: 'bg-gradient-to-l',
|
|
47
|
+
TO_RIGHT: 'bg-gradient-to-r',
|
|
48
|
+
TO_TL: 'bg-gradient-to-tl',
|
|
49
|
+
TO_TR: 'bg-gradient-to-tr',
|
|
50
|
+
TO_BL: 'bg-gradient-to-bl',
|
|
51
|
+
TO_BR: 'bg-gradient-to-br',
|
|
52
|
+
} as const;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Gradientes decorativos e utilitários como classes Tailwind CSS
|
|
56
|
+
*
|
|
57
|
+
* @description
|
|
58
|
+
* Conjunto de gradientes pré-configurados para uso em diferentes
|
|
59
|
+
* contextos da aplicação, incluindo texto, elementos decorativos e botões.
|
|
60
|
+
*
|
|
61
|
+
* @type {Object}
|
|
62
|
+
* @property {string} TEXT_PRIMARY - Gradiente para texto com efeito de clip
|
|
63
|
+
* @property {string} DECORATIVE_PRIMARY - Gradiente decorativo principal (cyan-purple-pink)
|
|
64
|
+
* @property {string} DECORATIVE_CYAN_PURPLE - Gradiente decorativo cyan para purple
|
|
65
|
+
* @property {string} DECORATIVE_GREEN_EMERALD - Gradiente decorativo green para emerald
|
|
66
|
+
* @property {string} BUTTON_CYAN_BLUE - Gradiente para botões (cyan para blue)
|
|
67
|
+
* @property {string} BUTTON_PURPLE_PINK - Gradiente para botões (purple para pink)
|
|
68
|
+
*
|
|
69
|
+
* @constant
|
|
70
|
+
* @readonly
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* ```typescript
|
|
74
|
+
* import { GRADIENTS } from 'rainer-design-tokens';
|
|
75
|
+
*
|
|
76
|
+
* // Aplicar gradiente em texto
|
|
77
|
+
* <h1 className={GRADIENTS.TEXT_PRIMARY}>Título com Gradiente</h1>
|
|
78
|
+
*
|
|
79
|
+
* // Aplicar gradiente em botão
|
|
80
|
+
* <button className={GRADIENTS.BUTTON_CYAN_BLUE}>Clique aqui</button>
|
|
81
|
+
* ```
|
|
82
|
+
*/
|
|
83
|
+
export const GRADIENTS = {
|
|
84
|
+
// Gradientes de texto
|
|
85
|
+
TEXT_PRIMARY: 'bg-gradient-to-r from-cyan-400 via-purple-400 to-pink-400 bg-clip-text text-transparent',
|
|
86
|
+
|
|
87
|
+
// Gradientes decorativos
|
|
88
|
+
DECORATIVE_PRIMARY: 'bg-gradient-to-br from-cyan-500 via-purple-500 to-pink-500',
|
|
89
|
+
DECORATIVE_CYAN_PURPLE: 'bg-gradient-to-r from-cyan-500 to-purple-500',
|
|
90
|
+
DECORATIVE_GREEN_EMERALD: 'bg-gradient-to-br from-green-500 to-emerald-500',
|
|
91
|
+
|
|
92
|
+
// Gradientes de botões
|
|
93
|
+
BUTTON_CYAN_BLUE: 'bg-gradient-to-r from-cyan-500 to-blue-500',
|
|
94
|
+
BUTTON_PURPLE_PINK: 'bg-gradient-to-r from-purple-500 to-pink-500',
|
|
95
|
+
} as const;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Backgrounds utilitários como classes Tailwind CSS
|
|
99
|
+
*
|
|
100
|
+
* @description
|
|
101
|
+
* Conjunto de classes para backgrounds pré-configurados, incluindo
|
|
102
|
+
* overlays, divisores e backgrounds de seção com efeitos de gradiente sutis.
|
|
103
|
+
*
|
|
104
|
+
* @type {Object}
|
|
105
|
+
* @property {string} FULL - Background completo padrão
|
|
106
|
+
* @property {string} GRADIENT_OVERLAY - Overlay de gradiente sutil
|
|
107
|
+
* @property {string} PREMIUM_DIVIDER_CONTAINER - Container para divisor premium
|
|
108
|
+
* @property {string} PREMIUM_DIVIDER_LINE - Linha do divisor premium
|
|
109
|
+
* @property {string} SECTION_CYAN - Background de seção com gradiente cyan
|
|
110
|
+
* @property {string} SECTION_CYAN_VIA - Background de seção cyan via (meio)
|
|
111
|
+
* @property {string} SECTION_PURPLE_VIA - Background de seção purple via (meio)
|
|
112
|
+
* @property {string} SECTION_PINK_VIA - Background de seção pink via (meio)
|
|
113
|
+
*
|
|
114
|
+
* @constant
|
|
115
|
+
* @readonly
|
|
116
|
+
*
|
|
117
|
+
* @example
|
|
118
|
+
* ```typescript
|
|
119
|
+
* import { BACKGROUND } from 'rainer-design-tokens';
|
|
120
|
+
*
|
|
121
|
+
* // Aplicar background de seção
|
|
122
|
+
* <section className={BACKGROUND.SECTION_CYAN}>
|
|
123
|
+
* Conteúdo da seção
|
|
124
|
+
* </section>
|
|
125
|
+
*
|
|
126
|
+
* // Aplicar overlay de gradiente
|
|
127
|
+
* <div className={BACKGROUND.GRADIENT_OVERLAY}>
|
|
128
|
+
* Conteúdo com overlay
|
|
129
|
+
* </div>
|
|
130
|
+
* ```
|
|
131
|
+
*/
|
|
132
|
+
export const BACKGROUND = {
|
|
133
|
+
// Background completo
|
|
134
|
+
FULL: 'bg-background',
|
|
135
|
+
|
|
136
|
+
// Overlay de gradiente
|
|
137
|
+
GRADIENT_OVERLAY: 'bg-gradient-to-br from-cyan-500/10 via-purple-500/10 to-pink-500/10',
|
|
138
|
+
|
|
139
|
+
// Divisores premium
|
|
140
|
+
PREMIUM_DIVIDER_CONTAINER: 'bg-gradient-to-b from-transparent via-cyan-500/5 to-transparent',
|
|
141
|
+
PREMIUM_DIVIDER_LINE: 'bg-gradient-to-r from-transparent via-cyan-400/50 to-transparent',
|
|
142
|
+
|
|
143
|
+
// Backgrounds de seção
|
|
144
|
+
SECTION_CYAN: 'bg-gradient-to-br from-cyan-500/5 via-cyan-500/3 to-transparent',
|
|
145
|
+
SECTION_CYAN_VIA: 'bg-gradient-to-br from-transparent via-cyan-500/5 to-transparent',
|
|
146
|
+
SECTION_PURPLE_VIA: 'bg-gradient-to-br from-transparent via-purple-500/5 to-transparent',
|
|
147
|
+
SECTION_PINK_VIA: 'bg-gradient-to-br from-transparent via-pink-500/5 to-transparent',
|
|
148
|
+
} as const;
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Tipo TypeScript para direções de gradiente
|
|
152
|
+
*
|
|
153
|
+
* @typedef {Object} GradientDirections
|
|
154
|
+
* @description
|
|
155
|
+
* Tipo que representa todas as direções de gradiente disponíveis.
|
|
156
|
+
* Útil para type-checking e autocomplete em IDEs.
|
|
157
|
+
*/
|
|
158
|
+
export type GradientDirections = typeof GRADIENT_DIRECTIONS;
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Tipo TypeScript para gradientes
|
|
162
|
+
*
|
|
163
|
+
* @typedef {Object} Gradients
|
|
164
|
+
* @description
|
|
165
|
+
* Tipo que representa todos os gradientes pré-configurados disponíveis.
|
|
166
|
+
*/
|
|
167
|
+
export type Gradients = typeof GRADIENTS;
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Tipo TypeScript para backgrounds
|
|
171
|
+
*
|
|
172
|
+
* @typedef {Object} Background
|
|
173
|
+
* @description
|
|
174
|
+
* Tipo que representa todos os backgrounds utilitários disponíveis.
|
|
175
|
+
*/
|
|
176
|
+
export type Background = typeof BACKGROUND;
|
|
177
|
+
|