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

francis-component-react

v0.0.8

Published

基于 arco-design 组件库的 react 组件库,用于扩充 arco-design 组件库的功能

Downloads

207

Readme

Francis Component React

npm version License: MIT TypeScript

基于 Arco Design 组件库的 React 组件库,用于扩充 Arco Design 组件库的功能。

✨ 特性

  • 🎨 基于 Arco Design 设计语言
  • 📦 开箱即用的高质量 React 组件
  • 🛡 使用 TypeScript 开发,提供完整的类型定义文件
  • 📖 完整的 Storybook 文档
  • 🎯 支持按需加载
  • 🌍 国际化语言支持

📦 安装

# npm
npm install francis-component-react

# yarn
yarn add francis-component-react

# pnpm
pnpm add francis-component-react

🔨 使用

import { Container, TagEllipsis, AsyncButton, TooltipButton } from 'francis-component-react';

function App() {
  const handleAsyncClick = async () => {
    // 模拟异步操作
    await new Promise(resolve => setTimeout(resolve, 2000));
  };

  return (
    <Container direction="vertical">
      <TagEllipsis maxTag={3}>
        <span>标签1</span>
        <span>标签2</span>
        <span>标签3</span>
        <span>标签4</span>
      </TagEllipsis>
      
      <AsyncButton onClick={handleAsyncClick} type="primary">
        异步按钮
      </AsyncButton>
      
      <TooltipButton tooltip="这是一个带提示的按钮" placement="top">
        提示按钮
      </TooltipButton>
    </Container>
  );
}

export default App;

📚 组件列表

布局组件

  • FlexibleContainer - 灵活的容器组件
    • Container - 基础容器
    • ContainerFixed - 固定尺寸容器
    • ContainerShrink - 可收缩容器

数据展示

  • TagEllipsis - 标签省略组件,支持响应式显示和省略
  • TextEllipsis - 文本省略组件,支持单行和多行文本省略

交互组件

  • ContextMenu - 右键菜单组件
  • AsyncButton - 异步按钮组件,支持异步操作时自动显示加载状态
  • TooltipButton - 带提示的按钮组件,基于 Arco Design 的 Tooltip 组件

🔗 链接

🤝 参与贡献

我们欢迎所有的贡献。

你可以将任何想法作为 Pull RequestGitHub Issue 提交。

🛠 开发

环境要求

  • Node.js >= 16
  • pnpm >= 7

本地开发

# 克隆项目
git clone https://github.com/francisxihe/francis-component-react.git

# 进入项目目录
cd francis-component-react

# 安装依赖
pnpm install

# 启动 Storybook 开发服务器
pnpm dev:storybook

# 构建组件库
pnpm build

# 运行测试
pnpm test

# 代码格式化
pnpm format

# 代码检查
pnpm eslint

添加新组件

# 使用脚本创建新组件
pnpm add:component -- YourComponentName

项目结构

francis-component-react/
├── components/          # 组件源码
│   ├── ComponentName/
│   │   ├── index.tsx   # 组件主文件
│   │   ├── style/      # 组件样式
│   │   ├── demo/       # 组件示例
│   │   └── __test__/   # 组件测试
│   └── index.tsx       # 组件导出
├── stories/            # Storybook 文档
├── types/             # TypeScript 类型定义
└── tests/             # 测试配置

📄 许可证

MIT

🙏 致谢

感谢 Arco Design 团队提供的优秀设计系统和组件库。