@abgov/react-components 7.2.0-dev.25 → 7.2.0-dev.27

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 { DataAttributes, GoabBadgeEmphasis, GoabBadgeSize, GoabBadgeType, GoabIconType, Margins } from '@abgov/ui-components-common';
2
- import { JSX } from 'react';
2
+ import { JSX, ReactNode } from 'react';
3
3
  interface WCProps extends Margins {
4
4
  type: GoabBadgeType;
5
5
  icon?: string;
@@ -23,8 +23,8 @@ export interface GoabBadgeProps extends Margins, DataAttributes {
23
23
  type: GoabBadgeType;
24
24
  /** @deprecated Use iconType instead. When true, displays an icon in the badge. */
25
25
  icon?: boolean;
26
- /** Text label of the badge. */
27
- content?: string;
26
+ /** Content displayed in the badge. Accepts a string or ReactNode for custom content. */
27
+ content?: ReactNode;
28
28
  /** Sets a data-testid attribute for automated testing. */
29
29
  testId?: string;
30
30
  /** Accessible label for screen readers. */
@@ -37,5 +37,5 @@ export interface GoabBadgeProps extends Margins, DataAttributes {
37
37
  emphasis?: GoabBadgeEmphasis;
38
38
  }
39
39
  /** Small labels which hold small amounts of information, system feedback, or states. */
40
- export declare function GoabBadge({ icon, iconType, size, emphasis, ...rest }: GoabBadgeProps): JSX.Element;
40
+ export declare function GoabBadge({ content, icon, iconType, size, emphasis, ...rest }: GoabBadgeProps): JSX.Element;
41
41
  export {};
@@ -1,8 +1,10 @@
1
+ import { ReactNode } from 'react';
1
2
  import { DataAttributes, GoabFilterChipTheme, GoabIconType, Margins } from '@abgov/ui-components-common';
2
3
  interface WCProps extends Margins {
3
4
  icontheme: GoabFilterChipTheme;
4
5
  error?: string;
5
- content: string;
6
+ content?: string;
7
+ arialabel?: string;
6
8
  secondarytext?: string;
7
9
  leadingicon?: GoabIconType;
8
10
  testid?: string;
@@ -18,8 +20,10 @@ declare module "react" {
18
20
  }
19
21
  }
20
22
  export interface GoabFilterChipProps extends Margins, DataAttributes {
21
- /** @required Text label of the chip. */
22
- content: string;
23
+ /** @required Content displayed in the chip. Accepts a string or ReactNode for custom content. */
24
+ content: ReactNode;
25
+ /** Accessible content used to label the filter chip controls. */
26
+ ariaLabel?: string;
23
27
  /** Theme style of the leading icon. @default "outline" */
24
28
  iconTheme?: GoabFilterChipTheme;
25
29
  /** Shows an error state. */
@@ -34,5 +38,5 @@ export interface GoabFilterChipProps extends Margins, DataAttributes {
34
38
  onClick?: () => void;
35
39
  }
36
40
  /** Allow the user to enter information, filter content, and make selections. */
37
- export declare const GoabFilterChip: ({ iconTheme, error, onClick, ...rest }: GoabFilterChipProps) => import("react/jsx-runtime").JSX.Element;
41
+ export declare const GoabFilterChip: ({ content, iconTheme, error, onClick, ...rest }: GoabFilterChipProps) => import("react/jsx-runtime").JSX.Element;
38
42
  export default GoabFilterChip;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abgov/react-components",
3
- "version": "7.2.0-dev.25",
3
+ "version": "7.2.0-dev.27",
4
4
  "description": "Government of Alberta - UI components for React",
5
5
  "bugs": {
6
6
  "url": "https://github.com/GovAlta/ui-components/issues"