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

@legalforcelawrapc/tm-component-library

v1.1.36

Published

Trademarkia's UI Component Library for cross project visual consistency and ease of development.

Downloads

86

Readme

Trademarkia-Component-Library

Component library for Trademarkia and its projects.

Important Links

Usage Instructions

  1. Add package to your project using
    yarn add @legalforcelawrapc/tm-component-library
  2. import styles by adding this line to your src/tailwind.config.js file in content like. path.join(path.dirname(require.resolve('@legalforcelawrapc/tm-component-library')), '**/*.{js,ts,jsx,tsx}')
  3. Import any component normally
    import { Button } from '@legalforcelawrapc/tm-component-library'

Local Dev Instructions

In the component library root

  1. Install all dependencies.
    yarn
  2. Create local package.
    yarn run rollup
  3. Make package importable.
    yarn link

In the Project, where you want to use the package

  1. Link package to project.
    yarn link "@legalforcelawrapc/tm-component-library"
  2. import styles by adding this line to your src/tailwind.config.js file in content like. path.join(path.dirname(require.resolve('@legalforcelawrapc/tm-component-library')), '**/*.{js,ts,jsx,tsx}')
  3. Simply import any component with
    import { Button } from '@legalforcelawrapc/tm-component-library'
  4. Run your development server.

Note: If you get an error like useState not defined then follow the below steps

  1. go to your {project root}/node_modules/react and run yarn link.
  2. go to your local installation of {component library root} and run yarn link react.

Update/Modify package

  1. Make changes to your package.
  2. Run yarn run generate-barrels to create exports from all subdirs.
  3. Run yarn run rollup.
  4. Changes will be reflect in your project where you are importing it.

Publish package

  1. Login to npm registry. npm login
  2. Publish npm publish
  3. Authenticate your account and done!

Storybook v7

This package supports storybook v7, so it is necessary to make a Story once a new component is added to the library.

  • Refer below to know how to write stories.
    https://storybook.js.org/docs/7.0/react/writing-stories/introduction
  • Run Storybook yarn run storybook and then visit https://localhost:6006.

Convention

  • The project using this package is expected to have these colors defined in tailwind.config.js.
States

default
    |-primary
    |-- DEFAULT
    |-- 200, 300, 400, 500, 600, 700, 800
    |-secondary
    |-- DEFAULT
    |-- 200, 300, 400, 500, 600, 700, 800
base-color
disabled
    |-disabled-gray  was tm-gray-100
    |-disabled-gray-300 for borders, was tm-gray-300
borders
    |-default-gray
    |-default black
    |-default-black
  • In addition to these, package supports all tailwind default colors.