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

tsadok-ui

v0.1.8

Published

Framework UI para React Native com ThemeProvider centralizado

Downloads

58

Readme

Tsadok UI Framework

Framework de UI para React Native com ThemeProvider centralizado e componentes customizáveis.

🚀 Características

  • ThemeProvider centralizado - Sistema de temas flexível e customizável
  • Componentes básicos - Text, Button, Input, Card com múltiplas variants
  • TypeScript - Tipagem completa para melhor experiência de desenvolvimento
  • Customização por componente - Override de estilos específicos por componente
  • Design system consistente - Tokens globais para cores, tipografia, espaçamento

📦 Instalação

npm install tsadok-ui

🎨 Uso Básico

import React from 'react';
import { ThemeProvider, Text, Button, Input, Card } from 'tsadok-ui';

const theme = {
  colors: { 
    primary: '#6200ee', 
    background: '#fff' 
  },
  components: {
    Button: { borderRadius: 12 },
    Card: { borderRadius: 8 }
  }
};

export default function App() {
  return (
    <ThemeProvider theme={theme}>
      <Text variant="headtitle">Bem-vindo</Text>
      <Button variant="filled" size="large">Clique aqui</Button>
      <Input variant="outlined" label="Seu nome" />
      <Card variant="filled" mode="rounded">
        <Text variant="body">Conteúdo do card</Text>
      </Card>
    </ThemeProvider>
  );
}

🧩 Componentes

Text

<Text variant="headtitle">Título Principal</Text>
<Text variant="title">Título</Text>
<Text variant="subtitle">Subtítulo</Text>
<Text variant="body">Texto do corpo</Text>
<Text variant="label">Label</Text>
<Text variant="caption">Legenda</Text>

Button

<Button variant="filled" size="large" mode="rounded">
  Botão Preenchido
</Button>
<Button variant="outlined" size="medium" mode="square">
  Botão com Borda
</Button>
<Button variant="text" size="small">
  Botão Texto
</Button>

Input

<Input variant="outlined" label="Nome" placeholder="Digite seu nome" />
<Input variant="inlined" label="Email" placeholder="Digite seu email" />
<Input variant="boxed" label="Senha" placeholder="Digite sua senha" />

Card

<Card variant="filled" mode="rounded">
  <Text variant="body">Conteúdo do card</Text>
</Card>

<Card variant="elevation" mode="square">
  <Text variant="body">Card com elevação</Text>
  <Card.Actions>
    <Button variant="text">Cancelar</Button>
    <Button variant="filled">Confirmar</Button>
  </Card.Actions>
</Card>

Stack (Layout Helper)

<Stack direction="row" justify="space-between" gap={8}>
  <Button variant="filled" size="small">1</Button>
  <Button variant="filled" size="small">2</Button>
  <Button variant="filled" size="small">3</Button>
</Stack>

<Stack direction="column" align="center" gap={16}>
  <Text variant="title">Título</Text>
  <Text variant="body">Conteúdo</Text>
</Stack>

List

<List>
  <List.Item 
    title="Configurações" 
    subtitle="Ajustes do app"
    onPress={() => console.log('Configurações')}
  />
  <List.Item 
    title="Notificações" 
    subtitle="Gerenciar alertas"
    onPress={() => console.log('Notificações')}
  />
</List>

Checkbox

<Checkbox 
  label="Aceito os termos" 
  checked={checked}
  onPress={() => setChecked(!checked)}
/>

<Checkbox 
  label="Small checkbox" 
  size="small"
/>

Switch

<Switch 
  label="Receber notificações" 
  value={enabled}
  onValueChange={setEnabled}
/>

<Switch 
  label="Large switch" 
  size="large"
/>

🎨 Customização de Tema

const customTheme = {
  colors: {
    primary: '#2196f3',
    secondary: '#ff4081',
    surface: '#ffffff',
    background: '#f5f5f5',
    text: {
      primary: '#212121',
      secondary: '#757575',
      disabled: '#bdbdbd',
    },
  },
  typography: {
    fontSize: {
      xs: 12,
      sm: 14,
      md: 16,
      lg: 18,
      xl: 20,
      xxl: 24,
    },
  },
  components: {
    Button: {
      borderRadius: 12,
      padding: 16,
    },
    Card: {
      borderRadius: 8,
      elevation: 2,
    },
  },
};

📚 API Reference

ThemeProvider Props

| Prop | Tipo | Descrição | |------|------|-----------| | theme | Theme | Objeto de tema customizado | | children | ReactNode | Componentes filhos |

Text Props

| Prop | Tipo | Padrão | Descrição | |------|------|--------|-----------| | variant | 'headtitle' \| 'title' \| 'subtitle' \| 'body' \| 'label' \| 'caption' | 'body' | Variant do texto | | color | string | - | Cor customizada | | align | 'left' \| 'center' \| 'right' | 'left' | Alinhamento do texto |

Button Props

| Prop | Tipo | Padrão | Descrição | |------|------|--------|-----------| | variant | 'filled' \| 'outlined' \| 'text' | 'filled' | Estilo do botão | | size | 'small' \| 'medium' \| 'large' | 'medium' | Tamanho do botão | | mode | 'rounded' \| 'square' | 'square' | Modo de arredondamento | | disabled | boolean | false | Botão desabilitado |

Input Props

| Prop | Tipo | Padrão | Descrição | |------|------|--------|-----------| | variant | 'outlined' \| 'inlined' \| 'boxed' | 'outlined' | Estilo do input | | label | string | - | Label do input | | error | string | - | Mensagem de erro | | disabled | boolean | false | Input desabilitado |

Card Props

| Prop | Tipo | Padrão | Descrição | |------|------|--------|-----------| | variant | 'outlined' \| 'filled' \| 'elevation' | 'filled' | Estilo do card | | mode | 'rounded' \| 'square' | 'square' | Modo de arredondamento | | elevation | number | - | Elevação customizada |

🛠️ Desenvolvimento

# Instalar dependências
npm install

# Desenvolvimento
npm run dev

# Build
npm run build

# Testes
npm test

# Lint
npm run lint

📚 Storybook (Expo)

Para visualizar todos os componentes interativamente:

# Iniciar Storybook (Expo)
npm run storybook

# Executar no Android
npm run storybook:android

# Executar no iOS
npm run storybook:ios

# Executar no Web
npm run storybook:web

Vantagens do Expo Storybook:

  • Mais rápido - Hot reload instantâneo
  • Fácil desenvolvimento - Sem configuração complexa
  • Multiplataforma - iOS, Android e Web
  • Todas as variants de cada componente
  • Controles interativos para testar props
  • Ações para testar eventos
  • Documentação integrada
  • Temas customizáveis

📄 Licença

MIT