@abgov/react-components 4.17.0-alpha.1 → 4.17.0-alpha.3

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.
Files changed (64) hide show
  1. package/lib/accordion/accordion.d.ts +6 -6
  2. package/lib/app-header/app-header.d.ts +3 -3
  3. package/lib/app-header-menu/app-header-menu.d.ts +1 -1
  4. package/lib/badge/badge.d.ts +13 -13
  5. package/lib/block/block.d.ts +4 -3
  6. package/lib/button/button.d.ts +15 -12
  7. package/lib/button-group/button-group.d.ts +10 -9
  8. package/lib/calendar/calendar.d.ts +9 -9
  9. package/lib/callout/callout.d.ts +10 -9
  10. package/lib/card/card-actions.d.ts +3 -3
  11. package/lib/card/card-content.d.ts +3 -3
  12. package/lib/card/card-group.d.ts +3 -3
  13. package/lib/card/card-image.d.ts +3 -3
  14. package/lib/card/card.d.ts +3 -3
  15. package/lib/checkbox/checkbox.d.ts +6 -5
  16. package/lib/chip/chip.d.ts +6 -6
  17. package/lib/circular-progress/circular-progress.d.ts +11 -9
  18. package/lib/container/container.d.ts +12 -12
  19. package/lib/date-picker/date-picker.d.ts +9 -9
  20. package/lib/details/details.d.ts +4 -3
  21. package/lib/divider/divider.d.ts +4 -3
  22. package/lib/dropdown/dropdown-item.d.ts +4 -4
  23. package/lib/dropdown/dropdown.d.ts +3 -3
  24. package/lib/file-upload-card/file-upload-card.d.ts +3 -3
  25. package/lib/file-upload-input/file-upload-input.d.ts +6 -6
  26. package/lib/footer/footer.d.ts +4 -3
  27. package/lib/footer-meta-section/footer-meta-section.d.ts +4 -3
  28. package/lib/footer-nav-section/footer-nav-section.d.ts +3 -3
  29. package/lib/form/form-item.d.ts +9 -8
  30. package/lib/form-step/form-step.d.ts +4 -3
  31. package/lib/form-stepper/form-stepper.d.ts +4 -3
  32. package/lib/grid/grid.d.ts +3 -3
  33. package/lib/hero-banner/hero-banner-actions.d.ts +2 -2
  34. package/lib/hero-banner/hero-banner.d.ts +3 -3
  35. package/lib/icon/icon.d.ts +14 -11
  36. package/lib/icon-button/icon-button.d.ts +10 -9
  37. package/lib/input/input.d.ts +22 -21
  38. package/lib/microsite-header/microsite-header.d.ts +15 -12
  39. package/lib/modal/modal.d.ts +17 -15
  40. package/lib/notification/notification.d.ts +11 -9
  41. package/lib/one-column-layout/one-column-layout.d.ts +4 -3
  42. package/lib/page-block/page-block.d.ts +4 -3
  43. package/lib/pages/pages.d.ts +3 -3
  44. package/lib/pagination/pagination.d.ts +4 -3
  45. package/lib/popover/popover.d.ts +6 -6
  46. package/lib/radio-group/radio-group.d.ts +8 -7
  47. package/lib/radio-group/radio.d.ts +3 -3
  48. package/lib/side-menu/side-menu.d.ts +4 -3
  49. package/lib/side-menu-group/side-menu-group.d.ts +3 -3
  50. package/lib/side-menu-heading/side-menu-heading.d.ts +3 -3
  51. package/lib/skeleton/skeleton.d.ts +11 -9
  52. package/lib/spacer/spacer.d.ts +4 -3
  53. package/lib/spinner/spinner.d.ts +4 -3
  54. package/lib/tab/tab.d.ts +4 -3
  55. package/lib/table/table-sort-header.d.ts +3 -3
  56. package/lib/table/table.d.ts +8 -6
  57. package/lib/tabs/tabs.d.ts +3 -3
  58. package/lib/textarea/textarea.d.ts +3 -3
  59. package/lib/three-column-layout/three-column-layout.d.ts +3 -3
  60. package/lib/tooltip/tooltip.d.ts +10 -8
  61. package/lib/two-column-layout/two-column-layout.d.ts +3 -3
  62. package/package.json +1 -1
  63. package/react-components.esm.js +136 -136
  64. package/react-components.umd.js +90 -90
@@ -1,10 +1,10 @@
1
- import React, { FC, ReactNode } from "react";
1
+ import { ReactNode } from "react";
2
2
  import { Margins } from "../../common/styling";
3
- declare type Position = "above" | "below" | "auto";
3
+ export declare type GoAPosition = "above" | "below" | "auto";
4
4
  interface WCProps extends Margins {
5
5
  maxwidth?: string;
6
6
  padded?: boolean;
7
- position?: Position;
7
+ position?: GoAPosition;
8
8
  relative?: boolean;
9
9
  }
10
10
  declare global {
@@ -14,14 +14,14 @@ declare global {
14
14
  }
15
15
  }
16
16
  }
17
- interface Props extends Margins {
17
+ export interface GoAPopoverProps extends Margins {
18
18
  target?: ReactNode;
19
19
  testId?: string;
20
20
  maxWidth?: string;
21
21
  padded?: boolean;
22
- position?: Position;
22
+ position?: GoAPosition;
23
23
  children: ReactNode;
24
24
  relative?: boolean;
25
25
  }
26
- export declare const GoAPopover: FC<Props>;
26
+ export declare function GoAPopover({ target, testId, maxWidth, padded, position, relative, children, mt, mr, mb, ml, }: GoAPopoverProps): JSX.Element;
27
27
  export default GoAPopover;
@@ -1,11 +1,12 @@
1
- import React, { FC } from "react";
1
+ /// <reference types="react" />
2
2
  import { Margins } from "../../common/styling";
3
3
  export * from "./radio";
4
- interface RadioGroupProps extends Margins {
4
+ export declare type GoARadioGroupOrientation = "horizontal" | "vertical";
5
+ interface WCProps extends Margins {
5
6
  ref: React.RefObject<HTMLElement>;
6
7
  name: string;
7
8
  value?: string;
8
- orientation: string;
9
+ orientation: GoARadioGroupOrientation;
9
10
  disabled: boolean;
10
11
  error: boolean;
11
12
  arialabel?: string;
@@ -13,20 +14,20 @@ interface RadioGroupProps extends Margins {
13
14
  declare global {
14
15
  namespace JSX {
15
16
  interface IntrinsicElements {
16
- "goa-radio-group": RadioGroupProps & React.HTMLAttributes<HTMLElement>;
17
+ "goa-radio-group": WCProps & React.HTMLAttributes<HTMLElement>;
17
18
  }
18
19
  }
19
20
  }
20
- interface Props extends Margins {
21
+ export interface GoARadioGroupProps extends Margins {
21
22
  name: string;
22
23
  value?: string;
23
24
  disabled?: boolean;
24
- orientation?: "horizontal" | "vertical";
25
+ orientation?: GoARadioGroupOrientation;
25
26
  testId?: string;
26
27
  error?: boolean;
27
28
  ariaLabel?: string;
28
29
  children?: React.ReactNode;
29
30
  onChange: (name: string, value: string) => void;
30
31
  }
31
- export declare const GoARadioGroup: FC<Props>;
32
+ export declare function GoARadioGroup({ name, value, children, orientation, disabled, error, testId, ariaLabel, mt, mr, mb, ml, onChange, }: GoARadioGroupProps): JSX.Element;
32
33
  export default GoARadioGroup;
@@ -1,4 +1,4 @@
1
- import React, { FC } from "react";
1
+ /// <reference types="react" />
2
2
  interface RadioItemProps {
3
3
  name?: string;
4
4
  value: string;
@@ -15,7 +15,7 @@ declare global {
15
15
  }
16
16
  }
17
17
  }
18
- interface Props {
18
+ export interface GoARadioItemProps {
19
19
  value: string;
20
20
  label?: string;
21
21
  name?: string;
@@ -26,5 +26,5 @@ interface Props {
26
26
  children?: React.ReactNode;
27
27
  testId?: string;
28
28
  }
29
- export declare const GoARadioItem: FC<Props>;
29
+ export declare function GoARadioItem({ name, label, value, description, disabled, checked, error, testId, children, }: GoARadioItemProps): JSX.Element;
30
30
  export default GoARadioItem;
@@ -1,4 +1,4 @@
1
- import React, { ReactNode } from "react";
1
+ import { ReactNode } from "react";
2
2
  declare global {
3
3
  namespace JSX {
4
4
  interface IntrinsicElements {
@@ -6,8 +6,9 @@ declare global {
6
6
  }
7
7
  }
8
8
  }
9
- export interface SideMenuProps {
9
+ export interface GoASideMenuProps {
10
10
  children: ReactNode;
11
11
  }
12
- export declare function GoASideMenu(props: SideMenuProps): JSX.Element;
12
+ export declare type SideMenuProps = GoASideMenuProps;
13
+ export declare function GoASideMenu(props: GoASideMenuProps): JSX.Element;
13
14
  export default GoASideMenu;
@@ -1,4 +1,4 @@
1
- import React, { ReactNode } from "react";
1
+ import { ReactNode } from "react";
2
2
  interface WCProps {
3
3
  heading: string;
4
4
  }
@@ -9,9 +9,9 @@ declare global {
9
9
  }
10
10
  }
11
11
  }
12
- interface SideMenuGroupProps {
12
+ export interface GoASideMenuGroupProps {
13
13
  heading: string;
14
14
  children?: ReactNode;
15
15
  }
16
- export declare function GoASideMenuGroup(props: SideMenuGroupProps): JSX.Element;
16
+ export declare function GoASideMenuGroup(props: GoASideMenuGroupProps): JSX.Element;
17
17
  export default GoASideMenuGroup;
@@ -1,4 +1,4 @@
1
- import React, { ReactNode } from "react";
1
+ import { ReactNode } from "react";
2
2
  import { GoAIconType } from "../icon/icon";
3
3
  interface WCProps {
4
4
  icon?: GoAIconType;
@@ -10,10 +10,10 @@ declare global {
10
10
  }
11
11
  }
12
12
  }
13
- interface SideMenuSectionTitleProps {
13
+ export interface GoASideMenuHeadingProps {
14
14
  meta?: ReactNode;
15
15
  icon?: GoAIconType;
16
16
  children?: ReactNode;
17
17
  }
18
- export declare function GoASideMenuHeading(props: SideMenuSectionTitleProps): JSX.Element;
18
+ export declare function GoASideMenuHeading(props: GoASideMenuHeadingProps): JSX.Element;
19
19
  export default GoASideMenuHeading;
@@ -1,12 +1,13 @@
1
- import React from "react";
1
+ /// <reference types="react" />
2
2
  import { Margins } from "../../common/styling";
3
- export declare type SkeletonType = "image" | "text" | "title" | "text-small" | "avatar" | "header" | "paragraph" | "thumbnail" | "card" | "profile" | "article";
4
- declare type SkeletonSize = 1 | 2 | 3 | 4;
3
+ export declare type GoASkeletonType = "image" | "text" | "title" | "text-small" | "avatar" | "header" | "paragraph" | "thumbnail" | "card" | "profile" | "article";
4
+ export declare type GoASkeletonSize = 1 | 2 | 3 | 4;
5
+ export declare type SkeletonType = GoASkeletonType;
5
6
  interface WCProps extends Margins {
6
7
  maxwidth?: string;
7
- size?: SkeletonSize;
8
+ size?: GoASkeletonSize;
8
9
  linecount?: number;
9
- type: SkeletonType;
10
+ type: GoASkeletonType;
10
11
  }
11
12
  declare global {
12
13
  namespace JSX {
@@ -15,12 +16,13 @@ declare global {
15
16
  }
16
17
  }
17
18
  }
18
- export interface SkeletonProps extends Margins {
19
+ export interface GoASkeletonProps extends Margins {
19
20
  maxWidth?: string;
20
- size?: SkeletonSize;
21
+ size?: GoASkeletonSize;
21
22
  lineCount?: number;
22
- type: SkeletonType;
23
+ type: GoASkeletonType;
23
24
  testId?: string;
24
25
  }
25
- export declare const GoASkeleton: ({ maxWidth, size, lineCount, type, testId, mt, mr, mb, ml, }: SkeletonProps) => JSX.Element;
26
+ export declare type SkeletonProps = GoASkeletonProps;
27
+ export declare const GoASkeleton: ({ maxWidth, size, lineCount, type, testId, mt, mr, mb, ml, }: GoASkeletonProps) => JSX.Element;
26
28
  export default GoASkeleton;
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ /// <reference types="react" />
2
2
  import { Spacing } from "../../common/styling";
3
3
  interface WCProps {
4
4
  hspacing?: Spacing | "fill";
@@ -11,10 +11,11 @@ declare global {
11
11
  }
12
12
  }
13
13
  }
14
- export interface SpacerProps {
14
+ export interface GoASpacerProps {
15
15
  hSpacing?: Spacing | "fill";
16
16
  vSpacing?: Spacing;
17
17
  testId?: string;
18
18
  }
19
- export declare function GoASpacer(props: SpacerProps): JSX.Element;
19
+ export declare type SpacerProps = GoASpacerProps;
20
+ export declare function GoASpacer(props: GoASpacerProps): JSX.Element;
20
21
  export default GoASpacer;
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ /// <reference types="react" />
2
2
  export declare type SpinnerType = "infinite" | "progress";
3
3
  export declare type SpinnerSize = "small" | "medium" | "large" | "xlarge";
4
4
  interface WCProps {
@@ -14,12 +14,13 @@ declare global {
14
14
  }
15
15
  }
16
16
  }
17
- export interface SpinnerProps {
17
+ export interface GoASpinnerProps {
18
18
  type: SpinnerType;
19
19
  size: SpinnerSize;
20
20
  invert?: boolean;
21
21
  progress?: number;
22
22
  testId?: string;
23
23
  }
24
- export declare const GoASpinner: ({ type, size, progress, invert, testId, }: SpinnerProps) => JSX.Element;
24
+ export declare type SpinnerProps = GoASpinnerProps;
25
+ export declare function GoASpinner({ type, size, progress, invert, testId, }: GoASpinnerProps): JSX.Element;
25
26
  export default GoASpinner;
package/lib/tab/tab.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import React, { FC } from "react";
1
+ /// <reference types="react" />
2
2
  interface WCProps {
3
3
  heading?: React.ReactNode;
4
4
  }
@@ -9,9 +9,10 @@ declare global {
9
9
  }
10
10
  }
11
11
  }
12
- export interface TabItemProps {
12
+ export interface GoATabItemProps {
13
13
  heading?: React.ReactNode;
14
14
  children?: React.ReactNode;
15
15
  }
16
- export declare const GoATab: FC<TabItemProps>;
16
+ export declare type TabItemProps = GoATabItemProps;
17
+ export declare function GoATab({ heading, children }: GoATabItemProps): JSX.Element;
17
18
  export {};
@@ -1,4 +1,4 @@
1
- import React, { FC } from "react";
1
+ /// <reference types="react" />
2
2
  export declare type Direction = "asc" | "desc" | "none";
3
3
  interface WCProps {
4
4
  name?: string;
@@ -11,10 +11,10 @@ declare global {
11
11
  }
12
12
  }
13
13
  }
14
- interface Props {
14
+ export interface GoATableSortProps {
15
15
  name?: string;
16
16
  direction?: Direction;
17
17
  children?: React.ReactNode;
18
18
  }
19
- export declare const GoATableSortHeader: FC<Props>;
19
+ export declare function GoATableSortHeader({ name, direction, children, }: GoATableSortProps): JSX.Element;
20
20
  export default GoATableSortHeader;
@@ -1,11 +1,12 @@
1
- import React, { ReactNode } from "react";
1
+ import { ReactNode } from "react";
2
2
  import { Margins } from "../../common/styling";
3
- export declare type TableVariant = "normal" | "relaxed";
3
+ export declare type GoATableVariant = "normal" | "relaxed";
4
+ export declare type TableVariant = GoATableVariant;
4
5
  interface WCProps extends Margins {
5
6
  ref?: React.MutableRefObject<HTMLElement | null>;
6
7
  width?: string;
7
8
  stickyheader?: boolean;
8
- variant?: TableVariant;
9
+ variant?: GoATableVariant;
9
10
  }
10
11
  declare global {
11
12
  namespace JSX {
@@ -14,12 +15,13 @@ declare global {
14
15
  }
15
16
  }
16
17
  }
17
- export interface TableProps extends Margins {
18
+ export interface GoATableProps extends Margins {
18
19
  width?: string;
19
20
  onSort?: (sortBy: string, sortDir: number) => void;
20
- variant?: TableVariant;
21
+ variant?: GoATableVariant;
21
22
  testId?: string;
22
23
  children?: ReactNode;
23
24
  }
24
- export declare function GoATable(props: TableProps): JSX.Element;
25
+ export declare type TableProps = GoATableProps;
26
+ export declare function GoATable(props: GoATableProps): JSX.Element;
25
27
  export default GoATable;
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ /// <reference types="react" />
2
2
  interface WCProps {
3
3
  initialtab?: number;
4
4
  }
@@ -9,9 +9,9 @@ declare global {
9
9
  }
10
10
  }
11
11
  }
12
- interface TabsProps {
12
+ export interface GoATabsProps {
13
13
  initialTab?: number;
14
14
  children?: React.ReactNode;
15
15
  }
16
- export declare function GoATabs({ initialTab, children }: TabsProps): JSX.Element;
16
+ export declare function GoATabs({ initialTab, children }: GoATabsProps): JSX.Element;
17
17
  export default GoATabs;
@@ -1,4 +1,4 @@
1
- import React, { FC } from "react";
1
+ /// <reference types="react" />
2
2
  import { Margins } from "../../common/styling";
3
3
  interface WCProps extends Margins {
4
4
  ref: React.Ref<HTMLTextAreaElement>;
@@ -20,7 +20,7 @@ declare global {
20
20
  }
21
21
  }
22
22
  }
23
- interface Props extends Margins {
23
+ export interface GoATextAreaProps extends Margins {
24
24
  name: string;
25
25
  value: string;
26
26
  id?: string;
@@ -35,5 +35,5 @@ interface Props extends Margins {
35
35
  ariaLabel?: string;
36
36
  onChange: (name: string, value: string) => void;
37
37
  }
38
- export declare const GoATextArea: FC<Props>;
38
+ export declare function GoATextArea({ name, value, placeholder, rows, disabled, showCounter, maxCharCount, width, testId, error, ariaLabel, mt, mr, mb, ml, onChange, }: GoATextAreaProps): JSX.Element;
39
39
  export default GoATextArea;
@@ -1,4 +1,4 @@
1
- import React, { ReactNode } from "react";
1
+ import { ReactNode } from "react";
2
2
  interface WCProps {
3
3
  leftcolumnwidth?: string;
4
4
  maxcontentwidth?: string;
@@ -11,7 +11,7 @@ declare global {
11
11
  }
12
12
  }
13
13
  }
14
- interface Props {
14
+ export interface GoAThreeColumnLayoutProps {
15
15
  leftColumnWidth?: string;
16
16
  rightColumnWidth?: string;
17
17
  maxContentWidth?: string;
@@ -22,5 +22,5 @@ interface Props {
22
22
  sideMenu?: ReactNode;
23
23
  children: ReactNode;
24
24
  }
25
- export declare function GoAThreeColumnLayout(props: Props): JSX.Element;
25
+ export declare function GoAThreeColumnLayout(props: GoAThreeColumnLayoutProps): JSX.Element;
26
26
  export default GoAThreeColumnLayout;
@@ -1,9 +1,11 @@
1
- import React, { ReactNode } from "react";
1
+ import { ReactNode } from "react";
2
2
  import { Margins } from "../../common/styling";
3
+ export declare type GoATooltipPosition = "top" | "bottom" | "left" | "right";
4
+ export declare type GoATooltipHorizontalAlignment = "left" | "right" | "center";
3
5
  interface WCProps extends Margins {
4
- position?: string;
6
+ position?: GoATooltipPosition;
5
7
  content?: string;
6
- halign?: string;
8
+ halign?: GoATooltipHorizontalAlignment;
7
9
  }
8
10
  declare global {
9
11
  namespace JSX {
@@ -12,12 +14,12 @@ declare global {
12
14
  }
13
15
  }
14
16
  }
15
- interface TooltipProps extends Margins {
16
- position?: string;
17
+ export interface GoATooltipProps extends Margins {
18
+ position?: GoATooltipPosition;
17
19
  content?: string;
18
- hAlign?: string;
20
+ hAlign?: GoATooltipHorizontalAlignment;
19
21
  testId?: string;
20
- children: ReactNode;
22
+ children?: ReactNode;
21
23
  }
22
- export declare const GoATooltip: React.FC<TooltipProps>;
24
+ export declare function GoATooltip(props: GoATooltipProps): JSX.Element;
23
25
  export default GoATooltip;
@@ -1,4 +1,4 @@
1
- import React, { ReactNode } from "react";
1
+ import { ReactNode } from "react";
2
2
  interface WCProps {
3
3
  navcolumnwidth?: string;
4
4
  maxcontentwidth?: string;
@@ -10,7 +10,7 @@ declare global {
10
10
  }
11
11
  }
12
12
  }
13
- interface Props {
13
+ export interface GoATwoColumnLayoutProps {
14
14
  navColumnWidth?: string;
15
15
  maxContentWidth?: string;
16
16
  header: ReactNode;
@@ -18,5 +18,5 @@ interface Props {
18
18
  nav: ReactNode;
19
19
  children: ReactNode;
20
20
  }
21
- export declare function GoATwoColumnLayout(props: Props): JSX.Element;
21
+ export declare function GoATwoColumnLayout(props: GoATwoColumnLayoutProps): JSX.Element;
22
22
  export default GoATwoColumnLayout;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abgov/react-components",
3
- "version": "4.17.0-alpha.1",
3
+ "version": "4.17.0-alpha.3",
4
4
  "description": "Government of Alberta - UI components for React",
5
5
  "bugs": {
6
6
  "url": "https://github.com/GovAlta/ui-components/issues"