@360crewing/ui
v0.3.0
Published
Shared UI primitives for 360crewing host and marketplace extensions.
Readme
@360crewing/ui
Pure visual UI primitives for the 360crewing platform. Used by the host
(tenant-frontend) and by marketplace extensions (via
@360crewing/marketplace-sdk, which re-exports this package).
Principles
- Presentational components only. No global state, managers, axios, or MobX stores. Everything is driven through props.
- No import-time side effects. Importing CSS is the only exception.
- Imperative platform services (Modal, Toast, Confirmation, Form) are NOT
here. They live in the host as services; extensions reach them only through
SDK hooks (
useModal,useNotify,useConfirm,useForm).
What's included
Forms & inputs: Button, TextField, TextareaField, CheckboxField,
ToggleField, DropdownButton, FormActionButtons.
Layout & presentation: Card, Page, LayoutBlock, ShadowedBlock,
Delimeter, InformationPanel, DetailItem, Badge (+ BadgeWithDot),
Icon.
State & navigation: ContentLoader, SkeletonLoader, CollapsibleFields,
Pagination.
i18n-aware components
Pagination, CollapsibleFields, and FormActionButtons accept their text
labels as props with English defaults. The host wraps them in thin i18n
adapters that call useTranslation() and pass localized strings down.
Extensions inject their own useI18n() from the SDK when using these
primitives directly.
Styles
Import the stylesheet once at the host entry point:
import "@360crewing/ui/styles.css";Peer dependencies
react, react-dom, mobx-react-lite, react-icons — provided by the host.
