@ultraviolet/form 3.14.3 → 3.14.5

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 @@ const ui = require("@ultraviolet/ui");
5
5
  const reactHookForm = require("react-hook-form");
6
6
  const index = require("../../providers/ErrorContext/index.cjs");
7
7
  const SelectableCardOptionGroupField = ({
8
- className,
9
8
  legend,
10
9
  control,
11
10
  name,
@@ -15,10 +14,9 @@ const SelectableCardOptionGroupField = ({
15
14
  children,
16
15
  label = "",
17
16
  error: customError,
18
- helper,
19
- columns,
20
17
  shouldUnregister = false,
21
- validate
18
+ validate,
19
+ ...props
22
20
  }) => {
23
21
  const {
24
22
  getError
@@ -54,7 +52,7 @@ const SelectableCardOptionGroupField = ({
54
52
  onChangeOption?.(value);
55
53
  }, error: getError({
56
54
  label
57
- }, error) ?? customError, className, columns, helper, required, children });
55
+ }, error) ?? customError, required, ...props, children });
58
56
  };
59
57
  SelectableCardOptionGroupField.Option = ui.SelectableCardOptionGroup.Option;
60
58
  exports.SelectableCardOptionGroupField = SelectableCardOptionGroupField;
@@ -4,8 +4,8 @@ import type { FieldPath, FieldValues } from 'react-hook-form';
4
4
  import type { BaseFieldProps } from '../../types';
5
5
  type SelectableCardOptionGroupFieldProps<TFieldValues extends FieldValues, TFieldName extends FieldPath<TFieldValues>> = Omit<ComponentProps<typeof SelectableCardOptionGroup>, 'onChange' | 'onChangeOption'> & Partial<Pick<ComponentProps<typeof SelectableCardOptionGroup>, 'onChangeOption' | 'onChange'>> & BaseFieldProps<TFieldValues, TFieldName> & Omit<BaseFieldProps<TFieldValues, TFieldName>, 'label'>;
6
6
  export declare const SelectableCardOptionGroupField: {
7
- <TFieldValues extends FieldValues, TFieldName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ className, legend, control, name, onChange, onChangeOption, required, children, label, error: customError, helper, columns, shouldUnregister, validate, }: SelectableCardOptionGroupFieldProps<TFieldValues, TFieldName>): JSX.Element;
8
- Option: ({ value, label, labelDescription, "aria-label": ariaLabel, children, className, options, optionPlaceholder, image, disabled, id, "data-testid": dataTestId, }: Omit<import("node_modules/@ultraviolet/ui/dist/components/SelectableCard").SelectableCardProps & import("react").RefAttributes<HTMLDivElement>, "onChange"> & {
7
+ <TFieldValues extends FieldValues, TFieldName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ legend, control, name, onChange, onChangeOption, required, children, label, error: customError, shouldUnregister, validate, ...props }: SelectableCardOptionGroupFieldProps<TFieldValues, TFieldName>): JSX.Element;
8
+ Option: ({ value, label, labelDescription, "aria-label": ariaLabel, children, className, options, optionPlaceholder, image, disabled, id, "data-testid": dataTestId, tooltip, }: Omit<import("node_modules/@ultraviolet/ui/dist/components/SelectableCard").SelectableCardProps & import("react").RefAttributes<HTMLDivElement>, "onChange"> & {
9
9
  value: string;
10
10
  className?: string;
11
11
  children?: import("react").ReactNode;
@@ -16,6 +16,7 @@ export declare const SelectableCardOptionGroupField: {
16
16
  labelDescription?: ComponentProps<typeof import("@ultraviolet/ui").Label>["labelDescription"];
17
17
  id?: string;
18
18
  "data-testid"?: string;
19
+ tooltip?: string;
19
20
  }) => import("@emotion/react/jsx-runtime").JSX.Element;
20
21
  };
21
22
  export {};
@@ -3,7 +3,6 @@ import { SelectableCardOptionGroup } from "@ultraviolet/ui";
3
3
  import { useController } from "react-hook-form";
4
4
  import { useErrors } from "../../providers/ErrorContext/index.js";
5
5
  const SelectableCardOptionGroupField = ({
6
- className,
7
6
  legend,
8
7
  control,
9
8
  name,
@@ -13,10 +12,9 @@ const SelectableCardOptionGroupField = ({
13
12
  children,
14
13
  label = "",
15
14
  error: customError,
16
- helper,
17
- columns,
18
15
  shouldUnregister = false,
19
- validate
16
+ validate,
17
+ ...props
20
18
  }) => {
21
19
  const {
22
20
  getError
@@ -52,7 +50,7 @@ const SelectableCardOptionGroupField = ({
52
50
  onChangeOption?.(value);
53
51
  }, error: getError({
54
52
  label
55
- }, error) ?? customError, className, columns, helper, required, children });
53
+ }, error) ?? customError, required, ...props, children });
56
54
  };
57
55
  SelectableCardOptionGroupField.Option = SelectableCardOptionGroup.Option;
58
56
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ultraviolet/form",
3
- "version": "3.14.3",
3
+ "version": "3.14.5",
4
4
  "description": "Ultraviolet Form",
5
5
  "homepage": "https://github.com/scaleway/ultraviolet#readme",
6
6
  "repository": {
@@ -72,7 +72,7 @@
72
72
  "react-hook-form": "7.54.2",
73
73
  "react-select": "5.10.0",
74
74
  "@ultraviolet/themes": "1.16.0",
75
- "@ultraviolet/ui": "1.90.0"
75
+ "@ultraviolet/ui": "1.90.2"
76
76
  },
77
77
  "scripts": {
78
78
  "build:profile": "npx vite-bundle-visualizer -c vite.config.ts",