@react-types/listbox 3.7.5 → 3.8.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.
Files changed (2) hide show
  1. package/package.json +7 -4
  2. package/src/index.d.ts +2 -41
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-types/listbox",
3
- "version": "3.7.5",
3
+ "version": "3.8.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,16 @@
9
9
  "url": "https://github.com/adobe/react-spectrum"
10
10
  },
11
11
  "dependencies": {
12
- "@react-types/shared": "^3.33.0"
12
+ "@react-aria/listbox": "^3.16.0",
13
+ "@react-spectrum/listbox": "^3.16.0"
13
14
  },
14
15
  "peerDependencies": {
15
- "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1"
16
+ "@react-spectrum/provider": "^3.0.0",
17
+ "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1",
18
+ "react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1"
16
19
  },
17
20
  "publishConfig": {
18
21
  "access": "public"
19
22
  },
20
- "gitHead": "66e51757606b43a89ed02c574ca24517323a2ab9"
23
+ "gitHead": "a6999bdf494a2e9c0381a5881908328bdd22ddae"
21
24
  }
package/src/index.d.ts CHANGED
@@ -10,44 +10,5 @@
10
10
  * governing permissions and limitations under the License.
11
11
  */
12
12
 
13
- import {AriaLabelingProps, AsyncLoadable, CollectionBase, DOMProps, FocusEvents, FocusStrategy, Key, MultipleSelection, SelectionBehavior, StyleProps} from '@react-types/shared';
14
- import {ReactNode} from 'react';
15
-
16
- export interface ListBoxProps<T> extends CollectionBase<T>, MultipleSelection, FocusEvents {
17
- /** Whether to auto focus the listbox or an option. */
18
- autoFocus?: boolean | FocusStrategy,
19
- /** Whether focus should wrap around when the end/start is reached. */
20
- shouldFocusWrap?: boolean
21
- }
22
-
23
- interface AriaListBoxPropsBase<T> extends ListBoxProps<T>, DOMProps, AriaLabelingProps {
24
- /**
25
- * Whether pressing the escape key should clear selection in the listbox or not.
26
- *
27
- * Most experiences should not modify this option as it eliminates a keyboard user's ability to
28
- * easily clear selection. Only use if the escape key is being handled externally or should not
29
- * trigger selection clearing contextually.
30
- * @default 'clearSelection'
31
- */
32
- escapeKeyBehavior?: 'clearSelection' | 'none'
33
- }
34
- export interface AriaListBoxProps<T> extends AriaListBoxPropsBase<T> {
35
- /**
36
- * An optional visual label for the listbox.
37
- */
38
- label?: ReactNode,
39
- /** How multiple selection should behave in the collection. */
40
- selectionBehavior?: SelectionBehavior,
41
- /** Whether selection should occur on press up instead of press down. */
42
- shouldSelectOnPressUp?: boolean,
43
- /** Whether options should be focused when the user hovers over them. */
44
- shouldFocusOnHover?: boolean,
45
- /**
46
- * Handler that is called when a user performs an action on an item. The exact user event depends on
47
- * the collection's `selectionBehavior` prop and the interaction modality.
48
- */
49
- onAction?: (key: Key) => void
50
- }
51
-
52
- export interface SpectrumListBoxProps<T> extends AriaListBoxPropsBase<T>, AsyncLoadable, StyleProps {
53
- }
13
+ export {ListBoxProps, AriaListBoxProps} from '@react-aria/listbox';
14
+ export {SpectrumListBoxProps} from '@react-spectrum/listbox';