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

@seplan/diti-ds

v0.0.26

Published

Reusable UI component library developed by DITI (Technology and Innovation Directorate of SEPLAN PI) based on Mantine and Tailwind CSS

Downloads

32

Readme

@seplan/diti-ds

Reusable UI component library developed by DITI (Technology and Innovation Directorate of SEPLAN PI) based on Mantine and Tailwind CSS.

Installation

npm install @seplan/diti-ds
# or
yarn add @seplan/diti-ds
# or
pnpm add @seplan/diti-ds

Peer Dependencies

This library requires the following peer dependencies:

npm install @mantine/core @mantine/hooks react react-dom
# or
yarn add @mantine/core @mantine/hooks react react-dom
# or
pnpm add @mantine/core @mantine/hooks react react-dom

Usage

Import all components

import { Card, Button, SearchInput } from '@seplan/diti-ds'

Import specific modules

// Import only UI components
import { Card, Button } from '@seplan/diti-ds/ui'

// Import only hooks
import { useClipboard, useMediaQuery } from '@seplan/diti-ds/hooks'

// Import only utilities
import { cn, formatCurrency } from '@seplan/diti-ds/utils'

// Import only components (same as ui)
import { Card, Button } from '@seplan/diti-ds/components'

Import styles

import '@seplan/diti-ds/styles'

Available Components

Basic Components

  • AxisCard - Card component with axis styling
  • BackButton - Button for navigation back
  • Breadcrumbs - Breadcrumb navigation component
  • Card - Basic card component
  • EmptyState - Empty state component
  • Label - Label component
  • SearchInput - Search input component

Logo Components

  • Logo - Logo component
  • LogoHorizontal - Horizontal logo component

Navigation Components

  • NavigationTabs - Tab navigation component
  • BackButton - Back navigation button

Filter Components

  • AsyncFilter - Asynchronous filter component
  • FilterManager - Filter management component
  • FilterPopover - Filter popover component
  • DateRangeFilter - Date range filter
  • ValueRangeFilter - Value range filter

Data Display Components

  • DataList - Data list component
  • SortableColumnHeader - Sortable column header
  • PaginationFooter - Pagination footer components

Form Components

  • FormDrawer - Form drawer component
  • RadioCard - Radio card component
  • OptionalInputLabel - Optional input label

Utility Components

  • ClearFiltersButton - Clear filters button
  • CounselorStatusBadge - Counselor status badge
  • ImagePlaceholder - Image placeholder
  • SeplanAppsBar - SEPLAN apps bar

Available Hooks

  • useClipboard - Clipboard utility hook
  • useDownloadBlob - Download blob hook
  • useMediaQuery - Media query hook
  • usePaginationReset - Pagination reset hook
  • useQRCodeGenerator - QR code generator hook
  • useSortableColumn - Sortable column hook
  • useFilters - Filters hook
  • useSelectedItems - Selected items hook

Available Utilities

  • cn - Class name utility (clsx + tailwind-merge)
  • formatCurrency - Currency formatting utility
  • formatDate - Date formatting utility
  • formatCPF - CPF formatting utility
  • isValidCPF - CPF validation utility
  • removeAccents - Remove accents utility
  • normalizeForSearch - Search normalization utility

Examples

Basic Card Usage

import { Card } from '@seplan/diti-ds'

function MyComponent() {
  return (
    <Card>
      <Card.Header>
        <Card.Title>My Card Title</Card.Title>
      </Card.Header>
      <Card.Content>
        <p>Card content goes here</p>
      </Card.Content>
    </Card>
  )
}

Search Input Usage

import { SearchInput } from '@seplan/diti-ds'

function MyComponent() {
  const handleSearch = (value: string) => {
    console.log('Searching for:', value)
  }

  return (
    <SearchInput
      placeholder="Search..."
      onSearch={handleSearch}
      debounceMs={300}
    />
  )
}

Using Hooks

import { useClipboard, useMediaQuery } from '@seplan/diti-ds'

function MyComponent() {
  const { copy, copied } = useClipboard()
  const isMobile = useMediaQuery('(max-width: 768px)')

  const handleCopy = () => {
    copy('Text to copy')
  }

  return (
    <div>
      <button onClick={handleCopy}>
        {copied ? 'Copied!' : 'Copy Text'}
      </button>
      {isMobile && <p>Mobile view</p>}
    </div>
  )
}

Using Utilities

import { cn, formatCurrency, formatDate } from '@seplan/diti-ds'

function MyComponent() {
  const className = cn(
    'base-class',
    'conditional-class',
    { 'active': true }
  )

  return (
    <div className={className}>
      <p>Price: {formatCurrency(1234.56)}</p>
      <p>Date: {formatDate(new Date())}</p>
    </div>
  )
}

Development

Setup

git clone <repository-url>
cd diti-ds
npm install

Development Commands

# Start development server
npm run dev

# Build library
npm run build:lib

# Build types
npm run build:types

# Start Storybook
npm run storybook

# Build Storybook
npm run build-storybook

# Lint code
npm run lint

# Format code
npm run format

Publishing

# Publish patch version
npm run publish:patch

# Publish minor version
npm run publish:minor

# Publish major version
npm run publish:major

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

License

MIT