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

@fagforbundet/ngx-components

v16.0.0

Published

Angular components and global styles

Downloads

2,146

Readme

@fagforbundet/ngx-components

This package makes available the components and global styles needed for most of Fagforbundet's projects.

Styles

Global styles should be made available with classes where feasible (i.e. .ff-checkbox, .ff-button, .ff-dropdown, etc.). The class name combined with the ff- prefix ensures the availability of styles, while also ensuring low probability of hijacking any elements or other styles.

The styles folder contains these folders:

  • abstracts -> Contains styles and variables for design tokens and other things that normally won't affect anything directly
  • base -> Contains a file containing style references for everything one might need when adding the library to a project. Next to this file one can also find some barrel import files for cleanliness
  • components -> Contains styles for design components (i.e. checkbox, button, dropdown, etc.)
  • layouts -> Contains styles for layouts. These are often containers for different scenarios (i.e. page layouts, grids, misc. containers, etc. (not component specific layouts (i.e. menu-boxes)))
  • utilities -> Contains utility styles (i.e. outlines, skeletons, etc.)
  • vendor -> Contains references / imports of styles from vendors that the package depends on

The _index.scss file imports and forwards all relevant styles for use in other projects. To make the variables and mixins available in your application, @use the package:

@use '@fagforbundet/ngx-components' as ff;

To make the global styles (classes) available in your application @include the base mixin:

@use '@fagforbundet/ngx-components' as ff;

@include ff.base();

Variables

This package makes available variables for common design tokens. All variables are prefixed with ff-, and semantic variables are also prefixed with something that denotes the context (i.e. border-clr- or btn-clr-);

Component styles

Component specific styles should "live" in the component's own stylesheet, so that the component becomes self-contained. If the component requires the styles of any external package, these styles should be added to the _vendor.scss file to avoid including the same styles more than once. Two or more components should never require different versions of the same external package.

Fonts

Font files are present in this project for anyone who might need them, but Google Fonts serve them as well.

HTML

<link href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@400;600;700&display=swap" rel="stylesheet">

CSS

@import url('https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@400;600;700&display=swap');

Components

This package also includes all the common components needed to make any interface that Fagforbundet might need. In addition, there are a couple of so-called "bundles", used for common tasks. The bundles are:

  • Auth Bundle -> used for everything related to authenticating with the frontend
  • Helpers Bundle -> contains helpers for miscellaneous
  • Request Bundle -> consolidates the way requests are defined and used
  • Storage Bundle -> consolidates data storage in the browser and in memory