@abgov/react-components 6.10.0-dev.3 → 6.10.0-dev.5
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/experimental/index.d.ts +2 -0
- package/experimental/work-side-menu/work-side-menu.d.ts +34 -0
- package/experimental/work-side-menu-item/work-side-menu-item.d.ts +32 -0
- package/experimental.js +60 -0
- package/experimental.js.map +1 -1
- package/experimental.mjs +60 -0
- package/experimental.mjs.map +1 -1
- package/index.js +6 -1
- package/index.js.map +1 -1
- package/index.mjs +6 -1
- package/index.mjs.map +1 -1
- package/lib/block/block.d.ts +6 -0
- package/lib/menu-button/menu-button.d.ts +8 -2
- package/package.json +1 -1
package/lib/block/block.d.ts
CHANGED
|
@@ -4,6 +4,9 @@ export interface WCProps extends Margins {
|
|
|
4
4
|
gap?: Spacing;
|
|
5
5
|
direction?: GoabBlockDirection;
|
|
6
6
|
alignment?: GoabBlockAlignment;
|
|
7
|
+
"min-width"?: string;
|
|
8
|
+
"max-width"?: string;
|
|
9
|
+
width?: string;
|
|
7
10
|
testid?: string;
|
|
8
11
|
}
|
|
9
12
|
declare module "react" {
|
|
@@ -17,6 +20,9 @@ export interface GoabBlockProps extends Margins {
|
|
|
17
20
|
gap?: Spacing;
|
|
18
21
|
direction?: GoabBlockDirection;
|
|
19
22
|
alignment?: GoabBlockAlignment;
|
|
23
|
+
minWidth?: string;
|
|
24
|
+
maxWidth?: string;
|
|
25
|
+
width?: string;
|
|
20
26
|
testId?: string;
|
|
21
27
|
children?: ReactNode;
|
|
22
28
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GoabButtonType, GoabMenuButtonOnActionDetail } from '@abgov/ui-components-common';
|
|
1
|
+
import { GoabButtonType, GoabIconType, GoabMenuButtonOnActionDetail } from '@abgov/ui-components-common';
|
|
2
2
|
import { ReactNode, JSX } from 'react';
|
|
3
3
|
/**
|
|
4
4
|
* Props definition for the `goab-menu-button` Web Component.
|
|
@@ -6,12 +6,15 @@ import { ReactNode, JSX } from 'react';
|
|
|
6
6
|
*
|
|
7
7
|
* @property {string} text - The text label to be displayed on the button.
|
|
8
8
|
* @property {GoabButtonType} type - The button type, e.g., "primary", "secondary", etc.
|
|
9
|
+
* @property {GoaIconType} leadingIcon - Optional leading icon appearing within the button.
|
|
9
10
|
* @property {string} [testid] - A test identifier for automated testing purposes.
|
|
10
11
|
* @property {React.RefObject<HTMLElement | null>} ref - A reference object pointing to the Web Component's DOM element.
|
|
11
12
|
*/
|
|
12
13
|
interface WCProps {
|
|
13
14
|
text: string;
|
|
14
15
|
type: GoabButtonType;
|
|
16
|
+
"max-width"?: string;
|
|
17
|
+
"leading-icon"?: GoabIconType;
|
|
15
18
|
testid?: string;
|
|
16
19
|
ref: React.RefObject<HTMLElement | null>;
|
|
17
20
|
}
|
|
@@ -33,6 +36,7 @@ declare module "react" {
|
|
|
33
36
|
*
|
|
34
37
|
* @property {string} text - The text label to display on the button.
|
|
35
38
|
* @property {GoabButtonType} [type="primary"] - The button type, e.g., "primary", "secondary". Defaults to "primary".
|
|
39
|
+
* @property {GoaIconType} leadingIcon - Optional leading icon appearing within the button.
|
|
36
40
|
* @property {string} [testId] - A test identifier for automated testing purposes.
|
|
37
41
|
* @property {Function} [onAction] - Callback function invoked when an action event is emitted by the component.
|
|
38
42
|
* @property {ReactNode} [children] - Optional child elements to be rendered inside the button.
|
|
@@ -40,6 +44,8 @@ declare module "react" {
|
|
|
40
44
|
export interface GoabMenuButtonProps {
|
|
41
45
|
text: string;
|
|
42
46
|
type?: GoabButtonType;
|
|
47
|
+
maxWidth?: string;
|
|
48
|
+
leadingIcon?: GoabIconType;
|
|
43
49
|
testId?: string;
|
|
44
50
|
onAction?: (detail: GoabMenuButtonOnActionDetail) => void;
|
|
45
51
|
children?: ReactNode;
|
|
@@ -67,5 +73,5 @@ export interface GoabMenuButtonProps {
|
|
|
67
73
|
* </GoabMenuButton>
|
|
68
74
|
* ```
|
|
69
75
|
*/
|
|
70
|
-
export declare function GoabMenuButton({ text, type, testId, onAction, children, }: GoabMenuButtonProps): JSX.Element;
|
|
76
|
+
export declare function GoabMenuButton({ text, type, leadingIcon, maxWidth, testId, onAction, children, }: GoabMenuButtonProps): JSX.Element;
|
|
71
77
|
export default GoabMenuButton;
|