@abgov/react-components 5.3.0 → 5.4.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.
@@ -1,8 +1,9 @@
1
- import { ReactNode } from "react";
1
+ import React, { ReactNode } from "react";
2
2
  import { Margins } from "../../common/styling";
3
3
  export type GoAHeadingSize = "small" | "medium";
4
4
  export type GoAIconPosition = "left" | "right";
5
5
  interface WCProps extends Margins {
6
+ ref: React.RefObject<HTMLElement>;
6
7
  open?: boolean;
7
8
  headingSize?: GoAHeadingSize;
8
9
  heading: string;
@@ -28,7 +29,8 @@ export interface GoAAccordionProps extends Margins {
28
29
  maxWidth?: string;
29
30
  testid?: string;
30
31
  iconPosition?: GoAIconPosition;
32
+ onChange?: (open: boolean) => void;
31
33
  children: ReactNode;
32
34
  }
33
- export declare function GoAAccordion({ open, heading, headingSize, secondaryText, headingContent, iconPosition, maxWidth, testid, children, mt, mr, mb, ml, }: GoAAccordionProps): JSX.Element;
35
+ export declare function GoAAccordion({ open, heading, headingSize, secondaryText, headingContent, iconPosition, maxWidth, testid, onChange, children, mt, mr, mb, ml, }: GoAAccordionProps): JSX.Element;
34
36
  export default GoAAccordion;
@@ -14,6 +14,7 @@ interface WCProps extends Margins {
14
14
  disabled?: boolean;
15
15
  leadingicon?: string;
16
16
  trailingicon?: string;
17
+ width?: string;
17
18
  testid?: string;
18
19
  ref: React.RefObject<HTMLElement>;
19
20
  }
@@ -31,9 +32,10 @@ export interface GoAButtonProps extends Margins {
31
32
  disabled?: boolean;
32
33
  leadingIcon?: GoAIconType;
33
34
  trailingIcon?: GoAIconType;
35
+ width?: string;
34
36
  onClick?: () => void;
35
37
  testId?: string;
36
38
  children?: ReactNode;
37
39
  }
38
- export declare function GoAButton({ disabled, type, size, variant, leadingIcon, trailingIcon, testId, children, onClick, mt, mr, mb, ml, }: GoAButtonProps): JSX.Element;
40
+ export declare function GoAButton({ disabled, type, size, variant, leadingIcon, trailingIcon, width, testId, children, onClick, mt, mr, mb, ml, }: GoAButtonProps): JSX.Element;
39
41
  export default GoAButton;
@@ -0,0 +1,24 @@
1
+ import { Margins } from "../../common/styling";
2
+ export type GoAFilterChipTheme = "outline" | "filled";
3
+ interface WCProps extends Margins {
4
+ ref: React.RefObject<HTMLElement>;
5
+ icontheme: GoAFilterChipTheme;
6
+ error: boolean;
7
+ content: string;
8
+ }
9
+ declare global {
10
+ namespace JSX {
11
+ interface IntrinsicElements {
12
+ "goa-filter-chip": WCProps & React.HTMLAttributes<HTMLElement>;
13
+ }
14
+ }
15
+ }
16
+ export interface GoAFilterChipProps extends Margins {
17
+ onClick?: () => void;
18
+ iconTheme?: GoAFilterChipTheme;
19
+ error?: boolean;
20
+ content: string;
21
+ testId?: string;
22
+ }
23
+ export declare const GoAFilterChip: ({ iconTheme, error, content, onClick, mt, mr, mb, ml, testId, }: GoAFilterChipProps) => import("react/jsx-runtime").JSX.Element;
24
+ export default GoAFilterChip;
@@ -7,6 +7,7 @@ interface WCProps extends Margins {
7
7
  placeholder?: string;
8
8
  rows?: number;
9
9
  error?: boolean;
10
+ readOnly?: boolean;
10
11
  disabled?: boolean;
11
12
  width?: string;
12
13
  maxwidth?: string;
@@ -29,6 +30,7 @@ export interface GoATextAreaProps extends Margins {
29
30
  placeholder?: string;
30
31
  rows?: number;
31
32
  error?: boolean;
33
+ readOnly?: boolean;
32
34
  disabled?: boolean;
33
35
  width?: string;
34
36
  maxWidth?: string;
@@ -39,6 +41,6 @@ export interface GoATextAreaProps extends Margins {
39
41
  onChange?: (name: string, value: string) => void;
40
42
  onKeyPress?: (name: string, value: string, key: string) => void;
41
43
  }
42
- export declare function GoATextarea({ name, value, placeholder, rows, disabled, countBy, maxCount, width, maxWidth, testId, error, ariaLabel, mt, mr, mb, ml, onChange, onKeyPress, }: GoATextAreaProps): JSX.Element;
44
+ export declare function GoATextarea({ name, value, placeholder, rows, readOnly, disabled, countBy, maxCount, width, maxWidth, testId, error, ariaLabel, mt, mr, mb, ml, onChange, onKeyPress, }: GoATextAreaProps): JSX.Element;
43
45
  export { GoATextarea as GoATextArea };
44
46
  export default GoATextarea;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abgov/react-components",
3
- "version": "5.3.0",
3
+ "version": "5.4.0",
4
4
  "description": "Government of Alberta - UI components for React",
5
5
  "bugs": {
6
6
  "url": "https://github.com/GovAlta/ui-components/issues"