0.9.1-alpha.36
Alpha@xaui/native@0.9.1-alpha.36
Patch Changes
-
f38983f:
InputbecomesTextField,InputGroupbecomesFieldGroupBreaking, and deliberately taken now: the package is on the alpha line, so this costs a changeset rather than a major. Seven planned components are described in terms of this field —
NumberInput,PhoneNumberInput,SearchInput,DateInput,BottomSheetInput— and each one written before the rename would have been written against a name about to move.Inputwas never the right name here. The root is not the thing you type into: it is the column that holds a label, a field, a hint and an error, and keeps them in step.TextFieldsays that, and it leavesFieldfree to mean the one node that is actually aTextInput.TextInputwas the obvious candidate and is the one name to avoid. React Native exportsTextInputandTextInputProps, both imported by the field, the group's field and the text area. A publicTextFieldPropssitting beside React Native'sTextInputPropsis a name collision in every file that touches both, and a reader's coin flip in the ones that do not.FieldGrouprather thanTextFieldGroupfor the same reason the root droppedInput: the group decorates a field, and the field's own type is not its business.before after @xaui/native/input@xaui/native/text-field@xaui/native/input-group@xaui/native/field-groupInput,Input.FieldTextField,TextField.FieldInputGroup,InputGroup.IconFieldGroup,FieldGroup.IconuseInput,useInputGroupuseTextField,useFieldGroupInputProps,InputVariantTextFieldProps,TextFieldVariantinputRecipetextFieldRecipeThe slot names do not move.
TextField.Fieldstill stutters asTextFieldFieldinternally, and that was the trade taken: renaming the slot would have changed every call site that the rename otherwise leaves alone.InputOTPkeeps its name. It is not a text field with decoration, and nothing in it reads the field's context.