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

@holidayextras/ui-toolkit

v3.4.4

Published

UI Toolkit

Downloads

49

Readme

Build Status Build Status Dependency Status Coverage Status

Under Active Development

Requirements:

UI Toolkit Usage

All the available UI Toolkit Components are to be listed in the dist/index.js so they can be accessed via:

var UIToolkit = require('ui-toolkit');

// Custom Components
<UIToolkit.Button />
<UIToolkit.Flag />
<UIToolkit.Rating />
<UIToolkit.Reviews />
<UIToolkit.Tile />
<UIToolkit.Image />
<UIToolkit.Input />

If you would like to cherry pick which components to include in your project, you can use this method:

var Button = require('ui-toolkit').Button;
<Button />

please note this still includes the entire ui-toolkit

Install for development

To install ui-toolkit locally for development:

git clone [email protected]:holidayextras/ui-toolkit.git
cd ui-toolkit
npm install

Troubleshooting

If you have any problems installing the ui-toolkit then please view the troubleshooting guide which contains common errors and solutions. If you cannot find your specific problem then please create a github issue

Adding a new component

Creating the component

Generate a component & follow the prompts

cd src/components
mkdir your-new-component
cd your-new-component

Then require this file in dist/index.js

// dist/index.js
UIToolkit.YourNewComponent = require('./components/your-new-component');

Adding functionality

Add the functionality to your component in your-new-component/your-new-component.jsx.

Adding styles

The styles are currently written in LESS and live in the component directory.

You will need to create a new file for your component

cd src/less
touch _your-new-component.less
open _your-new-component.less

Then import this file in src/less/toolkit.less

// src/less/toolkit.less
@import "_your-new-component";

Running grunt less will compile this to dist/toolkit.css

Viewing your component in the browser

There are two ways you can view your component:

  1. In the documentation
  2. Standalone (currently doesn't bring in ui-toolkit styles)
In the documentation

Note: This needs to and will be be simplified

  1. In ./docs/examples/, create a new jsx file that describes your component. e.g.
// docs/examples/YourNewComponent.jsx
var example = (
  <UIToolkit.YourNewComponent foo="bar" />
);
ReactDOM.render(example, mountNode);
  1. Then add a link to the navigation in .docs/src/Nav.jsx.
  2. In ./docs/src/Components.jsx, add a new <article>, similar to the existing ones e.g.
<article>
  <h3 id="your-new-component">Your new component</h3>
  <p>Your new component description</p>
  <CustomComponent codeText={fs.readFileSync(__dirname + '/../examples/YourNewComponent.jsx', 'utf8')} />
</article>
  1. You should now be able to see your component when running npm run docs from the root of ui-toolkit
Standalone (currently doesn't bring in ui-toolkit styles)
cd src/components/your-new-component
npm run build-dev

Browserify bundles from the dev/example.jsx. Loading the dev/index.html in your browser will display the component.

UI Toolkit Themes

A collection of custom themes for UI Toolkit are coming soon.

Component Documentation

You can view the React Components in your browser by generating and viewing the docs:

Run & watch the documentation in development:

npm run docs

Building so you can upload to a remote docs server that does not require Node:

grunt docs-build

You will only need to upload the following static assets once generated:

  • assets/
  • vendor/
  • index.html

Creating a release:

To create a new release of the ui-toolkit you need to bump the version number in the package.json file, once you PR is merged in this will create a new release on github and push the changes to aws automatically. You will then have to manually publish the changes to npm. This procedure is the same for both minor and major releases.