diff --git a/packages/react/src/components/ToggleGroup/ToggleGroup.tsx b/packages/react/src/components/ToggleGroup/ToggleGroup.tsx index 75f79fbf2e..fd1462efac 100644 --- a/packages/react/src/components/ToggleGroup/ToggleGroup.tsx +++ b/packages/react/src/components/ToggleGroup/ToggleGroup.tsx @@ -6,11 +6,6 @@ import { RovingTabindexRoot } from '../../utility-components/RovingTabIndex'; import classes from './ToggleGroup.module.css'; -export type RovingTabindexItem = { - value: string; - element: HTMLElement; -}; - export type ToggleGroupContextProps = { value?: string; defaultValue?: string; diff --git a/packages/react/src/components/ToggleGroup/ToggleGroupItem/useToggleGroupitem.ts b/packages/react/src/components/ToggleGroup/ToggleGroupItem/useToggleGroupitem.ts index 6c158506f8..e453e644bc 100644 --- a/packages/react/src/components/ToggleGroup/ToggleGroupItem/useToggleGroupitem.ts +++ b/packages/react/src/components/ToggleGroup/ToggleGroupItem/useToggleGroupitem.ts @@ -1,36 +1,16 @@ import { useContext, useId } from 'react'; -import type { RovingTabindexItem } from '../ToggleGroup'; import { ToggleGroupContext } from '../ToggleGroup'; import type { ButtonProps } from '../../Button'; import type { ToggleGroupItemProps } from './ToggleGroupItem'; -export type RovingTabindexContextProps = { - elements: React.MutableRefObject>; - getOrderedItems: () => RovingTabindexItem[]; - setFocusableValue: (value: string) => void; - focusableValue: string | null; - onShiftTab: () => void; -}; - type UseToggleGroupItem = (props: ToggleGroupItemProps) => { active: boolean; size?: 'small' | 'medium' | 'large'; - elements?: React.MutableRefObject>; - keyDown?: (e: KeyboardEvent) => void; buttonProps?: Pick< ButtonProps, - | 'onClick' - | 'variant' - | 'tabIndex' - | 'iconPlacement' - | 'role' - | 'aria-checked' - | 'aria-current' - | 'name' - | 'onKeyDown' - | 'onFocus' + 'id' | 'onClick' | 'role' | 'aria-checked' | 'aria-current' | 'name' >; };