@abgov/react-components 4.0.0-alpha.9 → 4.0.0-alpha.90
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/README.md +16 -44
- package/common/styling.d.ts +9 -0
- package/experimental/package.json +2 -1
- package/index.d.ts +36 -36
- package/lib/app-header/app-header.d.ts +7 -4
- package/lib/badge/badge.d.ts +21 -9
- package/lib/block/block.d.ts +21 -0
- package/lib/button/button.d.ts +12 -14
- package/lib/button-group/button-group.d.ts +12 -8
- package/lib/callout/callout.d.ts +9 -8
- package/lib/card/card-actions.d.ts +2 -5
- package/lib/card/card-content.d.ts +2 -2
- package/lib/card/card-group.d.ts +2 -5
- package/lib/card/card-image.d.ts +2 -2
- package/lib/card/card.d.ts +9 -6
- package/lib/card/index.d.ts +5 -5
- package/lib/checkbox/checkbox.d.ts +8 -6
- package/lib/chip/chip.d.ts +9 -5
- package/lib/circular-progress/circular-progress.d.ts +3 -6
- package/lib/container/container.d.ts +15 -11
- package/lib/divider/divider.d.ts +11 -0
- package/lib/dropdown/dropdown-option.d.ts +1 -1
- package/lib/dropdown/dropdown.d.ts +15 -10
- package/lib/footer/footer.d.ts +17 -0
- package/lib/footer-meta-section/footer-meta-section.d.ts +13 -0
- package/lib/footer-nav-section/footer-nav-section.d.ts +19 -0
- package/lib/form/form-item.d.ts +9 -6
- package/lib/form/index.d.ts +1 -1
- package/lib/grid/grid.d.ts +20 -0
- package/lib/hero-banner/hero-banner-actions.d.ts +5 -3
- package/lib/hero-banner/hero-banner.d.ts +5 -4
- package/lib/icon/icon.d.ts +38 -0
- package/lib/icon-button/icon-button.d.ts +30 -0
- package/lib/input/input.d.ts +55 -38
- package/lib/microsite-header/microsite-header.d.ts +5 -5
- package/lib/modal/modal.d.ts +10 -4
- package/lib/notification/notification.d.ts +4 -4
- package/lib/one-column-layout/one-column-layout.d.ts +13 -0
- package/lib/page-block/page-block.d.ts +10 -3
- package/lib/radio-group/radio-group.d.ts +8 -6
- package/lib/radio-group/radio.d.ts +3 -2
- package/lib/skeleton/skeleton.d.ts +13 -7
- package/lib/spacer/spacer.d.ts +19 -0
- package/lib/spinner/spinner.d.ts +3 -3
- package/lib/textarea/textarea.d.ts +7 -4
- package/lib/two-column-layout/two-column-layout.d.ts +22 -0
- package/package.json +6 -6
- package/react-components.esm.js +16430 -215
- package/react-components.umd.js +17180 -922
- package/lib/app-footer/app-footer.d.ts +0 -26
- package/lib/app-footer/meta-link.d.ts +0 -20
- package/lib/app-footer/navigation-link.d.ts +0 -22
- package/lib/flex/index.d.ts +0 -1
- package/lib/flex/row.d.ts +0 -16
- package/lib/icons/icon-button.d.ts +0 -27
- package/lib/icons/icon.d.ts +0 -37
- package/lib/icons/index.d.ts +0 -2
package/README.md
CHANGED
|
@@ -2,58 +2,30 @@
|
|
|
2
2
|
|
|
3
3
|
This library contains react components from the Government of Alberta.
|
|
4
4
|
|
|
5
|
-
Create react app
|
|
6
|
-
```bash
|
|
7
|
-
npm init vite@latest
|
|
8
|
-
```
|
|
9
|
-
|
|
10
5
|
Add Dependencies
|
|
6
|
+
|
|
11
7
|
```bash
|
|
12
|
-
npm i
|
|
13
|
-
npm i @abgov/
|
|
14
|
-
npm i @abgov/styles
|
|
8
|
+
npm i @abgov/react-components@alpha
|
|
9
|
+
npm i @abgov/web-components@alpha
|
|
10
|
+
npm i @abgov/styles@alpha
|
|
15
11
|
```
|
|
16
12
|
|
|
17
13
|
Link ionicons in app/index.html
|
|
18
|
-
|
|
19
|
-
<!DOCTYPE html>
|
|
20
|
-
<html lang="en">
|
|
21
|
-
<head>
|
|
22
|
-
<meta charset="UTF-8" />
|
|
23
|
-
<link rel="icon" type="image/svg+xml" href="/src/favicon.svg" />
|
|
24
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
25
|
-
<title>Vite App</title>
|
|
26
|
-
<!-- Ionicons -->
|
|
27
|
-
<script type="module" src="https://unpkg.com/ionicons@5.5.2/dist/ionicons/ionicons.esm.js"></script>
|
|
28
|
-
<script nomodule src="https://unpkg.com/ionicons@5.5.2/dist/ionicons/ionicons.js"></script>
|
|
29
|
-
<!-- -->
|
|
30
|
-
</head>
|
|
31
|
-
<body>
|
|
32
|
-
<div id="root"></div>
|
|
33
|
-
<script type="module" src="/src/main.tsx"></script>
|
|
34
|
-
</body>
|
|
35
|
-
</html>
|
|
36
|
-
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
```typescript
|
|
40
|
-
// App.tsx
|
|
41
|
-
import './App.css'
|
|
42
|
-
|
|
43
|
-
import { GoABadge } from '@abgov/react-components';
|
|
44
|
-
|
|
45
|
-
function App() {
|
|
46
|
-
return (
|
|
47
|
-
<GoABadge type="information" content="Some info" icon={true} />
|
|
48
|
-
)
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export default App
|
|
52
|
-
|
|
14
|
+
Add the following to the head element
|
|
53
15
|
|
|
16
|
+
```html
|
|
17
|
+
<script
|
|
18
|
+
type="module"
|
|
19
|
+
src="https://unpkg.com/ionicons@5.5.2/dist/ionicons/ionicons.esm.js"
|
|
20
|
+
></script>
|
|
21
|
+
<script
|
|
22
|
+
nomodule
|
|
23
|
+
src="https://unpkg.com/ionicons@5.5.2/dist/ionicons/ionicons.js"
|
|
24
|
+
></script>
|
|
54
25
|
```
|
|
55
26
|
|
|
56
27
|
Import the styles in the `src/index.css` file
|
|
28
|
+
|
|
57
29
|
```css
|
|
58
|
-
@import
|
|
30
|
+
@import "@abgov/styles/styles.esm.css";
|
|
59
31
|
```
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare type Spacing = "none" | "3xs" | "2xs" | "xs" | "s" | "m" | "l" | "xl" | "2xl" | "3xl";
|
|
2
|
+
export interface Margins {
|
|
3
|
+
mt?: Spacing;
|
|
4
|
+
mr?: Spacing;
|
|
5
|
+
mb?: Spacing;
|
|
6
|
+
ml?: Spacing;
|
|
7
|
+
}
|
|
8
|
+
export declare type Direction = "row" | "column";
|
|
9
|
+
export declare type Alignment = "center" | "start" | "end";
|
package/index.d.ts
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
export
|
|
35
|
-
export
|
|
36
|
-
export
|
|
1
|
+
import "@abgov/web-components";
|
|
2
|
+
export type { GoAIconType } from "./lib/icon/icon";
|
|
3
|
+
export type { GoABadgeType } from "./lib/badge/badge";
|
|
4
|
+
export * from "./lib/app-header/app-header";
|
|
5
|
+
export * from "./lib/badge/badge";
|
|
6
|
+
export * from "./lib/block/block";
|
|
7
|
+
export * from "./lib/button-group/button-group";
|
|
8
|
+
export * from "./lib/button/button";
|
|
9
|
+
export * from "./lib/callout/callout";
|
|
10
|
+
export * from "./lib/checkbox/checkbox";
|
|
11
|
+
export * from "./lib/chip/chip";
|
|
12
|
+
export * from "./lib/circular-progress/circular-progress";
|
|
13
|
+
export * from "./lib/container/container";
|
|
14
|
+
export * from "./lib/divider/divider";
|
|
15
|
+
export * from "./lib/dropdown/dropdown";
|
|
16
|
+
export * from "./lib/grid/grid";
|
|
17
|
+
export * from "./lib/footer-meta-section/footer-meta-section";
|
|
18
|
+
export * from "./lib/footer-nav-section/footer-nav-section";
|
|
19
|
+
export * from "./lib/footer/footer";
|
|
20
|
+
export * from "./lib/form";
|
|
21
|
+
export * from "./lib/hero-banner/hero-banner";
|
|
22
|
+
export * from "./lib/hero-banner/hero-banner-actions";
|
|
23
|
+
export * from "./lib/icon/icon";
|
|
24
|
+
export * from "./lib/icon-button/icon-button";
|
|
25
|
+
export * from "./lib/input/input";
|
|
26
|
+
export * from "./lib/microsite-header/microsite-header";
|
|
27
|
+
export * from "./lib/modal/modal";
|
|
28
|
+
export * from "./lib/notification/notification";
|
|
29
|
+
export * from "./lib/page-block/page-block";
|
|
30
|
+
export * from "./lib/one-column-layout/one-column-layout";
|
|
31
|
+
export * from "./lib/radio-group/radio-group";
|
|
32
|
+
export * from "./lib/skeleton/skeleton";
|
|
33
|
+
export * from "./lib/spacer/spacer";
|
|
34
|
+
export * from "./lib/spinner/spinner";
|
|
35
|
+
export * from "./lib/textarea/textarea";
|
|
36
|
+
export * from "./lib/two-column-layout/two-column-layout";
|
|
@@ -1,18 +1,21 @@
|
|
|
1
|
-
import React, { FC } from
|
|
1
|
+
import React, { FC } from "react";
|
|
2
2
|
interface WCProps {
|
|
3
|
-
|
|
3
|
+
heading?: string;
|
|
4
4
|
url?: string;
|
|
5
|
+
maxcontentwidth?: string;
|
|
5
6
|
}
|
|
6
7
|
declare global {
|
|
7
8
|
namespace JSX {
|
|
8
9
|
interface IntrinsicElements {
|
|
9
|
-
|
|
10
|
+
"goa-app-header": WCProps & React.HTMLAttributes<HTMLElement>;
|
|
10
11
|
}
|
|
11
12
|
}
|
|
12
13
|
}
|
|
13
14
|
interface Props {
|
|
14
|
-
|
|
15
|
+
heading?: string;
|
|
15
16
|
url?: string;
|
|
17
|
+
maxContentWidth?: string;
|
|
18
|
+
children?: React.ReactNode;
|
|
16
19
|
}
|
|
17
20
|
export declare const GoAAppHeader: FC<Props>;
|
|
18
21
|
export default GoAAppHeader;
|
package/lib/badge/badge.d.ts
CHANGED
|
@@ -1,28 +1,40 @@
|
|
|
1
|
-
import React, { FC } from
|
|
2
|
-
import {
|
|
3
|
-
export declare type GoABadgeType =
|
|
4
|
-
interface GoABadgeProps {
|
|
1
|
+
import React, { FC } from "react";
|
|
2
|
+
import { Margins } from "../../common/styling";
|
|
3
|
+
export declare type GoABadgeType = "information" | "success" | "important" | "emergency" | "dark" | "midtone" | "light";
|
|
4
|
+
interface GoABadgeProps extends Margins {
|
|
5
5
|
type: GoABadgeType;
|
|
6
|
-
icon?:
|
|
6
|
+
icon?: boolean;
|
|
7
7
|
content?: string;
|
|
8
8
|
testId?: string;
|
|
9
9
|
}
|
|
10
|
-
interface WCProps {
|
|
10
|
+
interface WCProps extends Margins {
|
|
11
11
|
type: GoABadgeType;
|
|
12
|
-
icon?:
|
|
12
|
+
icon?: boolean;
|
|
13
13
|
content?: string;
|
|
14
14
|
testid?: string;
|
|
15
15
|
}
|
|
16
16
|
declare global {
|
|
17
17
|
namespace JSX {
|
|
18
18
|
interface IntrinsicElements {
|
|
19
|
-
|
|
19
|
+
"goa-badge": WCProps & React.HTMLAttributes<HTMLElement>;
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
export declare const GoABadge: FC<GoABadgeProps>;
|
|
24
|
+
/**
|
|
25
|
+
* @deprecated
|
|
26
|
+
*/
|
|
24
27
|
export declare const GoAInfoBadge: FC<GoABadgeProps>;
|
|
28
|
+
/**
|
|
29
|
+
* @deprecated
|
|
30
|
+
*/
|
|
25
31
|
export declare const GoASuccessBadge: FC<GoABadgeProps>;
|
|
26
|
-
|
|
32
|
+
/**
|
|
33
|
+
* @deprecated
|
|
34
|
+
*/
|
|
35
|
+
export declare const GoAImportantBadge: FC<GoABadgeProps>;
|
|
36
|
+
/**
|
|
37
|
+
* @deprecated
|
|
38
|
+
*/
|
|
27
39
|
export declare const GoAEmergencyBadge: FC<GoABadgeProps>;
|
|
28
40
|
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
|
+
import { Alignment, Direction, Margins, Spacing } from "../../common/styling";
|
|
3
|
+
export interface WCProps extends Margins {
|
|
4
|
+
gap?: Spacing;
|
|
5
|
+
direction?: Direction;
|
|
6
|
+
alignment?: Alignment;
|
|
7
|
+
}
|
|
8
|
+
declare global {
|
|
9
|
+
namespace JSX {
|
|
10
|
+
interface IntrinsicElements {
|
|
11
|
+
"goa-block": WCProps & React.HTMLAttributes<HTMLElement>;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
export interface BlockProps extends Margins {
|
|
16
|
+
gap?: Spacing;
|
|
17
|
+
direction?: Direction;
|
|
18
|
+
alignment?: Alignment;
|
|
19
|
+
children?: ReactNode;
|
|
20
|
+
}
|
|
21
|
+
export declare function GoABlock(props: BlockProps): JSX.Element;
|
package/lib/button/button.d.ts
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import React, { FC, ReactNode } from
|
|
2
|
-
import
|
|
3
|
-
import { GoAIconType } from
|
|
4
|
-
export declare type ButtonType =
|
|
5
|
-
export declare type ButtonSize =
|
|
6
|
-
export declare type ButtonVariant =
|
|
7
|
-
interface WCProps {
|
|
1
|
+
import React, { FC, ReactNode } from "react";
|
|
2
|
+
import { Margins } from "../../common/styling";
|
|
3
|
+
import { GoAIconType } from "../icon/icon";
|
|
4
|
+
export declare type ButtonType = "primary" | "submit" | "secondary" | "tertiary" | "start";
|
|
5
|
+
export declare type ButtonSize = "compact" | "normal";
|
|
6
|
+
export declare type ButtonVariant = "normal" | "destructive";
|
|
7
|
+
interface WCProps extends Margins {
|
|
8
8
|
type?: ButtonType;
|
|
9
9
|
size?: ButtonSize;
|
|
10
10
|
variant?: ButtonVariant;
|
|
11
11
|
disabled?: boolean;
|
|
12
|
-
title?: string;
|
|
13
12
|
leadingicon?: string;
|
|
14
13
|
trailingicon?: string;
|
|
15
14
|
ref: React.RefObject<HTMLElement>;
|
|
@@ -17,20 +16,19 @@ interface WCProps {
|
|
|
17
16
|
declare global {
|
|
18
17
|
namespace JSX {
|
|
19
18
|
interface IntrinsicElements {
|
|
20
|
-
|
|
19
|
+
"goa-button": WCProps & React.HTMLAttributes<HTMLElement>;
|
|
21
20
|
}
|
|
22
21
|
}
|
|
23
22
|
}
|
|
24
|
-
|
|
23
|
+
interface ButtonProps extends Margins {
|
|
25
24
|
type?: ButtonType;
|
|
26
|
-
title?: string;
|
|
27
25
|
size?: ButtonSize;
|
|
28
26
|
variant?: ButtonVariant;
|
|
29
27
|
disabled?: boolean;
|
|
30
28
|
leadingIcon?: GoAIconType;
|
|
31
29
|
trailingIcon?: GoAIconType;
|
|
32
|
-
onClick
|
|
33
|
-
children
|
|
34
|
-
}
|
|
30
|
+
onClick?: () => void;
|
|
31
|
+
children?: ReactNode;
|
|
32
|
+
}
|
|
35
33
|
export declare const GoAButton: FC<ButtonProps>;
|
|
36
34
|
export default GoAButton;
|
|
@@ -1,18 +1,22 @@
|
|
|
1
|
-
import React, { FC } from
|
|
2
|
-
import
|
|
3
|
-
declare type Alignment = "start" | "end";
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import React, { FC } from "react";
|
|
2
|
+
import { Margins } from "../../common/styling";
|
|
3
|
+
declare type Alignment = "start" | "end" | "center";
|
|
4
|
+
export declare type Gap = "relaxed" | "compact";
|
|
5
|
+
interface WCProps extends Margins {
|
|
6
|
+
alignment: Alignment;
|
|
7
|
+
gap?: Gap;
|
|
6
8
|
}
|
|
7
9
|
declare global {
|
|
8
10
|
namespace JSX {
|
|
9
11
|
interface IntrinsicElements {
|
|
10
|
-
|
|
12
|
+
"goa-button-group": WCProps & React.HTMLAttributes<HTMLElement>;
|
|
11
13
|
}
|
|
12
14
|
}
|
|
13
15
|
}
|
|
14
|
-
|
|
16
|
+
interface ButtonGroupProps extends Margins {
|
|
15
17
|
alignment: Alignment;
|
|
16
|
-
|
|
18
|
+
gap?: Gap;
|
|
19
|
+
children?: React.ReactNode;
|
|
20
|
+
}
|
|
17
21
|
export declare const GoAButtonGroup: FC<ButtonGroupProps>;
|
|
18
22
|
export default GoAButtonGroup;
|
package/lib/callout/callout.d.ts
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Margins } from "../../common/styling";
|
|
3
|
+
declare type CalloutType = "important" | "information" | "event" | "success" | "emergency";
|
|
4
|
+
interface WCProps extends Margins {
|
|
5
|
+
heading?: string;
|
|
5
6
|
type?: CalloutType;
|
|
6
7
|
}
|
|
7
8
|
declare global {
|
|
8
9
|
namespace JSX {
|
|
9
10
|
interface IntrinsicElements {
|
|
10
|
-
|
|
11
|
+
"goa-callout": WCProps & React.HTMLAttributes<HTMLElement>;
|
|
11
12
|
}
|
|
12
13
|
}
|
|
13
14
|
}
|
|
14
|
-
export interface CalloutProps {
|
|
15
|
-
|
|
15
|
+
export interface CalloutProps extends Margins {
|
|
16
|
+
heading?: string;
|
|
16
17
|
type?: CalloutType;
|
|
17
18
|
children?: React.ReactNode;
|
|
18
19
|
}
|
|
19
|
-
export declare const GoACallout: ({
|
|
20
|
+
export declare const GoACallout: ({ heading, type, children, mt, mr, mb, ml, }: CalloutProps) => JSX.Element;
|
|
20
21
|
export default GoACallout;
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
interface WCProps {
|
|
3
|
-
children: React.ReactNode;
|
|
4
|
-
}
|
|
1
|
+
import { FC } from "react";
|
|
5
2
|
declare global {
|
|
6
3
|
namespace JSX {
|
|
7
4
|
interface IntrinsicElements {
|
|
8
|
-
|
|
5
|
+
"goa-card-actions": React.HTMLAttributes<HTMLElement>;
|
|
9
6
|
}
|
|
10
7
|
}
|
|
11
8
|
}
|
package/lib/card/card-group.d.ts
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
interface WCProps {
|
|
3
|
-
children: React.ReactNode;
|
|
4
|
-
}
|
|
1
|
+
import { FC } from "react";
|
|
5
2
|
declare global {
|
|
6
3
|
namespace JSX {
|
|
7
4
|
interface IntrinsicElements {
|
|
8
|
-
|
|
5
|
+
"goa-card-group": React.HTMLAttributes<HTMLElement>;
|
|
9
6
|
}
|
|
10
7
|
}
|
|
11
8
|
}
|
package/lib/card/card-image.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { FC } from "react";
|
|
2
2
|
interface WCProps {
|
|
3
3
|
src: string;
|
|
4
4
|
height: string;
|
|
@@ -6,7 +6,7 @@ interface WCProps {
|
|
|
6
6
|
declare global {
|
|
7
7
|
namespace JSX {
|
|
8
8
|
interface IntrinsicElements {
|
|
9
|
-
|
|
9
|
+
"goa-card-image": WCProps & React.HTMLAttributes<HTMLElement>;
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
}
|
package/lib/card/card.d.ts
CHANGED
|
@@ -1,17 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
import { Margins } from "../../common/styling";
|
|
3
|
+
interface WCProps extends Margins {
|
|
4
|
+
elevation?: number;
|
|
5
|
+
width?: string;
|
|
4
6
|
children: React.ReactNode;
|
|
5
7
|
}
|
|
6
8
|
declare global {
|
|
7
9
|
namespace JSX {
|
|
8
10
|
interface IntrinsicElements {
|
|
9
|
-
|
|
11
|
+
"goa-card": WCProps & React.HTMLAttributes<HTMLElement>;
|
|
10
12
|
}
|
|
11
13
|
}
|
|
12
14
|
}
|
|
13
|
-
interface Props {
|
|
14
|
-
elevation
|
|
15
|
+
interface Props extends Margins {
|
|
16
|
+
elevation?: number;
|
|
17
|
+
width?: string;
|
|
15
18
|
children?: React.ReactNode;
|
|
16
19
|
}
|
|
17
20
|
export declare const GoACard: FC<Props>;
|
package/lib/card/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
1
|
+
export * from "./card-content";
|
|
2
|
+
export * from "./card-image";
|
|
3
|
+
export * from "./card-actions";
|
|
4
|
+
export * from "./card-group";
|
|
5
|
+
export * from "./card";
|
|
@@ -1,29 +1,31 @@
|
|
|
1
|
-
import React, { FC } from
|
|
1
|
+
import React, { FC } from "react";
|
|
2
|
+
import { Margins } from "../../common/styling";
|
|
2
3
|
declare global {
|
|
3
4
|
namespace JSX {
|
|
4
5
|
interface IntrinsicElements {
|
|
5
|
-
|
|
6
|
+
"goa-checkbox": CheckboxProps & React.HTMLAttributes<HTMLElement>;
|
|
6
7
|
}
|
|
7
8
|
}
|
|
8
9
|
}
|
|
9
|
-
interface CheckboxProps {
|
|
10
|
+
interface CheckboxProps extends Margins {
|
|
10
11
|
ref: React.RefObject<HTMLElement>;
|
|
11
12
|
id?: string;
|
|
12
13
|
name: string;
|
|
13
|
-
checked
|
|
14
|
+
checked: boolean;
|
|
14
15
|
disabled?: boolean;
|
|
15
16
|
error?: boolean;
|
|
16
17
|
text?: string;
|
|
17
18
|
value?: string | number | boolean;
|
|
18
19
|
}
|
|
19
|
-
export interface Props {
|
|
20
|
+
export interface Props extends Margins {
|
|
20
21
|
id?: string;
|
|
21
22
|
name: string;
|
|
22
|
-
checked
|
|
23
|
+
checked: boolean;
|
|
23
24
|
disabled?: boolean;
|
|
24
25
|
error?: boolean;
|
|
25
26
|
text?: string;
|
|
26
27
|
value?: string | number | boolean;
|
|
28
|
+
children?: React.ReactNode;
|
|
27
29
|
testId?: string;
|
|
28
30
|
onChange?: (name: string, checked: boolean, value: string) => void;
|
|
29
31
|
}
|
package/lib/chip/chip.d.ts
CHANGED
|
@@ -1,24 +1,28 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Margins } from "../../common/styling";
|
|
3
|
+
declare type ChipVariant = "filter";
|
|
4
|
+
interface WCProps extends Margins {
|
|
3
5
|
ref: React.RefObject<HTMLElement>;
|
|
4
6
|
leadingicon: string;
|
|
5
7
|
error: boolean;
|
|
6
8
|
deletable: boolean;
|
|
7
9
|
content: string;
|
|
10
|
+
variant?: string;
|
|
8
11
|
}
|
|
9
12
|
declare global {
|
|
10
13
|
namespace JSX {
|
|
11
14
|
interface IntrinsicElements {
|
|
12
|
-
|
|
15
|
+
"goa-chip": WCProps & React.HTMLAttributes<HTMLElement>;
|
|
13
16
|
}
|
|
14
17
|
}
|
|
15
18
|
}
|
|
16
|
-
|
|
19
|
+
interface Props extends Margins {
|
|
17
20
|
onClick?: () => void;
|
|
18
21
|
deletable?: boolean;
|
|
19
22
|
leadingIcon?: string;
|
|
20
23
|
error?: boolean;
|
|
21
24
|
content: string;
|
|
25
|
+
variant?: ChipVariant;
|
|
22
26
|
}
|
|
23
|
-
export declare const GoAChip: ({ leadingIcon, deletable, error, content, onClick }: Props) => JSX.Element;
|
|
27
|
+
export declare const GoAChip: ({ leadingIcon, deletable, error, variant, content, onClick, mt, mr, mb, ml, }: Props) => JSX.Element;
|
|
24
28
|
export default GoAChip;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
export declare type CircularProgressType = 'infinite' | 'progress';
|
|
1
|
+
import React from "react";
|
|
3
2
|
export declare type CircularProgressVariant = "fullscreen" | "inline";
|
|
4
3
|
export declare type CircularProgressSize = "small" | "large";
|
|
5
4
|
interface WCProps {
|
|
6
|
-
type?: CircularProgressType;
|
|
7
5
|
variant?: CircularProgressVariant;
|
|
8
6
|
size?: CircularProgressSize;
|
|
9
7
|
message?: string;
|
|
@@ -13,17 +11,16 @@ interface WCProps {
|
|
|
13
11
|
declare global {
|
|
14
12
|
namespace JSX {
|
|
15
13
|
interface IntrinsicElements {
|
|
16
|
-
|
|
14
|
+
"goa-circular-progress": WCProps & React.HTMLAttributes<HTMLElement>;
|
|
17
15
|
}
|
|
18
16
|
}
|
|
19
17
|
}
|
|
20
18
|
export interface CircularProgressProps {
|
|
21
|
-
type?: CircularProgressType;
|
|
22
19
|
variant?: CircularProgressVariant;
|
|
23
20
|
size?: CircularProgressSize;
|
|
24
21
|
message?: string;
|
|
25
22
|
visible?: boolean;
|
|
26
23
|
progress?: number;
|
|
27
24
|
}
|
|
28
|
-
export declare const GoACircularProgress: ({
|
|
25
|
+
export declare const GoACircularProgress: ({ visible, message, progress, variant, size, }: CircularProgressProps) => JSX.Element;
|
|
29
26
|
export default GoACircularProgress;
|
|
@@ -1,23 +1,27 @@
|
|
|
1
|
-
import React, { FC, ReactNode } from
|
|
2
|
-
|
|
3
|
-
declare type
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import React, { FC, ReactNode } from "react";
|
|
2
|
+
import { Margins } from "../../common/styling";
|
|
3
|
+
declare type ContainerType = "interactive" | "non-interactive" | "info" | "error" | "success" | "important";
|
|
4
|
+
declare type Accent = "thick" | "thin" | "filled";
|
|
5
|
+
declare type ContainerPadding = "relaxed" | "compact";
|
|
6
|
+
interface WCProps extends Margins {
|
|
7
|
+
type?: ContainerType;
|
|
8
|
+
accent?: Accent;
|
|
9
|
+
padding?: ContainerPadding;
|
|
7
10
|
}
|
|
8
11
|
declare global {
|
|
9
12
|
namespace JSX {
|
|
10
13
|
interface IntrinsicElements {
|
|
11
|
-
|
|
14
|
+
"goa-container": WCProps & React.HTMLAttributes<HTMLElement>;
|
|
12
15
|
}
|
|
13
16
|
}
|
|
14
17
|
}
|
|
15
|
-
interface Props {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
+
interface Props extends Margins {
|
|
19
|
+
accent?: Accent;
|
|
20
|
+
type?: ContainerType;
|
|
18
21
|
title?: ReactNode;
|
|
22
|
+
padding?: ContainerPadding;
|
|
19
23
|
actions?: ReactNode;
|
|
20
|
-
children
|
|
24
|
+
children?: ReactNode;
|
|
21
25
|
}
|
|
22
26
|
export declare const GoAContainer: FC<Props>;
|
|
23
27
|
export default GoAContainer;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Margins } from "../../common/styling";
|
|
3
|
+
declare global {
|
|
4
|
+
namespace JSX {
|
|
5
|
+
interface IntrinsicElements {
|
|
6
|
+
"goa-divider": Margins & React.HTMLAttributes<HTMLElement>;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export declare function GoADivider(props: Margins): JSX.Element;
|
|
11
|
+
export default GoADivider;
|