diff --git a/packages/canon/report.api.md b/packages/canon/report.api.md index a52a83c308..e03b2dfe1e 100644 --- a/packages/canon/report.api.md +++ b/packages/canon/report.api.md @@ -10,14 +10,16 @@ import type { CSSProperties } from 'react'; import { FC } from 'react'; import { FocusEvent as FocusEvent_2 } from 'react'; import { ForwardRefExoticComponent } from 'react'; +import { HTMLAttributes } from 'react'; import { JSX as JSX_2 } from 'react/jsx-runtime'; import { Menu as Menu_2 } from '@base-ui-components/react/menu'; -import { default as React_2 } from 'react'; 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 { Table as Table_2 } from '@tanstack/react-table'; +import { TdHTMLAttributes } from 'react'; +import { ThHTMLAttributes } from 'react'; import { Tooltip as Tooltip_2 } from '@base-ui-components/react/tooltip'; import type { useRender } from '@base-ui-components/react/use-render'; @@ -1051,33 +1053,29 @@ export type StylingPropDef = { // @public export const Table: { - Root: React_2.ForwardRefExoticComponent< - React_2.HTMLAttributes & - React_2.RefAttributes + Root: ForwardRefExoticComponent< + HTMLAttributes & RefAttributes >; - Header: React_2.ForwardRefExoticComponent< - React_2.HTMLAttributes & - React_2.RefAttributes + Header: ForwardRefExoticComponent< + HTMLAttributes & + RefAttributes >; - Body: React_2.ForwardRefExoticComponent< - React_2.HTMLAttributes & - React_2.RefAttributes + Body: ForwardRefExoticComponent< + HTMLAttributes & + RefAttributes >; - Head: React_2.ForwardRefExoticComponent< - React_2.ThHTMLAttributes & - React_2.RefAttributes + Head: ForwardRefExoticComponent< + ThHTMLAttributes & RefAttributes >; - Row: React_2.ForwardRefExoticComponent< - React_2.HTMLAttributes & - React_2.RefAttributes + Row: ForwardRefExoticComponent< + HTMLAttributes & RefAttributes >; - Cell: React_2.ForwardRefExoticComponent< - React_2.TdHTMLAttributes & - React_2.RefAttributes + Cell: ForwardRefExoticComponent< + TdHTMLAttributes & RefAttributes >; - Caption: React_2.ForwardRefExoticComponent< - React_2.HTMLAttributes & - React_2.RefAttributes + Caption: ForwardRefExoticComponent< + HTMLAttributes & + RefAttributes >; }; diff --git a/packages/canon/src/components/DataTable/Root/DataTableRoot.tsx b/packages/canon/src/components/DataTable/Root/DataTableRoot.tsx index 50cc81b7ab..8ca6db736c 100644 --- a/packages/canon/src/components/DataTable/Root/DataTableRoot.tsx +++ b/packages/canon/src/components/DataTable/Root/DataTableRoot.tsx @@ -14,12 +14,12 @@ * limitations under the License. */ -import * as React from 'react'; +import { forwardRef } from 'react'; import clsx from 'clsx'; import { DataTableRootProps } from './types'; /** @public */ -const DataTableRoot = React.forwardRef( +const DataTableRoot = forwardRef( ({ className, ...props }, ref) => { return (
, - Cell: Table.Cell as React.ComponentType, - Head: Table.Head as React.ComponentType, - Header: Table.Header as React.ComponentType, - Row: Table.Row as React.ComponentType, + Body: Table.Body as ComponentType, + Cell: Table.Cell as ComponentType, + Head: Table.Head as ComponentType, + Header: Table.Header as ComponentType, + Row: Table.Row as ComponentType, }, } satisfies Meta; diff --git a/packages/canon/src/components/Table/styles.css b/packages/canon/src/components/Table/styles.css index 325873f690..982b2d1c69 100644 --- a/packages/canon/src/components/Table/styles.css +++ b/packages/canon/src/components/Table/styles.css @@ -19,10 +19,10 @@ .canon-TableRow { border-bottom: 1px solid var(--canon-border); transition: color 0.2s ease-in-out; +} - &:hover { - background-color: var(--canon-bg-tint-hover); - } +.canon-TableBody .canon-TableRow:hover { + background-color: var(--canon-gray-2); } .canon-TableCell { diff --git a/packages/canon/src/components/TextField/TextField.stories.tsx b/packages/canon/src/components/TextField/TextField.stories.tsx index 34f81af4f4..8594a8c650 100644 --- a/packages/canon/src/components/TextField/TextField.stories.tsx +++ b/packages/canon/src/components/TextField/TextField.stories.tsx @@ -95,14 +95,14 @@ export const Responsive: Story = { }, }; -export const withError: Story = { +export const WithError: Story = { args: { ...WithLabel.args, error: 'Invalid URL', }, }; -export const withErrorAndDescription: Story = { +export const WithErrorAndDescription: Story = { args: { ...WithLabel.args, error: 'Invalid URL',