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

@gsc-basic/components

v1.1.11

Published

Web Components for GSC Basic Team

Readme

@gsc-basic/components 开发说明

使用 Vite 以 library mode 构建,默认样式体系为 UnoCSS。

目录结构(核心)

packages/components
  index.js                    # 包入口(默认导出 install + re-export src/index.js)
  index.d.ts                  # 类型入口
  package.json
  vite.config.mjs             # library build 配置
  uno.config.mjs              # 本包 UnoCSS 配置

  src/
    index.js                  # 组件库对外导出入口
    styles/tokens.css         # 设计变量
    hooks/                    # 内部 hooks(如 useLocale、useNamespace)
    locale/                   # 语言能力导出

    <ComponentName>/          # 对外组件(示例:Grid/、ConfigProvider/ 等)
      index.js                # withInstall 包装导出
      src/*.vue               # 组件实现

  stories/**/*.stories.js     # Storybook stories
  docs/*.md                   # 组件文档

新增“对外组件”的推荐流程

  1. 建目录:packages/components/src/<ComponentName>/src/

  2. 新建组件文件(命名保持与目录一致,例如 index.vue<ComponentName>.vue)。

  3. 写导出文件:packages/components/src/<ComponentName>/index.js

推荐模板:

import { withInstall } from '@gsc-basic/utils';
import Comp from './src/<ComponentName>.vue';

export const GscComponentName = withInstall(Comp);
export default GscComponentName;
  1. packages/components/src/index.js 里 re-export:
export * from './<ComponentName>';
  1. 增加 Storybook:packages/components/stories/<ComponentName>.stories.js

Storybook / stories 编写规范

  • stories 目录:packages/components/stories/**/*.stories.js
  • 对外组件在 stories 中推荐从 @gsc-basic/components 引入(走真实导出路径)

单独引入 Transition 样式

发布后可按子路径单独引入 Transition 样式:

import '@gsc-basic/components/transition/style.css';

组件文档索引

内部组件文档

公开组件文档

组件文档请参考: https://gsc-basic.lenovo.com/gsc-docs/zh_CN/gsc_basic/vue/components.html

Author & License

This package is maintained by Lenovo SSG BASD. It is distributed under the LicenseRef-Proprietary license; see LICENSE for details.