@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/dist/ListBox.main.js
CHANGED
|
@@ -27,7 +27,7 @@ $parcel$export(module.exports, "ListBox", () => $582d86e45be55635$export$41f1335
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
const $582d86e45be55635$export$41f133550aa26f48 = /*#__PURE__*/ (0, ($parcel$interopDefault($kvNjb$react))).forwardRef(function ListBox(props, ref) {
|
|
31
31
|
let state = (0, $kvNjb$reactstatelylist.useListState)(props);
|
|
32
32
|
let layout = (0, $60eb4b34c53310cb$exports.useListBoxLayout)();
|
|
33
33
|
let domRef = (0, $kvNjb$reactspectrumutils.useDOMRef)(ref);
|
|
@@ -37,12 +37,7 @@ function $582d86e45be55635$var$ListBox(props, ref) {
|
|
|
37
37
|
state: state,
|
|
38
38
|
layout: layout
|
|
39
39
|
});
|
|
40
|
-
}
|
|
41
|
-
// forwardRef doesn't support generic parameters, so cast the result to the correct type
|
|
42
|
-
// https://stackoverflow.com/questions/58469229/react-with-typescript-generics-while-using-react-forwardref
|
|
43
|
-
/**
|
|
44
|
-
* A list of options that can allow selection of one or more.
|
|
45
|
-
*/ const $582d86e45be55635$export$41f133550aa26f48 = /*#__PURE__*/ (0, ($parcel$interopDefault($kvNjb$react))).forwardRef($582d86e45be55635$var$ListBox);
|
|
40
|
+
});
|
|
46
41
|
|
|
47
42
|
|
|
48
43
|
//# sourceMappingURL=ListBox.main.js.map
|
package/dist/ListBox.main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;AAgBM,MAAM,0DAAU,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC,SAAS,QAA0B,KAA8B,EAAE,GAA2B;IACpI,IAAI,QAAQ,CAAA,GAAA,oCAAW,EAAE;IACzB,IAAI,SAAS,CAAA,GAAA,0CAAe;IAC5B,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IAEvB,qBACE,0DAAC,CAAA,GAAA,qCAAU;QACR,GAAG,KAAK;QACT,KAAK;QACL,OAAO;QACP,QAAQ;;AAEd","sources":["packages/@react-spectrum/listbox/src/ListBox.tsx"],"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\nimport {DOMRef} from '@react-types/shared';\nimport {ListBoxBase, useListBoxLayout} from './ListBoxBase';\nimport React, {ReactElement} from 'react';\nimport {SpectrumListBoxProps} from '@react-types/listbox';\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useListState} from '@react-stately/list';\n\n// forwardRef doesn't support generic parameters, so cast the result to the correct type\n// https://stackoverflow.com/questions/58469229/react-with-typescript-generics-while-using-react-forwardref\n\n\n/**\n * A list of options that can allow selection of one or more.\n */\nexport const ListBox = React.forwardRef(function ListBox<T extends object>(props: SpectrumListBoxProps<T>, ref: DOMRef<HTMLDivElement>) {\n let state = useListState(props);\n let layout = useListBoxLayout();\n let domRef = useDOMRef(ref);\n\n return (\n <ListBoxBase\n {...props}\n ref={domRef}\n state={state}\n layout={layout} />\n );\n}) as <T>(props: SpectrumListBoxProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;\n"],"names":[],"version":3,"file":"ListBox.main.js.map"}
|
package/dist/ListBox.mjs
CHANGED
|
@@ -17,7 +17,7 @@ import {useListState as $7rJGh$useListState} from "@react-stately/list";
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
const $3136257018b1a220$export$41f133550aa26f48 = /*#__PURE__*/ (0, $7rJGh$react).forwardRef(function ListBox(props, ref) {
|
|
21
21
|
let state = (0, $7rJGh$useListState)(props);
|
|
22
22
|
let layout = (0, $3247d4a89e6094e9$export$25768ea656ae32a7)();
|
|
23
23
|
let domRef = (0, $7rJGh$useDOMRef)(ref);
|
|
@@ -27,12 +27,7 @@ function $3136257018b1a220$var$ListBox(props, ref) {
|
|
|
27
27
|
state: state,
|
|
28
28
|
layout: layout
|
|
29
29
|
});
|
|
30
|
-
}
|
|
31
|
-
// forwardRef doesn't support generic parameters, so cast the result to the correct type
|
|
32
|
-
// https://stackoverflow.com/questions/58469229/react-with-typescript-generics-while-using-react-forwardref
|
|
33
|
-
/**
|
|
34
|
-
* A list of options that can allow selection of one or more.
|
|
35
|
-
*/ const $3136257018b1a220$export$41f133550aa26f48 = /*#__PURE__*/ (0, $7rJGh$react).forwardRef($3136257018b1a220$var$ListBox);
|
|
30
|
+
});
|
|
36
31
|
|
|
37
32
|
|
|
38
33
|
export {$3136257018b1a220$export$41f133550aa26f48 as ListBox};
|
package/dist/ListBox.module.js
CHANGED
|
@@ -17,7 +17,7 @@ import {useListState as $7rJGh$useListState} from "@react-stately/list";
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
const $3136257018b1a220$export$41f133550aa26f48 = /*#__PURE__*/ (0, $7rJGh$react).forwardRef(function ListBox(props, ref) {
|
|
21
21
|
let state = (0, $7rJGh$useListState)(props);
|
|
22
22
|
let layout = (0, $3247d4a89e6094e9$export$25768ea656ae32a7)();
|
|
23
23
|
let domRef = (0, $7rJGh$useDOMRef)(ref);
|
|
@@ -27,12 +27,7 @@ function $3136257018b1a220$var$ListBox(props, ref) {
|
|
|
27
27
|
state: state,
|
|
28
28
|
layout: layout
|
|
29
29
|
});
|
|
30
|
-
}
|
|
31
|
-
// forwardRef doesn't support generic parameters, so cast the result to the correct type
|
|
32
|
-
// https://stackoverflow.com/questions/58469229/react-with-typescript-generics-while-using-react-forwardref
|
|
33
|
-
/**
|
|
34
|
-
* A list of options that can allow selection of one or more.
|
|
35
|
-
*/ const $3136257018b1a220$export$41f133550aa26f48 = /*#__PURE__*/ (0, $7rJGh$react).forwardRef($3136257018b1a220$var$ListBox);
|
|
30
|
+
});
|
|
36
31
|
|
|
37
32
|
|
|
38
33
|
export {$3136257018b1a220$export$41f133550aa26f48 as ListBox};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;AAAA;;;;;;;;;;CAUC;;;;
|
|
1
|
+
{"mappings":";;;;;AAAA;;;;;;;;;;CAUC;;;;AAgBM,MAAM,0DAAU,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC,SAAS,QAA0B,KAA8B,EAAE,GAA2B;IACpI,IAAI,QAAQ,CAAA,GAAA,mBAAW,EAAE;IACzB,IAAI,SAAS,CAAA,GAAA,yCAAe;IAC5B,IAAI,SAAS,CAAA,GAAA,gBAAQ,EAAE;IAEvB,qBACE,gCAAC,CAAA,GAAA,yCAAU;QACR,GAAG,KAAK;QACT,KAAK;QACL,OAAO;QACP,QAAQ;;AAEd","sources":["packages/@react-spectrum/listbox/src/ListBox.tsx"],"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\nimport {DOMRef} from '@react-types/shared';\nimport {ListBoxBase, useListBoxLayout} from './ListBoxBase';\nimport React, {ReactElement} from 'react';\nimport {SpectrumListBoxProps} from '@react-types/listbox';\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useListState} from '@react-stately/list';\n\n// forwardRef doesn't support generic parameters, so cast the result to the correct type\n// https://stackoverflow.com/questions/58469229/react-with-typescript-generics-while-using-react-forwardref\n\n\n/**\n * A list of options that can allow selection of one or more.\n */\nexport const ListBox = React.forwardRef(function ListBox<T extends object>(props: SpectrumListBoxProps<T>, ref: DOMRef<HTMLDivElement>) {\n let state = useListState(props);\n let layout = useListBoxLayout();\n let domRef = useDOMRef(ref);\n\n return (\n <ListBoxBase\n {...props}\n ref={domRef}\n state={state}\n layout={layout} />\n );\n}) as <T>(props: SpectrumListBoxProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;\n"],"names":[],"version":3,"file":"ListBox.module.js.map"}
|
package/dist/ListBoxBase.main.js
CHANGED
|
@@ -3,7 +3,7 @@ var $611e93c7b7c0413c$exports = require("./ListBoxContext.main.js");
|
|
|
3
3
|
var $570d5c216669f686$exports = require("./ListBoxLayout.main.js");
|
|
4
4
|
var $2205d250ee1cb1ac$exports = require("./ListBoxOption.main.js");
|
|
5
5
|
var $0f5fd8483f48ef09$exports = require("./ListBoxSection.main.js");
|
|
6
|
-
require("./vars.
|
|
6
|
+
require("./vars.e5f333b9.css");
|
|
7
7
|
var $3deee0fd2b46e64f$exports = require("./menu_vars_css.main.js");
|
|
8
8
|
var $7w19U$reactarialistbox = require("@react-aria/listbox");
|
|
9
9
|
var $7w19U$reactspectrumutils = require("@react-spectrum/utils");
|
|
@@ -63,7 +63,7 @@ function $60eb4b34c53310cb$export$25768ea656ae32a7() {
|
|
|
63
63
|
]);
|
|
64
64
|
return layout;
|
|
65
65
|
}
|
|
66
|
-
|
|
66
|
+
const $60eb4b34c53310cb$export$1afdcf349979fb7e = /*#__PURE__*/ (0, ($parcel$interopDefault($7w19U$react))).forwardRef(function ListBoxBase(props, ref) {
|
|
67
67
|
let { layout: layout, state: state, shouldFocusOnHover: shouldFocusOnHover = false, shouldUseVirtualFocus: shouldUseVirtualFocus = false, domProps: domProps = {}, isLoading: isLoading, showLoadingSpinner: showLoadingSpinner = isLoading, onScroll: onScroll, renderEmptyState: renderEmptyState } = props;
|
|
68
68
|
let objectRef = (0, $7w19U$reactariautils.useObjectRef)(ref);
|
|
69
69
|
let { listBoxProps: listBoxProps } = (0, $7w19U$reactarialistbox.useListBox)({
|
|
@@ -129,10 +129,7 @@ function $60eb4b34c53310cb$export$25768ea656ae32a7() {
|
|
|
129
129
|
else if (type === 'placeholder') return /*#__PURE__*/ (0, ($parcel$interopDefault($7w19U$react))).createElement($60eb4b34c53310cb$var$EmptyState, null);
|
|
130
130
|
else return null;
|
|
131
131
|
}, []))));
|
|
132
|
-
}
|
|
133
|
-
// forwardRef doesn't support generic parameters, so cast the result to the correct type
|
|
134
|
-
// https://stackoverflow.com/questions/58469229/react-with-typescript-generics-while-using-react-forwardref
|
|
135
|
-
const $60eb4b34c53310cb$export$1afdcf349979fb7e = /*#__PURE__*/ (0, ($parcel$interopDefault($7w19U$react))).forwardRef($60eb4b34c53310cb$var$ListBoxBase);
|
|
132
|
+
});
|
|
136
133
|
function $60eb4b34c53310cb$var$LoadingState() {
|
|
137
134
|
let { state: state } = (0, $7w19U$react.useContext)((0, $611e93c7b7c0413c$exports.ListBoxContext));
|
|
138
135
|
let stringFormatter = (0, $7w19U$reactariai18n.useLocalizedStringFormatter)((0, ($parcel$interopDefault($3d9fe9b46e2d649a$exports))), '@react-spectrum/listbox');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;;AAwCM,SAAS;IACd,IAAI,SAAC,KAAK,EAAC,GAAG,CAAA,GAAA,wCAAU;IACxB,IAAI,SAAS,CAAA,GAAA,oBAAM,EAAE,IACnB,IAAI,CAAA,GAAA,uCAAY,EAAK;YACnB,oBAAoB,UAAU,UAAU,KAAK;YAC7C,wBAAwB,UAAU,UAAU,KAAK;YACjD,SAAS,UAAU,UAAU,IAAI;YACjC,mBAAmB,UAAU,UAAU,KAAK;QAC9C,IACA;QAAC;KAAM;IAET,OAAO;AACT;AAEA,aAAa,GACb,SAAS,kCAA8B,KAA0B,EAAE,GAAwC;IACzG,IAAI,UAAC,MAAM,SAAE,KAAK,sBAAE,qBAAqB,8BAAO,wBAAwB,iBAAO,WAAW,CAAC,cAAG,SAAS,sBAAE,qBAAqB,qBAAW,QAAQ,oBAAE,gBAAgB,EAAC,GAAG;IACvK,IAAI,YAAY,CAAA,GAAA,kCAAW,EAAE;IAC7B,IAAI,gBAAC,YAAY,EAAC,GAAG,CAAA,GAAA,kCAAS,EAAE;QAC9B,GAAG,KAAK;QACR,gBAAgB;QAChB,eAAe;IACjB,GAAG,OAAO;IACV,IAAI,cA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E,iEAAiE;QACjE,MAAK;OACJ;AAGP","sources":["packages/@react-spectrum/listbox/src/ListBoxBase.tsx"],"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\nimport {AriaLabelingProps, DOMProps, FocusStrategy, Node, RefObject, StyleProps} from '@react-types/shared';\nimport {AriaListBoxOptions, useListBox} from '@react-aria/listbox';\nimport {classNames, useStyleProps} from '@react-spectrum/utils';\nimport {FocusScope} from '@react-aria/focus';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {ListBoxContext} from './ListBoxContext';\nimport {ListBoxLayout} from './ListBoxLayout';\nimport {ListBoxOption} from './ListBoxOption';\nimport {ListBoxSection} from './ListBoxSection';\nimport {ListState} from '@react-stately/list';\nimport {mergeProps, useObjectRef} from '@react-aria/utils';\nimport {ProgressCircle} from '@react-spectrum/progress';\nimport React, {ForwardedRef, HTMLAttributes, ReactElement, ReactNode, useCallback, useContext, useMemo} from 'react';\nimport {ReusableView} from '@react-stately/virtualizer';\nimport styles from '@adobe/spectrum-css-temp/components/menu/vars.css';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useProvider} from '@react-spectrum/provider';\nimport {Virtualizer, VirtualizerItem} from '@react-aria/virtualizer';\n\ninterface ListBoxBaseProps<T> extends AriaListBoxOptions<T>, DOMProps, AriaLabelingProps, StyleProps {\n layout: ListBoxLayout<T>,\n state: ListState<T>,\n autoFocus?: boolean | FocusStrategy,\n shouldFocusWrap?: boolean,\n shouldSelectOnPressUp?: boolean,\n focusOnPointerEnter?: boolean,\n domProps?: HTMLAttributes<HTMLElement>,\n disallowEmptySelection?: boolean,\n shouldUseVirtualFocus?: boolean,\n isLoading?: boolean,\n showLoadingSpinner?: boolean,\n onLoadMore?: () => void,\n renderEmptyState?: () => ReactNode,\n onScroll?: () => void\n}\n\n/** @private */\nexport function useListBoxLayout<T>(): ListBoxLayout<T> {\n let {scale} = useProvider();\n let layout = useMemo(() =>\n new ListBoxLayout<T>({\n estimatedRowHeight: scale === 'large' ? 48 : 32,\n estimatedHeadingHeight: scale === 'large' ? 33 : 26,\n padding: scale === 'large' ? 5 : 4, // TODO: get from DNA\n placeholderHeight: scale === 'large' ? 48 : 32\n })\n , [scale]);\n\n return layout;\n}\n\n/** @private */\nfunction ListBoxBase<T extends object>(props: ListBoxBaseProps<T>, ref: ForwardedRef<HTMLDivElement | null>) {\n let {layout, state, shouldFocusOnHover = false, shouldUseVirtualFocus = false, domProps = {}, isLoading, showLoadingSpinner = isLoading, onScroll, renderEmptyState} = props;\n let objectRef = useObjectRef(ref);\n let {listBoxProps} = useListBox({\n ...props,\n layoutDelegate: layout,\n isVirtualized: true\n }, state, objectRef);\n let {styleProps} = useStyleProps(props);\n\n // This overrides collection view's renderWrapper to support hierarchy of items in sections.\n // The header is extracted from the children so it can receive ARIA labeling properties.\n type View = ReusableView<Node<T>, ReactNode>;\n let renderWrapper = useCallback((parent: View | null, reusableView: View, children: View[], renderChildren: (views: View[]) => ReactElement[]) => {\n if (reusableView.viewType === 'section') {\n return (\n <ListBoxSection\n key={reusableView.key}\n item={reusableView.content!}\n layoutInfo={reusableView.layoutInfo!}\n virtualizer={reusableView.virtualizer}\n headerLayoutInfo={children.find(c => c.viewType === 'header')?.layoutInfo ?? null}>\n {renderChildren(children.filter(c => c.viewType === 'item'))}\n </ListBoxSection>\n );\n }\n\n return (\n <VirtualizerItem\n key={reusableView.key}\n layoutInfo={reusableView.layoutInfo!}\n virtualizer={reusableView.virtualizer}\n parent={parent?.layoutInfo}>\n {reusableView.rendered}\n </VirtualizerItem>\n );\n }, []);\n\n let focusedKey = state.selectionManager.focusedKey;\n let persistedKeys = useMemo(() => focusedKey != null ? new Set([focusedKey]) : null, [focusedKey]);\n\n return (\n <ListBoxContext.Provider value={{state, renderEmptyState, shouldFocusOnHover, shouldUseVirtualFocus}}>\n <FocusScope>\n <Virtualizer\n {...styleProps}\n {...mergeProps(listBoxProps, domProps)}\n ref={objectRef}\n persistedKeys={persistedKeys}\n autoFocus={!!props.autoFocus || undefined}\n scrollDirection=\"vertical\"\n className={\n classNames(\n styles,\n 'spectrum-Menu',\n styleProps.className\n )\n }\n layout={layout}\n layoutOptions={useMemo(() => ({\n isLoading: showLoadingSpinner\n }), [showLoadingSpinner])}\n collection={state.collection}\n renderWrapper={renderWrapper}\n isLoading={isLoading}\n onLoadMore={props.onLoadMore}\n onScroll={onScroll}>\n {useCallback((type, item: Node<T>): ReactNode => {\n if (type === 'item') {\n return <ListBoxOption item={item} />;\n } else if (type === 'loader') {\n return <LoadingState />;\n } else if (type === 'placeholder') {\n return <EmptyState />;\n } else {\n return null;\n }\n }, [])}\n </Virtualizer>\n </FocusScope>\n </ListBoxContext.Provider>\n );\n}\n\n// forwardRef doesn't support generic parameters, so cast the result to the correct type\n// https://stackoverflow.com/questions/58469229/react-with-typescript-generics-while-using-react-forwardref\nconst _ListBoxBase = React.forwardRef(ListBoxBase) as <T>(props: ListBoxBaseProps<T> & {ref?: RefObject<HTMLDivElement | null>}) => ReactElement;\nexport {_ListBoxBase as ListBoxBase};\n\nfunction LoadingState() {\n let {state} = useContext(ListBoxContext)!;\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/listbox');\n return (\n // aria-selected isn't needed here since this option is not selectable.\n // eslint-disable-next-line jsx-a11y/role-has-required-aria-props\n <div role=\"option\" style={{display: 'flex', alignItems: 'center', justifyContent: 'center', height: '100%'}}>\n <ProgressCircle\n isIndeterminate\n size=\"S\"\n aria-label={state.collection.size > 0 ? stringFormatter.format('loadingMore') : stringFormatter.format('loading')}\n UNSAFE_className={classNames(styles, 'spectrum-Dropdown-progressCircle')} />\n </div>\n );\n}\n\nfunction EmptyState() {\n let {renderEmptyState} = useContext(ListBoxContext)!;\n let emptyState = renderEmptyState ? renderEmptyState() : null;\n if (emptyState == null) {\n return null;\n }\n\n return (\n <div\n // aria-selected isn't needed here since this option is not selectable.\n // eslint-disable-next-line jsx-a11y/role-has-required-aria-props\n role=\"option\">\n {emptyState}\n </div>\n );\n}\n"],"names":[],"version":3,"file":"ListBoxBase.main.js.map"}
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;;AAwCM,SAAS;IACd,IAAI,SAAC,KAAK,EAAC,GAAG,CAAA,GAAA,wCAAU;IACxB,IAAI,SAAS,CAAA,GAAA,oBAAM,EAAE,IACnB,IAAI,CAAA,GAAA,uCAAY,EAAK;YACnB,oBAAoB,UAAU,UAAU,KAAK;YAC7C,wBAAwB,UAAU,UAAU,KAAK;YACjD,SAAS,UAAU,UAAU,IAAI;YACjC,mBAAmB,UAAU,UAAU,KAAK;QAC9C,IACA;QAAC;KAAM;IAET,OAAO;AACT;AAKO,MAAM,0DAAc,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC,SAAS,YAA8B,KAA0B,EAAE,GAAwC;IACrJ,IAAI,UAAC,MAAM,SAAE,KAAK,sBAAE,qBAAqB,8BAAO,wBAAwB,iBAAO,WAAW,CAAC,cAAG,SAAS,sBAAE,qBAAqB,qBAAW,QAAQ,oBAAE,gBAAgB,EAAC,GAAG;IACvK,IAAI,YAAY,CAAA,GAAA,kCAAW,EAAE;IAC7B,IAAI,gBAAC,YAAY,EAAC,GAAG,CAAA,GAAA,kCAAS,EAAE;QAC9B,GAAG,KAAK;QACR,gBAAgB;QAChB,eAAe;IACjB,GAAG,OAAO;IACV,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,uCAAY,EAAE;IAKjC,IAAI,gBAAgB,CAAA,GAAA,wBAAU,E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YACb,CAAA,GAAI;YAAC;SAAmB;QACxB,YAAY,MAAM,UAAU;QAC5B,eAAe;QACf,WAAW;QACX,YAAY,MAAM,UAAU;QAC5B,UAAU;OACT,CAAA,GAAA,wBAAU,EAAE,CAAC,MAAM;QAClB,IAAI,SAAS,QACX,qBAAO,0DAAC,CAAA,GAAA,uCAAY;YAAE,MAAM;;aACvB,IAAI,SAAS,UAClB,qBAAO,0DAAC;aACH,IAAI,SAAS,eAClB,qBAAO,0DAAC;aAER,OAAO;IAEX,GAAG,EAAE;AAKf;AAEA,SAAS;IACP,IAAI,SAAC,KAAK,EAAC,GAAG,CAAA,GAAA,uBAAS,EAAE,CAAA,GAAA,wCAAa;IACtC,IAAI,kBAAkB,CAAA,GAAA,gDAA0B,EAAE,CAAA,GAAA,mDAAW,GAAG;IAChE,OACE,uEAAuE;IACvE,iEAAiE;kBACjE,0DAAC;QAAI,MAAK;QAAS,OAAO;YAAC,SAAS;YAAQ,YAAY;YAAU,gBAAgB;YAAU,QAAQ;QAAM;qBACxG,0DAAC,CAAA,GAAA,2CAAa;QACZ,iBAAA;QACA,MAAK;QACL,cAAY,MAAM,UAAU,CAAC,IAAI,GAAG,IAAI,gBAAgB,MAAM,CAAC,iBAAiB,gBAAgB,MAAM,CAAC;QACvG,kBAAkB,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;;AAG7C;AAEA,SAAS;IACP,IAAI,oBAAC,gBAAgB,EAAC,GAAG,CAAA,GAAA,uBAAS,EAAE,CAAA,GAAA,wCAAa;IACjD,IAAI,aAAa,mBAAmB,qBAAqB;IACzD,IAAI,cAAc,MAChB,OAAO;IAGT,qBACE,0DAAC;QACC,uEAAuE;QACvE,iEAAiE;QACjE,MAAK;OACJ;AAGP","sources":["packages/@react-spectrum/listbox/src/ListBoxBase.tsx"],"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\nimport {AriaLabelingProps, DOMProps, FocusStrategy, Node, RefObject, StyleProps} from '@react-types/shared';\nimport {AriaListBoxOptions, useListBox} from '@react-aria/listbox';\nimport {classNames, useStyleProps} from '@react-spectrum/utils';\nimport {FocusScope} from '@react-aria/focus';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {ListBoxContext} from './ListBoxContext';\nimport {ListBoxLayout} from './ListBoxLayout';\nimport {ListBoxOption} from './ListBoxOption';\nimport {ListBoxSection} from './ListBoxSection';\nimport {ListState} from '@react-stately/list';\nimport {mergeProps, useObjectRef} from '@react-aria/utils';\nimport {ProgressCircle} from '@react-spectrum/progress';\nimport React, {ForwardedRef, HTMLAttributes, ReactElement, ReactNode, useCallback, useContext, useMemo} from 'react';\nimport {ReusableView} from '@react-stately/virtualizer';\nimport styles from '@adobe/spectrum-css-temp/components/menu/vars.css';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useProvider} from '@react-spectrum/provider';\nimport {Virtualizer, VirtualizerItem} from '@react-aria/virtualizer';\n\ninterface ListBoxBaseProps<T> extends AriaListBoxOptions<T>, DOMProps, AriaLabelingProps, StyleProps {\n layout: ListBoxLayout<T>,\n state: ListState<T>,\n autoFocus?: boolean | FocusStrategy,\n shouldFocusWrap?: boolean,\n shouldSelectOnPressUp?: boolean,\n focusOnPointerEnter?: boolean,\n domProps?: HTMLAttributes<HTMLElement>,\n disallowEmptySelection?: boolean,\n shouldUseVirtualFocus?: boolean,\n isLoading?: boolean,\n showLoadingSpinner?: boolean,\n onLoadMore?: () => void,\n renderEmptyState?: () => ReactNode,\n onScroll?: () => void\n}\n\n/** @private */\nexport function useListBoxLayout<T>(): ListBoxLayout<T> {\n let {scale} = useProvider();\n let layout = useMemo(() =>\n new ListBoxLayout<T>({\n estimatedRowHeight: scale === 'large' ? 48 : 32,\n estimatedHeadingHeight: scale === 'large' ? 33 : 26,\n padding: scale === 'large' ? 5 : 4, // TODO: get from DNA\n placeholderHeight: scale === 'large' ? 48 : 32\n })\n , [scale]);\n\n return layout;\n}\n\n// forwardRef doesn't support generic parameters, so cast the result to the correct type\n// https://stackoverflow.com/questions/58469229/react-with-typescript-generics-while-using-react-forwardref\n/** @private */\nexport const ListBoxBase = React.forwardRef(function ListBoxBase<T extends object>(props: ListBoxBaseProps<T>, ref: ForwardedRef<HTMLDivElement | null>) {\n let {layout, state, shouldFocusOnHover = false, shouldUseVirtualFocus = false, domProps = {}, isLoading, showLoadingSpinner = isLoading, onScroll, renderEmptyState} = props;\n let objectRef = useObjectRef(ref);\n let {listBoxProps} = useListBox({\n ...props,\n layoutDelegate: layout,\n isVirtualized: true\n }, state, objectRef);\n let {styleProps} = useStyleProps(props);\n\n // This overrides collection view's renderWrapper to support hierarchy of items in sections.\n // The header is extracted from the children so it can receive ARIA labeling properties.\n type View = ReusableView<Node<T>, ReactNode>;\n let renderWrapper = useCallback((parent: View | null, reusableView: View, children: View[], renderChildren: (views: View[]) => ReactElement[]) => {\n if (reusableView.viewType === 'section') {\n return (\n <ListBoxSection\n key={reusableView.key}\n item={reusableView.content!}\n layoutInfo={reusableView.layoutInfo!}\n virtualizer={reusableView.virtualizer}\n headerLayoutInfo={children.find(c => c.viewType === 'header')?.layoutInfo ?? null}>\n {renderChildren(children.filter(c => c.viewType === 'item'))}\n </ListBoxSection>\n );\n }\n\n return (\n <VirtualizerItem\n key={reusableView.key}\n layoutInfo={reusableView.layoutInfo!}\n virtualizer={reusableView.virtualizer}\n parent={parent?.layoutInfo}>\n {reusableView.rendered}\n </VirtualizerItem>\n );\n }, []);\n\n let focusedKey = state.selectionManager.focusedKey;\n let persistedKeys = useMemo(() => focusedKey != null ? new Set([focusedKey]) : null, [focusedKey]);\n\n return (\n <ListBoxContext.Provider value={{state, renderEmptyState, shouldFocusOnHover, shouldUseVirtualFocus}}>\n <FocusScope>\n <Virtualizer\n {...styleProps}\n {...mergeProps(listBoxProps, domProps)}\n ref={objectRef}\n persistedKeys={persistedKeys}\n autoFocus={!!props.autoFocus || undefined}\n scrollDirection=\"vertical\"\n className={\n classNames(\n styles,\n 'spectrum-Menu',\n styleProps.className\n )\n }\n layout={layout}\n layoutOptions={useMemo(() => ({\n isLoading: showLoadingSpinner\n }), [showLoadingSpinner])}\n collection={state.collection}\n renderWrapper={renderWrapper}\n isLoading={isLoading}\n onLoadMore={props.onLoadMore}\n onScroll={onScroll}>\n {useCallback((type, item: Node<T>): ReactNode => {\n if (type === 'item') {\n return <ListBoxOption item={item} />;\n } else if (type === 'loader') {\n return <LoadingState />;\n } else if (type === 'placeholder') {\n return <EmptyState />;\n } else {\n return null;\n }\n }, [])}\n </Virtualizer>\n </FocusScope>\n </ListBoxContext.Provider>\n );\n}) as <T>(props: ListBoxBaseProps<T> & {ref?: RefObject<HTMLDivElement | null>}) => ReactElement;\n\nfunction LoadingState() {\n let {state} = useContext(ListBoxContext)!;\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/listbox');\n return (\n // aria-selected isn't needed here since this option is not selectable.\n // eslint-disable-next-line jsx-a11y/role-has-required-aria-props\n <div role=\"option\" style={{display: 'flex', alignItems: 'center', justifyContent: 'center', height: '100%'}}>\n <ProgressCircle\n isIndeterminate\n size=\"S\"\n aria-label={state.collection.size > 0 ? stringFormatter.format('loadingMore') : stringFormatter.format('loading')}\n UNSAFE_className={classNames(styles, 'spectrum-Dropdown-progressCircle')} />\n </div>\n );\n}\n\nfunction EmptyState() {\n let {renderEmptyState} = useContext(ListBoxContext)!;\n let emptyState = renderEmptyState ? renderEmptyState() : null;\n if (emptyState == null) {\n return null;\n }\n\n return (\n <div\n // aria-selected isn't needed here since this option is not selectable.\n // eslint-disable-next-line jsx-a11y/role-has-required-aria-props\n role=\"option\">\n {emptyState}\n </div>\n );\n}\n"],"names":[],"version":3,"file":"ListBoxBase.main.js.map"}
|
package/dist/ListBoxBase.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import {ListBoxContext as $0c6f792811e33483$export$7ff8f37d2d81a48d} from "./Lis
|
|
|
3
3
|
import {ListBoxLayout as $d20755daac213984$export$c7e5f5ea00052bf} from "./ListBoxLayout.mjs";
|
|
4
4
|
import {ListBoxOption as $86983ea1fa3f7312$export$feb3b6b552c14a12} from "./ListBoxOption.mjs";
|
|
5
5
|
import {ListBoxSection as $92d678ed88836094$export$dca12b0bb56e4fc} from "./ListBoxSection.mjs";
|
|
6
|
-
import "./vars.
|
|
6
|
+
import "./vars.e5f333b9.css";
|
|
7
7
|
import $gF3QK$menu_vars_cssmodulejs from "./menu_vars_css.mjs";
|
|
8
8
|
import {useListBox as $gF3QK$useListBox} from "@react-aria/listbox";
|
|
9
9
|
import {useStyleProps as $gF3QK$useStyleProps, classNames as $gF3QK$classNames} from "@react-spectrum/utils";
|
|
@@ -56,7 +56,7 @@ function $3247d4a89e6094e9$export$25768ea656ae32a7() {
|
|
|
56
56
|
]);
|
|
57
57
|
return layout;
|
|
58
58
|
}
|
|
59
|
-
|
|
59
|
+
const $3247d4a89e6094e9$export$1afdcf349979fb7e = /*#__PURE__*/ (0, $gF3QK$react).forwardRef(function ListBoxBase(props, ref) {
|
|
60
60
|
let { layout: layout, state: state, shouldFocusOnHover: shouldFocusOnHover = false, shouldUseVirtualFocus: shouldUseVirtualFocus = false, domProps: domProps = {}, isLoading: isLoading, showLoadingSpinner: showLoadingSpinner = isLoading, onScroll: onScroll, renderEmptyState: renderEmptyState } = props;
|
|
61
61
|
let objectRef = (0, $gF3QK$useObjectRef)(ref);
|
|
62
62
|
let { listBoxProps: listBoxProps } = (0, $gF3QK$useListBox)({
|
|
@@ -122,10 +122,7 @@ function $3247d4a89e6094e9$export$25768ea656ae32a7() {
|
|
|
122
122
|
else if (type === 'placeholder') return /*#__PURE__*/ (0, $gF3QK$react).createElement($3247d4a89e6094e9$var$EmptyState, null);
|
|
123
123
|
else return null;
|
|
124
124
|
}, []))));
|
|
125
|
-
}
|
|
126
|
-
// forwardRef doesn't support generic parameters, so cast the result to the correct type
|
|
127
|
-
// https://stackoverflow.com/questions/58469229/react-with-typescript-generics-while-using-react-forwardref
|
|
128
|
-
const $3247d4a89e6094e9$export$1afdcf349979fb7e = /*#__PURE__*/ (0, $gF3QK$react).forwardRef($3247d4a89e6094e9$var$ListBoxBase);
|
|
125
|
+
});
|
|
129
126
|
function $3247d4a89e6094e9$var$LoadingState() {
|
|
130
127
|
let { state: state } = (0, $gF3QK$useContext)((0, $0c6f792811e33483$export$7ff8f37d2d81a48d));
|
|
131
128
|
let stringFormatter = (0, $gF3QK$useLocalizedStringFormatter)((0, ($parcel$interopDefault($gF3QK$intlStringsmodulejs))), '@react-spectrum/listbox');
|
|
@@ -3,7 +3,7 @@ import {ListBoxContext as $0c6f792811e33483$export$7ff8f37d2d81a48d} from "./Lis
|
|
|
3
3
|
import {ListBoxLayout as $d20755daac213984$export$c7e5f5ea00052bf} from "./ListBoxLayout.module.js";
|
|
4
4
|
import {ListBoxOption as $86983ea1fa3f7312$export$feb3b6b552c14a12} from "./ListBoxOption.module.js";
|
|
5
5
|
import {ListBoxSection as $92d678ed88836094$export$dca12b0bb56e4fc} from "./ListBoxSection.module.js";
|
|
6
|
-
import "./vars.
|
|
6
|
+
import "./vars.e5f333b9.css";
|
|
7
7
|
import $gF3QK$menu_vars_cssmodulejs from "./menu_vars_css.module.js";
|
|
8
8
|
import {useListBox as $gF3QK$useListBox} from "@react-aria/listbox";
|
|
9
9
|
import {useStyleProps as $gF3QK$useStyleProps, classNames as $gF3QK$classNames} from "@react-spectrum/utils";
|
|
@@ -56,7 +56,7 @@ function $3247d4a89e6094e9$export$25768ea656ae32a7() {
|
|
|
56
56
|
]);
|
|
57
57
|
return layout;
|
|
58
58
|
}
|
|
59
|
-
|
|
59
|
+
const $3247d4a89e6094e9$export$1afdcf349979fb7e = /*#__PURE__*/ (0, $gF3QK$react).forwardRef(function ListBoxBase(props, ref) {
|
|
60
60
|
let { layout: layout, state: state, shouldFocusOnHover: shouldFocusOnHover = false, shouldUseVirtualFocus: shouldUseVirtualFocus = false, domProps: domProps = {}, isLoading: isLoading, showLoadingSpinner: showLoadingSpinner = isLoading, onScroll: onScroll, renderEmptyState: renderEmptyState } = props;
|
|
61
61
|
let objectRef = (0, $gF3QK$useObjectRef)(ref);
|
|
62
62
|
let { listBoxProps: listBoxProps } = (0, $gF3QK$useListBox)({
|
|
@@ -122,10 +122,7 @@ function $3247d4a89e6094e9$export$25768ea656ae32a7() {
|
|
|
122
122
|
else if (type === 'placeholder') return /*#__PURE__*/ (0, $gF3QK$react).createElement($3247d4a89e6094e9$var$EmptyState, null);
|
|
123
123
|
else return null;
|
|
124
124
|
}, []))));
|
|
125
|
-
}
|
|
126
|
-
// forwardRef doesn't support generic parameters, so cast the result to the correct type
|
|
127
|
-
// https://stackoverflow.com/questions/58469229/react-with-typescript-generics-while-using-react-forwardref
|
|
128
|
-
const $3247d4a89e6094e9$export$1afdcf349979fb7e = /*#__PURE__*/ (0, $gF3QK$react).forwardRef($3247d4a89e6094e9$var$ListBoxBase);
|
|
125
|
+
});
|
|
129
126
|
function $3247d4a89e6094e9$var$LoadingState() {
|
|
130
127
|
let { state: state } = (0, $gF3QK$useContext)((0, $0c6f792811e33483$export$7ff8f37d2d81a48d));
|
|
131
128
|
let stringFormatter = (0, $gF3QK$useLocalizedStringFormatter)((0, ($parcel$interopDefault($gF3QK$intlStringsmodulejs))), '@react-spectrum/listbox');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;;AAwCM,SAAS;IACd,IAAI,SAAC,KAAK,EAAC,GAAG,CAAA,GAAA,kBAAU;IACxB,IAAI,SAAS,CAAA,GAAA,cA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A,GAAA,kCAA0B,EAAE,CAAA,GAAA,oDAAW,GAAG;IAChE,OACE,uEAAuE;IACvE,iEAAiE;kBACjE,gCAAC;QAAI,MAAK;QAAS,OAAO;YAAC,SAAS;YAAQ,YAAY;YAAU,gBAAgB;YAAU,QAAQ;QAAM;qBACxG,gCAAC,CAAA,GAAA,qBAAa;QACZ,iBAAA;QACA,MAAK;QACL,cAAY,MAAM,UAAU,CAAC,IAAI,GAAG,IAAI,gBAAgB,MAAM,CAAC,iBAAiB,gBAAgB,MAAM,CAAC;QACvG,kBAAkB,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,sDAAK,GAAG;;AAG7C;AAEA,SAAS;IACP,IAAI,oBAAC,gBAAgB,EAAC,GAAG,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,yCAAa;IACjD,IAAI,aAAa,mBAAmB,qBAAqB;IACzD,IAAI,cAAc,MAChB,OAAO;IAGT,qBACE,gCAAC;QACC,uEAAuE;QACvE,iEAAiE;QACjE,MAAK;OACJ;AAGP","sources":["packages/@react-spectrum/listbox/src/ListBoxBase.tsx"],"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\nimport {AriaLabelingProps, DOMProps, FocusStrategy, Node, RefObject, StyleProps} from '@react-types/shared';\nimport {AriaListBoxOptions, useListBox} from '@react-aria/listbox';\nimport {classNames, useStyleProps} from '@react-spectrum/utils';\nimport {FocusScope} from '@react-aria/focus';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {ListBoxContext} from './ListBoxContext';\nimport {ListBoxLayout} from './ListBoxLayout';\nimport {ListBoxOption} from './ListBoxOption';\nimport {ListBoxSection} from './ListBoxSection';\nimport {ListState} from '@react-stately/list';\nimport {mergeProps, useObjectRef} from '@react-aria/utils';\nimport {ProgressCircle} from '@react-spectrum/progress';\nimport React, {ForwardedRef, HTMLAttributes, ReactElement, ReactNode, useCallback, useContext, useMemo} from 'react';\nimport {ReusableView} from '@react-stately/virtualizer';\nimport styles from '@adobe/spectrum-css-temp/components/menu/vars.css';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useProvider} from '@react-spectrum/provider';\nimport {Virtualizer, VirtualizerItem} from '@react-aria/virtualizer';\n\ninterface ListBoxBaseProps<T> extends AriaListBoxOptions<T>, DOMProps, AriaLabelingProps, StyleProps {\n layout: ListBoxLayout<T>,\n state: ListState<T>,\n autoFocus?: boolean | FocusStrategy,\n shouldFocusWrap?: boolean,\n shouldSelectOnPressUp?: boolean,\n focusOnPointerEnter?: boolean,\n domProps?: HTMLAttributes<HTMLElement>,\n disallowEmptySelection?: boolean,\n shouldUseVirtualFocus?: boolean,\n isLoading?: boolean,\n showLoadingSpinner?: boolean,\n onLoadMore?: () => void,\n renderEmptyState?: () => ReactNode,\n onScroll?: () => void\n}\n\n/** @private */\nexport function useListBoxLayout<T>(): ListBoxLayout<T> {\n let {scale} = useProvider();\n let layout = useMemo(() =>\n new ListBoxLayout<T>({\n estimatedRowHeight: scale === 'large' ? 48 : 32,\n estimatedHeadingHeight: scale === 'large' ? 33 : 26,\n padding: scale === 'large' ? 5 : 4, // TODO: get from DNA\n placeholderHeight: scale === 'large' ? 48 : 32\n })\n , [scale]);\n\n return layout;\n}\n\n/** @private */\nfunction ListBoxBase<T extends object>(props: ListBoxBaseProps<T>, ref: ForwardedRef<HTMLDivElement | null>) {\n let {layout, state, shouldFocusOnHover = false, shouldUseVirtualFocus = false, domProps = {}, isLoading, showLoadingSpinner = isLoading, onScroll, renderEmptyState} = props;\n let objectRef = useObjectRef(ref);\n let {listBoxProps} = useListBox({\n ...props,\n layoutDelegate: layout,\n isVirtualized: true\n }, state, objectRef);\n let {styleProps} = useStyleProps(props);\n\n // This overrides collection view's renderWrapper to support hierarchy of items in sections.\n // The header is extracted from the children so it can receive ARIA labeling properties.\n type View = ReusableView<Node<T>, ReactNode>;\n let renderWrapper = useCallback((parent: View | null, reusableView: View, children: View[], renderChildren: (views: View[]) => ReactElement[]) => {\n if (reusableView.viewType === 'section') {\n return (\n <ListBoxSection\n key={reusableView.key}\n item={reusableView.content!}\n layoutInfo={reusableView.layoutInfo!}\n virtualizer={reusableView.virtualizer}\n headerLayoutInfo={children.find(c => c.viewType === 'header')?.layoutInfo ?? null}>\n {renderChildren(children.filter(c => c.viewType === 'item'))}\n </ListBoxSection>\n );\n }\n\n return (\n <VirtualizerItem\n key={reusableView.key}\n layoutInfo={reusableView.layoutInfo!}\n virtualizer={reusableView.virtualizer}\n parent={parent?.layoutInfo}>\n {reusableView.rendered}\n </VirtualizerItem>\n );\n }, []);\n\n let focusedKey = state.selectionManager.focusedKey;\n let persistedKeys = useMemo(() => focusedKey != null ? new Set([focusedKey]) : null, [focusedKey]);\n\n return (\n <ListBoxContext.Provider value={{state, renderEmptyState, shouldFocusOnHover, shouldUseVirtualFocus}}>\n <FocusScope>\n <Virtualizer\n {...styleProps}\n {...mergeProps(listBoxProps, domProps)}\n ref={objectRef}\n persistedKeys={persistedKeys}\n autoFocus={!!props.autoFocus || undefined}\n scrollDirection=\"vertical\"\n className={\n classNames(\n styles,\n 'spectrum-Menu',\n styleProps.className\n )\n }\n layout={layout}\n layoutOptions={useMemo(() => ({\n isLoading: showLoadingSpinner\n }), [showLoadingSpinner])}\n collection={state.collection}\n renderWrapper={renderWrapper}\n isLoading={isLoading}\n onLoadMore={props.onLoadMore}\n onScroll={onScroll}>\n {useCallback((type, item: Node<T>): ReactNode => {\n if (type === 'item') {\n return <ListBoxOption item={item} />;\n } else if (type === 'loader') {\n return <LoadingState />;\n } else if (type === 'placeholder') {\n return <EmptyState />;\n } else {\n return null;\n }\n }, [])}\n </Virtualizer>\n </FocusScope>\n </ListBoxContext.Provider>\n );\n}\n\n// forwardRef doesn't support generic parameters, so cast the result to the correct type\n// https://stackoverflow.com/questions/58469229/react-with-typescript-generics-while-using-react-forwardref\nconst _ListBoxBase = React.forwardRef(ListBoxBase) as <T>(props: ListBoxBaseProps<T> & {ref?: RefObject<HTMLDivElement | null>}) => ReactElement;\nexport {_ListBoxBase as ListBoxBase};\n\nfunction LoadingState() {\n let {state} = useContext(ListBoxContext)!;\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/listbox');\n return (\n // aria-selected isn't needed here since this option is not selectable.\n // eslint-disable-next-line jsx-a11y/role-has-required-aria-props\n <div role=\"option\" style={{display: 'flex', alignItems: 'center', justifyContent: 'center', height: '100%'}}>\n <ProgressCircle\n isIndeterminate\n size=\"S\"\n aria-label={state.collection.size > 0 ? stringFormatter.format('loadingMore') : stringFormatter.format('loading')}\n UNSAFE_className={classNames(styles, 'spectrum-Dropdown-progressCircle')} />\n </div>\n );\n}\n\nfunction EmptyState() {\n let {renderEmptyState} = useContext(ListBoxContext)!;\n let emptyState = renderEmptyState ? renderEmptyState() : null;\n if (emptyState == null) {\n return null;\n }\n\n return (\n <div\n // aria-selected isn't needed here since this option is not selectable.\n // eslint-disable-next-line jsx-a11y/role-has-required-aria-props\n role=\"option\">\n {emptyState}\n </div>\n );\n}\n"],"names":[],"version":3,"file":"ListBoxBase.module.js.map"}
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;;AAwCM,SAAS;IACd,IAAI,SAAC,KAAK,EAAC,GAAG,CAAA,GAAA,kBAAU;IACxB,IAAI,SAAS,CAAA,GAAA,cAAM,EAAE,IACnB,IAAI,CAAA,GAAA,wCAAY,EAAK;YACnB,oBAAoB,UAAU,UAAU,KAAK;YAC7C,wBAAwB,UAAU,UAAU,KAAK;YACjD,SAAS,UAAU,UAAU,IAAI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AC,CAAA,GAAA,qBAAa;QACZ,iBAAA;QACA,MAAK;QACL,cAAY,MAAM,UAAU,CAAC,IAAI,GAAG,IAAI,gBAAgB,MAAM,CAAC,iBAAiB,gBAAgB,MAAM,CAAC;QACvG,kBAAkB,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,sDAAK,GAAG;;AAG7C;AAEA,SAAS;IACP,IAAI,oBAAC,gBAAgB,EAAC,GAAG,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,yCAAa;IACjD,IAAI,aAAa,mBAAmB,qBAAqB;IACzD,IAAI,cAAc,MAChB,OAAO;IAGT,qBACE,gCAAC;QACC,uEAAuE;QACvE,iEAAiE;QACjE,MAAK;OACJ;AAGP","sources":["packages/@react-spectrum/listbox/src/ListBoxBase.tsx"],"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\nimport {AriaLabelingProps, DOMProps, FocusStrategy, Node, RefObject, StyleProps} from '@react-types/shared';\nimport {AriaListBoxOptions, useListBox} from '@react-aria/listbox';\nimport {classNames, useStyleProps} from '@react-spectrum/utils';\nimport {FocusScope} from '@react-aria/focus';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {ListBoxContext} from './ListBoxContext';\nimport {ListBoxLayout} from './ListBoxLayout';\nimport {ListBoxOption} from './ListBoxOption';\nimport {ListBoxSection} from './ListBoxSection';\nimport {ListState} from '@react-stately/list';\nimport {mergeProps, useObjectRef} from '@react-aria/utils';\nimport {ProgressCircle} from '@react-spectrum/progress';\nimport React, {ForwardedRef, HTMLAttributes, ReactElement, ReactNode, useCallback, useContext, useMemo} from 'react';\nimport {ReusableView} from '@react-stately/virtualizer';\nimport styles from '@adobe/spectrum-css-temp/components/menu/vars.css';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useProvider} from '@react-spectrum/provider';\nimport {Virtualizer, VirtualizerItem} from '@react-aria/virtualizer';\n\ninterface ListBoxBaseProps<T> extends AriaListBoxOptions<T>, DOMProps, AriaLabelingProps, StyleProps {\n layout: ListBoxLayout<T>,\n state: ListState<T>,\n autoFocus?: boolean | FocusStrategy,\n shouldFocusWrap?: boolean,\n shouldSelectOnPressUp?: boolean,\n focusOnPointerEnter?: boolean,\n domProps?: HTMLAttributes<HTMLElement>,\n disallowEmptySelection?: boolean,\n shouldUseVirtualFocus?: boolean,\n isLoading?: boolean,\n showLoadingSpinner?: boolean,\n onLoadMore?: () => void,\n renderEmptyState?: () => ReactNode,\n onScroll?: () => void\n}\n\n/** @private */\nexport function useListBoxLayout<T>(): ListBoxLayout<T> {\n let {scale} = useProvider();\n let layout = useMemo(() =>\n new ListBoxLayout<T>({\n estimatedRowHeight: scale === 'large' ? 48 : 32,\n estimatedHeadingHeight: scale === 'large' ? 33 : 26,\n padding: scale === 'large' ? 5 : 4, // TODO: get from DNA\n placeholderHeight: scale === 'large' ? 48 : 32\n })\n , [scale]);\n\n return layout;\n}\n\n// forwardRef doesn't support generic parameters, so cast the result to the correct type\n// https://stackoverflow.com/questions/58469229/react-with-typescript-generics-while-using-react-forwardref\n/** @private */\nexport const ListBoxBase = React.forwardRef(function ListBoxBase<T extends object>(props: ListBoxBaseProps<T>, ref: ForwardedRef<HTMLDivElement | null>) {\n let {layout, state, shouldFocusOnHover = false, shouldUseVirtualFocus = false, domProps = {}, isLoading, showLoadingSpinner = isLoading, onScroll, renderEmptyState} = props;\n let objectRef = useObjectRef(ref);\n let {listBoxProps} = useListBox({\n ...props,\n layoutDelegate: layout,\n isVirtualized: true\n }, state, objectRef);\n let {styleProps} = useStyleProps(props);\n\n // This overrides collection view's renderWrapper to support hierarchy of items in sections.\n // The header is extracted from the children so it can receive ARIA labeling properties.\n type View = ReusableView<Node<T>, ReactNode>;\n let renderWrapper = useCallback((parent: View | null, reusableView: View, children: View[], renderChildren: (views: View[]) => ReactElement[]) => {\n if (reusableView.viewType === 'section') {\n return (\n <ListBoxSection\n key={reusableView.key}\n item={reusableView.content!}\n layoutInfo={reusableView.layoutInfo!}\n virtualizer={reusableView.virtualizer}\n headerLayoutInfo={children.find(c => c.viewType === 'header')?.layoutInfo ?? null}>\n {renderChildren(children.filter(c => c.viewType === 'item'))}\n </ListBoxSection>\n );\n }\n\n return (\n <VirtualizerItem\n key={reusableView.key}\n layoutInfo={reusableView.layoutInfo!}\n virtualizer={reusableView.virtualizer}\n parent={parent?.layoutInfo}>\n {reusableView.rendered}\n </VirtualizerItem>\n );\n }, []);\n\n let focusedKey = state.selectionManager.focusedKey;\n let persistedKeys = useMemo(() => focusedKey != null ? new Set([focusedKey]) : null, [focusedKey]);\n\n return (\n <ListBoxContext.Provider value={{state, renderEmptyState, shouldFocusOnHover, shouldUseVirtualFocus}}>\n <FocusScope>\n <Virtualizer\n {...styleProps}\n {...mergeProps(listBoxProps, domProps)}\n ref={objectRef}\n persistedKeys={persistedKeys}\n autoFocus={!!props.autoFocus || undefined}\n scrollDirection=\"vertical\"\n className={\n classNames(\n styles,\n 'spectrum-Menu',\n styleProps.className\n )\n }\n layout={layout}\n layoutOptions={useMemo(() => ({\n isLoading: showLoadingSpinner\n }), [showLoadingSpinner])}\n collection={state.collection}\n renderWrapper={renderWrapper}\n isLoading={isLoading}\n onLoadMore={props.onLoadMore}\n onScroll={onScroll}>\n {useCallback((type, item: Node<T>): ReactNode => {\n if (type === 'item') {\n return <ListBoxOption item={item} />;\n } else if (type === 'loader') {\n return <LoadingState />;\n } else if (type === 'placeholder') {\n return <EmptyState />;\n } else {\n return null;\n }\n }, [])}\n </Virtualizer>\n </FocusScope>\n </ListBoxContext.Provider>\n );\n}) as <T>(props: ListBoxBaseProps<T> & {ref?: RefObject<HTMLDivElement | null>}) => ReactElement;\n\nfunction LoadingState() {\n let {state} = useContext(ListBoxContext)!;\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/listbox');\n return (\n // aria-selected isn't needed here since this option is not selectable.\n // eslint-disable-next-line jsx-a11y/role-has-required-aria-props\n <div role=\"option\" style={{display: 'flex', alignItems: 'center', justifyContent: 'center', height: '100%'}}>\n <ProgressCircle\n isIndeterminate\n size=\"S\"\n aria-label={state.collection.size > 0 ? stringFormatter.format('loadingMore') : stringFormatter.format('loading')}\n UNSAFE_className={classNames(styles, 'spectrum-Dropdown-progressCircle')} />\n </div>\n );\n}\n\nfunction EmptyState() {\n let {renderEmptyState} = useContext(ListBoxContext)!;\n let emptyState = renderEmptyState ? renderEmptyState() : null;\n if (emptyState == null) {\n return null;\n }\n\n return (\n <div\n // aria-selected isn't needed here since this option is not selectable.\n // eslint-disable-next-line jsx-a11y/role-has-required-aria-props\n role=\"option\">\n {emptyState}\n </div>\n );\n}\n"],"names":[],"version":3,"file":"ListBoxBase.module.js.map"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var $611e93c7b7c0413c$exports = require("./ListBoxContext.main.js");
|
|
2
|
-
require("./vars.
|
|
2
|
+
require("./vars.e5f333b9.css");
|
|
3
3
|
var $3deee0fd2b46e64f$exports = require("./menu_vars_css.main.js");
|
|
4
4
|
var $8xmxv$spectrumiconsuiCheckmarkMedium = require("@spectrum-icons/ui/CheckmarkMedium");
|
|
5
5
|
var $8xmxv$reactspectrumutils = require("@react-spectrum/utils");
|
package/dist/ListBoxOption.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {ListBoxContext as $0c6f792811e33483$export$7ff8f37d2d81a48d} from "./ListBoxContext.mjs";
|
|
2
|
-
import "./vars.
|
|
2
|
+
import "./vars.e5f333b9.css";
|
|
3
3
|
import $6TrMC$menu_vars_cssmodulejs from "./menu_vars_css.mjs";
|
|
4
4
|
import $6TrMC$spectrumiconsuiCheckmarkMedium from "@spectrum-icons/ui/CheckmarkMedium";
|
|
5
5
|
import {classNames as $6TrMC$classNames, ClearSlots as $6TrMC$ClearSlots, SlotProvider as $6TrMC$SlotProvider} from "@react-spectrum/utils";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {ListBoxContext as $0c6f792811e33483$export$7ff8f37d2d81a48d} from "./ListBoxContext.module.js";
|
|
2
|
-
import "./vars.
|
|
2
|
+
import "./vars.e5f333b9.css";
|
|
3
3
|
import $6TrMC$menu_vars_cssmodulejs from "./menu_vars_css.module.js";
|
|
4
4
|
import $6TrMC$spectrumiconsuiCheckmarkMedium from "@spectrum-icons/ui/CheckmarkMedium";
|
|
5
5
|
import {classNames as $6TrMC$classNames, ClearSlots as $6TrMC$ClearSlots, SlotProvider as $6TrMC$SlotProvider} from "@react-spectrum/utils";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var $611e93c7b7c0413c$exports = require("./ListBoxContext.main.js");
|
|
2
|
-
require("./vars.
|
|
2
|
+
require("./vars.e5f333b9.css");
|
|
3
3
|
var $3deee0fd2b46e64f$exports = require("./menu_vars_css.main.js");
|
|
4
4
|
var $cCu2p$reactspectrumutils = require("@react-spectrum/utils");
|
|
5
5
|
var $cCu2p$reactariavirtualizer = require("@react-aria/virtualizer");
|
package/dist/ListBoxSection.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {ListBoxContext as $0c6f792811e33483$export$7ff8f37d2d81a48d} from "./ListBoxContext.mjs";
|
|
2
|
-
import "./vars.
|
|
2
|
+
import "./vars.e5f333b9.css";
|
|
3
3
|
import $dzUX8$menu_vars_cssmodulejs from "./menu_vars_css.mjs";
|
|
4
4
|
import {classNames as $dzUX8$classNames} from "@react-spectrum/utils";
|
|
5
5
|
import {useVirtualizerItem as $dzUX8$useVirtualizerItem, layoutInfoToStyle as $dzUX8$layoutInfoToStyle} from "@react-aria/virtualizer";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {ListBoxContext as $0c6f792811e33483$export$7ff8f37d2d81a48d} from "./ListBoxContext.module.js";
|
|
2
|
-
import "./vars.
|
|
2
|
+
import "./vars.e5f333b9.css";
|
|
3
3
|
import $dzUX8$menu_vars_cssmodulejs from "./menu_vars_css.module.js";
|
|
4
4
|
import {classNames as $dzUX8$classNames} from "@react-spectrum/utils";
|
|
5
5
|
import {useVirtualizerItem as $dzUX8$useVirtualizerItem, layoutInfoToStyle as $dzUX8$layoutInfoToStyle} from "@react-aria/virtualizer";
|
|
@@ -113,65 +113,65 @@ var $3deee0fd2b46e64f$export$6b954168165460e7;
|
|
|
113
113
|
var $3deee0fd2b46e64f$export$6eb7afb010e5a05e;
|
|
114
114
|
var $3deee0fd2b46e64f$export$f55221e0121f82e3;
|
|
115
115
|
var $3deee0fd2b46e64f$export$6f093cfa640b7166;
|
|
116
|
-
$3deee0fd2b46e64f$export$292abbf31ed842a = `
|
|
117
|
-
$3deee0fd2b46e64f$export$980c1089c0604ea3 = `
|
|
118
|
-
$3deee0fd2b46e64f$export$6d59db4903f20f7d = `
|
|
119
|
-
$3deee0fd2b46e64f$export$bd5df0f255a350f8 = `
|
|
120
|
-
$3deee0fd2b46e64f$export$f39a09f249340e2a = `
|
|
121
|
-
$3deee0fd2b46e64f$export$8c4ee2c50c22c514 = `
|
|
122
|
-
$3deee0fd2b46e64f$export$1ca1ec8b29a4ce27 = `
|
|
123
|
-
$3deee0fd2b46e64f$export$20fd0f7cd4e6112f = `
|
|
124
|
-
$3deee0fd2b46e64f$export$d35bc1e505d1ebbf = `
|
|
125
|
-
$3deee0fd2b46e64f$export$911ebb89bba4b634 = `
|
|
126
|
-
$3deee0fd2b46e64f$export$e7dc768d35940237 = `
|
|
127
|
-
$3deee0fd2b46e64f$export$451c613d0772eb99 = `
|
|
128
|
-
$3deee0fd2b46e64f$export$b8813cd5d7824ce7 = `
|
|
129
|
-
$3deee0fd2b46e64f$export$a9781837241c946d = `
|
|
130
|
-
$3deee0fd2b46e64f$export$fbd22ba224473193 = `
|
|
131
|
-
$3deee0fd2b46e64f$export$1e0fb04f31d3c22a = `
|
|
132
|
-
$3deee0fd2b46e64f$export$cfdd767f5a513509 = `
|
|
133
|
-
$3deee0fd2b46e64f$export$cd927b4666be507 = `
|
|
116
|
+
$3deee0fd2b46e64f$export$292abbf31ed842a = `dIo7iW_checkmark`;
|
|
117
|
+
$3deee0fd2b46e64f$export$980c1089c0604ea3 = `dIo7iW_chevron`;
|
|
118
|
+
$3deee0fd2b46e64f$export$6d59db4903f20f7d = `dIo7iW_description`;
|
|
119
|
+
$3deee0fd2b46e64f$export$bd5df0f255a350f8 = `dIo7iW_end`;
|
|
120
|
+
$3deee0fd2b46e64f$export$f39a09f249340e2a = `dIo7iW_focus-ring`;
|
|
121
|
+
$3deee0fd2b46e64f$export$8c4ee2c50c22c514 = `dIo7iW_i18nFontFamily`;
|
|
122
|
+
$3deee0fd2b46e64f$export$1ca1ec8b29a4ce27 = `dIo7iW_icon`;
|
|
123
|
+
$3deee0fd2b46e64f$export$20fd0f7cd4e6112f = `dIo7iW_is-active`;
|
|
124
|
+
$3deee0fd2b46e64f$export$d35bc1e505d1ebbf = `dIo7iW_is-disabled`;
|
|
125
|
+
$3deee0fd2b46e64f$export$911ebb89bba4b634 = `dIo7iW_is-expanded`;
|
|
126
|
+
$3deee0fd2b46e64f$export$e7dc768d35940237 = `dIo7iW_is-focused`;
|
|
127
|
+
$3deee0fd2b46e64f$export$451c613d0772eb99 = `dIo7iW_is-highlighted`;
|
|
128
|
+
$3deee0fd2b46e64f$export$b8813cd5d7824ce7 = `dIo7iW_is-hovered`;
|
|
129
|
+
$3deee0fd2b46e64f$export$a9781837241c946d = `dIo7iW_is-open`;
|
|
130
|
+
$3deee0fd2b46e64f$export$fbd22ba224473193 = `dIo7iW_is-selectable`;
|
|
131
|
+
$3deee0fd2b46e64f$export$1e0fb04f31d3c22a = `dIo7iW_is-selected`;
|
|
132
|
+
$3deee0fd2b46e64f$export$cfdd767f5a513509 = `dIo7iW_keyboard`;
|
|
133
|
+
$3deee0fd2b46e64f$export$cd927b4666be507 = `dIo7iW_slideInFromLeft`;
|
|
134
134
|
$3deee0fd2b46e64f$export$cd927b4666be507;
|
|
135
|
-
$3deee0fd2b46e64f$export$18c5d97e4260ebf8 = `
|
|
135
|
+
$3deee0fd2b46e64f$export$18c5d97e4260ebf8 = `dIo7iW_slideInFromRight`;
|
|
136
136
|
$3deee0fd2b46e64f$export$18c5d97e4260ebf8;
|
|
137
|
-
$3deee0fd2b46e64f$export$288baa3931e3ffec = `
|
|
137
|
+
$3deee0fd2b46e64f$export$288baa3931e3ffec = `dIo7iW_slideOutToLeft`;
|
|
138
138
|
$3deee0fd2b46e64f$export$288baa3931e3ffec;
|
|
139
|
-
$3deee0fd2b46e64f$export$37de59e6c58ecf84 = `
|
|
139
|
+
$3deee0fd2b46e64f$export$37de59e6c58ecf84 = `dIo7iW_slideOutToRight`;
|
|
140
140
|
$3deee0fd2b46e64f$export$37de59e6c58ecf84;
|
|
141
|
-
$3deee0fd2b46e64f$export$4109102f950813a6 = `
|
|
142
|
-
$3deee0fd2b46e64f$export$24c7f46a6e3605dd = `
|
|
143
|
-
$3deee0fd2b46e64f$export$2927016961429360 = `
|
|
144
|
-
$3deee0fd2b46e64f$export$d374b04f30360026 = `
|
|
145
|
-
$3deee0fd2b46e64f$export$fae6af6decd50ac5 = `
|
|
146
|
-
$3deee0fd2b46e64f$export$944daf9b7d423a02 = `
|
|
147
|
-
$3deee0fd2b46e64f$export$8e15a726e4f7e62d = `
|
|
148
|
-
$3deee0fd2b46e64f$export$ca45e0db366b8e6c = `
|
|
149
|
-
$3deee0fd2b46e64f$export$36f1275051e39ead = `
|
|
150
|
-
$3deee0fd2b46e64f$export$e892026f534efed8 = `
|
|
151
|
-
$3deee0fd2b46e64f$export$926a1bb74ed65667 = `
|
|
152
|
-
$3deee0fd2b46e64f$export$cbbae63ef9e44c7a = `
|
|
153
|
-
$3deee0fd2b46e64f$export$45faad328e6c532b = `
|
|
154
|
-
$3deee0fd2b46e64f$export$ee5f52784f57f9c8 = `
|
|
155
|
-
$3deee0fd2b46e64f$export$f431001e1bb54633 = `
|
|
156
|
-
$3deee0fd2b46e64f$export$1aa6419c5c650567 = `
|
|
157
|
-
$3deee0fd2b46e64f$export$465092164a8e1d98 = `
|
|
158
|
-
$3deee0fd2b46e64f$export$4f9817a7dff6ba0f = `
|
|
159
|
-
$3deee0fd2b46e64f$export$d959f30786125b = `
|
|
160
|
-
$3deee0fd2b46e64f$export$dae331c15950f1e = `
|
|
161
|
-
$3deee0fd2b46e64f$export$9778864c5b622fbc = `
|
|
162
|
-
$3deee0fd2b46e64f$export$8b61ec49b96ad17e = `
|
|
163
|
-
$3deee0fd2b46e64f$export$c20ea4b35020fbdd = `
|
|
164
|
-
$3deee0fd2b46e64f$export$d7e47bfca92b5744 = `
|
|
165
|
-
$3deee0fd2b46e64f$export$76d36e55740ad742 = `
|
|
166
|
-
$3deee0fd2b46e64f$export$c873119be41fdb72 = `
|
|
167
|
-
$3deee0fd2b46e64f$export$c830d2588e34dae1 = `
|
|
168
|
-
$3deee0fd2b46e64f$export$d3fc690f61339a08 = `
|
|
169
|
-
$3deee0fd2b46e64f$export$fe967dac6207a986 = `
|
|
170
|
-
$3deee0fd2b46e64f$export$158cbd6607d36c4e = `
|
|
171
|
-
$3deee0fd2b46e64f$export$6b954168165460e7 = `
|
|
172
|
-
$3deee0fd2b46e64f$export$6eb7afb010e5a05e = `
|
|
173
|
-
$3deee0fd2b46e64f$export$f55221e0121f82e3 = `
|
|
174
|
-
$3deee0fd2b46e64f$export$6f093cfa640b7166 = `
|
|
141
|
+
$3deee0fd2b46e64f$export$4109102f950813a6 = `dIo7iW_spectrum-FocusRing-ring`;
|
|
142
|
+
$3deee0fd2b46e64f$export$24c7f46a6e3605dd = `dIo7iW_spectrum-FocusRing ${$3deee0fd2b46e64f$export$4109102f950813a6}`;
|
|
143
|
+
$3deee0fd2b46e64f$export$2927016961429360 = `dIo7iW_spectrum-FocusRing--quiet`;
|
|
144
|
+
$3deee0fd2b46e64f$export$d374b04f30360026 = `dIo7iW_spectrum-Icon`;
|
|
145
|
+
$3deee0fd2b46e64f$export$fae6af6decd50ac5 = `dIo7iW_spectrum-Menu`;
|
|
146
|
+
$3deee0fd2b46e64f$export$944daf9b7d423a02 = `dIo7iW_spectrum-Menu-avatar`;
|
|
147
|
+
$3deee0fd2b46e64f$export$8e15a726e4f7e62d = `dIo7iW_spectrum-Menu-checkmark`;
|
|
148
|
+
$3deee0fd2b46e64f$export$ca45e0db366b8e6c = `dIo7iW_spectrum-Menu-chevron`;
|
|
149
|
+
$3deee0fd2b46e64f$export$36f1275051e39ead = `dIo7iW_spectrum-Menu-description`;
|
|
150
|
+
$3deee0fd2b46e64f$export$e892026f534efed8 = `dIo7iW_spectrum-Menu-divider`;
|
|
151
|
+
$3deee0fd2b46e64f$export$926a1bb74ed65667 = `dIo7iW_spectrum-Menu-end`;
|
|
152
|
+
$3deee0fd2b46e64f$export$cbbae63ef9e44c7a = `dIo7iW_spectrum-Menu-icon`;
|
|
153
|
+
$3deee0fd2b46e64f$export$45faad328e6c532b = `dIo7iW_spectrum-Menu-item`;
|
|
154
|
+
$3deee0fd2b46e64f$export$ee5f52784f57f9c8 = `dIo7iW_spectrum-Menu-itemGrid`;
|
|
155
|
+
$3deee0fd2b46e64f$export$f431001e1bb54633 = `dIo7iW_spectrum-Menu-itemIcon`;
|
|
156
|
+
$3deee0fd2b46e64f$export$1aa6419c5c650567 = `dIo7iW_spectrum-Menu-itemLabel`;
|
|
157
|
+
$3deee0fd2b46e64f$export$465092164a8e1d98 = `dIo7iW_spectrum-Menu-itemLabel--wrapping`;
|
|
158
|
+
$3deee0fd2b46e64f$export$4f9817a7dff6ba0f = `dIo7iW_spectrum-Menu-keyboard`;
|
|
159
|
+
$3deee0fd2b46e64f$export$d959f30786125b = `dIo7iW_spectrum-Menu-popover`;
|
|
160
|
+
$3deee0fd2b46e64f$export$dae331c15950f1e = `dIo7iW_spectrum-Menu-section--isFirst`;
|
|
161
|
+
$3deee0fd2b46e64f$export$9778864c5b622fbc = `dIo7iW_spectrum-Menu-section--isLast`;
|
|
162
|
+
$3deee0fd2b46e64f$export$8b61ec49b96ad17e = `dIo7iW_spectrum-Menu-section--noHeading`;
|
|
163
|
+
$3deee0fd2b46e64f$export$c20ea4b35020fbdd = `dIo7iW_spectrum-Menu-sectionHeading`;
|
|
164
|
+
$3deee0fd2b46e64f$export$d7e47bfca92b5744 = `dIo7iW_spectrum-Menu-subdialog`;
|
|
165
|
+
$3deee0fd2b46e64f$export$76d36e55740ad742 = `dIo7iW_spectrum-Menu-wrapper`;
|
|
166
|
+
$3deee0fd2b46e64f$export$c873119be41fdb72 = `dIo7iW_spectrum-Menu-wrapper--isMobile`;
|
|
167
|
+
$3deee0fd2b46e64f$export$c830d2588e34dae1 = `dIo7iW_spectrum-Submenu-heading`;
|
|
168
|
+
$3deee0fd2b46e64f$export$d3fc690f61339a08 = `dIo7iW_spectrum-Submenu-headingWrapper`;
|
|
169
|
+
$3deee0fd2b46e64f$export$fe967dac6207a986 = `dIo7iW_spectrum-Submenu-popover`;
|
|
170
|
+
$3deee0fd2b46e64f$export$158cbd6607d36c4e = `dIo7iW_spectrum-Submenu-wrapper`;
|
|
171
|
+
$3deee0fd2b46e64f$export$6b954168165460e7 = `dIo7iW_spectrum-Submenu-wrapper--isMobile`;
|
|
172
|
+
$3deee0fd2b46e64f$export$6eb7afb010e5a05e = `dIo7iW_spectrum-TraySubmenu-enter`;
|
|
173
|
+
$3deee0fd2b46e64f$export$f55221e0121f82e3 = `dIo7iW_spectrum-TraySubmenu-exit`;
|
|
174
|
+
$3deee0fd2b46e64f$export$6f093cfa640b7166 = `dIo7iW_text`;
|
|
175
175
|
|
|
176
176
|
|
|
177
177
|
//# sourceMappingURL=menu_vars_css.main.js.map
|
package/dist/menu_vars_css.mjs
CHANGED
|
@@ -114,65 +114,65 @@ var $286d1cb34bb7dc84$export$6b954168165460e7;
|
|
|
114
114
|
var $286d1cb34bb7dc84$export$6eb7afb010e5a05e;
|
|
115
115
|
var $286d1cb34bb7dc84$export$f55221e0121f82e3;
|
|
116
116
|
var $286d1cb34bb7dc84$export$6f093cfa640b7166;
|
|
117
|
-
$286d1cb34bb7dc84$export$292abbf31ed842a = `
|
|
118
|
-
$286d1cb34bb7dc84$export$980c1089c0604ea3 = `
|
|
119
|
-
$286d1cb34bb7dc84$export$6d59db4903f20f7d = `
|
|
120
|
-
$286d1cb34bb7dc84$export$bd5df0f255a350f8 = `
|
|
121
|
-
$286d1cb34bb7dc84$export$f39a09f249340e2a = `
|
|
122
|
-
$286d1cb34bb7dc84$export$8c4ee2c50c22c514 = `
|
|
123
|
-
$286d1cb34bb7dc84$export$1ca1ec8b29a4ce27 = `
|
|
124
|
-
$286d1cb34bb7dc84$export$20fd0f7cd4e6112f = `
|
|
125
|
-
$286d1cb34bb7dc84$export$d35bc1e505d1ebbf = `
|
|
126
|
-
$286d1cb34bb7dc84$export$911ebb89bba4b634 = `
|
|
127
|
-
$286d1cb34bb7dc84$export$e7dc768d35940237 = `
|
|
128
|
-
$286d1cb34bb7dc84$export$451c613d0772eb99 = `
|
|
129
|
-
$286d1cb34bb7dc84$export$b8813cd5d7824ce7 = `
|
|
130
|
-
$286d1cb34bb7dc84$export$a9781837241c946d = `
|
|
131
|
-
$286d1cb34bb7dc84$export$fbd22ba224473193 = `
|
|
132
|
-
$286d1cb34bb7dc84$export$1e0fb04f31d3c22a = `
|
|
133
|
-
$286d1cb34bb7dc84$export$cfdd767f5a513509 = `
|
|
134
|
-
$286d1cb34bb7dc84$export$cd927b4666be507 = `
|
|
117
|
+
$286d1cb34bb7dc84$export$292abbf31ed842a = `dIo7iW_checkmark`;
|
|
118
|
+
$286d1cb34bb7dc84$export$980c1089c0604ea3 = `dIo7iW_chevron`;
|
|
119
|
+
$286d1cb34bb7dc84$export$6d59db4903f20f7d = `dIo7iW_description`;
|
|
120
|
+
$286d1cb34bb7dc84$export$bd5df0f255a350f8 = `dIo7iW_end`;
|
|
121
|
+
$286d1cb34bb7dc84$export$f39a09f249340e2a = `dIo7iW_focus-ring`;
|
|
122
|
+
$286d1cb34bb7dc84$export$8c4ee2c50c22c514 = `dIo7iW_i18nFontFamily`;
|
|
123
|
+
$286d1cb34bb7dc84$export$1ca1ec8b29a4ce27 = `dIo7iW_icon`;
|
|
124
|
+
$286d1cb34bb7dc84$export$20fd0f7cd4e6112f = `dIo7iW_is-active`;
|
|
125
|
+
$286d1cb34bb7dc84$export$d35bc1e505d1ebbf = `dIo7iW_is-disabled`;
|
|
126
|
+
$286d1cb34bb7dc84$export$911ebb89bba4b634 = `dIo7iW_is-expanded`;
|
|
127
|
+
$286d1cb34bb7dc84$export$e7dc768d35940237 = `dIo7iW_is-focused`;
|
|
128
|
+
$286d1cb34bb7dc84$export$451c613d0772eb99 = `dIo7iW_is-highlighted`;
|
|
129
|
+
$286d1cb34bb7dc84$export$b8813cd5d7824ce7 = `dIo7iW_is-hovered`;
|
|
130
|
+
$286d1cb34bb7dc84$export$a9781837241c946d = `dIo7iW_is-open`;
|
|
131
|
+
$286d1cb34bb7dc84$export$fbd22ba224473193 = `dIo7iW_is-selectable`;
|
|
132
|
+
$286d1cb34bb7dc84$export$1e0fb04f31d3c22a = `dIo7iW_is-selected`;
|
|
133
|
+
$286d1cb34bb7dc84$export$cfdd767f5a513509 = `dIo7iW_keyboard`;
|
|
134
|
+
$286d1cb34bb7dc84$export$cd927b4666be507 = `dIo7iW_slideInFromLeft`;
|
|
135
135
|
$286d1cb34bb7dc84$export$cd927b4666be507;
|
|
136
|
-
$286d1cb34bb7dc84$export$18c5d97e4260ebf8 = `
|
|
136
|
+
$286d1cb34bb7dc84$export$18c5d97e4260ebf8 = `dIo7iW_slideInFromRight`;
|
|
137
137
|
$286d1cb34bb7dc84$export$18c5d97e4260ebf8;
|
|
138
|
-
$286d1cb34bb7dc84$export$288baa3931e3ffec = `
|
|
138
|
+
$286d1cb34bb7dc84$export$288baa3931e3ffec = `dIo7iW_slideOutToLeft`;
|
|
139
139
|
$286d1cb34bb7dc84$export$288baa3931e3ffec;
|
|
140
|
-
$286d1cb34bb7dc84$export$37de59e6c58ecf84 = `
|
|
140
|
+
$286d1cb34bb7dc84$export$37de59e6c58ecf84 = `dIo7iW_slideOutToRight`;
|
|
141
141
|
$286d1cb34bb7dc84$export$37de59e6c58ecf84;
|
|
142
|
-
$286d1cb34bb7dc84$export$4109102f950813a6 = `
|
|
143
|
-
$286d1cb34bb7dc84$export$24c7f46a6e3605dd = `
|
|
144
|
-
$286d1cb34bb7dc84$export$2927016961429360 = `
|
|
145
|
-
$286d1cb34bb7dc84$export$d374b04f30360026 = `
|
|
146
|
-
$286d1cb34bb7dc84$export$fae6af6decd50ac5 = `
|
|
147
|
-
$286d1cb34bb7dc84$export$944daf9b7d423a02 = `
|
|
148
|
-
$286d1cb34bb7dc84$export$8e15a726e4f7e62d = `
|
|
149
|
-
$286d1cb34bb7dc84$export$ca45e0db366b8e6c = `
|
|
150
|
-
$286d1cb34bb7dc84$export$36f1275051e39ead = `
|
|
151
|
-
$286d1cb34bb7dc84$export$e892026f534efed8 = `
|
|
152
|
-
$286d1cb34bb7dc84$export$926a1bb74ed65667 = `
|
|
153
|
-
$286d1cb34bb7dc84$export$cbbae63ef9e44c7a = `
|
|
154
|
-
$286d1cb34bb7dc84$export$45faad328e6c532b = `
|
|
155
|
-
$286d1cb34bb7dc84$export$ee5f52784f57f9c8 = `
|
|
156
|
-
$286d1cb34bb7dc84$export$f431001e1bb54633 = `
|
|
157
|
-
$286d1cb34bb7dc84$export$1aa6419c5c650567 = `
|
|
158
|
-
$286d1cb34bb7dc84$export$465092164a8e1d98 = `
|
|
159
|
-
$286d1cb34bb7dc84$export$4f9817a7dff6ba0f = `
|
|
160
|
-
$286d1cb34bb7dc84$export$d959f30786125b = `
|
|
161
|
-
$286d1cb34bb7dc84$export$dae331c15950f1e = `
|
|
162
|
-
$286d1cb34bb7dc84$export$9778864c5b622fbc = `
|
|
163
|
-
$286d1cb34bb7dc84$export$8b61ec49b96ad17e = `
|
|
164
|
-
$286d1cb34bb7dc84$export$c20ea4b35020fbdd = `
|
|
165
|
-
$286d1cb34bb7dc84$export$d7e47bfca92b5744 = `
|
|
166
|
-
$286d1cb34bb7dc84$export$76d36e55740ad742 = `
|
|
167
|
-
$286d1cb34bb7dc84$export$c873119be41fdb72 = `
|
|
168
|
-
$286d1cb34bb7dc84$export$c830d2588e34dae1 = `
|
|
169
|
-
$286d1cb34bb7dc84$export$d3fc690f61339a08 = `
|
|
170
|
-
$286d1cb34bb7dc84$export$fe967dac6207a986 = `
|
|
171
|
-
$286d1cb34bb7dc84$export$158cbd6607d36c4e = `
|
|
172
|
-
$286d1cb34bb7dc84$export$6b954168165460e7 = `
|
|
173
|
-
$286d1cb34bb7dc84$export$6eb7afb010e5a05e = `
|
|
174
|
-
$286d1cb34bb7dc84$export$f55221e0121f82e3 = `
|
|
175
|
-
$286d1cb34bb7dc84$export$6f093cfa640b7166 = `
|
|
142
|
+
$286d1cb34bb7dc84$export$4109102f950813a6 = `dIo7iW_spectrum-FocusRing-ring`;
|
|
143
|
+
$286d1cb34bb7dc84$export$24c7f46a6e3605dd = `dIo7iW_spectrum-FocusRing ${$286d1cb34bb7dc84$export$4109102f950813a6}`;
|
|
144
|
+
$286d1cb34bb7dc84$export$2927016961429360 = `dIo7iW_spectrum-FocusRing--quiet`;
|
|
145
|
+
$286d1cb34bb7dc84$export$d374b04f30360026 = `dIo7iW_spectrum-Icon`;
|
|
146
|
+
$286d1cb34bb7dc84$export$fae6af6decd50ac5 = `dIo7iW_spectrum-Menu`;
|
|
147
|
+
$286d1cb34bb7dc84$export$944daf9b7d423a02 = `dIo7iW_spectrum-Menu-avatar`;
|
|
148
|
+
$286d1cb34bb7dc84$export$8e15a726e4f7e62d = `dIo7iW_spectrum-Menu-checkmark`;
|
|
149
|
+
$286d1cb34bb7dc84$export$ca45e0db366b8e6c = `dIo7iW_spectrum-Menu-chevron`;
|
|
150
|
+
$286d1cb34bb7dc84$export$36f1275051e39ead = `dIo7iW_spectrum-Menu-description`;
|
|
151
|
+
$286d1cb34bb7dc84$export$e892026f534efed8 = `dIo7iW_spectrum-Menu-divider`;
|
|
152
|
+
$286d1cb34bb7dc84$export$926a1bb74ed65667 = `dIo7iW_spectrum-Menu-end`;
|
|
153
|
+
$286d1cb34bb7dc84$export$cbbae63ef9e44c7a = `dIo7iW_spectrum-Menu-icon`;
|
|
154
|
+
$286d1cb34bb7dc84$export$45faad328e6c532b = `dIo7iW_spectrum-Menu-item`;
|
|
155
|
+
$286d1cb34bb7dc84$export$ee5f52784f57f9c8 = `dIo7iW_spectrum-Menu-itemGrid`;
|
|
156
|
+
$286d1cb34bb7dc84$export$f431001e1bb54633 = `dIo7iW_spectrum-Menu-itemIcon`;
|
|
157
|
+
$286d1cb34bb7dc84$export$1aa6419c5c650567 = `dIo7iW_spectrum-Menu-itemLabel`;
|
|
158
|
+
$286d1cb34bb7dc84$export$465092164a8e1d98 = `dIo7iW_spectrum-Menu-itemLabel--wrapping`;
|
|
159
|
+
$286d1cb34bb7dc84$export$4f9817a7dff6ba0f = `dIo7iW_spectrum-Menu-keyboard`;
|
|
160
|
+
$286d1cb34bb7dc84$export$d959f30786125b = `dIo7iW_spectrum-Menu-popover`;
|
|
161
|
+
$286d1cb34bb7dc84$export$dae331c15950f1e = `dIo7iW_spectrum-Menu-section--isFirst`;
|
|
162
|
+
$286d1cb34bb7dc84$export$9778864c5b622fbc = `dIo7iW_spectrum-Menu-section--isLast`;
|
|
163
|
+
$286d1cb34bb7dc84$export$8b61ec49b96ad17e = `dIo7iW_spectrum-Menu-section--noHeading`;
|
|
164
|
+
$286d1cb34bb7dc84$export$c20ea4b35020fbdd = `dIo7iW_spectrum-Menu-sectionHeading`;
|
|
165
|
+
$286d1cb34bb7dc84$export$d7e47bfca92b5744 = `dIo7iW_spectrum-Menu-subdialog`;
|
|
166
|
+
$286d1cb34bb7dc84$export$76d36e55740ad742 = `dIo7iW_spectrum-Menu-wrapper`;
|
|
167
|
+
$286d1cb34bb7dc84$export$c873119be41fdb72 = `dIo7iW_spectrum-Menu-wrapper--isMobile`;
|
|
168
|
+
$286d1cb34bb7dc84$export$c830d2588e34dae1 = `dIo7iW_spectrum-Submenu-heading`;
|
|
169
|
+
$286d1cb34bb7dc84$export$d3fc690f61339a08 = `dIo7iW_spectrum-Submenu-headingWrapper`;
|
|
170
|
+
$286d1cb34bb7dc84$export$fe967dac6207a986 = `dIo7iW_spectrum-Submenu-popover`;
|
|
171
|
+
$286d1cb34bb7dc84$export$158cbd6607d36c4e = `dIo7iW_spectrum-Submenu-wrapper`;
|
|
172
|
+
$286d1cb34bb7dc84$export$6b954168165460e7 = `dIo7iW_spectrum-Submenu-wrapper--isMobile`;
|
|
173
|
+
$286d1cb34bb7dc84$export$6eb7afb010e5a05e = `dIo7iW_spectrum-TraySubmenu-enter`;
|
|
174
|
+
$286d1cb34bb7dc84$export$f55221e0121f82e3 = `dIo7iW_spectrum-TraySubmenu-exit`;
|
|
175
|
+
$286d1cb34bb7dc84$export$6f093cfa640b7166 = `dIo7iW_text`;
|
|
176
176
|
|
|
177
177
|
|
|
178
178
|
export {$286d1cb34bb7dc84$exports as default};
|