@abgov/react-components 4.22.0 → 4.24.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.
@@ -7,6 +7,7 @@ interface WCProps extends Margins {
7
7
  heading: string;
8
8
  secondaryText?: string;
9
9
  headingContent?: ReactNode;
10
+ maxwidth?: string;
10
11
  }
11
12
  declare global {
12
13
  namespace JSX {
@@ -21,8 +22,9 @@ export interface GoAAccordionProps extends Margins {
21
22
  secondaryText?: string;
22
23
  heading: string;
23
24
  headingContent?: ReactNode;
25
+ maxWidth?: string;
24
26
  testid?: string;
25
27
  children: ReactNode;
26
28
  }
27
- export declare function GoAAccordion({ open, heading, headingSize, secondaryText, headingContent, testid, children, mt, mr, mb, ml, }: GoAAccordionProps): JSX.Element;
29
+ export declare function GoAAccordion({ open, heading, headingSize, secondaryText, headingContent, maxWidth, testid, children, mt, mr, mb, ml, }: GoAAccordionProps): JSX.Element;
28
30
  export default GoAAccordion;
@@ -1,10 +1,13 @@
1
1
  import { Margins } from "../../common/styling";
2
2
  export type GoACalloutType = "important" | "information" | "event" | "success" | "emergency";
3
3
  export type GoACalloutSize = "medium" | "large";
4
+ export type GoACalloutAriaLive = "off" | "polite" | "assertive";
4
5
  interface WCProps extends Margins {
5
6
  heading?: string;
6
7
  type?: GoACalloutType;
7
8
  size?: GoACalloutSize;
9
+ maxwidth?: string;
10
+ arialive?: GoACalloutAriaLive;
8
11
  }
9
12
  declare global {
10
13
  namespace JSX {
@@ -17,9 +20,11 @@ export interface GoACalloutProps extends Margins {
17
20
  heading?: string;
18
21
  type?: GoACalloutType;
19
22
  size?: GoACalloutSize;
23
+ maxWidth?: string;
20
24
  testId?: string;
25
+ ariaLive?: GoACalloutAriaLive;
21
26
  children?: React.ReactNode;
22
27
  }
23
28
  export type CalloutProps = GoACalloutProps;
24
- export declare const GoACallout: ({ heading, type, size, testId, children, mt, mr, mb, ml, }: GoACalloutProps) => import("react/jsx-runtime").JSX.Element;
29
+ export declare const GoACallout: ({ heading, type, size, maxWidth, testId, ariaLive, children, mt, mr, mb, ml, }: GoACalloutProps) => import("react/jsx-runtime").JSX.Element;
25
30
  export default GoACallout;
@@ -17,6 +17,7 @@ interface WCProps extends Margins {
17
17
  value?: string | number | boolean;
18
18
  arialabel?: string;
19
19
  description?: string | React.ReactNode;
20
+ maxwidth?: string;
20
21
  }
21
22
  export interface GoACheckboxProps extends Margins {
22
23
  id?: string;
@@ -30,8 +31,9 @@ export interface GoACheckboxProps extends Margins {
30
31
  testId?: string;
31
32
  ariaLabel?: string;
32
33
  description?: string | React.ReactNode;
34
+ maxWidth?: string;
33
35
  onChange?: (name: string, checked: boolean, value: string) => void;
34
36
  }
35
37
  export type Props = GoACheckboxProps;
36
- export declare function GoACheckbox({ id, name, testId, error, disabled, checked, value, text, description, children, onChange, ariaLabel, mt, mr, mb, ml, }: GoACheckboxProps): JSX.Element;
38
+ export declare function GoACheckbox({ id, name, testId, error, disabled, checked, value, text, description, maxWidth, children, onChange, ariaLabel, mt, mr, mb, ml, }: GoACheckboxProps): JSX.Element;
37
39
  export default GoACheckbox;
@@ -1,8 +1,10 @@
1
1
  import { Margins } from "../../common/styling";
2
2
  export type GoAChipVariant = "filter";
3
+ export type GoAChipTheme = "outline" | "filled" | "sharp";
3
4
  interface WCProps extends Margins {
4
5
  ref: React.RefObject<HTMLElement>;
5
6
  leadingicon: string;
7
+ icontheme: GoAChipTheme;
6
8
  error: boolean;
7
9
  deletable: boolean;
8
10
  content: string;
@@ -19,10 +21,11 @@ export interface GoAChipProps extends Margins {
19
21
  onClick?: () => void;
20
22
  deletable?: boolean;
21
23
  leadingIcon?: string;
24
+ iconTheme?: GoAChipTheme;
22
25
  error?: boolean;
23
26
  content: string;
24
27
  variant?: GoAChipVariant;
25
28
  testId?: string;
26
29
  }
27
- export declare const GoAChip: ({ leadingIcon, deletable, error, variant, content, onClick, mt, mr, mb, ml, testId, }: GoAChipProps) => import("react/jsx-runtime").JSX.Element;
30
+ export declare const GoAChip: ({ leadingIcon, iconTheme, deletable, error, variant, content, onClick, mt, mr, mb, ml, testId, }: GoAChipProps) => import("react/jsx-runtime").JSX.Element;
28
31
  export default GoAChip;
@@ -9,6 +9,7 @@ interface WCProps extends Margins {
9
9
  accent?: GoAContainerAccent;
10
10
  padding?: GoAContainerPadding;
11
11
  width?: GoAContainerWidth;
12
+ maxwidth?: string;
12
13
  }
13
14
  declare global {
14
15
  namespace JSX {
@@ -26,7 +27,8 @@ export interface GoAContainerProps extends Margins {
26
27
  actions?: ReactNode;
27
28
  children?: ReactNode;
28
29
  width?: GoAContainerWidth;
30
+ maxWidth?: string;
29
31
  testId?: string;
30
32
  }
31
- export declare function GoAContainer({ accent, heading, title, padding, children, actions, type, width, mt, mr, mb, ml, testId, }: GoAContainerProps): JSX.Element;
33
+ export declare function GoAContainer({ accent, heading, title, padding, children, actions, type, width, maxWidth, mt, mr, mb, ml, testId, }: GoAContainerProps): JSX.Element;
32
34
  export default GoAContainer;
@@ -3,6 +3,7 @@ import { Margins } from "../../common/styling";
3
3
  interface WCProps extends Margins {
4
4
  heading: string;
5
5
  open?: boolean;
6
+ maxwidth?: string;
6
7
  }
7
8
  declare global {
8
9
  namespace JSX {
@@ -14,6 +15,7 @@ declare global {
14
15
  export interface GoADetailsProps extends Margins {
15
16
  heading: string;
16
17
  open?: boolean;
18
+ maxWidth?: string;
17
19
  testId?: string;
18
20
  children: ReactNode;
19
21
  }
@@ -2,8 +2,10 @@ interface WCProps {
2
2
  value: string;
3
3
  label?: string;
4
4
  filter?: string;
5
+ mount?: DropdownItemMountType;
5
6
  name?: string;
6
7
  }
8
+ export type DropdownItemMountType = "append" | "prepend" | "reset";
7
9
  declare global {
8
10
  namespace JSX {
9
11
  interface IntrinsicElements {
@@ -16,8 +18,9 @@ export interface GoADropdownItemProps {
16
18
  label?: string;
17
19
  filter?: string;
18
20
  testId?: string;
21
+ mountType?: DropdownItemMountType;
19
22
  name?: string;
20
23
  }
21
24
  export declare function GoADropdownOption(props: GoADropdownItemProps): import("react/jsx-runtime").JSX.Element;
22
- export declare function GoADropdownItem({ value, label, filter, name, testId }: GoADropdownItemProps): import("react/jsx-runtime").JSX.Element;
25
+ export declare function GoADropdownItem({ value, label, filter, name, testId, mountType }: GoADropdownItemProps): import("react/jsx-runtime").JSX.Element;
23
26
  export {};
@@ -7,6 +7,7 @@ interface WCProps extends Margins {
7
7
  requirement?: GoAFormItemRequirement;
8
8
  error?: string;
9
9
  helptext?: string;
10
+ maxwidth?: string;
10
11
  id?: string;
11
12
  }
12
13
  declare global {
@@ -22,9 +23,10 @@ export interface GoAFormItemProps extends Margins {
22
23
  requirement?: GoAFormItemRequirement;
23
24
  error?: React.ReactNode;
24
25
  helpText?: React.ReactNode;
26
+ maxWidth?: string;
25
27
  children?: React.ReactNode;
26
28
  testId?: string;
27
29
  id?: string;
28
30
  }
29
- export declare function GoAFormItem({ children, helpText, error, requirement, label, labelSize, mt, mr, mb, ml, testId, id, }: GoAFormItemProps): JSX.Element;
31
+ export declare function GoAFormItem({ children, helpText, error, requirement, label, labelSize, maxWidth, mt, mr, mb, ml, testId, id, }: GoAFormItemProps): JSX.Element;
30
32
  export default GoAFormItem;
@@ -4,6 +4,7 @@ interface RadioItemProps extends Margins {
4
4
  value?: string;
5
5
  description?: string | React.ReactNode;
6
6
  label?: string;
7
+ maxwidth?: string;
7
8
  disabled?: boolean;
8
9
  checked?: boolean;
9
10
  error?: boolean;
@@ -21,6 +22,7 @@ export interface GoARadioItemProps extends Margins {
21
22
  label?: string;
22
23
  name?: string;
23
24
  description?: string | React.ReactNode;
25
+ maxWidth?: string;
24
26
  disabled?: boolean;
25
27
  checked?: boolean;
26
28
  error?: boolean;
@@ -28,5 +30,5 @@ export interface GoARadioItemProps extends Margins {
28
30
  testId?: string;
29
31
  ariaLabel?: string;
30
32
  }
31
- export declare function GoARadioItem({ name, label, value, description, disabled, checked, error, testId, ariaLabel, children, mt, mr, mb, ml, }: GoARadioItemProps): JSX.Element;
33
+ export declare function GoARadioItem({ name, label, value, description, maxWidth, disabled, checked, error, testId, ariaLabel, children, mt, mr, mb, ml, }: GoARadioItemProps): JSX.Element;
32
34
  export default GoARadioItem;
@@ -1,5 +1,8 @@
1
+ import React from "react";
1
2
  interface WCProps {
2
3
  initialtab?: number;
4
+ ref: React.RefObject<HTMLElement>;
5
+ onChange?: (tab: number) => void;
3
6
  }
4
7
  declare global {
5
8
  namespace JSX {
@@ -12,6 +15,7 @@ export interface GoATabsProps {
12
15
  initialTab?: number;
13
16
  children?: React.ReactNode;
14
17
  testId?: string;
18
+ onChange?: (tab: number) => void;
15
19
  }
16
- export declare function GoATabs({ initialTab, children, testId }: GoATabsProps): JSX.Element;
20
+ export declare function GoATabs({ initialTab, children, testId, onChange, }: GoATabsProps): JSX.Element;
17
21
  export default GoATabs;
@@ -9,6 +9,7 @@ interface WCProps extends Margins {
9
9
  error?: boolean;
10
10
  disabled?: boolean;
11
11
  width?: string;
12
+ maxwidth?: string;
12
13
  arialabel?: string;
13
14
  countby?: CountBy;
14
15
  maxcount?: number;
@@ -29,6 +30,7 @@ export interface GoATextAreaProps extends Margins {
29
30
  error?: boolean;
30
31
  disabled?: boolean;
31
32
  width?: string;
33
+ maxWidth?: string;
32
34
  testId?: string;
33
35
  ariaLabel?: string;
34
36
  countBy?: CountBy;
@@ -36,6 +38,6 @@ export interface GoATextAreaProps extends Margins {
36
38
  onChange: (name: string, value: string) => void;
37
39
  onKeyPress?: (name: string, value: string, key: string) => void;
38
40
  }
39
- export declare function GoATextarea({ name, value, placeholder, rows, disabled, countBy, maxCount, width, testId, error, ariaLabel, mt, mr, mb, ml, onChange, onKeyPress, }: GoATextAreaProps): JSX.Element;
41
+ 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;
40
42
  export { GoATextarea as GoATextArea };
41
43
  export default GoATextarea;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abgov/react-components",
3
- "version": "4.22.0",
3
+ "version": "4.24.0",
4
4
  "description": "Government of Alberta - UI components for React",
5
5
  "bugs": {
6
6
  "url": "https://github.com/GovAlta/ui-components/issues"