@instructure/ui-react-utils 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-react-utils
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
@@ -36,7 +36,9 @@ import { logWarn as warn } from '@instructure/console';
36
36
  * @returns {String} the element type
37
37
  */
38
38
  function getElementType(Component, props, getDefault) {
39
- if (props.as && props.as !== Component.defaultProps?.as) {
39
+ var _Component$defaultPro, _Component$defaultPro2;
40
+
41
+ if (props.as && props.as !== ((_Component$defaultPro = Component.defaultProps) === null || _Component$defaultPro === void 0 ? void 0 : _Component$defaultPro.as)) {
40
42
  return props.as;
41
43
  }
42
44
 
@@ -58,7 +60,7 @@ function getElementType(Component, props, getDefault) {
58
60
  return 'button';
59
61
  }
60
62
 
61
- return Component.defaultProps?.as || 'span';
63
+ return ((_Component$defaultPro2 = Component.defaultProps) === null || _Component$defaultPro2 === void 0 ? void 0 : _Component$defaultPro2.as) || 'span';
62
64
  }
63
65
 
64
66
  export default getElementType;
@@ -45,7 +45,9 @@ var _console = require("@instructure/console");
45
45
  * @returns {String} the element type
46
46
  */
47
47
  function getElementType(Component, props, getDefault) {
48
- if (props.as && props.as !== Component.defaultProps?.as) {
48
+ var _Component$defaultPro, _Component$defaultPro2;
49
+
50
+ if (props.as && props.as !== ((_Component$defaultPro = Component.defaultProps) === null || _Component$defaultPro === void 0 ? void 0 : _Component$defaultPro.as)) {
49
51
  return props.as;
50
52
  }
51
53
 
@@ -67,7 +69,7 @@ function getElementType(Component, props, getDefault) {
67
69
  return 'button';
68
70
  }
69
71
 
70
- return Component.defaultProps?.as || 'span';
72
+ return ((_Component$defaultPro2 = Component.defaultProps) === null || _Component$defaultPro2 === void 0 ? void 0 : _Component$defaultPro2.as) || 'span';
71
73
  }
72
74
 
73
75
  var _default = getElementType;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-react-utils",
3
- "version": "8.17.1-snapshot.82+96244a097",
3
+ "version": "8.18.1-snapshot.1+669aa5892",
4
4
  "description": "A React utility library made by Instructure Inc.",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "module": "./es/index.js",
@@ -22,17 +22,17 @@
22
22
  },
23
23
  "license": "MIT",
24
24
  "devDependencies": {
25
- "@instructure/ui-babel-preset": "8.17.1-snapshot.82+96244a097",
26
- "@instructure/ui-test-utils": "8.17.1-snapshot.82+96244a097"
25
+ "@instructure/ui-babel-preset": "8.18.1-snapshot.1+669aa5892",
26
+ "@instructure/ui-test-utils": "8.18.1-snapshot.1+669aa5892"
27
27
  },
28
28
  "dependencies": {
29
29
  "@babel/runtime": "^7.13.10",
30
30
  "@emotion/is-prop-valid": "^1",
31
- "@instructure/console": "8.17.1-snapshot.82+96244a097",
32
- "@instructure/shared-types": "8.17.1-snapshot.82+96244a097",
33
- "@instructure/ui-decorator": "8.17.1-snapshot.82+96244a097",
34
- "@instructure/ui-dom-utils": "8.17.1-snapshot.82+96244a097",
35
- "@instructure/ui-utils": "8.17.1-snapshot.82+96244a097",
31
+ "@instructure/console": "8.18.1-snapshot.1+669aa5892",
32
+ "@instructure/shared-types": "8.18.1-snapshot.1+669aa5892",
33
+ "@instructure/ui-decorator": "8.18.1-snapshot.1+669aa5892",
34
+ "@instructure/ui-dom-utils": "8.18.1-snapshot.1+669aa5892",
35
+ "@instructure/ui-utils": "8.18.1-snapshot.1+669aa5892",
36
36
  "hoist-non-react-statics": "^3.3.2",
37
37
  "prop-types": "^15"
38
38
  },
@@ -44,5 +44,5 @@
44
44
  "access": "public"
45
45
  },
46
46
  "sideEffects": false,
47
- "gitHead": "96244a097dffef5f10bbe7979c580581c787083e"
47
+ "gitHead": "669aa58926b123028bcb9e39427d36910b78b0d1"
48
48
  }