@react-types/tabs 3.3.13 → 3.3.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -3
- package/src/index.d.ts +8 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-types/tabs",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.15",
|
|
4
4
|
"description": "Spectrum UI components in React",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"types": "src/index.d.ts",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"url": "https://github.com/adobe/react-spectrum"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@react-types/shared": "^3.
|
|
12
|
+
"@react-types/shared": "^3.29.1"
|
|
13
13
|
},
|
|
14
14
|
"peerDependencies": {
|
|
15
15
|
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1"
|
|
@@ -17,5 +17,5 @@
|
|
|
17
17
|
"publishConfig": {
|
|
18
18
|
"access": "public"
|
|
19
19
|
},
|
|
20
|
-
"gitHead": "
|
|
20
|
+
"gitHead": "9c77d4e8267ed39469c65f65da94ece7be509874"
|
|
21
21
|
}
|
package/src/index.d.ts
CHANGED
|
@@ -30,12 +30,14 @@ export interface AriaTabProps extends AriaLabelingProps {
|
|
|
30
30
|
shouldSelectOnPressUp?: boolean
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
export interface TabListProps<T> extends CollectionBase<T>, Omit<SingleSelection, 'disallowEmptySelection'> {
|
|
33
|
+
export interface TabListProps<T> extends CollectionBase<T>, Omit<SingleSelection, 'disallowEmptySelection' | 'onSelectionChange'> {
|
|
34
34
|
/**
|
|
35
35
|
* Whether the TabList is disabled.
|
|
36
36
|
* Shows that a selection exists, but is not available in that circumstance.
|
|
37
37
|
*/
|
|
38
|
-
isDisabled?: boolean
|
|
38
|
+
isDisabled?: boolean,
|
|
39
|
+
/** Handler that is called when the selection changes. */
|
|
40
|
+
onSelectionChange?: (key: Key) => void
|
|
39
41
|
}
|
|
40
42
|
|
|
41
43
|
interface AriaTabListBase extends AriaLabelingProps {
|
|
@@ -55,7 +57,7 @@ export interface AriaTabListProps<T> extends TabListProps<T>, AriaTabListBase, D
|
|
|
55
57
|
|
|
56
58
|
export interface AriaTabPanelProps extends DOMProps, AriaLabelingProps {}
|
|
57
59
|
|
|
58
|
-
export interface SpectrumTabsProps<T> extends AriaTabListBase, SingleSelection, DOMProps, StyleProps {
|
|
60
|
+
export interface SpectrumTabsProps<T> extends AriaTabListBase, Omit<SingleSelection, 'onSelectionChange'>, DOMProps, StyleProps {
|
|
59
61
|
/** The children of the `<Tabs>` element. Should include `<TabList>` and `<TabPanels>` elements. */
|
|
60
62
|
children: ReactNode,
|
|
61
63
|
/** The item objects for each tab, for dynamic collections. */
|
|
@@ -69,7 +71,9 @@ export interface SpectrumTabsProps<T> extends AriaTabListBase, SingleSelection,
|
|
|
69
71
|
/** Whether the tabs are displayed in an emphasized style. */
|
|
70
72
|
isEmphasized?: boolean,
|
|
71
73
|
/** The amount of space between the tabs. */
|
|
72
|
-
density?: 'compact' | 'regular'
|
|
74
|
+
density?: 'compact' | 'regular',
|
|
75
|
+
/** Handler that is called when the selection changes. */
|
|
76
|
+
onSelectionChange?: (key: Key) => void
|
|
73
77
|
}
|
|
74
78
|
|
|
75
79
|
export interface SpectrumTabListProps<T> extends DOMProps, StyleProps {
|