@react-spectrum/listbox 3.15.0 → 3.15.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.
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;AAoBM,SAAS,0CAAiB,KAAqB;IACpD,IAAI,QAAC,IAAI,EAAC,GAAG;IAEb,IAAI,YACF,QAAQ,OACR,GAAG,EACJ,GAAG;IACJ,IAAI,cAAiC,KAAK,KAAK,CAAC,IAAI,GAAG,MAAM;IAC7D,IAAI,SAAC,KAAK,sBAAE,kBAAkB,yBAAE,qBAAqB,EAAC,GAAG,CAAA,GAAA,uBAAS,EAAE,CAAA,GAAA,wCAAa;IAEjF,IAAI,MAAM,CAAA,GAAA,mBAAK,EAAO;IACtB,IAAI,eAAC,WAAW,cAAE,UAAU,oBAAE,gBAAgB,cAAE,UAAU,cAAE,UAAU,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,iCAAQ,EAC3F;QACE,cAAc,IAAI,CAAC,aAAa;aAChC;QACA,eAAe;IACjB,GACA,OACA;IAEF,IAAI,cAAC,UAAU,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,qCAAO,EAAE;QACrC,GAAG,KAAK;oBACR;IACF;IAEA,IAAI,WAAW,OAAO,aAAa,yBAC/B,0DAAC,CAAA,GAAA,6BAAG,SAAG,YACP;IAEJ,IAAI,qBAAqB,CAAA,GAAA,2CAAa;IAEtC,qBACE,0DAAC,CAAA,GAAA,+BAAQ;QAAE,gBAAgB,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;qBAC5C,0DAAC;QACE,GAAG,CAAA,GAAA,gCAAS,EAAE,aAAa,qBAAqB,CAAC,IAAI,WAAW;QACjE,KAAK;QACL,WAAW,CAAA,GAAA,oCAAS,EAClB,CAAA,GAAA,mDAAK,GACL,sBACA;YACE,+GAA+G;YAC/G,cAAc,yBAAyB,aAAa;YACpD,eAAe;YACf,eAAe;YACf,iBAAiB,MAAM,gBAAgB,CAAC,aAAa,KAAK;YAC1D,yFAAyF;YACzF,0EAA0E;YAC1E,cAAc,AAAC,aAAa,CAAC,sBAAwB,aAAa,CAAC;QACrE;qBAEF,0DAAC,CAAA,GAAA,+BAAG;QACF,kBACE,CAAA,GAAA,oCAAS,EACP,CAAA,GAAA,mDAAK,GACL;qBAGJ,0DAAC,CAAA,GAAA,oCAAS,uBACR,0DAAC,CAAA,GAAA,sCAAW;QACV,OAAO;YACL,MAAM;gBAAC,kBAAkB,CAAA,GAAA,mDAAK,CAAC,CAAC,0BAA0B;gBAAE,GAAG,UAAU;YAAA;YACzE,MAAM;gBAAC,MAAM;gBAAK,kBAAkB,CAAA,GAAA,mDAAK,CAAC,CAAC,qBAAqB;YAAA;YAChE,QAAQ;gBAAC,MAAM;gBAAmB,kBAAkB,CAAA,GAAA,mDAAK,CAAC,CAAC,uBAAuB;YAAA;YAClF,aAAa;gBAAC,kBAAkB,CAAA,GAAA,mDAAK,CAAC,CAAC,4BAA4B;gBAAE,GAAG,gBAAgB;YAAA;QAC1F;OACC,UACA,4BACC,0DAAC,CAAA,GAAA,+DAAc;QACb,MAAK;QACL,kBACE,CAAA,GAAA,oCAAS,EACP,CAAA,GAAA,mDAAK,GACL;;AAUtB","sources":["packages/@react-spectrum/listbox/src/ListBoxOption.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 CheckmarkMedium from '@spectrum-icons/ui/CheckmarkMedium';\nimport {classNames, ClearSlots, SlotProvider} from '@react-spectrum/utils';\nimport {FocusRing} from '@react-aria/focus';\nimport {Grid} from '@react-spectrum/layout';\nimport {isFocusVisible, useHover} from '@react-aria/interactions';\nimport {ListBoxContext} from './ListBoxContext';\nimport {mergeProps} from '@react-aria/utils';\nimport {Node} from '@react-types/shared';\nimport React, {ReactNode, useContext, useRef} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/menu/vars.css';\nimport {Text} from '@react-spectrum/text';\nimport {useOption} from '@react-aria/listbox';\n\ninterface OptionProps<T> {\n item: Node<T>\n}\n\n/** @private */\nexport function ListBoxOption<T>(props: OptionProps<T>): ReactNode {\n let {item} = props;\n\n let {\n rendered,\n key\n } = item;\n let ElementType: React.ElementType = item.props.href ? 'a' : 'div';\n let {state, shouldFocusOnHover, shouldUseVirtualFocus} = useContext(ListBoxContext)!;\n\n let ref = useRef<any>(undefined);\n let {optionProps, labelProps, descriptionProps, isSelected, isDisabled, isFocused} = useOption(\n {\n 'aria-label': item['aria-label'],\n key,\n isVirtualized: true\n },\n state,\n ref\n );\n let {hoverProps, isHovered} = useHover({\n ...props,\n isDisabled\n });\n\n let contents = typeof rendered === 'string'\n ? <Text>{rendered}</Text>\n : rendered;\n\n let isKeyboardModality = isFocusVisible();\n\n return (\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')}>\n <ElementType\n {...mergeProps(optionProps, shouldFocusOnHover ? {} : hoverProps)}\n ref={ref}\n className={classNames(\n styles,\n 'spectrum-Menu-item',\n {\n // If using virtual focus, apply focused styles to the item when the user is interacting with keyboard modality\n 'is-focused': shouldUseVirtualFocus && isFocused && isKeyboardModality,\n 'is-disabled': isDisabled,\n 'is-selected': isSelected,\n 'is-selectable': state.selectionManager.selectionMode !== 'none',\n // When shouldFocusOnHover is false, apply hover styles both when hovered with the mouse.\n // Otherwise, apply hover styles when focused using non-keyboard modality.\n 'is-hovered': (isHovered && !shouldFocusOnHover) || (isFocused && !isKeyboardModality)\n }\n )}>\n <Grid\n UNSAFE_className={\n classNames(\n styles,\n 'spectrum-Menu-itemGrid'\n )\n }>\n <ClearSlots>\n <SlotProvider\n slots={{\n text: {UNSAFE_className: styles['spectrum-Menu-itemLabel'], ...labelProps},\n icon: {size: 'S', UNSAFE_className: styles['spectrum-Menu-icon']},\n avatar: {size: 'avatar-size-100', UNSAFE_className: styles['spectrum-Menu-avatar']},\n description: {UNSAFE_className: styles['spectrum-Menu-description'], ...descriptionProps}\n }}>\n {contents}\n {isSelected &&\n <CheckmarkMedium\n slot=\"checkmark\"\n UNSAFE_className={\n classNames(\n styles,\n 'spectrum-Menu-checkmark'\n )\n } />\n }\n </SlotProvider>\n </ClearSlots>\n </Grid>\n </ElementType>\n </FocusRing>\n );\n}\n"],"names":[],"version":3,"file":"ListBoxOption.main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;AAoBM,SAAS,0CAAiB,KAAqB;IACpD,IAAI,QAAC,IAAI,EAAC,GAAG;IAEb,IAAI,YACF,QAAQ,OACR,GAAG,EACJ,GAAG;IACJ,IAAI,cAAiC,KAAK,KAAK,CAAC,IAAI,GAAG,MAAM;IAC7D,IAAI,SAAC,KAAK,sBAAE,kBAAkB,yBAAE,qBAAqB,EAAC,GAAG,CAAA,GAAA,uBAAS,EAAE,CAAA,GAAA,wCAAa;IAEjF,IAAI,MAAM,CAAA,GAAA,mBAAK,EAAO;IACtB,IAAI,eAAC,WAAW,cAAE,UAAU,oBAAE,gBAAgB,cAAE,UAAU,cAAE,UAAU,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,iCAAQ,EAC3F;QACE,cAAc,IAAI,CAAC,aAAa;aAChC;QACA,eAAe;IACjB,GACA,OACA;IAEF,IAAI,cAAC,UAAU,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,qCAAO,EAAE;QACrC,GAAG,KAAK;oBACR;IACF;IAEA,IAAI,WAAW,OAAO,aAAa,yBAC/B,0DAAC,CAAA,GAAA,6BA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["/*\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 CheckmarkMedium from '@spectrum-icons/ui/CheckmarkMedium';\nimport {classNames, ClearSlots, SlotProvider} from '@react-spectrum/utils';\nimport {FocusRing} from '@react-aria/focus';\nimport {Grid} from '@react-spectrum/layout';\nimport {isFocusVisible, useHover} from '@react-aria/interactions';\nimport {ListBoxContext} from './ListBoxContext';\nimport {mergeProps} from '@react-aria/utils';\nimport {Node} from '@react-types/shared';\nimport React, {JSX, useContext, useRef} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/menu/vars.css';\nimport {Text} from '@react-spectrum/text';\nimport {useOption} from '@react-aria/listbox';\n\ninterface OptionProps<T> {\n item: Node<T>\n}\n\n/** @private */\nexport function ListBoxOption<T>(props: OptionProps<T>): JSX.Element {\n let {item} = props;\n\n let {\n rendered,\n key\n } = item;\n let ElementType: React.ElementType = item.props.href ? 'a' : 'div';\n let {state, shouldFocusOnHover, shouldUseVirtualFocus} = useContext(ListBoxContext)!;\n\n let ref = useRef<any>(undefined);\n let {optionProps, labelProps, descriptionProps, isSelected, isDisabled, isFocused} = useOption(\n {\n 'aria-label': item['aria-label'],\n key,\n isVirtualized: true\n },\n state,\n ref\n );\n let {hoverProps, isHovered} = useHover({\n ...props,\n isDisabled\n });\n\n let contents = typeof rendered === 'string'\n ? <Text>{rendered}</Text>\n : rendered;\n\n let isKeyboardModality = isFocusVisible();\n\n return (\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')}>\n <ElementType\n {...mergeProps(optionProps, shouldFocusOnHover ? {} : hoverProps)}\n ref={ref}\n className={classNames(\n styles,\n 'spectrum-Menu-item',\n {\n // If using virtual focus, apply focused styles to the item when the user is interacting with keyboard modality\n 'is-focused': shouldUseVirtualFocus && isFocused && isKeyboardModality,\n 'is-disabled': isDisabled,\n 'is-selected': isSelected,\n 'is-selectable': state.selectionManager.selectionMode !== 'none',\n // When shouldFocusOnHover is false, apply hover styles both when hovered with the mouse.\n // Otherwise, apply hover styles when focused using non-keyboard modality.\n 'is-hovered': (isHovered && !shouldFocusOnHover) || (isFocused && !isKeyboardModality)\n }\n )}>\n <Grid\n UNSAFE_className={\n classNames(\n styles,\n 'spectrum-Menu-itemGrid'\n )\n }>\n <ClearSlots>\n <SlotProvider\n slots={{\n text: {UNSAFE_className: styles['spectrum-Menu-itemLabel'], ...labelProps},\n icon: {size: 'S', UNSAFE_className: styles['spectrum-Menu-icon']},\n avatar: {size: 'avatar-size-100', UNSAFE_className: styles['spectrum-Menu-avatar']},\n description: {UNSAFE_className: styles['spectrum-Menu-description'], ...descriptionProps}\n }}>\n {contents}\n {isSelected &&\n <CheckmarkMedium\n slot=\"checkmark\"\n UNSAFE_className={\n classNames(\n styles,\n 'spectrum-Menu-checkmark'\n )\n } />\n }\n </SlotProvider>\n </ClearSlots>\n </Grid>\n </ElementType>\n </FocusRing>\n );\n}\n"],"names":[],"version":3,"file":"ListBoxOption.main.js.map"}
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;AAoBM,SAAS,0CAAiB,KAAqB;IACpD,IAAI,QAAC,IAAI,EAAC,GAAG;IAEb,IAAI,YACF,QAAQ,OACR,GAAG,EACJ,GAAG;IACJ,IAAI,cAAiC,KAAK,KAAK,CAAC,IAAI,GAAG,MAAM;IAC7D,IAAI,SAAC,KAAK,sBAAE,kBAAkB,yBAAE,qBAAqB,EAAC,GAAG,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,yCAAa;IAEjF,IAAI,MAAM,CAAA,GAAA,aAAK,EA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Q;gBAAC,MAAM;gBAAmB,kBAAkB,CAAA,GAAA,sDAAK,CAAC,CAAC,uBAAuB;YAAA;YAClF,aAAa;gBAAC,kBAAkB,CAAA,GAAA,sDAAK,CAAC,CAAC,4BAA4B;gBAAE,GAAG,gBAAgB;YAAA;QAC1F;OACC,UACA,4BACC,gCAAC,CAAA,GAAA,qCAAc;QACb,MAAK;QACL,kBACE,CAAA,GAAA,iBAAS,EACP,CAAA,GAAA,sDAAK,GACL;;AAUtB","sources":["packages/@react-spectrum/listbox/src/ListBoxOption.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 CheckmarkMedium from '@spectrum-icons/ui/CheckmarkMedium';\nimport {classNames, ClearSlots, SlotProvider} from '@react-spectrum/utils';\nimport {FocusRing} from '@react-aria/focus';\nimport {Grid} from '@react-spectrum/layout';\nimport {isFocusVisible, useHover} from '@react-aria/interactions';\nimport {ListBoxContext} from './ListBoxContext';\nimport {mergeProps} from '@react-aria/utils';\nimport {Node} from '@react-types/shared';\nimport React, {ReactNode, useContext, useRef} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/menu/vars.css';\nimport {Text} from '@react-spectrum/text';\nimport {useOption} from '@react-aria/listbox';\n\ninterface OptionProps<T> {\n item: Node<T>\n}\n\n/** @private */\nexport function ListBoxOption<T>(props: OptionProps<T>): ReactNode {\n let {item} = props;\n\n let {\n rendered,\n key\n } = item;\n let ElementType: React.ElementType = item.props.href ? 'a' : 'div';\n let {state, shouldFocusOnHover, shouldUseVirtualFocus} = useContext(ListBoxContext)!;\n\n let ref = useRef<any>(undefined);\n let {optionProps, labelProps, descriptionProps, isSelected, isDisabled, isFocused} = useOption(\n {\n 'aria-label': item['aria-label'],\n key,\n isVirtualized: true\n },\n state,\n ref\n );\n let {hoverProps, isHovered} = useHover({\n ...props,\n isDisabled\n });\n\n let contents = typeof rendered === 'string'\n ? <Text>{rendered}</Text>\n : rendered;\n\n let isKeyboardModality = isFocusVisible();\n\n return (\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')}>\n <ElementType\n {...mergeProps(optionProps, shouldFocusOnHover ? {} : hoverProps)}\n ref={ref}\n className={classNames(\n styles,\n 'spectrum-Menu-item',\n {\n // If using virtual focus, apply focused styles to the item when the user is interacting with keyboard modality\n 'is-focused': shouldUseVirtualFocus && isFocused && isKeyboardModality,\n 'is-disabled': isDisabled,\n 'is-selected': isSelected,\n 'is-selectable': state.selectionManager.selectionMode !== 'none',\n // When shouldFocusOnHover is false, apply hover styles both when hovered with the mouse.\n // Otherwise, apply hover styles when focused using non-keyboard modality.\n 'is-hovered': (isHovered && !shouldFocusOnHover) || (isFocused && !isKeyboardModality)\n }\n )}>\n <Grid\n UNSAFE_className={\n classNames(\n styles,\n 'spectrum-Menu-itemGrid'\n )\n }>\n <ClearSlots>\n <SlotProvider\n slots={{\n text: {UNSAFE_className: styles['spectrum-Menu-itemLabel'], ...labelProps},\n icon: {size: 'S', UNSAFE_className: styles['spectrum-Menu-icon']},\n avatar: {size: 'avatar-size-100', UNSAFE_className: styles['spectrum-Menu-avatar']},\n description: {UNSAFE_className: styles['spectrum-Menu-description'], ...descriptionProps}\n }}>\n {contents}\n {isSelected &&\n <CheckmarkMedium\n slot=\"checkmark\"\n UNSAFE_className={\n classNames(\n styles,\n 'spectrum-Menu-checkmark'\n )\n } />\n }\n </SlotProvider>\n </ClearSlots>\n </Grid>\n </ElementType>\n </FocusRing>\n );\n}\n"],"names":[],"version":3,"file":"ListBoxOption.module.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;;;;;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AA,GAAA,WAAG;QACF,kBACE,CAAA,GAAA,iBAAS,EACP,CAAA,GAAA,sDAAK,GACL;qBAGJ,gCAAC,CAAA,GAAA,iBAAS,uBACR,gCAAC,CAAA,GAAA,mBAAW;QACV,OAAO;YACL,MAAM;gBAAC,kBAAkB,CAAA,GAAA,sDAAK,CAAC,CAAC,0BAA0B;gBAAE,GAAG,UAAU;YAAA;YACzE,MAAM;gBAAC,MAAM;gBAAK,kBAAkB,CAAA,GAAA,sDAAK,CAAC,CAAC,qBAAqB;YAAA;YAChE,QAAQ;gBAAC,MAAM;gBAAmB,kBAAkB,CAAA,GAAA,sDAAK,CAAC,CAAC,uBAAuB;YAAA;YAClF,aAAa;gBAAC,kBAAkB,CAAA,GAAA,sDAAK,CAAC,CAAC,4BAA4B;gBAAE,GAAG,gBAAgB;YAAA;QAC1F;OACC,UACA,4BACC,gCAAC,CAAA,GAAA,qCAAc;QACb,MAAK;QACL,kBACE,CAAA,GAAA,iBAAS,EACP,CAAA,GAAA,sDAAK,GACL;;AAUtB","sources":["packages/@react-spectrum/listbox/src/ListBoxOption.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 CheckmarkMedium from '@spectrum-icons/ui/CheckmarkMedium';\nimport {classNames, ClearSlots, SlotProvider} from '@react-spectrum/utils';\nimport {FocusRing} from '@react-aria/focus';\nimport {Grid} from '@react-spectrum/layout';\nimport {isFocusVisible, useHover} from '@react-aria/interactions';\nimport {ListBoxContext} from './ListBoxContext';\nimport {mergeProps} from '@react-aria/utils';\nimport {Node} from '@react-types/shared';\nimport React, {JSX, useContext, useRef} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/menu/vars.css';\nimport {Text} from '@react-spectrum/text';\nimport {useOption} from '@react-aria/listbox';\n\ninterface OptionProps<T> {\n item: Node<T>\n}\n\n/** @private */\nexport function ListBoxOption<T>(props: OptionProps<T>): JSX.Element {\n let {item} = props;\n\n let {\n rendered,\n key\n } = item;\n let ElementType: React.ElementType = item.props.href ? 'a' : 'div';\n let {state, shouldFocusOnHover, shouldUseVirtualFocus} = useContext(ListBoxContext)!;\n\n let ref = useRef<any>(undefined);\n let {optionProps, labelProps, descriptionProps, isSelected, isDisabled, isFocused} = useOption(\n {\n 'aria-label': item['aria-label'],\n key,\n isVirtualized: true\n },\n state,\n ref\n );\n let {hoverProps, isHovered} = useHover({\n ...props,\n isDisabled\n });\n\n let contents = typeof rendered === 'string'\n ? <Text>{rendered}</Text>\n : rendered;\n\n let isKeyboardModality = isFocusVisible();\n\n return (\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')}>\n <ElementType\n {...mergeProps(optionProps, shouldFocusOnHover ? {} : hoverProps)}\n ref={ref}\n className={classNames(\n styles,\n 'spectrum-Menu-item',\n {\n // If using virtual focus, apply focused styles to the item when the user is interacting with keyboard modality\n 'is-focused': shouldUseVirtualFocus && isFocused && isKeyboardModality,\n 'is-disabled': isDisabled,\n 'is-selected': isSelected,\n 'is-selectable': state.selectionManager.selectionMode !== 'none',\n // When shouldFocusOnHover is false, apply hover styles both when hovered with the mouse.\n // Otherwise, apply hover styles when focused using non-keyboard modality.\n 'is-hovered': (isHovered && !shouldFocusOnHover) || (isFocused && !isKeyboardModality)\n }\n )}>\n <Grid\n UNSAFE_className={\n classNames(\n styles,\n 'spectrum-Menu-itemGrid'\n )\n }>\n <ClearSlots>\n <SlotProvider\n slots={{\n text: {UNSAFE_className: styles['spectrum-Menu-itemLabel'], ...labelProps},\n icon: {size: 'S', UNSAFE_className: styles['spectrum-Menu-icon']},\n avatar: {size: 'avatar-size-100', UNSAFE_className: styles['spectrum-Menu-avatar']},\n description: {UNSAFE_className: styles['spectrum-Menu-description'], ...descriptionProps}\n }}>\n {contents}\n {isSelected &&\n <CheckmarkMedium\n slot=\"checkmark\"\n UNSAFE_className={\n classNames(\n styles,\n 'spectrum-Menu-checkmark'\n )\n } />\n }\n </SlotProvider>\n </ClearSlots>\n </Grid>\n </ElementType>\n </FocusRing>\n );\n}\n"],"names":[],"version":3,"file":"ListBoxOption.module.js.map"}
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;AAoBM,SAAS,yCAAkB,KAA6B;IAC7D,IAAI,YAAC,QAAQ,cAAE,UAAU,oBAAE,gBAAgB,eAAE,WAAW,QAAE,IAAI,EAAC,GAAG;IAClE,IAAI,gBAAC,YAAY,cAAE,UAAU,EAAC,GAAG,CAAA,GAAA,yCAAgB,EAAE;QACjD,SAAS,KAAK,QAAQ;QACtB,cAAc,IAAI,CAAC,aAAa;IAClC;IAEA,IAAI,YAAY,CAAA,GAAA,mBAAK,EAAyB;IAC9C,CAAA,GAAA,8CAAiB,EAAE;QACjB,YAAY;qBACZ;QACA,KAAK;IACP;IAEA,IAAI,aAAC,SAAS,EAAC,GAAG,CAAA,GAAA,8BAAQ;IAC1B,IAAI,SAAC,KAAK,EAAC,GAAG,CAAA,GAAA,uBAAS,EAAE,CAAA,GAAA,wCAAa;IAEtC,qBACE,0DAAC,CAAA,GAAA,qBAAO,SACL,kCAAoB,0DAAC;QAAI,MAAK;QAAe,KAAK;QAAW,OAAO,CAAA,GAAA,6CAAgB,EAAE,kBAAkB;OACtG,KAAK,GAAG,KAAK,MAAM,UAAU,CAAC,WAAW,oBACxC,0DAAC;QACC,MAAK;QACL,WAAW,CAAA,GAAA,oCAAS,EAClB,CAAA,GAAA,mDAAK,GACL;QAGL,KAAK,QAAQ,kBACZ,0DAAC;QACE,GAAG,YAAY;QAChB,WACE,CAAA,GAAA,oCAAS,EACP,CAAA,GAAA,mDAAK,GACL;OAGH,KAAK,QAAQ,kBAIpB,0DAAC;QACE,GAAG,UAAU;QACd,OAAO,CAAA,GAAA,6CAAgB,EAAE,YAAY;QACrC,WACE,CAAA,GAAA,oCAAS,EACP,CAAA,GAAA,mDAAK,GACL;OAGH;AAIT","sources":["packages/@react-spectrum/listbox/src/ListBoxSection.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 {classNames} from '@react-spectrum/utils';\nimport {LayoutInfo} from '@react-stately/virtualizer';\nimport {layoutInfoToStyle, useVirtualizerItem, VirtualizerItemOptions} from '@react-aria/virtualizer';\nimport {ListBoxContext} from './ListBoxContext';\nimport {Node} from '@react-types/shared';\nimport React, {Fragment, ReactNode, useContext, useRef} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/menu/vars.css';\nimport {useListBoxSection} from '@react-aria/listbox';\nimport {useLocale} from '@react-aria/i18n';\n\ninterface ListBoxSectionProps<T> extends Omit<VirtualizerItemOptions, 'ref' | 'layoutInfo'> {\n layoutInfo: LayoutInfo,\n headerLayoutInfo: LayoutInfo | null,\n item: Node<T>,\n children?: ReactNode\n}\n\n/** @private */\nexport function ListBoxSection<T>(props: ListBoxSectionProps<T>): ReactNode {\n let {children, layoutInfo, headerLayoutInfo, virtualizer, item} = props;\n let {headingProps, groupProps} = useListBoxSection({\n heading: item.rendered,\n 'aria-label': item['aria-label']\n });\n\n let headerRef = useRef<HTMLDivElement | null>(null);\n useVirtualizerItem({\n layoutInfo: headerLayoutInfo,\n virtualizer,\n ref: headerRef\n });\n\n let {direction} = useLocale();\n let {state} = useContext(ListBoxContext)!;\n\n return (\n <Fragment>\n {headerLayoutInfo && <div role=\"presentation\" ref={headerRef} style={layoutInfoToStyle(headerLayoutInfo, direction)}>\n {item.key !== state.collection.getFirstKey() &&\n <div\n role=\"presentation\"\n className={classNames(\n styles,\n 'spectrum-Menu-divider'\n )} />\n }\n {item.rendered &&\n <div\n {...headingProps}\n className={\n classNames(\n styles,\n 'spectrum-Menu-sectionHeading'\n )\n }>\n {item.rendered}\n </div>\n }\n </div>}\n <div\n {...groupProps}\n style={layoutInfoToStyle(layoutInfo, direction)}\n className={\n classNames(\n styles,\n 'spectrum-Menu'\n )\n }>\n {children}\n </div>\n </Fragment>\n );\n}\n"],"names":[],"version":3,"file":"ListBoxSection.main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;AAoBM,SAAS,yCAAkB,KAA6B;IAC7D,IAAI,YAAC,QAAQ,cAAE,UAAU,oBAAE,gBAAgB,eAAE,WAAW,QAAE,IAAI,EAAC,GAAG;IAClE,IAAI,gBAAC,YAAY,cAAE,UAAU,EAAC,GAAG,CAAA,GAAA,yCAAgB,EAAE;QACjD,SAAS,KAAK,QAAQ;QACtB,cAAc,IAAI,CAAC,aAAa;IAClC;IAEA,IAAI,YAAY,CAAA,GAAA,mBAAK,EAAyB;IAC9C,CAAA,GAAA,8CAAiB,EAAE;QACjB,YAAY;qBACZ;QACA,KAAK;IACP;IAEA,IAAI,aAAC,SAAS,EAAC,GAAG,CAAA,GAAA,8BAAQ;IAC1B,IAAI,SAAC,KAAK,EAAC,GAAG,CAAA,GAAA,uBAAS,EAAE,CAAA,GAAA,wCAAa;IAEtC,qBACE,0DAAC,CAAA,GAAA,qBAAO,SACL,kCAAoB,0DAAC;QAAI,MAAK;QAAe,KAAK;QAAW,OAAO,CAAA,GAAA,6CAAgB,EAAE,kBAAkB;OACtG,KAAK,GAAG,KAAK,MAAM,UAAU,CAAC,WAAW,oBACxC,0DAAC;QACC,MAAK;QACL,WAAW,CAAA,GAAA,oCAAS,EAClB,CAAA,GAAA,mDAAK,GACL;QAGL,KAAK,QAAQ,kBACZ,0DAAC;QACE,GAAG,YAAY;QAChB,WACE,CAAA,GAAA,oCAAS,EACP,CAAA,GAAA,mDAAK,GACL;OAGH,KAAK,QAAQ,kBAIpB,0DAAC;QACE,GAAG,UAAU;QACd,OAAO,CAAA,GAAA,6CAAgB,EAAE,YAAY;QACrC,WACE,CAAA,GAAA,oCAAS,EACP,CAAA,GAAA,mDAAK,GACL;OAGH;AAIT","sources":["packages/@react-spectrum/listbox/src/ListBoxSection.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 {classNames} from '@react-spectrum/utils';\nimport {LayoutInfo} from '@react-stately/virtualizer';\nimport {layoutInfoToStyle, useVirtualizerItem, VirtualizerItemOptions} from '@react-aria/virtualizer';\nimport {ListBoxContext} from './ListBoxContext';\nimport {Node} from '@react-types/shared';\nimport React, {Fragment, JSX, ReactNode, useContext, useRef} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/menu/vars.css';\nimport {useListBoxSection} from '@react-aria/listbox';\nimport {useLocale} from '@react-aria/i18n';\n\ninterface ListBoxSectionProps<T> extends Omit<VirtualizerItemOptions, 'ref' | 'layoutInfo'> {\n layoutInfo: LayoutInfo,\n headerLayoutInfo: LayoutInfo | null,\n item: Node<T>,\n children?: ReactNode\n}\n\n/** @private */\nexport function ListBoxSection<T>(props: ListBoxSectionProps<T>): JSX.Element {\n let {children, layoutInfo, headerLayoutInfo, virtualizer, item} = props;\n let {headingProps, groupProps} = useListBoxSection({\n heading: item.rendered,\n 'aria-label': item['aria-label']\n });\n\n let headerRef = useRef<HTMLDivElement | null>(null);\n useVirtualizerItem({\n layoutInfo: headerLayoutInfo,\n virtualizer,\n ref: headerRef\n });\n\n let {direction} = useLocale();\n let {state} = useContext(ListBoxContext)!;\n\n return (\n <Fragment>\n {headerLayoutInfo && <div role=\"presentation\" ref={headerRef} style={layoutInfoToStyle(headerLayoutInfo, direction)}>\n {item.key !== state.collection.getFirstKey() &&\n <div\n role=\"presentation\"\n className={classNames(\n styles,\n 'spectrum-Menu-divider'\n )} />\n }\n {item.rendered &&\n <div\n {...headingProps}\n className={\n classNames(\n styles,\n 'spectrum-Menu-sectionHeading'\n )\n }>\n {item.rendered}\n </div>\n }\n </div>}\n <div\n {...groupProps}\n style={layoutInfoToStyle(layoutInfo, direction)}\n className={\n classNames(\n styles,\n 'spectrum-Menu'\n )\n }>\n {children}\n </div>\n </Fragment>\n );\n}\n"],"names":[],"version":3,"file":"ListBoxSection.main.js.map"}
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;AAoBM,SAAS,yCAAkB,KAA6B;IAC7D,IAAI,YAAC,QAAQ,cAAE,UAAU,oBAAE,gBAAgB,eAAE,WAAW,QAAE,IAAI,EAAC,GAAG;IAClE,IAAI,gBAAC,YAAY,cAAE,UAAU,EAAC,GAAG,CAAA,GAAA,wBAAgB,EAAE;QACjD,SAAS,KAAK,QAAQ;QACtB,cAAc,IAAI,CAAC,aAAa;IAClC;IAEA,IAAI,YAAY,CAAA,GAAA,aAAK,EAAyB;IAC9C,CAAA,GAAA,yBAAiB,EAAE;QACjB,YAAY;qBACZ;QACA,KAAK;IACP;IAEA,IAAI,aAAC,SAAS,EAAC,GAAG,CAAA,GAAA,gBAAQ;IAC1B,IAAI,SAAC,KAAK,EAAC,GAAG,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,yCAAa;IAEtC,qBACE,gCAAC,CAAA,GAAA,eAAO,SACL,kCAAoB,gCAAC;QAAI,MAAK;QAAe,KAAK;QAAW,OAAO,CAAA,GAAA,wBAAgB,EAAE,kBAAkB;OACtG,KAAK,GAAG,KAAK,MAAM,UAAU,CAAC,WAAW,oBACxC,gCAAC;QACC,MAAK;QACL,WAAW,CAAA,GAAA,iBAAS,EAClB,CAAA,GAAA,sDAAK,GACL;QAGL,KAAK,QAAQ,kBACZ,gCAAC;QACE,GAAG,YAAY;QAChB,WACE,CAAA,GAAA,iBAAS,EACP,CAAA,GAAA,sDAAK,GACL;OAGH,KAAK,QAAQ,kBAIpB,gCAAC;QACE,GAAG,UAAU;QACd,OAAO,CAAA,GAAA,wBAAgB,EAAE,YAAY;QACrC,WACE,CAAA,GAAA,iBAAS,EACP,CAAA,GAAA,sDAAK,GACL;OAGH;AAIT","sources":["packages/@react-spectrum/listbox/src/ListBoxSection.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 {classNames} from '@react-spectrum/utils';\nimport {LayoutInfo} from '@react-stately/virtualizer';\nimport {layoutInfoToStyle, useVirtualizerItem, VirtualizerItemOptions} from '@react-aria/virtualizer';\nimport {ListBoxContext} from './ListBoxContext';\nimport {Node} from '@react-types/shared';\nimport React, {Fragment, ReactNode, useContext, useRef} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/menu/vars.css';\nimport {useListBoxSection} from '@react-aria/listbox';\nimport {useLocale} from '@react-aria/i18n';\n\ninterface ListBoxSectionProps<T> extends Omit<VirtualizerItemOptions, 'ref' | 'layoutInfo'> {\n layoutInfo: LayoutInfo,\n headerLayoutInfo: LayoutInfo | null,\n item: Node<T>,\n children?: ReactNode\n}\n\n/** @private */\nexport function ListBoxSection<T>(props: ListBoxSectionProps<T>): ReactNode {\n let {children, layoutInfo, headerLayoutInfo, virtualizer, item} = props;\n let {headingProps, groupProps} = useListBoxSection({\n heading: item.rendered,\n 'aria-label': item['aria-label']\n });\n\n let headerRef = useRef<HTMLDivElement | null>(null);\n useVirtualizerItem({\n layoutInfo: headerLayoutInfo,\n virtualizer,\n ref: headerRef\n });\n\n let {direction} = useLocale();\n let {state} = useContext(ListBoxContext)!;\n\n return (\n <Fragment>\n {headerLayoutInfo && <div role=\"presentation\" ref={headerRef} style={layoutInfoToStyle(headerLayoutInfo, direction)}>\n {item.key !== state.collection.getFirstKey() &&\n <div\n role=\"presentation\"\n className={classNames(\n styles,\n 'spectrum-Menu-divider'\n )} />\n }\n {item.rendered &&\n <div\n {...headingProps}\n className={\n classNames(\n styles,\n 'spectrum-Menu-sectionHeading'\n )\n }>\n {item.rendered}\n </div>\n }\n </div>}\n <div\n {...groupProps}\n style={layoutInfoToStyle(layoutInfo, direction)}\n className={\n classNames(\n styles,\n 'spectrum-Menu'\n )\n }>\n {children}\n </div>\n </Fragment>\n );\n}\n"],"names":[],"version":3,"file":"ListBoxSection.module.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;AAoBM,SAAS,yCAAkB,KAA6B;IAC7D,IAAI,YAAC,QAAQ,cAAE,UAAU,oBAAE,gBAAgB,eAAE,WAAW,QAAE,IAAI,EAAC,GAAG;IAClE,IAAI,gBAAC,YAAY,cAAE,UAAU,EAAC,GAAG,CAAA,GAAA,wBAAgB,EAAE;QACjD,SAAS,KAAK,QAAQ;QACtB,cAAc,IAAI,CAAC,aAAa;IAClC;IAEA,IAAI,YAAY,CAAA,GAAA,aAAK,EAAyB;IAC9C,CAAA,GAAA,yBAAiB,EAAE;QACjB,YAAY;qBACZ;QACA,KAAK;IACP;IAEA,IAAI,aAAC,SAAS,EAAC,GAAG,CAAA,GAAA,gBAAQ;IAC1B,IAAI,SAAC,KAAK,EAAC,GAAG,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,yCAAa;IAEtC,qBACE,gCAAC,CAAA,GAAA,eAAO,SACL,kCAAoB,gCAAC;QAAI,MAAK;QAAe,KAAK;QAAW,OAAO,CAAA,GAAA,wBAAgB,EAAE,kBAAkB;OACtG,KAAK,GAAG,KAAK,MAAM,UAAU,CAAC,WAAW,oBACxC,gCAAC;QACC,MAAK;QACL,WAAW,CAAA,GAAA,iBAAS,EAClB,CAAA,GAAA,sDAAK,GACL;QAGL,KAAK,QAAQ,kBACZ,gCAAC;QACE,GAAG,YAAY;QAChB,WACE,CAAA,GAAA,iBAAS,EACP,CAAA,GAAA,sDAAK,GACL;OAGH,KAAK,QAAQ,kBAIpB,gCAAC;QACE,GAAG,UAAU;QACd,OAAO,CAAA,GAAA,wBAAgB,EAAE,YAAY;QACrC,WACE,CAAA,GAAA,iBAAS,EACP,CAAA,GAAA,sDAAK,GACL;OAGH;AAIT","sources":["packages/@react-spectrum/listbox/src/ListBoxSection.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 {classNames} from '@react-spectrum/utils';\nimport {LayoutInfo} from '@react-stately/virtualizer';\nimport {layoutInfoToStyle, useVirtualizerItem, VirtualizerItemOptions} from '@react-aria/virtualizer';\nimport {ListBoxContext} from './ListBoxContext';\nimport {Node} from '@react-types/shared';\nimport React, {Fragment, JSX, ReactNode, useContext, useRef} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/menu/vars.css';\nimport {useListBoxSection} from '@react-aria/listbox';\nimport {useLocale} from '@react-aria/i18n';\n\ninterface ListBoxSectionProps<T> extends Omit<VirtualizerItemOptions, 'ref' | 'layoutInfo'> {\n layoutInfo: LayoutInfo,\n headerLayoutInfo: LayoutInfo | null,\n item: Node<T>,\n children?: ReactNode\n}\n\n/** @private */\nexport function ListBoxSection<T>(props: ListBoxSectionProps<T>): JSX.Element {\n let {children, layoutInfo, headerLayoutInfo, virtualizer, item} = props;\n let {headingProps, groupProps} = useListBoxSection({\n heading: item.rendered,\n 'aria-label': item['aria-label']\n });\n\n let headerRef = useRef<HTMLDivElement | null>(null);\n useVirtualizerItem({\n layoutInfo: headerLayoutInfo,\n virtualizer,\n ref: headerRef\n });\n\n let {direction} = useLocale();\n let {state} = useContext(ListBoxContext)!;\n\n return (\n <Fragment>\n {headerLayoutInfo && <div role=\"presentation\" ref={headerRef} style={layoutInfoToStyle(headerLayoutInfo, direction)}>\n {item.key !== state.collection.getFirstKey() &&\n <div\n role=\"presentation\"\n className={classNames(\n styles,\n 'spectrum-Menu-divider'\n )} />\n }\n {item.rendered &&\n <div\n {...headingProps}\n className={\n classNames(\n styles,\n 'spectrum-Menu-sectionHeading'\n )\n }>\n {item.rendered}\n </div>\n }\n </div>}\n <div\n {...groupProps}\n style={layoutInfoToStyle(layoutInfo, direction)}\n className={\n classNames(\n styles,\n 'spectrum-Menu'\n )\n }>\n {children}\n </div>\n </Fragment>\n );\n}\n"],"names":[],"version":3,"file":"ListBoxSection.module.js.map"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-spectrum/listbox",
3
- "version": "3.15.0",
3
+ "version": "3.15.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.20.2",
40
- "@react-aria/i18n": "^3.12.8",
41
- "@react-aria/interactions": "^3.25.0",
42
- "@react-aria/listbox": "^3.14.3",
43
- "@react-aria/utils": "^3.28.2",
44
- "@react-aria/virtualizer": "^4.1.4",
45
- "@react-spectrum/layout": "^3.6.14",
46
- "@react-spectrum/progress": "^3.7.15",
47
- "@react-spectrum/text": "^3.5.14",
48
- "@react-spectrum/utils": "^3.12.4",
49
- "@react-stately/collections": "^3.12.3",
50
- "@react-stately/layout": "^4.2.2",
51
- "@react-stately/list": "^3.12.1",
52
- "@react-stately/virtualizer": "^4.3.2",
53
- "@react-types/listbox": "^3.6.0",
54
- "@react-types/shared": "^3.29.0",
55
- "@spectrum-icons/ui": "^3.6.15",
39
+ "@react-aria/focus": "^3.20.3",
40
+ "@react-aria/i18n": "^3.12.9",
41
+ "@react-aria/interactions": "^3.25.1",
42
+ "@react-aria/listbox": "^3.14.4",
43
+ "@react-aria/utils": "^3.29.0",
44
+ "@react-aria/virtualizer": "^4.1.5",
45
+ "@react-spectrum/layout": "^3.6.15",
46
+ "@react-spectrum/progress": "^3.7.16",
47
+ "@react-spectrum/text": "^3.5.15",
48
+ "@react-spectrum/utils": "^3.12.5",
49
+ "@react-stately/collections": "^3.12.4",
50
+ "@react-stately/layout": "^4.3.0",
51
+ "@react-stately/list": "^3.12.2",
52
+ "@react-stately/virtualizer": "^4.4.0",
53
+ "@react-types/listbox": "^3.7.0",
54
+ "@react-types/shared": "^3.29.1",
55
+ "@spectrum-icons/ui": "^3.6.16",
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": "9b66d270572f482948afee95622a85cdf68ed408"
69
+ "gitHead": "9c77d4e8267ed39469c65f65da94ece7be509874"
70
70
  }
@@ -18,7 +18,7 @@ import {isFocusVisible, useHover} from '@react-aria/interactions';
18
18
  import {ListBoxContext} from './ListBoxContext';
19
19
  import {mergeProps} from '@react-aria/utils';
20
20
  import {Node} from '@react-types/shared';
21
- import React, {ReactNode, useContext, useRef} from 'react';
21
+ import React, {JSX, useContext, useRef} from 'react';
22
22
  import styles from '@adobe/spectrum-css-temp/components/menu/vars.css';
23
23
  import {Text} from '@react-spectrum/text';
24
24
  import {useOption} from '@react-aria/listbox';
@@ -28,7 +28,7 @@ interface OptionProps<T> {
28
28
  }
29
29
 
30
30
  /** @private */
31
- export function ListBoxOption<T>(props: OptionProps<T>): ReactNode {
31
+ export function ListBoxOption<T>(props: OptionProps<T>): JSX.Element {
32
32
  let {item} = props;
33
33
 
34
34
  let {
@@ -15,7 +15,7 @@ import {LayoutInfo} from '@react-stately/virtualizer';
15
15
  import {layoutInfoToStyle, useVirtualizerItem, VirtualizerItemOptions} from '@react-aria/virtualizer';
16
16
  import {ListBoxContext} from './ListBoxContext';
17
17
  import {Node} from '@react-types/shared';
18
- import React, {Fragment, ReactNode, useContext, useRef} from 'react';
18
+ import React, {Fragment, JSX, ReactNode, useContext, useRef} from 'react';
19
19
  import styles from '@adobe/spectrum-css-temp/components/menu/vars.css';
20
20
  import {useListBoxSection} from '@react-aria/listbox';
21
21
  import {useLocale} from '@react-aria/i18n';
@@ -28,7 +28,7 @@ interface ListBoxSectionProps<T> extends Omit<VirtualizerItemOptions, 'ref' | 'l
28
28
  }
29
29
 
30
30
  /** @private */
31
- export function ListBoxSection<T>(props: ListBoxSectionProps<T>): ReactNode {
31
+ export function ListBoxSection<T>(props: ListBoxSectionProps<T>): JSX.Element {
32
32
  let {children, layoutInfo, headerLayoutInfo, virtualizer, item} = props;
33
33
  let {headingProps, groupProps} = useListBoxSection({
34
34
  heading: item.rendered,