@ultraviolet/form 2.8.0 → 2.8.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,30 +7,38 @@ import { useErrors } from '../../providers/ErrorContext/index.js';
7
7
  * This component offers a form field based on Ultraviolet UI TextInputV2 component
8
8
  */
9
9
  const TextInputField = ({
10
- autoFocus,
11
- clearable,
10
+ validate,
11
+ regex: regexes,
12
+ id,
12
13
  className,
13
14
  tabIndex,
14
- 'data-testid': dataTestId,
15
- disabled,
15
+ onChange,
16
+ placeholder,
17
+ disabled = false,
18
+ readOnly = false,
19
+ success,
16
20
  helper,
21
+ tooltip,
17
22
  label,
23
+ autoFocus,
24
+ required = false,
25
+ 'data-testid': dataTestId,
26
+ name,
27
+ onFocus,
28
+ onBlur,
29
+ clearable = false,
18
30
  labelDescription,
31
+ type = 'text',
32
+ prefix,
33
+ suffix,
34
+ size = 'large',
19
35
  loading,
20
- onChange,
36
+ onRandomize,
21
37
  minLength,
22
38
  maxLength,
23
- name,
24
- onFocus,
25
- onBlur,
26
- placeholder,
27
- readOnly,
28
- required,
29
- success,
30
- tooltip,
31
- type,
32
- validate,
33
- regex: regexes
39
+ 'aria-labelledby': ariaLabelledBy,
40
+ 'aria-label': ariaLabel,
41
+ autoComplete
34
42
  }) => {
35
43
  const {
36
44
  getError
@@ -92,7 +100,15 @@ const TextInputField = ({
92
100
  tabIndex: tabIndex,
93
101
  tooltip: tooltip,
94
102
  type: type,
95
- value: field.value
103
+ value: field.value,
104
+ id: id,
105
+ prefix: prefix,
106
+ suffix: suffix,
107
+ size: size,
108
+ onRandomize: onRandomize,
109
+ "aria-label": ariaLabel,
110
+ "aria-labelledby": ariaLabelledBy,
111
+ autoComplete: autoComplete
96
112
  });
97
113
  };
98
114
 
package/dist/index.d.ts CHANGED
@@ -301,7 +301,7 @@ type TextInputFieldProps<TFieldValues extends FieldValues, TName extends FieldPa
301
301
  /**
302
302
  * This component offers a form field based on Ultraviolet UI TextInputV2 component
303
303
  */
304
- declare const TextInputField: <TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ autoFocus, clearable, className, tabIndex, "data-testid": dataTestId, disabled, helper, label, labelDescription, loading, onChange, minLength, maxLength, name, onFocus, onBlur, placeholder, readOnly, required, success, tooltip, type, validate, regex: regexes, }: TextInputFieldProps<TFieldValues, TName>) => _emotion_react_jsx_runtime.JSX.Element;
304
+ declare const TextInputField: <TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ validate, 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, }: TextInputFieldProps<TFieldValues, TName>) => _emotion_react_jsx_runtime.JSX.Element;
305
305
 
306
306
  type TimeFieldProps<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>> = BaseFieldProps<TFieldValues, TName> & Omit<ComponentProps<typeof TimeInput>, 'onChange'> & {
307
307
  name: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ultraviolet/form",
3
- "version": "2.8.0",
3
+ "version": "2.8.2",
4
4
  "description": "Ultraviolet Form",
5
5
  "homepage": "https://github.com/scaleway/ultraviolet#readme",
6
6
  "repository": {
@@ -32,28 +32,28 @@
32
32
  "default": "./dist/index.js"
33
33
  },
34
34
  "peerDependencies": {
35
- "@emotion/react": "11.11.3",
35
+ "@emotion/react": "11.11.4",
36
36
  "@emotion/styled": "11.11.0",
37
37
  "react": "18.x",
38
38
  "react-dom": "18.x",
39
39
  "react-hook-form": "7.50.1"
40
40
  },
41
41
  "devDependencies": {
42
- "@babel/core": "7.23.9",
42
+ "@babel/core": "7.24.0",
43
43
  "@types/final-form-focus": "1.1.7",
44
- "@types/react": "18.2.55",
44
+ "@types/react": "18.2.61",
45
45
  "@types/react-dom": "18.2.19",
46
46
  "react": "18.2.0",
47
47
  "react-dom": "18.2.0"
48
48
  },
49
49
  "dependencies": {
50
- "@babel/runtime": "7.23.9",
50
+ "@babel/runtime": "7.24.0",
51
51
  "@emotion/babel-plugin": "11.11.0",
52
- "@emotion/react": "11.11.3",
52
+ "@emotion/react": "11.11.4",
53
53
  "@emotion/styled": "11.11.0",
54
54
  "react-select": "5.8.0",
55
55
  "react-hook-form": "7.50.1",
56
- "@ultraviolet/ui": "1.39.0"
56
+ "@ultraviolet/ui": "1.40.1"
57
57
  },
58
58
  "scripts": {
59
59
  "build": "rollup -c ../../rollup.config.mjs",