@instructure/ui-text 8.17.1-snapshot.82 → 8.18.1-snapshot.1

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/CHANGELOG.md CHANGED
@@ -3,6 +3,10 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [8.18.0](https://github.com/instructure/instructure-ui/compare/v8.17.0...v8.18.0) (2022-02-23)
7
+
8
+ **Note:** Version bump only for package @instructure/ui-text
9
+
6
10
  # [8.17.0](https://github.com/instructure/instructure-ui/compare/v8.16.0...v8.17.0) (2022-02-07)
7
11
 
8
12
  ### Bug Fixes
@@ -31,8 +31,10 @@ export default {
31
31
  };
32
32
  },
33
33
  getExampleProps: props => {
34
+ var _props$color;
35
+
34
36
  return {
35
- background: props?.color?.includes('inverse') ? 'primary-inverse' : 'primary',
37
+ background: props !== null && props !== void 0 && (_props$color = props.color) !== null && _props$color !== void 0 && _props$color.includes('inverse') ? 'primary-inverse' : 'primary',
36
38
  maxWidth: '25rem'
37
39
  };
38
40
  },
package/es/Text/index.js CHANGED
@@ -40,19 +40,25 @@ category: components
40
40
 
41
41
  let Text = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = (_temp = _class2 = class Text extends Component {
42
42
  componentDidMount() {
43
- this.props.makeStyles?.();
43
+ var _this$props$makeStyle, _this$props;
44
+
45
+ (_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
44
46
  }
45
47
 
46
48
  componentDidUpdate() {
47
- this.props.makeStyles?.();
49
+ var _this$props$makeStyle2, _this$props2;
50
+
51
+ (_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2);
48
52
  }
49
53
 
50
54
  render() {
55
+ var _this$props$styles;
56
+
51
57
  const children = this.props.children;
52
58
  const ElementType = getElementType(Text, this.props);
53
59
  return jsx(ElementType // @ts-expect-error TODO: `ref` prop causes: "Expression produces a union type that is too complex to represent.ts(2590)"
54
60
  , Object.assign({}, passthroughProps(this.props), {
55
- css: this.props.styles?.text,
61
+ css: (_this$props$styles = this.props.styles) === null || _this$props$styles === void 0 ? void 0 : _this$props$styles.text,
56
62
  ref: this.props.elementRef
57
63
  }), children);
58
64
  }
package/es/Text/theme.js CHANGED
@@ -39,15 +39,15 @@ const generateComponentTheme = theme => {
39
39
  }
40
40
  };
41
41
  const componentVariables = { ...typography,
42
- primaryInverseColor: colors?.textLightest,
43
- primaryColor: colors?.textDarkest,
44
- secondaryColor: colors?.textDark,
45
- secondaryInverseColor: colors?.textLight,
46
- brandColor: colors?.textBrand,
47
- dangerColor: colors?.textDanger,
48
- successColor: colors?.textSuccess,
49
- alertColor: colors?.textAlert,
50
- warningColor: colors?.textWarning,
42
+ primaryInverseColor: colors === null || colors === void 0 ? void 0 : colors.textLightest,
43
+ primaryColor: colors === null || colors === void 0 ? void 0 : colors.textDarkest,
44
+ secondaryColor: colors === null || colors === void 0 ? void 0 : colors.textDark,
45
+ secondaryInverseColor: colors === null || colors === void 0 ? void 0 : colors.textLight,
46
+ brandColor: colors === null || colors === void 0 ? void 0 : colors.textBrand,
47
+ dangerColor: colors === null || colors === void 0 ? void 0 : colors.textDanger,
48
+ successColor: colors === null || colors === void 0 ? void 0 : colors.textSuccess,
49
+ alertColor: colors === null || colors === void 0 ? void 0 : colors.textAlert,
50
+ warningColor: colors === null || colors === void 0 ? void 0 : colors.textWarning,
51
51
  // deprecated, remove in v9
52
52
  paragraphMargin: `${spacing.medium} 0`
53
53
  };
@@ -38,8 +38,10 @@ var _default = {
38
38
  };
39
39
  },
40
40
  getExampleProps: props => {
41
+ var _props$color;
42
+
41
43
  return {
42
- background: props?.color?.includes('inverse') ? 'primary-inverse' : 'primary',
44
+ background: props !== null && props !== void 0 && (_props$color = props.color) !== null && _props$color !== void 0 && _props$color.includes('inverse') ? 'primary-inverse' : 'primary',
43
45
  maxWidth: '25rem'
44
46
  };
45
47
  },
package/lib/Text/index.js CHANGED
@@ -31,19 +31,25 @@ category: components
31
31
  **/
32
32
  let Text = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = (_temp = _class2 = class Text extends _react.Component {
33
33
  componentDidMount() {
34
- this.props.makeStyles?.();
34
+ var _this$props$makeStyle, _this$props;
35
+
36
+ (_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
35
37
  }
36
38
 
37
39
  componentDidUpdate() {
38
- this.props.makeStyles?.();
40
+ var _this$props$makeStyle2, _this$props2;
41
+
42
+ (_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2);
39
43
  }
40
44
 
41
45
  render() {
46
+ var _this$props$styles;
47
+
42
48
  const children = this.props.children;
43
49
  const ElementType = (0, _getElementType.getElementType)(Text, this.props);
44
50
  return (0, _emotion.jsx)(ElementType // @ts-expect-error TODO: `ref` prop causes: "Expression produces a union type that is too complex to represent.ts(2590)"
45
51
  , Object.assign({}, (0, _passthroughProps.passthroughProps)(this.props), {
46
- css: this.props.styles?.text,
52
+ css: (_this$props$styles = this.props.styles) === null || _this$props$styles === void 0 ? void 0 : _this$props$styles.text,
47
53
  ref: this.props.elementRef
48
54
  }), children);
49
55
  }
package/lib/Text/theme.js CHANGED
@@ -46,15 +46,15 @@ const generateComponentTheme = theme => {
46
46
  }
47
47
  };
48
48
  const componentVariables = { ...typography,
49
- primaryInverseColor: colors?.textLightest,
50
- primaryColor: colors?.textDarkest,
51
- secondaryColor: colors?.textDark,
52
- secondaryInverseColor: colors?.textLight,
53
- brandColor: colors?.textBrand,
54
- dangerColor: colors?.textDanger,
55
- successColor: colors?.textSuccess,
56
- alertColor: colors?.textAlert,
57
- warningColor: colors?.textWarning,
49
+ primaryInverseColor: colors === null || colors === void 0 ? void 0 : colors.textLightest,
50
+ primaryColor: colors === null || colors === void 0 ? void 0 : colors.textDarkest,
51
+ secondaryColor: colors === null || colors === void 0 ? void 0 : colors.textDark,
52
+ secondaryInverseColor: colors === null || colors === void 0 ? void 0 : colors.textLight,
53
+ brandColor: colors === null || colors === void 0 ? void 0 : colors.textBrand,
54
+ dangerColor: colors === null || colors === void 0 ? void 0 : colors.textDanger,
55
+ successColor: colors === null || colors === void 0 ? void 0 : colors.textSuccess,
56
+ alertColor: colors === null || colors === void 0 ? void 0 : colors.textAlert,
57
+ warningColor: colors === null || colors === void 0 ? void 0 : colors.textWarning,
58
58
  // deprecated, remove in v9
59
59
  paragraphMargin: `${spacing.medium} 0`
60
60
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-text",
3
- "version": "8.17.1-snapshot.82+96244a097",
3
+ "version": "8.18.1-snapshot.1+669aa5892",
4
4
  "description": "A component for styling textual content",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "module": "./es/index.js",
@@ -24,17 +24,17 @@
24
24
  "license": "MIT",
25
25
  "dependencies": {
26
26
  "@babel/runtime": "^7.13.10",
27
- "@instructure/console": "8.17.1-snapshot.82+96244a097",
28
- "@instructure/emotion": "8.17.1-snapshot.82+96244a097",
29
- "@instructure/shared-types": "8.17.1-snapshot.82+96244a097",
30
- "@instructure/ui-color-utils": "8.17.1-snapshot.82+96244a097",
31
- "@instructure/ui-react-utils": "8.17.1-snapshot.82+96244a097",
27
+ "@instructure/console": "8.18.1-snapshot.1+669aa5892",
28
+ "@instructure/emotion": "8.18.1-snapshot.1+669aa5892",
29
+ "@instructure/shared-types": "8.18.1-snapshot.1+669aa5892",
30
+ "@instructure/ui-color-utils": "8.18.1-snapshot.1+669aa5892",
31
+ "@instructure/ui-react-utils": "8.18.1-snapshot.1+669aa5892",
32
32
  "prop-types": "^15"
33
33
  },
34
34
  "devDependencies": {
35
- "@instructure/ui-babel-preset": "8.17.1-snapshot.82+96244a097",
36
- "@instructure/ui-test-utils": "8.17.1-snapshot.82+96244a097",
37
- "@instructure/ui-themes": "8.17.1-snapshot.82+96244a097"
35
+ "@instructure/ui-babel-preset": "8.18.1-snapshot.1+669aa5892",
36
+ "@instructure/ui-test-utils": "8.18.1-snapshot.1+669aa5892",
37
+ "@instructure/ui-themes": "8.18.1-snapshot.1+669aa5892"
38
38
  },
39
39
  "peerDependencies": {
40
40
  "react": ">=16.8 <=17"
@@ -43,5 +43,5 @@
43
43
  "access": "public"
44
44
  },
45
45
  "sideEffects": false,
46
- "gitHead": "96244a097dffef5f10bbe7979c580581c787083e"
46
+ "gitHead": "669aa58926b123028bcb9e39427d36910b78b0d1"
47
47
  }