@instructure/ui-form-field 7.10.0 → 7.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 +4 -0
- package/package.json +12 -12
- package/types/index.d.ts +35 -35
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
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
|
+
# [7.11.0](https://github.com/instructure/instructure-ui/compare/v7.10.0...v7.11.0) (2021-09-17)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @instructure/ui-form-field
|
|
9
|
+
|
|
6
10
|
# [7.10.0](https://github.com/instructure/instructure-ui/compare/v7.9.0...v7.10.0) (2021-08-27)
|
|
7
11
|
|
|
8
12
|
**Note:** Version bump only for package @instructure/ui-form-field
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-form-field",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.11.0",
|
|
4
4
|
"description": "Form layout components.",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -23,20 +23,20 @@
|
|
|
23
23
|
},
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@instructure/ui-babel-preset": "^7.
|
|
27
|
-
"@instructure/ui-test-utils": "^7.
|
|
26
|
+
"@instructure/ui-babel-preset": "^7.11.0",
|
|
27
|
+
"@instructure/ui-test-utils": "^7.11.0"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@babel/runtime": "^7.9.2",
|
|
31
|
-
"@instructure/console": "^7.
|
|
32
|
-
"@instructure/ui-a11y-content": "^7.
|
|
33
|
-
"@instructure/ui-a11y-utils": "^7.
|
|
34
|
-
"@instructure/ui-grid": "^7.
|
|
35
|
-
"@instructure/ui-icons": "^7.
|
|
36
|
-
"@instructure/ui-react-utils": "^7.
|
|
37
|
-
"@instructure/ui-themeable": "^7.
|
|
38
|
-
"@instructure/ui-utils": "^7.
|
|
39
|
-
"@instructure/uid": "^7.
|
|
31
|
+
"@instructure/console": "^7.11.0",
|
|
32
|
+
"@instructure/ui-a11y-content": "^7.11.0",
|
|
33
|
+
"@instructure/ui-a11y-utils": "^7.11.0",
|
|
34
|
+
"@instructure/ui-grid": "^7.11.0",
|
|
35
|
+
"@instructure/ui-icons": "^7.11.0",
|
|
36
|
+
"@instructure/ui-react-utils": "^7.11.0",
|
|
37
|
+
"@instructure/ui-themeable": "^7.11.0",
|
|
38
|
+
"@instructure/ui-utils": "^7.11.0",
|
|
39
|
+
"@instructure/uid": "^7.11.0",
|
|
40
40
|
"classnames": "^2",
|
|
41
41
|
"prop-types": "^15"
|
|
42
42
|
},
|
package/types/index.d.ts
CHANGED
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
|
|
3
|
-
export type
|
|
3
|
+
export type FormFieldGroupLayout = "stacked" | "columns" | "inline";
|
|
4
4
|
|
|
5
|
-
export type
|
|
5
|
+
export type FormFieldGroupRowSpacing = "none" | "small" | "medium" | "large";
|
|
6
6
|
|
|
7
|
-
export type
|
|
7
|
+
export type FormFieldGroupColSpacing = "none" | "small" | "medium" | "large";
|
|
8
8
|
|
|
9
|
-
export
|
|
10
|
-
|
|
9
|
+
export type FormFieldGroupVAlign = "top" | "middle" | "bottom";
|
|
10
|
+
|
|
11
|
+
export type FormFieldGroupStartAt = "small" | "medium" | "large" | "x-large" | any;
|
|
12
|
+
|
|
13
|
+
export interface FormFieldGroupProps {
|
|
14
|
+
description: React.ReactNode;
|
|
11
15
|
/**
|
|
12
|
-
* the
|
|
16
|
+
* the element type to render as
|
|
13
17
|
*/
|
|
14
|
-
|
|
18
|
+
as?: any;
|
|
15
19
|
/**
|
|
16
20
|
* object with shape: `{
|
|
17
21
|
* text: PropTypes.string,
|
|
@@ -19,17 +23,20 @@ export interface FormFieldProps {
|
|
|
19
23
|
* }`
|
|
20
24
|
*/
|
|
21
25
|
messages?: any[];
|
|
26
|
+
/**
|
|
27
|
+
* id for the form field messages
|
|
28
|
+
*/
|
|
22
29
|
messagesId?: string;
|
|
30
|
+
disabled?: boolean;
|
|
23
31
|
children?: React.ReactNode;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
vAlign?:
|
|
28
|
-
|
|
29
|
-
inputContainerRef?: (...args: any[])=>any;
|
|
32
|
+
layout?: FormFieldGroupLayout;
|
|
33
|
+
rowSpacing?: FormFieldGroupRowSpacing;
|
|
34
|
+
colSpacing?: FormFieldGroupColSpacing;
|
|
35
|
+
vAlign?: FormFieldGroupVAlign;
|
|
36
|
+
startAt?: FormFieldGroupStartAt;
|
|
30
37
|
}
|
|
31
38
|
|
|
32
|
-
export class
|
|
39
|
+
export class FormFieldGroup extends React.Component<FormFieldGroupProps, any> {
|
|
33
40
|
render(): JSX.Element;
|
|
34
41
|
|
|
35
42
|
}
|
|
@@ -37,22 +44,18 @@ export class FormField extends React.Component<FormFieldProps, any> {
|
|
|
37
44
|
|
|
38
45
|
|
|
39
46
|
|
|
40
|
-
export type
|
|
41
|
-
|
|
42
|
-
export type FormFieldGroupRowSpacing = "none" | "small" | "medium" | "large";
|
|
43
|
-
|
|
44
|
-
export type FormFieldGroupColSpacing = "none" | "small" | "medium" | "large";
|
|
47
|
+
export type FormFieldLayout = "stacked" | "inline";
|
|
45
48
|
|
|
46
|
-
export type
|
|
49
|
+
export type FormFieldLabelAlign = "start" | "end";
|
|
47
50
|
|
|
48
|
-
export type
|
|
51
|
+
export type FormFieldVAlign = "top" | "middle" | "bottom";
|
|
49
52
|
|
|
50
|
-
export interface
|
|
51
|
-
|
|
53
|
+
export interface FormFieldProps {
|
|
54
|
+
label: React.ReactNode;
|
|
52
55
|
/**
|
|
53
|
-
* the
|
|
56
|
+
* the id of the input (to link it to its label for a11y)
|
|
54
57
|
*/
|
|
55
|
-
|
|
58
|
+
id: string;
|
|
56
59
|
/**
|
|
57
60
|
* object with shape: `{
|
|
58
61
|
* text: PropTypes.string,
|
|
@@ -60,20 +63,17 @@ export interface FormFieldGroupProps {
|
|
|
60
63
|
* }`
|
|
61
64
|
*/
|
|
62
65
|
messages?: any[];
|
|
63
|
-
/**
|
|
64
|
-
* id for the form field messages
|
|
65
|
-
*/
|
|
66
66
|
messagesId?: string;
|
|
67
|
-
disabled?: boolean;
|
|
68
67
|
children?: React.ReactNode;
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
vAlign?:
|
|
73
|
-
|
|
68
|
+
inline?: boolean;
|
|
69
|
+
layout?: FormFieldLayout;
|
|
70
|
+
labelAlign?: FormFieldLabelAlign;
|
|
71
|
+
vAlign?: FormFieldVAlign;
|
|
72
|
+
width?: string;
|
|
73
|
+
inputContainerRef?: (...args: any[])=>any;
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
export class
|
|
76
|
+
export class FormField extends React.Component<FormFieldProps, any> {
|
|
77
77
|
render(): JSX.Element;
|
|
78
78
|
|
|
79
79
|
}
|