@instructure/ui-checkbox 10.26.1-snapshot-2 → 10.26.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 (44) hide show
  1. package/CHANGELOG.md +5 -18
  2. package/es/Checkbox/CheckboxFacade/index.js +2 -2
  3. package/es/Checkbox/CheckboxFacade/props.js +11 -1
  4. package/es/Checkbox/ToggleFacade/index.js +2 -2
  5. package/es/Checkbox/ToggleFacade/props.js +12 -1
  6. package/es/Checkbox/index.js +6 -6
  7. package/es/Checkbox/props.js +27 -1
  8. package/es/CheckboxGroup/index.js +6 -6
  9. package/es/CheckboxGroup/props.js +36 -1
  10. package/lib/Checkbox/CheckboxFacade/index.js +1 -1
  11. package/lib/Checkbox/CheckboxFacade/props.js +12 -1
  12. package/lib/Checkbox/ToggleFacade/index.js +1 -1
  13. package/lib/Checkbox/ToggleFacade/props.js +13 -1
  14. package/lib/Checkbox/index.js +5 -5
  15. package/lib/Checkbox/props.js +28 -1
  16. package/lib/CheckboxGroup/index.js +5 -5
  17. package/lib/CheckboxGroup/props.js +38 -1
  18. package/package.json +22 -19
  19. package/src/Checkbox/CheckboxFacade/index.tsx +2 -1
  20. package/src/Checkbox/CheckboxFacade/props.ts +18 -2
  21. package/src/Checkbox/ToggleFacade/index.tsx +2 -1
  22. package/src/Checkbox/ToggleFacade/props.ts +19 -2
  23. package/src/Checkbox/index.tsx +4 -2
  24. package/src/Checkbox/props.ts +32 -1
  25. package/src/CheckboxGroup/index.tsx +4 -2
  26. package/src/CheckboxGroup/props.ts +46 -2
  27. package/tsconfig.build.json +2 -0
  28. package/tsconfig.build.tsbuildinfo +1 -1
  29. package/types/Checkbox/CheckboxFacade/index.d.ts +9 -0
  30. package/types/Checkbox/CheckboxFacade/index.d.ts.map +1 -1
  31. package/types/Checkbox/CheckboxFacade/props.d.ts +3 -2
  32. package/types/Checkbox/CheckboxFacade/props.d.ts.map +1 -1
  33. package/types/Checkbox/ToggleFacade/index.d.ts +10 -0
  34. package/types/Checkbox/ToggleFacade/index.d.ts.map +1 -1
  35. package/types/Checkbox/ToggleFacade/props.d.ts +3 -2
  36. package/types/Checkbox/ToggleFacade/props.d.ts.map +1 -1
  37. package/types/Checkbox/index.d.ts +23 -0
  38. package/types/Checkbox/index.d.ts.map +1 -1
  39. package/types/Checkbox/props.d.ts +3 -2
  40. package/types/Checkbox/props.d.ts.map +1 -1
  41. package/types/CheckboxGroup/index.d.ts +13 -0
  42. package/types/CheckboxGroup/index.d.ts.map +1 -1
  43. package/types/CheckboxGroup/props.d.ts +3 -2
  44. package/types/CheckboxGroup/props.d.ts.map +1 -1
package/CHANGELOG.md CHANGED
@@ -3,30 +3,17 @@
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.26.1-snapshot-2](https://github.com/instructure/instructure-ui/compare/v10.26.0...v10.26.1-snapshot-2) (2025-10-06)
6
+ ## [10.26.2](https://github.com/instructure/instructure-ui/compare/v10.26.1...v10.26.2) (2025-10-13)
7
7
 
8
+ **Note:** Version bump only for package @instructure/ui-checkbox
8
9
 
9
- ### Features
10
10
 
11
- * **many:** instUI v11 release ([36f5438](https://github.com/instructure/instructure-ui/commit/36f54382669186227ba24798bbf7201ef2f5cd4c))
12
11
 
13
12
 
14
- ### BREAKING CHANGES
15
13
 
16
- * **many:** InstUI v11 contains the following breaking changes:
17
- - React 16 and 17 are no longer supported
18
- - remove `PropTypes` from all packages
19
- - remove `CodeEditor` component
20
- - remove `@instui/theme-registry` package
21
- - remove `@testable`, `@experimental`, `@hack` decorators
22
- - InstUISettingsProvider's `as` prop is removed
23
- - `canvas.use()`, `canvasHighContrast.use()` functions are removed
24
- - `canvasThemeLocal`, `canvasHighContrastThemeLocal` are removed
25
- - `variables` field on theme objects are removed
26
- - remove deprecated props from Table: Row's `isStacked`, Body's
27
- `isStacked`, `hover`, and `headers`
28
- - `Table`'s `caption` prop is now required
29
- - `ui-dom-utils`'s `getComputedStyle` can now return `undefined`
14
+ ## [10.26.1](https://github.com/instructure/instructure-ui/compare/v10.26.0...v10.26.1) (2025-10-06)
15
+
16
+ **Note:** Version bump only for package @instructure/ui-checkbox
30
17
 
31
18
 
32
19
 
@@ -29,7 +29,7 @@ import { IconCheckMarkSolid } from '@instructure/ui-icons';
29
29
  import { withStyle } from '@instructure/emotion';
30
30
  import generateStyle from './styles';
31
31
  import generateComponentTheme from './theme';
32
- import { allowedProps } from './props';
32
+ import { propTypes, allowedProps } from './props';
33
33
  import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
34
34
  /**
35
35
  ---
@@ -89,7 +89,7 @@ let CheckboxFacade = (_dec = withStyle(generateStyle, generateComponentTheme), _
89
89
  })]
90
90
  });
91
91
  }
92
- }, _CheckboxFacade.displayName = "CheckboxFacade", _CheckboxFacade.componentId = 'CheckboxFacade', _CheckboxFacade.allowedProps = allowedProps, _CheckboxFacade.defaultProps = {
92
+ }, _CheckboxFacade.displayName = "CheckboxFacade", _CheckboxFacade.componentId = 'CheckboxFacade', _CheckboxFacade.propTypes = propTypes, _CheckboxFacade.allowedProps = allowedProps, _CheckboxFacade.defaultProps = {
93
93
  checked: false,
94
94
  focused: false,
95
95
  hovered: false,
@@ -22,5 +22,15 @@
22
22
  * SOFTWARE.
23
23
  */
24
24
 
25
+ import PropTypes from 'prop-types';
26
+ const propTypes = {
27
+ children: PropTypes.node.isRequired,
28
+ checked: PropTypes.bool,
29
+ focused: PropTypes.bool,
30
+ hovered: PropTypes.bool,
31
+ size: PropTypes.oneOf(['small', 'medium', 'large']),
32
+ indeterminate: PropTypes.bool,
33
+ invalid: PropTypes.bool
34
+ };
25
35
  const allowedProps = ['children', 'checked', 'focused', 'hovered', 'size', 'indeterminate'];
26
- export { allowedProps };
36
+ export { propTypes, allowedProps };
@@ -28,7 +28,7 @@ import { IconCheckSolid, IconXSolid } from '@instructure/ui-icons';
28
28
  import { withStyle } from '@instructure/emotion';
29
29
  import generateStyle from './styles';
30
30
  import generateComponentTheme from './theme';
31
- import { allowedProps } from './props';
31
+ import { propTypes, allowedProps } from './props';
32
32
  import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
33
33
  /**
34
34
  ---
@@ -94,7 +94,7 @@ let ToggleFacade = (_dec = withStyle(generateStyle, generateComponentTheme), _de
94
94
  }), labelPlacement === 'end' && this.renderLabel()]
95
95
  });
96
96
  }
97
- }, _ToggleFacade.displayName = "ToggleFacade", _ToggleFacade.componentId = 'ToggleFacade', _ToggleFacade.allowedProps = allowedProps, _ToggleFacade.defaultProps = {
97
+ }, _ToggleFacade.displayName = "ToggleFacade", _ToggleFacade.componentId = 'ToggleFacade', _ToggleFacade.propTypes = propTypes, _ToggleFacade.allowedProps = allowedProps, _ToggleFacade.defaultProps = {
98
98
  checked: false,
99
99
  focused: false,
100
100
  size: 'medium',
@@ -22,5 +22,16 @@
22
22
  * SOFTWARE.
23
23
  */
24
24
 
25
+ import PropTypes from 'prop-types';
26
+ const propTypes = {
27
+ children: PropTypes.node.isRequired,
28
+ checked: PropTypes.bool,
29
+ disabled: PropTypes.bool,
30
+ readOnly: PropTypes.bool,
31
+ focused: PropTypes.bool,
32
+ size: PropTypes.oneOf(['small', 'medium', 'large']),
33
+ labelPlacement: PropTypes.oneOf(['top', 'start', 'end']),
34
+ invalid: PropTypes.bool
35
+ };
25
36
  const allowedProps = ['children', 'checked', 'disabled', 'readOnly', 'focused', 'size', 'labelPlacement'];
26
- export { allowedProps };
37
+ export { propTypes, allowedProps };
@@ -1,4 +1,4 @@
1
- var _dec, _dec2, _class, _Checkbox;
1
+ var _dec, _dec2, _dec3, _class, _Checkbox;
2
2
  /*
3
3
  * The MIT License (MIT)
4
4
  *
@@ -31,12 +31,13 @@ import { logError as error } from '@instructure/console';
31
31
  import { isActiveElement } from '@instructure/ui-dom-utils';
32
32
  import { omitProps, withDeterministicId } from '@instructure/ui-react-utils';
33
33
  import { View } from '@instructure/ui-view';
34
+ import { testable } from '@instructure/ui-testable';
34
35
  import { withStyle } from '@instructure/emotion';
35
36
  import { CheckboxFacade } from './CheckboxFacade';
36
37
  import { ToggleFacade } from './ToggleFacade';
37
38
  import generateStyle from './styles';
38
39
  import generateComponentTheme from './theme';
39
- import { allowedProps } from './props';
40
+ import { propTypes, allowedProps } from './props';
40
41
  import { jsxs as _jsxs, jsx as _jsx } from "@emotion/react/jsx-runtime";
41
42
  /**
42
43
  ---
@@ -44,7 +45,7 @@ category: components
44
45
  tags: toggle, switch
45
46
  ---
46
47
  **/
47
- let Checkbox = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle, generateComponentTheme), _dec(_class = _dec2(_class = (_Checkbox = class Checkbox extends Component {
48
+ let Checkbox = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle, generateComponentTheme), _dec3 = testable(), _dec(_class = _dec2(_class = _dec3(_class = (_Checkbox = class Checkbox extends Component {
48
49
  constructor(props) {
49
50
  super(props);
50
51
  this._defaultId = void 0;
@@ -235,7 +236,6 @@ let Checkbox = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle, g
235
236
  /* eslint-disable-next-line jsx-a11y/mouse-events-have-key-events */,
236
237
  onMouseOut: createChainedFunction(onMouseOut, this.handleMouseOut),
237
238
  ref: this.handleRef,
238
- "data-cid": "Checkbox",
239
239
  children: _jsxs("div", {
240
240
  css: styles === null || styles === void 0 ? void 0 : styles.container,
241
241
  children: [_jsx("input", {
@@ -261,7 +261,7 @@ let Checkbox = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle, g
261
261
  })
262
262
  });
263
263
  }
264
- }, _Checkbox.displayName = "Checkbox", _Checkbox.componentId = 'Checkbox', _Checkbox.allowedProps = allowedProps, _Checkbox.defaultProps = {
264
+ }, _Checkbox.displayName = "Checkbox", _Checkbox.componentId = 'Checkbox', _Checkbox.propTypes = propTypes, _Checkbox.allowedProps = allowedProps, _Checkbox.defaultProps = {
265
265
  size: 'medium',
266
266
  variant: 'simple',
267
267
  disabled: false,
@@ -269,6 +269,6 @@ let Checkbox = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle, g
269
269
  indeterminate: false,
270
270
  readOnly: false,
271
271
  labelPlacement: 'end'
272
- }, _Checkbox)) || _class) || _class);
272
+ }, _Checkbox)) || _class) || _class) || _class);
273
273
  export default Checkbox;
274
274
  export { Checkbox, CheckboxFacade, ToggleFacade };
@@ -22,5 +22,31 @@
22
22
  * SOFTWARE.
23
23
  */
24
24
 
25
+ import PropTypes from 'prop-types';
26
+ import { FormPropTypes } from '@instructure/ui-form-field';
27
+ import { controllable } from '@instructure/ui-prop-types';
28
+ const propTypes = {
29
+ label: PropTypes.node.isRequired,
30
+ id: PropTypes.string,
31
+ value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
32
+ messages: PropTypes.arrayOf(FormPropTypes.message),
33
+ defaultChecked: PropTypes.bool,
34
+ checked: controllable(PropTypes.bool, 'onChange', 'defaultChecked'),
35
+ onChange: PropTypes.func,
36
+ onKeyDown: PropTypes.func,
37
+ onFocus: PropTypes.func,
38
+ onBlur: PropTypes.func,
39
+ onMouseOver: PropTypes.func,
40
+ onMouseOut: PropTypes.func,
41
+ disabled: PropTypes.bool,
42
+ readOnly: PropTypes.bool,
43
+ indeterminate: PropTypes.bool,
44
+ size: PropTypes.oneOf(['small', 'medium', 'large']),
45
+ variant: PropTypes.oneOf(['simple', 'toggle']),
46
+ inline: PropTypes.bool,
47
+ labelPlacement: PropTypes.oneOf(['top', 'start', 'end']),
48
+ isRequired: PropTypes.bool,
49
+ inputRef: PropTypes.func
50
+ };
25
51
  const allowedProps = ['label', 'id', 'value', 'messages', 'defaultChecked', 'checked', 'onChange', 'onKeyDown', 'onFocus', 'onBlur', 'onMouseOver', 'onMouseOut', 'disabled', 'readOnly', 'indeterminate', 'size', 'variant', 'inline', 'labelPlacement', 'isRequired', 'inputRef'];
26
- export { allowedProps };
52
+ export { propTypes, allowedProps };
@@ -1,4 +1,4 @@
1
- var _dec, _class, _CheckboxGroup;
1
+ var _dec, _dec2, _class, _CheckboxGroup;
2
2
  /*
3
3
  * The MIT License (MIT)
4
4
  *
@@ -26,15 +26,16 @@ var _dec, _class, _CheckboxGroup;
26
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
+ import { testable } from '@instructure/ui-testable';
29
30
  import { Checkbox } from '../Checkbox';
30
- import { allowedProps } from './props';
31
+ import { propTypes, allowedProps } from './props';
31
32
  import { jsx as _jsx } from "@emotion/react/jsx-runtime";
32
33
  /**
33
34
  ---
34
35
  category: components
35
36
  ---
36
37
  **/
37
- let CheckboxGroup = (_dec = withDeterministicId(), _dec(_class = (_CheckboxGroup = class CheckboxGroup extends Component {
38
+ let CheckboxGroup = (_dec = withDeterministicId(), _dec2 = testable(), _dec(_class = _dec2(_class = (_CheckboxGroup = class CheckboxGroup extends Component {
38
39
  constructor(props) {
39
40
  super(props);
40
41
  this._messagesId = void 0;
@@ -110,16 +111,15 @@ let CheckboxGroup = (_dec = withDeterministicId(), _dec(_class = (_CheckboxGroup
110
111
  vAlign: "top",
111
112
  messagesId: this._messagesId,
112
113
  elementRef: this.handleRef,
113
- "data-cid": "CheckboxGroup",
114
114
  children: this.renderChildren()
115
115
  });
116
116
  }
117
- }, _CheckboxGroup.displayName = "CheckboxGroup", _CheckboxGroup.componentId = 'CheckboxGroup', _CheckboxGroup.allowedProps = allowedProps, _CheckboxGroup.defaultProps = {
117
+ }, _CheckboxGroup.displayName = "CheckboxGroup", _CheckboxGroup.componentId = 'CheckboxGroup', _CheckboxGroup.propTypes = propTypes, _CheckboxGroup.allowedProps = allowedProps, _CheckboxGroup.defaultProps = {
118
118
  disabled: false,
119
119
  readOnly: false,
120
120
  size: 'medium',
121
121
  layout: 'stacked',
122
122
  children: null
123
- }, _CheckboxGroup)) || _class);
123
+ }, _CheckboxGroup)) || _class) || _class);
124
124
  export default CheckboxGroup;
125
125
  export { CheckboxGroup };
@@ -22,5 +22,40 @@
22
22
  * SOFTWARE.
23
23
  */
24
24
 
25
+ import PropTypes from 'prop-types';
26
+ import { FormPropTypes } from '@instructure/ui-form-field';
27
+ import { controllable, Children as ChildrenPropTypes } from '@instructure/ui-prop-types';
28
+ import { Checkbox } from '../Checkbox';
29
+ const propTypes = {
30
+ name: PropTypes.string.isRequired,
31
+ description: PropTypes.node.isRequired,
32
+ /**
33
+ * value to set on initial render
34
+ */
35
+ defaultValue: PropTypes.array,
36
+ /**
37
+ * the selected values (must be accompanied by an `onChange` prop)
38
+ */
39
+ value: controllable(PropTypes.array),
40
+ /**
41
+ * when used with the `value` prop, the component will not control its own state
42
+ */
43
+ onChange: PropTypes.func,
44
+ disabled: PropTypes.bool,
45
+ readOnly: PropTypes.bool,
46
+ /**
47
+ * object with shape: `{
48
+ text: PropTypes.node,
49
+ type: PropTypes.oneOf(['error', 'hint', 'success', 'screenreader-only'])
50
+ }`
51
+ */
52
+ messages: PropTypes.arrayOf(FormPropTypes.message),
53
+ /**
54
+ * children of type `Checkbox`
55
+ */
56
+ children: ChildrenPropTypes.oneOf([Checkbox]),
57
+ size: PropTypes.oneOf(['small', 'medium', 'large']),
58
+ layout: PropTypes.oneOf(['stacked', 'columns', 'inline'])
59
+ };
25
60
  const allowedProps = ['name', 'description', 'defaultValue', 'value', 'onChange', 'disabled', 'readOnly', 'messages', 'children', 'size', 'layout'];
26
- export { allowedProps };
61
+ export { propTypes, allowedProps };
@@ -95,7 +95,7 @@ let CheckboxFacade = exports.CheckboxFacade = (_dec = (0, _emotion.withStyle)(_s
95
95
  })]
96
96
  });
97
97
  }
98
- }, _CheckboxFacade.displayName = "CheckboxFacade", _CheckboxFacade.componentId = 'CheckboxFacade', _CheckboxFacade.allowedProps = _props.allowedProps, _CheckboxFacade.defaultProps = {
98
+ }, _CheckboxFacade.displayName = "CheckboxFacade", _CheckboxFacade.componentId = 'CheckboxFacade', _CheckboxFacade.propTypes = _props.propTypes, _CheckboxFacade.allowedProps = _props.allowedProps, _CheckboxFacade.defaultProps = {
99
99
  checked: false,
100
100
  focused: false,
101
101
  hovered: false,
@@ -1,9 +1,11 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
6
- exports.allowedProps = void 0;
7
+ exports.propTypes = exports.allowedProps = void 0;
8
+ var _propTypes = _interopRequireDefault(require("prop-types"));
7
9
  /*
8
10
  * The MIT License (MIT)
9
11
  *
@@ -28,4 +30,13 @@ exports.allowedProps = void 0;
28
30
  * SOFTWARE.
29
31
  */
30
32
 
33
+ const propTypes = exports.propTypes = {
34
+ children: _propTypes.default.node.isRequired,
35
+ checked: _propTypes.default.bool,
36
+ focused: _propTypes.default.bool,
37
+ hovered: _propTypes.default.bool,
38
+ size: _propTypes.default.oneOf(['small', 'medium', 'large']),
39
+ indeterminate: _propTypes.default.bool,
40
+ invalid: _propTypes.default.bool
41
+ };
31
42
  const allowedProps = exports.allowedProps = ['children', 'checked', 'focused', 'hovered', 'size', 'indeterminate'];
@@ -101,7 +101,7 @@ let ToggleFacade = exports.ToggleFacade = (_dec = (0, _emotion.withStyle)(_style
101
101
  }), labelPlacement === 'end' && this.renderLabel()]
102
102
  });
103
103
  }
104
- }, _ToggleFacade.displayName = "ToggleFacade", _ToggleFacade.componentId = 'ToggleFacade', _ToggleFacade.allowedProps = _props.allowedProps, _ToggleFacade.defaultProps = {
104
+ }, _ToggleFacade.displayName = "ToggleFacade", _ToggleFacade.componentId = 'ToggleFacade', _ToggleFacade.propTypes = _props.propTypes, _ToggleFacade.allowedProps = _props.allowedProps, _ToggleFacade.defaultProps = {
105
105
  checked: false,
106
106
  focused: false,
107
107
  size: 'medium',
@@ -1,9 +1,11 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
6
- exports.allowedProps = void 0;
7
+ exports.propTypes = exports.allowedProps = void 0;
8
+ var _propTypes = _interopRequireDefault(require("prop-types"));
7
9
  /*
8
10
  * The MIT License (MIT)
9
11
  *
@@ -28,4 +30,14 @@ exports.allowedProps = void 0;
28
30
  * SOFTWARE.
29
31
  */
30
32
 
33
+ const propTypes = exports.propTypes = {
34
+ children: _propTypes.default.node.isRequired,
35
+ checked: _propTypes.default.bool,
36
+ disabled: _propTypes.default.bool,
37
+ readOnly: _propTypes.default.bool,
38
+ focused: _propTypes.default.bool,
39
+ size: _propTypes.default.oneOf(['small', 'medium', 'large']),
40
+ labelPlacement: _propTypes.default.oneOf(['top', 'start', 'end']),
41
+ invalid: _propTypes.default.bool
42
+ };
31
43
  const allowedProps = exports.allowedProps = ['children', 'checked', 'disabled', 'readOnly', 'focused', 'size', 'labelPlacement'];
@@ -27,6 +27,7 @@ var _isActiveElement = require("@instructure/ui-dom-utils/lib/isActiveElement.js
27
27
  var _omitProps = require("@instructure/ui-react-utils/lib/omitProps.js");
28
28
  var _withDeterministicId = require("@instructure/ui-react-utils/lib/DeterministicIdContext/withDeterministicId.js");
29
29
  var _View = require("@instructure/ui-view/lib/View");
30
+ var _testable = require("@instructure/ui-testable/lib/testable.js");
30
31
  var _emotion = require("@instructure/emotion");
31
32
  var _CheckboxFacade = require("./CheckboxFacade");
32
33
  var _ToggleFacade = require("./ToggleFacade");
@@ -34,7 +35,7 @@ var _styles = _interopRequireDefault(require("./styles"));
34
35
  var _theme = _interopRequireDefault(require("./theme"));
35
36
  var _props = require("./props");
36
37
  var _jsxRuntime = require("@emotion/react/jsx-runtime");
37
- var _dec, _dec2, _class, _Checkbox;
38
+ var _dec, _dec2, _dec3, _class, _Checkbox;
38
39
  /*
39
40
  * The MIT License (MIT)
40
41
  *
@@ -64,7 +65,7 @@ category: components
64
65
  tags: toggle, switch
65
66
  ---
66
67
  **/
67
- let Checkbox = exports.Checkbox = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec2 = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = _dec2(_class = (_Checkbox = class Checkbox extends _react.Component {
68
+ let Checkbox = exports.Checkbox = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec2 = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec3 = (0, _testable.testable)(), _dec(_class = _dec2(_class = _dec3(_class = (_Checkbox = class Checkbox extends _react.Component {
68
69
  constructor(props) {
69
70
  super(props);
70
71
  this._defaultId = void 0;
@@ -255,7 +256,6 @@ let Checkbox = exports.Checkbox = (_dec = (0, _withDeterministicId.withDetermini
255
256
  /* eslint-disable-next-line jsx-a11y/mouse-events-have-key-events */,
256
257
  onMouseOut: (0, _createChainedFunction.createChainedFunction)(onMouseOut, this.handleMouseOut),
257
258
  ref: this.handleRef,
258
- "data-cid": "Checkbox",
259
259
  children: (0, _jsxRuntime.jsxs)("div", {
260
260
  css: styles === null || styles === void 0 ? void 0 : styles.container,
261
261
  children: [(0, _jsxRuntime.jsx)("input", {
@@ -281,7 +281,7 @@ let Checkbox = exports.Checkbox = (_dec = (0, _withDeterministicId.withDetermini
281
281
  })
282
282
  });
283
283
  }
284
- }, _Checkbox.displayName = "Checkbox", _Checkbox.componentId = 'Checkbox', _Checkbox.allowedProps = _props.allowedProps, _Checkbox.defaultProps = {
284
+ }, _Checkbox.displayName = "Checkbox", _Checkbox.componentId = 'Checkbox', _Checkbox.propTypes = _props.propTypes, _Checkbox.allowedProps = _props.allowedProps, _Checkbox.defaultProps = {
285
285
  size: 'medium',
286
286
  variant: 'simple',
287
287
  disabled: false,
@@ -289,5 +289,5 @@ let Checkbox = exports.Checkbox = (_dec = (0, _withDeterministicId.withDetermini
289
289
  indeterminate: false,
290
290
  readOnly: false,
291
291
  labelPlacement: 'end'
292
- }, _Checkbox)) || _class) || _class);
292
+ }, _Checkbox)) || _class) || _class) || _class);
293
293
  var _default = exports.default = Checkbox;
@@ -1,9 +1,13 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
6
- exports.allowedProps = void 0;
7
+ exports.propTypes = exports.allowedProps = void 0;
8
+ var _propTypes = _interopRequireDefault(require("prop-types"));
9
+ var _FormPropTypes = require("@instructure/ui-form-field/lib/FormPropTypes.js");
10
+ var _controllable = require("@instructure/ui-prop-types/lib/controllable.js");
7
11
  /*
8
12
  * The MIT License (MIT)
9
13
  *
@@ -28,4 +32,27 @@ exports.allowedProps = void 0;
28
32
  * SOFTWARE.
29
33
  */
30
34
 
35
+ const propTypes = exports.propTypes = {
36
+ label: _propTypes.default.node.isRequired,
37
+ id: _propTypes.default.string,
38
+ value: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]),
39
+ messages: _propTypes.default.arrayOf(_FormPropTypes.FormPropTypes.message),
40
+ defaultChecked: _propTypes.default.bool,
41
+ checked: (0, _controllable.controllable)(_propTypes.default.bool, 'onChange', 'defaultChecked'),
42
+ onChange: _propTypes.default.func,
43
+ onKeyDown: _propTypes.default.func,
44
+ onFocus: _propTypes.default.func,
45
+ onBlur: _propTypes.default.func,
46
+ onMouseOver: _propTypes.default.func,
47
+ onMouseOut: _propTypes.default.func,
48
+ disabled: _propTypes.default.bool,
49
+ readOnly: _propTypes.default.bool,
50
+ indeterminate: _propTypes.default.bool,
51
+ size: _propTypes.default.oneOf(['small', 'medium', 'large']),
52
+ variant: _propTypes.default.oneOf(['simple', 'toggle']),
53
+ inline: _propTypes.default.bool,
54
+ labelPlacement: _propTypes.default.oneOf(['top', 'start', 'end']),
55
+ isRequired: _propTypes.default.bool,
56
+ inputRef: _propTypes.default.func
57
+ };
31
58
  const allowedProps = exports.allowedProps = ['label', 'id', 'value', 'messages', 'defaultChecked', 'checked', 'onChange', 'onKeyDown', 'onFocus', 'onBlur', 'onMouseOver', 'onMouseOut', 'disabled', 'readOnly', 'indeterminate', 'size', 'variant', 'inline', 'labelPlacement', 'isRequired', 'inputRef'];
@@ -11,10 +11,11 @@ var _safeCloneElement = require("@instructure/ui-react-utils/lib/safeCloneElemen
11
11
  var _pickProps = require("@instructure/ui-react-utils/lib/pickProps.js");
12
12
  var _omitProps = require("@instructure/ui-react-utils/lib/omitProps.js");
13
13
  var _withDeterministicId = require("@instructure/ui-react-utils/lib/DeterministicIdContext/withDeterministicId.js");
14
+ var _testable = require("@instructure/ui-testable/lib/testable.js");
14
15
  var _Checkbox = require("../Checkbox");
15
16
  var _props = require("./props");
16
17
  var _jsxRuntime = require("@emotion/react/jsx-runtime");
17
- var _dec, _class, _CheckboxGroup;
18
+ var _dec, _dec2, _class, _CheckboxGroup;
18
19
  /*
19
20
  * The MIT License (MIT)
20
21
  *
@@ -43,7 +44,7 @@ var _dec, _class, _CheckboxGroup;
43
44
  category: components
44
45
  ---
45
46
  **/
46
- let CheckboxGroup = exports.CheckboxGroup = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec(_class = (_CheckboxGroup = class CheckboxGroup extends _react.Component {
47
+ let CheckboxGroup = exports.CheckboxGroup = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec2 = (0, _testable.testable)(), _dec(_class = _dec2(_class = (_CheckboxGroup = class CheckboxGroup extends _react.Component {
47
48
  constructor(props) {
48
49
  super(props);
49
50
  this._messagesId = void 0;
@@ -119,15 +120,14 @@ let CheckboxGroup = exports.CheckboxGroup = (_dec = (0, _withDeterministicId.wit
119
120
  vAlign: "top",
120
121
  messagesId: this._messagesId,
121
122
  elementRef: this.handleRef,
122
- "data-cid": "CheckboxGroup",
123
123
  children: this.renderChildren()
124
124
  });
125
125
  }
126
- }, _CheckboxGroup.displayName = "CheckboxGroup", _CheckboxGroup.componentId = 'CheckboxGroup', _CheckboxGroup.allowedProps = _props.allowedProps, _CheckboxGroup.defaultProps = {
126
+ }, _CheckboxGroup.displayName = "CheckboxGroup", _CheckboxGroup.componentId = 'CheckboxGroup', _CheckboxGroup.propTypes = _props.propTypes, _CheckboxGroup.allowedProps = _props.allowedProps, _CheckboxGroup.defaultProps = {
127
127
  disabled: false,
128
128
  readOnly: false,
129
129
  size: 'medium',
130
130
  layout: 'stacked',
131
131
  children: null
132
- }, _CheckboxGroup)) || _class);
132
+ }, _CheckboxGroup)) || _class) || _class);
133
133
  var _default = exports.default = CheckboxGroup;
@@ -1,9 +1,15 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
6
- exports.allowedProps = void 0;
7
+ exports.propTypes = exports.allowedProps = void 0;
8
+ var _propTypes = _interopRequireDefault(require("prop-types"));
9
+ var _FormPropTypes = require("@instructure/ui-form-field/lib/FormPropTypes.js");
10
+ var _controllable = require("@instructure/ui-prop-types/lib/controllable.js");
11
+ var _Children = require("@instructure/ui-prop-types/lib/Children.js");
12
+ var _Checkbox = require("../Checkbox");
7
13
  /*
8
14
  * The MIT License (MIT)
9
15
  *
@@ -28,4 +34,35 @@ exports.allowedProps = void 0;
28
34
  * SOFTWARE.
29
35
  */
30
36
 
37
+ const propTypes = exports.propTypes = {
38
+ name: _propTypes.default.string.isRequired,
39
+ description: _propTypes.default.node.isRequired,
40
+ /**
41
+ * value to set on initial render
42
+ */
43
+ defaultValue: _propTypes.default.array,
44
+ /**
45
+ * the selected values (must be accompanied by an `onChange` prop)
46
+ */
47
+ value: (0, _controllable.controllable)(_propTypes.default.array),
48
+ /**
49
+ * when used with the `value` prop, the component will not control its own state
50
+ */
51
+ onChange: _propTypes.default.func,
52
+ disabled: _propTypes.default.bool,
53
+ readOnly: _propTypes.default.bool,
54
+ /**
55
+ * object with shape: `{
56
+ text: PropTypes.node,
57
+ type: PropTypes.oneOf(['error', 'hint', 'success', 'screenreader-only'])
58
+ }`
59
+ */
60
+ messages: _propTypes.default.arrayOf(_FormPropTypes.FormPropTypes.message),
61
+ /**
62
+ * children of type `Checkbox`
63
+ */
64
+ children: _Children.Children.oneOf([_Checkbox.Checkbox]),
65
+ size: _propTypes.default.oneOf(['small', 'medium', 'large']),
66
+ layout: _propTypes.default.oneOf(['stacked', 'columns', 'inline'])
67
+ };
31
68
  const allowedProps = exports.allowedProps = ['name', 'description', 'defaultValue', 'value', 'onChange', 'disabled', 'readOnly', 'messages', 'children', 'size', 'layout'];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-checkbox",
3
- "version": "10.26.1-snapshot-2",
3
+ "version": "10.26.2",
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,31 +24,34 @@
24
24
  "license": "MIT",
25
25
  "dependencies": {
26
26
  "@babel/runtime": "^7.27.6",
27
- "@instructure/console": "10.26.1-snapshot-2",
28
- "@instructure/emotion": "10.26.1-snapshot-2",
29
- "@instructure/shared-types": "10.26.1-snapshot-2",
30
- "@instructure/ui-dom-utils": "10.26.1-snapshot-2",
31
- "@instructure/ui-form-field": "10.26.1-snapshot-2",
32
- "@instructure/ui-icons": "10.26.1-snapshot-2",
33
- "@instructure/ui-react-utils": "10.26.1-snapshot-2",
34
- "@instructure/ui-svg-images": "10.26.1-snapshot-2",
35
- "@instructure/ui-utils": "10.26.1-snapshot-2",
36
- "@instructure/ui-view": "10.26.1-snapshot-2",
37
- "@instructure/uid": "10.26.1-snapshot-2",
38
- "keycode": "^2"
27
+ "@instructure/console": "10.26.2",
28
+ "@instructure/emotion": "10.26.2",
29
+ "@instructure/shared-types": "10.26.2",
30
+ "@instructure/ui-dom-utils": "10.26.2",
31
+ "@instructure/ui-form-field": "10.26.2",
32
+ "@instructure/ui-icons": "10.26.2",
33
+ "@instructure/ui-prop-types": "10.26.2",
34
+ "@instructure/ui-react-utils": "10.26.2",
35
+ "@instructure/ui-svg-images": "10.26.2",
36
+ "@instructure/ui-testable": "10.26.2",
37
+ "@instructure/ui-utils": "10.26.2",
38
+ "@instructure/ui-view": "10.26.2",
39
+ "@instructure/uid": "10.26.2",
40
+ "keycode": "^2",
41
+ "prop-types": "^15.8.1"
39
42
  },
40
43
  "devDependencies": {
41
- "@instructure/ui-axe-check": "10.26.1-snapshot-2",
42
- "@instructure/ui-babel-preset": "10.26.1-snapshot-2",
43
- "@instructure/ui-color-utils": "10.26.1-snapshot-2",
44
- "@instructure/ui-themes": "10.26.1-snapshot-2",
44
+ "@instructure/ui-axe-check": "10.26.2",
45
+ "@instructure/ui-babel-preset": "10.26.2",
46
+ "@instructure/ui-color-utils": "10.26.2",
47
+ "@instructure/ui-themes": "10.26.2",
45
48
  "@testing-library/jest-dom": "^6.6.3",
46
- "@testing-library/react": "15.0.7",
49
+ "@testing-library/react": "^16.0.1",
47
50
  "@testing-library/user-event": "^14.6.1",
48
51
  "vitest": "^3.2.2"
49
52
  },
50
53
  "peerDependencies": {
51
- "react": ">=18 <=19"
54
+ "react": ">=16.14 <=18"
52
55
  },
53
56
  "publishConfig": {
54
57
  "access": "public"
@@ -32,7 +32,7 @@ import { withStyle } from '@instructure/emotion'
32
32
  import generateStyle from './styles'
33
33
  import generateComponentTheme from './theme'
34
34
 
35
- import { allowedProps } from './props'
35
+ import { propTypes, allowedProps } from './props'
36
36
  import type { CheckboxFacadeProps } from './props'
37
37
 
38
38
  /**
@@ -44,6 +44,7 @@ parent: Checkbox
44
44
  class CheckboxFacade extends Component<CheckboxFacadeProps> {
45
45
  static readonly componentId = 'CheckboxFacade'
46
46
 
47
+ static propTypes = propTypes
47
48
  static allowedProps = allowedProps
48
49
  static defaultProps = {
49
50
  checked: false,