Design system / Molecules
Molecule / Member management
MemberCounts
MemberCounts places each account-status label beside its number in compact controls. Whole label/value pairs wrap naturally. Counts cover the full saved list, not a filtered page.
Live example
Current component with fictional data. Example changes are not persisted.
Selected filter: all. Counts remain global.
This local control demonstrates the Total border only. It adds no invitees. Reduced-motion preferences hide the animated border.
Responsibility
Labeled values and filter-opening buttons form one summary interaction. Counting policy is a pure members-owned model, not foundation UI.
Public contract
The table describes supported inputs, exported parts and caller responsibilities. A callback supplies a command, such as saving a draft. These notes are maintained manually; check current source types before integration.
| Prop / part | Type | Requirement | Responsibility |
|---|---|---|---|
| counts | MemberCounts | Required | Full-scope totals, never a filtered page. |
| unavailable | boolean | Optional | Unavailable counts are not shown as zero. |
| highlightVersion | number | Optional; 0 | Increment a positive version to replay the saved-addition border on Total. Do not increment for initial loading, failed additions or all-existing batches. |
| onSelect | (filter, trigger) => void | Optional | Open a directory filter and retain the actual focus-return target. |
API notes are curated documentation, not generated types. The source linked above is the current implementation; update these notes alongside API changes.
State and behavior
Identify which values the caller controls and which behavior the component or underlying primitive owns. A local example does not supply persistence, authorization or a complete product lifecycle.
Saved total equals linked plus unclaimed plus unknown. Pending writes are excluded. An inactive/excluded display flag never changes account linkage. Unknown appears separately when a saved assignment's linkage cannot be verified.
Dependencies
- Button
- Text
- MemberCounts data model
Token and styling contract
These notes identify theme roles, utilities and direct style values used by the source. Direct colors or timings are implementation exceptions, not recommendations to bypass the theme.
ghost / sm Button / text-supporting / tabular-nums- Labeled Total, Linked members and Unclaimed controls with inline values, fluid supporting size and stable digit alignment; not count panels.
flex-wrap / gap-x-2 / gap-y-1- Keep each label/value pair together and wrap whole controls as available width changes. An optional unknown-linkage control uses the same row.
pointer-coarse:min-h-11- Coarse-pointer controls retain at least 44px-high targets without changing font size.
border-success / animate-success-border / motion-reduce:hidden- An aria-hidden, non-interactive border overlay fades over three seconds using existing motion primitives. It changes neither layout nor focus; reduced-motion preferences hide the cue.
Boundaries and limitations
- No account acceptance, delivery or permission meaning is inferred.
- A future server-paged API must supply aggregate totals; this composition currently receives the full authorized list.
Where to make a change
Change count semantics in member-directory-model.ts and presentation here. Do not classify pending optimistic rows as saved unclaimed accounts.
Selected real uses
MemberManager
Summary cells open the directory on a status filter and capture the actual focus-return target.
src/components/members/memberManager.tsxMemberDirectorySheet
The drawer repeats global counts while search/status narrow its rows.
src/components/members/memberDirectorySheet.tsxThese traces describe selected uses, not every dependency. Repository-only paths are shown as references; only approved files have public source views.
Usage contract
<MemberCounts counts={countMembers(members)} onSelect={(filter, trigger) => openDirectory(filter, trigger)} />Illustrative consumer bindings, not a self-contained product workflow. Live examples supply only local state or explicit fictional props.