npm i git+https://github.com/bcgov/design-system-web-components.git
-index.js file
import "core-js/stable"; // makes it ie11 compatible, needs to be first item.
.....
import "@bcgov/web-components/html/dist/bcgov-web-components/bcgov-web-components.css";
import { applyPolyfills, defineCustomElements } from "@bcgov/web-components/html/dist/loader";
applyPolyfills().then(() => {
defineCustomElements(window);
});
index.js file
import "core-js/stable"; // makes it ie11 compatible, needs to be first item.
.....
import "@bcgov/web-components/src/components/sass/style.scss";
import { applyPolyfills, defineCustomElements } from "@bcgov/web-components/html/dist/loader";
applyPolyfills().then(() => {
defineCustomElements(window);
});
npm npm i corejs
package.json file
"browserslist": [
"> 1.5%",
"ie >= 11",
"edge >= 17"
],
"babel": {
"presets": [
[
"@babel/preset-env",
{
"useBuiltIns": "usage",
"corejs": "3.0.0",
"targets": {
"esmodules": true,
"ie": "11"
}
}
]
]
}
The BCGov Web components was created to give a standard look and feel to meet the criteria of the Design System
Here is how it does it:
All components should meet or exceed WCAG 2.0 AA standards Although this is the intention, this is very much a work in progress.
<bcgov-collapse>
Not Implenented<bcgov-beta>
<bcgov-button>
bcgov-callout>
<bcgov-footer>
<bcgov-forms><bcgov-radio><bcgov-checkbox>
Not Implemented<bcgov-header>
<bcgov-menu>
<bcgov-tabs><bcgov-tab>
Not ImplementedBuilds are known to work with node v15.14.0 and npm v7.7.6.
Tip: npm --no-save install
with npm7 will prevent unnecessary package-lock.json changes from needing to be committed back to the repository; not forcing an upgrade for others with npm6.