diff --git a/packages/react-components/react-search/etc/react-search.api.md b/packages/react-components/react-search/etc/react-search.api.md index 35e030a97c5b08..10d58a3c439ee9 100644 --- a/packages/react-components/react-search/etc/react-search.api.md +++ b/packages/react-components/react-search/etc/react-search.api.md @@ -35,7 +35,9 @@ export type SearchBoxSlots = { }; // @public -export type SearchBoxState = ComponentState & Required> & Required>; +export type SearchBoxState = ComponentState & Required> & Required> & { + focused: boolean; +}; // @public export const useSearchBox_unstable: (props: SearchBoxProps, ref: React_2.Ref) => SearchBoxState; diff --git a/packages/react-components/react-search/src/components/SearchBox/SearchBox.types.ts b/packages/react-components/react-search/src/components/SearchBox/SearchBox.types.ts index 9716052f4899cc..e7589a14f1058c 100644 --- a/packages/react-components/react-search/src/components/SearchBox/SearchBox.types.ts +++ b/packages/react-components/react-search/src/components/SearchBox/SearchBox.types.ts @@ -22,4 +22,6 @@ export type SearchBoxProps = ComponentProps; */ export type SearchBoxState = ComponentState & Required> & - Required>; + Required> & { + focused: boolean; + }; diff --git a/packages/react-components/react-search/src/components/SearchBox/__snapshots__/SearchBox.test.tsx.snap b/packages/react-components/react-search/src/components/SearchBox/__snapshots__/SearchBox.test.tsx.snap index ff04dd5806b3ff..e20a9e1b847ed7 100644 --- a/packages/react-components/react-search/src/components/SearchBox/__snapshots__/SearchBox.test.tsx.snap +++ b/packages/react-components/react-search/src/components/SearchBox/__snapshots__/SearchBox.test.tsx.snap @@ -35,6 +35,7 @@ exports[`SearchBox renders a default state 1`] = ` aria-label="clear" class="fui-SearchBox__dismiss" role="button" + tabindex="-1" >