@react-types/tabs
Advanced tools
Comparing version
{ | ||
"name": "@react-types/tabs", | ||
"version": "3.0.0-nightly-5334df7f1-250226", | ||
"version": "3.0.0-nightly-53366f002-250913", | ||
"description": "Spectrum UI components in React", | ||
@@ -12,3 +12,3 @@ "license": "Apache-2.0", | ||
"dependencies": { | ||
"@react-types/shared": "3.0.0-nightly-5334df7f1-250226" | ||
"@react-types/shared": "3.0.0-nightly-53366f002-250913" | ||
}, | ||
@@ -15,0 +15,0 @@ "peerDependencies": { |
@@ -33,3 +33,3 @@ /* | ||
export interface TabListProps<T> extends CollectionBase<T>, Omit<SingleSelection, 'disallowEmptySelection'> { | ||
export interface TabListProps<T> extends CollectionBase<T>, Omit<SingleSelection, 'disallowEmptySelection' | 'onSelectionChange'> { | ||
/** | ||
@@ -39,3 +39,5 @@ * Whether the TabList is disabled. | ||
*/ | ||
isDisabled?: boolean | ||
isDisabled?: boolean, | ||
/** Handler that is called when the selection changes. */ | ||
onSelectionChange?: (key: Key) => void | ||
} | ||
@@ -58,5 +60,8 @@ | ||
export interface AriaTabPanelProps extends DOMProps, AriaLabelingProps {} | ||
export interface AriaTabPanelProps extends Omit<DOMProps, 'id'>, AriaLabelingProps { | ||
/** The unique id of the tab. */ | ||
id?: Key | ||
} | ||
export interface SpectrumTabsProps<T> extends AriaTabListBase, SingleSelection, DOMProps, StyleProps { | ||
export interface SpectrumTabsProps<T> extends AriaTabListBase, Omit<SingleSelection, 'onSelectionChange'>, DOMProps, StyleProps { | ||
/** The children of the `<Tabs>` element. Should include `<TabList>` and `<TabPanels>` elements. */ | ||
@@ -75,3 +80,5 @@ children: ReactNode, | ||
/** The amount of space between the tabs. */ | ||
density?: 'compact' | 'regular' | ||
density?: 'compact' | 'regular', | ||
/** Handler that is called when the selection changes. */ | ||
onSelectionChange?: (key: Key) => void | ||
} | ||
@@ -78,0 +85,0 @@ |
4089
8.26%81
9.46%+ Added
- Removed