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

bi-web-components

v0.1.534

Published

Designsystem for BI implemented using figma variables and web components

Downloads

4,255

Readme

Built With Stencil

BI Web components

This is a proof of concept library that illustrates how one can use web components in combination with Figma tokens to implement a design system.

Getting started

In your head-section in your html, just paste the following script:

<script type="module" src="https://cdn.jsdelivr.net/npm/bi-web-components@latest/dist/bi-web-components/bi-web-components.esm.js"></script>

this will make all components available in your project.

Components

There are several components available, see all here.

Frameworks

This component library is made using stencil js, which easily allows transforming web components to other frameworks such as react. See our library for react here.

Developer Guidelines

Pull Requests

  • Stories should be included. If it does not exist, create one. If it exists, make sure your updates to the component are reflected in Storybook.

Code style

We want:

  • Install Prettier extension to VSCode and make it format code on save.
    • https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode
  • Use colors helpers where it makes sense.
  • Use color names from the design system.
  • Add space props to the component if it is not already there.
  • Types and interfaces should be Capitalized. Const and functions should be camelCased.
  • Create types that can be reused other places. Ex: Sizes, Colors, Spacing etc.
  • Bonus: Add doc strings to component props.

Avoids:

  • Avoid abbreviations.
  • Avoid using HTML Id (#) property if possible. If used, it should always be passed as a component prop, and never hard coded.
  • Avoid using !important when writing CSS.

Stories

  • All the components should lie in the stories/Component Library
  • Use the command npm run create-story <NAME OF COMPONENT> in /packages/lib/ to create a story and parent folder using a template.
  • Use folders to contain the different files related to a story. Keep it clean.
  • If the component you're writing a story for has a figma sketch, please add it to the <NAME OF COMPONENT>.stories.ts file, for an example see the story for BiButton

How to run Storybook locally

First run npm run start-sb which watches files during development and triggers a rebuild when files are updated. Then, in a second tab, run npm run storybook to run Storybook which opens a new tab in your browser at http://localhost:6006/.

Now, updates you make in the components locally will reflect in the Storybook immediately.