@instructure/ui-checkbox 10.5.0 → 10.5.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.
- package/CHANGELOG.md +11 -0
- package/es/Checkbox/index.js +2 -2
- package/lib/Checkbox/index.js +2 -2
- package/package.json +19 -19
- package/src/Checkbox/index.tsx +2 -2
- package/src/Checkbox/props.ts +1 -1
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/Checkbox/index.d.ts.map +1 -1
- package/types/Checkbox/props.d.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +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.5.1-snapshot-1](https://github.com/instructure/instructure-ui/compare/v10.5.0...v10.5.1-snapshot-1) (2024-11-11)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **many:** fix regression where form elements without label got misaligned ([139f7f1](https://github.com/instructure/instructure-ui/commit/139f7f130cd7e8372af869a13cfd50cd6a97fd85))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [10.5.0](https://github.com/instructure/instructure-ui/compare/v10.4.1...v10.5.0) (2024-11-07)
|
|
7
18
|
|
|
8
19
|
|
package/es/Checkbox/index.js
CHANGED
|
@@ -170,7 +170,7 @@ let Checkbox = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle, g
|
|
|
170
170
|
labelPlacement: labelPlacement,
|
|
171
171
|
themeOverride: themeOverride,
|
|
172
172
|
invalid: this.invalid
|
|
173
|
-
}, label, isRequired && jsx("span", {
|
|
173
|
+
}, label, isRequired && label && jsx("span", {
|
|
174
174
|
css: this.invalid ? styles === null || styles === void 0 ? void 0 : styles.requiredInvalid : {}
|
|
175
175
|
}, " *"));
|
|
176
176
|
} else {
|
|
@@ -182,7 +182,7 @@ let Checkbox = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle, g
|
|
|
182
182
|
indeterminate: indeterminate,
|
|
183
183
|
themeOverride: themeOverride,
|
|
184
184
|
invalid: this.invalid
|
|
185
|
-
}, label, isRequired && jsx("span", {
|
|
185
|
+
}, label, isRequired && label && jsx("span", {
|
|
186
186
|
css: this.invalid ? styles === null || styles === void 0 ? void 0 : styles.requiredInvalid : {}
|
|
187
187
|
}, " *"));
|
|
188
188
|
}
|
package/lib/Checkbox/index.js
CHANGED
|
@@ -191,7 +191,7 @@ let Checkbox = exports.Checkbox = (_dec = (0, _withDeterministicId.withDetermini
|
|
|
191
191
|
labelPlacement: labelPlacement,
|
|
192
192
|
themeOverride: themeOverride,
|
|
193
193
|
invalid: this.invalid
|
|
194
|
-
}, label, isRequired && (0, _emotion.jsx)("span", {
|
|
194
|
+
}, label, isRequired && label && (0, _emotion.jsx)("span", {
|
|
195
195
|
css: this.invalid ? styles === null || styles === void 0 ? void 0 : styles.requiredInvalid : {}
|
|
196
196
|
}, " *"));
|
|
197
197
|
} else {
|
|
@@ -203,7 +203,7 @@ let Checkbox = exports.Checkbox = (_dec = (0, _withDeterministicId.withDetermini
|
|
|
203
203
|
indeterminate: indeterminate,
|
|
204
204
|
themeOverride: themeOverride,
|
|
205
205
|
invalid: this.invalid
|
|
206
|
-
}, label, isRequired && (0, _emotion.jsx)("span", {
|
|
206
|
+
}, label, isRequired && label && (0, _emotion.jsx)("span", {
|
|
207
207
|
css: this.invalid ? styles === null || styles === void 0 ? void 0 : styles.requiredInvalid : {}
|
|
208
208
|
}, " *"));
|
|
209
209
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-checkbox",
|
|
3
|
-
"version": "10.5.
|
|
3
|
+
"version": "10.5.1-snapshot-1",
|
|
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.25.6",
|
|
27
|
-
"@instructure/console": "10.5.
|
|
28
|
-
"@instructure/emotion": "10.5.
|
|
29
|
-
"@instructure/shared-types": "10.5.
|
|
30
|
-
"@instructure/ui-dom-utils": "10.5.
|
|
31
|
-
"@instructure/ui-form-field": "10.5.
|
|
32
|
-
"@instructure/ui-icons": "10.5.
|
|
33
|
-
"@instructure/ui-prop-types": "10.5.
|
|
34
|
-
"@instructure/ui-react-utils": "10.5.
|
|
35
|
-
"@instructure/ui-svg-images": "10.5.
|
|
36
|
-
"@instructure/ui-testable": "10.5.
|
|
37
|
-
"@instructure/ui-utils": "10.5.
|
|
38
|
-
"@instructure/ui-view": "10.5.
|
|
39
|
-
"@instructure/uid": "10.5.
|
|
27
|
+
"@instructure/console": "10.5.1-snapshot-1",
|
|
28
|
+
"@instructure/emotion": "10.5.1-snapshot-1",
|
|
29
|
+
"@instructure/shared-types": "10.5.1-snapshot-1",
|
|
30
|
+
"@instructure/ui-dom-utils": "10.5.1-snapshot-1",
|
|
31
|
+
"@instructure/ui-form-field": "10.5.1-snapshot-1",
|
|
32
|
+
"@instructure/ui-icons": "10.5.1-snapshot-1",
|
|
33
|
+
"@instructure/ui-prop-types": "10.5.1-snapshot-1",
|
|
34
|
+
"@instructure/ui-react-utils": "10.5.1-snapshot-1",
|
|
35
|
+
"@instructure/ui-svg-images": "10.5.1-snapshot-1",
|
|
36
|
+
"@instructure/ui-testable": "10.5.1-snapshot-1",
|
|
37
|
+
"@instructure/ui-utils": "10.5.1-snapshot-1",
|
|
38
|
+
"@instructure/ui-view": "10.5.1-snapshot-1",
|
|
39
|
+
"@instructure/uid": "10.5.1-snapshot-1",
|
|
40
40
|
"keycode": "^2",
|
|
41
41
|
"prop-types": "^15.8.1"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@instructure/ui-axe-check": "10.5.
|
|
45
|
-
"@instructure/ui-babel-preset": "10.5.
|
|
46
|
-
"@instructure/ui-color-utils": "10.5.
|
|
47
|
-
"@instructure/ui-test-utils": "10.5.
|
|
48
|
-
"@instructure/ui-themes": "10.5.
|
|
44
|
+
"@instructure/ui-axe-check": "10.5.1-snapshot-1",
|
|
45
|
+
"@instructure/ui-babel-preset": "10.5.1-snapshot-1",
|
|
46
|
+
"@instructure/ui-color-utils": "10.5.1-snapshot-1",
|
|
47
|
+
"@instructure/ui-test-utils": "10.5.1-snapshot-1",
|
|
48
|
+
"@instructure/ui-themes": "10.5.1-snapshot-1",
|
|
49
49
|
"@testing-library/jest-dom": "^6.4.6",
|
|
50
50
|
"@testing-library/react": "^16.0.1",
|
|
51
51
|
"@testing-library/user-event": "^14.5.2",
|
package/src/Checkbox/index.tsx
CHANGED
|
@@ -230,7 +230,7 @@ class Checkbox extends Component<CheckboxProps, CheckboxState> {
|
|
|
230
230
|
invalid={this.invalid}
|
|
231
231
|
>
|
|
232
232
|
{label}
|
|
233
|
-
{isRequired && (
|
|
233
|
+
{isRequired && label && (
|
|
234
234
|
<span css={this.invalid ? styles?.requiredInvalid : {}}> *</span>
|
|
235
235
|
)}
|
|
236
236
|
</ToggleFacade>
|
|
@@ -247,7 +247,7 @@ class Checkbox extends Component<CheckboxProps, CheckboxState> {
|
|
|
247
247
|
invalid={this.invalid}
|
|
248
248
|
>
|
|
249
249
|
{label}
|
|
250
|
-
{isRequired && (
|
|
250
|
+
{isRequired && label && (
|
|
251
251
|
<span css={this.invalid ? styles?.requiredInvalid : {}}> *</span>
|
|
252
252
|
)}
|
|
253
253
|
</CheckboxFacade>
|
package/src/Checkbox/props.ts
CHANGED
|
@@ -44,7 +44,7 @@ type CheckboxOwnProps = {
|
|
|
44
44
|
/**
|
|
45
45
|
* Array of objects with shape: `{
|
|
46
46
|
* text: ReactNode,
|
|
47
|
-
* type: One of: ['error', 'hint', 'success', 'screenreader-only']
|
|
47
|
+
* type: One of: ['newError', 'error', 'hint', 'success', 'screenreader-only']
|
|
48
48
|
* }`
|
|
49
49
|
*/
|
|
50
50
|
messages?: FormMessage[]
|