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

@1doc/1ds-tokens

v0.1.0

Published

Este pacote contém os Design Tokens do 1ds Design System.

Readme

@1doc/1ds-tokens

Este pacote contém os Design Tokens do 1ds Design System.

Instalação

pnpm add @1doc/1ds-tokens

Como usar

Os tokens são expostos principalmente como Variáveis CSS. Importe os arquivos CSS necessários no ponto de entrada da sua aplicação (Root ou main.js/ts).

import "@1doc/1ds-tokens/dist/css/primitives.css";
import "@1doc/1ds-tokens/dist/css/semantic.css";
import "@1doc/1ds-tokens/dist/css/theme-1doc.css";

Estrutura de Arquivos

packages/tokens/
├── src/
│   ├── primitives/
│   │   └── colors.json       # Cores base (não mudam)
│   ├── semantic/
│   │   └── base.json          # Tokens semânticos (referências)
│   └── themes/
│       ├── 1doc.json          # Tema padrão azul
│       ├── 1ds-red.json       # Tema vermelho
│       ├── 1ds-green.json     # Tema verde
│       ├── 1ds-orange.json    # Tema laranja
│       └── 1ds-yellow.json    # Tema amarelo
├── dist/
│   └── css/
│       ├── primitives.css     # :root com cores primitivas
│       ├── semantic.css       # :root com tokens semânticos
│       ├── theme-1doc.css     # :root, [data-theme="1doc"]
│       ├── theme-1ds-red.css  # [data-theme="1ds-red"]
│       ├── ...

Como funciona a cascata CSS

O sistema de temas utiliza uma arquitetura em 3 camadas:

  1. primitives.css: Define as cores brutas (hex) em :root.
    • Ex: --umds-primitive-blue-pure: #0058DB;
  2. theme-*.css: Liga variáveis de tema às primitivas, escopadas por um atributo data-theme.
    • Ex: [data-theme="1doc"] { --umds-theme-primary-pure: var(--umds-primitive-blue-pure); }
  3. semantic.css: Define os tokens semânticos que seu app deve usar, apontando para as variáveis de tema.
    • Ex: :root { --umds-semantic-color-primary-pure: var(--umds-theme-primary-pure); }

Importante: Sempre utilize os tokens semânticos (--umds-semantic-*) no seu CSS. Nunca use primitivos ou temas diretamente.

Criando um Novo Tema

Para adicionar um tema customizado ao seu projeto local:

  1. Crie um arquivo JSON em src/themes/meu-tema.json seguindo a estrutura dos existentes.
  2. Adicione a configuração no config.js.
  3. Rode pnpm build dentro da pasta de tokens.

Troubleshooting

Tema não está mudando

  1. Verifique se todos os arquivos CSS estão importados (primitives, semantic e o tema desejado).
  2. Verifique se o atributo data-theme está sendo aplicado corretamente no elemento <html> ou no container raiz.
  3. Use o DevTools para inspecionar se as variáveis css (--umds-semantic-*) estão mudando de valor.

Desenvolvimento

Os tokens estão definidos em src/**/*.json. O Style Dictionary é usado para transformá-los.

pnpm build