@react-spectrum/listbox 3.14.0 → 3.14.1
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/dist/ListBox.main.js +2 -7
- package/dist/ListBox.main.js.map +1 -1
- package/dist/ListBox.mjs +2 -7
- package/dist/ListBox.module.js +2 -7
- package/dist/ListBox.module.js.map +1 -1
- package/dist/ListBoxBase.main.js +3 -6
- package/dist/ListBoxBase.main.js.map +1 -1
- package/dist/ListBoxBase.mjs +3 -6
- package/dist/ListBoxBase.module.js +3 -6
- package/dist/ListBoxBase.module.js.map +1 -1
- package/dist/ListBoxOption.main.js +1 -1
- package/dist/ListBoxOption.mjs +1 -1
- package/dist/ListBoxOption.module.js +1 -1
- package/dist/ListBoxSection.main.js +1 -1
- package/dist/ListBoxSection.mjs +1 -1
- package/dist/ListBoxSection.module.js +1 -1
- package/dist/menu_vars_css.main.js +55 -55
- package/dist/menu_vars_css.mjs +55 -55
- package/dist/menu_vars_css.module.js +55 -55
- package/dist/types.d.ts +1 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/{vars.487ba452.css → vars.e5f333b9.css} +117 -116
- package/dist/vars.e5f333b9.css.map +1 -0
- package/package.json +19 -19
- package/src/ListBox.tsx +9 -12
- package/src/ListBoxBase.tsx +4 -7
- package/dist/vars.487ba452.css.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-spectrum/listbox",
|
|
3
|
-
"version": "3.14.
|
|
3
|
+
"version": "3.14.1",
|
|
4
4
|
"description": "Spectrum UI components in React",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -36,23 +36,23 @@
|
|
|
36
36
|
"url": "https://github.com/adobe/react-spectrum"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@react-aria/focus": "^3.19.
|
|
40
|
-
"@react-aria/i18n": "^3.12.
|
|
41
|
-
"@react-aria/interactions": "^3.
|
|
42
|
-
"@react-aria/listbox": "^3.
|
|
43
|
-
"@react-aria/utils": "^3.
|
|
44
|
-
"@react-aria/virtualizer": "^4.1.
|
|
45
|
-
"@react-spectrum/layout": "^3.6.
|
|
46
|
-
"@react-spectrum/progress": "^3.7.
|
|
47
|
-
"@react-spectrum/text": "^3.5.
|
|
48
|
-
"@react-spectrum/utils": "^3.12.
|
|
49
|
-
"@react-stately/collections": "^3.12.
|
|
50
|
-
"@react-stately/layout": "^4.1.
|
|
51
|
-
"@react-stately/list": "^3.11.
|
|
52
|
-
"@react-stately/virtualizer": "^4.2.
|
|
53
|
-
"@react-types/listbox": "^3.5.
|
|
54
|
-
"@react-types/shared": "^3.
|
|
55
|
-
"@spectrum-icons/ui": "^3.6.
|
|
39
|
+
"@react-aria/focus": "^3.19.1",
|
|
40
|
+
"@react-aria/i18n": "^3.12.5",
|
|
41
|
+
"@react-aria/interactions": "^3.23.0",
|
|
42
|
+
"@react-aria/listbox": "^3.14.0",
|
|
43
|
+
"@react-aria/utils": "^3.27.0",
|
|
44
|
+
"@react-aria/virtualizer": "^4.1.1",
|
|
45
|
+
"@react-spectrum/layout": "^3.6.11",
|
|
46
|
+
"@react-spectrum/progress": "^3.7.12",
|
|
47
|
+
"@react-spectrum/text": "^3.5.11",
|
|
48
|
+
"@react-spectrum/utils": "^3.12.1",
|
|
49
|
+
"@react-stately/collections": "^3.12.1",
|
|
50
|
+
"@react-stately/layout": "^4.1.1",
|
|
51
|
+
"@react-stately/list": "^3.11.2",
|
|
52
|
+
"@react-stately/virtualizer": "^4.2.1",
|
|
53
|
+
"@react-types/listbox": "^3.5.4",
|
|
54
|
+
"@react-types/shared": "^3.27.0",
|
|
55
|
+
"@spectrum-icons/ui": "^3.6.12",
|
|
56
56
|
"@swc/helpers": "^0.5.0"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"publishConfig": {
|
|
67
67
|
"access": "public"
|
|
68
68
|
},
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "09e7f44bebdc9d89122926b2b439a0a38a2814ea"
|
|
70
70
|
}
|
package/src/ListBox.tsx
CHANGED
|
@@ -17,7 +17,14 @@ import {SpectrumListBoxProps} from '@react-types/listbox';
|
|
|
17
17
|
import {useDOMRef} from '@react-spectrum/utils';
|
|
18
18
|
import {useListState} from '@react-stately/list';
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
// forwardRef doesn't support generic parameters, so cast the result to the correct type
|
|
21
|
+
// https://stackoverflow.com/questions/58469229/react-with-typescript-generics-while-using-react-forwardref
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* A list of options that can allow selection of one or more.
|
|
26
|
+
*/
|
|
27
|
+
export const ListBox = React.forwardRef(function ListBox<T extends object>(props: SpectrumListBoxProps<T>, ref: DOMRef<HTMLDivElement>) {
|
|
21
28
|
let state = useListState(props);
|
|
22
29
|
let layout = useListBoxLayout();
|
|
23
30
|
let domRef = useDOMRef(ref);
|
|
@@ -29,14 +36,4 @@ function ListBox<T extends object>(props: SpectrumListBoxProps<T>, ref: DOMRef<H
|
|
|
29
36
|
state={state}
|
|
30
37
|
layout={layout} />
|
|
31
38
|
);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
// forwardRef doesn't support generic parameters, so cast the result to the correct type
|
|
35
|
-
// https://stackoverflow.com/questions/58469229/react-with-typescript-generics-while-using-react-forwardref
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* A list of options that can allow selection of one or more.
|
|
40
|
-
*/
|
|
41
|
-
const _ListBox = React.forwardRef(ListBox) as <T>(props: SpectrumListBoxProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;
|
|
42
|
-
export {_ListBox as ListBox};
|
|
39
|
+
}) as <T>(props: SpectrumListBoxProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;
|
package/src/ListBoxBase.tsx
CHANGED
|
@@ -62,8 +62,10 @@ export function useListBoxLayout<T>(): ListBoxLayout<T> {
|
|
|
62
62
|
return layout;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
+
// forwardRef doesn't support generic parameters, so cast the result to the correct type
|
|
66
|
+
// https://stackoverflow.com/questions/58469229/react-with-typescript-generics-while-using-react-forwardref
|
|
65
67
|
/** @private */
|
|
66
|
-
function ListBoxBase<T extends object>(props: ListBoxBaseProps<T>, ref: ForwardedRef<HTMLDivElement | null>) {
|
|
68
|
+
export const ListBoxBase = React.forwardRef(function ListBoxBase<T extends object>(props: ListBoxBaseProps<T>, ref: ForwardedRef<HTMLDivElement | null>) {
|
|
67
69
|
let {layout, state, shouldFocusOnHover = false, shouldUseVirtualFocus = false, domProps = {}, isLoading, showLoadingSpinner = isLoading, onScroll, renderEmptyState} = props;
|
|
68
70
|
let objectRef = useObjectRef(ref);
|
|
69
71
|
let {listBoxProps} = useListBox({
|
|
@@ -145,12 +147,7 @@ function ListBoxBase<T extends object>(props: ListBoxBaseProps<T>, ref: Forwarde
|
|
|
145
147
|
</FocusScope>
|
|
146
148
|
</ListBoxContext.Provider>
|
|
147
149
|
);
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
// forwardRef doesn't support generic parameters, so cast the result to the correct type
|
|
151
|
-
// https://stackoverflow.com/questions/58469229/react-with-typescript-generics-while-using-react-forwardref
|
|
152
|
-
const _ListBoxBase = React.forwardRef(ListBoxBase) as <T>(props: ListBoxBaseProps<T> & {ref?: RefObject<HTMLDivElement | null>}) => ReactElement;
|
|
153
|
-
export {_ListBoxBase as ListBoxBase};
|
|
150
|
+
}) as <T>(props: ListBoxBaseProps<T> & {ref?: RefObject<HTMLDivElement | null>}) => ReactElement;
|
|
154
151
|
|
|
155
152
|
function LoadingState() {
|
|
156
153
|
let {state} = useContext(ListBoxContext)!;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":"AA4DA;;;;;AAIE;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAQA;;;;AAIA;;;;AAKF;;;;;;;;AAOE;;;;;;;;;;;AAqBE;;;;;AAQF;;;;AAKE;;;;;AAOJ;EACE;;;;EAIE;;;;;AAMJ;;;;;;;;;;AAWA;;;;AAIA;;;;AAIA;;;;;;;;;;;;;AAmBE;;;;;AAMA;;;;AAKF;;;;;;;AAWA;;;;;;;;;;;;;AAgBE;;;;AAIA;;;;AAIA;;;;AAKE;;;;AAKF;;;;AAMF;;;;;;AAMA;;;;;;AAMA;;;;;;AAOA;;;;;;;;;AAaA;;;;;;;;;;;;AAcE;;;;AAGA;;;;AAKF;;;;;AAMA;;;;;;;;;;AAgBE;;;;AAOF;;;;;;AAOA;;;;;;AAOA;;;;;;AAOA;;;;;;AAMA;;;;;;;;AAUA;;;;;;;;AASA;;;;AAGE;;;;;;AAKE;;;;AAKF;;;;;;;;AAOE;;;;;;;;AAQA;;;;;AAIE;;;;;;;;;;AAyBN;;;;;;;AAWA;;;;;AAKA;;;;AAIA;;;;;AAIE;;;;;;AAOA;;;;;AASE;;;;AAKF;;;;AAKA;;;;;;;AACE;;;;AAUJ;;;;AAIA;;;;AAIA;;;;AAIA;;;;;;AAQA;;;;AAIA;;;;;;;;;;AASA;;;;;;;;;;AASA;;;;;;;;;;AASA;;;;;;;;;;AASA;;;;;;;AAKE;;;;AAAA;;;;AAKF;;;;;;;AAKE;;;;AAAA;;;;AAKF;EACE;;;;;EAIA;;;;;;;;;;;;;;;;;;;EAkBE;;;;EAGA;;;;;EAOI;;;;EAIF;;;;;EAXF;;;;;EAOI;;;;EAIF;;;;;EAXF;;;;;EAOI;;;;EAIF;;;;;EAXF;;;;;EAOI;;;;EAIF;;;;;EAXF;;;;;EAOI;;;;EAIF;;;;;EAXF;;;;;EAOI;;;;EAIF","sources":["packages/@adobe/spectrum-css-temp/components/menu/vars.css"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"vars.487ba452.css.map"}
|