carbon-react 111.8.1 → 111.8.3
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/esm/components/form/__internal__/form-summary.component.d.ts +18 -13
- package/esm/components/form/__internal__/form-summary.component.js +21 -20
- package/esm/components/form/__internal__/form-summary.style.d.ts +11 -3
- package/esm/components/form/__internal__/form-summary.style.js +5 -13
- package/esm/components/form/form.component.d.ts +35 -20
- package/esm/components/form/form.component.js +329 -47
- package/esm/components/form/form.config.d.ts +2 -1
- package/esm/components/form/form.config.js +0 -1
- package/esm/components/form/form.style.d.ts +21 -6
- package/esm/components/form/form.style.js +1 -17
- package/esm/components/form/index.d.ts +2 -1
- package/esm/components/menu/__internal__/spec-helper/index.js +4 -3
- package/esm/components/menu/__internal__/submenu/submenu.component.js +21 -4
- package/esm/components/menu/menu-item/menu-item.component.js +10 -2
- package/esm/components/menu/menu.component.js +19 -9
- package/esm/components/menu/menu.context.d.ts +2 -0
- package/esm/components/menu/menu.context.js +5 -1
- package/esm/components/select/filterable-select/filterable-select.component.js +0 -1
- package/esm/components/select/select-list/select-list-container.style.js +8 -3
- package/esm/components/select/select-list/select-list.component.js +23 -51
- package/esm/components/select/select-list/select-list.style.js +1 -22
- package/esm/components/show-edit-pod/show-edit-pod.style.js +1 -1
- package/esm/locales/en-gb.js +1 -1
- package/lib/components/form/__internal__/form-summary.component.d.ts +18 -13
- package/lib/components/form/__internal__/form-summary.component.js +22 -21
- package/lib/components/form/__internal__/form-summary.style.d.ts +11 -3
- package/lib/components/form/__internal__/form-summary.style.js +5 -14
- package/lib/components/form/form.component.d.ts +35 -20
- package/lib/components/form/form.component.js +330 -49
- package/lib/components/form/form.config.d.ts +2 -1
- package/lib/components/form/form.config.js +0 -1
- package/lib/components/form/form.style.d.ts +21 -6
- package/lib/components/form/form.style.js +1 -19
- package/lib/components/form/index.d.ts +2 -1
- package/lib/components/menu/__internal__/spec-helper/index.js +5 -3
- package/lib/components/menu/__internal__/submenu/submenu.component.js +21 -4
- package/lib/components/menu/menu-item/menu-item.component.js +10 -2
- package/lib/components/menu/menu.component.js +19 -9
- package/lib/components/menu/menu.context.d.ts +2 -0
- package/lib/components/menu/menu.context.js +5 -1
- package/lib/components/select/filterable-select/filterable-select.component.js +0 -1
- package/lib/components/select/select-list/select-list-container.style.js +9 -3
- package/lib/components/select/select-list/select-list.component.js +21 -49
- package/lib/components/select/select-list/select-list.style.js +1 -24
- package/lib/components/show-edit-pod/show-edit-pod.style.js +2 -2
- package/lib/locales/en-gb.js +1 -1
- package/package.json +1 -1
- package/esm/components/form/__internal__/form-summary.d.ts +0 -16
- package/esm/components/form/form.d.ts +0 -35
- package/lib/components/form/__internal__/form-summary.d.ts +0 -16
- package/lib/components/form/form.d.ts +0 -35
|
@@ -1,14 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { StyledInternalSummaryProps } from "./form-summary.style";
|
|
3
|
+
interface SummaryProps extends StyledInternalSummaryProps {
|
|
4
|
+
errorCount?: number;
|
|
5
|
+
warningCount?: number;
|
|
6
|
+
}
|
|
7
|
+
export interface FormSummaryProps {
|
|
8
|
+
/** Child elements */
|
|
9
|
+
children?: React.ReactNode;
|
|
10
|
+
/** The total number of errors present in the form */
|
|
11
|
+
errorCount?: number;
|
|
12
|
+
/** The total number of warnings present in the form */
|
|
13
|
+
warningCount?: number;
|
|
14
|
+
/** Applies full width styling */
|
|
15
|
+
fullWidth?: boolean;
|
|
13
16
|
}
|
|
14
|
-
|
|
17
|
+
export declare const Summary: ({ type, errorCount, warningCount, }: SummaryProps) => JSX.Element | null;
|
|
18
|
+
declare const FormSummary: ({ fullWidth, ...props }: FormSummaryProps) => JSX.Element;
|
|
19
|
+
export default FormSummary;
|
|
@@ -8,53 +8,54 @@ import useLocale from "../../../hooks/__internal__/useLocale";
|
|
|
8
8
|
|
|
9
9
|
const Summary = ({
|
|
10
10
|
type,
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
errorCount = 0,
|
|
12
|
+
warningCount = 0
|
|
13
13
|
}) => {
|
|
14
14
|
const l = useLocale();
|
|
15
15
|
const messages = {
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
errorCount,
|
|
17
|
+
warningCount
|
|
18
18
|
};
|
|
19
|
-
const message = useMemo(() => l.errors.messages.formSummary(
|
|
19
|
+
const message = useMemo(() => l.errors.messages.formSummary(errorCount, warningCount, type), [l.errors.messages, errorCount, warningCount, type]);
|
|
20
20
|
|
|
21
|
-
if (messages[type]) {
|
|
22
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(StyledMessagePrefix, null, message[0]), /*#__PURE__*/React.createElement(StyledInternalSummary, {
|
|
21
|
+
if (messages[`${type}Count`]) {
|
|
22
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(StyledMessagePrefix, null, message === null || message === void 0 ? void 0 : message[0]), /*#__PURE__*/React.createElement(StyledInternalSummary, {
|
|
23
23
|
type: type,
|
|
24
|
-
"data-element": type
|
|
24
|
+
"data-element": `${type}s`
|
|
25
25
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
26
|
-
type: type
|
|
27
|
-
}), /*#__PURE__*/React.createElement("span", null, message[1])));
|
|
26
|
+
type: type
|
|
27
|
+
}), /*#__PURE__*/React.createElement("span", null, message === null || message === void 0 ? void 0 : message[1])));
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
return null;
|
|
31
31
|
};
|
|
32
32
|
|
|
33
33
|
Summary.propTypes = {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
"errorCount": PropTypes.number,
|
|
35
|
+
"type": PropTypes.oneOf(["error", "warning"]).isRequired,
|
|
36
|
+
"warningCount": PropTypes.number
|
|
37
37
|
};
|
|
38
|
+
export { Summary };
|
|
38
39
|
|
|
39
40
|
const FormSummary = ({
|
|
40
41
|
fullWidth,
|
|
41
42
|
...props
|
|
42
43
|
}) => {
|
|
43
44
|
return /*#__PURE__*/React.createElement(StyledFormSummary, {
|
|
44
|
-
showSummary: props.
|
|
45
|
+
showSummary: !!(props.errorCount || props.warningCount),
|
|
45
46
|
"data-element": "form-summary",
|
|
46
47
|
fullWidth: fullWidth
|
|
47
48
|
}, /*#__PURE__*/React.createElement(Summary, _extends({
|
|
48
|
-
type: "
|
|
49
|
+
type: "error"
|
|
49
50
|
}, props)), /*#__PURE__*/React.createElement(Summary, _extends({
|
|
50
|
-
type: "
|
|
51
|
+
type: "warning"
|
|
51
52
|
}, props)), props.children);
|
|
52
53
|
};
|
|
53
54
|
|
|
54
55
|
FormSummary.propTypes = {
|
|
55
|
-
children: PropTypes.node,
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
"children": PropTypes.node,
|
|
57
|
+
"errorCount": PropTypes.number,
|
|
58
|
+
"fullWidth": PropTypes.bool,
|
|
59
|
+
"warningCount": PropTypes.number
|
|
59
60
|
};
|
|
60
61
|
export default FormSummary;
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
declare type StyledFormSummaryProps = {
|
|
2
|
+
showSummary?: boolean;
|
|
3
|
+
fullWidth?: boolean;
|
|
4
|
+
};
|
|
5
|
+
export declare const StyledFormSummary: import("styled-components").StyledComponent<"div", any, StyledFormSummaryProps, never>;
|
|
6
|
+
export declare const StyledMessagePrefix: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
7
|
+
export declare type StyledInternalSummaryProps = {
|
|
8
|
+
type: "error" | "warning";
|
|
9
|
+
};
|
|
10
|
+
export declare const StyledInternalSummary: import("styled-components").StyledComponent<"div", any, StyledInternalSummaryProps, never>;
|
|
11
|
+
export {};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import styled, { css } from "styled-components";
|
|
2
|
-
import PropTypes from "prop-types";
|
|
3
2
|
import StyledIcon from "../../icon/icon.style";
|
|
4
3
|
import StyledButton from "../../button/button.style";
|
|
5
4
|
export const StyledFormSummary = styled.div`
|
|
@@ -44,12 +43,12 @@ export const StyledInternalSummary = styled.div`
|
|
|
44
43
|
}
|
|
45
44
|
${({
|
|
46
45
|
type
|
|
47
|
-
}) => type === "
|
|
46
|
+
}) => type === "warning" && css`
|
|
48
47
|
color: var(--colorsSemanticCaution650);
|
|
49
48
|
`}
|
|
50
49
|
${({
|
|
51
50
|
type
|
|
52
|
-
}) => type === "
|
|
51
|
+
}) => type === "error" && css`
|
|
53
52
|
color: var(--colorsSemanticNegative600);
|
|
54
53
|
`}
|
|
55
54
|
|
|
@@ -57,20 +56,13 @@ export const StyledInternalSummary = styled.div`
|
|
|
57
56
|
margin-right: 4px;
|
|
58
57
|
${({
|
|
59
58
|
type
|
|
60
|
-
}) => type === "
|
|
59
|
+
}) => type === "warning" && css`
|
|
61
60
|
color: var(--colorsSemanticCaution650);
|
|
62
61
|
`}
|
|
63
62
|
${({
|
|
64
63
|
type
|
|
65
|
-
}) => type === "
|
|
64
|
+
}) => type === "error" && css`
|
|
66
65
|
color: var(--colorsSemanticNegative600);
|
|
67
66
|
`}
|
|
68
67
|
}
|
|
69
|
-
`;
|
|
70
|
-
StyledFormSummary.propTypes = {
|
|
71
|
-
showSummary: PropTypes.bool,
|
|
72
|
-
fullWidth: PropTypes.bool
|
|
73
|
-
};
|
|
74
|
-
StyledInternalSummary.propTypes = {
|
|
75
|
-
type: PropTypes.oneOf(["errors", "warnings"])
|
|
76
|
-
};
|
|
68
|
+
`;
|
|
@@ -1,21 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { SpaceProps } from "styled-system";
|
|
3
|
+
import { FormButtonAlignment } from "./form.config";
|
|
4
|
+
export interface FormProps extends SpaceProps {
|
|
5
|
+
/** Alignment of buttons */
|
|
6
|
+
buttonAlignment?: FormButtonAlignment;
|
|
7
|
+
/** Child elements */
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
/** The total number of errors present in the form */
|
|
10
|
+
errorCount?: number;
|
|
11
|
+
/** Spacing between form fields, given number will be multiplied by base spacing unit (8) */
|
|
12
|
+
fieldSpacing?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7;
|
|
13
|
+
/** Additional buttons rendered on the left side of the save button */
|
|
14
|
+
leftSideButtons?: React.ReactNode;
|
|
15
|
+
/** Disable HTML5 validation */
|
|
16
|
+
noValidate?: boolean;
|
|
17
|
+
/** Callback passed to the form element */
|
|
18
|
+
onSubmit?: React.FormEventHandler;
|
|
19
|
+
/** Additional buttons rendered on the right side of the save button */
|
|
20
|
+
rightSideButtons?: React.ReactNode;
|
|
21
|
+
/** Save button to be rendered */
|
|
22
|
+
saveButton?: React.ReactNode;
|
|
23
|
+
/** Enables the sticky footer. */
|
|
24
|
+
stickyFooter?: boolean;
|
|
25
|
+
/** The total number of warnings present in the form */
|
|
26
|
+
warningCount?: number;
|
|
27
|
+
/** Height of the form (any valid CSS value) */
|
|
28
|
+
height?: string;
|
|
29
|
+
/** Applies styling for full width buttons. Please note that you will still need to pass the `fullWidth` prop to the button you compose */
|
|
30
|
+
fullWidthButtons?: boolean;
|
|
21
31
|
}
|
|
32
|
+
export declare const Form: {
|
|
33
|
+
({ children, saveButton, leftSideButtons, rightSideButtons, errorCount, warningCount, onSubmit, buttonAlignment, stickyFooter, fieldSpacing, noValidate, height, fullWidthButtons, ...rest }: FormProps): JSX.Element;
|
|
34
|
+
displayName: string;
|
|
35
|
+
};
|
|
36
|
+
export default Form;
|
|
@@ -2,7 +2,6 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
2
2
|
|
|
3
3
|
import React, { useRef, useContext } from "react";
|
|
4
4
|
import PropTypes from "prop-types";
|
|
5
|
-
import styledSystemPropTypes from "@styled-system/prop-types";
|
|
6
5
|
import { SidebarContext } from "../sidebar/sidebar.component";
|
|
7
6
|
import { ModalContext } from "../modal/modal.component";
|
|
8
7
|
import FormSummary from "./__internal__/form-summary.component";
|
|
@@ -30,8 +29,8 @@ const Form = ({
|
|
|
30
29
|
const {
|
|
31
30
|
isInModal
|
|
32
31
|
} = useContext(ModalContext);
|
|
33
|
-
const formRef = useRef();
|
|
34
|
-
const formFooterRef = useRef();
|
|
32
|
+
const formRef = useRef(null);
|
|
33
|
+
const formFooterRef = useRef(null);
|
|
35
34
|
const renderFooter = !!(saveButton || leftSideButtons || rightSideButtons || errorCount || warningCount);
|
|
36
35
|
return /*#__PURE__*/React.createElement(StyledForm, _extends({
|
|
37
36
|
ref: formRef,
|
|
@@ -58,8 +57,8 @@ const Form = ({
|
|
|
58
57
|
}, leftSideButtons && /*#__PURE__*/React.createElement(StyledLeftButtons, {
|
|
59
58
|
buttonAlignment: buttonAlignment
|
|
60
59
|
}, leftSideButtons), /*#__PURE__*/React.createElement(FormSummary, {
|
|
61
|
-
|
|
62
|
-
|
|
60
|
+
errorCount: errorCount,
|
|
61
|
+
warningCount: warningCount
|
|
63
62
|
}, saveButton), rightSideButtons && /*#__PURE__*/React.createElement(StyledRightButtons, {
|
|
64
63
|
buttonAlignment: buttonAlignment
|
|
65
64
|
}, rightSideButtons)), fullWidthButtons && renderFooter && /*#__PURE__*/React.createElement(StyledFormFooter, {
|
|
@@ -75,51 +74,334 @@ const Form = ({
|
|
|
75
74
|
fullWidthButtons: fullWidthButtons
|
|
76
75
|
}, rightSideButtons), /*#__PURE__*/React.createElement(StyledFullWidthButtons, null, /*#__PURE__*/React.createElement(FormSummary, {
|
|
77
76
|
fullWidth: fullWidthButtons,
|
|
78
|
-
|
|
79
|
-
|
|
77
|
+
errorCount: errorCount,
|
|
78
|
+
warningCount: warningCount
|
|
80
79
|
}, saveButton))));
|
|
81
80
|
};
|
|
82
81
|
|
|
83
|
-
Form.propTypes = {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
82
|
+
Form.propTypes = {
|
|
83
|
+
"buttonAlignment": PropTypes.oneOf(["left", "right"]),
|
|
84
|
+
"children": PropTypes.node,
|
|
85
|
+
"errorCount": PropTypes.number,
|
|
86
|
+
"fieldSpacing": PropTypes.oneOf([0, 1, 2, 3, 4, 5, 6, 7]),
|
|
87
|
+
"fullWidthButtons": PropTypes.bool,
|
|
88
|
+
"height": PropTypes.string,
|
|
89
|
+
"leftSideButtons": PropTypes.node,
|
|
90
|
+
"m": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
91
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
92
|
+
"description": PropTypes.string,
|
|
93
|
+
"toString": PropTypes.func.isRequired,
|
|
94
|
+
"valueOf": PropTypes.func.isRequired
|
|
95
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
96
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
97
|
+
"description": PropTypes.string,
|
|
98
|
+
"toString": PropTypes.func.isRequired,
|
|
99
|
+
"valueOf": PropTypes.func.isRequired
|
|
100
|
+
}), PropTypes.string]),
|
|
101
|
+
"margin": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
102
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
103
|
+
"description": PropTypes.string,
|
|
104
|
+
"toString": PropTypes.func.isRequired,
|
|
105
|
+
"valueOf": PropTypes.func.isRequired
|
|
106
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
107
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
108
|
+
"description": PropTypes.string,
|
|
109
|
+
"toString": PropTypes.func.isRequired,
|
|
110
|
+
"valueOf": PropTypes.func.isRequired
|
|
111
|
+
}), PropTypes.string]),
|
|
112
|
+
"marginBottom": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
113
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
114
|
+
"description": PropTypes.string,
|
|
115
|
+
"toString": PropTypes.func.isRequired,
|
|
116
|
+
"valueOf": PropTypes.func.isRequired
|
|
117
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
118
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
119
|
+
"description": PropTypes.string,
|
|
120
|
+
"toString": PropTypes.func.isRequired,
|
|
121
|
+
"valueOf": PropTypes.func.isRequired
|
|
122
|
+
}), PropTypes.string]),
|
|
123
|
+
"marginLeft": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
124
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
125
|
+
"description": PropTypes.string,
|
|
126
|
+
"toString": PropTypes.func.isRequired,
|
|
127
|
+
"valueOf": PropTypes.func.isRequired
|
|
128
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
129
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
130
|
+
"description": PropTypes.string,
|
|
131
|
+
"toString": PropTypes.func.isRequired,
|
|
132
|
+
"valueOf": PropTypes.func.isRequired
|
|
133
|
+
}), PropTypes.string]),
|
|
134
|
+
"marginRight": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
135
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
136
|
+
"description": PropTypes.string,
|
|
137
|
+
"toString": PropTypes.func.isRequired,
|
|
138
|
+
"valueOf": PropTypes.func.isRequired
|
|
139
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
140
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
141
|
+
"description": PropTypes.string,
|
|
142
|
+
"toString": PropTypes.func.isRequired,
|
|
143
|
+
"valueOf": PropTypes.func.isRequired
|
|
144
|
+
}), PropTypes.string]),
|
|
145
|
+
"marginTop": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
146
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
147
|
+
"description": PropTypes.string,
|
|
148
|
+
"toString": PropTypes.func.isRequired,
|
|
149
|
+
"valueOf": PropTypes.func.isRequired
|
|
150
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
151
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
152
|
+
"description": PropTypes.string,
|
|
153
|
+
"toString": PropTypes.func.isRequired,
|
|
154
|
+
"valueOf": PropTypes.func.isRequired
|
|
155
|
+
}), PropTypes.string]),
|
|
156
|
+
"marginX": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
157
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
158
|
+
"description": PropTypes.string,
|
|
159
|
+
"toString": PropTypes.func.isRequired,
|
|
160
|
+
"valueOf": PropTypes.func.isRequired
|
|
161
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
162
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
163
|
+
"description": PropTypes.string,
|
|
164
|
+
"toString": PropTypes.func.isRequired,
|
|
165
|
+
"valueOf": PropTypes.func.isRequired
|
|
166
|
+
}), PropTypes.string]),
|
|
167
|
+
"marginY": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
168
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
169
|
+
"description": PropTypes.string,
|
|
170
|
+
"toString": PropTypes.func.isRequired,
|
|
171
|
+
"valueOf": PropTypes.func.isRequired
|
|
172
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
173
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
174
|
+
"description": PropTypes.string,
|
|
175
|
+
"toString": PropTypes.func.isRequired,
|
|
176
|
+
"valueOf": PropTypes.func.isRequired
|
|
177
|
+
}), PropTypes.string]),
|
|
178
|
+
"mb": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
179
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
180
|
+
"description": PropTypes.string,
|
|
181
|
+
"toString": PropTypes.func.isRequired,
|
|
182
|
+
"valueOf": PropTypes.func.isRequired
|
|
183
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
184
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
185
|
+
"description": PropTypes.string,
|
|
186
|
+
"toString": PropTypes.func.isRequired,
|
|
187
|
+
"valueOf": PropTypes.func.isRequired
|
|
188
|
+
}), PropTypes.string]),
|
|
189
|
+
"ml": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
190
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
191
|
+
"description": PropTypes.string,
|
|
192
|
+
"toString": PropTypes.func.isRequired,
|
|
193
|
+
"valueOf": PropTypes.func.isRequired
|
|
194
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
195
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
196
|
+
"description": PropTypes.string,
|
|
197
|
+
"toString": PropTypes.func.isRequired,
|
|
198
|
+
"valueOf": PropTypes.func.isRequired
|
|
199
|
+
}), PropTypes.string]),
|
|
200
|
+
"mr": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
201
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
202
|
+
"description": PropTypes.string,
|
|
203
|
+
"toString": PropTypes.func.isRequired,
|
|
204
|
+
"valueOf": PropTypes.func.isRequired
|
|
205
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
206
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
207
|
+
"description": PropTypes.string,
|
|
208
|
+
"toString": PropTypes.func.isRequired,
|
|
209
|
+
"valueOf": PropTypes.func.isRequired
|
|
210
|
+
}), PropTypes.string]),
|
|
211
|
+
"mt": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
212
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
213
|
+
"description": PropTypes.string,
|
|
214
|
+
"toString": PropTypes.func.isRequired,
|
|
215
|
+
"valueOf": PropTypes.func.isRequired
|
|
216
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
217
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
218
|
+
"description": PropTypes.string,
|
|
219
|
+
"toString": PropTypes.func.isRequired,
|
|
220
|
+
"valueOf": PropTypes.func.isRequired
|
|
221
|
+
}), PropTypes.string]),
|
|
222
|
+
"mx": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
223
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
224
|
+
"description": PropTypes.string,
|
|
225
|
+
"toString": PropTypes.func.isRequired,
|
|
226
|
+
"valueOf": PropTypes.func.isRequired
|
|
227
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
228
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
229
|
+
"description": PropTypes.string,
|
|
230
|
+
"toString": PropTypes.func.isRequired,
|
|
231
|
+
"valueOf": PropTypes.func.isRequired
|
|
232
|
+
}), PropTypes.string]),
|
|
233
|
+
"my": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
234
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
235
|
+
"description": PropTypes.string,
|
|
236
|
+
"toString": PropTypes.func.isRequired,
|
|
237
|
+
"valueOf": PropTypes.func.isRequired
|
|
238
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
239
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
240
|
+
"description": PropTypes.string,
|
|
241
|
+
"toString": PropTypes.func.isRequired,
|
|
242
|
+
"valueOf": PropTypes.func.isRequired
|
|
243
|
+
}), PropTypes.string]),
|
|
244
|
+
"noValidate": PropTypes.bool,
|
|
245
|
+
"onSubmit": PropTypes.func,
|
|
246
|
+
"p": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
247
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
248
|
+
"description": PropTypes.string,
|
|
249
|
+
"toString": PropTypes.func.isRequired,
|
|
250
|
+
"valueOf": PropTypes.func.isRequired
|
|
251
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
252
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
253
|
+
"description": PropTypes.string,
|
|
254
|
+
"toString": PropTypes.func.isRequired,
|
|
255
|
+
"valueOf": PropTypes.func.isRequired
|
|
256
|
+
}), PropTypes.string]),
|
|
257
|
+
"padding": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
258
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
259
|
+
"description": PropTypes.string,
|
|
260
|
+
"toString": PropTypes.func.isRequired,
|
|
261
|
+
"valueOf": PropTypes.func.isRequired
|
|
262
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
263
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
264
|
+
"description": PropTypes.string,
|
|
265
|
+
"toString": PropTypes.func.isRequired,
|
|
266
|
+
"valueOf": PropTypes.func.isRequired
|
|
267
|
+
}), PropTypes.string]),
|
|
268
|
+
"paddingBottom": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
269
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
270
|
+
"description": PropTypes.string,
|
|
271
|
+
"toString": PropTypes.func.isRequired,
|
|
272
|
+
"valueOf": PropTypes.func.isRequired
|
|
273
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
274
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
275
|
+
"description": PropTypes.string,
|
|
276
|
+
"toString": PropTypes.func.isRequired,
|
|
277
|
+
"valueOf": PropTypes.func.isRequired
|
|
278
|
+
}), PropTypes.string]),
|
|
279
|
+
"paddingLeft": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
280
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
281
|
+
"description": PropTypes.string,
|
|
282
|
+
"toString": PropTypes.func.isRequired,
|
|
283
|
+
"valueOf": PropTypes.func.isRequired
|
|
284
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
285
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
286
|
+
"description": PropTypes.string,
|
|
287
|
+
"toString": PropTypes.func.isRequired,
|
|
288
|
+
"valueOf": PropTypes.func.isRequired
|
|
289
|
+
}), PropTypes.string]),
|
|
290
|
+
"paddingRight": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
291
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
292
|
+
"description": PropTypes.string,
|
|
293
|
+
"toString": PropTypes.func.isRequired,
|
|
294
|
+
"valueOf": PropTypes.func.isRequired
|
|
295
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
296
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
297
|
+
"description": PropTypes.string,
|
|
298
|
+
"toString": PropTypes.func.isRequired,
|
|
299
|
+
"valueOf": PropTypes.func.isRequired
|
|
300
|
+
}), PropTypes.string]),
|
|
301
|
+
"paddingTop": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
302
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
303
|
+
"description": PropTypes.string,
|
|
304
|
+
"toString": PropTypes.func.isRequired,
|
|
305
|
+
"valueOf": PropTypes.func.isRequired
|
|
306
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
307
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
308
|
+
"description": PropTypes.string,
|
|
309
|
+
"toString": PropTypes.func.isRequired,
|
|
310
|
+
"valueOf": PropTypes.func.isRequired
|
|
311
|
+
}), PropTypes.string]),
|
|
312
|
+
"paddingX": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
313
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
314
|
+
"description": PropTypes.string,
|
|
315
|
+
"toString": PropTypes.func.isRequired,
|
|
316
|
+
"valueOf": PropTypes.func.isRequired
|
|
317
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
318
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
319
|
+
"description": PropTypes.string,
|
|
320
|
+
"toString": PropTypes.func.isRequired,
|
|
321
|
+
"valueOf": PropTypes.func.isRequired
|
|
322
|
+
}), PropTypes.string]),
|
|
323
|
+
"paddingY": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
324
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
325
|
+
"description": PropTypes.string,
|
|
326
|
+
"toString": PropTypes.func.isRequired,
|
|
327
|
+
"valueOf": PropTypes.func.isRequired
|
|
328
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
329
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
330
|
+
"description": PropTypes.string,
|
|
331
|
+
"toString": PropTypes.func.isRequired,
|
|
332
|
+
"valueOf": PropTypes.func.isRequired
|
|
333
|
+
}), PropTypes.string]),
|
|
334
|
+
"pb": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
335
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
336
|
+
"description": PropTypes.string,
|
|
337
|
+
"toString": PropTypes.func.isRequired,
|
|
338
|
+
"valueOf": PropTypes.func.isRequired
|
|
339
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
340
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
341
|
+
"description": PropTypes.string,
|
|
342
|
+
"toString": PropTypes.func.isRequired,
|
|
343
|
+
"valueOf": PropTypes.func.isRequired
|
|
344
|
+
}), PropTypes.string]),
|
|
345
|
+
"pl": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
346
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
347
|
+
"description": PropTypes.string,
|
|
348
|
+
"toString": PropTypes.func.isRequired,
|
|
349
|
+
"valueOf": PropTypes.func.isRequired
|
|
350
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
351
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
352
|
+
"description": PropTypes.string,
|
|
353
|
+
"toString": PropTypes.func.isRequired,
|
|
354
|
+
"valueOf": PropTypes.func.isRequired
|
|
355
|
+
}), PropTypes.string]),
|
|
356
|
+
"pr": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
357
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
358
|
+
"description": PropTypes.string,
|
|
359
|
+
"toString": PropTypes.func.isRequired,
|
|
360
|
+
"valueOf": PropTypes.func.isRequired
|
|
361
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
362
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
363
|
+
"description": PropTypes.string,
|
|
364
|
+
"toString": PropTypes.func.isRequired,
|
|
365
|
+
"valueOf": PropTypes.func.isRequired
|
|
366
|
+
}), PropTypes.string]),
|
|
367
|
+
"pt": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
368
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
369
|
+
"description": PropTypes.string,
|
|
370
|
+
"toString": PropTypes.func.isRequired,
|
|
371
|
+
"valueOf": PropTypes.func.isRequired
|
|
372
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
373
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
374
|
+
"description": PropTypes.string,
|
|
375
|
+
"toString": PropTypes.func.isRequired,
|
|
376
|
+
"valueOf": PropTypes.func.isRequired
|
|
377
|
+
}), PropTypes.string]),
|
|
378
|
+
"px": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
379
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
380
|
+
"description": PropTypes.string,
|
|
381
|
+
"toString": PropTypes.func.isRequired,
|
|
382
|
+
"valueOf": PropTypes.func.isRequired
|
|
383
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
384
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
385
|
+
"description": PropTypes.string,
|
|
386
|
+
"toString": PropTypes.func.isRequired,
|
|
387
|
+
"valueOf": PropTypes.func.isRequired
|
|
388
|
+
}), PropTypes.string]),
|
|
389
|
+
"py": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
390
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
391
|
+
"description": PropTypes.string,
|
|
392
|
+
"toString": PropTypes.func.isRequired,
|
|
393
|
+
"valueOf": PropTypes.func.isRequired
|
|
394
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
395
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
396
|
+
"description": PropTypes.string,
|
|
397
|
+
"toString": PropTypes.func.isRequired,
|
|
398
|
+
"valueOf": PropTypes.func.isRequired
|
|
399
|
+
}), PropTypes.string]),
|
|
400
|
+
"rightSideButtons": PropTypes.node,
|
|
401
|
+
"saveButton": PropTypes.node,
|
|
402
|
+
"stickyFooter": PropTypes.bool,
|
|
403
|
+
"warningCount": PropTypes.number
|
|
123
404
|
};
|
|
405
|
+
export { Form };
|
|
124
406
|
Form.displayName = "Form";
|
|
125
407
|
export default Form;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export const FORM_BUTTON_ALIGNMENTS:
|
|
1
|
+
export declare const FORM_BUTTON_ALIGNMENTS: readonly ["left", "right"];
|
|
2
|
+
export declare type FormButtonAlignment = typeof FORM_BUTTON_ALIGNMENTS[number];
|