@abgov/react-components 4.10.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,6 +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";
48
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 {
@@ -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
  }
@@ -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 {
@@ -1,9 +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;
6
7
  maxcontentwidth?: string;
8
+ arialive?: AriaLiveType;
7
9
  }
8
10
  declare global {
9
11
  namespace JSX {
@@ -14,10 +16,11 @@ declare global {
14
16
  }
15
17
  interface Props {
16
18
  type?: NotificationType;
19
+ ariaLive?: AriaLiveType;
17
20
  maxContentWidth?: string;
18
21
  children?: React.ReactNode;
19
22
  onDismiss?: () => void;
20
23
  testId?: string;
21
24
  }
22
- export declare const GoANotification: ({ type, maxContentWidth, children, testId, onDismiss, }: Props) => JSX.Element;
25
+ export declare const GoANotification: ({ type, ariaLive, maxContentWidth, children, testId, onDismiss, }: Props) => JSX.Element;
23
26
  export default GoANotification;
@@ -1,8 +1,10 @@
1
1
  import React, { FC, ReactNode } from "react";
2
2
  import { Margins } from "../../common/styling";
3
+ declare type Position = "above" | "below" | "auto";
3
4
  interface WCProps extends Margins {
4
5
  maxwidth?: string;
5
6
  padded?: boolean;
7
+ position?: Position;
6
8
  }
7
9
  declare global {
8
10
  namespace JSX {
@@ -16,6 +18,7 @@ interface Props extends Margins {
16
18
  testId?: string;
17
19
  maxWidth?: string;
18
20
  padded?: boolean;
21
+ position?: Position;
19
22
  }
20
23
  export declare const GoAPopover: FC<Props>;
21
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;
@@ -15,10 +15,11 @@ interface Props {
15
15
  leftColumnWidth?: string;
16
16
  rightColumnWidth?: string;
17
17
  maxContentWidth?: string;
18
- header: ReactNode;
19
- footer: ReactNode;
20
- nav: ReactNode;
21
- sidebar: ReactNode;
18
+ header?: ReactNode;
19
+ footer?: ReactNode;
20
+ nav?: ReactNode;
21
+ sidebar?: ReactNode;
22
+ sideMenu?: ReactNode;
22
23
  children: ReactNode;
23
24
  }
24
25
  export declare function GoAThreeColumnLayout(props: Props): JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abgov/react-components",
3
- "version": "4.10.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"