@react-spectrum/listbox 3.8.2-nightly.3599 → 3.8.2-nightly.3600
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/main.css +1 -1
- package/dist/main.js +156 -100
- package/dist/main.js.map +1 -1
- package/dist/module.mjs +156 -100
- package/dist/module.mjs.map +1 -1
- package/package.json +22 -22
package/dist/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AIAA,yBAAc,GAAG,CAAC;IAAE,CAAS,WAAG,0BAAe;IAClC,CAAE,eAAG,mCAAoB;AACtC,CAAC;;;;ACFD,yBAAc,GAAG,CAAC;IAAE,CAAS,WAAG,qBAAY;IACjC,CAAI,eAAG,iCAAmB;AACrC,CAAC;;;;ACFD,yBAAc,GAAG,CAAC;IAAE,CAAS,WAAG,eAAW;IACrC,CAAS,eAAG,yBAAmB;AACrC,CAAC;;;;ACFD,yBAAc,GAAG,CAAC;IAAE,CAAS,WAAG,aAAY;IACzC,CAAY,eAAG,mBAAkB;AACpC,CAAC;;;;ACFD,yBAAc,GAAG,CAAC;IAAE,CAAS,WAAG,QAAQ;IACtC,CAAa,eAAG,cAAc;AAChC,CAAC;;;;ACFD,yBAAc,GAAG,CAAC;IAAE,CAAS,WAAG,iBAAU;IACjC,CAAM,eAAG,0CAAuB;AACzC,CAAC;;;;ACFD,yBAAc,GAAG,CAAC;IAAE,CAAS,WAAG,UAAQ;IACpC,CAAW,eAAG,eAAa;AAC/B,CAAC;;;;ACFD,yBAAc,GAAG,CAAC;IAAE,CAAS,WAAG,WAAS;IACrC,CAAW,eAAG,gBAAa;AAC/B,CAAC;;;;ACFD,yBAAc,GAAG,CAAC;IAAE,CAAS,WAAG,YAAY;IAC1C,CAAa,eAAG,eAAe;AACjC,CAAC;;;;ACFD,yBAAc,GAAG,CAAC;IAAE,CAAS,WAAG,WAAS;IACrC,CAAW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AiE;gBACjE,IAAI,EAAC,CAAQ;eACZ,UAAU;QAGjB,CAAC;IACH,CAAC;AAKX,CAAC;AAED,EAAwF,AAAxF,sFAAwF;AACxF,EAA2G,AAA3G,yGAA2G;AAC3G,KAAK,CAAC,yCAAY,iBAAG,sCAAK,CAAC,UAAU,CAAC,iCAAW;;;;;;SD7JxC,6BAAO,CAAmB,KAA8B,EAAE,GAA2B,EAAE,CAAC;IAC/F,GAAG,CAAC,KAAK,GAAG,oCAAY,CAAC,KAAK;IAC9B,GAAG,CAAC,MAAM,GAAG,yCAAgB,CAAC,KAAK;IACnC,GAAG,CAAC,MAAM,GAAG,mCAAS,CAAC,GAAG;IAE1B,MAAM,oEACH,yCAAW;WACN,KAAK;QACT,GAAG,EAAE,MAAM;QACX,KAAK,EAAE,KAAK;QACZ,MAAM,EAAE,MAAM;;AAEpB,CAAC;AAED,EAAwF,AAAxF,sFAAwF;AACxF,EAA2G,AAA3G,yGAA2G;AAG3G,EAEG,AAFH;;CAEG,AAFH,EAEG,CACH,KAAK,CAAC,yCAAQ,iBAAG,sCAAK,CAAC,UAAU,CAAC,6BAAO","sources":["packages/@react-spectrum/listbox/src/index.ts","packages/@react-spectrum/listbox/src/ListBox.tsx","packages/@react-spectrum/listbox/src/ListBoxBase.tsx","packages/@react-spectrum/listbox/intl/*.js","packages/@react-spectrum/listbox/intl/ar-AE.json","packages/@react-spectrum/listbox/intl/bg-BG.json","packages/@react-spectrum/listbox/intl/cs-CZ.json","packages/@react-spectrum/listbox/intl/da-DK.json","packages/@react-spectrum/listbox/intl/de-DE.json","packages/@react-spectrum/listbox/intl/el-GR.json","packages/@react-spectrum/listbox/intl/en-US.json","packages/@react-spectrum/listbox/intl/es-ES.json","packages/@react-spectrum/listbox/intl/et-EE.json","packages/@react-spectrum/listbox/intl/fi-FI.json","packages/@react-spectrum/listbox/intl/fr-FR.json","packages/@react-spectrum/listbox/intl/he-IL.json","packages/@react-spectrum/listbox/intl/hr-HR.json","packages/@react-spectrum/listbox/intl/hu-HU.json","packages/@react-spectrum/listbox/intl/it-IT.json","packages/@react-spectrum/listbox/intl/ja-JP.json","packages/@react-spectrum/listbox/intl/ko-KR.json","packages/@react-spectrum/listbox/intl/lt-LT.json","packages/@react-spectrum/listbox/intl/lv-LV.json","packages/@react-spectrum/listbox/intl/nb-NO.json","packages/@react-spectrum/listbox/intl/nl-NL.json","packages/@react-spectrum/listbox/intl/pl-PL.json","packages/@react-spectrum/listbox/intl/pt-BR.json","packages/@react-spectrum/listbox/intl/pt-PT.json","packages/@react-spectrum/listbox/intl/ro-RO.json","packages/@react-spectrum/listbox/intl/ru-RU.json","packages/@react-spectrum/listbox/intl/sk-SK.json","packages/@react-spectrum/listbox/intl/sl-SI.json","packages/@react-spectrum/listbox/intl/sr-SP.json","packages/@react-spectrum/listbox/intl/sv-SE.json","packages/@react-spectrum/listbox/intl/tr-TR.json","packages/@react-spectrum/listbox/intl/uk-UA.json","packages/@react-spectrum/listbox/intl/zh-CN.json","packages/@react-spectrum/listbox/intl/zh-TW.json","packages/@react-spectrum/listbox/src/ListBoxContext.ts","packages/@react-spectrum/listbox/src/ListBoxOption.tsx","packages/@adobe/spectrum-css-temp/components/menu/vars.css","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\n/// <reference types=\"css-module-types\" />\n\nexport {ListBox} from './ListBox';\nexport {useListBoxLayout, ListBoxBase} from './ListBoxBase';\nexport {Item, Section} from '@react-stately/collections';\nexport type {SpectrumListBoxProps} from '@react-types/listbox';\n","/*\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\nfunction ListBox<T extends object>(props: SpectrumListBoxProps<T>, ref: DOMRef<HTMLDivElement>) {\n let state = useListState(props);\n let layout = useListBoxLayout(state);\n let domRef = useDOMRef(ref);\n\n return (\n <ListBoxBase\n {...props}\n ref={domRef}\n state={state}\n layout={layout} />\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\n\n\n/**\n * A list of options that can allow selection of one or more.\n */\nconst _ListBox = React.forwardRef(ListBox) as <T>(props: SpectrumListBoxProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;\nexport {_ListBox as ListBox};\n","/*\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, 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 {ListBoxOption} from './ListBoxOption';\nimport {ListBoxSection} from './ListBoxSection';\nimport {ListLayout} from '@react-stately/layout';\nimport {ListState} from '@react-stately/list';\nimport {mergeProps} from '@react-aria/utils';\nimport {ProgressCircle} from '@react-spectrum/progress';\nimport React, {HTMLAttributes, ReactElement, ReactNode, RefObject, useMemo} from 'react';\nimport {ReusableView} from '@react-stately/virtualizer';\nimport styles from '@adobe/spectrum-css-temp/components/menu/vars.css';\nimport {useCollator, 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: ListLayout<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 transitionDuration?: number,\n isLoading?: boolean,\n onLoadMore?: () => void,\n renderEmptyState?: () => ReactNode,\n onScroll?: () => void\n}\n\n/** @private */\nexport function useListBoxLayout<T>(state: ListState<T>): ListLayout<T> {\n let {scale} = useProvider();\n let collator = useCollator({usage: 'search', sensitivity: 'base'});\n let layout = useMemo(() =>\n new ListLayout<T>({\n estimatedRowHeight: scale === 'large' ? 48 : 32,\n estimatedHeadingHeight: scale === 'large' ? 33 : 26,\n padding: scale === 'large' ? 5 : 4, // TODO: get from DNA\n loaderHeight: 40,\n placeholderHeight: scale === 'large' ? 48 : 32,\n collator\n })\n , [collator, scale]);\n\n layout.collection = state.collection;\n layout.disabledKeys = state.disabledKeys;\n return layout;\n}\n\n/** @private */\nfunction ListBoxBase<T>(props: ListBoxBaseProps<T>, ref: RefObject<HTMLDivElement>) {\n let {layout, state, shouldSelectOnPressUp, focusOnPointerEnter, shouldUseVirtualFocus, domProps = {}, transitionDuration = 0, onScroll} = props;\n let {listBoxProps} = useListBox({\n ...props,\n keyboardDelegate: layout,\n isVirtualized: true\n }, state, ref);\n let {styleProps} = useStyleProps(props);\n let stringFormatter = useLocalizedStringFormatter(intlMessages);\n\n // Sync loading state into the layout.\n layout.isLoading = props.isLoading;\n\n // This overrides collection view's renderWrapper to support heirarchy 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>, unknown>;\n let renderWrapper = (parent: View, reusableView: View, children: View[], renderChildren: (views: View[]) => ReactElement[]) => {\n if (reusableView.viewType === 'section') {\n return (\n <ListBoxSection\n key={reusableView.key}\n reusableView={reusableView}\n header={children.find(c => c.viewType === 'header')}>\n {renderChildren(children.filter(c => c.viewType === 'item'))}\n </ListBoxSection>\n );\n }\n\n return (\n <VirtualizerItem\n key={reusableView.key}\n reusableView={reusableView}\n parent={parent} />\n );\n };\n\n return (\n <ListBoxContext.Provider value={state}>\n <FocusScope>\n <Virtualizer\n {...styleProps}\n {...mergeProps(listBoxProps, domProps)}\n ref={ref}\n focusedKey={state.selectionManager.focusedKey}\n sizeToFit=\"height\"\n scrollDirection=\"vertical\"\n className={\n classNames(\n styles,\n 'spectrum-Menu',\n styleProps.className\n )\n }\n layout={layout}\n collection={state.collection}\n renderWrapper={renderWrapper}\n transitionDuration={transitionDuration}\n isLoading={props.isLoading}\n onLoadMore={props.onLoadMore}\n shouldUseVirtualFocus={shouldUseVirtualFocus}\n onScroll={onScroll}>\n {(type, item: Node<T>) => {\n if (type === 'item') {\n return (\n <ListBoxOption\n item={item}\n shouldSelectOnPressUp={shouldSelectOnPressUp}\n shouldFocusOnHover={focusOnPointerEnter}\n shouldUseVirtualFocus={shouldUseVirtualFocus} />\n );\n } else if (type === 'loader') {\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 } else if (type === 'placeholder') {\n let emptyState = props.renderEmptyState ? props.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 }}\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>}) => ReactElement;\nexport {_ListBoxBase as ListBoxBase};\n","const _temp0 = require(\"./ar-AE.json\");\nconst _temp1 = require(\"./bg-BG.json\");\nconst _temp2 = require(\"./cs-CZ.json\");\nconst _temp3 = require(\"./da-DK.json\");\nconst _temp4 = require(\"./de-DE.json\");\nconst _temp5 = require(\"./el-GR.json\");\nconst _temp6 = require(\"./en-US.json\");\nconst _temp7 = require(\"./es-ES.json\");\nconst _temp8 = require(\"./et-EE.json\");\nconst _temp9 = require(\"./fi-FI.json\");\nconst _temp10 = require(\"./fr-FR.json\");\nconst _temp11 = require(\"./he-IL.json\");\nconst _temp12 = require(\"./hr-HR.json\");\nconst _temp13 = require(\"./hu-HU.json\");\nconst _temp14 = require(\"./it-IT.json\");\nconst _temp15 = require(\"./ja-JP.json\");\nconst _temp16 = require(\"./ko-KR.json\");\nconst _temp17 = require(\"./lt-LT.json\");\nconst _temp18 = require(\"./lv-LV.json\");\nconst _temp19 = require(\"./nb-NO.json\");\nconst _temp20 = require(\"./nl-NL.json\");\nconst _temp21 = require(\"./pl-PL.json\");\nconst _temp22 = require(\"./pt-BR.json\");\nconst _temp23 = require(\"./pt-PT.json\");\nconst _temp24 = require(\"./ro-RO.json\");\nconst _temp25 = require(\"./ru-RU.json\");\nconst _temp26 = require(\"./sk-SK.json\");\nconst _temp27 = require(\"./sl-SI.json\");\nconst _temp28 = require(\"./sr-SP.json\");\nconst _temp29 = require(\"./sv-SE.json\");\nconst _temp30 = require(\"./tr-TR.json\");\nconst _temp31 = require(\"./uk-UA.json\");\nconst _temp32 = require(\"./zh-CN.json\");\nconst _temp33 = require(\"./zh-TW.json\");\nmodule.exports = {\n \"ar-AE\": _temp0,\n \"bg-BG\": _temp1,\n \"cs-CZ\": _temp2,\n \"da-DK\": _temp3,\n \"de-DE\": _temp4,\n \"el-GR\": _temp5,\n \"en-US\": _temp6,\n \"es-ES\": _temp7,\n \"et-EE\": _temp8,\n \"fi-FI\": _temp9,\n \"fr-FR\": _temp10,\n \"he-IL\": _temp11,\n \"hr-HR\": _temp12,\n \"hu-HU\": _temp13,\n \"it-IT\": _temp14,\n \"ja-JP\": _temp15,\n \"ko-KR\": _temp16,\n \"lt-LT\": _temp17,\n \"lv-LV\": _temp18,\n \"nb-NO\": _temp19,\n \"nl-NL\": _temp20,\n \"pl-PL\": _temp21,\n \"pt-BR\": _temp22,\n \"pt-PT\": _temp23,\n \"ro-RO\": _temp24,\n \"ru-RU\": _temp25,\n \"sk-SK\": _temp26,\n \"sl-SI\": _temp27,\n \"sr-SP\": _temp28,\n \"sv-SE\": _temp29,\n \"tr-TR\": _temp30,\n \"uk-UA\": _temp31,\n \"zh-CN\": _temp32,\n \"zh-TW\": _temp33\n}","{\n \"loading\": \"جارٍ التحميل...\",\n \"loadingMore\": \"جارٍ تحميل المزيد...\"\n}\n","{\n \"loading\": \"Зареждане...\",\n \"loadingMore\": \"Зареждане на още...\"\n}\n","{\n \"loading\": \"Načítání...\",\n \"loadingMore\": \"Načítání dalších...\"\n}\n","{\n \"loading\": \"Indlæser ...\",\n \"loadingMore\": \"Indlæser flere ...\"\n}\n","{\n \"loading\": \"Laden...\",\n \"loadingMore\": \"Mehr laden ...\"\n}\n","{\n \"loading\": \"Φόρτωση...\",\n \"loadingMore\": \"Φόρτωση περισσότερων...\"\n}\n","{\n \"loading\": \"Loading…\",\n \"loadingMore\": \"Loading more…\"\n}\n","{\n \"loading\": \"Cargando…\",\n \"loadingMore\": \"Cargando más…\"\n}\n","{\n \"loading\": \"Laadimine...\",\n \"loadingMore\": \"Laadi rohkem...\"\n}\n","{\n \"loading\": \"Ladataan…\",\n \"loadingMore\": \"Ladataan lisää…\"\n}\n","{\n \"loading\": \"Chargement...\",\n \"loadingMore\": \"Chargement supplémentaire...\"\n}\n","{\n \"loading\": \"טוען...\",\n \"loadingMore\": \"טוען עוד...\"\n}\n","{\n \"loading\": \"Učitavam...\",\n \"loadingMore\": \"Učitavam još...\"\n}\n","{\n \"loading\": \"Betöltés folyamatban…\",\n \"loadingMore\": \"Továbbiak betöltése folyamatban…\"\n}\n","{\n \"loading\": \"Caricamento...\",\n \"loadingMore\": \"Caricamento altri...\"\n}\n","{\n \"loading\": \"読み込み中...\",\n \"loadingMore\": \"さらに読み込み中...\"\n}\n","{\n \"loading\": \"로드 중\",\n \"loadingMore\": \"추가 로드 중\"\n}\n","{\n \"loading\": \"Įkeliama...\",\n \"loadingMore\": \"Įkeliama daugiau...\"\n}\n","{\n \"loading\": \"Notiek ielāde...\",\n \"loadingMore\": \"Tiek ielādēts vēl...\"\n}\n","{\n \"loading\": \"Laster inn ...\",\n \"loadingMore\": \"Laster inn flere ...\"\n}\n","{\n \"loading\": \"Laden...\",\n \"loadingMore\": \"Meer laden...\"\n}\n","{\n \"loading\": \"Ładowanie...\",\n \"loadingMore\": \"Wczytywanie większej liczby...\"\n}\n","{\n \"loading\": \"Carregando...\",\n \"loadingMore\": \"Carregando mais...\"\n}\n","{\n \"loading\": \"A carregar...\",\n \"loadingMore\": \"A carregar mais...\"\n}\n","{\n \"loading\": \"Se încarcă...\",\n \"loadingMore\": \"Se încarcă mai multe...\"\n}\n","{\n \"loading\": \"Загрузка...\",\n \"loadingMore\": \"Дополнительная загрузка...\"\n}\n","{\n \"loading\": \"Načítava sa...\",\n \"loadingMore\": \"Načítava sa viac...\"\n}\n","{\n \"loading\": \"Nalaganje...\",\n \"loadingMore\": \"Nalaganje več vsebine...\"\n}\n","{\n \"loading\": \"Učitavam...\",\n \"loadingMore\": \"Učitavam još...\"\n}\n","{\n \"loading\": \"Läser in...\",\n \"loadingMore\": \"Läser in mer...\"\n}\n","{\n \"loading\": \"Yükleniyor...\",\n \"loadingMore\": \"Daha fazla yükleniyor...\"\n}\n","{\n \"loading\": \"Завантаження…\",\n \"loadingMore\": \"Завантаження інших об’єктів...\"\n}\n","{\n \"loading\": \"正在加载...\",\n \"loadingMore\": \"正在加载更多...\"\n}\n","{\n \"loading\": \"正在載入\",\n \"loadingMore\": \"正在載入更多…\"\n}\n","/*\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 {ListState} from '@react-stately/list';\nimport React from 'react';\n\nexport const ListBoxContext = React.createContext<ListState<unknown>>(null);\n","/*\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, {useContext} 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';\nimport {useRef} from 'react';\n\ninterface OptionProps<T> {\n item: Node<T>,\n shouldSelectOnPressUp?: boolean,\n shouldFocusOnHover?: boolean,\n shouldUseVirtualFocus?: boolean\n}\n\n/** @private */\nexport function ListBoxOption<T>(props: OptionProps<T>) {\n let {\n item,\n shouldSelectOnPressUp,\n shouldFocusOnHover,\n shouldUseVirtualFocus\n } = props;\n\n let {\n rendered,\n key\n } = item;\n\n let state = useContext(ListBoxContext);\n\n let ref = useRef<HTMLDivElement>();\n let {optionProps, labelProps, descriptionProps, isSelected, isDisabled, isFocused} = useOption(\n {\n 'aria-label': item['aria-label'],\n key,\n shouldSelectOnPressUp,\n shouldFocusOnHover,\n isVirtualized: true,\n shouldUseVirtualFocus\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 <div\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 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 </div>\n </FocusRing>\n );\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n","/*\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 {layoutInfoToStyle, useVirtualizerItem} from '@react-aria/virtualizer';\nimport {ListBoxContext} from './ListBoxContext';\nimport {Node} from '@react-types/shared';\nimport React, {Fragment, ReactNode, useContext, useRef} from 'react';\nimport {ReusableView} from '@react-stately/virtualizer';\nimport styles from '@adobe/spectrum-css-temp/components/menu/vars.css';\nimport {useListBoxSection} from '@react-aria/listbox';\nimport {useLocale} from '@react-aria/i18n';\nimport {useSeparator} from '@react-aria/separator';\n\ninterface ListBoxSectionProps<T> {\n reusableView: ReusableView<Node<T>, unknown>,\n header: ReusableView<Node<T>, unknown>,\n children?: ReactNode\n}\n\n/** @private */\nexport function ListBoxSection<T>(props: ListBoxSectionProps<T>) {\n let {children, reusableView, header} = props;\n let item = reusableView.content;\n let {headingProps, groupProps} = useListBoxSection({\n heading: item.rendered,\n 'aria-label': item['aria-label']\n });\n\n let {separatorProps} = useSeparator({\n elementType: 'li'\n });\n\n let headerRef = useRef();\n useVirtualizerItem({\n reusableView: header,\n ref: headerRef\n });\n\n let {direction} = useLocale();\n let state = useContext(ListBoxContext);\n\n return (\n <Fragment>\n <div role=\"presentation\" ref={headerRef} style={layoutInfoToStyle(header.layoutInfo, direction)}>\n {item.key !== state.collection.getFirstKey() &&\n <div\n {...separatorProps}\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(reusableView.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":"main.js.map"}
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;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BAAgB,KAAK,IAAI;YACzE,IAAI,cAAc,IAAI,EACpB,OAAO,IAAI;YAGb,qBACE,0DAAC;gBACC,uEAAuE;gBACvE,iEAAiE;gBACjE,MAAK;eACJ;QAGP,CAAC;IACH;AAKV;AAEA,wFAAwF;AACxF,2GAA2G;AAC3G,MAAM,0DAAe,CAAA,GAAA,sCAAK,AAAD,EAAE,UAAU,CAAC;;CDtKrC,GAED;;;;AAOA,SAAS,8BAA0B,KAA8B,EAAE,GAA2B,EAAE;IAC9F,IAAI,QAAQ,CAAA,GAAA,oCAAW,EAAE;IACzB,IAAI,SAAS,CAAA,GAAA,yCAAe,EAAE;IAC9B,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IAEvB,qBACE,0DAAC,CAAA,GAAA,yCAAW,AAAD;QACR,GAAG,KAAK;QACT,KAAK;QACL,OAAO;QACP,QAAQ;;AAEd;AAEA,wFAAwF;AACxF,2GAA2G;AAG3G;;CAEC,GACD,MAAM,0DAAW,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC;;AD1BlC","sources":["packages/@react-spectrum/listbox/src/index.ts","packages/@react-spectrum/listbox/src/ListBox.tsx","packages/@react-spectrum/listbox/src/ListBoxBase.tsx","packages/@react-spectrum/listbox/intl/*.js","packages/@react-spectrum/listbox/intl/ar-AE.json","packages/@react-spectrum/listbox/intl/bg-BG.json","packages/@react-spectrum/listbox/intl/cs-CZ.json","packages/@react-spectrum/listbox/intl/da-DK.json","packages/@react-spectrum/listbox/intl/de-DE.json","packages/@react-spectrum/listbox/intl/el-GR.json","packages/@react-spectrum/listbox/intl/en-US.json","packages/@react-spectrum/listbox/intl/es-ES.json","packages/@react-spectrum/listbox/intl/et-EE.json","packages/@react-spectrum/listbox/intl/fi-FI.json","packages/@react-spectrum/listbox/intl/fr-FR.json","packages/@react-spectrum/listbox/intl/he-IL.json","packages/@react-spectrum/listbox/intl/hr-HR.json","packages/@react-spectrum/listbox/intl/hu-HU.json","packages/@react-spectrum/listbox/intl/it-IT.json","packages/@react-spectrum/listbox/intl/ja-JP.json","packages/@react-spectrum/listbox/intl/ko-KR.json","packages/@react-spectrum/listbox/intl/lt-LT.json","packages/@react-spectrum/listbox/intl/lv-LV.json","packages/@react-spectrum/listbox/intl/nb-NO.json","packages/@react-spectrum/listbox/intl/nl-NL.json","packages/@react-spectrum/listbox/intl/pl-PL.json","packages/@react-spectrum/listbox/intl/pt-BR.json","packages/@react-spectrum/listbox/intl/pt-PT.json","packages/@react-spectrum/listbox/intl/ro-RO.json","packages/@react-spectrum/listbox/intl/ru-RU.json","packages/@react-spectrum/listbox/intl/sk-SK.json","packages/@react-spectrum/listbox/intl/sl-SI.json","packages/@react-spectrum/listbox/intl/sr-SP.json","packages/@react-spectrum/listbox/intl/sv-SE.json","packages/@react-spectrum/listbox/intl/tr-TR.json","packages/@react-spectrum/listbox/intl/uk-UA.json","packages/@react-spectrum/listbox/intl/zh-CN.json","packages/@react-spectrum/listbox/intl/zh-TW.json","packages/@react-spectrum/listbox/src/ListBoxContext.ts","packages/@react-spectrum/listbox/src/ListBoxOption.tsx","packages/@adobe/spectrum-css-temp/components/menu/vars.css","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\n/// <reference types=\"css-module-types\" />\n\nexport {ListBox} from './ListBox';\nexport {useListBoxLayout, ListBoxBase} from './ListBoxBase';\nexport {Item, Section} from '@react-stately/collections';\nexport type {SpectrumListBoxProps} from '@react-types/listbox';\n","/*\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\nfunction ListBox<T extends object>(props: SpectrumListBoxProps<T>, ref: DOMRef<HTMLDivElement>) {\n let state = useListState(props);\n let layout = useListBoxLayout(state);\n let domRef = useDOMRef(ref);\n\n return (\n <ListBoxBase\n {...props}\n ref={domRef}\n state={state}\n layout={layout} />\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\n\n\n/**\n * A list of options that can allow selection of one or more.\n */\nconst _ListBox = React.forwardRef(ListBox) as <T>(props: SpectrumListBoxProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;\nexport {_ListBox as ListBox};\n","/*\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, 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 {ListBoxOption} from './ListBoxOption';\nimport {ListBoxSection} from './ListBoxSection';\nimport {ListLayout} from '@react-stately/layout';\nimport {ListState} from '@react-stately/list';\nimport {mergeProps} from '@react-aria/utils';\nimport {ProgressCircle} from '@react-spectrum/progress';\nimport React, {HTMLAttributes, ReactElement, ReactNode, RefObject, useMemo} from 'react';\nimport {ReusableView} from '@react-stately/virtualizer';\nimport styles from '@adobe/spectrum-css-temp/components/menu/vars.css';\nimport {useCollator, 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: ListLayout<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 transitionDuration?: number,\n isLoading?: boolean,\n onLoadMore?: () => void,\n renderEmptyState?: () => ReactNode,\n onScroll?: () => void\n}\n\n/** @private */\nexport function useListBoxLayout<T>(state: ListState<T>): ListLayout<T> {\n let {scale} = useProvider();\n let collator = useCollator({usage: 'search', sensitivity: 'base'});\n let layout = useMemo(() =>\n new ListLayout<T>({\n estimatedRowHeight: scale === 'large' ? 48 : 32,\n estimatedHeadingHeight: scale === 'large' ? 33 : 26,\n padding: scale === 'large' ? 5 : 4, // TODO: get from DNA\n loaderHeight: 40,\n placeholderHeight: scale === 'large' ? 48 : 32,\n collator\n })\n , [collator, scale]);\n\n layout.collection = state.collection;\n layout.disabledKeys = state.disabledKeys;\n return layout;\n}\n\n/** @private */\nfunction ListBoxBase<T>(props: ListBoxBaseProps<T>, ref: RefObject<HTMLDivElement>) {\n let {layout, state, shouldSelectOnPressUp, focusOnPointerEnter, shouldUseVirtualFocus, domProps = {}, transitionDuration = 0, onScroll} = props;\n let {listBoxProps} = useListBox({\n ...props,\n keyboardDelegate: layout,\n isVirtualized: true\n }, state, ref);\n let {styleProps} = useStyleProps(props);\n let stringFormatter = useLocalizedStringFormatter(intlMessages);\n\n // Sync loading state into the layout.\n layout.isLoading = props.isLoading;\n\n // This overrides collection view's renderWrapper to support heirarchy 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>, unknown>;\n let renderWrapper = (parent: View, reusableView: View, children: View[], renderChildren: (views: View[]) => ReactElement[]) => {\n if (reusableView.viewType === 'section') {\n return (\n <ListBoxSection\n key={reusableView.key}\n reusableView={reusableView}\n header={children.find(c => c.viewType === 'header')}>\n {renderChildren(children.filter(c => c.viewType === 'item'))}\n </ListBoxSection>\n );\n }\n\n return (\n <VirtualizerItem\n key={reusableView.key}\n reusableView={reusableView}\n parent={parent} />\n );\n };\n\n return (\n <ListBoxContext.Provider value={state}>\n <FocusScope>\n <Virtualizer\n {...styleProps}\n {...mergeProps(listBoxProps, domProps)}\n ref={ref}\n focusedKey={state.selectionManager.focusedKey}\n sizeToFit=\"height\"\n scrollDirection=\"vertical\"\n className={\n classNames(\n styles,\n 'spectrum-Menu',\n styleProps.className\n )\n }\n layout={layout}\n collection={state.collection}\n renderWrapper={renderWrapper}\n transitionDuration={transitionDuration}\n isLoading={props.isLoading}\n onLoadMore={props.onLoadMore}\n shouldUseVirtualFocus={shouldUseVirtualFocus}\n onScroll={onScroll}>\n {(type, item: Node<T>) => {\n if (type === 'item') {\n return (\n <ListBoxOption\n item={item}\n shouldSelectOnPressUp={shouldSelectOnPressUp}\n shouldFocusOnHover={focusOnPointerEnter}\n shouldUseVirtualFocus={shouldUseVirtualFocus} />\n );\n } else if (type === 'loader') {\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 } else if (type === 'placeholder') {\n let emptyState = props.renderEmptyState ? props.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 }}\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>}) => ReactElement;\nexport {_ListBoxBase as ListBoxBase};\n","const _temp0 = require(\"./ar-AE.json\");\nconst _temp1 = require(\"./bg-BG.json\");\nconst _temp2 = require(\"./cs-CZ.json\");\nconst _temp3 = require(\"./da-DK.json\");\nconst _temp4 = require(\"./de-DE.json\");\nconst _temp5 = require(\"./el-GR.json\");\nconst _temp6 = require(\"./en-US.json\");\nconst _temp7 = require(\"./es-ES.json\");\nconst _temp8 = require(\"./et-EE.json\");\nconst _temp9 = require(\"./fi-FI.json\");\nconst _temp10 = require(\"./fr-FR.json\");\nconst _temp11 = require(\"./he-IL.json\");\nconst _temp12 = require(\"./hr-HR.json\");\nconst _temp13 = require(\"./hu-HU.json\");\nconst _temp14 = require(\"./it-IT.json\");\nconst _temp15 = require(\"./ja-JP.json\");\nconst _temp16 = require(\"./ko-KR.json\");\nconst _temp17 = require(\"./lt-LT.json\");\nconst _temp18 = require(\"./lv-LV.json\");\nconst _temp19 = require(\"./nb-NO.json\");\nconst _temp20 = require(\"./nl-NL.json\");\nconst _temp21 = require(\"./pl-PL.json\");\nconst _temp22 = require(\"./pt-BR.json\");\nconst _temp23 = require(\"./pt-PT.json\");\nconst _temp24 = require(\"./ro-RO.json\");\nconst _temp25 = require(\"./ru-RU.json\");\nconst _temp26 = require(\"./sk-SK.json\");\nconst _temp27 = require(\"./sl-SI.json\");\nconst _temp28 = require(\"./sr-SP.json\");\nconst _temp29 = require(\"./sv-SE.json\");\nconst _temp30 = require(\"./tr-TR.json\");\nconst _temp31 = require(\"./uk-UA.json\");\nconst _temp32 = require(\"./zh-CN.json\");\nconst _temp33 = require(\"./zh-TW.json\");\nmodule.exports = {\n \"ar-AE\": _temp0,\n \"bg-BG\": _temp1,\n \"cs-CZ\": _temp2,\n \"da-DK\": _temp3,\n \"de-DE\": _temp4,\n \"el-GR\": _temp5,\n \"en-US\": _temp6,\n \"es-ES\": _temp7,\n \"et-EE\": _temp8,\n \"fi-FI\": _temp9,\n \"fr-FR\": _temp10,\n \"he-IL\": _temp11,\n \"hr-HR\": _temp12,\n \"hu-HU\": _temp13,\n \"it-IT\": _temp14,\n \"ja-JP\": _temp15,\n \"ko-KR\": _temp16,\n \"lt-LT\": _temp17,\n \"lv-LV\": _temp18,\n \"nb-NO\": _temp19,\n \"nl-NL\": _temp20,\n \"pl-PL\": _temp21,\n \"pt-BR\": _temp22,\n \"pt-PT\": _temp23,\n \"ro-RO\": _temp24,\n \"ru-RU\": _temp25,\n \"sk-SK\": _temp26,\n \"sl-SI\": _temp27,\n \"sr-SP\": _temp28,\n \"sv-SE\": _temp29,\n \"tr-TR\": _temp30,\n \"uk-UA\": _temp31,\n \"zh-CN\": _temp32,\n \"zh-TW\": _temp33\n}","{\n \"loading\": \"جارٍ التحميل...\",\n \"loadingMore\": \"جارٍ تحميل المزيد...\"\n}\n","{\n \"loading\": \"Зареждане...\",\n \"loadingMore\": \"Зареждане на още...\"\n}\n","{\n \"loading\": \"Načítání...\",\n \"loadingMore\": \"Načítání dalších...\"\n}\n","{\n \"loading\": \"Indlæser ...\",\n \"loadingMore\": \"Indlæser flere ...\"\n}\n","{\n \"loading\": \"Laden...\",\n \"loadingMore\": \"Mehr laden ...\"\n}\n","{\n \"loading\": \"Φόρτωση...\",\n \"loadingMore\": \"Φόρτωση περισσότερων...\"\n}\n","{\n \"loading\": \"Loading…\",\n \"loadingMore\": \"Loading more…\"\n}\n","{\n \"loading\": \"Cargando…\",\n \"loadingMore\": \"Cargando más…\"\n}\n","{\n \"loading\": \"Laadimine...\",\n \"loadingMore\": \"Laadi rohkem...\"\n}\n","{\n \"loading\": \"Ladataan…\",\n \"loadingMore\": \"Ladataan lisää…\"\n}\n","{\n \"loading\": \"Chargement...\",\n \"loadingMore\": \"Chargement supplémentaire...\"\n}\n","{\n \"loading\": \"טוען...\",\n \"loadingMore\": \"טוען עוד...\"\n}\n","{\n \"loading\": \"Učitavam...\",\n \"loadingMore\": \"Učitavam još...\"\n}\n","{\n \"loading\": \"Betöltés folyamatban…\",\n \"loadingMore\": \"Továbbiak betöltése folyamatban…\"\n}\n","{\n \"loading\": \"Caricamento...\",\n \"loadingMore\": \"Caricamento altri...\"\n}\n","{\n \"loading\": \"読み込み中...\",\n \"loadingMore\": \"さらに読み込み中...\"\n}\n","{\n \"loading\": \"로드 중\",\n \"loadingMore\": \"추가 로드 중\"\n}\n","{\n \"loading\": \"Įkeliama...\",\n \"loadingMore\": \"Įkeliama daugiau...\"\n}\n","{\n \"loading\": \"Notiek ielāde...\",\n \"loadingMore\": \"Tiek ielādēts vēl...\"\n}\n","{\n \"loading\": \"Laster inn ...\",\n \"loadingMore\": \"Laster inn flere ...\"\n}\n","{\n \"loading\": \"Laden...\",\n \"loadingMore\": \"Meer laden...\"\n}\n","{\n \"loading\": \"Ładowanie...\",\n \"loadingMore\": \"Wczytywanie większej liczby...\"\n}\n","{\n \"loading\": \"Carregando...\",\n \"loadingMore\": \"Carregando mais...\"\n}\n","{\n \"loading\": \"A carregar...\",\n \"loadingMore\": \"A carregar mais...\"\n}\n","{\n \"loading\": \"Se încarcă...\",\n \"loadingMore\": \"Se încarcă mai multe...\"\n}\n","{\n \"loading\": \"Загрузка...\",\n \"loadingMore\": \"Дополнительная загрузка...\"\n}\n","{\n \"loading\": \"Načítava sa...\",\n \"loadingMore\": \"Načítava sa viac...\"\n}\n","{\n \"loading\": \"Nalaganje...\",\n \"loadingMore\": \"Nalaganje več vsebine...\"\n}\n","{\n \"loading\": \"Učitavam...\",\n \"loadingMore\": \"Učitavam još...\"\n}\n","{\n \"loading\": \"Läser in...\",\n \"loadingMore\": \"Läser in mer...\"\n}\n","{\n \"loading\": \"Yükleniyor...\",\n \"loadingMore\": \"Daha fazla yükleniyor...\"\n}\n","{\n \"loading\": \"Завантаження…\",\n \"loadingMore\": \"Завантаження інших об’єктів...\"\n}\n","{\n \"loading\": \"正在加载...\",\n \"loadingMore\": \"正在加载更多...\"\n}\n","{\n \"loading\": \"正在載入\",\n \"loadingMore\": \"正在載入更多…\"\n}\n","/*\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 {ListState} from '@react-stately/list';\nimport React from 'react';\n\nexport const ListBoxContext = React.createContext<ListState<unknown>>(null);\n","/*\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, {useContext} 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';\nimport {useRef} from 'react';\n\ninterface OptionProps<T> {\n item: Node<T>,\n shouldSelectOnPressUp?: boolean,\n shouldFocusOnHover?: boolean,\n shouldUseVirtualFocus?: boolean\n}\n\n/** @private */\nexport function ListBoxOption<T>(props: OptionProps<T>) {\n let {\n item,\n shouldSelectOnPressUp,\n shouldFocusOnHover,\n shouldUseVirtualFocus\n } = props;\n\n let {\n rendered,\n key\n } = item;\n\n let state = useContext(ListBoxContext);\n\n let ref = useRef<HTMLDivElement>();\n let {optionProps, labelProps, descriptionProps, isSelected, isDisabled, isFocused} = useOption(\n {\n 'aria-label': item['aria-label'],\n key,\n shouldSelectOnPressUp,\n shouldFocusOnHover,\n isVirtualized: true,\n shouldUseVirtualFocus\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 <div\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 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 </div>\n </FocusRing>\n );\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n","/*\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 {layoutInfoToStyle, useVirtualizerItem} from '@react-aria/virtualizer';\nimport {ListBoxContext} from './ListBoxContext';\nimport {Node} from '@react-types/shared';\nimport React, {Fragment, ReactNode, useContext, useRef} from 'react';\nimport {ReusableView} from '@react-stately/virtualizer';\nimport styles from '@adobe/spectrum-css-temp/components/menu/vars.css';\nimport {useListBoxSection} from '@react-aria/listbox';\nimport {useLocale} from '@react-aria/i18n';\nimport {useSeparator} from '@react-aria/separator';\n\ninterface ListBoxSectionProps<T> {\n reusableView: ReusableView<Node<T>, unknown>,\n header: ReusableView<Node<T>, unknown>,\n children?: ReactNode\n}\n\n/** @private */\nexport function ListBoxSection<T>(props: ListBoxSectionProps<T>) {\n let {children, reusableView, header} = props;\n let item = reusableView.content;\n let {headingProps, groupProps} = useListBoxSection({\n heading: item.rendered,\n 'aria-label': item['aria-label']\n });\n\n let {separatorProps} = useSeparator({\n elementType: 'li'\n });\n\n let headerRef = useRef();\n useVirtualizerItem({\n reusableView: header,\n ref: headerRef\n });\n\n let {direction} = useLocale();\n let state = useContext(ListBoxContext);\n\n return (\n <Fragment>\n <div role=\"presentation\" ref={headerRef} style={layoutInfoToStyle(header.layoutInfo, direction)}>\n {item.key !== state.collection.getFirstKey() &&\n <div\n {...separatorProps}\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(reusableView.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":"main.js.map"}
|
package/dist/module.mjs
CHANGED
|
@@ -23,7 +23,38 @@ function $parcel$interopDefault(a) {
|
|
|
23
23
|
function $parcel$export(e, n, v, s) {
|
|
24
24
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
25
25
|
}
|
|
26
|
-
|
|
26
|
+
/*
|
|
27
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
28
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
29
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
30
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
31
|
+
*
|
|
32
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
33
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
34
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
35
|
+
* governing permissions and limitations under the License.
|
|
36
|
+
*/ /// <reference types="css-module-types" />
|
|
37
|
+
/*
|
|
38
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
39
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
40
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
41
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
42
|
+
*
|
|
43
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
44
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
45
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
46
|
+
* governing permissions and limitations under the License.
|
|
47
|
+
*/ /*
|
|
48
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
49
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
50
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
51
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
52
|
+
*
|
|
53
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
54
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
55
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
56
|
+
* governing permissions and limitations under the License.
|
|
57
|
+
*/
|
|
27
58
|
|
|
28
59
|
|
|
29
60
|
var $07d5971c39cb246a$exports = {};
|
|
@@ -303,11 +334,31 @@ $07d5971c39cb246a$exports = {
|
|
|
303
334
|
};
|
|
304
335
|
|
|
305
336
|
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
337
|
+
/*
|
|
338
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
339
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
340
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
341
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
342
|
+
*
|
|
343
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
344
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
345
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
346
|
+
* governing permissions and limitations under the License.
|
|
347
|
+
*/
|
|
348
|
+
const $0c6f792811e33483$export$7ff8f37d2d81a48d = (0, $j8tbs$react).createContext(null);
|
|
309
349
|
|
|
310
350
|
|
|
351
|
+
/*
|
|
352
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
353
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
354
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
355
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
356
|
+
*
|
|
357
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
358
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
359
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
360
|
+
* governing permissions and limitations under the License.
|
|
361
|
+
*/
|
|
311
362
|
|
|
312
363
|
|
|
313
364
|
|
|
@@ -397,63 +448,72 @@ $286d1cb34bb7dc84$export$d35bc1e505d1ebbf = "is-disabled_7ea47c";
|
|
|
397
448
|
function $86983ea1fa3f7312$export$feb3b6b552c14a12(props) {
|
|
398
449
|
let { item: item , shouldSelectOnPressUp: shouldSelectOnPressUp , shouldFocusOnHover: shouldFocusOnHover , shouldUseVirtualFocus: shouldUseVirtualFocus } = props;
|
|
399
450
|
let { rendered: rendered , key: key } = item;
|
|
400
|
-
let state = $j8tbs$useContext($0c6f792811e33483$export$7ff8f37d2d81a48d);
|
|
401
|
-
let ref = $j8tbs$useRef();
|
|
402
|
-
let { optionProps: optionProps , labelProps: labelProps , descriptionProps: descriptionProps , isSelected: isSelected , isDisabled: isDisabled , isFocused: isFocused } = $j8tbs$useOption({
|
|
403
|
-
|
|
451
|
+
let state = (0, $j8tbs$useContext)((0, $0c6f792811e33483$export$7ff8f37d2d81a48d));
|
|
452
|
+
let ref = (0, $j8tbs$useRef)();
|
|
453
|
+
let { optionProps: optionProps , labelProps: labelProps , descriptionProps: descriptionProps , isSelected: isSelected , isDisabled: isDisabled , isFocused: isFocused } = (0, $j8tbs$useOption)({
|
|
454
|
+
"aria-label": item["aria-label"],
|
|
404
455
|
key: key,
|
|
405
456
|
shouldSelectOnPressUp: shouldSelectOnPressUp,
|
|
406
457
|
shouldFocusOnHover: shouldFocusOnHover,
|
|
407
458
|
isVirtualized: true,
|
|
408
459
|
shouldUseVirtualFocus: shouldUseVirtualFocus
|
|
409
460
|
}, state, ref);
|
|
410
|
-
let { hoverProps: hoverProps , isHovered: isHovered } = $j8tbs$useHover({
|
|
461
|
+
let { hoverProps: hoverProps , isHovered: isHovered } = (0, $j8tbs$useHover)({
|
|
411
462
|
...props,
|
|
412
463
|
isDisabled: isDisabled
|
|
413
464
|
});
|
|
414
|
-
let contents = typeof rendered ===
|
|
415
|
-
let isKeyboardModality = $j8tbs$isFocusVisible();
|
|
416
|
-
return
|
|
417
|
-
focusRingClass: $j8tbs$classNames((/*@__PURE__*/$parcel$interopDefault($286d1cb34bb7dc84$exports)),
|
|
418
|
-
}, /*#__PURE__*/ $j8tbs$react.createElement("div", {
|
|
419
|
-
|
|
420
|
-
} : hoverProps),
|
|
465
|
+
let contents = typeof rendered === "string" ? /*#__PURE__*/ (0, $j8tbs$react).createElement((0, $j8tbs$Text), null, rendered) : rendered;
|
|
466
|
+
let isKeyboardModality = (0, $j8tbs$isFocusVisible)();
|
|
467
|
+
return /*#__PURE__*/ (0, $j8tbs$react).createElement((0, $j8tbs$FocusRing), {
|
|
468
|
+
focusRingClass: (0, $j8tbs$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($286d1cb34bb7dc84$exports))), "focus-ring")
|
|
469
|
+
}, /*#__PURE__*/ (0, $j8tbs$react).createElement("div", {
|
|
470
|
+
...(0, $j8tbs$mergeProps)(optionProps, shouldFocusOnHover ? {} : hoverProps),
|
|
421
471
|
ref: ref,
|
|
422
|
-
className: $j8tbs$classNames((/*@__PURE__*/$parcel$interopDefault($286d1cb34bb7dc84$exports)),
|
|
472
|
+
className: (0, $j8tbs$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($286d1cb34bb7dc84$exports))), "spectrum-Menu-item", {
|
|
423
473
|
// If using virtual focus, apply focused styles to the item when the user is interacting with keyboard modality
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
474
|
+
"is-focused": shouldUseVirtualFocus && isFocused && isKeyboardModality,
|
|
475
|
+
"is-disabled": isDisabled,
|
|
476
|
+
"is-selected": isSelected,
|
|
477
|
+
"is-selectable": state.selectionManager.selectionMode !== "none",
|
|
428
478
|
// When shouldFocusOnHover is false, apply hover styles both when hovered with the mouse.
|
|
429
479
|
// Otherwise, apply hover styles when focused using non-keyboard modality.
|
|
430
|
-
|
|
480
|
+
"is-hovered": isHovered && !shouldFocusOnHover || isFocused && !isKeyboardModality
|
|
431
481
|
})
|
|
432
|
-
}, /*#__PURE__*/ $j8tbs$react.createElement($j8tbs$Grid, {
|
|
433
|
-
UNSAFE_className: $j8tbs$classNames((/*@__PURE__*/$parcel$interopDefault($286d1cb34bb7dc84$exports)),
|
|
434
|
-
}, /*#__PURE__*/ $j8tbs$react.createElement($j8tbs$ClearSlots, null, /*#__PURE__*/ $j8tbs$react.createElement($j8tbs$SlotProvider, {
|
|
482
|
+
}, /*#__PURE__*/ (0, $j8tbs$react).createElement((0, $j8tbs$Grid), {
|
|
483
|
+
UNSAFE_className: (0, $j8tbs$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($286d1cb34bb7dc84$exports))), "spectrum-Menu-itemGrid")
|
|
484
|
+
}, /*#__PURE__*/ (0, $j8tbs$react).createElement((0, $j8tbs$ClearSlots), null, /*#__PURE__*/ (0, $j8tbs$react).createElement((0, $j8tbs$SlotProvider), {
|
|
435
485
|
slots: {
|
|
436
486
|
text: {
|
|
437
|
-
UNSAFE_className: (/*@__PURE__*/$parcel$interopDefault($286d1cb34bb7dc84$exports))[
|
|
487
|
+
UNSAFE_className: (0, (/*@__PURE__*/$parcel$interopDefault($286d1cb34bb7dc84$exports)))["spectrum-Menu-itemLabel"],
|
|
438
488
|
...labelProps
|
|
439
489
|
},
|
|
440
490
|
icon: {
|
|
441
|
-
size:
|
|
442
|
-
UNSAFE_className: (/*@__PURE__*/$parcel$interopDefault($286d1cb34bb7dc84$exports))[
|
|
491
|
+
size: "S",
|
|
492
|
+
UNSAFE_className: (0, (/*@__PURE__*/$parcel$interopDefault($286d1cb34bb7dc84$exports)))["spectrum-Menu-icon"]
|
|
443
493
|
},
|
|
444
494
|
description: {
|
|
445
|
-
UNSAFE_className: (/*@__PURE__*/$parcel$interopDefault($286d1cb34bb7dc84$exports))[
|
|
495
|
+
UNSAFE_className: (0, (/*@__PURE__*/$parcel$interopDefault($286d1cb34bb7dc84$exports)))["spectrum-Menu-description"],
|
|
446
496
|
...descriptionProps
|
|
447
497
|
}
|
|
448
498
|
}
|
|
449
|
-
}, contents, isSelected && /*#__PURE__*/ $j8tbs$react.createElement($j8tbs$spectrumiconsuiCheckmarkMedium, {
|
|
499
|
+
}, contents, isSelected && /*#__PURE__*/ (0, $j8tbs$react).createElement((0, $j8tbs$spectrumiconsuiCheckmarkMedium), {
|
|
450
500
|
slot: "checkmark",
|
|
451
|
-
UNSAFE_className: $j8tbs$classNames((/*@__PURE__*/$parcel$interopDefault($286d1cb34bb7dc84$exports)),
|
|
452
|
-
}))))))
|
|
501
|
+
UNSAFE_className: (0, $j8tbs$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($286d1cb34bb7dc84$exports))), "spectrum-Menu-checkmark")
|
|
502
|
+
}))))));
|
|
453
503
|
}
|
|
454
504
|
|
|
455
505
|
|
|
456
|
-
|
|
506
|
+
/*
|
|
507
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
508
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
509
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
510
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
511
|
+
*
|
|
512
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
513
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
514
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
515
|
+
* governing permissions and limitations under the License.
|
|
516
|
+
*/
|
|
457
517
|
|
|
458
518
|
|
|
459
519
|
|
|
@@ -464,35 +524,35 @@ function $86983ea1fa3f7312$export$feb3b6b552c14a12(props) {
|
|
|
464
524
|
function $92d678ed88836094$export$dca12b0bb56e4fc(props) {
|
|
465
525
|
let { children: children , reusableView: reusableView , header: header } = props;
|
|
466
526
|
let item = reusableView.content;
|
|
467
|
-
let { headingProps: headingProps , groupProps: groupProps } = $j8tbs$useListBoxSection({
|
|
527
|
+
let { headingProps: headingProps , groupProps: groupProps } = (0, $j8tbs$useListBoxSection)({
|
|
468
528
|
heading: item.rendered,
|
|
469
|
-
|
|
529
|
+
"aria-label": item["aria-label"]
|
|
470
530
|
});
|
|
471
|
-
let { separatorProps: separatorProps } = $j8tbs$useSeparator({
|
|
472
|
-
elementType:
|
|
531
|
+
let { separatorProps: separatorProps } = (0, $j8tbs$useSeparator)({
|
|
532
|
+
elementType: "li"
|
|
473
533
|
});
|
|
474
|
-
let headerRef = $j8tbs$useRef();
|
|
475
|
-
$j8tbs$useVirtualizerItem({
|
|
534
|
+
let headerRef = (0, $j8tbs$useRef)();
|
|
535
|
+
(0, $j8tbs$useVirtualizerItem)({
|
|
476
536
|
reusableView: header,
|
|
477
537
|
ref: headerRef
|
|
478
538
|
});
|
|
479
|
-
let { direction: direction } = $j8tbs$useLocale();
|
|
480
|
-
let state = $j8tbs$useContext($0c6f792811e33483$export$7ff8f37d2d81a48d);
|
|
481
|
-
return
|
|
539
|
+
let { direction: direction } = (0, $j8tbs$useLocale)();
|
|
540
|
+
let state = (0, $j8tbs$useContext)((0, $0c6f792811e33483$export$7ff8f37d2d81a48d));
|
|
541
|
+
return /*#__PURE__*/ (0, $j8tbs$react).createElement((0, $j8tbs$Fragment), null, /*#__PURE__*/ (0, $j8tbs$react).createElement("div", {
|
|
482
542
|
role: "presentation",
|
|
483
543
|
ref: headerRef,
|
|
484
|
-
style: $j8tbs$layoutInfoToStyle(header.layoutInfo, direction)
|
|
485
|
-
}, item.key !== state.collection.getFirstKey() && /*#__PURE__*/ $j8tbs$react.createElement("div", {
|
|
544
|
+
style: (0, $j8tbs$layoutInfoToStyle)(header.layoutInfo, direction)
|
|
545
|
+
}, item.key !== state.collection.getFirstKey() && /*#__PURE__*/ (0, $j8tbs$react).createElement("div", {
|
|
486
546
|
...separatorProps,
|
|
487
|
-
className: $j8tbs$classNames((/*@__PURE__*/$parcel$interopDefault($286d1cb34bb7dc84$exports)),
|
|
488
|
-
}), item.rendered && /*#__PURE__*/ $j8tbs$react.createElement("div", {
|
|
547
|
+
className: (0, $j8tbs$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($286d1cb34bb7dc84$exports))), "spectrum-Menu-divider")
|
|
548
|
+
}), item.rendered && /*#__PURE__*/ (0, $j8tbs$react).createElement("div", {
|
|
489
549
|
...headingProps,
|
|
490
|
-
className: $j8tbs$classNames((/*@__PURE__*/$parcel$interopDefault($286d1cb34bb7dc84$exports)),
|
|
491
|
-
}, item.rendered)), /*#__PURE__*/ $j8tbs$react.createElement("div", {
|
|
550
|
+
className: (0, $j8tbs$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($286d1cb34bb7dc84$exports))), "spectrum-Menu-sectionHeading")
|
|
551
|
+
}, item.rendered)), /*#__PURE__*/ (0, $j8tbs$react).createElement("div", {
|
|
492
552
|
...groupProps,
|
|
493
|
-
style: $j8tbs$layoutInfoToStyle(reusableView.layoutInfo, direction),
|
|
494
|
-
className: $j8tbs$classNames((/*@__PURE__*/$parcel$interopDefault($286d1cb34bb7dc84$exports)),
|
|
495
|
-
}, children))
|
|
553
|
+
style: (0, $j8tbs$layoutInfoToStyle)(reusableView.layoutInfo, direction),
|
|
554
|
+
className: (0, $j8tbs$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($286d1cb34bb7dc84$exports))), "spectrum-Menu")
|
|
555
|
+
}, children));
|
|
496
556
|
}
|
|
497
557
|
|
|
498
558
|
|
|
@@ -505,20 +565,19 @@ function $92d678ed88836094$export$dca12b0bb56e4fc(props) {
|
|
|
505
565
|
|
|
506
566
|
|
|
507
567
|
function $3247d4a89e6094e9$export$25768ea656ae32a7(state) {
|
|
508
|
-
let { scale: scale } = $j8tbs$useProvider();
|
|
509
|
-
let collator = $j8tbs$useCollator({
|
|
510
|
-
usage:
|
|
511
|
-
sensitivity:
|
|
568
|
+
let { scale: scale } = (0, $j8tbs$useProvider)();
|
|
569
|
+
let collator = (0, $j8tbs$useCollator)({
|
|
570
|
+
usage: "search",
|
|
571
|
+
sensitivity: "base"
|
|
512
572
|
});
|
|
513
|
-
let layout = $j8tbs$useMemo(()=>new $j8tbs$ListLayout({
|
|
514
|
-
estimatedRowHeight: scale ===
|
|
515
|
-
estimatedHeadingHeight: scale ===
|
|
516
|
-
padding: scale ===
|
|
573
|
+
let layout = (0, $j8tbs$useMemo)(()=>new (0, $j8tbs$ListLayout)({
|
|
574
|
+
estimatedRowHeight: scale === "large" ? 48 : 32,
|
|
575
|
+
estimatedHeadingHeight: scale === "large" ? 33 : 26,
|
|
576
|
+
padding: scale === "large" ? 5 : 4,
|
|
517
577
|
loaderHeight: 40,
|
|
518
|
-
placeholderHeight: scale ===
|
|
578
|
+
placeholderHeight: scale === "large" ? 48 : 32,
|
|
519
579
|
collator: collator
|
|
520
|
-
})
|
|
521
|
-
, [
|
|
580
|
+
}), [
|
|
522
581
|
collator,
|
|
523
582
|
scale
|
|
524
583
|
]);
|
|
@@ -527,41 +586,38 @@ function $3247d4a89e6094e9$export$25768ea656ae32a7(state) {
|
|
|
527
586
|
return layout;
|
|
528
587
|
}
|
|
529
588
|
/** @private */ function $3247d4a89e6094e9$var$ListBoxBase(props, ref) {
|
|
530
|
-
let { layout: layout , state: state , shouldSelectOnPressUp: shouldSelectOnPressUp , focusOnPointerEnter: focusOnPointerEnter , shouldUseVirtualFocus: shouldUseVirtualFocus , domProps: domProps = {
|
|
531
|
-
|
|
532
|
-
let { listBoxProps: listBoxProps } = $j8tbs$useListBox({
|
|
589
|
+
let { layout: layout , state: state , shouldSelectOnPressUp: shouldSelectOnPressUp , focusOnPointerEnter: focusOnPointerEnter , shouldUseVirtualFocus: shouldUseVirtualFocus , domProps: domProps = {} , transitionDuration: transitionDuration = 0 , onScroll: onScroll } = props;
|
|
590
|
+
let { listBoxProps: listBoxProps } = (0, $j8tbs$useListBox)({
|
|
533
591
|
...props,
|
|
534
592
|
keyboardDelegate: layout,
|
|
535
593
|
isVirtualized: true
|
|
536
594
|
}, state, ref);
|
|
537
|
-
let { styleProps: styleProps } = $j8tbs$useStyleProps(props);
|
|
538
|
-
let stringFormatter = $j8tbs$useLocalizedStringFormatter((/*@__PURE__*/$parcel$interopDefault($07d5971c39cb246a$exports)));
|
|
595
|
+
let { styleProps: styleProps } = (0, $j8tbs$useStyleProps)(props);
|
|
596
|
+
let stringFormatter = (0, $j8tbs$useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($07d5971c39cb246a$exports))));
|
|
539
597
|
// Sync loading state into the layout.
|
|
540
598
|
layout.isLoading = props.isLoading;
|
|
541
599
|
let renderWrapper = (parent, reusableView, children, renderChildren)=>{
|
|
542
|
-
if (reusableView.viewType ===
|
|
600
|
+
if (reusableView.viewType === "section") return /*#__PURE__*/ (0, $j8tbs$react).createElement((0, $92d678ed88836094$export$dca12b0bb56e4fc), {
|
|
543
601
|
key: reusableView.key,
|
|
544
602
|
reusableView: reusableView,
|
|
545
|
-
header: children.find((c)=>c.viewType ===
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
))));
|
|
549
|
-
return(/*#__PURE__*/ $j8tbs$react.createElement($j8tbs$VirtualizerItem, {
|
|
603
|
+
header: children.find((c)=>c.viewType === "header")
|
|
604
|
+
}, renderChildren(children.filter((c)=>c.viewType === "item")));
|
|
605
|
+
return /*#__PURE__*/ (0, $j8tbs$react).createElement((0, $j8tbs$VirtualizerItem), {
|
|
550
606
|
key: reusableView.key,
|
|
551
607
|
reusableView: reusableView,
|
|
552
608
|
parent: parent
|
|
553
|
-
})
|
|
609
|
+
});
|
|
554
610
|
};
|
|
555
|
-
return
|
|
611
|
+
return /*#__PURE__*/ (0, $j8tbs$react).createElement((0, $0c6f792811e33483$export$7ff8f37d2d81a48d).Provider, {
|
|
556
612
|
value: state
|
|
557
|
-
}, /*#__PURE__*/ $j8tbs$react.createElement($j8tbs$FocusScope, null, /*#__PURE__*/ $j8tbs$react.createElement($j8tbs$Virtualizer, {
|
|
613
|
+
}, /*#__PURE__*/ (0, $j8tbs$react).createElement((0, $j8tbs$FocusScope), null, /*#__PURE__*/ (0, $j8tbs$react).createElement((0, $j8tbs$Virtualizer), {
|
|
558
614
|
...styleProps,
|
|
559
|
-
|
|
615
|
+
...(0, $j8tbs$mergeProps)(listBoxProps, domProps),
|
|
560
616
|
ref: ref,
|
|
561
617
|
focusedKey: state.selectionManager.focusedKey,
|
|
562
618
|
sizeToFit: "height",
|
|
563
619
|
scrollDirection: "vertical",
|
|
564
|
-
className: $j8tbs$classNames((/*@__PURE__*/$parcel$interopDefault($286d1cb34bb7dc84$exports)),
|
|
620
|
+
className: (0, $j8tbs$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($286d1cb34bb7dc84$exports))), "spectrum-Menu", styleProps.className),
|
|
565
621
|
layout: layout,
|
|
566
622
|
collection: state.collection,
|
|
567
623
|
renderWrapper: renderWrapper,
|
|
@@ -571,63 +627,63 @@ function $3247d4a89e6094e9$export$25768ea656ae32a7(state) {
|
|
|
571
627
|
shouldUseVirtualFocus: shouldUseVirtualFocus,
|
|
572
628
|
onScroll: onScroll
|
|
573
629
|
}, (type, item)=>{
|
|
574
|
-
if (type ===
|
|
630
|
+
if (type === "item") return /*#__PURE__*/ (0, $j8tbs$react).createElement((0, $86983ea1fa3f7312$export$feb3b6b552c14a12), {
|
|
575
631
|
item: item,
|
|
576
632
|
shouldSelectOnPressUp: shouldSelectOnPressUp,
|
|
577
633
|
shouldFocusOnHover: focusOnPointerEnter,
|
|
578
634
|
shouldUseVirtualFocus: shouldUseVirtualFocus
|
|
579
|
-
})
|
|
580
|
-
else if (type ===
|
|
635
|
+
});
|
|
636
|
+
else if (type === "loader") return(// aria-selected isn't needed here since this option is not selectable.
|
|
581
637
|
// eslint-disable-next-line jsx-a11y/role-has-required-aria-props
|
|
582
|
-
/*#__PURE__*/ $j8tbs$react.createElement("div", {
|
|
638
|
+
/*#__PURE__*/ (0, $j8tbs$react).createElement("div", {
|
|
583
639
|
role: "option",
|
|
584
640
|
style: {
|
|
585
|
-
display:
|
|
586
|
-
alignItems:
|
|
587
|
-
justifyContent:
|
|
588
|
-
height:
|
|
641
|
+
display: "flex",
|
|
642
|
+
alignItems: "center",
|
|
643
|
+
justifyContent: "center",
|
|
644
|
+
height: "100%"
|
|
589
645
|
}
|
|
590
|
-
}, /*#__PURE__*/ $j8tbs$react.createElement($j8tbs$ProgressCircle, {
|
|
646
|
+
}, /*#__PURE__*/ (0, $j8tbs$react).createElement((0, $j8tbs$ProgressCircle), {
|
|
591
647
|
isIndeterminate: true,
|
|
592
648
|
size: "S",
|
|
593
|
-
"aria-label": state.collection.size > 0 ? stringFormatter.format(
|
|
594
|
-
UNSAFE_className: $j8tbs$classNames((/*@__PURE__*/$parcel$interopDefault($286d1cb34bb7dc84$exports)),
|
|
649
|
+
"aria-label": state.collection.size > 0 ? stringFormatter.format("loadingMore") : stringFormatter.format("loading"),
|
|
650
|
+
UNSAFE_className: (0, $j8tbs$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($286d1cb34bb7dc84$exports))), "spectrum-Dropdown-progressCircle")
|
|
595
651
|
})));
|
|
596
|
-
else if (type ===
|
|
652
|
+
else if (type === "placeholder") {
|
|
597
653
|
let emptyState = props.renderEmptyState ? props.renderEmptyState() : null;
|
|
598
654
|
if (emptyState == null) return null;
|
|
599
|
-
return
|
|
655
|
+
return /*#__PURE__*/ (0, $j8tbs$react).createElement("div", {
|
|
600
656
|
// aria-selected isn't needed here since this option is not selectable.
|
|
601
657
|
// eslint-disable-next-line jsx-a11y/role-has-required-aria-props
|
|
602
658
|
role: "option"
|
|
603
|
-
}, emptyState)
|
|
659
|
+
}, emptyState);
|
|
604
660
|
}
|
|
605
|
-
})))
|
|
661
|
+
})));
|
|
606
662
|
}
|
|
607
663
|
// forwardRef doesn't support generic parameters, so cast the result to the correct type
|
|
608
664
|
// https://stackoverflow.com/questions/58469229/react-with-typescript-generics-while-using-react-forwardref
|
|
609
|
-
const $3247d4a89e6094e9$export$1afdcf349979fb7e = /*#__PURE__*/ $j8tbs$react.forwardRef($3247d4a89e6094e9$var$ListBoxBase);
|
|
665
|
+
const $3247d4a89e6094e9$export$1afdcf349979fb7e = /*#__PURE__*/ (0, $j8tbs$react).forwardRef($3247d4a89e6094e9$var$ListBoxBase);
|
|
610
666
|
|
|
611
667
|
|
|
612
668
|
|
|
613
669
|
|
|
614
670
|
|
|
615
671
|
function $3136257018b1a220$var$ListBox(props, ref) {
|
|
616
|
-
let state = $j8tbs$useListState(props);
|
|
617
|
-
let layout = $3247d4a89e6094e9$export$25768ea656ae32a7(state);
|
|
618
|
-
let domRef = $j8tbs$useDOMRef(ref);
|
|
619
|
-
return
|
|
672
|
+
let state = (0, $j8tbs$useListState)(props);
|
|
673
|
+
let layout = (0, $3247d4a89e6094e9$export$25768ea656ae32a7)(state);
|
|
674
|
+
let domRef = (0, $j8tbs$useDOMRef)(ref);
|
|
675
|
+
return /*#__PURE__*/ (0, $j8tbs$react).createElement((0, $3247d4a89e6094e9$export$1afdcf349979fb7e), {
|
|
620
676
|
...props,
|
|
621
677
|
ref: domRef,
|
|
622
678
|
state: state,
|
|
623
679
|
layout: layout
|
|
624
|
-
})
|
|
680
|
+
});
|
|
625
681
|
}
|
|
626
682
|
// forwardRef doesn't support generic parameters, so cast the result to the correct type
|
|
627
683
|
// https://stackoverflow.com/questions/58469229/react-with-typescript-generics-while-using-react-forwardref
|
|
628
684
|
/**
|
|
629
685
|
* A list of options that can allow selection of one or more.
|
|
630
|
-
*/ const $3136257018b1a220$export$41f133550aa26f48 = /*#__PURE__*/ $j8tbs$react.forwardRef($3136257018b1a220$var$ListBox);
|
|
686
|
+
*/ const $3136257018b1a220$export$41f133550aa26f48 = /*#__PURE__*/ (0, $j8tbs$react).forwardRef($3136257018b1a220$var$ListBox);
|
|
631
687
|
|
|
632
688
|
|
|
633
689
|
|