@instructure/ui-buttons 8.25.1-snapshot-7 → 8.25.1-snapshot-10

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-7](https://github.com/instructure/instructure-ui/compare/v8.25.0...v8.25.1-snapshot-7) (2022-06-13)
6
+ ## [8.25.1-snapshot-10](https://github.com/instructure/instructure-ui/compare/v8.25.0...v8.25.1-snapshot-10) (2022-06-20)
7
7
 
8
8
  **Note:** Version bump only for package @instructure/ui-buttons
9
9
 
@@ -1,7 +1,7 @@
1
1
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
2
2
  const _excluded = ["type", "size", "elementRef", "as", "href", "color", "focusColor", "textAlign", "shape", "display", "withBackground", "withBorder", "isCondensed", "margin", "cursor", "onClick", "renderIcon", "tabIndex", "styles", "makeStyles"];
3
3
 
4
- var _dec, _dec2, _class, _class2;
4
+ var _dec, _dec2, _class;
5
5
 
6
6
  /*
7
7
  * The MIT License (MIT)
@@ -47,76 +47,39 @@ category: components/utilities
47
47
  ---
48
48
  @tsProps
49
49
  **/
50
- let BaseButton = (_dec = withStyle(generateStyles, generateComponentTheme), _dec2 = testable(), _dec(_class = _dec2(_class = (_class2 = class BaseButton extends Component {
51
- constructor() {
52
- super(...arguments);
53
- this.ref = null;
54
-
55
- this.handleElementRef = el => {
56
- const elementRef = this.props.elementRef;
57
- this.ref = el;
58
-
59
- if (typeof elementRef === 'function') {
60
- elementRef(el);
61
- }
62
- };
63
-
64
- this.handleClick = event => {
65
- const onClick = this.props.onClick;
66
- const interaction = this.interaction;
67
-
68
- if (interaction !== 'enabled') {
69
- event.preventDefault();
70
- event.stopPropagation();
71
- return;
72
- }
73
-
74
- if (typeof onClick === 'function') {
75
- onClick(event);
76
- }
77
- };
78
-
79
- this.handleKeyDown = event => {
80
- const _this$props = this.props,
81
- onClick = _this$props.onClick,
82
- onKeyDown = _this$props.onKeyDown,
83
- href = _this$props.href;
84
- const interaction = this.interaction;
85
-
86
- if (typeof onKeyDown === 'function') {
87
- onKeyDown(event);
88
- } // behave like a button when space key is pressed
89
-
90
-
91
- const _keycode$codes = keycode.codes,
92
- space = _keycode$codes.space,
93
- enter = _keycode$codes.enter;
94
-
95
- if (this.elementType !== 'button' && [space, enter].includes(event.keyCode)) {
96
- event.preventDefault();
97
- event.stopPropagation();
98
-
99
- if (typeof onClick === 'function' && interaction === 'enabled') {
100
- onClick(event);
101
- }
102
-
103
- if (href) {
104
- this.ref && this.ref.click();
105
- }
106
- }
107
- };
108
- }
50
+ let BaseButton = (_dec = withStyle(generateStyles, generateComponentTheme), _dec2 = testable(), _dec(_class = _dec2(_class = class BaseButton extends Component {
51
+ static displayName = "BaseButton";
52
+ static componentId = 'BaseButton';
53
+ static propTypes = propTypes;
54
+ static allowedProps = allowedProps;
55
+ static defaultProps = {
56
+ type: 'button',
57
+ size: 'medium',
58
+ as: 'button',
59
+ // Leave interaction default undefined so that `disabled` and `readOnly` can also be supplied
60
+ interaction: void 0,
61
+ color: 'secondary',
62
+ shape: 'rectangle',
63
+ display: 'inline-block',
64
+ textAlign: 'start',
65
+ withBackground: true,
66
+ withBorder: true,
67
+ isCondensed: false,
68
+ margin: '0',
69
+ cursor: 'pointer'
70
+ };
71
+ ref = null;
109
72
 
110
73
  componentDidMount() {
111
- var _this$props$makeStyle, _this$props2;
74
+ var _this$props$makeStyle, _this$props;
112
75
 
113
- (_this$props$makeStyle = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props2, this.makeStylesVariables);
76
+ (_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props, this.makeStylesVariables);
114
77
  }
115
78
 
116
79
  componentDidUpdate() {
117
- var _this$props$makeStyle2, _this$props3;
80
+ var _this$props$makeStyle2, _this$props2;
118
81
 
119
- (_this$props$makeStyle2 = (_this$props3 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props3, this.makeStylesVariables);
82
+ (_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2, this.makeStylesVariables);
120
83
  }
121
84
 
122
85
  get _rootElement() {
@@ -131,9 +94,9 @@ let BaseButton = (_dec = withStyle(generateStyles, generateComponentTheme), _dec
131
94
  }
132
95
 
133
96
  get hasOnlyIconVisible() {
134
- const _this$props4 = this.props,
135
- children = _this$props4.children,
136
- renderIcon = _this$props4.renderIcon;
97
+ const _this$props3 = this.props,
98
+ children = _this$props3.children,
99
+ renderIcon = _this$props3.renderIcon;
137
100
  return !!(renderIcon && !hasVisibleChildren(children));
138
101
  }
139
102
 
@@ -172,10 +135,10 @@ let BaseButton = (_dec = withStyle(generateStyles, generateComponentTheme), _dec
172
135
  }
173
136
 
174
137
  get focusColor() {
175
- const _this$props5 = this.props,
176
- color = _this$props5.color,
177
- focusColor = _this$props5.focusColor,
178
- withBackground = _this$props5.withBackground; // Give user specified focusColor preference
138
+ const _this$props4 = this.props,
139
+ color = _this$props4.color,
140
+ focusColor = _this$props4.focusColor,
141
+ withBackground = _this$props4.withBackground; // Give user specified focusColor preference
179
142
 
180
143
  if (focusColor) {
181
144
  return focusColor;
@@ -200,6 +163,58 @@ let BaseButton = (_dec = withStyle(generateStyles, generateComponentTheme), _dec
200
163
  this.ref && this.ref.focus();
201
164
  }
202
165
 
166
+ handleElementRef = el => {
167
+ const elementRef = this.props.elementRef;
168
+ this.ref = el;
169
+
170
+ if (typeof elementRef === 'function') {
171
+ elementRef(el);
172
+ }
173
+ };
174
+ handleClick = event => {
175
+ const onClick = this.props.onClick;
176
+ const interaction = this.interaction;
177
+
178
+ if (interaction !== 'enabled') {
179
+ event.preventDefault();
180
+ event.stopPropagation();
181
+ return;
182
+ }
183
+
184
+ if (typeof onClick === 'function') {
185
+ onClick(event);
186
+ }
187
+ };
188
+ handleKeyDown = event => {
189
+ const _this$props5 = this.props,
190
+ onClick = _this$props5.onClick,
191
+ onKeyDown = _this$props5.onKeyDown,
192
+ href = _this$props5.href;
193
+ const interaction = this.interaction;
194
+
195
+ if (typeof onKeyDown === 'function') {
196
+ onKeyDown(event);
197
+ } // behave like a button when space key is pressed
198
+
199
+
200
+ const _keycode$codes = keycode.codes,
201
+ space = _keycode$codes.space,
202
+ enter = _keycode$codes.enter;
203
+
204
+ if (this.elementType !== 'button' && [space, enter].includes(event.keyCode)) {
205
+ event.preventDefault();
206
+ event.stopPropagation();
207
+
208
+ if (typeof onClick === 'function' && interaction === 'enabled') {
209
+ onClick(event);
210
+ }
211
+
212
+ if (href) {
213
+ this.ref && this.ref.click();
214
+ }
215
+ }
216
+ };
217
+
203
218
  renderChildren() {
204
219
  const _this$props6 = this.props,
205
220
  renderIcon = _this$props6.renderIcon,
@@ -285,21 +300,6 @@ let BaseButton = (_dec = withStyle(generateStyles, generateComponentTheme), _dec
285
300
  }, this.renderChildren()));
286
301
  }
287
302
 
288
- }, _class2.displayName = "BaseButton", _class2.componentId = 'BaseButton', _class2.propTypes = propTypes, _class2.allowedProps = allowedProps, _class2.defaultProps = {
289
- type: 'button',
290
- size: 'medium',
291
- as: 'button',
292
- // Leave interaction default undefined so that `disabled` and `readOnly` can also be supplied
293
- interaction: void 0,
294
- color: 'secondary',
295
- shape: 'rectangle',
296
- display: 'inline-block',
297
- textAlign: 'start',
298
- withBackground: true,
299
- withBorder: true,
300
- isCondensed: false,
301
- margin: '0',
302
- cursor: 'pointer'
303
- }, _class2)) || _class) || _class);
303
+ }) || _class) || _class);
304
304
  export { BaseButton };
305
305
  export default BaseButton;
@@ -1,7 +1,7 @@
1
1
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
2
2
  const _excluded = ["children", "type", "size", "as", "color", "focusColor", "display", "textAlign", "withBackground", "margin", "cursor", "href", "renderIcon"];
3
3
 
4
- var _dec, _dec2, _class, _class2;
4
+ var _dec, _dec2, _class;
5
5
 
6
6
  /*
7
7
  * The MIT License (MIT)
@@ -41,25 +41,26 @@ category: components
41
41
  @tsProps
42
42
  **/
43
43
  // needed for listing the available theme variables on docs page
44
- let Button = (_dec = withStyle(null, generateComponentTheme), _dec2 = testable(), _dec(_class = _dec2(_class = (_class2 = class Button extends Component {
45
- constructor() {
46
- super(...arguments);
47
- this._buttonComponent = null;
48
- this.ref = null;
49
-
50
- this.handleElementRef = el => {
51
- const elementRef = this.props.elementRef;
52
- this.ref = el;
53
-
54
- if (typeof elementRef === 'function') {
55
- elementRef(el);
56
- }
57
- };
58
-
59
- this.handleButtonRef = component => {
60
- this._buttonComponent = component;
61
- };
62
- }
44
+ let Button = (_dec = withStyle(null, generateComponentTheme), _dec2 = testable(), _dec(_class = _dec2(_class = class Button extends Component {
45
+ static displayName = "Button";
46
+ static componentId = 'Button';
47
+ static propTypes = propTypes;
48
+ static allowedProps = allowedProps;
49
+ static defaultProps = {
50
+ type: 'button',
51
+ size: 'medium',
52
+ as: 'button',
53
+ // Leave interaction default undefined so that `disabled` and `readOnly` can also be supplied
54
+ interaction: void 0,
55
+ color: 'secondary',
56
+ display: 'inline-block',
57
+ textAlign: 'center',
58
+ withBackground: true,
59
+ margin: '0',
60
+ cursor: 'pointer'
61
+ };
62
+ _buttonComponent = null;
63
+ ref = null;
63
64
 
64
65
  get focused() {
65
66
  return this._buttonComponent && this._buttonComponent.focused;
@@ -69,6 +70,18 @@ let Button = (_dec = withStyle(null, generateComponentTheme), _dec2 = testable()
69
70
  this._buttonComponent && this._buttonComponent.focus();
70
71
  }
71
72
 
73
+ handleElementRef = el => {
74
+ const elementRef = this.props.elementRef;
75
+ this.ref = el;
76
+
77
+ if (typeof elementRef === 'function') {
78
+ elementRef(el);
79
+ }
80
+ };
81
+ handleButtonRef = component => {
82
+ this._buttonComponent = component;
83
+ };
84
+
72
85
  render() {
73
86
  const _this$props = this.props,
74
87
  children = _this$props.children,
@@ -111,18 +124,6 @@ let Button = (_dec = withStyle(null, generateComponentTheme), _dec2 = testable()
111
124
  return /*#__PURE__*/React.createElement(BaseButton, buttonProps, children);
112
125
  }
113
126
 
114
- }, _class2.displayName = "Button", _class2.componentId = 'Button', _class2.propTypes = propTypes, _class2.allowedProps = allowedProps, _class2.defaultProps = {
115
- type: 'button',
116
- size: 'medium',
117
- as: 'button',
118
- // Leave interaction default undefined so that `disabled` and `readOnly` can also be supplied
119
- interaction: void 0,
120
- color: 'secondary',
121
- display: 'inline-block',
122
- textAlign: 'center',
123
- withBackground: true,
124
- margin: '0',
125
- cursor: 'pointer'
126
- }, _class2)) || _class) || _class);
127
+ }) || _class) || _class);
127
128
  export default Button;
128
129
  export { Button };
@@ -1,7 +1,7 @@
1
1
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
2
2
  const _excluded = ["screenReaderLabel", "elementRef", "size", "onClick", "margin", "placement", "offset", "type", "as", "href", "cursor", "tabIndex", "styles"];
3
3
 
4
- var _dec, _dec2, _class, _class2;
4
+ var _dec, _dec2, _class;
5
5
 
6
6
  /*
7
7
  * The MIT License (MIT)
@@ -45,19 +45,30 @@ category: components
45
45
  ---
46
46
  @tsProps
47
47
  **/
48
- let CloseButton = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = testable(), _dec(_class = _dec2(_class = (_class2 = class CloseButton extends Component {
49
- constructor() {
50
- super(...arguments);
51
- this.ref = null;
48
+ let CloseButton = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = testable(), _dec(_class = _dec2(_class = class CloseButton extends Component {
49
+ static displayName = "CloseButton";
50
+ static componentId = 'CloseButton';
51
+ static propTypes = propTypes;
52
+ static allowedProps = allowedProps;
53
+ static defaultProps = {
54
+ // Leave interaction default undefined so that `disabled` and `readOnly` can also be supplied
55
+ interaction: void 0,
56
+ type: 'button',
57
+ placement: 'static',
58
+ offset: 'x-small',
59
+ size: 'small',
60
+ margin: '0',
61
+ as: 'button',
62
+ cursor: 'pointer'
63
+ };
64
+ ref = null;
65
+ handleRef = el => {
66
+ const elementRef = this.props.elementRef;
52
67
 
53
- this.handleRef = el => {
54
- const elementRef = this.props.elementRef;
55
-
56
- if (typeof elementRef === 'function') {
57
- elementRef(el);
58
- }
59
- };
60
- }
68
+ if (typeof elementRef === 'function') {
69
+ elementRef(el);
70
+ }
71
+ };
61
72
 
62
73
  componentDidMount() {
63
74
  var _this$props$makeStyle, _this$props;
@@ -120,16 +131,6 @@ let CloseButton = (_dec = withStyle(generateStyle, generateComponentTheme), _dec
120
131
  }, jsx(ScreenReaderContent, null, screenReaderLabel)));
121
132
  }
122
133
 
123
- }, _class2.displayName = "CloseButton", _class2.componentId = 'CloseButton', _class2.propTypes = propTypes, _class2.allowedProps = allowedProps, _class2.defaultProps = {
124
- // Leave interaction default undefined so that `disabled` and `readOnly` can also be supplied
125
- interaction: void 0,
126
- type: 'button',
127
- placement: 'static',
128
- offset: 'x-small',
129
- size: 'small',
130
- margin: '0',
131
- as: 'button',
132
- cursor: 'pointer'
133
- }, _class2)) || _class) || _class);
134
+ }) || _class) || _class);
134
135
  export default CloseButton;
135
136
  export { CloseButton };
@@ -1,7 +1,7 @@
1
1
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
2
2
  const _excluded = ["children", "type", "size", "elementRef", "as", "interaction", "color", "margin", "cursor", "href", "renderIcon"];
3
3
 
4
- var _dec, _dec2, _class, _class2;
4
+ var _dec, _dec2, _class;
5
5
 
6
6
  /*
7
7
  * The MIT License (MIT)
@@ -41,21 +41,31 @@ category: components
41
41
  @tsProps
42
42
  **/
43
43
  // needed for listing the available theme variables on docs page
44
- let CondensedButton = (_dec = withStyle(null, generateComponentTheme), _dec2 = testable(), _dec(_class = _dec2(_class = (_class2 = class CondensedButton extends Component {
45
- constructor() {
46
- super(...arguments);
47
- this._baseButton = null;
48
- this.ref = null;
44
+ let CondensedButton = (_dec = withStyle(null, generateComponentTheme), _dec2 = testable(), _dec(_class = _dec2(_class = class CondensedButton extends Component {
45
+ static displayName = "CondensedButton";
46
+ static componentId = 'CondensedButton';
47
+ static propTypes = propTypes;
48
+ static allowedProps = allowedProps;
49
+ static defaultProps = {
50
+ type: 'button',
51
+ size: 'medium',
52
+ as: 'button',
53
+ // Leave interaction default undefined so that `disabled` and `readOnly` can also be supplied
54
+ interaction: void 0,
55
+ color: 'primary',
56
+ margin: '0',
57
+ cursor: 'pointer'
58
+ };
59
+ _baseButton = null;
60
+ ref = null;
61
+ handleRef = el => {
62
+ const elementRef = this.props.elementRef;
63
+ this.ref = el;
49
64
 
50
- this.handleRef = el => {
51
- const elementRef = this.props.elementRef;
52
- this.ref = el;
53
-
54
- if (typeof elementRef === 'function') {
55
- elementRef(el);
56
- }
57
- };
58
- }
65
+ if (typeof elementRef === 'function') {
66
+ elementRef(el);
67
+ }
68
+ };
59
69
 
60
70
  get focused() {
61
71
  return this._baseButton && this._baseButton.focused;
@@ -102,15 +112,6 @@ let CondensedButton = (_dec = withStyle(null, generateComponentTheme), _dec2 = t
102
112
  }), children);
103
113
  }
104
114
 
105
- }, _class2.displayName = "CondensedButton", _class2.componentId = 'CondensedButton', _class2.propTypes = propTypes, _class2.allowedProps = allowedProps, _class2.defaultProps = {
106
- type: 'button',
107
- size: 'medium',
108
- as: 'button',
109
- // Leave interaction default undefined so that `disabled` and `readOnly` can also be supplied
110
- interaction: void 0,
111
- color: 'primary',
112
- margin: '0',
113
- cursor: 'pointer'
114
- }, _class2)) || _class) || _class);
115
+ }) || _class) || _class);
115
116
  export default CondensedButton;
116
117
  export { CondensedButton };
@@ -1,7 +1,7 @@
1
1
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
2
2
  const _excluded = ["children", "renderIcon", "screenReaderLabel", "type", "size", "elementRef", "as", "interaction", "color", "focusColor", "shape", "withBackground", "withBorder", "margin", "cursor", "href"];
3
3
 
4
- var _dec, _dec2, _class, _class2;
4
+ var _dec, _dec2, _class;
5
5
 
6
6
  /*
7
7
  * The MIT License (MIT)
@@ -42,21 +42,34 @@ category: components
42
42
  @tsProps
43
43
  **/
44
44
  // needed for listing the available theme variables on docs page
45
- let IconButton = (_dec = withStyle(null, generateComponentTheme), _dec2 = testable(), _dec(_class = _dec2(_class = (_class2 = class IconButton extends Component {
46
- constructor() {
47
- super(...arguments);
48
- this._baseButton = null;
49
- this.ref = null;
45
+ let IconButton = (_dec = withStyle(null, generateComponentTheme), _dec2 = testable(), _dec(_class = _dec2(_class = class IconButton extends Component {
46
+ static displayName = "IconButton";
47
+ static componentId = 'IconButton';
48
+ static propTypes = propTypes;
49
+ static allowedProps = allowedProps;
50
+ static defaultProps = {
51
+ type: 'button',
52
+ size: 'medium',
53
+ as: 'button',
54
+ // Leave interaction default undefined so that `disabled` and `readOnly` can also be supplied
55
+ interaction: void 0,
56
+ color: 'secondary',
57
+ shape: 'rectangle',
58
+ withBackground: true,
59
+ withBorder: true,
60
+ margin: '0',
61
+ cursor: 'pointer'
62
+ };
63
+ _baseButton = null;
64
+ ref = null;
65
+ handleRef = el => {
66
+ const elementRef = this.props.elementRef;
67
+ this.ref = el;
50
68
 
51
- this.handleRef = el => {
52
- const elementRef = this.props.elementRef;
53
- this.ref = el;
54
-
55
- if (typeof elementRef === 'function') {
56
- elementRef(el);
57
- }
58
- };
59
- }
69
+ if (typeof elementRef === 'function') {
70
+ elementRef(el);
71
+ }
72
+ };
60
73
 
61
74
  get focused() {
62
75
  return this._baseButton && this._baseButton.focused;
@@ -109,18 +122,6 @@ let IconButton = (_dec = withStyle(null, generateComponentTheme), _dec2 = testab
109
122
  }), /*#__PURE__*/React.createElement(ScreenReaderContent, null, screenReaderLabel));
110
123
  }
111
124
 
112
- }, _class2.displayName = "IconButton", _class2.componentId = 'IconButton', _class2.propTypes = propTypes, _class2.allowedProps = allowedProps, _class2.defaultProps = {
113
- type: 'button',
114
- size: 'medium',
115
- as: 'button',
116
- // Leave interaction default undefined so that `disabled` and `readOnly` can also be supplied
117
- interaction: void 0,
118
- color: 'secondary',
119
- shape: 'rectangle',
120
- withBackground: true,
121
- withBorder: true,
122
- margin: '0',
123
- cursor: 'pointer'
124
- }, _class2)) || _class) || _class);
125
+ }) || _class) || _class);
125
126
  export default IconButton;
126
127
  export { IconButton };
@@ -1,7 +1,7 @@
1
1
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
2
2
  const _excluded = ["as", "color", "elementRef", "size", "interaction", "mountNode", "renderIcon", "renderTooltipContent", "screenReaderLabel", "status", "placement", "onClick"];
3
3
 
4
- var _dec, _class, _class2;
4
+ var _dec, _class;
5
5
 
6
6
  /*
7
7
  * The MIT License (MIT)
@@ -39,24 +39,38 @@ category: components
39
39
  ---
40
40
  @tsProps
41
41
  **/
42
- let ToggleButton = (_dec = testable(), _dec(_class = (_class2 = class ToggleButton extends Component {
42
+ let ToggleButton = (_dec = testable(), _dec(_class = class ToggleButton extends Component {
43
+ static displayName = "ToggleButton";
44
+ static componentId = 'ToggleButton';
45
+ static propTypes = propTypes;
46
+ static allowedProps = allowedProps;
47
+ static defaultProps = {
48
+ size: 'medium',
49
+ as: 'button',
50
+ // Leave interaction default undefined so that `disabled` and `readOnly` can also be supplied
51
+ interaction: void 0,
52
+ mountNode: null,
53
+ color: 'secondary',
54
+ placement: 'top center',
55
+ constrain: 'window'
56
+ };
57
+
43
58
  constructor(props) {
44
59
  super(props);
45
- this.ref = null;
46
-
47
- this.handleRef = el => {
48
- const elementRef = this.props.elementRef;
49
-
50
- if (typeof elementRef === 'function') {
51
- elementRef(el);
52
- }
53
- };
54
-
55
60
  this.state = {
56
61
  isShowingTooltip: props.isShowingTooltip || false
57
62
  };
58
63
  }
59
64
 
65
+ ref = null;
66
+ handleRef = el => {
67
+ const elementRef = this.props.elementRef;
68
+
69
+ if (typeof elementRef === 'function') {
70
+ elementRef(el);
71
+ }
72
+ };
73
+
60
74
  get isShowingTooltip() {
61
75
  return typeof this.props.isShowingTooltip === 'undefined' ? this.state.isShowingTooltip : this.props.isShowingTooltip;
62
76
  }
@@ -109,15 +123,6 @@ let ToggleButton = (_dec = testable(), _dec(_class = (_class2 = class ToggleButt
109
123
  }), callRenderProp(renderIcon)));
110
124
  }
111
125
 
112
- }, _class2.displayName = "ToggleButton", _class2.componentId = 'ToggleButton', _class2.propTypes = propTypes, _class2.allowedProps = allowedProps, _class2.defaultProps = {
113
- size: 'medium',
114
- as: 'button',
115
- // Leave interaction default undefined so that `disabled` and `readOnly` can also be supplied
116
- interaction: void 0,
117
- mountNode: null,
118
- color: 'secondary',
119
- placement: 'top center',
120
- constrain: 'window'
121
- }, _class2)) || _class);
126
+ }) || _class);
122
127
  export { ToggleButton };
123
128
  export default ToggleButton;