@instructure/ui-form-field 11.7.4-snapshot-3 → 11.7.4-snapshot-5
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 +43 -2
- package/README.md +0 -1
- package/es/FormFieldGroup/v2/index.js +14 -6
- package/es/exports/b.js +0 -1
- package/lib/FormFieldGroup/v2/index.js +13 -4
- package/lib/exports/b.js +8 -15
- package/package.json +14 -14
- package/src/FormFieldGroup/v2/index.tsx +23 -11
- package/src/FormFieldGroup/v2/props.ts +2 -1
- package/src/exports/b.ts +0 -2
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/FormFieldGroup/v2/index.d.ts.map +1 -1
- package/types/FormFieldGroup/v2/props.d.ts +2 -1
- package/types/FormFieldGroup/v2/props.d.ts.map +1 -1
- package/types/FormFieldLayout/v1/index.d.ts +1 -1
- package/types/exports/b.d.ts +0 -2
- package/types/exports/b.d.ts.map +1 -1
- package/es/FormFieldLabel/v2/index.js +0 -83
- package/es/FormFieldLabel/v2/props.js +0 -26
- package/es/FormFieldLabel/v2/styles.js +0 -64
- package/es/FormFieldLabel/v2/theme.js +0 -53
- package/lib/FormFieldLabel/v2/index.js +0 -89
- package/lib/FormFieldLabel/v2/props.js +0 -31
- package/lib/FormFieldLabel/v2/styles.js +0 -70
- package/lib/FormFieldLabel/v2/theme.js +0 -59
- package/src/FormFieldLabel/v2/index.tsx +0 -95
- package/src/FormFieldLabel/v2/props.ts +0 -49
- package/src/FormFieldLabel/v2/styles.ts +0 -74
- package/src/FormFieldLabel/v2/theme.ts +0 -56
- package/types/FormFieldLabel/v2/index.d.ts +0 -38
- package/types/FormFieldLabel/v2/index.d.ts.map +0 -1
- package/types/FormFieldLabel/v2/props.d.ts +0 -14
- package/types/FormFieldLabel/v2/props.d.ts.map +0 -1
- package/types/FormFieldLabel/v2/styles.d.ts +0 -15
- package/types/FormFieldLabel/v2/styles.d.ts.map +0 -1
- package/types/FormFieldLabel/v2/theme.d.ts +0 -10
- package/types/FormFieldLabel/v2/theme.d.ts.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,9 +3,50 @@
|
|
|
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.4-snapshot-
|
|
6
|
+
## [11.7.4-snapshot-5](https://github.com/instructure/instructure-ui/compare/v11.7.3...v11.7.4-snapshot-5) (2026-05-12)
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **ui-form-field:** disable child inputs when FormFieldGroup is disabled ([7fada35](https://github.com/instructure/instructure-ui/commit/7fada35327a9e53c387efb6cfbfc75a0759756ec))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* **many:** remove deprecated v2 items ([d5c1198](https://github.com/instructure/instructure-ui/commit/d5c1198820342f674c99bd7ef016ab2094d62a89))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### BREAKING CHANGES
|
|
20
|
+
|
|
21
|
+
* **many:** Removed FormFieldLabel component
|
|
22
|
+
|
|
23
|
+
Removed _content prop from DrawerLayout.Tray and DrawerLayout.Content
|
|
24
|
+
|
|
25
|
+
Removed _link prop from Link
|
|
26
|
+
|
|
27
|
+
Removed _node prop from Menu.Item
|
|
28
|
+
|
|
29
|
+
Removed _root prop from Pagination, TreeBrowser
|
|
30
|
+
|
|
31
|
+
Removed _select prop from SimpleSelect and TimeSelect
|
|
32
|
+
|
|
33
|
+
Removed _ref prop from TruncateText
|
|
34
|
+
|
|
35
|
+
Removed _element prop from View
|
|
36
|
+
|
|
37
|
+
Removed color="ai" from Heading
|
|
38
|
+
|
|
39
|
+
Removed variant="inline-small" and variant="standalone-small" from Link
|
|
40
|
+
|
|
41
|
+
Removed title prop from Tag
|
|
42
|
+
|
|
43
|
+
Removed focusRingBorderRadius prop from View
|
|
44
|
+
|
|
45
|
+
Removed hideActionsUserSeparator prop from TopNavBar.Layout
|
|
46
|
+
|
|
47
|
+
Removed handleFocusOutlineColor, handleFocusOutlineWidth, handleShadowColor from RangeInput
|
|
48
|
+
|
|
49
|
+
INSTUI-5025
|
|
9
50
|
|
|
10
51
|
|
|
11
52
|
|
package/README.md
CHANGED
|
@@ -12,7 +12,6 @@ The `ui-form-field` package contains the following:
|
|
|
12
12
|
|
|
13
13
|
- [FormField](FormField)
|
|
14
14
|
- [FormFieldGroup](FormFieldGroup)
|
|
15
|
-
- [FormFieldLabel](FormFieldLabel)
|
|
16
15
|
- [FormFieldLayout](FormFieldLayout)
|
|
17
16
|
- [FormFieldMessage](FormFieldMessage)
|
|
18
17
|
- [FormFieldMessages](FormFieldMessages)
|
|
@@ -23,9 +23,9 @@ var _dec, _class;
|
|
|
23
23
|
* SOFTWARE.
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
|
-
import { Component, Children } from 'react';
|
|
26
|
+
import { Component, Children, isValidElement } from 'react';
|
|
27
27
|
import { Grid } from '@instructure/ui-grid/latest';
|
|
28
|
-
import { pickProps, omitProps } from '@instructure/ui-react-utils';
|
|
28
|
+
import { pickProps, omitProps, safeCloneElement } from '@instructure/ui-react-utils';
|
|
29
29
|
import { withStyleNew } from '@instructure/emotion';
|
|
30
30
|
import { allowedProps as formFieldLayoutAllowedProps } from "../../FormFieldLayout/v2/props.js";
|
|
31
31
|
import { FormFieldLayout } from "../../FormFieldLayout/v2/index.js";
|
|
@@ -71,11 +71,19 @@ let FormFieldGroup = (_dec = withStyleNew(generateStyle), _dec(_class = class Fo
|
|
|
71
71
|
}) >= 0;
|
|
72
72
|
}
|
|
73
73
|
renderColumns() {
|
|
74
|
+
const {
|
|
75
|
+
disabled
|
|
76
|
+
} = this.props;
|
|
74
77
|
return Children.map(this.props.children, (child, index) => {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
78
|
+
if (!child) return null;
|
|
79
|
+
const el = child;
|
|
80
|
+
const renderedChild = disabled && /*#__PURE__*/isValidElement(el) ? safeCloneElement(el, {
|
|
81
|
+
disabled: true
|
|
82
|
+
}) : child;
|
|
83
|
+
return _jsx(Grid.Col, {
|
|
84
|
+
width: el.props && el.props.width ? 'auto' : undefined,
|
|
85
|
+
children: renderedChild
|
|
86
|
+
}, index);
|
|
79
87
|
});
|
|
80
88
|
}
|
|
81
89
|
renderChildren() {
|
package/es/exports/b.js
CHANGED
|
@@ -22,7 +22,6 @@
|
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
24
|
export { FormField } from "../FormField/v2/index.js";
|
|
25
|
-
export { FormFieldLabel } from "../FormFieldLabel/v2/index.js";
|
|
26
25
|
export { FormFieldMessage } from "../FormFieldMessage/v2/index.js";
|
|
27
26
|
export { FormFieldMessages } from "../FormFieldMessages/v2/index.js";
|
|
28
27
|
export { FormFieldLayout } from "../FormFieldLayout/v2/index.js";
|
|
@@ -9,6 +9,7 @@ var _react = require("react");
|
|
|
9
9
|
var _latest = require("@instructure/ui-grid/latest");
|
|
10
10
|
var _pickProps = require("@instructure/ui-react-utils/lib/pickProps.js");
|
|
11
11
|
var _omitProps = require("@instructure/ui-react-utils/lib/omitProps.js");
|
|
12
|
+
var _safeCloneElement = require("@instructure/ui-react-utils/lib/safeCloneElement.js");
|
|
12
13
|
var _emotion = require("@instructure/emotion");
|
|
13
14
|
var _props = require("../../FormFieldLayout/v2/props");
|
|
14
15
|
var _v = require("../../FormFieldLayout/v2");
|
|
@@ -78,11 +79,19 @@ let FormFieldGroup = exports.FormFieldGroup = (_dec = (0, _emotion.withStyleNew)
|
|
|
78
79
|
}) >= 0;
|
|
79
80
|
}
|
|
80
81
|
renderColumns() {
|
|
82
|
+
const {
|
|
83
|
+
disabled
|
|
84
|
+
} = this.props;
|
|
81
85
|
return _react.Children.map(this.props.children, (child, index) => {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
+
if (!child) return null;
|
|
87
|
+
const el = child;
|
|
88
|
+
const renderedChild = disabled && /*#__PURE__*/(0, _react.isValidElement)(el) ? (0, _safeCloneElement.safeCloneElement)(el, {
|
|
89
|
+
disabled: true
|
|
90
|
+
}) : child;
|
|
91
|
+
return (0, _jsxRuntime.jsx)(_latest.Grid.Col, {
|
|
92
|
+
width: el.props && el.props.width ? 'auto' : undefined,
|
|
93
|
+
children: renderedChild
|
|
94
|
+
}, index);
|
|
86
95
|
});
|
|
87
96
|
}
|
|
88
97
|
renderChildren() {
|
package/lib/exports/b.js
CHANGED
|
@@ -12,36 +12,29 @@ Object.defineProperty(exports, "FormField", {
|
|
|
12
12
|
Object.defineProperty(exports, "FormFieldGroup", {
|
|
13
13
|
enumerable: true,
|
|
14
14
|
get: function () {
|
|
15
|
-
return
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
Object.defineProperty(exports, "FormFieldLabel", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function () {
|
|
21
|
-
return _v2.FormFieldLabel;
|
|
15
|
+
return _v5.FormFieldGroup;
|
|
22
16
|
}
|
|
23
17
|
});
|
|
24
18
|
Object.defineProperty(exports, "FormFieldLayout", {
|
|
25
19
|
enumerable: true,
|
|
26
20
|
get: function () {
|
|
27
|
-
return
|
|
21
|
+
return _v4.FormFieldLayout;
|
|
28
22
|
}
|
|
29
23
|
});
|
|
30
24
|
Object.defineProperty(exports, "FormFieldMessage", {
|
|
31
25
|
enumerable: true,
|
|
32
26
|
get: function () {
|
|
33
|
-
return
|
|
27
|
+
return _v2.FormFieldMessage;
|
|
34
28
|
}
|
|
35
29
|
});
|
|
36
30
|
Object.defineProperty(exports, "FormFieldMessages", {
|
|
37
31
|
enumerable: true,
|
|
38
32
|
get: function () {
|
|
39
|
-
return
|
|
33
|
+
return _v3.FormFieldMessages;
|
|
40
34
|
}
|
|
41
35
|
});
|
|
42
36
|
var _v = require("../FormField/v2");
|
|
43
|
-
var _v2 = require("../
|
|
44
|
-
var _v3 = require("../
|
|
45
|
-
var _v4 = require("../
|
|
46
|
-
var _v5 = require("../
|
|
47
|
-
var _v6 = require("../FormFieldGroup/v2");
|
|
37
|
+
var _v2 = require("../FormFieldMessage/v2");
|
|
38
|
+
var _v3 = require("../FormFieldMessages/v2");
|
|
39
|
+
var _v4 = require("../FormFieldLayout/v2");
|
|
40
|
+
var _v5 = require("../FormFieldGroup/v2");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-form-field",
|
|
3
|
-
"version": "11.7.4-snapshot-
|
|
3
|
+
"version": "11.7.4-snapshot-5",
|
|
4
4
|
"description": "Form layout components.",
|
|
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.2",
|
|
18
|
-
"@instructure/console": "11.7.4-snapshot-
|
|
19
|
-
"@instructure/
|
|
20
|
-
"@instructure/
|
|
21
|
-
"@instructure/ui-a11y-content": "11.7.4-snapshot-
|
|
22
|
-
"@instructure/ui-a11y-utils": "11.7.4-snapshot-
|
|
23
|
-
"@instructure/ui-
|
|
24
|
-
"@instructure/ui-
|
|
25
|
-
"@instructure/ui-react-utils": "11.7.4-snapshot-
|
|
26
|
-
"@instructure/ui-
|
|
27
|
-
"@instructure/uid": "11.7.4-snapshot-
|
|
28
|
-
"@instructure/ui-
|
|
18
|
+
"@instructure/console": "11.7.4-snapshot-5",
|
|
19
|
+
"@instructure/shared-types": "11.7.4-snapshot-5",
|
|
20
|
+
"@instructure/emotion": "11.7.4-snapshot-5",
|
|
21
|
+
"@instructure/ui-a11y-content": "11.7.4-snapshot-5",
|
|
22
|
+
"@instructure/ui-a11y-utils": "11.7.4-snapshot-5",
|
|
23
|
+
"@instructure/ui-themes": "11.7.4-snapshot-5",
|
|
24
|
+
"@instructure/ui-grid": "11.7.4-snapshot-5",
|
|
25
|
+
"@instructure/ui-react-utils": "11.7.4-snapshot-5",
|
|
26
|
+
"@instructure/ui-utils": "11.7.4-snapshot-5",
|
|
27
|
+
"@instructure/uid": "11.7.4-snapshot-5",
|
|
28
|
+
"@instructure/ui-icons": "11.7.4-snapshot-5"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@testing-library/jest-dom": "^6.6.3",
|
|
32
32
|
"@testing-library/react": "15.0.7",
|
|
33
33
|
"vitest": "^3.2.2",
|
|
34
|
-
"@instructure/ui-axe-check": "11.7.4-snapshot-
|
|
35
|
-
"@instructure/ui-babel-preset": "11.7.4-snapshot-
|
|
34
|
+
"@instructure/ui-axe-check": "11.7.4-snapshot-5",
|
|
35
|
+
"@instructure/ui-babel-preset": "11.7.4-snapshot-5"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"react": ">=18 <=19"
|
|
@@ -22,10 +22,20 @@
|
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
-
import {
|
|
25
|
+
import {
|
|
26
|
+
Component,
|
|
27
|
+
Children,
|
|
28
|
+
ReactElement,
|
|
29
|
+
AriaAttributes,
|
|
30
|
+
isValidElement
|
|
31
|
+
} from 'react'
|
|
26
32
|
|
|
27
33
|
import { Grid } from '@instructure/ui-grid/latest'
|
|
28
|
-
import {
|
|
34
|
+
import {
|
|
35
|
+
pickProps,
|
|
36
|
+
omitProps,
|
|
37
|
+
safeCloneElement
|
|
38
|
+
} from '@instructure/ui-react-utils'
|
|
29
39
|
import { withStyleNew } from '@instructure/emotion'
|
|
30
40
|
|
|
31
41
|
import { allowedProps as formFieldLayoutAllowedProps } from '../../FormFieldLayout/v2/props'
|
|
@@ -86,20 +96,22 @@ class FormFieldGroup extends Component<FormFieldGroupProps> {
|
|
|
86
96
|
}
|
|
87
97
|
|
|
88
98
|
renderColumns() {
|
|
99
|
+
const { disabled } = this.props
|
|
89
100
|
return Children.map(this.props.children, (child, index) => {
|
|
90
|
-
|
|
101
|
+
if (!child) return null
|
|
102
|
+
const el = child as ReactElement<any>
|
|
103
|
+
const renderedChild =
|
|
104
|
+
disabled && isValidElement(el)
|
|
105
|
+
? safeCloneElement(el, { disabled: true })
|
|
106
|
+
: child
|
|
107
|
+
return (
|
|
91
108
|
<Grid.Col
|
|
92
|
-
width={
|
|
93
|
-
(child as ReactElement).props &&
|
|
94
|
-
(child as ReactElement<any>).props.width
|
|
95
|
-
? 'auto'
|
|
96
|
-
: undefined
|
|
97
|
-
}
|
|
109
|
+
width={el.props && el.props.width ? 'auto' : undefined}
|
|
98
110
|
key={index}
|
|
99
111
|
>
|
|
100
|
-
{
|
|
112
|
+
{renderedChild}
|
|
101
113
|
</Grid.Col>
|
|
102
|
-
)
|
|
114
|
+
)
|
|
103
115
|
})
|
|
104
116
|
}
|
|
105
117
|
|
|
@@ -48,7 +48,8 @@ type FormFieldGroupOwnProps = {
|
|
|
48
48
|
*/
|
|
49
49
|
messagesId?: string
|
|
50
50
|
/**
|
|
51
|
-
* Whether the field group is disabled. When true,
|
|
51
|
+
* Whether the field group is disabled. When true, the disabled prop is propagated to all
|
|
52
|
+
* child components, error and success messages will be hidden.
|
|
52
53
|
*/
|
|
53
54
|
disabled?: boolean
|
|
54
55
|
/**
|
package/src/exports/b.ts
CHANGED
|
@@ -23,7 +23,6 @@
|
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
25
|
export { FormField } from '../FormField/v2'
|
|
26
|
-
export { FormFieldLabel } from '../FormFieldLabel/v2'
|
|
27
26
|
export { FormFieldMessage } from '../FormFieldMessage/v2'
|
|
28
27
|
export { FormFieldMessages } from '../FormFieldMessages/v2'
|
|
29
28
|
export { FormFieldLayout } from '../FormFieldLayout/v2'
|
|
@@ -35,7 +34,6 @@ export type {
|
|
|
35
34
|
FormMessageChild
|
|
36
35
|
} from '../utils/v1/FormPropTypes'
|
|
37
36
|
export type { FormFieldOwnProps, FormFieldProps } from '../FormField/v2/props'
|
|
38
|
-
export type { FormFieldLabelProps } from '../FormFieldLabel/v2/props'
|
|
39
37
|
export type { FormFieldMessageProps } from '../FormFieldMessage/v2/props'
|
|
40
38
|
export type { FormFieldMessagesProps } from '../FormFieldMessages/v2/props'
|
|
41
39
|
export type { FormFieldLayoutProps } from '../FormFieldLayout/v2/props'
|