@onereach/styles 27.0.2-beta.6103.0 → 27.0.2-beta.6105.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.
@@ -1,230 +1 @@
1
- const customTokens = require('./src/variables/tokens/custom-tokens.json');
2
- const {
3
- SpacePatterns: spacingTokens,
4
- colors: colorTokens,
5
- Gradients: gradientTokens,
6
- BorderRadiuses: borderRadiusTokens,
7
- Borders: borderWidthTokens,
8
- Shadows: boxShadowTokens,
9
- typeStyles: typographyTokens,
10
- } = require('./src/variables/tokens/design-tokens-next.json');
11
- const { plugin: animationDelay } = require('./tailwind/plugins/animation-delay');
12
- const { plugin: core } = require('./tailwind/plugins/core');
13
- const { plugin: iconography } = require('./tailwind/plugins/iconography');
14
- const { plugin: interactivity } = require('./tailwind/plugins/interactivity');
15
- const { plugin: layout } = require('./tailwind/plugins/layout');
16
- const { plugin: legacySpacing } = require('./tailwind/plugins/legacy-spacing');
17
- const { plugin: themeResponsive } = require('./tailwind/plugins/responsive');
18
- const { plugin: scrollbar } = require('./tailwind/plugins/scrollbar');
19
- const { plugin: themeBackground } = require('./tailwind/plugins/theme-background');
20
- const { plugin: themeBorder } = require('./tailwind/plugins/theme-border');
21
- const { plugin: themeDivider } = require('./tailwind/plugins/theme-divider');
22
- const { plugin: themeForeground } = require('./tailwind/plugins/theme-foreground');
23
- const { plugin: themeOutline } = require('./tailwind/plugins/theme-outline');
24
- const { plugin: themePreset } = require('./tailwind/plugins/theme-preset');
25
- const { plugin: typography } = require('./tailwind/plugins/typography');
26
- const {
27
- parseBorderWidthTokens,
28
- parseBoxShadowTokens,
29
- parseFontFamilyTokens,
30
- parseFontSizeTokens,
31
- parseFontWeightTokens,
32
- parseColorTokensNames,
33
- parseSpacingTokensNames,
34
- parseBorderRadiusTokensNames,
35
- parseCustomTokensNames,
36
- } = require('./tailwind/utils');
37
-
38
-
39
- module.exports = {
40
- darkMode: ['variant', '&:is(.dark *), &:is([data-theme="dark"] *)'],
41
-
42
- theme: {
43
- tokens: {
44
- ...parseCustomTokensNames(customTokens),
45
- },
46
-
47
- screens: {},
48
-
49
- spacing: {
50
- 'none': '0px', // Deprecated, major update required
51
- ...parseSpacingTokensNames(spacingTokens),
52
- },
53
-
54
- colors: {},
55
-
56
- textColor: {
57
- ...parseColorTokensNames(colorTokens, ['generic', 'text']),
58
- 'transparent': 'transparent',
59
- 'current': 'currentColor',
60
- 'inherit': 'inherit',
61
- },
62
-
63
- backgroundColor: {
64
- // Avoid using `text` colors as a background (only for corner cases)
65
- ...parseColorTokensNames(colorTokens, ['generic', 'background', 'text']),
66
- 'transparent': 'transparent',
67
- 'current': 'currentColor',
68
- 'inherit': 'inherit',
69
- },
70
-
71
- backgroundImage: {
72
- ...parseColorTokensNames(gradientTokens, ['generic']),
73
- },
74
-
75
- borderColor: {
76
- ...parseColorTokensNames(colorTokens, ['generic', 'text']),
77
- 'transparent': 'transparent',
78
- 'current': 'currentColor',
79
- 'inherit': 'inherit',
80
- },
81
-
82
- outlineColor: {
83
- ...parseColorTokensNames(colorTokens, ['generic']),
84
- 'transparent': 'transparent',
85
- 'current': 'currentColor',
86
- 'inherit': 'inherit',
87
- },
88
-
89
- fill: {
90
- ...parseColorTokensNames(colorTokens, ['generic', 'background', 'text']),
91
- },
92
-
93
- stroke: {
94
- ...parseColorTokensNames(colorTokens, ['generic', 'background', 'text']),
95
- },
96
-
97
- content: {
98
- 'checkbox-checked': '"check_small"',
99
- 'checkbox-indeterminate': '"check_indeterminate_small"',
100
- },
101
-
102
- animation: {
103
- 'circular-loader': 'circular-loader 1400ms linear infinite',
104
- 'linear-loader': 'linear-loader 1400ms linear infinite',
105
- 'skeleton-loader': 'skeleton-loader 1400ms linear infinite',
106
- 'pulse': 'pulse 1s ease-in-out infinite',
107
- },
108
-
109
- keyframes: {
110
- 'circular-loader': {
111
- '0%': {
112
- transform: 'rotate(0deg)',
113
- strokeDasharray: '0, 200',
114
- strokeDashoffset: '0',
115
- },
116
-
117
- '50%': {
118
- transform: 'rotate(180deg)',
119
- strokeDasharray: '100, 200',
120
- strokeDashoffset: 'calc((50% - 2px) * -3.14)',
121
- },
122
-
123
- '100%': {
124
- transform: 'rotate(360deg)',
125
- strokeDasharray: '100, 200',
126
- strokeDashoffset: 'calc((100% - 2px) * -3.14)',
127
- },
128
- },
129
-
130
- 'linear-loader': {
131
- '0%': {
132
- strokeDasharray: '25%, 100%',
133
- strokeDashoffset: '0',
134
- },
135
-
136
- '100%': {
137
- strokeDasharray: '25%, 100%',
138
- strokeDashoffset: 'calc((100% - 0px) * -2.5)', // Workaround for Safari
139
- },
140
- },
141
-
142
- 'skeleton-loader': {
143
- '0%': {
144
- backgroundPosition: '100% 50%',
145
- },
146
-
147
- '100%': {
148
- backgroundPosition: '-100% 50%',
149
- },
150
- },
151
- pulse: {
152
- '0%': { opacity: 0 },
153
- '25%': { opacity: 0.5 },
154
- '50%': { opacity: 1 },
155
- '75%': { opacity: 0.5 },
156
- '100%': { opacity: 0 },
157
- },
158
- },
159
-
160
- borderRadius: {
161
- 'none': '0px', // Deprecated, major update required
162
- '0': '0px',
163
- ...parseBorderRadiusTokensNames(borderRadiusTokens),
164
- 'full': '9999px',
165
- },
166
-
167
- borderWidth: {
168
- '0': '0px',
169
- ...parseBorderWidthTokens(borderWidthTokens),
170
- '4': '4px',
171
- },
172
-
173
- boxShadow: {
174
- 'none': '0 0 #00000000',
175
- ...parseBoxShadowTokens(boxShadowTokens),
176
- DEFAULT: '0 1px 1px rgba(0 0 0 / 0.24), 0 0 1px rgba(0 0 0 / 0.16)',
177
- },
178
-
179
- fontFamily: {
180
- ...parseFontFamilyTokens(typographyTokens),
181
- 'inherit': 'inherit',
182
- },
183
-
184
- fontSize: {
185
- ...parseFontSizeTokens(typographyTokens),
186
- 'inherit': ['inherit', { lineHeight: 'inherit' }],
187
- },
188
-
189
- fontWeight: {
190
- ...parseFontWeightTokens(typographyTokens),
191
- 'inherit': 'inherit',
192
- },
193
-
194
- outlineWidth: {
195
- '0': '0px',
196
- ...parseBorderWidthTokens(borderWidthTokens),
197
- '10': '10px',
198
- },
199
-
200
- transitionDuration: {
201
- 'short': '100ms',
202
- 'medium': '250ms',
203
- 'long': '400ms',
204
- },
205
-
206
- transitionTimingFunction: {
207
- 'standard': 'cubic-bezier(0.2, 0, 0, 1)',
208
- },
209
- },
210
-
211
- plugins: [
212
- core,
213
- layout,
214
- scrollbar,
215
- interactivity,
216
- typography,
217
- iconography,
218
- legacySpacing,
219
-
220
- animationDelay,
221
-
222
- themePreset,
223
- themeForeground,
224
- themeBackground,
225
- themeBorder,
226
- themeDivider,
227
- themeOutline,
228
- themeResponsive,
229
- ],
230
- };
1
+ module.exports = require('./tailwind.config.preset.v4.js');
@@ -0,0 +1,231 @@
1
+ const customTokens = require('./src/variables/tokens/custom-tokens.json');
2
+ const {
3
+ SpacePatterns: spacingTokens,
4
+ colors: colorTokens,
5
+ Gradients: gradientTokens,
6
+ BorderRadiuses: borderRadiusTokens,
7
+ Borders: borderWidthTokens,
8
+ Shadows: boxShadowTokens,
9
+ typeStyles: typographyTokens,
10
+ } = require('./src/variables/tokens/design-tokens-next.json');
11
+ const {
12
+ withLegacySpacingAliases,
13
+ } = require('./tailwind/compatibility/legacy-spacing');
14
+ const { plugin: animationDelay } = require('./tailwind/plugins/animation-delay');
15
+ const { plugin: core } = require('./tailwind/plugins/core');
16
+ const { plugin: iconography } = require('./tailwind/plugins/iconography');
17
+ const { plugin: interactivity } = require('./tailwind/plugins/interactivity');
18
+ const { plugin: layout } = require('./tailwind/plugins/layout');
19
+ const { plugin: themeResponsive } = require('./tailwind/plugins/responsive');
20
+ const { plugin: scrollbar } = require('./tailwind/plugins/scrollbar');
21
+ const { plugin: themeBackground } = require('./tailwind/plugins/theme-background');
22
+ const { plugin: themeBorder } = require('./tailwind/plugins/theme-border');
23
+ const { plugin: themeDivider } = require('./tailwind/plugins/theme-divider');
24
+ const { plugin: themeForeground } = require('./tailwind/plugins/theme-foreground');
25
+ const { plugin: themeOutline } = require('./tailwind/plugins/theme-outline');
26
+ const { plugin: themePreset } = require('./tailwind/plugins/theme-preset');
27
+ const { plugin: typography } = require('./tailwind/plugins/typography');
28
+ const {
29
+ parseBorderWidthTokens,
30
+ parseBoxShadowTokens,
31
+ parseFontFamilyTokens,
32
+ parseFontSizeTokens,
33
+ parseFontWeightTokens,
34
+ parseColorTokensNames,
35
+ parseSpacingTokensNames,
36
+ parseBorderRadiusTokensNames,
37
+ parseCustomTokensNames,
38
+ } = require('./tailwind/utils');
39
+
40
+
41
+ module.exports = {
42
+ darkMode: ['variant', '&:is(.dark *, [data-theme="dark"] *)'],
43
+
44
+ theme: {
45
+ tokens: {
46
+ ...parseCustomTokensNames(customTokens),
47
+ },
48
+
49
+ screens: {},
50
+
51
+ spacing: withLegacySpacingAliases({
52
+ 'none': '0px', // Deprecated, major update required
53
+ ...parseSpacingTokensNames(spacingTokens),
54
+ }),
55
+
56
+ colors: {},
57
+
58
+ textColor: {
59
+ ...parseColorTokensNames(colorTokens, ['generic', 'text']),
60
+ 'transparent': 'transparent',
61
+ 'current': 'currentColor',
62
+ 'inherit': 'inherit',
63
+ },
64
+
65
+ backgroundColor: {
66
+ // Avoid using `text` colors as a background (only for corner cases)
67
+ ...parseColorTokensNames(colorTokens, ['generic', 'background', 'text']),
68
+ 'transparent': 'transparent',
69
+ 'current': 'currentColor',
70
+ 'inherit': 'inherit',
71
+ },
72
+
73
+ backgroundImage: {
74
+ ...parseColorTokensNames(gradientTokens, ['generic']),
75
+ },
76
+
77
+ borderColor: {
78
+ ...parseColorTokensNames(colorTokens, ['generic', 'text']),
79
+ 'transparent': 'transparent',
80
+ 'current': 'currentColor',
81
+ 'inherit': 'inherit',
82
+ },
83
+
84
+ outlineColor: {
85
+ ...parseColorTokensNames(colorTokens, ['generic']),
86
+ 'transparent': 'transparent',
87
+ 'current': 'currentColor',
88
+ 'inherit': 'inherit',
89
+ },
90
+
91
+ fill: {
92
+ ...parseColorTokensNames(colorTokens, ['generic', 'background', 'text']),
93
+ },
94
+
95
+ stroke: {
96
+ ...parseColorTokensNames(colorTokens, ['generic', 'background', 'text']),
97
+ },
98
+
99
+ content: {
100
+ 'checkbox-checked': '"check_small"',
101
+ 'checkbox-indeterminate': '"check_indeterminate_small"',
102
+ },
103
+
104
+ animation: {
105
+ 'circular-loader': 'circular-loader 1400ms linear infinite',
106
+ 'linear-loader': 'linear-loader 1400ms linear infinite',
107
+ 'skeleton-loader': 'skeleton-loader 1400ms linear infinite',
108
+ 'pulse': 'pulse 1s ease-in-out infinite',
109
+ },
110
+
111
+ keyframes: {
112
+ 'circular-loader': {
113
+ '0%': {
114
+ transform: 'rotate(0deg)',
115
+ strokeDasharray: '0, 200',
116
+ strokeDashoffset: '0',
117
+ },
118
+
119
+ '50%': {
120
+ transform: 'rotate(180deg)',
121
+ strokeDasharray: '100, 200',
122
+ strokeDashoffset: 'calc((50% - 2px) * -3.14)',
123
+ },
124
+
125
+ '100%': {
126
+ transform: 'rotate(360deg)',
127
+ strokeDasharray: '100, 200',
128
+ strokeDashoffset: 'calc((100% - 2px) * -3.14)',
129
+ },
130
+ },
131
+
132
+ 'linear-loader': {
133
+ '0%': {
134
+ strokeDasharray: '25%, 100%',
135
+ strokeDashoffset: '0',
136
+ },
137
+
138
+ '100%': {
139
+ strokeDasharray: '25%, 100%',
140
+ strokeDashoffset: 'calc((100% - 0px) * -2.5)', // Workaround for Safari
141
+ },
142
+ },
143
+
144
+ 'skeleton-loader': {
145
+ '0%': {
146
+ backgroundPosition: '100% 50%',
147
+ },
148
+
149
+ '100%': {
150
+ backgroundPosition: '-100% 50%',
151
+ },
152
+ },
153
+ pulse: {
154
+ '0%': { opacity: 0 },
155
+ '25%': { opacity: 0.5 },
156
+ '50%': { opacity: 1 },
157
+ '75%': { opacity: 0.5 },
158
+ '100%': { opacity: 0 },
159
+ },
160
+ },
161
+
162
+ borderRadius: {
163
+ 'none': '0px', // Deprecated, major update required
164
+ '0': '0px',
165
+ ...parseBorderRadiusTokensNames(borderRadiusTokens),
166
+ 'full': '9999px',
167
+ },
168
+
169
+ borderWidth: {
170
+ '0': '0px',
171
+ ...parseBorderWidthTokens(borderWidthTokens),
172
+ '4': '4px',
173
+ },
174
+
175
+ boxShadow: {
176
+ 'none': '0 0 #00000000',
177
+ ...parseBoxShadowTokens(boxShadowTokens),
178
+ DEFAULT: '0 1px 1px rgba(0 0 0 / 0.24), 0 0 1px rgba(0 0 0 / 0.16)',
179
+ },
180
+
181
+ fontFamily: {
182
+ ...parseFontFamilyTokens(typographyTokens),
183
+ 'inherit': 'inherit',
184
+ },
185
+
186
+ fontSize: {
187
+ ...parseFontSizeTokens(typographyTokens),
188
+ 'inherit': ['inherit', { lineHeight: 'inherit' }],
189
+ },
190
+
191
+ fontWeight: {
192
+ ...parseFontWeightTokens(typographyTokens),
193
+ 'inherit': 'inherit',
194
+ },
195
+
196
+ outlineWidth: {
197
+ '0': '0px',
198
+ ...parseBorderWidthTokens(borderWidthTokens),
199
+ '10': '10px',
200
+ },
201
+
202
+ transitionDuration: {
203
+ 'short': '100ms',
204
+ 'medium': '250ms',
205
+ 'long': '400ms',
206
+ },
207
+
208
+ transitionTimingFunction: {
209
+ 'standard': 'cubic-bezier(0.2, 0, 0, 1)',
210
+ },
211
+ },
212
+
213
+ plugins: [
214
+ core,
215
+ layout,
216
+ scrollbar,
217
+ interactivity,
218
+ typography,
219
+ iconography,
220
+
221
+ animationDelay,
222
+
223
+ themePreset,
224
+ themeForeground,
225
+ themeBackground,
226
+ themeBorder,
227
+ themeDivider,
228
+ themeOutline,
229
+ themeResponsive,
230
+ ],
231
+ };