@laconius/ui
v0.1.0
Published
Laconius UI kit: the Kratos theme, runtime theming hooks, the component registry and the eight primitives.
Readme
@laconius/ui
The Laconius UI kit: the theme system and the eight dumb primitives. Never imports a feature package.
Public API
- Theme:
kratos(default, light + dark),defineTheme(complete theme, no inheritance),extendTheme(patch an existing one). Config:ui.themes,ui.defaultTheme,ui.colorScheme. - Hooks:
useTheme(),useStyles(createStyles)(memoisedStyleSheetper theme),useThemeSwitcher()(runtime theme + scheme switching, persisted). - Primitives:
Text,Button,Media(candidate-set resolution viauseMedia),Price(renders OCC'sformattedValue,Intlfallback),Divider,Spinner,EmptyState,QuantityStepper(clamps to min/max/stock; does not know what a cart is). - Registry:
ui.components— a closed, typed key space. Feature packages add keys by declaration merging; apps replace any component by key, and library code renders throughuseUiComponent(key, Fallback).
Interaction-state logic lives in UI-kit hooks (useMedia, useGallery, useQuantityStepper,
useProductCard); anything touching the server stays in feature hooks. See
spec chapter 07.
