@abgov/react-components 3.4.0-alpha.1 → 3.4.0-alpha.5

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 (76) hide show
  1. package/experimental/index.d.ts +0 -0
  2. package/experimental/package.json +1 -1
  3. package/experimental/react-components.esm.js +0 -926
  4. package/experimental/react-components.umd.js +5 -969
  5. package/index.d.ts +25 -19
  6. package/lib/app-header/app-header.d.ts +18 -0
  7. package/{experimental/experimental/badge/badge.component.d.ts → lib/badge/badge.d.ts} +15 -1
  8. package/lib/button/button.d.ts +27 -35
  9. package/lib/button-group/button-group.d.ts +18 -0
  10. package/lib/callout/callout.d.ts +14 -22
  11. package/lib/card/card-actions.d.ts +16 -0
  12. package/lib/card/card-content.d.ts +13 -0
  13. package/lib/card/card-group.d.ts +16 -0
  14. package/lib/card/card-image.d.ts +18 -0
  15. package/lib/card/card.d.ts +18 -0
  16. package/lib/card/index.d.ts +5 -0
  17. package/lib/checkbox/checkbox.d.ts +24 -6
  18. package/lib/container/container.d.ts +23 -0
  19. package/lib/dropdown/dropdown-option.d.ts +21 -0
  20. package/lib/dropdown/dropdown.d.ts +22 -4
  21. package/lib/flex/index.d.ts +1 -0
  22. package/{experimental/experimental → lib}/flex/row.d.ts +0 -0
  23. package/lib/form/form-item.d.ts +24 -0
  24. package/lib/form/index.d.ts +1 -0
  25. package/{experimental/experimental → lib}/form/validators.d.ts +0 -0
  26. package/lib/hero-banner/hero-banner-actions.d.ts +4 -0
  27. package/lib/hero-banner/hero-banner-content.d.ts +4 -0
  28. package/lib/hero-banner/hero-banner.d.ts +18 -0
  29. package/lib/icons/icon-button.d.ts +27 -0
  30. package/{experimental/experimental/icons/icon.component.d.ts → lib/icons/icon.d.ts} +29 -5
  31. package/lib/icons/index.d.ts +2 -0
  32. package/{experimental/experimental/input/input.component.d.ts → lib/input/input.d.ts} +26 -5
  33. package/lib/modal/modal.d.ts +23 -0
  34. package/lib/notification/notification.d.ts +14 -34
  35. package/lib/page-loader/page-loader.d.ts +21 -38
  36. package/lib/radio-group/radio-group.d.ts +15 -16
  37. package/lib/radio-group/radio.d.ts +20 -6
  38. package/lib/service-level-header/service-level-header.d.ts +17 -0
  39. package/lib/skeleton/skeleton.d.ts +19 -0
  40. package/lib/spinner/spinner.d.ts +24 -0
  41. package/lib/textarea/textarea.d.ts +27 -0
  42. package/package.json +2 -2
  43. package/react-components.esm.js +679 -2255
  44. package/react-components.umd.js +758 -2312
  45. package/experimental/experimental/app-version-header/app-version-header.component.d.ts +0 -8
  46. package/experimental/experimental/button/button.d.ts +0 -14
  47. package/experimental/experimental/card/card.component.d.ts +0 -10
  48. package/experimental/experimental/common.d.ts +0 -3
  49. package/experimental/experimental/flex/index.d.ts +0 -1
  50. package/experimental/experimental/form/form.actions.component.d.ts +0 -6
  51. package/experimental/experimental/form/form.component.d.ts +0 -10
  52. package/experimental/experimental/form/form.item.component.d.ts +0 -7
  53. package/experimental/experimental/form/index.d.ts +0 -1
  54. package/experimental/experimental/icons/iconButton.component.d.ts +0 -14
  55. package/experimental/experimental/icons/index.d.ts +0 -2
  56. package/experimental/experimental/index.d.ts +0 -16
  57. package/experimental/experimental/modal/modal.component.d.ts +0 -21
  58. package/experimental/experimental/scrollable/scrollable.component.d.ts +0 -12
  59. package/experimental/experimental/textarea/textarea.component.d.ts +0 -12
  60. package/experimental/experimental/transitions/index.d.ts +0 -2
  61. package/experimental/experimental/transitions/transition.d.ts +0 -9
  62. package/experimental/experimental/transitions/transitionSequence.d.ts +0 -9
  63. package/lib/_common/input.d.ts +0 -4
  64. package/lib/card/card.component.d.ts +0 -25
  65. package/lib/card-group/card.group.component.d.ts +0 -24
  66. package/lib/dropdown/option.d.ts +0 -13
  67. package/lib/element-loader/element-loader.d.ts +0 -9
  68. package/lib/header/header.d.ts +0 -10
  69. package/lib/hero-banner/content/hero-banner-content.component.d.ts +0 -7
  70. package/lib/hero-banner/hero-banner.component.d.ts +0 -11
  71. package/lib/hero-banner/link/hero-banner-link.component.d.ts +0 -8
  72. package/lib/microsite-logo/microsite-logo.d.ts +0 -8
  73. package/lib/skeleton/skeleton-element.d.ts +0 -8
  74. package/lib/skeleton/skeleton-grid-column.d.ts +0 -9
  75. package/lib/skeleton/skeleton-image-content.d.ts +0 -9
  76. package/lib/skeleton/skeleton-titled-content.d.ts +0 -9
@@ -0,0 +1,23 @@
1
+ import React, { FC } from 'react';
2
+ interface WCProps {
3
+ ref: React.RefObject<HTMLElement>;
4
+ title: string;
5
+ closable: boolean;
6
+ scrollable: boolean;
7
+ open?: boolean;
8
+ }
9
+ declare global {
10
+ namespace JSX {
11
+ interface IntrinsicElements {
12
+ 'goa-modal': WCProps & React.HTMLAttributes<HTMLElement>;
13
+ }
14
+ }
15
+ }
16
+ interface Props {
17
+ title: string;
18
+ closable: boolean;
19
+ open?: boolean;
20
+ onClose?: () => void;
21
+ }
22
+ export declare const GoAModal: FC<Props>;
23
+ export default GoAModal;
@@ -1,38 +1,18 @@
1
1
  import React from 'react';
2
- import PropTypes from 'prop-types';
3
- import '../../../../core-css/src/lib/styles/notification/notification.scss';
4
- import '../../../../core-css/src/lib/styles/notification-banner/notification-banner.scss';
5
- declare type notificationType = "important" | 'information' | 'event' | 'emergency';
6
- export interface NotificationProps {
7
- /**
8
- * The type of the notification, changes stylings and icons.
9
- */
10
- type?: notificationType;
11
- /**
12
- * Notification message
13
- */
14
- message?: string;
15
- /**
16
- * Hidden title message
17
- */
18
- title?: string;
19
- /**
20
- * Optional link for notification, if no link is provided notification will not contain anchor.
21
- */
22
- notificationUrl?: string;
23
- /**
24
- * Boolean: can this notification be closed?
25
- */
26
- isDismissable?: boolean;
2
+ declare type NotificationType = "important" | 'information' | 'event' | 'emergency';
3
+ interface WCProps {
4
+ type: NotificationType;
5
+ }
6
+ declare global {
7
+ namespace JSX {
8
+ interface IntrinsicElements {
9
+ 'goa-notification': WCProps & React.HTMLAttributes<HTMLButtonElement>;
10
+ }
11
+ }
12
+ }
13
+ export interface Props {
14
+ type?: NotificationType;
27
15
  children?: React.ReactNode;
28
- onDismiss?: () => void;
29
16
  }
30
- export declare const GoANotification: {
31
- ({ title, type, message, notificationUrl, isDismissable, children, onDismiss, ...props }: NotificationProps): JSX.Element;
32
- propTypes: {
33
- title: PropTypes.Requireable<string>;
34
- type: PropTypes.Validator<string>;
35
- content: PropTypes.Requireable<string>;
36
- };
37
- };
17
+ export declare const GoANotification: ({ type, children }: Props) => JSX.Element;
38
18
  export default GoANotification;
@@ -1,43 +1,26 @@
1
- /// <reference types="react" />
2
- import PropTypes from 'prop-types';
3
- import './page-loader.scss';
4
- declare type indicatorType = 'infinite' | 'progress';
5
- declare type displayTypeIndicator = 'large' | 'small';
1
+ import React from 'react';
2
+ declare type PageLoaderType = 'infinite' | 'progress';
3
+ declare type PageLoaderVariant = "fullscreen" | "inline";
4
+ interface WCProps {
5
+ type?: PageLoaderType;
6
+ variant?: PageLoaderVariant;
7
+ message?: string;
8
+ visible?: boolean;
9
+ progress?: number;
10
+ }
11
+ declare global {
12
+ namespace JSX {
13
+ interface IntrinsicElements {
14
+ 'goa-page-loader': WCProps & React.HTMLAttributes<HTMLElement>;
15
+ }
16
+ }
17
+ }
6
18
  export interface PageLoaderProps {
7
- /**
8
- * The type of page loader, deterministic and indeterministic.
9
- */
10
- type?: indicatorType;
11
- /**
12
- * The message to display while loading.
13
- */
19
+ type?: PageLoaderType;
20
+ variant?: PageLoaderVariant;
14
21
  message?: string;
15
- /**
16
- * Sets the page loader visibility state.
17
- */
18
22
  visible?: boolean;
19
- /**
20
- * Sets the percentage value of the page loader while set to progress type, 0 - 100 percent.
21
- */
22
- value?: number;
23
- /**
24
- * Sets the page to locked and does not accept user input. When not set the component can be used as a child element without blocking user input.
25
- */
26
- pagelock?: boolean;
27
- /**
28
- * Sets the progress indicator display type size.
29
- */
30
- displayType?: displayTypeIndicator;
23
+ progress?: number;
31
24
  }
32
- export declare const GoAPageLoader: {
33
- ({ type, visible, message, value, pagelock, displayType }: PageLoaderProps): JSX.Element;
34
- propTypes: {
35
- visible: PropTypes.Requireable<boolean>;
36
- message: PropTypes.Requireable<string>;
37
- value: PropTypes.Requireable<number>;
38
- type: PropTypes.Requireable<string>;
39
- pagelock: PropTypes.Requireable<boolean>;
40
- displayType: PropTypes.Requireable<string>;
41
- };
42
- };
25
+ export declare const GoAPageLoader: ({ type, visible, message, progress, variant }: PageLoaderProps) => JSX.Element;
43
26
  export default GoAPageLoader;
@@ -1,25 +1,24 @@
1
- import { FC } from 'react';
1
+ import React, { FC } from 'react';
2
2
  export * from './radio';
3
+ interface RadioGroupProps {
4
+ ref: React.RefObject<HTMLElement>;
5
+ name: string;
6
+ value?: string;
7
+ orientation: string;
8
+ }
9
+ declare global {
10
+ namespace JSX {
11
+ interface IntrinsicElements {
12
+ 'goa-radio-group': RadioGroupProps & React.HTMLAttributes<HTMLElement>;
13
+ }
14
+ }
15
+ }
3
16
  interface Props {
4
- /**
5
- * Name of the form value
6
- */
7
17
  name: string;
8
- /**
9
- * Initial data value
10
- */
11
18
  value?: string;
12
- /**
13
- * Disable radio buttons
14
- */
15
19
  disabled?: boolean;
16
- /**
17
- * Orientation of the radio buttons
18
- */
19
20
  orientation?: 'horizontal' | 'vertical';
20
- /**
21
- * Callback function containing the newly selected value
22
- */
21
+ testId?: string;
23
22
  onChange: (name: string, value: string) => void;
24
23
  }
25
24
  export declare const GoARadioGroup: FC<Props>;
@@ -1,13 +1,27 @@
1
- import { FC } from 'react';
2
- import './radio.scss';
3
- import { TestProps } from '../../experimental/common';
1
+ import React, { FC } from 'react';
2
+ interface RadioItemProps {
3
+ name: string;
4
+ value: string;
5
+ label?: string;
6
+ disabled?: boolean;
7
+ checked?: boolean;
8
+ error?: boolean;
9
+ }
10
+ declare global {
11
+ namespace JSX {
12
+ interface IntrinsicElements {
13
+ 'goa-radio-item': RadioItemProps & React.HTMLAttributes<HTMLElement>;
14
+ }
15
+ }
16
+ }
4
17
  interface Props {
5
18
  value: string;
6
19
  label?: string;
7
- name?: string;
20
+ name: string;
8
21
  disabled?: boolean;
9
22
  checked?: boolean;
10
- onChange?: (value: string) => void;
23
+ error?: boolean;
24
+ testId?: string;
11
25
  }
12
- export declare const GoARadio: FC<Props & TestProps>;
26
+ export declare const GoARadio: FC<Props>;
13
27
  export default GoARadio;
@@ -0,0 +1,17 @@
1
+ import React, { FC } from 'react';
2
+ declare global {
3
+ namespace JSX {
4
+ interface IntrinsicElements {
5
+ 'goa-service-level-header': WebComponentProps & React.HTMLAttributes<HTMLElement>;
6
+ }
7
+ }
8
+ }
9
+ export declare type ServiceLevel = 'alpha' | 'beta' | 'live';
10
+ interface WebComponentProps {
11
+ level: ServiceLevel;
12
+ }
13
+ export interface HeaderProps {
14
+ level: ServiceLevel;
15
+ }
16
+ export declare const GoAServiceLevelHeader: FC<HeaderProps>;
17
+ export default GoAServiceLevelHeader;
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ declare type SkeletonType = "image" | "text" | "title" | "text-small" | "avatar" | "header" | "paragraph" | "thumbnail" | "card" | "profile";
3
+ interface WCProps {
4
+ size: number;
5
+ type: SkeletonType;
6
+ }
7
+ declare global {
8
+ namespace JSX {
9
+ interface IntrinsicElements {
10
+ 'goa-skeleton': WCProps & React.HTMLAttributes<HTMLElement>;
11
+ }
12
+ }
13
+ }
14
+ export interface SkeletonProps {
15
+ type: SkeletonType;
16
+ size?: number;
17
+ }
18
+ export declare const GoASkeleton: ({ type, size }: SkeletonProps) => JSX.Element;
19
+ export default GoASkeleton;
@@ -0,0 +1,24 @@
1
+ import React from 'react';
2
+ declare type SpinnerType = "infinite" | "progress";
3
+ declare type SpinnerSize = "small" | "medium" | "large" | "xlarge";
4
+ interface WCProps {
5
+ size: SpinnerSize;
6
+ type: SpinnerType;
7
+ invert: boolean;
8
+ progress: number;
9
+ }
10
+ declare global {
11
+ namespace JSX {
12
+ interface IntrinsicElements {
13
+ 'goa-spinner': WCProps & React.HTMLAttributes<HTMLElement>;
14
+ }
15
+ }
16
+ }
17
+ export interface SpinnerProps {
18
+ type: SpinnerType;
19
+ size?: SpinnerSize;
20
+ invert: boolean;
21
+ progress: number;
22
+ }
23
+ export declare const GoASpinner: ({ type, size, progress, invert }: SpinnerProps) => JSX.Element;
24
+ export default GoASpinner;
@@ -0,0 +1,27 @@
1
+ import React, { FC } from 'react';
2
+ interface WCProps {
3
+ ref: React.Ref<HTMLTextAreaElement>;
4
+ name: string;
5
+ value: string;
6
+ placeholder?: string;
7
+ rows: number;
8
+ disabled: boolean;
9
+ }
10
+ declare global {
11
+ namespace JSX {
12
+ interface IntrinsicElements {
13
+ 'goa-textarea': WCProps & React.HTMLAttributes<HTMLElement>;
14
+ }
15
+ }
16
+ }
17
+ interface Props {
18
+ name: string;
19
+ value: string;
20
+ id?: string;
21
+ placeholder?: string;
22
+ rows: number;
23
+ disabled: boolean;
24
+ onChange: (name: string, value: string) => void;
25
+ }
26
+ export declare const GoATextArea: FC<Props>;
27
+ export default GoATextArea;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abgov/react-components",
3
- "version": "3.4.0-alpha.1",
3
+ "version": "3.4.0-alpha.5",
4
4
  "description": "Government of Alberta - UI components for React",
5
5
  "bugs": {
6
6
  "url": "https://github.com/GovAlta/ui-components/issues"
@@ -17,7 +17,7 @@
17
17
  "directory": "libs/react-components"
18
18
  },
19
19
  "dependencies": {
20
- "classnames": "^2.3.1"
20
+ "@abgov/web-components": "^0.0.1"
21
21
  },
22
22
  "peerDependencies": {
23
23
  "react": "^17.0.2",