@abgov/react-components 3.4.0-beta.42 → 3.4.0-beta.46

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.
package/README.md CHANGED
@@ -1,112 +1,17 @@
1
- # react-components
1
+ # React UI Components
2
2
 
3
3
  This library contains react components from the Government of Alberta.
4
4
 
5
5
  ## Installation
6
6
 
7
- 1. Add @abgov/react-components
8
- `npm add --save @abgov/react-components`
9
- 2. OPTIONAL: in package.json specify the allowed versions for installation
10
- 3. Add peer dependencies
11
-
12
- ## Documentation
13
-
14
- Documentation is being worked on and will be provided soon.
15
-
16
- ## Usage
17
-
7
+ ```bash
8
+ npm add --save @abgov/react-components
18
9
  ```
19
- import { GoACallout } from '@abgov/react-components';
20
- import { GoAButton } from '@abgov/react-components';
21
- import { GoACheckbox } from '@abgov/react-components';
22
- import { GoANotification } from '@abgov/react-components';
23
- import { GoACard } from '@abgov/react-components';
24
- import { GoACardGroup } from '@abgov/react-components';
25
- import { GoABadge } from '@abgov/react-components';
26
- import { GoAElementLoader } from '@abgov/react-components';
27
- import { GoAPageLoader } from '@abgov/react-components';
28
- import { GoADropdown, GoAOption } from '@abgov/react-components';
29
- import { GoAHeader } from '@abgov/react-components';
30
- import { GoAHeroBanner, GoAHeroBannerContent, GoAHeroBannerLink} from '@abgov/react-components';
31
- import { GoARadioGroup } from '@abgov/react-components';
32
-
33
- function App() {
34
- return (
35
- <div>
36
- <GoACallout type="emergency" title="Covid 19 Emergency" content="please be advised that in-center services are closed" />
37
- <GoAButton
38
- buttonType="primary"
39
- buttonSize="normal"
40
- toolTip="Hovering"
41
- onClick={()=> alert("You have clicked the button")}
42
- >Click Me!</GoAButton>
43
- <GoAButton
44
- buttonType="primary"
45
- buttonSize="normal"
46
- toolTip="Hovering"
47
- onClick={()=> alert("You have clicked the button")}
48
- >
49
- <div>Or click me instead</div>
50
- </GoAButton>
51
- <GoACheckbox checked={true}>Checkbox 1</GoACheckbox>
52
- <GoACard
53
- title = 'Energy Diversification Act',
54
- description = 'We're encouraging companies to turn out oil ad gas resources into more valuable products-creating good jobs for Albertans.',
55
- cardImageUrl = 'working-in-cold-hero-3_rdax_75.jpg',
56
- cardSize = 'auto',
57
- titleUrl = 'http://www.google.ca'
58
- />
59
- <GoANotification
60
- type="'important || 'information' || 'event' || 'emergency'",
61
- title='Notification Title',
62
- message="Information to the user goes in the message"
63
- isDismissable: true,
64
- notificationUrl: 'www.google.com',
65
- title: 'Hidden Title',
66
- </>
67
- <GoACardGroup title={'Dashboard'} layout='basic' >
68
- <GoACard title="Energy Diversification Act 1"
69
- description="We are encouraging companies to turn out oil ad gas resources into more valuable products-creating good jobs for Albertans."
70
- titleUrl="http://www.google.ca"
71
- cardWidth={400}
72
- cardImageUrl="working-in-cold-hero-3_rdax_75.jpg"
73
- />
74
- </GoACardGroup>
75
- <GoABadge
76
- type='information'
77
- content='text content'
78
- icon={ icon variable}
79
- />
80
- <GoAElementLoader
81
- visible={true}
82
- size={25}
83
- baseColour='#c8eef9',
84
- spinnerColour='#0070c4'
85
- />
86
- <GoAPageLoader visible={true} type='infinite'>
87
- Loading...
88
- </GoAPageLoader>
89
- <GoADropdown label="Fruits" description="Choose you favorite fruit!" multiple="false" typeAheadMode="none">
90
- {
91
- items.map((i) => <GoAOption key={i.id} value={i.id} label={i.label} />)
92
- }
93
- </GoADropdown>
94
- <GoAHeader serviceName="Sample service" serviceHome="/" serviceLevel="Live" />
95
- <GoAHeroBanner title="Upgrading our bitumen" backgroundUrl='...'}>
96
- <GoAHeroBannerContent content='Resources are available to help ...'/>
97
- <GoAHeroBannerLink linkText='Learn more' linkUrl='...'/>
98
- </GoAHeroBanner>
99
- <GoARadioGroup
100
- name="fileSecurityOptions"
101
- items={getFileTypesValues()}
102
- onChange={(e) => {
103
- setUploadFileType(e);
104
- }}
105
- />
106
- </div>
107
10
 
11
+ ## Usage
108
12
 
109
- )
110
- }
13
+ Insert the following into your base index.html file's `<head>` section:
111
14
 
15
+ ```html
16
+ <script src="https://unpkg.com/ionicons@5.5.3/dist/ionicons.js"></script>
112
17
  ```
@@ -1,12 +1,13 @@
1
1
  /// <reference types="react" />
2
- import { TestProps } from '../common';
3
2
  import './icons.scss';
4
- export declare type GoAIconType = 'close' | 'barChart' | 'build' | 'checkmarkCircle' | 'chevronDown' | 'closeCircle' | 'create' | 'download' | 'eyeOff' | 'eye' | 'file' | 'fitness' | 'helpCircle' | 'home' | 'hourGlass' | 'logout' | 'megaphone' | 'menu' | 'options' | 'pencil' | 'pauseCircle' | 'personCircle' | 'playCircle' | 'pulse' | 'receipt' | 'trash' | 'settings';
3
+ export declare type GoAIconType = 'accessibility' | 'add-circle' | 'add' | 'airplane' | 'alarm' | 'albums' | 'alert-circle' | 'alert' | 'american-football' | 'analytics' | 'aperture' | 'apps' | 'archive' | 'arrow-back-circle' | 'arrow-back' | 'arrow-down-circle' | 'arrow-down' | 'arrow-forward-circle' | 'arrow-forward' | 'arrow-redo-circle' | 'arrow-redo' | 'arrow-undo-circle' | 'arrow-undo' | 'arrow-up-circle' | 'arrow-up' | 'at-circle' | 'at' | 'attach' | 'backspace' | 'bag-add' | 'bag-check' | 'bag-handle' | 'bag' | 'bag-remove' | 'balloon' | 'ban' | 'bandage' | 'bar-chart' | 'barbell' | 'barcode' | 'baseball' | 'basket' | 'basketball' | 'battery-charging' | 'battery-dead' | 'battery-full' | 'battery-half' | 'beaker' | 'bed' | 'beer' | 'bicycle' | 'bluetooth' | 'boat' | 'body' | 'bonfire' | 'book' | 'bookmark' | 'bookmarks' | 'bowling-ball' | 'briefcase' | 'browsers' | 'brush' | 'bug' | 'build' | 'bulb' | 'bus' | 'business' | 'cafe' | 'calculator' | 'calendar-clear' | 'calendar-number' | 'calendar' | 'call' | 'camera' | 'camera-reverse' | 'car' | 'car-sport' | 'card' | 'caret-back-circle' | 'caret-back' | 'caret-down-circle' | 'caret-down' | 'caret-forward-circle' | 'caret-forward' | 'caret-up-circle' | 'caret-up' | 'cart' | 'cash' | 'cellular' | 'chatbox-ellipses' | 'chatbox' | 'chatbubble-ellipses' | 'chatbubble' | 'chatbubbles' | 'checkbox' | 'checkmark-circle' | 'checkmark-done-circle' | 'checkmark-done' | 'checkmark' | 'chevron-back-circle' | 'chevron-back' | 'chevron-down-circle' | 'chevron-down' | 'chevron-forward-circle' | 'chevron-forward' | 'chevron-up-circle' | 'chevron-up' | 'clipboard' | 'close-circle' | 'close' | 'cloud-circle' | 'cloud-done' | 'cloud-download' | 'cloud-offline' | 'cloud' | 'cloud-upload' | 'cloudy-night' | 'cloudy' | 'code-download' | 'code' | 'code-slash' | 'code-working' | 'cog' | 'color-fill' | 'color-filter' | 'color-palette' | 'color-wand' | 'compass' | 'construct' | 'contract' | 'contrast' | 'copy' | 'create' | 'crop' | 'cube' | 'cut' | 'desktop' | 'diamond' | 'dice' | 'disc' | 'document-attach' | 'document-lock' | 'document' | 'document-text' | 'documents' | 'download' | 'duplicate' | 'ear' | 'earth' | 'easel' | 'egg' | 'ellipse' | 'ellipsis-horizontal-circle' | 'ellipsis-horizontal' | 'ellipsis-vertical-circle' | 'ellipsis-vertical' | 'enter' | 'exit' | 'expand' | 'extension-puzzle' | 'eye-off' | 'eye' | 'eyedrop' | 'fast-food' | 'female' | 'file-tray-full' | 'file-tray' | 'file-tray-stacked' | 'filenames.ps1' | 'film' | 'filter-circle' | 'filter' | 'finger-print' | 'fish' | 'fitness' | 'flag' | 'flame' | 'flash-off' | 'flash' | 'flashlight' | 'flask' | 'flower' | 'folder-open' | 'folder' | 'football' | 'footsteps' | 'funnel' | 'game-controller' | 'gift' | 'git-branch' | 'git-commit' | 'git-compare' | 'git-merge' | 'git-network' | 'git-pull-request' | 'glasses' | 'globe' | 'golf' | 'grid' | 'hammer' | 'hand-left' | 'hand-right' | 'happy' | 'hardware-chip' | 'headset' | 'heart-circle' | 'heart-dislike-circle' | 'heart-dislike' | 'heart-half' | 'heart' | 'help-buoy' | 'help-circle' | 'help' | 'home' | 'hourglass' | 'ice-cream' | 'id-card' | 'image' | 'images' | 'infinite' | 'information-circle' | 'information' | 'invert-mode' | 'journal' | 'key' | 'keypad' | 'language' | 'laptop' | 'layers' | 'leaf' | 'library' | 'link' | 'list-circle' | 'list' | 'locate' | 'location' | 'lock-closed' | 'lock-open' | 'log-in' | 'log-out' | 'magnet' | 'mail-open' | 'mail' | 'mail-unread' | 'male-female' | 'male' | 'man' | 'map' | 'medal' | 'medical' | 'medkit' | 'megaphone' | 'menu' | 'mic-circle' | 'mic-off-circle' | 'mic-off' | 'mic' | 'moon' | 'move' | 'musical-note' | 'musical-notes' | 'navigate-circle' | 'navigate' | 'newspaper' | 'notifications-circle' | 'notifications-off-circle' | 'notifications-off' | 'notifications' | 'nuclear' | 'nutrition' | 'open' | 'options' | 'paper-plane' | 'partly-sunny' | 'pause-circle' | 'pause' | 'paw' | 'pencil' | 'people-circle' | 'people' | 'person-add' | 'person-circle' | 'person' | 'person-remove' | 'phone-landscape' | 'phone-portrait' | 'pie-chart' | 'pin' | 'pint' | 'pizza' | 'planet' | 'play-back-circle' | 'play-back' | 'play-circle' | 'play-forward-circle' | 'play-forward' | 'play' | 'play-skip-back-circle' | 'play-skip-back' | 'play-skip-forward-circle' | 'play-skip-forward' | 'podium' | 'power' | 'pricetag' | 'pricetags' | 'print' | 'prism' | 'pulse' | 'push' | 'qr-code' | 'radio-button-off' | 'radio-button-on' | 'radio' | 'rainy' | 'reader' | 'receipt' | 'recording' | 'refresh-circle' | 'refresh' | 'reload-circle' | 'reload' | 'remove-circle' | 'remove' | 'reorder-four' | 'reorder-three' | 'reorder-two' | 'repeat' | 'resize' | 'restaurant' | 'return-down-back' | 'return-down-forward' | 'return-up-back' | 'return-up-forward' | 'ribbon' | 'rocket' | 'rose' | 'sad' | 'save' | 'scale' | 'scan-circle' | 'scan' | 'school' | 'search-circle' | 'search' | 'send' | 'server' | 'settings' | 'shapes' | 'share' | 'share-social' | 'shield-checkmark' | 'shield-half' | 'shield' | 'shirt' | 'shuffle' | 'skull' | 'snow' | 'sparkles' | 'speedometer' | 'square' | 'star-half' | 'star' | 'stats-chart' | 'stop-circle' | 'stop' | 'stopwatch' | 'storefront' | 'subway' | 'sunny' | 'swap-horizontal' | 'swap-vertical' | 'sync-circle' | 'sync' | 'tablet-landscape' | 'tablet-portrait' | 'telescope' | 'tennisball' | 'terminal' | 'text' | 'thermometer' | 'thumbs-down' | 'thumbs-up' | 'thunderstorm' | 'ticket' | 'time' | 'timer' | 'today' | 'toggle' | 'trail-sign' | 'train' | 'transgender' | 'trash-bin' | 'trash' | 'trending-down' | 'trending-up' | 'triangle' | 'trophy' | 'tv' | 'umbrella' | 'unlink' | 'videocam-off' | 'videocam' | 'volume-high' | 'volume-low' | 'volume-medium' | 'volume-mute' | 'volume-off' | 'walk' | 'wallet' | 'warning' | 'watch' | 'water' | 'wifi' | 'wine' | 'woman';
5
4
  export declare type IconSize = 'small' | 'medium' | 'large';
6
5
  export declare type IconVariant = 'round' | 'goa';
7
- interface Props extends TestProps {
6
+ export declare type IconStyle = 'outline' | 'filled' | 'sharp';
7
+ interface Props {
8
8
  type: GoAIconType;
9
9
  size?: IconSize;
10
+ style?: IconStyle;
10
11
  }
11
- export declare function GoAIcon({ type, size }: Props): JSX.Element;
12
+ export declare function GoAIcon({ type, style, size }: Props): JSX.Element;
12
13
  export {};
@@ -4,7 +4,7 @@ import { GoACard } from './card/card.component';
4
4
  import { GoAFlexRow } from './flex';
5
5
  import { GoAFormItem, GoAFormActions, GoAForm } from './form/form.component';
6
6
  import { GoAIcon, GoAIconButton } from './icons';
7
- import { GoAInput } from './input/input.component';
7
+ import { GoAInput, GoAInputText, GoAInputPassword, GoAInputDate, GoAInputTime, GoAInputDateTime, GoAInputEmail, GoAInputSearch, GoAInputUrl, GoAInputTel, GoAInputFile, GoAInputMonth, GoAInputNumber, GoAInputRange } from './input/input.component';
8
8
  import { GoAModal, GoAModalActions, GoAModalContent, GoAModalTitle } from './modal/modal.component';
9
9
  import { GoAScrollable } from './scrollable/scrollable.component';
10
10
  import { GoATextArea } from './textarea/textarea.component';
@@ -12,4 +12,4 @@ import { GoATransition, GoATransitionSequence } from './transitions';
12
12
  import type { GoAIconType } from './icons';
13
13
  import type { GoABadgeType } from './badge/badge.component';
14
14
  export type { GoAIconType, GoABadgeType };
15
- export { GoABadge, GoAAppVersionHeader, GoACard, GoAFlexRow, GoAForm, GoAFormActions, GoAFormItem, GoAIcon, GoAIconButton, GoAInput, GoAModal, GoAModalActions, GoAModalContent, GoAModalTitle, GoAScrollable, GoATextArea, GoATransition, GoATransitionSequence };
15
+ export { GoABadge, GoAAppVersionHeader, GoACard, GoAFlexRow, GoAForm, GoAFormActions, GoAFormItem, GoAIcon, GoAIconButton, GoAInput, GoAInputText, GoAInputPassword, GoAInputDate, GoAInputTime, GoAInputDateTime, GoAInputEmail, GoAInputSearch, GoAInputUrl, GoAInputTel, GoAInputFile, GoAInputMonth, GoAInputNumber, GoAInputRange, GoAModal, GoAModalActions, GoAModalContent, GoAModalTitle, GoAScrollable, GoATextArea, GoATransition, GoATransitionSequence };
@@ -2,16 +2,43 @@ import { FC } from 'react';
2
2
  import { GoAIconType } from '../icons';
3
3
  import { OnChange } from '../../lib/_common/input';
4
4
  import './input.scss';
5
- declare type InputType = 'text' | 'password' | 'email' | 'number' | 'tel' | 'url' | 'date' | 'time' | 'datetime-local';
6
5
  interface Props {
7
6
  name: string;
8
7
  value: string;
9
- type: InputType;
10
8
  id?: string;
11
9
  disabled?: boolean;
12
10
  placeholder?: string;
13
11
  leadingIcon?: GoAIconType;
14
12
  onChange: OnChange;
15
13
  }
16
- export declare const GoAInput: FC<Props>;
14
+ export declare const GoAInput: FC<Props & {
15
+ type: string;
16
+ }>;
17
+ export declare const GoAInputText: FC<Props>;
18
+ export declare const GoAInputPassword: FC<Props>;
19
+ export declare const GoAInputDate: FC<Props & {
20
+ min: string;
21
+ max: string;
22
+ }>;
23
+ export declare const GoAInputTime: FC<Props>;
24
+ export declare const GoAInputDateTime: FC<Props & {
25
+ min: string;
26
+ max: string;
27
+ }>;
28
+ export declare const GoAInputEmail: FC<Props>;
29
+ export declare const GoAInputSearch: FC<Props>;
30
+ export declare const GoAInputUrl: FC<Props>;
31
+ export declare const GoAInputTel: FC<Props>;
32
+ export declare const GoAInputFile: FC<Props>;
33
+ export declare const GoAInputMonth: FC<Props>;
34
+ export declare const GoAInputNumber: FC<Props & {
35
+ min: number;
36
+ max: number;
37
+ step: number;
38
+ }>;
39
+ export declare const GoAInputRange: FC<Props & {
40
+ min: number;
41
+ max: number;
42
+ step: number;
43
+ }>;
17
44
  export default GoAInput;
@@ -15,7 +15,7 @@ export declare const GoAModal: FC<ModalProps & ModalTestProps>;
15
15
  export default GoAModal;
16
16
  export declare const GoAModalActions: FC;
17
17
  export interface GoAModalContentProps {
18
- scrollable?: boolean;
18
+ disableScroll?: boolean;
19
19
  }
20
20
  export declare const GoAModalContent: FC<GoAModalContentProps & TestProps>;
21
21
  export declare const GoAModalTitle: FC<TestProps>;