@abgov/react-components 3.3.2-beta.3 → 3.4.0-alpha.4

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 (72) hide show
  1. package/README.md +7 -102
  2. package/experimental/index.d.ts +0 -0
  3. package/experimental/package.json +1 -1
  4. package/experimental/react-components.esm.js +0 -1962
  5. package/experimental/react-components.umd.js +5 -1980
  6. package/index.d.ts +29 -14
  7. package/lib/app-header/app-header.d.ts +18 -0
  8. package/lib/badge/badge.d.ts +29 -0
  9. package/lib/button/button.d.ts +27 -35
  10. package/lib/button-group/button-group.d.ts +18 -0
  11. package/lib/callout/callout.d.ts +14 -23
  12. package/lib/card/card-actions.d.ts +16 -0
  13. package/lib/card/card-content.d.ts +13 -0
  14. package/lib/card/card-group.d.ts +16 -0
  15. package/lib/card/card-image.d.ts +18 -0
  16. package/lib/card/card.d.ts +18 -0
  17. package/lib/card/index.d.ts +5 -0
  18. package/lib/checkbox/checkbox.d.ts +26 -35
  19. package/lib/container/container.d.ts +23 -0
  20. package/lib/dropdown/dropdown-option.d.ts +21 -0
  21. package/lib/dropdown/dropdown.d.ts +35 -0
  22. package/lib/flex/index.d.ts +1 -0
  23. package/lib/flex/row.d.ts +8 -0
  24. package/lib/form/form-item.d.ts +24 -0
  25. package/lib/form/index.d.ts +1 -0
  26. package/lib/form/validators.d.ts +10 -0
  27. package/lib/hero-banner/hero-banner-actions.d.ts +4 -0
  28. package/lib/hero-banner/hero-banner-content.d.ts +4 -0
  29. package/lib/hero-banner/hero-banner.d.ts +18 -0
  30. package/lib/icons/icon-button.d.ts +27 -0
  31. package/lib/icons/icon.d.ts +37 -0
  32. package/lib/icons/index.d.ts +2 -0
  33. package/lib/input/input.d.ts +70 -0
  34. package/lib/modal/modal.d.ts +23 -0
  35. package/lib/notification/notification.d.ts +14 -35
  36. package/lib/page-loader/page-loader.d.ts +26 -0
  37. package/lib/radio-group/radio-group.d.ts +18 -44
  38. package/lib/radio-group/radio.d.ts +27 -0
  39. package/lib/service-level-header/service-level-header.d.ts +17 -0
  40. package/lib/skeleton/skeleton.d.ts +19 -0
  41. package/lib/spinner/spinner.d.ts +24 -0
  42. package/lib/textarea/textarea.d.ts +27 -0
  43. package/package.json +12 -7
  44. package/react-components.esm.js +690 -2556
  45. package/react-components.umd.js +747 -2598
  46. package/experimental/experimental/badge/badge.component.d.ts +0 -8
  47. package/experimental/experimental/element-loader/element-loader.d.ts +0 -18
  48. package/experimental/experimental/form/container/form.button.component.d.ts +0 -7
  49. package/experimental/experimental/form/container/form.container.component.d.ts +0 -7
  50. package/experimental/experimental/form/container/form.item.component.d.ts +0 -18
  51. package/experimental/experimental/form/form.component.d.ts +0 -32
  52. package/experimental/experimental/form/formFieldValidator.d.ts +0 -4
  53. package/experimental/experimental/index.d.ts +0 -9
  54. package/experimental/experimental/input/input.component.d.ts +0 -15
  55. package/experimental/experimental/page-loader/page-loader.d.ts +0 -43
  56. package/experimental/experimental/skeleton/skeleton-element.d.ts +0 -8
  57. package/experimental/experimental/skeleton/skeleton-grid-column.d.ts +0 -9
  58. package/experimental/experimental/skeleton/skeleton-image-content.d.ts +0 -9
  59. package/experimental/experimental/skeleton/skeleton-titled-content.d.ts +0 -9
  60. package/lib/card/card.component.d.ts +0 -26
  61. package/lib/card-group/card.group.component.d.ts +0 -24
  62. package/lib/dropdown/dropdown.component.d.ts +0 -20
  63. package/lib/dropdown/dropdown.context.d.ts +0 -17
  64. package/lib/dropdown/option/option.component.d.ts +0 -10
  65. package/lib/dropdown/option-group/option-group.component.d.ts +0 -6
  66. package/lib/header/header.d.ts +0 -10
  67. package/lib/hero-banner/content/hero-banner-content.component.d.ts +0 -7
  68. package/lib/hero-banner/hero-banner.component.d.ts +0 -11
  69. package/lib/hero-banner/link/hero-banner-link.component.d.ts +0 -8
  70. package/lib/microsite-logo/microsite-logo.d.ts +0 -8
  71. package/lib/radio-group/radio/radio.d.ts +0 -17
  72. package/lib/radio-group/radio-group.context.d.ts +0 -6
@@ -0,0 +1,70 @@
1
+ import React, { FC } from 'react';
2
+ import { GoAIconType } from '../..';
3
+ interface WCProps {
4
+ ref?: React.MutableRefObject<HTMLInputElement | null>;
5
+ type: string;
6
+ name: string;
7
+ value: string;
8
+ id?: string;
9
+ placeholder?: string;
10
+ leadingicon?: string;
11
+ trailingicon?: string;
12
+ variant: string;
13
+ disabled?: boolean;
14
+ error?: string;
15
+ readonly?: boolean;
16
+ handletrailingiconclick: boolean;
17
+ }
18
+ declare global {
19
+ namespace JSX {
20
+ interface IntrinsicElements {
21
+ 'goa-input': WCProps & React.HTMLAttributes<HTMLInputElement>;
22
+ }
23
+ }
24
+ }
25
+ interface Props {
26
+ name: string;
27
+ value: string;
28
+ onChange: (name: string, value: string) => void;
29
+ id?: string;
30
+ disabled?: boolean;
31
+ placeholder?: string;
32
+ leadingIcon?: GoAIconType;
33
+ trailingIcon?: GoAIconType;
34
+ onTrailingIconClick?: () => void;
35
+ variant?: 'goa' | 'bare';
36
+ focused?: boolean;
37
+ readonly?: boolean;
38
+ error?: string;
39
+ }
40
+ export declare const GoAInput: FC<Props & {
41
+ type: string;
42
+ }>;
43
+ export declare const GoAInputText: FC<Props>;
44
+ export declare const GoAInputPassword: FC<Props>;
45
+ export declare const GoAInputDate: FC<Props & {
46
+ min?: string;
47
+ max?: string;
48
+ }>;
49
+ export declare const GoAInputTime: FC<Props>;
50
+ export declare const GoAInputDateTime: FC<Props & {
51
+ min?: string;
52
+ max?: string;
53
+ }>;
54
+ export declare const GoAInputEmail: FC<Props>;
55
+ export declare const GoAInputSearch: FC<Props>;
56
+ export declare const GoAInputUrl: FC<Props>;
57
+ export declare const GoAInputTel: FC<Props>;
58
+ export declare const GoAInputFile: FC<Props>;
59
+ export declare const GoAInputMonth: FC<Props>;
60
+ export declare const GoAInputNumber: FC<Props & {
61
+ min?: number;
62
+ max?: number;
63
+ step?: number;
64
+ }>;
65
+ export declare const GoAInputRange: FC<Props & {
66
+ min?: number;
67
+ max?: number;
68
+ step?: number;
69
+ }>;
70
+ export default GoAInput;
@@ -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,39 +1,18 @@
1
1
  import React from 'react';
2
- import PropTypes from 'prop-types';
3
- import '../../theme.scss';
4
- import '../../../../core-css/src/lib/styles/notification/notification.scss';
5
- import '../../../../core-css/src/lib/styles/notification-banner/notification-banner.scss';
6
- declare type notificationType = "important" | 'information' | 'event' | 'emergency';
7
- export interface NotificationProps {
8
- /**
9
- * The type of the notification, changes stylings and icons.
10
- */
11
- type?: notificationType;
12
- /**
13
- * Notification message
14
- */
15
- message?: string;
16
- /**
17
- * Hidden title message
18
- */
19
- title?: string;
20
- /**
21
- * Optional link for notification, if no link is provided notification will not contain anchor.
22
- */
23
- notificationUrl?: string;
24
- /**
25
- * Boolean: can this notification be closed?
26
- */
27
- 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;
28
15
  children?: React.ReactNode;
29
- onDismiss?: () => void;
30
16
  }
31
- export declare const GoANotification: {
32
- ({ title, type, message, notificationUrl, isDismissable, children, onDismiss, ...props }: NotificationProps): JSX.Element;
33
- propTypes: {
34
- title: PropTypes.Requireable<string>;
35
- type: PropTypes.Validator<string>;
36
- content: PropTypes.Requireable<string>;
37
- };
38
- };
17
+ export declare const GoANotification: ({ type, children }: Props) => JSX.Element;
39
18
  export default GoANotification;
@@ -0,0 +1,26 @@
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
+ }
18
+ export interface PageLoaderProps {
19
+ type?: PageLoaderType;
20
+ variant?: PageLoaderVariant;
21
+ message?: string;
22
+ visible?: boolean;
23
+ progress?: number;
24
+ }
25
+ export declare const GoAPageLoader: ({ type, visible, message, progress, variant }: PageLoaderProps) => JSX.Element;
26
+ export default GoAPageLoader;
@@ -1,51 +1,25 @@
1
- import React, { ReactNode, FC } from 'react';
2
- import { Data as RadioItem, LabelPosition } from './radio/radio';
3
- import './radio-group.scss';
4
- export * from './radio/radio';
1
+ import React, { FC } from 'react';
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
+ }
5
16
  interface Props {
6
- children?: ReactNode;
7
- /**
8
- * Name of the form value
9
- */
10
17
  name: string;
11
- /**
12
- * Help text of the radio item
13
- */
14
- helperText?: string;
15
- /**
16
- * List of radio buttons to select
17
- */
18
- items?: RadioItem[];
19
- /**
20
- * Is the radio button selection required.
21
- */
22
- required?: boolean;
23
- /**
24
- * Error messages
25
- */
26
- requiredErrorMessage?: string;
27
- /**
28
- * Title of the radio item
29
- */
30
- title?: string;
31
- /**
32
- * Initial data value
33
- */
34
18
  value?: string;
35
- /**
36
- * Where is the label positioned
37
- */
38
- labelPosition?: LabelPosition;
39
- /**
40
- * Disable radio buttons
41
- */
42
19
  disabled?: boolean;
43
- /**
44
- * Callback function containing the newly selected value
45
- */
46
- onChange: (value: string) => void;
20
+ orientation?: 'horizontal' | 'vertical';
21
+ testId?: string;
22
+ onChange: (name: string, value: string) => void;
47
23
  }
48
- export declare const RadioContext: React.Context<string>;
49
- export declare const RadioUpdateContext: React.Context<(value: string) => void>;
50
24
  export declare const GoARadioGroup: FC<Props>;
51
25
  export default GoARadioGroup;
@@ -0,0 +1,27 @@
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
+ }
17
+ interface Props {
18
+ value: string;
19
+ label?: string;
20
+ name: string;
21
+ disabled?: boolean;
22
+ checked?: boolean;
23
+ error?: boolean;
24
+ testId?: string;
25
+ }
26
+ export declare const GoARadio: FC<Props>;
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,22 +1,27 @@
1
1
  {
2
2
  "name": "@abgov/react-components",
3
- "version": "3.3.2-beta.3",
4
- "description": "Government of Alberta - DIO - Shared UI components for React JS",
3
+ "version": "3.4.0-alpha.4",
4
+ "description": "Government of Alberta - UI components for React",
5
+ "publishConfig": {
6
+ "access": "public"
7
+ },
8
+ "semantic-release": "semantic-release",
5
9
  "bugs": {
6
- "url": "https://gitlab.gov.ab.ca/dio/core/ui-components/-/issues"
10
+ "url": "https://github.com/GovAlta/ui-components/issues"
7
11
  },
8
- "keywoards": [
12
+ "license": "Apache-2.0",
13
+ "keywords": [
9
14
  "GoA",
10
15
  "template",
11
- "react"
16
+ "React"
12
17
  ],
13
18
  "repository": {
14
19
  "type": "git",
15
- "url": "https://gitlab.gov.ab.ca/dio/core/ui-components.git",
20
+ "url": "https://github.com/GovAlta/ui-components.git",
16
21
  "directory": "libs/react-components"
17
22
  },
18
23
  "dependencies": {
19
- "classnames": "^2.3.1"
24
+ "@abgov/web-components": "^0.0.1"
20
25
  },
21
26
  "peerDependencies": {
22
27
  "react": "^17.0.2",