diff --git a/packages/ui/report.api.md b/packages/ui/report.api.md index 738b35e047..09392ceb24 100644 --- a/packages/ui/report.api.md +++ b/packages/ui/report.api.md @@ -7,7 +7,7 @@ import { Avatar as Avatar_2 } from '@base-ui-components/react/avatar'; import { ButtonProps as ButtonProps_2 } from 'react-aria-components'; import { CellProps as CellProps_2 } from 'react-aria-components'; import { Collapsible as Collapsible_2 } from '@base-ui-components/react/collapsible'; -import { ColumnProps } from 'react-aria-components'; +import { ColumnProps as ColumnProps_2 } from 'react-aria-components'; import { ComponentProps } from 'react'; import type { ComponentPropsWithRef } from 'react'; import { Context } from 'react'; @@ -341,11 +341,13 @@ export const Collapsible: { }; // @public (undocumented) -export const Column: ( - props: Omit & { - children?: React.ReactNode; - }, -) => JSX_2.Element; +export const Column: (props: ColumnProps) => JSX_2.Element; + +// @public (undocumented) +export interface ColumnProps extends Omit { + // (undocumented) + children?: React.ReactNode; +} // @public (undocumented) export type Columns = @@ -1534,13 +1536,7 @@ export type ResponsivePropDef = RegularPropDef & { }; // @public (undocumented) -export function Row({ - id, - columns, - children, - href, - ...otherProps -}: RowProps): JSX_2.Element; +export function Row(props: RowProps): JSX_2.Element; // @public (undocumented) export const ScrollArea: { @@ -1704,10 +1700,9 @@ export const TableBody: ( ) => JSX_2.Element; // @public (undocumented) -export const TableHeader: ({ - columns, - children, -}: TableHeaderProps) => JSX_2.Element; +export const TableHeader: ( + props: TableHeaderProps, +) => JSX_2.Element; // @public export function TablePagination(props: TablePaginationProps): JSX_2.Element; @@ -1765,12 +1760,9 @@ export interface TabsProps extends TabsProps_2 {} export const Tag: (props: TagProps) => JSX_2.Element; // @public -export const TagGroup: ({ - items, - children, - renderEmptyState, - ...props -}: TagGroupProps) => JSX_2.Element; +export const TagGroup: ( + props: TagGroupProps, +) => JSX_2.Element; // @public export interface TagGroupProps diff --git a/packages/ui/src/components/Table/components/Cell.tsx b/packages/ui/src/components/Table/components/Cell.tsx index e7f5fad0e8..ad0a92cb94 100644 --- a/packages/ui/src/components/Table/components/Cell.tsx +++ b/packages/ui/src/components/Table/components/Cell.tsx @@ -24,17 +24,12 @@ import styles from '../Table.module.css'; /** @public */ const Cell = (props: CellProps) => { - const { - className, - title, - description, - color = 'primary', - leadingIcon, - href, - ...rest - } = props; - - const { classNames } = useStyles('Table'); + const { classNames, cleanedProps } = useStyles<'Table', CellProps>('Table', { + color: 'primary', + ...props, + }); + const { className, title, description, color, leadingIcon, href, ...rest } = + cleanedProps; return ( { - const { - className, - src, - name, - href, - description, - color = 'primary', - ...rest - } = props; - const { classNames } = useStyles('Table'); + const { classNames, cleanedProps } = useStyles<'Table', CellProfileProps>( + 'Table', + { + color: 'primary', + ...props, + }, + ); + const { className, src, name, href, description, color, ...rest } = + cleanedProps; return ( & { children?: React.ReactNode }, -) => { - const { classNames } = useStyles('Table'); +export const Column = (props: ColumnProps) => { + const { classNames, cleanedProps } = useStyles<'Table', ColumnProps>( + 'Table', + props, + ); + const { children, ...rest } = cleanedProps; return ( {({ allowsSorting, sortDirection }) => (
- {props.children} + {children} {allowsSorting && (