@onereach/styles 22.2.0-beta.5458.0 → 22.2.0-beta.5496.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onereach/styles",
|
|
3
|
-
"version": "22.2.0-beta.
|
|
3
|
+
"version": "22.2.0-beta.5496.0",
|
|
4
4
|
"description": "Styles for or-ui-next",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "./main.css",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"json-to-scss": "json-to-scss mock/design-tokens.json src/variables/tokens"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@onereach/font-icons": "^22.
|
|
47
|
+
"@onereach/font-icons": "^22.1.6",
|
|
48
48
|
"tailwindcss": "3.3.3"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
package/tailwind/plugins/core.js
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
const plugin = require('tailwindcss/plugin');
|
|
2
|
-
const screens = require('../../screens.json');
|
|
3
|
-
|
|
4
2
|
|
|
5
3
|
const variants = {
|
|
6
4
|
'mobile': '@media (hover: none)',
|
|
@@ -66,18 +64,9 @@ const variants = {
|
|
|
66
64
|
};
|
|
67
65
|
|
|
68
66
|
module.exports = {
|
|
69
|
-
screens,
|
|
70
67
|
variants,
|
|
71
68
|
|
|
72
69
|
plugin: plugin(({ addVariant, addUtilities }) => {
|
|
73
|
-
Object.entries(screens).forEach(([breakpoint, width]) => {
|
|
74
|
-
addVariant(breakpoint, [
|
|
75
|
-
`@media (min-width: ${width})`,
|
|
76
|
-
`[force-screen~="${breakpoint}"] &`,
|
|
77
|
-
`&[force-screen~="${breakpoint}"]`,
|
|
78
|
-
]);
|
|
79
|
-
});
|
|
80
|
-
|
|
81
70
|
Object.entries(variants).forEach(([modifier, selectors]) => {
|
|
82
71
|
addVariant(modifier, selectors);
|
|
83
72
|
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
const plugin = require('tailwindcss/plugin');
|
|
2
|
+
const screens = require('../../screens.json');
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
module.exports = {
|
|
6
|
+
plugin: plugin(({ addVariant }) => {
|
|
7
|
+
const minScreenValue = Math.min(...Object.values(screens).map(width => parseInt(width)));
|
|
8
|
+
|
|
9
|
+
Object.entries(screens).forEach(([breakpoint, width]) => {
|
|
10
|
+
addVariant(breakpoint, [
|
|
11
|
+
`@media (min-width: ${width})`,
|
|
12
|
+
`[force-screen~="${breakpoint}"] &`,
|
|
13
|
+
`&[force-screen~="${breakpoint}"]`,
|
|
14
|
+
]);
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
// Custom variant for extra small screens
|
|
18
|
+
addVariant('xs', [
|
|
19
|
+
`@media (max-width: ${minScreenValue - 1}px)`,
|
|
20
|
+
'[force-screen~="xs"] &',
|
|
21
|
+
'&[force-screen~="xs"]',
|
|
22
|
+
]);
|
|
23
|
+
}),
|
|
24
|
+
};
|
package/tailwind.config.json
CHANGED
|
@@ -12,6 +12,7 @@ const { plugin: themeBackground } = require('./tailwind/plugins/theme-background
|
|
|
12
12
|
const { plugin: themeBorder } = require('./tailwind/plugins/theme-border');
|
|
13
13
|
const { plugin: themeDivider } = require('./tailwind/plugins/theme-divider');
|
|
14
14
|
const { plugin: themeOutline } = require('./tailwind/plugins/theme-outline');
|
|
15
|
+
const { plugin: themeResponsive } = require('./tailwind/plugins/responsive');
|
|
15
16
|
|
|
16
17
|
const {
|
|
17
18
|
parseSpacingTokens,
|
|
@@ -219,5 +220,6 @@ module.exports = {
|
|
|
219
220
|
themeBorder,
|
|
220
221
|
themeDivider,
|
|
221
222
|
themeOutline,
|
|
223
|
+
themeResponsive,
|
|
222
224
|
],
|
|
223
225
|
};
|