@instructure/ui-expandable 8.25.1-snapshot-10 → 8.25.1-snapshot-13

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,7 +3,7 @@
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.25.1-snapshot-10](https://github.com/instructure/instructure-ui/compare/v8.25.0...v8.25.1-snapshot-10) (2022-06-20)
6
+ ## [8.25.1-snapshot-13](https://github.com/instructure/instructure-ui/compare/v8.25.0...v8.25.1-snapshot-13) (2022-06-22)
7
7
 
8
8
  **Note:** Version bump only for package @instructure/ui-expandable
9
9
 
@@ -1,4 +1,4 @@
1
- var _dec, _class;
1
+ var _dec, _class, _class2;
2
2
 
3
3
  /*
4
4
  * The MIT License (MIT)
@@ -42,19 +42,19 @@ category: components/utilities
42
42
  **/
43
43
 
44
44
 
45
- let Expandable = (_dec = withDeterministicId(), _dec(_class = class Expandable extends Component {
46
- static displayName = "Expandable";
47
- static propTypes = propTypes;
48
- static allowedProps = allowedProps;
49
- static defaultProps = {
50
- defaultExpanded: false,
51
- onToggle: function () {},
52
- children: null
53
- };
54
- _contentId;
55
-
45
+ let Expandable = (_dec = withDeterministicId(), _dec(_class = (_class2 = class Expandable extends Component {
56
46
  constructor(props) {
57
47
  super(props);
48
+ this._contentId = void 0;
49
+
50
+ this.handleToggle = event => {
51
+ if (!this.isControlled()) {
52
+ this.setState(toggleExpanded);
53
+ }
54
+
55
+ this.props.onToggle(event, !this.expanded);
56
+ };
57
+
58
58
  this.state = {
59
59
  expanded: this.isControlled(props) ? props.expanded : props.defaultExpanded
60
60
  };
@@ -82,14 +82,6 @@ let Expandable = (_dec = withDeterministicId(), _dec(_class = class Expandable e
82
82
  }
83
83
  }
84
84
 
85
- handleToggle = event => {
86
- if (!this.isControlled()) {
87
- this.setState(toggleExpanded);
88
- }
89
-
90
- this.props.onToggle(event, !this.expanded);
91
- };
92
-
93
85
  render() {
94
86
  var _this = this;
95
87
 
@@ -121,6 +113,10 @@ let Expandable = (_dec = withDeterministicId(), _dec(_class = class Expandable e
121
113
  }
122
114
  }
123
115
 
124
- }) || _class);
116
+ }, _class2.displayName = "Expandable", _class2.propTypes = propTypes, _class2.allowedProps = allowedProps, _class2.defaultProps = {
117
+ defaultExpanded: false,
118
+ onToggle: function () {},
119
+ children: null
120
+ }, _class2)) || _class);
125
121
  export default Expandable;
126
122
  export { Expandable };
@@ -13,7 +13,7 @@ var _props = require("./props");
13
13
 
14
14
  var _withDeterministicId = require("@instructure/ui-react-utils/lib/DeterministicIdContext/withDeterministicId.js");
15
15
 
16
- var _dec, _class;
16
+ var _dec, _class, _class2;
17
17
 
18
18
  const toggleExpanded = _ref => {
19
19
  let expanded = _ref.expanded;
@@ -29,19 +29,19 @@ category: components/utilities
29
29
  **/
30
30
 
31
31
 
32
- let Expandable = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec(_class = class Expandable extends _react.Component {
33
- static displayName = "Expandable";
34
- static propTypes = _props.propTypes;
35
- static allowedProps = _props.allowedProps;
36
- static defaultProps = {
37
- defaultExpanded: false,
38
- onToggle: function () {},
39
- children: null
40
- };
41
- _contentId;
42
-
32
+ let Expandable = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec(_class = (_class2 = class Expandable extends _react.Component {
43
33
  constructor(props) {
44
34
  super(props);
35
+ this._contentId = void 0;
36
+
37
+ this.handleToggle = event => {
38
+ if (!this.isControlled()) {
39
+ this.setState(toggleExpanded);
40
+ }
41
+
42
+ this.props.onToggle(event, !this.expanded);
43
+ };
44
+
45
45
  this.state = {
46
46
  expanded: this.isControlled(props) ? props.expanded : props.defaultExpanded
47
47
  };
@@ -69,14 +69,6 @@ let Expandable = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec(_
69
69
  }
70
70
  }
71
71
 
72
- handleToggle = event => {
73
- if (!this.isControlled()) {
74
- this.setState(toggleExpanded);
75
- }
76
-
77
- this.props.onToggle(event, !this.expanded);
78
- };
79
-
80
72
  render() {
81
73
  var _this = this;
82
74
 
@@ -108,7 +100,11 @@ let Expandable = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec(_
108
100
  }
109
101
  }
110
102
 
111
- }) || _class);
103
+ }, _class2.displayName = "Expandable", _class2.propTypes = _props.propTypes, _class2.allowedProps = _props.allowedProps, _class2.defaultProps = {
104
+ defaultExpanded: false,
105
+ onToggle: function () {},
106
+ children: null
107
+ }, _class2)) || _class);
112
108
  exports.Expandable = Expandable;
113
109
  var _default = Expandable;
114
110
  exports.default = _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-expandable",
3
- "version": "8.25.1-snapshot-10",
3
+ "version": "8.25.1-snapshot-13",
4
4
  "description": "A utility component for show/hide functionality",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "module": "./es/index.js",
@@ -24,18 +24,18 @@
24
24
  "license": "MIT",
25
25
  "dependencies": {
26
26
  "@babel/runtime": "^7.13.10",
27
- "@instructure/shared-types": "8.25.1-snapshot-10",
28
- "@instructure/ui-prop-types": "8.25.1-snapshot-10",
29
- "@instructure/ui-react-utils": "8.25.1-snapshot-10",
30
- "@instructure/ui-testable": "8.25.1-snapshot-10",
31
- "@instructure/ui-utils": "8.25.1-snapshot-10",
32
- "@instructure/uid": "8.25.1-snapshot-10",
27
+ "@instructure/shared-types": "8.25.1-snapshot-13",
28
+ "@instructure/ui-prop-types": "8.25.1-snapshot-13",
29
+ "@instructure/ui-react-utils": "8.25.1-snapshot-13",
30
+ "@instructure/ui-testable": "8.25.1-snapshot-13",
31
+ "@instructure/ui-utils": "8.25.1-snapshot-13",
32
+ "@instructure/uid": "8.25.1-snapshot-13",
33
33
  "prop-types": "^15"
34
34
  },
35
35
  "devDependencies": {
36
- "@instructure/ui-babel-preset": "8.25.1-snapshot-10",
37
- "@instructure/ui-color-utils": "8.25.1-snapshot-10",
38
- "@instructure/ui-test-utils": "8.25.1-snapshot-10"
36
+ "@instructure/ui-babel-preset": "8.25.1-snapshot-13",
37
+ "@instructure/ui-color-utils": "8.25.1-snapshot-13",
38
+ "@instructure/ui-test-utils": "8.25.1-snapshot-13"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "react": ">=16.8 <=17"