@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.
- package/README.md +7 -102
- package/experimental/index.d.ts +0 -0
- package/experimental/package.json +1 -1
- package/experimental/react-components.esm.js +0 -1962
- package/experimental/react-components.umd.js +5 -1980
- package/index.d.ts +29 -14
- package/lib/app-header/app-header.d.ts +18 -0
- package/lib/badge/badge.d.ts +29 -0
- package/lib/button/button.d.ts +27 -35
- package/lib/button-group/button-group.d.ts +18 -0
- package/lib/callout/callout.d.ts +14 -23
- package/lib/card/card-actions.d.ts +16 -0
- package/lib/card/card-content.d.ts +13 -0
- package/lib/card/card-group.d.ts +16 -0
- package/lib/card/card-image.d.ts +18 -0
- package/lib/card/card.d.ts +18 -0
- package/lib/card/index.d.ts +5 -0
- package/lib/checkbox/checkbox.d.ts +26 -35
- package/lib/container/container.d.ts +23 -0
- package/lib/dropdown/dropdown-option.d.ts +21 -0
- package/lib/dropdown/dropdown.d.ts +35 -0
- package/lib/flex/index.d.ts +1 -0
- package/lib/flex/row.d.ts +8 -0
- package/lib/form/form-item.d.ts +24 -0
- package/lib/form/index.d.ts +1 -0
- package/lib/form/validators.d.ts +10 -0
- package/lib/hero-banner/hero-banner-actions.d.ts +4 -0
- package/lib/hero-banner/hero-banner-content.d.ts +4 -0
- package/lib/hero-banner/hero-banner.d.ts +18 -0
- package/lib/icons/icon-button.d.ts +27 -0
- package/lib/icons/icon.d.ts +37 -0
- package/lib/icons/index.d.ts +2 -0
- package/lib/input/input.d.ts +70 -0
- package/lib/modal/modal.d.ts +23 -0
- package/lib/notification/notification.d.ts +14 -35
- package/lib/page-loader/page-loader.d.ts +26 -0
- package/lib/radio-group/radio-group.d.ts +18 -44
- package/lib/radio-group/radio.d.ts +27 -0
- package/lib/service-level-header/service-level-header.d.ts +17 -0
- package/lib/skeleton/skeleton.d.ts +19 -0
- package/lib/spinner/spinner.d.ts +24 -0
- package/lib/textarea/textarea.d.ts +27 -0
- package/package.json +12 -7
- package/react-components.esm.js +690 -2556
- package/react-components.umd.js +747 -2598
- package/experimental/experimental/badge/badge.component.d.ts +0 -8
- package/experimental/experimental/element-loader/element-loader.d.ts +0 -18
- package/experimental/experimental/form/container/form.button.component.d.ts +0 -7
- package/experimental/experimental/form/container/form.container.component.d.ts +0 -7
- package/experimental/experimental/form/container/form.item.component.d.ts +0 -18
- package/experimental/experimental/form/form.component.d.ts +0 -32
- package/experimental/experimental/form/formFieldValidator.d.ts +0 -4
- package/experimental/experimental/index.d.ts +0 -9
- package/experimental/experimental/input/input.component.d.ts +0 -15
- package/experimental/experimental/page-loader/page-loader.d.ts +0 -43
- package/experimental/experimental/skeleton/skeleton-element.d.ts +0 -8
- package/experimental/experimental/skeleton/skeleton-grid-column.d.ts +0 -9
- package/experimental/experimental/skeleton/skeleton-image-content.d.ts +0 -9
- package/experimental/experimental/skeleton/skeleton-titled-content.d.ts +0 -9
- package/lib/card/card.component.d.ts +0 -26
- package/lib/card-group/card.group.component.d.ts +0 -24
- package/lib/dropdown/dropdown.component.d.ts +0 -20
- package/lib/dropdown/dropdown.context.d.ts +0 -17
- package/lib/dropdown/option/option.component.d.ts +0 -10
- package/lib/dropdown/option-group/option-group.component.d.ts +0 -6
- package/lib/header/header.d.ts +0 -10
- package/lib/hero-banner/content/hero-banner-content.component.d.ts +0 -7
- package/lib/hero-banner/hero-banner.component.d.ts +0 -11
- package/lib/hero-banner/link/hero-banner-link.component.d.ts +0 -8
- package/lib/microsite-logo/microsite-logo.d.ts +0 -8
- package/lib/radio-group/radio/radio.d.ts +0 -17
- package/lib/radio-group/radio-group.context.d.ts +0 -6
package/README.md
CHANGED
|
@@ -1,112 +1,17 @@
|
|
|
1
|
-
#
|
|
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
|
-
|
|
8
|
-
|
|
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
|
```
|
|
File without changes
|