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

amir-component

v1.0.3

Published

A Vue 3 component library with shared UI components, utilities, and theming support

Downloads

21

Readme

📚 نحوه استفاده از لایبری کامپوننت‌ها

🚀 نصب و راه‌اندازی

1. Build کردن لایبری:

npm run lib:build

2. Import کردن کامپوننت‌ها:

// Import از لایبری
import { BaseIcon, BaseBreadcrumb, CustomDataTable } from '@/lib/components';

// یا import مستقیم
import { BaseIcon } from '@/lib/components/shared/BaseIcon.vue';

🎯 مثال استفاده از BaseIcon

Template:

<template>
  <div>
    <!-- BaseIcon با کلیک -->
    <BaseIcon 
      icon="mdi-heart" 
      :emitFunc="handleIconClick" 
      :rowData="{ type: 'heart', message: 'Heart clicked!' }"
      class="text-red"
    />
    
    <!-- BaseIcon با تنظیمات -->
    <BaseIcon 
      icon="mdi-star" 
      :emitFunc="handleIconClick" 
      :rowData="{ type: 'star', message: 'Star clicked!' }"
      buttonClass="custom-button"
    />
  </div>
</template>

Script:

<script setup>
import { BaseIcon } from '@/lib/components';

// Function برای handle کردن کلیک
const handleIconClick = (data) => {
  console.log('Icon clicked:', data);
  // منطق سفارشی شما
};
</script>

📋 Props موجود در BaseIcon

| Prop | Type | Required | Default | Description | |------|------|----------|---------|-------------| | icon | String | ❌ | - | نام آیکون (مثل mdi-heart) | | buttonClass | String | ❌ | '' | کلاس CSS اضافی | | emitFunc | Function | ✅ | - | Function که هنگام کلیک اجرا می‌شود | | rowData | Object | ❌ | - | داده‌ای که به emitFunc پاس داده می‌شود |

🎨 استایل‌دهی

<BaseIcon 
  icon="mdi-settings" 
  :emitFunc="handleClick" 
  :rowData="{ type: 'settings' }"
  class="text-blue text-h4"
  buttonClass="custom-icon-button"
/>

🔧 کامپوننت‌های موجود در لایبری

Shared Components:

  • BaseIcon - آیکون کلیک‌پذیر
  • BaseBreadcrumb - نان برشی
  • CustomDataTable - جدول داده
  • DescriptionInput - ورودی توضیحات
  • MoneyInput - ورودی پول
  • PdfViewer - نمایش PDF
  • ShamsiDatePicker - انتخابگر تاریخ شمسی
  • UiChildCard - کارت فرزند
  • UiParentCard - کارت والد
  • VPriceTextField - فیلد قیمت

Common Components:

  • AppStepper - استپر برنامه
  • Loading - کامپوننت لودینگ

🚀 نحوه تست

  1. شروع dev server:

    npm run dev
  2. رفتن به داشبورد:

    • به صفحه داشبورد بروید
    • بخش "تست کامپوننت لایبری" را ببینید
    • روی آیکون‌ها کلیک کنید
    • در کنسول مرورگر پیام‌ها را ببینید

📝 نکات مهم

  • Auto-sync: تغییرات در src/components/ خودکار به src/lib/ کپی می‌شود
  • Watch mode: npm run lib:dev برای همگام‌سازی خودکار
  • Build جداگانه: npm run lib:build برای build لایبری
  • مخلوط نکنید: کامپوننت‌های اصلی و لایبری جدا هستند

🎉 مثال کامل

<template>
  <v-card>
    <v-card-title>
      <BaseIcon 
        icon="mdi-package-variant" 
        :emitFunc="handlePackageClick" 
        :rowData="{ package: 'amir-component' }"
        class="text-success mr-3"
      />
      تست لایبری
    </v-card-title>
    <v-card-text>
      <p>کامپوننت BaseIcon از لایبری با موفقیت import شده!</p>
    </v-card-text>
  </v-card>
</template>

<script setup>
import { BaseIcon } from '@/lib/components';

const handlePackageClick = (data) => {
  console.log('Package clicked:', data);
  // منطق سفارشی
};
</script>