@abgov/react-components 4.8.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 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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abgov/react-components",
3
- "version": "4.8.0",
3
+ "version": "4.9.0",
4
4
  "description": "Government of Alberta - UI components for React",
5
5
  "bugs": {
6
6
  "url": "https://github.com/GovAlta/ui-components/issues"