@instructure/ui-checkbox 11.7.3-snapshot-30 → 11.7.3-snapshot-31

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,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
- ## [11.7.3-snapshot-30](https://github.com/instructure/instructure-ui/compare/v11.7.2...v11.7.3-snapshot-30) (2026-05-07)
6
+ ## [11.7.3-snapshot-31](https://github.com/instructure/instructure-ui/compare/v11.7.2...v11.7.3-snapshot-31) (2026-05-07)
7
7
 
8
8
 
9
9
  ### Bug Fixes
@@ -11,6 +11,11 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
11
11
  * **many:** update dependencies, remove lots of Babel plugins, remove Webpack 4 support ([f916fca](https://github.com/instructure/instructure-ui/commit/f916fcafdddcb2d7de401f93e8ff92cfdfa47bba))
12
12
 
13
13
 
14
+ ### Features
15
+
16
+ * **ui-checkbox:** add data-checked attribute to reflect checked state ([a790019](https://github.com/instructure/instructure-ui/commit/a790019ed2b47064a01b7ec532494cc723943241))
17
+
18
+
14
19
 
15
20
 
16
21
 
@@ -257,6 +257,7 @@ let Checkbox = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle),
257
257
  children: _jsxs("div", {
258
258
  css: styles?.container,
259
259
  children: [_jsx("input", {
260
+ "data-checked": indeterminate ? 'mixed' : this.checked,
260
261
  ...props,
261
262
  id: this.id,
262
263
  value: value,
@@ -277,6 +277,7 @@ let Checkbox = exports.Checkbox = (_dec = (0, _withDeterministicId.withDetermini
277
277
  children: (0, _jsxRuntime.jsxs)("div", {
278
278
  css: styles?.container,
279
279
  children: [(0, _jsxRuntime.jsx)("input", {
280
+ "data-checked": indeterminate ? 'mixed' : this.checked,
280
281
  ...props,
281
282
  id: this.id,
282
283
  value: value,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-checkbox",
3
- "version": "11.7.3-snapshot-30",
3
+ "version": "11.7.3-snapshot-31",
4
4
  "description": " styled HTML input type='checkbox' component.",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "module": "./es/index.js",
@@ -16,27 +16,27 @@
16
16
  "dependencies": {
17
17
  "@babel/runtime": "^7.29.2",
18
18
  "keycode": "^2",
19
- "@instructure/console": "11.7.3-snapshot-30",
20
- "@instructure/emotion": "11.7.3-snapshot-30",
21
- "@instructure/ui-dom-utils": "11.7.3-snapshot-30",
22
- "@instructure/shared-types": "11.7.3-snapshot-30",
23
- "@instructure/ui-form-field": "11.7.3-snapshot-30",
24
- "@instructure/ui-icons": "11.7.3-snapshot-30",
25
- "@instructure/ui-react-utils": "11.7.3-snapshot-30",
26
- "@instructure/ui-svg-images": "11.7.3-snapshot-30",
27
- "@instructure/ui-themes": "11.7.3-snapshot-30",
28
- "@instructure/ui-view": "11.7.3-snapshot-30",
29
- "@instructure/uid": "11.7.3-snapshot-30",
30
- "@instructure/ui-utils": "11.7.3-snapshot-30"
19
+ "@instructure/console": "11.7.3-snapshot-31",
20
+ "@instructure/emotion": "11.7.3-snapshot-31",
21
+ "@instructure/shared-types": "11.7.3-snapshot-31",
22
+ "@instructure/ui-form-field": "11.7.3-snapshot-31",
23
+ "@instructure/ui-dom-utils": "11.7.3-snapshot-31",
24
+ "@instructure/ui-icons": "11.7.3-snapshot-31",
25
+ "@instructure/ui-react-utils": "11.7.3-snapshot-31",
26
+ "@instructure/ui-utils": "11.7.3-snapshot-31",
27
+ "@instructure/ui-view": "11.7.3-snapshot-31",
28
+ "@instructure/uid": "11.7.3-snapshot-31",
29
+ "@instructure/ui-themes": "11.7.3-snapshot-31",
30
+ "@instructure/ui-svg-images": "11.7.3-snapshot-31"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@testing-library/jest-dom": "^6.6.3",
34
34
  "@testing-library/react": "15.0.7",
35
35
  "@testing-library/user-event": "^14.6.1",
36
36
  "vitest": "^3.2.2",
37
- "@instructure/ui-babel-preset": "11.7.3-snapshot-30",
38
- "@instructure/ui-axe-check": "11.7.3-snapshot-30",
39
- "@instructure/ui-color-utils": "11.7.3-snapshot-30"
37
+ "@instructure/ui-axe-check": "11.7.3-snapshot-31",
38
+ "@instructure/ui-color-utils": "11.7.3-snapshot-31",
39
+ "@instructure/ui-babel-preset": "11.7.3-snapshot-31"
40
40
  },
41
41
  "peerDependencies": {
42
42
  "react": ">=18 <=19"
@@ -162,6 +162,10 @@ type: example
162
162
  />
163
163
  ```
164
164
 
165
+ ### Querying checked state from the DOM
166
+
167
+ The underlying `<input>` has a `data-checked` attribute (`"true"`, `"false"`, or `"mixed"` when indeterminate) that can be queried from the DOM to read the current state.
168
+
165
169
  ### Guidelines
166
170
 
167
171
  ```js
@@ -325,6 +325,7 @@ class Checkbox extends Component<CheckboxProps, CheckboxState> {
325
325
  >
326
326
  <div css={styles?.container}>
327
327
  <input
328
+ data-checked={indeterminate ? 'mixed' : this.checked}
328
329
  {...props}
329
330
  id={this.id}
330
331
  value={value}
@@ -80,6 +80,10 @@ type: example
80
80
  </CheckboxGroup>
81
81
  ```
82
82
 
83
+ ### Querying checked state from the DOM
84
+
85
+ Each `<Checkbox>` in the group exposes a `data-checked` attribute (`"true"` or `"false"`) on its underlying `<input>` that can be queried from the DOM to read the current state, for example for analytics tracking tools.
86
+
83
87
  ### Guidelines
84
88
 
85
89
  ```js