@instructure/ui-form-field 9.10.1 → 9.11.0
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 +19 -0
- package/es/FormFieldGroup/index.js +3 -2
- package/es/FormFieldMessage/index.js +1 -1
- package/lib/FormFieldGroup/index.js +3 -2
- package/lib/FormFieldMessage/index.js +1 -1
- package/package.json +15 -15
- package/src/FormFieldGroup/index.tsx +2 -2
- package/src/FormFieldMessage/index.tsx +1 -1
- package/tsconfig.build.tsbuildinfo +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
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
|
+
# [9.11.0](https://github.com/instructure/instructure-ui/compare/v9.10.2...v9.11.0) (2025-02-12)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @instructure/ui-form-field
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [9.10.2](https://github.com/instructure/instructure-ui/compare/v9.10.1...v9.10.2) (2024-12-19)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* **ui-date-time-input,ui-form-field:** make DateTimeInput compatible with the new error format ([064a1a9](https://github.com/instructure/instructure-ui/commit/064a1a9e581660dfd2804d35f11d6ae514875614)), closes [#1826](https://github.com/instructure/instructure-ui/issues/1826)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
## [9.10.1](https://github.com/instructure/instructure-ui/compare/v9.10.0...v9.10.1) (2024-12-09)
|
|
7
26
|
|
|
8
27
|
**Note:** Version bump only for package @instructure/ui-form-field
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
2
|
-
const _excluded = ["styles", "makeStyles"];
|
|
2
|
+
const _excluded = ["styles", "makeStyles", "isGroup"];
|
|
3
3
|
var _dec, _class, _FormFieldGroup;
|
|
4
4
|
/*
|
|
5
5
|
* The MIT License (MIT)
|
|
@@ -96,6 +96,7 @@ let FormFieldGroup = (_dec = withStyle(generateStyle, generateComponentTheme), _
|
|
|
96
96
|
const _this$props3 = this.props,
|
|
97
97
|
styles = _this$props3.styles,
|
|
98
98
|
makeStyles = _this$props3.makeStyles,
|
|
99
|
+
isGroup = _this$props3.isGroup,
|
|
99
100
|
props = _objectWithoutProperties(_this$props3, _excluded);
|
|
100
101
|
return jsx(FormFieldLayout, Object.assign({}, omitProps(props, FormFieldGroup.allowedProps), pickProps(props, FormFieldLayout.allowedProps), {
|
|
101
102
|
vAlign: props.vAlign,
|
|
@@ -104,7 +105,7 @@ let FormFieldGroup = (_dec = withStyle(generateStyle, generateComponentTheme), _
|
|
|
104
105
|
"aria-disabled": props.disabled ? 'true' : void 0,
|
|
105
106
|
"aria-invalid": this.invalid ? 'true' : void 0,
|
|
106
107
|
elementRef: this.handleRef,
|
|
107
|
-
isGroup:
|
|
108
|
+
isGroup: isGroup
|
|
108
109
|
}), this.renderFields());
|
|
109
110
|
}
|
|
110
111
|
}, _FormFieldGroup.displayName = "FormFieldGroup", _FormFieldGroup.componentId = 'FormFieldGroup', _FormFieldGroup.propTypes = propTypes, _FormFieldGroup.allowedProps = allowedProps, _FormFieldGroup.defaultProps = {
|
|
@@ -70,7 +70,7 @@ let FormFieldMessage = (_dec = withStyle(generateStyle, generateComponentTheme),
|
|
|
70
70
|
css: {
|
|
71
71
|
display: 'flex'
|
|
72
72
|
}
|
|
73
|
-
}, this.props.variant === 'newError' && jsx("span", {
|
|
73
|
+
}, this.props.variant === 'newError' && this.props.children && jsx("span", {
|
|
74
74
|
css: styles === null || styles === void 0 ? void 0 : styles.errorIcon
|
|
75
75
|
}, _IconWarningSolid || (_IconWarningSolid = jsx(IconWarningSolid, {
|
|
76
76
|
color: "error"
|
|
@@ -15,7 +15,7 @@ var _FormFieldLayout = require("../FormFieldLayout");
|
|
|
15
15
|
var _styles = _interopRequireDefault(require("./styles"));
|
|
16
16
|
var _theme = _interopRequireDefault(require("./theme"));
|
|
17
17
|
var _props = require("./props");
|
|
18
|
-
const _excluded = ["styles", "makeStyles"];
|
|
18
|
+
const _excluded = ["styles", "makeStyles", "isGroup"];
|
|
19
19
|
var _dec, _class, _FormFieldGroup;
|
|
20
20
|
/*
|
|
21
21
|
* The MIT License (MIT)
|
|
@@ -103,6 +103,7 @@ let FormFieldGroup = exports.FormFieldGroup = (_dec = (0, _emotion.withStyle)(_s
|
|
|
103
103
|
const _this$props3 = this.props,
|
|
104
104
|
styles = _this$props3.styles,
|
|
105
105
|
makeStyles = _this$props3.makeStyles,
|
|
106
|
+
isGroup = _this$props3.isGroup,
|
|
106
107
|
props = (0, _objectWithoutProperties2.default)(_this$props3, _excluded);
|
|
107
108
|
return (0, _emotion.jsx)(_FormFieldLayout.FormFieldLayout, Object.assign({}, (0, _omitProps.omitProps)(props, FormFieldGroup.allowedProps), (0, _pickProps.pickProps)(props, _FormFieldLayout.FormFieldLayout.allowedProps), {
|
|
108
109
|
vAlign: props.vAlign,
|
|
@@ -111,7 +112,7 @@ let FormFieldGroup = exports.FormFieldGroup = (_dec = (0, _emotion.withStyle)(_s
|
|
|
111
112
|
"aria-disabled": props.disabled ? 'true' : void 0,
|
|
112
113
|
"aria-invalid": this.invalid ? 'true' : void 0,
|
|
113
114
|
elementRef: this.handleRef,
|
|
114
|
-
isGroup:
|
|
115
|
+
isGroup: isGroup
|
|
115
116
|
}), this.renderFields());
|
|
116
117
|
}
|
|
117
118
|
}, _FormFieldGroup.displayName = "FormFieldGroup", _FormFieldGroup.componentId = 'FormFieldGroup', _FormFieldGroup.propTypes = _props.propTypes, _FormFieldGroup.allowedProps = _props.allowedProps, _FormFieldGroup.defaultProps = {
|
|
@@ -76,7 +76,7 @@ let FormFieldMessage = exports.FormFieldMessage = (_dec = (0, _emotion.withStyle
|
|
|
76
76
|
css: {
|
|
77
77
|
display: 'flex'
|
|
78
78
|
}
|
|
79
|
-
}, this.props.variant === 'newError' && (0, _emotion.jsx)("span", {
|
|
79
|
+
}, this.props.variant === 'newError' && this.props.children && (0, _emotion.jsx)("span", {
|
|
80
80
|
css: styles === null || styles === void 0 ? void 0 : styles.errorIcon
|
|
81
81
|
}, _IconWarningSolid || (_IconWarningSolid = (0, _emotion.jsx)(_IconWarningSolid2.IconWarningSolid, {
|
|
82
82
|
color: "error"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-form-field",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.11.0",
|
|
4
4
|
"description": "Form layout components.",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"module": "./es/index.js",
|
|
@@ -23,26 +23,26 @@
|
|
|
23
23
|
},
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@instructure/ui-axe-check": "9.
|
|
27
|
-
"@instructure/ui-babel-preset": "9.
|
|
28
|
-
"@instructure/ui-test-utils": "9.
|
|
29
|
-
"@instructure/ui-themes": "9.
|
|
26
|
+
"@instructure/ui-axe-check": "9.11.0",
|
|
27
|
+
"@instructure/ui-babel-preset": "9.11.0",
|
|
28
|
+
"@instructure/ui-test-utils": "9.11.0",
|
|
29
|
+
"@instructure/ui-themes": "9.11.0",
|
|
30
30
|
"@testing-library/jest-dom": "^6.4.6",
|
|
31
31
|
"@testing-library/react": "^15.0.7",
|
|
32
32
|
"vitest": "^2.0.2"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@babel/runtime": "^7.24.5",
|
|
36
|
-
"@instructure/console": "9.
|
|
37
|
-
"@instructure/emotion": "9.
|
|
38
|
-
"@instructure/shared-types": "9.
|
|
39
|
-
"@instructure/ui-a11y-content": "9.
|
|
40
|
-
"@instructure/ui-a11y-utils": "9.
|
|
41
|
-
"@instructure/ui-grid": "9.
|
|
42
|
-
"@instructure/ui-icons": "9.
|
|
43
|
-
"@instructure/ui-react-utils": "9.
|
|
44
|
-
"@instructure/ui-utils": "9.
|
|
45
|
-
"@instructure/uid": "9.
|
|
36
|
+
"@instructure/console": "9.11.0",
|
|
37
|
+
"@instructure/emotion": "9.11.0",
|
|
38
|
+
"@instructure/shared-types": "9.11.0",
|
|
39
|
+
"@instructure/ui-a11y-content": "9.11.0",
|
|
40
|
+
"@instructure/ui-a11y-utils": "9.11.0",
|
|
41
|
+
"@instructure/ui-grid": "9.11.0",
|
|
42
|
+
"@instructure/ui-icons": "9.11.0",
|
|
43
|
+
"@instructure/ui-react-utils": "9.11.0",
|
|
44
|
+
"@instructure/ui-utils": "9.11.0",
|
|
45
|
+
"@instructure/uid": "9.11.0",
|
|
46
46
|
"prop-types": "^15.8.1"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
@@ -133,7 +133,7 @@ class FormFieldGroup extends Component<FormFieldGroupProps> {
|
|
|
133
133
|
}
|
|
134
134
|
|
|
135
135
|
render() {
|
|
136
|
-
const { styles, makeStyles, ...props } = this.props
|
|
136
|
+
const { styles, makeStyles, isGroup, ...props } = this.props
|
|
137
137
|
|
|
138
138
|
return (
|
|
139
139
|
<FormFieldLayout
|
|
@@ -145,7 +145,7 @@ class FormFieldGroup extends Component<FormFieldGroupProps> {
|
|
|
145
145
|
aria-disabled={props.disabled ? 'true' : undefined}
|
|
146
146
|
aria-invalid={this.invalid ? 'true' : undefined}
|
|
147
147
|
elementRef={this.handleRef}
|
|
148
|
-
isGroup
|
|
148
|
+
isGroup={isGroup}
|
|
149
149
|
>
|
|
150
150
|
{this.renderFields()}
|
|
151
151
|
</FormFieldLayout>
|
|
@@ -81,7 +81,7 @@ class FormFieldMessage extends Component<FormFieldMessageProps> {
|
|
|
81
81
|
|
|
82
82
|
return this.props.variant !== 'screenreader-only' ? (
|
|
83
83
|
<span css={{ display: 'flex' }}>
|
|
84
|
-
{this.props.variant === 'newError' && (
|
|
84
|
+
{this.props.variant === 'newError' && this.props.children && (
|
|
85
85
|
<span css={styles?.errorIcon}>
|
|
86
86
|
<IconWarningSolid color="error" />
|
|
87
87
|
</span>
|