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

mineral-ui-tokens

v0.4.0

Published

Mineral UI Design Tokens

Downloads

2,174

Readme

mineral-ui-tokens

Installation

npm install --save mineral-ui-tokens

or

yarn add mineral-ui-tokens

Usage

All Tokens and their corresponding values can be viewed on the Mineral UI Tokens page.

This package uses the same import syntax as the mineral-ui library.

Token names use a [target]_[property]_[variation]_[state] naming scheme.

  • target - the type of element targeted by the token, e.g. "input" or "panel"
  • property (required) - the CSS property of the token, e.g. "backgroundColor"
  • variation - any differentiating aspect of the token that isn't state, e.g. "brand", "primary", "success"
  • state - state-dependent aspects, e.g. "focus", "selected"

JavaScript

JavaScript token names are formatted in "pseudo_camelCase", e.g. boxShadow_1

Import tokens from the default export:

import tokens from 'mineral-ui-tokens';

Import the palette, specific color ramps, or specific tokens from named exports:

import { palette, magenta, boxShadow_1 } from 'mineral-ui-tokens';

Import tokens & palette, as Sass variables:

import 'mineral-ui-tokens/index.scss';

Sass

Sass token names are formatted in "pseudoKebab-case", with a prefix, e.g. $mnrl-boxShadow-1

@import '<path_to_node_modules>/mineral-ui-tokens/index.scss';

Changelog

Check the project root's changelog for updates.

Contributing

This package uses Theo to generate output in a variety of formats. The source tokens are located in the tokens directory. Theo recognizes values like "{!blue_60}" as aliases. Check the aliases and/or imports properties in the containing file to find the alias definition(s).

After changing the tokens source, generate the new output with npm run build:tokens, which you can run from either the project root or the mineral-ui/packages/mineral-ui-tokens directory. Format your commit messages appropriately, using mineral-ui-tokens for your scope.

Then submit a PR, including both your token source changes and the generated files, for review.

Publishing the mineral-ui-tokens package

  1. Make or accept source token updates
  2. cd mineral-ui/packages/mineral-ui-tokens (if not already there)
  3. npm run build:tokens
  4. npm run format
  5. npm version minor
    • This package uses the same versioning scheme as mineral-ui: major, minor, and patch updates all increment the minor version number: 0.1.0 -> 0.2.0
  6. npm run build
  7. Commit changes and push to GitHub
  8. cd dist && npm publish