@ultraviolet/form 1.2.1 → 1.2.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.
@@ -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
- children: children
62
+ label: label
66
63
  });
67
64
  };
68
65
 
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' | 'size' | 'value' | 'data-testid'>> & {
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: ({ children, className, "data-testid": dataTestId, disabled, id, label, name, onBlur, onChange, onFocus, required, size, validate, value, }: RadioFieldProps) => JSX.Element;
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ultraviolet/form",
3
- "version": "1.2.1",
3
+ "version": "1.2.3",
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.8",
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.1.0",
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.6.1"
59
+ "@ultraviolet/ui": "1.8.0"
60
60
  }
61
61
  }