0.9.1-alpha.26
Alpha@xaui/native@0.9.1-alpha.26
Patch Changes
-
2f8a9bd: feat(input-group):
InputGroup— a field with something beside itA glyph, a unit, a reveal toggle.
InputGroupgoes inside anInputand replaces nothing but the field: the column, the label, the hint, the error, the four variants, thesize, theradius, the tint, the focus,isInvalidandisDisabledall stay theInput's, and this root owns exactly one thing — how wide its two decorators turned out to be.The box is still the
TextInput.InputGroup.PrefixandInputGroup.Suffixare taken out of flow and laid over the field, so no wrapper borrows the border, the fill, the radius and the shadow: there is one box in the library and this is not a second one to keep in step. The field clears them by their measured width instead —paddingStartandpaddingEnd, logical edges (R13) — which is the same shapeTextAreauses forrows: a raw value the slot turns into a style, outside the cache (R6). A width takes as many values as there are decorators and could never be a cache key.isDecorativedoes the two things that belong together: touches pass through to the field underneath, and the content leaves the accessibility tree. It is off by default, because a suffix is most often a control and one that swallowed its own taps would be a reveal toggle you cannot press. A disabledInputtakes the touches from both decorators all the same.InputGroup.Iconis the slotButton,ChipandAlertalready have, and the one the reference implementation's component does not: a glyph one step above the field's type, in the theme'sfieldPlaceholder, so a form does not carry a hard-coded#888on every field.The
Input's recipe gains three slots —prefix,suffixandicon— because the size that decides the decorator's inset and the glyph's scale is the field's, and a group with an axis of its own would be a second answer to a question theInputhas already answered.Not one of the fifteen the 1.0 core is scoped to; recorded as P5.3.