@abgov/angular-components 2.0.0 → 2.0.2
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 +58 -4
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -1,7 +1,61 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Angular UI Components
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+

|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
This is the web component library and utilizes Angular's web component integration.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Add Dependencies
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm i @abgov/web-components
|
|
11
|
+
npm i @abgov/angular-components
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Link ionicons in app/index.html
|
|
15
|
+
Add the following in the head element
|
|
16
|
+
|
|
17
|
+
```html
|
|
18
|
+
<script
|
|
19
|
+
type="module"
|
|
20
|
+
src="https://unpkg.com/ionicons@5.5.2/dist/ionicons/ionicons.esm.js"
|
|
21
|
+
></script>
|
|
22
|
+
<script
|
|
23
|
+
nomodule
|
|
24
|
+
src="https://unpkg.com/ionicons@5.5.2/dist/ionicons/ionicons.js"
|
|
25
|
+
></script>
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Update `src/app/app.module.ts` as per the four steps below
|
|
29
|
+
|
|
30
|
+
```typescript
|
|
31
|
+
// 1. Import the CUSTOM_ELEMENTS_SCHEMA
|
|
32
|
+
import { CUSTOM_ELEMENTS_SCHEMA } from "@angular/core";
|
|
33
|
+
|
|
34
|
+
// 2. Import the libs
|
|
35
|
+
import "@abgov/web-components";
|
|
36
|
+
import { AngularComponentsModule } from "@abgov/angular-components";
|
|
37
|
+
|
|
38
|
+
@NgModule({
|
|
39
|
+
declarations: [AppComponent],
|
|
40
|
+
imports: [
|
|
41
|
+
// 3. Add the needed imports
|
|
42
|
+
BrowserModule,
|
|
43
|
+
AngularComponentsModule,
|
|
44
|
+
],
|
|
45
|
+
providers: [],
|
|
46
|
+
bootstrap: [AppComponent],
|
|
47
|
+
// 4. Add the CUSTOM_ELEMENTS_SCHEMA to the NgModule
|
|
48
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
49
|
+
})
|
|
50
|
+
export class AppModule {}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Add the styles link in the `src/styles.css` file
|
|
54
|
+
|
|
55
|
+
```css
|
|
56
|
+
@import "@abgov/web-components/index.css";
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
[Visit Design System](https://ui-components.alberta.ca)
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"bugs": {
|
|
5
5
|
"url": "https://github.com/GovAlta/ui-components/issues"
|
|
6
6
|
},
|
|
7
|
-
"version": "2.0.
|
|
7
|
+
"version": "2.0.2",
|
|
8
8
|
"license": "Apache-2.0",
|
|
9
9
|
"keywords": [
|
|
10
10
|
"GoA",
|
|
@@ -19,14 +19,14 @@
|
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"tslib": "^2.3.0"
|
|
21
21
|
},
|
|
22
|
+
"peerDependencies": {
|
|
23
|
+
"@angular/core": ">=12.0.0"
|
|
24
|
+
},
|
|
22
25
|
"main": "bundles/abgov-angular-components.umd.js",
|
|
23
26
|
"module": "fesm2015/abgov-angular-components.js",
|
|
24
27
|
"es2015": "fesm2015/abgov-angular-components.js",
|
|
25
28
|
"esm2015": "esm2015/abgov-angular-components.js",
|
|
26
29
|
"fesm2015": "fesm2015/abgov-angular-components.js",
|
|
27
30
|
"typings": "abgov-angular-components.d.ts",
|
|
28
|
-
"sideEffects": false
|
|
29
|
-
"peerDependencies": {
|
|
30
|
-
"@angular/core": "12.2.13"
|
|
31
|
-
}
|
|
31
|
+
"sideEffects": false
|
|
32
32
|
}
|