@onereach/styles 7.1.2-beta.4556.0 → 7.1.2-beta.4564.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/main-v3.css +1 -1
- package/package.json +3 -3
- package/tailwind/utils.js +12 -11
- package/tailwind.config.js +1 -1
- package/tailwind.config.json +922 -1841
- package/tailwind.config.preset.js +8 -8
package/main-v3.css
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onereach/styles",
|
|
3
|
-
"version": "7.1.2-beta.
|
|
3
|
+
"version": "7.1.2-beta.4564.0",
|
|
4
4
|
"description": "Styles for or-ui-next",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"main": "./main.css",
|
|
@@ -29,13 +29,13 @@
|
|
|
29
29
|
],
|
|
30
30
|
"scripts": {
|
|
31
31
|
"dev": "pnpm build:scss -- --watch",
|
|
32
|
-
"build": "npm-run-all build:tokens build:scss build:autoprefixer build:cleancss build:tokens:css build:tokens:
|
|
32
|
+
"build": "npm-run-all build:tokens build:scss build:autoprefixer build:cleancss build:tokens:css build:tokens:css:v3 build:resolve-config",
|
|
33
33
|
"build:scss": "sass --embed-source-map ./src/main.scss dist/index.css",
|
|
34
34
|
"build:cleancss": "cleancss -o dist/index.min.css dist/index.css",
|
|
35
35
|
"build:autoprefixer": "npx postcss --use autoprefixer --map false --output dist/index.css dist/index.css",
|
|
36
36
|
"build:tokens": "pnpm json-to-scss",
|
|
37
37
|
"build:tokens:css": "node ./utils/makeCssVaribales.js",
|
|
38
|
-
"build:tokens:
|
|
38
|
+
"build:tokens:css:v3": "node ./utils/makeCssVariablesV3.js",
|
|
39
39
|
"build:resolve-config": "node ./scripts/resolveConfig.js",
|
|
40
40
|
"lint": "stylelint '**/*.scss'",
|
|
41
41
|
"fix": "stylelint --fix '**/*.scss'",
|
package/tailwind/utils.js
CHANGED
|
@@ -122,7 +122,7 @@ module.exports = {
|
|
|
122
122
|
}), {});
|
|
123
123
|
},
|
|
124
124
|
|
|
125
|
-
|
|
125
|
+
parseColorTokensNames(designTokens, colorGroups) {
|
|
126
126
|
const prefix = 'or-c';
|
|
127
127
|
const isBackground = (name) => /\b(?:container|background|surface)\b/.test(name) && !isText(name);
|
|
128
128
|
const isText = (name) => /\b(?:on)\b/.test(name);
|
|
@@ -149,7 +149,8 @@ module.exports = {
|
|
|
149
149
|
const { name, theme } = token.name.match(/^(?:(?<theme>light|dark)-)?(?<name>.+)$/).groups;
|
|
150
150
|
|
|
151
151
|
return {
|
|
152
|
-
name: `${name}${theme ? `-${theme}` : ''}`,
|
|
152
|
+
// name: `${name}${theme ? `-${theme}` : ''}`, we skip 'light' postfix now
|
|
153
|
+
name: `${name}${theme && theme !== 'light' ? `-${theme}` : ''}`,
|
|
153
154
|
group: defineColorGroup(name),
|
|
154
155
|
color: `var(--${prefix}-${name}${theme ? `-${theme}` : ''})`,
|
|
155
156
|
};
|
|
@@ -162,15 +163,15 @@ module.exports = {
|
|
|
162
163
|
}, {});
|
|
163
164
|
|
|
164
165
|
// Add default colors
|
|
165
|
-
Object.keys(colorMap).forEach((color) => {
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
});
|
|
166
|
+
// Object.keys(colorMap).forEach((color) => {
|
|
167
|
+
// const colorParts = color.split('-');
|
|
168
|
+
// if (colorParts.length > 1) {
|
|
169
|
+
// const defaultColor = colorParts.slice(0, -1).join('-');
|
|
170
|
+
// if (!colorMap[defaultColor]) {
|
|
171
|
+
// colorMap[defaultColor] = `var(--${prefix}-${defaultColor})`;
|
|
172
|
+
// }
|
|
173
|
+
// }
|
|
174
|
+
// });
|
|
174
175
|
|
|
175
176
|
return colorMap;
|
|
176
177
|
},
|
package/tailwind.config.js
CHANGED