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

@mcf/lib-ui

v2.4.54

Published

User Interface (UI) components for use in the MCF project.

Downloads

776

Readme

MCF UI Components

User Interface (UI) components for use in the MCF project.

WIP: we're working on open-sourcing this!

View the Storybook here: https://wog.sgts.gitlab-dedicated.site/wsg/mycareersfuture/wsg-mycareersfuture/lib-ui/

Usage

Install this package through NPM:

# for NPM
npm i @mcf/lib-ui tachyons

Call it from your code with:

import {...} from '@mcf/lib-ui';

Where ... is the component name.

You also need to load or import tachyons once somewhere in your project.

import 'tachyons/src/tachyons.css';

You eventually need to import the default style provided once somewhere in your project

import '@mcf/lib-ui/dist/main.css';

This step is optional. You can provide your own style using CSS variables. Using CSS variables make it easy to configure yourself the style of your components at the application level or at a component level.

List of CSS variables overridable (default only if you use the provided style):

  • colors:
    • --primary: default to var(--purple)
    • --light-primary: default to #e3d7f4
    • --gray: default to gray
    • --white: default to white
    • --dark-primary: default to #552895
    • --secondary: default to #D6008F
    • --dark-secondary: default to #c10081
    • --danger: default to #EF4456
    • --dark-danger: default to #eb142a;
  • borders:
    • --borderstyle: default to 1px solid var(--black-20)
  • sizes:
    • --font-size-1: default to 3rem
    • --font-size-2: default to 2.25rem
    • --font-size-3: default to 1.5rem
    • --font-size-4: default to 1.25rem
    • --font-size-5: default to 1rem
    • --font-size-6: default to .875rem
    • --font-size-2-5: default to calc(((var(--font-size-2) + var(--font-size-3)) / 2))
    • --font-size-3-5: default to calc(((var(--font-size-4) + var(--font-size-4)) / 2))
    • --font-size-4-5: default to calc(((var(--font-size-4) + var(--font-size-5)) / 2))
    • --font-size-5-5: default to calc(((var(--font-size-5) + var(--font-size-6)) / 2))
    • --iconsize: default to 40px
    • --icongap: default to 0px
    • --radio-button-outer-circle: default to 16px
    • --radio-button-inner-circle: default to 8px

Components

Quick Links

NPM: https://www.npmjs.com/package/@mcf/lib-ui Dependency Images: https://sgts.gitlab-dedicated.com/wog/wsg/mycareersfuture/wsg-mycareersfuture/lib-ui/container_registry/3171 Application Images: https://sgts.gitlab-dedicated.com/wog/wsg/mycareersfuture/wsg-mycareersfuture/lib-ui/container_registry/3173

Contributing

Get Started

Clone this repository and run the following to get started:

yarn install
yarn start # runs a storybook server at http://localhost:9001

This repo uses node v20

Development

Component code is stored in ./src. See the ./src/Example/Text for an example.

Make sure to build before submitting a merge request:

yarn build

# or
yarn build-watch

Use yarn link to test drive your changes in lib-ui with another project. Run yarn link in this repo and follow the instructions. Likewise, run yarn unlink in this repo and follow the instructions to unlink.

Testing

To run tests:

yarn test

To run tests in development with file watching:

yarn test-watch

To run lints:

yarn lint
yarn lint-fix

Documentation

  1. Add the component to the Catalog section above linking to [2].
  2. Add a README.md in the component directory which describes the component behaviour and it's available props.

Pipeline

The Pipeline runs only in the master branch.

The following release tags are available for use in your commit message to denote a type of release:

  • [release]: performs a release by bumping the version in ./package.json to the same as that of the latest Git tag
  • [major]: performs a major version bump (X.y.z -> Y.0.0, Y = X + 1)
  • [minor]: performs a major version bump (x.Y.z -> x.Z.0, Z = Y + 1)

By default, every push to master will result in a patch version bump.

When both a "[release]" and a "[major]" or "[minor]" is present in the commit message, the version is bumped first before the release happens, so the package.json will contain the version AFTER the

Merge Request

On passing of the pipeline, submit a Merge/Pull Request to the master branch and wait for the code to be reviewed and merged in.

🍻