@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.
- package/es/Checkbox/CheckboxFacade/index.js +8 -12
- package/es/Checkbox/CheckboxFacade/theme.js +21 -21
- package/es/Checkbox/ToggleFacade/index.js +18 -22
- package/es/Checkbox/ToggleFacade/theme.js +25 -25
- package/es/Checkbox/index.js +26 -30
- package/lib/Checkbox/CheckboxFacade/index.js +8 -12
- package/lib/Checkbox/CheckboxFacade/theme.js +21 -21
- package/lib/Checkbox/ToggleFacade/index.js +18 -22
- package/lib/Checkbox/ToggleFacade/theme.js +25 -25
- package/lib/Checkbox/index.js +26 -30
- package/package.json +20 -20
- package/tsconfig.build.tsbuildinfo +1 -1
package/lib/Checkbox/index.js
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
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$
|
|
181
|
-
size = _this$
|
|
182
|
-
disabled = _this$
|
|
183
|
-
variant = _this$
|
|
184
|
-
label = _this$
|
|
185
|
-
readOnly = _this$
|
|
186
|
-
indeterminate = _this$
|
|
187
|
-
labelPlacement = _this$
|
|
188
|
-
themeOverride = _this$
|
|
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$
|
|
228
|
-
disabled = _this$
|
|
229
|
-
readOnly = _this$
|
|
230
|
-
value = _this$
|
|
231
|
-
onKeyDown = _this$
|
|
232
|
-
onFocus = _this$
|
|
233
|
-
onBlur = _this$
|
|
234
|
-
onMouseOver = _this$
|
|
235
|
-
onMouseOut = _this$
|
|
236
|
-
indeterminate = _this$
|
|
237
|
-
variant = _this$
|
|
238
|
-
styles = _this$
|
|
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
|
|
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
|
|
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
|
|
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.
|
|
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.
|
|
28
|
-
"@instructure/emotion": "8.17.1-snapshot.
|
|
29
|
-
"@instructure/shared-types": "8.17.1-snapshot.
|
|
30
|
-
"@instructure/ui-dom-utils": "8.17.1-snapshot.
|
|
31
|
-
"@instructure/ui-form-field": "8.17.1-snapshot.
|
|
32
|
-
"@instructure/ui-icons": "8.17.1-snapshot.
|
|
33
|
-
"@instructure/ui-prop-types": "8.17.1-snapshot.
|
|
34
|
-
"@instructure/ui-react-utils": "8.17.1-snapshot.
|
|
35
|
-
"@instructure/ui-svg-images": "8.17.1-snapshot.
|
|
36
|
-
"@instructure/ui-testable": "8.17.1-snapshot.
|
|
37
|
-
"@instructure/ui-utils": "8.17.1-snapshot.
|
|
38
|
-
"@instructure/ui-view": "8.17.1-snapshot.
|
|
39
|
-
"@instructure/uid": "8.17.1-snapshot.
|
|
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.
|
|
45
|
-
"@instructure/ui-color-utils": "8.17.1-snapshot.
|
|
46
|
-
"@instructure/ui-test-locator": "8.17.1-snapshot.
|
|
47
|
-
"@instructure/ui-test-utils": "8.17.1-snapshot.
|
|
48
|
-
"@instructure/ui-themes": "8.17.1-snapshot.
|
|
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": "
|
|
57
|
+
"gitHead": "34dfb2442c7ddce048d78ab1ecd5f3cbb78ee8d6"
|
|
58
58
|
}
|