@abgov/react-components 6.11.0 → 7.0.0-dev.10

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.
Files changed (134) hide show
  1. package/index.d.ts +5 -0
  2. package/index.js +3736 -1776
  3. package/index.js.map +1 -1
  4. package/index.mjs +3676 -1716
  5. package/index.mjs.map +1 -1
  6. package/lib/accordion/accordion.d.ts +13 -2
  7. package/lib/app-header/app-header.d.ts +14 -2
  8. package/lib/app-header-menu/app-header-menu.d.ts +14 -7
  9. package/lib/badge/badge.d.ts +32 -18
  10. package/lib/block/block.d.ts +9 -0
  11. package/lib/button/button.d.ts +37 -0
  12. package/lib/button-group/button-group.d.ts +5 -0
  13. package/lib/calendar/calendar.d.ts +25 -1
  14. package/lib/callout/callout.d.ts +31 -2
  15. package/lib/card/card-actions.d.ts +2 -0
  16. package/lib/card/card-content.d.ts +2 -0
  17. package/lib/card/card-group.d.ts +2 -0
  18. package/lib/card/card-image.d.ts +3 -0
  19. package/lib/card/card.d.ts +5 -0
  20. package/lib/checkbox/checkbox.d.ts +49 -3
  21. package/lib/checkbox-list/checkbox-list.d.ts +21 -8
  22. package/lib/chip/chip.d.ts +11 -2
  23. package/lib/circular-progress/circular-progress.d.ts +7 -0
  24. package/lib/container/container.d.ts +18 -5
  25. package/lib/data-grid/data-grid.d.ts +6 -1
  26. package/lib/date-picker/date-picker.d.ts +35 -4
  27. package/lib/details/details.d.ts +7 -1
  28. package/lib/divider/divider.d.ts +2 -0
  29. package/lib/drawer/drawer.d.ts +27 -2
  30. package/lib/dropdown/dropdown-item.d.ts +23 -0
  31. package/lib/dropdown/dropdown.d.ts +56 -5
  32. package/lib/file-upload-card/file-upload-card.d.ts +27 -0
  33. package/lib/file-upload-input/file-upload-input.d.ts +23 -1
  34. package/lib/filter-chip/filter-chip.d.ts +31 -3
  35. package/lib/footer/footer.d.ts +20 -3
  36. package/lib/footer-meta-section/footer-meta-section.d.ts +13 -0
  37. package/lib/footer-nav-section/footer-nav-section.d.ts +18 -1
  38. package/lib/form/fieldset.d.ts +7 -1
  39. package/lib/form/public-form-page.d.ts +13 -5
  40. package/lib/form/public-form-summary.d.ts +2 -0
  41. package/lib/form/public-form.d.ts +8 -1
  42. package/lib/form/public-subform-index.d.ts +7 -1
  43. package/lib/form/public-subform.d.ts +8 -1
  44. package/lib/form/task-list.d.ts +4 -1
  45. package/lib/form/task.d.ts +4 -1
  46. package/lib/form-item/form-item.d.ts +37 -8
  47. package/lib/form-step/form-step.d.ts +3 -0
  48. package/lib/form-stepper/form-stepper.d.ts +5 -0
  49. package/lib/grid/grid.d.ts +6 -1
  50. package/lib/hero-banner/hero-banner-actions.d.ts +2 -0
  51. package/lib/hero-banner/hero-banner.d.ts +9 -0
  52. package/lib/icon/icon.d.ts +13 -0
  53. package/lib/icon-button/icon-button.d.ts +18 -2
  54. package/lib/input/input.d.ts +89 -4
  55. package/lib/linear-progress/linear-progress.d.ts +6 -0
  56. package/lib/link/link.d.ts +33 -4
  57. package/lib/menu-button/menu-action.d.ts +5 -0
  58. package/lib/menu-button/menu-button.d.ts +20 -52
  59. package/lib/microsite-header/microsite-header.d.ts +9 -0
  60. package/lib/modal/modal.d.ts +34 -1
  61. package/lib/notification/notification.d.ts +30 -2
  62. package/lib/one-column-layout/one-column-layout.d.ts +2 -0
  63. package/lib/page-block/page-block.d.ts +4 -0
  64. package/lib/pages/pages.d.ts +3 -0
  65. package/lib/pagination/pagination.d.ts +25 -2
  66. package/lib/popover/popover.d.ts +11 -5
  67. package/lib/push-drawer/push-drawer.d.ts +17 -8
  68. package/lib/radio-group/radio-group.d.ts +36 -2
  69. package/lib/radio-group/radio.d.ts +38 -1
  70. package/lib/side-menu/side-menu.d.ts +16 -2
  71. package/lib/side-menu-group/side-menu-group.d.ts +19 -1
  72. package/lib/side-menu-heading/side-menu-heading.d.ts +19 -2
  73. package/lib/skeleton/skeleton.d.ts +7 -1
  74. package/lib/spacer/spacer.d.ts +4 -0
  75. package/lib/spinner/spinner.d.ts +6 -0
  76. package/lib/tab/tab.d.ts +6 -1
  77. package/lib/table/table-sort-header.d.ts +20 -2
  78. package/lib/table/table.d.ts +31 -2
  79. package/lib/tabs/tabs.d.ts +29 -2
  80. package/lib/temporary-notification-ctrl/temporary-notification-ctrl.d.ts +4 -0
  81. package/lib/text/text.d.ts +8 -1
  82. package/lib/textarea/textarea.d.ts +49 -1
  83. package/lib/three-column-layout/three-column-layout.d.ts +11 -1
  84. package/lib/tooltip/tooltip.d.ts +7 -0
  85. package/lib/two-column-layout/two-column-layout.d.ts +9 -2
  86. package/lib/work-side-menu/work-side-menu.d.ts +47 -0
  87. package/lib/work-side-menu-group/work-side-menu-group.d.ts +30 -0
  88. package/lib/work-side-menu-item/work-side-menu-item.d.ts +44 -0
  89. package/lib/work-side-notification-item/work-side-notification-item.d.ts +40 -0
  90. package/lib/work-side-notification-panel/work-side-notification-panel.d.ts +32 -0
  91. package/package.json +1 -6
  92. package/experimental/badge/badge.d.ts +0 -33
  93. package/experimental/button/button.d.ts +0 -43
  94. package/experimental/calendar/calendar.d.ts +0 -30
  95. package/experimental/callout/callout.d.ts +0 -33
  96. package/experimental/checkbox/checkbox.d.ts +0 -52
  97. package/experimental/date-picker/date-picker.d.ts +0 -43
  98. package/experimental/drawer/drawer.d.ts +0 -31
  99. package/experimental/dropdown/dropdown-item.d.ts +0 -26
  100. package/experimental/dropdown/dropdown.d.ts +0 -62
  101. package/experimental/file-upload-card/file-upload-card.d.ts +0 -32
  102. package/experimental/file-upload-input/file-upload-input.d.ts +0 -27
  103. package/experimental/filter-chip/filter-chip.d.ts +0 -31
  104. package/experimental/footer/footer.d.ts +0 -24
  105. package/experimental/footer-meta-section/footer-meta-section.d.ts +0 -18
  106. package/experimental/footer-nav-section/footer-nav-section.d.ts +0 -22
  107. package/experimental/form-hook.d.ts +0 -8
  108. package/experimental/form-item/form-item.d.ts +0 -46
  109. package/experimental/index.d.ts +0 -32
  110. package/experimental/input/input.d.ts +0 -124
  111. package/experimental/link/link.d.ts +0 -32
  112. package/experimental/modal/modal.d.ts +0 -44
  113. package/experimental/notification/notification.d.ts +0 -31
  114. package/experimental/pagination/pagination.d.ts +0 -29
  115. package/experimental/radio-group/radio-group.d.ts +0 -40
  116. package/experimental/radio-group/radio.d.ts +0 -42
  117. package/experimental/side-menu/side-menu.d.ts +0 -19
  118. package/experimental/side-menu-group/side-menu-group.d.ts +0 -24
  119. package/experimental/side-menu-heading/side-menu-heading.d.ts +0 -23
  120. package/experimental/table/table-sort-header.d.ts +0 -20
  121. package/experimental/table/table.d.ts +0 -30
  122. package/experimental/tabs/tabs.d.ts +0 -27
  123. package/experimental/textarea/textarea.d.ts +0 -53
  124. package/experimental/work-side-menu/work-side-menu.d.ts +0 -34
  125. package/experimental/work-side-menu-group/work-side-menu-group.d.ts +0 -22
  126. package/experimental/work-side-menu-item/work-side-menu-item.d.ts +0 -32
  127. package/experimental.js +0 -1245
  128. package/experimental.js.map +0 -1
  129. package/experimental.mjs +0 -1245
  130. package/experimental.mjs.map +0 -1
  131. package/parseISO-BHUUf1QW.mjs +0 -1693
  132. package/parseISO-BHUUf1QW.mjs.map +0 -1
  133. package/parseISO-Dj57mwuH.js +0 -1692
  134. package/parseISO-Dj57mwuH.js.map +0 -1
@@ -1,11 +1,39 @@
1
- import { GoabAriaLiveType, GoabNotificationType } from '@abgov/ui-components-common';
1
+ import { GoabAriaLiveType, GoabNotificationEmphasis, GoabNotificationType } from '@abgov/ui-components-common';
2
+ interface WCProps {
3
+ ref: React.RefObject<HTMLElement | null>;
4
+ type: GoabNotificationType;
5
+ maxcontentwidth?: string;
6
+ arialive?: GoabAriaLiveType;
7
+ testid?: string;
8
+ emphasis?: GoabNotificationEmphasis;
9
+ compact?: string;
10
+ version?: string;
11
+ }
12
+ declare module "react" {
13
+ namespace JSX {
14
+ interface IntrinsicElements {
15
+ "goa-notification": WCProps & React.HTMLAttributes<HTMLButtonElement>;
16
+ }
17
+ }
18
+ }
2
19
  export interface GoabNotificationProps {
20
+ /** Define the context and colour of the notification. */
3
21
  type?: GoabNotificationType;
22
+ /** Indicates how assistive technology should handle updates to the live region. @default "polite" */
4
23
  ariaLive?: GoabAriaLiveType;
24
+ /** Maximum width of the content area. @default "100%" */
5
25
  maxContentWidth?: string;
26
+ /** Sets the visual prominence. 'high' for full background, 'low' for a bordered style. @default "high" */
27
+ emphasis?: GoabNotificationEmphasis;
28
+ /** When true, reduces padding for a more compact notification. */
29
+ compact?: boolean;
30
+ /** Content rendered inside the notification. */
6
31
  children?: React.ReactNode;
32
+ /** Callback fired when the notification is dismissed. */
7
33
  onDismiss?: () => void;
34
+ /** Sets a data-testid attribute for automated testing. */
8
35
  testId?: string;
9
36
  }
10
- export declare const GoabNotification: ({ type, ariaLive, maxContentWidth, children, testId, onDismiss, }: GoabNotificationProps) => import("react/jsx-runtime").JSX.Element;
37
+ /** Display important page level information or notifications. */
38
+ export declare const GoabNotification: ({ type, emphasis, compact, ariaLive, maxContentWidth, children, testId, onDismiss, }: GoabNotificationProps) => import("react/jsx-runtime").JSX.Element;
11
39
  export default GoabNotification;
@@ -7,8 +7,10 @@ declare module "react" {
7
7
  }
8
8
  }
9
9
  export interface GoabPageProps {
10
+ /** Content rendered inside the one-column layout. */
10
11
  children?: ReactNode;
11
12
  }
12
13
  export type PageProps = GoabPageProps;
14
+ /** Organizes page content in a single responsive column. */
13
15
  export declare function GoabOneColumnLayout(props: GoabPageProps): JSX.Element;
14
16
  export default GoabOneColumnLayout;
@@ -12,10 +12,14 @@ declare module "react" {
12
12
  }
13
13
  }
14
14
  export interface GoabPageBlockProps {
15
+ /** Maximum width of the content area. Use "full" for 100% width or a CSS dimension like "1200px". @default "full" */
15
16
  width?: GoabPageBlockSize;
17
+ /** Sets a data-testid attribute for automated testing. */
16
18
  testId?: string;
19
+ /** Content rendered inside the page block. */
17
20
  children?: ReactNode;
18
21
  }
19
22
  export type PageBlockProps = GoabPageBlockProps;
23
+ /** Full-width section with optional background. */
20
24
  export declare function GoabPageBlock(props: PageBlockProps): JSX.Element;
21
25
  export {};
@@ -11,8 +11,11 @@ declare module "react" {
11
11
  }
12
12
  }
13
13
  export interface GoabPagesProps extends Margins {
14
+ /** The currently visible page (1-based index). @default 1 */
14
15
  current?: number;
16
+ /** Page content to show or hide based on the current page index. */
15
17
  children?: ReactNode;
16
18
  }
19
+ /** Container for paginated content views. */
17
20
  export declare function GoabPages(props: GoabPagesProps): JSX.Element;
18
21
  export default GoabPages;
@@ -1,12 +1,35 @@
1
1
  import { GoabPaginationOnChangeDetail, Margins } from '@abgov/ui-components-common';
2
+ interface WCProps extends Margins {
3
+ ref?: React.RefObject<HTMLElement | null>;
4
+ itemcount: number;
5
+ perpagecount?: number;
6
+ pagenumber: number;
7
+ variant?: "all" | "links-only";
8
+ testid?: string;
9
+ version?: string;
10
+ }
11
+ declare module "react" {
12
+ namespace JSX {
13
+ interface IntrinsicElements {
14
+ "goa-pagination": WCProps & React.HTMLAttributes<HTMLElement>;
15
+ }
16
+ }
17
+ }
2
18
  export interface GoabPaginationProps extends Margins {
19
+ /** @required Total number of data items within all pages. */
3
20
  itemCount: number;
4
- perPageCount?: number;
21
+ /** @required The current page being viewed (non-zero based). */
5
22
  pageNumber: number;
6
- variant?: "all" | "links-only";
23
+ /** @required Callback fired when the user navigates to a different page. */
7
24
  onChange: (detail: GoabPaginationOnChangeDetail) => void;
25
+ /** Number of data items shown per page. @default 10 */
26
+ perPageCount?: number;
27
+ /** Controls which nav controls are visible. @default "all" */
28
+ variant?: "all" | "links-only";
29
+ /** Sets a data-testid attribute for automated testing. */
8
30
  testId?: string;
9
31
  }
10
32
  export type PaginationProps = GoabPaginationProps;
33
+ /** Help users navigation between multiple pages or screens as part of a set. */
11
34
  export declare function GoabPagination({ onChange, ...props }: GoabPaginationProps): import("react/jsx-runtime").JSX.Element;
12
35
  export default GoabPagination;
@@ -16,17 +16,23 @@ declare module "react" {
16
16
  }
17
17
  }
18
18
  export interface GoabPopoverProps extends Margins, DataAttributes {
19
- target?: ReactNode;
19
+ /** Content rendered inside the popover body. */
20
+ children: ReactNode;
21
+ /** @required Sets the element used as the popover trigger. */
22
+ target: ReactNode;
23
+ /** Sets a data-testid attribute for automated testing. */
20
24
  testId?: string;
25
+ /** Sets the maximum width of the popover container. @default "320px" */
21
26
  maxWidth?: string;
27
+ /** Sets the minimum width of the popover container. */
22
28
  minWidth?: string;
29
+ /** Sets if the popover has padding. Use false when content needs to be flush with boundaries. @default true */
23
30
  padded?: boolean;
31
+ /** Provides control to where the popover content is positioned. @default "auto" */
24
32
  position?: GoabPopoverPosition;
25
- children: ReactNode;
26
- /***
27
- * @deprecated This property has no effect and will be removed in a future version
28
- */
33
+ /** @deprecated This property has no effect and will be removed in a future version. */
29
34
  relative?: boolean;
30
35
  }
36
+ /** A small overlay that opens on demand, used in other components. */
31
37
  export declare function GoabPopover({ target, padded, relative, children, ...rest }: GoabPopoverProps): JSX.Element;
32
38
  export default GoabPopover;
@@ -1,9 +1,10 @@
1
- import { ReactNode } from 'react';
1
+ import { ReactNode, JSX } from 'react';
2
2
  interface WCProps {
3
3
  open?: boolean;
4
- testid?: string;
5
4
  heading?: string;
6
5
  width?: string;
6
+ testid?: string;
7
+ version?: string;
7
8
  ref: React.RefObject<HTMLElement | null>;
8
9
  }
9
10
  declare module "react" {
@@ -14,13 +15,21 @@ declare module "react" {
14
15
  }
15
16
  }
16
17
  export interface GoabPushDrawerProps {
17
- testid?: string;
18
- open?: boolean;
19
- heading?: string;
20
- width?: string;
21
- actions?: ReactNode | undefined;
18
+ /** @required Content rendered inside the push drawer body. */
22
19
  children: ReactNode;
20
+ /** @required Callback fired when the push drawer is closed. */
23
21
  onClose: () => void;
22
+ /** Controls the open/closed state of the push drawer. */
23
+ open?: boolean;
24
+ /** Sets the heading text or custom heading content. */
25
+ heading?: string | ReactNode;
26
+ /** Sets the width of the push drawer panel. @default "492px" */
27
+ width?: string;
28
+ /** Sets a data-testid attribute for automated testing. */
29
+ testId?: string;
30
+ /** Content rendered in the actions slot, typically action buttons. */
31
+ actions?: ReactNode;
24
32
  }
25
- export declare function GoabPushDrawer({ testid, open, heading, width, actions, children, onClose, }: GoabPushDrawerProps): import("react/jsx-runtime").JSX.Element;
33
+ /** A panel that pushes the main page content aside on desktop, falling back to an overlay drawer on smaller screens. */
34
+ export declare function GoabPushDrawer({ open, heading, width, testId, actions, children, onClose, }: GoabPushDrawerProps): JSX.Element;
26
35
  export default GoabPushDrawer;
@@ -1,17 +1,51 @@
1
1
  import { JSX } from 'react';
2
- import { GoabRadioGroupOnChangeDetail, GoabRadioGroupOrientation, Margins, DataAttributes } from '@abgov/ui-components-common';
2
+ import { GoabRadioGroupOnChangeDetail, GoabRadioGroupOrientation, GoabRadioGroupSize, Margins, DataAttributes } from '@abgov/ui-components-common';
3
3
  export * from './radio';
4
+ interface WCProps extends Margins {
5
+ name: string;
6
+ value?: string;
7
+ id?: string;
8
+ orientation?: GoabRadioGroupOrientation;
9
+ disabled?: string;
10
+ error?: string;
11
+ arialabel?: string;
12
+ testid?: string;
13
+ size?: GoabRadioGroupSize;
14
+ version?: string;
15
+ }
16
+ declare module "react" {
17
+ namespace JSX {
18
+ interface IntrinsicElements {
19
+ "goa-radio-group": WCProps & React.HTMLAttributes<HTMLElement> & {
20
+ ref: React.RefObject<HTMLElement | null>;
21
+ };
22
+ }
23
+ }
24
+ }
4
25
  export interface GoabRadioGroupProps extends Margins, DataAttributes {
26
+ /** @required The name for the radio group. Used for accessibility and change events. */
5
27
  name: string;
28
+ /** The currently selected value in the radio group. */
6
29
  value?: string;
30
+ /** The identifier for the radio group element. */
7
31
  id?: string;
32
+ /** Disables all radio items in the group. */
8
33
  disabled?: boolean;
34
+ /** Sets the layout direction. 'vertical' stacks items, 'horizontal' places them in a row. @default "vertical" */
9
35
  orientation?: GoabRadioGroupOrientation;
36
+ /** Sets the size of all radio items. 'compact' reduces spacing for dense layouts. @default "default" */
37
+ size?: GoabRadioGroupSize;
38
+ /** Sets a data-testid attribute for automated testing. */
10
39
  testId?: string;
40
+ /** Shows an error state on all radio items in the group. */
11
41
  error?: boolean;
42
+ /** Defines how the radio group will be announced by screen readers. */
12
43
  ariaLabel?: string;
44
+ /** Radio items to render inside the group. */
13
45
  children?: React.ReactNode;
46
+ /** Callback fired when the selected radio item changes. */
14
47
  onChange?: (detail: GoabRadioGroupOnChangeDetail) => void;
15
48
  }
16
- export declare function GoabRadioGroup({ disabled, error, onChange, name, children, ...rest }: GoabRadioGroupProps): JSX.Element;
49
+ /** Allow users to select one option from a set. */
50
+ export declare function GoabRadioGroup({ disabled, error, onChange, name, children, size, ...rest }: GoabRadioGroupProps): JSX.Element;
17
51
  export default GoabRadioGroup;
@@ -1,18 +1,55 @@
1
1
  import { Margins } from '@abgov/ui-components-common';
2
2
  import { JSX } from 'react';
3
+ interface WCProps extends Margins {
4
+ name?: string;
5
+ value?: string;
6
+ description?: string | React.ReactNode;
7
+ reveal?: React.ReactNode;
8
+ revealarialabel?: string;
9
+ label?: string;
10
+ maxwidth?: string;
11
+ disabled?: string;
12
+ checked?: string;
13
+ error?: string;
14
+ arialabel?: string;
15
+ compact?: string;
16
+ version?: string;
17
+ }
18
+ declare module "react" {
19
+ namespace JSX {
20
+ interface IntrinsicElements {
21
+ "goa-radio-item": WCProps & React.HTMLAttributes<HTMLElement>;
22
+ }
23
+ }
24
+ }
3
25
  export interface GoabRadioItemProps extends Margins {
26
+ /** The value of this radio option. Will be emitted when selected. */
4
27
  value?: string;
28
+ /** The display label for this radio option. Falls back to value if not provided. */
5
29
  label?: string;
30
+ /** The name of the radio group. Inherited from the parent RadioGroup if not set. */
6
31
  name?: string;
32
+ /** Additional description text displayed below the label. */
7
33
  description?: string | React.ReactNode;
34
+ /** Content revealed below the radio option when it is selected. */
8
35
  reveal?: React.ReactNode;
36
+ /** Text announced by screen readers when the reveal content is displayed. */
9
37
  revealAriaLabel?: string;
38
+ /** Sets the maximum width of this radio item. */
10
39
  maxWidth?: string;
40
+ /** Disables this radio option. Also disabled if the parent RadioGroup is disabled. */
11
41
  disabled?: boolean;
42
+ /** Sets this radio option as checked/selected. */
12
43
  checked?: boolean;
44
+ /** Shows an error state on this radio option. */
13
45
  error?: boolean;
46
+ /** Reduces spacing for dense layouts. */
47
+ compact?: boolean;
48
+ /** Additional content rendered inside the radio item. */
14
49
  children?: React.ReactNode;
50
+ /** Defines how this option will be announced by screen readers. */
15
51
  ariaLabel?: string;
16
52
  }
17
- export declare function GoabRadioItem({ name, label, value, description, reveal, revealAriaLabel, maxWidth, disabled, checked, error, ariaLabel, children, mt, mr, mb, ml, }: GoabRadioItemProps): JSX.Element;
53
+ /** Individual radio option within a group. */
54
+ export declare function GoabRadioItem({ name, label, value, description, reveal, revealAriaLabel, maxWidth, disabled, checked, error, compact, ariaLabel, children, mt, mr, mb, ml, }: GoabRadioItemProps): JSX.Element;
18
55
  export default GoabRadioItem;
@@ -1,7 +1,21 @@
1
1
  import { ReactNode, JSX } from 'react';
2
+ interface WCProps {
3
+ testid?: string;
4
+ version?: string;
5
+ }
6
+ declare module "react" {
7
+ namespace JSX {
8
+ interface IntrinsicElements {
9
+ "goa-side-menu": WCProps & React.HTMLAttributes<HTMLElement>;
10
+ }
11
+ }
12
+ }
2
13
  export interface GoabSideMenuProps {
3
- testId?: string;
14
+ /** @required Navigation links and groups rendered inside the side menu. */
4
15
  children: ReactNode;
16
+ /** Sets a data-testid attribute for automated testing. */
17
+ testId?: string;
5
18
  }
6
- export declare function GoabSideMenu(props: GoabSideMenuProps): JSX.Element;
19
+ /** A side navigation that helps the user navigate between pages. */
20
+ export declare function GoabSideMenu({ testId, children }: GoabSideMenuProps): JSX.Element;
7
21
  export default GoabSideMenu;
@@ -1,10 +1,28 @@
1
1
  import { ReactNode, JSX } from 'react';
2
2
  import { GoabIconType, Margins } from '@abgov/ui-components-common';
3
+ interface WCProps extends Margins {
4
+ heading: string;
5
+ icon?: GoabIconType;
6
+ testid?: string;
7
+ version?: string;
8
+ }
9
+ declare module "react" {
10
+ namespace JSX {
11
+ interface IntrinsicElements {
12
+ "goa-side-menu-group": WCProps & React.HTMLAttributes<HTMLElement>;
13
+ }
14
+ }
15
+ }
3
16
  export interface GoabSideMenuGroupProps extends Margins {
17
+ /** @required The heading text for the menu group. */
4
18
  heading: string;
19
+ /** Icon displayed alongside the heading. */
5
20
  icon?: GoabIconType;
21
+ /** Sets a data-testid attribute for automated testing. */
6
22
  testId?: string;
23
+ /** Navigation links rendered inside the menu group. */
7
24
  children?: ReactNode;
8
25
  }
9
- export declare function GoabSideMenuGroup(props: GoabSideMenuGroupProps): JSX.Element;
26
+ /** Group of related side menu items. */
27
+ export declare function GoabSideMenuGroup({ heading, icon, testId, children, mt, mr, mb, ml, }: GoabSideMenuGroupProps): JSX.Element;
10
28
  export default GoabSideMenuGroup;
@@ -1,10 +1,27 @@
1
1
  import { GoabIconType } from '@abgov/ui-components-common';
2
2
  import { ReactNode } from 'react';
3
+ interface WCProps {
4
+ testid?: string;
5
+ icon?: GoabIconType;
6
+ version?: string;
7
+ }
8
+ declare module "react" {
9
+ namespace JSX {
10
+ interface IntrinsicElements {
11
+ "goa-side-menu-heading": WCProps & React.HTMLAttributes<HTMLElement>;
12
+ }
13
+ }
14
+ }
3
15
  export interface GoabSideMenuHeadingProps {
16
+ /** Icon displayed before the heading text. */
17
+ icon?: GoabIconType;
18
+ /** Content rendered in the meta slot, displayed alongside the heading. */
4
19
  meta?: ReactNode;
20
+ /** Sets a data-testid attribute for automated testing. */
5
21
  testId?: string;
6
- icon?: GoabIconType;
22
+ /** The heading text or content rendered inside the side menu heading. */
7
23
  children?: ReactNode;
8
24
  }
9
- export declare function GoabSideMenuHeading(props: GoabSideMenuHeadingProps): import("react/jsx-runtime").JSX.Element;
25
+ /** Section heading in side menu. */
26
+ export declare function GoabSideMenuHeading({ meta, testId, icon, children, }: GoabSideMenuHeadingProps): import("react/jsx-runtime").JSX.Element;
10
27
  export default GoabSideMenuHeading;
@@ -14,12 +14,18 @@ declare module "react" {
14
14
  }
15
15
  }
16
16
  export interface GoabSkeletonProps extends Margins {
17
+ /** @required Sets the skeleton shape to represent your content. */
18
+ type: GoabSkeletonType;
19
+ /** Sets the maximum width. Currently only used in card skeleton type. @default "300px" */
17
20
  maxWidth?: string;
21
+ /** Size can affect either the height, width or both for different skeleton types. @default "1" */
18
22
  size?: GoabSkeletonSize;
23
+ /** Used within components that contain multiple lines. Currently only used in card skeleton type. @default 3 */
19
24
  lineCount?: number;
20
- type: GoabSkeletonType;
25
+ /** Sets a data-testid attribute for automated testing. */
21
26
  testId?: string;
22
27
  }
23
28
  export type SkeletonProps = GoabSkeletonProps;
29
+ /** Provide visual feedback to users while loading a content heavy page or page element. */
24
30
  export declare const GoabSkeleton: ({ maxWidth, size, lineCount, type, testId, mt, mr, mb, ml, }: GoabSkeletonProps) => import("react/jsx-runtime").JSX.Element;
25
31
  export default GoabSkeleton;
@@ -12,9 +12,13 @@ declare module "react" {
12
12
  }
13
13
  }
14
14
  export interface GoabSpacerProps {
15
+ /** Horizontal spacing. @default "none" */
15
16
  hSpacing?: GoabSpacerHorizontalSpacing;
17
+ /** Vertical spacing. @default "none" */
16
18
  vSpacing?: GoabSpacerVerticalSpacing;
19
+ /** Sets a data-testid attribute for automated testing. */
17
20
  testId?: string;
18
21
  }
22
+ /** Negative area between the components and the interface. */
19
23
  export declare function GoabSpacer(props: GoabSpacerProps): import("react/jsx-runtime").JSX.Element;
20
24
  export default GoabSpacer;
@@ -15,12 +15,18 @@ declare module "react" {
15
15
  }
16
16
  }
17
17
  export interface GoabSpinnerProps {
18
+ /** @required Sets the spinner animation type. */
18
19
  type: GoabSpinnerType;
20
+ /** @required Sets the size of the spinner. */
19
21
  size: GoabSpinnerSize;
22
+ /** When true, inverts colors for use on dark backgrounds. */
20
23
  invert?: boolean;
24
+ /** Progress value (0-100). When set to 0 or greater, shows a progress spinner instead of infinite. */
21
25
  progress?: number;
26
+ /** Sets a data-testid attribute for automated testing. */
22
27
  testId?: string;
23
28
  }
24
29
  export type SpinnerProps = GoabSpinnerProps;
30
+ /** Loading indicator for async operations. */
25
31
  export declare function GoabSpinner({ type, size, progress, invert, testId, }: GoabSpinnerProps): JSX.Element;
26
32
  export default GoabSpinner;
package/lib/tab/tab.d.ts CHANGED
@@ -12,10 +12,15 @@ declare module "react" {
12
12
  }
13
13
  }
14
14
  export interface GoabTabItemProps {
15
+ /** The text label for this tab. Can also pass React nodes for custom heading content. */
15
16
  heading?: React.ReactNode;
17
+ /** When true, disables the tab so it cannot be selected. */
16
18
  disabled?: boolean;
19
+ /** Content rendered inside the tab panel. */
17
20
  children?: React.ReactNode;
21
+ /** URL-friendly identifier for the tab, used for hash-based navigation. */
18
22
  slug?: string;
19
23
  }
20
- export declare function GoabTab({ heading, disabled, slug, children }: GoabTabItemProps): JSX.Element;
24
+ /** Individual tab within a tabs component. */
25
+ export declare function GoabTab({ heading, disabled, slug, children, }: GoabTabItemProps): JSX.Element;
21
26
  export {};
@@ -1,9 +1,27 @@
1
- import { DataAttributes, GoabTableSortDirection } from '@abgov/ui-components-common';
1
+ import { DataAttributes, GoabTableSortDirection, GoabTableSortOrder } from '@abgov/ui-components-common';
2
2
  import { JSX } from 'react';
3
+ interface WCProps {
4
+ name?: string;
5
+ direction?: GoabTableSortDirection;
6
+ "sort-order"?: GoabTableSortOrder;
7
+ }
8
+ declare module "react" {
9
+ namespace JSX {
10
+ interface IntrinsicElements {
11
+ "goa-table-sort-header": WCProps & React.HTMLAttributes<HTMLElement>;
12
+ }
13
+ }
14
+ }
3
15
  export interface GoabTableSortProps extends DataAttributes {
16
+ /** Column name identifier for sorting. */
4
17
  name?: string;
18
+ /** Sets the sort direction indicator. @default "none" */
5
19
  direction?: GoabTableSortDirection;
20
+ /** Sort order number for multi-column sort display. Used for displaying priority numbers when multiple columns are sorted. */
21
+ sortOrder?: GoabTableSortOrder;
22
+ /** Content rendered inside the sort header button (typically the column heading text). */
6
23
  children?: React.ReactNode;
7
24
  }
8
- export declare function GoabTableSortHeader({ children, ...rest }: GoabTableSortProps): JSX.Element;
25
+ /** A set of structured data that is easy for a user to scan, examine, and compare. */
26
+ export declare function GoabTableSortHeader({ name, direction, sortOrder, children, ...rest }: GoabTableSortProps): JSX.Element;
9
27
  export default GoabTableSortHeader;
@@ -1,12 +1,41 @@
1
- import { GoabTableOnSortDetail, GoabTableVariant, Margins } from '@abgov/ui-components-common';
1
+ import { GoabTableOnSortDetail, GoabTableOnMultiSortDetail, GoabTableSortMode, GoabTableVariant, Margins } from '@abgov/ui-components-common';
2
2
  import { ReactNode } from 'react';
3
+ interface WCProps extends Margins {
4
+ ref?: React.RefObject<HTMLElement | null>;
5
+ width?: string;
6
+ stickyheader?: string;
7
+ variant?: GoabTableVariant;
8
+ "sort-mode"?: GoabTableSortMode;
9
+ testid?: string;
10
+ striped?: string;
11
+ version?: string;
12
+ }
13
+ declare module "react" {
14
+ namespace JSX {
15
+ interface IntrinsicElements {
16
+ "goa-table": WCProps & React.HTMLAttributes<HTMLElement>;
17
+ }
18
+ }
19
+ }
3
20
  export interface GoabTableProps extends Margins {
21
+ /** Width of the table. By default it will fit the enclosed content. */
4
22
  width?: string;
23
+ /** Callback fired when a single-column sort header is clicked. */
5
24
  onSort?: (detail: GoabTableOnSortDetail) => void;
25
+ /** Callback fired when multi-column sorting changes. */
26
+ onMultiSort?: (detail: GoabTableOnMultiSortDetail) => void;
27
+ /** Sort mode: "single" allows one column, "multi" allows up to 2 columns. @default "single" */
28
+ sortMode?: GoabTableSortMode;
29
+ /** A relaxed variant of the table with more vertical padding for the cells. @default "normal" */
6
30
  variant?: GoabTableVariant;
31
+ /** When true, alternates row background colors for improved readability. */
32
+ striped?: boolean;
33
+ /** Sets a data-testid attribute for automated testing. */
7
34
  testId?: string;
35
+ /** Content rendered inside the table (table rows, headers, etc.). */
8
36
  children?: ReactNode;
9
37
  }
10
38
  export type TableProps = GoabTableProps;
11
- export declare function GoabTable({ onSort, ...props }: GoabTableProps): import("react/jsx-runtime").JSX.Element;
39
+ /** A set of structured data that is easy for a user to scan, examine, and compare. */
40
+ export declare function GoabTable({ onSort, onMultiSort, sortMode, ...props }: GoabTableProps): import("react/jsx-runtime").JSX.Element;
12
41
  export default GoabTable;
@@ -1,11 +1,38 @@
1
1
  import { default as React, JSX } from 'react';
2
- import { GoabTabsOnChangeDetail, GoabTabsVariant } from '@abgov/ui-components-common';
2
+ import { GoabTabsOnChangeDetail, GoabTabsOrientation, GoabTabsVariant, GoabTabsNavigation } from '@abgov/ui-components-common';
3
+ interface WCProps {
4
+ initialtab?: number;
5
+ ref: React.RefObject<HTMLElement | null>;
6
+ onChange?: (tab: number) => void;
7
+ testid?: string;
8
+ variant?: GoabTabsVariant;
9
+ navigation?: GoabTabsNavigation;
10
+ version?: string;
11
+ orientation?: string;
12
+ }
13
+ declare module "react" {
14
+ namespace JSX {
15
+ interface IntrinsicElements {
16
+ "goa-tabs": WCProps & React.HTMLAttributes<HTMLElement>;
17
+ }
18
+ }
19
+ }
3
20
  export interface GoabTabsProps {
21
+ /** The initially active tab (1-based index). If not set, the first tab is active. */
4
22
  initialTab?: number;
23
+ /** Content rendered inside the tabs container, typically GoabTab components. */
5
24
  children?: React.ReactNode;
25
+ /** Sets a data-testid attribute for automated testing. */
6
26
  testId?: string;
27
+ /** Visual style variant. "segmented" shows pill-style tabs with animation. @default "default" */
7
28
  variant?: GoabTabsVariant;
29
+ /** Tab layout orientation. "auto" stacks vertically on mobile, "horizontal" keeps horizontal on all screen sizes. @default "auto" */
30
+ orientation?: GoabTabsOrientation;
31
+ /** Controls URL navigation mode on tab change. @default "hash" */
32
+ navigation?: GoabTabsNavigation;
33
+ /** Callback fired when the active tab changes. */
8
34
  onChange?: (detail: GoabTabsOnChangeDetail) => void;
9
35
  }
10
- export declare function GoabTabs({ initialTab, children, testId, variant, onChange, }: GoabTabsProps): JSX.Element;
36
+ /** Let users navigate between related sections of content, displaying one section at a time. */
37
+ export declare function GoabTabs({ initialTab, children, testId, onChange, variant, orientation, navigation, }: GoabTabsProps): JSX.Element;
11
38
  export default GoabTabs;
@@ -16,9 +16,13 @@ declare module "react" {
16
16
  }
17
17
  }
18
18
  export interface GoabTemporaryNotificationCtrlProps {
19
+ /** Vertical position of the notification container. @default "bottom" */
19
20
  verticalPosition?: SnackbarVerticalPosition;
21
+ /** Horizontal position of the notification container. @default "center" */
20
22
  horizontalPosition?: SnackbarHorizontalPosition;
23
+ /** Sets a data-testid attribute for automated testing. */
21
24
  testId?: string;
22
25
  }
26
+ /** A notification that appears at the bottom of the screen. */
23
27
  export declare const GoabTemporaryNotificationCtrl: ({ verticalPosition, horizontalPosition, testId, ...rest }: GoabTemporaryNotificationCtrlProps) => import("react/jsx-runtime").JSX.Element;
24
28
  export default GoabTemporaryNotificationCtrl;
@@ -15,14 +15,21 @@ declare module "react" {
15
15
  }
16
16
  }
17
17
  interface GoATextProps extends Margins, DataAttributes {
18
+ /** Content rendered inside the text element. */
19
+ children: ReactNode;
18
20
  /** @deprecated Please use 'tag' property instead */
19
21
  as?: GoabTextTextElement | GoabTextHeadingElement;
22
+ /** The HTML element to render. Use semantic elements like 'h1'-'h6' for headings. */
20
23
  tag?: GoabTextTextElement | GoabTextHeadingElement;
24
+ /** Overrides the text size. */
21
25
  size?: GoabTextSize;
26
+ /** Sets the max width. @default "65ch" */
22
27
  maxWidth?: GoabTextMaxWidth;
28
+ /** Sets the text colour. @default "primary" */
23
29
  color?: GoabTextColor;
30
+ /** Sets the id attribute on the element. */
24
31
  id?: string;
25
- children: ReactNode;
26
32
  }
33
+ /** Provides consistent sizing, spacing, and colour to written content. */
27
34
  export declare function GoabText({ as, tag, children, ...rest }: GoATextProps): JSX.Element;
28
35
  export default GoabText;