@instructure/ui-checkbox 8.17.1-snapshot.21 → 8.17.1-snapshot.71

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.
@@ -141,23 +141,19 @@ let Checkbox = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec2 =
141
141
  }
142
142
 
143
143
  componentDidMount() {
144
- var _this$props$makeStyle, _this$props2;
145
-
146
144
  if (this._input) {
147
145
  this._input.indeterminate = this.props.indeterminate;
148
146
  }
149
147
 
150
- (_this$props$makeStyle = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props2);
148
+ this.props.makeStyles?.();
151
149
  }
152
150
 
153
151
  componentDidUpdate(prevProps) {
154
- var _this$props$makeStyle2, _this$props3;
155
-
156
152
  if (prevProps.indeterminate !== this.props.indeterminate && this._input) {
157
153
  this._input.indeterminate = this.props.indeterminate || false;
158
154
  }
159
155
 
160
- (_this$props$makeStyle2 = (_this$props3 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props3);
156
+ this.props.makeStyles?.();
161
157
  }
162
158
 
163
159
  get id() {
@@ -177,15 +173,15 @@ let Checkbox = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec2 =
177
173
  }
178
174
 
179
175
  renderFacade() {
180
- const _this$props4 = this.props,
181
- size = _this$props4.size,
182
- disabled = _this$props4.disabled,
183
- variant = _this$props4.variant,
184
- label = _this$props4.label,
185
- readOnly = _this$props4.readOnly,
186
- indeterminate = _this$props4.indeterminate,
187
- labelPlacement = _this$props4.labelPlacement,
188
- themeOverride = _this$props4.themeOverride;
176
+ const _this$props2 = this.props,
177
+ size = _this$props2.size,
178
+ disabled = _this$props2.disabled,
179
+ variant = _this$props2.variant,
180
+ label = _this$props2.label,
181
+ readOnly = _this$props2.readOnly,
182
+ indeterminate = _this$props2.indeterminate,
183
+ labelPlacement = _this$props2.labelPlacement,
184
+ themeOverride = _this$props2.themeOverride;
189
185
  const _this$state = this.state,
190
186
  hovered = _this$state.hovered,
191
187
  focused = _this$state.focused;
@@ -224,24 +220,24 @@ let Checkbox = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec2 =
224
220
  }
225
221
 
226
222
  render() {
227
- const _this$props5 = this.props,
228
- disabled = _this$props5.disabled,
229
- readOnly = _this$props5.readOnly,
230
- value = _this$props5.value,
231
- onKeyDown = _this$props5.onKeyDown,
232
- onFocus = _this$props5.onFocus,
233
- onBlur = _this$props5.onBlur,
234
- onMouseOver = _this$props5.onMouseOver,
235
- onMouseOut = _this$props5.onMouseOut,
236
- indeterminate = _this$props5.indeterminate,
237
- variant = _this$props5.variant,
238
- styles = _this$props5.styles;
223
+ const _this$props3 = this.props,
224
+ disabled = _this$props3.disabled,
225
+ readOnly = _this$props3.readOnly,
226
+ value = _this$props3.value,
227
+ onKeyDown = _this$props3.onKeyDown,
228
+ onFocus = _this$props3.onFocus,
229
+ onBlur = _this$props3.onBlur,
230
+ onMouseOver = _this$props3.onMouseOver,
231
+ onMouseOut = _this$props3.onMouseOut,
232
+ indeterminate = _this$props3.indeterminate,
233
+ variant = _this$props3.variant,
234
+ styles = _this$props3.styles;
239
235
  const props = (0, _omitProps.omitProps)(this.props, Checkbox.allowedProps);
240
236
  (0, _console.logError)(!(variant === 'toggle' && indeterminate), `[Checkbox] The \`toggle\` variant does not support the \`indeterminate\` property. Use the \`simple\` variant instead.`);
241
237
  /* eslint-disable jsx-a11y/mouse-events-have-key-events */
242
238
 
243
239
  return (0, _emotion.jsx)("div", {
244
- css: styles === null || styles === void 0 ? void 0 : styles.checkbox,
240
+ css: styles?.checkbox,
245
241
  onMouseOver: (0, _createChainedFunction.createChainedFunction)(onMouseOver, this.handleMouseOver),
246
242
  onMouseOut: (0, _createChainedFunction.createChainedFunction)(onMouseOut, this.handleMouseOut),
247
243
  ref: this.handleRef
@@ -254,7 +250,7 @@ let Checkbox = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec2 =
254
250
  },
255
251
  disabled: disabled || readOnly,
256
252
  "aria-checked": indeterminate ? 'mixed' : void 0,
257
- css: styles === null || styles === void 0 ? void 0 : styles.input,
253
+ css: styles?.input,
258
254
  onChange: this.handleChange,
259
255
  onKeyDown: (0, _createChainedFunction.createChainedFunction)(onKeyDown, this.handleKeyDown),
260
256
  onFocus: (0, _createChainedFunction.createChainedFunction)(onFocus, this.handleFocus),
@@ -262,7 +258,7 @@ let Checkbox = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec2 =
262
258
  checked: this.checked
263
259
  })), (0, _emotion.jsx)("label", {
264
260
  htmlFor: this.id,
265
- css: styles === null || styles === void 0 ? void 0 : styles.control
261
+ css: styles?.control
266
262
  }, this.renderFacade(), this.renderMessages()));
267
263
  /* eslint-enable jsx-a11y/mouse-events-have-key-events */
268
264
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-checkbox",
3
- "version": "8.17.1-snapshot.21+79d490548",
3
+ "version": "8.17.1-snapshot.71+34dfb2442",
4
4
  "description": " styled HTML input type='checkbox' component.",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "module": "./es/index.js",
@@ -24,28 +24,28 @@
24
24
  "license": "MIT",
25
25
  "dependencies": {
26
26
  "@babel/runtime": "^7.13.10",
27
- "@instructure/console": "8.17.1-snapshot.21+79d490548",
28
- "@instructure/emotion": "8.17.1-snapshot.21+79d490548",
29
- "@instructure/shared-types": "8.17.1-snapshot.21+79d490548",
30
- "@instructure/ui-dom-utils": "8.17.1-snapshot.21+79d490548",
31
- "@instructure/ui-form-field": "8.17.1-snapshot.21+79d490548",
32
- "@instructure/ui-icons": "8.17.1-snapshot.21+79d490548",
33
- "@instructure/ui-prop-types": "8.17.1-snapshot.21+79d490548",
34
- "@instructure/ui-react-utils": "8.17.1-snapshot.21+79d490548",
35
- "@instructure/ui-svg-images": "8.17.1-snapshot.21+79d490548",
36
- "@instructure/ui-testable": "8.17.1-snapshot.21+79d490548",
37
- "@instructure/ui-utils": "8.17.1-snapshot.21+79d490548",
38
- "@instructure/ui-view": "8.17.1-snapshot.21+79d490548",
39
- "@instructure/uid": "8.17.1-snapshot.21+79d490548",
27
+ "@instructure/console": "8.17.1-snapshot.71+34dfb2442",
28
+ "@instructure/emotion": "8.17.1-snapshot.71+34dfb2442",
29
+ "@instructure/shared-types": "8.17.1-snapshot.71+34dfb2442",
30
+ "@instructure/ui-dom-utils": "8.17.1-snapshot.71+34dfb2442",
31
+ "@instructure/ui-form-field": "8.17.1-snapshot.71+34dfb2442",
32
+ "@instructure/ui-icons": "8.17.1-snapshot.71+34dfb2442",
33
+ "@instructure/ui-prop-types": "8.17.1-snapshot.71+34dfb2442",
34
+ "@instructure/ui-react-utils": "8.17.1-snapshot.71+34dfb2442",
35
+ "@instructure/ui-svg-images": "8.17.1-snapshot.71+34dfb2442",
36
+ "@instructure/ui-testable": "8.17.1-snapshot.71+34dfb2442",
37
+ "@instructure/ui-utils": "8.17.1-snapshot.71+34dfb2442",
38
+ "@instructure/ui-view": "8.17.1-snapshot.71+34dfb2442",
39
+ "@instructure/uid": "8.17.1-snapshot.71+34dfb2442",
40
40
  "keycode": "^2",
41
41
  "prop-types": "^15"
42
42
  },
43
43
  "devDependencies": {
44
- "@instructure/ui-babel-preset": "8.17.1-snapshot.21+79d490548",
45
- "@instructure/ui-color-utils": "8.17.1-snapshot.21+79d490548",
46
- "@instructure/ui-test-locator": "8.17.1-snapshot.21+79d490548",
47
- "@instructure/ui-test-utils": "8.17.1-snapshot.21+79d490548",
48
- "@instructure/ui-themes": "8.17.1-snapshot.21+79d490548"
44
+ "@instructure/ui-babel-preset": "8.17.1-snapshot.71+34dfb2442",
45
+ "@instructure/ui-color-utils": "8.17.1-snapshot.71+34dfb2442",
46
+ "@instructure/ui-test-locator": "8.17.1-snapshot.71+34dfb2442",
47
+ "@instructure/ui-test-utils": "8.17.1-snapshot.71+34dfb2442",
48
+ "@instructure/ui-themes": "8.17.1-snapshot.71+34dfb2442"
49
49
  },
50
50
  "peerDependencies": {
51
51
  "react": ">=16.8 <=17"
@@ -54,5 +54,5 @@
54
54
  "access": "public"
55
55
  },
56
56
  "sideEffects": false,
57
- "gitHead": "79d490548a0736feb2a7232bf5918857317b178b"
57
+ "gitHead": "34dfb2442c7ddce048d78ab1ecd5f3cbb78ee8d6"
58
58
  }