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

@justeat/pie-design-tokens

v7.14.2

Published

Design Tokens for the PIE Component System

Readme

@justeat/pie-design-tokens

Source Code | NPM

How to contribute:

Build the project:

yarn build --filter=@justeat/pie-design-tokens

If you need to add, change or remove tokens the changes should be done in pie-design-tokens.jsonc file, where all the tokens are stored. To verify that the changes took effect, build the project and check the compiled files in the dist folder.

Each change should also be replicated in metadata/tokensMetadata.json file.

Update the output snapshots and run the tests to verify any update:

yarn test:output --filter=@justeat/pie-design-tokens -- -u
yarn test --filter=@justeat/pie-design-tokens

Each change needs to be accompanied by a changeset, which handles both the changelog entry and the version bump:

yarn changeset

Do not bump the version in package.json by hand. Dependants pin the tokens version exactly, so a manual bump makes them resolve the published package from npm instead of this workspace, silently and without any error.

If your change touches the tokens structure, compile scripts in the build folder might need to be updated to make sure that the tokens are compiled as expected.

Dark Mode Token Support

The PIE Design Tokens now provide dark mode support through a set of html data attributes and media query rules.

How Dark Mode Tokens Work

The compiled CSS and SCSS files include two sets of dark mode rules:

  1. Data Attribute Rule (Primary) - Triggered by HTML data-color-mode="dark" data attribute.
  2. Media Query Fallback - Applied when there is no data-color-mode="dark" data attribute present, system preferences are set to dark mode and a data-darkmode-system data attribute is present on the html element.

CSS Selector Logic

The generated CSS uses the following selector hierarchy:

/* Primary: Explicit dark mode activation */
html[data-color-mode="dark"] {
    --dt-color-background-default: var(--dt-color-truffle-100);
    /* ... other dark mode tokens ... */
}

/* Fallback: System preference with no explicit override */
@media (prefers-color-scheme: dark) {
    html[data-darkmode-system]:not([data-color-mode]) {
        --dt-color-background-default: var(--dt-color-truffle-100);
        /* ... other dark mode tokens ... */
    }
}

Implementation Examples

Manual Dark Mode Control

<!-- Force dark mode -->
<html data-color-mode="dark">

Automatic System Preference

<!-- Respect system preference, no manual override -->
<html data-darkmode-system>

Token Categories Affected

Dark mode tokens are available for:

  • Colors: Background, border, content, interactive states
  • Elevation: Box shadows with dark theme variants
  • Gradients

Browser Support

  • Data Attributes: Supported in all modern browsers
  • Media Queries: prefers-color-scheme supported in all modern browsers (IE not supported)
  • Fallback: Light theme is the default when no conditions are met