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 🙏

© 2025 – Pkg Stats / Ryan Hefner

postall-log

v1.3.0

Published

A modern React component library with styled-components for the Postall Log project

Readme

postall-log

Uma biblioteca de componentes React reutilizáveis com sistema completo de Design Tokens para o projeto Postall Log.

🚀 Instalação

npm install postall-log

📦 Dependências necessárias

Esta biblioteca requer as seguintes dependências no seu projeto:

npm install react react-dom styled-components react-icons

🎯 Uso

Componentes

import { Button } from 'postall-log';

function App() {
  return (
    <div>
      <Button>Botão Padrão</Button>
      <Button variant="secondary">Botão Secundário</Button>
      <Button variant="outline" size="lg">Botão Outline</Button>
      <Button variant="success" iconLeft>Sucesso</Button>
      <Button variant="error" iconRight>Erro</Button>
    </div>
  );
}

🎨 Design Tokens (NOVO!)

import { theme, colors, spacing } from 'postall-log';
import styled from 'styled-components';

const MyCard = styled.div`
  background: ${theme.colors.white};
  border: 1px solid ${theme.colors.gray[200]};
  border-radius: ${theme.borderRadius.lg};
  padding: ${theme.spacing[4]};
  box-shadow: ${theme.shadows.sm};
  
  h2 {
    color: ${theme.colors.gray[900]};
    font-size: ${theme.typography.fontSize.xl};
    font-weight: ${theme.typography.fontWeight.semibold};
  }
`;

📖 Componentes

Button

Botão customizável com diferentes variantes e tamanhos.

Props:

  • variant?: 'primary' | 'secondary' | 'outline' | 'ghost' | 'success' | 'warning' | 'error' - Estilo do botão (padrão: 'primary')
  • size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' - Tamanho do botão (padrão: 'md')
  • fullWidth?: boolean - Ocupa toda largura disponível
  • iconLeft?: boolean - Exibe ícone à esquerda
  • iconRight?: boolean - Exibe ícone à direita
  • children: ReactNode - Conteúdo do botão
  • ...props - Todas as props padrão de HTMLButtonElement

🎨 Design Tokens

Cores disponíveis:

theme.colors.primary[600]    // Azul principal
theme.colors.secondary[500]  // Cinza
theme.colors.success[500]    // Verde
theme.colors.warning[500]    // Amarelo  
theme.colors.error[500]      // Vermelho
theme.colors.gray[100-900]   // Escala de cinza

Espaçamentos:

theme.spacing[1]   // 4px
theme.spacing[2]   // 8px
theme.spacing[4]   // 16px
theme.spacing[8]   // 32px

Tipografia:

theme.typography.fontSize.xs    // 12px
theme.typography.fontSize.base  // 16px
theme.typography.fontSize.xl    // 20px
theme.typography.fontWeight.semibold  // 600

Sombras:

theme.shadows.sm   // Sombra sutil
theme.shadows.lg   // Sombra pronunciada

🔧 Desenvolvimento

Comandos disponíveis:

# Compilar a biblioteca
npm run build

# Compilar em modo watch
npm run build:watch

# Executar ambiente de desenvolvimento
npm run dev

# Linting
npm run lint

📁 Estrutura

src/
├── components/
│   └── button/
│       └── index.tsx
├── tokens/
│   ├── colors.ts
│   ├── typography.ts
│   ├── spacing.ts
│   └── theme.ts
└── index.ts

🛠️ Build

A biblioteca é compilada usando tsup e gera:

  • CommonJS (dist/index.cjs)
  • ES Modules (dist/index.js)
  • TypeScript declarations (dist/index.d.ts)

🎯 Benefícios do Design System

Consistência visual automática
Manutenção centralizada de estilos
Escalabilidade para grandes equipes
TypeScript completo
Futuro dark mode só trocando tema

📚 Documentação Adicional

📄 Licença

MIT