@westpac/ui 1.6.0 → 1.7.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.
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { type FieldProps } from './field.types.js';
|
|
2
|
-
export declare function Field({ className, label, tag: Tag, children, hintMessage, errorTitle, errorMessage, labelElementType, labelSize, ...props }: FieldProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function Field({ className, label, tag: Tag, children, hintMessage, errorTitle, errorMessage, labelElementType, labelSize, id, ...props }: FieldProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
import React, { Children, cloneElement, isValidElement, useCallback } from 'react';
|
|
3
3
|
import { useField } from 'react-aria';
|
|
4
4
|
import { ErrorMessage, Hint, Label } from '../index.js';
|
|
5
|
-
export function Field({ className, label, tag: Tag = 'div', children, hintMessage, errorTitle, errorMessage, labelElementType, labelSize, ...props }) {
|
|
5
|
+
export function Field({ className, label, tag: Tag = 'div', children, hintMessage, errorTitle, errorMessage, labelElementType, labelSize, id, ...props }) {
|
|
6
6
|
const { labelProps, fieldProps, descriptionProps, errorMessageProps } = useField({
|
|
7
7
|
...props,
|
|
8
8
|
description: hintMessage,
|
|
9
9
|
errorMessage,
|
|
10
|
+
id,
|
|
10
11
|
label,
|
|
11
12
|
labelElementType
|
|
12
13
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@westpac/ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"type": "module",
|
|
@@ -254,9 +254,9 @@
|
|
|
254
254
|
"vite": "^7.1.12",
|
|
255
255
|
"vitest": "^3.2.4",
|
|
256
256
|
"@westpac/eslint-config": "~1.1.0",
|
|
257
|
-
"@westpac/test-config": "~0.0.0",
|
|
258
257
|
"@westpac/style-config": "~1.0.2",
|
|
259
|
-
"@westpac/ts-config": "~0.0.0"
|
|
258
|
+
"@westpac/ts-config": "~0.0.0",
|
|
259
|
+
"@westpac/test-config": "~0.0.0"
|
|
260
260
|
},
|
|
261
261
|
"dependencies": {
|
|
262
262
|
"@internationalized/date": "~3.10.0",
|
|
@@ -17,12 +17,14 @@ export function Field({
|
|
|
17
17
|
errorMessage,
|
|
18
18
|
labelElementType,
|
|
19
19
|
labelSize,
|
|
20
|
+
id,
|
|
20
21
|
...props
|
|
21
22
|
}: FieldProps) {
|
|
22
23
|
const { labelProps, fieldProps, descriptionProps, errorMessageProps } = useField({
|
|
23
24
|
...props,
|
|
24
25
|
description: hintMessage,
|
|
25
26
|
errorMessage,
|
|
27
|
+
id,
|
|
26
28
|
label,
|
|
27
29
|
labelElementType,
|
|
28
30
|
});
|