@abgov/react-components 4.17.0-alpha.2 → 4.17.0-alpha.20

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 (78) hide show
  1. package/common/styling.d.ts +12 -9
  2. package/index.d.ts +56 -59
  3. package/index.js +23481 -0
  4. package/index.js.map +1 -0
  5. package/index.mjs +23481 -0
  6. package/index.mjs.map +1 -0
  7. package/lib/accordion/accordion.d.ts +28 -28
  8. package/lib/app-header/app-header.d.ts +23 -22
  9. package/lib/app-header-menu/app-header-menu.d.ts +20 -20
  10. package/lib/badge/badge.d.ts +40 -41
  11. package/lib/block/block.d.ts +23 -22
  12. package/lib/button/button.d.ts +38 -35
  13. package/lib/button-group/button-group.d.ts +23 -23
  14. package/lib/calendar/calendar.d.ts +24 -25
  15. package/lib/callout/callout.d.ts +25 -25
  16. package/lib/checkbox/checkbox.d.ts +37 -37
  17. package/lib/chip/chip.d.ts +28 -29
  18. package/lib/circular-progress/circular-progress.d.ts +28 -27
  19. package/lib/container/container.d.ts +29 -29
  20. package/lib/date-picker/date-picker.d.ts +24 -25
  21. package/lib/details/details.d.ts +21 -20
  22. package/lib/divider/divider.d.ts +13 -13
  23. package/lib/dropdown/dropdown-item.d.ts +23 -24
  24. package/lib/dropdown/dropdown.d.ts +49 -50
  25. package/lib/file-upload-card/file-upload-card.d.ts +26 -27
  26. package/lib/file-upload-input/file-upload-input.d.ts +22 -23
  27. package/lib/footer/footer.d.ts +19 -18
  28. package/lib/footer-meta-section/footer-meta-section.d.ts +14 -13
  29. package/lib/footer-nav-section/footer-nav-section.d.ts +20 -20
  30. package/lib/{form → form-item}/form-item.d.ts +30 -30
  31. package/lib/form-step/form-step.d.ts +19 -19
  32. package/lib/form-stepper/form-stepper.d.ts +22 -21
  33. package/lib/grid/grid.d.ts +20 -21
  34. package/lib/hero-banner/hero-banner-actions.d.ts +5 -6
  35. package/lib/hero-banner/hero-banner.d.ts +27 -28
  36. package/lib/icon/icon.d.ts +41 -39
  37. package/lib/icon-button/icon-button.d.ts +31 -31
  38. package/lib/input/input.d.ts +112 -115
  39. package/lib/microsite-header/microsite-header.d.ts +30 -28
  40. package/lib/modal/modal.d.ts +36 -34
  41. package/lib/notification/notification.d.ts +27 -26
  42. package/lib/one-column-layout/one-column-layout.d.ts +14 -13
  43. package/lib/page-block/page-block.d.ts +19 -17
  44. package/lib/pages/pages.d.ts +18 -18
  45. package/lib/pagination/pagination.d.ts +26 -26
  46. package/lib/popover/popover.d.ts +27 -27
  47. package/lib/radio-group/radio-group.d.ts +32 -32
  48. package/lib/radio-group/radio.d.ts +29 -30
  49. package/lib/side-menu/side-menu.d.ts +14 -13
  50. package/lib/side-menu-group/side-menu-group.d.ts +17 -17
  51. package/lib/side-menu-heading/side-menu-heading.d.ts +19 -19
  52. package/lib/skeleton/skeleton.d.ts +27 -26
  53. package/lib/spacer/spacer.d.ts +20 -20
  54. package/lib/spinner/spinner.d.ts +25 -25
  55. package/lib/tab/tab.d.ts +17 -17
  56. package/lib/table/table-sort-header.d.ts +19 -20
  57. package/lib/table/table.d.ts +27 -25
  58. package/lib/tabs/tabs.d.ts +16 -17
  59. package/lib/textarea/textarea.d.ts +41 -39
  60. package/lib/three-column-layout/three-column-layout.d.ts +26 -26
  61. package/lib/tooltip/tooltip.d.ts +25 -23
  62. package/lib/two-column-layout/two-column-layout.d.ts +22 -22
  63. package/package.json +16 -11
  64. package/README.md +0 -34
  65. package/experimental/index.d.ts +0 -0
  66. package/experimental/package.json +0 -11
  67. package/experimental/react-components.esm.js +0 -1
  68. package/experimental/react-components.umd.js +0 -8
  69. package/lib/card/card-actions.d.ts +0 -13
  70. package/lib/card/card-content.d.ts +0 -13
  71. package/lib/card/card-group.d.ts +0 -13
  72. package/lib/card/card-image.d.ts +0 -18
  73. package/lib/card/card.d.ts +0 -22
  74. package/lib/card/index.d.ts +0 -5
  75. package/lib/form/index.d.ts +0 -1
  76. package/lib/form/validators.d.ts +0 -10
  77. package/react-components.esm.js +0 -3383
  78. package/react-components.umd.js +0 -3443
@@ -1,26 +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;
1
+ import { 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
+ export interface GoAThreeColumnLayoutProps {
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: GoAThreeColumnLayoutProps): import("react/jsx-runtime").JSX.Element;
26
+ export default GoAThreeColumnLayout;
@@ -1,23 +1,25 @@
1
- import React, { ReactNode } from "react";
2
- import { Margins } from "../../common/styling";
3
- interface WCProps extends Margins {
4
- position?: string;
5
- content?: string;
6
- halign?: string;
7
- }
8
- declare global {
9
- namespace JSX {
10
- interface IntrinsicElements {
11
- "goa-tooltip": WCProps & React.HTMLAttributes<HTMLElement>;
12
- }
13
- }
14
- }
15
- interface TooltipProps extends Margins {
16
- position?: string;
17
- content?: string;
18
- hAlign?: string;
19
- testId?: string;
20
- children: ReactNode;
21
- }
22
- export declare const GoATooltip: React.FC<TooltipProps>;
23
- export default GoATooltip;
1
+ import { ReactNode } from "react";
2
+ import { Margins } from "../../common/styling";
3
+ export type GoATooltipPosition = "top" | "bottom" | "left" | "right";
4
+ export type GoATooltipHorizontalAlignment = "left" | "right" | "center";
5
+ interface WCProps extends Margins {
6
+ position?: GoATooltipPosition;
7
+ content?: string;
8
+ halign?: GoATooltipHorizontalAlignment;
9
+ }
10
+ declare global {
11
+ namespace JSX {
12
+ interface IntrinsicElements {
13
+ "goa-tooltip": WCProps & React.HTMLAttributes<HTMLElement>;
14
+ }
15
+ }
16
+ }
17
+ export interface GoATooltipProps extends Margins {
18
+ position?: GoATooltipPosition;
19
+ content?: string;
20
+ hAlign?: GoATooltipHorizontalAlignment;
21
+ testId?: string;
22
+ children?: ReactNode;
23
+ }
24
+ export declare function GoATooltip(props: GoATooltipProps): JSX.Element;
25
+ export default GoATooltip;
@@ -1,22 +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;
1
+ import { 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
+ export interface GoATwoColumnLayoutProps {
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: GoATwoColumnLayoutProps): import("react/jsx-runtime").JSX.Element;
22
+ export default GoATwoColumnLayout;
package/package.json CHANGED
@@ -1,14 +1,13 @@
1
1
  {
2
2
  "name": "@abgov/react-components",
3
- "version": "4.17.0-alpha.2",
3
+ "version": "4.17.0-alpha.20",
4
4
  "description": "Government of Alberta - UI components for React",
5
5
  "bugs": {
6
6
  "url": "https://github.com/GovAlta/ui-components/issues"
7
7
  },
8
- "license": "Apache-2.0",
9
8
  "keywords": [
10
9
  "GoA",
11
- "template",
10
+ "ui-components",
12
11
  "React"
13
12
  ],
14
13
  "repository": {
@@ -16,14 +15,20 @@
16
15
  "url": "https://github.com/GovAlta/ui-components.git",
17
16
  "directory": "libs/react-components"
18
17
  },
18
+ "license": "Apache-2.0",
19
+ "main": "./index.js",
20
+ "module": "./index.mjs",
21
+ "types": "./index.d.ts",
19
22
  "peerDependencies": {
20
- "react": ">=17.0.2",
21
- "react-dom": ">=17.0.2"
22
- },
23
- "dependencies": {
24
- "date-fns": "^2.29.2"
23
+ "@types/react": "^17.0.0 || ^18.0.0",
24
+ "react": "^17.0.0 || ^18.0.0",
25
+ "react-dom": "^17.0.0 || ^18.0.0"
25
26
  },
26
- "main": "./react-components.umd.js",
27
- "module": "./react-components.esm.js",
28
- "typings": "./index.d.ts"
27
+ "exports": {
28
+ ".": {
29
+ "import": "./index.mjs",
30
+ "require": "./index.js",
31
+ "types": "./index.d.ts"
32
+ }
33
+ }
29
34
  }
package/README.md DELETED
@@ -1,34 +0,0 @@
1
- # React UI Components
2
-
3
- ![npm (scoped)](https://img.shields.io/npm/v/@abgov/react-components?color=%230081a2&label=react-components&style=flat-square)
4
-
5
- This library contains react components from the Government of Alberta.
6
-
7
- ```bash
8
- npm i @abgov/react-components
9
- npm i @abgov/web-components
10
- ```
11
-
12
- Link ionicons in app/index.html
13
- Add the following to the head element
14
-
15
- ```html
16
- <script
17
- type="module"
18
- src="https://unpkg.com/ionicons@5.5.2/dist/ionicons/ionicons.esm.js"
19
- ></script>
20
- <script
21
- nomodule
22
- src="https://unpkg.com/ionicons@5.5.2/dist/ionicons/ionicons.js"
23
- ></script>
24
- ```
25
-
26
- Import the web-component styles in the `src/index.css` file
27
-
28
- ```css
29
- @import "@abgov/web-components/index.css";
30
- ```
31
-
32
- ---
33
-
34
- [Visit Design System](https://ui-components.alberta.ca)
File without changes
@@ -1,11 +0,0 @@
1
- {
2
- "sideEffects": false,
3
- "main": "./react-components.umd.js",
4
- "module": "./react-components.esm.js",
5
- "typings": "./index.d.ts",
6
- "dependencies": {},
7
- "peerDependencies": {
8
- "date-fns": "^2.29.2",
9
- "react": "17.0.2"
10
- }
11
- }
@@ -1 +0,0 @@
1
-
@@ -1,8 +0,0 @@
1
- (function (factory) {
2
- typeof define === 'function' && define.amd ? define(factory) :
3
- factory();
4
- })((function () { 'use strict';
5
-
6
-
7
-
8
- }));
@@ -1,13 +0,0 @@
1
- import { FC } from "react";
2
- declare global {
3
- namespace JSX {
4
- interface IntrinsicElements {
5
- "goa-card-actions": React.HTMLAttributes<HTMLElement>;
6
- }
7
- }
8
- }
9
- interface Props {
10
- children?: React.ReactNode;
11
- }
12
- export declare const GoACardActions: FC<Props>;
13
- export default GoACardActions;
@@ -1,13 +0,0 @@
1
- import { FC } from "react";
2
- declare global {
3
- namespace JSX {
4
- interface IntrinsicElements {
5
- "goa-card-content": React.HTMLAttributes<HTMLElement>;
6
- }
7
- }
8
- }
9
- interface Props {
10
- children?: React.ReactNode;
11
- }
12
- export declare const GoACardContent: FC<Props>;
13
- export default GoACardContent;
@@ -1,13 +0,0 @@
1
- import { FC } from "react";
2
- declare global {
3
- namespace JSX {
4
- interface IntrinsicElements {
5
- "goa-card-group": React.HTMLAttributes<HTMLElement>;
6
- }
7
- }
8
- }
9
- interface Props {
10
- children?: React.ReactNode;
11
- }
12
- export declare const GoACardGroup: FC<Props>;
13
- export default GoACardGroup;
@@ -1,18 +0,0 @@
1
- import { FC } from "react";
2
- interface WCProps {
3
- src: string;
4
- height: string;
5
- }
6
- declare global {
7
- namespace JSX {
8
- interface IntrinsicElements {
9
- "goa-card-image": WCProps & React.HTMLAttributes<HTMLElement>;
10
- }
11
- }
12
- }
13
- interface Props {
14
- src: string;
15
- height: string;
16
- }
17
- export declare const GoACardImage: FC<Props>;
18
- export default GoACardImage;
@@ -1,22 +0,0 @@
1
- import { FC } from "react";
2
- import { Margins } from "../../common/styling";
3
- interface WCProps extends Margins {
4
- elevation?: number;
5
- width?: string;
6
- children: React.ReactNode;
7
- }
8
- declare global {
9
- namespace JSX {
10
- interface IntrinsicElements {
11
- "goa-card": WCProps & React.HTMLAttributes<HTMLElement>;
12
- }
13
- }
14
- }
15
- interface Props extends Margins {
16
- elevation?: number;
17
- width?: string;
18
- testId?: string;
19
- children?: React.ReactNode;
20
- }
21
- export declare const GoACard: FC<Props>;
22
- export default GoACard;
@@ -1,5 +0,0 @@
1
- export * from "./card-content";
2
- export * from "./card-image";
3
- export * from "./card-actions";
4
- export * from "./card-group";
5
- export * from "./card";
@@ -1 +0,0 @@
1
- export { GoAFormItem } from "./form-item";
@@ -1,10 +0,0 @@
1
- export declare type FormValidatorFn = (val: string) => [boolean, string];
2
- export declare class FormValidator {
3
- private items;
4
- constructor();
5
- add(fieldName: string, validators: FormValidatorFn[]): void;
6
- validate(data: Record<string, string>): Record<string, string>;
7
- }
8
- export declare const requiredFieldValidator: FormValidatorFn;
9
- export declare const emailFormatValidator: FormValidatorFn;
10
- export declare const phoneNumberFormatValidator: FormValidatorFn;