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

@bsuite/ui

v0.4.0

Published

Shared UI primitives for the BSuite apps (D2C Neon Electric + Corporate brands).

Readme

@bsuite/ui

Shared UI primitives for the BSuite apps (D2C Neon Electric + Corporate brands).

Ships as an npm package because Vercel deploys each BSuite app from its own GitHub repo — the parent monorepo's packages/ directory does NOT exist in the Vercel build context. Consumers install from npm with a pinned semver.

Components

Core primitives (v0.4.0+)

The package now owns the shared Tier 1 UI primitives apps should converge on:

import {
  Button,
  Dialog,
  DialogContent,
  DialogHeader,
  DialogTitle,
  EmptyState,
  ErrorBoundary,
  LoadingSpinner,
  StatusBadge,
} from '@bsuite/ui'

These primitives use BSuite/shadcn semantic token classes only (bg-primary, text-muted-foreground, border-border, text-status-success, etc.) so D2C apps can skin them through @bsuite/theme and Braden can map the same roles to the corporate palette.

Storybook

Run the shared primitive gallery from this package:

pnpm -C packages/ui storybook
pnpm -C packages/ui build-storybook

DotPattern

Full-viewport dot-pattern background. SVG <pattern> tiling — ~1 DOM node (vs ~1,800 motion.circle nodes on a typical viewport).

import { DotPattern } from '@bsuite/ui'

<div className="relative">
  <DotPattern
    width={28}
    height={28}
    cr={1.5}
    className="opacity-[0.35] text-muted-foreground"
  />
  {/* page content */}
</div>

Colour control via semantic Tailwind text-* utilities (dots use fill="currentColor").

Logo

Slot-aware, theme-aware, branding-aware logo component for all BSuite apps.

import { Logo } from '@bsuite/ui'

<Logo slot="header" colorScheme="auto" />

D2CDefaultLogo

Inline D2C Neon Electric SVG logo (no asset dependency).

import { D2CDefaultLogo } from '@bsuite/ui'

<D2CDefaultLogo className="h-8 w-auto" />

Branding Components (v0.3.0+)

OklchColorPicker

A color input component for OKLCH color format (BSuite standard).

import { OklchColorPicker } from '@bsuite/ui'

<OklchColorPicker
  value="oklch(0.546 0.215 262.9)"
  onChange={(value) => console.log(value)}
  label="Primary Color"
  description="Your brand's primary color in OKLCH format"
/>

Features:

  • Live color preview
  • Input fields for L (lightness), C (chroma), H (hue)
  • Slider controls for easy adjustment
  • Validation of OKLCH format
  • Accessible labels and error messages

ColorEditorSheet

A sheet/dialog for editing branding colors with a slot-based color editor.

import { ColorEditorSheet, OklchColorPicker } from '@bsuite/ui'

<ColorEditorSheet
  open={isOpen}
  onOpenChange={setIsOpen}
  title="Edit Primary Color"
  description="Adjust the OKLCH color values"
  value="oklch(0.546 0.215 262.9)"
  onSave={(value) => updateBranding('primary', value)}
  renderEditor={(props) => <OklchColorPicker {...props} />}
/>

Features:

  • Slide-out sheet interface
  • Slot-based color editor (inject your own picker)
  • Save/Cancel actions
  • Responsive design
  • Accessible dialog implementation

BrandingCard

A card component for displaying and editing tenant branding configuration.

import { BrandingCard, OklchColorPicker } from '@bsuite/ui'

<BrandingCard
  branding={{
    primary: "oklch(0.546 0.215 262.9)",
    accent: "oklch(0.769 0.132 191.7)",
    logo_url: "https://example.com/logo.svg",
    company_name: "Acme Corp"
  }}
  onUpdate={async (key, value) => {
    await updateTenantBranding(key, value)
  }}
  renderColorEditor={(props) => <OklchColorPicker {...props} />}
/>

Features:

  • Display current branding values (colors, logos, company name)
  • Edit buttons for each branding property
  • Integrated color editing with ColorEditorSheet
  • Image preview for logos
  • Accessible and responsive design
  • Support for light/dark mode logo variants

Branding Properties:

  • primary - Primary action color (OKLCH)
  • accent - Accent/secondary color (OKLCH)
  • logo_url - Main logo URL
  • logo_light_url - Light mode logo variant (optional)
  • logo_dark_url - Dark mode logo variant (optional)
  • favicon_url - Favicon URL (16x16 or 32x32)
  • company_name - Company name for alt text

Utils

cn(...classes)

shadcn-style className merger — clsx + tailwind-merge. Available for consumers that want to compose @bsuite/ui components with local overrides without pulling shadcn again.

Module Exports

The package provides subpath exports for better tree-shaking:

// Main exports
import { Logo, BrandingCard, Button, StatusBadge } from '@bsuite/ui'

// Dot pattern only
import { DotPattern } from '@bsuite/ui/dot-pattern'

// Utils only
import { cn } from '@bsuite/ui/utils'

// Branding components only
import { BrandingCard, ColorEditorSheet, OklchColorPicker } from '@bsuite/ui/branding'

// Primitive subpaths
import { Button } from '@bsuite/ui/button'
import { DialogContent } from '@bsuite/ui/dialog'
import { EmptyState } from '@bsuite/ui/empty-state'

// SVG asset
import logoSvg from '@bsuite/ui/assets/d2c-default-logo.svg'

Releases

  1. Edit source under src/.
  2. pnpm -C packages/ui test — all cases must pass.
  3. pnpm -C packages/ui build — emits dist/.
  4. Bump version in package.json (semver).
  5. npm publish --access public from packages/ui/.
  6. Update consumer package.json to the new version, regenerate lockfile outside the bsuite tree (see root CLAUDE.md rule 7), commit the lockfile + a consumer-side bump PR.

NEVER use workspace:* or file:../packages/ui for this package in a consumer — Vercel builds can't resolve those.