@abgov/react-components 4.17.0-alpha.2 → 4.17.0-alpha.20
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/common/styling.d.ts +12 -9
- package/index.d.ts +56 -59
- package/index.js +23481 -0
- package/index.js.map +1 -0
- package/index.mjs +23481 -0
- package/index.mjs.map +1 -0
- package/lib/accordion/accordion.d.ts +28 -28
- package/lib/app-header/app-header.d.ts +23 -22
- package/lib/app-header-menu/app-header-menu.d.ts +20 -20
- package/lib/badge/badge.d.ts +40 -41
- package/lib/block/block.d.ts +23 -22
- package/lib/button/button.d.ts +38 -35
- package/lib/button-group/button-group.d.ts +23 -23
- package/lib/calendar/calendar.d.ts +24 -25
- package/lib/callout/callout.d.ts +25 -25
- package/lib/checkbox/checkbox.d.ts +37 -37
- package/lib/chip/chip.d.ts +28 -29
- package/lib/circular-progress/circular-progress.d.ts +28 -27
- package/lib/container/container.d.ts +29 -29
- package/lib/date-picker/date-picker.d.ts +24 -25
- package/lib/details/details.d.ts +21 -20
- package/lib/divider/divider.d.ts +13 -13
- package/lib/dropdown/dropdown-item.d.ts +23 -24
- package/lib/dropdown/dropdown.d.ts +49 -50
- package/lib/file-upload-card/file-upload-card.d.ts +26 -27
- package/lib/file-upload-input/file-upload-input.d.ts +22 -23
- package/lib/footer/footer.d.ts +19 -18
- package/lib/footer-meta-section/footer-meta-section.d.ts +14 -13
- package/lib/footer-nav-section/footer-nav-section.d.ts +20 -20
- package/lib/{form → form-item}/form-item.d.ts +30 -30
- package/lib/form-step/form-step.d.ts +19 -19
- package/lib/form-stepper/form-stepper.d.ts +22 -21
- package/lib/grid/grid.d.ts +20 -21
- package/lib/hero-banner/hero-banner-actions.d.ts +5 -6
- package/lib/hero-banner/hero-banner.d.ts +27 -28
- package/lib/icon/icon.d.ts +41 -39
- package/lib/icon-button/icon-button.d.ts +31 -31
- package/lib/input/input.d.ts +112 -115
- package/lib/microsite-header/microsite-header.d.ts +30 -28
- package/lib/modal/modal.d.ts +36 -34
- package/lib/notification/notification.d.ts +27 -26
- package/lib/one-column-layout/one-column-layout.d.ts +14 -13
- package/lib/page-block/page-block.d.ts +19 -17
- package/lib/pages/pages.d.ts +18 -18
- package/lib/pagination/pagination.d.ts +26 -26
- package/lib/popover/popover.d.ts +27 -27
- package/lib/radio-group/radio-group.d.ts +32 -32
- package/lib/radio-group/radio.d.ts +29 -30
- package/lib/side-menu/side-menu.d.ts +14 -13
- package/lib/side-menu-group/side-menu-group.d.ts +17 -17
- package/lib/side-menu-heading/side-menu-heading.d.ts +19 -19
- package/lib/skeleton/skeleton.d.ts +27 -26
- package/lib/spacer/spacer.d.ts +20 -20
- package/lib/spinner/spinner.d.ts +25 -25
- package/lib/tab/tab.d.ts +17 -17
- package/lib/table/table-sort-header.d.ts +19 -20
- package/lib/table/table.d.ts +27 -25
- package/lib/tabs/tabs.d.ts +16 -17
- package/lib/textarea/textarea.d.ts +41 -39
- package/lib/three-column-layout/three-column-layout.d.ts +26 -26
- package/lib/tooltip/tooltip.d.ts +25 -23
- package/lib/two-column-layout/two-column-layout.d.ts +22 -22
- package/package.json +16 -11
- package/README.md +0 -34
- package/experimental/index.d.ts +0 -0
- package/experimental/package.json +0 -11
- package/experimental/react-components.esm.js +0 -1
- package/experimental/react-components.umd.js +0 -8
- package/lib/card/card-actions.d.ts +0 -13
- package/lib/card/card-content.d.ts +0 -13
- package/lib/card/card-group.d.ts +0 -13
- package/lib/card/card-image.d.ts +0 -18
- package/lib/card/card.d.ts +0 -22
- package/lib/card/index.d.ts +0 -5
- package/lib/form/index.d.ts +0 -1
- package/lib/form/validators.d.ts +0 -10
- package/react-components.esm.js +0 -3383
- package/react-components.umd.js +0 -3443
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import
|
|
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
|
|
15
|
-
leftColumnWidth?: string;
|
|
16
|
-
rightColumnWidth?: string;
|
|
17
|
-
maxContentWidth?: string;
|
|
18
|
-
header?: ReactNode;
|
|
19
|
-
footer?: ReactNode;
|
|
20
|
-
nav?: ReactNode;
|
|
21
|
-
sidebar?: ReactNode;
|
|
22
|
-
sideMenu?: ReactNode;
|
|
23
|
-
children: ReactNode;
|
|
24
|
-
}
|
|
25
|
-
export declare function GoAThreeColumnLayout(props:
|
|
26
|
-
export default GoAThreeColumnLayout;
|
|
1
|
+
import { 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
|
+
export interface GoAThreeColumnLayoutProps {
|
|
15
|
+
leftColumnWidth?: string;
|
|
16
|
+
rightColumnWidth?: string;
|
|
17
|
+
maxContentWidth?: string;
|
|
18
|
+
header?: ReactNode;
|
|
19
|
+
footer?: ReactNode;
|
|
20
|
+
nav?: ReactNode;
|
|
21
|
+
sidebar?: ReactNode;
|
|
22
|
+
sideMenu?: ReactNode;
|
|
23
|
+
children: ReactNode;
|
|
24
|
+
}
|
|
25
|
+
export declare function GoAThreeColumnLayout(props: GoAThreeColumnLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export default GoAThreeColumnLayout;
|
package/lib/tooltip/tooltip.d.ts
CHANGED
|
@@ -1,23 +1,25 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Margins } from "../../common/styling";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
import { Margins } from "../../common/styling";
|
|
3
|
+
export type GoATooltipPosition = "top" | "bottom" | "left" | "right";
|
|
4
|
+
export type GoATooltipHorizontalAlignment = "left" | "right" | "center";
|
|
5
|
+
interface WCProps extends Margins {
|
|
6
|
+
position?: GoATooltipPosition;
|
|
7
|
+
content?: string;
|
|
8
|
+
halign?: GoATooltipHorizontalAlignment;
|
|
9
|
+
}
|
|
10
|
+
declare global {
|
|
11
|
+
namespace JSX {
|
|
12
|
+
interface IntrinsicElements {
|
|
13
|
+
"goa-tooltip": WCProps & React.HTMLAttributes<HTMLElement>;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export interface GoATooltipProps extends Margins {
|
|
18
|
+
position?: GoATooltipPosition;
|
|
19
|
+
content?: string;
|
|
20
|
+
hAlign?: GoATooltipHorizontalAlignment;
|
|
21
|
+
testId?: string;
|
|
22
|
+
children?: ReactNode;
|
|
23
|
+
}
|
|
24
|
+
export declare function GoATooltip(props: GoATooltipProps): JSX.Element;
|
|
25
|
+
export default GoATooltip;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import
|
|
2
|
-
interface WCProps {
|
|
3
|
-
navcolumnwidth?: string;
|
|
4
|
-
maxcontentwidth?: string;
|
|
5
|
-
}
|
|
6
|
-
declare global {
|
|
7
|
-
namespace JSX {
|
|
8
|
-
interface IntrinsicElements {
|
|
9
|
-
"goa-two-column-layout": WCProps & React.HTMLAttributes<HTMLElement>;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
interface
|
|
14
|
-
navColumnWidth?: string;
|
|
15
|
-
maxContentWidth?: string;
|
|
16
|
-
header: ReactNode;
|
|
17
|
-
footer: ReactNode;
|
|
18
|
-
nav: ReactNode;
|
|
19
|
-
children: ReactNode;
|
|
20
|
-
}
|
|
21
|
-
export declare function GoATwoColumnLayout(props:
|
|
22
|
-
export default GoATwoColumnLayout;
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
interface WCProps {
|
|
3
|
+
navcolumnwidth?: string;
|
|
4
|
+
maxcontentwidth?: string;
|
|
5
|
+
}
|
|
6
|
+
declare global {
|
|
7
|
+
namespace JSX {
|
|
8
|
+
interface IntrinsicElements {
|
|
9
|
+
"goa-two-column-layout": WCProps & React.HTMLAttributes<HTMLElement>;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
export interface GoATwoColumnLayoutProps {
|
|
14
|
+
navColumnWidth?: string;
|
|
15
|
+
maxContentWidth?: string;
|
|
16
|
+
header: ReactNode;
|
|
17
|
+
footer: ReactNode;
|
|
18
|
+
nav: ReactNode;
|
|
19
|
+
children: ReactNode;
|
|
20
|
+
}
|
|
21
|
+
export declare function GoATwoColumnLayout(props: GoATwoColumnLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export default GoATwoColumnLayout;
|
package/package.json
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abgov/react-components",
|
|
3
|
-
"version": "4.17.0-alpha.
|
|
3
|
+
"version": "4.17.0-alpha.20",
|
|
4
4
|
"description": "Government of Alberta - UI components for React",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/GovAlta/ui-components/issues"
|
|
7
7
|
},
|
|
8
|
-
"license": "Apache-2.0",
|
|
9
8
|
"keywords": [
|
|
10
9
|
"GoA",
|
|
11
|
-
"
|
|
10
|
+
"ui-components",
|
|
12
11
|
"React"
|
|
13
12
|
],
|
|
14
13
|
"repository": {
|
|
@@ -16,14 +15,20 @@
|
|
|
16
15
|
"url": "https://github.com/GovAlta/ui-components.git",
|
|
17
16
|
"directory": "libs/react-components"
|
|
18
17
|
},
|
|
18
|
+
"license": "Apache-2.0",
|
|
19
|
+
"main": "./index.js",
|
|
20
|
+
"module": "./index.mjs",
|
|
21
|
+
"types": "./index.d.ts",
|
|
19
22
|
"peerDependencies": {
|
|
20
|
-
"react": "
|
|
21
|
-
"react
|
|
22
|
-
|
|
23
|
-
"dependencies": {
|
|
24
|
-
"date-fns": "^2.29.2"
|
|
23
|
+
"@types/react": "^17.0.0 || ^18.0.0",
|
|
24
|
+
"react": "^17.0.0 || ^18.0.0",
|
|
25
|
+
"react-dom": "^17.0.0 || ^18.0.0"
|
|
25
26
|
},
|
|
26
|
-
"
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
"exports": {
|
|
28
|
+
".": {
|
|
29
|
+
"import": "./index.mjs",
|
|
30
|
+
"require": "./index.js",
|
|
31
|
+
"types": "./index.d.ts"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
29
34
|
}
|
package/README.md
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
# React UI Components
|
|
2
|
-
|
|
3
|
-

|
|
4
|
-
|
|
5
|
-
This library contains react components from the Government of Alberta.
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
npm i @abgov/react-components
|
|
9
|
-
npm i @abgov/web-components
|
|
10
|
-
```
|
|
11
|
-
|
|
12
|
-
Link ionicons in app/index.html
|
|
13
|
-
Add the following to the head element
|
|
14
|
-
|
|
15
|
-
```html
|
|
16
|
-
<script
|
|
17
|
-
type="module"
|
|
18
|
-
src="https://unpkg.com/ionicons@5.5.2/dist/ionicons/ionicons.esm.js"
|
|
19
|
-
></script>
|
|
20
|
-
<script
|
|
21
|
-
nomodule
|
|
22
|
-
src="https://unpkg.com/ionicons@5.5.2/dist/ionicons/ionicons.js"
|
|
23
|
-
></script>
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
Import the web-component styles in the `src/index.css` file
|
|
27
|
-
|
|
28
|
-
```css
|
|
29
|
-
@import "@abgov/web-components/index.css";
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
---
|
|
33
|
-
|
|
34
|
-
[Visit Design System](https://ui-components.alberta.ca)
|
package/experimental/index.d.ts
DELETED
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { FC } from "react";
|
|
2
|
-
declare global {
|
|
3
|
-
namespace JSX {
|
|
4
|
-
interface IntrinsicElements {
|
|
5
|
-
"goa-card-actions": React.HTMLAttributes<HTMLElement>;
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
interface Props {
|
|
10
|
-
children?: React.ReactNode;
|
|
11
|
-
}
|
|
12
|
-
export declare const GoACardActions: FC<Props>;
|
|
13
|
-
export default GoACardActions;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { FC } from "react";
|
|
2
|
-
declare global {
|
|
3
|
-
namespace JSX {
|
|
4
|
-
interface IntrinsicElements {
|
|
5
|
-
"goa-card-content": React.HTMLAttributes<HTMLElement>;
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
interface Props {
|
|
10
|
-
children?: React.ReactNode;
|
|
11
|
-
}
|
|
12
|
-
export declare const GoACardContent: FC<Props>;
|
|
13
|
-
export default GoACardContent;
|
package/lib/card/card-group.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { FC } from "react";
|
|
2
|
-
declare global {
|
|
3
|
-
namespace JSX {
|
|
4
|
-
interface IntrinsicElements {
|
|
5
|
-
"goa-card-group": React.HTMLAttributes<HTMLElement>;
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
interface Props {
|
|
10
|
-
children?: React.ReactNode;
|
|
11
|
-
}
|
|
12
|
-
export declare const GoACardGroup: FC<Props>;
|
|
13
|
-
export default GoACardGroup;
|
package/lib/card/card-image.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { FC } from "react";
|
|
2
|
-
interface WCProps {
|
|
3
|
-
src: string;
|
|
4
|
-
height: string;
|
|
5
|
-
}
|
|
6
|
-
declare global {
|
|
7
|
-
namespace JSX {
|
|
8
|
-
interface IntrinsicElements {
|
|
9
|
-
"goa-card-image": WCProps & React.HTMLAttributes<HTMLElement>;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
interface Props {
|
|
14
|
-
src: string;
|
|
15
|
-
height: string;
|
|
16
|
-
}
|
|
17
|
-
export declare const GoACardImage: FC<Props>;
|
|
18
|
-
export default GoACardImage;
|
package/lib/card/card.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { FC } from "react";
|
|
2
|
-
import { Margins } from "../../common/styling";
|
|
3
|
-
interface WCProps extends Margins {
|
|
4
|
-
elevation?: number;
|
|
5
|
-
width?: string;
|
|
6
|
-
children: React.ReactNode;
|
|
7
|
-
}
|
|
8
|
-
declare global {
|
|
9
|
-
namespace JSX {
|
|
10
|
-
interface IntrinsicElements {
|
|
11
|
-
"goa-card": WCProps & React.HTMLAttributes<HTMLElement>;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
interface Props extends Margins {
|
|
16
|
-
elevation?: number;
|
|
17
|
-
width?: string;
|
|
18
|
-
testId?: string;
|
|
19
|
-
children?: React.ReactNode;
|
|
20
|
-
}
|
|
21
|
-
export declare const GoACard: FC<Props>;
|
|
22
|
-
export default GoACard;
|
package/lib/card/index.d.ts
DELETED
package/lib/form/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { GoAFormItem } from "./form-item";
|
package/lib/form/validators.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare type FormValidatorFn = (val: string) => [boolean, string];
|
|
2
|
-
export declare class FormValidator {
|
|
3
|
-
private items;
|
|
4
|
-
constructor();
|
|
5
|
-
add(fieldName: string, validators: FormValidatorFn[]): void;
|
|
6
|
-
validate(data: Record<string, string>): Record<string, string>;
|
|
7
|
-
}
|
|
8
|
-
export declare const requiredFieldValidator: FormValidatorFn;
|
|
9
|
-
export declare const emailFormatValidator: FormValidatorFn;
|
|
10
|
-
export declare const phoneNumberFormatValidator: FormValidatorFn;
|