@ongov/ontario-design-system-component-library-angular 4.2.0-alpha.1
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/LICENSE +201 -0
- package/README.md +118 -0
- package/dist/component-library/README.md +91 -0
- package/dist/component-library/assets/favicons/apple-touch-icon.png +0 -0
- package/dist/component-library/assets/favicons/favicon-192x192.png +0 -0
- package/dist/component-library/assets/favicons/favicon-48x48.png +0 -0
- package/dist/component-library/assets/favicons/favicon-512x512.png +0 -0
- package/dist/component-library/assets/favicons/favicon.ico +0 -0
- package/dist/component-library/assets/favicons/favicon.svg +60 -0
- package/dist/component-library/assets/favicons/manifest.json +17 -0
- package/dist/component-library/assets/fonts/courier-prime-400/CourierPrime-Regular.ttf +0 -0
- package/dist/component-library/assets/fonts/courier-prime-400/OFL.txt +93 -0
- package/dist/component-library/assets/fonts/courier-prime-400--italic/CourierPrime-Italic.ttf +0 -0
- package/dist/component-library/assets/fonts/courier-prime-400--italic/OFL.txt +93 -0
- package/dist/component-library/assets/fonts/courier-prime-700/CourierPrime-Bold.ttf +0 -0
- package/dist/component-library/assets/fonts/courier-prime-700/OFL.txt +93 -0
- package/dist/component-library/assets/fonts/courier-prime-700--italic/CourierPrime-BoldItalic.ttf +0 -0
- package/dist/component-library/assets/fonts/courier-prime-700--italic/OFL.txt +93 -0
- package/dist/component-library/assets/fonts/open-sans-400/LICENSE.txt +202 -0
- package/dist/component-library/assets/fonts/open-sans-400/open-sans-400.eot +0 -0
- package/dist/component-library/assets/fonts/open-sans-400/open-sans-400.svg +1637 -0
- package/dist/component-library/assets/fonts/open-sans-400/open-sans-400.ttf +0 -0
- package/dist/component-library/assets/fonts/open-sans-400/open-sans-400.woff +0 -0
- package/dist/component-library/assets/fonts/open-sans-400/open-sans-400.woff2 +0 -0
- package/dist/component-library/assets/fonts/open-sans-400--italic/LICENSE.txt +202 -0
- package/dist/component-library/assets/fonts/open-sans-400--italic/open-sans-400--italic.eot +0 -0
- package/dist/component-library/assets/fonts/open-sans-400--italic/open-sans-400--italic.svg +1650 -0
- package/dist/component-library/assets/fonts/open-sans-400--italic/open-sans-400--italic.ttf +0 -0
- package/dist/component-library/assets/fonts/open-sans-400--italic/open-sans-400--italic.woff +0 -0
- package/dist/component-library/assets/fonts/open-sans-400--italic/open-sans-400--italic.woff2 +0 -0
- package/dist/component-library/assets/fonts/open-sans-600/LICENSE.txt +202 -0
- package/dist/component-library/assets/fonts/open-sans-600/open-sans-600.eot +0 -0
- package/dist/component-library/assets/fonts/open-sans-600/open-sans-600.svg +1637 -0
- package/dist/component-library/assets/fonts/open-sans-600/open-sans-600.ttf +0 -0
- package/dist/component-library/assets/fonts/open-sans-600/open-sans-600.woff +0 -0
- package/dist/component-library/assets/fonts/open-sans-600/open-sans-600.woff2 +0 -0
- package/dist/component-library/assets/fonts/open-sans-700/LICENSE.txt +202 -0
- package/dist/component-library/assets/fonts/open-sans-700/open-sans-700.eot +0 -0
- package/dist/component-library/assets/fonts/open-sans-700/open-sans-700.svg +548 -0
- package/dist/component-library/assets/fonts/open-sans-700/open-sans-700.ttf +0 -0
- package/dist/component-library/assets/fonts/open-sans-700/open-sans-700.woff +0 -0
- package/dist/component-library/assets/fonts/open-sans-700/open-sans-700.woff2 +0 -0
- package/dist/component-library/assets/fonts/raleway-modified-400/LICENSE.txt +95 -0
- package/dist/component-library/assets/fonts/raleway-modified-400/raleway-modified-400.svg +630 -0
- package/dist/component-library/assets/fonts/raleway-modified-400/raleway-modified-400.ttf +0 -0
- package/dist/component-library/assets/fonts/raleway-modified-400/raleway-modified-400.woff +0 -0
- package/dist/component-library/assets/fonts/raleway-modified-400/raleway-modified-400.woff2 +0 -0
- package/dist/component-library/assets/fonts/raleway-modified-600/LICENSE.txt +95 -0
- package/dist/component-library/assets/fonts/raleway-modified-600/raleway-modified-600.svg +625 -0
- package/dist/component-library/assets/fonts/raleway-modified-600/raleway-modified-600.ttf +0 -0
- package/dist/component-library/assets/fonts/raleway-modified-600/raleway-modified-600.woff +0 -0
- package/dist/component-library/assets/fonts/raleway-modified-600/raleway-modified-600.woff2 +0 -0
- package/dist/component-library/assets/fonts/raleway-modified-700/LICENSE.txt +95 -0
- package/dist/component-library/assets/fonts/raleway-modified-700/raleway-modified-700.svg +621 -0
- package/dist/component-library/assets/fonts/raleway-modified-700/raleway-modified-700.ttf +0 -0
- package/dist/component-library/assets/fonts/raleway-modified-700/raleway-modified-700.woff +0 -0
- package/dist/component-library/assets/fonts/raleway-modified-700/raleway-modified-700.woff2 +0 -0
- package/dist/component-library/assets/images/footer-default-supergraphic-logo.svg +11 -0
- package/dist/component-library/assets/images/footer-expanded-supergraphic-logo.svg +11 -0
- package/dist/component-library/assets/images/highlight-indicator.svg +9 -0
- package/dist/component-library/assets/images/ontario-logo--desktop.svg +40 -0
- package/dist/component-library/assets/images/ontario-logo--mobile.svg +6 -0
- package/dist/component-library/assets/images/ontario-material-dropdown-arrow-48px.svg +1 -0
- package/dist/component-library/esm2020/angular-component-library.mjs +5 -0
- package/dist/component-library/esm2020/lib/component-library.module.mjs +20 -0
- package/dist/component-library/esm2020/lib/stencil-generated/angular-component-lib/utils.mjs +59 -0
- package/dist/component-library/esm2020/lib/stencil-generated/components.mjs +3441 -0
- package/dist/component-library/esm2020/lib/stencil-generated/index.mjs +141 -0
- package/dist/component-library/esm2020/public-api.mjs +7 -0
- package/dist/component-library/fesm2015/angular-component-library.mjs +3527 -0
- package/dist/component-library/fesm2015/angular-component-library.mjs.map +1 -0
- package/dist/component-library/fesm2020/angular-component-library.mjs +3527 -0
- package/dist/component-library/fesm2020/angular-component-library.mjs.map +1 -0
- package/dist/component-library/index.d.ts +5 -0
- package/dist/component-library/lib/component-library.module.d.ts +7 -0
- package/dist/component-library/lib/stencil-generated/angular-component-lib/utils.d.ts +9 -0
- package/dist/component-library/lib/stencil-generated/components.d.ts +1365 -0
- package/dist/component-library/lib/stencil-generated/index.d.ts +2 -0
- package/dist/component-library/package.json +32 -0
- package/dist/component-library/public-api.d.ts +3 -0
- package/package.json +65 -0
- package/projects/component-library/src/lib/component-library.module.ts +12 -0
- package/projects/component-library/src/lib/stencil-generated/angular-component-lib/utils.ts +65 -0
- package/projects/component-library/src/lib/stencil-generated/components.ts +3115 -0
- package/projects/component-library/src/lib/stencil-generated/index.ts +141 -0
- package/projects/component-library/src/public-api.ts +7 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# Ontario Design System Angular Component Library
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+
|
|
5
|
+
- [Introduction](#introduction)
|
|
6
|
+
- [Installation and usage](#installation-and-usage)
|
|
7
|
+
- [Debugging FAQs](#debugging-faqs)
|
|
8
|
+
- [Support](#support)
|
|
9
|
+
|
|
10
|
+
## Introduction
|
|
11
|
+
|
|
12
|
+
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 15.2.0. It is based off the [Ontario Design System Component Library](https://www.npmjs.com/package/@ongov/ontario-design-system-component-library) built using [Stencil](https://stenciljs.com/). For more information, [find it on NPM](https://www.npmjs.com/package/@ongov/ontario-design-system-component-library-angular).
|
|
13
|
+
|
|
14
|
+
## Installation and usage
|
|
15
|
+
|
|
16
|
+
To find documentation on individual web components in this component library, please download and refer to our [component documentation](https://designsystem.ontario.ca/docs/documentation/for-developers/web-components.html#component-documentation).
|
|
17
|
+
|
|
18
|
+
To use the Ontario Design System Angular component library, follow these steps:
|
|
19
|
+
|
|
20
|
+
1. Install the NPM package.
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npm install --save @ongov/ontario-design-system-component-library-angular
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
2. Import the `ComponentLibraryModule`, or whichever specific component you wish to use into your root module. The `ComponentLibraryModule` import will include all the Ontario Design System web components.
|
|
27
|
+
|
|
28
|
+
```ts
|
|
29
|
+
import { ComponentLibraryModule } from '@ongov/ontario-design-system-component-library-angular/dist/component-library';
|
|
30
|
+
|
|
31
|
+
@NgModule({
|
|
32
|
+
imports: [ComponentLibraryModule],
|
|
33
|
+
})
|
|
34
|
+
export class AppModule {}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Usage
|
|
38
|
+
|
|
39
|
+
You can now use the Angular Components in your component template files.
|
|
40
|
+
|
|
41
|
+
```html
|
|
42
|
+
<ontario-button type="primary">Primary Button</ontario-button>
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Local assets
|
|
46
|
+
|
|
47
|
+
Along with the components, the local assets (logos, fonts, etc.) need to be copied into your project so that they are available for bundling upon building your Angular application.
|
|
48
|
+
|
|
49
|
+
The assets in the NPM package are located at `@ongov/ontario-design-system-component-library-angular/dist/assets`, and should be copied to your public assets folder.
|
|
50
|
+
|
|
51
|
+
In a standard Angular application this can be done in a number of ways. One way is to use the [copyfiles](https://www.npmjs.com/package/copyfiles) NPM package, which you can with any operating system:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
copyfiles -E -f "node_modules/@ongov/ontario-design-system-component-library-angular/dist/assets/*" src/assets
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Another way is to add scripts to copy the assets in your `package.json` file. For example:
|
|
58
|
+
|
|
59
|
+
```json
|
|
60
|
+
"prebuild": "npm run copy:assets",
|
|
61
|
+
"copy:images": "copyfiles -E -f \"node_modules/@ongov/ontario-design-system-component-library-angular/dist/component-library/assets/images/**\" src/assets",
|
|
62
|
+
"copy:favicons": "copyfiles -E -f \"node_modules/@ongov/ontario-design-system-component-library-angular/dist/component-library/assets/favicons/**\" src/assets/favicons",
|
|
63
|
+
"copy:fonts": "copyfiles -E -u 6 \"node_modules/@ongov/ontario-design-system-component-library-angular/dist/component-library/assets/fonts/**/*\" src/assets/fonts",
|
|
64
|
+
"copy:assets": "npm run copy:images && npm run copy:favicons && npm run copy:fonts"
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Debugging FAQs
|
|
68
|
+
|
|
69
|
+
You may run into a few errors when first using the Ontario Design System Angular web components library with your Angular project.
|
|
70
|
+
|
|
71
|
+
Here are a few common ones and how to fix them:
|
|
72
|
+
|
|
73
|
+
### _An attribute or property cannot be resolved during compilation (NG8002)._
|
|
74
|
+
|
|
75
|
+
This error arises when attempting to bind to a property that does not exist.
|
|
76
|
+
|
|
77
|
+
To fix this issue, the `CUSTOM_ELEMENTS_SCHEMA` must be added to the module schemas for the component. Ex:
|
|
78
|
+
|
|
79
|
+
```ts
|
|
80
|
+
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
|
81
|
+
|
|
82
|
+
@NgModule({
|
|
83
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
84
|
+
})
|
|
85
|
+
export class AppModule {}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### _Error: inject() must be called from an injection context (NG0203)_
|
|
89
|
+
|
|
90
|
+
You see this error when you try to use the inject() function outside of the allowed injection context. The injection context is available during the class creation and initialization.
|
|
91
|
+
|
|
92
|
+
To fix this issue, add mappings to the angular library in the `tsconfig.json` file. Note that this only applies when using TypeScript path mappings instead of linking to the libraries.
|
|
93
|
+
|
|
94
|
+
```json
|
|
95
|
+
"compilerOptions": {
|
|
96
|
+
"paths": {
|
|
97
|
+
"@angular/*": ["./node_modules/@angular/*"]
|
|
98
|
+
},
|
|
99
|
+
}
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### _Typescript compiler issues_
|
|
103
|
+
|
|
104
|
+
You may encounter errors building the component library if your compiler options `lib` is set to a version below ES2022.
|
|
105
|
+
|
|
106
|
+
If this is the case, you can add the following to your _tsconfig.json_ file:
|
|
107
|
+
|
|
108
|
+
```json
|
|
109
|
+
"complierOptions": {
|
|
110
|
+
"skipLibCheck": true
|
|
111
|
+
}
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Adding this will skip the type checking of the Angular component library declaration files. This can save time during compilation at the expense of type-system accuracy.
|
|
115
|
+
|
|
116
|
+
## Support
|
|
117
|
+
|
|
118
|
+
Contact us at [design.system@ontario.ca](mailto:design.system@ontario.ca) for assistance with this package.
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# Ontario Design System Component Library - Angular
|
|
2
|
+
|
|
3
|
+
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 15.2.0. It is based off the [Ontario Design System Component Library](https://www.npmjs.com/package/@ongov/ontario-design-system-component-library) built using [Stencil](https://stenciljs.com/).
|
|
4
|
+
|
|
5
|
+
## Using the Angular Component Library
|
|
6
|
+
|
|
7
|
+
To find documentation on individual web components in this component library, please download and refer to our [component documentation](https://designsystem.ontario.ca/docs/documentation/for-developers/web-components.html#component-documentation).
|
|
8
|
+
|
|
9
|
+
To use the Angular Component Library, follow these steps:
|
|
10
|
+
|
|
11
|
+
1. Install the NPM package.
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm install --save @ongov/ontario-design-system-component-library-angular
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
2. Import the `ComponentLibraryModule`, or whichever specific component you wish to use into your root module. The `ComponentLibraryModule` import will include all the Ontario Design System web components.
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
import { ComponentLibraryModule } from '@ongov/ontario-design-system-component-library-angular/dist/component-library';
|
|
21
|
+
|
|
22
|
+
@NgModule({
|
|
23
|
+
imports: [ComponentLibraryModule],
|
|
24
|
+
})
|
|
25
|
+
export class AppModule {}
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
3. You can now use the Angular Components in your component template files.
|
|
29
|
+
|
|
30
|
+
```html
|
|
31
|
+
<ontario-button type="primary">Primary Button</ontario-button>
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Local assets
|
|
35
|
+
|
|
36
|
+
Along with the components, the local assets (logos, fonts, etc.) need to be copied into your project so that they are available for bundling upon building your Angular application.
|
|
37
|
+
|
|
38
|
+
The assets in the NPM package are located at `@ongov/ontario-design-system-component-library-angular/dist/assets`, and should be copied to your public assets folder.
|
|
39
|
+
|
|
40
|
+
In a standard Angular application this can be done in a number of ways. One way is to use the [copyfiles](https://www.npmjs.com/package/copyfiles) NPM package, which you can with any operating system:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
copyfiles -E -f "node_modules/@ongov/ontario-design-system-component-library-angular/dist/assets/*" src/assets
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Another way is to add scripts to copy the assets in your `package.json` file. For example:
|
|
47
|
+
|
|
48
|
+
```json
|
|
49
|
+
"prebuild": "npm run copy:assets",
|
|
50
|
+
"copy:images": "copyfiles -E -f \"node_modules/@ongov/ontario-design-system-component-library-angular/dist/component-library/assets/images/**\" src/assets",
|
|
51
|
+
"copy:favicons": "copyfiles -E -f \"node_modules/@ongov/ontario-design-system-component-library-angular/dist/component-library/assets/favicons/**\" src/assets/favicons",
|
|
52
|
+
"copy:fonts": "copyfiles -E -u 6 \"node_modules/@ongov/ontario-design-system-component-library-angular/dist/component-library/assets/fonts/**/*\" src/assets/fonts",
|
|
53
|
+
"copy:assets": "npm run copy:images && npm run copy:favicons && npm run copy:fonts"
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Debugging FAQs
|
|
57
|
+
|
|
58
|
+
You may run into a few errors when first using web components with your Angular project.
|
|
59
|
+
|
|
60
|
+
Here are a few common ones and how to fix them:
|
|
61
|
+
|
|
62
|
+
### _An attribute or property cannot be resolved during compilation (NG8002)._
|
|
63
|
+
|
|
64
|
+
This error arises when attempting to bind to a property that does not exist.
|
|
65
|
+
|
|
66
|
+
To fix this issue, the `CUSTOM_ELEMENTS_SCHEMA` must be added to the module schemas for the component. Ex:
|
|
67
|
+
|
|
68
|
+
```ts
|
|
69
|
+
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
|
70
|
+
|
|
71
|
+
@NgModule({
|
|
72
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
73
|
+
})
|
|
74
|
+
export class AppModule {}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
<br>
|
|
78
|
+
|
|
79
|
+
### _Error: inject() must be called from an injection context (NG0203)_
|
|
80
|
+
|
|
81
|
+
You see this error when you try to use the inject() function outside of the allowed injection context. The injection context is available during the class creation and initialization.
|
|
82
|
+
|
|
83
|
+
To fix this issue, add mappings to the angular library in the `tsconfig.json` file. Note that this only applies when using TypeScript path mappings instead of linking to the libraries.
|
|
84
|
+
|
|
85
|
+
```json
|
|
86
|
+
"compilerOptions": {
|
|
87
|
+
"paths": {
|
|
88
|
+
"@angular/*": ["./node_modules/@angular/*"]
|
|
89
|
+
},
|
|
90
|
+
}
|
|
91
|
+
```
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
<?xml version="1.0" standalone="no"?>
|
|
2
|
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
|
|
3
|
+
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
|
|
4
|
+
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
|
|
5
|
+
width="700.000000pt" height="700.000000pt" viewBox="0 0 700.000000 700.000000"
|
|
6
|
+
preserveAspectRatio="xMidYMid meet" class="favicon-svg">
|
|
7
|
+
<style>
|
|
8
|
+
.favicon-svg {
|
|
9
|
+
background-color: white;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
path {
|
|
13
|
+
fill: black;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
@media (prefers-color-scheme: dark) {
|
|
17
|
+
.favicon-svg {
|
|
18
|
+
background-color: black;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
path {
|
|
22
|
+
fill: white;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
</style>
|
|
26
|
+
<metadata>
|
|
27
|
+
Created by potrace 1.14, written by Peter Selinger 2001-2017
|
|
28
|
+
</metadata>
|
|
29
|
+
<g transform="translate(0.000000,700.000000) scale(0.100000,-0.100000)"
|
|
30
|
+
fill="#000000" stroke="none">
|
|
31
|
+
<path d="M3025 6985 c-215 -19 -392 -41 -555 -71 -1488 -272 -2273 -1167
|
|
32
|
+
-2440 -2783 -17 -162 -20 -264 -20 -620 0 -234 5 -478 10 -541 83 -949 361
|
|
33
|
+
-1641 854 -2124 458 -448 1085 -710 1941 -812 186 -22 971 -31 1195 -15 653
|
|
34
|
+
50 1203 205 1645 466 198 117 330 222 511 407 196 199 310 363 443 629 236
|
|
35
|
+
472 364 1047 380 1703 18 730 -23 1168 -155 1657 -109 406 -281 763 -509 1054
|
|
36
|
+
-84 107 -351 366 -450 437 -210 148 -410 258 -632 346 -321 126 -727 216
|
|
37
|
+
-1158 256 -233 22 -859 28 -1060 11z m-525 -1671 c324 -52 579 -141 836 -290
|
|
38
|
+
55 -32 115 -66 134 -77 l35 -19 55 37 c69 47 317 171 436 218 121 49 322 103
|
|
39
|
+
469 127 137 23 490 28 650 10 183 -21 506 -111 668 -185 66 -30 64 -22 42
|
|
40
|
+
-174 -84 -586 -384 -1118 -838 -1490 -109 -88 -283 -204 -387 -256 l-90 -45 0
|
|
41
|
+
-214 c0 -309 -35 -511 -137 -781 -88 -234 -217 -461 -371 -655 -100 -126 -284
|
|
42
|
+
-307 -404 -399 l-97 -73 -103 78 c-313 238 -592 597 -731 939 -135 331 -189
|
|
43
|
+
601 -186 934 0 90 -3 167 -8 171 -4 5 -44 28 -88 51 -106 56 -268 164 -363
|
|
44
|
+
241 -186 151 -391 383 -514 580 -128 207 -259 532 -307 763 -23 113 -46 293
|
|
45
|
+
-38 301 14 14 264 109 366 139 246 72 425 95 686 89 105 -3 233 -12 285 -20z"/>
|
|
46
|
+
<path d="M1935 4831 c-60 -10 -136 -24 -168 -30 -66 -14 -65 -1 -15 -141 46
|
|
47
|
+
-130 128 -293 209 -415 119 -180 362 -413 561 -539 l58 -36 24 47 c39 79 113
|
|
48
|
+
169 164 202 70 45 125 61 206 61 83 0 155 -19 241 -62 66 -33 175 -107 175
|
|
49
|
+
-118 0 -4 -17 -12 -38 -18 -57 -17 -151 -82 -202 -139 -91 -100 -148 -250
|
|
50
|
+
-170 -442 -16 -134 -8 -427 15 -551 39 -217 161 -509 293 -705 68 -100 199
|
|
51
|
+
-258 211 -253 4 2 36 35 70 73 199 223 357 540 420 840 21 101 41 272 41 350
|
|
52
|
+
l0 43 -112 4 c-141 6 -205 28 -283 99 -62 57 -109 143 -125 228 -12 66 -13
|
|
53
|
+
271 -1 290 7 11 17 8 52 -16 123 -85 208 -108 365 -100 129 6 210 30 384 113
|
|
54
|
+
353 169 671 477 839 813 53 105 131 305 131 335 0 30 -20 37 -179 62 -150 23
|
|
55
|
+
-505 15 -645 -15 -142 -31 -292 -84 -438 -153 l-128 -61 45 -81 c122 -225 90
|
|
56
|
+
-408 -100 -565 -35 -29 -219 -131 -236 -131 -2 0 -3 51 -1 112 3 100 1 121
|
|
57
|
+
-21 180 -36 101 -84 174 -163 253 -221 221 -620 412 -969 464 -139 20 -390 22
|
|
58
|
+
-510 2z"/>
|
|
59
|
+
</g>
|
|
60
|
+
</svg>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Application name",
|
|
3
|
+
"short_name": "App name",
|
|
4
|
+
"description": "Application description",
|
|
5
|
+
"icons": [
|
|
6
|
+
{
|
|
7
|
+
"src": "./favicon-192x192.png",
|
|
8
|
+
"sizes": "192 x 192",
|
|
9
|
+
"type": "image/png"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"src": "./favicon-512x512.png",
|
|
13
|
+
"sizes": "512 x 512",
|
|
14
|
+
"type": "image/png"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Copyright 2015 The Courier Prime Project Authors (https://github.com/quoteunquoteapps/CourierPrime).
|
|
2
|
+
|
|
3
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
4
|
+
This license is copied below, and is also available with a FAQ at:
|
|
5
|
+
http://scripts.sil.org/OFL
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
-----------------------------------------------------------
|
|
9
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
10
|
+
-----------------------------------------------------------
|
|
11
|
+
|
|
12
|
+
PREAMBLE
|
|
13
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
14
|
+
development of collaborative font projects, to support the font creation
|
|
15
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
16
|
+
open framework in which fonts may be shared and improved in partnership
|
|
17
|
+
with others.
|
|
18
|
+
|
|
19
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
20
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
21
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
22
|
+
redistributed and/or sold with any software provided that any reserved
|
|
23
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
24
|
+
however, cannot be released under any other type of license. The
|
|
25
|
+
requirement for fonts to remain under this license does not apply
|
|
26
|
+
to any document created using the fonts or their derivatives.
|
|
27
|
+
|
|
28
|
+
DEFINITIONS
|
|
29
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
30
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
31
|
+
include source files, build scripts and documentation.
|
|
32
|
+
|
|
33
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
34
|
+
copyright statement(s).
|
|
35
|
+
|
|
36
|
+
"Original Version" refers to the collection of Font Software components as
|
|
37
|
+
distributed by the Copyright Holder(s).
|
|
38
|
+
|
|
39
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
40
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
41
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
42
|
+
new environment.
|
|
43
|
+
|
|
44
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
45
|
+
writer or other person who contributed to the Font Software.
|
|
46
|
+
|
|
47
|
+
PERMISSION & CONDITIONS
|
|
48
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
49
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
50
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
51
|
+
Software, subject to the following conditions:
|
|
52
|
+
|
|
53
|
+
1) Neither the Font Software nor any of its individual components,
|
|
54
|
+
in Original or Modified Versions, may be sold by itself.
|
|
55
|
+
|
|
56
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
57
|
+
redistributed and/or sold with any software, provided that each copy
|
|
58
|
+
contains the above copyright notice and this license. These can be
|
|
59
|
+
included either as stand-alone text files, human-readable headers or
|
|
60
|
+
in the appropriate machine-readable metadata fields within text or
|
|
61
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
62
|
+
|
|
63
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
64
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
65
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
66
|
+
presented to the users.
|
|
67
|
+
|
|
68
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
69
|
+
Software shall not be used to promote, endorse or advertise any
|
|
70
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
71
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
72
|
+
permission.
|
|
73
|
+
|
|
74
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
75
|
+
must be distributed entirely under this license, and must not be
|
|
76
|
+
distributed under any other license. The requirement for fonts to
|
|
77
|
+
remain under this license does not apply to any document created
|
|
78
|
+
using the Font Software.
|
|
79
|
+
|
|
80
|
+
TERMINATION
|
|
81
|
+
This license becomes null and void if any of the above conditions are
|
|
82
|
+
not met.
|
|
83
|
+
|
|
84
|
+
DISCLAIMER
|
|
85
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
86
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
87
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
88
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
89
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
90
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
91
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
92
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
93
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|