@ringcentral/juno 2.36.2 → 2.36.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.
@@ -1,5 +1,6 @@
1
1
  import { __makeTemplateObject } from "tslib";
2
2
  import { css } from '../styled-components';
3
+ import { logInDev } from '../utils';
3
4
  /**
4
5
  * get typography key value with token
5
6
  *
@@ -16,7 +17,17 @@ function typographyProp(name, key) {
16
17
  var theme = _a.theme;
17
18
  var themeOfTypography = theme.typography[name];
18
19
  if (typeof themeOfTypography !== 'object') {
19
- throw new Error("Unexpected typography name: " + name);
20
+ if (process.env.NODE_ENV !== 'production') {
21
+ throw new Error("Unexpected typography name: " + name);
22
+ }
23
+ else {
24
+ logInDev({
25
+ message: "Unexpected typography name: " + name,
26
+ component: 'typographyProp',
27
+ level: 'warn',
28
+ });
29
+ return undefined;
30
+ }
20
31
  }
21
32
  return themeOfTypography[key];
22
33
  };
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  var tslib_1 = require("tslib");
4
4
  var styled_components_1 = require("../styled-components");
5
+ var utils_1 = require("../utils");
5
6
  /**
6
7
  * get typography key value with token
7
8
  *
@@ -18,7 +19,17 @@ function typographyProp(name, key) {
18
19
  var theme = _a.theme;
19
20
  var themeOfTypography = theme.typography[name];
20
21
  if (typeof themeOfTypography !== 'object') {
21
- throw new Error("Unexpected typography name: " + name);
22
+ if (process.env.NODE_ENV !== 'production') {
23
+ throw new Error("Unexpected typography name: " + name);
24
+ }
25
+ else {
26
+ utils_1.logInDev({
27
+ message: "Unexpected typography name: " + name,
28
+ component: 'typographyProp',
29
+ level: 'warn',
30
+ });
31
+ return undefined;
32
+ }
22
33
  }
23
34
  return themeOfTypography[key];
24
35
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ringcentral/juno",
3
- "version": "2.36.2",
3
+ "version": "2.36.3",
4
4
  "author": "RingCentral",
5
5
  "license": "MIT",
6
6
  "main": "./index.js",