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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@strategies/tokens

v5.0.0

Published

Tokens for Sasaki Strategies' design system

Downloads

2,018

Readme

Strategies' Design System Tokens

Jest testing on Tokens pkg

Publish to Chromatic

Installation

pnpm add @strategies/tokens

How to update tokens ?

Update the tokens in JSON files

  • The tokens are stored in JSON files located in the src folder.
  • We use our own code in utils to generate SCSS variable files from these JSON files.
  • One of the advantages of storing tokens in JSON format is that they can be easily integrated into the token function. So that, tokens can be used in js/jsx/ts/tsx files

Mixins

  • The mixins are stored in the mixins folder.
    • The mixins are written in SCSS format.
    • The -base.scss files are the base mixins that are used in the other mixins.
    • The .scss files are the mixins that are used in the components.
    • The -use-cases.scss files are the use cases of the mixins, which contain implemented classes. They are ONLY for testing purposes.
  • The mixins are NOT generated from the JSON files.

Token with reference/alias

  • If the token is a reference/alias token, plz make sure the format of its value is like this. For example, we wanna set token color-test to be palette-primary-test.
{
  "color": {
    "test": {
      "value": "palette.$primary-test",
      "isReference": true
    }
  }
}
  1. value is the reference to another token
  2. isReference is the flag to indicate that this token is a reference token
  3. Important! Make sure the first divider, aka. the divider between the palette and primary-test is .$. This is meant for successfully converting the json files to scss files

Token w/o reference/alias

  • If the token is a normal token, plz make sure the format is like this
{
  "color": {
    "test": {
      "value": "#ff0000"
    }
  }
}
  • If the token is deprecated, plz make sure the format is like this
{
  "color": {
    "test": {
      "value": "#ff0000",
      "deprecated": true
    }
  }
}

Generate the SCSS file with latest token values

  • The command below will generate the public .scss files and testing .module.scss files with the latest token values from the JSON files
pnpm run build

How to update mixins ?

  • The mixins are stored in the mixins folder.
    • The mixins are written in SCSS format.
    • The -base.scss files are the base mixins that are used in the other mixins.
    • The .scss files are the mixins that are used in the components.
    • The -use-cases.scss files are the use cases of the mixins, which contain implemented classes.
  • All the mixins are eventually rolled up in the index.scss file.

Usage

Include the global styles to normalize the styling environment

// In your top-level SCSS file (e.g. App.scss)
@import '~@strategies/tokens';

If you are using vite, please remove the tide ~ in the import statement, like this

// In your top-level SCSS file (e.g. App.scss)
@import '@strategies/tokens';

Using the tokens in CSS or SCSS file

@use '~@strategies/tokens/color';
@use '~@strategies/tokens/font';

.YourComponent {
  color: color.$blue;
  font-size: font.$size-small;
}

Using the tokens in js/jsx/ts/tsx file

  • the `token`` function is for getting the value by passing in a path string
  • to use the token function, please install another package @strategeies/ui
pnpm add --save-dev @strategies/tokens
  • usage example
import { ConfigProvider } from 'antd'
import { token } from '@strategeies/tokens'

export const ButtonAntConfig = ({ children }) => {
  return (
    <ConfigProvider
      theme={{
        token: {
          /* token fn here */
          colorPrimary: token('color.text.danger', '#ff0000'),
        },
      }}
    >
      {children}
    </ConfigProvider>
  )
}

export default ButtonAntConfig

Implement default value (for DEV)

  • If the token path is not found, the default value will be used
  • Both of the following formats are supported.
  • If some tokens are missing in the SCSS built file, plz check the convertJsonToScss function in utils folder
{
  "color": {
    "value": "#ff0000",
    "dark": {
      "value": "#ff0000"
    }
  }
}
{
  "color": {
    "default": { "value": "#ff0000" },
    "dark": {
      "value": "#ff0000"
    }
  }
}