@instructure/ui-checkbox 11.7.9-snapshot-5 → 11.7.10

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/CHANGELOG.md CHANGED
@@ -3,12 +3,18 @@
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
- ## [11.7.9-snapshot-5](https://github.com/instructure/instructure-ui/compare/v11.7.8...v11.7.9-snapshot-5) (2026-10-13)
6
+ ## [11.7.10](https://github.com/instructure/instructure-ui/compare/v11.7.8...v11.7.10) (2026-10-14)
7
7
 
8
- **Note:** Version bump only for package @instructure/ui-checkbox
8
+ ### Bug Fixes
9
+
10
+ * **many:** Stop wrapping form field controls in their label ([#2740](https://github.com/instructure/instructure-ui/issues/2740)) ([467269e](https://github.com/instructure/instructure-ui/commit/467269ea6d66c88ef9deb8bd14980730bbd645e8))
9
11
 
10
12
 
13
+ ## [11.7.9](https://github.com/instructure/instructure-ui/compare/v11.7.8...v11.7.9) (2026-10-13)
14
+
15
+ ### Bug Fixes
11
16
 
17
+ * **many:** Stop wrapping form field controls in their label ([#2740](https://github.com/instructure/instructure-ui/issues/2740)) ([467269e](https://github.com/instructure/instructure-ui/commit/467269ea6d66c88ef9deb8bd14980730bbd645e8))
12
18
 
13
19
 
14
20
  ## [11.7.8](https://github.com/instructure/instructure-ui/compare/v11.7.7...v11.7.8) (2026-10-02)
@@ -1,4 +1,3 @@
1
- var _dec, _class;
2
1
  /*
3
2
  * The MIT License (MIT)
4
3
  *
@@ -25,7 +24,7 @@ var _dec, _class;
25
24
 
26
25
  import { Children, Component } from 'react';
27
26
  import { FormFieldGroup } from '@instructure/ui-form-field/latest';
28
- import { matchComponentTypes, safeCloneElement, pickProps, omitProps, withDeterministicId } from '@instructure/ui-react-utils';
27
+ import { matchComponentTypes, safeCloneElement, pickProps, omitProps } from '@instructure/ui-react-utils';
29
28
  import { Checkbox } from '../../Checkbox/v2/index.js';
30
29
  import { allowedProps } from './props.js';
31
30
  import { jsx as _jsx } from "@emotion/react/jsx-runtime";
@@ -34,7 +33,7 @@ import { jsx as _jsx } from "@emotion/react/jsx-runtime";
34
33
  category: components
35
34
  ---
36
35
  **/
37
- let CheckboxGroup = (_dec = withDeterministicId(), _dec(_class = class CheckboxGroup extends Component {
36
+ class CheckboxGroup extends Component {
38
37
  static displayName = 'CheckboxGroup';
39
38
  static componentId = 'CheckboxGroup';
40
39
  static allowedProps = allowedProps;
@@ -52,16 +51,11 @@ let CheckboxGroup = (_dec = withDeterministicId(), _dec(_class = class CheckboxG
52
51
  value: props.defaultValue || []
53
52
  };
54
53
  }
55
- this._messagesId = props.deterministicId();
56
54
  }
57
- _messagesId;
58
55
  ref = null;
59
56
  handleRef = el => {
60
57
  this.ref = el;
61
58
  };
62
- get hasMessages() {
63
- return this.props.messages && this.props.messages.length > 0;
64
- }
65
59
  handleChange = e => {
66
60
  const newValue = this.value;
67
61
  if (this.props.disabled || this.props.readOnly) {
@@ -85,7 +79,7 @@ let CheckboxGroup = (_dec = withDeterministicId(), _dec(_class = class CheckboxG
85
79
  get value() {
86
80
  return typeof this.props.value === 'undefined' ? [...this.state.value] : [...this.props.value];
87
81
  }
88
- renderChildren() {
82
+ renderChildren(describedBy) {
89
83
  const {
90
84
  children,
91
85
  name,
@@ -105,7 +99,7 @@ let CheckboxGroup = (_dec = withDeterministicId(), _dec(_class = class CheckboxG
105
99
  checked: this.value.indexOf(child.props.value) > -1,
106
100
  onChange: this.handleChange,
107
101
  width: child.props.width || 'auto',
108
- 'aria-describedby': this.hasMessages ? this._messagesId : undefined
102
+ 'aria-describedby': describedBy
109
103
  });
110
104
  } else {
111
105
  return child;
@@ -119,12 +113,13 @@ let CheckboxGroup = (_dec = withDeterministicId(), _dec(_class = class CheckboxG
119
113
  description: this.props.description,
120
114
  rowSpacing: "small",
121
115
  vAlign: "top",
122
- messagesId: this._messagesId,
123
116
  elementRef: this.handleRef,
124
117
  "data-cid": "CheckboxGroup",
125
- children: this.renderChildren()
118
+ children: ({
119
+ describedBy
120
+ }) => this.renderChildren(describedBy)
126
121
  });
127
122
  }
128
- }) || _class);
123
+ }
129
124
  export default CheckboxGroup;
130
125
  export { CheckboxGroup };
@@ -10,7 +10,6 @@ var _uiReactUtils = require("@instructure/ui-react-utils");
10
10
  var _index = require("../../Checkbox/v2/index.js");
11
11
  var _props = require("./props.js");
12
12
  var _jsxRuntime = require("@emotion/react/jsx-runtime");
13
- var _dec, _class;
14
13
  /*
15
14
  * The MIT License (MIT)
16
15
  *
@@ -34,12 +33,13 @@ var _dec, _class;
34
33
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
35
34
  * SOFTWARE.
36
35
  */
36
+
37
37
  /**
38
38
  ---
39
39
  category: components
40
40
  ---
41
41
  **/
42
- let CheckboxGroup = exports.CheckboxGroup = (_dec = (0, _uiReactUtils.withDeterministicId)(), _dec(_class = class CheckboxGroup extends _react.Component {
42
+ class CheckboxGroup extends _react.Component {
43
43
  static displayName = 'CheckboxGroup';
44
44
  static componentId = 'CheckboxGroup';
45
45
  static allowedProps = _props.allowedProps;
@@ -57,16 +57,11 @@ let CheckboxGroup = exports.CheckboxGroup = (_dec = (0, _uiReactUtils.withDeterm
57
57
  value: props.defaultValue || []
58
58
  };
59
59
  }
60
- this._messagesId = props.deterministicId();
61
60
  }
62
- _messagesId;
63
61
  ref = null;
64
62
  handleRef = el => {
65
63
  this.ref = el;
66
64
  };
67
- get hasMessages() {
68
- return this.props.messages && this.props.messages.length > 0;
69
- }
70
65
  handleChange = e => {
71
66
  const newValue = this.value;
72
67
  if (this.props.disabled || this.props.readOnly) {
@@ -90,7 +85,7 @@ let CheckboxGroup = exports.CheckboxGroup = (_dec = (0, _uiReactUtils.withDeterm
90
85
  get value() {
91
86
  return typeof this.props.value === 'undefined' ? [...this.state.value] : [...this.props.value];
92
87
  }
93
- renderChildren() {
88
+ renderChildren(describedBy) {
94
89
  const {
95
90
  children,
96
91
  name,
@@ -110,7 +105,7 @@ let CheckboxGroup = exports.CheckboxGroup = (_dec = (0, _uiReactUtils.withDeterm
110
105
  checked: this.value.indexOf(child.props.value) > -1,
111
106
  onChange: this.handleChange,
112
107
  width: child.props.width || 'auto',
113
- 'aria-describedby': this.hasMessages ? this._messagesId : undefined
108
+ 'aria-describedby': describedBy
114
109
  });
115
110
  } else {
116
111
  return child;
@@ -124,11 +119,13 @@ let CheckboxGroup = exports.CheckboxGroup = (_dec = (0, _uiReactUtils.withDeterm
124
119
  description: this.props.description,
125
120
  rowSpacing: "small",
126
121
  vAlign: "top",
127
- messagesId: this._messagesId,
128
122
  elementRef: this.handleRef,
129
123
  "data-cid": "CheckboxGroup",
130
- children: this.renderChildren()
124
+ children: ({
125
+ describedBy
126
+ }) => this.renderChildren(describedBy)
131
127
  });
132
128
  }
133
- }) || _class);
129
+ }
130
+ exports.CheckboxGroup = CheckboxGroup;
134
131
  var _default = exports.default = CheckboxGroup;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-checkbox",
3
- "version": "11.7.9-snapshot-5",
3
+ "version": "11.7.10",
4
4
  "description": " styled HTML input type='checkbox' component.",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "module": "./es/index.js",
@@ -15,24 +15,24 @@
15
15
  "license": "MIT",
16
16
  "dependencies": {
17
17
  "@babel/runtime": "^7.29.7",
18
- "@instructure/console": "11.7.9-snapshot-5",
19
- "@instructure/emotion": "11.7.9-snapshot-5",
20
- "@instructure/shared-types": "11.7.9-snapshot-5",
21
- "@instructure/ui-dom-utils": "11.7.9-snapshot-5",
22
- "@instructure/ui-form-field": "11.7.9-snapshot-5",
23
- "@instructure/ui-icons": "11.7.9-snapshot-5",
24
- "@instructure/ui-react-utils": "11.7.9-snapshot-5",
25
- "@instructure/ui-svg-images": "11.7.9-snapshot-5",
26
- "@instructure/ui-themes": "11.7.9-snapshot-5",
27
- "@instructure/ui-utils": "11.7.9-snapshot-5",
28
- "@instructure/ui-view": "11.7.9-snapshot-5",
29
- "@instructure/uid": "11.7.9-snapshot-5",
18
+ "@instructure/console": "11.7.10",
19
+ "@instructure/emotion": "11.7.10",
20
+ "@instructure/shared-types": "11.7.10",
21
+ "@instructure/ui-dom-utils": "11.7.10",
22
+ "@instructure/ui-form-field": "11.7.10",
23
+ "@instructure/ui-icons": "11.7.10",
24
+ "@instructure/ui-react-utils": "11.7.10",
25
+ "@instructure/ui-svg-images": "11.7.10",
26
+ "@instructure/ui-themes": "11.7.10",
27
+ "@instructure/ui-utils": "11.7.10",
28
+ "@instructure/ui-view": "11.7.10",
29
+ "@instructure/uid": "11.7.10",
30
30
  "keycode": "^2"
31
31
  },
32
32
  "devDependencies": {
33
- "@instructure/ui-axe-check": "11.7.9-snapshot-5",
34
- "@instructure/ui-babel-preset": "11.7.9-snapshot-5",
35
- "@instructure/ui-color-utils": "11.7.9-snapshot-5",
33
+ "@instructure/ui-axe-check": "11.7.10",
34
+ "@instructure/ui-babel-preset": "11.7.10",
35
+ "@instructure/ui-color-utils": "11.7.10",
36
36
  "vitest": "^5.0.0"
37
37
  },
38
38
  "peerDependencies": {
@@ -29,8 +29,7 @@ import {
29
29
  matchComponentTypes,
30
30
  safeCloneElement,
31
31
  pickProps,
32
- omitProps,
33
- withDeterministicId
32
+ omitProps
34
33
  } from '@instructure/ui-react-utils'
35
34
 
36
35
  import { Checkbox } from '../../Checkbox/v2/index.js'
@@ -47,8 +46,6 @@ import type {
47
46
  category: components
48
47
  ---
49
48
  **/
50
-
51
- @withDeterministicId()
52
49
  class CheckboxGroup extends Component<CheckboxGroupProps, CheckboxGroupState> {
53
50
  static displayName = 'CheckboxGroup'
54
51
  static readonly componentId = 'CheckboxGroup'
@@ -70,20 +67,14 @@ class CheckboxGroup extends Component<CheckboxGroupProps, CheckboxGroupState> {
70
67
  value: props.defaultValue || []
71
68
  }
72
69
  }
73
-
74
- this._messagesId = props.deterministicId!()
75
70
  }
76
- private readonly _messagesId: string
71
+
77
72
  ref: Element | null = null
78
73
 
79
74
  handleRef = (el: Element | null) => {
80
75
  this.ref = el
81
76
  }
82
77
 
83
- get hasMessages() {
84
- return this.props.messages && this.props.messages.length > 0
85
- }
86
-
87
78
  handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {
88
79
  const newValue = this.value
89
80
 
@@ -113,7 +104,7 @@ class CheckboxGroup extends Component<CheckboxGroupProps, CheckboxGroupState> {
113
104
  : [...this.props.value]
114
105
  }
115
106
 
116
- renderChildren() {
107
+ renderChildren(describedBy?: string) {
117
108
  const { children, name, size, disabled, readOnly } = this.props
118
109
 
119
110
  return Children.map(children, (child) => {
@@ -128,7 +119,7 @@ class CheckboxGroup extends Component<CheckboxGroupProps, CheckboxGroupState> {
128
119
  checked: this.value.indexOf(child.props.value!) > -1,
129
120
  onChange: this.handleChange,
130
121
  width: child.props.width || 'auto',
131
- 'aria-describedby': this.hasMessages ? this._messagesId : undefined
122
+ 'aria-describedby': describedBy
132
123
  })
133
124
  } else {
134
125
  return child
@@ -144,11 +135,10 @@ class CheckboxGroup extends Component<CheckboxGroupProps, CheckboxGroupState> {
144
135
  description={this.props.description}
145
136
  rowSpacing="small"
146
137
  vAlign="top"
147
- messagesId={this._messagesId}
148
138
  elementRef={this.handleRef}
149
139
  data-cid="CheckboxGroup"
150
140
  >
151
- {this.renderChildren()}
141
+ {({ describedBy }) => this.renderChildren(describedBy)}
152
142
  </FormFieldGroup>
153
143
  )
154
144
  }
@@ -25,7 +25,6 @@
25
25
  import { type InputHTMLAttributes } from 'react'
26
26
  import type { FormMessage } from '@instructure/ui-form-field/latest'
27
27
  import type { OtherHTMLAttributes } from '@instructure/shared-types'
28
- import type { WithDeterministicIdProps } from '@instructure/ui-react-utils'
29
28
  import type { Spacing } from '@instructure/emotion'
30
29
 
31
30
  import { Checkbox } from '../../Checkbox/v2/index.js'
@@ -61,8 +60,7 @@ type CheckboxGroupProps = CheckboxGroupOwnProps &
61
60
  OtherHTMLAttributes<
62
61
  CheckboxGroupOwnProps,
63
62
  InputHTMLAttributes<CheckboxGroupOwnProps & Element>
64
- > &
65
- WithDeterministicIdProps
63
+ >
66
64
  const allowedProps: AllowedPropKeys = [
67
65
  'name',
68
66
  'description',