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

@khalisfood/partner-dashboard

v1.0.7

Published

Shared partner dashboard with stat cards, charts, filters, and profit calculator for React apps

Readme

@khalisfood/partner-dashboard

Shared partner dashboard component with stat cards, charts, filters, and profit calculator. Designed to be used across multiple frontend apps that share common partner-related UI.

Install

npm install @khalisfood/partner-dashboard

Quick Start

import { Dashboard } from "@khalisfood/partner-dashboard";

function MyPage() {
  return (
    <Dashboard
      stats={{
        newCustomers: 7,
        ordersCount: 12,
        revenue: 1500,
      }}
      chartData={{
        orders: [
          { date: "10 Apr", count: 5 },
          { date: "13 Apr", count: 3 },
        ],
        customers: [
          { date: "10 Apr", count: 4 },
          { date: "13 Apr", count: 3 },
        ],
        revenue: [
          { date: "10 Apr", amount: 800 },
          { date: "13 Apr", amount: 700 },
        ],
      }}
    />
  );
}

Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | stats | DashboardStats | required | Data for stat cards | | chartData | DashboardChartData | required | Data for all charts | | profitPercent | number | 10 | Profit percentage (0–100) | | onProfitChange | (value: number) => void | — | Called when profit slider/input changes | | currency | string | "AZN" | Currency code for formatting | | isDark | boolean | false | Dark mode | | filterState | DashboardFilterState | — | If provided, shows filter UI | | onFilterChange | (filters) => void | — | Called on every filter change | | onFilterApply | (filters) => void | — | Called when Apply is clicked | | onFilterReset | () => void | — | Called when Reset is clicked | | onOrdersClick | () => void | — | Called when Orders stat card is clicked | | onCustomersClick | () => void | — | Called when New Customers stat card is clicked | | DatePickerComponent | ComponentType<DatePickerProps> | — | Custom date picker component | | className | string | — | CSS class for root container |

Types

interface DashboardStats {
  newCustomers: number;
  ordersCount: number;
  revenue: number;
}

interface DashboardChartData {
  orders: { date: string; count: number }[];
  customers: { date: string; count: number }[];
  revenue: { date: string; amount: number }[];
}

interface DashboardFilterState {
  dateRange: {
    fromDate: Date | undefined;
    toDate: Date | undefined;
  };
  profitPercent: number;
}

interface DatePickerProps {
  value: Date | undefined;
  onChange: (date: Date | undefined) => void;
}

Custom DatePicker

The package uses a native <input type="date"> by default. To use your own DatePicker (e.g. shadcn), pass it via DatePickerComponent:

// If your DatePicker already uses value/onChange:
<Dashboard DatePickerComponent={DatePicker} />

// If it uses different prop names, create a wrapper:
function AppDatePicker({ value, onChange }) {
  return <MyDatePicker date={value} onSelect={onChange} />;
}

<Dashboard DatePickerComponent={AppDatePicker} />

Individual Components

Components can also be imported separately:

import {
  StatCard,
  ProfitCard,
  OrdersChart,
  CustomersChart,
  RevenueChart,
  Filters,
  formatCurrency,
} from "@khalisfood/partner-dashboard";

Development

npm install
npm run build
npm run dev        # watch mode

License

MIT © Khalis Food