@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 CHANGED
@@ -2,8 +2,8 @@
2
2
  @import "tailwindcss/components.css";
3
3
  @import "tailwindcss/utilities.css";
4
4
 
5
- @import "font.css";
6
5
  @import "tokens-v3.css";
6
+ @import "font.css";
7
7
  @import "scrollbar.css";
8
8
 
9
9
  @import "base.layer.css";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onereach/styles",
3
- "version": "7.1.2-beta.4556.0",
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:cssv3 build:resolve-config",
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:cssv3": "node ./utils/makeCssVaribalesV3.js",
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
- parseColorTokensToVars(designTokens, colorGroups) {
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
- const colorParts = color.split('-');
167
- if (colorParts.length > 1) {
168
- const defaultColor = colorParts.slice(0, -1).join('-');
169
- if (!colorMap[defaultColor]) {
170
- colorMap[defaultColor] = `var(--${prefix}-${defaultColor})`;
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
  },
@@ -9,6 +9,6 @@ module.exports = {
9
9
  './node_modules/@onereach/ui-components/dist/auto/**/*.{vue,js,ts,jsx,tsx}',
10
10
  ],
11
11
  presets: [
12
- require('@onereach/styles/tailwind.config.tokens.preset.js'),
12
+ require('@onereach/styles/tailwind.config.preset.js'),
13
13
  ],
14
14
  };