@abgov/react-components 7.2.0-dev.20 → 7.2.0-dev.21

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.
@@ -1,4 +1,4 @@
1
- import { JSX } from 'react';
1
+ import { ReactNode, JSX } from 'react';
2
2
  import { DataAttributes } from '@abgov/ui-components-common';
3
3
  interface WCProps {
4
4
  heading?: string;
@@ -22,7 +22,7 @@ declare module "react" {
22
22
  export interface GoabAppHeaderProps extends DataAttributes {
23
23
  /** Set the service name to display in the app header. */
24
24
  heading?: string;
25
- /** V2 only: Secondary text displayed under the service name. */
25
+ /** Secondary text displayed under the service name. */
26
26
  secondaryText?: string;
27
27
  /** Set the URL to link from the alberta.ca logo. A full url is required. */
28
28
  url?: string;
@@ -31,12 +31,20 @@ export interface GoabAppHeaderProps extends DataAttributes {
31
31
  /** Sets the breakpoint in px for the full menu to display. */
32
32
  fullMenuBreakpoint?: number;
33
33
  /** Content rendered inside the app header, typically navigation links. */
34
- children?: React.ReactNode;
34
+ children?: ReactNode;
35
35
  /** Callback fired when the menu button is clicked. When provided, clicking the menu button dispatches a custom event instead of toggling the menu. */
36
36
  onMenuClick?: () => void;
37
37
  /** Sets a data-testid attribute for automated testing. */
38
38
  testId?: string;
39
+ /** Banner content displayed above the header. */
40
+ banner?: ReactNode;
41
+ /** Phase badge content displayed beside the service name. */
42
+ phase?: ReactNode;
43
+ /** Links and app header menus appear in the navigation bar below the header. Use plain links for single items and app header menu for grouped items with a dropdown. */
44
+ navigation?: ReactNode;
45
+ /** Actions like user account menus appear on the right side of the header. Use menu button for dropdowns with actions. */
46
+ utilities?: ReactNode;
39
47
  }
40
48
  /** Provide structure to help users find their way around the service. */
41
- export declare function GoabAppHeader({ onMenuClick, children, secondaryText, ...rest }: GoabAppHeaderProps): JSX.Element;
49
+ export declare function GoabAppHeader({ onMenuClick, children, secondaryText, banner, phase, navigation, utilities, ...rest }: GoabAppHeaderProps): JSX.Element;
42
50
  export {};
@@ -19,7 +19,7 @@ export interface GoabAppHeaderMenuProps extends DataAttributes {
19
19
  leadingIcon?: GoabIconType;
20
20
  /** Sets a data-testid attribute for automated testing. */
21
21
  testId?: string;
22
- /** Slot name used to place this menu in the correct slot of the parent component. */
22
+ /** @deprecated Sets the slot name for the component. Deprecated: use AppHeader navigation prop instead. */
23
23
  slotName?: string;
24
24
  /** Content rendered inside the menu dropdown, typically navigation links. */
25
25
  children?: ReactNode;
@@ -1,3 +1,4 @@
1
+ import { ReactNode } from 'react';
1
2
  import { GoabDropdownItemMountType } from '@abgov/ui-components-common';
2
3
  interface WCProps {
3
4
  value: string;
@@ -18,17 +19,19 @@ export interface GoabDropdownItemProps {
18
19
  value: string;
19
20
  /** Display label for the dropdown item. */
20
21
  label?: string;
21
- /** Text used to filter and match this item in typeahead search. */
22
+ /** Rich item content. On selection, `label` is shown and `filter` defaults to the content's text. */
22
23
  filter?: string;
23
24
  /** Sets a data-testid attribute for automated testing. */
24
25
  testId?: string;
25
26
  /** Controls how the item is registered with the parent dropdown. */
26
27
  mountType?: GoabDropdownItemMountType;
28
+ /** Rich content rendered for this item in the dropdown menu. When set, `label` is shown in the dropdown input on selection and `filter` defaults to the content's text. */
29
+ children?: ReactNode;
27
30
  /** @deprecated */
28
31
  name?: string;
29
32
  }
30
33
  /** Present a list of options to the user to select from. */
31
34
  export declare function GoabDropdownOption(props: GoabDropdownItemProps): import("react/jsx-runtime").JSX.Element;
32
35
  /** Present a list of options to the user to select from. */
33
- export declare function GoabDropdownItem({ value, label, filter, name, mountType, }: GoabDropdownItemProps): import("react/jsx-runtime").JSX.Element;
36
+ export declare function GoabDropdownItem({ value, label, filter, name, mountType, children, }: GoabDropdownItemProps): import("react/jsx-runtime").JSX.Element;
34
37
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abgov/react-components",
3
- "version": "7.2.0-dev.20",
3
+ "version": "7.2.0-dev.21",
4
4
  "description": "Government of Alberta - UI components for React",
5
5
  "bugs": {
6
6
  "url": "https://github.com/GovAlta/ui-components/issues"