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

@htmlbricks/hb-order-list

v0.76.5

Published

Order summary view driven by a payment JSON object: order number header, optional tracking area, list of line items with image and name, and a footer showing the order total including tax and optional shipment fee. Exposes the item image via the item_imag

Readme

hb-order-list — integrator guide

Category: commerce · Tags: commerce, order · Package: @htmlbricks/hb-order-list

Summary

hb-order-list is a read-only order summary for commerce flows. It renders a header with the order number, a list of line items (thumbnail and name), and a footer with the computed grand total. The view is driven by a payment payload (JSON string from HTML).

Layout uses Bulma container and columns. Theme via --bulma-* on :host; see Bulma CSS variables and extra/docs.ts.

Behavior

  1. Header — “Order N.” plus payment.orderNumber, and a static “tracking” label (placeholder in the current markup).
  2. Line items — For each payment.items row: product image (CSS part item_image), name, and a static “quantity” label (numeric quantity affects totals only).
  3. Footer — Static “cancel” and placeholder middle text (bbb in the template), plus total as {total}{currencySymbol}.

Totals: Subtotal = sum of unitaryPrice * (quantity ?? 1); tax = sum of line VAT rounded at the sum level; total = subtotal + tax + (shipmentFee ?? 0).

If payment is a string, it is JSON-parsed. Missing countryCode defaults to "IT". Missing currencySymbol is inferred from countryCode (IT / EU, US$).

Custom element tag

<hb-order-list …></hb-order-list>

Attributes (HTML / reflected props)

Web component attributes are strings (snake_case). Structured data is a JSON string on payment.

| Attribute | Role | |-----------|------| | id | Optional host id. | | style | Optional inline style on the host. | | payment | JSON string (or object when used from JS) describing OrderPayment (see types/webcomponent.type.d.ts). The implementation falls back to an empty in-memory default when omitted. |

Events

No custom events (Events is {} in types/webcomponent.type.d.ts).

CSS custom properties, parts, and slots

Documented variables (extra/docs.ts / styleSetup):

| Variable | Default | Notes | |----------|---------|--------| | --bulma-text | #363636 | Foreground for copy and totals. | | --bulma-scheme-main | #ffffff | Surface background. | | --bulma-column-gap | 0.75rem | Column gutter. |

| ::part | Role | |---------|------| | item_image | Line item <img> thumbnail. |

Slots: none.

TypeScript typings (authoring)

From types/webcomponent.type.d.ts (see that file for OrderPayment and line item shapes):

export type Component = {
  id?: string;
  style?: string;
  payment?: OrderPayment | string;
};
export type Events = {};

Minimal HTML

<hb-order-list
  payment='{"orderNumber":"1001","countryCode":"EU","items":[{"id":"1","name":"Sample item","unitaryPrice":10,"taxPercentage":22,"image":"https://example.com/product.jpg"}]}'
></hb-order-list>

With shipment fee:

<hb-order-list
  payment='{"orderNumber":"ORD-1002","countryCode":"EU","currencySymbol":"€","shipmentFee":4.99,"items":[{"id":"a","name":"Item A","unitaryPrice":5,"taxPercentage":7,"quantity":2,"image":"https://example.com/a.jpg"}]}'
></hb-order-list>