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

jsg_simple_pat_selection

v1.0.4

Published

A React component for selecting passenger types and quantities with a clean, modern UI.

Readme

JSG Simple Passenger Selection

A React component for selecting passenger types and quantities with a clean, modern UI.

Installation

npm install jsg_simple_pat_selection

Importing

import 'jsg_simple_pat_selection/dist/index.css';
import { SimpleSelection } from 'jsg_simple_pat_selection';

Features

  • 🎨 Modern, clean UI with animations
  • 📱 Fully responsive
  • 🎯 Built-in validation
  • 🔧 Highly customizable
  • 🧪 Test mode for debugging

Data Flow

Inputs

The component accepts the following props:

  1. cart_id (required): Active cart ID (provided by parent)
  2. cart_group_id (required): Cart group ID (provided by parent)
  3. resource_id (required): Resource ID (provided by parent)
  4. stage_id (required): Workflow stage key (provided by parent)
  5. tenant (required): Tenant/brand identifier (provided by parent)
  6. mode (required): Run mode ("api"/"mock") (provided by parent)
  7. pat_type_id (required): Passenger type ID (provided by parent)
  8. setup_simpleSelection (optional): Optional UI overrides (embedded mode only)
    {
      title?: string;              // Main heading
      subtitle?: string;           // Subheading text
      descriptorSingular?: string; // Single item descriptor
      descriptorPlural?: string;   // Multiple items descriptor
    }
  9. onComplete: Callback function receiving selection data
    (data: {
      passengers: Array<{
        type: string;    // Passenger type name
        id: number;      // Unique identifier
        quantity: number // Selected quantity
      }>
    }) => void
  10. onBack: Callback function for back navigation
    () => void

Initial Data Structure

The store accepts an array of passenger types:

interface PassengerType {
  pat_sub_type: string;   // Display name
  id: number;             // Unique identifier
  description?: string;   // Optional tooltip text
  quantity: number;       // Initial quantity
  icon?: string;         // Icon identifier
}

Supported icons: 'user', 'users', 'baby', 'graduation-cap', 'heart', 'package', 'luggage', 'briefcase', 'warehouse', 'bike', 'surf', 'music', 'car', 'bus', 'truck', 'caravan', 'ship', 'dog'

Usage

Embedded Integration

import 'jsg_simple_pat_selection/dist/index.css';
import { SimpleSelection } from 'jsg_simple_pat_selection';

<SimpleSelection
  cart_id={/* number */}
  cart_group_id={/* number */}
  resource_id={/* number */}
  stage_id={/* string */}
  tenant="string"
  mode="api"
  pat_type_id={/* number */}
  setup_simpleSelection={{
    title: 'Select Passengers',
    subtitle: 'Select the number of passengers for your journey',
    descriptorSingular: 'Passenger',
    descriptorPlural: 'Passengers'
  }}
  onComplete={(data) => console.log('Complete:', data)}
  onBack={() => console.log('Back')}
/> 

Props

| Prop | Type | Default | Description | |------------------------|--------------------------------------------------------------------|------------------|--------------------------------------------------------| | cart_id | number | — | Active cart ID (provided by parent) | | cart_group_id | number | — | Cart group ID (provided by parent) | | resource_id | number | — | Resource ID (provided by parent) | | stage_id | string | — | Workflow stage key (provided by parent) | | tenant | string | — | Tenant/brand identifier (provided by parent) | | mode | string | — | Run mode ("api"/"mock") (provided by parent) | | pat_type_id | number | — | Passenger type ID (provided by parent) | | setup_simpleSelection? | { title?, subtitle?, descriptorSingular?, descriptorPlural? } | setup.json | Optional UI overrides (embedded mode only) | | onComplete | (data:{passengers:Array<{ type:string; id:number; quantity:number }>}) => void | () => {} | Callback when Continue clicked | | onBack | () => void | () => {} | Callback when Back clicked |

Default Setup Values (setup.json)

{
  "title": "Select Luggage",
  "subtitle": "Select the number of passengers for your journey",
  "descriptorSingular": "Luggage",
  "descriptorPlural": "Luggage Items"
}