@abgov/react-components 3.3.2-beta.3 → 3.4.0-alpha.4
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 +7 -102
- package/experimental/index.d.ts +0 -0
- package/experimental/package.json +1 -1
- package/experimental/react-components.esm.js +0 -1962
- package/experimental/react-components.umd.js +5 -1980
- package/index.d.ts +29 -14
- package/lib/app-header/app-header.d.ts +18 -0
- package/lib/badge/badge.d.ts +29 -0
- package/lib/button/button.d.ts +27 -35
- package/lib/button-group/button-group.d.ts +18 -0
- package/lib/callout/callout.d.ts +14 -23
- package/lib/card/card-actions.d.ts +16 -0
- package/lib/card/card-content.d.ts +13 -0
- package/lib/card/card-group.d.ts +16 -0
- package/lib/card/card-image.d.ts +18 -0
- package/lib/card/card.d.ts +18 -0
- package/lib/card/index.d.ts +5 -0
- package/lib/checkbox/checkbox.d.ts +26 -35
- package/lib/container/container.d.ts +23 -0
- package/lib/dropdown/dropdown-option.d.ts +21 -0
- package/lib/dropdown/dropdown.d.ts +35 -0
- package/lib/flex/index.d.ts +1 -0
- package/lib/flex/row.d.ts +8 -0
- package/lib/form/form-item.d.ts +24 -0
- package/lib/form/index.d.ts +1 -0
- package/lib/form/validators.d.ts +10 -0
- package/lib/hero-banner/hero-banner-actions.d.ts +4 -0
- package/lib/hero-banner/hero-banner-content.d.ts +4 -0
- package/lib/hero-banner/hero-banner.d.ts +18 -0
- package/lib/icons/icon-button.d.ts +27 -0
- package/lib/icons/icon.d.ts +37 -0
- package/lib/icons/index.d.ts +2 -0
- package/lib/input/input.d.ts +70 -0
- package/lib/modal/modal.d.ts +23 -0
- package/lib/notification/notification.d.ts +14 -35
- package/lib/page-loader/page-loader.d.ts +26 -0
- package/lib/radio-group/radio-group.d.ts +18 -44
- package/lib/radio-group/radio.d.ts +27 -0
- package/lib/service-level-header/service-level-header.d.ts +17 -0
- package/lib/skeleton/skeleton.d.ts +19 -0
- package/lib/spinner/spinner.d.ts +24 -0
- package/lib/textarea/textarea.d.ts +27 -0
- package/package.json +12 -7
- package/react-components.esm.js +690 -2556
- package/react-components.umd.js +747 -2598
- package/experimental/experimental/badge/badge.component.d.ts +0 -8
- package/experimental/experimental/element-loader/element-loader.d.ts +0 -18
- package/experimental/experimental/form/container/form.button.component.d.ts +0 -7
- package/experimental/experimental/form/container/form.container.component.d.ts +0 -7
- package/experimental/experimental/form/container/form.item.component.d.ts +0 -18
- package/experimental/experimental/form/form.component.d.ts +0 -32
- package/experimental/experimental/form/formFieldValidator.d.ts +0 -4
- package/experimental/experimental/index.d.ts +0 -9
- package/experimental/experimental/input/input.component.d.ts +0 -15
- package/experimental/experimental/page-loader/page-loader.d.ts +0 -43
- package/experimental/experimental/skeleton/skeleton-element.d.ts +0 -8
- package/experimental/experimental/skeleton/skeleton-grid-column.d.ts +0 -9
- package/experimental/experimental/skeleton/skeleton-image-content.d.ts +0 -9
- package/experimental/experimental/skeleton/skeleton-titled-content.d.ts +0 -9
- package/lib/card/card.component.d.ts +0 -26
- package/lib/card-group/card.group.component.d.ts +0 -24
- package/lib/dropdown/dropdown.component.d.ts +0 -20
- package/lib/dropdown/dropdown.context.d.ts +0 -17
- package/lib/dropdown/option/option.component.d.ts +0 -10
- package/lib/dropdown/option-group/option-group.component.d.ts +0 -6
- package/lib/header/header.d.ts +0 -10
- package/lib/hero-banner/content/hero-banner-content.component.d.ts +0 -7
- package/lib/hero-banner/hero-banner.component.d.ts +0 -11
- package/lib/hero-banner/link/hero-banner-link.component.d.ts +0 -8
- package/lib/microsite-logo/microsite-logo.d.ts +0 -8
- package/lib/radio-group/radio/radio.d.ts +0 -17
- package/lib/radio-group/radio-group.context.d.ts +0 -6
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { FC, ReactNode } from 'react';
|
|
2
|
-
interface GoABadgeProps {
|
|
3
|
-
type: 'information' | 'success' | 'warning' | 'emergency' | 'dark' | 'midtone' | 'light' | 'inactive';
|
|
4
|
-
icon?: ReactNode;
|
|
5
|
-
content?: string;
|
|
6
|
-
}
|
|
7
|
-
export declare const GoABadge: FC<GoABadgeProps>;
|
|
8
|
-
export {};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import './element-loader.scss';
|
|
4
|
-
export interface ElementLoaderProps {
|
|
5
|
-
visible?: boolean;
|
|
6
|
-
baseColour: string;
|
|
7
|
-
spinnerColour: string;
|
|
8
|
-
size: number;
|
|
9
|
-
}
|
|
10
|
-
export declare const GoAElementLoader: {
|
|
11
|
-
({ visible, baseColour, spinnerColour, size, }: ElementLoaderProps): JSX.Element;
|
|
12
|
-
propTypes: {
|
|
13
|
-
visible: PropTypes.Requireable<boolean>;
|
|
14
|
-
baseColour: PropTypes.Requireable<string>;
|
|
15
|
-
spinnerColour: PropTypes.Requireable<string>;
|
|
16
|
-
size: PropTypes.Requireable<number>;
|
|
17
|
-
};
|
|
18
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import '../form.scss';
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
|
-
declare type GoAFormItemProps = {
|
|
5
|
-
name?: string;
|
|
6
|
-
validators?: [];
|
|
7
|
-
onChange?: (value: string) => void;
|
|
8
|
-
children?: React.ReactNode;
|
|
9
|
-
};
|
|
10
|
-
export declare const GoAFormItem: {
|
|
11
|
-
({ name, validators, onChange, children, }: GoAFormItemProps): JSX.Element;
|
|
12
|
-
propTypes: {
|
|
13
|
-
name: PropTypes.Requireable<string>;
|
|
14
|
-
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
15
|
-
validators: PropTypes.Requireable<any[]>;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
export default GoAFormItem;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import React, { ReactNode } from 'react';
|
|
2
|
-
import { GoAFormItem } from './container/form.item.component';
|
|
3
|
-
import { GoAFormButton } from './container/form.button.component';
|
|
4
|
-
import { GoAFormContainer } from './container/form.container.component';
|
|
5
|
-
import './form.scss';
|
|
6
|
-
import PropTypes from 'prop-types';
|
|
7
|
-
declare type FormProps = {
|
|
8
|
-
formTitle: string;
|
|
9
|
-
formDescription: string;
|
|
10
|
-
/**
|
|
11
|
-
* Action to take on submit button click
|
|
12
|
-
*/
|
|
13
|
-
onFormSubmit?: (data: any) => void;
|
|
14
|
-
/**
|
|
15
|
-
* Provide children to be rendered inside of the element
|
|
16
|
-
*/
|
|
17
|
-
children?: ReactNode;
|
|
18
|
-
};
|
|
19
|
-
declare let FormContext: any;
|
|
20
|
-
export declare const Provider: React.Provider<any>;
|
|
21
|
-
export declare const GoAForm: {
|
|
22
|
-
({ formTitle, formDescription, onFormSubmit, children, ...props }: FormProps): JSX.Element;
|
|
23
|
-
propTypes: {
|
|
24
|
-
formTitle: PropTypes.Requireable<string>;
|
|
25
|
-
formDescription: PropTypes.Requireable<string>;
|
|
26
|
-
onSubmit: PropTypes.Requireable<(...args: any[]) => any>;
|
|
27
|
-
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
export default GoAForm;
|
|
31
|
-
export { GoAFormItem, GoAFormButton, GoAFormContainer };
|
|
32
|
-
export { FormContext };
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export declare const requiredValidator: (val: any) => string[];
|
|
2
|
-
export declare const passwordMatchedValidator: (val: any, formData: any) => string[];
|
|
3
|
-
export declare const emailValidator: (val: any) => string[];
|
|
4
|
-
export declare const phoneValidator: (val: any) => string[];
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { GoABadge } from './badge/badge.component';
|
|
2
|
-
import { GoAPageLoader } from './page-loader/page-loader';
|
|
3
|
-
import { GoAElementLoader } from './element-loader/element-loader';
|
|
4
|
-
import { GoAFormItem, GoAFormButton, GoAFormContainer, GoAForm } from './form/form.component';
|
|
5
|
-
import { GoASkeletonContent } from './skeleton/skeleton-titled-content';
|
|
6
|
-
import { GoASkeletonGridColumnContent } from './skeleton/skeleton-grid-column';
|
|
7
|
-
import { GoASkeletonImageContent } from './skeleton/skeleton-image-content';
|
|
8
|
-
import { GoAInput } from './input/input.component';
|
|
9
|
-
export { GoABadge, GoAPageLoader, GoAElementLoader, GoASkeletonContent, GoASkeletonGridColumnContent, GoASkeletonImageContent, GoAFormItem, GoAFormButton, GoAFormContainer, GoAForm, GoAInput };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
|
-
import './input.scss';
|
|
3
|
-
declare type Props = {
|
|
4
|
-
validate?: (value: string) => boolean;
|
|
5
|
-
name?: string;
|
|
6
|
-
type: string;
|
|
7
|
-
message?: string;
|
|
8
|
-
required?: boolean;
|
|
9
|
-
helpText?: string;
|
|
10
|
-
multiLine?: boolean;
|
|
11
|
-
navigator?: boolean;
|
|
12
|
-
onChange?: (value: string) => void;
|
|
13
|
-
};
|
|
14
|
-
export declare const GoAInput: FC<Props>;
|
|
15
|
-
export default GoAInput;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import './page-loader.scss';
|
|
4
|
-
declare type indicatorType = 'infinite' | 'progress';
|
|
5
|
-
declare type displayTypeIndicator = 'large' | 'small';
|
|
6
|
-
export interface PageLoaderProps {
|
|
7
|
-
/**
|
|
8
|
-
* The type of page loader, deterministic and indeterministic.
|
|
9
|
-
*/
|
|
10
|
-
type?: indicatorType;
|
|
11
|
-
/**
|
|
12
|
-
* The message to display while loading.
|
|
13
|
-
*/
|
|
14
|
-
message?: string;
|
|
15
|
-
/**
|
|
16
|
-
* Sets the page loader visibility state.
|
|
17
|
-
*/
|
|
18
|
-
visible?: boolean;
|
|
19
|
-
/**
|
|
20
|
-
* Sets the percentage value of the page loader while set to progress type, 0 - 100 percent.
|
|
21
|
-
*/
|
|
22
|
-
value?: number;
|
|
23
|
-
/**
|
|
24
|
-
* Sets the page to locked and does not accept user input.
|
|
25
|
-
*/
|
|
26
|
-
pagelock?: boolean;
|
|
27
|
-
/**
|
|
28
|
-
* Sets the progress indicator display type size.
|
|
29
|
-
*/
|
|
30
|
-
displayType?: displayTypeIndicator;
|
|
31
|
-
}
|
|
32
|
-
export declare const GoAPageLoader: {
|
|
33
|
-
({ type, visible, message, value, pagelock, displayType }: PageLoaderProps): JSX.Element;
|
|
34
|
-
propTypes: {
|
|
35
|
-
visible: PropTypes.Requireable<boolean>;
|
|
36
|
-
message: PropTypes.Requireable<string>;
|
|
37
|
-
value: PropTypes.Requireable<number>;
|
|
38
|
-
type: PropTypes.Requireable<string>;
|
|
39
|
-
pagelock: PropTypes.Requireable<boolean>;
|
|
40
|
-
displayType: PropTypes.Requireable<string>;
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
export default GoAPageLoader;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import './skeleton-element.scss';
|
|
3
|
-
declare type indicatorType = 'text' | 'avatar' | 'title' | 'paragraph' | 'thumbnail' | 'card';
|
|
4
|
-
export interface SkeletonProps {
|
|
5
|
-
type?: indicatorType;
|
|
6
|
-
}
|
|
7
|
-
export declare const GoASkeletonElement: ({ type }: SkeletonProps) => JSX.Element;
|
|
8
|
-
export {};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import React, { FC, ReactNode } from 'react';
|
|
2
|
-
import '../../theme.scss';
|
|
3
|
-
import './card.scss';
|
|
4
|
-
interface Props {
|
|
5
|
-
/** Card title, required */
|
|
6
|
-
title: string | ReactNode;
|
|
7
|
-
/** Card content*/
|
|
8
|
-
content?: string | ReactNode;
|
|
9
|
-
/** Deprecated: Use content*/
|
|
10
|
-
description?: string;
|
|
11
|
-
/** Card image , display on top of title */
|
|
12
|
-
cardImageUrl?: string;
|
|
13
|
-
/** Minimum width of the card */
|
|
14
|
-
minWidth?: string;
|
|
15
|
-
/** Maximum width of the card */
|
|
16
|
-
maxWidth?: string;
|
|
17
|
-
/** Navigation to relate website from Card title */
|
|
18
|
-
titleUrl?: string;
|
|
19
|
-
/** customize footer by passing react component code */
|
|
20
|
-
children?: React.ReactNode;
|
|
21
|
-
other?: unknown;
|
|
22
|
-
}
|
|
23
|
-
export declare const GoACard: FC<Props>;
|
|
24
|
-
export default GoACard;
|
|
25
|
-
export declare const GoALoadingCardWithImage: (props: Props) => JSX.Element;
|
|
26
|
-
export declare const GoALoadingCardNoImage: (props: Props) => JSX.Element;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import React, { FC } from 'react';
|
|
2
|
-
import './card.group.scss';
|
|
3
|
-
declare type CardGroupLayout = 'basic' | 'column';
|
|
4
|
-
interface CardItem {
|
|
5
|
-
title: string;
|
|
6
|
-
/** Card description */
|
|
7
|
-
description?: string;
|
|
8
|
-
/** Card image , display on top of title */
|
|
9
|
-
cardImageUrl?: string;
|
|
10
|
-
/** Display card size to allow card responsively show in different device*/
|
|
11
|
-
cardWidth?: number;
|
|
12
|
-
/** Navigation to relate webside from Card title */
|
|
13
|
-
titleUrl?: string;
|
|
14
|
-
/** customize footer by passing react component code */
|
|
15
|
-
children?: React.ReactNode;
|
|
16
|
-
}
|
|
17
|
-
interface Props {
|
|
18
|
-
title?: string;
|
|
19
|
-
children?: React.ReactNode;
|
|
20
|
-
layout: CardGroupLayout;
|
|
21
|
-
cardItems?: CardItem[];
|
|
22
|
-
}
|
|
23
|
-
export declare const GoACardGroup: FC<Props>;
|
|
24
|
-
export default GoACardGroup;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
|
-
import { DropdownOption } from './dropdown.context';
|
|
3
|
-
import './dropdown.component.scss';
|
|
4
|
-
import GoAOption from './option/option.component';
|
|
5
|
-
import GoAOptionGroup from './option-group/option-group.component';
|
|
6
|
-
interface Props {
|
|
7
|
-
title: string;
|
|
8
|
-
subTitle: string;
|
|
9
|
-
description?: string;
|
|
10
|
-
menuHeight?: number;
|
|
11
|
-
multiple?: boolean;
|
|
12
|
-
disabled?: boolean;
|
|
13
|
-
display?: string;
|
|
14
|
-
errorMessage?: string;
|
|
15
|
-
key?: string;
|
|
16
|
-
selectionChanged: (option: DropdownOption) => void;
|
|
17
|
-
}
|
|
18
|
-
export declare const GoADropdown: FC<Props>;
|
|
19
|
-
export default GoADropdown;
|
|
20
|
-
export { GoAOption, GoAOptionGroup };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { GoAOptionProps } from './option/option.component';
|
|
3
|
-
export declare class DropdownOption {
|
|
4
|
-
value: string;
|
|
5
|
-
label: string;
|
|
6
|
-
selected: boolean;
|
|
7
|
-
constructor(val: string, label: string, sel: boolean);
|
|
8
|
-
}
|
|
9
|
-
/** Used to store the options in the dropdown */
|
|
10
|
-
export interface KeyOptionPair {
|
|
11
|
-
[value: string]: DropdownOption;
|
|
12
|
-
}
|
|
13
|
-
/** Interface for the context for the dropdown and its children */
|
|
14
|
-
export interface DropdownContextProps {
|
|
15
|
-
selectionChanged?: (option: GoAOptionProps) => void;
|
|
16
|
-
}
|
|
17
|
-
export declare const DropdownContext: import("react").Context<DropdownContextProps>;
|
package/lib/header/header.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { FunctionComponent } from 'react';
|
|
2
|
-
import './header.scss';
|
|
3
|
-
declare type ServiceLevel = 'alpha' | 'beta' | 'live';
|
|
4
|
-
export interface HeaderProps {
|
|
5
|
-
serviceName: string;
|
|
6
|
-
serviceHome: string;
|
|
7
|
-
serviceLevel: ServiceLevel;
|
|
8
|
-
}
|
|
9
|
-
export declare const GoAHeader: FunctionComponent<HeaderProps>;
|
|
10
|
-
export default GoAHeader;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
|
-
import './hero-banner.component.scss';
|
|
3
|
-
interface Props {
|
|
4
|
-
title: string;
|
|
5
|
-
backgroundUrl: string;
|
|
6
|
-
content?: string;
|
|
7
|
-
linkText?: string;
|
|
8
|
-
linkUrl?: string;
|
|
9
|
-
}
|
|
10
|
-
export declare const GoAHeroBanner: FC<Props>;
|
|
11
|
-
export default GoAHeroBanner;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import './microsite-logo.scss';
|
|
3
|
-
export interface MicrositeLogoProps {
|
|
4
|
-
serviceName: string;
|
|
5
|
-
serviceHome: string;
|
|
6
|
-
}
|
|
7
|
-
export declare const MicrositeLogo: (props: MicrositeLogoProps) => JSX.Element;
|
|
8
|
-
export default MicrositeLogo;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React, { FC } from 'react';
|
|
2
|
-
import './radio.scss';
|
|
3
|
-
export declare type LabelPosition = 'before' | 'after';
|
|
4
|
-
export interface Data {
|
|
5
|
-
text: string;
|
|
6
|
-
value: string;
|
|
7
|
-
}
|
|
8
|
-
export interface Props {
|
|
9
|
-
value: string;
|
|
10
|
-
name?: string;
|
|
11
|
-
labelPosition?: LabelPosition;
|
|
12
|
-
disabled?: boolean;
|
|
13
|
-
required?: boolean;
|
|
14
|
-
children: React.ReactNode;
|
|
15
|
-
}
|
|
16
|
-
export declare const GoARadio: FC<Props>;
|
|
17
|
-
export default GoARadio;
|