@abgov/react-components 4.8.0 → 4.10.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.d.ts +3 -0
- package/lib/callout/callout.d.ts +4 -1
- package/lib/file-upload-card/file-upload-card.d.ts +27 -0
- package/lib/file-upload-input/file-upload-input.d.ts +23 -0
- package/lib/hero-banner/hero-banner.d.ts +2 -0
- package/lib/microsite-header/microsite-header.d.ts +2 -0
- package/lib/notification/notification.d.ts +3 -1
- package/lib/popover/popover.d.ts +3 -2
- package/lib/three-column-layout/three-column-layout.d.ts +25 -0
- package/package.json +1 -1
- package/react-components.esm.js +3049 -894
- package/react-components.umd.js +3056 -893
package/index.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import "@abgov/web-components";
|
|
2
2
|
export * from "./lib/pages/pages";
|
|
3
|
+
export * from "./lib/file-upload-card/file-upload-card";
|
|
4
|
+
export * from "./lib/file-upload-input/file-upload-input";
|
|
3
5
|
export type { GoAIconType } from "./lib/icon/icon";
|
|
4
6
|
export type { GoABadgeType } from "./lib/badge/badge";
|
|
5
7
|
export * from "./lib/accordion/accordion";
|
|
@@ -43,3 +45,4 @@ export * from "./lib/spinner/spinner";
|
|
|
43
45
|
export * from "./lib/table/table";
|
|
44
46
|
export * from "./lib/textarea/textarea";
|
|
45
47
|
export * from "./lib/two-column-layout/two-column-layout";
|
|
48
|
+
export * from "./lib/three-column-layout/three-column-layout";
|
package/lib/callout/callout.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { Margins } from "../../common/styling";
|
|
3
3
|
declare type CalloutType = "important" | "information" | "event" | "success" | "emergency";
|
|
4
|
+
declare type CalloutSize = "medium" | "large";
|
|
4
5
|
interface WCProps extends Margins {
|
|
5
6
|
heading?: string;
|
|
6
7
|
type?: CalloutType;
|
|
8
|
+
size?: CalloutSize;
|
|
7
9
|
}
|
|
8
10
|
declare global {
|
|
9
11
|
namespace JSX {
|
|
@@ -15,8 +17,9 @@ declare global {
|
|
|
15
17
|
export interface CalloutProps extends Margins {
|
|
16
18
|
heading?: string;
|
|
17
19
|
type?: CalloutType;
|
|
20
|
+
size?: CalloutSize;
|
|
18
21
|
testId?: string;
|
|
19
22
|
children?: React.ReactNode;
|
|
20
23
|
}
|
|
21
|
-
export declare const GoACallout: ({ heading, type, testId, children, mt, mr, mb, ml, }: CalloutProps) => JSX.Element;
|
|
24
|
+
export declare const GoACallout: ({ heading, type, size, testId, children, mt, mr, mb, ml, }: CalloutProps) => JSX.Element;
|
|
22
25
|
export default GoACallout;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface WCProps {
|
|
3
|
+
ref: React.MutableRefObject<HTMLElement | null>;
|
|
4
|
+
filename: string;
|
|
5
|
+
size: number;
|
|
6
|
+
type?: string;
|
|
7
|
+
progress?: number;
|
|
8
|
+
error?: string;
|
|
9
|
+
}
|
|
10
|
+
declare global {
|
|
11
|
+
namespace JSX {
|
|
12
|
+
interface IntrinsicElements {
|
|
13
|
+
"goa-file-upload-card": WCProps & React.HTMLAttributes<HTMLElement>;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
interface FileUploadCardProps {
|
|
18
|
+
filename: string;
|
|
19
|
+
size: number;
|
|
20
|
+
type?: string;
|
|
21
|
+
progress?: number;
|
|
22
|
+
error?: string;
|
|
23
|
+
onDelete?: () => void;
|
|
24
|
+
onCancel?: () => void;
|
|
25
|
+
}
|
|
26
|
+
export declare function GoAFileUploadCard({ filename, size, type, progress, error, onDelete, onCancel, }: FileUploadCardProps): JSX.Element;
|
|
27
|
+
export default GoAFileUploadCard;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
declare type Variant = "dragdrop" | "button";
|
|
3
|
+
interface WCProps {
|
|
4
|
+
ref: React.MutableRefObject<HTMLElement | null>;
|
|
5
|
+
variant?: Variant;
|
|
6
|
+
accept?: string;
|
|
7
|
+
maxfilesize?: string;
|
|
8
|
+
}
|
|
9
|
+
declare global {
|
|
10
|
+
namespace JSX {
|
|
11
|
+
interface IntrinsicElements {
|
|
12
|
+
"goa-file-upload-input": WCProps & React.HTMLAttributes<HTMLElement>;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
interface FileUploadInputProps {
|
|
17
|
+
variant?: Variant;
|
|
18
|
+
accept?: string;
|
|
19
|
+
maxFileSize?: string;
|
|
20
|
+
onSelectFile: (file: File) => void;
|
|
21
|
+
}
|
|
22
|
+
export declare function GoAFileUploadInput({ variant, accept, maxFileSize, onSelectFile, }: FileUploadInputProps): JSX.Element;
|
|
23
|
+
export default GoAFileUploadInput;
|
|
@@ -3,6 +3,7 @@ interface WCProps {
|
|
|
3
3
|
heading: string;
|
|
4
4
|
backgroundurl: string;
|
|
5
5
|
minheight?: string;
|
|
6
|
+
maxcontentwidth?: string;
|
|
6
7
|
}
|
|
7
8
|
declare global {
|
|
8
9
|
namespace JSX {
|
|
@@ -17,6 +18,7 @@ interface Props {
|
|
|
17
18
|
minHeight?: string;
|
|
18
19
|
testId?: string;
|
|
19
20
|
children?: React.ReactNode;
|
|
21
|
+
maxContentWidth?: string;
|
|
20
22
|
}
|
|
21
23
|
export declare const GoAHeroBanner: FC<Props>;
|
|
22
24
|
export default GoAHeroBanner;
|
|
@@ -11,12 +11,14 @@ interface WebComponentProps {
|
|
|
11
11
|
type: ServiceLevel;
|
|
12
12
|
version?: string;
|
|
13
13
|
feedbackurl?: string;
|
|
14
|
+
maxcontentwidth?: string;
|
|
14
15
|
}
|
|
15
16
|
export interface HeaderProps {
|
|
16
17
|
type: ServiceLevel;
|
|
17
18
|
version?: string;
|
|
18
19
|
feedbackUrl?: string;
|
|
19
20
|
testId?: string;
|
|
21
|
+
maxContentWidth?: string;
|
|
20
22
|
}
|
|
21
23
|
export declare const GoAMicrositeHeader: FC<HeaderProps>;
|
|
22
24
|
export default GoAMicrositeHeader;
|
|
@@ -3,6 +3,7 @@ export declare type NotificationType = "important" | "information" | "event" | "
|
|
|
3
3
|
interface WCProps {
|
|
4
4
|
ref: React.RefObject<HTMLElement>;
|
|
5
5
|
type: NotificationType;
|
|
6
|
+
maxcontentwidth?: string;
|
|
6
7
|
}
|
|
7
8
|
declare global {
|
|
8
9
|
namespace JSX {
|
|
@@ -13,9 +14,10 @@ declare global {
|
|
|
13
14
|
}
|
|
14
15
|
interface Props {
|
|
15
16
|
type?: NotificationType;
|
|
17
|
+
maxContentWidth?: string;
|
|
16
18
|
children?: React.ReactNode;
|
|
17
19
|
onDismiss?: () => void;
|
|
18
20
|
testId?: string;
|
|
19
21
|
}
|
|
20
|
-
export declare const GoANotification: ({ type, children, testId, onDismiss, }: Props) => JSX.Element;
|
|
22
|
+
export declare const GoANotification: ({ type, maxContentWidth, children, testId, onDismiss, }: Props) => JSX.Element;
|
|
21
23
|
export default GoANotification;
|
package/lib/popover/popover.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { FC, ReactNode } from "react";
|
|
2
|
-
|
|
2
|
+
import { Margins } from "../../common/styling";
|
|
3
|
+
interface WCProps extends Margins {
|
|
3
4
|
maxwidth?: string;
|
|
4
5
|
padded?: boolean;
|
|
5
6
|
}
|
|
@@ -10,7 +11,7 @@ declare global {
|
|
|
10
11
|
}
|
|
11
12
|
}
|
|
12
13
|
}
|
|
13
|
-
interface Props {
|
|
14
|
+
interface Props extends Margins {
|
|
14
15
|
target?: ReactNode;
|
|
15
16
|
testId?: string;
|
|
16
17
|
maxWidth?: string;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
|
+
interface WCProps {
|
|
3
|
+
leftcolumnwidth?: string;
|
|
4
|
+
maxcontentwidth?: string;
|
|
5
|
+
rightcolumnwidth?: string;
|
|
6
|
+
}
|
|
7
|
+
declare global {
|
|
8
|
+
namespace JSX {
|
|
9
|
+
interface IntrinsicElements {
|
|
10
|
+
"goa-three-column-layout": WCProps & React.HTMLAttributes<HTMLElement>;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
interface Props {
|
|
15
|
+
leftColumnWidth?: string;
|
|
16
|
+
rightColumnWidth?: string;
|
|
17
|
+
maxContentWidth?: string;
|
|
18
|
+
header: ReactNode;
|
|
19
|
+
footer: ReactNode;
|
|
20
|
+
nav: ReactNode;
|
|
21
|
+
sidebar: ReactNode;
|
|
22
|
+
children: ReactNode;
|
|
23
|
+
}
|
|
24
|
+
export declare function GoAThreeColumnLayout(props: Props): JSX.Element;
|
|
25
|
+
export default GoAThreeColumnLayout;
|