# @engie-group/design-system-library

> Engie design system library

Latest version **2.4.3** (published 2019-11-12) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @engie-group/design-system-library
pnpm add @engie-group/design-system-library
yarn add @engie-group/design-system-library
bun add @engie-group/design-system-library
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 2.4.3 |
| Published | 2019-11-12 |
| First published | 2019-10-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 13.3 MB |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| Author | David de Vicente |
| Maintainers | bastien.gatellier.fabernovel, cezarion, kangaxx |
| Keywords | engie, design-system, bootstrap, css, js, sass, responsive, front-end, framework, web |

## Links

- npm: https://www.npmjs.com/package/@engie-group/design-system-library
- Repository: https://github.tools.digital.engie.com/GBSEngieDigitalDesignSystem/design-system-library
- Homepage: https://github.tools.digital.engie.com/GBSEngieDigitalHarmonyDesign/design-system-library
- Issues: https://github.tools.digital.engie.com/GBSEngieDigitalDesignSystem/design-system-library/issues
- npm.io page: https://npm.io/package/@engie-group/design-system-library

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 2.4.3 (latest) — 2019-11-12
- 2.4.1 (beta) — 2019-10-17
- 2.4.0 — 2019-10-14

## README

# ENGIE Design System

Welcome to the ENGIE Design System. It's a library of UI components written in HTML/CSS/Vanilla JS. To begin with, you have multiple ways to work with our design system. Start with the installation and then feel free to explore the different sections of the design system to start building applications based on ENGIE standards.
https://design.engie.com/

- [Quick Start](#quick-start)
- [How to use](#how-to-use)
- [Troubleshooting](#troubleshooting)

### Quick Start

Install the package inside your new application: `npm i @engie-group/design-system-library`

For an alternative use (zip, cdn), please read the dedicated section https://design.digital.engie.com/design-system/getting-started/developers/#quick-start

### How to use

You can start using the design system through two methods :
- [Basic usage](#basic-usage)
- [Advanced usage](#advanced-usage)

The package has the following file structure:

```
  .
  ├── CHANGELOG.md
  ├── README.md
  ├── dist
  │   ├── css
  │   ├── fonts
  │   └── js
  └── src
      ├── js
      │   └── components
      ├── scss
      └── fonts
```

#### Basic usage

You can use the built files from the `dist/` directory.

##### CSS

Copy-paste the stylesheet `<link>` into your `<head>` before all other stylesheets to load our CSS.

```html
<link href="/your-css-path/nj-components.min.css" rel="stylesheet">
```

Be sure to include the Google material font. See the documentation [here](https://design.engie.com/design-system/style-guide/core/icons/#google-material-icons).

##### JS

Place the following `<script>` near the end of your pages, right before the closing `</body>` tag, to enable them.

```html
<script src="/your-js-path/nj-components.js"></script>
```

#### Advanced usage

You can import the sources files from the `src/` directory. Feel free to use your asset builder (Webpack, gulp, grunt...)

##### SCSS

Import `nj.scss` file in your project.

`@import "~@engie-group/design-system-library/src/scss/nj";`

> **_Fonts path_**: In case you have to resolve the relative path to fonts files you can set the **$icon-font-path** variable or use **resolve-url-loader** with webpack.

Be sure to include the Google material font. See the documentation [here](https://design.engie.com/design-system/style-guide/core/icons/#google-material-icons).

##### JS

- Import the library in your project.

`import NJ from '@engie-group/design-system-library';`

- Initialize all components

Auto Init allows you to initialize all of the Design System Components with a single function call. It is important to note that you cannot pass in options using this method. 

``` javascript
document.addEventListener('DOMContentLoaded', function(event) {
  NJ.AutoInit();
});
```

- **OR** Initialise a single component

You can also individually initialize the components of your choice:
 
*NB*: Currently only the `alert` component has this option.

``` javascript
document.addEventListener('DOMContentLoaded', function(event) {
  NJ.Alert.init(alertElements);
});
```

### Troubleshooting

If you have any issues while getting set up with ENGIE Design System, please create an issue [here](https://github.tools.digital.engie.com/GBSEngieDigitalDesignSystem/design-system-library/issues).

---
_Source: https://npm.io/package/@engie-group/design-system-library · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
