Skip to content

Commit 2028b98

Browse files
authored
chore: get rid of onClick on S2 and RSP components (#8577)
1 parent 675dc30 commit 2028b98

File tree

12 files changed

+12
-12
lines changed

12 files changed

+12
-12
lines changed

packages/@react-spectrum/s2/src/Card.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ interface CardRenderProps {
3636
size: 'XS' | 'S' | 'M' | 'L' | 'XL'
3737
}
3838

39-
export interface CardProps extends Omit<GridListItemProps, 'className' | 'style' | 'children' | 'onHoverChange' | 'onHoverStart' | 'onHoverEnd' | keyof GlobalDOMAttributes>, StyleProps {
39+
export interface CardProps extends Omit<GridListItemProps, 'className' | 'style' | 'children' | 'onHoverChange' | 'onHoverStart' | 'onHoverEnd' | 'onClick' | keyof GlobalDOMAttributes>, StyleProps {
4040
/** The children of the Card. */
4141
children: ReactNode | ((renderProps: CardRenderProps) => ReactNode),
4242
/**

packages/@react-spectrum/s2/src/Checkbox.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ interface CheckboxStyleProps {
3636

3737
interface RenderProps extends CheckboxRenderProps, CheckboxStyleProps {}
3838

39-
export interface CheckboxProps extends Omit<AriaCheckboxProps, 'className' | 'style' | 'children' | 'onHover' | 'onHoverStart' | 'onHoverEnd' | 'onHoverChange' | keyof GlobalDOMAttributes>, StyleProps, CheckboxStyleProps {
39+
export interface CheckboxProps extends Omit<AriaCheckboxProps, 'className' | 'style' | 'children' | 'onHover' | 'onHoverStart' | 'onHoverEnd' | 'onHoverChange' | 'onClick' | keyof GlobalDOMAttributes>, StyleProps, CheckboxStyleProps {
4040
/** The label for the element. */
4141
children?: ReactNode
4242
}

packages/@react-spectrum/s2/src/ComboBox.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ export const ComboBox = /*#__PURE__*/ (forwardRef as forwardRefType)(function Co
359359
);
360360
});
361361

362-
export interface ComboBoxItemProps extends Omit<ListBoxItemProps, 'children' | 'style' | 'className' | keyof GlobalDOMAttributes>, StyleProps {
362+
export interface ComboBoxItemProps extends Omit<ListBoxItemProps, 'children' | 'style' | 'className' | 'onClick' | keyof GlobalDOMAttributes>, StyleProps {
363363
children: ReactNode
364364
}
365365

packages/@react-spectrum/s2/src/Menu.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ export function MenuSection<T extends object>(props: MenuSectionProps<T>): React
442442
);
443443
}
444444

445-
export interface MenuItemProps extends Omit<AriaMenuItemProps, 'children' | 'style' | 'className' | keyof GlobalDOMAttributes>, StyleProps {
445+
export interface MenuItemProps extends Omit<AriaMenuItemProps, 'children' | 'style' | 'className' | 'onClick' | keyof GlobalDOMAttributes>, StyleProps {
446446
/**
447447
* The contents of the item.
448448
*/

packages/@react-spectrum/s2/src/Picker.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@ const PickerButton = createHideableComponent(function PickerButton<T extends obj
552552
);
553553
});
554554

555-
export interface PickerItemProps extends Omit<ListBoxItemProps, 'children' | 'style' | 'className' | keyof GlobalDOMAttributes>, StyleProps {
555+
export interface PickerItemProps extends Omit<ListBoxItemProps, 'children' | 'style' | 'className' | 'onClick' | keyof GlobalDOMAttributes>, StyleProps {
556556
children: ReactNode
557557
}
558558

packages/@react-spectrum/s2/src/Radio.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import {forwardRef, ReactNode, useContext, useRef} from 'react';
2424
import {pressScale} from './pressScale';
2525
import {useFocusableRef} from '@react-spectrum/utils';
2626

27-
export interface RadioProps extends Omit<AriaRadioProps, 'className' | 'style' | 'children' | 'onHover' | 'onHoverStart' | 'onHoverEnd' | 'onHoverChange' | keyof GlobalDOMAttributes>, StyleProps {
27+
export interface RadioProps extends Omit<AriaRadioProps, 'className' | 'style' | 'children' | 'onHover' | 'onHoverStart' | 'onHoverEnd' | 'onHoverChange' | 'onClick' | keyof GlobalDOMAttributes>, StyleProps {
2828
/**
2929
* The label for the element.
3030
*/

packages/@react-spectrum/s2/src/Tabs.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export interface TabsProps extends Omit<AriaTabsProps, 'className' | 'style' | '
5959
labelBehavior?: 'show' | 'hide'
6060
}
6161

62-
export interface TabProps extends Omit<AriaTabProps, 'children' | 'style' | 'className' | keyof GlobalDOMAttributes>, StyleProps {
62+
export interface TabProps extends Omit<AriaTabProps, 'children' | 'style' | 'className' | 'onClick' | keyof GlobalDOMAttributes>, StyleProps {
6363
/** The content to display in the tab. */
6464
children: ReactNode
6565
}

packages/@react-spectrum/s2/src/TagGroup.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ import {useLocalizedStringFormatter} from '@react-aria/i18n';
5151
import {useSpectrumContextProps} from './useSpectrumContextProps';
5252

5353
// Get types from RSP and extend those?
54-
export interface TagProps extends Omit<AriaTagProps, 'children' | 'style' | 'className' | keyof GlobalDOMAttributes> {
54+
export interface TagProps extends Omit<AriaTagProps, 'children' | 'style' | 'className' | 'onClick' | keyof GlobalDOMAttributes> {
5555
/** The children of the tag. */
5656
children: ReactNode
5757
}

packages/@react-spectrum/s2/src/TreeView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export interface TreeViewProps<T> extends Omit<RACTreeProps<T>, 'style' | 'class
6161
styles?: StylesPropWithHeight
6262
}
6363

64-
export interface TreeViewItemProps extends Omit<RACTreeItemProps, 'className' | 'style' | keyof GlobalDOMAttributes> {
64+
export interface TreeViewItemProps extends Omit<RACTreeItemProps, 'className' | 'style' | 'onClick' | keyof GlobalDOMAttributes> {
6565
/** Whether this item has children, even if not loaded yet. */
6666
hasChildItems?: boolean
6767
}

packages/@react-spectrum/tree/src/TreeView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export interface SpectrumTreeViewProps<T> extends Omit<AriaTreeProps<T>, 'childr
4848
children?: ReactNode | ((item: T) => ReactNode)
4949
}
5050

51-
export interface SpectrumTreeViewItemProps extends Omit<TreeItemProps, 'className' | 'style' | 'value' | 'onHoverStart' | 'onHoverEnd' | 'onHoverChange'> {
51+
export interface SpectrumTreeViewItemProps extends Omit<TreeItemProps, 'className' | 'style' | 'value' | 'onHoverStart' | 'onHoverEnd' | 'onHoverChange' | 'onClick'> {
5252
/** Rendered contents of the tree item or child items. */
5353
children: ReactNode
5454
}

0 commit comments

Comments
 (0)