Money input · wallet before → after
Signed money with its currency: Debit (the default, as on the ticket wallet box) or Credit, the settlement currency, and the wallet balance before → after. A debit can never take a wallet below zero.
Covers: money-input primitive, money-input designer. Exports: MoneyInput.
Anatomy
The component as it sits in the product: English, compact, real data shapes.
States
7 states, left to right, top to bottom. A mock poll never finishes, so each state is drawn on purpose.
Density
Compact (2b ultra, the default) and comfortable, side by side. Same markup, only the density tokens change.
English · 中文
Staff pick en or cn (T001 Q25). Labels arrive localised; CJK falls back to PingFang SC / Noto Sans SC.
Long string · permission denied
The long-string case (PL-063) and what a role without the permission sees (the server decides; T003).
Both apps
One @rj/admin-kit component, two themes: the Laravel admin (navy pinned) and the DTC admin (kit v4 Midnight green), by token swap only.
Contract
The @rj/admin-kit API for this family. Mirrored in CONTRACT.md.
- Export
MoneyInput·@rj/admin-kit- Props
amount(minor units) ·currency·directiondebit|credit ·balance·min/max- States
- empty · focus · valid · over-balance · loading · disabled · read-only
- shadcn / Radix
- Input + Select (currency) + ToggleGroup
- Package underneath
- react-hook-form · zod · Intl.NumberFormat
- Accessibility
- label states the currency; the resulting balance is a polite live region
- API operations
- admin.billing.wallets.show · admin.billing.wallets.transactions.store · admin.tickets.wallet-transactions.store · admin.billing.surcharges.update
- Phone variant
- read-only preview; writes stay desktop
- Permission
- wallet