@instructure/ui-checkbox 10.16.1-snapshot-0 → 10.16.1-snapshot-1

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 (41) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/es/Checkbox/CheckboxFacade/__new-tests__/CheckboxFacade.test.js +7 -3
  3. package/es/Checkbox/CheckboxFacade/index.js +23 -19
  4. package/es/Checkbox/ToggleFacade/__new-tests__/ToggleFacade.test.js +7 -3
  5. package/es/Checkbox/ToggleFacade/index.js +22 -17
  6. package/es/Checkbox/__new-tests__/Checkbox.test.js +10 -6
  7. package/es/Checkbox/index.js +53 -44
  8. package/es/CheckboxGroup/__new-tests__/CheckboxGroup.test.js +11 -8
  9. package/es/CheckboxGroup/index.js +8 -4
  10. package/lib/Checkbox/CheckboxFacade/__new-tests__/CheckboxFacade.test.js +9 -6
  11. package/lib/Checkbox/CheckboxFacade/index.js +22 -18
  12. package/lib/Checkbox/ToggleFacade/__new-tests__/ToggleFacade.test.js +9 -6
  13. package/lib/Checkbox/ToggleFacade/index.js +21 -16
  14. package/lib/Checkbox/__new-tests__/Checkbox.test.js +10 -6
  15. package/lib/Checkbox/index.js +52 -44
  16. package/lib/CheckboxGroup/__new-tests__/CheckboxGroup.test.js +29 -26
  17. package/lib/CheckboxGroup/index.js +8 -5
  18. package/package.json +19 -19
  19. package/src/Checkbox/CheckboxFacade/__new-tests__/CheckboxFacade.test.tsx +0 -1
  20. package/src/Checkbox/CheckboxFacade/index.tsx +1 -2
  21. package/src/Checkbox/ToggleFacade/__new-tests__/ToggleFacade.test.tsx +0 -1
  22. package/src/Checkbox/ToggleFacade/index.tsx +1 -2
  23. package/src/Checkbox/__new-tests__/Checkbox.test.tsx +2 -2
  24. package/src/Checkbox/index.tsx +2 -3
  25. package/src/CheckboxGroup/__new-tests__/CheckboxGroup.test.tsx +0 -1
  26. package/src/CheckboxGroup/index.tsx +1 -1
  27. package/src/CheckboxGroup/props.ts +1 -1
  28. package/tsconfig.build.tsbuildinfo +1 -1
  29. package/types/Checkbox/CheckboxFacade/__new-tests__/CheckboxFacade.test.d.ts.map +1 -1
  30. package/types/Checkbox/CheckboxFacade/index.d.ts +2 -4
  31. package/types/Checkbox/CheckboxFacade/index.d.ts.map +1 -1
  32. package/types/Checkbox/ToggleFacade/__new-tests__/ToggleFacade.test.d.ts.map +1 -1
  33. package/types/Checkbox/ToggleFacade/index.d.ts +3 -5
  34. package/types/Checkbox/ToggleFacade/index.d.ts.map +1 -1
  35. package/types/Checkbox/index.d.ts +4 -6
  36. package/types/Checkbox/index.d.ts.map +1 -1
  37. package/types/CheckboxGroup/__new-tests__/CheckboxGroup.test.d.ts.map +1 -1
  38. package/types/CheckboxGroup/index.d.ts +2 -2
  39. package/types/CheckboxGroup/index.d.ts.map +1 -1
  40. package/types/CheckboxGroup/props.d.ts +1 -1
  41. package/types/CheckboxGroup/props.d.ts.map +1 -1
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
- ## [10.16.1-snapshot-0](https://github.com/instructure/instructure-ui/compare/v10.16.0...v10.16.1-snapshot-0) (2025-04-15)
6
+ ## [10.16.1-snapshot-1](https://github.com/instructure/instructure-ui/compare/v10.16.0...v10.16.1-snapshot-1) (2025-04-22)
7
7
 
8
8
  **Note:** Version bump only for package @instructure/ui-checkbox
9
9
 
@@ -23,12 +23,12 @@ var _CheckboxFacade, _CheckboxFacade2;
23
23
  * SOFTWARE.
24
24
  */
25
25
 
26
- import React from 'react';
27
26
  import { render, screen } from '@testing-library/react';
28
27
  import { vi } from 'vitest';
29
28
  import '@testing-library/jest-dom';
30
29
  import { runAxeCheck } from '@instructure/ui-axe-check';
31
30
  import { CheckboxFacade } from '../index';
31
+ import { jsx as _jsx } from "@emotion/react/jsx-runtime";
32
32
  const TEST_TEXT = 'test-text';
33
33
  describe('<CheckboxFacade />', () => {
34
34
  let consoleWarningMock;
@@ -43,12 +43,16 @@ describe('<CheckboxFacade />', () => {
43
43
  consoleErrorMock.mockRestore();
44
44
  });
45
45
  it('should render', () => {
46
- render(_CheckboxFacade || (_CheckboxFacade = /*#__PURE__*/React.createElement(CheckboxFacade, null, TEST_TEXT)));
46
+ render(_CheckboxFacade || (_CheckboxFacade = _jsx(CheckboxFacade, {
47
+ children: TEST_TEXT
48
+ })));
47
49
  const facade = screen.getByText(TEST_TEXT);
48
50
  expect(facade).toBeInTheDocument();
49
51
  });
50
52
  it('should meet a11y standards', async () => {
51
- const _render = render(_CheckboxFacade2 || (_CheckboxFacade2 = /*#__PURE__*/React.createElement(CheckboxFacade, null, TEST_TEXT))),
53
+ const _render = render(_CheckboxFacade2 || (_CheckboxFacade2 = _jsx(CheckboxFacade, {
54
+ children: TEST_TEXT
55
+ }))),
52
56
  container = _render.container;
53
57
  const axeCheck = await runAxeCheck(container);
54
58
  expect(axeCheck).toBe(true);
@@ -23,14 +23,14 @@ var _dec, _class, _CheckboxFacade, _SVGIcon, _IconCheckMarkSolid;
23
23
  * SOFTWARE.
24
24
  */
25
25
 
26
- /** @jsx jsx */
27
26
  import { Component } from 'react';
28
27
  import { SVGIcon } from '@instructure/ui-svg-images';
29
28
  import { IconCheckMarkSolid } from '@instructure/ui-icons';
30
- import { withStyle, jsx } from '@instructure/emotion';
29
+ import { withStyle } from '@instructure/emotion';
31
30
  import generateStyle from './styles';
32
31
  import generateComponentTheme from './theme';
33
32
  import { propTypes, allowedProps } from './props';
33
+ import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
34
34
  /**
35
35
  ---
36
36
  parent: Checkbox
@@ -54,17 +54,18 @@ let CheckboxFacade = (_dec = withStyle(generateStyle, generateComponentTheme), _
54
54
  }
55
55
  renderIcon() {
56
56
  if (this.props.indeterminate) {
57
- return _SVGIcon || (_SVGIcon = jsx(SVGIcon, {
57
+ return _SVGIcon || (_SVGIcon = _jsx(SVGIcon, {
58
58
  viewBox: "0 0 1920 1920",
59
- inline: false
60
- }, jsx("rect", {
61
- x: "140",
62
- y: "820",
63
- width: "1640",
64
- height: "280"
65
- })));
59
+ inline: false,
60
+ children: _jsx("rect", {
61
+ x: "140",
62
+ y: "820",
63
+ width: "1640",
64
+ height: "280"
65
+ })
66
+ }));
66
67
  } else if (this.props.checked) {
67
- return _IconCheckMarkSolid || (_IconCheckMarkSolid = jsx(IconCheckMarkSolid, {
68
+ return _IconCheckMarkSolid || (_IconCheckMarkSolid = _jsx(IconCheckMarkSolid, {
68
69
  inline: false
69
70
  }));
70
71
  } else {
@@ -75,15 +76,18 @@ let CheckboxFacade = (_dec = withStyle(generateStyle, generateComponentTheme), _
75
76
  const _this$props3 = this.props,
76
77
  children = _this$props3.children,
77
78
  styles = _this$props3.styles;
78
- return jsx("span", {
79
+ return _jsxs("span", {
79
80
  css: styles === null || styles === void 0 ? void 0 : styles.checkboxFacade,
80
- ref: this.handleRef
81
- }, jsx("span", {
82
- css: styles === null || styles === void 0 ? void 0 : styles.facade,
83
- "aria-hidden": "true"
84
- }, this.renderIcon()), jsx("span", {
85
- css: styles === null || styles === void 0 ? void 0 : styles.label
86
- }, children));
81
+ ref: this.handleRef,
82
+ children: [_jsx("span", {
83
+ css: styles === null || styles === void 0 ? void 0 : styles.facade,
84
+ "aria-hidden": "true",
85
+ children: this.renderIcon()
86
+ }), _jsx("span", {
87
+ css: styles === null || styles === void 0 ? void 0 : styles.label,
88
+ children: children
89
+ })]
90
+ });
87
91
  }
88
92
  }, _CheckboxFacade.displayName = "CheckboxFacade", _CheckboxFacade.componentId = 'CheckboxFacade', _CheckboxFacade.propTypes = propTypes, _CheckboxFacade.allowedProps = allowedProps, _CheckboxFacade.defaultProps = {
89
93
  checked: false,
@@ -23,12 +23,12 @@ var _ToggleFacade, _ToggleFacade2;
23
23
  * SOFTWARE.
24
24
  */
25
25
 
26
- import React from 'react';
27
26
  import { render, screen } from '@testing-library/react';
28
27
  import { vi } from 'vitest';
29
28
  import '@testing-library/jest-dom';
30
29
  import { runAxeCheck } from '@instructure/ui-axe-check';
31
30
  import { ToggleFacade } from '../index';
31
+ import { jsx as _jsx } from "@emotion/react/jsx-runtime";
32
32
  const TEST_TEXT = 'test-text';
33
33
  describe('<ToggleFacade />', () => {
34
34
  let consoleWarningMock;
@@ -43,12 +43,16 @@ describe('<ToggleFacade />', () => {
43
43
  consoleErrorMock.mockRestore();
44
44
  });
45
45
  it('should render', () => {
46
- render(_ToggleFacade || (_ToggleFacade = /*#__PURE__*/React.createElement(ToggleFacade, null, TEST_TEXT)));
46
+ render(_ToggleFacade || (_ToggleFacade = _jsx(ToggleFacade, {
47
+ children: TEST_TEXT
48
+ })));
47
49
  const facade = screen.getByText(TEST_TEXT);
48
50
  expect(facade).toBeInTheDocument();
49
51
  });
50
52
  it('should meet a11y standards', async () => {
51
- const _render = render(_ToggleFacade2 || (_ToggleFacade2 = /*#__PURE__*/React.createElement(ToggleFacade, null, TEST_TEXT))),
53
+ const _render = render(_ToggleFacade2 || (_ToggleFacade2 = _jsx(ToggleFacade, {
54
+ children: TEST_TEXT
55
+ }))),
52
56
  container = _render.container;
53
57
  const axeCheck = await runAxeCheck(container);
54
58
  expect(axeCheck).toBe(true);
@@ -23,13 +23,13 @@ var _dec, _class, _ToggleFacade;
23
23
  * SOFTWARE.
24
24
  */
25
25
 
26
- /** @jsx jsx */
27
26
  import { Component } from 'react';
28
27
  import { IconCheckSolid, IconXSolid } from '@instructure/ui-icons';
29
- import { withStyle, jsx } from '@instructure/emotion';
28
+ import { withStyle } from '@instructure/emotion';
30
29
  import generateStyle from './styles';
31
30
  import generateComponentTheme from './theme';
32
31
  import { propTypes, allowedProps } from './props';
32
+ import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
33
33
  /**
34
34
  ---
35
35
  parent: Checkbox
@@ -56,11 +56,11 @@ let ToggleFacade = (_dec = withStyle(generateStyle, generateComponentTheme), _de
56
56
  styles = _this$props3.styles,
57
57
  checked = _this$props3.checked;
58
58
  if (checked) {
59
- return jsx(IconCheckSolid, {
59
+ return _jsx(IconCheckSolid, {
60
60
  css: styles === null || styles === void 0 ? void 0 : styles.iconSVG
61
61
  });
62
62
  } else {
63
- return jsx(IconXSolid, {
63
+ return _jsx(IconXSolid, {
64
64
  css: styles === null || styles === void 0 ? void 0 : styles.iconSVG
65
65
  });
66
66
  }
@@ -69,25 +69,30 @@ let ToggleFacade = (_dec = withStyle(generateStyle, generateComponentTheme), _de
69
69
  const _this$props4 = this.props,
70
70
  children = _this$props4.children,
71
71
  styles = _this$props4.styles;
72
- return jsx("span", {
73
- css: styles === null || styles === void 0 ? void 0 : styles.label
74
- }, children);
72
+ return _jsx("span", {
73
+ css: styles === null || styles === void 0 ? void 0 : styles.label,
74
+ children: children
75
+ });
75
76
  }
76
77
  render() {
77
78
  const _this$props5 = this.props,
78
79
  labelPlacement = _this$props5.labelPlacement,
79
80
  styles = _this$props5.styles;
80
- return jsx("span", {
81
+ return _jsxs("span", {
81
82
  css: styles === null || styles === void 0 ? void 0 : styles.toggleFacade,
82
- ref: this.handleRef
83
- }, (labelPlacement === 'top' || labelPlacement === 'start') && this.renderLabel(), jsx("span", {
84
- css: styles === null || styles === void 0 ? void 0 : styles.facade,
85
- "aria-hidden": "true"
86
- }, jsx("span", {
87
- css: styles === null || styles === void 0 ? void 0 : styles.icon
88
- }, jsx("span", {
89
- css: styles === null || styles === void 0 ? void 0 : styles.iconToggle
90
- }, this.renderIcon()))), labelPlacement === 'end' && this.renderLabel());
83
+ ref: this.handleRef,
84
+ children: [(labelPlacement === 'top' || labelPlacement === 'start') && this.renderLabel(), _jsx("span", {
85
+ css: styles === null || styles === void 0 ? void 0 : styles.facade,
86
+ "aria-hidden": "true",
87
+ children: _jsx("span", {
88
+ css: styles === null || styles === void 0 ? void 0 : styles.icon,
89
+ children: _jsx("span", {
90
+ css: styles === null || styles === void 0 ? void 0 : styles.iconToggle,
91
+ children: this.renderIcon()
92
+ })
93
+ })
94
+ }), labelPlacement === 'end' && this.renderLabel()]
95
+ });
91
96
  }
92
97
  }, _ToggleFacade.displayName = "ToggleFacade", _ToggleFacade.componentId = 'ToggleFacade', _ToggleFacade.propTypes = propTypes, _ToggleFacade.allowedProps = allowedProps, _ToggleFacade.defaultProps = {
93
98
  checked: false,
@@ -22,13 +22,14 @@
22
22
  * SOFTWARE.
23
23
  */
24
24
 
25
- import React from 'react';
25
+ import { createRef } from 'react';
26
26
  import { fireEvent, render, screen, waitFor } from '@testing-library/react';
27
27
  import { vi } from 'vitest';
28
28
  import userEvent from '@testing-library/user-event';
29
29
  import '@testing-library/jest-dom';
30
30
  import { runAxeCheck } from '@instructure/ui-axe-check';
31
31
  import { Checkbox } from '../index';
32
+ import { jsx as _jsx } from "@emotion/react/jsx-runtime";
32
33
  const TEST_VALUE = 'test-value';
33
34
  const TEST_NAME = 'test-name';
34
35
  const TEST_LABEL = 'test-label';
@@ -43,7 +44,9 @@ const renderCheckbox = props => {
43
44
  ...initProps,
44
45
  ...props
45
46
  };
46
- return render(/*#__PURE__*/React.createElement(Checkbox, allProps));
47
+ return render(_jsx(Checkbox, {
48
+ ...allProps
49
+ }));
47
50
  };
48
51
  describe('<Checkbox />', () => {
49
52
  let consoleWarningMock;
@@ -168,10 +171,11 @@ describe('<Checkbox />', () => {
168
171
  });
169
172
  it('focuses with the focus helper', () => {
170
173
  var _checkboxRef$current;
171
- const checkboxRef = /*#__PURE__*/React.createRef();
172
- render(/*#__PURE__*/React.createElement(Checkbox, Object.assign({
173
- ref: checkboxRef
174
- }, initProps)));
174
+ const checkboxRef = /*#__PURE__*/createRef();
175
+ render(_jsx(Checkbox, {
176
+ ref: checkboxRef,
177
+ ...initProps
178
+ }));
175
179
  const checkboxElement = screen.getByRole('checkbox');
176
180
  expect(checkboxElement).not.toHaveFocus();
177
181
  (_checkboxRef$current = checkboxRef.current) === null || _checkboxRef$current === void 0 ? void 0 : _checkboxRef$current.focus();
@@ -23,8 +23,7 @@ var _dec, _dec2, _dec3, _class, _Checkbox;
23
23
  * SOFTWARE.
24
24
  */
25
25
 
26
- /** @jsx jsx */
27
- import React, { Component } from 'react';
26
+ import { Component } from 'react';
28
27
  import keycode from 'keycode';
29
28
  import { FormFieldMessages } from '@instructure/ui-form-field';
30
29
  import { createChainedFunction } from '@instructure/ui-utils';
@@ -33,12 +32,13 @@ import { isActiveElement } from '@instructure/ui-dom-utils';
33
32
  import { omitProps, withDeterministicId } from '@instructure/ui-react-utils';
34
33
  import { View } from '@instructure/ui-view';
35
34
  import { testable } from '@instructure/ui-testable';
36
- import { withStyle, jsx } from '@instructure/emotion';
35
+ import { withStyle } from '@instructure/emotion';
37
36
  import { CheckboxFacade } from './CheckboxFacade';
38
37
  import { ToggleFacade } from './ToggleFacade';
39
38
  import generateStyle from './styles';
40
39
  import generateComponentTheme from './theme';
41
40
  import { propTypes, allowedProps } from './props';
41
+ import { jsxs as _jsxs, jsx as _jsx } from "@emotion/react/jsx-runtime";
42
42
  /**
43
43
  ---
44
44
  category: components
@@ -161,7 +161,7 @@ let Checkbox = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle, g
161
161
  focused = _this$state.focused;
162
162
  error(!(variant === 'simple' && labelPlacement !== 'end'), `[Checkbox] The \`simple\` variant does not support the \`labelPlacement\` property. Use the \`toggle\` variant instead.`);
163
163
  if (variant === 'toggle') {
164
- return jsx(ToggleFacade, {
164
+ return _jsxs(ToggleFacade, {
165
165
  disabled: disabled,
166
166
  size: size,
167
167
  focused: focused,
@@ -169,24 +169,28 @@ let Checkbox = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle, g
169
169
  readOnly: readOnly,
170
170
  labelPlacement: labelPlacement,
171
171
  themeOverride: themeOverride,
172
- invalid: this.invalid
173
- }, label, isRequired && label && jsx("span", {
174
- css: this.invalid ? styles === null || styles === void 0 ? void 0 : styles.requiredInvalid : {},
175
- "aria-hidden": true
176
- }, ' ', "*"));
172
+ invalid: this.invalid,
173
+ children: [label, isRequired && label && _jsxs("span", {
174
+ css: this.invalid ? styles === null || styles === void 0 ? void 0 : styles.requiredInvalid : {},
175
+ "aria-hidden": true,
176
+ children: [' ', "*"]
177
+ })]
178
+ });
177
179
  } else {
178
- return jsx(CheckboxFacade, {
180
+ return _jsxs(CheckboxFacade, {
179
181
  size: size,
180
182
  hovered: hovered,
181
183
  focused: focused,
182
184
  checked: this.checked,
183
185
  indeterminate: indeterminate,
184
186
  themeOverride: themeOverride,
185
- invalid: this.invalid
186
- }, label, isRequired && label && jsx("span", {
187
- css: this.invalid ? styles === null || styles === void 0 ? void 0 : styles.requiredInvalid : {},
188
- "aria-hidden": true
189
- }, ' ', "*"));
187
+ invalid: this.invalid,
188
+ children: [label, isRequired && label && _jsxs("span", {
189
+ css: this.invalid ? styles === null || styles === void 0 ? void 0 : styles.requiredInvalid : {},
190
+ "aria-hidden": true,
191
+ children: [' ', "*"]
192
+ })]
193
+ });
190
194
  }
191
195
  }
192
196
  renderMessages() {
@@ -194,13 +198,14 @@ let Checkbox = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle, g
194
198
  messages = _this$props5.messages,
195
199
  styles = _this$props5.styles,
196
200
  variant = _this$props5.variant;
197
- return messages && messages.length > 0 ? jsx(View, {
201
+ return messages && messages.length > 0 ? _jsx(View, {
198
202
  display: "block",
199
203
  margin: "small 0 0",
200
- css: this.isNewError && (variant === 'toggle' ? styles === null || styles === void 0 ? void 0 : styles.indentedToggleError : styles === null || styles === void 0 ? void 0 : styles.indentedError)
201
- }, jsx(FormFieldMessages, {
202
- messages: messages
203
- })) : null;
204
+ css: this.isNewError && (variant === 'toggle' ? styles === null || styles === void 0 ? void 0 : styles.indentedToggleError : styles === null || styles === void 0 ? void 0 : styles.indentedError),
205
+ children: _jsx(FormFieldMessages, {
206
+ messages: messages
207
+ })
208
+ }) : null;
204
209
  }
205
210
  render() {
206
211
  const _this$props6 = this.props,
@@ -218,35 +223,39 @@ let Checkbox = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle, g
218
223
  isRequired = _this$props6.isRequired;
219
224
  const props = omitProps(this.props, Checkbox.allowedProps);
220
225
  error(!(variant === 'toggle' && indeterminate), `[Checkbox] The \`toggle\` variant does not support the \`indeterminate\` property. Use the \`simple\` variant instead.`);
221
- return jsx("div", {
226
+ return _jsx("div", {
222
227
  css: styles === null || styles === void 0 ? void 0 : styles.checkbox
223
228
  /* eslint-disable-next-line jsx-a11y/mouse-events-have-key-events */,
224
229
  onMouseOver: createChainedFunction(onMouseOver, this.handleMouseOver)
225
230
  /* eslint-disable-next-line jsx-a11y/mouse-events-have-key-events */,
226
231
  onMouseOut: createChainedFunction(onMouseOut, this.handleMouseOut),
227
- ref: this.handleRef
228
- }, jsx("div", {
229
- css: styles === null || styles === void 0 ? void 0 : styles.container
230
- }, jsx("input", Object.assign({}, props, {
231
- id: this.id,
232
- value: value,
233
- type: "checkbox",
234
- ref: c => {
235
- this._input = c;
236
- },
237
- required: isRequired,
238
- disabled: disabled || readOnly,
239
- "aria-checked": indeterminate ? 'mixed' : void 0,
240
- css: styles === null || styles === void 0 ? void 0 : styles.input,
241
- onChange: this.handleChange,
242
- onKeyDown: createChainedFunction(onKeyDown, this.handleKeyDown),
243
- onFocus: createChainedFunction(onFocus, this.handleFocus),
244
- onBlur: createChainedFunction(onBlur, this.handleBlur),
245
- checked: this.checked
246
- })), jsx("label", {
247
- htmlFor: this.id,
248
- css: styles === null || styles === void 0 ? void 0 : styles.control
249
- }, this.renderFacade(), this.renderMessages())));
232
+ ref: this.handleRef,
233
+ children: _jsxs("div", {
234
+ css: styles === null || styles === void 0 ? void 0 : styles.container,
235
+ children: [_jsx("input", {
236
+ ...props,
237
+ id: this.id,
238
+ value: value,
239
+ type: "checkbox",
240
+ ref: c => {
241
+ this._input = c;
242
+ },
243
+ required: isRequired,
244
+ disabled: disabled || readOnly,
245
+ "aria-checked": indeterminate ? 'mixed' : void 0,
246
+ css: styles === null || styles === void 0 ? void 0 : styles.input,
247
+ onChange: this.handleChange,
248
+ onKeyDown: createChainedFunction(onKeyDown, this.handleKeyDown),
249
+ onFocus: createChainedFunction(onFocus, this.handleFocus),
250
+ onBlur: createChainedFunction(onBlur, this.handleBlur),
251
+ checked: this.checked
252
+ }), _jsxs("label", {
253
+ htmlFor: this.id,
254
+ css: styles === null || styles === void 0 ? void 0 : styles.control,
255
+ children: [this.renderFacade(), this.renderMessages()]
256
+ })]
257
+ })
258
+ });
250
259
  }
251
260
  }, _Checkbox.displayName = "Checkbox", _Checkbox.componentId = 'Checkbox', _Checkbox.propTypes = propTypes, _Checkbox.allowedProps = allowedProps, _Checkbox.defaultProps = {
252
261
  size: 'medium',
@@ -23,7 +23,6 @@ var _Checkbox, _Checkbox2;
23
23
  * SOFTWARE.
24
24
  */
25
25
 
26
- import React from 'react';
27
26
  import { fireEvent, render, screen, waitFor } from '@testing-library/react';
28
27
  import { vi } from 'vitest';
29
28
  import userEvent from '@testing-library/user-event';
@@ -31,6 +30,7 @@ import '@testing-library/jest-dom';
31
30
  import { runAxeCheck } from '@instructure/ui-axe-check';
32
31
  import { CheckboxGroup } from '../index';
33
32
  import { Checkbox } from '../../Checkbox';
33
+ import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
34
34
  const TEST_NAME = 'test-name';
35
35
  const TEST_DESCRIPTION = 'test-description';
36
36
  const TEST_ERROR_MESSAGE = 'test-error-message';
@@ -44,13 +44,16 @@ const renderCheckboxGroup = props => {
44
44
  description: TEST_DESCRIPTION,
45
45
  ...props
46
46
  };
47
- return render(/*#__PURE__*/React.createElement(CheckboxGroup, allProps, _Checkbox || (_Checkbox = /*#__PURE__*/React.createElement(Checkbox, {
48
- label: TEST_LABEL_1,
49
- value: TEST_VALUE_1
50
- })), _Checkbox2 || (_Checkbox2 = /*#__PURE__*/React.createElement(Checkbox, {
51
- label: TEST_LABEL_2,
52
- value: TEST_VALUE_2
53
- }))));
47
+ return render(_jsxs(CheckboxGroup, {
48
+ ...allProps,
49
+ children: [_Checkbox || (_Checkbox = _jsx(Checkbox, {
50
+ label: TEST_LABEL_1,
51
+ value: TEST_VALUE_1
52
+ })), _Checkbox2 || (_Checkbox2 = _jsx(Checkbox, {
53
+ label: TEST_LABEL_2,
54
+ value: TEST_VALUE_2
55
+ }))]
56
+ }));
54
57
  };
55
58
  describe('<CheckboxGroup />', () => {
56
59
  let consoleWarningMock;
@@ -23,12 +23,13 @@ var _dec, _dec2, _class, _CheckboxGroup;
23
23
  * SOFTWARE.
24
24
  */
25
25
 
26
- import React, { Children, Component } from 'react';
26
+ import { Children, Component } from 'react';
27
27
  import { FormFieldGroup } from '@instructure/ui-form-field';
28
28
  import { matchComponentTypes, safeCloneElement, pickProps, omitProps, withDeterministicId } from '@instructure/ui-react-utils';
29
29
  import { testable } from '@instructure/ui-testable';
30
30
  import { Checkbox } from '../Checkbox';
31
31
  import { propTypes, allowedProps } from './props';
32
+ import { jsx as _jsx } from "@emotion/react/jsx-runtime";
32
33
  /**
33
34
  ---
34
35
  category: components
@@ -102,13 +103,16 @@ let CheckboxGroup = (_dec = withDeterministicId(), _dec2 = testable(), _dec(_cla
102
103
  });
103
104
  }
104
105
  render() {
105
- return /*#__PURE__*/React.createElement(FormFieldGroup, Object.assign({}, omitProps(this.props, CheckboxGroup.allowedProps), pickProps(this.props, FormFieldGroup.allowedProps), {
106
+ return _jsx(FormFieldGroup, {
107
+ ...omitProps(this.props, CheckboxGroup.allowedProps),
108
+ ...pickProps(this.props, FormFieldGroup.allowedProps),
106
109
  description: this.props.description,
107
110
  rowSpacing: "small",
108
111
  vAlign: "top",
109
112
  messagesId: this._messagesId,
110
- elementRef: this.handleRef
111
- }), this.renderChildren());
113
+ elementRef: this.handleRef,
114
+ children: this.renderChildren()
115
+ });
112
116
  }
113
117
  }, _CheckboxGroup.displayName = "CheckboxGroup", _CheckboxGroup.componentId = 'CheckboxGroup', _CheckboxGroup.propTypes = propTypes, _CheckboxGroup.allowedProps = allowedProps, _CheckboxGroup.defaultProps = {
114
118
  disabled: false,
@@ -1,12 +1,11 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- var _react = _interopRequireDefault(require("react"));
5
- var _react2 = require("@testing-library/react");
3
+ var _react = require("@testing-library/react");
6
4
  var _vitest = require("vitest");
7
5
  require("@testing-library/jest-dom");
8
6
  var _runAxeCheck = require("@instructure/ui-axe-check/lib/runAxeCheck.js");
9
7
  var _index = require("../index");
8
+ var _jsxRuntime = require("@emotion/react/jsx-runtime");
10
9
  var _CheckboxFacade, _CheckboxFacade2;
11
10
  /*
12
11
  * The MIT License (MIT)
@@ -45,12 +44,16 @@ describe('<CheckboxFacade />', () => {
45
44
  consoleErrorMock.mockRestore();
46
45
  });
47
46
  it('should render', () => {
48
- (0, _react2.render)(_CheckboxFacade || (_CheckboxFacade = /*#__PURE__*/_react.default.createElement(_index.CheckboxFacade, null, TEST_TEXT)));
49
- const facade = _react2.screen.getByText(TEST_TEXT);
47
+ (0, _react.render)(_CheckboxFacade || (_CheckboxFacade = (0, _jsxRuntime.jsx)(_index.CheckboxFacade, {
48
+ children: TEST_TEXT
49
+ })));
50
+ const facade = _react.screen.getByText(TEST_TEXT);
50
51
  expect(facade).toBeInTheDocument();
51
52
  });
52
53
  it('should meet a11y standards', async () => {
53
- const _render = (0, _react2.render)(_CheckboxFacade2 || (_CheckboxFacade2 = /*#__PURE__*/_react.default.createElement(_index.CheckboxFacade, null, TEST_TEXT))),
54
+ const _render = (0, _react.render)(_CheckboxFacade2 || (_CheckboxFacade2 = (0, _jsxRuntime.jsx)(_index.CheckboxFacade, {
55
+ children: TEST_TEXT
56
+ }))),
54
57
  container = _render.container;
55
58
  const axeCheck = await (0, _runAxeCheck.runAxeCheck)(container);
56
59
  expect(axeCheck).toBe(true);
@@ -12,6 +12,7 @@ var _emotion = require("@instructure/emotion");
12
12
  var _styles = _interopRequireDefault(require("./styles"));
13
13
  var _theme = _interopRequireDefault(require("./theme"));
14
14
  var _props = require("./props");
15
+ var _jsxRuntime = require("@emotion/react/jsx-runtime");
15
16
  var _dec, _class, _CheckboxFacade, _SVGIcon, _IconCheckMarkSolid;
16
17
  /*
17
18
  * The MIT License (MIT)
@@ -36,7 +37,6 @@ var _dec, _class, _CheckboxFacade, _SVGIcon, _IconCheckMarkSolid;
36
37
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
37
38
  * SOFTWARE.
38
39
  */
39
- /** @jsx jsx */
40
40
  /**
41
41
  ---
42
42
  parent: Checkbox
@@ -60,17 +60,18 @@ let CheckboxFacade = exports.CheckboxFacade = (_dec = (0, _emotion.withStyle)(_s
60
60
  }
61
61
  renderIcon() {
62
62
  if (this.props.indeterminate) {
63
- return _SVGIcon || (_SVGIcon = (0, _emotion.jsx)(_SVGIcon2.SVGIcon, {
63
+ return _SVGIcon || (_SVGIcon = (0, _jsxRuntime.jsx)(_SVGIcon2.SVGIcon, {
64
64
  viewBox: "0 0 1920 1920",
65
- inline: false
66
- }, (0, _emotion.jsx)("rect", {
67
- x: "140",
68
- y: "820",
69
- width: "1640",
70
- height: "280"
71
- })));
65
+ inline: false,
66
+ children: (0, _jsxRuntime.jsx)("rect", {
67
+ x: "140",
68
+ y: "820",
69
+ width: "1640",
70
+ height: "280"
71
+ })
72
+ }));
72
73
  } else if (this.props.checked) {
73
- return _IconCheckMarkSolid || (_IconCheckMarkSolid = (0, _emotion.jsx)(_IconCheckMarkSolid2.IconCheckMarkSolid, {
74
+ return _IconCheckMarkSolid || (_IconCheckMarkSolid = (0, _jsxRuntime.jsx)(_IconCheckMarkSolid2.IconCheckMarkSolid, {
74
75
  inline: false
75
76
  }));
76
77
  } else {
@@ -81,15 +82,18 @@ let CheckboxFacade = exports.CheckboxFacade = (_dec = (0, _emotion.withStyle)(_s
81
82
  const _this$props3 = this.props,
82
83
  children = _this$props3.children,
83
84
  styles = _this$props3.styles;
84
- return (0, _emotion.jsx)("span", {
85
+ return (0, _jsxRuntime.jsxs)("span", {
85
86
  css: styles === null || styles === void 0 ? void 0 : styles.checkboxFacade,
86
- ref: this.handleRef
87
- }, (0, _emotion.jsx)("span", {
88
- css: styles === null || styles === void 0 ? void 0 : styles.facade,
89
- "aria-hidden": "true"
90
- }, this.renderIcon()), (0, _emotion.jsx)("span", {
91
- css: styles === null || styles === void 0 ? void 0 : styles.label
92
- }, children));
87
+ ref: this.handleRef,
88
+ children: [(0, _jsxRuntime.jsx)("span", {
89
+ css: styles === null || styles === void 0 ? void 0 : styles.facade,
90
+ "aria-hidden": "true",
91
+ children: this.renderIcon()
92
+ }), (0, _jsxRuntime.jsx)("span", {
93
+ css: styles === null || styles === void 0 ? void 0 : styles.label,
94
+ children: children
95
+ })]
96
+ });
93
97
  }
94
98
  }, _CheckboxFacade.displayName = "CheckboxFacade", _CheckboxFacade.componentId = 'CheckboxFacade', _CheckboxFacade.propTypes = _props.propTypes, _CheckboxFacade.allowedProps = _props.allowedProps, _CheckboxFacade.defaultProps = {
95
99
  checked: false,
@@ -1,12 +1,11 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- var _react = _interopRequireDefault(require("react"));
5
- var _react2 = require("@testing-library/react");
3
+ var _react = require("@testing-library/react");
6
4
  var _vitest = require("vitest");
7
5
  require("@testing-library/jest-dom");
8
6
  var _runAxeCheck = require("@instructure/ui-axe-check/lib/runAxeCheck.js");
9
7
  var _index = require("../index");
8
+ var _jsxRuntime = require("@emotion/react/jsx-runtime");
10
9
  var _ToggleFacade, _ToggleFacade2;
11
10
  /*
12
11
  * The MIT License (MIT)
@@ -45,12 +44,16 @@ describe('<ToggleFacade />', () => {
45
44
  consoleErrorMock.mockRestore();
46
45
  });
47
46
  it('should render', () => {
48
- (0, _react2.render)(_ToggleFacade || (_ToggleFacade = /*#__PURE__*/_react.default.createElement(_index.ToggleFacade, null, TEST_TEXT)));
49
- const facade = _react2.screen.getByText(TEST_TEXT);
47
+ (0, _react.render)(_ToggleFacade || (_ToggleFacade = (0, _jsxRuntime.jsx)(_index.ToggleFacade, {
48
+ children: TEST_TEXT
49
+ })));
50
+ const facade = _react.screen.getByText(TEST_TEXT);
50
51
  expect(facade).toBeInTheDocument();
51
52
  });
52
53
  it('should meet a11y standards', async () => {
53
- const _render = (0, _react2.render)(_ToggleFacade2 || (_ToggleFacade2 = /*#__PURE__*/_react.default.createElement(_index.ToggleFacade, null, TEST_TEXT))),
54
+ const _render = (0, _react.render)(_ToggleFacade2 || (_ToggleFacade2 = (0, _jsxRuntime.jsx)(_index.ToggleFacade, {
55
+ children: TEST_TEXT
56
+ }))),
54
57
  container = _render.container;
55
58
  const axeCheck = await (0, _runAxeCheck.runAxeCheck)(container);
56
59
  expect(axeCheck).toBe(true);