0.26.3 • Published 2 months ago

@cdssnc/gcds-components v0.26.3

Weekly downloads
-
License
MIT
Repository
-
Last release
2 months ago

La version française suit.

GC Design System Components

GC Design System Components are encapsulated reusable custom elements to use within your web sites/apps built using the GC Design System Tokens.

Documentation

You can find the full documentation for GC Design System Components on https://design-system.alpha.canada.ca/.

Installation

Install from npm

npm install @cdssnc/gcds-components

Install with CDN

Place the following code in the <head> element of your site. All gcds-components should now be ready to use in your site.

<!-- Icons Font Awesome (to access icons, import Font Awesome) -->
<link
  rel="stylesheet"
  href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css"
  crossorigin="anonymous"
/>

<!-- GC Design System -->
<link
  rel="stylesheet"
  href="https://cdn.design-system.alpha.canada.ca/@cdssnc/gcds-components@latest/dist/gcds/gcds.css"
/>
<script
  type="module"
  src="https://cdn.design-system.alpha.canada.ca/@cdssnc/gcds-components@latest/dist/gcds/gcds.esm.js"
></script>
<script
  nomodule
  src="https://cdn.design-system.alpha.canada.ca/@cdssnc/gcds-components@latest/dist/gcds/gcds.js"
></script>

Note: <script type="module"> requires a server to load properly, if developing locally, please use <script nomodule>.

Supported frameworks

The gcds-component library works in multiple frameworks.

Javascript

Place the following code in the <head> element of your site.

<!-- Icons Font Awesome (to access icons, import Font Awesome) -->
<link
  rel="stylesheet"
  href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css"
  crossorigin="anonymous"
/>

<!-- GC Design System -->
<link
  rel="stylesheet"
  href="/node_modules/@cdssnc/gcds-components/dist/gcds/gcds.css"
/>
<script
  type="module"
  src="/node_modules/@cdssnc/gcds-components/dist/gcds/gcds.esm.js"
></script>
<script
  nomodule
  src="/node_modules/@cdssnc/gcds-components/dist/gcds/gcds.js"
></script>

All gcds-components should now be ready to use in your site.

React

Please reference GC Design System Components – React

Angular

Please reference GC Design System Components – Angular

Vue

Place the following code in the main.js file of your app.

import {
  applyPolyfills,
  defineCustomElements,
} from '@cdssnc/gcds-components/loader';
import '@cdssnc/gcds-components/dist/gcds/gcds.css';

applyPolyfills().then(() => {
  defineCustomElements();
});

All gcds-components should now be ready to use in your Vue app.

How to contribute

If you are interested in contributing to GC Design System Components, please read our contributing guidelines.

License

Code released under the MIT License.


Composants de Système de design GC

Composants de Système de design GC fournit des éléments personnalisables, encapsulés et réutilisables. Ils peuvent être employés dans vos sites et applications Web créés à l’aide des unités de style de Système de design GC.

Documentation

Toute la documentation sur les composants de Système de design GC est accessible à l’adresse https://systeme-design.alpha.canada.ca/.

Installation

Installer le paquet avec npm

npm install @cdssnc/gcds-components

Installer le paquet avec CDN

Insérez le code qui suit à l'intérieur de la balise <head> de votre site.

Vous devriez maintenant pouvoir utiliser tous les composants de gcds-components sur votre site.

<!-- Icons Font Awesome (pour avoir accès aux icônes, installer Font Awesome) -->
<link
  rel="stylesheet"
  href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css"
  crossorigin="anonymous"
/>

<!-- GC Système de design -->
<link
  rel="stylesheet"
  href="https://cdn.design-system.alpha.canada.ca/@cdssnc/gcds-components@latest/dist/gcds/gcds.css"
/>
<script
  type="module"
  src="https://cdn.design-system.alpha.canada.ca/@cdssnc/gcds-components@latest/dist/gcds/gcds.esm.js"
></script>
<script
  nomodule
  src="https://cdn.design-system.alpha.canada.ca/@cdssnc/gcds-components@latest/dist/gcds/gcds.js"
></script>

Remarque : Il faut un serveur pour que <script type="module"> se charge correctement. Si vous développez localement, utilisez plutôt <script nomodule>.

Cadres d'application pris en charge

La bibliothèque gcds-components fonctionne sous plusieurs cadres d'application.

JavaScript

Insérez le code qui suit à l'intérieur de la balise <head> de votre site.

<!-- Icons Font Awesome (pour avoir accès aux icônes, installer Font Awesome) -->
<link
  rel="stylesheet"
  href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css"
  crossorigin="anonymous"
/>

<!-- GC Système de design -->
<link
  rel="stylesheet"
  href="/node_modules/gcds-components/dist/gcds/gcds.css"
/>
<script type="module" src="/components/dist/gcds/gcds.esm.js"></script>
<script nomodule src="/components/dist/gcds/gcds.js"></script>

Vous devriez maintenant pouvoir utiliser tous les composants de gcds-components sur votre site.

React

Veuillez faire référence Composants de Système de design GC – React

Angular

Veuillez faire référence Composants de Système de design GC – Angular

Vue

Insérez le code qui suit dans le fichier main.js de votre application.

import { applyPolyfills, defineCustomElements } from 'gcds-components/loader';
import 'gcds-components/dist/gcds/gcds.css';

applyPolyfills().then(() => {
  defineCustomElements();
});

Vous devriez maintenant pouvoir utiliser tous les composants de gcds-components dans votre application Vue.

Apportez votre contribution

Si vous souhaitez contribuer aux unités de style de Système de design GC, veuillez lire nos lignes directrices sur la contribution.

Licence

Code publié en vertu de la licence MIT (en anglais).

0.26.3

2 months ago

0.26.2

3 months ago

0.26.1

3 months ago

0.26.0

3 months ago

0.25.1

4 months ago

0.22.4

5 months ago

0.25.0

4 months ago

0.24.1

4 months ago

0.22.3

5 months ago

0.24.0

5 months ago

0.22.2

6 months ago

0.23.0

5 months ago

0.22.1

7 months ago

0.22.0

7 months ago

0.21.0

8 months ago

0.20.0

9 months ago

0.19.0

10 months ago

0.19.1

10 months ago

0.18.1

12 months ago

0.18.0

12 months ago

0.17.1

1 year ago

0.11.0

1 year ago

0.12.0

1 year ago

0.13.0

1 year ago

0.12.1

1 year ago

0.14.0

1 year ago

0.15.0

1 year ago

0.16.0

1 year ago

0.17.0

1 year ago

0.10.3

2 years ago

0.10.0

2 years ago

0.10.1

2 years ago

0.10.2

2 years ago

0.9.4

2 years ago

0.9.3

2 years ago

0.9.2

2 years ago

0.9.1

2 years ago

0.9.0

2 years ago