0.9.1-alpha.23
Alpha@xaui/native@0.9.1-alpha.23
Patch Changes
-
4467295: feat(input): the v1
Input— P3.7A text field with the label, the hint and the error that make it usable. Compound root plus four slots:
Input.Label,Input.Field,Input.DescriptionandInput.Error.The root is the column, not the field.
Input.Fieldis theTextInput, which is what makes the three lines slots of one component rather than three components a form has to keep in step — and whyTextInputPropsare on the field rather than on the root.The first real use of the theme's
field*family, derived in P0 and unread since. Four variants, the library's emphasis levels narrowed like theCard's, splitting the reference implementation's two-nameprimary | secondaryby saying what each of their ends already is:primaryis their field fill plus the theme'sfieldshadow,secondarytheir neutral fill and the default here,tertiarythe border alone,ghostneither.Focus darkens the border towards the mode's ink —
fieldBorderFocus, no ring and no accent.isInvalidoutranks it, so a field that is both reads as wrong rather than as busy.labelPlacement="inside"lifts the label into the box. It is taken out of flow and placed against the box's own padding, so the JSX is identical either way and nothing is reparented; the field pays for the room and the box grows by the same amount.Visually aligned with the reference implementation: a 48pt minimum, 12pt of horizontal padding, a 16/24 label above the field and a 14/20 line below it at
md. The height is a minimum rather than fixed — the one place this component departs from theButton's rule, because amultilinefield holds the user's own text and has to grow.Adds a
borderFocusrole tosystem/recipe, so a state can read the variant's own focus colour the waybgPressedlets a pressedButtondarken its own fill — and so a rawcolorfollows the field into focus.