@ultraviolet/form 1.9.6 → 1.10.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.
- package/dist/index.d.ts +8 -8
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export { FORM_ERROR, FormApi } from 'final-form';
|
|
|
4
4
|
import { UseFieldConfig, FieldMetaState, FormRenderProps, FormProps as FormProps$1 } from 'react-final-form';
|
|
5
5
|
export { Field, FormSpy, useField, useForm, useFormState } from 'react-final-form';
|
|
6
6
|
import * as react from 'react';
|
|
7
|
-
import { ReactNode, ComponentProps, FocusEvent,
|
|
7
|
+
import { ReactNode, ComponentProps, FocusEvent, ForwardedRef, FocusEventHandler } from 'react';
|
|
8
8
|
import * as _emotion_react_jsx_runtime from '@emotion/react/jsx-runtime';
|
|
9
9
|
import { CheckboxGroup, DateInput, Radio, SelectInput, SelectableCard, NumberInput, TagInput, TextInput, TimeInput, Toggle, Button, RadioGroup } from '@ultraviolet/ui';
|
|
10
10
|
import { CSSObject, Theme, css } from '@emotion/react';
|
|
@@ -165,7 +165,7 @@ type FormProps<FormValues = unknown> = {
|
|
|
165
165
|
keepDirtyOnReinitialize?: boolean;
|
|
166
166
|
className?: string;
|
|
167
167
|
};
|
|
168
|
-
declare const Form: <FormValues>({ children, onRawSubmit, errors, initialValues, validateOnBlur, validate, name, render, mutators, keepDirtyOnReinitialize, className, }: FormProps<FormValues>) => JSX.Element;
|
|
168
|
+
declare const Form: <FormValues>({ children, onRawSubmit, errors, initialValues, validateOnBlur, validate, name, render, mutators, keepDirtyOnReinitialize, className, }: FormProps<FormValues>) => _emotion_react_jsx_runtime.JSX.Element;
|
|
169
169
|
|
|
170
170
|
type RadioValue$1 = NonNullable<ComponentProps<typeof Radio>['value']>;
|
|
171
171
|
type RadioFieldProps<T = RadioValue$1, K = string> = BaseFieldProps<T, K> & Partial<Pick<ComponentProps<typeof Radio>, 'disabled' | 'id' | 'onBlur' | 'onChange' | 'onFocus' | 'value' | 'data-testid' | 'label' | 'tooltip'>> & {
|
|
@@ -173,7 +173,7 @@ type RadioFieldProps<T = RadioValue$1, K = string> = BaseFieldProps<T, K> & Part
|
|
|
173
173
|
name: string;
|
|
174
174
|
required?: boolean;
|
|
175
175
|
};
|
|
176
|
-
declare const RadioField: ({ className, "data-testid": dataTestId, disabled, id, label, name, onBlur, onChange, onFocus, required, validate, value, tooltip, }: RadioFieldProps) => JSX.Element;
|
|
176
|
+
declare const RadioField: ({ className, "data-testid": dataTestId, disabled, id, label, name, onBlur, onChange, onFocus, required, validate, value, tooltip, }: RadioFieldProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
177
177
|
|
|
178
178
|
type SelectOption = {
|
|
179
179
|
value: string;
|
|
@@ -271,7 +271,7 @@ type SelectableCardFieldProps<T = SelectableCardValue, K = string> = BaseFieldPr
|
|
|
271
271
|
required?: boolean;
|
|
272
272
|
className?: string;
|
|
273
273
|
};
|
|
274
|
-
declare const SelectableCardField: ({ name, value, onChange, showTick, type, disabled, children, className, onFocus, onBlur, required, validate, tooltip, id, label, "data-testid": dataTestId, }: SelectableCardFieldProps) => JSX.Element;
|
|
274
|
+
declare const SelectableCardField: ({ name, value, onChange, showTick, type, disabled, children, className, onFocus, onBlur, required, validate, tooltip, id, label, "data-testid": dataTestId, }: SelectableCardFieldProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
275
275
|
|
|
276
276
|
type NumberInputValue = NonNullable<ComponentProps<typeof NumberInput>['value']>;
|
|
277
277
|
type NumberInputValueFieldProps<T = NumberInputValue, K = string> = BaseFieldProps<T, K> & Partial<Pick<ComponentProps<typeof NumberInput>, 'disabled' | 'maxValue' | 'minValue' | 'onMaxCrossed' | 'onMinCrossed' | 'size' | 'step' | 'text' | 'value' | 'onChange' | 'className' | 'data-testid'>> & {
|
|
@@ -291,7 +291,7 @@ type TagInputFieldProps<T = TagInputProp, K = string> = BaseFieldProps<T, K> & P
|
|
|
291
291
|
name: string;
|
|
292
292
|
required?: boolean;
|
|
293
293
|
};
|
|
294
|
-
declare const TagInputField: ({ className, "data-testid": dataTestId, disabled, id, name, onChange, placeholder, required, tags, validate, variant, }: TagInputFieldProps) => JSX.Element;
|
|
294
|
+
declare const TagInputField: ({ className, "data-testid": dataTestId, disabled, id, name, onChange, placeholder, required, tags, validate, variant, }: TagInputFieldProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
295
295
|
|
|
296
296
|
type TextInputValue = NonNullable<ComponentProps<typeof TextInput>['value']>;
|
|
297
297
|
declare const TextInputField: react.ForwardRefExoticComponent<BaseFieldProps<TextInputValue, string> & Partial<Pick<({
|
|
@@ -673,7 +673,7 @@ type SubmitProps = {
|
|
|
673
673
|
fullWidth?: ComponentProps<typeof Button>['fullWidth'];
|
|
674
674
|
onClick?: ComponentProps<typeof Button>['onClick'];
|
|
675
675
|
};
|
|
676
|
-
declare const Submit: ({ children, className, disabled, icon, iconPosition, size, variant, sentiment, tooltip, fullWidth, onClick, }: SubmitProps) => JSX.Element;
|
|
676
|
+
declare const Submit: ({ children, className, disabled, icon, iconPosition, size, variant, sentiment, tooltip, fullWidth, onClick, }: SubmitProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
677
677
|
|
|
678
678
|
type RadioValue = NonNullable<ComponentProps<typeof RadioGroup>['value']>;
|
|
679
679
|
type RadioGroupFieldProps<T = RadioValue, K = string> = BaseFieldProps<T, K> & Partial<Pick<ComponentProps<typeof RadioGroup>, 'onChange' | 'value' | 'legend' | 'children' | 'required' | 'name' | 'error' | 'helper' | 'direction'>> & {
|
|
@@ -682,7 +682,7 @@ type RadioGroupFieldProps<T = RadioValue, K = string> = BaseFieldProps<T, K> & P
|
|
|
682
682
|
required?: boolean;
|
|
683
683
|
};
|
|
684
684
|
declare const RadioGroupField: {
|
|
685
|
-
({ className, legend, name, onChange, required, validate, value, children, error: customError, helper, direction, }: RadioGroupFieldProps): JSX.Element;
|
|
685
|
+
({ className, legend, name, onChange, required, validate, value, children, error: customError, helper, direction, }: RadioGroupFieldProps): _emotion_react_jsx_runtime.JSX.Element;
|
|
686
686
|
Radio: ({ onFocus, onBlur, disabled, error, name, value, label, helper, className, autoFocus, onKeyDown, "data-testid": dataTestId, }: {
|
|
687
687
|
error?: react.ReactNode;
|
|
688
688
|
name?: string | undefined;
|
|
@@ -728,7 +728,7 @@ type ErrorProviderProps = {
|
|
|
728
728
|
children: ReactNode;
|
|
729
729
|
errors: FormErrors;
|
|
730
730
|
};
|
|
731
|
-
declare const ErrorProvider: ({ children, errors
|
|
731
|
+
declare const ErrorProvider: ({ children, errors }: ErrorProviderProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
732
732
|
declare const useErrors: () => ErrorContextValue;
|
|
733
733
|
|
|
734
734
|
export { type BaseFieldProps, CheckboxField, CheckboxGroupField, DateField, ErrorProvider, Form, type FormErrors, NumberInputField, RadioField, RadioGroupField, SelectInputField, SelectableCardField, Submit, SubmitErrorAlert, TagInputField, TextInputField, TimeField, ToggleField, pickValidators, useErrors, useOnFieldChange, useValidation };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ultraviolet/form",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.10.0",
|
|
4
4
|
"description": "Ultraviolet Form",
|
|
5
5
|
"homepage": "https://github.com/scaleway/ultraviolet#readme",
|
|
6
6
|
"repository": {
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"react-dom": "18.x"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@babel/core": "7.23.
|
|
42
|
-
"@types/final-form-focus": "1.1.
|
|
41
|
+
"@babel/core": "7.23.3",
|
|
42
|
+
"@types/final-form-focus": "1.1.7",
|
|
43
43
|
"@types/react": "18.2.37",
|
|
44
44
|
"@types/react-dom": "18.2.15",
|
|
45
45
|
"react": "18.2.0",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"react-final-form": "6.5.9",
|
|
56
56
|
"react-final-form-arrays": "3.1.4",
|
|
57
57
|
"react-select": "5.7.7",
|
|
58
|
-
"@ultraviolet/ui": "1.
|
|
58
|
+
"@ultraviolet/ui": "1.26.0"
|
|
59
59
|
},
|
|
60
60
|
"scripts": {
|
|
61
61
|
"build": "rollup -c ../../rollup.config.mjs"
|