@atlaskit/form 8.11.5 → 8.11.7
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 +12 -0
- package/dist/cjs/fieldset.js +5 -2
- package/dist/cjs/form-section.js +10 -12
- package/dist/cjs/label.js +5 -2
- package/dist/cjs/messages.js +20 -21
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/fieldset.js +7 -4
- package/dist/es2019/form-section.js +1 -1
- package/dist/es2019/label.js +7 -4
- package/dist/es2019/messages.js +0 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/fieldset.js +7 -4
- package/dist/esm/form-section.js +1 -1
- package/dist/esm/label.js +7 -4
- package/dist/esm/messages.js +0 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/form-header.d.ts +8 -7
- package/dist/types/form-section.d.ts +3 -2
- package/dist/types/messages.d.ts +5 -4
- package/dist/types-ts4.5/form-header.d.ts +8 -7
- package/dist/types-ts4.5/form-section.d.ts +3 -2
- package/dist/types-ts4.5/messages.d.ts +5 -4
- package/package.json +6 -6
- package/report.api.md +25 -5
- package/tmp/api-report-tmp.d.ts +256 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/form
|
|
2
2
|
|
|
3
|
+
## 8.11.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`ddb4e858a79`](https://bitbucket.org/atlassian/atlassian-frontend/commits/ddb4e858a79) - Removes usage of deprecated theme mixins in favor of static token / color usage.
|
|
8
|
+
|
|
9
|
+
## 8.11.6
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`e7ea6832ad2`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e7ea6832ad2) - Bans the use of React.FC/React.FunctionComponent type in ADS components as part of the React 18 migration work. The change is internal only and should not introduce any changes for the component consumers.
|
|
14
|
+
|
|
3
15
|
## 8.11.5
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/cjs/fieldset.js
CHANGED
|
@@ -32,11 +32,14 @@ var getFieldsetLabelDynamicStyles = function getFieldsetLabelDynamicStyles(mode)
|
|
|
32
32
|
mode: mode
|
|
33
33
|
}
|
|
34
34
|
}), {
|
|
35
|
-
color:
|
|
35
|
+
color: (0, _components.themed)({
|
|
36
|
+
dark: "var(--ds-text-subtle, ".concat(_colors.DN300, ")"),
|
|
37
|
+
light: "var(--ds-text-subtle, ".concat(_colors.N200, ")")
|
|
38
|
+
})({
|
|
36
39
|
theme: {
|
|
37
40
|
mode: mode
|
|
38
41
|
}
|
|
39
|
-
})
|
|
42
|
+
})
|
|
40
43
|
}]);
|
|
41
44
|
};
|
|
42
45
|
|
package/dist/cjs/form-section.js
CHANGED
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports.default = void 0;
|
|
8
|
-
var _react =
|
|
9
|
-
var _react2 = require("@emotion/react");
|
|
7
|
+
var _react = require("@emotion/react");
|
|
10
8
|
var _components = require("@atlaskit/theme/components");
|
|
11
9
|
var _typography = require("@atlaskit/theme/typography");
|
|
12
10
|
/** @jsx jsx */
|
|
13
11
|
|
|
14
|
-
var formSectionDescriptionStyles = (0,
|
|
12
|
+
var formSectionDescriptionStyles = (0, _react.css)({
|
|
15
13
|
marginTop: "var(--ds-space-100, 8px)"
|
|
16
14
|
});
|
|
17
|
-
var formSectionTitleStyles = (0,
|
|
15
|
+
var formSectionTitleStyles = (0, _react.css)({
|
|
18
16
|
marginTop: 0,
|
|
19
17
|
marginRight: "var(--ds-space-400, 32px)",
|
|
20
18
|
lineHeight: "var(--ds-space-400, 32px)",
|
|
@@ -22,25 +20,25 @@ var formSectionTitleStyles = (0, _react2.css)({
|
|
|
22
20
|
textOverflow: 'ellipsis',
|
|
23
21
|
whiteSpace: 'nowrap'
|
|
24
22
|
});
|
|
25
|
-
var formSectionWrapperStyles = (0,
|
|
23
|
+
var formSectionWrapperStyles = (0, _react.css)({
|
|
26
24
|
marginTop: "var(--ds-space-300, 24px)"
|
|
27
25
|
});
|
|
28
26
|
|
|
29
27
|
// eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
|
|
30
|
-
var lightH600Styles = (0,
|
|
28
|
+
var lightH600Styles = (0, _react.css)((0, _typography.h600)({
|
|
31
29
|
theme: {
|
|
32
30
|
mode: 'light'
|
|
33
31
|
}
|
|
34
32
|
}));
|
|
35
33
|
// eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
|
|
36
|
-
var darkH600Styles = (0,
|
|
34
|
+
var darkH600Styles = (0, _react.css)((0, _typography.h600)({
|
|
37
35
|
theme: {
|
|
38
36
|
mode: 'dark'
|
|
39
37
|
}
|
|
40
38
|
}));
|
|
41
39
|
var FormSectionWrapper = function FormSectionWrapper(_ref) {
|
|
42
40
|
var children = _ref.children;
|
|
43
|
-
return (0,
|
|
41
|
+
return (0, _react.jsx)("div", {
|
|
44
42
|
css: formSectionWrapperStyles
|
|
45
43
|
}, children);
|
|
46
44
|
};
|
|
@@ -48,13 +46,13 @@ var FormSectionTitle = function FormSectionTitle(_ref2) {
|
|
|
48
46
|
var children = _ref2.children;
|
|
49
47
|
var _useGlobalTheme = (0, _components.useGlobalTheme)(),
|
|
50
48
|
mode = _useGlobalTheme.mode;
|
|
51
|
-
return (0,
|
|
49
|
+
return (0, _react.jsx)("h3", {
|
|
52
50
|
css: [formSectionTitleStyles, mode === 'light' ? lightH600Styles : darkH600Styles]
|
|
53
51
|
}, children);
|
|
54
52
|
};
|
|
55
53
|
var FormSectionDescription = function FormSectionDescription(_ref3) {
|
|
56
54
|
var children = _ref3.children;
|
|
57
|
-
return (0,
|
|
55
|
+
return (0, _react.jsx)("div", {
|
|
58
56
|
css: formSectionDescriptionStyles
|
|
59
57
|
}, children);
|
|
60
58
|
};
|
|
@@ -73,7 +71,7 @@ var FormSection = function FormSection(_ref4) {
|
|
|
73
71
|
var children = _ref4.children,
|
|
74
72
|
description = _ref4.description,
|
|
75
73
|
title = _ref4.title;
|
|
76
|
-
return (0,
|
|
74
|
+
return (0, _react.jsx)(FormSectionWrapper, null, title && (0, _react.jsx)(FormSectionTitle, null, title), description && (0, _react.jsx)(FormSectionDescription, null, description), children);
|
|
77
75
|
};
|
|
78
76
|
var _default = FormSection;
|
|
79
77
|
exports.default = _default;
|
package/dist/cjs/label.js
CHANGED
|
@@ -29,11 +29,14 @@ var getFieldsetLabelDynamicStyles = function getFieldsetLabelDynamicStyles(mode)
|
|
|
29
29
|
mode: mode
|
|
30
30
|
}
|
|
31
31
|
}), {
|
|
32
|
-
color:
|
|
32
|
+
color: (0, _components.themed)({
|
|
33
|
+
dark: "var(--ds-text-subtle, ".concat(_colors.DN300, ")"),
|
|
34
|
+
light: "var(--ds-text-subtle, ".concat(_colors.N200, ")")
|
|
35
|
+
})({
|
|
33
36
|
theme: {
|
|
34
37
|
mode: mode
|
|
35
38
|
}
|
|
36
|
-
})
|
|
39
|
+
})
|
|
37
40
|
}]);
|
|
38
41
|
};
|
|
39
42
|
|
package/dist/cjs/messages.js
CHANGED
|
@@ -5,8 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.ValidMessage = exports.HelperMessage = exports.ErrorMessage = void 0;
|
|
8
|
-
var _react =
|
|
9
|
-
var _react2 = require("@emotion/react");
|
|
8
|
+
var _react = require("@emotion/react");
|
|
10
9
|
var _success = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/success"));
|
|
11
10
|
var _error = _interopRequireDefault(require("@atlaskit/icon/glyph/error"));
|
|
12
11
|
var _colors = require("@atlaskit/theme/colors");
|
|
@@ -27,18 +26,18 @@ var _field = require("./field");
|
|
|
27
26
|
var fontFamily = (0, _constants.fontFamily)();
|
|
28
27
|
|
|
29
28
|
// eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
|
|
30
|
-
var lightH200Styles = (0,
|
|
29
|
+
var lightH200Styles = (0, _react.css)((0, _typography.h200)({
|
|
31
30
|
theme: {
|
|
32
31
|
mode: 'light'
|
|
33
32
|
}
|
|
34
33
|
}));
|
|
35
34
|
// eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
|
|
36
|
-
var darkH200Styles = (0,
|
|
35
|
+
var darkH200Styles = (0, _react.css)((0, _typography.h200)({
|
|
37
36
|
theme: {
|
|
38
37
|
mode: 'dark'
|
|
39
38
|
}
|
|
40
39
|
}));
|
|
41
|
-
var messageStyles = (0,
|
|
40
|
+
var messageStyles = (0, _react.css)({
|
|
42
41
|
display: 'flex',
|
|
43
42
|
marginTop: "var(--ds-space-050, 4px)",
|
|
44
43
|
justifyContent: 'baseline',
|
|
@@ -46,31 +45,31 @@ var messageStyles = (0, _react2.css)({
|
|
|
46
45
|
fontWeight: 'normal'
|
|
47
46
|
});
|
|
48
47
|
var messageAppearanceStyles = {
|
|
49
|
-
default: (0,
|
|
48
|
+
default: (0, _react.css)({
|
|
50
49
|
color: "var(--ds-text-subtlest, ".concat(_colors.N200, ")")
|
|
51
50
|
}),
|
|
52
|
-
error: (0,
|
|
51
|
+
error: (0, _react.css)({
|
|
53
52
|
color: "var(--ds-text-danger, #AE2A19)"
|
|
54
53
|
}),
|
|
55
|
-
valid: (0,
|
|
54
|
+
valid: (0, _react.css)({
|
|
56
55
|
color: "var(--ds-text-success, #216E4E)"
|
|
57
56
|
})
|
|
58
57
|
};
|
|
59
|
-
var iconWrapperStyles = (0,
|
|
58
|
+
var iconWrapperStyles = (0, _react.css)({
|
|
60
59
|
display: 'flex'
|
|
61
60
|
});
|
|
62
61
|
var IconWrapper = function IconWrapper(_ref) {
|
|
63
62
|
var children = _ref.children;
|
|
64
|
-
return (0,
|
|
63
|
+
return (0, _react.jsx)("span", {
|
|
65
64
|
css: iconWrapperStyles
|
|
66
65
|
}, children);
|
|
67
66
|
};
|
|
68
67
|
var messageIcons = {
|
|
69
|
-
error: (0,
|
|
68
|
+
error: (0, _react.jsx)(_error.default, {
|
|
70
69
|
size: "small",
|
|
71
70
|
label: "error"
|
|
72
71
|
}),
|
|
73
|
-
valid: (0,
|
|
72
|
+
valid: (0, _react.jsx)(_success.default, {
|
|
74
73
|
size: "small",
|
|
75
74
|
label: "success"
|
|
76
75
|
})
|
|
@@ -93,13 +92,13 @@ var Message = function Message(_ref2) {
|
|
|
93
92
|
* If the child is just a string, this is not required and we can use one
|
|
94
93
|
* less DOM element.
|
|
95
94
|
*/
|
|
96
|
-
var content = typeof children === 'string' ? children : (0,
|
|
97
|
-
return (0,
|
|
95
|
+
var content = typeof children === 'string' ? children : (0, _react.jsx)("span", null, children);
|
|
96
|
+
return (0, _react.jsx)("div", {
|
|
98
97
|
css: [mode === 'light' ? lightH200Styles : darkH200Styles, messageStyles, messageAppearanceStyles[appearance]],
|
|
99
98
|
"data-testid": testId,
|
|
100
99
|
id: fieldId,
|
|
101
100
|
role: "alert"
|
|
102
|
-
}, icon && (0,
|
|
101
|
+
}, icon && (0, _react.jsx)(IconWrapper, null, icon), content);
|
|
103
102
|
};
|
|
104
103
|
|
|
105
104
|
/**
|
|
@@ -112,8 +111,8 @@ var Message = function Message(_ref2) {
|
|
|
112
111
|
var HelperMessage = function HelperMessage(_ref3) {
|
|
113
112
|
var children = _ref3.children,
|
|
114
113
|
testId = _ref3.testId;
|
|
115
|
-
return (0,
|
|
116
|
-
return (0,
|
|
114
|
+
return (0, _react.jsx)(_field.FieldId.Consumer, null, function (fieldId) {
|
|
115
|
+
return (0, _react.jsx)(Message, {
|
|
117
116
|
fieldId: fieldId ? "".concat(fieldId, "-helper") : undefined,
|
|
118
117
|
testId: testId
|
|
119
118
|
}, children);
|
|
@@ -131,8 +130,8 @@ exports.HelperMessage = HelperMessage;
|
|
|
131
130
|
var ErrorMessage = function ErrorMessage(_ref4) {
|
|
132
131
|
var children = _ref4.children,
|
|
133
132
|
testId = _ref4.testId;
|
|
134
|
-
return (0,
|
|
135
|
-
return (0,
|
|
133
|
+
return (0, _react.jsx)(_field.FieldId.Consumer, null, function (fieldId) {
|
|
134
|
+
return (0, _react.jsx)(Message, {
|
|
136
135
|
appearance: "error",
|
|
137
136
|
fieldId: fieldId ? "".concat(fieldId, "-error") : undefined,
|
|
138
137
|
testId: testId
|
|
@@ -151,8 +150,8 @@ exports.ErrorMessage = ErrorMessage;
|
|
|
151
150
|
var ValidMessage = function ValidMessage(_ref5) {
|
|
152
151
|
var children = _ref5.children,
|
|
153
152
|
testId = _ref5.testId;
|
|
154
|
-
return (0,
|
|
155
|
-
return (0,
|
|
153
|
+
return (0, _react.jsx)(_field.FieldId.Consumer, null, function (fieldId) {
|
|
154
|
+
return (0, _react.jsx)(Message, {
|
|
156
155
|
appearance: "valid",
|
|
157
156
|
fieldId: fieldId ? "".concat(fieldId, "-valid") : undefined,
|
|
158
157
|
testId: testId
|
package/dist/cjs/version.json
CHANGED
package/dist/es2019/fieldset.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
|
|
3
3
|
import { css, jsx } from '@emotion/react';
|
|
4
|
-
import {
|
|
5
|
-
import { useGlobalTheme } from '@atlaskit/theme/components';
|
|
4
|
+
import { DN300, N200 } from '@atlaskit/theme/colors';
|
|
5
|
+
import { themed, useGlobalTheme } from '@atlaskit/theme/components';
|
|
6
6
|
import { fontFamily as getFontFamily } from '@atlaskit/theme/constants';
|
|
7
7
|
import { h200 } from '@atlaskit/theme/typography';
|
|
8
8
|
const fontFamily = getFontFamily();
|
|
@@ -25,11 +25,14 @@ const getFieldsetLabelDynamicStyles = mode => css([h200({
|
|
|
25
25
|
mode
|
|
26
26
|
}
|
|
27
27
|
}), {
|
|
28
|
-
color:
|
|
28
|
+
color: themed({
|
|
29
|
+
dark: `var(--ds-text-subtle, ${DN300})`,
|
|
30
|
+
light: `var(--ds-text-subtle, ${N200})`
|
|
31
|
+
})({
|
|
29
32
|
theme: {
|
|
30
33
|
mode
|
|
31
34
|
}
|
|
32
|
-
})
|
|
35
|
+
})
|
|
33
36
|
}]);
|
|
34
37
|
|
|
35
38
|
// eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
|
package/dist/es2019/label.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
|
|
3
3
|
import { css, jsx } from '@emotion/react';
|
|
4
|
-
import {
|
|
5
|
-
import { useGlobalTheme } from '@atlaskit/theme/components';
|
|
4
|
+
import { DN300, N200 } from '@atlaskit/theme/colors';
|
|
5
|
+
import { themed, useGlobalTheme } from '@atlaskit/theme/components';
|
|
6
6
|
import { fontFamily as getFontFamily } from '@atlaskit/theme/constants';
|
|
7
7
|
import { h200 } from '@atlaskit/theme/typography';
|
|
8
8
|
const fontFamily = getFontFamily();
|
|
@@ -22,11 +22,14 @@ const getFieldsetLabelDynamicStyles = mode => css([h200({
|
|
|
22
22
|
mode
|
|
23
23
|
}
|
|
24
24
|
}), {
|
|
25
|
-
color:
|
|
25
|
+
color: themed({
|
|
26
|
+
dark: `var(--ds-text-subtle, ${DN300})`,
|
|
27
|
+
light: `var(--ds-text-subtle, ${N200})`
|
|
28
|
+
})({
|
|
26
29
|
theme: {
|
|
27
30
|
mode
|
|
28
31
|
}
|
|
29
|
-
})
|
|
32
|
+
})
|
|
30
33
|
}]);
|
|
31
34
|
|
|
32
35
|
// eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
|
package/dist/es2019/messages.js
CHANGED
package/dist/es2019/version.json
CHANGED
package/dist/esm/fieldset.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
|
|
3
3
|
import { css, jsx } from '@emotion/react';
|
|
4
|
-
import {
|
|
5
|
-
import { useGlobalTheme } from '@atlaskit/theme/components';
|
|
4
|
+
import { DN300, N200 } from '@atlaskit/theme/colors';
|
|
5
|
+
import { themed, useGlobalTheme } from '@atlaskit/theme/components';
|
|
6
6
|
import { fontFamily as getFontFamily } from '@atlaskit/theme/constants';
|
|
7
7
|
import { h200 } from '@atlaskit/theme/typography';
|
|
8
8
|
var fontFamily = getFontFamily();
|
|
@@ -26,11 +26,14 @@ var getFieldsetLabelDynamicStyles = function getFieldsetLabelDynamicStyles(mode)
|
|
|
26
26
|
mode: mode
|
|
27
27
|
}
|
|
28
28
|
}), {
|
|
29
|
-
color:
|
|
29
|
+
color: themed({
|
|
30
|
+
dark: "var(--ds-text-subtle, ".concat(DN300, ")"),
|
|
31
|
+
light: "var(--ds-text-subtle, ".concat(N200, ")")
|
|
32
|
+
})({
|
|
30
33
|
theme: {
|
|
31
34
|
mode: mode
|
|
32
35
|
}
|
|
33
|
-
})
|
|
36
|
+
})
|
|
34
37
|
}]);
|
|
35
38
|
};
|
|
36
39
|
|
package/dist/esm/form-section.js
CHANGED
package/dist/esm/label.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
|
|
3
3
|
import { css, jsx } from '@emotion/react';
|
|
4
|
-
import {
|
|
5
|
-
import { useGlobalTheme } from '@atlaskit/theme/components';
|
|
4
|
+
import { DN300, N200 } from '@atlaskit/theme/colors';
|
|
5
|
+
import { themed, useGlobalTheme } from '@atlaskit/theme/components';
|
|
6
6
|
import { fontFamily as getFontFamily } from '@atlaskit/theme/constants';
|
|
7
7
|
import { h200 } from '@atlaskit/theme/typography';
|
|
8
8
|
var fontFamily = getFontFamily();
|
|
@@ -23,11 +23,14 @@ var getFieldsetLabelDynamicStyles = function getFieldsetLabelDynamicStyles(mode)
|
|
|
23
23
|
mode: mode
|
|
24
24
|
}
|
|
25
25
|
}), {
|
|
26
|
-
color:
|
|
26
|
+
color: themed({
|
|
27
|
+
dark: "var(--ds-text-subtle, ".concat(DN300, ")"),
|
|
28
|
+
light: "var(--ds-text-subtle, ".concat(N200, ")")
|
|
29
|
+
})({
|
|
27
30
|
theme: {
|
|
28
31
|
mode: mode
|
|
29
32
|
}
|
|
30
|
-
})
|
|
33
|
+
})
|
|
31
34
|
}]);
|
|
32
35
|
};
|
|
33
36
|
|
package/dist/esm/messages.js
CHANGED
package/dist/esm/version.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
3
4
|
export interface FormHeaderProps {
|
|
4
5
|
/**
|
|
5
6
|
* Title of the form. This is a header.
|
|
@@ -14,15 +15,15 @@ export interface FormHeaderProps {
|
|
|
14
15
|
*/
|
|
15
16
|
children?: ReactNode;
|
|
16
17
|
}
|
|
17
|
-
declare const FormHeaderContent:
|
|
18
|
+
declare const FormHeaderContent: ({ children }: {
|
|
18
19
|
children: ReactNode;
|
|
19
|
-
}
|
|
20
|
-
declare const FormHeaderDescription:
|
|
20
|
+
}) => jsx.JSX.Element;
|
|
21
|
+
declare const FormHeaderDescription: ({ children }: {
|
|
21
22
|
children: ReactNode;
|
|
22
|
-
}
|
|
23
|
-
declare const FormHeaderTitle:
|
|
23
|
+
}) => jsx.JSX.Element;
|
|
24
|
+
declare const FormHeaderTitle: ({ children }: {
|
|
24
25
|
children: ReactNode;
|
|
25
|
-
}
|
|
26
|
+
}) => jsx.JSX.Element;
|
|
26
27
|
/**
|
|
27
28
|
* __Form header__
|
|
28
29
|
*
|
|
@@ -33,6 +34,6 @@ declare const FormHeaderTitle: React.FC<{
|
|
|
33
34
|
* - [Code](https://atlaskit.atlassian.com/packages/design-system/form/docs/layout)
|
|
34
35
|
* - [Usage](https://atlaskit.atlassian.com/packages/design-system/form/docs/layout)
|
|
35
36
|
*/
|
|
36
|
-
declare const FormHeader:
|
|
37
|
+
declare const FormHeader: ({ children, description, title }: FormHeaderProps) => jsx.JSX.Element;
|
|
37
38
|
export default FormHeader;
|
|
38
39
|
export { FormHeaderContent, FormHeaderDescription, FormHeaderTitle };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
-
import
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
3
4
|
export interface FormSectionProps {
|
|
4
5
|
/**
|
|
5
6
|
* Title of the form section.
|
|
@@ -24,5 +25,5 @@ export interface FormSectionProps {
|
|
|
24
25
|
* - [Code](https://atlaskit.atlassian.com/packages/design-system/form/docs/layout)
|
|
25
26
|
* - [Usage](https://atlaskit.atlassian.com/packages/design-system/form/docs/layout)
|
|
26
27
|
*/
|
|
27
|
-
declare const FormSection:
|
|
28
|
+
declare const FormSection: ({ children, description, title }: FormSectionProps) => jsx.JSX.Element;
|
|
28
29
|
export default FormSection;
|
package/dist/types/messages.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
-
import
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
3
4
|
type MessageAppearance = 'default' | 'error' | 'valid';
|
|
4
5
|
/**
|
|
5
6
|
* API for the internal `<Message />` component. This is not public API.
|
|
@@ -32,7 +33,7 @@ type MessageProps = Pick<InternalMessageProps, 'children' | 'testId'>;
|
|
|
32
33
|
* 'Password should be more than 4 characters'
|
|
33
34
|
*
|
|
34
35
|
*/
|
|
35
|
-
export declare const HelperMessage:
|
|
36
|
+
export declare const HelperMessage: ({ children, testId }: MessageProps) => jsx.JSX.Element;
|
|
36
37
|
/**
|
|
37
38
|
* __Error message__
|
|
38
39
|
*
|
|
@@ -40,7 +41,7 @@ export declare const HelperMessage: React.FC<MessageProps>;
|
|
|
40
41
|
* 'Invalid username, needs to be more than 4 characters'.
|
|
41
42
|
*
|
|
42
43
|
*/
|
|
43
|
-
export declare const ErrorMessage:
|
|
44
|
+
export declare const ErrorMessage: ({ children, testId }: MessageProps) => jsx.JSX.Element;
|
|
44
45
|
/**
|
|
45
46
|
* __Valid message__
|
|
46
47
|
*
|
|
@@ -48,5 +49,5 @@ export declare const ErrorMessage: React.FC<MessageProps>;
|
|
|
48
49
|
* a helper message could be 'Nice one, this username is available'.
|
|
49
50
|
*
|
|
50
51
|
*/
|
|
51
|
-
export declare const ValidMessage:
|
|
52
|
+
export declare const ValidMessage: ({ children, testId }: MessageProps) => jsx.JSX.Element;
|
|
52
53
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
3
4
|
export interface FormHeaderProps {
|
|
4
5
|
/**
|
|
5
6
|
* Title of the form. This is a header.
|
|
@@ -14,15 +15,15 @@ export interface FormHeaderProps {
|
|
|
14
15
|
*/
|
|
15
16
|
children?: ReactNode;
|
|
16
17
|
}
|
|
17
|
-
declare const FormHeaderContent:
|
|
18
|
+
declare const FormHeaderContent: ({ children }: {
|
|
18
19
|
children: ReactNode;
|
|
19
|
-
}
|
|
20
|
-
declare const FormHeaderDescription:
|
|
20
|
+
}) => jsx.JSX.Element;
|
|
21
|
+
declare const FormHeaderDescription: ({ children }: {
|
|
21
22
|
children: ReactNode;
|
|
22
|
-
}
|
|
23
|
-
declare const FormHeaderTitle:
|
|
23
|
+
}) => jsx.JSX.Element;
|
|
24
|
+
declare const FormHeaderTitle: ({ children }: {
|
|
24
25
|
children: ReactNode;
|
|
25
|
-
}
|
|
26
|
+
}) => jsx.JSX.Element;
|
|
26
27
|
/**
|
|
27
28
|
* __Form header__
|
|
28
29
|
*
|
|
@@ -33,6 +34,6 @@ declare const FormHeaderTitle: React.FC<{
|
|
|
33
34
|
* - [Code](https://atlaskit.atlassian.com/packages/design-system/form/docs/layout)
|
|
34
35
|
* - [Usage](https://atlaskit.atlassian.com/packages/design-system/form/docs/layout)
|
|
35
36
|
*/
|
|
36
|
-
declare const FormHeader:
|
|
37
|
+
declare const FormHeader: ({ children, description, title }: FormHeaderProps) => jsx.JSX.Element;
|
|
37
38
|
export default FormHeader;
|
|
38
39
|
export { FormHeaderContent, FormHeaderDescription, FormHeaderTitle };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
-
import
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
3
4
|
export interface FormSectionProps {
|
|
4
5
|
/**
|
|
5
6
|
* Title of the form section.
|
|
@@ -24,5 +25,5 @@ export interface FormSectionProps {
|
|
|
24
25
|
* - [Code](https://atlaskit.atlassian.com/packages/design-system/form/docs/layout)
|
|
25
26
|
* - [Usage](https://atlaskit.atlassian.com/packages/design-system/form/docs/layout)
|
|
26
27
|
*/
|
|
27
|
-
declare const FormSection:
|
|
28
|
+
declare const FormSection: ({ children, description, title }: FormSectionProps) => jsx.JSX.Element;
|
|
28
29
|
export default FormSection;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
-
import
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
3
4
|
type MessageAppearance = 'default' | 'error' | 'valid';
|
|
4
5
|
/**
|
|
5
6
|
* API for the internal `<Message />` component. This is not public API.
|
|
@@ -32,7 +33,7 @@ type MessageProps = Pick<InternalMessageProps, 'children' | 'testId'>;
|
|
|
32
33
|
* 'Password should be more than 4 characters'
|
|
33
34
|
*
|
|
34
35
|
*/
|
|
35
|
-
export declare const HelperMessage:
|
|
36
|
+
export declare const HelperMessage: ({ children, testId }: MessageProps) => jsx.JSX.Element;
|
|
36
37
|
/**
|
|
37
38
|
* __Error message__
|
|
38
39
|
*
|
|
@@ -40,7 +41,7 @@ export declare const HelperMessage: React.FC<MessageProps>;
|
|
|
40
41
|
* 'Invalid username, needs to be more than 4 characters'.
|
|
41
42
|
*
|
|
42
43
|
*/
|
|
43
|
-
export declare const ErrorMessage:
|
|
44
|
+
export declare const ErrorMessage: ({ children, testId }: MessageProps) => jsx.JSX.Element;
|
|
44
45
|
/**
|
|
45
46
|
* __Valid message__
|
|
46
47
|
*
|
|
@@ -48,5 +49,5 @@ export declare const ErrorMessage: React.FC<MessageProps>;
|
|
|
48
49
|
* a helper message could be 'Nice one, this username is available'.
|
|
49
50
|
*
|
|
50
51
|
*/
|
|
51
|
-
export declare const ValidMessage:
|
|
52
|
+
export declare const ValidMessage: ({ children, testId }: MessageProps) => jsx.JSX.Element;
|
|
52
53
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/form",
|
|
3
|
-
"version": "8.11.
|
|
3
|
+
"version": "8.11.7",
|
|
4
4
|
"description": "A form allows users to input information.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
},
|
|
39
39
|
"atlassian": {
|
|
40
40
|
"team": "Design System Team",
|
|
41
|
-
"releaseModel": "
|
|
41
|
+
"releaseModel": "continuous",
|
|
42
42
|
"website": {
|
|
43
43
|
"name": "Form",
|
|
44
44
|
"category": "Components"
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@atlaskit/icon": "^21.12.0",
|
|
50
50
|
"@atlaskit/theme": "^12.5.0",
|
|
51
|
-
"@atlaskit/tokens": "^1.
|
|
51
|
+
"@atlaskit/tokens": "^1.5.0",
|
|
52
52
|
"@babel/runtime": "^7.0.0",
|
|
53
53
|
"@emotion/react": "^11.7.1",
|
|
54
54
|
"final-form": "^4.20.1",
|
|
@@ -64,16 +64,16 @@
|
|
|
64
64
|
"@atlaskit/button": "^16.7.0",
|
|
65
65
|
"@atlaskit/calendar": "^13.1.0",
|
|
66
66
|
"@atlaskit/checkbox": "^12.6.0",
|
|
67
|
-
"@atlaskit/datetime-picker": "^12.
|
|
67
|
+
"@atlaskit/datetime-picker": "^12.7.0",
|
|
68
68
|
"@atlaskit/docs": "^9.1.0",
|
|
69
69
|
"@atlaskit/dropdown-menu": "^11.9.0",
|
|
70
70
|
"@atlaskit/ds-lib": "^2.2.0",
|
|
71
71
|
"@atlaskit/lozenge": "^11.4.0",
|
|
72
|
-
"@atlaskit/modal-dialog": "^12.
|
|
72
|
+
"@atlaskit/modal-dialog": "^12.6.0",
|
|
73
73
|
"@atlaskit/radio": "^5.6.0",
|
|
74
74
|
"@atlaskit/range": "^7.1.0",
|
|
75
75
|
"@atlaskit/section-message": "^6.4.0",
|
|
76
|
-
"@atlaskit/select": "^16.
|
|
76
|
+
"@atlaskit/select": "^16.5.0",
|
|
77
77
|
"@atlaskit/ssr": "*",
|
|
78
78
|
"@atlaskit/textarea": "^4.7.0",
|
|
79
79
|
"@atlaskit/textfield": "^5.5.0",
|
package/report.api.md
CHANGED
|
@@ -52,7 +52,10 @@ interface CheckboxProps {
|
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
// @public
|
|
55
|
-
export const ErrorMessage:
|
|
55
|
+
export const ErrorMessage: ({
|
|
56
|
+
children,
|
|
57
|
+
testId,
|
|
58
|
+
}: MessageProps) => jsx.JSX.Element;
|
|
56
59
|
|
|
57
60
|
// @public (undocumented)
|
|
58
61
|
export function Field<
|
|
@@ -77,6 +80,7 @@ interface FieldComponentProps<FieldValue, Element extends SupportedElements> {
|
|
|
77
80
|
isRequired?: boolean;
|
|
78
81
|
label?: ReactNode;
|
|
79
82
|
name: string;
|
|
83
|
+
testId?: string;
|
|
80
84
|
transform?: (
|
|
81
85
|
event: FieldValue | FormEvent<Element>,
|
|
82
86
|
current: FieldValue,
|
|
@@ -162,7 +166,11 @@ interface FormFooterProps {
|
|
|
162
166
|
}
|
|
163
167
|
|
|
164
168
|
// @public
|
|
165
|
-
export const FormHeader:
|
|
169
|
+
export const FormHeader: ({
|
|
170
|
+
children,
|
|
171
|
+
description,
|
|
172
|
+
title,
|
|
173
|
+
}: FormHeaderProps) => jsx.JSX.Element;
|
|
166
174
|
|
|
167
175
|
// @public (undocumented)
|
|
168
176
|
interface FormHeaderProps {
|
|
@@ -188,7 +196,11 @@ export interface FormProps<FormValues> {
|
|
|
188
196
|
}
|
|
189
197
|
|
|
190
198
|
// @public
|
|
191
|
-
export const FormSection:
|
|
199
|
+
export const FormSection: ({
|
|
200
|
+
children,
|
|
201
|
+
description,
|
|
202
|
+
title,
|
|
203
|
+
}: FormSectionProps) => jsx.JSX.Element;
|
|
192
204
|
|
|
193
205
|
// @public (undocumented)
|
|
194
206
|
interface FormSectionProps {
|
|
@@ -198,7 +210,10 @@ interface FormSectionProps {
|
|
|
198
210
|
}
|
|
199
211
|
|
|
200
212
|
// @public
|
|
201
|
-
export const HelperMessage:
|
|
213
|
+
export const HelperMessage: ({
|
|
214
|
+
children,
|
|
215
|
+
testId,
|
|
216
|
+
}: MessageProps) => jsx.JSX.Element;
|
|
202
217
|
|
|
203
218
|
// @public
|
|
204
219
|
interface InternalMessageProps {
|
|
@@ -220,6 +235,8 @@ export interface LabelProps {
|
|
|
220
235
|
htmlFor: string;
|
|
221
236
|
// (undocumented)
|
|
222
237
|
id?: string;
|
|
238
|
+
// (undocumented)
|
|
239
|
+
testId?: string;
|
|
223
240
|
}
|
|
224
241
|
|
|
225
242
|
// @public (undocumented)
|
|
@@ -288,7 +305,10 @@ type SupportedElements =
|
|
|
288
305
|
| HTMLTextAreaElement;
|
|
289
306
|
|
|
290
307
|
// @public
|
|
291
|
-
export const ValidMessage:
|
|
308
|
+
export const ValidMessage: ({
|
|
309
|
+
children,
|
|
310
|
+
testId,
|
|
311
|
+
}: MessageProps) => jsx.JSX.Element;
|
|
292
312
|
|
|
293
313
|
// (No @packageDocumentation comment for this package)
|
|
294
314
|
```
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
## API Report File for "@atlaskit/form"
|
|
2
|
+
|
|
3
|
+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
|
|
7
|
+
import { FC } from 'react';
|
|
8
|
+
import { FormApi as FormApi_2 } from 'final-form';
|
|
9
|
+
import { FormEvent } from 'react';
|
|
10
|
+
import { FormState } from 'final-form';
|
|
11
|
+
import { jsx } from '@emotion/react';
|
|
12
|
+
import { default as React_2 } from 'react';
|
|
13
|
+
import { ReactNode } from 'react';
|
|
14
|
+
|
|
15
|
+
// @public (undocumented)
|
|
16
|
+
type Align = 'end' | 'start';
|
|
17
|
+
|
|
18
|
+
// @public
|
|
19
|
+
export const CheckboxField: FC<CheckboxProps>;
|
|
20
|
+
|
|
21
|
+
// @public (undocumented)
|
|
22
|
+
export interface CheckboxFieldProps extends FieldProps<string | undefined> {
|
|
23
|
+
// (undocumented)
|
|
24
|
+
isChecked: boolean;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// @public (undocumented)
|
|
28
|
+
interface CheckboxProps {
|
|
29
|
+
children: (args: {
|
|
30
|
+
fieldProps: CheckboxFieldProps;
|
|
31
|
+
error?: string;
|
|
32
|
+
valid: boolean;
|
|
33
|
+
meta: Meta;
|
|
34
|
+
}) => ReactNode;
|
|
35
|
+
defaultIsChecked?: boolean;
|
|
36
|
+
isDisabled?: boolean;
|
|
37
|
+
isRequired?: boolean;
|
|
38
|
+
label?: ReactNode;
|
|
39
|
+
name: string;
|
|
40
|
+
value?: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// @public
|
|
44
|
+
export const ErrorMessage: ({ children, testId }: MessageProps) => jsx.JSX.Element;
|
|
45
|
+
|
|
46
|
+
// @public (undocumented)
|
|
47
|
+
export function Field<FieldValue = string, Element extends SupportedElements = HTMLInputElement>(props: FieldComponentProps<FieldValue, Element>): jsx.JSX.Element;
|
|
48
|
+
|
|
49
|
+
// @public (undocumented)
|
|
50
|
+
interface FieldComponentProps<FieldValue, Element extends SupportedElements> {
|
|
51
|
+
children: (args: {
|
|
52
|
+
fieldProps: FieldProps<FieldValue, Element>;
|
|
53
|
+
error?: string;
|
|
54
|
+
valid: boolean;
|
|
55
|
+
meta: Meta;
|
|
56
|
+
}) => ReactNode;
|
|
57
|
+
defaultValue?: ((currentDefaultValue?: FieldValue) => FieldValue) | FieldValue;
|
|
58
|
+
elementAfterLabel?: ReactNode;
|
|
59
|
+
id?: string;
|
|
60
|
+
isDisabled?: boolean;
|
|
61
|
+
isRequired?: boolean;
|
|
62
|
+
label?: ReactNode;
|
|
63
|
+
name: string;
|
|
64
|
+
testId?: string;
|
|
65
|
+
transform?: (event: FieldValue | FormEvent<Element>, current: FieldValue) => FieldValue;
|
|
66
|
+
validate?: (value: FieldValue | undefined, formState: Object, fieldState: Meta) => Promise<string | void> | string | void;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// @public (undocumented)
|
|
70
|
+
export interface FieldProps<FieldValue, Element extends SupportedElements = HTMLInputElement> {
|
|
71
|
+
// (undocumented)
|
|
72
|
+
'aria-invalid': 'false' | 'true';
|
|
73
|
+
// (undocumented)
|
|
74
|
+
'aria-labelledby': string;
|
|
75
|
+
// (undocumented)
|
|
76
|
+
id: string;
|
|
77
|
+
// (undocumented)
|
|
78
|
+
isDisabled: boolean;
|
|
79
|
+
// (undocumented)
|
|
80
|
+
isInvalid: boolean;
|
|
81
|
+
// (undocumented)
|
|
82
|
+
isRequired: boolean;
|
|
83
|
+
// (undocumented)
|
|
84
|
+
name: string;
|
|
85
|
+
// (undocumented)
|
|
86
|
+
onBlur: () => void;
|
|
87
|
+
// (undocumented)
|
|
88
|
+
onChange: (value: FieldValue | FormEvent<Element>) => void;
|
|
89
|
+
// (undocumented)
|
|
90
|
+
onFocus: () => void;
|
|
91
|
+
// (undocumented)
|
|
92
|
+
value: FieldValue;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// @public
|
|
96
|
+
export const Fieldset: ({ children, legend }: FieldsetProps) => jsx.JSX.Element;
|
|
97
|
+
|
|
98
|
+
// @public (undocumented)
|
|
99
|
+
interface FieldsetProps {
|
|
100
|
+
children: ReactNode;
|
|
101
|
+
legend?: ReactNode;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// @public (undocumented)
|
|
105
|
+
function Form<FormValues extends Record<string, any> = {}>(props: FormProps<FormValues>): JSX.Element;
|
|
106
|
+
export default Form;
|
|
107
|
+
|
|
108
|
+
// @public (undocumented)
|
|
109
|
+
export type FormApi<FormData> = FormApi_2<FormData>;
|
|
110
|
+
|
|
111
|
+
// @public (undocumented)
|
|
112
|
+
interface FormChildrenProps {
|
|
113
|
+
// (undocumented)
|
|
114
|
+
onKeyDown: (event: React_2.KeyboardEvent<HTMLElement>) => void;
|
|
115
|
+
// (undocumented)
|
|
116
|
+
onSubmit: (event?: React_2.FormEvent<HTMLFormElement> | React_2.SyntheticEvent<HTMLElement>) => void;
|
|
117
|
+
// (undocumented)
|
|
118
|
+
ref: React_2.RefObject<HTMLFormElement>;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// @public
|
|
122
|
+
export function FormFooter({ align, children, }: FormFooterProps): jsx.JSX.Element;
|
|
123
|
+
|
|
124
|
+
// @public (undocumented)
|
|
125
|
+
interface FormFooterProps {
|
|
126
|
+
align?: Align;
|
|
127
|
+
children?: ReactNode;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// @public
|
|
131
|
+
export const FormHeader: ({ children, description, title }: FormHeaderProps) => jsx.JSX.Element;
|
|
132
|
+
|
|
133
|
+
// @public (undocumented)
|
|
134
|
+
interface FormHeaderProps {
|
|
135
|
+
children?: ReactNode;
|
|
136
|
+
description?: ReactNode;
|
|
137
|
+
title?: ReactNode;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
// @public (undocumented)
|
|
141
|
+
export interface FormProps<FormValues> {
|
|
142
|
+
children: (args: {
|
|
143
|
+
formProps: FormChildrenProps;
|
|
144
|
+
disabled: boolean;
|
|
145
|
+
dirty: boolean;
|
|
146
|
+
submitting: boolean;
|
|
147
|
+
getState: () => FormState<FormValues>;
|
|
148
|
+
getValues: () => FormValues;
|
|
149
|
+
setFieldValue: (name: string, value: any) => void;
|
|
150
|
+
reset: (initialValues?: FormValues) => void;
|
|
151
|
+
}) => ReactNode;
|
|
152
|
+
isDisabled?: boolean;
|
|
153
|
+
onSubmit: OnSubmitHandler<FormValues>;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// @public
|
|
157
|
+
export const FormSection: ({ children, description, title }: FormSectionProps) => jsx.JSX.Element;
|
|
158
|
+
|
|
159
|
+
// @public (undocumented)
|
|
160
|
+
interface FormSectionProps {
|
|
161
|
+
children?: ReactNode;
|
|
162
|
+
description?: ReactNode;
|
|
163
|
+
title?: ReactNode;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
// @public
|
|
167
|
+
export const HelperMessage: ({ children, testId }: MessageProps) => jsx.JSX.Element;
|
|
168
|
+
|
|
169
|
+
// @public
|
|
170
|
+
interface InternalMessageProps {
|
|
171
|
+
appearance?: MessageAppearance;
|
|
172
|
+
children: ReactNode;
|
|
173
|
+
// (undocumented)
|
|
174
|
+
fieldId?: string;
|
|
175
|
+
testId?: string;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
// @public
|
|
179
|
+
export const Label: FC<LabelProps>;
|
|
180
|
+
|
|
181
|
+
// @public (undocumented)
|
|
182
|
+
export interface LabelProps {
|
|
183
|
+
// (undocumented)
|
|
184
|
+
children: ReactNode;
|
|
185
|
+
// (undocumented)
|
|
186
|
+
htmlFor: string;
|
|
187
|
+
// (undocumented)
|
|
188
|
+
id?: string;
|
|
189
|
+
// (undocumented)
|
|
190
|
+
testId?: string;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
// @public (undocumented)
|
|
194
|
+
type MessageAppearance = 'default' | 'error' | 'valid';
|
|
195
|
+
|
|
196
|
+
// @public
|
|
197
|
+
type MessageProps = Pick<InternalMessageProps, 'children' | 'testId'>;
|
|
198
|
+
|
|
199
|
+
// @public (undocumented)
|
|
200
|
+
interface Meta {
|
|
201
|
+
// (undocumented)
|
|
202
|
+
dirty: boolean;
|
|
203
|
+
// (undocumented)
|
|
204
|
+
dirtySinceLastSubmit: boolean;
|
|
205
|
+
// (undocumented)
|
|
206
|
+
error?: string;
|
|
207
|
+
// (undocumented)
|
|
208
|
+
submitError?: boolean;
|
|
209
|
+
// (undocumented)
|
|
210
|
+
submitFailed: boolean;
|
|
211
|
+
// (undocumented)
|
|
212
|
+
submitting: boolean;
|
|
213
|
+
// (undocumented)
|
|
214
|
+
touched: boolean;
|
|
215
|
+
// (undocumented)
|
|
216
|
+
valid: boolean;
|
|
217
|
+
// (undocumented)
|
|
218
|
+
validating?: boolean;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
// @public (undocumented)
|
|
222
|
+
export type OnSubmitHandler<FormData> = (values: FormData, form: FormApi<FormData>, callback?: (errors?: Record<string, string>) => void) => Object | Promise<Object | void> | void;
|
|
223
|
+
|
|
224
|
+
// @public
|
|
225
|
+
export const RangeField: FC<RangeFieldProps>;
|
|
226
|
+
|
|
227
|
+
// @public (undocumented)
|
|
228
|
+
export interface RangeFieldProps {
|
|
229
|
+
// (undocumented)
|
|
230
|
+
children: (args: {
|
|
231
|
+
fieldProps: RangeProps;
|
|
232
|
+
error?: string;
|
|
233
|
+
meta: Meta;
|
|
234
|
+
}) => React_2.ReactNode;
|
|
235
|
+
defaultValue: ((currentDefaultValue?: number) => number) | number;
|
|
236
|
+
id?: string;
|
|
237
|
+
isDisabled?: boolean;
|
|
238
|
+
label?: ReactNode;
|
|
239
|
+
name: string;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
// @public (undocumented)
|
|
243
|
+
type RangeProps = Omit<FieldProps<number>, 'isInvalid' | 'isRequired'>;
|
|
244
|
+
|
|
245
|
+
// @public (undocumented)
|
|
246
|
+
export function RequiredAsterisk(): jsx.JSX.Element;
|
|
247
|
+
|
|
248
|
+
// @public (undocumented)
|
|
249
|
+
type SupportedElements = HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement;
|
|
250
|
+
|
|
251
|
+
// @public
|
|
252
|
+
export const ValidMessage: ({ children, testId }: MessageProps) => jsx.JSX.Element;
|
|
253
|
+
|
|
254
|
+
// (No @packageDocumentation comment for this package)
|
|
255
|
+
|
|
256
|
+
```
|