@ultraviolet/form 1.2.2 → 1.3.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.
|
@@ -5,7 +5,6 @@ import { useFormField } from '../../hooks/useFormField.js';
|
|
|
5
5
|
|
|
6
6
|
const RadioField = _ref => {
|
|
7
7
|
let {
|
|
8
|
-
children,
|
|
9
8
|
className,
|
|
10
9
|
'data-testid': dataTestId,
|
|
11
10
|
disabled,
|
|
@@ -16,7 +15,6 @@ const RadioField = _ref => {
|
|
|
16
15
|
onChange,
|
|
17
16
|
onFocus,
|
|
18
17
|
required,
|
|
19
|
-
size,
|
|
20
18
|
validate,
|
|
21
19
|
value
|
|
22
20
|
} = _ref;
|
|
@@ -34,7 +32,7 @@ const RadioField = _ref => {
|
|
|
34
32
|
});
|
|
35
33
|
const error = getError({
|
|
36
34
|
disabled,
|
|
37
|
-
label,
|
|
35
|
+
label: label,
|
|
38
36
|
meta: meta,
|
|
39
37
|
name,
|
|
40
38
|
value: input.value
|
|
@@ -60,9 +58,8 @@ const RadioField = _ref => {
|
|
|
60
58
|
onFocus?.(event);
|
|
61
59
|
},
|
|
62
60
|
required: required,
|
|
63
|
-
size: size,
|
|
64
61
|
value: input.value,
|
|
65
|
-
|
|
62
|
+
label: label
|
|
66
63
|
});
|
|
67
64
|
};
|
|
68
65
|
|
|
@@ -13,7 +13,8 @@ const Submit = _ref => {
|
|
|
13
13
|
size,
|
|
14
14
|
variant = 'filled',
|
|
15
15
|
sentiment = 'primary',
|
|
16
|
-
tooltip
|
|
16
|
+
tooltip,
|
|
17
|
+
fullWidth
|
|
17
18
|
} = _ref;
|
|
18
19
|
const {
|
|
19
20
|
invalid,
|
|
@@ -42,6 +43,7 @@ const Submit = _ref => {
|
|
|
42
43
|
variant: variant,
|
|
43
44
|
sentiment: sentiment,
|
|
44
45
|
tooltip: tooltip,
|
|
46
|
+
fullWidth: fullWidth,
|
|
45
47
|
children: children
|
|
46
48
|
});
|
|
47
49
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -136,14 +136,12 @@ type FormProps<FormValues = unknown> = {
|
|
|
136
136
|
declare const Form: <FormValues>({ children, onRawSubmit, errors, initialValues, validateOnBlur, validate, name, render, mutators, keepDirtyOnReinitialize, className, }: FormProps<FormValues>) => JSX.Element;
|
|
137
137
|
|
|
138
138
|
type RadioValue = NonNullable<ComponentProps<typeof Radio>['value']>;
|
|
139
|
-
type RadioFieldProps<T = RadioValue, K = string> = BaseFieldProps<T, K> & Partial<Pick<ComponentProps<typeof Radio>, 'disabled' | 'id' | 'onBlur' | 'onChange' | 'onFocus' | '
|
|
140
|
-
children?: ReactNode;
|
|
139
|
+
type RadioFieldProps<T = RadioValue, K = string> = BaseFieldProps<T, K> & Partial<Pick<ComponentProps<typeof Radio>, 'disabled' | 'id' | 'onBlur' | 'onChange' | 'onFocus' | 'value' | 'data-testid' | 'label'>> & {
|
|
141
140
|
className?: string;
|
|
142
|
-
label?: string;
|
|
143
141
|
name: string;
|
|
144
142
|
required?: boolean;
|
|
145
143
|
};
|
|
146
|
-
declare const RadioField: ({
|
|
144
|
+
declare const RadioField: ({ className, "data-testid": dataTestId, disabled, id, label, name, onBlur, onChange, onFocus, required, validate, value, }: RadioFieldProps) => JSX.Element;
|
|
147
145
|
|
|
148
146
|
type SelectOption = {
|
|
149
147
|
value: string;
|
|
@@ -636,8 +634,9 @@ type SubmitProps = {
|
|
|
636
634
|
variant?: ComponentProps<typeof Button>['variant'];
|
|
637
635
|
sentiment?: ComponentProps<typeof Button>['sentiment'];
|
|
638
636
|
tooltip?: ComponentProps<typeof Button>['tooltip'];
|
|
637
|
+
fullWidth?: ComponentProps<typeof Button>['fullWidth'];
|
|
639
638
|
};
|
|
640
|
-
declare const Submit: ({ children, className, disabled, icon, iconPosition, size, variant, sentiment, tooltip, }: SubmitProps) => JSX.Element;
|
|
639
|
+
declare const Submit: ({ children, className, disabled, icon, iconPosition, size, variant, sentiment, tooltip, fullWidth, }: SubmitProps) => JSX.Element;
|
|
641
640
|
|
|
642
641
|
type UseValidationParams<FieldValue = unknown> = {
|
|
643
642
|
validators: ValidatorObject<FieldValue>[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ultraviolet/form",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Ultraviolet Form",
|
|
5
5
|
"homepage": "https://github.com/scaleway/ultraviolet#readme",
|
|
6
6
|
"repository": {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"react-dom": "18.x"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@babel/core": "7.22.
|
|
41
|
+
"@babel/core": "7.22.9",
|
|
42
42
|
"@types/final-form-focus": "1.1.3",
|
|
43
43
|
"@types/react": "18.2.8",
|
|
44
44
|
"@types/react-dom": "18.2.4",
|
|
@@ -51,11 +51,11 @@
|
|
|
51
51
|
"@emotion/react": "11.11.1",
|
|
52
52
|
"@emotion/styled": "11.11.0",
|
|
53
53
|
"final-form": "4.20.9",
|
|
54
|
-
"final-form-arrays": "3.
|
|
54
|
+
"final-form-arrays": "3.0.2",
|
|
55
55
|
"final-form-focus": "1.1.2",
|
|
56
56
|
"react-final-form": "6.5.9",
|
|
57
57
|
"react-final-form-arrays": "3.1.4",
|
|
58
58
|
"react-select": "5.7.4",
|
|
59
|
-
"@ultraviolet/ui": "1.
|
|
59
|
+
"@ultraviolet/ui": "1.8.0"
|
|
60
60
|
}
|
|
61
61
|
}
|