@instructure/ui-checkbox 8.14.1-snapshot.7 → 8.15.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.
Files changed (50) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/es/Checkbox/CheckboxFacade/index.js +11 -6
  3. package/es/Checkbox/CheckboxFacade/props.js +0 -4
  4. package/es/Checkbox/CheckboxLocator.js +2 -1
  5. package/es/Checkbox/ToggleFacade/index.js +17 -12
  6. package/es/Checkbox/index.js +45 -43
  7. package/es/Checkbox/props.js +0 -29
  8. package/es/Checkbox/styles.js +1 -1
  9. package/es/CheckboxGroup/CheckboxGroupLocator.js +2 -1
  10. package/es/CheckboxGroup/index.js +16 -19
  11. package/lib/Checkbox/CheckboxFacade/index.js +11 -6
  12. package/lib/Checkbox/CheckboxFacade/props.js +0 -4
  13. package/lib/Checkbox/CheckboxLocator.js +1 -0
  14. package/lib/Checkbox/ToggleFacade/index.js +17 -12
  15. package/lib/Checkbox/index.js +47 -43
  16. package/lib/Checkbox/props.js +0 -29
  17. package/lib/Checkbox/styles.js +1 -1
  18. package/lib/CheckboxGroup/CheckboxGroupLocator.js +1 -0
  19. package/lib/CheckboxGroup/index.js +16 -19
  20. package/package.json +20 -20
  21. package/src/Checkbox/CheckboxFacade/index.tsx +4 -6
  22. package/src/Checkbox/CheckboxFacade/props.ts +3 -3
  23. package/src/Checkbox/ToggleFacade/index.tsx +4 -6
  24. package/src/Checkbox/ToggleFacade/props.ts +1 -0
  25. package/src/Checkbox/index.tsx +29 -54
  26. package/src/Checkbox/props.ts +36 -30
  27. package/src/Checkbox/styles.ts +2 -2
  28. package/src/CheckboxGroup/index.tsx +24 -40
  29. package/src/CheckboxGroup/props.ts +11 -5
  30. package/tsconfig.build.tsbuildinfo +1 -1
  31. package/types/Checkbox/CheckboxFacade/index.d.ts +2 -1
  32. package/types/Checkbox/CheckboxFacade/index.d.ts.map +1 -1
  33. package/types/Checkbox/CheckboxFacade/props.d.ts +3 -0
  34. package/types/Checkbox/CheckboxFacade/props.d.ts.map +1 -1
  35. package/types/Checkbox/CheckboxLocator.d.ts +4 -4
  36. package/types/Checkbox/ToggleFacade/index.d.ts +2 -1
  37. package/types/Checkbox/ToggleFacade/index.d.ts.map +1 -1
  38. package/types/Checkbox/ToggleFacade/props.d.ts +1 -1
  39. package/types/Checkbox/ToggleFacade/props.d.ts.map +1 -1
  40. package/types/Checkbox/index.d.ts +32 -29
  41. package/types/Checkbox/index.d.ts.map +1 -1
  42. package/types/Checkbox/props.d.ts +34 -8
  43. package/types/Checkbox/props.d.ts.map +1 -1
  44. package/types/Checkbox/styles.d.ts +2 -1
  45. package/types/Checkbox/styles.d.ts.map +1 -1
  46. package/types/CheckboxGroup/CheckboxGroupLocator.d.ts +4 -4
  47. package/types/CheckboxGroup/index.d.ts +16 -14
  48. package/types/CheckboxGroup/index.d.ts.map +1 -1
  49. package/types/CheckboxGroup/props.d.ts +11 -5
  50. package/types/CheckboxGroup/props.d.ts.map +1 -1
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.15.0](https://github.com/instructure/instructure-ui/compare/v8.14.0...v8.15.0) (2022-01-26)
7
+
8
+ **Note:** Version bump only for package @instructure/ui-checkbox
9
+
6
10
  # [8.14.0](https://github.com/instructure/instructure-ui/compare/v8.13.0...v8.14.0) (2021-12-16)
7
11
 
8
12
  **Note:** Version bump only for package @instructure/ui-checkbox
@@ -37,6 +37,7 @@ import { propTypes, allowedProps } from './props';
37
37
  ---
38
38
  parent: Checkbox
39
39
  ---
40
+ @tsProps
40
41
  **/
41
42
  let CheckboxFacade = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = (_temp = _class2 = class CheckboxFacade extends Component {
42
43
  constructor() {
@@ -49,11 +50,15 @@ let CheckboxFacade = (_dec = withStyle(generateStyle, generateComponentTheme), _
49
50
  }
50
51
 
51
52
  componentDidMount() {
52
- this.props.makeStyles();
53
+ var _this$props$makeStyle, _this$props;
54
+
55
+ (_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
53
56
  }
54
57
 
55
- componentDidUpdate(prevProps, prevState, snapshot) {
56
- this.props.makeStyles();
58
+ componentDidUpdate() {
59
+ var _this$props$makeStyle2, _this$props2;
60
+
61
+ (_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2);
57
62
  }
58
63
 
59
64
  renderIcon() {
@@ -77,9 +82,9 @@ let CheckboxFacade = (_dec = withStyle(generateStyle, generateComponentTheme), _
77
82
  }
78
83
 
79
84
  render() {
80
- const _this$props = this.props,
81
- children = _this$props.children,
82
- styles = _this$props.styles;
85
+ const _this$props3 = this.props,
86
+ children = _this$props3.children,
87
+ styles = _this$props3.styles;
83
88
  return jsx("span", {
84
89
  css: styles === null || styles === void 0 ? void 0 : styles.checkboxFacade,
85
90
  ref: this.handleRef
@@ -28,10 +28,6 @@ const propTypes = {
28
28
  focused: PropTypes.bool,
29
29
  hovered: PropTypes.bool,
30
30
  size: PropTypes.oneOf(['small', 'medium', 'large']),
31
-
32
- /**
33
- * Visual state showing that child checkboxes are a combination of checked and unchecked
34
- */
35
31
  indeterminate: PropTypes.bool
36
32
  };
37
33
  const allowedProps = ['children', 'checked', 'focused', 'hovered', 'size', 'indeterminate'];
@@ -22,5 +22,6 @@
22
22
  * SOFTWARE.
23
23
  */
24
24
  import { locator } from '@instructure/ui-test-locator';
25
- import { Checkbox } from './index';
25
+ import { Checkbox } from './index'; // @ts-expect-error ts-migrate(2339) FIXME: Property 'selector' does not exist on type 'typeof... Remove this comment to see the full error message
26
+
26
27
  export const CheckboxLocator = locator(Checkbox.selector);
@@ -36,6 +36,7 @@ import { propTypes, allowedProps } from './props';
36
36
  ---
37
37
  parent: Checkbox
38
38
  ---
39
+ @tsProps
39
40
  **/
40
41
  let ToggleFacade = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = (_temp = _class2 = class ToggleFacade extends Component {
41
42
  constructor() {
@@ -48,17 +49,21 @@ let ToggleFacade = (_dec = withStyle(generateStyle, generateComponentTheme), _de
48
49
  }
49
50
 
50
51
  componentDidMount() {
51
- this.props.makeStyles();
52
+ var _this$props$makeStyle, _this$props;
53
+
54
+ (_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
52
55
  }
53
56
 
54
- componentDidUpdate(prevProps, prevState, snapshot) {
55
- this.props.makeStyles();
57
+ componentDidUpdate() {
58
+ var _this$props$makeStyle2, _this$props2;
59
+
60
+ (_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2);
56
61
  }
57
62
 
58
63
  renderIcon() {
59
- const _this$props = this.props,
60
- styles = _this$props.styles,
61
- checked = _this$props.checked;
64
+ const _this$props3 = this.props,
65
+ styles = _this$props3.styles,
66
+ checked = _this$props3.checked;
62
67
 
63
68
  if (checked) {
64
69
  return jsx(IconCheckSolid, {
@@ -72,18 +77,18 @@ let ToggleFacade = (_dec = withStyle(generateStyle, generateComponentTheme), _de
72
77
  }
73
78
 
74
79
  renderLabel() {
75
- const _this$props2 = this.props,
76
- children = _this$props2.children,
77
- styles = _this$props2.styles;
80
+ const _this$props4 = this.props,
81
+ children = _this$props4.children,
82
+ styles = _this$props4.styles;
78
83
  return jsx("span", {
79
84
  css: styles === null || styles === void 0 ? void 0 : styles.label
80
85
  }, children);
81
86
  }
82
87
 
83
88
  render() {
84
- const _this$props3 = this.props,
85
- labelPlacement = _this$props3.labelPlacement,
86
- styles = _this$props3.styles;
89
+ const _this$props5 = this.props,
90
+ labelPlacement = _this$props5.labelPlacement,
91
+ styles = _this$props5.styles;
87
92
  return jsx("span", {
88
93
  css: styles === null || styles === void 0 ? void 0 : styles.toggleFacade,
89
94
  ref: this.handleRef
@@ -25,7 +25,7 @@ var _dec, _dec2, _class, _class2, _temp;
25
25
  */
26
26
 
27
27
  /** @jsx jsx */
28
- import { Component } from 'react';
28
+ import React, { Component } from 'react';
29
29
  import keycode from 'keycode';
30
30
  import { FormFieldMessages } from '@instructure/ui-form-field';
31
31
  import { createChainedFunction } from '@instructure/ui-utils';
@@ -46,10 +46,13 @@ import { propTypes, allowedProps } from './props';
46
46
  category: components
47
47
  tags: toggle, switch
48
48
  ---
49
+ @tsProps
49
50
  **/
50
51
  let Checkbox = (_dec = withStyle(generateStyle, null), _dec2 = testable(), _dec(_class = _dec2(_class = (_temp = _class2 = class Checkbox extends Component {
51
52
  constructor(props) {
52
53
  super(props);
54
+ this._defaultId = void 0;
55
+ this._input = null;
53
56
  this.ref = null;
54
57
 
55
58
  this.handleRef = el => {
@@ -80,32 +83,31 @@ let Checkbox = (_dec = withStyle(generateStyle, null), _dec2 = testable(), _dec(
80
83
  };
81
84
 
82
85
  this.handleKeyDown = e => {
83
- if (this.props.variant === 'toggle' && (e.keyCode === keycode.codes.enter || e.keyCode === keycode.codes.return)) {
84
- this._input.click();
85
-
86
+ if (this.props.variant === 'toggle' && e.keyCode === keycode.codes.enter) {
87
+ this._input && this._input.click();
86
88
  e.preventDefault();
87
89
  }
88
90
  };
89
91
 
90
- this.handleFocus = e => {
92
+ this.handleFocus = () => {
91
93
  this.setState({
92
94
  focused: true
93
95
  });
94
96
  };
95
97
 
96
- this.handleBlur = e => {
98
+ this.handleBlur = () => {
97
99
  this.setState({
98
100
  focused: false
99
101
  });
100
102
  };
101
103
 
102
- this.handleMouseOver = e => {
104
+ this.handleMouseOver = () => {
103
105
  this.setState({
104
106
  hovered: true
105
107
  });
106
108
  };
107
109
 
108
- this.handleMouseOut = e => {
110
+ this.handleMouseOut = () => {
109
111
  this.setState({
110
112
  hovered: false
111
113
  });
@@ -113,29 +115,30 @@ let Checkbox = (_dec = withStyle(generateStyle, null), _dec2 = testable(), _dec(
113
115
 
114
116
  this.state = {
115
117
  focused: false,
116
- hovered: false
118
+ hovered: false,
119
+ checked: typeof props.checked === 'undefined' ? !!props.defaultChecked : void 0
117
120
  };
118
-
119
- if (typeof props.checked === 'undefined') {
120
- this.state.checked = !!props.defaultChecked;
121
- }
122
-
123
121
  this._defaultId = uid('Checkbox');
124
122
  }
125
123
 
126
124
  componentDidMount() {
127
- // see https://github.com/facebook/react/issues/1798
128
- this._input.indeterminate = this.props.indeterminate;
129
- this.props.makeStyles();
125
+ var _this$props$makeStyle, _this$props2;
126
+
127
+ if (this._input) {
128
+ this._input.indeterminate = this.props.indeterminate;
129
+ }
130
+
131
+ (_this$props$makeStyle = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props2);
130
132
  }
131
133
 
132
134
  componentDidUpdate(prevProps) {
133
- // see https://github.com/facebook/react/issues/1798
134
- if (prevProps.indeterminate !== this.props.indeterminate) {
135
- this._input.indeterminate = this.props.indeterminate;
135
+ var _this$props$makeStyle2, _this$props3;
136
+
137
+ if (prevProps.indeterminate !== this.props.indeterminate && this._input) {
138
+ this._input.indeterminate = this.props.indeterminate || false;
136
139
  }
137
140
 
138
- this.props.makeStyles();
141
+ (_this$props$makeStyle2 = (_this$props3 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props3);
139
142
  }
140
143
 
141
144
  get id() {
@@ -155,15 +158,15 @@ let Checkbox = (_dec = withStyle(generateStyle, null), _dec2 = testable(), _dec(
155
158
  }
156
159
 
157
160
  renderFacade() {
158
- const _this$props2 = this.props,
159
- size = _this$props2.size,
160
- disabled = _this$props2.disabled,
161
- variant = _this$props2.variant,
162
- label = _this$props2.label,
163
- readOnly = _this$props2.readOnly,
164
- indeterminate = _this$props2.indeterminate,
165
- labelPlacement = _this$props2.labelPlacement,
166
- themeOverride = _this$props2.themeOverride;
161
+ const _this$props4 = this.props,
162
+ size = _this$props4.size,
163
+ disabled = _this$props4.disabled,
164
+ variant = _this$props4.variant,
165
+ label = _this$props4.label,
166
+ readOnly = _this$props4.readOnly,
167
+ indeterminate = _this$props4.indeterminate,
168
+ labelPlacement = _this$props4.labelPlacement,
169
+ themeOverride = _this$props4.themeOverride;
167
170
  const _this$state = this.state,
168
171
  hovered = _this$state.hovered,
169
172
  focused = _this$state.focused;
@@ -173,7 +176,6 @@ let Checkbox = (_dec = withStyle(generateStyle, null), _dec2 = testable(), _dec(
173
176
  return jsx(ToggleFacade, {
174
177
  disabled: disabled,
175
178
  size: size,
176
- hovered: hovered,
177
179
  focused: focused,
178
180
  checked: this.checked,
179
181
  readOnly: readOnly,
@@ -203,18 +205,18 @@ let Checkbox = (_dec = withStyle(generateStyle, null), _dec2 = testable(), _dec(
203
205
  }
204
206
 
205
207
  render() {
206
- const _this$props3 = this.props,
207
- disabled = _this$props3.disabled,
208
- readOnly = _this$props3.readOnly,
209
- value = _this$props3.value,
210
- onKeyDown = _this$props3.onKeyDown,
211
- onFocus = _this$props3.onFocus,
212
- onBlur = _this$props3.onBlur,
213
- onMouseOver = _this$props3.onMouseOver,
214
- onMouseOut = _this$props3.onMouseOut,
215
- indeterminate = _this$props3.indeterminate,
216
- variant = _this$props3.variant,
217
- styles = _this$props3.styles;
208
+ const _this$props5 = this.props,
209
+ disabled = _this$props5.disabled,
210
+ readOnly = _this$props5.readOnly,
211
+ value = _this$props5.value,
212
+ onKeyDown = _this$props5.onKeyDown,
213
+ onFocus = _this$props5.onFocus,
214
+ onBlur = _this$props5.onBlur,
215
+ onMouseOver = _this$props5.onMouseOver,
216
+ onMouseOut = _this$props5.onMouseOut,
217
+ indeterminate = _this$props5.indeterminate,
218
+ variant = _this$props5.variant,
219
+ styles = _this$props5.styles;
218
220
  const props = omitProps(this.props, Checkbox.allowedProps);
219
221
  error(!(variant === 'toggle' && indeterminate), `[Checkbox] The \`toggle\` variant does not support the \`indeterminate\` property. Use the \`simple\` variant instead.`);
220
222
  /* eslint-disable jsx-a11y/mouse-events-have-key-events */
@@ -28,46 +28,17 @@ const propTypes = {
28
28
  label: PropTypes.node.isRequired,
29
29
  id: PropTypes.string,
30
30
  value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
31
-
32
- /**
33
- * object with shape: `{
34
- * text: PropTypes.node,
35
- * type: PropTypes.oneOf(['error', 'hint', 'success', 'screenreader-only'])
36
- * }`
37
- */
38
31
  messages: PropTypes.arrayOf(FormPropTypes.message),
39
-
40
- /* whether to set the input to checked or not on initial render */
41
32
  defaultChecked: PropTypes.bool,
42
-
43
- /**
44
- * whether the input is checked or not (must be accompanied by an `onChange` prop)
45
- */
46
33
  checked: controllable(PropTypes.bool, 'onChange', 'defaultChecked'),
47
-
48
- /**
49
- * when used with the `checked` prop, the component will not control its own state
50
- */
51
34
  onChange: PropTypes.func,
52
35
  onKeyDown: PropTypes.func,
53
36
  onFocus: PropTypes.func,
54
37
  onBlur: PropTypes.func,
55
38
  onMouseOver: PropTypes.func,
56
39
  onMouseOut: PropTypes.func,
57
-
58
- /**
59
- * Whether or not to disable the checkbox
60
- */
61
40
  disabled: PropTypes.bool,
62
-
63
- /**
64
- * Works just like disabled but keeps the same styles as if it were active
65
- */
66
41
  readOnly: PropTypes.bool,
67
-
68
- /**
69
- * Visual state showing that child checkboxes are a combination of checked and unchecked
70
- */
71
42
  indeterminate: PropTypes.bool,
72
43
  size: PropTypes.oneOf(['small', 'medium', 'large']),
73
44
  variant: PropTypes.oneOf(['simple', 'toggle']),
@@ -32,7 +32,7 @@
32
32
  * @param {Object} state the state of the component, the style is applied to
33
33
  * @return {Object} The final style object, which will be used in the component
34
34
  */
35
- const generateStyle = (componentTheme, props) => {
35
+ const generateStyle = (_componentTheme, props) => {
36
36
  const inline = props.inline,
37
37
  disabled = props.disabled;
38
38
  return {
@@ -22,5 +22,6 @@
22
22
  * SOFTWARE.
23
23
  */
24
24
  import { locator } from '@instructure/ui-test-locator';
25
- import { CheckboxGroup } from './index';
25
+ import { CheckboxGroup } from './index'; // @ts-expect-error ts-migrate(2339) FIXME: Property 'selector' does not exist on type 'typeof... Remove this comment to see the full error message
26
+
26
27
  export const CheckboxGroupLocator = locator(CheckboxGroup.selector);
@@ -35,10 +35,12 @@ import { propTypes, allowedProps } from './props';
35
35
  ---
36
36
  category: components
37
37
  ---
38
+ @tsProps
38
39
  **/
39
40
  let CheckboxGroup = (_dec = testable(), _dec(_class = (_temp = _class2 = class CheckboxGroup extends Component {
40
41
  constructor(props) {
41
- super();
42
+ super(props);
43
+ this._messagesId = void 0;
42
44
  this.ref = null;
43
45
 
44
46
  this.handleRef = el => {
@@ -46,7 +48,7 @@ let CheckboxGroup = (_dec = testable(), _dec(_class = (_temp = _class2 = class C
46
48
  };
47
49
 
48
50
  this.handleChange = e => {
49
- const newValue = this.value || [];
51
+ const newValue = this.value;
50
52
 
51
53
  if (this.props.disabled || this.props.readOnly) {
52
54
  e.preventDefault();
@@ -72,7 +74,7 @@ let CheckboxGroup = (_dec = testable(), _dec(_class = (_temp = _class2 = class C
72
74
 
73
75
  if (typeof props.value === 'undefined') {
74
76
  this.state = {
75
- value: props.defaultValue
77
+ value: props.defaultValue || []
76
78
  };
77
79
  }
78
80
 
@@ -84,11 +86,7 @@ let CheckboxGroup = (_dec = testable(), _dec(_class = (_temp = _class2 = class C
84
86
  }
85
87
 
86
88
  get value() {
87
- if (typeof this.props.value === 'undefined' && typeof this.state.value === 'undefined') {
88
- return [];
89
- } else {
90
- return typeof this.props.value === 'undefined' ? [...this.state.value] : [...this.props.value];
91
- }
89
+ return typeof this.props.value === 'undefined' ? [...this.state.value] : [...this.props.value];
92
90
  }
93
91
 
94
92
  renderChildren() {
@@ -98,18 +96,19 @@ let CheckboxGroup = (_dec = testable(), _dec(_class = (_temp = _class2 = class C
98
96
  size = _this$props.size,
99
97
  disabled = _this$props.disabled,
100
98
  readOnly = _this$props.readOnly;
101
- return Children.map(children, (child, index) => {
99
+ return Children.map(children, child => {
102
100
  if (matchComponentTypes(child, [Checkbox])) {
103
101
  return safeCloneElement(child, {
104
102
  key: `${child.props.name}`,
105
103
  name,
104
+ label: child.props.label,
106
105
  disabled: disabled || child.props.disabled,
107
106
  readOnly: readOnly || child.props.readOnly,
108
107
  size,
109
108
  checked: this.value.indexOf(child.props.value) > -1,
110
109
  onChange: this.handleChange,
111
110
  width: child.props.width || 'auto',
112
- 'aria-describedby': this.hasMessages && this._messagesId
111
+ 'aria-describedby': this.hasMessages ? this._messagesId : void 0
113
112
  });
114
113
  } else {
115
114
  return child;
@@ -118,15 +117,13 @@ let CheckboxGroup = (_dec = testable(), _dec(_class = (_temp = _class2 = class C
118
117
  }
119
118
 
120
119
  render() {
121
- return (
122
- /*#__PURE__*/
123
- React.createElement(FormFieldGroup, Object.assign({}, omitProps(this.props, CheckboxGroup.allowedProps), pickProps(this.props, FormFieldGroup.allowedProps), {
124
- rowSpacing: "small",
125
- vAlign: "top",
126
- messagesId: this._messagesId,
127
- elementRef: this.handleRef
128
- }), this.renderChildren())
129
- );
120
+ return /*#__PURE__*/React.createElement(FormFieldGroup, Object.assign({}, omitProps(this.props, CheckboxGroup.allowedProps), pickProps(this.props, FormFieldGroup.allowedProps), {
121
+ description: this.props.description,
122
+ rowSpacing: "small",
123
+ vAlign: "top",
124
+ messagesId: this._messagesId,
125
+ elementRef: this.handleRef
126
+ }), this.renderChildren());
130
127
  }
131
128
 
132
129
  }, _class2.displayName = "CheckboxGroup", _class2.componentId = 'CheckboxGroup', _class2.propTypes = propTypes, _class2.allowedProps = allowedProps, _class2.defaultProps = {
@@ -27,6 +27,7 @@ var _dec, _class, _class2, _temp, _SVGIcon, _IconCheckMarkSolid;
27
27
  ---
28
28
  parent: Checkbox
29
29
  ---
30
+ @tsProps
30
31
  **/
31
32
  let CheckboxFacade = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = (_temp = _class2 = class CheckboxFacade extends _react.Component {
32
33
  constructor() {
@@ -39,11 +40,15 @@ let CheckboxFacade = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.def
39
40
  }
40
41
 
41
42
  componentDidMount() {
42
- 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);
43
46
  }
44
47
 
45
- componentDidUpdate(prevProps, prevState, snapshot) {
46
- this.props.makeStyles();
48
+ componentDidUpdate() {
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);
47
52
  }
48
53
 
49
54
  renderIcon() {
@@ -67,9 +72,9 @@ let CheckboxFacade = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.def
67
72
  }
68
73
 
69
74
  render() {
70
- const _this$props = this.props,
71
- children = _this$props.children,
72
- styles = _this$props.styles;
75
+ const _this$props3 = this.props,
76
+ children = _this$props3.children,
77
+ styles = _this$props3.styles;
73
78
  return (0, _emotion.jsx)("span", {
74
79
  css: styles === null || styles === void 0 ? void 0 : styles.checkboxFacade,
75
80
  ref: this.handleRef
@@ -38,10 +38,6 @@ const propTypes = {
38
38
  focused: _propTypes.default.bool,
39
39
  hovered: _propTypes.default.bool,
40
40
  size: _propTypes.default.oneOf(['small', 'medium', 'large']),
41
-
42
- /**
43
- * Visual state showing that child checkboxes are a combination of checked and unchecked
44
- */
45
41
  indeterminate: _propTypes.default.bool
46
42
  };
47
43
  exports.propTypes = propTypes;
@@ -32,5 +32,6 @@ var _index = require("./index");
32
32
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
33
33
  * SOFTWARE.
34
34
  */
35
+ // @ts-expect-error ts-migrate(2339) FIXME: Property 'selector' does not exist on type 'typeof... Remove this comment to see the full error message
35
36
  const CheckboxLocator = (0, _locator.locator)(_index.Checkbox.selector);
36
37
  exports.CheckboxLocator = CheckboxLocator;
@@ -27,6 +27,7 @@ var _dec, _class, _class2, _temp;
27
27
  ---
28
28
  parent: Checkbox
29
29
  ---
30
+ @tsProps
30
31
  **/
31
32
  let ToggleFacade = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = (_temp = _class2 = class ToggleFacade extends _react.Component {
32
33
  constructor() {
@@ -39,17 +40,21 @@ let ToggleFacade = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.defau
39
40
  }
40
41
 
41
42
  componentDidMount() {
42
- 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);
43
46
  }
44
47
 
45
- componentDidUpdate(prevProps, prevState, snapshot) {
46
- this.props.makeStyles();
48
+ componentDidUpdate() {
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);
47
52
  }
48
53
 
49
54
  renderIcon() {
50
- const _this$props = this.props,
51
- styles = _this$props.styles,
52
- checked = _this$props.checked;
55
+ const _this$props3 = this.props,
56
+ styles = _this$props3.styles,
57
+ checked = _this$props3.checked;
53
58
 
54
59
  if (checked) {
55
60
  return (0, _emotion.jsx)(_IconCheckSolid.IconCheckSolid, {
@@ -63,18 +68,18 @@ let ToggleFacade = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.defau
63
68
  }
64
69
 
65
70
  renderLabel() {
66
- const _this$props2 = this.props,
67
- children = _this$props2.children,
68
- styles = _this$props2.styles;
71
+ const _this$props4 = this.props,
72
+ children = _this$props4.children,
73
+ styles = _this$props4.styles;
69
74
  return (0, _emotion.jsx)("span", {
70
75
  css: styles === null || styles === void 0 ? void 0 : styles.label
71
76
  }, children);
72
77
  }
73
78
 
74
79
  render() {
75
- const _this$props3 = this.props,
76
- labelPlacement = _this$props3.labelPlacement,
77
- styles = _this$props3.styles;
80
+ const _this$props5 = this.props,
81
+ labelPlacement = _this$props5.labelPlacement,
82
+ styles = _this$props5.styles;
78
83
  return (0, _emotion.jsx)("span", {
79
84
  css: styles === null || styles === void 0 ? void 0 : styles.toggleFacade,
80
85
  ref: this.handleRef