@front10/helpers 2.0.20 → 2.0.21

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.
@@ -84,12 +84,13 @@ var initTheme = function initTheme(theme) {
84
84
  generatedStyles.push(generateTypographyStyles(theme.typography));
85
85
  }
86
86
 
87
- if (theme.colors) {
88
- var themeColorsKeys = Object.keys(theme.colors);
87
+ if (theme.colors || theme.designTokens.colors) {
88
+ var colors = Boolean(theme.colors) ? theme.colors : theme.designTokens.colors;
89
+ var themeColorsKeys = Object.keys(colors);
89
90
 
90
91
  for (var index = 0; index < themeColorsKeys.length; index += 1) {
91
92
  var colorName = themeColorsKeys[index];
92
- var colorValue = theme.colors[themeColorsKeys[index]];
93
+ var colorValue = colors[themeColorsKeys[index]];
93
94
 
94
95
  if (colorValue !== "none") {
95
96
  (function () {
@@ -121,8 +122,8 @@ var initTheme = function initTheme(theme) {
121
122
  }
122
123
  }
123
124
 
124
- if (theme.colors.primary) {
125
- var primaryHover = (0, _Color.hexToRGBA)(theme.colors.primary, 0.25);
125
+ if (colors.primary) {
126
+ var primaryHover = (0, _Color.hexToRGBA)(colors.primary, 0.25);
126
127
  generatedStyles.push(".fr-focus:focus, .fr-form-control:focus, .fr-focus\\:focus{box-shadow: 0 0 0 0.2rem ".concat(primaryHover, ";outline: 0;}"));
127
128
  }
128
129
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@front10/helpers",
3
- "version": "2.0.20",
3
+ "version": "2.0.21",
4
4
  "description": "Helpers for front10 components",
5
5
  "source": "src/index.js",
6
6
  "main": "dist/front10-helpers.js",