@@ -54,6 +54,16 @@ export interface SearchFieldRenderProps {
5454 * @selector [data-invalid]
5555 */
5656 isInvalid : boolean ,
57+ /**
58+ * Whether the search field is read only.
59+ * @selector [data-readonly]
60+ */
61+ isReadOnly : boolean ,
62+ /**
63+ * Whether the search field is required.
64+ * @selector [data-required]
65+ */
66+ isRequired : boolean ,
5767 /**
5868 * State of the search field.
5969 */
@@ -99,6 +109,8 @@ export const SearchField = /*#__PURE__*/ createHideableComponent(function Search
99109 isEmpty : state . value === '' ,
100110 isDisabled : props . isDisabled || false ,
101111 isInvalid : validation . isInvalid || false ,
112+ isReadOnly : props . isReadOnly || false ,
113+ isRequired : props . isRequired || false ,
102114 state
103115 } ,
104116 defaultClassName : 'react-aria-SearchField'
@@ -115,7 +127,9 @@ export const SearchField = /*#__PURE__*/ createHideableComponent(function Search
115127 slot = { props . slot || undefined }
116128 data-empty = { state . value === '' || undefined }
117129 data-disabled = { props . isDisabled || undefined }
118- data-invalid = { validation . isInvalid || undefined } >
130+ data-invalid = { validation . isInvalid || undefined }
131+ data-readonly = { props . isReadOnly || undefined }
132+ data-required = { props . isRequired || undefined } >
119133 < Provider
120134 values = { [
121135 [ LabelContext , { ...labelProps , ref : labelRef } ] ,
0 commit comments