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

bu-max-ui

v0.1.3

Published

Enterprise UI component library for Web, Mobile, and Mini-app platforms

Readme

bu-max-ui

企业级 UI 组件库,支持 Web、移动端、小程序三端,基于 React + TypeScript 构建。

安装

npm install bu-max-ui
# 或
pnpm add bu-max-ui

快速上手

引入组件时需同步引入样式文件:

import { SkuInputCard } from 'bu-max-ui';
import 'bu-max-ui/style';

基础用法

import { useState } from 'react';
import { SkuInputCard } from 'bu-max-ui';
import 'bu-max-ui/style';

function App() {
  const [name, setName] = useState('');
  const [lang, setLang] = useState<'zh' | 'en'>('zh');

  return (
    <SkuInputCard
      mode="bilingual"
      name={name}
      onNameChange={setName}
      activeLang={lang}
      onLangChange={setLang}
      onDelete={() => setName('')}
    />
  );
}

按需引入

支持按平台路径单独引入,减少构建体积:

// Web 组件
import { SkuInputCard } from 'bu-max-ui/web';

// 移动端组件
import { ... } from 'bu-max-ui/mobile';

// 小程序组件
import { ... } from 'bu-max-ui/miniapp';

// 通用组件
import { ... } from 'bu-max-ui/shared';

组件列表

Web

| 组件 | 说明 | |------|------| | SkuInputCard | 商品规格名称输入卡片,支持单语 / 双语模式、拖拽排序、图片上传 | | Button | 按钮 | | Input | 输入框 | | Card | 卡片 | | Select | 选择器 | | Tooltip | 气泡提示 |

Mobile

| 组件 | 说明 | |------|------| | Button | 移动端按钮 | | Input | 移动端输入框 | | Card | 移动端卡片 | | TabBar | 底部导航栏 | | Navbar | 顶部导航栏 | | ActionSheet | 动作面板 | | Toast | 轻提示 |

小程序

| 组件 | 说明 | |------|------| | Button | 小程序按钮 | | Input | 小程序输入框 | | Card | 小程序卡片 | | TabBar | 底部导航栏 | | Navbar | 顶部导航栏 | | ActionSheet | 动作面板 | | Modal | 弹窗 | | Loading | 加载态 | | Toast | 轻提示 | | Cell | 单元格列表 |

SkuInputCard Props

| 参数 | 类型 | 默认值 | 说明 | |------|------|--------|------| | name | string | '' | 产品名称输入值 | | onNameChange | (value: string) => void | — | 名称变更回调 | | mode | 'single' \| 'bilingual' | 'single' | 单语或双语模式 | | activeLang | 'zh' \| 'en' | 'zh' | 双语模式下当前语言 | | onLangChange | (lang: 'zh' \| 'en') => void | — | 语言切换回调 | | showBody | boolean | true | 是否显示内容区域 | | error | boolean | false | 错误状态 | | onDelete | () => void | — | 点击删除按钮回调 | | onUpload | (file: File) => string \| Promise<string> | — | 自定义上传方法,返回图片 URL | | images | string[] | — | 外部托管的图片列表 | | id | string | — | 拖拽把手 id,供 DnD 库使用 | | className | string | — | 自定义类名 | | style | CSSProperties | — | 自定义样式 |

本地开发

# 克隆仓库
git clone <repo-url>
cd bu-max-ui

# 安装依赖
pnpm install

# 启动文档站(端口 3000)
pnpm dev

# 构建组件库
pnpm build:lib

# 监听模式(开发库时使用)
pnpm build:lib:watch

项目结构

├── lib/              # 组件库源码(npm 包)
│   ├── index.ts
│   ├── web/          # Web 平台组件
│   ├── mobile/       # 移动端组件
│   ├── miniapp/      # 小程序组件
│   ├── react/        # React 通用组件
│   └── shared/       # 共享工具 / 组件
├── src/              # 文档站源码
│   ├── pages/        # 各组件演示页面
│   └── components/   # 文档站内部组件
└── dist/             # 构建产物(发布到 npm)

技术栈

  • 框架: React 19 + TypeScript
  • 构建: Vite 6(双模式:文档站 / 组件库)
  • 样式: Less(BEM 命名规范)
  • 文档站: React Router DOM 6 + Tailwind CSS v4

许可证

MIT