@abgov/react-components 4.0.0-alpha.11 → 4.0.0-alpha.110

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 (61) hide show
  1. package/README.md +20 -45
  2. package/common/styling.d.ts +9 -0
  3. package/experimental/package.json +2 -1
  4. package/index.d.ts +40 -36
  5. package/lib/accordion/accordion.d.ts +27 -0
  6. package/lib/app-header/app-header.d.ts +8 -4
  7. package/lib/badge/badge.d.ts +21 -10
  8. package/lib/block/block.d.ts +22 -0
  9. package/lib/button/button.d.ts +13 -14
  10. package/lib/button-group/button-group.d.ts +13 -8
  11. package/lib/callout/callout.d.ts +10 -8
  12. package/lib/card/card-actions.d.ts +2 -5
  13. package/lib/card/card-content.d.ts +2 -2
  14. package/lib/card/card-group.d.ts +2 -5
  15. package/lib/card/card-image.d.ts +2 -2
  16. package/lib/card/card.d.ts +10 -6
  17. package/lib/card/index.d.ts +5 -5
  18. package/lib/checkbox/checkbox.d.ts +10 -6
  19. package/lib/chip/chip.d.ts +10 -5
  20. package/lib/circular-progress/circular-progress.d.ts +4 -6
  21. package/lib/container/container.d.ts +16 -11
  22. package/lib/divider/divider.d.ts +13 -0
  23. package/lib/dropdown/dropdown-item.d.ts +22 -0
  24. package/lib/dropdown/dropdown.d.ts +23 -16
  25. package/lib/footer/footer.d.ts +18 -0
  26. package/lib/footer-meta-section/footer-meta-section.d.ts +13 -0
  27. package/lib/footer-nav-section/footer-nav-section.d.ts +20 -0
  28. package/lib/form/form-item.d.ts +10 -6
  29. package/lib/form/index.d.ts +1 -1
  30. package/lib/grid/grid.d.ts +21 -0
  31. package/lib/hero-banner/hero-banner-actions.d.ts +5 -3
  32. package/lib/hero-banner/hero-banner.d.ts +8 -4
  33. package/lib/icon/icon.d.ts +39 -0
  34. package/lib/icon-button/icon-button.d.ts +31 -0
  35. package/lib/input/input.d.ts +61 -39
  36. package/lib/microsite-header/microsite-header.d.ts +6 -5
  37. package/lib/modal/modal.d.ts +11 -4
  38. package/lib/notification/notification.d.ts +8 -5
  39. package/lib/one-column-layout/one-column-layout.d.ts +13 -0
  40. package/lib/page-block/page-block.d.ts +11 -3
  41. package/lib/pagination/pagination.d.ts +26 -0
  42. package/lib/radio-group/radio-group.d.ts +10 -6
  43. package/lib/radio-group/radio.d.ts +3 -2
  44. package/lib/skeleton/skeleton.d.ts +14 -7
  45. package/lib/spacer/spacer.d.ts +20 -0
  46. package/lib/spinner/spinner.d.ts +3 -4
  47. package/lib/table/table.d.ts +25 -0
  48. package/lib/textarea/textarea.d.ts +9 -4
  49. package/lib/two-column-layout/two-column-layout.d.ts +22 -0
  50. package/package.json +6 -6
  51. package/react-components.esm.js +18137 -251
  52. package/react-components.umd.js +18853 -922
  53. package/lib/app-footer/app-footer.d.ts +0 -26
  54. package/lib/app-footer/meta-link.d.ts +0 -20
  55. package/lib/app-footer/navigation-link.d.ts +0 -22
  56. package/lib/dropdown/dropdown-option.d.ts +0 -21
  57. package/lib/flex/index.d.ts +0 -1
  58. package/lib/flex/row.d.ts +0 -16
  59. package/lib/icons/icon-button.d.ts +0 -27
  60. package/lib/icons/icon.d.ts +0 -37
  61. package/lib/icons/index.d.ts +0 -2
@@ -0,0 +1,26 @@
1
+ import React from "react";
2
+ import { Margins } from "../../common/styling";
3
+ interface WCProps extends Margins {
4
+ ref?: React.MutableRefObject<HTMLElement | undefined>;
5
+ itemcount: number;
6
+ perpagecount?: number;
7
+ pagenumber: number;
8
+ variant?: "all" | "links-only";
9
+ }
10
+ declare global {
11
+ namespace JSX {
12
+ interface IntrinsicElements {
13
+ "goa-pagination": WCProps & React.HTMLAttributes<HTMLElement>;
14
+ }
15
+ }
16
+ }
17
+ export interface PaginationProps extends Margins {
18
+ itemCount: number;
19
+ perPageCount?: number;
20
+ pageNumber: number;
21
+ variant?: "all" | "links-only";
22
+ onChange: (page: number) => void;
23
+ testId?: string;
24
+ }
25
+ export declare function GoAPagination(props: PaginationProps): JSX.Element;
26
+ export default GoAPagination;
@@ -1,27 +1,31 @@
1
- import React, { FC } from 'react';
2
- export * from './radio';
3
- interface RadioGroupProps {
1
+ import React, { FC } from "react";
2
+ import { Margins } from "../../common/styling";
3
+ export * from "./radio";
4
+ interface RadioGroupProps extends Margins {
4
5
  ref: React.RefObject<HTMLElement>;
5
6
  name: string;
6
7
  value?: string;
7
8
  orientation: string;
8
9
  disabled: boolean;
9
10
  error: boolean;
11
+ arialabel?: string;
10
12
  }
11
13
  declare global {
12
14
  namespace JSX {
13
15
  interface IntrinsicElements {
14
- 'goa-radio-group': RadioGroupProps & React.HTMLAttributes<HTMLElement>;
16
+ "goa-radio-group": RadioGroupProps & React.HTMLAttributes<HTMLElement>;
15
17
  }
16
18
  }
17
19
  }
18
- interface Props {
20
+ interface Props extends Margins {
19
21
  name: string;
20
22
  value?: string;
21
23
  disabled?: boolean;
22
- orientation?: 'horizontal' | 'vertical';
24
+ orientation?: "horizontal" | "vertical";
23
25
  testId?: string;
24
26
  error?: boolean;
27
+ ariaLabel?: string;
28
+ children?: React.ReactNode;
25
29
  onChange: (name: string, value: string) => void;
26
30
  }
27
31
  export declare const GoARadioGroup: FC<Props>;
@@ -1,4 +1,4 @@
1
- import React, { FC } from 'react';
1
+ import React, { FC } from "react";
2
2
  interface RadioItemProps {
3
3
  name: string;
4
4
  value: string;
@@ -10,7 +10,7 @@ interface RadioItemProps {
10
10
  declare global {
11
11
  namespace JSX {
12
12
  interface IntrinsicElements {
13
- 'goa-radio-item': RadioItemProps & React.HTMLAttributes<HTMLElement>;
13
+ "goa-radio-item": RadioItemProps & React.HTMLAttributes<HTMLElement>;
14
14
  }
15
15
  }
16
16
  }
@@ -21,6 +21,7 @@ interface Props {
21
21
  disabled?: boolean;
22
22
  checked?: boolean;
23
23
  error?: boolean;
24
+ children?: React.ReactNode;
24
25
  testId?: string;
25
26
  }
26
27
  export declare const GoARadioItem: FC<Props>;
@@ -1,19 +1,26 @@
1
- import React from 'react';
1
+ import React from "react";
2
+ import { Margins } from "../../common/styling";
2
3
  export declare type SkeletonType = "image" | "text" | "title" | "text-small" | "avatar" | "header" | "paragraph" | "thumbnail" | "card" | "profile";
3
- interface WCProps {
4
- size: number;
4
+ declare type SkeletonSize = 1 | 2 | 3 | 4;
5
+ interface WCProps extends Margins {
6
+ maxwidth?: string;
7
+ size?: SkeletonSize;
8
+ linecount?: number;
5
9
  type: SkeletonType;
6
10
  }
7
11
  declare global {
8
12
  namespace JSX {
9
13
  interface IntrinsicElements {
10
- 'goa-skeleton': WCProps & React.HTMLAttributes<HTMLElement>;
14
+ "goa-skeleton": WCProps & React.HTMLAttributes<HTMLElement>;
11
15
  }
12
16
  }
13
17
  }
14
- export interface SkeletonProps {
18
+ export interface SkeletonProps extends Margins {
19
+ maxWidth?: string;
20
+ size?: SkeletonSize;
21
+ lineCount?: number;
15
22
  type: SkeletonType;
16
- size?: number;
23
+ testId?: string;
17
24
  }
18
- export declare const GoASkeleton: ({ type, size }: SkeletonProps) => JSX.Element;
25
+ export declare const GoASkeleton: ({ maxWidth, size, lineCount, type, testId, mt, mr, mb, ml, }: SkeletonProps) => JSX.Element;
19
26
  export default GoASkeleton;
@@ -0,0 +1,20 @@
1
+ import React from "react";
2
+ import { Spacing } from "../../common/styling";
3
+ interface WCProps {
4
+ hspacing?: Spacing | "fill";
5
+ vspacing?: Spacing;
6
+ }
7
+ declare global {
8
+ namespace JSX {
9
+ interface IntrinsicElements {
10
+ "goa-spacer": WCProps & React.HTMLAttributes<HTMLElement>;
11
+ }
12
+ }
13
+ }
14
+ export interface SpacerProps {
15
+ hSpacing?: Spacing | "fill";
16
+ vSpacing?: Spacing;
17
+ testId?: string;
18
+ }
19
+ export declare function GoASpacer(props: SpacerProps): JSX.Element;
20
+ export default GoASpacer;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React from "react";
2
2
  export declare type SpinnerType = "infinite" | "progress";
3
3
  export declare type SpinnerSize = "small" | "medium" | "large" | "xlarge";
4
4
  interface WCProps {
@@ -6,12 +6,11 @@ interface WCProps {
6
6
  type: SpinnerType;
7
7
  invert?: boolean;
8
8
  progress?: number;
9
- testid?: string;
10
9
  }
11
10
  declare global {
12
11
  namespace JSX {
13
12
  interface IntrinsicElements {
14
- 'goa-spinner': WCProps & React.HTMLAttributes<HTMLElement>;
13
+ "goa-spinner": WCProps & React.HTMLAttributes<HTMLElement>;
15
14
  }
16
15
  }
17
16
  }
@@ -22,5 +21,5 @@ export interface SpinnerProps {
22
21
  progress?: number;
23
22
  testId?: string;
24
23
  }
25
- export declare const GoASpinner: ({ type, size, progress, invert, testId }: SpinnerProps) => JSX.Element;
24
+ export declare const GoASpinner: ({ type, size, progress, invert, testId, }: SpinnerProps) => JSX.Element;
26
25
  export default GoASpinner;
@@ -0,0 +1,25 @@
1
+ import React, { ReactNode } from "react";
2
+ import { Margins } from "../../common/styling";
3
+ export declare type TableVariant = "normal" | "relaxed";
4
+ interface WCProps extends Margins {
5
+ ref?: React.MutableRefObject<HTMLElement | null>;
6
+ width?: string;
7
+ stickyheader?: boolean;
8
+ variant?: TableVariant;
9
+ }
10
+ declare global {
11
+ namespace JSX {
12
+ interface IntrinsicElements {
13
+ "goa-table": WCProps & React.HTMLAttributes<HTMLElement>;
14
+ }
15
+ }
16
+ }
17
+ export interface TableProps extends Margins {
18
+ width?: string;
19
+ onSort?: (sortBy: string, sortDir: number) => void;
20
+ variant?: TableVariant;
21
+ testId?: string;
22
+ children: ReactNode;
23
+ }
24
+ export declare function GoATable(props: TableProps): JSX.Element;
25
+ export default GoATable;
@@ -1,5 +1,6 @@
1
- import React, { FC } from 'react';
2
- interface WCProps {
1
+ import React, { FC } from "react";
2
+ import { Margins } from "../../common/styling";
3
+ interface WCProps extends Margins {
3
4
  ref: React.Ref<HTMLTextAreaElement>;
4
5
  name: string;
5
6
  value: string;
@@ -9,15 +10,17 @@ interface WCProps {
9
10
  disabled?: boolean;
10
11
  showcounter?: boolean;
11
12
  maxcharcount?: number;
13
+ width?: string;
14
+ arialabel?: string;
12
15
  }
13
16
  declare global {
14
17
  namespace JSX {
15
18
  interface IntrinsicElements {
16
- 'goa-textarea': WCProps & React.HTMLAttributes<HTMLElement>;
19
+ "goa-textarea": WCProps & React.HTMLAttributes<HTMLElement>;
17
20
  }
18
21
  }
19
22
  }
20
- interface Props {
23
+ interface Props extends Margins {
21
24
  name: string;
22
25
  value: string;
23
26
  id?: string;
@@ -27,7 +30,9 @@ interface Props {
27
30
  disabled?: boolean;
28
31
  showCounter?: boolean;
29
32
  maxCharCount?: number;
33
+ width?: string;
30
34
  testId?: string;
35
+ ariaLabel?: string;
31
36
  onChange: (name: string, value: string) => void;
32
37
  }
33
38
  export declare const GoATextArea: FC<Props>;
@@ -0,0 +1,22 @@
1
+ import React, { ReactNode } from "react";
2
+ interface WCProps {
3
+ navcolumnwidth?: string;
4
+ maxcontentwidth?: string;
5
+ }
6
+ declare global {
7
+ namespace JSX {
8
+ interface IntrinsicElements {
9
+ "goa-two-column-layout": WCProps & React.HTMLAttributes<HTMLElement>;
10
+ }
11
+ }
12
+ }
13
+ interface Props {
14
+ navColumnWidth?: string;
15
+ maxContentWidth?: string;
16
+ header: ReactNode;
17
+ footer: ReactNode;
18
+ nav: ReactNode;
19
+ children: ReactNode;
20
+ }
21
+ export declare function GoATwoColumnLayout(props: Props): JSX.Element;
22
+ export default GoATwoColumnLayout;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abgov/react-components",
3
- "version": "4.0.0-alpha.11",
3
+ "version": "4.0.0-alpha.110",
4
4
  "description": "Government of Alberta - UI components for React",
5
5
  "bugs": {
6
6
  "url": "https://github.com/GovAlta/ui-components/issues"
@@ -16,12 +16,12 @@
16
16
  "url": "https://github.com/GovAlta/ui-components.git",
17
17
  "directory": "libs/react-components"
18
18
  },
19
- "dependencies": {
20
- "@abgov/web-components": "^1.0.0-alpha.23"
21
- },
22
19
  "peerDependencies": {
23
- "react": "^17.0.2",
24
- "react-dom": "^17.0.2"
20
+ "react": ">=17.0.2",
21
+ "react-dom": ">=17.0.2"
22
+ },
23
+ "dependencies": {
24
+ "date-fns": "^2.29.2"
25
25
  },
26
26
  "main": "./react-components.umd.js",
27
27
  "module": "./react-components.esm.js",