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

@net-advantage/jo-ui-card-list

v1.1.7

Published

Readme

@net-advantage/jo-ui-card-list

Publishable generic card list. Bind a collection, supply a card template, and the list renders one card per item plus an optional dashed "new item" card (inset slightly from a full card). Cards flow left-to-right, then wrap (Z order), fill the container width, and sit on a transparent background. The list never scrolls itself; the host page or container owns scrolling.

A single click calls onSelect(item, index); pair it with selectedKey to highlight the selection.

Double-clicking a card (or pressing Enter/Space on it) opens a Dialog from @net-advantage/jo-ui-dialog in edit mode. The new item card opens it in create mode. The host supplies the dialog content.

<CardList
  items={journeyTypes}
  getItemKey={(item) => item.id}
  getItemLabel={(item) => item.title}
  renderItem={(item) => <JourneyTypeCard item={item} />}
  renderDialogContent={(context) =>
    context.mode === 'edit' ? <JourneyTypeForm value={context.item} /> : <JourneyTypeForm />
  }
  onDialogSubmit={(context) => save(context)}
  newItemLabel="New Type"
  showNewItem=true
/>

Return false from onDialogSubmit to keep the dialog open, for example after a validation failure.

Loading

Loading is off by default, so lists with local data never show it.

  • loading replaces the cards with a jo-ui-shadow card skeleton that matches the grid and minCardWidth. Use loadingCount to set how many placeholders, or renderLoading to supply your own.
  • dialogLoading shows a form skeleton inside the dialog and disables Save. Set it from onItemOpen / onNewItemOpen while the item's details are fetched.

MVVM

flowchart LR
  Props["CardListProps&lt;TItem&gt;"] --> ViewModel["useCardListViewModel"]
  Model["jo-ui-card-list.model.ts"] --> ViewModel
  ViewModel --> View["CardList.tsx"]
  View --> Dialog["jo-ui-dialog"]
  View -->|"loading"| Shadow["jo-ui-shadow"]
  View -->|"double click / Enter"| ViewModel
  ViewModel -->|"onSelect, onItemOpen, onNewItemOpen, onDialogSubmit, onDialogClose"| Host["Host application"]

| Layer | File | Responsibility | | --- | --- | --- | | Contract | jo-ui-card-list.types.ts | Generic props, dialog context, card and dialog view-models | | Model | jo-ui-card-list.model.ts | Class names, grid style, open keys, item entries, dialog title | | View-model | jo-ui-card-list.view-model.ts | Dialog state, open/close/submit handlers, card render state | | View | CardList.tsx | Render the grid, card frames, new item card, and dialog |

Models

flowchart TD
  Props["CardListProps&lt;TItem&gt;"] --> Entries["CardListEntry&lt;TItem&gt;[]"]
  Props --> Context["CardListDialogContext&lt;TItem&gt;"]
  Entries --> Cards["CardListCardViewModel[]"]
  Context --> DialogVm["CardListDialogViewModel"]
  Cards --> ViewModel["CardListViewModel"]
  DialogVm --> ViewModel
  • CardListDialogContext is { mode: 'edit', item, index } or { mode: 'create' }.
  • selectedKey marks one card with a selected border and aria-current.
  • getItemClassName adds per-item classes to the card frame.
  • minCardWidth (default 16rem) sets the minimum column width; columns grow to fill the row.
  • getItemLabel names cards for assistive technology and titles the edit dialog. Without it, the card content is the accessible name and the title is Edit item.
  • getDialogTitle overrides both dialog titles.

Structure

  • src: runtime component, model, view-model, types, and companion tests.
  • stories: Storybook stories for documentation and visual testing.

Publish footprint

This package publishes only:

  • dist
  • README.md

Stories and tests are excluded from the published artifact by design.