@react-spectrum/card 3.0.0-nightly.3606 → 3.0.0-nightly.3608
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.
|
@@ -1608,4 +1608,4 @@ let $d2d1c099b89e366a$export$60332b2344f7fe41 = $d2d1c099b89e366a$var$Card;
|
|
|
1608
1608
|
|
|
1609
1609
|
|
|
1610
1610
|
export {$81a52da995c19652$export$7e52c821f7b6f422 as CardView, $c0ba81539c443916$export$8e52095834484b61 as GalleryLayout, $ed42fd44b9b9b664$export$7d2b12578154a735 as GridLayout, $03278f8d0f6860bb$export$e9f7cda058ba8df8 as WaterfallLayout, $d2d1c099b89e366a$export$60332b2344f7fe41 as Card};
|
|
1611
|
-
//# sourceMappingURL=module.
|
|
1611
|
+
//# sourceMappingURL=module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C;ACZ1C;;;;;;;;;;ACAA;;;;;;;;;;CAUC,GAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACZA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AA1BA,2CAAkC;AAClC,4CAA0C;AAC1C,4CAAkD;AAClD,4CAA2C;AAC3C,4CAAgC;AAChC,4CAA+B;AAC/B,4CAA+B;AAC/B,4CAAuC;AACvC,4CAA6C;AAC7C,4CAAwC;AACxC,4CAA+C;AAC/C,4CAAyC;AACzC,4CAAyC;AACzC,4CAA0C;AAC1C,4CAA6C;AAC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AAU,EAA6B;IAC7F,IAAI,YAAC,SAAQ,aAAE,UAAS,EAAC,GAAG;IAE5B,MAAM;QACJ,MAAM;QACN,OAAO;QACP,UAAU;QACV,cAAc,KAAK,CAAC,aAAa;QACjC,eAAe,KAAK;mBACpB;IACF;AACF;AAEA,IAAI,4CAAQ;;","sources":["packages/@react-spectrum/card/src/index.ts","packages/@react-spectrum/card/src/CardView.tsx","packages/@react-spectrum/card/src/CardBase.tsx","packages/@adobe/spectrum-css-temp/components/card/vars.css","packages/@react-spectrum/card/src/CardViewContext.tsx","packages/@react-spectrum/card/intl/*.js","packages/@react-spectrum/card/intl/ar-AE.json","packages/@react-spectrum/card/intl/bg-BG.json","packages/@react-spectrum/card/intl/cs-CZ.json","packages/@react-spectrum/card/intl/da-DK.json","packages/@react-spectrum/card/intl/de-DE.json","packages/@react-spectrum/card/intl/el-GR.json","packages/@react-spectrum/card/intl/en-US.json","packages/@react-spectrum/card/intl/es-ES.json","packages/@react-spectrum/card/intl/et-EE.json","packages/@react-spectrum/card/intl/fi-FI.json","packages/@react-spectrum/card/intl/fr-FR.json","packages/@react-spectrum/card/intl/he-IL.json","packages/@react-spectrum/card/intl/hr-HR.json","packages/@react-spectrum/card/intl/hu-HU.json","packages/@react-spectrum/card/intl/it-IT.json","packages/@react-spectrum/card/intl/ja-JP.json","packages/@react-spectrum/card/intl/ko-KR.json","packages/@react-spectrum/card/intl/lt-LT.json","packages/@react-spectrum/card/intl/lv-LV.json","packages/@react-spectrum/card/intl/nb-NO.json","packages/@react-spectrum/card/intl/nl-NL.json","packages/@react-spectrum/card/intl/pl-PL.json","packages/@react-spectrum/card/intl/pt-BR.json","packages/@react-spectrum/card/intl/pt-PT.json","packages/@react-spectrum/card/intl/ro-RO.json","packages/@react-spectrum/card/intl/ru-RU.json","packages/@react-spectrum/card/intl/sk-SK.json","packages/@react-spectrum/card/intl/sl-SI.json","packages/@react-spectrum/card/intl/sr-SP.json","packages/@react-spectrum/card/intl/sv-SE.json","packages/@react-spectrum/card/intl/tr-TR.json","packages/@react-spectrum/card/intl/uk-UA.json","packages/@react-spectrum/card/intl/zh-CN.json","packages/@react-spectrum/card/intl/zh-TW.json","packages/@react-spectrum/card/src/GalleryLayout.tsx","packages/@react-spectrum/card/src/BaseLayout.tsx","packages/@react-spectrum/card/src/GridLayout.tsx","packages/@react-spectrum/card/src/WaterfallLayout.tsx","packages/@react-spectrum/card/src/Card.tsx"],"sourcesContent":["/*\n * Copyright 2021 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 type {GalleryLayoutOptions} from './GalleryLayout';\nexport type {GridLayoutOptions} from './GridLayout';\nexport type {WaterfallLayoutOptions} from './WaterfallLayout';\n\nexport {CardView} from './CardView';\nexport {GalleryLayout} from './GalleryLayout';\nexport {GridLayout} from './GridLayout';\nexport {WaterfallLayout} from './WaterfallLayout';\nexport {Card} from './Card';\nexport type {SpectrumCardViewProps} from '@react-types/card';\n","/*\n * Copyright 2021 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 {CardBase} from './CardBase';\nimport {CardViewContext, useCardViewContext} from './CardViewContext';\nimport {classNames, useDOMRef, useStyleProps, useUnwrapDOMRef} from '@react-spectrum/utils';\nimport {DOMRef, DOMRefValue, Node} from '@react-types/shared';\nimport {GridCollection, useGridState} from '@react-stately/grid';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {mergeProps} from '@react-aria/utils';\nimport {ProgressCircle} from '@react-spectrum/progress';\nimport React, {ReactElement, useCallback, useMemo, useRef} from 'react';\nimport {ReusableView} from '@react-stately/virtualizer';\nimport {SpectrumCardViewProps} from '@react-types/card';\nimport styles from '@adobe/spectrum-css-temp/components/card/vars.css';\nimport {useCollator, useLocale, useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useGrid, useGridCell, useGridRow} from '@react-aria/grid';\nimport {useListState} from '@react-stately/list';\nimport {useProvider} from '@react-spectrum/provider';\nimport {Virtualizer, VirtualizerItem} from '@react-aria/virtualizer';\n\nfunction CardView<T extends object>(props: SpectrumCardViewProps<T>, ref: DOMRef<HTMLDivElement>) {\n let {scale} = useProvider();\n let {styleProps} = useStyleProps(props);\n let domRef = useDOMRef(ref);\n let {\n isQuiet,\n renderEmptyState,\n layout,\n loadingState,\n onLoadMore,\n cardOrientation = 'vertical'\n } = props;\n\n let collator = useCollator({usage: 'search', sensitivity: 'base'});\n let isLoading = loadingState === 'loading' || loadingState === 'loadingMore';\n let cardViewLayout = useMemo(() => typeof layout === 'function' ? new layout({collator, cardOrientation, scale}) : layout, [layout, collator, cardOrientation, scale]);\n let layoutType = cardViewLayout.layoutType;\n\n let stringFormatter = useLocalizedStringFormatter(intlMessages);\n let {direction} = useLocale();\n let {collection} = useListState(props);\n\n let gridCollection = useMemo(() => new GridCollection<T>({\n columnCount: 1,\n items: [...collection].map(item => ({\n // Makes the Grid row use the keys the user provides to the cards so that selection change via interactions returns the card keys\n ...item,\n hasChildNodes: true,\n childNodes: [{\n key: `cell-${item.key}`,\n type: 'cell',\n value: null,\n level: 0,\n rendered: null,\n textValue: item.textValue,\n hasChildNodes: false,\n childNodes: []\n }]\n }))\n }), [collection]);\n\n let state = useGridState({\n ...props,\n selectionMode: cardOrientation === 'horizontal' && layoutType === 'grid' ? 'none' : props.selectionMode,\n collection: gridCollection,\n focusMode: 'cell'\n });\n\n cardViewLayout.collection = gridCollection;\n cardViewLayout.disabledKeys = state.disabledKeys;\n cardViewLayout.isLoading = isLoading;\n cardViewLayout.direction = direction;\n\n let {gridProps} = useGrid({\n ...props,\n isVirtualized: true,\n keyboardDelegate: cardViewLayout\n }, state, domRef);\n\n type View = ReusableView<Node<T>, unknown>;\n let renderWrapper = (parent: View, reusableView: View) => (\n <VirtualizerItem\n key={reusableView.key}\n reusableView={reusableView}\n parent={parent} />\n );\n\n let focusedKey = state.selectionManager.focusedKey;\n let focusedItem = gridCollection.getItem(state.selectionManager.focusedKey);\n if (focusedItem?.parentKey != null) {\n focusedKey = focusedItem.parentKey;\n }\n\n let margin = cardViewLayout.margin || 0;\n let virtualizer = cardViewLayout.virtualizer;\n let scrollToItem = useCallback((key) => {\n virtualizer && virtualizer.scrollToItem(key, {\n duration: 0,\n offsetY: margin\n });\n }, [margin, virtualizer]);\n\n // TODO: does aria-row count and aria-col count need to be modified? Perhaps aria-col count needs to be omitted\n return (\n <CardViewContext.Provider value={{state, isQuiet, layout: cardViewLayout, cardOrientation}}>\n <Virtualizer\n {...gridProps}\n {...styleProps}\n className={classNames(styles, 'spectrum-CardView')}\n ref={domRef}\n focusedKey={focusedKey}\n scrollDirection=\"vertical\"\n layout={cardViewLayout}\n collection={gridCollection}\n isLoading={isLoading}\n onLoadMore={onLoadMore}\n renderWrapper={renderWrapper}\n transitionDuration={isLoading ? 160 : 220}\n scrollToItem={scrollToItem}>\n {(type, item) => {\n if (type === 'item') {\n return (\n <InternalCard item={item} />\n );\n } else if (type === 'loader') {\n return (\n <CenteredWrapper>\n <ProgressCircle\n isIndeterminate\n aria-label={state.collection.size > 0 ? stringFormatter.format('loadingMore') : stringFormatter.format('loading')} />\n </CenteredWrapper>\n );\n } else if (type === 'placeholder') {\n let emptyState = renderEmptyState ? renderEmptyState() : null;\n if (emptyState == null) {\n return null;\n }\n\n return (\n <CenteredWrapper>\n {emptyState}\n </CenteredWrapper>\n );\n }\n }}\n </Virtualizer>\n </CardViewContext.Provider>\n\n );\n}\n\nfunction CenteredWrapper({children}) {\n let {state} = useCardViewContext();\n return (\n <div\n role=\"row\"\n aria-rowindex={state.collection.size + 1}\n className={classNames(styles, 'spectrum-CardView-centeredWrapper')}>\n <div role=\"gridcell\">\n {children}\n </div>\n </div>\n );\n}\n\nfunction InternalCard(props) {\n let {\n item\n } = props;\n let cellNode = [...item.childNodes][0];\n let {state, cardOrientation, isQuiet, layout} = useCardViewContext();\n\n let layoutType = layout.layoutType;\n let rowRef = useRef();\n let cellRef = useRef<DOMRefValue<HTMLDivElement>>();\n let unwrappedRef = useUnwrapDOMRef(cellRef);\n\n let {rowProps: gridRowProps} = useGridRow({\n node: item,\n isVirtualized: true\n }, state, rowRef);\n\n let {gridCellProps} = useGridCell({\n node: cellNode,\n focusMode: 'cell'\n }, state, unwrappedRef);\n\n // Prevent space key from scrolling the CardView if triggered on a disabled item or on a Card in a selectionMode=\"none\" CardView.\n let allowsInteraction = state.selectionManager.selectionMode !== 'none';\n let isDisabled = !allowsInteraction || state.disabledKeys.has(item.key);\n\n let onKeyDown = (e) => {\n if (e.key === ' ' && isDisabled) {\n e.preventDefault();\n }\n };\n\n let rowProps = mergeProps(\n gridRowProps,\n {onKeyDown}\n );\n\n if (layoutType === 'grid' || layoutType === 'gallery') {\n isQuiet = true;\n }\n\n if (layoutType !== 'grid') {\n cardOrientation = 'vertical';\n }\n\n // We don't want to focus the checkbox (or any other focusable elements) within the Card\n // when pressing the arrow keys so we delete the key down handler here. Arrow key navigation between\n // the cards in the CardView is handled by useGrid => useSelectableCollection instead.\n delete gridCellProps.onKeyDownCapture;\n return (\n <div {...rowProps} ref={rowRef} className={classNames(styles, 'spectrum-CardView-row')}>\n <CardBase\n ref={cellRef}\n articleProps={gridCellProps}\n isQuiet={isQuiet}\n orientation={cardOrientation}\n item={item}\n layout={layoutType}>\n {item.rendered}\n </CardBase>\n </div>\n );\n}\n\n/**\n * TODO: Add description of component here.\n */\nconst _CardView = React.forwardRef(CardView) as <T>(props: SpectrumCardViewProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;\nexport {_CardView as CardView};\n","/*\n * Copyright 2021 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 {AriaCardProps, SpectrumCardProps} from '@react-types/card';\nimport {Checkbox} from '@react-spectrum/checkbox';\nimport {classNames, SlotProvider, useDOMRef, useHasChild, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef, Node} from '@react-types/shared';\nimport {filterDOMProps, mergeProps, useLayoutEffect, useResizeObserver, useSlotId} from '@react-aria/utils';\nimport {FocusRing} from '@react-aria/focus';\nimport {getFocusableTreeWalker} from '@react-aria/focus';\nimport React, {HTMLAttributes, useCallback, useMemo, useRef, useState} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/card/vars.css';\nimport {useCardViewContext} from './CardViewContext';\nimport {useFocusWithin, useHover} from '@react-aria/interactions';\nimport {useProviderProps} from '@react-spectrum/provider';\n\ninterface CardBaseProps<T> extends SpectrumCardProps {\n articleProps?: HTMLAttributes<HTMLElement>,\n item?: Node<T>\n}\n\nfunction CardBase<T extends object>(props: CardBaseProps<T>, ref: DOMRef<HTMLDivElement>) {\n props = useProviderProps(props);\n let context = useCardViewContext() || {}; // we can call again here, won't change from Card.tsx\n let {state} = context;\n let manager = state?.selectionManager;\n let {\n isQuiet,\n orientation = 'vertical',\n articleProps = {},\n item,\n layout,\n children\n } = props;\n\n let key = item?.key;\n let isSelected = manager?.isSelected(key);\n let isDisabled = state?.disabledKeys.has(key);\n let onChange = () => manager?.select(key);\n\n let {styleProps} = useStyleProps(props);\n let {cardProps, titleProps, contentProps} = useCard(props);\n let domRef = useDOMRef(ref);\n let gridRef = useRef<HTMLDivElement>();\n let checkboxRef = useRef(null);\n\n // cards are only interactive if there is a selection manager and it allows selection\n let {hoverProps, isHovered} = useHover({isDisabled: manager === undefined || manager?.selectionMode === 'none' || isDisabled});\n let [isFocused, setIsFocused] = useState(false);\n let {focusWithinProps} = useFocusWithin({\n onFocusWithinChange: setIsFocused,\n isDisabled\n });\n\n // ToDo: see css for comment about avatar under selector .spectrum-Card--noLayout.spectrum-Card--default\n let hasPreviewImage = useHasChild(`.${styles['spectrum-Card-image']}`, gridRef);\n let hasPreviewIllustration = useHasChild(`.${styles['spectrum-Card-illustration']}`, gridRef);\n let hasPreview = hasPreviewImage || hasPreviewIllustration;\n\n // this is for horizontal cards\n let [height, setHeight] = useState(NaN);\n let updateHeight = useCallback(() => {\n if (orientation !== 'horizontal') {\n return;\n }\n\n let cardHeight = gridRef.current.getBoundingClientRect().height;\n setHeight(cardHeight);\n }, [orientation, gridRef, setHeight]);\n useResizeObserver({ref: gridRef, onResize: updateHeight});\n\n let aspectRatioEnforce = undefined;\n if (orientation === 'horizontal' && !isNaN(height)) {\n aspectRatioEnforce = {\n height: `${height}px`,\n width: `${height}px`\n };\n }\n\n let slots = useMemo(() => ({\n image: {UNSAFE_className: classNames(styles, 'spectrum-Card-image'), objectFit: orientation === 'horizontal' ? 'cover' : 'contain', alt: '', ...aspectRatioEnforce},\n illustration: {UNSAFE_className: classNames(styles, 'spectrum-Card-illustration'), ...aspectRatioEnforce},\n avatar: {UNSAFE_className: classNames(styles, 'spectrum-Card-avatar'), size: 'avatar-size-400'},\n heading: {UNSAFE_className: classNames(styles, 'spectrum-Card-heading'), ...titleProps},\n content: {UNSAFE_className: classNames(styles, 'spectrum-Card-content'), ...contentProps},\n detail: {UNSAFE_className: classNames(styles, 'spectrum-Card-detail')}\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }), [titleProps, contentProps, height, isQuiet, orientation]);\n\n useLayoutEffect(() => {\n if (gridRef?.current) {\n let walker = getFocusableTreeWalker(gridRef.current);\n let nextNode = walker.nextNode();\n while (nextNode != null) {\n if (checkboxRef.current && !checkboxRef.current.UNSAFE_getDOMNode().contains(nextNode)) {\n console.warn('Card does not support focusable elements, please contact the team regarding your use case.');\n break;\n }\n nextNode = walker.nextNode();\n }\n }\n }, [children]);\n\n return (\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')}>\n <article\n {...styleProps}\n {...mergeProps(cardProps, focusWithinProps, hoverProps, filterDOMProps(props), articleProps)}\n ref={domRef}\n className={classNames(styles, 'spectrum-Card', {\n 'spectrum-Card--default': !isQuiet && orientation !== 'horizontal',\n 'spectrum-Card--isQuiet': isQuiet && orientation !== 'horizontal',\n 'spectrum-Card--horizontal': orientation === 'horizontal',\n 'spectrum-Card--noPreview': !hasPreview,\n 'is-hovered': isHovered,\n 'is-focused': isFocused,\n 'is-selected': isSelected,\n 'spectrum-Card--waterfall': layout === 'waterfall',\n 'spectrum-Card--gallery': layout === 'gallery',\n 'spectrum-Card--grid': layout === 'grid',\n 'spectrum-Card--noLayout': layout !== 'waterfall' && layout !== 'gallery' && layout !== 'grid'\n }, styleProps.className)}>\n <div ref={gridRef} className={classNames(styles, 'spectrum-Card-grid')}>\n {manager && manager.selectionMode !== 'none' && (\n <div className={classNames(styles, 'spectrum-Card-checkboxWrapper')}>\n <Checkbox\n ref={checkboxRef}\n isDisabled={isDisabled}\n excludeFromTabOrder\n isSelected={isSelected}\n onChange={onChange}\n UNSAFE_className={classNames(styles, 'spectrum-Card-checkbox')}\n isEmphasized\n aria-label=\"select\" />\n </div>\n )}\n <SlotProvider slots={slots}>\n {children}\n </SlotProvider>\n <div className={classNames(styles, 'spectrum-Card-decoration')} />\n </div>\n </article>\n </FocusRing>\n );\n}\n\ninterface AriaCardOptions extends AriaCardProps {\n}\n\ninterface CardAria {\n cardProps: HTMLAttributes<HTMLDivElement>,\n titleProps: HTMLAttributes<HTMLDivElement>,\n contentProps: HTMLAttributes<HTMLDivElement>\n}\n\nfunction useCard(props: AriaCardOptions): CardAria {\n let titleId = useSlotId();\n let descriptionId = useSlotId();\n let titleProps = useMemo(() => ({\n id: titleId\n }), [titleId]);\n let contentProps = useMemo(() => ({\n id: descriptionId\n }), [descriptionId]);\n\n return {\n cardProps: {\n ...filterDOMProps(props),\n 'aria-labelledby': titleId,\n 'aria-describedby': descriptionId,\n tabIndex: 0\n },\n titleProps,\n contentProps\n };\n}\n\n/**\n * TODO: Add description of component here.\n */\nconst _CardBase = React.forwardRef(CardBase);\nexport {_CardBase as CardBase};\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 React, {useContext} from 'react';\n\nexport const CardViewContext = React.createContext(null);\n\nexport function useCardViewContext() {\n return useContext(CardViewContext);\n}\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\": \"Wird geladen...\",\n \"loadingMore\": \"Noch mehr wird geladen...\"\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 en cours…\",\n \"loadingMore\": \"Chargement d’autres d’éléments…\"\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\": \"Wczytywanie...\",\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 dodatne 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 2021 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 {BaseLayout, BaseLayoutOptions} from './BaseLayout';\nimport {LayoutInfo, Rect, Size} from '@react-stately/virtualizer';\n\nexport interface GalleryLayoutOptions extends BaseLayoutOptions {\n // /**\n // * The card size in the grid.\n // */\n // cardSize?: 'S' | 'M' | 'L',\n /**\n * The the default row height. Note this must be larger than the min item height.\n * @default 208\n */\n idealRowHeight?: number,\n /**\n * The spacing between items.\n * @default 18 x 18\n */\n itemSpacing?: Size,\n /**\n * The vertical padding for an item.\n * @default 78\n */\n itemPadding?: number,\n /**\n * Minimum size for a item in the grid.\n * @default 136 x 136\n */\n minItemSize?: Size,\n /**\n * Target for adding extra weight to elements during linear partitioning. Anything with an aspect ratio smaler than this value\n * will be targeted.\n * @type {number}\n */\n threshold?: number\n}\n\nconst DEFAULT_OPTIONS = {\n S: {\n idealRowHeight: 112,\n minItemSize: new Size(96, 96),\n itemSpacing: new Size(8, 16),\n itemPadding: 24,\n dropSpacing: 50,\n margin: 8\n },\n L: {\n idealRowHeight: 208,\n minItemSize: new Size(136, 136),\n itemSpacing: new Size(18, 18),\n itemPadding: {\n 'medium': 78,\n 'large': 99\n },\n dropSpacing: 100,\n margin: 24\n }\n};\n\nexport class GalleryLayout<T> extends BaseLayout<T> {\n protected idealRowHeight: number;\n protected itemSpacing: Size;\n itemPadding: number;\n protected minItemSize: Size;\n protected threshold: number;\n\n constructor(options: GalleryLayoutOptions = {}) {\n super(options);\n let cardSize = 'L';\n this.idealRowHeight = options.idealRowHeight || DEFAULT_OPTIONS[cardSize].idealRowHeight;\n this.itemSpacing = options.itemSpacing || DEFAULT_OPTIONS[cardSize].itemSpacing;\n this.itemPadding = options.itemPadding != null ? options.itemPadding : DEFAULT_OPTIONS[cardSize].itemPadding[this.scale];\n this.minItemSize = options.minItemSize || DEFAULT_OPTIONS[cardSize].minItemSize;\n this.threshold = options.threshold || 1;\n this.margin = options.margin != null ? options.margin : DEFAULT_OPTIONS[cardSize].margin;\n }\n\n get layoutType() {\n return 'gallery';\n }\n\n /**\n * Takes a row of widths and if there are any widths smaller than the min-width, leech width starting from\n * the widest in the row until it can't give anymore, then move to the second widest and so forth.\n * Do this until all assets meet the min-width.\n * */\n _distributeWidths(widths) {\n // create a copy of the widths array and sort it largest to smallest\n let sortedWidths = widths.concat().sort((a, b) => a[1] > b[1] ? -1 : 1);\n for (let width of widths) {\n // for each width, if it's smaller than the min width\n if (width[1] < this.minItemSize.width) {\n // then figure out how much smaller\n let delta = this.minItemSize.width - width[1];\n for (let item of sortedWidths) {\n // go from the largest width in the row to the smallest\n // if the width is greater than the min width\n if (widths[item[0]][1] > this.minItemSize.width) {\n // subtract the delta from the width, if it's still greater than the min width\n // then we have finished, subtract the delta permanently from that width\n // eslint-disable-next-line max-depth\n if (widths[item[0]][1] - delta > this.minItemSize.width) {\n widths[item[0]][1] -= delta;\n delta = 0;\n break;\n } else {\n // otherwise, we take as much as we can from the current width and then move on to\n // the next largest and take some width from it\n let maxChange = widths[item[0]][1] - this.minItemSize.width;\n delta -= maxChange;\n widths[item[0]][1] -= maxChange;\n }\n }\n }\n if (delta > 0) {\n return false;\n }\n // force the width to be the min width that we just rebalanced for\n width[1] = this.minItemSize.width;\n }\n }\n return true;\n }\n\n buildCollection() {\n let visibleWidth = this.virtualizer.visibleRect.width;\n let visibleHeight = this.virtualizer.visibleRect.height;\n let y = this.margin;\n let availableWidth = visibleWidth - this.margin * 2;\n\n // If avaliable width is not greater than 0, skip node layout calculations\n if (availableWidth > 0) {\n // Compute aspect ratios for all of the items, and the total width if all items were on in a single row.\n let ratios = [];\n let totalWidth = 0;\n let minRatio = this.minItemSize.width / this.minItemSize.height;\n let maxRatio = availableWidth / this.minItemSize.height;\n\n for (let node of this.collection) {\n let ratio = node.props.width / node.props.height;\n if (ratio < minRatio) {\n ratio = minRatio;\n } else if (ratio > maxRatio && ratio !== minRatio) {\n ratio = maxRatio;\n }\n\n let itemWidth = ratio * this.minItemSize.height;\n ratios.push(ratio);\n totalWidth += itemWidth;\n }\n\n totalWidth += this.itemSpacing.width * (this.collection.size - 1);\n\n // Determine how many rows we'll need, and partition the items into rows\n // using the aspect ratios as weights.\n let rows = Math.max(1, Math.ceil(totalWidth / availableWidth));\n // if the available width can't hold two items, then every item will get its own row\n // this leads to a faster run through linear partition and more dependable output for small row widths\n if (availableWidth <= (this.minItemSize.width * 2) + (this.itemPadding * 2)) {\n rows = this.collection.size;\n }\n\n let weightedRatios = ratios.map(ratio => ratio < this.threshold ? ratio + (0.5 * (1 / ratio)) : ratio);\n let partition = linearPartition(weightedRatios, rows);\n\n let index = 0;\n for (let row of partition) {\n // Compute the total weight for this row\n let totalWeight = 0;\n for (let j = index; j < index + row.length; j++) {\n totalWeight += ratios[j];\n }\n\n // Determine the row height based on the total available width and weight of this row.\n let bestRowHeight = (availableWidth - (row.length - 1) * this.itemSpacing.width) / totalWeight;\n\n // if this is the last row and the row height is >2x the ideal row height, then cap to the ideal height\n // probably doing this because if the last row has one extremely tall image, then the row becomes huge\n // though that can happen anywhere if a row has lots of tall images... so i'm not sure why this one matters\n if (row === partition[partition.length - 1] && bestRowHeight > this.idealRowHeight * 2) {\n bestRowHeight = this.idealRowHeight;\n }\n let itemHeight = Math.round(bestRowHeight) + this.itemPadding;\n let x = this.margin;\n\n // if any items are going to end up too small, add a bit of width to them and subtract it from wider objects\n let widths = [];\n for (let j = index; j < index + row.length; j++) {\n let width = Math.round(bestRowHeight * ratios[j]);\n widths.push([j - index, width]);\n }\n this._distributeWidths(widths);\n\n // Create items for this row.\n for (let j = index; j < index + row.length; j++) {\n let node = this.collection.rows[j];\n let itemWidth = Math.max(widths[j - index][1], this.minItemSize.width);\n let rect = new Rect(x, y, itemWidth, itemHeight);\n let layoutInfo = new LayoutInfo(node.type, node.key, rect);\n layoutInfo.allowOverflow = true;\n this.layoutInfos.set(node.key, layoutInfo);\n x += itemWidth + this.itemSpacing.width;\n }\n\n y += itemHeight + this.itemSpacing.height;\n index += row.length;\n }\n\n if (this.isLoading) {\n let loaderY = y;\n let loaderHeight = 60;\n // If there aren't any items, make loader take all avaliable room and remove margin from y calculation\n // so it doesn't scroll\n if (this.collection.size === 0) {\n loaderY = 0;\n loaderHeight = visibleHeight || 60;\n }\n\n let rect = new Rect(0, loaderY, visibleWidth, loaderHeight);\n let loader = new LayoutInfo('loader', 'loader', rect);\n this.layoutInfos.set('loader', loader);\n y = loader.rect.maxY;\n }\n\n if (this.collection.size === 0 && !this.isLoading) {\n let rect = new Rect(0, 0, visibleWidth, visibleHeight);\n let placeholder = new LayoutInfo('placeholder', 'placeholder', rect);\n this.layoutInfos.set('placeholder', placeholder);\n y = placeholder.rect.maxY;\n }\n }\n this.contentSize = new Size(visibleWidth, y);\n }\n}\n\n// https://www8.cs.umu.se/kurser/TDBA77/VT06/algorithms/BOOK/BOOK2/NODE45.HTM\nfunction linearPartition(seq, k) {\n let n = seq.length;\n if (k <= 0) {\n return [];\n }\n\n if (k >= n) {\n return seq.map(x => [x]);\n }\n\n if (n === 1) {\n return [seq];\n }\n\n let table = Array(n).fill(0).map(() => Array(k).fill(0));\n let solution = Array(n - 1).fill(0).map(() => Array(k - 1).fill(0));\n\n for (let i = 0; i < n; i++) {\n table[i][0] = seq[i] + (i > 0 ? table[i - 1][0] : 0);\n }\n\n for (let i = 0; i < k; i++) {\n table[0][i] = seq[0];\n }\n\n for (let i = 1; i < n; i++) {\n for (let j = 1; j < k; j++) {\n let currentMin = 0;\n let minX = Infinity;\n\n for (let x = 0; x < i; x++) {\n let c1 = table[x][j - 1];\n let c2 = table[i][0] - table[x][0];\n let cost = Math.max(c1, c2);\n\n if (!x || cost < currentMin) {\n currentMin = cost;\n minX = x;\n }\n }\n\n table[i][j] = currentMin;\n solution[i - 1][j - 1] = minX;\n }\n }\n\n n = n - 1;\n k = k - 2;\n\n let result = [];\n while (k >= 0) {\n if (n >= 1) {\n let row = [];\n for (let i = solution[n - 1][k] + 1; i < n + 1; i++) {\n row.push(seq[i]);\n }\n\n result.unshift(row);\n n = solution[n - 1][k];\n }\n\n k--;\n }\n\n let row = [];\n for (let i = 0; i < n + 1; i++) {\n row.push(seq[i]);\n }\n\n result.unshift(row);\n\n return result;\n}\n","/*\n * Copyright 2021 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 {Direction, KeyboardDelegate, Node} from '@react-types/shared';\nimport {GridCollection} from '@react-stately/grid';\nimport {InvalidationContext, Layout, LayoutInfo, Rect, Size} from '@react-stately/virtualizer';\nimport {Key} from 'react';\nimport {Scale} from '@react-types/provider';\n\nexport interface BaseLayoutOptions {\n collator?: Intl.Collator,\n // TODO: is this valid or is scale a spectrum specific thing that should be left out of the layouts?\n scale?: Scale,\n /**\n * The margin around the grid view between the edges and the items.\n * @default 24\n */\n margin?: number\n}\n\nexport class BaseLayout<T> extends Layout<Node<T>> implements KeyboardDelegate {\n protected contentSize: Size;\n protected layoutInfos: Map<Key, LayoutInfo>;\n protected collator: Intl.Collator;\n protected lastCollection: GridCollection<T>;\n collection: GridCollection<T>;\n isLoading: boolean;\n disabledKeys: Set<Key> = new Set();\n direction: Direction;\n scale: Scale;\n margin: number;\n\n constructor(options: BaseLayoutOptions = {}) {\n super();\n this.layoutInfos = new Map();\n this.collator = options.collator;\n this.lastCollection = null;\n this.scale = options.scale || 'medium';\n this.margin = options.margin || 24;\n }\n\n validate(invalidationContext: InvalidationContext<Node<T>, unknown>) {\n this.collection = this.virtualizer.collection as GridCollection<T>;\n this.buildCollection(invalidationContext);\n\n // Remove layout info that doesn't exist in new collection\n if (this.lastCollection) {\n for (let key of this.lastCollection.getKeys()) {\n if (!this.collection.getItem(key)) {\n this.layoutInfos.delete(key);\n }\n }\n\n if (!this.isLoading) {\n this.layoutInfos.delete('loader');\n }\n\n if (this.collection.size > 0) {\n this.layoutInfos.delete('placeholder');\n }\n }\n\n this.lastCollection = this.collection;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n buildCollection(invalidationContext?: InvalidationContext<Node<T>, unknown>) {}\n\n getContentSize() {\n return this.contentSize;\n }\n\n getLayoutInfo(key: Key) {\n return this.layoutInfos.get(key);\n }\n\n getVisibleLayoutInfos(rect) {\n let res: LayoutInfo[] = [];\n\n for (let layoutInfo of this.layoutInfos.values()) {\n if (this.isVisible(layoutInfo, rect)) {\n res.push(layoutInfo);\n }\n }\n\n return res;\n }\n\n isVisible(layoutInfo: LayoutInfo, rect: Rect) {\n return layoutInfo.rect.intersects(rect);\n }\n\n getInitialLayoutInfo(layoutInfo: LayoutInfo) {\n layoutInfo.opacity = 0;\n layoutInfo.transform = 'scale3d(0.8, 0.8, 0.8)';\n return layoutInfo;\n }\n\n getFinalLayoutInfo(layoutInfo: LayoutInfo) {\n layoutInfo.opacity = 0;\n layoutInfo.transform = 'scale3d(0.8, 0.8, 0.8)';\n return layoutInfo;\n }\n\n _findClosestLayoutInfo(target: Rect, rect: Rect) {\n let layoutInfos = this.getVisibleLayoutInfos(rect);\n let best = null;\n let bestDistance = Infinity;\n\n // Calculates distance as the distance between the center of 2 rects.\n for (let cur of layoutInfos) {\n if (cur.type === 'item') {\n let curRect = cur.rect;\n let targetMidX = (target.x + target.maxX) / 2;\n let targetMidY = (target.y + target.maxY) / 2;\n let curMidX = (curRect.x + curRect.maxX) / 2;\n let curMidY = (curRect.y + curRect.maxY) / 2;\n let dist = Math.pow(targetMidX - curMidX, 2) + Math.pow(targetMidY - curMidY, 2);\n if (dist < bestDistance) {\n best = cur;\n bestDistance = dist;\n }\n }\n }\n\n return best;\n }\n\n _findClosest(target: Rect, rect: Rect) {\n let best = this._findClosestLayoutInfo(target, rect);\n return best || null;\n }\n\n getKeyBelow(key: Key) {\n // Expected key is the currently focused cell so we need the parent row key\n let parentRowKey = this.collection.getItem(key).parentKey;\n let layoutInfo = this.getLayoutInfo(parentRowKey);\n let rect = new Rect(layoutInfo.rect.x, layoutInfo.rect.maxY + 1, layoutInfo.rect.width, this.virtualizer.visibleRect.height);\n let closestRow = this.collection.getItem(this._findClosest(layoutInfo.rect, rect)?.key);\n return closestRow?.childNodes[0]?.key;\n }\n\n getKeyAbove(key: Key) {\n // Expected key is the currently focused cell so we need the parent row key\n let parentRowKey = this.collection.getItem(key).parentKey;\n let layoutInfo = this.getLayoutInfo(parentRowKey);\n let rect = new Rect(layoutInfo.rect.x, 0, layoutInfo.rect.width, layoutInfo.rect.y - 1);\n let closestRow = this.collection.getItem(this._findClosest(layoutInfo.rect, rect)?.key);\n return closestRow?.childNodes[0]?.key;\n }\n\n getKeyRightOf(key: Key) {\n // Expected key is the currently focused cell so we need the parent row key\n let parentRowKey = this.collection.getItem(key).parentKey;\n key = this.direction === 'rtl' ? this.collection.getKeyBefore(parentRowKey) : this.collection.getKeyAfter(parentRowKey);\n\n while (key != null) {\n let item = this.collection.getItem(key);\n // Don't check if item is disabled because we want to be able to focus disabled items in a grid (double check this)\n if (item.type === 'item') {\n return item.childNodes[0].key;\n }\n key = this.direction === 'rtl' ? this.collection.getKeyBefore(key) : this.collection.getKeyAfter(key);\n }\n }\n\n getKeyLeftOf(key: Key) {\n // Expected key is the currently focused cell so we need the parent row key\n let parentRowKey = this.collection.getItem(key).parentKey;\n key = this.direction === 'rtl' ? this.collection.getKeyAfter(parentRowKey) : this.collection.getKeyBefore(parentRowKey);\n while (key != null) {\n let item = this.collection.getItem(key);\n // Don't check if item is disabled because we want to be able to focus disabled items in a grid (double check this)\n if (item.type === 'item') {\n return item.childNodes[0].key;\n }\n\n key = this.direction === 'rtl' ? this.collection.getKeyAfter(key) : this.collection.getKeyBefore(key);\n }\n }\n\n getFirstKey() {\n let firstRow = this.collection.getItem(this.collection.getFirstKey());\n return firstRow.childNodes[0].key;\n }\n\n getLastKey() {\n let lastRow = this.collection.getItem(this.collection.getLastKey());\n return lastRow.childNodes[0].key;\n }\n\n // TODO: pretty unwieldy because it needs to bounce back and forth between the parent key and the child key\n // Perhaps have layoutInfo store childKey as well so we don't need to do this? Or maybe make the layoutInfos be the cells instead of the rows?\n getKeyPageAbove(key: Key) {\n // Expected key is the currently focused cell so we need the parent row key\n let parentRowKey = this.collection.getItem(key).parentKey;\n let layoutInfo = this.getLayoutInfo(parentRowKey);\n\n if (layoutInfo) {\n let pageY = Math.max(0, layoutInfo.rect.y + layoutInfo.rect.height - this.virtualizer.visibleRect.height);\n // If the node is so large that it spans multiple page heights, return the key of the item immediately above\n // Otherwise keep going up until we exceed a single page height worth of nodes\n let keyAbove = this.collection.getItem(this.getKeyAbove(key))?.parentKey;\n layoutInfo = this.getLayoutInfo(keyAbove);\n\n if (layoutInfo && layoutInfo.rect.y > pageY) {\n while (layoutInfo && layoutInfo.rect.y > pageY) {\n let childKey = this.collection.getItem(layoutInfo.key).childNodes[0].key;\n let keyAbove = this.collection.getItem(this.getKeyAbove(childKey))?.parentKey;\n layoutInfo = this.getLayoutInfo(keyAbove);\n }\n }\n\n if (layoutInfo) {\n let childKey = this.collection.getItem(layoutInfo.key).childNodes[0].key;\n return childKey;\n }\n }\n\n return this.getFirstKey();\n }\n\n // TODO: pretty unwieldy because it needs to bounce back and forth between the parent key and the child key\n // Perhaps have layoutInfo store childKey as well so we don't need to do this?\n getKeyPageBelow(key: Key) {\n // Expected key is the currently focused cell so we need the parent row key\n let parentRowKey = this.collection.getItem(key).parentKey;\n let layoutInfo = this.getLayoutInfo(parentRowKey);\n if (layoutInfo) {\n let pageY = Math.min(this.virtualizer.contentSize.height, layoutInfo.rect.y - layoutInfo.rect.height + this.virtualizer.visibleRect.height);\n // If the node is so large that it spans multiple page heights, return the key of the item immediately below\n // Otherwise keep going up until we exceed a single page height worth of nodes\n let keyBelow = this.collection.getItem(this.getKeyBelow(key))?.parentKey;\n layoutInfo = this.getLayoutInfo(keyBelow);\n if (layoutInfo && layoutInfo.rect.y < pageY) {\n while (layoutInfo && layoutInfo.rect.y < pageY) {\n let childKey = this.collection.getItem(layoutInfo.key).childNodes[0].key;\n let keyBelow = this.collection.getItem(this.getKeyBelow(childKey))?.parentKey;\n layoutInfo = this.getLayoutInfo(keyBelow);\n }\n }\n\n if (layoutInfo) {\n let childKey = this.collection.getItem(layoutInfo.key).childNodes[0].key;\n return childKey;\n }\n }\n\n return this.getLastKey();\n }\n\n getKeyForSearch(search: string, fromKey?: Key) {\n if (!this.collator) {\n return null;\n }\n\n let collection = this.collection;\n let key = fromKey ?? this.getFirstKey();\n\n let startItem = collection.getItem(key);\n key = startItem.parentKey;\n\n while (key != null) {\n let item = collection.getItem(key);\n if (item.textValue) {\n let substring = item.textValue.slice(0, search.length);\n if (this.collator.compare(substring, search) === 0) {\n return [...item.childNodes][0].key;\n }\n }\n\n key = this.collection.getKeyAfter(key);\n }\n\n return null;\n }\n}\n","/*\n * Copyright 2021 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 {BaseLayout, BaseLayoutOptions} from './BaseLayout';\nimport {Key} from 'react';\nimport {LayoutInfo, Rect, Size} from '@react-stately/virtualizer';\nimport {Node, Orientation} from '@react-types/shared';\n\nexport interface GridLayoutOptions extends BaseLayoutOptions {\n // /**\n // * The card size in the grid.\n // */\n // cardSize?: 'S' | 'M' | 'L',\n /**\n * The minimum item size.\n * @default 208 x 208 for horizontal card orientation. 102 x 102 for vertical card orientation.\n */\n minItemSize?: Size,\n /**\n * The maximum item size.\n * @default Infinity\n */\n maxItemSize?: Size,\n /**\n * The minimum space required between items.\n * @default 18 x 18\n */\n minSpace?: Size,\n /**\n * The maximum number of columns.\n * @default Infinity\n */\n maxColumns?: number,\n /**\n * The additional padding along the card's main axis. Affects the sizing of the content area following the card image.\n * @default 95\n */\n itemPadding?: number,\n /**\n * The orientation of the cards withn the grid.\n * @default vertical\n */\n cardOrientation?: Orientation\n}\n\nconst DEFAULT_OPTIONS = {\n S: {\n itemPadding: 20,\n minItemSize: {\n 'vertical': new Size(96, 96)\n },\n maxItemSize: new Size(Infinity, Infinity),\n margin: 8,\n minSpace: new Size(6, 6),\n maxColumns: Infinity,\n dropSpacing: 50\n },\n L: {\n itemPadding: {\n 'vertical': {\n 'medium': 78,\n 'large': 98\n },\n 'horizontal': {\n 'medium': 150,\n 'large': 170\n }\n },\n minItemSize: {\n 'vertical': new Size(208, 208),\n 'horizontal': new Size(102, 102)\n },\n maxItemSize: new Size(Infinity, Infinity),\n margin: 24,\n minSpace: new Size(18, 18),\n maxColumns: Infinity,\n dropSpacing: 100\n }\n};\n\nexport class GridLayout<T> extends BaseLayout<T> {\n protected minItemSize: Size;\n protected maxItemSize: Size;\n protected minSpace: Size;\n protected maxColumns: number;\n itemPadding: number;\n cardOrientation: Orientation;\n protected itemSize: Size;\n protected numColumns: number;\n protected numRows: number;\n protected horizontalSpacing: number;\n\n constructor(options: GridLayoutOptions = {}) {\n super(options);\n let cardSize = 'L';\n this.cardOrientation = options.cardOrientation || 'vertical';\n this.minItemSize = options.minItemSize || DEFAULT_OPTIONS[cardSize].minItemSize[this.cardOrientation];\n this.maxItemSize = options.maxItemSize || DEFAULT_OPTIONS[cardSize].maxItemSize;\n this.margin = options.margin != null ? options.margin : DEFAULT_OPTIONS[cardSize].margin;\n this.minSpace = options.minSpace || DEFAULT_OPTIONS[cardSize].minSpace;\n this.maxColumns = options.maxColumns || DEFAULT_OPTIONS[cardSize].maxColumns;\n this.itemPadding = options.itemPadding != null ? options.itemPadding : DEFAULT_OPTIONS[cardSize].itemPadding[this.cardOrientation][this.scale];\n this.itemSize = null;\n this.numColumns = 0;\n this.numRows = 0;\n this.horizontalSpacing = 0;\n }\n\n get layoutType() {\n return 'grid';\n }\n\n getIndexAtPoint(x, y, allowInsertingAtEnd = false) {\n let itemHeight = this.itemSize.height + this.minSpace.height;\n let itemWidth = this.itemSize.width + this.horizontalSpacing;\n return Math.max(0,\n Math.min(\n this.collection.size - (allowInsertingAtEnd ? 0 : 1),\n Math.floor(y / itemHeight) * this.numColumns + Math.floor((x - this.horizontalSpacing) / itemWidth)\n )\n );\n }\n\n getVisibleLayoutInfos(rect) {\n let res: LayoutInfo[] = [];\n let numItems = this.collection.size;\n if (numItems <= 0 || !this.itemSize) {\n // If there aren't any items in the collection, we are in a loader/placeholder state. Return those layoutInfos as\n // the currently visible items\n if (this.layoutInfos.size > 0) {\n for (let layoutInfo of this.layoutInfos.values()) {\n if (this.isVisible(layoutInfo, rect)) {\n res.push(layoutInfo);\n }\n }\n }\n } else {\n // The approach from v2 uses indexes where other v3 layouts iterate through every node/root node. This feels more efficient\n let firstVisibleItem = this.getIndexAtPoint(rect.x, rect.y);\n let lastVisibleItem = this.getIndexAtPoint(rect.maxX, rect.maxY);\n for (let index = firstVisibleItem; index <= lastVisibleItem; index++) {\n let keyFromIndex = this.collection.rows[index].key;\n let layoutInfo = this.layoutInfos.get(keyFromIndex);\n if (layoutInfo && this.isVisible(layoutInfo, rect)) {\n res.push(layoutInfo);\n }\n }\n\n // Check if loader is in view and add to res if so\n let loader = this.layoutInfos.get('loader');\n if (loader && this.isVisible(loader, rect)) {\n res.push(loader);\n }\n }\n\n return res;\n }\n\n buildCollection() {\n let visibleWidth = this.virtualizer.visibleRect.width;\n let visibleHeight = this.virtualizer.visibleRect.height;\n let horizontalItemPadding = this.cardOrientation === 'horizontal' ? this.itemPadding : 0;\n let verticalItemPadding = this.cardOrientation === 'vertical' ? this.itemPadding : 0;\n let minCardWidth = this.minItemSize.width + horizontalItemPadding;\n\n // Compute the number of rows and columns needed to display the content\n let availableWidth = visibleWidth - this.margin * 2;\n let columns = Math.floor((availableWidth + this.minSpace.width) / (minCardWidth + this.minSpace.width));\n this.numColumns = Math.max(1, Math.min(this.maxColumns, columns));\n this.numRows = Math.ceil(this.collection.size / this.numColumns);\n\n // Compute the available width (minus the space between items)\n let width = availableWidth - (this.minSpace.width * Math.max(0, this.numColumns - 1));\n\n // Compute the item width based on the space available\n let itemWidth = Math.floor(width / this.numColumns);\n itemWidth = Math.max(minCardWidth, Math.min(this.maxItemSize.width, itemWidth));\n // Compute the item height, which is proportional to the item width\n let t = ((itemWidth - minCardWidth) / minCardWidth);\n let itemHeight = Math.floor(this.minItemSize.height + this.minItemSize.height * t);\n itemHeight = Math.max(this.minItemSize.height, Math.min(this.maxItemSize.height, itemHeight)) + verticalItemPadding;\n this.itemSize = new Size(itemWidth, itemHeight);\n\n // Compute the horizontal spacing and content height\n this.horizontalSpacing = this.numColumns < 2 ? 0 : Math.floor((availableWidth - this.numColumns * this.itemSize.width) / (this.numColumns - 1));\n\n let y = this.margin;\n let index = 0;\n for (let node of this.collection) {\n let layoutInfo = this.buildChild(node, y, index);\n y = layoutInfo.rect.maxY;\n index++;\n }\n\n if (this.isLoading) {\n let loaderY = y;\n let loaderHeight = 60;\n // If there aren't any items, make loader take all avaliable room and remove margin from y calculation\n // so it doesn't scroll\n if (this.collection.size === 0) {\n loaderY = 0;\n loaderHeight = visibleHeight || 60;\n }\n\n let rect = new Rect(0, loaderY, visibleWidth, loaderHeight);\n let loader = new LayoutInfo('loader', 'loader', rect);\n this.layoutInfos.set('loader', loader);\n y = loader.rect.maxY;\n }\n\n if (this.collection.size === 0 && !this.isLoading) {\n let rect = new Rect(0, 0, visibleWidth, visibleHeight);\n let placeholder = new LayoutInfo('placeholder', 'placeholder', rect);\n this.layoutInfos.set('placeholder', placeholder);\n y = placeholder.rect.maxY;\n }\n\n this.contentSize = new Size(visibleWidth, y);\n }\n\n buildChild(node: Node<T>, y: number, index: number): LayoutInfo {\n let row = Math.floor(index / this.numColumns);\n let column = index % this.numColumns;\n let x = this.margin + column * (this.itemSize.width + this.horizontalSpacing);\n y = this.margin + row * (this.itemSize.height + this.minSpace.height);\n\n let rect = new Rect(x, y, this.itemSize.width, this.itemSize.height);\n // TODO: Perhaps have it so that the child key for each row is stored with the layoutInfo?\n let layoutInfo = new LayoutInfo(node.type, node.key, rect);\n layoutInfo.allowOverflow = true;\n this.layoutInfos.set(node.key, layoutInfo);\n return layoutInfo;\n }\n\n // Since the collection doesn't represent the visual layout, need to calculate what row and column the current key is in,\n // then return the key that occupies the row + column below. This can be done by figuring out how many cards exist per column then dividing the\n // collection contents by that number (which will give us the row distribution)\n getKeyBelow(key: Key) {\n // Expected key is the currently focused cell so we need the parent row key\n let parentRowKey = this.collection.getItem(key).parentKey;\n let indexRowBelow;\n let index = this.collection.rows.findIndex(card => card.key === parentRowKey);\n if (index !== -1) {\n indexRowBelow = index + this.numColumns;\n } else {\n return null;\n }\n\n return this.collection.rows[indexRowBelow]?.childNodes[0].key || null;\n }\n\n getKeyAbove(key: Key) {\n // Expected key is the currently focused cell so we need the parent row key\n let parentRowKey = this.collection.getItem(key).parentKey;\n let indexRowAbove;\n let index = this.collection.rows.findIndex(card => card.key === parentRowKey);\n if (index !== -1) {\n indexRowAbove = index - this.numColumns;\n } else {\n return null;\n }\n\n return this.collection.rows[indexRowAbove]?.childNodes[0].key || null;\n }\n}\n","/*\n * Copyright 2021 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 {BaseLayout, BaseLayoutOptions} from './BaseLayout';\nimport {InvalidationContext, LayoutInfo, Rect, Size} from '@react-stately/virtualizer';\nimport {Key} from 'react';\nimport {KeyboardDelegate, Node} from '@react-types/shared';\n\nexport interface WaterfallLayoutOptions extends BaseLayoutOptions {\n /**\n * The minimum item size.\n * @default 240 x 136\n */\n minItemSize?: Size,\n /**\n * The maximum item size.\n * @default Infinity\n */\n maxItemSize?: Size,\n /**\n * The minimum space required between items.\n * @default 18 x 18\n */\n minSpace?: Size,\n /**\n * The maximum number of columns.\n * @default Infinity\n */\n maxColumns?: number\n}\n\n// TODO: this didn't have any options that varied with card size, should it have?\nexport class WaterfallLayout<T> extends BaseLayout<T> implements KeyboardDelegate {\n protected minItemSize: Size;\n protected maxItemSize: Size;\n protected minSpace: Size;\n protected maxColumns: number;\n protected numColumns: number;\n protected itemWidth: number;\n protected horizontalSpacing: number;\n\n constructor(options: WaterfallLayoutOptions = {}) {\n // TODO: WaterfallLayout doesn't use card size in v2, but perhaps it should support it? Perhaps it would modify\n // minItemSize defaults or other things\n super(options);\n this.minItemSize = options.minItemSize || new Size(240, 136);\n this.maxItemSize = options.maxItemSize || new Size(Infinity, Infinity);\n this.margin = options.margin != null ? options.margin : 24;\n this.minSpace = options.minSpace || new Size(18, 18);\n this.maxColumns = options.maxColumns || Infinity;\n\n this.itemWidth = 0;\n this.numColumns = 0;\n\n this.lastCollection = null;\n this.collator = options.collator;\n }\n\n get layoutType() {\n return 'waterfall';\n }\n\n buildCollection(invalidationContext: InvalidationContext<Node<T>, unknown>) {\n // Compute the number of columns needed to display the content\n let visibleWidth = this.virtualizer.visibleRect.width;\n let availableWidth = visibleWidth - this.margin * 2;\n let columns = Math.floor((availableWidth + this.minSpace.width) / (this.minItemSize.width + this.minSpace.width));\n this.numColumns = Math.max(1, Math.min(this.maxColumns, columns));\n\n\n // Compute the available width (minus the space between items)\n let width = availableWidth - (this.minSpace.width * (this.numColumns - 1));\n\n // Compute the item width based on the space available\n let itemWidth = Math.round(width / this.numColumns);\n itemWidth = Math.max(this.minItemSize.width, Math.min(this.maxItemSize.width, itemWidth));\n this.itemWidth = itemWidth;\n\n // Compute the horizontal spacing\n // if only one column, we cannot divide by zero, so set it to 1\n let horizontalSpacing = Math.round((availableWidth - this.numColumns * itemWidth) / Math.max(1, this.numColumns - 1));\n this.horizontalSpacing = horizontalSpacing;\n\n // Setup an array of column heights\n let columnHeights = Array(this.numColumns).fill(this.margin);\n for (let node of this.collection) {\n let key = node.key;\n // Compute the height of the item. Use the existing height if available,\n // otherwise call the delegate to estimate the size.\n let oldLayoutInfo = this.layoutInfos.get(key);\n let height;\n let estimatedSize = true;\n if (oldLayoutInfo) {\n height = oldLayoutInfo.rect.height;\n estimatedSize = invalidationContext.sizeChanged || oldLayoutInfo.estimatedSize;\n } else if (node.props.width && node.props.height) {\n let nodeWidth = node.props.width;\n let nodeHeight = node.props.height;\n let scaledHeight = Math.round(nodeHeight * ((itemWidth) / nodeWidth));\n height = Math.max(this.minItemSize.height, Math.min(this.maxItemSize.height, scaledHeight));\n } else {\n height = itemWidth;\n }\n\n // Figure out which column to place the item in, and compute its position.\n let column = this.getNextColumnIndex(columnHeights);\n let x = this.margin + column * (itemWidth + horizontalSpacing);\n let y = columnHeights[column];\n\n let rect = new Rect(x, y, itemWidth, height);\n let layoutInfo = new LayoutInfo(node.type, key, rect);\n layoutInfo.estimatedSize = estimatedSize;\n layoutInfo.allowOverflow = true;\n this.layoutInfos.set(key, layoutInfo);\n\n // TODO: From v2 figure out this bit, when does this get called and what to replace this.collectionView._transaction with?\n // Removing it from v2 doesn't seem to do anything?\n // if (layoutInfo.estimatedSize && !invalidationContext.contentChanged && !this.collectionView._transaction) {\n // this.updateItemSize(new IndexPath(section, i));\n // }\n\n columnHeights[column] += layoutInfo.rect.height + this.minSpace.height;\n }\n\n // Reset all columns to the maximum for the next section\n let maxHeight = Math.max.apply(Math, columnHeights) - this.minSpace.height + this.margin;\n columnHeights.fill(maxHeight);\n let y = columnHeights[0];\n\n if (this.isLoading) {\n let loaderY = y;\n let loaderHeight = 60;\n // If there aren't any items, make loader take all avaliable room and remove margin from y calculation\n // so it doesn't scroll\n if (this.collection.size === 0) {\n loaderY = 0;\n loaderHeight = this.virtualizer.visibleRect.height || 60;\n }\n\n let rect = new Rect(0, loaderY, this.virtualizer.visibleRect.width, loaderHeight);\n let loader = new LayoutInfo('loader', 'loader', rect);\n this.layoutInfos.set('loader', loader);\n y = loader.rect.maxY;\n }\n\n if (this.collection.size === 0 && !this.isLoading) {\n let rect = new Rect(0, 0, this.virtualizer.visibleRect.width, this.virtualizer.visibleRect.height);\n let placeholder = new LayoutInfo('placeholder', 'placeholder', rect);\n this.layoutInfos.set('placeholder', placeholder);\n y = placeholder.rect.maxY;\n }\n\n this.contentSize = new Size(this.virtualizer.visibleRect.width, y);\n }\n\n updateItemSize(key: Key, size: Size) {\n let layoutInfo = this.layoutInfos.get(key);\n if (!size || !layoutInfo) {\n return false;\n }\n\n if (size.height !== layoutInfo.rect.height) {\n // TODO: also not sure about copying layout info vs mutating it. Listlayout does the below\n // but I feel that is because it actually maintained a layoutNode map cache which this doesn't have\n let newLayoutInfo = layoutInfo.copy();\n newLayoutInfo.rect.height = size.height < 600 ? size.height : 600;\n newLayoutInfo.estimatedSize = false;\n this.layoutInfos.set(key, newLayoutInfo);\n return true;\n }\n\n return false;\n }\n\n getNextColumnIndex(columnHeights) {\n let minIndex = 0;\n for (let i = 0; i < columnHeights.length; i++) {\n if (columnHeights[i] < columnHeights[minIndex]) {\n minIndex = i;\n }\n }\n\n return minIndex;\n }\n\n getClosestRight(key: Key) {\n let layoutInfo = this.getLayoutInfo(key);\n // Refactored from v2. Current strategy is to find the closest card in the adjacent column.\n // This prevent the issue where it was possible that the closest layoutInfo would be two columns over due to the middle card being exceptionally tall\n // and thus the top corner to top corner distance was massive.\n\n // First look for a card to the immediate right of the current card. If we can't find any, look for the nearest card in the entire column to the right of the card\n let rect = new Rect(layoutInfo.rect.maxX + 1, layoutInfo.rect.y, layoutInfo.rect.width + this.horizontalSpacing, layoutInfo.rect.height);\n key = this._findClosest(layoutInfo.rect, rect)?.key;\n\n if (!key) {\n rect = new Rect(layoutInfo.rect.maxX + 1, 0, layoutInfo.rect.width + this.horizontalSpacing, this.virtualizer.contentSize.height);\n key = this._findClosest(layoutInfo.rect, rect)?.key;\n }\n\n return this.collection.getItem(key)?.childNodes[0]?.key;\n }\n\n getClosestLeft(key: Key) {\n let layoutInfo = this.getLayoutInfo(key);\n // First look for a card to the immediate left of the current card. If we can't find any, look for the nearest card in the entire column to the left of the card\n let rect = new Rect(layoutInfo.rect.x - layoutInfo.rect.width - this.horizontalSpacing - 1, layoutInfo.rect.y, layoutInfo.rect.width + this.horizontalSpacing, layoutInfo.rect.height);\n key = this._findClosest(layoutInfo.rect, rect)?.key;\n\n if (!key) {\n rect = new Rect(layoutInfo.rect.x - layoutInfo.rect.width - this.horizontalSpacing - 1, 0, layoutInfo.rect.width + this.horizontalSpacing, this.virtualizer.contentSize.height);\n key = this._findClosest(layoutInfo.rect, rect)?.key;\n }\n\n return this.collection.getItem(key)?.childNodes[0]?.key;\n }\n\n getKeyRightOf(key: Key) {\n // Expected key is the currently focused cell so we need the parent row key\n let parentRowKey = this.collection.getItem(key).parentKey;\n return this.direction === 'rtl' ? this.getClosestLeft(parentRowKey) : this.getClosestRight(parentRowKey);\n }\n\n getKeyLeftOf(key: Key) {\n // Expected key is the currently focused cell so we need the parent row key\n let parentRowKey = this.collection.getItem(key).parentKey;\n return this.direction === 'rtl' ? this.getClosestRight(parentRowKey) : this.getClosestLeft(parentRowKey);\n }\n}\n","/*\n * Copyright 2021 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 {CardBase} from './CardBase';\nimport {DOMRef, DOMRefValue, ItemProps} from '@react-types/shared';\nimport {PartialNode} from '@react-stately/collections';\nimport React, {forwardRef, ForwardRefExoticComponent, PropsWithoutRef, RefAttributes} from 'react';\nimport {SpectrumCardProps} from '@react-types/card';\nimport {useCardViewContext} from './CardViewContext';\n\n\nlet Card = forwardRef((props: SpectrumCardProps, ref: DOMRef<HTMLDivElement>) => {\n let context = useCardViewContext();\n if (context !== null) {\n return null;\n } else {\n return (\n <CardBase {...props} ref={ref} />\n );\n }\n});\n\n// @ts-ignore\nCard.getCollectionNode = function* getCollectionNode<T>(props: any): Generator<PartialNode<T>> {\n let {children, textValue} = props;\n\n yield {\n type: 'item',\n props: props,\n rendered: children,\n 'aria-label': props['aria-label'],\n hasChildNodes: false,\n textValue\n };\n};\n\nlet _Card = Card as ForwardRefExoticComponent<ItemProps<SpectrumCardProps> & PropsWithoutRef<SpectrumCardProps> & RefAttributes<DOMRefValue<HTMLDivElement>>>;\nexport {_Card as Card};\n"],"names":[],"version":3,"file":"module.mjs.map"}
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C;ACZ1C;;;;;;;;;;ACAA;;;;;;;;;;CAUC,GAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACZA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,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,iBAAU,AAAD,EAAE,CAAC,OAA0B,MAAgC;IAC/E,IAAI,UAAU,CAAA,GAAA,yCAAkB,AAAD;IAC/B,IAAI,YAAY,IAAI,EAClB,OAAO,IAAI;SAEX,qBACE,gCAAC,CAAA,GAAA,yCAAQ,AAAD;QAAG,GAAG,KAAK;QAAE,KAAK;;AAGhC;AAEA,aAAa;AACb,2BAAK,iBAAiB,GAAG,UAAU,kBAAqB,KAAU,EAA6B;IAC7F,IAAI,YAAC,SAAQ,aAAE,UAAS,EAAC,GAAG;IAE5B,MAAM;QACJ,MAAM;QACN,OAAO;QACP,UAAU;QACV,cAAc,KAAK,CAAC,aAAa;QACjC,eAAe,KAAK;mBACpB;IACF;AACF;AAEA,IAAI,4CAAQ;;","sources":["packages/@react-spectrum/card/src/index.ts","packages/@react-spectrum/card/src/CardView.tsx","packages/@react-spectrum/card/src/CardBase.tsx","packages/@adobe/spectrum-css-temp/components/card/vars.css","packages/@react-spectrum/card/src/CardViewContext.tsx","packages/@react-spectrum/card/intl/*.js","packages/@react-spectrum/card/intl/ar-AE.json","packages/@react-spectrum/card/intl/bg-BG.json","packages/@react-spectrum/card/intl/cs-CZ.json","packages/@react-spectrum/card/intl/da-DK.json","packages/@react-spectrum/card/intl/de-DE.json","packages/@react-spectrum/card/intl/el-GR.json","packages/@react-spectrum/card/intl/en-US.json","packages/@react-spectrum/card/intl/es-ES.json","packages/@react-spectrum/card/intl/et-EE.json","packages/@react-spectrum/card/intl/fi-FI.json","packages/@react-spectrum/card/intl/fr-FR.json","packages/@react-spectrum/card/intl/he-IL.json","packages/@react-spectrum/card/intl/hr-HR.json","packages/@react-spectrum/card/intl/hu-HU.json","packages/@react-spectrum/card/intl/it-IT.json","packages/@react-spectrum/card/intl/ja-JP.json","packages/@react-spectrum/card/intl/ko-KR.json","packages/@react-spectrum/card/intl/lt-LT.json","packages/@react-spectrum/card/intl/lv-LV.json","packages/@react-spectrum/card/intl/nb-NO.json","packages/@react-spectrum/card/intl/nl-NL.json","packages/@react-spectrum/card/intl/pl-PL.json","packages/@react-spectrum/card/intl/pt-BR.json","packages/@react-spectrum/card/intl/pt-PT.json","packages/@react-spectrum/card/intl/ro-RO.json","packages/@react-spectrum/card/intl/ru-RU.json","packages/@react-spectrum/card/intl/sk-SK.json","packages/@react-spectrum/card/intl/sl-SI.json","packages/@react-spectrum/card/intl/sr-SP.json","packages/@react-spectrum/card/intl/sv-SE.json","packages/@react-spectrum/card/intl/tr-TR.json","packages/@react-spectrum/card/intl/uk-UA.json","packages/@react-spectrum/card/intl/zh-CN.json","packages/@react-spectrum/card/intl/zh-TW.json","packages/@react-spectrum/card/src/GalleryLayout.tsx","packages/@react-spectrum/card/src/BaseLayout.tsx","packages/@react-spectrum/card/src/GridLayout.tsx","packages/@react-spectrum/card/src/WaterfallLayout.tsx","packages/@react-spectrum/card/src/Card.tsx"],"sourcesContent":["/*\n * Copyright 2021 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 type {GalleryLayoutOptions} from './GalleryLayout';\nexport type {GridLayoutOptions} from './GridLayout';\nexport type {WaterfallLayoutOptions} from './WaterfallLayout';\n\nexport {CardView} from './CardView';\nexport {GalleryLayout} from './GalleryLayout';\nexport {GridLayout} from './GridLayout';\nexport {WaterfallLayout} from './WaterfallLayout';\nexport {Card} from './Card';\nexport type {SpectrumCardViewProps} from '@react-types/card';\n","/*\n * Copyright 2021 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 {CardBase} from './CardBase';\nimport {CardViewContext, useCardViewContext} from './CardViewContext';\nimport {classNames, useDOMRef, useStyleProps, useUnwrapDOMRef} from '@react-spectrum/utils';\nimport {DOMRef, DOMRefValue, Node} from '@react-types/shared';\nimport {GridCollection, useGridState} from '@react-stately/grid';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {mergeProps} from '@react-aria/utils';\nimport {ProgressCircle} from '@react-spectrum/progress';\nimport React, {ReactElement, useCallback, useMemo, useRef} from 'react';\nimport {ReusableView} from '@react-stately/virtualizer';\nimport {SpectrumCardViewProps} from '@react-types/card';\nimport styles from '@adobe/spectrum-css-temp/components/card/vars.css';\nimport {useCollator, useLocale, useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useGrid, useGridCell, useGridRow} from '@react-aria/grid';\nimport {useListState} from '@react-stately/list';\nimport {useProvider} from '@react-spectrum/provider';\nimport {Virtualizer, VirtualizerItem} from '@react-aria/virtualizer';\n\nfunction CardView<T extends object>(props: SpectrumCardViewProps<T>, ref: DOMRef<HTMLDivElement>) {\n let {scale} = useProvider();\n let {styleProps} = useStyleProps(props);\n let domRef = useDOMRef(ref);\n let {\n isQuiet,\n renderEmptyState,\n layout,\n loadingState,\n onLoadMore,\n cardOrientation = 'vertical'\n } = props;\n\n let collator = useCollator({usage: 'search', sensitivity: 'base'});\n let isLoading = loadingState === 'loading' || loadingState === 'loadingMore';\n let cardViewLayout = useMemo(() => typeof layout === 'function' ? new layout({collator, cardOrientation, scale}) : layout, [layout, collator, cardOrientation, scale]);\n let layoutType = cardViewLayout.layoutType;\n\n let stringFormatter = useLocalizedStringFormatter(intlMessages);\n let {direction} = useLocale();\n let {collection} = useListState(props);\n\n let gridCollection = useMemo(() => new GridCollection<T>({\n columnCount: 1,\n items: [...collection].map(item => ({\n // Makes the Grid row use the keys the user provides to the cards so that selection change via interactions returns the card keys\n ...item,\n hasChildNodes: true,\n childNodes: [{\n key: `cell-${item.key}`,\n type: 'cell',\n value: null,\n level: 0,\n rendered: null,\n textValue: item.textValue,\n hasChildNodes: false,\n childNodes: []\n }]\n }))\n }), [collection]);\n\n let state = useGridState({\n ...props,\n selectionMode: cardOrientation === 'horizontal' && layoutType === 'grid' ? 'none' : props.selectionMode,\n collection: gridCollection,\n focusMode: 'cell'\n });\n\n cardViewLayout.collection = gridCollection;\n cardViewLayout.disabledKeys = state.disabledKeys;\n cardViewLayout.isLoading = isLoading;\n cardViewLayout.direction = direction;\n\n let {gridProps} = useGrid({\n ...props,\n isVirtualized: true,\n keyboardDelegate: cardViewLayout\n }, state, domRef);\n\n type View = ReusableView<Node<T>, unknown>;\n let renderWrapper = (parent: View, reusableView: View) => (\n <VirtualizerItem\n key={reusableView.key}\n reusableView={reusableView}\n parent={parent} />\n );\n\n let focusedKey = state.selectionManager.focusedKey;\n let focusedItem = gridCollection.getItem(state.selectionManager.focusedKey);\n if (focusedItem?.parentKey != null) {\n focusedKey = focusedItem.parentKey;\n }\n\n let margin = cardViewLayout.margin || 0;\n let virtualizer = cardViewLayout.virtualizer;\n let scrollToItem = useCallback((key) => {\n virtualizer && virtualizer.scrollToItem(key, {\n duration: 0,\n offsetY: margin\n });\n }, [margin, virtualizer]);\n\n // TODO: does aria-row count and aria-col count need to be modified? Perhaps aria-col count needs to be omitted\n return (\n <CardViewContext.Provider value={{state, isQuiet, layout: cardViewLayout, cardOrientation}}>\n <Virtualizer\n {...gridProps}\n {...styleProps}\n className={classNames(styles, 'spectrum-CardView')}\n ref={domRef}\n focusedKey={focusedKey}\n scrollDirection=\"vertical\"\n layout={cardViewLayout}\n collection={gridCollection}\n isLoading={isLoading}\n onLoadMore={onLoadMore}\n renderWrapper={renderWrapper}\n transitionDuration={isLoading ? 160 : 220}\n scrollToItem={scrollToItem}>\n {(type, item) => {\n if (type === 'item') {\n return (\n <InternalCard item={item} />\n );\n } else if (type === 'loader') {\n return (\n <CenteredWrapper>\n <ProgressCircle\n isIndeterminate\n aria-label={state.collection.size > 0 ? stringFormatter.format('loadingMore') : stringFormatter.format('loading')} />\n </CenteredWrapper>\n );\n } else if (type === 'placeholder') {\n let emptyState = renderEmptyState ? renderEmptyState() : null;\n if (emptyState == null) {\n return null;\n }\n\n return (\n <CenteredWrapper>\n {emptyState}\n </CenteredWrapper>\n );\n }\n }}\n </Virtualizer>\n </CardViewContext.Provider>\n\n );\n}\n\nfunction CenteredWrapper({children}) {\n let {state} = useCardViewContext();\n return (\n <div\n role=\"row\"\n aria-rowindex={state.collection.size + 1}\n className={classNames(styles, 'spectrum-CardView-centeredWrapper')}>\n <div role=\"gridcell\">\n {children}\n </div>\n </div>\n );\n}\n\nfunction InternalCard(props) {\n let {\n item\n } = props;\n let cellNode = [...item.childNodes][0];\n let {state, cardOrientation, isQuiet, layout} = useCardViewContext();\n\n let layoutType = layout.layoutType;\n let rowRef = useRef();\n let cellRef = useRef<DOMRefValue<HTMLDivElement>>();\n let unwrappedRef = useUnwrapDOMRef(cellRef);\n\n let {rowProps: gridRowProps} = useGridRow({\n node: item,\n isVirtualized: true\n }, state, rowRef);\n\n let {gridCellProps} = useGridCell({\n node: cellNode,\n focusMode: 'cell'\n }, state, unwrappedRef);\n\n // Prevent space key from scrolling the CardView if triggered on a disabled item or on a Card in a selectionMode=\"none\" CardView.\n let allowsInteraction = state.selectionManager.selectionMode !== 'none';\n let isDisabled = !allowsInteraction || state.disabledKeys.has(item.key);\n\n let onKeyDown = (e) => {\n if (e.key === ' ' && isDisabled) {\n e.preventDefault();\n }\n };\n\n let rowProps = mergeProps(\n gridRowProps,\n {onKeyDown}\n );\n\n if (layoutType === 'grid' || layoutType === 'gallery') {\n isQuiet = true;\n }\n\n if (layoutType !== 'grid') {\n cardOrientation = 'vertical';\n }\n\n // We don't want to focus the checkbox (or any other focusable elements) within the Card\n // when pressing the arrow keys so we delete the key down handler here. Arrow key navigation between\n // the cards in the CardView is handled by useGrid => useSelectableCollection instead.\n delete gridCellProps.onKeyDownCapture;\n return (\n <div {...rowProps} ref={rowRef} className={classNames(styles, 'spectrum-CardView-row')}>\n <CardBase\n ref={cellRef}\n articleProps={gridCellProps}\n isQuiet={isQuiet}\n orientation={cardOrientation}\n item={item}\n layout={layoutType}>\n {item.rendered}\n </CardBase>\n </div>\n );\n}\n\n/**\n * TODO: Add description of component here.\n */\nconst _CardView = React.forwardRef(CardView) as <T>(props: SpectrumCardViewProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;\nexport {_CardView as CardView};\n","/*\n * Copyright 2021 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 {AriaCardProps, SpectrumCardProps} from '@react-types/card';\nimport {Checkbox} from '@react-spectrum/checkbox';\nimport {classNames, SlotProvider, useDOMRef, useHasChild, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef, Node} from '@react-types/shared';\nimport {filterDOMProps, mergeProps, useLayoutEffect, useResizeObserver, useSlotId} from '@react-aria/utils';\nimport {FocusRing} from '@react-aria/focus';\nimport {getFocusableTreeWalker} from '@react-aria/focus';\nimport React, {HTMLAttributes, useCallback, useMemo, useRef, useState} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/card/vars.css';\nimport {useCardViewContext} from './CardViewContext';\nimport {useFocusWithin, useHover} from '@react-aria/interactions';\nimport {useProviderProps} from '@react-spectrum/provider';\n\ninterface CardBaseProps<T> extends SpectrumCardProps {\n articleProps?: HTMLAttributes<HTMLElement>,\n item?: Node<T>\n}\n\nfunction CardBase<T extends object>(props: CardBaseProps<T>, ref: DOMRef<HTMLDivElement>) {\n props = useProviderProps(props);\n let context = useCardViewContext() || {}; // we can call again here, won't change from Card.tsx\n let {state} = context;\n let manager = state?.selectionManager;\n let {\n isQuiet,\n orientation = 'vertical',\n articleProps = {},\n item,\n layout,\n children\n } = props;\n\n let key = item?.key;\n let isSelected = manager?.isSelected(key);\n let isDisabled = state?.disabledKeys.has(key);\n let onChange = () => manager?.select(key);\n\n let {styleProps} = useStyleProps(props);\n let {cardProps, titleProps, contentProps} = useCard(props);\n let domRef = useDOMRef(ref);\n let gridRef = useRef<HTMLDivElement>();\n let checkboxRef = useRef(null);\n\n // cards are only interactive if there is a selection manager and it allows selection\n let {hoverProps, isHovered} = useHover({isDisabled: manager === undefined || manager?.selectionMode === 'none' || isDisabled});\n let [isFocused, setIsFocused] = useState(false);\n let {focusWithinProps} = useFocusWithin({\n onFocusWithinChange: setIsFocused,\n isDisabled\n });\n\n // ToDo: see css for comment about avatar under selector .spectrum-Card--noLayout.spectrum-Card--default\n let hasPreviewImage = useHasChild(`.${styles['spectrum-Card-image']}`, gridRef);\n let hasPreviewIllustration = useHasChild(`.${styles['spectrum-Card-illustration']}`, gridRef);\n let hasPreview = hasPreviewImage || hasPreviewIllustration;\n\n // this is for horizontal cards\n let [height, setHeight] = useState(NaN);\n let updateHeight = useCallback(() => {\n if (orientation !== 'horizontal') {\n return;\n }\n\n let cardHeight = gridRef.current.getBoundingClientRect().height;\n setHeight(cardHeight);\n }, [orientation, gridRef, setHeight]);\n useResizeObserver({ref: gridRef, onResize: updateHeight});\n\n let aspectRatioEnforce = undefined;\n if (orientation === 'horizontal' && !isNaN(height)) {\n aspectRatioEnforce = {\n height: `${height}px`,\n width: `${height}px`\n };\n }\n\n let slots = useMemo(() => ({\n image: {UNSAFE_className: classNames(styles, 'spectrum-Card-image'), objectFit: orientation === 'horizontal' ? 'cover' : 'contain', alt: '', ...aspectRatioEnforce},\n illustration: {UNSAFE_className: classNames(styles, 'spectrum-Card-illustration'), ...aspectRatioEnforce},\n avatar: {UNSAFE_className: classNames(styles, 'spectrum-Card-avatar'), size: 'avatar-size-400'},\n heading: {UNSAFE_className: classNames(styles, 'spectrum-Card-heading'), ...titleProps},\n content: {UNSAFE_className: classNames(styles, 'spectrum-Card-content'), ...contentProps},\n detail: {UNSAFE_className: classNames(styles, 'spectrum-Card-detail')}\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }), [titleProps, contentProps, height, isQuiet, orientation]);\n\n useLayoutEffect(() => {\n if (gridRef?.current) {\n let walker = getFocusableTreeWalker(gridRef.current);\n let nextNode = walker.nextNode();\n while (nextNode != null) {\n if (checkboxRef.current && !checkboxRef.current.UNSAFE_getDOMNode().contains(nextNode)) {\n console.warn('Card does not support focusable elements, please contact the team regarding your use case.');\n break;\n }\n nextNode = walker.nextNode();\n }\n }\n }, [children]);\n\n return (\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')}>\n <article\n {...styleProps}\n {...mergeProps(cardProps, focusWithinProps, hoverProps, filterDOMProps(props), articleProps)}\n ref={domRef}\n className={classNames(styles, 'spectrum-Card', {\n 'spectrum-Card--default': !isQuiet && orientation !== 'horizontal',\n 'spectrum-Card--isQuiet': isQuiet && orientation !== 'horizontal',\n 'spectrum-Card--horizontal': orientation === 'horizontal',\n 'spectrum-Card--noPreview': !hasPreview,\n 'is-hovered': isHovered,\n 'is-focused': isFocused,\n 'is-selected': isSelected,\n 'spectrum-Card--waterfall': layout === 'waterfall',\n 'spectrum-Card--gallery': layout === 'gallery',\n 'spectrum-Card--grid': layout === 'grid',\n 'spectrum-Card--noLayout': layout !== 'waterfall' && layout !== 'gallery' && layout !== 'grid'\n }, styleProps.className)}>\n <div ref={gridRef} className={classNames(styles, 'spectrum-Card-grid')}>\n {manager && manager.selectionMode !== 'none' && (\n <div className={classNames(styles, 'spectrum-Card-checkboxWrapper')}>\n <Checkbox\n ref={checkboxRef}\n isDisabled={isDisabled}\n excludeFromTabOrder\n isSelected={isSelected}\n onChange={onChange}\n UNSAFE_className={classNames(styles, 'spectrum-Card-checkbox')}\n isEmphasized\n aria-label=\"select\" />\n </div>\n )}\n <SlotProvider slots={slots}>\n {children}\n </SlotProvider>\n <div className={classNames(styles, 'spectrum-Card-decoration')} />\n </div>\n </article>\n </FocusRing>\n );\n}\n\ninterface AriaCardOptions extends AriaCardProps {\n}\n\ninterface CardAria {\n cardProps: HTMLAttributes<HTMLDivElement>,\n titleProps: HTMLAttributes<HTMLDivElement>,\n contentProps: HTMLAttributes<HTMLDivElement>\n}\n\nfunction useCard(props: AriaCardOptions): CardAria {\n let titleId = useSlotId();\n let descriptionId = useSlotId();\n let titleProps = useMemo(() => ({\n id: titleId\n }), [titleId]);\n let contentProps = useMemo(() => ({\n id: descriptionId\n }), [descriptionId]);\n\n return {\n cardProps: {\n ...filterDOMProps(props),\n 'aria-labelledby': titleId,\n 'aria-describedby': descriptionId,\n tabIndex: 0\n },\n titleProps,\n contentProps\n };\n}\n\n/**\n * TODO: Add description of component here.\n */\nconst _CardBase = React.forwardRef(CardBase);\nexport {_CardBase as CardBase};\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 React, {useContext} from 'react';\n\nexport const CardViewContext = React.createContext(null);\n\nexport function useCardViewContext() {\n return useContext(CardViewContext);\n}\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\": \"Wird geladen...\",\n \"loadingMore\": \"Noch mehr wird geladen...\"\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 en cours…\",\n \"loadingMore\": \"Chargement d’autres d’éléments…\"\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\": \"Wczytywanie...\",\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 dodatne 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 2021 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 {BaseLayout, BaseLayoutOptions} from './BaseLayout';\nimport {LayoutInfo, Rect, Size} from '@react-stately/virtualizer';\n\nexport interface GalleryLayoutOptions extends BaseLayoutOptions {\n // /**\n // * The card size in the grid.\n // */\n // cardSize?: 'S' | 'M' | 'L',\n /**\n * The the default row height. Note this must be larger than the min item height.\n * @default 208\n */\n idealRowHeight?: number,\n /**\n * The spacing between items.\n * @default 18 x 18\n */\n itemSpacing?: Size,\n /**\n * The vertical padding for an item.\n * @default 78\n */\n itemPadding?: number,\n /**\n * Minimum size for a item in the grid.\n * @default 136 x 136\n */\n minItemSize?: Size,\n /**\n * Target for adding extra weight to elements during linear partitioning. Anything with an aspect ratio smaler than this value\n * will be targeted.\n * @type {number}\n */\n threshold?: number\n}\n\nconst DEFAULT_OPTIONS = {\n S: {\n idealRowHeight: 112,\n minItemSize: new Size(96, 96),\n itemSpacing: new Size(8, 16),\n itemPadding: 24,\n dropSpacing: 50,\n margin: 8\n },\n L: {\n idealRowHeight: 208,\n minItemSize: new Size(136, 136),\n itemSpacing: new Size(18, 18),\n itemPadding: {\n 'medium': 78,\n 'large': 99\n },\n dropSpacing: 100,\n margin: 24\n }\n};\n\nexport class GalleryLayout<T> extends BaseLayout<T> {\n protected idealRowHeight: number;\n protected itemSpacing: Size;\n itemPadding: number;\n protected minItemSize: Size;\n protected threshold: number;\n\n constructor(options: GalleryLayoutOptions = {}) {\n super(options);\n let cardSize = 'L';\n this.idealRowHeight = options.idealRowHeight || DEFAULT_OPTIONS[cardSize].idealRowHeight;\n this.itemSpacing = options.itemSpacing || DEFAULT_OPTIONS[cardSize].itemSpacing;\n this.itemPadding = options.itemPadding != null ? options.itemPadding : DEFAULT_OPTIONS[cardSize].itemPadding[this.scale];\n this.minItemSize = options.minItemSize || DEFAULT_OPTIONS[cardSize].minItemSize;\n this.threshold = options.threshold || 1;\n this.margin = options.margin != null ? options.margin : DEFAULT_OPTIONS[cardSize].margin;\n }\n\n get layoutType() {\n return 'gallery';\n }\n\n /**\n * Takes a row of widths and if there are any widths smaller than the min-width, leech width starting from\n * the widest in the row until it can't give anymore, then move to the second widest and so forth.\n * Do this until all assets meet the min-width.\n * */\n _distributeWidths(widths) {\n // create a copy of the widths array and sort it largest to smallest\n let sortedWidths = widths.concat().sort((a, b) => a[1] > b[1] ? -1 : 1);\n for (let width of widths) {\n // for each width, if it's smaller than the min width\n if (width[1] < this.minItemSize.width) {\n // then figure out how much smaller\n let delta = this.minItemSize.width - width[1];\n for (let item of sortedWidths) {\n // go from the largest width in the row to the smallest\n // if the width is greater than the min width\n if (widths[item[0]][1] > this.minItemSize.width) {\n // subtract the delta from the width, if it's still greater than the min width\n // then we have finished, subtract the delta permanently from that width\n // eslint-disable-next-line max-depth\n if (widths[item[0]][1] - delta > this.minItemSize.width) {\n widths[item[0]][1] -= delta;\n delta = 0;\n break;\n } else {\n // otherwise, we take as much as we can from the current width and then move on to\n // the next largest and take some width from it\n let maxChange = widths[item[0]][1] - this.minItemSize.width;\n delta -= maxChange;\n widths[item[0]][1] -= maxChange;\n }\n }\n }\n if (delta > 0) {\n return false;\n }\n // force the width to be the min width that we just rebalanced for\n width[1] = this.minItemSize.width;\n }\n }\n return true;\n }\n\n buildCollection() {\n let visibleWidth = this.virtualizer.visibleRect.width;\n let visibleHeight = this.virtualizer.visibleRect.height;\n let y = this.margin;\n let availableWidth = visibleWidth - this.margin * 2;\n\n // If avaliable width is not greater than 0, skip node layout calculations\n if (availableWidth > 0) {\n // Compute aspect ratios for all of the items, and the total width if all items were on in a single row.\n let ratios = [];\n let totalWidth = 0;\n let minRatio = this.minItemSize.width / this.minItemSize.height;\n let maxRatio = availableWidth / this.minItemSize.height;\n\n for (let node of this.collection) {\n let ratio = node.props.width / node.props.height;\n if (ratio < minRatio) {\n ratio = minRatio;\n } else if (ratio > maxRatio && ratio !== minRatio) {\n ratio = maxRatio;\n }\n\n let itemWidth = ratio * this.minItemSize.height;\n ratios.push(ratio);\n totalWidth += itemWidth;\n }\n\n totalWidth += this.itemSpacing.width * (this.collection.size - 1);\n\n // Determine how many rows we'll need, and partition the items into rows\n // using the aspect ratios as weights.\n let rows = Math.max(1, Math.ceil(totalWidth / availableWidth));\n // if the available width can't hold two items, then every item will get its own row\n // this leads to a faster run through linear partition and more dependable output for small row widths\n if (availableWidth <= (this.minItemSize.width * 2) + (this.itemPadding * 2)) {\n rows = this.collection.size;\n }\n\n let weightedRatios = ratios.map(ratio => ratio < this.threshold ? ratio + (0.5 * (1 / ratio)) : ratio);\n let partition = linearPartition(weightedRatios, rows);\n\n let index = 0;\n for (let row of partition) {\n // Compute the total weight for this row\n let totalWeight = 0;\n for (let j = index; j < index + row.length; j++) {\n totalWeight += ratios[j];\n }\n\n // Determine the row height based on the total available width and weight of this row.\n let bestRowHeight = (availableWidth - (row.length - 1) * this.itemSpacing.width) / totalWeight;\n\n // if this is the last row and the row height is >2x the ideal row height, then cap to the ideal height\n // probably doing this because if the last row has one extremely tall image, then the row becomes huge\n // though that can happen anywhere if a row has lots of tall images... so i'm not sure why this one matters\n if (row === partition[partition.length - 1] && bestRowHeight > this.idealRowHeight * 2) {\n bestRowHeight = this.idealRowHeight;\n }\n let itemHeight = Math.round(bestRowHeight) + this.itemPadding;\n let x = this.margin;\n\n // if any items are going to end up too small, add a bit of width to them and subtract it from wider objects\n let widths = [];\n for (let j = index; j < index + row.length; j++) {\n let width = Math.round(bestRowHeight * ratios[j]);\n widths.push([j - index, width]);\n }\n this._distributeWidths(widths);\n\n // Create items for this row.\n for (let j = index; j < index + row.length; j++) {\n let node = this.collection.rows[j];\n let itemWidth = Math.max(widths[j - index][1], this.minItemSize.width);\n let rect = new Rect(x, y, itemWidth, itemHeight);\n let layoutInfo = new LayoutInfo(node.type, node.key, rect);\n layoutInfo.allowOverflow = true;\n this.layoutInfos.set(node.key, layoutInfo);\n x += itemWidth + this.itemSpacing.width;\n }\n\n y += itemHeight + this.itemSpacing.height;\n index += row.length;\n }\n\n if (this.isLoading) {\n let loaderY = y;\n let loaderHeight = 60;\n // If there aren't any items, make loader take all avaliable room and remove margin from y calculation\n // so it doesn't scroll\n if (this.collection.size === 0) {\n loaderY = 0;\n loaderHeight = visibleHeight || 60;\n }\n\n let rect = new Rect(0, loaderY, visibleWidth, loaderHeight);\n let loader = new LayoutInfo('loader', 'loader', rect);\n this.layoutInfos.set('loader', loader);\n y = loader.rect.maxY;\n }\n\n if (this.collection.size === 0 && !this.isLoading) {\n let rect = new Rect(0, 0, visibleWidth, visibleHeight);\n let placeholder = new LayoutInfo('placeholder', 'placeholder', rect);\n this.layoutInfos.set('placeholder', placeholder);\n y = placeholder.rect.maxY;\n }\n }\n this.contentSize = new Size(visibleWidth, y);\n }\n}\n\n// https://www8.cs.umu.se/kurser/TDBA77/VT06/algorithms/BOOK/BOOK2/NODE45.HTM\nfunction linearPartition(seq, k) {\n let n = seq.length;\n if (k <= 0) {\n return [];\n }\n\n if (k >= n) {\n return seq.map(x => [x]);\n }\n\n if (n === 1) {\n return [seq];\n }\n\n let table = Array(n).fill(0).map(() => Array(k).fill(0));\n let solution = Array(n - 1).fill(0).map(() => Array(k - 1).fill(0));\n\n for (let i = 0; i < n; i++) {\n table[i][0] = seq[i] + (i > 0 ? table[i - 1][0] : 0);\n }\n\n for (let i = 0; i < k; i++) {\n table[0][i] = seq[0];\n }\n\n for (let i = 1; i < n; i++) {\n for (let j = 1; j < k; j++) {\n let currentMin = 0;\n let minX = Infinity;\n\n for (let x = 0; x < i; x++) {\n let c1 = table[x][j - 1];\n let c2 = table[i][0] - table[x][0];\n let cost = Math.max(c1, c2);\n\n if (!x || cost < currentMin) {\n currentMin = cost;\n minX = x;\n }\n }\n\n table[i][j] = currentMin;\n solution[i - 1][j - 1] = minX;\n }\n }\n\n n = n - 1;\n k = k - 2;\n\n let result = [];\n while (k >= 0) {\n if (n >= 1) {\n let row = [];\n for (let i = solution[n - 1][k] + 1; i < n + 1; i++) {\n row.push(seq[i]);\n }\n\n result.unshift(row);\n n = solution[n - 1][k];\n }\n\n k--;\n }\n\n let row = [];\n for (let i = 0; i < n + 1; i++) {\n row.push(seq[i]);\n }\n\n result.unshift(row);\n\n return result;\n}\n","/*\n * Copyright 2021 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 {Direction, KeyboardDelegate, Node} from '@react-types/shared';\nimport {GridCollection} from '@react-stately/grid';\nimport {InvalidationContext, Layout, LayoutInfo, Rect, Size} from '@react-stately/virtualizer';\nimport {Key} from 'react';\nimport {Scale} from '@react-types/provider';\n\nexport interface BaseLayoutOptions {\n collator?: Intl.Collator,\n // TODO: is this valid or is scale a spectrum specific thing that should be left out of the layouts?\n scale?: Scale,\n /**\n * The margin around the grid view between the edges and the items.\n * @default 24\n */\n margin?: number\n}\n\nexport class BaseLayout<T> extends Layout<Node<T>> implements KeyboardDelegate {\n protected contentSize: Size;\n protected layoutInfos: Map<Key, LayoutInfo>;\n protected collator: Intl.Collator;\n protected lastCollection: GridCollection<T>;\n collection: GridCollection<T>;\n isLoading: boolean;\n disabledKeys: Set<Key> = new Set();\n direction: Direction;\n scale: Scale;\n margin: number;\n\n constructor(options: BaseLayoutOptions = {}) {\n super();\n this.layoutInfos = new Map();\n this.collator = options.collator;\n this.lastCollection = null;\n this.scale = options.scale || 'medium';\n this.margin = options.margin || 24;\n }\n\n validate(invalidationContext: InvalidationContext<Node<T>, unknown>) {\n this.collection = this.virtualizer.collection as GridCollection<T>;\n this.buildCollection(invalidationContext);\n\n // Remove layout info that doesn't exist in new collection\n if (this.lastCollection) {\n for (let key of this.lastCollection.getKeys()) {\n if (!this.collection.getItem(key)) {\n this.layoutInfos.delete(key);\n }\n }\n\n if (!this.isLoading) {\n this.layoutInfos.delete('loader');\n }\n\n if (this.collection.size > 0) {\n this.layoutInfos.delete('placeholder');\n }\n }\n\n this.lastCollection = this.collection;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n buildCollection(invalidationContext?: InvalidationContext<Node<T>, unknown>) {}\n\n getContentSize() {\n return this.contentSize;\n }\n\n getLayoutInfo(key: Key) {\n return this.layoutInfos.get(key);\n }\n\n getVisibleLayoutInfos(rect) {\n let res: LayoutInfo[] = [];\n\n for (let layoutInfo of this.layoutInfos.values()) {\n if (this.isVisible(layoutInfo, rect)) {\n res.push(layoutInfo);\n }\n }\n\n return res;\n }\n\n isVisible(layoutInfo: LayoutInfo, rect: Rect) {\n return layoutInfo.rect.intersects(rect);\n }\n\n getInitialLayoutInfo(layoutInfo: LayoutInfo) {\n layoutInfo.opacity = 0;\n layoutInfo.transform = 'scale3d(0.8, 0.8, 0.8)';\n return layoutInfo;\n }\n\n getFinalLayoutInfo(layoutInfo: LayoutInfo) {\n layoutInfo.opacity = 0;\n layoutInfo.transform = 'scale3d(0.8, 0.8, 0.8)';\n return layoutInfo;\n }\n\n _findClosestLayoutInfo(target: Rect, rect: Rect) {\n let layoutInfos = this.getVisibleLayoutInfos(rect);\n let best = null;\n let bestDistance = Infinity;\n\n // Calculates distance as the distance between the center of 2 rects.\n for (let cur of layoutInfos) {\n if (cur.type === 'item') {\n let curRect = cur.rect;\n let targetMidX = (target.x + target.maxX) / 2;\n let targetMidY = (target.y + target.maxY) / 2;\n let curMidX = (curRect.x + curRect.maxX) / 2;\n let curMidY = (curRect.y + curRect.maxY) / 2;\n let dist = Math.pow(targetMidX - curMidX, 2) + Math.pow(targetMidY - curMidY, 2);\n if (dist < bestDistance) {\n best = cur;\n bestDistance = dist;\n }\n }\n }\n\n return best;\n }\n\n _findClosest(target: Rect, rect: Rect) {\n let best = this._findClosestLayoutInfo(target, rect);\n return best || null;\n }\n\n getKeyBelow(key: Key) {\n // Expected key is the currently focused cell so we need the parent row key\n let parentRowKey = this.collection.getItem(key).parentKey;\n let layoutInfo = this.getLayoutInfo(parentRowKey);\n let rect = new Rect(layoutInfo.rect.x, layoutInfo.rect.maxY + 1, layoutInfo.rect.width, this.virtualizer.visibleRect.height);\n let closestRow = this.collection.getItem(this._findClosest(layoutInfo.rect, rect)?.key);\n return closestRow?.childNodes[0]?.key;\n }\n\n getKeyAbove(key: Key) {\n // Expected key is the currently focused cell so we need the parent row key\n let parentRowKey = this.collection.getItem(key).parentKey;\n let layoutInfo = this.getLayoutInfo(parentRowKey);\n let rect = new Rect(layoutInfo.rect.x, 0, layoutInfo.rect.width, layoutInfo.rect.y - 1);\n let closestRow = this.collection.getItem(this._findClosest(layoutInfo.rect, rect)?.key);\n return closestRow?.childNodes[0]?.key;\n }\n\n getKeyRightOf(key: Key) {\n // Expected key is the currently focused cell so we need the parent row key\n let parentRowKey = this.collection.getItem(key).parentKey;\n key = this.direction === 'rtl' ? this.collection.getKeyBefore(parentRowKey) : this.collection.getKeyAfter(parentRowKey);\n\n while (key != null) {\n let item = this.collection.getItem(key);\n // Don't check if item is disabled because we want to be able to focus disabled items in a grid (double check this)\n if (item.type === 'item') {\n return item.childNodes[0].key;\n }\n key = this.direction === 'rtl' ? this.collection.getKeyBefore(key) : this.collection.getKeyAfter(key);\n }\n }\n\n getKeyLeftOf(key: Key) {\n // Expected key is the currently focused cell so we need the parent row key\n let parentRowKey = this.collection.getItem(key).parentKey;\n key = this.direction === 'rtl' ? this.collection.getKeyAfter(parentRowKey) : this.collection.getKeyBefore(parentRowKey);\n while (key != null) {\n let item = this.collection.getItem(key);\n // Don't check if item is disabled because we want to be able to focus disabled items in a grid (double check this)\n if (item.type === 'item') {\n return item.childNodes[0].key;\n }\n\n key = this.direction === 'rtl' ? this.collection.getKeyAfter(key) : this.collection.getKeyBefore(key);\n }\n }\n\n getFirstKey() {\n let firstRow = this.collection.getItem(this.collection.getFirstKey());\n return firstRow.childNodes[0].key;\n }\n\n getLastKey() {\n let lastRow = this.collection.getItem(this.collection.getLastKey());\n return lastRow.childNodes[0].key;\n }\n\n // TODO: pretty unwieldy because it needs to bounce back and forth between the parent key and the child key\n // Perhaps have layoutInfo store childKey as well so we don't need to do this? Or maybe make the layoutInfos be the cells instead of the rows?\n getKeyPageAbove(key: Key) {\n // Expected key is the currently focused cell so we need the parent row key\n let parentRowKey = this.collection.getItem(key).parentKey;\n let layoutInfo = this.getLayoutInfo(parentRowKey);\n\n if (layoutInfo) {\n let pageY = Math.max(0, layoutInfo.rect.y + layoutInfo.rect.height - this.virtualizer.visibleRect.height);\n // If the node is so large that it spans multiple page heights, return the key of the item immediately above\n // Otherwise keep going up until we exceed a single page height worth of nodes\n let keyAbove = this.collection.getItem(this.getKeyAbove(key))?.parentKey;\n layoutInfo = this.getLayoutInfo(keyAbove);\n\n if (layoutInfo && layoutInfo.rect.y > pageY) {\n while (layoutInfo && layoutInfo.rect.y > pageY) {\n let childKey = this.collection.getItem(layoutInfo.key).childNodes[0].key;\n let keyAbove = this.collection.getItem(this.getKeyAbove(childKey))?.parentKey;\n layoutInfo = this.getLayoutInfo(keyAbove);\n }\n }\n\n if (layoutInfo) {\n let childKey = this.collection.getItem(layoutInfo.key).childNodes[0].key;\n return childKey;\n }\n }\n\n return this.getFirstKey();\n }\n\n // TODO: pretty unwieldy because it needs to bounce back and forth between the parent key and the child key\n // Perhaps have layoutInfo store childKey as well so we don't need to do this?\n getKeyPageBelow(key: Key) {\n // Expected key is the currently focused cell so we need the parent row key\n let parentRowKey = this.collection.getItem(key).parentKey;\n let layoutInfo = this.getLayoutInfo(parentRowKey);\n if (layoutInfo) {\n let pageY = Math.min(this.virtualizer.contentSize.height, layoutInfo.rect.y - layoutInfo.rect.height + this.virtualizer.visibleRect.height);\n // If the node is so large that it spans multiple page heights, return the key of the item immediately below\n // Otherwise keep going up until we exceed a single page height worth of nodes\n let keyBelow = this.collection.getItem(this.getKeyBelow(key))?.parentKey;\n layoutInfo = this.getLayoutInfo(keyBelow);\n if (layoutInfo && layoutInfo.rect.y < pageY) {\n while (layoutInfo && layoutInfo.rect.y < pageY) {\n let childKey = this.collection.getItem(layoutInfo.key).childNodes[0].key;\n let keyBelow = this.collection.getItem(this.getKeyBelow(childKey))?.parentKey;\n layoutInfo = this.getLayoutInfo(keyBelow);\n }\n }\n\n if (layoutInfo) {\n let childKey = this.collection.getItem(layoutInfo.key).childNodes[0].key;\n return childKey;\n }\n }\n\n return this.getLastKey();\n }\n\n getKeyForSearch(search: string, fromKey?: Key) {\n if (!this.collator) {\n return null;\n }\n\n let collection = this.collection;\n let key = fromKey ?? this.getFirstKey();\n\n let startItem = collection.getItem(key);\n key = startItem.parentKey;\n\n while (key != null) {\n let item = collection.getItem(key);\n if (item.textValue) {\n let substring = item.textValue.slice(0, search.length);\n if (this.collator.compare(substring, search) === 0) {\n return [...item.childNodes][0].key;\n }\n }\n\n key = this.collection.getKeyAfter(key);\n }\n\n return null;\n }\n}\n","/*\n * Copyright 2021 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 {BaseLayout, BaseLayoutOptions} from './BaseLayout';\nimport {Key} from 'react';\nimport {LayoutInfo, Rect, Size} from '@react-stately/virtualizer';\nimport {Node, Orientation} from '@react-types/shared';\n\nexport interface GridLayoutOptions extends BaseLayoutOptions {\n // /**\n // * The card size in the grid.\n // */\n // cardSize?: 'S' | 'M' | 'L',\n /**\n * The minimum item size.\n * @default 208 x 208 for horizontal card orientation. 102 x 102 for vertical card orientation.\n */\n minItemSize?: Size,\n /**\n * The maximum item size.\n * @default Infinity\n */\n maxItemSize?: Size,\n /**\n * The minimum space required between items.\n * @default 18 x 18\n */\n minSpace?: Size,\n /**\n * The maximum number of columns.\n * @default Infinity\n */\n maxColumns?: number,\n /**\n * The additional padding along the card's main axis. Affects the sizing of the content area following the card image.\n * @default 95\n */\n itemPadding?: number,\n /**\n * The orientation of the cards withn the grid.\n * @default vertical\n */\n cardOrientation?: Orientation\n}\n\nconst DEFAULT_OPTIONS = {\n S: {\n itemPadding: 20,\n minItemSize: {\n 'vertical': new Size(96, 96)\n },\n maxItemSize: new Size(Infinity, Infinity),\n margin: 8,\n minSpace: new Size(6, 6),\n maxColumns: Infinity,\n dropSpacing: 50\n },\n L: {\n itemPadding: {\n 'vertical': {\n 'medium': 78,\n 'large': 98\n },\n 'horizontal': {\n 'medium': 150,\n 'large': 170\n }\n },\n minItemSize: {\n 'vertical': new Size(208, 208),\n 'horizontal': new Size(102, 102)\n },\n maxItemSize: new Size(Infinity, Infinity),\n margin: 24,\n minSpace: new Size(18, 18),\n maxColumns: Infinity,\n dropSpacing: 100\n }\n};\n\nexport class GridLayout<T> extends BaseLayout<T> {\n protected minItemSize: Size;\n protected maxItemSize: Size;\n protected minSpace: Size;\n protected maxColumns: number;\n itemPadding: number;\n cardOrientation: Orientation;\n protected itemSize: Size;\n protected numColumns: number;\n protected numRows: number;\n protected horizontalSpacing: number;\n\n constructor(options: GridLayoutOptions = {}) {\n super(options);\n let cardSize = 'L';\n this.cardOrientation = options.cardOrientation || 'vertical';\n this.minItemSize = options.minItemSize || DEFAULT_OPTIONS[cardSize].minItemSize[this.cardOrientation];\n this.maxItemSize = options.maxItemSize || DEFAULT_OPTIONS[cardSize].maxItemSize;\n this.margin = options.margin != null ? options.margin : DEFAULT_OPTIONS[cardSize].margin;\n this.minSpace = options.minSpace || DEFAULT_OPTIONS[cardSize].minSpace;\n this.maxColumns = options.maxColumns || DEFAULT_OPTIONS[cardSize].maxColumns;\n this.itemPadding = options.itemPadding != null ? options.itemPadding : DEFAULT_OPTIONS[cardSize].itemPadding[this.cardOrientation][this.scale];\n this.itemSize = null;\n this.numColumns = 0;\n this.numRows = 0;\n this.horizontalSpacing = 0;\n }\n\n get layoutType() {\n return 'grid';\n }\n\n getIndexAtPoint(x, y, allowInsertingAtEnd = false) {\n let itemHeight = this.itemSize.height + this.minSpace.height;\n let itemWidth = this.itemSize.width + this.horizontalSpacing;\n return Math.max(0,\n Math.min(\n this.collection.size - (allowInsertingAtEnd ? 0 : 1),\n Math.floor(y / itemHeight) * this.numColumns + Math.floor((x - this.horizontalSpacing) / itemWidth)\n )\n );\n }\n\n getVisibleLayoutInfos(rect) {\n let res: LayoutInfo[] = [];\n let numItems = this.collection.size;\n if (numItems <= 0 || !this.itemSize) {\n // If there aren't any items in the collection, we are in a loader/placeholder state. Return those layoutInfos as\n // the currently visible items\n if (this.layoutInfos.size > 0) {\n for (let layoutInfo of this.layoutInfos.values()) {\n if (this.isVisible(layoutInfo, rect)) {\n res.push(layoutInfo);\n }\n }\n }\n } else {\n // The approach from v2 uses indexes where other v3 layouts iterate through every node/root node. This feels more efficient\n let firstVisibleItem = this.getIndexAtPoint(rect.x, rect.y);\n let lastVisibleItem = this.getIndexAtPoint(rect.maxX, rect.maxY);\n for (let index = firstVisibleItem; index <= lastVisibleItem; index++) {\n let keyFromIndex = this.collection.rows[index].key;\n let layoutInfo = this.layoutInfos.get(keyFromIndex);\n if (layoutInfo && this.isVisible(layoutInfo, rect)) {\n res.push(layoutInfo);\n }\n }\n\n // Check if loader is in view and add to res if so\n let loader = this.layoutInfos.get('loader');\n if (loader && this.isVisible(loader, rect)) {\n res.push(loader);\n }\n }\n\n return res;\n }\n\n buildCollection() {\n let visibleWidth = this.virtualizer.visibleRect.width;\n let visibleHeight = this.virtualizer.visibleRect.height;\n let horizontalItemPadding = this.cardOrientation === 'horizontal' ? this.itemPadding : 0;\n let verticalItemPadding = this.cardOrientation === 'vertical' ? this.itemPadding : 0;\n let minCardWidth = this.minItemSize.width + horizontalItemPadding;\n\n // Compute the number of rows and columns needed to display the content\n let availableWidth = visibleWidth - this.margin * 2;\n let columns = Math.floor((availableWidth + this.minSpace.width) / (minCardWidth + this.minSpace.width));\n this.numColumns = Math.max(1, Math.min(this.maxColumns, columns));\n this.numRows = Math.ceil(this.collection.size / this.numColumns);\n\n // Compute the available width (minus the space between items)\n let width = availableWidth - (this.minSpace.width * Math.max(0, this.numColumns - 1));\n\n // Compute the item width based on the space available\n let itemWidth = Math.floor(width / this.numColumns);\n itemWidth = Math.max(minCardWidth, Math.min(this.maxItemSize.width, itemWidth));\n // Compute the item height, which is proportional to the item width\n let t = ((itemWidth - minCardWidth) / minCardWidth);\n let itemHeight = Math.floor(this.minItemSize.height + this.minItemSize.height * t);\n itemHeight = Math.max(this.minItemSize.height, Math.min(this.maxItemSize.height, itemHeight)) + verticalItemPadding;\n this.itemSize = new Size(itemWidth, itemHeight);\n\n // Compute the horizontal spacing and content height\n this.horizontalSpacing = this.numColumns < 2 ? 0 : Math.floor((availableWidth - this.numColumns * this.itemSize.width) / (this.numColumns - 1));\n\n let y = this.margin;\n let index = 0;\n for (let node of this.collection) {\n let layoutInfo = this.buildChild(node, y, index);\n y = layoutInfo.rect.maxY;\n index++;\n }\n\n if (this.isLoading) {\n let loaderY = y;\n let loaderHeight = 60;\n // If there aren't any items, make loader take all avaliable room and remove margin from y calculation\n // so it doesn't scroll\n if (this.collection.size === 0) {\n loaderY = 0;\n loaderHeight = visibleHeight || 60;\n }\n\n let rect = new Rect(0, loaderY, visibleWidth, loaderHeight);\n let loader = new LayoutInfo('loader', 'loader', rect);\n this.layoutInfos.set('loader', loader);\n y = loader.rect.maxY;\n }\n\n if (this.collection.size === 0 && !this.isLoading) {\n let rect = new Rect(0, 0, visibleWidth, visibleHeight);\n let placeholder = new LayoutInfo('placeholder', 'placeholder', rect);\n this.layoutInfos.set('placeholder', placeholder);\n y = placeholder.rect.maxY;\n }\n\n this.contentSize = new Size(visibleWidth, y);\n }\n\n buildChild(node: Node<T>, y: number, index: number): LayoutInfo {\n let row = Math.floor(index / this.numColumns);\n let column = index % this.numColumns;\n let x = this.margin + column * (this.itemSize.width + this.horizontalSpacing);\n y = this.margin + row * (this.itemSize.height + this.minSpace.height);\n\n let rect = new Rect(x, y, this.itemSize.width, this.itemSize.height);\n // TODO: Perhaps have it so that the child key for each row is stored with the layoutInfo?\n let layoutInfo = new LayoutInfo(node.type, node.key, rect);\n layoutInfo.allowOverflow = true;\n this.layoutInfos.set(node.key, layoutInfo);\n return layoutInfo;\n }\n\n // Since the collection doesn't represent the visual layout, need to calculate what row and column the current key is in,\n // then return the key that occupies the row + column below. This can be done by figuring out how many cards exist per column then dividing the\n // collection contents by that number (which will give us the row distribution)\n getKeyBelow(key: Key) {\n // Expected key is the currently focused cell so we need the parent row key\n let parentRowKey = this.collection.getItem(key).parentKey;\n let indexRowBelow;\n let index = this.collection.rows.findIndex(card => card.key === parentRowKey);\n if (index !== -1) {\n indexRowBelow = index + this.numColumns;\n } else {\n return null;\n }\n\n return this.collection.rows[indexRowBelow]?.childNodes[0].key || null;\n }\n\n getKeyAbove(key: Key) {\n // Expected key is the currently focused cell so we need the parent row key\n let parentRowKey = this.collection.getItem(key).parentKey;\n let indexRowAbove;\n let index = this.collection.rows.findIndex(card => card.key === parentRowKey);\n if (index !== -1) {\n indexRowAbove = index - this.numColumns;\n } else {\n return null;\n }\n\n return this.collection.rows[indexRowAbove]?.childNodes[0].key || null;\n }\n}\n","/*\n * Copyright 2021 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 {BaseLayout, BaseLayoutOptions} from './BaseLayout';\nimport {InvalidationContext, LayoutInfo, Rect, Size} from '@react-stately/virtualizer';\nimport {Key} from 'react';\nimport {KeyboardDelegate, Node} from '@react-types/shared';\n\nexport interface WaterfallLayoutOptions extends BaseLayoutOptions {\n /**\n * The minimum item size.\n * @default 240 x 136\n */\n minItemSize?: Size,\n /**\n * The maximum item size.\n * @default Infinity\n */\n maxItemSize?: Size,\n /**\n * The minimum space required between items.\n * @default 18 x 18\n */\n minSpace?: Size,\n /**\n * The maximum number of columns.\n * @default Infinity\n */\n maxColumns?: number\n}\n\n// TODO: this didn't have any options that varied with card size, should it have?\nexport class WaterfallLayout<T> extends BaseLayout<T> implements KeyboardDelegate {\n protected minItemSize: Size;\n protected maxItemSize: Size;\n protected minSpace: Size;\n protected maxColumns: number;\n protected numColumns: number;\n protected itemWidth: number;\n protected horizontalSpacing: number;\n\n constructor(options: WaterfallLayoutOptions = {}) {\n // TODO: WaterfallLayout doesn't use card size in v2, but perhaps it should support it? Perhaps it would modify\n // minItemSize defaults or other things\n super(options);\n this.minItemSize = options.minItemSize || new Size(240, 136);\n this.maxItemSize = options.maxItemSize || new Size(Infinity, Infinity);\n this.margin = options.margin != null ? options.margin : 24;\n this.minSpace = options.minSpace || new Size(18, 18);\n this.maxColumns = options.maxColumns || Infinity;\n\n this.itemWidth = 0;\n this.numColumns = 0;\n\n this.lastCollection = null;\n this.collator = options.collator;\n }\n\n get layoutType() {\n return 'waterfall';\n }\n\n buildCollection(invalidationContext: InvalidationContext<Node<T>, unknown>) {\n // Compute the number of columns needed to display the content\n let visibleWidth = this.virtualizer.visibleRect.width;\n let availableWidth = visibleWidth - this.margin * 2;\n let columns = Math.floor((availableWidth + this.minSpace.width) / (this.minItemSize.width + this.minSpace.width));\n this.numColumns = Math.max(1, Math.min(this.maxColumns, columns));\n\n\n // Compute the available width (minus the space between items)\n let width = availableWidth - (this.minSpace.width * (this.numColumns - 1));\n\n // Compute the item width based on the space available\n let itemWidth = Math.round(width / this.numColumns);\n itemWidth = Math.max(this.minItemSize.width, Math.min(this.maxItemSize.width, itemWidth));\n this.itemWidth = itemWidth;\n\n // Compute the horizontal spacing\n // if only one column, we cannot divide by zero, so set it to 1\n let horizontalSpacing = Math.round((availableWidth - this.numColumns * itemWidth) / Math.max(1, this.numColumns - 1));\n this.horizontalSpacing = horizontalSpacing;\n\n // Setup an array of column heights\n let columnHeights = Array(this.numColumns).fill(this.margin);\n for (let node of this.collection) {\n let key = node.key;\n // Compute the height of the item. Use the existing height if available,\n // otherwise call the delegate to estimate the size.\n let oldLayoutInfo = this.layoutInfos.get(key);\n let height;\n let estimatedSize = true;\n if (oldLayoutInfo) {\n height = oldLayoutInfo.rect.height;\n estimatedSize = invalidationContext.sizeChanged || oldLayoutInfo.estimatedSize;\n } else if (node.props.width && node.props.height) {\n let nodeWidth = node.props.width;\n let nodeHeight = node.props.height;\n let scaledHeight = Math.round(nodeHeight * ((itemWidth) / nodeWidth));\n height = Math.max(this.minItemSize.height, Math.min(this.maxItemSize.height, scaledHeight));\n } else {\n height = itemWidth;\n }\n\n // Figure out which column to place the item in, and compute its position.\n let column = this.getNextColumnIndex(columnHeights);\n let x = this.margin + column * (itemWidth + horizontalSpacing);\n let y = columnHeights[column];\n\n let rect = new Rect(x, y, itemWidth, height);\n let layoutInfo = new LayoutInfo(node.type, key, rect);\n layoutInfo.estimatedSize = estimatedSize;\n layoutInfo.allowOverflow = true;\n this.layoutInfos.set(key, layoutInfo);\n\n // TODO: From v2 figure out this bit, when does this get called and what to replace this.collectionView._transaction with?\n // Removing it from v2 doesn't seem to do anything?\n // if (layoutInfo.estimatedSize && !invalidationContext.contentChanged && !this.collectionView._transaction) {\n // this.updateItemSize(new IndexPath(section, i));\n // }\n\n columnHeights[column] += layoutInfo.rect.height + this.minSpace.height;\n }\n\n // Reset all columns to the maximum for the next section\n let maxHeight = Math.max.apply(Math, columnHeights) - this.minSpace.height + this.margin;\n columnHeights.fill(maxHeight);\n let y = columnHeights[0];\n\n if (this.isLoading) {\n let loaderY = y;\n let loaderHeight = 60;\n // If there aren't any items, make loader take all avaliable room and remove margin from y calculation\n // so it doesn't scroll\n if (this.collection.size === 0) {\n loaderY = 0;\n loaderHeight = this.virtualizer.visibleRect.height || 60;\n }\n\n let rect = new Rect(0, loaderY, this.virtualizer.visibleRect.width, loaderHeight);\n let loader = new LayoutInfo('loader', 'loader', rect);\n this.layoutInfos.set('loader', loader);\n y = loader.rect.maxY;\n }\n\n if (this.collection.size === 0 && !this.isLoading) {\n let rect = new Rect(0, 0, this.virtualizer.visibleRect.width, this.virtualizer.visibleRect.height);\n let placeholder = new LayoutInfo('placeholder', 'placeholder', rect);\n this.layoutInfos.set('placeholder', placeholder);\n y = placeholder.rect.maxY;\n }\n\n this.contentSize = new Size(this.virtualizer.visibleRect.width, y);\n }\n\n updateItemSize(key: Key, size: Size) {\n let layoutInfo = this.layoutInfos.get(key);\n if (!size || !layoutInfo) {\n return false;\n }\n\n if (size.height !== layoutInfo.rect.height) {\n // TODO: also not sure about copying layout info vs mutating it. Listlayout does the below\n // but I feel that is because it actually maintained a layoutNode map cache which this doesn't have\n let newLayoutInfo = layoutInfo.copy();\n newLayoutInfo.rect.height = size.height < 600 ? size.height : 600;\n newLayoutInfo.estimatedSize = false;\n this.layoutInfos.set(key, newLayoutInfo);\n return true;\n }\n\n return false;\n }\n\n getNextColumnIndex(columnHeights) {\n let minIndex = 0;\n for (let i = 0; i < columnHeights.length; i++) {\n if (columnHeights[i] < columnHeights[minIndex]) {\n minIndex = i;\n }\n }\n\n return minIndex;\n }\n\n getClosestRight(key: Key) {\n let layoutInfo = this.getLayoutInfo(key);\n // Refactored from v2. Current strategy is to find the closest card in the adjacent column.\n // This prevent the issue where it was possible that the closest layoutInfo would be two columns over due to the middle card being exceptionally tall\n // and thus the top corner to top corner distance was massive.\n\n // First look for a card to the immediate right of the current card. If we can't find any, look for the nearest card in the entire column to the right of the card\n let rect = new Rect(layoutInfo.rect.maxX + 1, layoutInfo.rect.y, layoutInfo.rect.width + this.horizontalSpacing, layoutInfo.rect.height);\n key = this._findClosest(layoutInfo.rect, rect)?.key;\n\n if (!key) {\n rect = new Rect(layoutInfo.rect.maxX + 1, 0, layoutInfo.rect.width + this.horizontalSpacing, this.virtualizer.contentSize.height);\n key = this._findClosest(layoutInfo.rect, rect)?.key;\n }\n\n return this.collection.getItem(key)?.childNodes[0]?.key;\n }\n\n getClosestLeft(key: Key) {\n let layoutInfo = this.getLayoutInfo(key);\n // First look for a card to the immediate left of the current card. If we can't find any, look for the nearest card in the entire column to the left of the card\n let rect = new Rect(layoutInfo.rect.x - layoutInfo.rect.width - this.horizontalSpacing - 1, layoutInfo.rect.y, layoutInfo.rect.width + this.horizontalSpacing, layoutInfo.rect.height);\n key = this._findClosest(layoutInfo.rect, rect)?.key;\n\n if (!key) {\n rect = new Rect(layoutInfo.rect.x - layoutInfo.rect.width - this.horizontalSpacing - 1, 0, layoutInfo.rect.width + this.horizontalSpacing, this.virtualizer.contentSize.height);\n key = this._findClosest(layoutInfo.rect, rect)?.key;\n }\n\n return this.collection.getItem(key)?.childNodes[0]?.key;\n }\n\n getKeyRightOf(key: Key) {\n // Expected key is the currently focused cell so we need the parent row key\n let parentRowKey = this.collection.getItem(key).parentKey;\n return this.direction === 'rtl' ? this.getClosestLeft(parentRowKey) : this.getClosestRight(parentRowKey);\n }\n\n getKeyLeftOf(key: Key) {\n // Expected key is the currently focused cell so we need the parent row key\n let parentRowKey = this.collection.getItem(key).parentKey;\n return this.direction === 'rtl' ? this.getClosestRight(parentRowKey) : this.getClosestLeft(parentRowKey);\n }\n}\n","/*\n * Copyright 2021 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 {CardBase} from './CardBase';\nimport {DOMRef, DOMRefValue, ItemProps} from '@react-types/shared';\nimport {PartialNode} from '@react-stately/collections';\nimport React, {forwardRef, ForwardRefExoticComponent, PropsWithoutRef, RefAttributes} from 'react';\nimport {SpectrumCardProps} from '@react-types/card';\nimport {useCardViewContext} from './CardViewContext';\n\n\nlet Card = forwardRef((props: SpectrumCardProps, ref: DOMRef<HTMLDivElement>) => {\n let context = useCardViewContext();\n if (context !== null) {\n return null;\n } else {\n return (\n <CardBase {...props} ref={ref} />\n );\n }\n});\n\n// @ts-ignore\nCard.getCollectionNode = function* getCollectionNode<T>(props: any): Generator<PartialNode<T>> {\n let {children, textValue} = props;\n\n yield {\n type: 'item',\n props: props,\n rendered: children,\n 'aria-label': props['aria-label'],\n hasChildNodes: false,\n textValue\n };\n};\n\nlet _Card = Card as ForwardRefExoticComponent<ItemProps<SpectrumCardProps> & PropsWithoutRef<SpectrumCardProps> & RefAttributes<DOMRefValue<HTMLDivElement>>>;\nexport {_Card as Card};\n"],"names":[],"version":3,"file":"module.js.map"}
|
package/package.json
CHANGED
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-spectrum/card",
|
|
3
|
-
"version": "3.0.0-nightly.
|
|
3
|
+
"version": "3.0.0-nightly.3608+0182ad074",
|
|
4
4
|
"description": "Spectrum UI components in React",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/main.js",
|
|
7
|
-
"module": "dist/module.
|
|
8
|
-
"exports": {
|
|
9
|
-
"types": "./dist/types.d.ts",
|
|
10
|
-
"import": "./dist/module.mjs",
|
|
11
|
-
"require": "./dist/main.js"
|
|
12
|
-
},
|
|
7
|
+
"module": "dist/module.js",
|
|
13
8
|
"types": "dist/types.d.ts",
|
|
14
9
|
"source": "src/index.ts",
|
|
15
10
|
"files": [
|
|
@@ -36,29 +31,29 @@
|
|
|
36
31
|
"url": "https://github.com/adobe/react-spectrum"
|
|
37
32
|
},
|
|
38
33
|
"dependencies": {
|
|
39
|
-
"@react-aria/focus": "3.0.0-nightly.
|
|
40
|
-
"@react-aria/grid": "3.5.2-nightly.
|
|
41
|
-
"@react-aria/i18n": "3.0.0-nightly.
|
|
42
|
-
"@react-aria/interactions": "3.0.0-nightly.
|
|
43
|
-
"@react-aria/utils": "3.0.0-nightly.
|
|
44
|
-
"@react-aria/virtualizer": "3.6.1-nightly.
|
|
45
|
-
"@react-spectrum/checkbox": "3.0.0-nightly.
|
|
46
|
-
"@react-spectrum/divider": "3.0.0-nightly.
|
|
47
|
-
"@react-spectrum/layout": "3.4.4-nightly.
|
|
48
|
-
"@react-spectrum/progress": "3.0.0-nightly.
|
|
49
|
-
"@react-spectrum/utils": "3.0.0-nightly.
|
|
50
|
-
"@react-stately/collections": "3.0.0-nightly.
|
|
51
|
-
"@react-stately/grid": "3.4.2-nightly.
|
|
52
|
-
"@react-stately/list": "3.6.1-nightly.
|
|
53
|
-
"@react-stately/utils": "3.0.0-nightly.
|
|
54
|
-
"@react-stately/virtualizer": "3.4.1-nightly.
|
|
55
|
-
"@react-types/card": "3.0.0-nightly.
|
|
56
|
-
"@react-types/provider": "3.5.6-nightly.
|
|
57
|
-
"@react-types/shared": "3.0.0-nightly.
|
|
34
|
+
"@react-aria/focus": "3.0.0-nightly.1908+0182ad074",
|
|
35
|
+
"@react-aria/grid": "3.5.2-nightly.3608+0182ad074",
|
|
36
|
+
"@react-aria/i18n": "3.0.0-nightly.1908+0182ad074",
|
|
37
|
+
"@react-aria/interactions": "3.0.0-nightly.1908+0182ad074",
|
|
38
|
+
"@react-aria/utils": "3.0.0-nightly.1908+0182ad074",
|
|
39
|
+
"@react-aria/virtualizer": "3.6.1-nightly.3608+0182ad074",
|
|
40
|
+
"@react-spectrum/checkbox": "3.0.0-nightly.1908+0182ad074",
|
|
41
|
+
"@react-spectrum/divider": "3.0.0-nightly.1908+0182ad074",
|
|
42
|
+
"@react-spectrum/layout": "3.4.4-nightly.3608+0182ad074",
|
|
43
|
+
"@react-spectrum/progress": "3.0.0-nightly.1908+0182ad074",
|
|
44
|
+
"@react-spectrum/utils": "3.0.0-nightly.1908+0182ad074",
|
|
45
|
+
"@react-stately/collections": "3.0.0-nightly.1908+0182ad074",
|
|
46
|
+
"@react-stately/grid": "3.4.2-nightly.3608+0182ad074",
|
|
47
|
+
"@react-stately/list": "3.6.1-nightly.3608+0182ad074",
|
|
48
|
+
"@react-stately/utils": "3.0.0-nightly.1908+0182ad074",
|
|
49
|
+
"@react-stately/virtualizer": "3.4.1-nightly.3608+0182ad074",
|
|
50
|
+
"@react-types/card": "3.0.0-nightly.3608+0182ad074",
|
|
51
|
+
"@react-types/provider": "3.5.6-nightly.3608+0182ad074",
|
|
52
|
+
"@react-types/shared": "3.0.0-nightly.1908+0182ad074",
|
|
58
53
|
"@swc/helpers": "^0.4.14"
|
|
59
54
|
},
|
|
60
55
|
"devDependencies": {
|
|
61
|
-
"@adobe/spectrum-css-temp": "3.0.0-nightly.
|
|
56
|
+
"@adobe/spectrum-css-temp": "3.0.0-nightly.1908+0182ad074"
|
|
62
57
|
},
|
|
63
58
|
"peerDependencies": {
|
|
64
59
|
"@react-spectrum/provider": "^3.0.0",
|
|
@@ -67,5 +62,5 @@
|
|
|
67
62
|
"publishConfig": {
|
|
68
63
|
"access": "public"
|
|
69
64
|
},
|
|
70
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "0182ad0748bcdddf7eb010540c453f9a35a7c753"
|
|
71
66
|
}
|