@rss-eng/design-tokens
Advanced tools
Comparing version 0.0.9-pre002 to 0.0.9-pre003
@@ -7,3 +7,3 @@ /** | ||
* | ||
* NOTE: Do not edit directly. Generated on Tue, 23 Mar 2021 13:07:12 GMT | ||
* NOTE: Do not edit directly. Generated on Tue, 23 Mar 2021 14:23:37 GMT | ||
*/ | ||
@@ -10,0 +10,0 @@ export const fabricDesignSystemStyles = css` |
/** | ||
* Do not edit directly | ||
* Generated on Tue, 23 Mar 2021 13:07:12 GMT | ||
* Generated on Tue, 23 Mar 2021 14:23:37 GMT | ||
*/ | ||
@@ -5,0 +5,0 @@ |
{ | ||
"name": "@rss-eng/design-tokens", | ||
"version": "0.0.9-pre002", | ||
"version": "0.0.9-pre003", | ||
"main": "index.js", | ||
@@ -5,0 +5,0 @@ "files": [ |
const _ = require('lodash'); | ||
const tokens = require('../build/js/tokens.common.js'); | ||
const nestedValueMap = (root) => { | ||
if (!root) { | ||
return root; | ||
} | ||
if (root.value) { | ||
return root.value; | ||
} | ||
if (_.has(root, 'default') && !_.has(root, 'DEFAULT')) { | ||
_.set(root, 'DEFAULT', _.get(root, 'default')); | ||
} | ||
return _.mapValues(root, nestedValueMap); | ||
}; | ||
const nestedValueMap = _.identity; | ||
@@ -37,4 +26,4 @@ const lineHeight = () => nestedValueMap(_.get(tokens, 'line-height')); | ||
const fontFamily = () => ({ | ||
sans: _.get(tokens, 'font-family.sans.value').replace(/'/g, '').split(', '), | ||
mono: _.get(tokens, 'font-family.mono.value').replace(/'/g, '').split(', ') | ||
sans: _.get(tokens, 'font-family.sans').replace(/'/g, '').split(', '), | ||
mono: _.get(tokens, 'font-family.mono').replace(/'/g, '').split(', ') | ||
}); | ||
@@ -47,6 +36,6 @@ | ||
...nestedValueMap(_.get(tokens, 'breakpoint')), | ||
'sm': _.get(tokens, 'breakpoint.mobile-portrait.value'), | ||
'md': _.get(tokens, 'breakpoint.tablet-landscape.value'), | ||
'lg': _.get(tokens, 'breakpoint.monitor.value'), | ||
'xl': _.get(tokens, 'breakpoint.large-screen.value') | ||
'sm': _.get(tokens, 'breakpoint.mobile-portrait'), | ||
'md': _.get(tokens, 'breakpoint.tablet-landscape'), | ||
'lg': _.get(tokens, 'breakpoint.monitor'), | ||
'xl': _.get(tokens, 'breakpoint.large-screen') | ||
}); | ||
@@ -53,0 +42,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
201059
3834