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

@composy/attendance-core

v0.0.1

Published

考勤组件 - 打卡状态可视化与考勤统计面板

Readme

@composy/attendance-core

框架无关的考勤核心包,提供考勤日历、打卡面板、统计面板、请假面板、状态工具和演示数据生成器。

特性

  • 考勤日历:月份切换、回到今天、选中日期、状态图例、排班展示和键盘可访问点击。
  • 打卡面板:自动判断上班/下班打卡,支持默认地点、打卡方式、禁用态、打卡记录回调。
  • 统计面板:出勤率、准点率、异常次数、工作时长、请假余额。
  • 请假面板:假期余额进度、请假记录、审批状态、记录点击回调。
  • 样式规范:所有组件 class 使用 ldesign-attendance-* 前缀;颜色使用 packages/color 生成的 --ld-* 变量,尺寸使用 packages/size 生成的 --ld-* 变量。
  • 产物:distesesmlib 四套目录,包含 JS、声明文件和 CSS。

使用

import {
  createAttendanceCalendar,
  generateMonthRecords,
  generateSchedules,
  getCurrentMonth,
} from '@composy/attendance-core'
import '@composy/attendance-core/index.css'

const month = getCurrentMonth()

const calendar = createAttendanceCalendar({
  container: '#calendar',
  month,
  records: generateMonthRecords(month),
  schedules: generateSchedules(month),
  showShift: true,
  selectedDate: `${month}-01`,
  onDateClick(date, record) {
    console.log(date, record)
  },
})

calendar.nextMonth()

公开入口

  • @composy/attendance-core:核心 API 与类型。
  • @composy/attendance-core/index.css:完整组件样式。
  • @composy/attendance-core/style:样式子路径。
  • @composy/attendance-core/core/*theme/*utils/*types:按需子路径。

验证

pnpm --filter @composy/attendance-core type-check
pnpm --filter @composy/attendance-core build

License

MIT