@ultraviolet/form 3.10.6 → 3.11.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.
|
@@ -23,6 +23,7 @@ const TextAreaField = ({
|
|
|
23
23
|
onFocus,
|
|
24
24
|
onBlur,
|
|
25
25
|
onKeyDown,
|
|
26
|
+
maxRows,
|
|
26
27
|
placeholder,
|
|
27
28
|
readOnly,
|
|
28
29
|
required,
|
|
@@ -87,7 +88,7 @@ const TextAreaField = ({
|
|
|
87
88
|
}, onChange: (event) => {
|
|
88
89
|
field.onChange(event);
|
|
89
90
|
onChange?.(event);
|
|
90
|
-
}, onFocus, onKeyDown: onKeyDownHandler, placeholder, readOnly, required, rows, success, tabIndex, tooltip, value: field.value, ...label ? {
|
|
91
|
+
}, onFocus, onKeyDown: onKeyDownHandler, placeholder, readOnly, required, rows, maxRows, success, tabIndex, tooltip, value: field.value, ...label ? {
|
|
91
92
|
label
|
|
92
93
|
} : {
|
|
93
94
|
"aria-label": ariaLabel
|
|
@@ -9,4 +9,4 @@ export type TextAreaFieldProps<TFieldValues extends FieldValues, TFieldName exte
|
|
|
9
9
|
/**
|
|
10
10
|
* This component offers a form field based on Ultraviolet UI TextArea component
|
|
11
11
|
*/
|
|
12
|
-
export declare const TextAreaField: <TFieldValues extends FieldValues, TFieldName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ autoFocus, clearable, className, tabIndex, control, "data-testid": dataTestId, disabled, helper, label, labelDescription, onChange, minLength, maxLength, name, onFocus, onBlur, onKeyDown, placeholder, readOnly, required, rows, success, tooltip, regex: regexes, submitOnEnter, validate, "aria-label": ariaLabel, }: TextAreaFieldProps<TFieldValues, TFieldName>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare const TextAreaField: <TFieldValues extends FieldValues, TFieldName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ autoFocus, clearable, className, tabIndex, control, "data-testid": dataTestId, disabled, helper, label, labelDescription, onChange, minLength, maxLength, name, onFocus, onBlur, onKeyDown, maxRows, placeholder, readOnly, required, rows, success, tooltip, regex: regexes, submitOnEnter, validate, "aria-label": ariaLabel, }: TextAreaFieldProps<TFieldValues, TFieldName>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -21,6 +21,7 @@ const TextAreaField = ({
|
|
|
21
21
|
onFocus,
|
|
22
22
|
onBlur,
|
|
23
23
|
onKeyDown,
|
|
24
|
+
maxRows,
|
|
24
25
|
placeholder,
|
|
25
26
|
readOnly,
|
|
26
27
|
required,
|
|
@@ -85,7 +86,7 @@ const TextAreaField = ({
|
|
|
85
86
|
}, onChange: (event) => {
|
|
86
87
|
field.onChange(event);
|
|
87
88
|
onChange?.(event);
|
|
88
|
-
}, onFocus, onKeyDown: onKeyDownHandler, placeholder, readOnly, required, rows, success, tabIndex, tooltip, value: field.value, ...label ? {
|
|
89
|
+
}, onFocus, onKeyDown: onKeyDownHandler, placeholder, readOnly, required, rows, maxRows, success, tabIndex, tooltip, value: field.value, ...label ? {
|
|
89
90
|
label
|
|
90
91
|
} : {
|
|
91
92
|
"aria-label": ariaLabel
|
|
@@ -2,9 +2,9 @@ import { ToggleGroup } 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 ToggleGroupFieldProps<TFieldValues extends FieldValues, TFieldName extends FieldPath<TFieldValues>> = BaseFieldProps<TFieldValues, TFieldName> & Partial<Pick<ComponentProps<typeof ToggleGroup>, 'className' | 'helper' | 'direction' | 'children' | 'error' | 'legend'>> & Required<Pick<ComponentProps<typeof ToggleGroup>, 'legend'>>;
|
|
5
|
+
type ToggleGroupFieldProps<TFieldValues extends FieldValues, TFieldName extends FieldPath<TFieldValues>> = BaseFieldProps<TFieldValues, TFieldName> & Partial<Pick<ComponentProps<typeof ToggleGroup>, 'className' | 'helper' | 'direction' | 'children' | 'error' | 'legend' | 'description'>> & Required<Pick<ComponentProps<typeof ToggleGroup>, 'legend'>>;
|
|
6
6
|
export declare const ToggleGroupField: {
|
|
7
|
-
<TFieldValues extends FieldValues, TFieldName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ legend, control, className, helper, direction, children, onChange, label, error: customError, name, required, shouldUnregister, validate, }: ToggleGroupFieldProps<TFieldValues, TFieldName>): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
7
|
+
<TFieldValues extends FieldValues, TFieldName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ legend, control, className, helper, description, direction, children, onChange, label, error: customError, name, required, shouldUnregister, validate, }: ToggleGroupFieldProps<TFieldValues, TFieldName>): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
8
8
|
Toggle: ({ disabled, name, value, label, helper, error, className, "data-testid": dataTestId, }: Omit<{
|
|
9
9
|
id?: string;
|
|
10
10
|
checked?: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ultraviolet/form",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.11.0",
|
|
4
4
|
"description": "Ultraviolet Form",
|
|
5
5
|
"homepage": "https://github.com/scaleway/ultraviolet#readme",
|
|
6
6
|
"repository": {
|
|
@@ -71,8 +71,8 @@
|
|
|
71
71
|
"@babel/runtime": "7.26.0",
|
|
72
72
|
"react-hook-form": "7.53.2",
|
|
73
73
|
"react-select": "5.8.3",
|
|
74
|
-
"@ultraviolet/
|
|
75
|
-
"@ultraviolet/
|
|
74
|
+
"@ultraviolet/themes": "1.15.0",
|
|
75
|
+
"@ultraviolet/ui": "1.77.0"
|
|
76
76
|
},
|
|
77
77
|
"scripts": {
|
|
78
78
|
"build:profile": "npx vite-bundle-visualizer -c vite.config.ts",
|