@aziontech/theme 1.12.0 → 2.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.
Files changed (76) hide show
  1. package/README.md +1 -1
  2. package/package.json +19 -21
  3. package/src/scripts/build-tokens.mjs +391 -0
  4. package/src/scripts/compile-primitives.js +165 -0
  5. package/src/scripts/compile-theme.js +117 -0
  6. package/src/{tokens/build → scripts}/css-vars.js +10 -9
  7. package/src/{tokens/build → scripts}/resolve.js +2 -0
  8. package/src/tests/primitives.html +293 -0
  9. package/src/tests/theme.html +310 -0
  10. package/src/tests/tokens.html +84 -0
  11. package/src/tokens/README.md +306 -272
  12. package/src/tokens/index.js +4 -12
  13. package/src/tokens/primitives/animations/animate.js +8 -0
  14. package/src/tokens/primitives/animations/ease.js +7 -0
  15. package/src/tokens/primitives/border-widths.js +9 -0
  16. package/src/tokens/primitives/breakpoints.js +9 -0
  17. package/src/tokens/primitives/colors/alpha.js +104 -0
  18. package/src/tokens/primitives/colors/brand.js +40 -0
  19. package/src/tokens/primitives/colors/colors.js +142 -0
  20. package/src/tokens/primitives/effects/blur.js +11 -0
  21. package/src/tokens/primitives/effects/drop-shadow.js +10 -0
  22. package/src/tokens/primitives/effects/inset-shadow.js +7 -0
  23. package/src/tokens/primitives/effects/opacity.js +8 -0
  24. package/src/tokens/primitives/effects/perspective.js +9 -0
  25. package/src/tokens/primitives/effects/shadow.js +11 -0
  26. package/src/tokens/primitives/ring-offset.js +5 -0
  27. package/src/tokens/primitives/shape/aspect-video.js +3 -0
  28. package/src/tokens/primitives/shape/container.js +17 -0
  29. package/src/tokens/primitives/shape/height.js +32 -0
  30. package/src/tokens/primitives/shape/radius.js +13 -0
  31. package/src/tokens/primitives/shape/shape.js +12 -0
  32. package/src/tokens/primitives/shape/size.js +32 -0
  33. package/src/tokens/primitives/shape/spacing.js +33 -0
  34. package/src/tokens/primitives/shape/width.js +19 -0
  35. package/src/tokens/primitives/typography/font-family.js +7 -0
  36. package/src/tokens/primitives/typography/font-size.js +30 -0
  37. package/src/tokens/primitives/typography/font-weight.js +13 -0
  38. package/src/tokens/primitives/typography/leading.js +9 -0
  39. package/src/tokens/primitives/typography/line-height.js +13 -0
  40. package/src/tokens/primitives/typography/tracking.js +10 -0
  41. package/src/{tailwind/semantic-animations-plugin.js → tokens/semantic/animations.js} +3 -21
  42. package/src/tokens/semantic/colors.js +138 -0
  43. package/src/tokens/semantic/containers.data.js +18 -0
  44. package/src/tokens/semantic/containers.js +70 -0
  45. package/src/tokens/semantic/spacings.data.js +18 -0
  46. package/src/tokens/semantic/spacings.js +163 -0
  47. package/src/tokens/semantic/texts.data.js +103 -0
  48. package/src/{tailwind/semantic-texts-plugin.js → tokens/semantic/texts.js} +91 -70
  49. package/src/tokens/theme/accent.js +18 -0
  50. package/src/tokens/theme/background.js +32 -0
  51. package/src/tokens/theme/border.js +18 -0
  52. package/src/tokens/theme/feedback/danger.js +16 -0
  53. package/src/tokens/theme/feedback/info.js +16 -0
  54. package/src/tokens/theme/feedback/success.js +16 -0
  55. package/src/tokens/theme/feedback/warning.js +16 -0
  56. package/src/tokens/theme/primary.js +18 -0
  57. package/src/tokens/theme/ring.js +12 -0
  58. package/src/tokens/theme/secondary.js +18 -0
  59. package/src/tokens/theme/surfaces.js +23 -0
  60. package/src/tokens/theme/text.js +18 -0
  61. package/src/tokens/theme.js +32 -0
  62. package/colors-brand.js +0 -24
  63. package/src/tailwind/semantic-colors-plugin.js +0 -91
  64. package/src/tailwind/semantic-spacing-plugin.js +0 -151
  65. package/src/tailwind/tailwind-theme.js +0 -54
  66. package/src/tokens/build/preset.js +0 -62
  67. package/src/tokens/build/tailwind-flat-colors.js +0 -75
  68. package/src/tokens/build/tailwind-helper.js +0 -12
  69. package/src/tokens/build/tailwind-plugin.js +0 -175
  70. package/src/tokens/colors-brand.js +0 -24
  71. package/src/tokens/primitives/brand.js +0 -69
  72. package/src/tokens/primitives/colors.js +0 -144
  73. package/src/tokens/semantic/backgrounds.js +0 -46
  74. package/src/tokens/semantic/borders.js +0 -44
  75. package/src/tokens/semantic/text.js +0 -48
  76. /package/src/{tokens/build → scripts}/refs.js +0 -0
@@ -1,21 +1,6 @@
1
- /**
2
- * Tailwind plugin to expose semantic text styles (typography).
3
- *
4
- * This adds typography components like display-1, body-1, etc.
5
- *
6
- * Usage in tailwind.config.js:
7
- * ```javascript
8
- * import { theme } from '@aziontech/theme/tailwind/tailwind-theme.js';
9
- * import semanticTexts from '@aziontech/theme/tailwind/semantic-texts-plugin';
10
- *
11
- * export default {
12
- * theme,
13
- * plugins: [semanticTexts()],
14
- * };
15
- * ```
16
- */
17
-
18
- // Lazy-require to avoid hard dependency for consumers
1
+ // TODO: deprecated — substituído pelos tokens declarativos em
2
+ // `texts.data.js` e pelo CSS gerado em `dist/globals.css` via
3
+ // `src/scripts/build-tokens.mjs`. Remover quando consumers migrarem.
19
4
  const plugin = (() => {
20
5
  try {
21
6
  return require('tailwindcss/plugin');
@@ -25,13 +10,12 @@ const plugin = (() => {
25
10
  })();
26
11
 
27
12
  /**
28
- * Generate semantic text style components
13
+ * Generate semantic typography style components
29
14
  * @returns {import('tailwindcss/plugin').Plugin}
30
15
  */
31
16
  export const semanticTexts = () => {
32
17
  return plugin(({ addComponents, theme }) => {
33
18
  const deprecatedTexts = {
34
- // Display styles - Desktop
35
19
  '.display-1': {
36
20
  fontSize: '3rem',
37
21
  lineHeight: '1.10',
@@ -62,8 +46,6 @@ export const semanticTexts = () => {
62
46
  fontFamily: 'Sora',
63
47
  letterSpacing: '-.05rem',
64
48
  },
65
-
66
- // Display styles - Mobile
67
49
  '.display-1-mobile': {
68
50
  fontSize: '2.5rem',
69
51
  lineHeight: '1.15',
@@ -94,8 +76,6 @@ export const semanticTexts = () => {
94
76
  fontFamily: 'Sora',
95
77
  letterSpacing: '-.05rem',
96
78
  },
97
-
98
- // Body styles
99
79
  '.body-1': {
100
80
  fontSize: '1rem',
101
81
  lineHeight: '1.4rem',
@@ -103,127 +83,169 @@ export const semanticTexts = () => {
103
83
  letterSpacing: '-.05rem',
104
84
  },
105
85
  '.body-2': {
106
- fontSize: '.875rem',
86
+ fontSize: '0.875rem',
107
87
  lineHeight: '1.4rem',
108
88
  fontFamily: 'Sora',
109
89
  letterSpacing: '-.05rem',
110
90
  },
111
91
  };
112
92
 
113
- const texts = {
93
+ const mobile = {
94
+ ...deprecatedTexts,
114
95
  '.text-big-number-md': {
115
- fontSize: '4.5rem', // 7xl
96
+ fontSize: '2.25rem',
116
97
  lineHeight: '1.20',
117
98
  },
118
- '.text-heading-2xl': {
119
- fontSize: '3.75rem', // text-6xl
99
+ '.text-big-number-sm': {
100
+ fontSize: '1.25rem',
101
+ lineHeight: '1.20',
102
+ },
103
+ '.text-big-number-lg': {
104
+ fontSize: '3.75rem',
105
+ lineHeight: '1.20',
106
+ },
107
+ '.text-heading-2xl': {
108
+ fontSize: '3.75rem',
120
109
  lineHeight: '1.2',
121
110
  },
122
111
  '.text-heading-xl': {
123
- fontSize: '2.25rem', // text-4xl
112
+ fontSize: '2.25rem',
124
113
  lineHeight: '1.2',
125
114
  },
126
115
  '.text-heading-lg': {
127
- fontSize: '1.875rem', // text-3xl
116
+ fontSize: '1.875rem',
128
117
  lineHeight: '1.2',
129
118
  },
130
119
  '.text-heading-md': {
131
- fontSize: '1.5rem', // text-2xl
120
+ fontSize: '1.5rem',
132
121
  lineHeight: '1.2',
133
122
  },
134
123
  '.text-heading-sm': {
135
- fontSize: '1.125rem', // text-lg
124
+ fontSize: '1.125rem',
136
125
  lineHeight: '1.2',
137
126
  },
138
- '.text-body-lg': {
139
- fontSize: '18px', // text-lg
127
+ '.text-body-lg': {
128
+ fontSize: '1.125rem',
140
129
  lineHeight: '1.5',
141
130
  },
142
131
  '.text-body-md': {
143
- fontSize: '16px', // text-base
132
+ fontSize: '1rem',
144
133
  lineHeight: '1.5',
145
134
  },
146
135
  '.text-body-sm': {
147
- fontSize: '14px', // text-sm
136
+ fontSize: '0.875rem',
148
137
  lineHeight: '1.5',
149
138
  },
150
139
  '.text-body-xs': {
151
- fontSize: '12px', // text-xs
140
+ fontSize: '0.75rem',
152
141
  lineHeight: '1.5',
153
142
  },
154
143
  '.text-body-xss': {
155
- fontSize: '10px',
144
+ fontSize: '0.625rem',
156
145
  lineHeight: '1.5',
157
146
  },
158
147
  '.text-overline-md': {
159
- fontSize: '14px', // text-sm
148
+ fontSize: '0.875rem',
160
149
  lineHeight: '1.4',
161
150
  letterSpacing: '0.08em',
162
151
  textTransform: 'uppercase',
163
152
  },
164
153
  '.text-overline-sm': {
165
- fontSize: '12px', // text-xs
154
+ fontSize: '0.75rem',
166
155
  lineHeight: '1.4',
167
156
  letterSpacing: '0.08em',
168
157
  textTransform: 'uppercase',
169
158
  },
170
159
  '.text-overline-xs': {
171
- fontSize: '10px',
160
+ fontSize: '0.625rem',
172
161
  lineHeight: '1.4',
173
162
  letterSpacing: '0.08em',
174
163
  textTransform: 'uppercase',
175
164
  },
165
+ '.text-button-lg': {
166
+ fontFamily: 'Proto Mono',
167
+ fontSize: '0.875rem',
168
+ fontWeight: '600',
169
+ lineHeight: '1',
170
+ letterSpacing: '0',
171
+ },
172
+ '.text-button-md': {
173
+ fontFamily: 'Proto Mono',
174
+ fontSize: '0.75rem',
175
+ fontWeight: '600',
176
+ lineHeight: '1',
177
+ letterSpacing: '0',
178
+ },
176
179
  };
177
180
 
178
- const responsiveTexts = {
181
+ const medium = {
179
182
  [`@media (max-width: ${theme('screens.md', '768px')})`]: {
180
183
  '.text-big-number-md': {
181
- fontSize: '3rem',
184
+ fontSize: '1.5rem',
185
+ lineHeight: '1.20',
186
+ },
187
+ '.text-big-number-sm': {
188
+ fontSize: '1.25rem',
189
+ lineHeight: '1.20',
190
+ },
191
+ '.text-big-number-lg': {
192
+ fontSize: '2.25rem',
182
193
  lineHeight: '1.20',
183
194
  },
184
195
  '.text-heading-2xl': {
185
- fontSize: '3rem', // text-5xl
196
+ fontSize: '3rem',
186
197
  },
187
198
  '.text-heading-xl': {
188
- fontSize: '1.875rem', // text-3xl
199
+ fontSize: '1.875rem',
189
200
  },
190
201
  '.text-heading-lg': {
191
- fontSize: '1.125rem', // text-lg
202
+ fontSize: '1.125rem',
192
203
  },
193
204
  '.text-heading-md': {
194
- fontSize: '1.25rem', // text-xl
205
+ fontSize: '1.25rem',
195
206
  },
196
207
  '.text-heading-sm': {
197
- fontSize: '1rem', // text-base
208
+ fontSize: '1rem',
198
209
  },
199
210
  '.text-body-lg': {
200
- fontSize: '16px', // text-base
211
+ fontSize: '1rem',
201
212
  },
202
213
  '.text-body-md': {
203
- fontSize: '16px', // mantém
214
+ fontSize: '1rem',
204
215
  },
205
216
  '.text-body-sm': {
206
- fontSize: '14px',
217
+ fontSize: '0.875rem',
207
218
  },
208
219
  '.text-body-xs': {
209
- fontSize: '12px',
220
+ fontSize: '0.75rem',
210
221
  },
211
222
  '.text-body-xss': {
212
- fontSize: '10px',
223
+ fontSize: '0.625rem',
213
224
  },
214
225
  '.text-overline-md': {
215
- fontSize: '14px',
226
+ fontSize: '0.875rem',
216
227
  },
217
228
  '.text-overline-sm': {
218
- fontSize: '12px',
229
+ fontSize: '0.75rem',
219
230
  },
220
231
  '.text-overline-xs': {
221
- fontSize: '10px',
232
+ fontSize: '0.625rem',
222
233
  },
223
234
  },
235
+ };
236
+
237
+ const large = {
224
238
  [`@media (max-width: ${theme('screens.sm', '640px')})`]: {
225
239
  '.text-big-number-md': {
226
- fontSize: '3rem',
240
+ fontSize: '1.25rem',
241
+ lineHeight: '1.20',
242
+ },
243
+ '.text-big-number-sm': {
244
+ fontSize: '1rem',
245
+ lineHeight: '1.20',
246
+ },
247
+ '.text-big-number-lg': {
248
+ fontSize: '1.5rem',
227
249
  lineHeight: '1.20',
228
250
  },
229
251
  '.text-heading-2xl': {
@@ -242,36 +264,35 @@ export const semanticTexts = () => {
242
264
  fontSize: '0.875rem',
243
265
  },
244
266
  '.text-body-lg': {
245
- fontSize: '16px',
267
+ fontSize: '1rem',
246
268
  },
247
269
  '.text-body-md': {
248
- fontSize: '16px',
270
+ fontSize: '1rem',
249
271
  },
250
272
  '.text-body-sm': {
251
- fontSize: '14px',
273
+ fontSize: '0.875rem',
252
274
  },
253
275
  '.text-body-xs': {
254
- fontSize: '12px',
276
+ fontSize: '0.75rem',
255
277
  },
256
278
  '.text-body-xss': {
257
- fontSize: '10px',
279
+ fontSize: '0.625rem',
258
280
  },
259
281
  '.text-overline-md': {
260
- fontSize: '12px',
282
+ fontSize: '0.75rem',
261
283
  },
262
284
  '.text-overline-sm': {
263
- fontSize: '12px',
285
+ fontSize: '0.75rem',
264
286
  },
265
287
  '.text-overline-xs': {
266
- fontSize: '10px',
288
+ fontSize: '0.625rem',
267
289
  },
268
290
  },
269
-
270
291
  };
271
292
 
272
- addComponents(deprecatedTexts);
273
- addComponents(texts);
274
- addComponents(responsiveTexts);
293
+ addComponents(mobile);
294
+ addComponents(medium);
295
+ addComponents(large);
275
296
  });
276
297
  };
277
298
 
@@ -0,0 +1,18 @@
1
+ import { tokenRef } from '../../scripts/refs.js';
2
+
3
+ export const accent = {
4
+ light: {
5
+ accent: tokenRef('brand.accent.accent-600'),
6
+ 'accent-mask': tokenRef('primitives.alpha.violet.50'),
7
+ 'accent-selected': tokenRef('brand.accent.accent-500'),
8
+ 'accent-contrast': tokenRef('primitives.base.black'),
9
+ },
10
+ dark: {
11
+ accent: tokenRef('brand.accent.accent-500'),
12
+ 'accent-mask': tokenRef('primitives.alpha.violet.100'),
13
+ 'accent-selected': tokenRef('brand.accent.accent-500'),
14
+ 'accent-contrast': tokenRef('primitives.base.black'),
15
+ },
16
+ };
17
+
18
+ export default { accent };
@@ -0,0 +1,32 @@
1
+ import { tokenRef } from '../../scripts/refs.js';
2
+
3
+ export const background = {
4
+ light: {
5
+ 'bg-canvas': tokenRef('theme.surfaces.surface-0'),
6
+ 'bg-surface': tokenRef('theme.surfaces.surface-0'),
7
+ 'bg-surface-raised': tokenRef('theme.surfaces.surface-0'),
8
+ 'bg-mask': tokenRef('primitives.alpha.black.50'),
9
+ 'bg-surface-overlay': tokenRef('theme.surfaces.surface-50'),
10
+ 'bg-hover': tokenRef('primitives.alpha.black.100'),
11
+ 'bg-active': tokenRef('primitives.alpha.black.50'),
12
+ 'bg-backdrop': tokenRef('primitives.alpha.black.700'),
13
+ 'bg-selected': tokenRef('theme.surfaces.surface-200'),
14
+ 'bg-contrast': tokenRef('theme.surfaces.surface-900'),
15
+ 'bg-disabled': tokenRef('primitives.gray.400'),
16
+ },
17
+ dark: {
18
+ 'bg-canvas': tokenRef('theme.surfaces.surface-950'),
19
+ 'bg-surface': tokenRef('theme.surfaces.surface-900'),
20
+ 'bg-surface-raised': tokenRef('theme.surfaces.surface-800'),
21
+ 'bg-mask': tokenRef('primitives.alpha.white.50'),
22
+ 'bg-surface-overlay': tokenRef('theme.surfaces.surface-700'),
23
+ 'bg-hover': tokenRef('primitives.alpha.white.100'),
24
+ 'bg-active': tokenRef('primitives.alpha.white.50'),
25
+ 'bg-backdrop': tokenRef('primitives.alpha.black.700'),
26
+ 'bg-selected': tokenRef('theme.surfaces.surface-950'),
27
+ 'bg-contrast': tokenRef('theme.surfaces.surface-50'),
28
+ 'bg-disabled': tokenRef('primitives.gray.500'),
29
+ },
30
+ };
31
+
32
+ export default { background };
@@ -0,0 +1,18 @@
1
+ import { tokenRef } from '../../scripts/refs.js';
2
+
3
+ export const border = {
4
+ light: {
5
+ 'border-default': tokenRef('theme.surfaces.surface-200'),
6
+ 'border-muted': tokenRef('theme.surfaces.surface-100'),
7
+ 'border-strong': tokenRef('primitives.base.black'),
8
+ 'border-selected': tokenRef('brand.primary.primary-500'),
9
+ },
10
+ dark: {
11
+ 'border-default': tokenRef('theme.surfaces.surface-800'),
12
+ 'border-muted': tokenRef('theme.surfaces.surface-700'),
13
+ 'border-strong': tokenRef('primitives.base.white'),
14
+ 'border-selected': tokenRef('brand.primary.primary-500'),
15
+ },
16
+ };
17
+
18
+ export default { border };
@@ -0,0 +1,16 @@
1
+ import { tokenRef } from '../../../scripts/refs.js';
2
+
3
+ export const danger = {
4
+ light: {
5
+ danger: tokenRef('primitives.red.50'),
6
+ 'danger-border': tokenRef('primitives.alpha.red.600'),
7
+ 'danger-contrast': tokenRef('primitives.red.600'),
8
+ },
9
+ dark: {
10
+ danger: tokenRef('primitives.red.950'),
11
+ 'danger-border': tokenRef('primitives.alpha.red.500'),
12
+ 'danger-contrast': tokenRef('primitives.red.400'),
13
+ },
14
+ };
15
+
16
+ export default { danger };
@@ -0,0 +1,16 @@
1
+ import { tokenRef } from '../../../scripts/refs.js';
2
+
3
+ export const info = {
4
+ light: {
5
+ info: tokenRef('brand.accent.accent-50'),
6
+ 'info-border': tokenRef('primitives.alpha.violet.600'),
7
+ 'info-contrast': tokenRef('brand.accent.accent-500'),
8
+ },
9
+ dark: {
10
+ info: tokenRef('brand.accent.accent-950'),
11
+ 'info-border': tokenRef('primitives.alpha.violet.400'),
12
+ 'info-contrast': tokenRef('primitives.violet.500'),
13
+ },
14
+ };
15
+
16
+ export default { info };
@@ -0,0 +1,16 @@
1
+ import { tokenRef } from '../../../scripts/refs.js';
2
+
3
+ export const success = {
4
+ light: {
5
+ success: tokenRef('primitives.green.50'),
6
+ 'success-border': tokenRef('primitives.alpha.green.600'),
7
+ 'success-contrast': tokenRef('primitives.green.700'),
8
+ },
9
+ dark: {
10
+ success: tokenRef('primitives.green.950'),
11
+ 'success-border': tokenRef('primitives.alpha.green.400'),
12
+ 'success-contrast': tokenRef('primitives.green.500'),
13
+ },
14
+ };
15
+
16
+ export default { success };
@@ -0,0 +1,16 @@
1
+ import { tokenRef } from '../../../scripts/refs.js';
2
+
3
+ export const warning = {
4
+ light: {
5
+ warning: tokenRef('primitives.yellow.50'),
6
+ 'warning-border': tokenRef('primitives.alpha.yellow.600'),
7
+ 'warning-contrast': tokenRef('primitives.yellow.700'),
8
+ },
9
+ dark: {
10
+ warning: tokenRef('primitives.yellow.950'),
11
+ 'warning-border': tokenRef('primitives.alpha.yellow.300'),
12
+ 'warning-contrast': tokenRef('primitives.yellow.300'),
13
+ },
14
+ };
15
+
16
+ export default { warning };
@@ -0,0 +1,18 @@
1
+ import { tokenRef } from '../../scripts/refs.js';
2
+
3
+ export const primary = {
4
+ light: {
5
+ primary: tokenRef('brand.primary.primary-500'),
6
+ 'primary-mask': tokenRef('primitives.alpha.orange.100'),
7
+ 'primary-selected': tokenRef('primitives.alpha.orange.100'),
8
+ 'primary-contrast': tokenRef('primitives.base.black'),
9
+ },
10
+ dark: {
11
+ primary: tokenRef('brand.primary.primary-500'),
12
+ 'primary-mask': tokenRef('primitives.alpha.orange.100'),
13
+ 'primary-selected': tokenRef('primitives.alpha.orange.100'),
14
+ 'primary-contrast': tokenRef('primitives.base.white'),
15
+ },
16
+ };
17
+
18
+ export default { primary };
@@ -0,0 +1,12 @@
1
+ import { tokenRef } from '../../scripts/refs.js';
2
+
3
+ export const ring = {
4
+ light: {
5
+ 'ring-color': tokenRef('theme.surfaces.surface-950'),
6
+ },
7
+ dark: {
8
+ 'ring-color': tokenRef('theme.surfaces.surface-0'),
9
+ },
10
+ };
11
+
12
+ export default { ring };
@@ -0,0 +1,18 @@
1
+ import { tokenRef } from '../../scripts/refs.js';
2
+
3
+ export const secondary = {
4
+ light: {
5
+ secondary: tokenRef('primitives.surface.950'),
6
+ 'secondary-mask': tokenRef('primitives.alpha.black.50'),
7
+ 'secondary-selected': tokenRef('primitives.surface.950'),
8
+ 'secondary-contrast': tokenRef('primitives.base.white'),
9
+ },
10
+ dark: {
11
+ secondary: tokenRef('primitives.surface.0'),
12
+ 'secondary-mask': tokenRef('primitives.alpha.white.100'),
13
+ 'secondary-selected': tokenRef('primitives.surface.0'),
14
+ 'secondary-contrast': tokenRef('primitives.base.black'),
15
+ },
16
+ };
17
+
18
+ export default { secondary };
@@ -0,0 +1,23 @@
1
+ import { tokenRef } from '../../scripts/refs.js';
2
+
3
+ const shared = {
4
+ 'surface-0': tokenRef('primitives.base.white'),
5
+ 'surface-50': tokenRef('primitives.gray.50'),
6
+ 'surface-100': tokenRef('primitives.gray.100'),
7
+ 'surface-200': tokenRef('primitives.gray.200'),
8
+ 'surface-300': tokenRef('primitives.gray.300'),
9
+ 'surface-400': tokenRef('primitives.gray.400'),
10
+ 'surface-500': tokenRef('primitives.gray.500'),
11
+ 'surface-600': tokenRef('primitives.gray.600'),
12
+ 'surface-700': tokenRef('primitives.gray.700'),
13
+ 'surface-800': tokenRef('primitives.gray.800'),
14
+ 'surface-900': tokenRef('primitives.gray.900'),
15
+ 'surface-950': tokenRef('primitives.gray.950'),
16
+ };
17
+
18
+ export const surfaces = {
19
+ light: shared,
20
+ dark: shared,
21
+ };
22
+
23
+ export default { surfaces };
@@ -0,0 +1,18 @@
1
+ import { tokenRef } from '../../scripts/refs.js';
2
+
3
+ export const text = {
4
+ light: {
5
+ 'text-default': tokenRef('primitives.gray.900'),
6
+ 'text-muted': tokenRef('primitives.gray.600'),
7
+ 'text-disabled': tokenRef('primitives.gray.600'),
8
+ 'text-link': tokenRef('theme.accent.accent'),
9
+ },
10
+ dark: {
11
+ 'text-default': tokenRef('primitives.gray.50'),
12
+ 'text-muted': tokenRef('primitives.gray.400'),
13
+ 'text-disabled': tokenRef('primitives.gray.600'),
14
+ 'text-link': tokenRef('theme.accent.accent'),
15
+ },
16
+ };
17
+
18
+ export default { text };
@@ -0,0 +1,32 @@
1
+ import { brandPrimitives, primitives, surfacePrimitives } from './primitives/colors/colors.js';
2
+ import { semanticColors } from './semantic/colors.js';
3
+
4
+ export const theme = {
5
+ extend: {
6
+ colors: {
7
+ base: {
8
+ white: primitives.base.white,
9
+ black: primitives.base.black,
10
+ },
11
+ brand: {
12
+ primary: brandPrimitives.primary,
13
+ accent: brandPrimitives.accent,
14
+ },
15
+ surface: surfacePrimitives.surface,
16
+ orange: primitives.orange,
17
+ violet: primitives.violet,
18
+ neutral: primitives.neutral,
19
+ gray: primitives.gray,
20
+ slate: primitives.slate,
21
+ red: primitives.red,
22
+ green: primitives.green,
23
+ yellow: primitives.yellow,
24
+ blue: primitives.blue,
25
+ },
26
+ textColor: semanticColors.text,
27
+ backgroundColor: semanticColors.background,
28
+ borderColor: semanticColors.border,
29
+ },
30
+ };
31
+
32
+ export default { theme };
package/colors-brand.js DELETED
@@ -1,24 +0,0 @@
1
- /**
2
- * BRAND COLORS TOKENS
3
- *
4
- * Organized brand colors consuming primitive colors.
5
- */
6
-
7
- import { primitives } from './primitives/colors.js';
8
-
9
- export const brandColors = {
10
- orange: primitives.orange[500],
11
- darkOrange: primitives.orange[600],
12
- lavander: primitives.violet[300],
13
- darkLavander: primitives.slate[900],
14
- blackLavander: primitives.slate[950],
15
- gray: primitives.neutral[200],
16
- mediumGray: primitives.neutral[500],
17
- darkGray: primitives.neutral[900],
18
- white: primitives.neutral[50],
19
- black: primitives.neutral[950],
20
- };
21
-
22
- export default {
23
- brand: brandColors,
24
- };