@abgov/react-components 7.0.0-next.1 → 7.1.0

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 (91) hide show
  1. package/index.js +57 -107
  2. package/index.js.map +1 -1
  3. package/index.mjs +57 -107
  4. package/index.mjs.map +1 -1
  5. package/lib/accordion/accordion.d.ts +13 -2
  6. package/lib/app-header/app-header.d.ts +9 -0
  7. package/lib/app-header-menu/app-header-menu.d.ts +6 -0
  8. package/lib/badge/badge.d.ts +9 -0
  9. package/lib/block/block.d.ts +9 -0
  10. package/lib/button/button.d.ts +14 -0
  11. package/lib/button-group/button-group.d.ts +5 -0
  12. package/lib/calendar/calendar.d.ts +8 -1
  13. package/lib/callout/callout.d.ts +10 -0
  14. package/lib/card/card-actions.d.ts +2 -0
  15. package/lib/card/card-content.d.ts +2 -0
  16. package/lib/card/card-group.d.ts +2 -0
  17. package/lib/card/card-image.d.ts +3 -0
  18. package/lib/card/card.d.ts +5 -0
  19. package/lib/checkbox/checkbox.d.ts +19 -1
  20. package/lib/checkbox-list/checkbox-list.d.ts +10 -0
  21. package/lib/chip/chip.d.ts +11 -2
  22. package/lib/circular-progress/circular-progress.d.ts +7 -0
  23. package/lib/container/container.d.ts +18 -5
  24. package/lib/data-grid/data-grid.d.ts +6 -1
  25. package/lib/date-picker/date-picker.d.ts +13 -4
  26. package/lib/details/details.d.ts +7 -1
  27. package/lib/divider/divider.d.ts +2 -0
  28. package/lib/drawer/drawer.d.ts +11 -2
  29. package/lib/dropdown/dropdown-item.d.ts +8 -0
  30. package/lib/dropdown/dropdown.d.ts +22 -3
  31. package/lib/file-upload-card/file-upload-card.d.ts +9 -0
  32. package/lib/file-upload-input/file-upload-input.d.ts +7 -1
  33. package/lib/filter-chip/filter-chip.d.ts +10 -2
  34. package/lib/footer/footer.d.ts +7 -2
  35. package/lib/footer-meta-section/footer-meta-section.d.ts +3 -0
  36. package/lib/footer-nav-section/footer-nav-section.d.ts +6 -1
  37. package/lib/form/fieldset.d.ts +7 -1
  38. package/lib/form/public-form-page.d.ts +13 -5
  39. package/lib/form/public-form-summary.d.ts +2 -0
  40. package/lib/form/public-form.d.ts +8 -1
  41. package/lib/form/public-subform-index.d.ts +7 -1
  42. package/lib/form/public-subform.d.ts +8 -1
  43. package/lib/form/task-list.d.ts +4 -1
  44. package/lib/form/task.d.ts +4 -1
  45. package/lib/form-item/form-item.d.ts +13 -6
  46. package/lib/form-step/form-step.d.ts +3 -0
  47. package/lib/form-stepper/form-stepper.d.ts +5 -0
  48. package/lib/grid/grid.d.ts +6 -1
  49. package/lib/hero-banner/hero-banner-actions.d.ts +2 -0
  50. package/lib/hero-banner/hero-banner.d.ts +9 -0
  51. package/lib/icon/icon.d.ts +13 -0
  52. package/lib/icon-button/icon-button.d.ts +18 -2
  53. package/lib/input/input.d.ts +47 -3
  54. package/lib/linear-progress/linear-progress.d.ts +6 -0
  55. package/lib/link/link.d.ts +11 -1
  56. package/lib/link-button/link-button.d.ts +3 -0
  57. package/lib/menu-button/menu-action.d.ts +5 -0
  58. package/lib/menu-button/menu-button.d.ts +11 -0
  59. package/lib/microsite-header/microsite-header.d.ts +9 -0
  60. package/lib/modal/modal.d.ts +10 -0
  61. package/lib/notification/notification.d.ts +9 -0
  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 +9 -2
  66. package/lib/popover/popover.d.ts +11 -5
  67. package/lib/push-drawer/push-drawer.d.ts +10 -2
  68. package/lib/radio-group/radio-group.d.ts +12 -0
  69. package/lib/radio-group/radio.d.ts +14 -0
  70. package/lib/side-menu/side-menu.d.ts +4 -1
  71. package/lib/side-menu-group/side-menu-group.d.ts +5 -0
  72. package/lib/side-menu-heading/side-menu-heading.d.ts +7 -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 +5 -0
  78. package/lib/table/table.d.ts +9 -0
  79. package/lib/tabs/tabs.d.ts +8 -1
  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 +20 -0
  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 +12 -0
  87. package/lib/work-side-menu-group/work-side-menu-group.d.ts +6 -0
  88. package/lib/work-side-menu-item/work-side-menu-item.d.ts +11 -0
  89. package/lib/work-side-notification-item/work-side-notification-item.d.ts +10 -1
  90. package/lib/work-side-notification-panel/work-side-notification-panel.d.ts +7 -0
  91. package/package.json +1 -1
@@ -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;
@@ -13,8 +13,11 @@ declare module "react" {
13
13
  }
14
14
  }
15
15
  interface GoALinkButtonProps extends Margins, DataAttributes {
16
+ /** @deprecated Use GoabButton instead. Sets the type of button. */
16
17
  type?: GoabLinkButtonType;
18
+ /** @deprecated Use GoabButton instead. Icon displayed before the button text. */
17
19
  leadingIcon?: GoabIconType;
20
+ /** @deprecated Use GoabButton instead. Icon displayed after the button text. */
18
21
  trailingIcon?: GoabIconType;
19
22
  children: ReactNode;
20
23
  }
@@ -14,10 +14,15 @@ declare module "react" {
14
14
  }
15
15
  }
16
16
  export interface GoabMenuActionProps extends DataAttributes {
17
+ /** @required Display text for the menu action. */
17
18
  text: string;
19
+ /** @required Action identifier included in the click event. */
18
20
  action: string;
21
+ /** Icon displayed before the text. */
19
22
  icon?: GoabIconType;
23
+ /** Sets a data-testid attribute for automated testing. */
20
24
  testId?: string;
21
25
  }
26
+ /** Individual action item within a menu button. */
22
27
  export declare function GoabMenuAction(props: GoabMenuActionProps): JSX.Element;
23
28
  export default GoabMenuAction;
@@ -19,16 +19,27 @@ declare module "react" {
19
19
  }
20
20
  }
21
21
  export interface GoabMenuButtonProps extends DataAttributes {
22
+ /** The button label text. When provided, displays as a text button with a dropdown icon. */
22
23
  text?: string;
24
+ /** The button style variant. @default "primary" */
23
25
  type?: GoabButtonType;
26
+ /** Sets the size of the button. @default "normal" */
24
27
  size?: GoabButtonSize;
28
+ /** Sets the color variant for semantic meaning. @default "normal" */
25
29
  variant?: GoabButtonVariant;
30
+ /** Maximum width of the dropdown menu. */
26
31
  maxWidth?: string;
32
+ /** Icon displayed before the button text. When no text is provided, displays as an icon button. */
27
33
  leadingIcon?: GoabIconType;
34
+ /** Sets the aria-label for the icon button in icon-only mode. @default "Open menu" */
28
35
  ariaLabel?: string;
36
+ /** Sets a data-testid attribute for automated testing. */
29
37
  testId?: string;
38
+ /** Callback fired when a menu action is selected. */
30
39
  onAction?: (detail: GoabMenuButtonOnActionDetail) => void;
40
+ /** Content rendered inside the menu button, typically GoabMenuAction items. */
31
41
  children?: ReactNode;
32
42
  }
43
+ /** A button with more than one action. */
33
44
  export declare function GoabMenuButton({ type, testId, onAction, children, ...rest }: GoabMenuButtonProps): JSX.Element;
34
45
  export default GoabMenuButton;
@@ -19,14 +19,23 @@ interface WCProps {
19
19
  testid?: string;
20
20
  }
21
21
  export interface GoabHeaderProps {
22
+ /** @required The service type which determines the badge style. "live" shows official government site text, "alpha" and "beta" show development stage badges. */
22
23
  type: GoabServiceLevel;
24
+ /** App or service version displayed on the right side of the header. Accepts a string or custom ReactNode for rich content. */
23
25
  version?: string | React.ReactNode;
26
+ /** URL to a feedback page displayed when provided. */
24
27
  feedbackUrl?: string;
28
+ /** Sets a data-testid attribute for automated testing. */
25
29
  testId?: string;
30
+ /** Maximum width of the content area. @default "100%" */
26
31
  maxContentWidth?: string;
32
+ /** Sets the target attribute for the feedback URL link. @default "blank" */
27
33
  feedbackUrlTarget?: GoabLinkTarget;
34
+ /** Sets the target attribute for the header link. @default "blank" */
28
35
  headerUrlTarget?: GoabLinkTarget;
36
+ /** Callback fired when the feedback link is clicked, enables custom feedback handling. */
29
37
  onFeedbackClick?: () => void;
30
38
  }
39
+ /** Communicate what stage the service is at, connect to Alberta.ca, and gather feedback on your service. */
31
40
  export declare function GoabMicrositeHeader({ type, version, feedbackUrl, maxContentWidth, feedbackUrlTarget, headerUrlTarget, testId, onFeedbackClick, }: GoabHeaderProps): JSX.Element;
32
41
  export default GoabMicrositeHeader;
@@ -24,14 +24,23 @@ declare module "react" {
24
24
  }
25
25
  }
26
26
  export interface GoabModalProps {
27
+ /** The heading text displayed at the top of the modal. */
27
28
  heading?: ReactNode;
29
+ /** Set the max allowed width of the modal. @default "60ch" */
28
30
  maxWidth?: string;
31
+ /** Content rendered in the modal's actions slot, typically action buttons. */
29
32
  actions?: ReactElement<any>;
33
+ /** Callback fired when the modal is closed. When provided, enables the close button and backdrop click-to-close behavior. */
30
34
  onClose?: () => void;
35
+ /** Sets the animation transition when opening/closing. 'fast' or 'slow' for animated, 'none' for instant. */
31
36
  transition?: GoabModalTransition;
37
+ /** Content rendered inside the modal body. */
32
38
  children?: ReactNode;
39
+ /** Controls if the modal is visible or not. */
33
40
  open?: boolean;
41
+ /** Sets the context and colour of the callout modal. Required when used as a callout type. */
34
42
  calloutVariant?: GoabModalCalloutVariant;
43
+ /** Sets a data-testid attribute for automated testing. */
35
44
  testId?: string;
36
45
  /**
37
46
  * @deprecated The role property is deprecated and will be removed in a future version.
@@ -39,5 +48,6 @@ export interface GoabModalProps {
39
48
  */
40
49
  role?: GoabModalRole;
41
50
  }
51
+ /** An overlay that appears in front of all other content, and requires a user to take an action before continuing. */
42
52
  export declare function GoabModal({ heading, children, maxWidth, open, actions, transition, calloutVariant, onClose, testId, }: GoabModalProps): JSX.Element;
43
53
  export default GoabModal;
@@ -17,14 +17,23 @@ declare module "react" {
17
17
  }
18
18
  }
19
19
  export interface GoabNotificationProps {
20
+ /** Define the context and colour of the notification. */
20
21
  type?: GoabNotificationType;
22
+ /** Indicates how assistive technology should handle updates to the live region. @default "polite" */
21
23
  ariaLive?: GoabAriaLiveType;
24
+ /** Maximum width of the content area. @default "100%" */
22
25
  maxContentWidth?: string;
26
+ /** Sets the visual prominence. 'high' for full background, 'low' for a bordered style. @default "high" */
23
27
  emphasis?: GoabNotificationEmphasis;
28
+ /** When true, reduces padding for a more compact notification. */
24
29
  compact?: boolean;
30
+ /** Content rendered inside the notification. */
25
31
  children?: React.ReactNode;
32
+ /** Callback fired when the notification is dismissed. */
26
33
  onDismiss?: () => void;
34
+ /** Sets a data-testid attribute for automated testing. */
27
35
  testId?: string;
28
36
  }
37
+ /** Display important page level information or notifications. */
29
38
  export declare const GoabNotification: ({ type, emphasis, compact, ariaLive, maxContentWidth, children, testId, onDismiss, }: GoabNotificationProps) => import("react/jsx-runtime").JSX.Element;
30
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;
@@ -16,13 +16,20 @@ declare module "react" {
16
16
  }
17
17
  }
18
18
  export interface GoabPaginationProps extends Margins {
19
+ /** @required Total number of data items within all pages. */
19
20
  itemCount: number;
20
- perPageCount?: number;
21
+ /** @required The current page being viewed (non-zero based). */
21
22
  pageNumber: number;
22
- variant?: "all" | "links-only";
23
+ /** @required Callback fired when the user navigates to a different page. */
23
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. */
24
30
  testId?: string;
25
31
  }
26
32
  export type PaginationProps = GoabPaginationProps;
33
+ /** Help users navigation between multiple pages or screens as part of a set. */
27
34
  export declare function GoabPagination({ onChange, ...props }: GoabPaginationProps): import("react/jsx-runtime").JSX.Element;
28
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;
@@ -15,13 +15,21 @@ declare module "react" {
15
15
  }
16
16
  }
17
17
  export interface GoabPushDrawerProps {
18
+ /** @required Content rendered inside the push drawer body. */
19
+ children: ReactNode;
20
+ /** @required Callback fired when the push drawer is closed. */
21
+ onClose: () => void;
22
+ /** Controls the open/closed state of the push drawer. */
18
23
  open?: boolean;
24
+ /** Sets the heading text or custom heading content. */
19
25
  heading?: string | ReactNode;
26
+ /** Sets the width of the push drawer panel. @default "492px" */
20
27
  width?: string;
28
+ /** Sets a data-testid attribute for automated testing. */
21
29
  testId?: string;
30
+ /** Content rendered in the actions slot, typically action buttons. */
22
31
  actions?: ReactNode;
23
- children: ReactNode;
24
- onClose: () => void;
25
32
  }
33
+ /** A panel that pushes the main page content aside on desktop, falling back to an overlay drawer on smaller screens. */
26
34
  export declare function GoabPushDrawer({ open, heading, width, testId, actions, children, onClose, }: GoabPushDrawerProps): JSX.Element;
27
35
  export default GoabPushDrawer;
@@ -23,17 +23,29 @@ declare module "react" {
23
23
  }
24
24
  }
25
25
  export interface GoabRadioGroupProps extends Margins, DataAttributes {
26
+ /** @required The name for the radio group. Used for accessibility and change events. */
26
27
  name: string;
28
+ /** The currently selected value in the radio group. */
27
29
  value?: string;
30
+ /** The identifier for the radio group element. */
28
31
  id?: string;
32
+ /** Disables all radio items in the group. */
29
33
  disabled?: boolean;
34
+ /** Sets the layout direction. 'vertical' stacks items, 'horizontal' places them in a row. @default "vertical" */
30
35
  orientation?: GoabRadioGroupOrientation;
36
+ /** Sets the size of all radio items. 'compact' reduces spacing for dense layouts. @default "default" */
31
37
  size?: GoabRadioGroupSize;
38
+ /** Sets a data-testid attribute for automated testing. */
32
39
  testId?: string;
40
+ /** Shows an error state on all radio items in the group. */
33
41
  error?: boolean;
42
+ /** Defines how the radio group will be announced by screen readers. */
34
43
  ariaLabel?: string;
44
+ /** Radio items to render inside the group. */
35
45
  children?: React.ReactNode;
46
+ /** Callback fired when the selected radio item changes. */
36
47
  onChange?: (detail: GoabRadioGroupOnChangeDetail) => void;
37
48
  }
49
+ /** Allow users to select one option from a set. */
38
50
  export declare function GoabRadioGroup({ disabled, error, onChange, name, children, size, ...rest }: GoabRadioGroupProps): JSX.Element;
39
51
  export default GoabRadioGroup;
@@ -23,19 +23,33 @@ declare module "react" {
23
23
  }
24
24
  }
25
25
  export interface GoabRadioItemProps extends Margins {
26
+ /** The value of this radio option. Will be emitted when selected. */
26
27
  value?: string;
28
+ /** The display label for this radio option. Falls back to value if not provided. */
27
29
  label?: string;
30
+ /** The name of the radio group. Inherited from the parent RadioGroup if not set. */
28
31
  name?: string;
32
+ /** Additional description text displayed below the label. */
29
33
  description?: string | React.ReactNode;
34
+ /** Content revealed below the radio option when it is selected. */
30
35
  reveal?: React.ReactNode;
36
+ /** Text announced by screen readers when the reveal content is displayed. */
31
37
  revealAriaLabel?: string;
38
+ /** Sets the maximum width of this radio item. */
32
39
  maxWidth?: string;
40
+ /** Disables this radio option. Also disabled if the parent RadioGroup is disabled. */
33
41
  disabled?: boolean;
42
+ /** Sets this radio option as checked/selected. */
34
43
  checked?: boolean;
44
+ /** Shows an error state on this radio option. */
35
45
  error?: boolean;
46
+ /** Reduces spacing for dense layouts. */
36
47
  compact?: boolean;
48
+ /** Additional content rendered inside the radio item. */
37
49
  children?: React.ReactNode;
50
+ /** Defines how this option will be announced by screen readers. */
38
51
  ariaLabel?: string;
39
52
  }
53
+ /** Individual radio option within a group. */
40
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;
41
55
  export default GoabRadioItem;
@@ -11,8 +11,11 @@ declare module "react" {
11
11
  }
12
12
  }
13
13
  export interface GoabSideMenuProps {
14
- testId?: string;
14
+ /** @required Navigation links and groups rendered inside the side menu. */
15
15
  children: ReactNode;
16
+ /** Sets a data-testid attribute for automated testing. */
17
+ testId?: string;
16
18
  }
19
+ /** A side navigation that helps the user navigate between pages. */
17
20
  export declare function GoabSideMenu({ testId, children }: GoabSideMenuProps): JSX.Element;
18
21
  export default GoabSideMenu;
@@ -14,10 +14,15 @@ declare module "react" {
14
14
  }
15
15
  }
16
16
  export interface GoabSideMenuGroupProps extends Margins {
17
+ /** @required The heading text for the menu group. */
17
18
  heading: string;
19
+ /** Icon displayed alongside the heading. */
18
20
  icon?: GoabIconType;
21
+ /** Sets a data-testid attribute for automated testing. */
19
22
  testId?: string;
23
+ /** Navigation links rendered inside the menu group. */
20
24
  children?: ReactNode;
21
25
  }
26
+ /** Group of related side menu items. */
22
27
  export declare function GoabSideMenuGroup({ heading, icon, testId, children, mt, mr, mb, ml, }: GoabSideMenuGroupProps): JSX.Element;
23
28
  export default GoabSideMenuGroup;
@@ -13,10 +13,15 @@ declare module "react" {
13
13
  }
14
14
  }
15
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. */
16
19
  meta?: ReactNode;
20
+ /** Sets a data-testid attribute for automated testing. */
17
21
  testId?: string;
18
- icon?: GoabIconType;
22
+ /** The heading text or content rendered inside the side menu heading. */
19
23
  children?: ReactNode;
20
24
  }
21
- export declare function GoabSideMenuHeading({ meta, testId, icon, children }: 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;
22
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 {};
@@ -13,10 +13,15 @@ declare module "react" {
13
13
  }
14
14
  }
15
15
  export interface GoabTableSortProps extends DataAttributes {
16
+ /** Column name identifier for sorting. */
16
17
  name?: string;
18
+ /** Sets the sort direction indicator. @default "none" */
17
19
  direction?: GoabTableSortDirection;
20
+ /** Sort order number for multi-column sort display. Used for displaying priority numbers when multiple columns are sorted. */
18
21
  sortOrder?: GoabTableSortOrder;
22
+ /** Content rendered inside the sort header button (typically the column heading text). */
19
23
  children?: React.ReactNode;
20
24
  }
25
+ /** A set of structured data that is easy for a user to scan, examine, and compare. */
21
26
  export declare function GoabTableSortHeader({ name, direction, sortOrder, children, ...rest }: GoabTableSortProps): JSX.Element;
22
27
  export default GoabTableSortHeader;
@@ -18,15 +18,24 @@ declare module "react" {
18
18
  }
19
19
  }
20
20
  export interface GoabTableProps extends Margins {
21
+ /** Width of the table. By default it will fit the enclosed content. */
21
22
  width?: string;
23
+ /** Callback fired when a single-column sort header is clicked. */
22
24
  onSort?: (detail: GoabTableOnSortDetail) => void;
25
+ /** Callback fired when multi-column sorting changes. */
23
26
  onMultiSort?: (detail: GoabTableOnMultiSortDetail) => void;
27
+ /** Sort mode: "single" allows one column, "multi" allows up to 2 columns. @default "single" */
24
28
  sortMode?: GoabTableSortMode;
29
+ /** A relaxed variant of the table with more vertical padding for the cells. @default "normal" */
25
30
  variant?: GoabTableVariant;
31
+ /** When true, alternates row background colors for improved readability. */
26
32
  striped?: boolean;
33
+ /** Sets a data-testid attribute for automated testing. */
27
34
  testId?: string;
35
+ /** Content rendered inside the table (table rows, headers, etc.). */
28
36
  children?: ReactNode;
29
37
  }
30
38
  export type TableProps = GoabTableProps;
39
+ /** A set of structured data that is easy for a user to scan, examine, and compare. */
31
40
  export declare function GoabTable({ onSort, onMultiSort, sortMode, ...props }: GoabTableProps): import("react/jsx-runtime").JSX.Element;
32
41
  export default GoabTable;
@@ -18,14 +18,21 @@ declare module "react" {
18
18
  }
19
19
  }
20
20
  export interface GoabTabsProps {
21
+ /** The initially active tab (1-based index). If not set, the first tab is active. */
21
22
  initialTab?: number;
23
+ /** Content rendered inside the tabs container, typically GoabTab components. */
22
24
  children?: React.ReactNode;
25
+ /** Sets a data-testid attribute for automated testing. */
23
26
  testId?: string;
27
+ /** Visual style variant. "segmented" shows pill-style tabs with animation. @default "default" */
24
28
  variant?: GoabTabsVariant;
25
- /** Tab layout orientation. "auto" stacks vertically on mobile (default), "horizontal" keeps horizontal on all screen sizes. */
29
+ /** Tab layout orientation. "auto" stacks vertically on mobile, "horizontal" keeps horizontal on all screen sizes. @default "auto" */
26
30
  orientation?: GoabTabsOrientation;
31
+ /** Controls URL navigation mode on tab change. @default "hash" */
27
32
  navigation?: GoabTabsNavigation;
33
+ /** Callback fired when the active tab changes. */
28
34
  onChange?: (detail: GoabTabsOnChangeDetail) => void;
29
35
  }
36
+ /** Let users navigate between related sections of content, displaying one section at a time. */
30
37
  export declare function GoabTabs({ initialTab, children, testId, onChange, variant, orientation, navigation, }: GoabTabsProps): JSX.Element;
31
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;
@@ -28,25 +28,45 @@ declare module "react" {
28
28
  }
29
29
  }
30
30
  export interface GoabTextAreaProps extends Margins, DataAttributes {
31
+ /** @required Name of the input value that is received in the change event. */
31
32
  name: string;
33
+ /** Bound to the current value of the textarea. */
32
34
  value?: string;
35
+ /** Sets the id attribute on the textarea element. */
33
36
  id?: string;
37
+ /** Text displayed within the textarea when no value is set. */
34
38
  placeholder?: string;
39
+ /** Sets the number of visible text rows. @default 3 */
35
40
  rows?: number;
41
+ /** Sets the input to an error state. */
36
42
  error?: boolean;
43
+ /** Sets the input to a read only state. */
37
44
  readOnly?: boolean;
45
+ /** Sets the input to a disabled state. */
38
46
  disabled?: boolean;
47
+ /** Sets the width of the text area. @default "100%" */
39
48
  width?: string;
49
+ /** Sets the maximum width of the text area. @default "60ch" */
40
50
  maxWidth?: string;
51
+ /** Sets a data-testid attribute for automated testing. */
41
52
  testId?: string;
53
+ /** Defines how the text will be translated for the screen reader. If not specified it will fall back to the name. */
42
54
  ariaLabel?: string;
55
+ /** Counting interval for characters or words, specifying whether to count every character or word. */
43
56
  countBy?: GoabTextAreaCountBy;
57
+ /** Maximum number of characters or words allowed. */
44
58
  maxCount?: number;
59
+ /** Specifies the autocomplete attribute for the textarea input. */
45
60
  autoComplete?: string;
61
+ /** Sets the visual size variant of the text area. */
46
62
  size?: GoabTextAreaSize;
63
+ /** Callback fired when the value of the textarea changes. */
47
64
  onChange?: (event: GoabTextAreaOnChangeDetail) => void;
65
+ /** Callback fired when a key is pressed within the textarea. */
48
66
  onKeyPress?: (event: GoabTextAreaOnKeyPressDetail) => void;
67
+ /** Callback fired when the textarea loses focus. */
49
68
  onBlur?: (event: GoabTextAreaOnBlurDetail) => void;
50
69
  }
70
+ /** A multi-line field where users can input and edit text. */
51
71
  export declare function GoabTextArea({ readOnly, disabled, error, onChange, onKeyPress, onBlur, ...rest }: GoabTextAreaProps): JSX.Element;
52
72
  export default GoabTextArea;