@abgov/react-components 7.4.0 → 7.5.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.
- package/index.js +4 -1
- package/index.js.map +1 -1
- package/index.mjs +4 -1
- package/index.mjs.map +1 -1
- package/lib/button/button.d.ts +5 -2
- package/lib/date-picker/date-picker.d.ts +3 -3
- package/lib/dropdown/dropdown.d.ts +3 -0
- package/lib/icon/icon.d.ts +4 -1
- package/lib/input/input.d.ts +3 -0
- package/lib/text/text.d.ts +1 -1
- package/package.json +1 -1
package/lib/button/button.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ interface WCProps extends Margins {
|
|
|
7
7
|
disabled?: string;
|
|
8
8
|
leadingicon?: string;
|
|
9
9
|
trailingicon?: string;
|
|
10
|
+
arialabel?: string;
|
|
10
11
|
width?: string;
|
|
11
12
|
testid?: string;
|
|
12
13
|
action?: string;
|
|
@@ -36,7 +37,9 @@ export interface GoabButtonProps extends Margins, DataAttributes {
|
|
|
36
37
|
leadingIcon?: GoabIconType;
|
|
37
38
|
/** Icon displayed after the button text. */
|
|
38
39
|
trailingIcon?: GoabIconType;
|
|
39
|
-
/** Sets
|
|
40
|
+
/** Sets the accessible name. Include the visible button text in the value. */
|
|
41
|
+
ariaLabel?: string;
|
|
42
|
+
/** Sets a custom width for the button (e.g., "200px", "100%" or "fit-content"). */
|
|
40
43
|
width?: string;
|
|
41
44
|
/** Callback fired when the button is clicked. */
|
|
42
45
|
onClick?: () => void;
|
|
@@ -52,5 +55,5 @@ export interface GoabButtonProps extends Margins, DataAttributes {
|
|
|
52
55
|
children?: ReactNode;
|
|
53
56
|
}
|
|
54
57
|
/** Carry out an important action or navigate to another page. */
|
|
55
|
-
export declare function GoabButton({ disabled, onClick, actionArgs, actionArg, children, ...rest }: GoabButtonProps): JSX.Element;
|
|
58
|
+
export declare function GoabButton({ disabled, onClick, actionArgs, actionArg, ariaLabel, children, ...rest }: GoabButtonProps): JSX.Element;
|
|
56
59
|
export default GoabButton;
|
|
@@ -27,13 +27,13 @@ export interface GoabDatePickerProps extends Margins, DataAttributes {
|
|
|
27
27
|
type?: GoabDatePickerInputType;
|
|
28
28
|
/** Name of the date field. */
|
|
29
29
|
name?: string;
|
|
30
|
-
/**
|
|
30
|
+
/** Sets the calendar date as an ISO date string (yyyy-mm-dd). */
|
|
31
31
|
value?: Date | string | undefined;
|
|
32
32
|
/** Sets the input to an error state. */
|
|
33
33
|
error?: boolean;
|
|
34
|
-
/**
|
|
34
|
+
/** Sets the earliest allowed date as an ISO date string (yyyy-mm-dd). */
|
|
35
35
|
min?: Date | string;
|
|
36
|
-
/**
|
|
36
|
+
/** Sets the latest allowed date as an ISO date string (yyyy-mm-dd). */
|
|
37
37
|
max?: Date | string;
|
|
38
38
|
/** Sets a data-testid attribute for automated testing. */
|
|
39
39
|
testId?: string;
|
|
@@ -11,6 +11,7 @@ interface WCProps extends Margins {
|
|
|
11
11
|
multiselect?: string;
|
|
12
12
|
name?: string;
|
|
13
13
|
native?: string;
|
|
14
|
+
noresults?: string;
|
|
14
15
|
placeholder?: string;
|
|
15
16
|
value?: string;
|
|
16
17
|
width?: string;
|
|
@@ -64,6 +65,8 @@ export interface GoabDropdownProps extends Margins, DataAttributes {
|
|
|
64
65
|
multiselect?: boolean;
|
|
65
66
|
/** When true, renders the native select HTML element. */
|
|
66
67
|
native?: boolean;
|
|
68
|
+
/** Sets the text displayed when filtering returns no results. @default "No matches found" */
|
|
69
|
+
noResults?: string;
|
|
67
70
|
/** The text displayed in the dropdown before a selection is made. Non-native only. */
|
|
68
71
|
placeholder?: string;
|
|
69
72
|
/** Sets a data-testid attribute for automated testing. */
|
package/lib/icon/icon.d.ts
CHANGED
|
@@ -26,6 +26,8 @@ export interface GoabIconProps extends Margins, DataAttributes {
|
|
|
26
26
|
title?: string;
|
|
27
27
|
/** Defines how the icon will be announced by screen readers. */
|
|
28
28
|
ariaLabel?: string;
|
|
29
|
+
/** Sets whether the icon is hidden from assistive technologies. @default false */
|
|
30
|
+
ariaHidden?: boolean;
|
|
29
31
|
/** Sets the ARIA role for the icon. Use 'presentation' for decorative icons. @default "img" */
|
|
30
32
|
role?: string;
|
|
31
33
|
/** Sets a data-testid attribute for automated testing. */
|
|
@@ -40,9 +42,10 @@ interface WCProps extends Margins {
|
|
|
40
42
|
opacity?: number;
|
|
41
43
|
title?: string;
|
|
42
44
|
arialabel?: string;
|
|
45
|
+
ariahidden?: string;
|
|
43
46
|
role?: string;
|
|
44
47
|
testid?: string;
|
|
45
48
|
}
|
|
46
49
|
/** A simple and universal graphic symbol representing an action, object, or concept to help guide the user. */
|
|
47
|
-
export declare function GoabIcon({ inverted, ...rest }: GoabIconProps): JSX.Element;
|
|
50
|
+
export declare function GoabIcon({ inverted, ariaHidden, ...rest }: GoabIconProps): JSX.Element;
|
|
48
51
|
export {};
|
package/lib/input/input.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ interface WCProps extends Margins {
|
|
|
21
21
|
prefix?: string;
|
|
22
22
|
suffix?: string;
|
|
23
23
|
arialabel?: string;
|
|
24
|
+
arialabelledby?: string;
|
|
24
25
|
testid?: string;
|
|
25
26
|
textalign?: string;
|
|
26
27
|
size?: GoabInputSize;
|
|
@@ -79,6 +80,8 @@ interface BaseProps extends Margins, DataAttributes {
|
|
|
79
80
|
testId?: string;
|
|
80
81
|
/** Sets the aria-label used by assistive technologies. */
|
|
81
82
|
ariaLabel?: string;
|
|
83
|
+
/** The aria-labelledby attribute identifies the element (or elements) that labels the input */
|
|
84
|
+
ariaLabelledBy?: string;
|
|
82
85
|
/** Sets content in the leading slot. */
|
|
83
86
|
leadingContent?: React.ReactNode;
|
|
84
87
|
/** Sets content in the trailing slot. */
|
package/lib/text/text.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ interface GoATextProps extends Margins, DataAttributes {
|
|
|
25
25
|
size?: GoabTextSize;
|
|
26
26
|
/** Sets the max width. @default "65ch" */
|
|
27
27
|
maxWidth?: GoabTextMaxWidth;
|
|
28
|
-
/** Sets the text colour. @default "primary" */
|
|
28
|
+
/** Sets the text colour to primary, secondary, light, or disabled. @default "primary" */
|
|
29
29
|
color?: GoabTextColor;
|
|
30
30
|
/** Sets the id attribute on the element. */
|
|
31
31
|
id?: string;
|