@react-types/tabs 3.3.21 → 3.4.0
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 +8 -4
- package/src/index.d.ts +3 -78
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-types/tabs",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.0",
|
|
4
4
|
"description": "Spectrum UI components in React",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"types": "src/index.d.ts",
|
|
@@ -9,13 +9,17 @@
|
|
|
9
9
|
"url": "https://github.com/adobe/react-spectrum"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@react-
|
|
12
|
+
"@react-aria/tabs": "^3.12.0",
|
|
13
|
+
"@react-spectrum/tabs": "^3.9.0",
|
|
14
|
+
"@react-stately/tabs": "^3.9.0"
|
|
13
15
|
},
|
|
14
16
|
"peerDependencies": {
|
|
15
|
-
"react": "^
|
|
17
|
+
"@react-spectrum/provider": "^3.0.0",
|
|
18
|
+
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1",
|
|
19
|
+
"react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1"
|
|
16
20
|
},
|
|
17
21
|
"publishConfig": {
|
|
18
22
|
"access": "public"
|
|
19
23
|
},
|
|
20
|
-
"gitHead": "
|
|
24
|
+
"gitHead": "a6999bdf494a2e9c0381a5881908328bdd22ddae"
|
|
21
25
|
}
|
package/src/index.d.ts
CHANGED
|
@@ -10,81 +10,6 @@
|
|
|
10
10
|
* governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
DOMProps,
|
|
17
|
-
Key,
|
|
18
|
-
Orientation,
|
|
19
|
-
SingleSelection,
|
|
20
|
-
StyleProps
|
|
21
|
-
} from '@react-types/shared';
|
|
22
|
-
import {ReactNode} from 'react';
|
|
23
|
-
|
|
24
|
-
export interface AriaTabProps extends AriaLabelingProps {
|
|
25
|
-
/** The key of the tab. */
|
|
26
|
-
key: Key,
|
|
27
|
-
/** Whether the tab should be disabled. */
|
|
28
|
-
isDisabled?: boolean,
|
|
29
|
-
/** Whether the tab selection should occur on press up instead of press down. */
|
|
30
|
-
shouldSelectOnPressUp?: boolean
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export interface TabListProps<T> extends CollectionBase<T>, Omit<SingleSelection, 'disallowEmptySelection' | 'onSelectionChange'> {
|
|
34
|
-
/**
|
|
35
|
-
* Whether the TabList is disabled.
|
|
36
|
-
* Shows that a selection exists, but is not available in that circumstance.
|
|
37
|
-
*/
|
|
38
|
-
isDisabled?: boolean,
|
|
39
|
-
/** Handler that is called when the selection changes. */
|
|
40
|
-
onSelectionChange?: (key: Key) => void
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
interface AriaTabListBase extends AriaLabelingProps {
|
|
44
|
-
/**
|
|
45
|
-
* Whether tabs are activated automatically on focus or manually.
|
|
46
|
-
* @default 'automatic'
|
|
47
|
-
*/
|
|
48
|
-
keyboardActivation?: 'automatic' | 'manual',
|
|
49
|
-
/**
|
|
50
|
-
* The orientation of the tabs.
|
|
51
|
-
* @default 'horizontal'
|
|
52
|
-
*/
|
|
53
|
-
orientation?: Orientation
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export interface AriaTabListProps<T> extends TabListProps<T>, AriaTabListBase, DOMProps, AriaLabelingProps {}
|
|
57
|
-
|
|
58
|
-
export interface AriaTabPanelProps extends Omit<DOMProps, 'id'>, AriaLabelingProps {
|
|
59
|
-
/** The unique id of the tab. */
|
|
60
|
-
id?: Key
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
export interface SpectrumTabsProps<T> extends AriaTabListBase, Omit<SingleSelection, 'onSelectionChange' | 'disallowEmptySelection'>, DOMProps, StyleProps {
|
|
64
|
-
/** The children of the `<Tabs>` element. Should include `<TabList>` and `<TabPanels>` elements. */
|
|
65
|
-
children: ReactNode,
|
|
66
|
-
/** The item objects for each tab, for dynamic collections. */
|
|
67
|
-
items?: Iterable<T>,
|
|
68
|
-
/** The keys of the tabs that are disabled. These tabs cannot be selected, focused, or otherwise interacted with. */
|
|
69
|
-
disabledKeys?: Iterable<Key>,
|
|
70
|
-
/** Whether the Tabs are disabled. */
|
|
71
|
-
isDisabled?: boolean,
|
|
72
|
-
/** Whether the tabs are displayed in a quiet style. */
|
|
73
|
-
isQuiet?: boolean,
|
|
74
|
-
/** Whether the tabs are displayed in an emphasized style. */
|
|
75
|
-
isEmphasized?: boolean,
|
|
76
|
-
/** The amount of space between the tabs. */
|
|
77
|
-
density?: 'compact' | 'regular',
|
|
78
|
-
/** Handler that is called when the selection changes. */
|
|
79
|
-
onSelectionChange?: (key: Key) => void
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
export interface SpectrumTabListProps<T> extends DOMProps, StyleProps {
|
|
83
|
-
/** The tab items to display. Item keys should match the key of the corresponding `<Item>` within the `<TabPanels>` element. */
|
|
84
|
-
children: CollectionChildren<T>
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
export interface SpectrumTabPanelsProps<T> extends DOMProps, StyleProps {
|
|
88
|
-
/** The contents of each tab. Item keys should match the key of the corresponding `<Item>` within the `<TabList>` element. */
|
|
89
|
-
children: CollectionChildren<T>
|
|
90
|
-
}
|
|
13
|
+
export {TabListProps} from '@react-stately/tabs';
|
|
14
|
+
export {AriaTabListProps, AriaTabProps, AriaTabPanelProps} from '@react-aria/tabs';
|
|
15
|
+
export {SpectrumTabsProps, SpectrumTabListProps, SpectrumTabPanelsProps} from '@react-spectrum/tabs';
|