0.9.1-beta.100
Beta@xaui/native@0.9.1-beta.100
Patch Changes
-
a3a2a13: feat(select): the field gets its label, its hint and its error
Selecthad no label. It is a field — it sits on the line where aTextFieldwould, and its recipe is theTextField's token for token — so a form using one had to label it from outside the component: a second column to keep in step, and a label a screen reader never associates with the control.isInvalidmoved the border and nothing else could say why.The root is now the column, the
Autocomplete's shape: aViewthat stacksSelect.Label, the trigger andSelect.Description/.Errorwith onegap, so JSX order is screen order. The column, the label and the help lines resolve throughtextFieldReciperather than a second table, so a select and a text field stacked in one form read as one control.isInvalidturns the label and the descriptiondanger; it never mountsSelect.Error, which stays yours to write.The trigger points at the two slots through
aria-labelledbyandaria-describedby, so what is announced is what the field asked for rather than only the row that happens to be chosen. Mounting the slots is all it takes; your own is still the last word.disablednow dims the column once instead of dimming the trigger a second time inside it. The root takesref,style,asChildand R14's style props for that column; the control keeps its own onSelect.Trigger.Breaking, on the
betaline:Select.Labelis now the field's label. The heading over a run of rows inside the panel isSelect.GroupLabel— the two were one name, and the field's label is the one callers reach for. Rename the slot insideSelect.Content:<Select.Content> - <Select.Label>Langues</Select.Label> + <Select.GroupLabel>Langues</Select.GroupLabel>The recipe slot moved with it,
labeltogroupLabel, andSelectLabelPropsnow types the field label — the panel heading isSelectGroupLabelProps. The root also renders a node where it rendered none, so aSelectlaid out as a flex child is now that column rather than its trigger.