Skip to Content
Bleroo Docs
DesenvolvedoresPacotes

@bleroo/ui

Único pacote de UI — tokens, componentes, layout e as telas de auth e identidade.

Base UI no estilo shadcn new-york + Tailwind v4, com o visual do template Tapotik. Import sempre por caminho exato, sem barrel.

CaminhoConteúdoBusca dados?
styles.css, fontstokens claro/escuro, utilitários (glass-strong, bg-grid, text-gradient…), animações, Inter/Bricolage/JetBrainsnão
components/*, form/*, data/*, feedback/*, layout/*, effects/*, hooks/*primitivos, formulários, DataTable, StatCard, ChartCard, AppShell, AuthLayout…não, só props
auth/*login, cadastro, reset, 2FA, convite, escolher orgsó pelo IdentityClient
identity/*IdentityProvider, PermissionsProvider/useCan, IdentityAppShell, OrgSwitcher, menu do usuário, roles, membros, API keys, sessões, telas do admin de plataforma (identity/platform/*)só pelo IdentityClient

Regras: auth/ e identity/ podem importar o resto; o resto nunca importa deles (teste de arquitetura). Nada de fetch nem Better Auth no pacote — a implementação real do IdentityClient está em @bleroo/auth-client/react, e testes usam identity/mock-client.

Usando num front

/* src/app/globals.css */
@import "@bleroo/ui/styles.css";
@source "../../../../../packages/ui/src";
<QueryClientProvider client={queryClient}>
  <IdentityProvider client={identityClient()}>
    <IdentityAppShell
      nav={nav} pathname={pathname} appLabel="WhatsApp" currentApp="messaging"
      accountsUrl={env.NEXT_PUBLIC_ACCOUNTS_URL} securityHref={…} logoutHref={…}
      linkComponent={Link} canSee={(i) => !i.permission || perms.has(i.permission)}
      onOrgSwitched={async () => { await resetClientToken(); router.refresh(); }}
    >
      …
    </IdentityAppShell>
  </IdentityProvider>
</QueryClientProvider>

next.config precisa de transpilePackages: ["@bleroo/ui", …]. Componentes recebem linkComponent={Link}; em Server Components, passe por um wrapper "use client".

Shell e cabeçalho de página

  • Sidebar: topo com OrgSwitcher — “Bleroo” + etiqueta do app na linha 1, org ativa na linha 2 (truncada, title com o nome). O botão ChevronsUpDown ou o bloco do nome abrem o popover: orgs (ícone, nome, slug, ✓ na ativa), setas/Enter/Esc e “Nova organização” (accounts/orgs/new?redirect=<url atual>). Recolhida (76 px), só o logo, que abre o popover.
  • Topbar (ordem fixa): recolher menu · busca (Ctrl K) · apps · tema · avatar. O ThemeToggle só é renderizado pelo AppTopbar; o AppShell expõe slots nomeados (apps, user, sidebarHeader), e os apps usam IdentityAppShell, que não abre slot livre.
  • Breadcrumb dentro da página: PageHeader({ breadcrumb: {label, href?}[], title, description?, actions?, linkComponent? }). Não há mais eyebrow nem breadcrumb na topbar.

On this page