v0.148.0
Minor Changes
-
#1255
c5a1eee4Thanks @tenphi! - Align the API of all form input components aroundisInvalid/isValid.- Every input component now accepts
isInvalidandisValidbooleans instead ofvalidationState.Form,DialogFormand the legacyFieldaccept them too. validationStatestill works but is deprecated. It is normalized intoisInvalid/isValidat the edge and logs a deprecation warning in development.- Explicit validation props now take precedence over the state derived from the form. Previously form-derived state could override an explicitly passed prop.
useFieldPropsis now the single entry point for input components — it appliesuseProviderPropsanduseFormPropsinternally. Calling them explicitly is still supported but no longer necessary.TextInputBasebecame purely presentational, which removes a duplicate field registration in the text input family. As a resultSearchInputno longer registers with a surroundingForm— likeSearchComboBox, it is a standalone control rather than a form field. UseTextInputorComboBoxwhen you need a form-attached field.- Fixed
DateInputnever rendering the valid state. It forwarded only the invalid state to its input chrome, so neither an explicit valid prop nor a form-derived valid state (showValid) produced the valid styling or the check icon. - Every input component now renders the valid state, not just the invalid one.
Checkbox,SwitchandRadiogained valid fill and border styling (Switchalso gained the matching invalid fill when checked),PickerandFilterPickergained the validation suffix icon thatSelectalready had, andFileInput,Slider,RangeSliderandTextInputMapperrender validation state at all for the first time — they previously acceptedisInvalid/isValidand ignored them. - New exports for building input components:
resolveValidationProps,useValidationProps,getValidationMods,getValidationTheme,getValidationIcon,hasValidationIndicatorand<ValidationIndicator>. - Removed the unused
extractFieldWrapperPropshelper.
- Every input component now accepts