@abgov/react-components 7.0.0-dev.2 → 7.0.0-dev.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/index.js +56 -107
- package/index.js.map +1 -1
- package/index.mjs +56 -107
- package/index.mjs.map +1 -1
- package/lib/accordion/accordion.d.ts +13 -2
- package/lib/app-header/app-header.d.ts +9 -0
- package/lib/app-header-menu/app-header-menu.d.ts +6 -0
- package/lib/badge/badge.d.ts +9 -0
- package/lib/block/block.d.ts +9 -0
- package/lib/button/button.d.ts +14 -0
- package/lib/button-group/button-group.d.ts +5 -0
- package/lib/calendar/calendar.d.ts +8 -1
- package/lib/callout/callout.d.ts +10 -0
- package/lib/card/card-actions.d.ts +2 -0
- package/lib/card/card-content.d.ts +2 -0
- package/lib/card/card-group.d.ts +2 -0
- package/lib/card/card-image.d.ts +3 -0
- package/lib/card/card.d.ts +5 -0
- package/lib/checkbox/checkbox.d.ts +19 -1
- package/lib/checkbox-list/checkbox-list.d.ts +10 -0
- package/lib/chip/chip.d.ts +11 -2
- package/lib/circular-progress/circular-progress.d.ts +7 -0
- package/lib/container/container.d.ts +18 -5
- package/lib/data-grid/data-grid.d.ts +6 -1
- package/lib/date-picker/date-picker.d.ts +13 -4
- package/lib/details/details.d.ts +7 -1
- package/lib/divider/divider.d.ts +2 -0
- package/lib/drawer/drawer.d.ts +11 -2
- package/lib/dropdown/dropdown-item.d.ts +8 -0
- package/lib/dropdown/dropdown.d.ts +22 -3
- package/lib/file-upload-card/file-upload-card.d.ts +9 -0
- package/lib/file-upload-input/file-upload-input.d.ts +7 -1
- package/lib/filter-chip/filter-chip.d.ts +10 -2
- package/lib/footer/footer.d.ts +7 -2
- package/lib/footer-meta-section/footer-meta-section.d.ts +3 -0
- package/lib/footer-nav-section/footer-nav-section.d.ts +6 -1
- package/lib/form/fieldset.d.ts +7 -1
- package/lib/form/public-form-page.d.ts +13 -5
- package/lib/form/public-form-summary.d.ts +2 -0
- package/lib/form/public-form.d.ts +8 -1
- package/lib/form/public-subform-index.d.ts +7 -1
- package/lib/form/public-subform.d.ts +8 -1
- package/lib/form/task-list.d.ts +4 -1
- package/lib/form/task.d.ts +4 -1
- package/lib/form-item/form-item.d.ts +13 -6
- package/lib/form-step/form-step.d.ts +3 -0
- package/lib/form-stepper/form-stepper.d.ts +5 -0
- package/lib/grid/grid.d.ts +6 -1
- package/lib/hero-banner/hero-banner-actions.d.ts +2 -0
- package/lib/hero-banner/hero-banner.d.ts +9 -0
- package/lib/icon/icon.d.ts +10 -0
- package/lib/icon-button/icon-button.d.ts +13 -0
- package/lib/input/input.d.ts +47 -3
- package/lib/linear-progress/linear-progress.d.ts +6 -0
- package/lib/link/link.d.ts +11 -1
- package/lib/menu-button/menu-action.d.ts +5 -0
- package/lib/menu-button/menu-button.d.ts +11 -0
- package/lib/microsite-header/microsite-header.d.ts +9 -0
- package/lib/modal/modal.d.ts +10 -0
- package/lib/notification/notification.d.ts +9 -0
- package/lib/one-column-layout/one-column-layout.d.ts +2 -0
- package/lib/page-block/page-block.d.ts +4 -0
- package/lib/pages/pages.d.ts +3 -0
- package/lib/pagination/pagination.d.ts +9 -2
- package/lib/popover/popover.d.ts +11 -5
- package/lib/push-drawer/push-drawer.d.ts +10 -2
- package/lib/radio-group/radio-group.d.ts +12 -0
- package/lib/radio-group/radio.d.ts +14 -0
- package/lib/side-menu/side-menu.d.ts +4 -1
- package/lib/side-menu-group/side-menu-group.d.ts +5 -0
- package/lib/side-menu-heading/side-menu-heading.d.ts +7 -2
- package/lib/skeleton/skeleton.d.ts +7 -1
- package/lib/spacer/spacer.d.ts +4 -0
- package/lib/spinner/spinner.d.ts +6 -0
- package/lib/tab/tab.d.ts +6 -1
- package/lib/table/table-sort-header.d.ts +5 -0
- package/lib/table/table.d.ts +9 -0
- package/lib/tabs/tabs.d.ts +8 -1
- package/lib/temporary-notification-ctrl/temporary-notification-ctrl.d.ts +4 -0
- package/lib/text/text.d.ts +8 -1
- package/lib/textarea/textarea.d.ts +20 -0
- package/lib/three-column-layout/three-column-layout.d.ts +11 -1
- package/lib/tooltip/tooltip.d.ts +7 -0
- package/lib/two-column-layout/two-column-layout.d.ts +9 -2
- package/lib/work-side-menu/work-side-menu.d.ts +12 -0
- package/lib/work-side-menu-group/work-side-menu-group.d.ts +6 -0
- package/lib/work-side-menu-item/work-side-menu-item.d.ts +11 -0
- package/lib/work-side-notification-item/work-side-notification-item.d.ts +10 -1
- package/lib/work-side-notification-panel/work-side-notification-panel.d.ts +7 -0
- package/package.json +1 -1
|
@@ -18,14 +18,23 @@ declare module "react" {
|
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
export interface GoabFileUploadCardProps extends DataAttributes {
|
|
21
|
+
/** @required The name of the uploaded file to display. */
|
|
21
22
|
filename: string;
|
|
23
|
+
/** @required The file size in bytes. Displayed in a human-readable format (KB, MB). */
|
|
22
24
|
size: number;
|
|
25
|
+
/** The MIME type of the file. Used to determine the file type icon. */
|
|
23
26
|
type?: string;
|
|
27
|
+
/** Upload progress percentage from 0-100. Use -1 to indicate upload is complete. @default -1 */
|
|
24
28
|
progress?: number;
|
|
29
|
+
/** Sets a data-testid attribute for automated testing. */
|
|
25
30
|
testId?: string;
|
|
31
|
+
/** Error message to display. When set, the card shows an error state with a cancel button. */
|
|
26
32
|
error?: string;
|
|
33
|
+
/** Callback fired when the user clicks the remove button on an uploaded file. */
|
|
27
34
|
onDelete?: (detail: GoabFileUploadOnDeleteDetail) => void;
|
|
35
|
+
/** Callback fired when the user clicks the cancel button during file upload. */
|
|
28
36
|
onCancel?: (detail: GoabFileUploadOnCancelDetail) => void;
|
|
29
37
|
}
|
|
38
|
+
/** Display uploaded file with actions. */
|
|
30
39
|
export declare function GoabFileUploadCard({ onDelete, onCancel, filename, ...rest }: GoabFileUploadCardProps): import("react/jsx-runtime").JSX.Element;
|
|
31
40
|
export default GoabFileUploadCard;
|
|
@@ -16,11 +16,17 @@ declare module "react" {
|
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
export interface GoabFileUploadInputProps extends DataAttributes {
|
|
19
|
+
/** @required Callback fired when a valid file is selected or dropped. */
|
|
20
|
+
onSelectFile: (detail: GoabFileUploadInputOnSelectFileDetail) => void;
|
|
21
|
+
/** The input display variant. "dragdrop" shows a drag-and-drop area, "button" shows a simple button. @default "dragdrop" */
|
|
19
22
|
variant?: GoabFileUploadInputVariant;
|
|
23
|
+
/** Accepted file types as a comma-separated list of MIME types or file extensions (e.g., "image/*,.pdf"). */
|
|
20
24
|
accept?: string;
|
|
25
|
+
/** Maximum file size with unit (e.g., "5MB", "100KB", "1GB"). Files exceeding this will be rejected. @default "5MB" */
|
|
21
26
|
maxFileSize?: string;
|
|
27
|
+
/** Sets a data-testid attribute for automated testing. */
|
|
22
28
|
testId?: string;
|
|
23
|
-
onSelectFile: (detail: GoabFileUploadInputOnSelectFileDetail) => void;
|
|
24
29
|
}
|
|
30
|
+
/** Help users select and upload a file. */
|
|
25
31
|
export declare function GoabFileUploadInput({ onSelectFile, ...rest }: GoabFileUploadInputProps): import("react/jsx-runtime").JSX.Element;
|
|
26
32
|
export default GoabFileUploadInput;
|
|
@@ -18,13 +18,21 @@ declare module "react" {
|
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
export interface GoabFilterChipProps extends Margins, DataAttributes {
|
|
21
|
-
|
|
21
|
+
/** @required Text label of the chip. */
|
|
22
|
+
content: string;
|
|
23
|
+
/** Theme style of the leading icon. @default "outline" */
|
|
22
24
|
iconTheme?: GoabFilterChipTheme;
|
|
25
|
+
/** Shows an error state. */
|
|
23
26
|
error?: boolean;
|
|
24
|
-
content
|
|
27
|
+
/** Secondary text displayed in a smaller size before the main content. */
|
|
25
28
|
secondaryText?: string;
|
|
29
|
+
/** Icon displayed at the start of the chip. */
|
|
26
30
|
leadingIcon?: GoabIconType;
|
|
31
|
+
/** Sets a data-testid attribute for automated testing. */
|
|
27
32
|
testId?: string;
|
|
33
|
+
/** Callback fired when the filter chip is clicked to remove it. */
|
|
34
|
+
onClick?: () => void;
|
|
28
35
|
}
|
|
36
|
+
/** Allow the user to enter information, filter content, and make selections. */
|
|
29
37
|
export declare const GoabFilterChip: ({ iconTheme, error, onClick, ...rest }: GoabFilterChipProps) => import("react/jsx-runtime").JSX.Element;
|
|
30
38
|
export default GoabFilterChip;
|
package/lib/footer/footer.d.ts
CHANGED
|
@@ -14,10 +14,15 @@ declare module "react" {
|
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
export interface GoabAppFooterProps extends DataAttributes {
|
|
17
|
+
/** The maximum width of the main content area. */
|
|
17
18
|
maxContentWidth?: string;
|
|
18
|
-
|
|
19
|
-
testId?: string;
|
|
19
|
+
/** URL for the Government of Alberta logo link. Set to empty string to disable the link. @default "https://alberta.ca" */
|
|
20
20
|
url?: string;
|
|
21
|
+
/** Sets a data-testid attribute for automated testing. */
|
|
22
|
+
testId?: string;
|
|
23
|
+
/** Content rendered inside the footer, typically navigation and meta sections. */
|
|
24
|
+
children?: ReactNode;
|
|
21
25
|
}
|
|
26
|
+
/** Provides information related your service at the bottom of every page. */
|
|
22
27
|
export declare function GoabAppFooter({ children, ...rest }: GoabAppFooterProps): JSX.Element;
|
|
23
28
|
export default GoabAppFooter;
|
|
@@ -11,8 +11,11 @@ declare module "react" {
|
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
13
|
export interface GoabAppFooterMetaSectionProps extends DataAttributes {
|
|
14
|
+
/** Sets a data-testid attribute for automated testing. */
|
|
14
15
|
testId?: string;
|
|
16
|
+
/** Anchor link elements rendered as footer meta navigation links. */
|
|
15
17
|
children?: ReactNode;
|
|
16
18
|
}
|
|
19
|
+
/** Copyright and legal links in footer. */
|
|
17
20
|
export declare function GoabAppFooterMetaSection({ children, ...rest }: GoabAppFooterMetaSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
18
21
|
export default GoabAppFooterMetaSection;
|
|
@@ -13,10 +13,15 @@ declare module "react" {
|
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
export interface GoabFooterNavSectionProps extends DataAttributes {
|
|
16
|
-
|
|
16
|
+
/** The section heading displayed above the navigation links. */
|
|
17
17
|
heading?: string;
|
|
18
|
+
/** Maximum number of columns to display links in on larger screens. @default 1 */
|
|
19
|
+
maxColumnCount?: number;
|
|
20
|
+
/** Sets a data-testid attribute for automated testing. */
|
|
18
21
|
testId?: string;
|
|
22
|
+
/** Anchor link elements rendered as footer navigation links. */
|
|
19
23
|
children?: ReactNode;
|
|
20
24
|
}
|
|
25
|
+
/** Navigation links section in footer. */
|
|
21
26
|
export declare function GoabAppFooterNavSection({ children, ...rest }: GoabFooterNavSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
22
27
|
export default GoabAppFooterNavSection;
|
package/lib/form/fieldset.d.ts
CHANGED
|
@@ -15,11 +15,17 @@ declare module "react" {
|
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
interface GoabFieldsetProps extends DataAttributes {
|
|
18
|
+
/** Content rendered inside the fieldset. */
|
|
19
|
+
children: ReactNode;
|
|
20
|
+
/** Sets the unique identifier for the fieldset. */
|
|
18
21
|
id?: string;
|
|
22
|
+
/** Sets the section title of the fieldset. */
|
|
19
23
|
sectionTitle?: string;
|
|
24
|
+
/** Sets when form field changes are dispatched to the form. @default "continue" */
|
|
20
25
|
dispatchOn?: GoabFormDispatchOn;
|
|
26
|
+
/** Callback fired when the fieldset continue action is triggered. */
|
|
21
27
|
onContinue?: (event: GoabFieldsetOnContinueDetail) => void;
|
|
22
|
-
children: ReactNode;
|
|
23
28
|
}
|
|
29
|
+
/** Container for form inputs and validation. */
|
|
24
30
|
export declare function GoabFieldset({ onContinue, children, ...rest }: GoabFieldsetProps): JSX.Element;
|
|
25
31
|
export default GoabFieldset;
|
|
@@ -21,21 +21,29 @@ declare module "react" {
|
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
interface GoabPublicFormPageProps extends Margins, DataAttributes {
|
|
24
|
+
/** Content rendered inside the form page. */
|
|
25
|
+
children: ReactNode;
|
|
26
|
+
/** Sets the unique identifier for the form page. */
|
|
24
27
|
id?: string;
|
|
28
|
+
/** Sets the heading text displayed at the top of the form page. */
|
|
25
29
|
heading?: string;
|
|
30
|
+
/** Sets the subheading text displayed below the main heading. */
|
|
26
31
|
subHeading?: string;
|
|
32
|
+
/** Sets the heading text used when this page appears in the form summary. */
|
|
27
33
|
summaryHeading?: string;
|
|
34
|
+
/** Sets the section title displayed above the heading. */
|
|
28
35
|
sectionTitle?: string;
|
|
36
|
+
/** Sets the URL for the back navigation link. */
|
|
29
37
|
backUrl?: string;
|
|
38
|
+
/** Sets the type of the form page. @default "step" */
|
|
30
39
|
type?: GoabPublicFormPageStep;
|
|
40
|
+
/** Sets the text label for the continue or confirm button. */
|
|
31
41
|
buttonText?: string;
|
|
42
|
+
/** Sets the visibility of the continue button. @default "visible" */
|
|
32
43
|
buttonVisibility?: GoabPublicFormPageButtonVisibility;
|
|
33
|
-
/**
|
|
34
|
-
* Triggered when the form page continues to the next step
|
|
35
|
-
* @param event - The continue event details
|
|
36
|
-
*/
|
|
44
|
+
/** Callback fired when the form page continues to the next step. */
|
|
37
45
|
onContinue?: (event: Event) => void;
|
|
38
|
-
children: ReactNode;
|
|
39
46
|
}
|
|
47
|
+
/** Container for form inputs and validation. */
|
|
40
48
|
export declare function GoabPublicFormPage({ onContinue, children, ...rest }: GoabPublicFormPageProps): import("react/jsx-runtime").JSX.Element;
|
|
41
49
|
export default GoabPublicFormPage;
|
|
@@ -10,7 +10,9 @@ declare module "react" {
|
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
interface GoabPublicFormSummaryProps extends DataAttributes {
|
|
13
|
+
/** Sets the heading text displayed above the form summary content. */
|
|
13
14
|
heading?: string;
|
|
14
15
|
}
|
|
16
|
+
/** Container for form inputs and validation. */
|
|
15
17
|
export declare function GoabPublicFormSummary({ heading, ...rest }: GoabPublicFormSummaryProps): import("react/jsx-runtime").JSX.Element;
|
|
16
18
|
export default GoabPublicFormSummary;
|
|
@@ -14,12 +14,19 @@ declare module "react" {
|
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
interface GoabPublicFormProps extends DataAttributes {
|
|
17
|
+
/** Content rendered inside the public form. */
|
|
18
|
+
children: ReactNode;
|
|
19
|
+
/** The initialization status of the form. Set to "initializing" while loading external state, then "complete" when ready. @default "complete" */
|
|
17
20
|
status?: GoabPublicFormStatus;
|
|
21
|
+
/** A name identifier for the form. Useful for debugging complex forms with multiple nested forms. */
|
|
18
22
|
name?: string;
|
|
23
|
+
/** Callback fired when the form is initialized. */
|
|
19
24
|
onInit?: (event: Event) => void;
|
|
25
|
+
/** Callback fired when the form is completed. */
|
|
20
26
|
onComplete?: (event: GoabFormState) => void;
|
|
27
|
+
/** Callback fired when the form state changes. */
|
|
21
28
|
onStateChange?: (event: GoabFormState) => void;
|
|
22
|
-
children: ReactNode;
|
|
23
29
|
}
|
|
30
|
+
/** Container for form inputs and validation. */
|
|
24
31
|
export declare function GoabPublicForm({ onInit, onComplete, onStateChange, children, ...rest }: GoabPublicFormProps): import("react/jsx-runtime").JSX.Element;
|
|
25
32
|
export default GoabPublicForm;
|
|
@@ -14,11 +14,17 @@ declare module "react" {
|
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
interface GoabPublicSubformIndexProps extends Margins, DataAttributes {
|
|
17
|
+
/** Content rendered inside the subform index. */
|
|
18
|
+
children: ReactNode;
|
|
19
|
+
/** Sets the heading text displayed at the top of the subform index page. */
|
|
17
20
|
heading?: string;
|
|
21
|
+
/** Sets the section title displayed above the heading. */
|
|
18
22
|
sectionTitle?: string;
|
|
23
|
+
/** Sets the text label for the action button that adds a new subform entry. */
|
|
19
24
|
actionButtonText?: string;
|
|
25
|
+
/** Sets the visibility of the action button. @default "hidden" */
|
|
20
26
|
buttonVisibility?: "visible" | "hidden";
|
|
21
|
-
children: ReactNode;
|
|
22
27
|
}
|
|
28
|
+
/** Container for form inputs and validation. */
|
|
23
29
|
export declare function GoabPublicSubformIndex({ heading, sectionTitle, actionButtonText, buttonVisibility, children, ...rest }: GoabPublicSubformIndexProps): import("react/jsx-runtime").JSX.Element;
|
|
24
30
|
export default GoabPublicSubformIndex;
|
|
@@ -15,12 +15,19 @@ declare module "react" {
|
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
interface GoabPublicSubformProps extends Margins, DataAttributes {
|
|
18
|
+
/** Content rendered inside the subform. */
|
|
19
|
+
children: ReactNode;
|
|
20
|
+
/** Sets the unique identifier for the subform. */
|
|
18
21
|
id?: string;
|
|
22
|
+
/** Sets the name identifier for the subform. */
|
|
19
23
|
name?: string;
|
|
24
|
+
/** Sets the message displayed on the continue button. */
|
|
20
25
|
continueMsg?: string;
|
|
26
|
+
/** Callback fired when the subform is initialized. */
|
|
21
27
|
onInit?: (event: Event) => void;
|
|
28
|
+
/** Callback fired when the subform state changes. */
|
|
22
29
|
onStateChange?: (event: Event) => void;
|
|
23
|
-
children: ReactNode;
|
|
24
30
|
}
|
|
31
|
+
/** Container for form inputs and validation. */
|
|
25
32
|
export declare function GoabPublicSubform({ id, name, continueMsg, onInit, onStateChange, children, ...rest }: GoabPublicSubformProps): import("react/jsx-runtime").JSX.Element;
|
|
26
33
|
export default GoabPublicSubform;
|
package/lib/form/task-list.d.ts
CHANGED
|
@@ -11,8 +11,11 @@ declare module "react" {
|
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
13
|
interface GoabPublicFormTaskListProps extends Margins, DataAttributes {
|
|
14
|
-
|
|
14
|
+
/** Content rendered inside the task list, typically GoabPublicFormTask items. */
|
|
15
15
|
children: ReactNode;
|
|
16
|
+
/** Sets the heading text displayed above the task list. */
|
|
17
|
+
heading?: string;
|
|
16
18
|
}
|
|
19
|
+
/** Container for form inputs and validation. */
|
|
17
20
|
export declare function GoabPublicFormTaskList({ children, ...rest }: GoabPublicFormTaskListProps): import("react/jsx-runtime").JSX.Element;
|
|
18
21
|
export default GoabPublicFormTaskList;
|
package/lib/form/task.d.ts
CHANGED
|
@@ -11,8 +11,11 @@ declare module "react" {
|
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
13
|
interface GoabPublicFormTaskProps extends DataAttributes {
|
|
14
|
-
|
|
14
|
+
/** Content rendered inside the task item, typically the task name or description. */
|
|
15
15
|
children: ReactNode;
|
|
16
|
+
/** Sets the status of the task, which determines the badge displayed. @default "cannot-start" */
|
|
17
|
+
status?: GoabPublicFormTaskStatus;
|
|
16
18
|
}
|
|
19
|
+
/** Container for form inputs and validation. */
|
|
17
20
|
export declare function GoabPublicFormTask({ status, children, ...rest }: GoabPublicFormTaskProps): import("react/jsx-runtime").JSX.Element;
|
|
18
21
|
export default GoabPublicFormTask;
|
|
@@ -22,24 +22,31 @@ declare module "react" {
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
export interface GoabFormItemProps extends Margins, DataAttributes {
|
|
25
|
+
/** Creates a label for the form item. */
|
|
25
26
|
label?: string;
|
|
27
|
+
/** Sets the label size. 'regular' for standard, 'large' for emphasis. @default "regular" */
|
|
26
28
|
labelSize?: GoabFormItemLabelSize;
|
|
29
|
+
/** Marks the field with an optional or required label indicator. */
|
|
27
30
|
requirement?: GoabFormItemRequirement;
|
|
31
|
+
/** Error text displayed under the form field. Leave blank to indicate a valid field. Accepts a string or ReactNode for custom error content. */
|
|
28
32
|
error?: string | React.ReactNode;
|
|
33
|
+
/** Help text displayed under the form field to provide additional explanation. Accepts a string or ReactNode for custom help content. */
|
|
29
34
|
helpText?: string | React.ReactNode;
|
|
35
|
+
/** Sets the maximum width of the form item. @default "none" */
|
|
30
36
|
maxWidth?: string;
|
|
37
|
+
/** Specifies the input type for appropriate message spacing. Used with checkbox-list or radio-group. */
|
|
31
38
|
type?: GoabFormItemType;
|
|
32
|
-
/**
|
|
33
|
-
* Public form: to arrange fields in the summary
|
|
34
|
-
*/
|
|
39
|
+
/** Sets the display order within the form summary. For public-form use only. */
|
|
35
40
|
publicFormSummaryOrder?: number;
|
|
36
|
-
/**
|
|
37
|
-
* Public form: allow to override the label value within the form-summary to provide a shorter description of the value
|
|
38
|
-
*/
|
|
41
|
+
/** Overrides the label value within the form-summary to provide a shorter description. For public-form use only. */
|
|
39
42
|
name?: string;
|
|
43
|
+
/** Content rendered inside the form item, typically an input component. */
|
|
40
44
|
children?: React.ReactNode;
|
|
45
|
+
/** Sets a data-testid attribute for automated testing. */
|
|
41
46
|
testId?: string;
|
|
47
|
+
/** Sets the id attribute on the form item element. */
|
|
42
48
|
id?: string;
|
|
43
49
|
}
|
|
50
|
+
/** Wraps an input control with a text label, requirement label, helper text, and error text. */
|
|
44
51
|
export declare function GoabFormItem({ error, helpText, publicFormSummaryOrder, children, type, ...rest }: GoabFormItemProps): JSX.Element;
|
|
45
52
|
export default GoabFormItem;
|
|
@@ -11,8 +11,11 @@ declare module "react" {
|
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
13
|
export interface GoabFormStepProps {
|
|
14
|
+
/** @required The step label text displayed to users. */
|
|
14
15
|
text: string;
|
|
16
|
+
/** The completion status of the step. Affects visual styling and icons. */
|
|
15
17
|
status?: GoabFormStepStatus;
|
|
16
18
|
}
|
|
19
|
+
/** Individual step in a multi-step form. */
|
|
17
20
|
export declare function GoabFormStep(props: GoabFormStepProps): import("react/jsx-runtime").JSX.Element;
|
|
18
21
|
export default GoabFormStep;
|
|
@@ -13,10 +13,15 @@ declare module "react" {
|
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
export interface GoabFormStepperProps extends Margins {
|
|
16
|
+
/** The current step state value (1-based index). Leaving it blank (-1) will allow any step to be accessed. */
|
|
16
17
|
step?: number;
|
|
18
|
+
/** Sets a data-testid attribute for automated testing. */
|
|
17
19
|
testId?: string;
|
|
20
|
+
/** Content rendered inside the form stepper, typically GoabFormStep components. */
|
|
18
21
|
children?: ReactNode;
|
|
22
|
+
/** Callback fired when the active step changes. */
|
|
19
23
|
onChange?: (detail: GoabFormStepperOnChangeDetail) => void;
|
|
20
24
|
}
|
|
25
|
+
/** Provides a visual representation of a form through a series of steps. */
|
|
21
26
|
export declare function GoabFormStepper({ testId, step, mt, mb, ml, mr, onChange, children, }: GoabFormStepperProps): import("react/jsx-runtime").JSX.Element;
|
|
22
27
|
export default GoabFormStepper;
|
package/lib/grid/grid.d.ts
CHANGED
|
@@ -13,10 +13,15 @@ declare module "react" {
|
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
export interface GoabGridProps extends Margins {
|
|
16
|
-
|
|
16
|
+
/** @required Minimum width of the child elements. */
|
|
17
17
|
minChildWidth: string;
|
|
18
|
+
/** Gap between child items. @default "m" */
|
|
19
|
+
gap?: Spacing;
|
|
20
|
+
/** Sets a data-testid attribute for automated testing. */
|
|
18
21
|
testId?: string;
|
|
22
|
+
/** Content rendered inside the grid layout. */
|
|
19
23
|
children?: React.ReactNode;
|
|
20
24
|
}
|
|
25
|
+
/** Arrange a number of components into a responsive grid pattern. */
|
|
21
26
|
export declare function GoabGrid({ gap, minChildWidth, mt, mr, mb, ml, testId, children, }: GoabGridProps): JSX.Element;
|
|
22
27
|
export default GoabGrid;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { JSX } from 'react';
|
|
2
2
|
export type GoabHeroBannerActionsType = {
|
|
3
|
+
/** Content rendered inside the hero banner actions slot, typically buttons or links. */
|
|
3
4
|
children?: React.ReactNode;
|
|
4
5
|
};
|
|
6
|
+
/** Displays action content in the hero banner actions area. */
|
|
5
7
|
export declare function GoabHeroBannerActions({ children, }: GoabHeroBannerActionsType): JSX.Element;
|
|
6
8
|
export default GoabHeroBannerActions;
|
|
@@ -16,14 +16,23 @@ declare module "react" {
|
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
export interface GoabHeroBannerProps {
|
|
19
|
+
/** @required Main heading text. */
|
|
19
20
|
heading: string;
|
|
21
|
+
/** Background image url. */
|
|
20
22
|
backgroundUrl?: string;
|
|
23
|
+
/** Minimum height of the hero banner. Defaults to 600px when a background image is provided. */
|
|
21
24
|
minHeight?: string;
|
|
25
|
+
/** Sets a data-testid attribute for automated testing. */
|
|
22
26
|
testId?: string;
|
|
27
|
+
/** Content rendered inside the hero banner body. */
|
|
23
28
|
children?: React.ReactNode;
|
|
29
|
+
/** Maximum width of the content area. @default "100%" */
|
|
24
30
|
maxContentWidth?: string;
|
|
31
|
+
/** Hero Banner background color when no background image is provided. @default "#f8f8f8" */
|
|
25
32
|
backgroundColor?: string;
|
|
33
|
+
/** Text color within the hero banner. */
|
|
26
34
|
textColor?: string;
|
|
27
35
|
}
|
|
36
|
+
/** A visual band of text, including an image and a call to action. */
|
|
28
37
|
export declare function GoabHeroBanner({ heading, backgroundUrl, minHeight, maxContentWidth, backgroundColor, textColor, children, testId, }: GoabHeroBannerProps): JSX.Element;
|
|
29
38
|
export default GoabHeroBanner;
|
package/lib/icon/icon.d.ts
CHANGED
|
@@ -10,14 +10,23 @@ declare module "react" {
|
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
export interface GoabIconProps extends Margins, DataAttributes {
|
|
13
|
+
/** @required The icon type to display. See GoabIconType for available icons. */
|
|
13
14
|
type: GoabIconType | GoabIconOverridesType;
|
|
15
|
+
/** Sets the size of the icon. Accepts numeric (1-6) or named sizes. @default "medium" */
|
|
14
16
|
size?: GoabIconSize;
|
|
17
|
+
/** Sets the icon theme. 'outline' shows stroked icons, 'filled' shows solid icons. @default "outline" */
|
|
15
18
|
theme?: GoabIconTheme;
|
|
19
|
+
/** When true, inverts the icon colors for use on dark backgrounds. */
|
|
16
20
|
inverted?: string | boolean;
|
|
21
|
+
/** Sets a custom fill color for the icon. Accepts any valid CSS color value. */
|
|
17
22
|
fillColor?: string;
|
|
23
|
+
/** Sets the opacity of the icon from 0 (transparent) to 1 (opaque). @default 1 */
|
|
18
24
|
opacity?: number;
|
|
25
|
+
/** Adds an accessible title to the icon SVG. Used by screen readers. */
|
|
19
26
|
title?: string;
|
|
27
|
+
/** Defines how the icon will be announced by screen readers. */
|
|
20
28
|
ariaLabel?: string;
|
|
29
|
+
/** Sets a data-testid attribute for automated testing. */
|
|
21
30
|
testId?: string;
|
|
22
31
|
}
|
|
23
32
|
interface WCProps extends Margins {
|
|
@@ -31,5 +40,6 @@ interface WCProps extends Margins {
|
|
|
31
40
|
arialabel?: string;
|
|
32
41
|
testid?: string;
|
|
33
42
|
}
|
|
43
|
+
/** A simple and universal graphic symbol representing an action, object, or concept to help guide the user. */
|
|
34
44
|
export declare function GoabIcon({ inverted, ...rest }: GoabIconProps): JSX.Element;
|
|
35
45
|
export {};
|
|
@@ -22,18 +22,31 @@ declare module "react" {
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
export interface GoabIconButtonProps extends Margins, DataAttributes {
|
|
25
|
+
/** @required Sets the icon. */
|
|
25
26
|
icon: GoabIconType;
|
|
27
|
+
/** Sets the size of button. @default "medium" */
|
|
26
28
|
size?: GoabIconSize;
|
|
29
|
+
/** Styles the button to show color, light, dark or destructive action. @default "color" */
|
|
27
30
|
variant?: GoabIconButtonVariant;
|
|
31
|
+
/** Sets the title of the button. */
|
|
28
32
|
title?: string;
|
|
33
|
+
/** Disables the button. */
|
|
29
34
|
disabled?: boolean;
|
|
35
|
+
/** Callback fired when the icon button is clicked. */
|
|
30
36
|
onClick?: () => void;
|
|
37
|
+
/** Sets a data-testid attribute for automated testing. */
|
|
31
38
|
testId?: string;
|
|
39
|
+
/** Sets the aria-label of the button. */
|
|
32
40
|
ariaLabel?: string;
|
|
41
|
+
/** Action identifier passed in click events for event delegation patterns. */
|
|
33
42
|
action?: string;
|
|
43
|
+
/** Multiple argument values passed with the action in click events. */
|
|
34
44
|
actionArgs?: Record<string, unknown>;
|
|
45
|
+
/** Single argument value passed with the action in click events. */
|
|
35
46
|
actionArg?: string;
|
|
47
|
+
/** Content rendered inside the icon button. */
|
|
36
48
|
children?: ReactNode;
|
|
37
49
|
}
|
|
50
|
+
/** A compact button with an icon and no text. */
|
|
38
51
|
export declare function GoabIconButton({ variant, size, disabled, onClick, actionArgs, actionArg, children, ...rest }: GoabIconButtonProps): JSX.Element;
|
|
39
52
|
export {};
|
package/lib/input/input.d.ts
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import { JSX } from 'react';
|
|
2
2
|
import { GoabAutoCapitalize, GoabDate, GoabIconType, GoabInputOnBlurDetail, GoabInputOnChangeDetail, GoabInputOnFocusDetail, GoabInputOnKeyPressDetail, GoabInputSize, GoabInputType, Margins, DataAttributes } from '@abgov/ui-components-common';
|
|
3
|
-
export interface IgnoreMe {
|
|
4
|
-
ignore: string;
|
|
5
|
-
}
|
|
6
3
|
interface WCProps extends Margins {
|
|
7
4
|
type?: GoabInputType;
|
|
8
5
|
name: string;
|
|
@@ -44,30 +41,55 @@ declare module "react" {
|
|
|
44
41
|
}
|
|
45
42
|
}
|
|
46
43
|
interface BaseProps extends Margins, DataAttributes {
|
|
44
|
+
/** Name of input value that is received in event detail payloads. */
|
|
47
45
|
name: string;
|
|
46
|
+
/** Sets the id attribute of the input element. */
|
|
48
47
|
id?: string;
|
|
48
|
+
/** Debounce delay in milliseconds before firing the change event. 0 means no debounce. */
|
|
49
49
|
debounce?: number;
|
|
50
|
+
/** Sets the input disabled state. */
|
|
50
51
|
disabled?: boolean;
|
|
52
|
+
/** Controls automatic capitalization behavior on supported mobile browsers. */
|
|
51
53
|
autoCapitalize?: GoabAutoCapitalize;
|
|
54
|
+
/** Sets the autocomplete attribute for the input element. */
|
|
52
55
|
autoComplete?: string;
|
|
56
|
+
/** Sets placeholder text when the input is empty. */
|
|
53
57
|
placeholder?: string;
|
|
58
|
+
/** Sets the icon shown before the value. */
|
|
54
59
|
leadingIcon?: GoabIconType;
|
|
60
|
+
/** Sets the icon shown after the value. */
|
|
55
61
|
trailingIcon?: GoabIconType;
|
|
62
|
+
/** Callback fired when the trailing icon is clicked. */
|
|
56
63
|
onTrailingIconClick?: () => void;
|
|
64
|
+
/** Sets the visual style variant. @default "goa" */
|
|
57
65
|
variant?: "goa" | "bare";
|
|
66
|
+
/** Sets focus on initial render or controlled updates. */
|
|
58
67
|
focused?: boolean;
|
|
68
|
+
/** Sets the readonly state. */
|
|
59
69
|
readonly?: boolean;
|
|
70
|
+
/** Sets the error state styling. */
|
|
60
71
|
error?: boolean;
|
|
72
|
+
/** Sets the width of the input field. */
|
|
61
73
|
width?: string;
|
|
74
|
+
/** @deprecated Use leadingContent instead. */
|
|
62
75
|
prefix?: string;
|
|
76
|
+
/** @deprecated Use trailingContent instead. */
|
|
63
77
|
suffix?: string;
|
|
78
|
+
/** Sets a data-testid attribute for automated testing. */
|
|
64
79
|
testId?: string;
|
|
80
|
+
/** Sets the aria-label used by assistive technologies. */
|
|
65
81
|
ariaLabel?: string;
|
|
82
|
+
/** Sets content in the leading slot. */
|
|
66
83
|
leadingContent?: React.ReactNode;
|
|
84
|
+
/** Sets content in the trailing slot. */
|
|
67
85
|
trailingContent?: React.ReactNode;
|
|
86
|
+
/** Sets the maximum number of characters. */
|
|
68
87
|
maxLength?: number;
|
|
88
|
+
/** Sets the aria-label for an interactive trailing icon. */
|
|
69
89
|
trailingIconAriaLabel?: string;
|
|
90
|
+
/** Sets text alignment. @default "left" */
|
|
70
91
|
textAlign?: "left" | "right";
|
|
92
|
+
/** Sets the input size. @default "default" */
|
|
71
93
|
size?: GoabInputSize;
|
|
72
94
|
}
|
|
73
95
|
type OnChange<T = string> = (detail: GoabInputOnChangeDetail<T>) => void;
|
|
@@ -75,13 +97,21 @@ type OnFocus<T = string> = (detail: GoabInputOnFocusDetail<T>) => void;
|
|
|
75
97
|
type OnBlur<T = string> = (detail: GoabInputOnBlurDetail<T>) => void;
|
|
76
98
|
type OnKeyPress<T = string> = (detail: GoabInputOnKeyPressDetail<T>) => void;
|
|
77
99
|
export interface GoabInputProps extends BaseProps {
|
|
100
|
+
/** Callback fired when the input value changes. Receives GoabInputOnChangeDetail. */
|
|
78
101
|
onChange?: OnChange<string>;
|
|
102
|
+
/** Bound to the current value of the input field. */
|
|
79
103
|
value?: string;
|
|
104
|
+
/** Minimum value. Supports any number, or ISO 8601 format for date/datetime types. */
|
|
80
105
|
min?: number | string;
|
|
106
|
+
/** Maximum value. Supports any number, or ISO 8601 format for date/datetime types. */
|
|
81
107
|
max?: number | string;
|
|
108
|
+
/** How much a number or date value should change by. @default 1 */
|
|
82
109
|
step?: number;
|
|
110
|
+
/** Callback fired when the input receives focus. Receives GoabInputOnFocusDetail. */
|
|
83
111
|
onFocus?: OnFocus<string>;
|
|
112
|
+
/** Callback fired when the input loses focus. Receives GoabInputOnBlurDetail. */
|
|
84
113
|
onBlur?: OnBlur<string>;
|
|
114
|
+
/** Callback fired when a key is pressed in the input. Receives GoabInputOnKeyPressDetail. */
|
|
85
115
|
onKeyPress?: OnKeyPress<string>;
|
|
86
116
|
}
|
|
87
117
|
interface GoabNumberInputProps extends BaseProps {
|
|
@@ -104,20 +134,34 @@ interface GoabDateInputProps extends BaseProps {
|
|
|
104
134
|
onBlur?: OnBlur<GoabDate>;
|
|
105
135
|
onKeyPress?: OnKeyPress<GoabDate>;
|
|
106
136
|
}
|
|
137
|
+
/** A single-line field where users can input and edit text. */
|
|
107
138
|
export declare function GoabInput({ variant, textAlign, size, focused, disabled, readonly, error, leadingContent, trailingContent, onTrailingIconClick, onChange, onFocus, onBlur, onKeyPress, ...rest }: GoabInputProps & {
|
|
108
139
|
type?: GoabInputType;
|
|
109
140
|
}): JSX.Element;
|
|
141
|
+
/** A single-line field where users can input and edit text. */
|
|
110
142
|
export declare function GoabInputText(props: GoabInputProps): JSX.Element;
|
|
143
|
+
/** A single-line field where users can enter masked password text. */
|
|
111
144
|
export declare function GoabInputPassword(props: GoabInputProps): JSX.Element;
|
|
145
|
+
/** A single-line field where users can enter or select a date. */
|
|
112
146
|
export declare function GoabInputDate({ value, min, max, ...props }: GoabDateInputProps): JSX.Element;
|
|
147
|
+
/** A single-line field where users can enter or select a time. */
|
|
113
148
|
export declare function GoabInputTime({ value, min, max, ...props }: GoabInputProps): JSX.Element;
|
|
149
|
+
/** A single-line field where users can enter a date and time. */
|
|
114
150
|
export declare function GoabInputDateTime({ value, min, max, ...props }: GoabDateInputProps): JSX.Element;
|
|
151
|
+
/** A single-line field where users can enter an email address. */
|
|
115
152
|
export declare function GoabInputEmail(props: GoabInputProps): JSX.Element;
|
|
153
|
+
/** A single-line field where users can enter search terms. */
|
|
116
154
|
export declare function GoabInputSearch(props: GoabInputProps): JSX.Element;
|
|
155
|
+
/** A single-line field where users can enter a URL. */
|
|
117
156
|
export declare function GoabInputUrl(props: GoabInputProps): JSX.Element;
|
|
157
|
+
/** A single-line field where users can enter a phone number. */
|
|
118
158
|
export declare function GoabInputTel(props: GoabInputProps): JSX.Element;
|
|
159
|
+
/** A control that allows users to select a file for upload. */
|
|
119
160
|
export declare function GoabInputFile(props: GoabInputProps): JSX.Element;
|
|
161
|
+
/** A single-line field where users can enter or select a month. */
|
|
120
162
|
export declare function GoabInputMonth(props: GoabInputProps): JSX.Element;
|
|
163
|
+
/** A single-line field where users can input and edit numeric values. */
|
|
121
164
|
export declare function GoabInputNumber({ min, max, value, textAlign, ...props }: GoabNumberInputProps): JSX.Element;
|
|
165
|
+
/** A range input where users can choose a numeric value within minimum and maximum limits. */
|
|
122
166
|
export declare function GoabInputRange(props: GoabInputProps): JSX.Element;
|
|
123
167
|
export default GoabInput;
|
|
@@ -13,11 +13,17 @@ declare module "react" {
|
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
export interface GoabLinearProgressProps {
|
|
16
|
+
/** Progress value (0-100). When undefined, shows an indeterminate loading animation. */
|
|
16
17
|
progress?: number | null;
|
|
18
|
+
/** Controls visibility of the percentage text. @default "visible" */
|
|
17
19
|
percentVisibility?: "visible" | "hidden" | undefined;
|
|
20
|
+
/** Accessible label for the progress bar. */
|
|
18
21
|
ariaLabel?: string;
|
|
22
|
+
/** ID of the element that labels this progress bar. */
|
|
19
23
|
ariaLabelledBy?: string;
|
|
24
|
+
/** Sets a data-testid attribute for automated testing. */
|
|
20
25
|
testId?: string;
|
|
21
26
|
}
|
|
27
|
+
/** Provide visual feedback to users while loading. */
|
|
22
28
|
export declare const GoabLinearProgress: ({ progress, percentVisibility, ariaLabel, ariaLabelledBy, testId, }: GoabLinearProgressProps) => import("react/jsx-runtime").JSX.Element;
|
|
23
29
|
export default GoabLinearProgress;
|
package/lib/link/link.d.ts
CHANGED
|
@@ -18,15 +18,25 @@ declare module "react" {
|
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
export interface GoabLinkProps extends Margins, DataAttributes {
|
|
21
|
+
/** @required Content rendered inside the link. */
|
|
22
|
+
children: ReactNode;
|
|
23
|
+
/** Icon displayed before the link text. */
|
|
21
24
|
leadingIcon?: GoabIconType;
|
|
25
|
+
/** Icon displayed after the link text. */
|
|
22
26
|
trailingIcon?: GoabIconType;
|
|
27
|
+
/** Custom action event name to dispatch when the link is clicked. */
|
|
23
28
|
action?: string;
|
|
29
|
+
/** Object of arguments to pass with the action event. */
|
|
24
30
|
actionArgs?: Record<string, unknown>;
|
|
31
|
+
/** Single argument to pass with the action event. Deprecated, use actionArgs instead. */
|
|
25
32
|
actionArg?: string;
|
|
33
|
+
/** Sets the color theme. 'interactive' for blue, 'dark' for black, 'light' for white text. @default "interactive" */
|
|
26
34
|
color?: GoabLinkColor;
|
|
35
|
+
/** Sets the text size and corresponding icon size. @default "medium" */
|
|
27
36
|
size?: GoabLinkSize;
|
|
37
|
+
/** Sets a data-testid attribute for automated testing. */
|
|
28
38
|
testId?: string;
|
|
29
|
-
children: ReactNode;
|
|
30
39
|
}
|
|
40
|
+
/** Wraps an anchor element to add icons or margins. */
|
|
31
41
|
export declare function GoabLink({ actionArgs, actionArg, color, size, children, ...rest }: GoabLinkProps): import("react/jsx-runtime").JSX.Element;
|
|
32
42
|
export default GoabLink;
|