(
}, [label, ariaLabel, ariaLabelledBy]);
const { classNames, dataAttributes, style, cleanedProps } = useStyles(
- 'SearchField',
+ SearchFieldDefinition,
{
size: 'small',
placeholder: 'Search',
diff --git a/packages/ui/src/components/SearchField/definition.ts b/packages/ui/src/components/SearchField/definition.ts
new file mode 100644
index 0000000000..7de1411bb4
--- /dev/null
+++ b/packages/ui/src/components/SearchField/definition.ts
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2024 The Backstage Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import type { ComponentDefinition } from '../../types';
+
+/**
+ * Component definition for SearchField
+ * @public
+ */
+export const SearchFieldDefinition = {
+ classNames: {
+ root: 'bui-SearchField',
+ clear: 'bui-SearchFieldClear',
+ inputWrapper: 'bui-SearchFieldInputWrapper',
+ input: 'bui-SearchFieldInput',
+ inputIcon: 'bui-SearchFieldInputIcon',
+ },
+ dataAttributes: {
+ startCollapsed: [true, false] as const,
+ size: ['small', 'medium'] as const,
+ },
+} as const satisfies ComponentDefinition;
diff --git a/packages/ui/src/components/SearchField/index.ts b/packages/ui/src/components/SearchField/index.ts
index 288c3fe44a..9e01b47fc1 100644
--- a/packages/ui/src/components/SearchField/index.ts
+++ b/packages/ui/src/components/SearchField/index.ts
@@ -16,3 +16,4 @@
export * from './SearchField';
export * from './types';
+export { SearchFieldDefinition } from './definition';
diff --git a/packages/ui/src/components/Select/Select.tsx b/packages/ui/src/components/Select/Select.tsx
index 0b133d07c5..04231d1cd9 100644
--- a/packages/ui/src/components/Select/Select.tsx
+++ b/packages/ui/src/components/Select/Select.tsx
@@ -19,6 +19,8 @@ import { Select as AriaSelect, Popover } from 'react-aria-components';
import clsx from 'clsx';
import { SelectProps } from './types';
import { useStyles } from '../../hooks/useStyles';
+import { SelectDefinition } from './definition';
+import { PopoverDefinition } from '../Popover/definition';
import { FieldLabel } from '../FieldLabel';
import { FieldError } from '../FieldError';
import styles from './Select.module.css';
@@ -31,12 +33,15 @@ export const Select = forwardRef<
HTMLDivElement,
SelectProps<'single' | 'multiple'>
>((props, ref) => {
- const { classNames: popoverClassNames } = useStyles('Popover');
- const { classNames, dataAttributes, cleanedProps } = useStyles('Select', {
- size: 'small',
- placeholder: 'Select an option',
- ...props,
- });
+ const { classNames: popoverClassNames } = useStyles(PopoverDefinition);
+ const { classNames, dataAttributes, cleanedProps } = useStyles(
+ SelectDefinition,
+ {
+ size: 'small',
+ placeholder: 'Select an option',
+ ...props,
+ },
+ );
const {
className,
diff --git a/packages/ui/src/components/Select/SelectContent.tsx b/packages/ui/src/components/Select/SelectContent.tsx
index 42070321a3..7f63ad2a0a 100644
--- a/packages/ui/src/components/Select/SelectContent.tsx
+++ b/packages/ui/src/components/Select/SelectContent.tsx
@@ -24,6 +24,7 @@ import { useFilter } from 'react-aria';
import { RiCloseCircleLine } from '@remixicon/react';
import clsx from 'clsx';
import { useStyles } from '../../hooks/useStyles';
+import { SelectDefinition } from './definition';
import { SelectListBox } from './SelectListBox';
import styles from './Select.module.css';
import type { Option } from './types';
@@ -40,7 +41,7 @@ export function SelectContent({
options,
}: SelectContentProps) {
const { contains } = useFilter({ sensitivity: 'base' });
- const { classNames } = useStyles('Select');
+ const { classNames } = useStyles(SelectDefinition);
if (!searchable) {
return ;
diff --git a/packages/ui/src/components/Select/SelectListBox.tsx b/packages/ui/src/components/Select/SelectListBox.tsx
index aa050ba766..3b14292729 100644
--- a/packages/ui/src/components/Select/SelectListBox.tsx
+++ b/packages/ui/src/components/Select/SelectListBox.tsx
@@ -18,6 +18,7 @@ import { ListBox, ListBoxItem, Text } from 'react-aria-components';
import { RiCheckLine } from '@remixicon/react';
import clsx from 'clsx';
import { useStyles } from '../../hooks/useStyles';
+import { SelectDefinition } from './definition';
import styles from './Select.module.css';
import type { Option } from './types';
@@ -26,7 +27,7 @@ interface SelectListBoxProps {
}
const NoResults = () => {
- const { classNames } = useStyles('Select');
+ const { classNames } = useStyles(SelectDefinition);
return (
@@ -36,7 +37,7 @@ const NoResults = () => {
};
export function SelectListBox({ options, ...props }: SelectListBoxProps) {
- const { classNames } = useStyles('Select', props);
+ const { classNames } = useStyles(SelectDefinition, props);
return (
diff --git a/packages/ui/src/components/Select/definition.ts b/packages/ui/src/components/Select/definition.ts
new file mode 100644
index 0000000000..5a085cc770
--- /dev/null
+++ b/packages/ui/src/components/Select/definition.ts
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2024 The Backstage Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import type { ComponentDefinition } from '../../types';
+
+/**
+ * Component definition for Select
+ * @public
+ */
+export const SelectDefinition = {
+ classNames: {
+ root: 'bui-Select',
+ popover: 'bui-SelectPopover',
+ trigger: 'bui-SelectTrigger',
+ chevron: 'bui-SelectTriggerChevron',
+ value: 'bui-SelectValue',
+ list: 'bui-SelectList',
+ item: 'bui-SelectItem',
+ itemIndicator: 'bui-SelectItemIndicator',
+ itemLabel: 'bui-SelectItemLabel',
+ searchWrapper: 'bui-SelectSearchWrapper',
+ search: 'bui-SelectSearch',
+ searchClear: 'bui-SelectSearchClear',
+ noResults: 'bui-SelectNoResults',
+ },
+ dataAttributes: {
+ size: ['small', 'medium'] as const,
+ },
+} as const satisfies ComponentDefinition;
diff --git a/packages/ui/src/components/Select/index.ts b/packages/ui/src/components/Select/index.ts
index 2cddf1fe62..786cc4d03f 100644
--- a/packages/ui/src/components/Select/index.ts
+++ b/packages/ui/src/components/Select/index.ts
@@ -16,3 +16,4 @@
export * from './Select';
export * from './types';
+export { SelectDefinition } from './definition';
diff --git a/packages/ui/src/components/Skeleton/Skeleton.tsx b/packages/ui/src/components/Skeleton/Skeleton.tsx
index ca2f4ae493..c85a9b23cb 100644
--- a/packages/ui/src/components/Skeleton/Skeleton.tsx
+++ b/packages/ui/src/components/Skeleton/Skeleton.tsx
@@ -15,13 +15,14 @@
*/
import { useStyles } from '../../hooks/useStyles';
+import { SkeletonDefinition } from './definition';
import { SkeletonProps } from './types';
import styles from './Skeleton.module.css';
import clsx from 'clsx';
/** @public */
export const Skeleton = (props: SkeletonProps) => {
- const { classNames, cleanedProps } = useStyles('Skeleton', {
+ const { classNames, cleanedProps } = useStyles(SkeletonDefinition, {
width: 80,
height: 24,
rounded: false,
diff --git a/packages/ui/src/components/Skeleton/definition.ts b/packages/ui/src/components/Skeleton/definition.ts
new file mode 100644
index 0000000000..42c4d6c444
--- /dev/null
+++ b/packages/ui/src/components/Skeleton/definition.ts
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2024 The Backstage Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import type { ComponentDefinition } from '../../types';
+
+/**
+ * Component definition for Skeleton
+ * @public
+ */
+export const SkeletonDefinition = {
+ classNames: {
+ root: 'bui-Skeleton',
+ },
+} as const satisfies ComponentDefinition;
diff --git a/packages/ui/src/components/Skeleton/index.tsx b/packages/ui/src/components/Skeleton/index.tsx
index f1e76b1851..ab44364f8b 100644
--- a/packages/ui/src/components/Skeleton/index.tsx
+++ b/packages/ui/src/components/Skeleton/index.tsx
@@ -16,3 +16,4 @@
export { Skeleton } from './Skeleton';
export type { SkeletonProps } from './types';
+export { SkeletonDefinition } from './definition';
diff --git a/packages/ui/src/components/Switch/Switch.tsx b/packages/ui/src/components/Switch/Switch.tsx
index ffc1fdef05..b50db839df 100644
--- a/packages/ui/src/components/Switch/Switch.tsx
+++ b/packages/ui/src/components/Switch/Switch.tsx
@@ -18,13 +18,14 @@ import { forwardRef } from 'react';
import { Switch as AriaSwitch } from 'react-aria-components';
import type { SwitchProps } from './types';
import { useStyles } from '../../hooks/useStyles';
+import { SwitchDefinition } from './definition';
import styles from './Switch.module.css';
import clsx from 'clsx';
/** @public */
export const Switch = forwardRef(
(props, ref) => {
- const { classNames, cleanedProps } = useStyles('Switch', props);
+ const { classNames, cleanedProps } = useStyles(SwitchDefinition, props);
const { className, label, ...rest } = cleanedProps;
return (
diff --git a/packages/ui/src/components/Switch/definition.ts b/packages/ui/src/components/Switch/definition.ts
new file mode 100644
index 0000000000..c8dd004991
--- /dev/null
+++ b/packages/ui/src/components/Switch/definition.ts
@@ -0,0 +1,28 @@
+/*
+ * Copyright 2024 The Backstage Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import type { ComponentDefinition } from '../../types';
+
+/**
+ * Component definition for Switch
+ * @public
+ */
+export const SwitchDefinition = {
+ classNames: {
+ root: 'bui-Switch',
+ indicator: 'bui-SwitchIndicator',
+ },
+} as const satisfies ComponentDefinition;
diff --git a/packages/ui/src/components/Switch/index.tsx b/packages/ui/src/components/Switch/index.tsx
index 171969809d..72c08f5cb0 100644
--- a/packages/ui/src/components/Switch/index.tsx
+++ b/packages/ui/src/components/Switch/index.tsx
@@ -16,3 +16,4 @@
export * from './Switch';
export * from './types';
+export { SwitchDefinition } from './definition';
diff --git a/packages/ui/src/components/Table/components/Cell.tsx b/packages/ui/src/components/Table/components/Cell.tsx
index ad0a92cb94..65be8482a7 100644
--- a/packages/ui/src/components/Table/components/Cell.tsx
+++ b/packages/ui/src/components/Table/components/Cell.tsx
@@ -20,12 +20,13 @@ import { Link } from '../../Link';
import { Cell as ReactAriaCell } from 'react-aria-components';
import type { CellProps } from '../types';
import { useStyles } from '../../../hooks/useStyles';
+import { TableDefinition } from '../definition';
import styles from '../Table.module.css';
/** @public */
const Cell = (props: CellProps) => {
- const { classNames, cleanedProps } = useStyles<'Table', CellProps>('Table', {
- color: 'primary',
+ const { classNames, cleanedProps } = useStyles(TableDefinition, {
+ color: 'primary' as const,
...props,
});
const { className, title, description, color, leadingIcon, href, ...rest } =
diff --git a/packages/ui/src/components/Table/components/CellProfile.tsx b/packages/ui/src/components/Table/components/CellProfile.tsx
index 3f665dec02..4abef56e01 100644
--- a/packages/ui/src/components/Table/components/CellProfile.tsx
+++ b/packages/ui/src/components/Table/components/CellProfile.tsx
@@ -20,18 +20,16 @@ import { Text } from '../../Text/Text';
import { Link } from '../../Link/Link';
import { Avatar } from '../../Avatar';
import { useStyles } from '../../../hooks/useStyles';
+import { TableDefinition } from '../definition';
import { Cell as ReactAriaCell } from 'react-aria-components';
import styles from '../Table.module.css';
/** @public */
export const CellProfile = (props: CellProfileProps) => {
- const { classNames, cleanedProps } = useStyles<'Table', CellProfileProps>(
- 'Table',
- {
- color: 'primary',
- ...props,
- },
- );
+ const { classNames, cleanedProps } = useStyles(TableDefinition, {
+ color: 'primary' as const,
+ ...props,
+ });
const { className, src, name, href, description, color, ...rest } =
cleanedProps;
diff --git a/packages/ui/src/components/Table/components/Column.tsx b/packages/ui/src/components/Table/components/Column.tsx
index 6ebd263d3f..f534da565a 100644
--- a/packages/ui/src/components/Table/components/Column.tsx
+++ b/packages/ui/src/components/Table/components/Column.tsx
@@ -16,6 +16,7 @@
import { Column as ReactAriaColumn } from 'react-aria-components';
import { useStyles } from '../../../hooks/useStyles';
+import { TableDefinition } from '../definition';
import styles from '../Table.module.css';
import clsx from 'clsx';
import { ColumnProps } from '../types';
@@ -23,10 +24,7 @@ import { RiArrowUpLine, RiArrowDownLine } from '@remixicon/react';
/** @public */
export const Column = (props: ColumnProps) => {
- const { classNames, cleanedProps } = useStyles<'Table', ColumnProps>(
- 'Table',
- props,
- );
+ const { classNames, cleanedProps } = useStyles(TableDefinition, props);
const { children, ...rest } = cleanedProps;
return (
diff --git a/packages/ui/src/components/Table/components/Row.tsx b/packages/ui/src/components/Table/components/Row.tsx
index 70c8330e68..106f97baff 100644
--- a/packages/ui/src/components/Table/components/Row.tsx
+++ b/packages/ui/src/components/Table/components/Row.tsx
@@ -24,6 +24,7 @@ import {
RouterProvider,
} from 'react-aria-components';
import { useStyles } from '../../../hooks/useStyles';
+import { TableDefinition } from '../definition';
import { useNavigate } from 'react-router-dom';
import { useHref } from 'react-router-dom';
import { isExternalLink } from '../../../utils/isExternalLink';
@@ -32,10 +33,7 @@ import clsx from 'clsx';
/** @public */
export function Row(props: RowProps) {
- const { classNames, cleanedProps } = useStyles<'Table', RowProps>(
- 'Table',
- props,
- );
+ const { classNames, cleanedProps } = useStyles(TableDefinition, props);
const { id, columns, children, href, ...rest } = cleanedProps;
const navigate = useNavigate();
const isExternal = isExternalLink(href);
diff --git a/packages/ui/src/components/Table/components/Table.tsx b/packages/ui/src/components/Table/components/Table.tsx
index a430b9cff2..ffd0ab231d 100644
--- a/packages/ui/src/components/Table/components/Table.tsx
+++ b/packages/ui/src/components/Table/components/Table.tsx
@@ -15,6 +15,7 @@
*/
import { useStyles } from '../../../hooks/useStyles';
+import { TableDefinition } from '../definition';
import {
Table as ReactAriaTable,
type TableProps,
@@ -24,10 +25,7 @@ import clsx from 'clsx';
/** @public */
export const Table = (props: TableProps) => {
- const { classNames, cleanedProps } = useStyles<'Table', TableProps>(
- 'Table',
- props,
- );
+ const { classNames, cleanedProps } = useStyles(TableDefinition, props);
return (
(props: TableBodyProps) => {
- const { classNames, cleanedProps } = useStyles<'Table', TableBodyProps>(
- 'Table',
- props,
- );
+ const { classNames, cleanedProps } = useStyles(TableDefinition, props);
return (
(props: TableHeaderProps) => {
let { selectionBehavior, selectionMode, allowsDragging } = useTableOptions();
- const { classNames, cleanedProps } = useStyles<'Table', TableHeaderProps>(
- 'Table',
- props,
- );
+ const { classNames, cleanedProps } = useStyles(TableDefinition, props);
const { columns, children, ...rest } = cleanedProps;
return (
diff --git a/packages/ui/src/components/Table/definition.ts b/packages/ui/src/components/Table/definition.ts
new file mode 100644
index 0000000000..8ec9dfb1f0
--- /dev/null
+++ b/packages/ui/src/components/Table/definition.ts
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2024 The Backstage Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import type { ComponentDefinition } from '../../types';
+
+/**
+ * Component definition for Table
+ * @public
+ */
+export const TableDefinition = {
+ classNames: {
+ table: 'bui-Table',
+ header: 'bui-TableHeader',
+ body: 'bui-TableBody',
+ row: 'bui-TableRow',
+ head: 'bui-TableHead',
+ headContent: 'bui-TableHeadContent',
+ headSortButton: 'bui-TableHeadSortButton',
+ caption: 'bui-TableCaption',
+ cell: 'bui-TableCell',
+ cellContentWrapper: 'bui-TableCellContentWrapper',
+ cellContent: 'bui-TableCellContent',
+ cellIcon: 'bui-TableCellIcon',
+ cellProfileAvatar: 'bui-TableCellProfileAvatar',
+ cellProfileAvatarImage: 'bui-TableCellProfileAvatarImage',
+ cellProfileAvatarFallback: 'bui-TableCellProfileAvatarFallback',
+ cellProfileName: 'bui-TableCellProfileName',
+ cellProfileLink: 'bui-TableCellProfileLink',
+ },
+} as const satisfies ComponentDefinition;
diff --git a/packages/ui/src/components/Table/index.ts b/packages/ui/src/components/Table/index.ts
index fb4ec6147d..8d6603ee00 100644
--- a/packages/ui/src/components/Table/index.ts
+++ b/packages/ui/src/components/Table/index.ts
@@ -30,3 +30,5 @@ export type {
UseTablePagination,
UseTablePaginationConfig,
} from './hooks/types';
+
+export { TableDefinition } from './definition';
diff --git a/packages/ui/src/components/Table/types.ts b/packages/ui/src/components/Table/types.ts
index 293e76fdca..be9e860a0c 100644
--- a/packages/ui/src/components/Table/types.ts
+++ b/packages/ui/src/components/Table/types.ts
@@ -18,12 +18,13 @@ import {
CellProps as ReactAriaCellProps,
ColumnProps as AriaColumnProps,
} from 'react-aria-components';
+import type { TextColors } from '../../types';
/** @public */
export interface CellProps extends ReactAriaCellProps {
title: string;
description?: string;
- color?: 'primary' | 'secondary';
+ color?: TextColors;
leadingIcon?: React.ReactNode | null;
href?: string;
}
@@ -34,7 +35,7 @@ export interface CellProfileProps extends ReactAriaCellProps {
name?: string;
href?: string;
description?: string;
- color?: 'primary' | 'secondary';
+ color?: TextColors;
}
/** @public */
diff --git a/packages/ui/src/components/TablePagination/TablePagination.tsx b/packages/ui/src/components/TablePagination/TablePagination.tsx
index ebd585a0c3..fd891be073 100644
--- a/packages/ui/src/components/TablePagination/TablePagination.tsx
+++ b/packages/ui/src/components/TablePagination/TablePagination.tsx
@@ -18,6 +18,7 @@ import clsx from 'clsx';
import { Text, ButtonIcon, Select } from '../..';
import type { TablePaginationProps } from './types';
import { useStyles } from '../../hooks/useStyles';
+import { TablePaginationDefinition } from './definition';
import styles from './TablePagination.module.css';
import { RiArrowLeftSLine, RiArrowRightSLine } from '@remixicon/react';
@@ -27,7 +28,7 @@ import { RiArrowLeftSLine, RiArrowRightSLine } from '@remixicon/react';
* @public
*/
export function TablePagination(props: TablePaginationProps) {
- const { classNames, cleanedProps } = useStyles('TablePagination', {
+ const { classNames, cleanedProps } = useStyles(TablePaginationDefinition, {
showPageSizeOptions: true,
...props,
});
diff --git a/packages/ui/src/components/TablePagination/definition.ts b/packages/ui/src/components/TablePagination/definition.ts
new file mode 100644
index 0000000000..d72a706da1
--- /dev/null
+++ b/packages/ui/src/components/TablePagination/definition.ts
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2024 The Backstage Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import type { ComponentDefinition } from '../../types';
+
+/**
+ * Component definition for TablePagination
+ * @public
+ */
+export const TablePaginationDefinition = {
+ classNames: {
+ root: 'bui-TablePagination',
+ left: 'bui-TablePaginationLeft',
+ right: 'bui-TablePaginationRight',
+ select: 'bui-TablePaginationSelect',
+ },
+} as const satisfies ComponentDefinition;
diff --git a/packages/ui/src/components/TablePagination/index.ts b/packages/ui/src/components/TablePagination/index.ts
index 9fb26ad728..42642fb162 100644
--- a/packages/ui/src/components/TablePagination/index.ts
+++ b/packages/ui/src/components/TablePagination/index.ts
@@ -16,3 +16,4 @@
export { TablePagination } from './TablePagination';
export type { TablePaginationProps } from './types';
+export { TablePaginationDefinition } from './definition';
diff --git a/packages/ui/src/components/Tabs/Tabs.tsx b/packages/ui/src/components/Tabs/Tabs.tsx
index f627199b4b..5c44fae8af 100644
--- a/packages/ui/src/components/Tabs/Tabs.tsx
+++ b/packages/ui/src/components/Tabs/Tabs.tsx
@@ -42,6 +42,7 @@ import {
TabProps as AriaTabProps,
} from 'react-aria-components';
import { useStyles } from '../../hooks/useStyles';
+import { TabsDefinition } from './definition';
import styles from './Tabs.module.css';
import clsx from 'clsx';
@@ -84,7 +85,7 @@ const isTabActive = (
* @public
*/
export const Tabs = (props: TabsProps) => {
- const { classNames, cleanedProps } = useStyles('Tabs', props);
+ const { classNames, cleanedProps } = useStyles(TabsDefinition, props);
const { className, children, ...rest } = cleanedProps;
const tabsRef = useRef(null);
const tabRefs = useRef