@instructure/ui-text 8.18.0 → 8.18.1-snapshot.2

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/LICENSE.md ADDED
@@ -0,0 +1,27 @@
1
+ ---
2
+ title: The MIT License (MIT)
3
+ category: Getting Started
4
+ order: 9
5
+ ---
6
+
7
+ # The MIT License (MIT)
8
+
9
+ Copyright (c) 2015 Instructure, Inc.
10
+
11
+ **Permission is hereby granted, free of charge, to any person obtaining a copy
12
+ of this software and associated documentation files (the "Software"), to deal
13
+ in the Software without restriction, including without limitation the rights
14
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
+ copies of the Software, and to permit persons to whom the Software is
16
+ furnished to do so, subject to the following conditions.**
17
+
18
+ The above copyright notice and this permission notice shall be included in all
19
+ copies or substantial portions of the Software.
20
+
21
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27
+ SOFTWARE.
@@ -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.18.0",
3
+ "version": "8.18.1-snapshot.2+ca4c1ff9d",
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.18.0",
28
- "@instructure/emotion": "8.18.0",
29
- "@instructure/shared-types": "8.18.0",
30
- "@instructure/ui-color-utils": "8.18.0",
31
- "@instructure/ui-react-utils": "8.18.0",
27
+ "@instructure/console": "8.18.1-snapshot.2+ca4c1ff9d",
28
+ "@instructure/emotion": "8.18.1-snapshot.2+ca4c1ff9d",
29
+ "@instructure/shared-types": "8.18.1-snapshot.2+ca4c1ff9d",
30
+ "@instructure/ui-color-utils": "8.18.1-snapshot.2+ca4c1ff9d",
31
+ "@instructure/ui-react-utils": "8.18.1-snapshot.2+ca4c1ff9d",
32
32
  "prop-types": "^15"
33
33
  },
34
34
  "devDependencies": {
35
- "@instructure/ui-babel-preset": "8.18.0",
36
- "@instructure/ui-test-utils": "8.18.0",
37
- "@instructure/ui-themes": "8.18.0"
35
+ "@instructure/ui-babel-preset": "8.18.1-snapshot.2+ca4c1ff9d",
36
+ "@instructure/ui-test-utils": "8.18.1-snapshot.2+ca4c1ff9d",
37
+ "@instructure/ui-themes": "8.18.1-snapshot.2+ca4c1ff9d"
38
38
  },
39
39
  "peerDependencies": {
40
40
  "react": ">=16.8 <=17"
@@ -42,5 +42,6 @@
42
42
  "publishConfig": {
43
43
  "access": "public"
44
44
  },
45
- "sideEffects": false
45
+ "sideEffects": false,
46
+ "gitHead": "ca4c1ff9d3985151ae0758fb596de41652dbb58b"
46
47
  }