@commonsku/styles 1.16.2 → 1.16.3

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/dist/index.js CHANGED
@@ -1328,16 +1328,18 @@ var themeOptions = {
1328
1328
  },
1329
1329
  };
1330
1330
  function getColor(color, def) {
1331
+ var _a;
1331
1332
  if (!color) {
1332
1333
  return '';
1333
1334
  }
1334
- return ___default.get(colors, color, ___default.get(colors, def || '', def));
1335
+ return (_a = ___default.get(colors, color, ___default.get(colors, def || '', def))) !== null && _a !== void 0 ? _a : '';
1335
1336
  }
1336
1337
  function getFontStyle(value, def) {
1338
+ var _a;
1337
1339
  if (!value) {
1338
1340
  return '';
1339
1341
  }
1340
- return ___default.get(fontStyles, value, ___default.get(fontStyles, def || '', def));
1342
+ return (_a = ___default.get(fontStyles, value, ___default.get(fontStyles, def || '', def))) !== null && _a !== void 0 ? _a : '';
1341
1343
  }
1342
1344
  function getThemeColor(props, color, fallbackColor) {
1343
1345
  return getThemeProperty(props, 'colors', color, fallbackColor);
@@ -1353,6 +1355,7 @@ function getThemeFontFamily(props, fallbackValue) {
1353
1355
  return getThemeProperty(props, 'fontFamily', fallbackValue);
1354
1356
  }
1355
1357
  function getThemeProperty(props, prop, value, fallbackValue) {
1358
+ var _a, _b;
1356
1359
  if (___default.get(props, "theme.".concat(prop), null)) {
1357
1360
  if (___default.isObject(props.theme[prop]) && ___default.get(props.theme, "".concat(prop, ".").concat(value), null)) {
1358
1361
  return ___default.get(props.theme, "".concat(prop, ".").concat(value), null);
@@ -1362,7 +1365,7 @@ function getThemeProperty(props, prop, value, fallbackValue) {
1362
1365
  }
1363
1366
  }
1364
1367
  else if (___default.get(themeOptions, "".concat(prop, ".").concat(value), null)) {
1365
- return ___default.get(themeOptions, "".concat(prop, ".").concat(value), null);
1368
+ return (_a = ___default.get(themeOptions, "".concat(prop, ".").concat(value))) !== null && _a !== void 0 ? _a : '';
1366
1369
  }
1367
1370
  switch (prop) {
1368
1371
  case 'fontStyles':
@@ -1372,7 +1375,7 @@ function getThemeProperty(props, prop, value, fallbackValue) {
1372
1375
  case 'colors':
1373
1376
  return getColor(value, fallbackValue);
1374
1377
  case 'fontFamily':
1375
- return ___default.get(themeOptions.fontFamilies, "".concat(value, ".fontFamily"), fallbackValue || themeOptions.fontFamily);
1378
+ return (_b = ___default.get(themeOptions.fontFamilies, "".concat(value, ".fontFamily"), fallbackValue || themeOptions.fontFamily)) !== null && _b !== void 0 ? _b : '';
1376
1379
  default:
1377
1380
  return '';
1378
1381
  }