@onereach/styles 2.13.0 → 2.13.1-next.945.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": "2.13.0",
3
+ "version": "2.13.1-next.945.0",
4
4
  "description": "Styles for or-ui-next",
5
5
  "main": "./main.css",
6
6
  "unpkg": "./main.css",
@@ -47,6 +47,5 @@
47
47
  "dependencies": {
48
48
  "@tailwindcss/typography": "^0.5.4",
49
49
  "tailwindcss": "^3.1.3"
50
- },
51
- "gitHead": "77f977d25a1624beea02ffe5c4dd697cd08ceba1"
50
+ }
52
51
  }
@@ -26,14 +26,56 @@ module.exports = {
26
26
  theme: {
27
27
  spacing: parseSpacingTokens(spacingTokens),
28
28
 
29
- backgroundColor: parseColorTokens(colorTokens, ['generic', 'background', 'text']),
30
- textColor: parseColorTokens(colorTokens, ['generic', 'text']),
31
- borderColor: parseColorTokens(colorTokens, ['generic']),
32
- outlineColor: parseColorTokens(colorTokens, ['generic']),
29
+ backgroundColor: {
30
+ // Avoid using `text` colors as a background (only for corner cases)
31
+ ...parseColorTokens(colorTokens, ['generic', 'background', 'text']),
32
+ 'inherit': 'inherit',
33
+ 'current': 'currentColor',
34
+ 'transparent': 'transparent',
35
+ },
36
+
37
+ textColor: {
38
+ ...parseColorTokens(colorTokens, ['generic', 'text']),
39
+ 'inherit': 'inherit',
40
+ 'current': 'currentColor',
41
+ 'transparent': 'transparent',
42
+ },
43
+
44
+ borderColor: {
45
+ ...parseColorTokens(colorTokens, ['generic']),
46
+ 'inherit': 'inherit',
47
+ 'current': 'currentColor',
48
+ 'transparent': 'transparent',
49
+ },
50
+
51
+ outlineColor: {
52
+ ...parseColorTokens(colorTokens, ['generic']),
53
+ 'inherit': 'inherit',
54
+ 'current': 'currentColor',
55
+ 'transparent': 'transparent',
56
+ },
57
+
58
+ fill: {
59
+ ...parseColorTokens(colorTokens, ['generic', 'background', 'text']),
60
+ 'inherit': 'inherit',
61
+ 'current': 'currentColor',
62
+ 'transparent': 'transparent',
63
+ },
33
64
 
34
- // SVG Palette
35
- fill: parseColorTokens(colorTokens, ['generic', 'background', 'text']),
36
- stroke: parseColorTokens(colorTokens, ['generic', 'background', 'text']),
65
+ stroke: {
66
+ ...parseColorTokens(colorTokens, ['generic', 'background', 'text']),
67
+ 'inherit': 'inherit',
68
+ 'current': 'currentColor',
69
+ 'transparent': 'transparent',
70
+ },
71
+
72
+ content: {
73
+ 'label-required': '"*"',
74
+
75
+ 'checkbox-unchecked': '""',
76
+ 'checkbox-checked': '"check_small"',
77
+ 'checkbox-indeterminate': '"check_indeterminate_small"',
78
+ },
37
79
 
38
80
  animation: {
39
81
  'circular-loader': 'circular-loader 1400ms linear infinite',
@@ -74,19 +116,19 @@ module.exports = {
74
116
  },
75
117
  },
76
118
 
77
- content: {
78
- 'checkbox-unchecked': '""',
79
- 'checkbox-checked': '"check_small"',
80
- 'checkbox-indeterminate': '"check_indeterminate_small"',
81
- },
82
-
83
119
  borderRadius: {
84
120
  ...parseBorderRadiusTokens(borderRadiusTokens),
85
121
  'full': '9999px',
86
122
  },
87
123
 
88
- borderWidth: parseBorderWidthTokens(borderWidthTokens),
89
- boxShadow: parseBoxShadowTokens(boxShadowTokens),
124
+ borderWidth: {
125
+ ...parseBorderWidthTokens(borderWidthTokens),
126
+ },
127
+
128
+ boxShadow: {
129
+ ...parseBoxShadowTokens(boxShadowTokens),
130
+ 'base': '0 1px 1px rgba(0 0 0 0.24), 0 0 1px rgba(0 0 0 0.16)',
131
+ },
90
132
 
91
133
  fontFamily: {
92
134
  ...parseFontFamilyTokens(typographyTokens),
@@ -97,7 +139,7 @@ module.exports = {
97
139
  fontSize: {
98
140
  ...parseFontSizeTokens(typographyTokens),
99
141
  'inherit': 'inherit',
100
- 'icon': '1.15em',
142
+ 'icon': ['1.15em', { lineHeight: 1 }],
101
143
  },
102
144
 
103
145
  fontWeight: {
@@ -105,13 +147,9 @@ module.exports = {
105
147
  'inherit': 'inherit',
106
148
  },
107
149
 
108
- letterSpacing: false,
109
-
110
150
  lineHeight: {
111
151
  'inherit': 'inherit',
112
152
  },
113
-
114
- opacity: false,
115
153
  },
116
154
 
117
155
  plugins: [
@@ -165,14 +203,13 @@ module.exports = {
165
203
  '&[type="radio"]:not(:checked)',
166
204
  ]);
167
205
 
168
- addVariant('indeterminate', ['&:indeterminate']);
169
-
170
206
  addVariant('valid', ['&:valid', '&:not([invalid])']);
171
207
  addVariant('invalid', ['&:invalid', '&[invalid]']);
172
208
 
173
209
  addVariant('enabled', ['&:enabled', '&:not([disabled])']);
174
210
  addVariant('disabled', ['&:disabled', '&[disabled]']);
175
211
 
212
+ // TODO: Remove when migration complete
176
213
  addUtilities({
177
214
  '.visually-hidden': {
178
215
  width: 0,