diff --git a/.changeset/dark-cougars-go.md b/.changeset/dark-cougars-go.md new file mode 100644 index 0000000000..f835dd2658 --- /dev/null +++ b/.changeset/dark-cougars-go.md @@ -0,0 +1,5 @@ +--- +'@backstage/canon': patch +--- + +Add new SearchField component in Canon diff --git a/packages/canon/report.api.md b/packages/canon/report.api.md index 1b1e465a61..7ec51de753 100644 --- a/packages/canon/report.api.md +++ b/packages/canon/report.api.md @@ -27,6 +27,7 @@ import { ReactNode } from 'react'; import { RefAttributes } from 'react'; import type { RemixiconComponentType } from '@remixicon/react'; import { ScrollArea as ScrollArea_2 } from '@base-ui-components/react/scroll-area'; +import type { SearchFieldProps as SearchFieldProps_2 } from 'react-aria-components'; import type { SwitchProps as SwitchProps_2 } from 'react-aria-components'; import { Table as Table_2 } from '@tanstack/react-table'; import { Tabs as Tabs_2 } from '@base-ui-components/react/tabs'; @@ -1101,6 +1102,20 @@ export const ScrollArea: { >; }; +// @public (undocumented) +export const SearchField: ForwardRefExoticComponent< + SearchFieldProps & RefAttributes +>; + +// @public (undocumented) +export interface SearchFieldProps + extends SearchFieldProps_2, + Omit { + icon?: ReactNode | false; + placeholder?: string; + size?: 'small' | 'medium' | Partial>; +} + // @public (undocumented) export const Select: ForwardRefExoticComponent< SelectProps & RefAttributes diff --git a/packages/canon/src/components/SearchField/SearchField.tsx b/packages/canon/src/components/SearchField/SearchField.tsx index c04c99571e..5b25b6fb99 100644 --- a/packages/canon/src/components/SearchField/SearchField.tsx +++ b/packages/canon/src/components/SearchField/SearchField.tsx @@ -20,8 +20,6 @@ import { SearchField as AriaSearchField, FieldError, Button, - Label, - Text, } from 'react-aria-components'; import { useResponsiveValue } from '../../hooks/useResponsiveValue'; import clsx from 'clsx'; @@ -62,16 +60,6 @@ export const SearchField = forwardRef( const secondaryLabelText = secondaryLabel || (isRequired ? 'Required' : null); - // return ( - // - //