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

@sbkbs/ui

v1.0.3

Published

Biblioteca de componentes UI SBK BS

Downloads

363

Readme

@sbkbs/ui

Biblioteca de componentes UI e tema global para manter o mesmo padrão visual entre projetos SBK BS.

Conteúdo

  • Tema: variáveis CSS (Material Design 3) light/dark + Guia de marca SBK (cores e tipografia Jakarta) em theme/theme.css + ThemeProvider React.
  • Componentes: Button, Card, Input, Modal, Title, Subtitle, Paragraph, Header, Footer.
  • Paletas de botão: escolha a cor do botão primary via prop palette ou data-button-palette no pai (verde-vibrante, grafite-azulado, etc.).

Uso em outro projeto

1. Instalar no monorepo

No package.json do app (ex.: frontend), adicione:

"dependencies": {
  "@sbkbs/ui": "^1.0.2"
}

Rode npm install na raiz do monorepo.

2. Tema (variáveis CSS)

Os componentes usam variáveis CSS (--md-surface, --primary-color, etc.). O consumidor pode:

  • Usar o tema da lib: import '@sbkbs/ui/theme.css'; no entry (ex.: main.tsx), ou
  • Definir as mesmas variáveis no próprio CSS do projeto (o frontend OFICIO.IA já tem theme.css próprio).

3. ThemeProvider (opcional)

Para light/dark com toggle e persistência em localStorage:

import { ThemeProvider } from '@sbkbs/ui';

root.render(
  <ThemeProvider defaultTheme="light">
    <App />
  </ThemeProvider>
);

4. Componentes

import { Button, Card, Input, Modal, Title, Subtitle, Paragraph, Header, Footer } from '@sbkbs/ui';

<Button variant="primary" size="md" palette="verde-vibrante">Salvar</Button>
<Card variant="elevated" padding="lg" hoverable>...</Card>
<Input label="E-mail" size="md" />
<Modal isOpen={open} onClose={() => setOpen(false)} title="Título">...</Modal>
<Title size="2xl" weight="bold">Título</Title>
<Subtitle size="md" muted>Subtítulo</Subtitle>
<Paragraph size="md">Texto.</Paragraph>

<Header
  logoSrc="/logo.png"
  logoDarkSrc="/logo-dark.png"
  title="OFÍCIO.IA"
  subtitle="Subtítulo"
  onLogoClick={() => navigate('/home')}
  rightContent={<>
    <LanguageSelector />
    <ThemeToggle />
    <UserMenu />
  </>}
/>
<Footer poweredByText="Powered by" logoSrc="/logo.png" logoFallbackText="SBK" />

Guia de marca (tema)

Cores disponíveis como variáveis CSS: --brand-verde-vibrante, --brand-grafite-azulado, --brand-verde-profundo, --brand-azul-acinzentado, --brand-cinza-medio, --brand-cinza-escuro, --brand-off-white, e paleta "O Criador" (--brand-azul-intenso, --brand-verde-lima, etc.). Tipografia: --font-primary / --font-heading = Plus Jakarta Sans (Google Fonts).

Paletas de botão (prop palette ou data-button-palette no pai): verde-vibrante | verde-profundo | grafite-azulado | azul-acinzentado | cinza-medio | cinza-escuro | off-white.

Compartilhar com outro projeto

  • Mesmo monorepo: adicione o app em workspaces e use "@sbkbs/ui": "*" nas dependências; depois npm install na raiz.
  • Outro repositório: use dependência por Git ("@sbkbs/ui": "git+https://...") ou publique em um registry npm e instale com npm install @sbkbs/ui.

Guia completo: docs/COMPARTILHAR_LIB_UI.md.

Desenvolvimento

  • Build: npm run build dentro de ui.
  • Watch: npm run dev dentro de ui.
  • Playground: npm run playground
  • Storybook: npm run storybook
  • Testes: npm run test

Estrutura

ui/
  src/
    index.ts
    theme/
      theme.css
      ThemeProvider.tsx
    components/
      Button/
      Card/
      Input/
      Modal/
      Title/
      Subtitle/
      Paragraph/
      Header/
      Footer/
  dist/