@ultraviolet/form 1.1.4 → 1.1.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.
Files changed (2) hide show
  1. package/dist/index.d.ts +7 -7
  2. package/package.json +9 -8
package/dist/index.d.ts CHANGED
@@ -5,7 +5,7 @@ import { UseFieldConfig, FieldMetaState, FormRenderProps, FormProps as FormProps
5
5
  export { Field, FormSpy, useField, useForm, useFormState } from 'react-final-form';
6
6
  import * as react from 'react';
7
7
  import { ReactNode, ComponentProps, FocusEvent, JSX, ForwardedRef, FocusEventHandler } from 'react';
8
- import * as _emotion_react_types_jsx_namespace from '@emotion/react/types/jsx-namespace';
8
+ import * as _emotion_react_jsx_runtime from '@emotion/react/jsx-runtime';
9
9
  import { DateInput, Radio, SelectInput, SelectableCard, NumberInput, TagInput, TextInput, TimeInput, Toggle, Button } from '@ultraviolet/ui';
10
10
  import { CSSObject, Theme, css } from '@emotion/react';
11
11
  import Select, { GroupBase, OptionProps, Props, CommonProps } from 'react-select';
@@ -112,7 +112,7 @@ type DateFieldProps = BaseFieldProps<Date> & Omit<ComponentProps<typeof DateInpu
112
112
  onFocus?: (value: FocusEvent<HTMLElement>) => void;
113
113
  autoFocus?: boolean;
114
114
  };
115
- declare const DateField: ({ required, name, label, validate, format, locale, maxDate, minDate, initialValue, disabled, value: inputVal, onChange, onBlur, onFocus, formatOnBlur, autoFocus, "data-testid": dataTestId, }: DateFieldProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
115
+ declare const DateField: ({ required, name, label, validate, format, locale, maxDate, minDate, initialValue, disabled, value: inputVal, onChange, onBlur, onFocus, formatOnBlur, autoFocus, "data-testid": dataTestId, }: DateFieldProps) => _emotion_react_jsx_runtime.JSX.Element;
116
116
 
117
117
  type FormProps<FormValues = unknown> = {
118
118
  children?: ((props: FormRenderProps<FormValues, Partial<FormValues>>) => ReactNode) | ReactNode;
@@ -213,7 +213,7 @@ type SelectInputFieldProps<T extends SelectInputOptionOrGroup = SelectInputOptio
213
213
  name: string;
214
214
  };
215
215
  declare const SelectInputField: {
216
- <T extends (SelectOption | GroupBase<SelectOption>) & (SelectOption | GroupBase<SelectOption>) = (SelectOption | GroupBase<SelectOption>) & (SelectOption | GroupBase<SelectOption>)>({ animation, animationDuration, animationOnChange, children, className, disabled, error: errorProp, format: formatProp, formatOnBlur, id, inputId, isClearable, isLoading, isSearchable, label, maxLength, menuPortalTarget, minLength, multiple, name, onBlur, onChange, onFocus, options: optionsProp, parse: parseProp, placeholder, readOnly, required, value, noTopLabel, noOptionsMessage, customStyle, validate, "data-testid": dataTestId, }: SelectInputFieldProps<T>): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
216
+ <T extends (SelectOption | GroupBase<SelectOption>) & (SelectOption | GroupBase<SelectOption>) = (SelectOption | GroupBase<SelectOption>) & (SelectOption | GroupBase<SelectOption>)>({ animation, animationDuration, animationOnChange, children, className, disabled, error: errorProp, format: formatProp, formatOnBlur, id, inputId, isClearable, isLoading, isSearchable, label, maxLength, menuPortalTarget, minLength, multiple, name, onBlur, onChange, onFocus, options: optionsProp, parse: parseProp, placeholder, readOnly, required, value, noTopLabel, noOptionsMessage, customStyle, validate, "data-testid": dataTestId, }: SelectInputFieldProps<T>): _emotion_react_jsx_runtime.JSX.Element;
217
217
  Option: (props: Partial<OptionProps<{
218
218
  value: string;
219
219
  label: ReactNode;
@@ -250,11 +250,11 @@ type NumberInputValueFieldProps<T = NumberInputValue, K = string> = BaseFieldPro
250
250
  onBlur?: FocusEventHandler<HTMLInputElement>;
251
251
  onFocus?: FocusEventHandler<HTMLInputElement>;
252
252
  };
253
- declare const NumberInputField: ({ disabled, maxValue, minValue, name, onChange, onBlur, onFocus, onMaxCrossed, onMinCrossed, required, size, step, text, validate, value, className, "data-testid": dataTestId, }: NumberInputValueFieldProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
253
+ declare const NumberInputField: ({ disabled, maxValue, minValue, name, onChange, onBlur, onFocus, onMaxCrossed, onMinCrossed, required, size, step, text, validate, value, className, "data-testid": dataTestId, }: NumberInputValueFieldProps) => _emotion_react_jsx_runtime.JSX.Element;
254
254
 
255
255
  declare const SubmitErrorAlert: <FormValues>({ className, }: {
256
256
  className?: string | undefined;
257
- }) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
257
+ }) => _emotion_react_jsx_runtime.JSX.Element;
258
258
 
259
259
  type TagInputProp = ComponentProps<typeof TagInput>['tags'];
260
260
  type TagInputFieldProps<T = TagInputProp, K = string> = BaseFieldProps<T, K> & Partial<Pick<ComponentProps<typeof TagInput>, 'tags' | 'variant' | 'onChange' | 'placeholder' | 'disabled' | 'className' | 'id' | 'data-testid'>> & {
@@ -618,13 +618,13 @@ declare const TextInputField: react.ForwardRefExoticComponent<BaseFieldProps<Tex
618
618
  type TimeFieldProps = BaseFieldProps<Date> & ComponentProps<typeof TimeInput> & {
619
619
  name: string;
620
620
  };
621
- declare const TimeField: ({ required, name, schedule, placeholder, disabled, initialValue, validate, readOnly, value, onChange, onBlur, onFocus, isLoading, isClearable, inputId, id, formatOnBlur, animation, animationDuration, animationOnChange, className, isSearchable, options, "data-testid": dataTestId, }: TimeFieldProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
621
+ declare const TimeField: ({ required, name, schedule, placeholder, disabled, initialValue, validate, readOnly, value, onChange, onBlur, onFocus, isLoading, isClearable, inputId, id, formatOnBlur, animation, animationDuration, animationOnChange, className, isSearchable, options, "data-testid": dataTestId, }: TimeFieldProps) => _emotion_react_jsx_runtime.JSX.Element;
622
622
 
623
623
  type ToggleFieldProps<T = unknown, K = unknown> = BaseFieldProps<T, K> & Pick<ComponentProps<typeof Toggle>, 'disabled' | 'label' | 'onChange' | 'size' | 'tooltip' | 'labelPosition' | 'className' | 'data-testid'> & {
624
624
  name: string;
625
625
  required?: boolean;
626
626
  };
627
- declare const ToggleField: ({ afterSubmit, allowNull, beforeSubmit, className, data, defaultValue, disabled, format, formatOnBlur, initialValue, isEqual, label, multiple, name, onChange, parse, required, size, subscription, tooltip, validate, validateFields, value, labelPosition, "data-testid": dataTestId, }: ToggleFieldProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
627
+ declare const ToggleField: ({ afterSubmit, allowNull, beforeSubmit, className, data, defaultValue, disabled, format, formatOnBlur, initialValue, isEqual, label, multiple, name, onChange, parse, required, size, subscription, tooltip, validate, validateFields, value, labelPosition, "data-testid": dataTestId, }: ToggleFieldProps) => _emotion_react_jsx_runtime.JSX.Element;
628
628
 
629
629
  type SubmitProps = {
630
630
  children?: ReactNode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ultraviolet/form",
3
- "version": "1.1.4",
3
+ "version": "1.1.7",
4
4
  "description": "Ultraviolet Form",
5
5
  "homepage": "https://github.com/scaleway/ultraviolet#readme",
6
6
  "repository": {
@@ -26,10 +26,11 @@
26
26
  "linux"
27
27
  ],
28
28
  "sideEffects": false,
29
- "main": "dist/index.js",
30
- "module": "dist/index.js",
31
- "jsnext:main": "dist/index.js",
32
- "types": "dist/index.d.ts",
29
+ "type": "module",
30
+ "exports": {
31
+ "types": "./dist/index.d.ts",
32
+ "default": "./dist/index.js"
33
+ },
33
34
  "peerDependencies": {
34
35
  "@emotion/react": "11.11.1",
35
36
  "@emotion/styled": "11.11.0",
@@ -37,7 +38,7 @@
37
38
  "react-dom": "18.x"
38
39
  },
39
40
  "devDependencies": {
40
- "@babel/core": "7.22.5",
41
+ "@babel/core": "7.22.8",
41
42
  "@types/final-form-focus": "1.1.3",
42
43
  "@types/react": "18.2.8",
43
44
  "@types/react-dom": "18.2.4",
@@ -45,7 +46,7 @@
45
46
  "react-dom": "18.2.0"
46
47
  },
47
48
  "dependencies": {
48
- "@babel/runtime": "7.22.5",
49
+ "@babel/runtime": "7.22.6",
49
50
  "@emotion/babel-plugin": "11.11.0",
50
51
  "@emotion/react": "11.11.1",
51
52
  "@emotion/styled": "11.11.0",
@@ -55,6 +56,6 @@
55
56
  "react-final-form": "6.5.9",
56
57
  "react-final-form-arrays": "3.1.4",
57
58
  "react-select": "5.7.3",
58
- "@ultraviolet/ui": "1.4.4"
59
+ "@ultraviolet/ui": "1.4.7"
59
60
  }
60
61
  }