@dset/business
v1.0.0
Published
DSET business components (Layer 3) — domain-agnostic compositions of @dset/ui + @dset/data + @dset/utils. Domain meaning is injected via props.
Readme
@dset/business
Layer 3 — business components: reusable compositions of @dset/ui primitives,
@dset/data hooks and @dset/utils helpers. They carry no domain vocabulary —
labels, columns, statuses and values are injected by the product via props.
Layer rule: business may import @dset/ui, @dset/tokens, @dset/utils, @dset/data.
Components
| Component | Composes | i3MS source (usage) |
| ------------------------------- | ------------------------------------- | --------------------------------------- |
| KpiCard | ui Skeleton | KpiCard (13 pages) |
| DataTable | ui Skeleton, EmptyState, Button | DataTable (12 pages) |
| ChartCard | ui Card | ChartCard (9 pages) |
| FilterBar + DateRangePicker | ui Button, utils FY helpers | FilterBar/DateRangePicker (5 pages) |
| ProfileCard | ui Badge | ProfileCard (3 pages) |
| InsightCard | ui Badge | InsightCard (2 pages) |
| StatusBadge | utils mapStatus + ui Badge | inline status maps (8 pages) |
Example — the layers composing
import { DataTable, StatusBadge } from '@dset/business';
import { formatWeight } from '@dset/utils';
const STATUS = { paid: { label: 'Paid', variant: 'success' } } as const;
<DataTable
aria-label="Passes"
rows={passes}
pageSize={25}
onExport={() => downloadRowsAsCsv('passes.csv', cols, passes)}
columns={[
{ key: 'pass_number', header: 'Pass #' },
{ key: 'weight', header: 'Weight', align: 'right', render: (r) => formatWeight(r.weight) },
{
key: 'status',
header: 'Status',
render: (r) => <StatusBadge value={r.status} map={STATUS} />,
},
]}
/>;pass_number, weight, status and the status map live in the product.
DataTable and StatusBadge know none of them.
Deferred (audited)
- Chart renderer (Chart.js wrapper) —
ChartCardis engine-agnostic (chart passed aschildren). Committing the platform to a charting library isn't validated yet; extract a<Chart>once a second product confirms the engine choice. MiniStat,ScoreRing,ReconciliationTable— ≤1 proven use / needs domain parameterization first.
Note:
Input/Selectwere promoted into@dset/uiin Phase 4 (proven by this component) —FilterBarandDateRangePickernow compose them.
