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

@citizensadvice/cads

v1.0.3

Published

| Name | Type | Version | |------------------------|------|------------------------------------------------------------------------| | `@citizensadvice/cads` | Meta | ![npm (

Downloads

15

Readme

Citizens Advice Design System

| Name | Type | Version | |------------------------|------|------------------------------------------------------------------------| | @citizensadvice/cads | Meta | npm (scoped) |

Dependencies

| Name | Description | |--------------------------------|--------------------------------------------------------------| | @citizensadvice/core | Key packages for cads, DOES NOT include the components. | | @citizensadvice/typography | Typography packages that are key to stying text. | | @citizensadvice/forms | Form packages that are fundamental to form styling | | @citizensadvice/rich-content | A package to allow rich content to utilise cads type styling |

Installation

Using your package manager of choice...

$ npm install @citizensadvice/cads

Then bring into your stylesheets with...

@import "@citizensadvice/cads/index.scss";

OR

You can make use of the unpkg service, try adding the link below to the head of your HTML file.

<link src="https://unpkg.com/@citizensadvice/cads@latest/build/cads.css" />

Introduction

This is a meta package that contains all packages within the Citizens Advice Design System.

From the perspective of a developer building a product/service using the Citizens Advice Design System, you'll need to understand that we split our code into two concepts.

Utilities

Utilties provide the building blocks for common layout and styling, to avoid writing custom classes. They adhere to the "Single Responsibility Principle" theory that states that every module, class or function should have one responsibility and that the responsibility should be entirely encapsulated by the class.

utilities
├── background-colors
├── background-position
├── background-size
├── border-colors
├── border-radius
├── border-style
├── border-width
├── borders
├── box-sizing
├── cursor
├── display
├── flexbox
├── floats
├── focus
├── font-family
├── font-size
├── font-style
├── font-weight
├── gutters
├── heights
├── hovers
├── letter-spacing
├── line-height
├── line-limit
├── margins
├── outlines
├── overflow
├── padding
├── positioning
├── text-align
├── text-colors
├── text-decoration
├── widths
└── z-index

Components

These can be either:

  • made of a series of utility classes,
  • or a custom class that encapsulates the component properties.
components
├── buttons
├── links
├── lists
├── rich-content
├── radios-checkboxes
├── selects
├── text-inputs
├── typesetting
└── validation

Design system maintenance

If you're a developer maintaining the Design System repo then there are a few things worth noting.

All packages are seperated out to make it easier to create smaller CSS bundle sizes when releasing code into a production environment. To make it easier on developers we have a few different types of package to help with making the decision of where to put new code.

| Package type | Description | Examples | |--------------|-----------------------------------|------------------------------| | Meta | Groups other packages together | forms, core, etc | | Foundation | Some configuration or scaffolding | support, normalize | | Utility | A single resposiblity package | box-sizing, padding, etc | | Module | An isolated package | buttons, selects, etc |