@aziontech/theme 1.13.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} +30 -9
  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
@@ -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
- };
@@ -1,91 +0,0 @@
1
- /**
2
- * Tailwind plugin to expose semantic colors at root level.
3
- *
4
- * This allows using classes like `text-muted` instead of `text-text-muted`.
5
- *
6
- * Usage in tailwind.config.js:
7
- * ```javascript
8
- * import { theme } from '@aziontech/theme/tailwind/tailwind-theme.js';
9
- * import semanticColors from '@aziontech/theme/tailwind/semantic-colors-plugin';
10
- *
11
- * export default {
12
- * theme,
13
- * plugins: [semanticColors()],
14
- * };
15
- * ```
16
- */
17
-
18
- // Lazy-require to avoid hard dependency for consumers
19
- const plugin = (() => {
20
- try {
21
- return require('tailwindcss/plugin');
22
- } catch {
23
- return (handler) => handler;
24
- }
25
- })();
26
-
27
- /**
28
- * Generate semantic color utilities
29
- * @returns {import('tailwindcss/plugin').Plugin}
30
- */
31
- export const semanticColors = () => {
32
- return plugin(({ addUtilities }) => {
33
- const textColors = {
34
- '.text-default': { color: 'var(--text-default)' },
35
- '.text-muted': { color: 'var(--text-muted)' },
36
- '.text-link': { color: 'var(--text-link)' },
37
- '.text-linkHover': { color: 'var(--text-linkHover)' },
38
- '.text-code': { color: 'var(--text-code)' },
39
- '.text-primary': { color: 'var(--text-primary)' },
40
- '.text-primaryHover': { color: 'var(--text-primaryHover)' },
41
- '.text-accent': { color: 'var(--text-accent)' },
42
- '.text-accentHover': { color: 'var(--text-accentHover)' },
43
- '.text-danger': { color: 'var(--text-danger)' },
44
- '.text-dangerHover': { color: 'var(--text-dangerHover)' },
45
- '.text-warning': { color: 'var(--text-warning)' },
46
- '.text-warningHover': { color: 'var(--text-warningHover)' },
47
- '.text-success': { color: 'var(--text-success)' },
48
- '.text-successHover': { color: 'var(--text-successHover)' },
49
- };
50
-
51
- const bgColors = {
52
- '.bg-surfaceRaised': { 'background-color': 'var(--background-surfaceRaised)' },
53
- '.bg-surfaceOverlay': { 'background-color': 'var(--background-surfaceOverlay)' },
54
- '.bg-surface': { 'background-color': 'var(--background-surface)' },
55
- '.bg-canvas': { 'background-color': 'var(--background-canvas)' },
56
- '.bg-danger': { 'background-color': 'var(--background-danger)' },
57
- '.bg-dangerHover': { 'background-color': 'var(--background-dangerHover)' },
58
- '.bg-warning': { 'background-color': 'var(--background-warning)' },
59
- '.bg-warningHover': { 'background-color': 'var(--background-warningHover)' },
60
- '.bg-success': { 'background-color': 'var(--background-success)' },
61
- '.bg-successHover': { 'background-color': 'var(--background-successHover)' },
62
- '.bg-backdrop': { 'background-color': 'var(--background-backdrop)' },
63
- '.bg-primary': { 'background-color': 'var(--background-primary)' },
64
- '.bg-primaryHover': { 'background-color': 'var(--background-primaryHover)' },
65
- '.bg-primary-mask': { 'background-color': 'var(--background-primaryMask)' },
66
- };
67
-
68
- const borderColors = {
69
- '.border-default': { 'border-color': 'var(--border-default)' },
70
- '.border-strong': { 'border-color': 'var(--border-strong)' },
71
- '.border-subtle': { 'border-color': 'var(--border-subtle)' },
72
- '.border-warning': { 'border-color': 'var(--border-warning)' },
73
- '.border-warningHover': { 'border-color': 'var(--border-warningHover)' },
74
- '.border-success': { 'border-color': 'var(--border-success)' },
75
- '.border-successHover': { 'border-color': 'var(--border-successHover)' },
76
- '.border-danger': { 'border-color': 'var(--border-danger)' },
77
- '.border-dangerHover': { 'border-color': 'var(--border-dangerHover)' },
78
- '.border-primary': { 'border-color': 'var(--border-primary)' },
79
- '.border-primaryHover': { 'border-color': 'var(--border-primaryHover)' },
80
- '.border-accent': { 'border-color': 'var(--border-accent)' },
81
- '.border-accentHover': { 'border-color': 'var(--border-accentHover)' },
82
- };
83
-
84
- const variants = ['responsive', 'hover', 'dark', 'before', 'after', 'focus', 'active', 'disabled'];
85
- addUtilities(textColors, variants);
86
- addUtilities(bgColors, variants);
87
- addUtilities(borderColors, variants);
88
- });
89
- };
90
-
91
- export default semanticColors;
@@ -1,151 +0,0 @@
1
- /**
2
- * Tailwind plugin to expose semantic spacing styles.
3
- *
4
- * This adds spacing components for container, padding, and gap utilities.
5
- *
6
- * Usage in tailwind.config.js:
7
- * ```javascript
8
- * import { theme } from '@aziontech/theme/tailwind/tailwind-theme.js';
9
- * import semanticSpacing from '@aziontech/theme/tailwind/semantic-spacing-plugin';
10
- *
11
- * export default {
12
- * theme,
13
- * plugins: [semanticSpacing()],
14
- * };
15
- * ```
16
- */
17
-
18
- // Lazy-require to avoid hard dependency for consumers
19
- const plugin = (() => {
20
- try {
21
- return require('tailwindcss/plugin');
22
- } catch {
23
- return (handler) => handler;
24
- }
25
- })();
26
-
27
- /**
28
- * Generate semantic spacing style components
29
- * @returns {import('tailwindcss/plugin').Plugin}
30
- */
31
- export const semanticSpacing = () => {
32
- return plugin(({ addComponents, theme }) => {
33
- const spacing = {
34
- // Container
35
- '.max-container-width': {
36
- maxWidth: '1280px',
37
- },
38
- '.px-container': {
39
- paddingLeft: theme('spacing.0'),
40
- paddingRight: theme('spacing.0'),
41
- },
42
- '.py-container': {
43
- paddingTop: theme('spacing.48'),
44
- paddingBottom: theme('spacing.48'),
45
- },
46
-
47
- // Padding elements
48
- '.p-elements-confortable': {
49
- padding: theme('spacing.24'),
50
- },
51
- '.p-elements-base': {
52
- padding: theme('spacing.12'),
53
- },
54
- '.p-elements-compact': {
55
- padding: theme('spacing.6'),
56
- },
57
-
58
- // Gap elements
59
- '.gap-elements-confortable': {
60
- gap: theme('spacing.24'),
61
- },
62
- '.gap-elements-base': {
63
- gap: theme('spacing.12'),
64
- },
65
- '.gap-elements-compact': {
66
- gap: theme('spacing.6'),
67
- },
68
-
69
- // Gap sections
70
- '.gap-sections': {
71
- gap: theme('spacing.48'),
72
- },
73
- };
74
-
75
- const responsiveSpacing = {
76
- [`@media (max-width: ${theme('screens.md', '768px')})`]: {
77
- '.max-container-width': {
78
- maxWidth: '1024px',
79
- },
80
- '.px-container': {
81
- paddingLeft: theme('spacing.10'),
82
- paddingRight: theme('spacing.10'),
83
- },
84
- '.py-container': {
85
- paddingTop: theme('spacing.32'),
86
- paddingBottom: theme('spacing.32'),
87
- },
88
- '.p-elements-confortable': {
89
- padding: theme('spacing.16'),
90
- },
91
- '.p-elements-base': {
92
- padding: theme('spacing.8'),
93
- },
94
- '.p-elements-compact': {
95
- padding: theme('spacing.5'),
96
- },
97
- '.gap-elements-confortable': {
98
- gap: theme('spacing.16'),
99
- },
100
- '.gap-elements-base': {
101
- gap: theme('spacing.8'),
102
- },
103
- '.gap-elements-compact': {
104
- gap: theme('spacing.6'),
105
- },
106
- '.gap-sections': {
107
- gap: theme('spacing.40'),
108
- },
109
- },
110
- [`@media (max-width: ${theme('screens.sm', '640px')})`]: {
111
- '.max-container-width': {
112
- maxWidth: theme('screens.lg'),
113
- },
114
- '.px-container': {
115
- paddingLeft: theme('spacing.4'),
116
- paddingRight: theme('spacing.4'),
117
- },
118
- '.py-container': {
119
- paddingTop: theme('spacing.16'),
120
- paddingBottom: theme('spacing.16'),
121
- },
122
- '.p-elements-confortable': {
123
- padding: theme('spacing.8'),
124
- },
125
- '.p-elements-base': {
126
- padding: theme('spacing.6'),
127
- },
128
- '.p-elements-compact': {
129
- padding: theme('spacing.4'),
130
- },
131
- '.gap-elements-confortable': {
132
- gap: theme('spacing.8'),
133
- },
134
- '.gap-elements-base': {
135
- gap: theme('spacing.6'),
136
- },
137
- '.gap-elements-compact': {
138
- gap: theme('spacing.4'),
139
- },
140
- '.gap-sections': {
141
- gap: theme('spacing.20'),
142
- },
143
- },
144
- };
145
-
146
- addComponents(spacing);
147
- addComponents(responsiveSpacing);
148
- });
149
- };
150
-
151
- export default semanticSpacing;
@@ -1,54 +0,0 @@
1
- /**
2
- * Tailwind CSS Configuration for @aziontech/theme
3
- *
4
- * This file exports a Tailwind config with all design tokens from the token system.
5
- * Uses CSS variables for semantic tokens, enabling automatic theme switching.
6
- *
7
- * Usage:
8
- * ```javascript
9
- * // tailwind.config.js
10
- * import { theme } from '@aziontech/theme/tailwind/tailwind-theme.js';
11
- * import flatColorsPlugin from '@aziontech/theme/tailwind/tailwind-flat-colors.js';
12
- *
13
- * export default {
14
- * theme,
15
- * plugins: [flatColorsPlugin],
16
- * };
17
- * ```
18
- *
19
- * For theme switching to work, ensure CSS variables are injected:
20
- * ```javascript
21
- * import { injectCssVars } from '@aziontech/theme/tokens';
22
- * injectCssVars();
23
- * ```
24
- */
25
-
26
- import { primitives } from '../tokens/primitives/colors.js';
27
- import { brandPrimitives, surfacePrimitives } from '../tokens/primitives/brand.js';
28
-
29
- export const theme = {
30
- extend: {
31
- colors: {
32
- base: {
33
- white: primitives.base.white,
34
- black: primitives.base.black,
35
- },
36
- brand: {
37
- primary: brandPrimitives.primary,
38
- accent: brandPrimitives.accent,
39
- },
40
- surface: surfacePrimitives.surface,
41
- orange: primitives.orange,
42
- violet: primitives.violet,
43
- neutral: primitives.neutral,
44
- gray: primitives.gray,
45
- slate: primitives.slate,
46
- red: primitives.red,
47
- green: primitives.green,
48
- yellow: primitives.yellow,
49
- blue: primitives.blue,
50
- },
51
- },
52
- };
53
-
54
- export default { theme };
@@ -1,62 +0,0 @@
1
- /**
2
- * Tailwind preset for Azion tokens.
3
- */
4
-
5
- export const preset = {
6
- theme: {
7
- extend: {
8
- colors: {
9
- text: {
10
- default: 'var(--text-default)',
11
- muted: 'var(--text-muted)',
12
- link: 'var(--text-link)',
13
- linkHover: 'var(--text-linkHover)',
14
- code: 'var(--text-code)',
15
- primary: 'var(--text-primary)',
16
- primaryHover: 'var(--text-primaryHover)',
17
- accent: 'var(--text-accent)',
18
- accentHover: 'var(--text-accentHover)',
19
- danger: 'var(--text-danger)',
20
- dangerHover: 'var(--text-dangerHover)',
21
- warning: 'var(--text-warning)',
22
- warningHover: 'var(--text-warningHover)',
23
- success: 'var(--text-success)',
24
- successHover: 'var(--text-successHover)',
25
- },
26
- background: {
27
- surfaceRaised: 'var(--background-surfaceRaised)',
28
- surfaceOverlay: 'var(--background-surfaceOverlay)',
29
- surface: 'var(--background-surface)',
30
- canvas: 'var(--background-canvas)',
31
- danger: 'var(--background-danger)',
32
- dangerHover: 'var(--background-dangerHover)',
33
- warning: 'var(--background-warning)',
34
- warningHover: 'var(--background-warningHover)',
35
- success: 'var(--background-success)',
36
- successHover: 'var(--background-successHover)',
37
- backdrop: 'var(--background-backdrop)',
38
- primary: 'var(--background-primary)',
39
- primaryHover: 'var(--background-primaryHover)',
40
- },
41
- border: {
42
- default: 'var(--border-default)',
43
- strong: 'var(--border-strong)',
44
- subtle: 'var(--border-subtle)',
45
- warning: 'var(--border-warning)',
46
- warningHover: 'var(--border-warningHover)',
47
- success: 'var(--border-success)',
48
- successHover: 'var(--border-successHover)',
49
- danger: 'var(--border-danger)',
50
- dangerHover: 'var(--border-dangerHover)',
51
- primary: 'var(--border-primary)',
52
- primaryHover: 'var(--border-primaryHover)',
53
- accent: 'var(--border-accent)',
54
- accentHover: 'var(--border-accentHover)',
55
- },
56
- },
57
- },
58
- },
59
- darkMode: ['class', '.dark', '.azion.azion-dark'],
60
- };
61
-
62
- export default preset;