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

ui-library-csis

v2.0.25

Published

Vue 3 component library

Readme

📦 ui-library-csis

کتابخانهٔ کامپوننت‌های Vue 3 با تمرکز روی DX خوب، Tree-Shaking و سفارشی‌سازی مبتنی بر CSS Variables.

فهرست

ویژگی‌ها

  • ⚡️ ساخته‌شده با Vite و Vue 3
  • 🌲 Tree-Shaking و خروجی‌های ESM/UMD
  • 🎨 سیستم Theme با CSS Variables (لایت/دارک)
  • 🧩 مجموعه کامپوننت‌های پرکاربرد (Table, Popover, Toast, Grid/Flex و …)
  • 🧰 Types داخلی (خروجی dist-types/) برای IntelliSense بهتر

نصب

# npm
npm i ui-library-csis

# yarn
yarn add ui-library-csis

# pnpm
pnpm add ui-library-csis

پیش‌نیاز: vue@^3.3.0 (به‌عنوان peer نصب شود)


شروع سریع

main.ts

import { createApp } from 'vue'
import App from './App.vue'

// استایل کتابخانه (یک‌بار در ورودی پروژه)
import 'ui-library-csis/style.css'

// ایمپورت گزینشی کامپوننت‌ها
import { BaseButton, BaseTable } from 'ui-library-csis'

createApp(App)
  .component('BaseButton', BaseButton) // ثبت سراسری (اختیاری)
  .component('BaseTable', BaseTable)
  .mount('#app')

App.vue

<script setup lang="ts">
import { BaseButton } from 'ui-library-csis'
</script>

<template>
  <BaseButton @click="() => alert('Hi')">سلام</BaseButton>
</template>

ایمپورت درختی

فقط همان چیزی را که نیاز دارید ایمپورت کنید:

import { BasePopover, BaseGrid, BaseGridItem } from 'ui-library-csis'

استایل و تم

  • استایل اصلی: با یک ایمپورت فعال می‌شود:

    import 'ui-library-csis/style.css'
  • کتابخانه از CSS Variables برای رنگ‌ها، فاصله‌ها، ترنزیشن‌ها و… استفاده می‌کند. برای سفارشی‌سازی، کافی‌ست مقادیر را override کنید:

    :root {
      --color-primary: #1e8759;
      --transition-fast: 120ms ease-in-out;
      --radius-md: 8px;
    }
  • حالت تاریک با اتریبیوت داده‌ای فعال می‌شود (اگر در پروژه‌ات این الگو را گذاشتی):

    <html data-theme="dark">…</html>

نکته: style.css شامل توکن‌ها (spacing/radius/typography/…)، theme لایت/دارک و فونت‌های تعریف‌شده در پکیج است.


TypeScript / IntelliSense

  • دکلریشن‌ها در مسیر dist-types/ منتشر می‌شوند و به‌صورت خودکار توسط IDEها شناخته می‌شوند.

  • اگر IntelliSense را نمی‌بینی:

    • پکیج را به آخرین نسخه به‌روزرسانی کن
    • VS Code → TypeScript: Restart TS Server
    • مطمئن شو moduleResolution پروژهٔ مصرف‌کننده با Vite سازگار است (مثلاً bundler، node16 یا nodenext).

وابستگی‌ها

این پکیج از برخی وابستگی‌ها به‌عنوان Peer استفاده می‌کند تا داخل باندل شما تکراری نشوند:

  • Peer Dependencies

    • vue ^3.3.0
    • (در صورت استفاده از آیکن‌ها) @tabler/icons-vue ^3
    • (برای پاپ‌اور/منو) @popperjs/core

اگر به آیکن/پاپ‌اور نیاز دارید:

npm i @tabler/icons-vue @popperjs/core

SSR / Nuxt

  • قابل استفاده در SSR/Nuxt 3.

  • اگر کامپوننتی از DOM/Window استفاده می‌کند، در Nuxt داخل <client-only> رندرش کن:

    <client-only>
      <BasePopover />
    </client-only>
  • style.css را در ورودی کلاینت ایمپورت کن.


Build و انتشار

اسکریپت‌ها (داخل پکیج):

{
  "scripts": {
    "dev": "vite --config vite.config.ts",
    "build": "vite build && vue-tsc -p tsconfig.types.json",
    "preview": "vite preview",
    "prepublishOnly": "npm run build"
  }
}

خروجی‌ها:

  • ESM: dist/ui-library.es.js
  • UMD: dist/ui-library.umd.js
  • CSS: dist/style.css (با اکسپورت ui-library-csis/style.css)
  • Types: dist-types/index.d.ts

انتشار:

npm version patch
npm publish --access public

مطمئن شو در package.json:

  • publishConfig.access = "public"
  • فیلد exports شامل مسیر ./style.css و types از dist-types است
  • vue داخل peerDependencies و (برای بیلد) در devDependencies وجود دارد

مشارکت

  • باگ/پیشنهاد: لطفاً Issue باز کنید.
  • Pull Request ها خوش‌آمدند ✨

مجوز

MIT — از استفاده لذت ببر 🙌