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

caplink-saas-ui-shared-component-library

v1.21.0

Published

A shared UI component library for React projects from Caplink

Downloads

1,130

Readme

caplink-saas-ui-shared-component-library

This project is a shared component library for the Caplink SaaS UI. It is built using React and Storybook.

Installation

  1. Clone the repository
  2. Run npm install to install the dependencies
  3. Run npm run storybook to start the Storybook server

Usage

To use the components in your project, you can install the package from npm:

npm install @caplink/saas-ui-shared-component-library

Then import the components you need:

import { Button } from '@caplink/saas-ui-shared-component-library';

Development

Components

All the components are located in the 'component-library' folder. Each component should be in its own folder, with the component file and any other files it needs (like styles, tests, etc).

An expected component development workflow would be:

  1. Create a new folder for the component
  2. Create the component file (e.g. MyComponent.js)
  3. Create a story file (e.g. MyComponent.stories.js)
  4. Create a test file (e.g. MyComponent.spec.js)
  5. Create a style file (e.g. MyComponent.css) (if needed, we use tailwindcss for styles)
  6. If it's a complex component, create a Cypress test file (e.g. MyComponent.spec.js in the 'cypress' folder)

Folder structure

  • All the components are located in the '/component-library' folder.
  • Each component should be in its own folder, with the component file and any other files it needs (like styles, tests, etc).
  • Cypress tests are located in the 'cypress' folder and should follow the same folder structure as the components.

Storybook

We use Storybook to develop and test the components. To start the Storybook server, run:

npm run sb:dev
npm run sb:build

This will start the Storybook server and open a browser window with the Storybook UI. You can use this to develop and test the components.

This is the gallery of components that we use to develop and test the components. It's also used to generate the documentation for the components, so it's important to keep it up to date and encompassing relevant states and use cases within the stories.

Testing

We use multiple testing libraries to test our components. We use Jest for unit tests and Cypress for more complex integration tests that require a browser.

  • All unit tests are located in the same folder as the component they are testing. The file name should be the same as the component file name, but with a '.spec.xxx' suffix.
  • All Cypress tests are located in the 'cypress' folder.

Contributing

This is a project for the Caplink SaaS UI team. If you are a member of the team, you can contribute to this project by following the standard Git workflow:

  1. Create a new branch for your feature or bug fix
  2. Make your changes
  3. Push your branch to the remote repository
  4. Create a pull request

Developing components with tests is a requirement for contributing to this project.