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

hajimari

v0.1.74

Published

Hearth's design system + component library

Downloads

37

Readme

Netlify Status

Hajimari | Hearth Design System 🔗

Figma | Notion |

hajimari (始まり) /.n/ -- beginnings

This repository maintains the component library for Hearth's web (and eventually mobile) app and overall style guide. Hajimari is built following atomic design system guidelines.

Made with ❤️ with npm and react typescript, leveraging MUI for creating and styling components. We use rollup to bundle our JS modules. (Configured with the help of this handy-dandy article about publishing react component libraries)


Getting started

Material UI v5 React v17 @emotion/react TypeScript v4+

Clone this repository with SSH:

git clone [email protected]:shogun-hearth/hajimari.git

Install dependencies:

npm install

Workflows

The recommended workflow is to work within Storybook to build a component:

npm run storybook

(This loads the stories from ./src/components. A tab should automatically open with Storybook running, but if it doesn't, navigate to localhost:6006)

Contributing Guidelines

Named exports for all components that we want to surface as a part of the npm package--this includes the component itself, as well as any interfaces or props that we would like to export as well.

Use existing component folder structures when creating new components and use the provided template Template.stories.mdx to build a component's story.

Q: Where do new components and stories go?
A: Every new component should live within its own folder, where it is the default export from that folder. The story file lives within the same folder as ComponentName.stories.mdx. In the case of more complex documentation, we can write component stories within ComponentName.stories.tsx, and then use those within MDX documentation. For example, the Card component looks like:

Card
  |__Card.tsx
  |__index.ts
  |__Card.stories.tsx
  |__Card.stories.mdx

Q: What should a new component look like?
A: Beyond exporting the actual component, we also want to export the Props that relate to it. Some prop requirements:

  • Reasonable names, so we someone might be able to tell what it's for right away
  • A comment above each prop describing its purpose and any other useful notes
  • When appropriate, ensure you are extending the existing props of a MUI component you use, so that we can forward props from MUI as well

If this component is an Atom or Molecule, it should be written using syntax that follows the styled() API, as this is the MUI recommended approach for "lower level" components. For larger / more complex components, we can use a combination of the styled() API and the sx prop.

Q: What should a new story look like?

A: Use the provided Template.stories.mdx to create new stories. What's listed in this file is what a story should include at a minimum; more interactivity (or information) is great too!

The title prop determines where in the folder hierarchy a story appears: it should follow a naming convention of Component level > Component Name > Variant. For example:

title: 'Atoms/Button/Outlined Button'

Q: I need to install a new package!
A: There are two kinds of packages we could use here, which are either for using within Storybook or for a component.

  1. For Storybook, there are a good amount of libraries installed for our purposes, but we can add them pretty freely.
  2. For the actual component library, we want to avoid importing too many external libraries--so only add one if we really, really need to.

IMPORTANT: In both cases, libraries should be installed as devDependencies in order to avoid dependency issues later.

npm i --save-dev <package name>

Design Tokens 101

(TBA)


Resources


Bookkeeping

Continuous Integration

Deployed to Netlify on pushing to the main branch.

TODO / Ongoing progress

  1. Converting components not written this way to be written using the styled() API that wraps emotion, which is the MUI-recommended approach.

  2. Setting up Jest in order to implement some basic unit tests, at least to start.