Repository navigation
Release v4.32.0
The first of the foundation composites of the blueprint spec (Part B 4): the shared machinery every one of them uses, and the first four components, so the later ones are only their own shape.
Added
- Foundation components in
@cratis/scene.blueprint.defaultunderfoundation/:emptyState,statCard,trendChipandstatusChip, registered, categorised (CMP1: Feedback / Data display), described with property descriptors (data properties accept a query result, a data context or a component output - they declare a shape, never values) and iconed. - The five standard states of Part B 1.4 as one frame,
FoundationFrame: a skeleton while loading (announced,prefers-reduced-motionrespected), an explanation with the primary action when empty, a message with a retry on error, what is missing and none of the data when the user has no permission, and the loaded part with the failed regions named when partial. Astateproperty forces a state for previews; otherwise the state followsloading,error,forbiddenandfailedRegionsand whether the component has data. - Cross-cutting rules of Part B 1.5 in shared helpers: every text a component says comes from a strings table merged with the element's
strings(localization), numbers, currency and dates are formatted withIntlfor the element'slocale, direction-sensitive CSS uses logical properties (right to left),densitycomfortable/compact, and every action control takes an enabled/disabled/hidden permission rule (ActionButton; disabled stays visible and says why). - Theme tokens
status.{success,warning,danger,info}{Color,Background}in both shipped themes, and the foundation section of the stylesheet, built only from theme tokens and one spacing scale. FoundationStatesand Storybook stories showing every state in the light and dark themes (and right to left).- Specifications: every component in every state audited with axe-core (WCAG 2.2 AA), no data leaked in the no-permission state, state derivation, strings, locale, right to left, permission rules, and a stylesheet scan that fails on a hard-coded color or spacing.
yarn test:browserruns a Chromium audit at desktop, tablet and phone widths in both themes with colour contrast enabled (it found and fixed a contrast failure on the trend comparison). - Docs:
blueprints/foundation-components.md, status tokens inblueprints/theme-tokens.md.
Changed
- The foundation set lives in the published
@cratis/scene.blueprint.defaultrather than a newblueprint.foundationpackage: a brand-new npm package cannot be published by the release workflow until a trusted publisher is configured for it on npm, and a failed publish fails the run for every other change. The code sits in its ownfoundation/folder with its own barrel, so moving it into a package later is mechanical. - The light theme's
text.mutedColoris#5b6472(was#6b7280), which keeps muted text AA-contrast on the page background as well as on cards.
Part of #105