@abgov/react-components 5.0.0-alpha.10 → 5.0.0-alpha.12
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.d.ts +1 -0
- package/index.js +83 -1
- package/index.js.map +1 -1
- package/index.mjs +83 -1
- package/index.mjs.map +1 -1
- package/lib/accordion/accordion.d.ts +7 -2
- package/lib/app-header/app-header.d.ts +4 -1
- package/lib/callout/callout.d.ts +4 -1
- package/lib/filter-chip/filter-chip.d.ts +24 -0
- package/lib/side-menu-group/side-menu-group.d.ts +6 -2
- package/package.json +1 -1
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { ReactNode } from "react";
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
2
|
import { Margins } from "../../common/styling";
|
|
3
3
|
export type GoAHeadingSize = "small" | "medium";
|
|
4
|
+
export type GoAIconPosition = "left" | "right";
|
|
4
5
|
interface WCProps extends Margins {
|
|
6
|
+
ref: React.RefObject<HTMLElement>;
|
|
5
7
|
open?: boolean;
|
|
6
8
|
headingSize?: GoAHeadingSize;
|
|
7
9
|
heading: string;
|
|
@@ -9,6 +11,7 @@ interface WCProps extends Margins {
|
|
|
9
11
|
headingContent?: ReactNode;
|
|
10
12
|
maxwidth?: string;
|
|
11
13
|
testid?: string;
|
|
14
|
+
iconposition?: GoAIconPosition;
|
|
12
15
|
}
|
|
13
16
|
declare global {
|
|
14
17
|
namespace JSX {
|
|
@@ -25,7 +28,9 @@ export interface GoAAccordionProps extends Margins {
|
|
|
25
28
|
headingContent?: ReactNode;
|
|
26
29
|
maxWidth?: string;
|
|
27
30
|
testid?: string;
|
|
31
|
+
iconPosition?: GoAIconPosition;
|
|
32
|
+
onChange?: (open: boolean) => void;
|
|
28
33
|
children: ReactNode;
|
|
29
34
|
}
|
|
30
|
-
export declare function GoAAccordion({ open, heading, headingSize, secondaryText, headingContent, maxWidth, testid, children, mt, mr, mb, ml, }: GoAAccordionProps): JSX.Element;
|
|
35
|
+
export declare function GoAAccordion({ open, heading, headingSize, secondaryText, headingContent, iconPosition, maxWidth, testid, onChange, children, mt, mr, mb, ml, }: GoAAccordionProps): JSX.Element;
|
|
31
36
|
export default GoAAccordion;
|
|
@@ -3,6 +3,8 @@ interface WCProps {
|
|
|
3
3
|
url?: string;
|
|
4
4
|
maxcontentwidth?: string;
|
|
5
5
|
fullmenubreakpoint?: number;
|
|
6
|
+
hasmenuclickhandler?: boolean;
|
|
7
|
+
ref: React.RefObject<HTMLElement>;
|
|
6
8
|
testid?: string;
|
|
7
9
|
}
|
|
8
10
|
declare global {
|
|
@@ -18,7 +20,8 @@ export interface GoAAppHeaderProps {
|
|
|
18
20
|
maxContentWidth?: string;
|
|
19
21
|
fullMenuBreakpoint?: number;
|
|
20
22
|
children?: React.ReactNode;
|
|
23
|
+
onMenuClick?: () => void;
|
|
21
24
|
testId?: string;
|
|
22
25
|
}
|
|
23
|
-
export declare function GoAAppHeader({ heading, url, maxContentWidth, fullMenuBreakpoint, testId, children, }: GoAAppHeaderProps): JSX.Element;
|
|
26
|
+
export declare function GoAAppHeader({ heading, url, maxContentWidth, fullMenuBreakpoint, testId, children, onMenuClick, }: GoAAppHeaderProps): JSX.Element;
|
|
24
27
|
export default GoAAppHeader;
|
package/lib/callout/callout.d.ts
CHANGED
|
@@ -2,12 +2,14 @@ import { Margins } from "../../common/styling";
|
|
|
2
2
|
export type GoACalloutType = "important" | "information" | "event" | "success" | "emergency";
|
|
3
3
|
export type GoACalloutSize = "medium" | "large";
|
|
4
4
|
export type GoACalloutAriaLive = "off" | "polite" | "assertive";
|
|
5
|
+
export type GoACalloutIconTheme = "outline" | "filled";
|
|
5
6
|
interface WCProps extends Margins {
|
|
6
7
|
heading?: string;
|
|
7
8
|
type?: GoACalloutType;
|
|
8
9
|
size?: GoACalloutSize;
|
|
9
10
|
maxwidth?: string;
|
|
10
11
|
arialive?: GoACalloutAriaLive;
|
|
12
|
+
icontheme?: GoACalloutIconTheme;
|
|
11
13
|
testid?: string;
|
|
12
14
|
}
|
|
13
15
|
declare global {
|
|
@@ -21,11 +23,12 @@ export interface GoACalloutProps extends Margins {
|
|
|
21
23
|
heading?: string;
|
|
22
24
|
type?: GoACalloutType;
|
|
23
25
|
size?: GoACalloutSize;
|
|
26
|
+
iconTheme?: GoACalloutIconTheme;
|
|
24
27
|
maxWidth?: string;
|
|
25
28
|
testId?: string;
|
|
26
29
|
ariaLive?: GoACalloutAriaLive;
|
|
27
30
|
children?: React.ReactNode;
|
|
28
31
|
}
|
|
29
32
|
export type CalloutProps = GoACalloutProps;
|
|
30
|
-
export declare const GoACallout: ({ heading, type, size, maxWidth, testId, ariaLive, children, mt, mr, mb, ml, }: GoACalloutProps) => import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
export declare const GoACallout: ({ heading, type, iconTheme, size, maxWidth, testId, ariaLive, children, mt, mr, mb, ml, }: GoACalloutProps) => import("react/jsx-runtime").JSX.Element;
|
|
31
34
|
export default GoACallout;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Margins } from "../../common/styling";
|
|
2
|
+
export type GoAFilterChipTheme = "outline" | "filled";
|
|
3
|
+
interface WCProps extends Margins {
|
|
4
|
+
ref: React.RefObject<HTMLElement>;
|
|
5
|
+
icontheme: GoAFilterChipTheme;
|
|
6
|
+
error: boolean;
|
|
7
|
+
content: string;
|
|
8
|
+
}
|
|
9
|
+
declare global {
|
|
10
|
+
namespace JSX {
|
|
11
|
+
interface IntrinsicElements {
|
|
12
|
+
"goa-filter-chip": WCProps & React.HTMLAttributes<HTMLElement>;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
export interface GoAFilterChipProps extends Margins {
|
|
17
|
+
onClick?: () => void;
|
|
18
|
+
iconTheme?: GoAFilterChipTheme;
|
|
19
|
+
error?: boolean;
|
|
20
|
+
content: string;
|
|
21
|
+
testId?: string;
|
|
22
|
+
}
|
|
23
|
+
export declare const GoAFilterChip: ({ iconTheme, error, content, onClick, mt, mr, mb, ml, testId, }: GoAFilterChipProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export default GoAFilterChip;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
|
-
|
|
2
|
+
import { GoAIconType } from "../icon/icon";
|
|
3
|
+
import { Margins } from "../../common/styling";
|
|
4
|
+
interface WCProps extends Margins {
|
|
3
5
|
heading: string;
|
|
6
|
+
icon?: GoAIconType;
|
|
4
7
|
testid?: string;
|
|
5
8
|
}
|
|
6
9
|
declare global {
|
|
@@ -10,8 +13,9 @@ declare global {
|
|
|
10
13
|
}
|
|
11
14
|
}
|
|
12
15
|
}
|
|
13
|
-
export interface GoASideMenuGroupProps {
|
|
16
|
+
export interface GoASideMenuGroupProps extends Margins {
|
|
14
17
|
heading: string;
|
|
18
|
+
icon?: GoAIconType;
|
|
15
19
|
testId?: string;
|
|
16
20
|
children?: ReactNode;
|
|
17
21
|
}
|
package/package.json
CHANGED