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

@ukho/design-system

v4.7.1

Published

Angular components library for the UKHO Design System

Downloads

48

Readme

UKHO Design System

Design System CI Design System Version

This repository contains the source for the UKHO's design system, our library of UI components that is used in our front end designs.

Getting Started - Angular

Prerequisites

Installation

  1. For new projects create a brand new angular app following instructions here
  2. Add design system dependencies to your app using npm or yarn
npm install @angular/cdk @fortawesome/fontawesome-free
yarn add @angular/cdk @fortawesome/fontawesome-free
  1. Add design system to your app using npm or yarn
npm install @ukho/design-system
yarn add @ukho/design-system
  1. Add design system stylesheet globally in your app
// styles.scss
...
@use '~@fortawesome/fontawesome-free/scss/fontawesome';
@use '~@fortawesome/fontawesome-free/scss/solid';
@use '~@fortawesome/fontawesome-free/scss/brands';
@use '~@ukho/design-system/styles/core.scss';
  1. Add design system assets to your app
// angular.json
...
"assets": [
     ... // Import your other assets as normal
     {
       "glob": "**/*",
       "input": "./node_modules/@ukho/design-system/assets",
       "output": "./assets"
     }
   ],

You are now ready to use the design system!

Usage

Below is an example of how to import the button module into your application.

  1. Import modules as you need them
// app.module.ts
...
import { ButtonModule } from "@ukho/design-system";
...

@NgModule({
  imports: [..., ButtonModule]
})
  1. Add component selector to html
<!--app.component.html-->
<ukho-button>Hello Button</ukho-button>

Assets

By importing the assets from the design system following the instructions listed in the installation section you should have access to all the assets e.g. logos. Components that require logos all have the default paths set however there are occasions that these need to be overridden. If you have not changed the default assets path they should be available on the path: /assets/sub-folder/asset.file. e.g. /assets/svg/UKHO stacked logo.svg

Getting Started - CDN

We understand that not everyone can use angular when building their projects, so we offer a CSS only alternative which encompasses all of the styles in the design system.

Prerequisites

  1. Add the fontawesome stylesheet to your html
<head>
  <link href="/your-path-to-fontawesome/css/all.css" rel="stylesheet" />
  <!--load all styles -->
</head>

Installation

  1. Add the design system stylesheet to your html
<head>
  <!-- fontawesome styles -->
  <link href="https://unpkg.com/@ukho/design-system@latest/styles/css/ukho.min.css" rel="stylesheet" />
  <!--load all styles -->
</head>

We recommend pinning the version of the css that you are using to avoid be automatically pulling breaking changes. To do this instead of using @latest, use @{npm package version} instead. e.g @2.0.0.

Usage

Below is an example of how to add a button into your website.

  1. Navigate to the design system show case site and locate the component you wish use

  2. Add that snippet your html

<ukho-button><button>Hello button!</button></ukho-button>

Contributing

If you would like to contribute to the design system please read the CONTRIBUTING File.