@onereach/styles 27.0.2-beta.6112.0 → 27.0.2-beta.6121.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/README.md +0 -15
- package/base.layer.css +1 -6
- package/main-v3.css +8 -0
- package/package.json +15 -28
- package/rollup-plugin-tailwindcss-cli.css +3 -5
- package/tailwind/plugins/animation-delay.js +6 -4
- package/tailwind/plugins/iconography.js +3 -7
- package/tailwind/plugins/layout.js +2 -4
- package/tailwind/plugins/theme-background.js +6 -11
- package/tailwind/plugins/theme-border.js +6 -11
- package/tailwind/plugins/theme-divider.js +9 -14
- package/tailwind/plugins/theme-foreground.js +6 -11
- package/tailwind/plugins/theme-outline.js +6 -11
- package/tailwind/plugins/theme-preset.js +46 -51
- package/tailwind/plugins/typography.js +2 -5
- package/tailwind/utils.js +0 -13
- package/tailwind.config.js +3 -1
- package/tailwind.config.json +11 -296
- package/tailwind.config.preset.js +228 -1
- package/MIGRATION_TAILWIND_V4.md +0 -138
- package/compat/tailwind-v3-utilities.css +0 -1
- package/main-v4.css +0 -3
- package/postcss/tailwind-v4-compat.cjs +0 -1136
- package/tailwind/compatibility/important.js +0 -36
- package/tailwind/compatibility/legacy-spacing.js +0 -141
- package/tailwind/plugins/component-marker.js +0 -22
- package/tailwind/plugins/legacy-spacing.js +0 -162
- package/tailwind.config.preset.v4.js +0 -231
- package/tailwind.reference.css +0 -4
package/README.md
CHANGED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
# @onereach/styles
|
|
2
|
-
|
|
3
|
-
Shared UI Next design tokens, base styles, and Tailwind presets.
|
|
4
|
-
|
|
5
|
-
## Tailwind CSS
|
|
6
|
-
|
|
7
|
-
UI Next uses Tailwind CSS 4 at runtime. Use `main-v4.css` and
|
|
8
|
-
`tailwind.config.preset.v4.js`.
|
|
9
|
-
|
|
10
|
-
Existing template classes remain supported through the compatibility layer.
|
|
11
|
-
The Tailwind CSS 3 compiler is not supported.
|
|
12
|
-
|
|
13
|
-
See [Migrate to Tailwind CSS 4](./MIGRATION_TAILWIND_V4.md) for copyable
|
|
14
|
-
dependency, PostCSS, config, CSS, source-scanning, dark-mode, and legacy
|
|
15
|
-
utility compatibility setup.
|
package/base.layer.css
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* stylelint-disable at-rule-no-deprecated */
|
|
2
1
|
@layer base {
|
|
3
2
|
|
|
4
3
|
.light-scheme {
|
|
@@ -12,12 +11,8 @@
|
|
|
12
11
|
body {
|
|
13
12
|
@apply text-on-background dark:text-on-background-dark;
|
|
14
13
|
@apply typography-body-1-regular;
|
|
14
|
+
@apply light-scheme dark:dark-scheme;
|
|
15
15
|
|
|
16
|
-
color-scheme: only light;
|
|
17
16
|
@apply overscroll-none overflow-hidden;
|
|
18
17
|
}
|
|
19
|
-
|
|
20
|
-
:is(.dark, [data-theme="dark"]) body {
|
|
21
|
-
color-scheme: only dark;
|
|
22
|
-
}
|
|
23
18
|
}
|
package/main-v3.css
ADDED
package/package.json
CHANGED
|
@@ -1,64 +1,51 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onereach/styles",
|
|
3
|
-
"version": "27.0.2-beta.
|
|
3
|
+
"version": "27.0.2-beta.6121.0",
|
|
4
4
|
"description": "Styles for or-ui-next",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist",
|
|
8
|
-
"MIGRATION_TAILWIND_V4.md",
|
|
9
8
|
"icons",
|
|
10
9
|
"src",
|
|
11
10
|
"tailwind/**",
|
|
12
|
-
"compat",
|
|
13
11
|
"base.layer.css",
|
|
14
12
|
"font.css",
|
|
15
13
|
"legacy-ui-warning.scss",
|
|
16
|
-
"main-
|
|
17
|
-
"postcss",
|
|
14
|
+
"main-v3.css",
|
|
18
15
|
"preflight-revert.css",
|
|
19
16
|
"rollup-plugin-tailwindcss-cli.css",
|
|
20
17
|
"scrollbar.css",
|
|
21
18
|
"tailwind.config.js",
|
|
22
19
|
"tailwind.config.json",
|
|
23
20
|
"tailwind.config.preset.js",
|
|
24
|
-
"tailwind.config.preset.v4.js",
|
|
25
|
-
"tailwind.reference.css",
|
|
26
21
|
"temporary-dark-v2.css",
|
|
27
22
|
"tokens.css",
|
|
28
23
|
"tokens-v3.css",
|
|
29
24
|
"tw-color-variables.css",
|
|
30
25
|
"screens.json"
|
|
31
26
|
],
|
|
32
|
-
"scripts": {
|
|
33
|
-
"build": "npm-run-all build:tokens:css build:tokens:css:v3 build:resolve-config build:compat",
|
|
34
|
-
"build:compat": "node ./scripts/generateLegacyCompatibility.js",
|
|
35
|
-
"build:resolve-config": "node ./scripts/resolveConfig.js",
|
|
36
|
-
"build:tokens:css": "node ./utils/makeCssVaribales.js",
|
|
37
|
-
"build:tokens:css:v3": "node ./utils/makeCssVariablesV3.js",
|
|
38
|
-
"clean": "rimraf dist",
|
|
39
|
-
"fix": "stylelint --fix '**/*.scss'",
|
|
40
|
-
"lint": "stylelint '**/*.scss'",
|
|
41
|
-
"test:contract": "node --test tests/*.test.cjs"
|
|
42
|
-
},
|
|
43
27
|
"dependencies": {
|
|
44
|
-
"@onereach/font-icons": "^27.0.2-beta.
|
|
45
|
-
"
|
|
46
|
-
"tailwindcss": "4.3.2"
|
|
28
|
+
"@onereach/font-icons": "^27.0.2-beta.6121.0",
|
|
29
|
+
"tailwindcss": "3.4.16"
|
|
47
30
|
},
|
|
48
31
|
"devDependencies": {
|
|
49
|
-
"@tailwindcss/postcss": "4.3.2",
|
|
50
32
|
"npm-run-all": "^4.1.5",
|
|
51
33
|
"postcss": "8.4.32",
|
|
52
34
|
"postcss-cli": "^10.1.0",
|
|
53
35
|
"postcss-import": "^15.1.0",
|
|
54
36
|
"postcss-preset-env": "^9.1.0",
|
|
55
|
-
"sass": "^1.63.4"
|
|
56
|
-
"tailwindcss-v3": "npm:tailwindcss@3.4.16"
|
|
57
|
-
},
|
|
58
|
-
"peerDependencies": {
|
|
59
|
-
"postcss": "^8.4.32"
|
|
37
|
+
"sass": "^1.63.4"
|
|
60
38
|
},
|
|
61
39
|
"publishConfig": {
|
|
62
40
|
"access": "public"
|
|
41
|
+
},
|
|
42
|
+
"scripts": {
|
|
43
|
+
"build": "npm-run-all build:tokens:css build:tokens:css:v3 build:resolve-config",
|
|
44
|
+
"build:resolve-config": "node ./scripts/resolveConfig.js",
|
|
45
|
+
"build:tokens:css": "node ./utils/makeCssVaribales.js",
|
|
46
|
+
"build:tokens:css:v3": "node ./utils/makeCssVariablesV3.js",
|
|
47
|
+
"clean": "rimraf dist",
|
|
48
|
+
"fix": "stylelint --fix '**/*.scss'",
|
|
49
|
+
"lint": "stylelint '**/*.scss'"
|
|
63
50
|
}
|
|
64
|
-
}
|
|
51
|
+
}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
@import "tailwindcss/
|
|
3
|
-
@import "tailwindcss/utilities";
|
|
4
|
-
@import "./dist/index.css";
|
|
1
|
+
@import "tailwindcss/components.css";
|
|
2
|
+
@import "tailwindcss/utilities.css";
|
|
5
3
|
|
|
6
|
-
@
|
|
4
|
+
@import "./dist/index.css";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const plugin = require('tailwindcss/plugin');
|
|
2
2
|
|
|
3
|
-
const animationDelay = plugin(function ({
|
|
3
|
+
const animationDelay = plugin(function ({ addUtilities, theme, e }) {
|
|
4
4
|
const defaultValues = {
|
|
5
5
|
'none': '0s',
|
|
6
6
|
75: '75ms',
|
|
@@ -36,9 +36,11 @@ const animationDelay = plugin(function ({ matchUtilities, theme }) {
|
|
|
36
36
|
...userValues,
|
|
37
37
|
};
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
39
|
+
const utilities = Object.entries(values).map(([key, value]) => ({
|
|
40
|
+
[`.${e(`animation-delay-${key}`)}`]: { animationDelay: `${value}` },
|
|
41
|
+
}));
|
|
42
|
+
|
|
43
|
+
addUtilities(utilities);
|
|
42
44
|
});
|
|
43
45
|
|
|
44
46
|
module.exports = {
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
const plugin = require('tailwindcss/plugin');
|
|
2
2
|
|
|
3
|
-
const { markComponent } = require('./component-marker');
|
|
4
|
-
|
|
5
3
|
const values = {
|
|
6
4
|
'outlined': '"opsz" 24, "wght" 400, "FILL" 0, "GRAD" 0',
|
|
7
5
|
'outlined-bold': '"opsz" 24, "wght" 700, "FILL" 0, "GRAD" 0',
|
|
@@ -13,20 +11,18 @@ const values = {
|
|
|
13
11
|
};
|
|
14
12
|
|
|
15
13
|
module.exports = {
|
|
16
|
-
values,
|
|
17
|
-
|
|
18
14
|
plugin: plugin(({ matchComponents, addComponents }) => {
|
|
19
15
|
matchComponents({
|
|
20
|
-
'iconography': (value) =>
|
|
16
|
+
'iconography': (value) => ({
|
|
21
17
|
fontFamily: '"Material Symbols Outlined"',
|
|
22
18
|
fontVariationSettings: value,
|
|
23
19
|
}),
|
|
24
20
|
}, { values });
|
|
25
21
|
|
|
26
22
|
addComponents({
|
|
27
|
-
'.iconography-onereach':
|
|
23
|
+
'.iconography-onereach': {
|
|
28
24
|
fontFamily: '"OneReach Icons"',
|
|
29
|
-
}
|
|
25
|
+
},
|
|
30
26
|
});
|
|
31
27
|
}),
|
|
32
28
|
};
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
const plugin = require('tailwindcss/plugin');
|
|
2
2
|
|
|
3
|
-
const { markComponent } = require('./component-marker');
|
|
4
|
-
|
|
5
3
|
const values = {
|
|
6
4
|
'row': 'row',
|
|
7
5
|
'row-reverse': 'row-reverse',
|
|
@@ -24,7 +22,7 @@ module.exports = {
|
|
|
24
22
|
'layout': (value) => {
|
|
25
23
|
const { prefix = '', direction, suffix = '' } = /^(?:(?<prefix>inline-)\.\.)?(?<direction>row|column)(?<suffix>-reverse)?$/.exec(value).groups;
|
|
26
24
|
|
|
27
|
-
return
|
|
25
|
+
return {
|
|
28
26
|
flexGrow: prefix === 'inline-' ? '0' : null,
|
|
29
27
|
flexShrink: prefix === 'inline-' ? '0' : null,
|
|
30
28
|
flexBasis: prefix === 'inline-' ? 'auto' : null,
|
|
@@ -39,7 +37,7 @@ module.exports = {
|
|
|
39
37
|
|
|
40
38
|
minWidth: prefix === 'inline-' ? 'auto' : null,
|
|
41
39
|
maxWidth: prefix === 'inline-' ? '100%' : null,
|
|
42
|
-
}
|
|
40
|
+
};
|
|
43
41
|
},
|
|
44
42
|
}, { values });
|
|
45
43
|
}),
|
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
const plugin = require('tailwindcss/plugin');
|
|
2
|
-
|
|
3
|
-
const { markImportant } = require('../compatibility/important');
|
|
4
|
-
const { resolveThemeValue } = require('../utils');
|
|
5
|
-
|
|
6
|
-
const { markComponent } = require('./component-marker');
|
|
7
2
|
const { variants } = require('./core');
|
|
8
3
|
|
|
9
4
|
const values = {
|
|
@@ -202,17 +197,17 @@ module.exports = {
|
|
|
202
197
|
'theme-background': (value) => {
|
|
203
198
|
const [token, suffix = ''] = value.split('..');
|
|
204
199
|
|
|
205
|
-
return
|
|
206
|
-
backgroundColor:
|
|
200
|
+
return {
|
|
201
|
+
backgroundColor: theme(`backgroundColor.${token}` + suffix, token),
|
|
207
202
|
|
|
208
|
-
[variants['disabled']]: ['white', 'black', 'transparent'].includes(token) ? null :
|
|
209
|
-
backgroundColor:
|
|
210
|
-
}
|
|
203
|
+
[variants['disabled']]: ['white', 'black', 'transparent'].includes(token) ? null : {
|
|
204
|
+
backgroundColor: `${theme('backgroundColor.disabled' + suffix)} !important`,
|
|
205
|
+
},
|
|
211
206
|
|
|
212
207
|
transitionProperty: 'color, background-color, border-color, outline-color',
|
|
213
208
|
transitionDuration: theme('transitionDuration.short'),
|
|
214
209
|
transitionTimingFunction: theme('transitionTimingFunction.standard'),
|
|
215
|
-
}
|
|
210
|
+
};
|
|
216
211
|
},
|
|
217
212
|
}, { values });
|
|
218
213
|
}),
|
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
const plugin = require('tailwindcss/plugin');
|
|
2
|
-
|
|
3
|
-
const { markImportant } = require('../compatibility/important');
|
|
4
|
-
const { resolveThemeValue } = require('../utils');
|
|
5
|
-
|
|
6
|
-
const { markComponent } = require('./component-marker');
|
|
7
2
|
const { variants } = require('./core');
|
|
8
3
|
|
|
9
4
|
const values = {
|
|
@@ -52,18 +47,18 @@ module.exports = {
|
|
|
52
47
|
'theme-border': (value) => {
|
|
53
48
|
const [token, suffix = ''] = value.split('..');
|
|
54
49
|
|
|
55
|
-
return
|
|
50
|
+
return {
|
|
56
51
|
borderStyle: 'solid',
|
|
57
|
-
borderColor:
|
|
52
|
+
borderColor: theme(`borderColor.${token}` + suffix, token),
|
|
58
53
|
|
|
59
|
-
[variants['disabled']]: ['transparent'].includes(token) ? null :
|
|
60
|
-
borderColor:
|
|
61
|
-
}
|
|
54
|
+
[variants['disabled']]: ['transparent'].includes(token) ? null : {
|
|
55
|
+
borderColor: `${theme('borderColor.disabled' + suffix)} !important`,
|
|
56
|
+
},
|
|
62
57
|
|
|
63
58
|
transitionProperty: 'color, background-color, border-color, outline-color',
|
|
64
59
|
transitionDuration: theme('transitionDuration.short'),
|
|
65
60
|
transitionTimingFunction: theme('transitionTimingFunction.standard'),
|
|
66
|
-
}
|
|
61
|
+
};
|
|
67
62
|
},
|
|
68
63
|
}, { values });
|
|
69
64
|
}),
|
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
const plugin = require('tailwindcss/plugin');
|
|
2
|
-
|
|
3
|
-
const { markImportant } = require('../compatibility/important');
|
|
4
|
-
const { resolveThemeValue } = require('../utils');
|
|
5
|
-
|
|
6
|
-
const { markComponent } = require('./component-marker');
|
|
7
2
|
const { variants } = require('./core');
|
|
8
3
|
|
|
9
4
|
const values = {
|
|
@@ -52,16 +47,16 @@ module.exports = {
|
|
|
52
47
|
'theme-divider': (value) => {
|
|
53
48
|
const [token, suffix = ''] = value.split('..');
|
|
54
49
|
|
|
55
|
-
return
|
|
50
|
+
return {
|
|
56
51
|
[variants['children']]: {
|
|
57
|
-
'&:not(:first-child)':
|
|
58
|
-
borderInlineStartStyle: 'none',
|
|
59
|
-
}
|
|
52
|
+
'&:not(:first-child)': {
|
|
53
|
+
borderInlineStartStyle: 'none !important',
|
|
54
|
+
},
|
|
60
55
|
|
|
61
56
|
'&:not(:last-child)': {
|
|
62
57
|
borderInlineEndStyle: 'solid',
|
|
63
58
|
borderInlineEndWidth: '1px',
|
|
64
|
-
borderInlineEndColor:
|
|
59
|
+
borderInlineEndColor: theme(`borderColor.${token}` + suffix, token),
|
|
65
60
|
},
|
|
66
61
|
|
|
67
62
|
transitionProperty: 'color, background-color, border-color, outline-color',
|
|
@@ -71,12 +66,12 @@ module.exports = {
|
|
|
71
66
|
|
|
72
67
|
[variants['disabled']]: ['transparent'].includes(token) ? null : {
|
|
73
68
|
[variants['children']]: {
|
|
74
|
-
'&:not(:last-child)':
|
|
75
|
-
borderInlineEndColor:
|
|
76
|
-
}
|
|
69
|
+
'&:not(:last-child)': {
|
|
70
|
+
borderInlineEndColor: `${theme('borderColor.disabled' + suffix)} !important`,
|
|
71
|
+
},
|
|
77
72
|
},
|
|
78
73
|
},
|
|
79
|
-
}
|
|
74
|
+
};
|
|
80
75
|
},
|
|
81
76
|
}, { values });
|
|
82
77
|
}),
|
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
const plugin = require('tailwindcss/plugin');
|
|
2
|
-
|
|
3
|
-
const { markImportant } = require('../compatibility/important');
|
|
4
|
-
const { resolveThemeValue } = require('../utils');
|
|
5
|
-
|
|
6
|
-
const { markComponent } = require('./component-marker');
|
|
7
2
|
const { variants } = require('./core');
|
|
8
3
|
|
|
9
4
|
const values = {
|
|
@@ -199,17 +194,17 @@ module.exports = {
|
|
|
199
194
|
'theme-foreground': (value) => {
|
|
200
195
|
const [token, suffix = ''] = value.split('..');
|
|
201
196
|
|
|
202
|
-
return
|
|
203
|
-
color:
|
|
197
|
+
return {
|
|
198
|
+
color: theme(`textColor.${token}` + suffix, token),
|
|
204
199
|
|
|
205
|
-
[variants['disabled']]: ['white', 'black', 'transparent'].includes(token) ? null :
|
|
206
|
-
color:
|
|
207
|
-
}
|
|
200
|
+
[variants['disabled']]: ['white', 'black', 'transparent'].includes(token) ? null : {
|
|
201
|
+
color: `${theme('textColor.on-disabled' + suffix)} !important`,
|
|
202
|
+
},
|
|
208
203
|
|
|
209
204
|
transitionProperty: 'color, background-color, border-color, outline-color',
|
|
210
205
|
transitionDuration: theme('transitionDuration.short'),
|
|
211
206
|
transitionTimingFunction: theme('transitionTimingFunction.standard'),
|
|
212
|
-
}
|
|
207
|
+
};
|
|
213
208
|
},
|
|
214
209
|
}, { values });
|
|
215
210
|
}),
|
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
const plugin = require('tailwindcss/plugin');
|
|
2
|
-
|
|
3
|
-
const { markImportant } = require('../compatibility/important');
|
|
4
|
-
const { resolveThemeValue } = require('../utils');
|
|
5
|
-
|
|
6
|
-
const { markComponent } = require('./component-marker');
|
|
7
2
|
const { variants } = require('./core');
|
|
8
3
|
|
|
9
4
|
const values = {
|
|
@@ -43,18 +38,18 @@ module.exports = {
|
|
|
43
38
|
'theme-outline': (value) => {
|
|
44
39
|
const [token, suffix = ''] = value.split('..');
|
|
45
40
|
|
|
46
|
-
return
|
|
41
|
+
return {
|
|
47
42
|
outlineStyle: 'solid',
|
|
48
|
-
outlineColor:
|
|
43
|
+
outlineColor: theme(`outlineColor.${token}` + suffix, token),
|
|
49
44
|
|
|
50
|
-
[variants['disabled']]: ['transparent'].includes(token) ? null :
|
|
51
|
-
outlineColor:
|
|
52
|
-
}
|
|
45
|
+
[variants['disabled']]: ['transparent'].includes(token) ? null : {
|
|
46
|
+
outlineColor: `${theme('outlineColor.transparent' + suffix)} !important`,
|
|
47
|
+
},
|
|
53
48
|
|
|
54
49
|
transitionProperty: 'color, background-color, border-color, outline-color',
|
|
55
50
|
transitionDuration: theme('transitionDuration.short'),
|
|
56
51
|
transitionTimingFunction: theme('transitionTimingFunction.standard'),
|
|
57
|
-
}
|
|
52
|
+
};
|
|
58
53
|
},
|
|
59
54
|
}, { values });
|
|
60
55
|
}),
|
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
const plugin = require('tailwindcss/plugin');
|
|
2
|
-
|
|
3
|
-
const { markImportant } = require('../compatibility/important');
|
|
4
|
-
const { resolveThemeValue } = require('../utils');
|
|
5
|
-
|
|
6
|
-
const { markComponent } = require('./component-marker');
|
|
7
2
|
const { variants } = require('./core');
|
|
8
3
|
|
|
9
4
|
const values = {
|
|
@@ -34,90 +29,90 @@ module.exports = {
|
|
|
34
29
|
'theme-preset-1': (value) => {
|
|
35
30
|
const [token, suffix = ''] = value.split('..');
|
|
36
31
|
|
|
37
|
-
return
|
|
38
|
-
color:
|
|
39
|
-
backgroundColor:
|
|
32
|
+
return {
|
|
33
|
+
color: theme(`textColor.on-${token}` + suffix),
|
|
34
|
+
backgroundColor: theme(`backgroundColor.${token}` + suffix),
|
|
40
35
|
|
|
41
36
|
borderStyle: 'none',
|
|
42
37
|
outlineStyle: 'none',
|
|
43
38
|
|
|
44
39
|
[variants['mobile']]: {
|
|
45
40
|
[variants['active']]: {
|
|
46
|
-
backgroundColor:
|
|
41
|
+
backgroundColor: theme(`backgroundColor.${token}-hover` + suffix),
|
|
47
42
|
},
|
|
48
43
|
},
|
|
49
44
|
|
|
50
45
|
[variants['desktop']]: {
|
|
51
46
|
[variants['hover']]: {
|
|
52
|
-
backgroundColor:
|
|
47
|
+
backgroundColor: theme(`backgroundColor.${token}-hover` + suffix),
|
|
53
48
|
},
|
|
54
49
|
|
|
55
50
|
[variants['focus-visible']]: {
|
|
56
|
-
backgroundColor:
|
|
51
|
+
backgroundColor: theme(`backgroundColor.${token}-hover` + suffix),
|
|
57
52
|
},
|
|
58
53
|
|
|
59
54
|
[variants['active']]: {
|
|
60
|
-
backgroundColor:
|
|
55
|
+
backgroundColor: theme(`backgroundColor.${token}` + suffix),
|
|
61
56
|
},
|
|
62
57
|
},
|
|
63
58
|
|
|
64
|
-
[variants['disabled']]:
|
|
65
|
-
color:
|
|
66
|
-
backgroundColor:
|
|
67
|
-
}
|
|
59
|
+
[variants['disabled']]: {
|
|
60
|
+
color: `${theme('textColor.on-disabled' + suffix)} !important`,
|
|
61
|
+
backgroundColor: `${theme('backgroundColor.disabled' + suffix)} !important`,
|
|
62
|
+
},
|
|
68
63
|
|
|
69
64
|
transitionProperty: 'color, background-color, border-color, outline-color',
|
|
70
65
|
transitionDuration: theme('transitionDuration.short'),
|
|
71
66
|
transitionTimingFunction: theme('transitionTimingFunction.standard'),
|
|
72
|
-
}
|
|
67
|
+
};
|
|
73
68
|
},
|
|
74
69
|
|
|
75
70
|
'theme-preset-2': (value) => {
|
|
76
71
|
const [token, suffix = ''] = value.split('..');
|
|
77
72
|
|
|
78
|
-
return
|
|
79
|
-
color:
|
|
80
|
-
backgroundColor:
|
|
73
|
+
return {
|
|
74
|
+
color: theme(`textColor.${token}` + suffix),
|
|
75
|
+
backgroundColor: theme(`backgroundColor.${token}-opacity-0-08` + suffix),
|
|
81
76
|
|
|
82
77
|
borderStyle: 'none',
|
|
83
78
|
outlineStyle: 'none',
|
|
84
79
|
|
|
85
80
|
[variants['mobile']]: {
|
|
86
81
|
[variants['active']]: {
|
|
87
|
-
backgroundColor:
|
|
82
|
+
backgroundColor: theme(`backgroundColor.${token}-opacity-0-12` + suffix),
|
|
88
83
|
},
|
|
89
84
|
},
|
|
90
85
|
|
|
91
86
|
[variants['desktop']]: {
|
|
92
87
|
[variants['hover']]: {
|
|
93
|
-
backgroundColor:
|
|
88
|
+
backgroundColor: theme(`backgroundColor.${token}-opacity-0-12` + suffix),
|
|
94
89
|
},
|
|
95
90
|
|
|
96
91
|
[variants['focus-visible']]: {
|
|
97
|
-
backgroundColor:
|
|
92
|
+
backgroundColor: theme(`backgroundColor.${token}-opacity-0-12` + suffix),
|
|
98
93
|
},
|
|
99
94
|
|
|
100
95
|
[variants['active']]: {
|
|
101
|
-
backgroundColor:
|
|
96
|
+
backgroundColor: theme(`backgroundColor.${token}-opacity-0-16` + suffix),
|
|
102
97
|
},
|
|
103
98
|
},
|
|
104
99
|
|
|
105
|
-
[variants['disabled']]:
|
|
106
|
-
color:
|
|
107
|
-
backgroundColor:
|
|
108
|
-
}
|
|
100
|
+
[variants['disabled']]: {
|
|
101
|
+
color: `${theme('textColor.on-disabled' + suffix)} !important`,
|
|
102
|
+
backgroundColor: `${theme('backgroundColor.disabled' + suffix)} !important`,
|
|
103
|
+
},
|
|
109
104
|
|
|
110
105
|
transitionProperty: 'color, background-color, border-color, outline-color',
|
|
111
106
|
transitionDuration: theme('transitionDuration.short'),
|
|
112
107
|
transitionTimingFunction: theme('transitionTimingFunction.standard'),
|
|
113
|
-
}
|
|
108
|
+
};
|
|
114
109
|
},
|
|
115
110
|
|
|
116
111
|
'theme-preset-3': (value) => {
|
|
117
112
|
const [token, suffix = ''] = value.split('..');
|
|
118
113
|
|
|
119
|
-
return
|
|
120
|
-
color:
|
|
114
|
+
return {
|
|
115
|
+
color: theme(`textColor.${token}` + suffix),
|
|
121
116
|
backgroundColor: 'transparent',
|
|
122
117
|
|
|
123
118
|
borderStyle: 'none',
|
|
@@ -125,40 +120,40 @@ module.exports = {
|
|
|
125
120
|
|
|
126
121
|
[variants['mobile']]: {
|
|
127
122
|
[variants['active']]: {
|
|
128
|
-
backgroundColor:
|
|
123
|
+
backgroundColor: theme(`backgroundColor.${token}-opacity-0-08` + suffix),
|
|
129
124
|
},
|
|
130
125
|
},
|
|
131
126
|
|
|
132
127
|
[variants['desktop']]: {
|
|
133
128
|
[variants['hover']]: {
|
|
134
|
-
backgroundColor:
|
|
129
|
+
backgroundColor: theme(`backgroundColor.${token}-opacity-0-08` + suffix),
|
|
135
130
|
},
|
|
136
131
|
|
|
137
132
|
[variants['focus-visible']]: {
|
|
138
|
-
backgroundColor:
|
|
133
|
+
backgroundColor: theme(`backgroundColor.${token}-opacity-0-08` + suffix),
|
|
139
134
|
},
|
|
140
135
|
|
|
141
136
|
[variants['active']]: {
|
|
142
|
-
backgroundColor:
|
|
137
|
+
backgroundColor: theme(`backgroundColor.${token}-opacity-0-16` + suffix),
|
|
143
138
|
},
|
|
144
139
|
},
|
|
145
140
|
|
|
146
|
-
[variants['disabled']]:
|
|
147
|
-
color:
|
|
148
|
-
backgroundColor: 'transparent',
|
|
149
|
-
}
|
|
141
|
+
[variants['disabled']]: {
|
|
142
|
+
color: `${theme('textColor.on-disabled' + suffix)} !important`,
|
|
143
|
+
backgroundColor: 'transparent !important',
|
|
144
|
+
},
|
|
150
145
|
|
|
151
146
|
transitionProperty: 'color, background-color, border-color, outline-color',
|
|
152
147
|
transitionDuration: theme('transitionDuration.short'),
|
|
153
148
|
transitionTimingFunction: theme('transitionTimingFunction.standard'),
|
|
154
|
-
}
|
|
149
|
+
};
|
|
155
150
|
},
|
|
156
151
|
|
|
157
152
|
'theme-preset-4': (value) => {
|
|
158
153
|
const [token, suffix = ''] = value.split('..');
|
|
159
154
|
|
|
160
|
-
return
|
|
161
|
-
color:
|
|
155
|
+
return {
|
|
156
|
+
color: theme(`textColor.${token}` + suffix),
|
|
162
157
|
backgroundColor: 'transparent',
|
|
163
158
|
|
|
164
159
|
borderStyle: 'none',
|
|
@@ -166,33 +161,33 @@ module.exports = {
|
|
|
166
161
|
|
|
167
162
|
[variants['mobile']]: {
|
|
168
163
|
[variants['active']]: {
|
|
169
|
-
color:
|
|
164
|
+
color: theme(`textColor.${token}-hover` + suffix),
|
|
170
165
|
},
|
|
171
166
|
},
|
|
172
167
|
|
|
173
168
|
[variants['desktop']]: {
|
|
174
169
|
[variants['hover']]: {
|
|
175
|
-
color:
|
|
170
|
+
color: theme(`textColor.${token}-hover` + suffix),
|
|
176
171
|
},
|
|
177
172
|
|
|
178
173
|
[variants['focus-visible']]: {
|
|
179
|
-
color:
|
|
174
|
+
color: theme(`textColor.${token}-hover` + suffix),
|
|
180
175
|
},
|
|
181
176
|
|
|
182
177
|
[variants['active']]: {
|
|
183
|
-
color:
|
|
178
|
+
color: theme(`textColor.${token}` + suffix),
|
|
184
179
|
},
|
|
185
180
|
},
|
|
186
181
|
|
|
187
|
-
[variants['disabled']]:
|
|
188
|
-
color:
|
|
189
|
-
backgroundColor: 'transparent',
|
|
190
|
-
}
|
|
182
|
+
[variants['disabled']]: {
|
|
183
|
+
color: `${theme('textColor.on-disabled' + suffix)} !important`,
|
|
184
|
+
backgroundColor: 'transparent !important',
|
|
185
|
+
},
|
|
191
186
|
|
|
192
187
|
transitionProperty: 'color, background-color, border-color, outline-color',
|
|
193
188
|
transitionDuration: theme('transitionDuration.short'),
|
|
194
189
|
transitionTimingFunction: theme('transitionTimingFunction.standard'),
|
|
195
|
-
}
|
|
190
|
+
};
|
|
196
191
|
},
|
|
197
192
|
}, { values });
|
|
198
193
|
}),
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
const plugin = require('tailwindcss/plugin');
|
|
2
|
-
|
|
3
2
|
const screens = require('../../screens.json');
|
|
4
3
|
|
|
5
|
-
const { markComponent } = require('./component-marker');
|
|
6
|
-
|
|
7
4
|
const values = {
|
|
8
5
|
'display-large': 'display-large',
|
|
9
6
|
'display-medium': 'display-medium',
|
|
@@ -42,7 +39,7 @@ module.exports = {
|
|
|
42
39
|
const [fontSizeDesktop, optionsDesktop] = fontSizeConfig[value] ?? [];
|
|
43
40
|
const [fontSizeMobile, optionsMobile] = fontSizeConfig[`mobile-${value}`] ?? [];
|
|
44
41
|
|
|
45
|
-
return
|
|
42
|
+
return {
|
|
46
43
|
fontFamily: theme(`fontFamily.mobile-${value}`) ?? theme(`fontFamily.${value}`),
|
|
47
44
|
fontWeight: theme(`fontWeight.mobile-${value}`) ?? theme(`fontWeight.${value}`),
|
|
48
45
|
fontSize: fontSizeMobile ?? fontSizeDesktop,
|
|
@@ -69,7 +66,7 @@ module.exports = {
|
|
|
69
66
|
fontSize: fontSizeDesktop,
|
|
70
67
|
lineHeight: optionsDesktop?.lineHeight,
|
|
71
68
|
},
|
|
72
|
-
}
|
|
69
|
+
};
|
|
73
70
|
},
|
|
74
71
|
}, { values });
|
|
75
72
|
}),
|