@aziontech/theme 1.13.0 → 2.0.1

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 +26 -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} +19 -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,13 @@
1
+ export const lineHeight = {
2
+ none: '0',
3
+ 3: '12px',
4
+ 4: '16px',
5
+ 5: '20px',
6
+ 6: '24px',
7
+ 7: '28px',
8
+ 8: '32px',
9
+ 9: '36px',
10
+ 10: '40px',
11
+ };
12
+
13
+ export default { lineHeight };
@@ -0,0 +1,10 @@
1
+ export const tracking = {
2
+ tighter: '-0.05em',
3
+ tight: '-0.025em',
4
+ normal: '0em',
5
+ wide: '0.025em',
6
+ wider: '0.05em',
7
+ widest: '0.1em',
8
+ };
9
+
10
+ export default { tracking };
@@ -1,21 +1,3 @@
1
- /**
2
- * Tailwind plugin to expose semantic animations and keyframes.
3
- *
4
- * This adds animation utilities and keyframes for common UI animations.
5
- *
6
- * Usage in tailwind.config.js:
7
- * ```javascript
8
- * import { theme } from '@aziontech/theme/tailwind/tailwind-theme.js';
9
- * import semanticAnimations from '@aziontech/theme/tailwind/semantic-animations-plugin';
10
- *
11
- * export default {
12
- * theme,
13
- * plugins: [semanticAnimations()],
14
- * };
15
- * ```
16
- */
17
-
18
- // Lazy-require to avoid hard dependency for consumers
19
1
  const plugin = (() => {
20
2
  try {
21
3
  return require('tailwindcss/plugin');
@@ -28,8 +10,8 @@ const plugin = (() => {
28
10
  * Generate semantic animation utilities and keyframes
29
11
  * @returns {import('tailwindcss/plugin').Plugin}
30
12
  */
31
- export const semanticAnimations = () => {
32
- return plugin(({ addUtilities, addComponents, theme }) => {
13
+ export const animations = () => {
14
+ return plugin(({ addUtilities, addComponents }) => {
33
15
  // Animation utilities
34
16
  const animations = {
35
17
  '.animate-fade-in': {
@@ -47,6 +29,14 @@ export const semanticAnimations = () => {
47
29
  '.animate-highlight-fade': {
48
30
  animation: 'highlight ease-in forwards',
49
31
  },
32
+ '.animate-popup-scale-in': {
33
+ animation: 'popupScaleIn 150ms cubic-bezier(0.39, 0.57, 0.56, 1)',
34
+ transformOrigin: 'var(--popup-origin, center)',
35
+ },
36
+ '.animate-popup-scale-out': {
37
+ animation: 'popupScaleOut 110ms cubic-bezier(0.55, 0.09, 0.68, 0.53)',
38
+ transformOrigin: 'var(--popup-origin, center)',
39
+ },
50
40
  };
51
41
 
52
42
  // Keyframes components
@@ -71,6 +61,14 @@ export const semanticAnimations = () => {
71
61
  '0%': { backgroundColor: 'var(--surface-hover)', fontWeight: '500' },
72
62
  '100%': { backgroundColor: 'var(--surface-hover)', fontWeight: '500' },
73
63
  },
64
+ '@keyframes popupScaleIn': {
65
+ '0%': { opacity: '0', transform: 'scale(0.95)' },
66
+ '100%': { opacity: '1', transform: 'scale(1)' },
67
+ },
68
+ '@keyframes popupScaleOut': {
69
+ '0%': { opacity: '1', transform: 'scale(1)' },
70
+ '100%': { opacity: '0', transform: 'scale(0.95)' },
71
+ },
74
72
  };
75
73
 
76
74
  const variants = ['responsive', 'hover', 'focus', 'active', 'motion-safe', 'motion-reduce'];
@@ -79,4 +77,4 @@ export const semanticAnimations = () => {
79
77
  });
80
78
  };
81
79
 
82
- export default semanticAnimations;
80
+ export default animations;
@@ -0,0 +1,138 @@
1
+ /**
2
+ * SEMANTIC COLOR TOKENS
3
+ *
4
+ * Single source of truth for semantic color tokens.
5
+ *
6
+ * - `semanticColorsData`: token refs grouped by category (`text`, `background`,
7
+ * `border`) and mode (`light`, `dark`). Consumed by `tokens/build/css-vars.js`
8
+ * to emit `:root` / `.dark` CSS variables.
9
+ * - `semanticColors`: derived map of `var(--…)` strings, grouped by category,
10
+ * consumed by `tokens/theme.js` to extend Tailwind's `textColor`,
11
+ * `backgroundColor`, and `borderColor`. Generates utilities like
12
+ * `text-default`, `bg-surface`, `border-danger` natively — no plugin needed.
13
+ *
14
+ * Adding a new semantic color: add a key under both `light` and `dark` in the
15
+ * relevant category here. The CSS variable and the Tailwind utility are both
16
+ * derived automatically.
17
+ */
18
+
19
+ import { tokenRef } from '../../scripts/refs.js';
20
+
21
+ export const semanticColorsData = {
22
+ text: {
23
+ light: {
24
+ default: tokenRef('primitives.gray.900'),
25
+ muted: tokenRef('primitives.gray.600'),
26
+ link: tokenRef('primitives.blue.600'),
27
+ code: tokenRef('primitives.gray.600'),
28
+ 'link-hover': tokenRef('primitives.blue.700'),
29
+ primary: tokenRef('brand.primary.primary-500'),
30
+ 'primary-hover': tokenRef('brand.primary.primary-600'),
31
+ accent: tokenRef('brand.accent.accent-500'),
32
+ 'accent-hover': tokenRef('brand.accent.accent-600'),
33
+ 'danger-hover': tokenRef('primitives.red.500'),
34
+ 'warning-hover': tokenRef('primitives.yellow.500'),
35
+ 'success-hover': tokenRef('primitives.green.500'),
36
+ success: tokenRef('primitives.green.600'),
37
+ danger: tokenRef('primitives.red.600'),
38
+ warning: tokenRef('primitives.yellow.600'),
39
+ },
40
+ dark: {
41
+ default: tokenRef('primitives.gray.50'),
42
+ muted: tokenRef('primitives.gray.400'),
43
+ link: tokenRef('primitives.blue.400'),
44
+ code: tokenRef('primitives.gray.400'),
45
+ 'link-hover': tokenRef('primitives.blue.300'),
46
+ primary: tokenRef('brand.primary.primary-500'),
47
+ 'primary-hover': tokenRef('brand.primary.primary-400'),
48
+ accent: tokenRef('brand.accent.accent-500'),
49
+ 'accent-hover': tokenRef('brand.accent.accent-400'),
50
+ 'danger-hover': tokenRef('primitives.red.500'),
51
+ 'warning-hover': tokenRef('primitives.yellow.500'),
52
+ 'success-hover': tokenRef('primitives.green.500'),
53
+ success: tokenRef('primitives.green.400'),
54
+ danger: tokenRef('primitives.red.400'),
55
+ warning: tokenRef('primitives.yellow.400'),
56
+ },
57
+ },
58
+ background: {
59
+ light: {
60
+ 'surface-raised': tokenRef('brand.surfaces.surface-0'),
61
+ 'surface-overlay': tokenRef('brand.surfaces.surface-50'),
62
+ surface: tokenRef('brand.surfaces.surface-0'),
63
+ canvas: tokenRef('brand.surfaces.surface-100'),
64
+ 'danger-hover': tokenRef('primitives.red.400'),
65
+ 'warning-hover': tokenRef('primitives.yellow.400'),
66
+ 'success-hover': tokenRef('primitives.green.400'),
67
+ success: tokenRef('primitives.green.200'),
68
+ danger: tokenRef('primitives.red.200'),
69
+ warning: tokenRef('primitives.yellow.200'),
70
+ backdrop: tokenRef('primitives.alpha.neutral.25'),
71
+ 'primary-hover': tokenRef('brand.primary.primary-600'),
72
+ primary: tokenRef('brand.primary.primary-500'),
73
+ 'primary-mask': tokenRef('primitives.alpha.brand.primary.65'),
74
+ },
75
+ dark: {
76
+ 'surface-raised': tokenRef('brand.surfaces.surface-800'),
77
+ 'surface-overlay': tokenRef('brand.surfaces.surface-700'),
78
+ surface: tokenRef('brand.surfaces.surface-900'),
79
+ canvas: tokenRef('brand.surfaces.surface-950'),
80
+ 'danger-hover': tokenRef('primitives.red.600'),
81
+ 'warning-hover': tokenRef('primitives.yellow.600'),
82
+ 'success-hover': tokenRef('primitives.green.600'),
83
+ success: tokenRef('primitives.green.800'),
84
+ danger: tokenRef('primitives.red.800'),
85
+ warning: tokenRef('primitives.yellow.800'),
86
+ backdrop: tokenRef('primitives.alpha.neutral.25'),
87
+ 'primary-hover': tokenRef('brand.primary.primary-400'),
88
+ primary: tokenRef('brand.primary.primary-500'),
89
+ 'primary-mask': tokenRef('primitives.alpha.brand.primary.65'),
90
+ },
91
+ },
92
+ border: {
93
+ light: {
94
+ default: tokenRef('brand.surfaces.surface-100'),
95
+ strong: tokenRef('primitives.base.black'),
96
+ warning: tokenRef('primitives.yellow.600'),
97
+ success: tokenRef('primitives.green.600'),
98
+ danger: tokenRef('primitives.red.600'),
99
+ primary: tokenRef('brand.primary.primary-500'),
100
+ accent: tokenRef('brand.accent.accent-500'),
101
+ 'warning-hover': tokenRef('primitives.yellow.500'),
102
+ 'success-hover': tokenRef('primitives.green.500'),
103
+ 'danger-hover': tokenRef('primitives.red.500'),
104
+ 'primary-hover': tokenRef('brand.primary.primary-600'),
105
+ 'accent-hover': tokenRef('brand.accent.accent-600'),
106
+ subtle: tokenRef('brand.surfaces.surface-200'),
107
+ },
108
+ dark: {
109
+ default: tokenRef('brand.surfaces.surface-800'),
110
+ strong: tokenRef('primitives.base.white'),
111
+ warning: tokenRef('primitives.yellow.400'),
112
+ success: tokenRef('primitives.green.400'),
113
+ danger: tokenRef('primitives.red.400'),
114
+ primary: tokenRef('brand.primary.primary-500'),
115
+ accent: tokenRef('brand.accent.accent-500'),
116
+ 'warning-hover': tokenRef('primitives.yellow.500'),
117
+ 'success-hover': tokenRef('primitives.green.500'),
118
+ 'danger-hover': tokenRef('primitives.red.500'),
119
+ 'primary-hover': tokenRef('brand.primary.primary-400'),
120
+ 'accent-hover': tokenRef('brand.accent.accent-400'),
121
+ subtle: tokenRef('brand.surfaces.surface-700'),
122
+ },
123
+ },
124
+ };
125
+
126
+ const toCssVarMap = (category, mode) =>
127
+ Object.fromEntries(Object.keys(mode).map((key) => [key, `var(--${category}-${key})`]));
128
+
129
+ export const semanticColors = {
130
+ text: toCssVarMap('text', semanticColorsData.text.light),
131
+ background: toCssVarMap('background', semanticColorsData.background.light),
132
+ border: toCssVarMap('border', semanticColorsData.border.light),
133
+ };
134
+
135
+ export default {
136
+ semanticColors,
137
+ semanticColorsData,
138
+ };
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Declarative container tokens (mobile-first).
3
+ *
4
+ * Each entry maps a token key to a breakpoint map. `_` is the default;
5
+ * any other key must exist in tokens/primitives/breakpoints.js.
6
+ *
7
+ * Values are ported from the legacy `containers.js` plugin. The `xl` bucket
8
+ * used to be wrapped in `@media (max-width: xl)` — orphan / never matched
9
+ * cleanly — and was corrected to `min-width` here.
10
+ */
11
+
12
+ export const containersData = {
13
+ px: { _: '1rem', sm: '2.5rem', xl: '0' },
14
+ py: { _: '4rem', sm: '8rem', xl: '12rem' },
15
+ 'max-width': { _: '28rem', sm: '64rem', xl: '80rem' },
16
+ };
17
+
18
+ export default { containersData };
@@ -0,0 +1,70 @@
1
+ // TODO: deprecated — substituído pelos tokens declarativos em
2
+ // `containers.data.js` e pelo CSS gerado em `dist/globals.css` via
3
+ // `src/scripts/build-tokens.mjs`. Remover quando consumers migrarem.
4
+ const plugin = (() => {
5
+ try {
6
+ return require('tailwindcss/plugin');
7
+ } catch {
8
+ return (handler) => handler;
9
+ }
10
+ })();
11
+
12
+ /**
13
+ * Generate semantic spacing style components
14
+ * @returns {import('tailwindcss/plugin').Plugin}
15
+ */
16
+ export const containers = () => {
17
+ return plugin(({ addComponents, theme }) => {
18
+ const mobile = {
19
+ '.max-container-width': {
20
+ maxWidth: theme('container.md'),
21
+ },
22
+ '.px-container': {
23
+ paddingLeft: theme('spacing.4'),
24
+ paddingRight: theme('spacing.4'),
25
+ },
26
+ '.py-container': {
27
+ paddingTop: theme('spacing.16'),
28
+ paddingBottom: theme('spacing.16'),
29
+ },
30
+ }
31
+
32
+ const medium = {
33
+ [`@media (min-width: ${theme('screens.sm',)})`]: {
34
+ '.max-container-width': {
35
+ maxWidth: theme('container.5xl'),
36
+ },
37
+ '.px-container': {
38
+ paddingLeft: theme('spacing.10'),
39
+ paddingRight: theme('spacing.10'),
40
+ },
41
+ '.py-container': {
42
+ paddingTop: theme('spacing.32'),
43
+ paddingBottom: theme('spacing.32'),
44
+ },
45
+ },
46
+ }
47
+
48
+ const large = {
49
+ [`@media (max-width: ${theme('screens.xl',)})`]: {
50
+ '.max-container-width': {
51
+ maxWidth: theme('container.7xl'),
52
+ },
53
+ '.px-container': {
54
+ paddingLeft: theme('spacing.0'),
55
+ paddingRight: theme('spacing.0'),
56
+ },
57
+ '.py-container': {
58
+ paddingTop: theme('spacing.48'),
59
+ paddingBottom: theme('spacing.48'),
60
+ },
61
+ },
62
+ }
63
+
64
+ addComponents(mobile);
65
+ addComponents(medium);
66
+ addComponents(large);
67
+ });
68
+ };
69
+
70
+ export default containers;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Declarative spacing tokens (mobile-first).
3
+ *
4
+ * Each value maps to two utilities: `.gap-<key>` and `.p-<key>`, both backed
5
+ * by the same CSS variable. Values ported from `spacings.js`.
6
+ */
7
+
8
+ export const spacingsData = {
9
+ 'spacing-xxl': { _: '2rem', sm: '4rem', xl: '6rem' },
10
+ 'spacing-xl': { _: '1.5rem', sm: '2rem', xl: '3rem' },
11
+ 'spacing-lg': { _: '1rem', sm: '1.5rem' },
12
+ 'spacing-md': { _: '1rem' },
13
+ 'spacing-sm': { _: '0.75rem' },
14
+ 'spacing-xs': { _: '0.5rem' },
15
+ 'spacing-xxs': { _: '0.25rem' },
16
+ };
17
+
18
+ export default { spacingsData };
@@ -0,0 +1,163 @@
1
+ // TODO: deprecated — substituído pelos tokens declarativos em
2
+ // `spacings.data.js` e pelo CSS gerado em `dist/globals.css` via
3
+ // `src/scripts/build-tokens.mjs`. Remover quando consumers migrarem.
4
+ const plugin = (() => {
5
+ try {
6
+ return require('tailwindcss/plugin');
7
+ } catch {
8
+ return (handler) => handler;
9
+ }
10
+ })();
11
+
12
+ /**
13
+ * Generate semantic spacing components
14
+ * @returns {import('tailwindcss/plugin').Plugin}
15
+ */
16
+ export const spacingElements = () => {
17
+ return plugin(({ addComponents, theme }) => {
18
+ const mobile = {
19
+ '.gap-spacing-elements-xxl': {
20
+ gap: theme('spacing.8'),
21
+ },
22
+ '.gap-spacing-elements-xl': {
23
+ gap: theme('spacing.6'),
24
+ },
25
+ '.gap-spacing-elements-lg': {
26
+ gap: theme('spacing.4'),
27
+ },
28
+ '.gap-spacing-elements-md': {
29
+ gap: theme('spacing.4'),
30
+ },
31
+ '.gap-spacing-elements-sm': {
32
+ gap: theme('spacing.3'),
33
+ },
34
+ '.gap-spacing-elements-xs': {
35
+ gap: theme('spacing.2'),
36
+ },
37
+ '.gap-spacing-elements-xxs': {
38
+ gap: theme('spacing.1'),
39
+ },
40
+ '.p-spacing-elements-xxl': {
41
+ padding: theme('spacing.8'),
42
+ },
43
+ '.p-spacing-elements-xl': {
44
+ padding: theme('spacing.6'),
45
+ },
46
+ '.p-spacing-elements-lg': {
47
+ padding: theme('spacing.4'),
48
+ },
49
+ '.p-spacing-elements-md': {
50
+ padding: theme('spacing.4'),
51
+ },
52
+ '.p-spacing-elements-sm': {
53
+ padding: theme('spacing.3'),
54
+ },
55
+ '.p-spacing-elements-xs': {
56
+ padding: theme('spacing.2'),
57
+ },
58
+ '.p-spacing-elements-xxs': {
59
+ padding: theme('spacing.1'),
60
+ },
61
+ };
62
+
63
+ const medium = {
64
+ [`@media (min-width: ${theme('screens.sm')})`]: {
65
+ '.gap-spacing-elements-xxl': {
66
+ gap: theme('spacing.16'),
67
+ },
68
+ '.gap-spacing-elements-xl': {
69
+ gap: theme('spacing.8'),
70
+ },
71
+ '.gap-spacing-elements-lg': {
72
+ gap: theme('spacing.6'),
73
+ },
74
+ '.gap-spacing-elements-md': {
75
+ gap: theme('spacing.4'),
76
+ },
77
+ '.gap-spacing-elements-sm': {
78
+ gap: theme('spacing.3'),
79
+ },
80
+ '.gap-spacing-elements-xs': {
81
+ gap: theme('spacing.2'),
82
+ },
83
+ '.gap-spacing-elements-xxs': {
84
+ gap: theme('spacing.1'),
85
+ },
86
+ '.p-spacing-elements-xxl': {
87
+ padding: theme('spacing.16'),
88
+ },
89
+ '.p-spacing-elements-xl': {
90
+ padding: theme('spacing.8'),
91
+ },
92
+ '.p-spacing-elements-lg': {
93
+ padding: theme('spacing.6'),
94
+ },
95
+ '.p-spacing-elements-md': {
96
+ padding: theme('spacing.4'),
97
+ },
98
+ '.p-spacing-elements-sm': {
99
+ padding: theme('spacing.3'),
100
+ },
101
+ '.p-spacing-elements-xs': {
102
+ padding: theme('spacing.2'),
103
+ },
104
+ '.p-spacing-elements-xxs': {
105
+ padding: theme('spacing.1'),
106
+ },
107
+ },
108
+ };
109
+
110
+ const large = {
111
+ [`@media (min-width: ${theme('screens.xl')})`]: {
112
+ '.gap-spacing-elements-xxl': {
113
+ gap: theme('spacing.24'),
114
+ },
115
+ '.gap-spacing-elements-xl': {
116
+ gap: theme('spacing.12'),
117
+ },
118
+ '.gap-spacing-elements-lg': {
119
+ gap: theme('spacing.6'),
120
+ },
121
+ '.gap-spacing-elements-md': {
122
+ gap: theme('spacing.4'),
123
+ },
124
+ '.gap-spacing-elements-sm': {
125
+ gap: theme('spacing.3'),
126
+ },
127
+ '.gap-spacing-elements-xs': {
128
+ gap: theme('spacing.2'),
129
+ },
130
+ '.gap-spacing-elements-xxs': {
131
+ gap: theme('spacing.1'),
132
+ },
133
+ '.p-spacing-elements-xxl': {
134
+ padding: theme('spacing.24'),
135
+ },
136
+ '.p-spacing-elements-xl': {
137
+ padding: theme('spacing.12'),
138
+ },
139
+ '.p-spacing-elements-lg': {
140
+ padding: theme('spacing.6'),
141
+ },
142
+ '.p-spacing-elements-md': {
143
+ padding: theme('spacing.4'),
144
+ },
145
+ '.p-spacing-elements-sm': {
146
+ padding: theme('spacing.3'),
147
+ },
148
+ '.p-spacing-elements-xs': {
149
+ padding: theme('spacing.2'),
150
+ },
151
+ '.p-spacing-elements-xxs': {
152
+ padding: theme('spacing.1'),
153
+ },
154
+ },
155
+ };
156
+
157
+ addComponents(mobile);
158
+ addComponents(medium);
159
+ addComponents(large);
160
+ });
161
+ };
162
+
163
+ export default spacingElements;
@@ -0,0 +1,103 @@
1
+ /**
2
+ * Declarative text style tokens (mobile-first).
3
+ *
4
+ * Each entry is a bundle of CSS properties; each property is either a string
5
+ * (static) or a breakpoint map `{ _, sm, md, lg, xl, 2xl }`. Values ported
6
+ * from the legacy `texts.js` plugin — direction inverted from desktop-first
7
+ * (max-width) to mobile-first (min-width).
8
+ *
9
+ * Mapping used during the port:
10
+ * old `large` (≤640) → `_`
11
+ * old `medium` (≤768) → `sm` (≥640)
12
+ * old `mobile` (default, applied >768) → `md` (≥768)
13
+ */
14
+
15
+ export const textsData = {
16
+ 'text-big-number-md': {
17
+ fontSize: { _: '1.25rem', sm: '1.5rem', md: '2.25rem' },
18
+ lineHeight: '1.20',
19
+ },
20
+ 'text-big-number-sm': {
21
+ fontSize: { _: '1rem', sm: '1.25rem' },
22
+ lineHeight: '1.20',
23
+ },
24
+ 'text-big-number-lg': {
25
+ fontSize: { _: '1.5rem', sm: '2.25rem', md: '3.75rem' },
26
+ lineHeight: '1.20',
27
+ },
28
+ 'text-heading-2xl': {
29
+ fontSize: { _: '1.875rem', sm: '3rem', md: '3.75rem' },
30
+ lineHeight: '1.2',
31
+ },
32
+ 'text-heading-xl': {
33
+ fontSize: { _: '1.25rem', sm: '1.875rem', md: '2.25rem' },
34
+ lineHeight: '1.2',
35
+ },
36
+ 'text-heading-lg': {
37
+ fontSize: { _: '1.125rem', md: '1.875rem' },
38
+ lineHeight: '1.2',
39
+ },
40
+ 'text-heading-md': {
41
+ fontSize: { _: '1rem', sm: '1.25rem', md: '1.5rem' },
42
+ lineHeight: '1.2',
43
+ },
44
+ 'text-heading-sm': {
45
+ fontSize: { _: '0.875rem', sm: '1rem', md: '1.125rem' },
46
+ lineHeight: '1.2',
47
+ },
48
+ 'text-body-lg': {
49
+ fontSize: { _: '1rem', md: '1.125rem' },
50
+ lineHeight: '1.5',
51
+ },
52
+ 'text-body-md': {
53
+ fontSize: '1rem',
54
+ lineHeight: '1.5',
55
+ },
56
+ 'text-body-sm': {
57
+ fontSize: '0.875rem',
58
+ lineHeight: '1.5',
59
+ },
60
+ 'text-body-xs': {
61
+ fontSize: '0.75rem',
62
+ lineHeight: '1.5',
63
+ },
64
+ 'text-body-xss': {
65
+ fontSize: '0.625rem',
66
+ lineHeight: '1.5',
67
+ },
68
+ 'text-overline-md': {
69
+ fontSize: { _: '0.75rem', sm: '0.875rem' },
70
+ lineHeight: '1.4',
71
+ letterSpacing: '0.08em',
72
+ textTransform: 'uppercase',
73
+ },
74
+ 'text-overline-sm': {
75
+ fontSize: '0.75rem',
76
+ lineHeight: '1.4',
77
+ letterSpacing: '0.08em',
78
+ textTransform: 'uppercase',
79
+ },
80
+ 'text-overline-xs': {
81
+ fontSize: '0.625rem',
82
+ lineHeight: '1.4',
83
+ letterSpacing: '0.08em',
84
+ textTransform: 'uppercase',
85
+ },
86
+ 'text-button-lg': {
87
+ fontFamily: 'Proto Mono',
88
+ fontSize: '0.875rem',
89
+ fontWeight: '600',
90
+ lineHeight: '1',
91
+ letterSpacing: '0',
92
+ },
93
+ 'text-button-md': {
94
+ fontFamily: 'Proto Mono',
95
+ fontSize: '0.75rem',
96
+ fontWeight: '600',
97
+ lineHeight: '1',
98
+ letterSpacing: '0',
99
+ },
100
+ };
101
+
102
+
103
+ export default { textsData };