@primer/css 21.0.3-rc.5dbb9147 → 21.0.3-rc.e3a906fa

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": "@primer/css",
3
- "version": "21.0.3-rc.5dbb9147",
3
+ "version": "21.0.3-rc.e3a906fa",
4
4
  "description": "The CSS implementation of GitHub's Primer Design System",
5
5
  "homepage": "https://primer.style/css",
6
6
  "author": "GitHub, Inc.",
@@ -42,7 +42,7 @@
42
42
  "storybook": "cd docs && yarn && yarn storybook"
43
43
  },
44
44
  "dependencies": {
45
- "@primer/primitives": "^7.11.10",
45
+ "@primer/primitives": "^7.11.12",
46
46
  "@primer/view-components": "^0.1.0"
47
47
  },
48
48
  "devDependencies": {
@@ -3,7 +3,8 @@ const sass = require('@csstools/postcss-sass')
3
3
  const scss = require('postcss-scss')
4
4
  const scssImport = require('postcss-import')
5
5
  const { join } = require('path')
6
- const importedJSONFromPrimitives = require('./node_modules/@primer/primitives/tokens-next-private/fallbacks/color-fallbacks.json')
6
+ const path = require('path')
7
+ const fs = require('fs')
7
8
 
8
9
  module.exports = {
9
10
  map: {
@@ -20,9 +21,29 @@ module.exports = {
20
21
  }),
21
22
  autoprefixer,
22
23
  require('postcss-custom-properties-fallback')({
23
- importFrom: {
24
- customProperties: importedJSONFromPrimitives
25
- },
24
+ importFrom: [
25
+ () => {
26
+ const primitiveFallbacks = [
27
+ 'color-fallbacks.json',
28
+ 'base/size/size.json',
29
+ 'base/typography/typography.json',
30
+ 'functional/size/border.json',
31
+ 'functional/size/breakpoints.json',
32
+ 'functional/size/size-coarse.json',
33
+ 'functional/size/size-fine.json',
34
+ 'functional/size/size.json',
35
+ 'functional/size/viewport.json',
36
+ 'functional/typography/typography.json',
37
+ ]
38
+ let customProperties = {}
39
+ for (const filePath of primitiveFallbacks) {
40
+ const fileData = fs.readFileSync(path.join(__dirname, './node_modules/@primer/primitives/tokens-next-private/fallbacks/', filePath), 'utf8')
41
+ customProperties = {...customProperties, ...JSON.parse(fileData)}
42
+ }
43
+
44
+ return { customProperties: customProperties };
45
+ }
46
+ ]
26
47
  }),
27
48
  ]
28
49
  }