@atlaskit/form 8.11.6 → 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 +6 -0
- package/dist/cjs/fieldset.js +5 -2
- package/dist/cjs/label.js +5 -2
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/fieldset.js +7 -4
- package/dist/es2019/label.js +7 -4
- package/dist/es2019/version.json +1 -1
- package/dist/esm/fieldset.js +7 -4
- package/dist/esm/label.js +7 -4
- package/dist/esm/version.json +1 -1
- package/package.json +4 -4
- package/report.api.md +25 -5
- package/tmp/api-report-tmp.d.ts +256 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
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
|
+
|
|
3
9
|
## 8.11.6
|
|
4
10
|
|
|
5
11
|
### 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/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/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/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/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/version.json
CHANGED
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"
|
|
@@ -64,12 +64,12 @@
|
|
|
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",
|
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
|
+
```
|