@treasuryspatial/listing-kit
v0.2.1
Published
Treasury's listing primitives (React, styled-components 6): toolbar with search, views and filter bands, listing grid and empty state; a definition missing its metadata renders a visible contract failure.
Readme
@treasuryspatial/listing-kit
The listing toolbar, grid and empty state. React, styled-components 6, tokens only. The data behind a listing stays in the surface; this package renders its definition.
import { TreasuryListingToolbar, TreasuryListingGrid, TreasuryListingEmpty } from '@treasuryspatial/listing-kit';
<TreasuryListingToolbar title="Uploads" definition={{ searchPlaceholder: 'Search', views, filters }} onSearchChange={setQuery} />- Definition:
views(each with akind: class / action / mixed) andfilters(each with aband: class / action / more), rendered band by band. - Hard failure: a filter without a band or a view without a kind renders "Listing definition failure" with
the issues listed (
getTreasuryListingDefinitionIssues), never a partial toolbar. - Peers: React ≥ 18, styled-components ^6.1,
@treasuryspatial/surface-primitives,@treasuryspatial/treasury-design-tokens.
Release
npm ci
npm run build
npm testBump version and merge to main: the publish-npm workflow publishes it with npm trusted publishing. The
first version of a package that is not on npm yet is published once by hand by the scope owner (npm publish).
