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

shui-components-bhabani

v1.0.0

Published

Beginning of the core component library, following the [SHUI Style Guide](https://www.gitbook.com/read/book/shui/shui-styleguide?key=1864-2301-6763). It's a selection of self-contained Web Components, ready to be used standalone or integrated in any JS li

Downloads

9

Readme

SHUI Web Components

Beginning of the core component library, following the SHUI Style Guide. It's a selection of self-contained Web Components, ready to be used standalone or integrated in any JS library/framework that is able to render into the DOM.

Use it for prototyping and (in the future) in production.

List of components

Why web components?

Web components lets us encapsulate opinionated HTML/CSS/JS into standardized HTML elements. This allows different approaches to developing common components, while offering a familiar way of using them. As it is a standard W3 specification, it requires no dependency management in order to render the components. Once included, it just works.

Reading material:

Desktop vs. Touch

Components are aware of the device context, which means the same ones can be used on desktop or touch devices. We want to make sure the core of the component is shared and build whatever adaptations are needed directly into it.

Installation

NPM module

The library can be installed as a dependency through NPM.

npm install @ideo/shui-components --save

Then include it into your pipeline:

// ES6
import '@ideo/shui-components';
import '@ideo/shui-components/shui-components.css';

or

// ES5
require('@ideo/shui-components');
require('@ideo/shui-components/shui-components.css');

or

<!-- HTML -->
<script src="/node_modules/@ideo/shui-components/shui-components.js"></script>
<link rel="stylesheet" type="text/css" href="/node_modules/@ideo/shui-components/shui-components.css">

or even some other way. Whatever you prefer.

Standalone

Find the library files in /dist folder and include them like you see in examples above. Make sure to update the path so it points to the correct files.

Usage

Components get defined as HTML Custom elements as soon as the library loads. Now you should be able to use it in the <body> of your HTML file, or within the DOM rendering function of your frontend framework of choice. If you know HTML, the syntax should look familiar:

<sh-component-name attr="value">Children</sh-component-name>

Development

To serve public/index.html, start the development server:

$ npm start

Structure

src
└─── sh-component-name
      └─── src
      │     └─── sh-component-name.css
      │     └─── sh-component-name.js
      └─── example
      │     └─── sh-component-name.html
      └─── tests
            └─── TBD
      └─── README.md
└─── ...

Templates

We've created a React-flavored web component template for developing new components. To create a component that encapsulates another technology, create another template by using this one as a base.

Testing

To do.

Building

$ npm run build

Publishing

To build the production library, deploy examples, update the version and publish the package on NPM, run:

$ npm run publish

Browser support

Out of the box we support all modern browsers (Chrome, Firefox, Safari, Edge). It should work in IE11 too, however there is no guarantee it will render properly.

Components are packaged as Web components following the Custom Elements v1 (check support) specification. It has become very stable recently and is currently heavily supported by the Google Chrome team.

In case the browser you are targeting is not yet supported, consider including these polyfills.

NOTE: Currently the library comes bundled with webcomponents-hi-ce polyfill. This will probably be removed in the future.