@onereach/styles 22.2.0-beta.5496.0 → 22.2.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.5496.0",
3
+ "version": "22.2.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.1.6",
47
+ "@onereach/font-icons": "^22.2.0",
48
48
  "tailwindcss": "3.3.3"
49
49
  },
50
50
  "devDependencies": {
@@ -60,5 +60,6 @@
60
60
  },
61
61
  "publishConfig": {
62
62
  "access": "public"
63
- }
63
+ },
64
+ "gitHead": "e570eb1e849731410d2c920e077ba2371c85e1ff"
64
65
  }
@@ -1,4 +1,6 @@
1
1
  const plugin = require('tailwindcss/plugin');
2
+ const screens = require('../../screens.json');
3
+
2
4
 
3
5
  const variants = {
4
6
  'mobile': '@media (hover: none)',
@@ -64,9 +66,18 @@ const variants = {
64
66
  };
65
67
 
66
68
  module.exports = {
69
+ screens,
67
70
  variants,
68
71
 
69
72
  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
+
70
81
  Object.entries(variants).forEach(([modifier, selectors]) => {
71
82
  addVariant(modifier, selectors);
72
83
  });
@@ -1,5 +1,5 @@
1
1
  const plugin = require('tailwindcss/plugin');
2
- const screens = require('../../screens.json');
2
+ const { screens } = require('./core');
3
3
 
4
4
  const values = {
5
5
  'display-large': 'display-large',
@@ -3799,7 +3799,6 @@
3799
3799
  {},
3800
3800
  {},
3801
3801
  {},
3802
- {},
3803
3802
  {}
3804
3803
  ],
3805
3804
  "darkMode": [
@@ -12,7 +12,6 @@ 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');
16
15
 
17
16
  const {
18
17
  parseSpacingTokens,
@@ -220,6 +219,5 @@ module.exports = {
220
219
  themeBorder,
221
220
  themeDivider,
222
221
  themeOutline,
223
- themeResponsive,
224
222
  ],
225
223
  };
@@ -1,24 +0,0 @@
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
- };