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

@lillian10231023/o2-design-system-1

v0.1.12

Published

O2 Design System — React component library with fixed master layout, navigation, and design tokens

Readme

O2 组件库

这套组件库已经不是单纯的组件集合,而是可以直接开始生成页面的 O2 页面基础设施。

你现在可以怎么用

  • 直接用模版组件
    • O2BasicTemplate:普通页面、表单页、详情页、常规表格页
    • O2AppLayout:头部带 Tab + 筛选区 的筛选表格页
  • 用统一页面入口自动选模版
    • O2PageScaffold
  • 用规范查询函数拿页面计划
    • createO2PagePlan(...)
    • resolveO2PagePlan(...)

推荐起手方式

如果你要开始搭具体页面,优先从 O2PageScaffold 开始。

import {
  O2PageScaffold,
  Breadcrumb,
  Button,
  Table,
} from '@lillian10231023/o2-design-system-1'

export function DeliveryTablePage() {
  return (
    <O2PageScaffold pageType="table">
      <div style={{ display: 'grid', gap: 16 }}>
        <Breadcrumb
          items={[
            { key: 'workbench', label: '工作台' },
            { key: 'report', label: '投放报表' },
          ]}
          currentKey="report"
        />
        <div style={{ display: 'flex', justifyContent: 'space-between' }}>
          <Button>新建计划</Button>
        </div>
        <Table columns={columns} data={rows} rowKey="id" />
      </div>
    </O2PageScaffold>
  )
}

筛选表格页示例

当页面头部同时需要 Tab + 筛选区 时,直接声明为 filter-table

import {
  O2PageScaffold,
  DateRangePicker,
  Button,
  Select,
  Table,
} from '@lillian10231023/o2-design-system-1'

const mediaOptions = [
  { key: 'all', label: '全部媒体' },
  { key: 'gdt', label: 'AMS(广点通)' },
]

export function FilterTablePage() {
  return (
    <O2PageScaffold
      pageType="filter-table"
      hasTabs
      hasFilters
      tabs={[
        { key: 'overview', label: '概览' },
        { key: 'detail', label: '明细' },
      ]}
      filters={
        <>
          <Select
            options={mediaOptions}
            ariaLabel="媒体筛选"
            listAriaLabel="媒体筛选选项"
          />
          <DateRangePicker ariaLabel="日期范围筛选" calendarAriaLabel="日期范围面板" />
          <Button>查询</Button>
        </>
      }
    >
      <Table columns={columns} data={rows} rowKey="id" />
    </O2PageScaffold>
  )
}

页面生成计划查询

如果你的页面生成流程需要先判断模版、推荐组件和约束,可以先读取计划对象:

import { createO2PagePlan } from '@lillian10231023/o2-design-system-1'

const plan = createO2PagePlan({
  pageType: 'filter-table',
  hasTabs: true,
  hasFilters: true,
})

console.log(plan.template.componentName)
console.log(plan.composition?.requiredComponents)
console.log(plan.constraints)

当前封装结论

  • 开始生成页面时,优先使用 O2PageScaffold
  • 需要精细控制时,直接使用 O2BasicTemplate / O2AppLayout
  • 需要先跑规则判断时,使用 createO2PagePlan
  • 命中现有 O2 组件时,只替换业务内容,不修改组件结构与视觉规范。