@ultraviolet/form 3.14.2 → 3.14.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.
@@ -40,7 +40,7 @@ const SelectableCardOptionGroupField = ({
40
40
  const {
41
41
  field: optionField
42
42
  } = reactHookForm.useController({
43
- name: `${name}-option`,
43
+ name: `${name}Option`,
44
44
  shouldUnregister,
45
45
  rules: {
46
46
  required
@@ -2,15 +2,16 @@ import { SelectableCardOptionGroup } from '@ultraviolet/ui';
2
2
  import type { ComponentProps, JSX } from 'react';
3
3
  import type { FieldPath, FieldValues } from 'react-hook-form';
4
4
  import type { BaseFieldProps } from '../../types';
5
- type SelectableCardOptionGroupFieldProps<TFieldValues extends FieldValues, TFieldName extends FieldPath<TFieldValues>> = ComponentProps<typeof SelectableCardOptionGroup> & BaseFieldProps<TFieldValues, TFieldName> & Omit<BaseFieldProps<TFieldValues, TFieldName>, 'label'>;
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
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, image, disabled, id, "data-testid": dataTestId, }: Omit<import("node_modules/@ultraviolet/ui/dist/components/SelectableCard").SelectableCardProps & import("react").RefAttributes<HTMLDivElement>, "onChange"> & {
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"> & {
9
9
  value: string;
10
10
  className?: string;
11
11
  children?: import("react").ReactNode;
12
12
  options: ComponentProps<typeof import("@ultraviolet/ui").SelectInputV2>["options"];
13
13
  optionValue?: ComponentProps<typeof import("@ultraviolet/ui").SelectInputV2>["value"];
14
+ optionPlaceholder?: ComponentProps<typeof import("@ultraviolet/ui").SelectInputV2>["placeholder"];
14
15
  image?: import("react").ReactNode;
15
16
  labelDescription?: ComponentProps<typeof import("@ultraviolet/ui").Label>["labelDescription"];
16
17
  id?: string;
@@ -38,7 +38,7 @@ const SelectableCardOptionGroupField = ({
38
38
  const {
39
39
  field: optionField
40
40
  } = useController({
41
- name: `${name}-option`,
41
+ name: `${name}Option`,
42
42
  shouldUnregister,
43
43
  rules: {
44
44
  required
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ultraviolet/form",
3
- "version": "3.14.2",
3
+ "version": "3.14.3",
4
4
  "description": "Ultraviolet Form",
5
5
  "homepage": "https://github.com/scaleway/ultraviolet#readme",
6
6
  "repository": {
@@ -68,11 +68,11 @@
68
68
  "@utils/test": "0.0.1"
69
69
  },
70
70
  "dependencies": {
71
- "@babel/runtime": "7.26.9",
71
+ "@babel/runtime": "7.26.10",
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.89.2"
75
+ "@ultraviolet/ui": "1.90.0"
76
76
  },
77
77
  "scripts": {
78
78
  "build:profile": "npx vite-bundle-visualizer -c vite.config.ts",