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

@janus.team/janus-particles

v6.0.9

Published

react components & styles for fanatical interfaces

Downloads

839

Readme

janus-particles

MS Teams

react components & styles for fanatical interfaces https://particles.janus.team/

In Depth docs:

Readme Contents:

Missing Something? Something Broken?

Please create an issue and let us know.

We will use issues as a way to track things found by ourselves and by others and eventually convert those into cards to be worked on for our backlog.

Of course you're also welcome to submit a PR and make the changes yourself.

Semantic Versioning

janus-particles adheres to the usual semver guidelines:

  • major version bumps for (most - except previously announced deprecation cases) breaking changes.
  • minor version bumps for new features or significant improvements or (some - previously announced deprecation) breaking changes.
  • revision version bumps for bugfixes or small improvements.

Pre/Alpha/Beta/RC releases

janus-particles does not officially support nor endorse the usage of any non-final releases. By non-final release we mean anything with a - suffix in the version number (e.g.: 5.0.0-alpha001).

We internally do use extensively releases with -rc/alpha/beta/pre suffixes for the purposes of extensive testing, but we do not recommend ever using any of those in a production environment, nor to rely that anything in any such release will ever stay the same in the final release.

Quick Start

Install with npm or yarn

npm i @janus.team/janus-particles
# or
yarn add @janus.team/janus-particles

Peer dependencies

yarn add\
  @janus.team/janus-particles@^4.16\
  @janus.team/janus-copilot@^3.1.1\
  @formatjs/intl-pluralrules\
  @formatjs/intl-relativetimeformat@^4.4.0\
  @sentry/browser@^5.7.1\
  @tippy.js/react@^3.1.1\
  classnames@^2.2.5\
  crypto@^1.0.1\
  downshift@^3.2.10\
  font-awesome@^4.7.0\
  intl\
  intl-format-cache@^4.2.2\
  intl-locales-supported\
  intl-messageformat-parser@^3.2.1\
  intl-messageformat@^7.3.2\
  js-cookie@^2.2.0\
  lodash@^4.17.11\
  moment-timezone@^0.5.21\
  moment@^2.18.1\
  object-assign@^4.1.1\
  prop-types@^15.5.10\
  qs@^6.7.0\
  react-datetime@^2.11.1\
  react-intl@^3.3.2\
  react-router-dom@^4.3.1\
  react-tippy@^1.2.3\
  uuid@^3.3.2\
  verror@^1.10.0\
  victory@^0.24.1

# yes, this is a lot - sorry. we are not happy about it either : (

Usage

Javascript

import { Button } from '@janus.team/janus-particles';

<Button onClick={...}>
  Press Me
</Button>
...

CSS

Add the particles css to your build.

import 'font-awesome/css/font-awesome.css';
import 'react-tippy/dist/tippy.css';
import '@janus.team/janus-particles/dist/particles.css';

Jest

You need [email protected] (at least).

Add this to your package.json:

"jest": {
  "transformIgnorePatterns": [
    "(?!.*janus.*)(?!.*@babel/runtime.*)node_modules"
  ]
}

Documentation

Complete docs available in the particles storybook.

Where are prop tables and story source code?!

As of version 5.0.0 we made the hard decision to no longer support those features (in that format at least). There has been an extensive set of problems with the @storybook/addon-info that powers both of those pieces and we decided to no longer use it.

The good news, however, is that the storybook team itself agrees that a better approach was necessary and have started to rollout @storybook/addon-docs that should cover both source code for stories and prop tables in a more sane way. We envision particles making heavy use of these new features in the near future (backfilling docs for old components) and using it as the default for new development.

We ask for your understanding and patience in this transition period, and meanwhile we suggest reading the source as a stopgap measure to understand how the code behind a story looks or to read comments around props in a component.

Vision

This project aims to help scale the development of Janus frontend applications through the use of reusable and self contained react components.

  • This is a single, centralized place to share our teams' frontend development best practices.
  • Including particles in your app should never interfere with any other styles or behavior, it is meant to be consumed by real world production applications without disrupting anything around it. All styles are opt-in by design and components are independent.
  • This aims to provid a reduced the time to ship new features, through:
    • documentation for components
    • copy/paste examples
    • versioned components
    • clarification around approaches to state management

Particles vs Helix

  • the Helix design is the look and feel for Rackspace, any discrepancy from it in particles will be considered as a bug unless explicitly listed in the known divergences doc.
  • if something in particles looks different than helix, here are your (non-mutually-exclusive) options:
    • ask around in #janus-ux and/or #rss-eng.
    • change your code with extra CSS to match helix.
    • open a PR to particles to change it to match helix.
    • open an issue to particles to ask for changes to match helix.
    • open a PR to particles to add to the known list of divergences if you think that particles is more correct.
    • talk to the helix team in #helix if you think helix itself should change.
  • the helix ui toolkit is a particular implementation of the helix design system and can be seen as an alternative (less janus opinionated) to particles. We strongly disencourage using both the helix toolkit and particles in the same project.

You can read a lot more about it here if you want an extensive description about this history.

Success Measurements

  • Pages look and feel the same accross multiple Janus UIs, be it the legacy janus-ui or any micro/mini UIs developed under the Janus UI Platform.
  • Potential expansion outside of the Janus tribe (e.g.: RSS org).
  • Alignment with the look and feel of the helix design framework.

Local Development

Install yarn

  • Install lib dependencies with yarn install
  • Run tests with yarn test (if you have an issue on OSX Sierra+ with watchman, try brew install watchman)
  • Lint with yarn lint
  • Build components with yarn build

Preview Documentation

Storybook

We use react storybook to document components. To launch the local development server, run:

yarn start

Table of Contents

The table of contents found at the root of our documentation site is built with create-react-app. To preview this locally, run:

cd docs
yarn start

Then visit localhost:3000 on your browser of choice.

Export documentation

You can export the documentation site to a static build with:

yarn run build:docs

To build older versions of documentation, update docs/versions.json with the tagged versions to build. Then run yarn build:doc-versions. To publish these versions to S3, grab the AWS credentials for the environments dev and prod. You can deploy to the desired enviroment via: yarn publish:doc-versions <env>. Example deploy to dev: yarn publish:doc-versions dev.

During build in jenkins, docs are automatically published:

Feedback

Check us out on slack at #janus-ux and/or #rss-eng.