Components / lifecycle
StatusSelector
Selects a record's lifecycle status.
Generated from @oods/foundry 0.10.1
- Categories
- lifecycle
- Contexts
- form
- Readiness
proven-in-generated-apps
Playground
This component's contract doesn't list typed props, so the playground shows its documented example.
Documented example status-selector-controlled : choose draft, draft emitted once.
The render follows the page's theme switch: light, dark or high contrast. Both frameworks render the same example.
Events it emits: change, update. Use either render above, and each event shows here with the framework that sent it.
Code
The documented example. HTML is the markup the React component renders for it, which @oods/component-styles styles.
import { StatusSelector } from '@oods/components-react';
import '@oods/component-styles/css';
const options = [
"draft",
"active"
];
export function Example() {
return (
<StatusSelector
label="Status"
options={options}
value="active"
/>
);
}Props, slots and events
Contract version 1.1.0. Types are from the React declarations in @oods/components-react.
| Prop | Type | Required | Documented example |
|---|---|---|---|
help | string | undefined | no | |
label | string | undefined | no | Status |
title | string | undefined | no | |
options | readonly unknown[] | undefined | no | ["draft","active"] |
states | readonly unknown[] | undefined | no | |
value | string | undefined | no | active |
status | string | undefined | no |
Slots
default
Events
change, update
States
selected, unselected
Accessibility
- Role
combobox- How it gets its name
labelonselect
Keyboard
| Key | What it does |
|---|---|
| Tab | Move focus to the named native control |
Obligations in the contract
- Native select semantics inside a wrapper carrying data-summary-type=status-selector
- The label targets the select
Mirrors renderStatusSelector: a labelled select named status whose label reads label/title (default Status), whose options read options, then states (default draft/active/inactive; records read value/id/label, scalars render as text) and whose selection reads value, then status; authored children replace the control. The generic field lowers to value; a saved onChange binding owns a local string state in the React and Vue targets, so the select is controlled. optionsParameter, initialParameter and requireReasonParameter are consumed; allowedTransitionsField is consumed unbound because the renderer reads no transitions.
Tokens
The token roles this component reads.
input.backgroundinput.borderinput.textinput.focus
Readiness
The evidence recorded for this component, with its label.
proven-in-generated-apps: catalog_list gives this label when generated React and Vue apps in the runtime sweep that ships with this version both use the component. That sweep was measured on the published 0.4.1, not on this version.
| Evidence | React | Vue |
|---|---|---|
| state | implemented-evidence-complete | implemented-evidence-complete |
| versioned contract | passed | passed |
| target implementation | passed | passed |
| package export | passed | passed |
| public declaration | passed | passed |
| dependency closure | passed | passed |
| framework scenario | passed | passed |
| accessibility | verified | verified |
| interaction | verified | verified |
| visual themes | verified | verified |
Use your own
You can replace this component with your own React or Vue component. Map it, and generated code imports yours at the exact version you name. A contract report, run in a real browser, lists what your component met, what it didn't, and what wasn't checked.
The component_map call, with the parts in angle brackets yours to fill:
{
"action": "create",
"apply": true,
"externalSystem": "<your design system>",
"externalComponent": "<YourStatusSelector>",
"oodsTraits": [
"Stateful"
],
"substitution": {
"component": "StatusSelector",
"react": {
"package": "<your-package>/react",
"version": "<exact version>",
"export": "<YourStatusSelector>"
},
"vue": {
"package": "<your-package>/vue",
"version": "<exact version>",
"export": "<YourStatusSelector>"
}
}
} How this page was made
Generated at build from the published data, each source with the hash of what was read. The page's manifest.
- Contract:
@oods/component-contracts@0.10.1 componentContracts.StatusSelectorsha256:67045940ccc8… - Documented example:
@oods/component-contracts@0.10.1 sharedScenarios status-selector-controlledsha256:50e43ca05bb6… - Catalog entry (catalog_list):
generated/0.10.1/system/catalog.json StatusSelectorsha256:033864d17307… - React readiness:
@oods/components-react@0.10.1 readiness StatusSelectorsha256:a846d2280d25… - Vue readiness:
@oods/components-vue@0.10.1 readiness StatusSelectorsha256:b151594f0970… - Prop types:
generated/0.10.1/components/prop-types.json StatusSelectorsha256:d892fae5b68e…