@ultraviolet/form 3.0.0 → 3.0.2

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.
@@ -7,7 +7,7 @@ type RadioGroupFieldProps<TFieldValues extends FieldValues, TFieldName extends F
7
7
  };
8
8
  export declare const RadioGroupField: {
9
9
  <TFieldValues extends FieldValues, TFieldName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ className, control, legend, name, onChange, required, children, label, error: customError, helper, direction, shouldUnregister, validate, }: RadioGroupFieldProps<TFieldValues, TFieldName>): JSX.Element;
10
- Radio: ({ onFocus, onBlur, disabled, error, name, value, label, helper, className, autoFocus, onKeyDown, "data-testid": dataTestId, }: Omit<({
10
+ Radio: ({ onFocus, onBlur, disabled, error, name, value, label, helper, className, autoFocus, onKeyDown, tooltip, "data-testid": dataTestId, }: Omit<({
11
11
  error?: import("react").ReactNode;
12
12
  checked?: boolean;
13
13
  value: string | number;
@@ -39,7 +39,8 @@ const SelectInputFieldV2 = ({
39
39
  optionalInfoPlacement,
40
40
  shouldUnregister = false,
41
41
  control,
42
- validate
42
+ validate,
43
+ tooltip
43
44
  }) => {
44
45
  const {
45
46
  field,
@@ -67,6 +68,6 @@ const SelectInputFieldV2 = ({
67
68
  onBlur?.(event);
68
69
  }, placeholder, readOnly, multiselect, value: field.value, placeholderSearch, helper, emptyState, searchable, clearable, descriptionDirection, footer, labelDescription, error: getError({
69
70
  label
70
- }, error), success, loadMore, isLoading, selectAll, selectAllGroup, autofocus, optionalInfoPlacement, "aria-label": ariaLabel, onChange: handleChange });
71
+ }, error), success, loadMore, isLoading, selectAll, selectAllGroup, autofocus, optionalInfoPlacement, "aria-label": ariaLabel, onChange: handleChange, tooltip });
71
72
  };
72
73
  exports.SelectInputFieldV2 = SelectInputFieldV2;
@@ -2,6 +2,6 @@ import { SelectInputV2 } from '@ultraviolet/ui';
2
2
  import { type ComponentProps } from 'react';
3
3
  import type { FieldPath, FieldValues } from 'react-hook-form';
4
4
  import type { BaseFieldProps } from '../../types';
5
- type SelectInputFieldV2Props<TFieldValues extends FieldValues, TFieldName extends FieldPath<TFieldValues>> = BaseFieldProps<TFieldValues, TFieldName> & Pick<ComponentProps<typeof SelectInputV2>, 'placeholder' | 'placeholderSearch' | 'label' | 'helper' | 'options' | 'emptyState' | 'searchable' | 'readOnly' | 'clearable' | 'size' | 'multiselect' | 'required' | 'descriptionDirection' | 'footer' | 'labelDescription' | 'success' | 'loadMore' | 'isLoading' | 'selectAll' | 'selectAllGroup' | 'autofocus' | 'data-testid' | 'onChange' | 'id' | 'onBlur' | 'aria-label' | 'className' | 'onFocus' | 'optionalInfoPlacement' | 'disabled'>;
6
- export declare const SelectInputFieldV2: <TFieldValues extends FieldValues, TFieldName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ autofocus, className, id, label, onFocus, onBlur, placeholder, readOnly, required, size, "data-testid": dataTestId, disabled, placeholderSearch, helper, options, emptyState, onChange, searchable, clearable, multiselect, descriptionDirection, footer, labelDescription, success, loadMore, isLoading, selectAll, selectAllGroup, name, "aria-label": ariaLabel, optionalInfoPlacement, shouldUnregister, control, validate, }: SelectInputFieldV2Props<TFieldValues, TFieldName>) => import("@emotion/react/jsx-runtime").JSX.Element;
5
+ type SelectInputFieldV2Props<TFieldValues extends FieldValues, TFieldName extends FieldPath<TFieldValues>> = BaseFieldProps<TFieldValues, TFieldName> & Pick<ComponentProps<typeof SelectInputV2>, 'placeholder' | 'placeholderSearch' | 'label' | 'helper' | 'options' | 'emptyState' | 'searchable' | 'readOnly' | 'clearable' | 'size' | 'multiselect' | 'required' | 'descriptionDirection' | 'footer' | 'labelDescription' | 'success' | 'loadMore' | 'isLoading' | 'selectAll' | 'selectAllGroup' | 'autofocus' | 'data-testid' | 'onChange' | 'id' | 'onBlur' | 'aria-label' | 'className' | 'onFocus' | 'optionalInfoPlacement' | 'disabled' | 'tooltip'>;
6
+ export declare const SelectInputFieldV2: <TFieldValues extends FieldValues, TFieldName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ autofocus, className, id, label, onFocus, onBlur, placeholder, readOnly, required, size, "data-testid": dataTestId, disabled, placeholderSearch, helper, options, emptyState, onChange, searchable, clearable, multiselect, descriptionDirection, footer, labelDescription, success, loadMore, isLoading, selectAll, selectAllGroup, name, "aria-label": ariaLabel, optionalInfoPlacement, shouldUnregister, control, validate, tooltip, }: SelectInputFieldV2Props<TFieldValues, TFieldName>) => import("@emotion/react/jsx-runtime").JSX.Element;
7
7
  export {};
@@ -37,7 +37,8 @@ const SelectInputFieldV2 = ({
37
37
  optionalInfoPlacement,
38
38
  shouldUnregister = false,
39
39
  control,
40
- validate
40
+ validate,
41
+ tooltip
41
42
  }) => {
42
43
  const {
43
44
  field,
@@ -65,7 +66,7 @@ const SelectInputFieldV2 = ({
65
66
  onBlur?.(event);
66
67
  }, placeholder, readOnly, multiselect, value: field.value, placeholderSearch, helper, emptyState, searchable, clearable, descriptionDirection, footer, labelDescription, error: getError({
67
68
  label
68
- }, error), success, loadMore, isLoading, selectAll, selectAllGroup, autofocus, optionalInfoPlacement, "aria-label": ariaLabel, onChange: handleChange });
69
+ }, error), success, loadMore, isLoading, selectAll, selectAllGroup, autofocus, optionalInfoPlacement, "aria-label": ariaLabel, onChange: handleChange, tooltip });
69
70
  };
70
71
  export {
71
72
  SelectInputFieldV2
@@ -39,7 +39,10 @@ const TextInputField = ({
39
39
  autoComplete,
40
40
  shouldUnregister,
41
41
  validate,
42
- control
42
+ control,
43
+ role,
44
+ "aria-live": ariaLive,
45
+ "aria-atomic": ariaAtomic
43
46
  }) => {
44
47
  const {
45
48
  getError
@@ -79,6 +82,6 @@ const TextInputField = ({
79
82
  onChange?.(event);
80
83
  }, onFocus: (event) => {
81
84
  onFocus?.(event);
82
- }, placeholder, readOnly, required, success, tabIndex, tooltip, type, value: field.value, id, prefix, suffix, size, onRandomize, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, autoComplete });
85
+ }, placeholder, readOnly, required, success, tabIndex, tooltip, type, value: field.value, id, prefix, suffix, size, onRandomize, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, autoComplete, role, "aria-live": ariaLive, "aria-atomic": ariaAtomic });
83
86
  };
84
87
  exports.TextInputField = TextInputField;
@@ -8,5 +8,5 @@ type TextInputFieldProps<TFieldValues extends FieldValues, TFieldName extends Fi
8
8
  /**
9
9
  * This component offers a form field based on Ultraviolet UI TextInputV2 component
10
10
  */
11
- export declare const TextInputField: <TFieldValues extends FieldValues, TFieldName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ regex: regexes, id, className, tabIndex, onChange, placeholder, disabled, readOnly, success, helper, tooltip, label, autoFocus, required, "data-testid": dataTestId, name, onFocus, onBlur, clearable, labelDescription, type, prefix, suffix, size, loading, onRandomize, minLength, maxLength, "aria-labelledby": ariaLabelledBy, "aria-label": ariaLabel, autoComplete, shouldUnregister, validate, control, }: TextInputFieldProps<TFieldValues, TFieldName>) => import("@emotion/react/jsx-runtime").JSX.Element;
11
+ export declare const TextInputField: <TFieldValues extends FieldValues, TFieldName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ regex: regexes, id, className, tabIndex, onChange, placeholder, disabled, readOnly, success, helper, tooltip, label, autoFocus, required, "data-testid": dataTestId, name, onFocus, onBlur, clearable, labelDescription, type, prefix, suffix, size, loading, onRandomize, minLength, maxLength, "aria-labelledby": ariaLabelledBy, "aria-label": ariaLabel, autoComplete, shouldUnregister, validate, control, role, "aria-live": ariaLive, "aria-atomic": ariaAtomic, }: TextInputFieldProps<TFieldValues, TFieldName>) => import("@emotion/react/jsx-runtime").JSX.Element;
12
12
  export {};
@@ -37,7 +37,10 @@ const TextInputField = ({
37
37
  autoComplete,
38
38
  shouldUnregister,
39
39
  validate,
40
- control
40
+ control,
41
+ role,
42
+ "aria-live": ariaLive,
43
+ "aria-atomic": ariaAtomic
41
44
  }) => {
42
45
  const {
43
46
  getError
@@ -77,7 +80,7 @@ const TextInputField = ({
77
80
  onChange?.(event);
78
81
  }, onFocus: (event) => {
79
82
  onFocus?.(event);
80
- }, placeholder, readOnly, required, success, tabIndex, tooltip, type, value: field.value, id, prefix, suffix, size, onRandomize, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, autoComplete });
83
+ }, placeholder, readOnly, required, success, tabIndex, tooltip, type, value: field.value, id, prefix, suffix, size, onRandomize, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, autoComplete, role, "aria-live": ariaLive, "aria-atomic": ariaAtomic });
81
84
  };
82
85
  export {
83
86
  TextInputField
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ultraviolet/form",
3
- "version": "3.0.0",
3
+ "version": "3.0.2",
4
4
  "description": "Ultraviolet Form",
5
5
  "homepage": "https://github.com/scaleway/ultraviolet#readme",
6
6
  "repository": {
@@ -55,7 +55,7 @@
55
55
  "@emotion/styled": "11.11.5",
56
56
  "react": "18.x",
57
57
  "react-dom": "18.x",
58
- "react-hook-form": "7.52.0"
58
+ "react-hook-form": "7.52.1"
59
59
  },
60
60
  "devDependencies": {
61
61
  "@babel/core": "7.24.7",
@@ -71,8 +71,8 @@
71
71
  "@emotion/react": "11.11.4",
72
72
  "@emotion/styled": "11.11.5",
73
73
  "react-select": "5.8.0",
74
- "react-hook-form": "7.52.0",
75
- "@ultraviolet/ui": "1.57.1",
74
+ "react-hook-form": "7.52.1",
75
+ "@ultraviolet/ui": "1.59.0",
76
76
  "@ultraviolet/themes": "1.12.1"
77
77
  },
78
78
  "scripts": {