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

@wuliangyu/ui

v0.5.0

Published

Hoson 统一 UI 组件库 - 基于 shadcn/ui + TanStack Table 的二次封装

Readme

@merchant/ui

Hoson 统一 UI 组件库,基于 shadcn/ui + TanStack Table 的二次封装。

安装

# 配置 GitLab npm registry(一次性)
echo "@hoson:registry=https://git.hoson.com/api/v4/packages/npm/" >> .npmrc

# 安装
pnpm add @merchant/ui

使用

import { Button, DataTable, DataTableColumnHeader, cn } from "@merchant/ui"

DataTable 示例

import { DataTable, DataTableColumnHeader } from "@merchant/ui"
import type { ColumnDef } from "@tanstack/react-table"

interface Product {
  id: string
  name: string
  price: number
  status: "draft" | "published"
}

const columns: ColumnDef<Product>[] = [
  {
    accessorKey: "name",
    header: ({ column }) => <DataTableColumnHeader column={column} title="产品" />,
  },
  {
    accessorKey: "price",
    header: ({ column }) => <DataTableColumnHeader column={column} title="价格" />,
  },
]

export function ProductTable({ data }: { data: Product[] }) {
  return (
    <DataTable
      columns={columns}
      data={data}
      searchableColumns={[{ id: "name", placeholder: "搜索产品..." }]}
    />
  )
}

Peer Dependencies

使用前需确保项目中已安装:

  • react >= 18
  • react-dom >= 18
  • tailwind-merge >= 2
  • lucide-react >= 0.400
  • @tanstack/react-table >= 8(使用 DataTable 时)

Tailwind CSS 配置

在消费项目的 Tailwind 配置中包含组件库的路径:

// tailwind.config.ts 或 CSS 中
@source "../node_modules/@merchant/ui/dist";

包含组件

基础 UI

Button, Badge, Input, Label, Card, Dialog, DropdownMenu, Select, Checkbox, Table, Skeleton, Tooltip, Popover, Command, Sheet, Separator, Breadcrumb, Avatar, Sidebar...

业务组件

  • DataTable - 统一表格(排序/筛选/分页/行选择/空状态/加载态)
  • DataTableColumnHeader - 可排序列头
  • DataTablePagination - 分页控制
  • DataTableToolbar - 工具栏(搜索/筛选/列显隐)
  • DataTableFacetedFilter - 分面筛选
  • DataTableViewOptions - 列显隐切换

开发

pnpm install
pnpm dev    # 监听模式构建
pnpm build  # 生产构建