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

kupos-ui-components-lib

v7.0.10

Published

A reusable UI components package

Downloads

3,159

Readme

Service Item Package

A reusable React component for displaying service items in transportation and booking applications.

Installation

npm install kupos-ui-components-lib
# or
yarn add kupos-ui-components-lib

Usage

Using the KuposUIComponent

The KuposUIComponent is a versatile component that can render different UI components based on the typeOfComponent prop:

import { KuposUIComponent } from "kupos-ui-components-lib";
import "kupos-ui-components-lib/dist/styles.css"; // If you add CSS in the future

// Sample data
const serviceItem = {
  id: "12345",
  operator_details: [
    "https://example.com/logo.png", // logo URL
    "4.5", // rating
    "Operator Name", // operator name
  ],
  travel_date: "2025-08-01T09:00:00Z",
  arrival_date: "2025-08-01T12:00:00Z",
  dep_time: "09:00",
  arr_time: "12:00",
  available_seats: 5,
  seat_types: [
    { label: "Salon Cama", fare: 50 },
    { label: "Premium", fare: 75 },
    { label: "Economy", fare: 40 },
  ],
  offer_text: "Limited time offer: 20% off!",
  is_direct_trip: true,
};

function App() {
  return (
    <div>
      {/* Render Service Item */}
      <KuposUIComponent
        typeOfComponent="serviceitem"
        variant="desktop"
        serviceItem={serviceItem}
        onBookButtonPress={() => console.log("Book pressed!")}
      />
      
      {/* Render Payment Sidebar */}
      <KuposUIComponent
        typeOfComponent="paymentsidebar"
        variant="desktop"
        // Add payment sidebar specific props here
      />
      
      {/* Render Service List */}
      <KuposUIComponent
        typeOfComponent="servicelist"
        variant="mobile"
        // Add service list specific props here
      />
    </div>
  );
}

Using Individual Components

You can also use the individual components directly:

import { ServiceItemPB } from "kupos-ui-components-lib";

function App() {
  return (
    <div>
      <ServiceItemPB
        serviceItem={serviceItem}
        onBookButtonPress={() => console.log("Book pressed!")}
      />
    </div>
  );
}

Props

KuposUIComponent Props

| Prop | Type | Description | | --------------- | -------- | ---------------------------------------------------------- | | typeOfComponent | string | Type of component to render: "serviceitem", "paymentsidebar", or "servicelist" | | variant | string | "mobile" or "desktop" to specify the variant | | ...other props | various | All props required by the specific component type |

ServiceItem Props

| Prop | Type | Description | | --------------------- | -------- | -------------------------------------------- | | serviceItem | Object | The service item data object | | onBookButtonPress | Function | Callback for when the book button is pressed | | serviceDetailsLoading | boolean | Whether service details are loading | | t | Function | Optional translation function |

Development

# Install dependencies
npm install

# Build package
npm run build

License

MIT