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

@umamichi-ui/common-components

v0.1.0

Published

Reusable React UI components for Umamichi sites (overlay stack, dialogs, menus)

Readme

@umamichi-ui/common-components

以下内容为 LLM 生成,且未经人工检查,请谨慎对待

Umamichi 站点共用的 React UI 组件库,与 @umamichi-ui/common-css 配合使用。

各子模块可单独引用,彼此尽量解耦:

| 子路径 | 内容 | |--------|------| | @umamichi-ui/common-components/presence | 进出场动画 hook(不依赖叠层栈) | | @umamichi-ui/common-components/overlay | 叠层栈、SiteOverlayBackdrop | | @umamichi-ui/common-components/icons | Chevron、下拉箭头、信息图标 | | @umamichi-ui/common-components/menu | FloatingMenuMobileActionSheet | | @umamichi-ui/common-components/dialog | ConfirmDialogAboutDialog | | @umamichi-ui/common-components/styles.css | 本库补充样式(overlay、action sheet、about) |

依赖图

模块间单向依赖;presenceicons 为叶子模块,可被任意上层单独引用。

flowchart TB
  subgraph peer["Peer(消费方安装)"]
    react["react / react-dom"]
    commonCss["@umamichi-ui/common-css"]
  end

  subgraph pkg["@umamichi-ui/common-components"]
    presence["presence<br/>useOverlayPresence"]
    icons["icons<br/>Chevron · DropdownMenuChevron · InfoCircle"]
    overlay["overlay<br/>OverlayStackProvider · SiteOverlayBackdrop"]
    menu["menu<br/>FloatingMenu · MobileActionSheet"]
    dialog["dialog<br/>ConfirmDialog · ConfirmDialogOverlay · AboutDialog"]
    styles["styles.css"]
  end

  react --> presence
  react --> icons
  react --> overlay
  react --> menu
  react --> dialog

  commonCss -.->|"class 名约定"| styles
  styles -.-> overlay
  styles -.-> menu
  styles -.-> dialog

  presence --> overlay
  presence --> menu

  icons --> menu

  overlay --> menu
  overlay --> dialog

| 从 | 到 | 说明 | |----|-----|------| | presence | overlay | SiteOverlayBackdrop 进出场动画 | | presence | menu | FloatingMenu 面板淡入(不进叠层栈) | | icons | menu | 下拉箭头;ActionSheet 子菜单 Chevron | | overlay | menu | MobileActionSheet 底部 backdrop | | overlay | dialog | ConfirmDialogOverlay | | dialog(内部) | — | AboutDialogConfirmDialog + ConfirmDialogOverlay |

无库内依赖: ConfirmDialog(纯 markup 壳)、computeFloatingMenuGeometryOverlayStackProvider 自身逻辑。

menu 子模块内:FloatingMenu 只走 presenceMobileActionSheet 额外依赖 overlay

使用

import '@umamichi-ui/common-css';
import '@umamichi-ui/common-components/styles.css';
import { OverlayStackProvider } from '@umamichi-ui/common-components/overlay';

// 根组件
<OverlayStackProvider>
  <App />
</OverlayStackProvider>

MobileActionSheetConfirmDialogOverlay 需要外层已挂载 OverlayStackProviderFloatingMenu 仅需 presence hook,不进入叠层栈。

开发

npm install
npm run build

安装(npm 发布后):

npm install @umamichi-ui/common-components @umamichi-ui/common-css

本地联调可在消费项目中添加:

"@umamichi-ui/common-components": "file:../umamichi-ui/common-components"

发布

npm run build
npm publish --access public

版本记录见 CHANGELOG.md