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

gumdrops

v1.17.6

Published

GumGum's React Components Library

Downloads

119

Readme

Gumdrops

This project contains reusable JavaScript React components that you can import into your project.

npm version License: MIT Build Status

Prerequisites

Gumdrops must be used with the GumGum Design System (Concrete), which handles all of the styles, as well as Sass.

Add gumgum-design and sass to your project.

See the Concrete Design System documentation for themes, CSS utilities and more.

Documentation

See the documentation for this library and its components.

Installation

To add a specific version, you can use yarn add [email protected] (replace 1.0.0 with whatever version you want, or omit it to get the latest version)

The current and previous versions can be found in CHANGELOG.md

Usage

The library exports its components as ES Modules, so you can import only what you need, for example:

import Button from 'gumdrops/Button';
import Badge from 'gumdrops/Badge';
import Toggle from 'gumdrops/Toggle';

Follow the docs to use your component with the correct props.

For retrocompatibility, a CommonJS bundle is provided. It contains the whole library and can be used with:

const gumdrops = require('gumdrops');
// Or
import gumdrops from 'gumdrops';

For convenience and usage directly in the browser, there is also a UMD provided in:

node_modules/gumdrops/gumdrops.umd.js

Testing troubleshooting

Unfortunately, ESM is not yet widely available for some current tools, and running tests using components from this library could throw errors because of the ES module syntax. To prevent this, try the following:

  • For Jest: Jest uses its own implementation of require and will attempt to parse files with it and babel-jest, by default, it ignores node_modules which will result in syntax errors from the import statements. Add the next line to your jest config so that it ignores everything in node_modules, except for this library:

    "transformIgnorePatterns": ["/node_modules/(?!gumdrops)"]
  • For Mocha + Webpack: It is very likely that your mocha and webpack configurations also ignore the node_modules directory, to prevent any syntax errors, load babel through a configuration file instead of calling --compilers js:babel-register or --require babel-register directly.

The file contents can be as simple as:

// testSetup.js
require('babel-register')({
    ignore: /node_modules\/(?!gumdrops)/
});

// Import it into mocha or mocha-webpack:
--require ./testSetup.js

Prerequisites for running project locally

  • Git and Git Flow
  • NodeJS/NPM & Yarn: Minimum Required Versions - We have tested with the following versions - node: ^16.16.0, npm: ^5.5.1, yarn ^1.2.1
  • Install the ESLint validators and Prettier on your editor of choice. We have the configuration files on the root of the project, .eslinrc and .prettierrc. There is a precommit hook to run the Prettier scripts on the files.

Running storybook locally

yarn # install dependencies
yarn run storybook

Then open http://localhost:6006 on your browser. For more information visit React Storybook repo.

Contributing

Please see CONTRIBUTING.md for information about contributing to this project.

Contributors

A special thank you to all of our contributors! Plus the following who contributed before we moved to GitHub: David Mejorado, Jose Santos, Mike Watt

License

Apache 2.0

Important Note: This project does not redistribute third party libraries but identifies their availability. The libraries called by this project are subject to their creator licenses. Remember to consult and comply with all licenses in your uses.