@abgov/react-components 4.7.0 → 4.9.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 +2 -0
- package/lib/container/container.d.ts +1 -0
- 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/icon-button/icon-button.d.ts +3 -3
- package/package.json +1 -1
- package/react-components.esm.js +2753 -1005
- package/react-components.umd.js +2751 -999
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";
|
|
@@ -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;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React, { FC } from "react";
|
|
2
2
|
import { Margins } from "../../common/styling";
|
|
3
3
|
import { IconSize, GoAIconType } from "../icon/icon";
|
|
4
|
-
declare type
|
|
4
|
+
export declare type IconButtonVariant = "color" | "nocolor" | "dark" | "destructive";
|
|
5
5
|
interface WCProps extends Margins {
|
|
6
6
|
ref: React.RefObject<HTMLElement>;
|
|
7
7
|
icon: GoAIconType;
|
|
8
8
|
size?: IconSize;
|
|
9
|
-
variant?:
|
|
9
|
+
variant?: IconButtonVariant;
|
|
10
10
|
title?: string;
|
|
11
11
|
disabled?: boolean;
|
|
12
12
|
}
|
|
@@ -20,7 +20,7 @@ declare global {
|
|
|
20
20
|
interface Props extends Margins {
|
|
21
21
|
icon: GoAIconType;
|
|
22
22
|
size?: IconSize;
|
|
23
|
-
variant?:
|
|
23
|
+
variant?: IconButtonVariant;
|
|
24
24
|
title?: string;
|
|
25
25
|
disabled?: boolean;
|
|
26
26
|
children?: React.ReactNode;
|