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

digisystem-ui

v0.4.0

Published

Design System de componentes UI standalone para os projetos FGD (Angular): formularios, tabela, planilha editavel, modal, tabs e tokens de tema.

Readme

digisystem-ui

Design System de componentes UI para os projetos FGD (Angular). Este repositório é uma biblioteca (não um app) publicada no npm como digisystem-ui.

O nome do repositório é fgd-design-system, mas o pacote publicado — e o caminho de import — é digisystem-ui.

Stack

  • Angular (library) + Angular CLI + ng-packagr
  • Storybook (documentação e playground)
  • Vitest (testes unitários)
  • SCSS com BEM por componente e tokens em CSS custom properties

Instalação no projeto consumidor

npm i digisystem-ui@latest

Peer dependencies esperadas no consumidor:

| Pacote | Faixa | |---|---| | @angular/core | >=17 <22 | | @angular/common | >=17 <22 | | @angular/forms | >=17 <22 (opcional: só para os componentes de formulário; ds-spreadsheet não precisa) | | rxjs | >=7.5 <8 |

1. Registre os tokens (recomendado)

// angular.json → architect.build.options.styles
"styles": [
  "node_modules/digisystem-ui/styles/ds-tokens.css",
  "src/styles.scss"
]

Sem esse import os componentes continuam funcionando com os valores padrão, porque cada token é consumido com fallback. Com ele, você passa a poder tematizar:

:root {
  --ds-color-primary: #0b5cab;
  --ds-radius-lg: 12px;
  --ds-control-height-md: 38px;
}

2. Use os componentes (standalone)

import { DsButtonComponent, DsInputComponent } from 'digisystem-ui';

@Component({
  imports: [DsButtonComponent, DsInputComponent],
  // ...
})
export class ExampleComponent {}
<ds-input label="E-mail" type="email" size="md" [(value)]="email" />

<ds-button variant="primary" [fullWidth]="false" [loading]="salvando" (dsClick)="salvar()">
  Acessar
</ds-button>

Planilha editável (revisão e correção de dados importados):

<ds-spreadsheet #planilha [columns]="columns" [value]="rows" [validator]="validator" (errorsChange)="errors = $event" />
<ds-button [fullWidth]="false" [disabled]="errors.length > 0" (dsClick)="enviar(planilha.getValue())">Enviar</ds-button>

A referência completa de API está em design.md.

Desenvolvimento

npm install
npm run build            # gera dist/fgd-design-system (pacote digisystem-ui)
npm run watch            # build incremental
npm test                 # Vitest
npm run storybook        # playground em http://localhost:6006
npm run build-storybook

Windows / PowerShell (erro de Execution Policy)

Se aparecer "a execução de scripts foi desabilitada", use npm.cmd install ou ajuste a policy no escopo do usuário:

Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned

Estrutura

| Caminho | Conteúdo | |---|---| | src/components/ | Um diretório por componente (.ts, .html, .scss, .stories.ts, .spec.ts) | | src/components/shared/ | Tipos compartilhados entre componentes | | src/styles/_control.scss | Mixin de geometria usado por ds-input e ds-select | | styles/ds-tokens.css | Tokens publicados para o consumidor | | src/public-api.ts | API pública (exports) |

Convenções

  • Componentes genéricos, orientados a API (inputs/outputs), sem lógica de negócio do consumidor.
  • BEM por componente, com estilos encapsulados:
    • Block: ds-<componente> (ex.: ds-button)
    • Element: __ (ex.: ds-button__icon)
    • Modifier: -- (ex.: ds-button--primary)
  • Tokens antes de literais. Nenhuma cor, raio ou sombra hardcoded: use var(--ds-*, <fallback>), sempre com o valor padrão como fallback.
  • ds-input e ds-select compartilham geometria. Os dois derivam altura, padding e tipografia dos mesmos tokens --ds-control-* via o mixin size-vars. Ao mexer em tamanho, mexa no mixin ou nos tokens — nunca em um componente só.
  • Acessibilidade: elementos nativos primeiro; manter foco visível, navegação por teclado e estados ARIA.
  • Compatibilidade: renomear um input público exige manter o nome antigo como alias depreciado. Breaking changes só em major (SemVer).
  • Storybook e testes no mesmo change set da alteração do componente.

Publicação

npm test
npm run build
cd dist/fgd-design-system
npm publish

O token de publicação fica em .npmrc, que não é versionado (está no .gitignore). Prefira mantê-lo no .npmrc global do usuário ($env:USERPROFILE\.npmrc).

O histórico de mudanças está em CHANGELOG.md.

Documentação

O Storybook é a fonte de verdade de variações e estados:

npm run storybook