@abgov/react-components 4.9.0 → 4.11.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.
package/index.d.ts CHANGED
@@ -1,9 +1,13 @@
1
1
  import "@abgov/web-components";
2
+ export * from "./lib/side-menu-group/side-menu-group";
3
+ export * from "./lib/side-menu/side-menu";
4
+ export * from "./lib/app-header-menu/app-header-menu";
2
5
  export * from "./lib/pages/pages";
3
6
  export * from "./lib/file-upload-card/file-upload-card";
4
7
  export * from "./lib/file-upload-input/file-upload-input";
5
8
  export type { GoAIconType } from "./lib/icon/icon";
6
9
  export type { GoABadgeType } from "./lib/badge/badge";
10
+ export type { GoAFormStepStatusType } from "./lib/form-step/form-step";
7
11
  export * from "./lib/accordion/accordion";
8
12
  export * from "./lib/form-step/form-step";
9
13
  export * from "./lib/form-stepper/form-stepper";
@@ -43,5 +47,7 @@ export * from "./lib/skeleton/skeleton";
43
47
  export * from "./lib/spacer/spacer";
44
48
  export * from "./lib/spinner/spinner";
45
49
  export * from "./lib/table/table";
50
+ export * from "./lib/table/table-sort-header";
46
51
  export * from "./lib/textarea/textarea";
47
52
  export * from "./lib/two-column-layout/two-column-layout";
53
+ export * from "./lib/three-column-layout/three-column-layout";
@@ -0,0 +1,20 @@
1
+ import React, { ReactNode } from "react";
2
+ import { GoAIconType } from "../icon/icon";
3
+ interface WCProps {
4
+ heading: string;
5
+ leadingicon?: GoAIconType;
6
+ }
7
+ export interface GoAAppHeaderMenuProps {
8
+ heading: string;
9
+ leadingIcon?: GoAIconType;
10
+ children?: ReactNode;
11
+ }
12
+ declare global {
13
+ namespace JSX {
14
+ interface IntrinsicElements {
15
+ "goa-app-header-menu": WCProps & React.HTMLAttributes<HTMLElement>;
16
+ }
17
+ }
18
+ }
19
+ export declare function GoAAppHeaderMenu(props: GoAAppHeaderMenuProps): JSX.Element;
20
+ export default GoAAppHeaderMenu;
@@ -6,11 +6,13 @@ interface GoABadgeProps extends Margins {
6
6
  icon?: boolean;
7
7
  content?: string;
8
8
  testId?: string;
9
+ ariaLabel?: string;
9
10
  }
10
11
  interface WCProps extends Margins {
11
12
  type: GoABadgeType;
12
13
  icon?: boolean;
13
14
  content?: string;
15
+ arialabel?: string;
14
16
  }
15
17
  declare global {
16
18
  namespace JSX {
@@ -1,9 +1,11 @@
1
1
  import React from "react";
2
2
  import { Margins } from "../../common/styling";
3
3
  declare type CalloutType = "important" | "information" | "event" | "success" | "emergency";
4
+ declare type CalloutSize = "medium" | "large";
4
5
  interface WCProps extends Margins {
5
6
  heading?: string;
6
7
  type?: CalloutType;
8
+ size?: CalloutSize;
7
9
  }
8
10
  declare global {
9
11
  namespace JSX {
@@ -15,8 +17,9 @@ declare global {
15
17
  export interface CalloutProps extends Margins {
16
18
  heading?: string;
17
19
  type?: CalloutType;
20
+ size?: CalloutSize;
18
21
  testId?: string;
19
22
  children?: React.ReactNode;
20
23
  }
21
- export declare const GoACallout: ({ heading, type, testId, children, mt, mr, mb, ml, }: CalloutProps) => JSX.Element;
24
+ export declare const GoACallout: ({ heading, type, size, testId, children, mt, mr, mb, ml, }: CalloutProps) => JSX.Element;
22
25
  export default GoACallout;
@@ -2,6 +2,7 @@ import React, { ReactNode } from "react";
2
2
  import { Margins } from "../../common/styling";
3
3
  interface WCProps extends Margins {
4
4
  heading: string;
5
+ open?: boolean;
5
6
  }
6
7
  declare global {
7
8
  namespace JSX {
@@ -12,6 +13,7 @@ declare global {
12
13
  }
13
14
  export interface DetailsProps extends Margins {
14
15
  heading: string;
16
+ open?: boolean;
15
17
  children: ReactNode;
16
18
  }
17
19
  export declare function GoADetails(props: DetailsProps): JSX.Element;
@@ -1,8 +1,8 @@
1
1
  import React from "react";
2
- declare type Status = "complete" | "incomplete";
2
+ export declare type GoAFormStepStatusType = "complete" | "incomplete";
3
3
  interface WCProps {
4
4
  text: string;
5
- status?: Status;
5
+ status?: GoAFormStepStatusType;
6
6
  }
7
7
  declare global {
8
8
  namespace JSX {
@@ -13,7 +13,7 @@ declare global {
13
13
  }
14
14
  export interface FormStepProps {
15
15
  text: string;
16
- status?: Status;
16
+ status?: GoAFormStepStatusType;
17
17
  }
18
18
  export declare function GoAFormStep(props: FormStepProps): JSX.Element;
19
19
  export default GoAFormStep;
@@ -13,7 +13,7 @@ declare global {
13
13
  }
14
14
  export interface FormStepperProps extends Margins {
15
15
  step?: number;
16
- testId: string;
16
+ testId?: string;
17
17
  children?: ReactNode;
18
18
  onChange?: (step: number) => void;
19
19
  }
@@ -3,6 +3,7 @@ interface WCProps {
3
3
  heading: string;
4
4
  backgroundurl: string;
5
5
  minheight?: string;
6
+ maxcontentwidth?: string;
6
7
  }
7
8
  declare global {
8
9
  namespace JSX {
@@ -17,6 +18,7 @@ interface Props {
17
18
  minHeight?: string;
18
19
  testId?: string;
19
20
  children?: React.ReactNode;
21
+ maxContentWidth?: string;
20
22
  }
21
23
  export declare const GoAHeroBanner: FC<Props>;
22
24
  export default GoAHeroBanner;
@@ -28,6 +28,7 @@ interface WCProps extends Margins {
28
28
  min?: string | number;
29
29
  max?: string | number;
30
30
  step?: number;
31
+ maxlength?: number;
31
32
  }
32
33
  declare global {
33
34
  namespace JSX {
@@ -57,6 +58,7 @@ interface BaseProps extends Margins {
57
58
  ariaLabel?: string;
58
59
  leadingContent?: React.ReactNode;
59
60
  trailingContent?: React.ReactNode;
61
+ maxLength?: number;
60
62
  }
61
63
  declare type OnChange = (name: string, value: string) => void;
62
64
  export interface InputProps extends BaseProps {
@@ -11,12 +11,14 @@ interface WebComponentProps {
11
11
  type: ServiceLevel;
12
12
  version?: string;
13
13
  feedbackurl?: string;
14
+ maxcontentwidth?: string;
14
15
  }
15
16
  export interface HeaderProps {
16
17
  type: ServiceLevel;
17
18
  version?: string;
18
19
  feedbackUrl?: string;
19
20
  testId?: string;
21
+ maxContentWidth?: string;
20
22
  }
21
23
  export declare const GoAMicrositeHeader: FC<HeaderProps>;
22
24
  export default GoAMicrositeHeader;
@@ -1,8 +1,11 @@
1
1
  import React from "react";
2
2
  export declare type NotificationType = "important" | "information" | "event" | "emergency";
3
+ export declare type AriaLiveType = "polite" | "assertive" | "off";
3
4
  interface WCProps {
4
5
  ref: React.RefObject<HTMLElement>;
5
6
  type: NotificationType;
7
+ maxcontentwidth?: string;
8
+ arialive?: AriaLiveType;
6
9
  }
7
10
  declare global {
8
11
  namespace JSX {
@@ -13,9 +16,11 @@ declare global {
13
16
  }
14
17
  interface Props {
15
18
  type?: NotificationType;
19
+ ariaLive?: AriaLiveType;
20
+ maxContentWidth?: string;
16
21
  children?: React.ReactNode;
17
22
  onDismiss?: () => void;
18
23
  testId?: string;
19
24
  }
20
- export declare const GoANotification: ({ type, children, testId, onDismiss, }: Props) => JSX.Element;
25
+ export declare const GoANotification: ({ type, ariaLive, maxContentWidth, children, testId, onDismiss, }: Props) => JSX.Element;
21
26
  export default GoANotification;
@@ -1,7 +1,10 @@
1
1
  import React, { FC, ReactNode } from "react";
2
- interface WCProps {
2
+ import { Margins } from "../../common/styling";
3
+ declare type Position = "above" | "below" | "auto";
4
+ interface WCProps extends Margins {
3
5
  maxwidth?: string;
4
6
  padded?: boolean;
7
+ position?: Position;
5
8
  }
6
9
  declare global {
7
10
  namespace JSX {
@@ -10,11 +13,12 @@ declare global {
10
13
  }
11
14
  }
12
15
  }
13
- interface Props {
16
+ interface Props extends Margins {
14
17
  target?: ReactNode;
15
18
  testId?: string;
16
19
  maxWidth?: string;
17
20
  padded?: boolean;
21
+ position?: Position;
18
22
  }
19
23
  export declare const GoAPopover: FC<Props>;
20
24
  export default GoAPopover;
@@ -0,0 +1,13 @@
1
+ import React, { ReactNode } from "react";
2
+ declare global {
3
+ namespace JSX {
4
+ interface IntrinsicElements {
5
+ "goa-side-menu": React.HTMLAttributes<HTMLElement>;
6
+ }
7
+ }
8
+ }
9
+ export interface SideMenuProps {
10
+ children: ReactNode;
11
+ }
12
+ export declare function GoASideMenu(props: SideMenuProps): JSX.Element;
13
+ export default GoASideMenu;
@@ -0,0 +1,17 @@
1
+ import React, { ReactNode } from "react";
2
+ interface WCProps {
3
+ heading: string;
4
+ }
5
+ declare global {
6
+ namespace JSX {
7
+ interface IntrinsicElements {
8
+ "goa-side-menu-group": WCProps & React.HTMLAttributes<HTMLElement>;
9
+ }
10
+ }
11
+ }
12
+ interface SideMenuGroupProps {
13
+ heading: string;
14
+ children?: ReactNode;
15
+ }
16
+ export declare function GoASideMenuGroup(props: SideMenuGroupProps): JSX.Element;
17
+ export default GoASideMenuGroup;
@@ -0,0 +1,20 @@
1
+ import React, { FC } from "react";
2
+ export declare type Direction = "asc" | "desc" | "none";
3
+ interface WCProps {
4
+ name?: string;
5
+ direction?: Direction;
6
+ }
7
+ declare global {
8
+ namespace JSX {
9
+ interface IntrinsicElements {
10
+ "goa-table-sort-header": WCProps & React.HTMLAttributes<HTMLElement>;
11
+ }
12
+ }
13
+ }
14
+ interface Props {
15
+ name?: string;
16
+ direction?: Direction;
17
+ children?: React.ReactNode;
18
+ }
19
+ export declare const GoATableSortHeader: FC<Props>;
20
+ export default GoATableSortHeader;
@@ -0,0 +1,26 @@
1
+ import React, { ReactNode } from "react";
2
+ interface WCProps {
3
+ leftcolumnwidth?: string;
4
+ maxcontentwidth?: string;
5
+ rightcolumnwidth?: string;
6
+ }
7
+ declare global {
8
+ namespace JSX {
9
+ interface IntrinsicElements {
10
+ "goa-three-column-layout": WCProps & React.HTMLAttributes<HTMLElement>;
11
+ }
12
+ }
13
+ }
14
+ interface Props {
15
+ leftColumnWidth?: string;
16
+ rightColumnWidth?: string;
17
+ maxContentWidth?: string;
18
+ header?: ReactNode;
19
+ footer?: ReactNode;
20
+ nav?: ReactNode;
21
+ sidebar?: ReactNode;
22
+ sideMenu?: ReactNode;
23
+ children: ReactNode;
24
+ }
25
+ export declare function GoAThreeColumnLayout(props: Props): JSX.Element;
26
+ export default GoAThreeColumnLayout;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abgov/react-components",
3
- "version": "4.9.0",
3
+ "version": "4.11.0",
4
4
  "description": "Government of Alberta - UI components for React",
5
5
  "bugs": {
6
6
  "url": "https://github.com/GovAlta/ui-components/issues"