@abgov/react-components 7.2.0-dev.3 → 7.2.0-dev.5

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,5 +1,5 @@
1
1
  import { ReactNode, JSX } from 'react';
2
- import { GoabAccordionHeadingSize, GoabAccordionIconPosition, Margins, DataAttributes } from '@abgov/ui-components-common';
2
+ import { GoabAccordionHeadingSize, GoabAccordionIconPosition, GoabAccordionHeadingType, Margins, DataAttributes } from '@abgov/ui-components-common';
3
3
  interface WCProps extends Margins {
4
4
  open?: string;
5
5
  headingsize?: GoabAccordionHeadingSize;
@@ -9,6 +9,7 @@ interface WCProps extends Margins {
9
9
  maxwidth?: string;
10
10
  testid?: string;
11
11
  iconposition?: GoabAccordionIconPosition;
12
+ headingType?: GoabAccordionHeadingType;
12
13
  }
13
14
  declare module "react" {
14
15
  namespace JSX {
@@ -30,17 +31,21 @@ export interface GoabAccordionProps extends Margins, DataAttributes {
30
31
  secondaryText?: string;
31
32
  /** Sets content rendered within the accordion heading, alongside the heading text. */
32
33
  headingContent?: ReactNode;
34
+ /** Sets content rendered in the accordion heading, right-aligned before the expand/collapse icon. */
35
+ actions?: ReactNode;
33
36
  /** Sets the maximum width of the accordion. @default "none" */
34
37
  maxWidth?: string;
35
38
  /** Sets a data-testid attribute for automated testing. */
36
39
  testId?: string;
37
40
  /** Sets the position of the expand/collapse icon. @default "left" */
38
41
  iconPosition?: GoabAccordionIconPosition;
42
+ /** Sets the accordion style variant. @default "normal" */
43
+ headingType?: GoabAccordionHeadingType;
39
44
  /** Callback fired when the accordion is opened or closed. Receives the new open state as a boolean. */
40
45
  onChange?: (open: boolean) => void;
41
46
  /** Content rendered inside the accordion body. */
42
47
  children?: ReactNode;
43
48
  }
44
49
  /** Let users show and hide sections of related content on a page. */
45
- export declare function GoabAccordion({ open, onChange, headingContent, children, ...rest }: GoabAccordionProps): JSX.Element;
50
+ export declare function GoabAccordion({ open, onChange, headingContent, headingType, actions, children, ...rest }: GoabAccordionProps): JSX.Element;
46
51
  export default GoabAccordion;
@@ -4,6 +4,7 @@ interface WCProps {
4
4
  name?: string;
5
5
  direction?: GoabTableSortDirection;
6
6
  "sort-order"?: GoabTableSortOrder;
7
+ version?: "1" | "2";
7
8
  }
8
9
  declare module "react" {
9
10
  namespace JSX {
@@ -22,7 +22,7 @@ export interface GoabWorkSideMenuItemProps {
22
22
  label: string;
23
23
  /** The URL the menu item links to. When absent, renders as a button instead of a link. */
24
24
  url?: string;
25
- /** Badge text displayed alongside the menu item (e.g., notification count). */
25
+ /** @deprecated Use trailingContent instead. Badge text displayed alongside the menu item (e.g., notification count). */
26
26
  badge?: string;
27
27
  /** When true, indicates this is the currently active menu item. */
28
28
  current?: boolean;
@@ -32,12 +32,14 @@ export interface GoabWorkSideMenuItemProps {
32
32
  icon?: string;
33
33
  /** Sets a data-testid attribute for automated testing. */
34
34
  testId?: string;
35
- /** Sets the visual style of the badge. Use "emergency" for urgent items, "success" for positive status. @default "normal" */
35
+ /** @deprecated Use trailingContent instead. Sets the visual style of the badge. Use "emergency" for urgent items, "success" for positive status. @default "normal" */
36
36
  type?: GoabWorkSideMenuItemType;
37
37
  /** Content rendered inside the menu item. */
38
38
  children?: React.ReactNode;
39
39
  /** Content rendered inside the popover panel attached to this menu item. */
40
40
  popoverContent?: React.ReactNode;
41
+ /** Content rendered after the label in the trailing area of the menu item. */
42
+ trailingContent?: React.ReactNode;
41
43
  }
42
44
  /** Individual menu item within the work side menu. */
43
45
  export declare function GoabWorkSideMenuItem(props: GoabWorkSideMenuItemProps): JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abgov/react-components",
3
- "version": "7.2.0-dev.3",
3
+ "version": "7.2.0-dev.5",
4
4
  "description": "Government of Alberta - UI components for React",
5
5
  "bugs": {
6
6
  "url": "https://github.com/GovAlta/ui-components/issues"