npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@cdssnc/gcds-components

v0.30.0

Published

Web components for the GCDS

Downloads

1,883

Readme

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).