react-aria-components 1.18.0 → 1.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsMM,MAAM,0DACX,CAAA,GAAA,oBAAY,EAAoD;AAM3D,MAAM,4CAAyB,AAAd,WAAW,GAAI,CAAA,GAAA,iBAAS,EAAqB,SAAS,SAC5E,KAAuB,EACvB,GAAiC;IAEjC,+FAA+F;IAC/F,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAE3C,qBACE,gCAAC,CAAA,GAAA,wBAAgB;QAAE,uBAAS,gCAAC,CAAA,GAAA,iBAAS,GAAM;OACzC,CAAA,2BAAc,gCAAC;YAAc,OAAO;YAAO,YAAY;YAAY,aAAa;;AAGvF;AAQA,SAAS,oCAAiB,SAAC,KAAK,cAAE,UAAU,EAAE,aAAa,GAAG,EAAwB;IACpF,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK,CAAA,GAAA,yCAA0B;IACrE,6DAA6D;IAC7D,IAAI,yBAAC,qBAAqB,UAAE,MAAM,qBAAE,iBAAiB,EAAE,GAAG,oBAAmB,GAAG;IAChF,IAAI,oBACF,gBAAgB,8BAChB,6BAA6B,iBAC7B,SAAS,sBACT,cAAc,YACf,GAAG;IACJ,IAAI,kBACF,cAAc,iBACd,aAAa,kBACb,cAAc,EACd,oBAAoB,qBAAqB,EAC1C,GAAG,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,yCAAwB;IACvC,IAAI,gBAAgB,CAAA,GAAA,mBAAW,EAAE;QAC/B,GAAG,kBAAkB;oBACrB;QACA,UAAU;wBACV;IACF;IAEA,IAAI,gBAAgB,CAAA,GAAA,oCAA4B,EAAE,eAA+B;IACjF,I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ourcesContent":["/*\n * Copyright 2022 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 */\nimport {\n AriaGridListProps,\n useGridList,\n useGridListItem,\n useGridListSection,\n useGridListSelectionCheckbox\n} from 'react-aria/useGridList';\n\nimport {ButtonContext} from './Button';\nimport {CheckboxContext, CheckboxFieldContext} from './Checkbox';\nimport {\n ClassNameOrFunction,\n ContextValue,\n DEFAULT_SLOT,\n dom,\n DOMProps,\n DOMRenderProps,\n Provider,\n RenderProps,\n SlotProps,\n StyleProps,\n StyleRenderProps,\n useContextProps,\n useRenderProps\n} from './utils';\nimport {Collection} from 'react-aria/Collection';\nimport {\n CollectionBuilder,\n createBranchComponent,\n createLeafComponent\n} from 'react-aria/CollectionBuilder';\nimport {\n CollectionProps,\n CollectionRendererContext,\n DefaultCollectionRenderer,\n ItemRenderProps,\n SectionProps\n} from './Collection';\nimport {\n DragAndDropContext,\n DropIndicatorContext,\n DropIndicatorProps,\n useDndPersistedKeys,\n useRenderDropIndicator\n} from './DragAndDrop';\nimport {DragAndDropHooks} from './useDragAndDrop';\nimport {DraggableCollectionState} from 'react-stately/useDraggableCollectionState';\nimport {DraggableItemResult} from 'react-aria/useDraggableCollection';\nimport {DragPreviewRenderer} from '@react-types/shared';\nimport {DropIndicatorAria, DroppableCollectionResult} from 'react-aria/useDroppableCollection';\nimport {DroppableCollectionState} from 'react-stately/useDroppableCollectionState';\nimport {\n FieldInputContext,\n SelectableCollectionContext,\n SelectableCollectionContextValue\n} from './Autocomplete';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {FocusScope} from 'react-aria/FocusScope';\nimport {\n forwardRefType,\n GlobalDOMAttributes,\n HoverEvents,\n Key,\n LinkDOMProps,\n Orientation,\n PressEvents,\n RefObject\n} from '@react-types/shared';\nimport {\n HeaderNode,\n ItemNode,\n LoaderNode,\n SectionNode\n} from 'react-aria/private/collections/BaseCollection';\nimport {Collection as ICollection, Node, SelectionBehavior} from '@react-types/shared';\nimport {inertValue} from 'react-aria/private/utils/inertValue';\nimport {ListKeyboardDelegate} from 'react-aria/ListKeyboardDelegate';\nimport {ListState, UNSTABLE_useFilteredListState, useListState} from 'react-stately/useListState';\nimport {ListStateContext} from './ListBox';\nimport {\n LoadMoreSentinelProps,\n useLoadMoreSentinel\n} from 'react-aria/private/utils/useLoadMoreSentinel';\nimport {mergeProps} from 'react-aria/mergeProps';\nimport React, {\n createContext,\n ForwardedRef,\n forwardRef,\n HTMLAttributes,\n JSX,\n ReactNode,\n useContext,\n useEffect,\n useMemo,\n useRef\n} from 'react';\nimport {SelectionIndicatorContext} from './SelectionIndicator';\nimport {SharedElementTransition} from './SharedElementTransition';\nimport {TextContext} from './Text';\nimport {useCollator} from 'react-aria/useCollator';\nimport {useFocusRing} from 'react-aria/useFocusRing';\nimport {useHover} from 'react-aria/useHover';\nimport {useLocale} from 'react-aria/I18nProvider';\nimport {useObjectRef} from 'react-aria/useObjectRef';\nimport {useVisuallyHidden} from 'react-aria/VisuallyHidden';\n\nexport interface GridListRenderProps {\n /**\n * Whether the list has no items and should display its empty state.\n *\n * @selector [data-empty]\n */\n isEmpty: boolean;\n /**\n * Whether the grid list is currently focused.\n *\n * @selector [data-focused]\n */\n isFocused: boolean;\n /**\n * Whether the grid list is currently keyboard focused.\n *\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean;\n /**\n * Whether the grid list is currently the active drop target.\n *\n * @selector [data-drop-target]\n */\n isDropTarget: boolean;\n /**\n * Whether the items are arranged in a stack or grid.\n *\n * @selector [data-layout=\"stack | grid\"]\n */\n layout: 'stack' | 'grid';\n /**\n * The primary orientation of the items.\n *\n * @selector [data-orientation=\"vertical | horizontal\"]\n */\n orientation: Orientation;\n /**\n * State of the grid list.\n */\n state: ListState<unknown>;\n}\n\nexport interface GridListProps<T>\n extends\n Omit<AriaGridListProps<T>, 'children'>,\n CollectionProps<T>,\n StyleRenderProps<GridListRenderProps>,\n SlotProps,\n GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element. A function may be provided to compute the class based on component state.\n *\n * @default 'react-aria-GridList'\n */\n className?: ClassNameOrFunction<GridListRenderProps>;\n /**\n * Whether typeahead navigation is disabled.\n *\n * @default false\n */\n disallowTypeAhead?: boolean;\n /**\n * How multiple selection should behave in the collection.\n *\n * @default 'toggle'\n */\n selectionBehavior?: SelectionBehavior;\n /**\n * The drag and drop hooks returned by `useDragAndDrop` used to enable drag and drop behavior for\n * the GridList.\n */\n dragAndDropHooks?: DragAndDropHooks<NoInfer<T>>;\n /** Provides content to display when there are no items in the list. */\n renderEmptyState?: (props: GridListRenderProps) => ReactNode;\n /**\n * Whether the items are arranged in a stack or grid.\n *\n * @default 'stack'\n */\n layout?: 'stack' | 'grid';\n /**\n * The primary orientation of the items. Usually this is the direction that the collection\n * scrolls.\n *\n * @default 'vertical'\n */\n orientation?: Orientation;\n}\n\nexport const GridListContext =\n createContext<ContextValue<GridListProps<any>, HTMLDivElement>>(null);\n\n/**\n * A grid list displays a list of interactive items, with support for keyboard navigation,\n * single or multiple selection, and row actions.\n */\nexport const GridList = /*#__PURE__*/ (forwardRef as forwardRefType)(function GridList<T>(\n props: GridListProps<T>,\n ref: ForwardedRef<HTMLDivElement>\n) {\n // Render the portal first so that we have the collection by the time we render the DOM in SSR.\n [props, ref] = useContextProps(props, ref, GridListContext);\n\n return (\n <CollectionBuilder content={<Collection {...props} />}>\n {collection => <GridListInner props={props} collection={collection} gridListRef={ref} />}\n </CollectionBuilder>\n );\n});\n\ninterface GridListInnerProps<T> {\n props: GridListProps<T> & SelectableCollectionContextValue<T>;\n collection: ICollection<Node<any>>;\n gridListRef: RefObject<HTMLElement | null>;\n}\n\nfunction GridListInner<T>({props, collection, gridListRef: ref}: GridListInnerProps<T>) {\n [props, ref] = useContextProps(props, ref, SelectableCollectionContext);\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n let {shouldUseVirtualFocus, filter, disallowTypeAhead, ...DOMCollectionProps} = props;\n let {\n dragAndDropHooks,\n keyboardNavigationBehavior = 'arrow',\n layout = 'stack',\n orientation = 'vertical'\n } = props;\n let {\n CollectionRoot,\n isVirtualized,\n layoutDelegate,\n dropTargetDelegate: ctxDropTargetDelegate\n } = useContext(CollectionRendererContext);\n let gridlistState = useListState({\n ...DOMCollectionProps,\n collection,\n children: undefined,\n layoutDelegate\n });\n\n let filteredState = UNSTABLE_useFilteredListState(gridlistState as ListState<T>, filter);\n let collator = useCollator({usage: 'search', sensitivity: 'base'});\n let {disabledBehavior, disabledKeys} = filteredState.selectionManager;\n let {direction} = useLocale();\n let keyboardDelegate = useMemo(\n () =>\n new ListKeyboardDelegate({\n collection: filteredState.collection,\n collator,\n ref,\n disabledKeys,\n disabledBehavior,\n layoutDelegate,\n layout,\n orientation,\n direction\n }),\n [\n filteredState.collection,\n ref,\n layout,\n orientation,\n disabledKeys,\n disabledBehavior,\n layoutDelegate,\n collator,\n direction\n ]\n );\n\n let {gridProps} = useGridList(\n {\n ...DOMCollectionProps,\n keyboardDelegate,\n // Only tab navigation is supported in grid layout.\n keyboardNavigationBehavior: layout === 'grid' ? 'tab' : keyboardNavigationBehavior,\n isVirtualized,\n shouldSelectOnPressUp: props.shouldSelectOnPressUp,\n disallowTypeAhead\n },\n filteredState,\n ref\n );\n\n let selectionManager = filteredState.selectionManager;\n let isListDraggable = !!dragAndDropHooks?.useDraggableCollectionState;\n let isListDroppable = !!dragAndDropHooks?.useDroppableCollectionState;\n let dragHooksProvided = useRef(isListDraggable);\n let dropHooksProvided = useRef(isListDroppable);\n useEffect(() => {\n if (process.env.NODE_ENV === 'production') {\n return;\n }\n if (dragHooksProvided.current !== isListDraggable) {\n console.warn(\n 'Drag hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.'\n );\n }\n if (dropHooksProvided.current !== isListDroppable) {\n console.warn(\n 'Drop hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.'\n );\n }\n }, [isListDraggable, isListDroppable]);\n\n let dragState: DraggableCollectionState | undefined = undefined;\n let dropState: DroppableCollectionState | undefined = undefined;\n let droppableCollection: DroppableCollectionResult | undefined = undefined;\n let isRootDropTarget = false;\n let dragPreview: JSX.Element | null = null;\n let preview = useRef<DragPreviewRenderer>(null);\n\n if (isListDraggable && dragAndDropHooks) {\n dragState = dragAndDropHooks.useDraggableCollectionState!({\n collection: filteredState.collection,\n selectionManager,\n preview: dragAndDropHooks.renderDragPreview ? preview : undefined\n });\n dragAndDropHooks.useDraggableCollection!({}, dragState, ref);\n\n let DragPreview = dragAndDropHooks.DragPreview!;\n dragPreview = dragAndDropHooks.renderDragPreview ? (\n <DragPreview ref={preview}>{dragAndDropHooks.renderDragPreview}</DragPreview>\n ) : null;\n }\n\n if (isListDroppable && dragAndDropHooks) {\n dropState = dragAndDropHooks.useDroppableCollectionState!({\n collection: filteredState.collection,\n selectionManager\n });\n\n let dropTargetDelegate =\n dragAndDropHooks.dropTargetDelegate ||\n ctxDropTargetDelegate ||\n new dragAndDropHooks.ListDropTargetDelegate(collection, ref, {\n layout,\n direction,\n orientation\n });\n droppableCollection = dragAndDropHooks.useDroppableCollection!(\n {\n keyboardDelegate,\n dropTargetDelegate\n },\n dropState,\n ref\n );\n\n isRootDropTarget = dropState.isDropTarget({type: 'root'});\n }\n\n let {focusProps, isFocused, isFocusVisible} = useFocusRing();\n let isEmpty = filteredState.collection.size === 0;\n let renderValues = {\n isDropTarget: isRootDropTarget,\n orientation,\n isEmpty,\n isFocused,\n isFocusVisible,\n layout,\n state: filteredState\n };\n let renderProps = useRenderProps({\n ...props,\n children: undefined,\n defaultClassName: 'react-aria-GridList',\n values: renderValues\n });\n\n let emptyState: ReactNode = null;\n let emptyStatePropOverrides: HTMLAttributes<HTMLElement> | null = null;\n\n if (isEmpty && props.renderEmptyState) {\n let content = props.renderEmptyState(renderValues);\n emptyState = (\n <div role=\"row\" aria-rowindex={1} style={{display: 'contents'}}>\n <div role=\"gridcell\" style={{display: 'contents'}}>\n {content}\n </div>\n </div>\n );\n }\n\n let DOMProps = filterDOMProps(props, {global: true});\n\n return (\n <FocusScope>\n <dom.div\n {...mergeProps(\n DOMProps,\n renderProps,\n gridProps,\n focusProps,\n droppableCollection?.collectionProps,\n emptyStatePropOverrides\n )}\n ref={ref as RefObject<HTMLDivElement>}\n slot={props.slot || undefined}\n onScroll={props.onScroll}\n data-drop-target={isRootDropTarget || undefined}\n data-empty={isEmpty || undefined}\n data-focused={isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined}\n data-layout={layout}\n data-orientation={orientation}>\n <Provider\n values={[\n [ListStateContext, filteredState],\n [DragAndDropContext, {dragAndDropHooks, dragState, dropState}],\n [DropIndicatorContext, {render: GridListDropIndicatorWrapper}]\n ]}>\n {isListDroppable && <RootDropIndicator />}\n <SharedElementTransition>\n <CollectionRoot\n collection={filteredState.collection}\n scrollRef={ref}\n persistedKeys={useDndPersistedKeys(selectionManager, dragAndDropHooks, dropState)}\n renderDropIndicator={useRenderDropIndicator(dragAndDropHooks, dropState)}\n />\n </SharedElementTransition>\n </Provider>\n {emptyState}\n {dragPreview}\n </dom.div>\n </FocusScope>\n );\n}\n\nexport interface GridListItemRenderProps extends ItemRenderProps {\n /** The unique id of the item. */\n id?: Key;\n /**\n * Whether the item's children have keyboard focus.\n *\n * @selector [data-focus-visible-within]\n */\n isFocusVisibleWithin: boolean;\n /**\n * State of the grid list.\n */\n state: ListState<unknown>;\n}\n\nexport interface GridListItemProps<T = object>\n extends\n RenderProps<GridListItemRenderProps>,\n LinkDOMProps,\n HoverEvents,\n PressEvents,\n Omit<GlobalDOMAttributes<HTMLDivElement>, 'onClick'> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element. A function may be provided to compute the class based on component state.\n *\n * @default 'react-aria-GridListItem'\n */\n className?: ClassNameOrFunction<GridListItemRenderProps>;\n /** The unique id of the item. */\n id?: Key;\n /**\n * The object value that this item represents. When using dynamic collections, this is set\n * automatically.\n */\n value?: T;\n /** A string representation of the item's contents, used for features like typeahead. */\n textValue?: string;\n /** Whether the item is disabled. */\n isDisabled?: boolean;\n /**\n * Handler that is called when a user performs an action on the item. The exact user event depends\n * on the collection's `selectionBehavior` prop and the interaction modality.\n */\n onAction?: () => void;\n}\n\n/**\n * A GridListItem represents an individual item in a GridList.\n */\nexport const GridListItem = /*#__PURE__*/ createLeafComponent(ItemNode, function GridListItem<\n T\n>(props: GridListItemProps<T>, forwardedRef: ForwardedRef<HTMLDivElement>, item: Node<T>) {\n let state = useContext(ListStateContext)!;\n let {dragAndDropHooks, dragState, dropState} = useContext(DragAndDropContext);\n let ref = useObjectRef<HTMLDivElement>(forwardedRef);\n let {isVirtualized} = useContext(CollectionRendererContext);\n let isDraggable =\n dragState && !(dragState.isDisabled || dragState.selectionManager.isDisabled(item.key));\n let {rowProps, gridCellProps, descriptionProps, ...states} = useGridListItem(\n {\n node: item,\n shouldSelectOnPressUp: !!dragState,\n isVirtualized\n },\n state,\n ref\n );\n\n let {hoverProps, isHovered} = useHover({\n // because of https://bugs.webkit.org/show_bug.cgi?id=214609, supporting hover styles when a item is ONLY isDraggable\n // results in hover styles sticking around after a reorder/drop operation...\n isDisabled: !states.allowsSelection && !states.hasAction && !isDraggable,\n onHoverStart: item.props.onHoverStart,\n onHoverChange: item.props.onHoverChange,\n onHoverEnd: item.props.onHoverEnd\n });\n\n let {isFocusVisible, focusProps} = useFocusRing();\n let {isFocusVisible: isFocusVisibleWithin, focusProps: focusWithinProps} = useFocusRing({\n within: true\n });\n let {checkboxProps} = useGridListSelectionCheckbox({key: item.key}, state);\n\n let buttonProps =\n state.selectionManager.disabledBehavior === 'all' && states.isDisabled\n ? {isDisabled: true}\n : {};\n\n let draggableItem: DraggableItemResult | null = null;\n if (dragState && dragAndDropHooks) {\n draggableItem = dragAndDropHooks.useDraggableItem!(\n {key: item.key, hasDragButton: true},\n dragState\n );\n }\n\n let dropIndicator: DropIndicatorAria | null = null;\n let dropIndicatorRef = useRef<HTMLDivElement>(null);\n let {visuallyHiddenProps} = useVisuallyHidden();\n if (dropState && dragAndDropHooks) {\n dropIndicator = dragAndDropHooks.useDropIndicator!(\n {\n target: {type: 'item', key: item.key, dropPosition: 'on'}\n },\n dropState,\n dropIndicatorRef\n );\n }\n\n let isDragging = dragState && dragState.isDragging(item.key);\n let renderProps = useRenderProps({\n ...props,\n id: undefined,\n children: item.rendered,\n defaultClassName: 'react-aria-GridListItem',\n values: {\n ...states,\n isHovered,\n isFocusVisible,\n isFocusVisibleWithin,\n selectionMode: state.selectionManager.selectionMode,\n selectionBehavior: state.selectionManager.selectionBehavior,\n allowsDragging: !!dragState,\n isDragging,\n isDropTarget: dropIndicator?.isDropTarget,\n id: item.key,\n state\n }\n });\n\n let dragButtonRef = useRef<HTMLButtonElement>(null);\n useEffect(() => {\n if (dragState && !dragButtonRef.current) {\n console.warn(\n 'Draggable items in a GridList must contain a <Button slot=\"drag\"> element so that keyboard and screen reader users can drag them.'\n );\n }\n // eslint-disable-next-line\n }, []);\n\n useEffect(() => {\n if (!item.textValue && process.env.NODE_ENV !== 'production') {\n console.warn(\n 'A `textValue` prop is required for <GridListItem> elements with non-plain text children in order to support accessibility features such as type to select.'\n );\n }\n }, [item.textValue]);\n\n let DOMProps = filterDOMProps(props as any, {global: true});\n delete DOMProps.id;\n delete DOMProps.onClick;\n\n return (\n <>\n {dropIndicator && !dropIndicator.isHidden && (\n <div role=\"row\" style={{position: 'absolute'}}>\n <div role=\"gridcell\">\n <div\n role=\"button\"\n {...visuallyHiddenProps}\n {...dropIndicator?.dropIndicatorProps}\n ref={dropIndicatorRef}\n />\n </div>\n </div>\n )}\n <dom.div\n {...mergeProps(\n DOMProps,\n renderProps,\n rowProps,\n focusProps,\n focusWithinProps,\n hoverProps,\n draggableItem?.dragProps\n )}\n ref={ref}\n data-selected={states.isSelected || undefined}\n data-disabled={states.isDisabled || undefined}\n data-hovered={isHovered || undefined}\n data-focused={states.isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined}\n data-focus-visible-within={isFocusVisibleWithin || undefined}\n data-pressed={states.isPressed || undefined}\n data-allows-dragging={!!dragState || undefined}\n data-dragging={isDragging || undefined}\n data-drop-target={dropIndicator?.isDropTarget || undefined}\n data-selection-mode={\n state.selectionManager.selectionMode === 'none'\n ? undefined\n : state.selectionManager.selectionMode\n }>\n <div {...gridCellProps} style={{display: 'contents'}}>\n <Provider\n values={[\n [\n CheckboxContext,\n {\n slots: {\n [DEFAULT_SLOT]: {},\n selection: checkboxProps\n }\n }\n ],\n [\n CheckboxFieldContext,\n {\n slots: {\n [DEFAULT_SLOT]: {},\n selection: checkboxProps\n }\n }\n ],\n [\n ButtonContext,\n {\n slots: {\n [DEFAULT_SLOT]: buttonProps,\n drag: {\n ...draggableItem?.dragButtonProps,\n ref: dragButtonRef,\n style: {\n pointerEvents: 'none'\n }\n }\n }\n }\n ],\n [\n TextContext,\n {\n slots: {\n [DEFAULT_SLOT]: {},\n description: descriptionProps\n }\n }\n ],\n [CollectionRendererContext, DefaultCollectionRenderer],\n [ListStateContext, null],\n [SelectableCollectionContext, null],\n [FieldInputContext, null],\n [SelectionIndicatorContext, {isSelected: states.isSelected}]\n ]}>\n {renderProps.children}\n </Provider>\n </div>\n </dom.div>\n </>\n );\n});\n\nfunction GridListDropIndicatorWrapper(props: DropIndicatorProps, ref: ForwardedRef<HTMLElement>) {\n ref = useObjectRef(ref);\n let {dragAndDropHooks, dropState} = useContext(DragAndDropContext);\n let buttonRef = useRef<HTMLDivElement>(null);\n let {dropIndicatorProps, isHidden, isDropTarget} = dragAndDropHooks!.useDropIndicator!(\n props,\n dropState!,\n buttonRef\n );\n\n if (isHidden) {\n return null;\n }\n\n return (\n <GridListDropIndicatorForwardRef\n {...props}\n dropIndicatorProps={dropIndicatorProps}\n isDropTarget={isDropTarget}\n buttonRef={buttonRef}\n ref={ref}\n />\n );\n}\n\ninterface GridListDropIndicatorProps extends DropIndicatorProps {\n dropIndicatorProps: React.HTMLAttributes<HTMLElement>;\n isDropTarget: boolean;\n buttonRef: RefObject<HTMLDivElement | null>;\n}\n\nfunction GridListDropIndicator(props: GridListDropIndicatorProps, ref: ForwardedRef<HTMLElement>) {\n let {dropIndicatorProps, isDropTarget, buttonRef, ...otherProps} = props;\n\n let {visuallyHiddenProps} = useVisuallyHidden();\n let renderProps = useRenderProps({\n ...otherProps,\n defaultClassName: 'react-aria-DropIndicator',\n values: {\n isDropTarget\n }\n });\n\n return (\n <dom.div\n {...renderProps}\n role=\"row\"\n ref={ref as RefObject<HTMLDivElement | null>}\n data-drop-target={isDropTarget || undefined}>\n <div role=\"gridcell\">\n <div {...visuallyHiddenProps} role=\"button\" {...dropIndicatorProps} ref={buttonRef} />\n {renderProps.children}\n </div>\n </dom.div>\n );\n}\n\nconst GridListDropIndicatorForwardRef = forwardRef(GridListDropIndicator);\n\nfunction RootDropIndicator() {\n let {dragAndDropHooks, dropState} = useContext(DragAndDropContext);\n let ref = useRef<HTMLDivElement>(null);\n let {dropIndicatorProps} = dragAndDropHooks!.useDropIndicator!(\n {\n target: {type: 'root'}\n },\n dropState!,\n ref\n );\n let isDropTarget = dropState!.isDropTarget({type: 'root'});\n let {visuallyHiddenProps} = useVisuallyHidden();\n\n if (!isDropTarget && dropIndicatorProps['aria-hidden']) {\n return null;\n }\n\n return (\n <div role=\"row\" aria-hidden={dropIndicatorProps['aria-hidden']} style={{position: 'absolute'}}>\n <div role=\"gridcell\">\n <div role=\"button\" {...visuallyHiddenProps} {...dropIndicatorProps} ref={ref} />\n </div>\n </div>\n );\n}\n\nexport interface GridListLoadMoreItemProps\n extends\n Omit<LoadMoreSentinelProps, 'collection'>,\n StyleProps,\n DOMRenderProps<'div', undefined>,\n GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element.\n *\n * @default 'react-aria-GridListLoadMoreItem'\n */\n className?: string;\n /**\n * The load more spinner to render when loading additional items.\n */\n children?: ReactNode;\n /**\n * Whether or not the loading spinner should be rendered or not.\n */\n isLoading?: boolean;\n}\n\nexport const GridListLoadMoreItem = createLeafComponent(\n LoaderNode,\n function GridListLoadingIndicator(\n props: GridListLoadMoreItemProps,\n ref: ForwardedRef<HTMLDivElement>,\n item: Node<object>\n ) {\n let state = useContext(ListStateContext)!;\n let {isVirtualized} = useContext(CollectionRendererContext);\n let {isLoading, onLoadMore, scrollOffset, ...otherProps} = props;\n\n let sentinelRef = useRef(null);\n let memoedLoadMoreProps = useMemo(\n () => ({\n onLoadMore,\n collection: state?.collection,\n sentinelRef,\n scrollOffset\n }),\n [onLoadMore, scrollOffset, state?.collection]\n );\n useLoadMoreSentinel(memoedLoadMoreProps, sentinelRef);\n\n let renderProps = useRenderProps({\n ...otherProps,\n id: undefined,\n children: item.rendered,\n defaultClassName: 'react-aria-GridListLoadingIndicator',\n values: undefined\n });\n // For now don't include aria-posinset and aria-setsize on loader since they aren't keyboard focusable\n // Arguably shouldn't include them ever since it might be confusing to the user to include the loaders as part of the\n // item count\n\n return (\n <>\n {/* Alway render the sentinel. For now onus is on the user for styling when using flex + gap (this would introduce a gap even though it doesn't take room) */}\n {/* @ts-ignore - compatibility with React < 19 */}\n <div style={{position: 'relative', width: 0, height: 0}} inert={inertValue(true)}>\n <div\n data-testid=\"loadMoreSentinel\"\n ref={sentinelRef}\n style={{position: 'absolute', height: 1, width: 1}}\n />\n </div>\n {isLoading && renderProps.children && (\n <dom.div {...renderProps} {...filterDOMProps(props, {global: true})} role=\"row\" ref={ref}>\n <div aria-colindex={isVirtualized ? 1 : undefined} role=\"gridcell\">\n {renderProps.children}\n </div>\n </dom.div>\n )}\n </>\n );\n }\n);\n\nexport interface GridListSectionProps<T> extends SectionProps<T>, DOMRenderProps<'div', undefined> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element.\n *\n * @default 'react-aria-GridListSection'\n */\n className?: string;\n}\n\n/**\n * A GridListSection represents a section within a GridList.\n */\nexport const GridListSection = /*#__PURE__*/ createBranchComponent(\n SectionNode,\n <T extends any>(\n props: GridListSectionProps<T>,\n ref: ForwardedRef<HTMLDivElement>,\n item: Node<T>\n ) => {\n let state = useContext(ListStateContext)!;\n let {CollectionBranch} = useContext(CollectionRendererContext);\n let headingRef = useRef(null);\n ref = useObjectRef<HTMLDivElement>(ref);\n let {rowHeaderProps, rowProps, rowGroupProps} = useGridListSection(\n {\n 'aria-label': props['aria-label'] ?? undefined\n },\n state,\n ref\n );\n let renderProps = useRenderProps({\n ...props,\n id: undefined,\n children: undefined,\n defaultClassName: 'react-aria-GridListSection',\n values: undefined\n });\n\n let DOMProps = filterDOMProps(props as any, {global: true});\n delete DOMProps.id;\n\n return (\n <dom.div {...mergeProps(DOMProps, renderProps, rowGroupProps)} ref={ref}>\n <Provider\n values={[\n [GridListHeaderContext, {...rowProps, ref: headingRef}],\n [GridListHeaderInnerContext, {...rowHeaderProps}]\n ]}>\n <CollectionBranch collection={state.collection} parent={item} />\n </Provider>\n </dom.div>\n );\n }\n);\n\nexport interface GridListHeaderProps\n extends DOMRenderProps<'div', undefined>, DOMProps, GlobalDOMAttributes<HTMLElement> {}\n\nexport const GridListHeaderContext = createContext<\n ContextValue<GridListHeaderProps, HTMLDivElement>\n>({});\nexport const GridListHeaderInnerContext = createContext<HTMLAttributes<HTMLElement> | null>(null);\n\nexport const GridListHeader = /*#__PURE__*/ createLeafComponent(\n HeaderNode,\n function Header(props: GridListHeaderProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, GridListHeaderContext);\n let rowHeaderProps = useContext(GridListHeaderInnerContext);\n\n return (\n <dom.div render={props.render} className=\"react-aria-GridListHeader\" ref={ref} {...props}>\n <div {...rowHeaderProps} style={{display: 'contents'}}>\n {props.children}\n </div>\n </dom.div>\n );\n }\n);\n"],"names":[],"version":3,"file":"GridList.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6MM,MAAM,0DACX,CAAA,GAAA,oBAAY,EAAoD;AAM3D,MAAM,4CAAyB,AAAd,WAAW,GAAI,CAAA,GAAA,iBAAS,EAAqB,SAAS,SAC5E,KAAuB,EACvB,GAAiC;IAEjC,+FAA+F;IAC/F,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAE3C,qBACE,gCAAC,CAAA,GAAA,wBAAgB;QAAE,uBAAS,gCAAC,CAAA,GAAA,iBAAS,GAAM;OACzC,CAAA,2BAAc,gCAAC;YAAc,OAAO;YAAO,YAAY;YAAY,aAAa;;AAGvF;AAQA,SAAS,oCAAiB,SAAC,KAAK,cAAE,UAAU,EAAE,aAAa,GAAG,EAAwB;IACpF,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK,CAAA,GAAA,yCAA0B;IACrE,IAAI,yBACF,6DAA6D;IAC7D,qBAAqB,UACrB,MAAM,qBACN,iBAAiB,yBACjB,qBAAqB,EACrB,GAAG,oBACJ,GAAG;IACJ,IAAI,oBACF,gBAAgB,8BAChB,6BAA6B,iBAC7B,SAAS,sBACT,cAAc,YACf,GAAG;IACJ,IAAI,kBACF,cAAc,iBACd,aAAa,kBACb,cAAc,EACd,oBAAoB,qBAAqB,EAC1C,GAAG,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,yCAAwB;IACvC,IAAI,gBAAgB,CAAA,GAAA,mBAAW,EAAE;QAC/B,GAAG,kBAAkB;oBACrB;QACA,UAAU;wBACV;IACF;IAEA,IAAI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jD,MAAM,QAAQ;AAIvB","sources":["packages/react-aria-components/src/GridList.tsx"],"sourcesContent":["/*\n * Copyright 2022 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 */\nimport {\n AriaGridListProps,\n useGridList,\n useGridListItem,\n useGridListSection,\n useGridListSelectionCheckbox\n} from 'react-aria/useGridList';\n\nimport {ButtonContext} from './Button';\nimport {CheckboxContext, CheckboxFieldContext} from './Checkbox';\nimport {\n ClassNameOrFunction,\n ContextValue,\n DEFAULT_SLOT,\n dom,\n DOMProps,\n DOMRenderProps,\n Provider,\n RenderProps,\n SlotProps,\n StyleProps,\n StyleRenderProps,\n useContextProps,\n useRenderProps\n} from './utils';\nimport {Collection} from 'react-aria/Collection';\nimport {\n CollectionBuilder,\n createBranchComponent,\n createLeafComponent\n} from 'react-aria/CollectionBuilder';\nimport {\n CollectionProps,\n CollectionRendererContext,\n DefaultCollectionRenderer,\n ItemRenderProps,\n SectionProps\n} from './Collection';\nimport {\n DragAndDropContext,\n DropIndicatorContext,\n DropIndicatorProps,\n useDndPersistedKeys,\n useRenderDropIndicator\n} from './DragAndDrop';\nimport {DragAndDropHooks} from './useDragAndDrop';\nimport {DraggableCollectionState} from 'react-stately/useDraggableCollectionState';\nimport {DraggableItemResult} from 'react-aria/useDraggableCollection';\nimport {DragPreviewRenderer} from '@react-types/shared';\nimport {DropIndicatorAria, DroppableCollectionResult} from 'react-aria/useDroppableCollection';\nimport {DroppableCollectionState} from 'react-stately/useDroppableCollectionState';\nimport {\n FieldInputContext,\n SelectableCollectionContext,\n SelectableCollectionContextValue\n} from './Autocomplete';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {FocusScope} from 'react-aria/FocusScope';\nimport {\n forwardRefType,\n GlobalDOMAttributes,\n HoverEvents,\n Key,\n LinkDOMProps,\n Orientation,\n PressEvents,\n RefObject\n} from '@react-types/shared';\nimport {\n HeaderNode,\n ItemNode,\n LoaderNode,\n SectionNode\n} from 'react-aria/private/collections/BaseCollection';\nimport {Collection as ICollection, Node, SelectionBehavior} from '@react-types/shared';\nimport {inertValue} from 'react-aria/private/utils/inertValue';\nimport {ListKeyboardDelegate} from 'react-aria/ListKeyboardDelegate';\nimport {ListState, UNSTABLE_useFilteredListState, useListState} from 'react-stately/useListState';\nimport {ListStateContext} from './ListBox';\nimport {\n LoadMoreSentinelProps,\n useLoadMoreSentinel\n} from 'react-aria/private/utils/useLoadMoreSentinel';\nimport {mergeProps} from 'react-aria/mergeProps';\nimport React, {\n createContext,\n ForwardedRef,\n forwardRef,\n HTMLAttributes,\n JSX,\n ReactNode,\n useContext,\n useEffect,\n useMemo,\n useRef\n} from 'react';\nimport {SelectionIndicatorContext} from './SelectionIndicator';\nimport {SharedElementTransition} from './SharedElementTransition';\nimport {TextContext} from './Text';\nimport {useCollator} from 'react-aria/useCollator';\nimport {useFocusRing} from 'react-aria/useFocusRing';\nimport {useHover} from 'react-aria/useHover';\nimport {useLocale} from 'react-aria/I18nProvider';\nimport {useObjectRef} from 'react-aria/useObjectRef';\nimport {useVisuallyHidden} from 'react-aria/VisuallyHidden';\n\nexport interface GridListRenderProps {\n /**\n * Whether the list has no items and should display its empty state.\n *\n * @selector [data-empty]\n */\n isEmpty: boolean;\n /**\n * Whether the grid list is currently focused.\n *\n * @selector [data-focused]\n */\n isFocused: boolean;\n /**\n * Whether the grid list is currently keyboard focused.\n *\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean;\n /**\n * Whether the grid list is currently the active drop target.\n *\n * @selector [data-drop-target]\n */\n isDropTarget: boolean;\n /**\n * Whether the items are arranged in a stack or grid.\n *\n * @selector [data-layout=\"stack | grid\"]\n */\n layout: 'stack' | 'grid';\n /**\n * The primary orientation of the items.\n *\n * @selector [data-orientation=\"vertical | horizontal\"]\n */\n orientation: Orientation;\n /**\n * State of the grid list.\n */\n state: ListState<unknown>;\n}\n\nexport interface GridListProps<T>\n extends\n Omit<AriaGridListProps<T>, 'children'>,\n CollectionProps<T>,\n StyleRenderProps<GridListRenderProps>,\n SlotProps,\n GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element. A function may be provided to compute the class based on component state.\n *\n * @default 'react-aria-GridList'\n */\n className?: ClassNameOrFunction<GridListRenderProps>;\n /**\n * Whether typeahead navigation is disabled.\n *\n * @default false\n */\n disallowTypeAhead?: boolean;\n /**\n * How multiple selection should behave in the collection.\n *\n * @default 'toggle'\n */\n selectionBehavior?: SelectionBehavior;\n /**\n * The drag and drop hooks returned by `useDragAndDrop` used to enable drag and drop behavior for\n * the GridList.\n */\n dragAndDropHooks?: DragAndDropHooks<NoInfer<T>>;\n /** Provides content to display when there are no items in the list. */\n renderEmptyState?: (props: GridListRenderProps) => ReactNode;\n /**\n * Whether the items are arranged in a stack or grid.\n *\n * @default 'stack'\n */\n layout?: 'stack' | 'grid';\n /**\n * The primary orientation of the items. Usually this is the direction that the collection\n * scrolls.\n *\n * @default 'vertical'\n */\n orientation?: Orientation;\n /**\n * Which item in the collection to focus when tabbing into the collection. Overrides default\n * roving tab index like behavior.\n *\n * @private\n */\n UNSTABLE_focusOnEntry?: 'first' | 'last';\n}\n\nexport const GridListContext =\n createContext<ContextValue<GridListProps<any>, HTMLDivElement>>(null);\n\n/**\n * A grid list displays a list of interactive items, with support for keyboard navigation,\n * single or multiple selection, and row actions.\n */\nexport const GridList = /*#__PURE__*/ (forwardRef as forwardRefType)(function GridList<T>(\n props: GridListProps<T>,\n ref: ForwardedRef<HTMLDivElement>\n) {\n // Render the portal first so that we have the collection by the time we render the DOM in SSR.\n [props, ref] = useContextProps(props, ref, GridListContext);\n\n return (\n <CollectionBuilder content={<Collection {...props} />}>\n {collection => <GridListInner props={props} collection={collection} gridListRef={ref} />}\n </CollectionBuilder>\n );\n});\n\ninterface GridListInnerProps<T> {\n props: GridListProps<T> & SelectableCollectionContextValue<T>;\n collection: ICollection<Node<any>>;\n gridListRef: RefObject<HTMLElement | null>;\n}\n\nfunction GridListInner<T>({props, collection, gridListRef: ref}: GridListInnerProps<T>) {\n [props, ref] = useContextProps(props, ref, SelectableCollectionContext);\n let {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n shouldUseVirtualFocus,\n filter,\n disallowTypeAhead,\n UNSTABLE_focusOnEntry,\n ...DOMCollectionProps\n } = props;\n let {\n dragAndDropHooks,\n keyboardNavigationBehavior = 'arrow',\n layout = 'stack',\n orientation = 'vertical'\n } = props;\n let {\n CollectionRoot,\n isVirtualized,\n layoutDelegate,\n dropTargetDelegate: ctxDropTargetDelegate\n } = useContext(CollectionRendererContext);\n let gridlistState = useListState({\n ...DOMCollectionProps,\n collection,\n children: undefined,\n layoutDelegate\n });\n\n let filteredState = UNSTABLE_useFilteredListState(gridlistState as ListState<T>, filter);\n let collator = useCollator({usage: 'search', sensitivity: 'base'});\n let {disabledBehavior, disabledKeys} = filteredState.selectionManager;\n let {direction} = useLocale();\n let keyboardDelegate = useMemo(\n () =>\n new ListKeyboardDelegate({\n collection: filteredState.collection,\n collator,\n ref,\n disabledKeys,\n disabledBehavior,\n layoutDelegate,\n layout,\n orientation,\n direction\n }),\n [\n filteredState.collection,\n ref,\n layout,\n orientation,\n disabledKeys,\n disabledBehavior,\n layoutDelegate,\n collator,\n direction\n ]\n );\n\n let {gridProps} = useGridList(\n {\n ...DOMCollectionProps,\n keyboardDelegate,\n // Only tab navigation is supported in grid layout.\n keyboardNavigationBehavior: layout === 'grid' ? 'tab' : keyboardNavigationBehavior,\n isVirtualized,\n shouldSelectOnPressUp: props.shouldSelectOnPressUp,\n disallowTypeAhead,\n UNSTABLE_focusOnEntry\n },\n filteredState,\n ref\n );\n\n let selectionManager = filteredState.selectionManager;\n let isListDraggable = !!dragAndDropHooks?.useDraggableCollectionState;\n let isListDroppable = !!dragAndDropHooks?.useDroppableCollectionState;\n let dragHooksProvided = useRef(isListDraggable);\n let dropHooksProvided = useRef(isListDroppable);\n useEffect(() => {\n if (process.env.NODE_ENV === 'production') {\n return;\n }\n if (dragHooksProvided.current !== isListDraggable) {\n console.warn(\n 'Drag hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.'\n );\n }\n if (dropHooksProvided.current !== isListDroppable) {\n console.warn(\n 'Drop hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.'\n );\n }\n }, [isListDraggable, isListDroppable]);\n\n let dragState: DraggableCollectionState | undefined = undefined;\n let dropState: DroppableCollectionState | undefined = undefined;\n let droppableCollection: DroppableCollectionResult | undefined = undefined;\n let isRootDropTarget = false;\n let dragPreview: JSX.Element | null = null;\n let preview = useRef<DragPreviewRenderer>(null);\n\n if (isListDraggable && dragAndDropHooks) {\n dragState = dragAndDropHooks.useDraggableCollectionState!({\n collection: filteredState.collection,\n selectionManager,\n preview: dragAndDropHooks.renderDragPreview ? preview : undefined\n });\n dragAndDropHooks.useDraggableCollection!({}, dragState, ref);\n\n let DragPreview = dragAndDropHooks.DragPreview!;\n dragPreview = dragAndDropHooks.renderDragPreview ? (\n <DragPreview ref={preview}>{dragAndDropHooks.renderDragPreview}</DragPreview>\n ) : null;\n }\n\n if (isListDroppable && dragAndDropHooks) {\n dropState = dragAndDropHooks.useDroppableCollectionState!({\n collection: filteredState.collection,\n selectionManager\n });\n\n let dropTargetDelegate =\n dragAndDropHooks.dropTargetDelegate ||\n ctxDropTargetDelegate ||\n new dragAndDropHooks.ListDropTargetDelegate(collection, ref, {\n layout,\n direction,\n orientation\n });\n droppableCollection = dragAndDropHooks.useDroppableCollection!(\n {\n keyboardDelegate,\n dropTargetDelegate\n },\n dropState,\n ref\n );\n\n isRootDropTarget = dropState.isDropTarget({type: 'root'});\n }\n\n let {focusProps, isFocused, isFocusVisible} = useFocusRing();\n let isEmpty = filteredState.collection.size === 0;\n let renderValues = {\n isDropTarget: isRootDropTarget,\n orientation,\n isEmpty,\n isFocused,\n isFocusVisible,\n layout,\n state: filteredState\n };\n let renderProps = useRenderProps({\n ...props,\n children: undefined,\n defaultClassName: 'react-aria-GridList',\n values: renderValues\n });\n\n let emptyState: ReactNode = null;\n let emptyStatePropOverrides: HTMLAttributes<HTMLElement> | null = null;\n\n if (isEmpty && props.renderEmptyState) {\n let content = props.renderEmptyState(renderValues);\n emptyState = (\n <div role=\"row\" aria-rowindex={1} style={{display: 'contents'}}>\n <div role=\"gridcell\" style={{display: 'contents'}}>\n {content}\n </div>\n </div>\n );\n }\n\n let DOMProps = filterDOMProps(props, {global: true});\n\n return (\n <FocusScope>\n <dom.div\n {...mergeProps(\n DOMProps,\n renderProps,\n gridProps,\n focusProps,\n droppableCollection?.collectionProps,\n emptyStatePropOverrides\n )}\n ref={ref as RefObject<HTMLDivElement>}\n slot={props.slot || undefined}\n onScroll={props.onScroll}\n data-drop-target={isRootDropTarget || undefined}\n data-empty={isEmpty || undefined}\n data-focused={isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined}\n data-layout={layout}\n data-orientation={orientation}>\n <Provider\n values={[\n [ListStateContext, filteredState],\n [DragAndDropContext, {dragAndDropHooks, dragState, dropState}],\n [DropIndicatorContext, {render: GridListDropIndicatorWrapper}]\n ]}>\n {isListDroppable && <RootDropIndicator />}\n <SharedElementTransition>\n <CollectionRoot\n collection={filteredState.collection}\n scrollRef={ref}\n persistedKeys={useDndPersistedKeys(selectionManager, dragAndDropHooks, dropState)}\n renderDropIndicator={useRenderDropIndicator(dragAndDropHooks, dropState)}\n />\n </SharedElementTransition>\n </Provider>\n {emptyState}\n {dragPreview}\n </dom.div>\n </FocusScope>\n );\n}\n\nexport interface GridListItemRenderProps extends ItemRenderProps {\n /** The unique id of the item. */\n id?: Key;\n /**\n * Whether the item's children have keyboard focus.\n *\n * @selector [data-focus-visible-within]\n */\n isFocusVisibleWithin: boolean;\n /**\n * State of the grid list.\n */\n state: ListState<unknown>;\n}\n\nexport interface GridListItemProps<T = object>\n extends\n RenderProps<GridListItemRenderProps>,\n LinkDOMProps,\n HoverEvents,\n PressEvents,\n Omit<GlobalDOMAttributes<HTMLDivElement>, 'onClick'> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element. A function may be provided to compute the class based on component state.\n *\n * @default 'react-aria-GridListItem'\n */\n className?: ClassNameOrFunction<GridListItemRenderProps>;\n /** The unique id of the item. */\n id?: Key;\n /**\n * The object value that this item represents. When using dynamic collections, this is set\n * automatically.\n */\n value?: T;\n /** A string representation of the item's contents, used for features like typeahead. */\n textValue?: string;\n /** Whether the item is disabled. */\n isDisabled?: boolean;\n /**\n * Handler that is called when a user performs an action on the item. The exact user event depends\n * on the collection's `selectionBehavior` prop and the interaction modality.\n */\n onAction?: () => void;\n}\n\n/**\n * A GridListItem represents an individual item in a GridList.\n */\nexport const GridListItem = /*#__PURE__*/ createLeafComponent(ItemNode, function GridListItem<\n T\n>(props: GridListItemProps<T>, forwardedRef: ForwardedRef<HTMLDivElement>, item: Node<T>) {\n let state = useContext(ListStateContext)!;\n let {dragAndDropHooks, dragState, dropState} = useContext(DragAndDropContext);\n let ref = useObjectRef<HTMLDivElement>(forwardedRef);\n let {isVirtualized} = useContext(CollectionRendererContext);\n let isDraggable =\n dragState && !(dragState.isDisabled || dragState.selectionManager.isDisabled(item.key));\n let {rowProps, gridCellProps, descriptionProps, ...states} = useGridListItem(\n {\n node: item,\n shouldSelectOnPressUp: !!dragState,\n isVirtualized\n },\n state,\n ref\n );\n\n let {hoverProps, isHovered} = useHover({\n // because of https://bugs.webkit.org/show_bug.cgi?id=214609, supporting hover styles when a item is ONLY isDraggable\n // results in hover styles sticking around after a reorder/drop operation...\n isDisabled: !states.allowsSelection && !states.hasAction && !isDraggable,\n onHoverStart: item.props.onHoverStart,\n onHoverChange: item.props.onHoverChange,\n onHoverEnd: item.props.onHoverEnd\n });\n\n let {isFocusVisible, focusProps} = useFocusRing();\n let {isFocusVisible: isFocusVisibleWithin, focusProps: focusWithinProps} = useFocusRing({\n within: true\n });\n let {checkboxProps} = useGridListSelectionCheckbox({key: item.key}, state);\n\n let buttonProps =\n state.selectionManager.disabledBehavior === 'all' && states.isDisabled\n ? {isDisabled: true}\n : {};\n\n let draggableItem: DraggableItemResult | null = null;\n if (dragState && dragAndDropHooks) {\n draggableItem = dragAndDropHooks.useDraggableItem!(\n {key: item.key, hasDragButton: true},\n dragState\n );\n }\n\n let dropIndicator: DropIndicatorAria | null = null;\n let dropIndicatorRef = useRef<HTMLDivElement>(null);\n let {visuallyHiddenProps} = useVisuallyHidden();\n if (dropState && dragAndDropHooks) {\n dropIndicator = dragAndDropHooks.useDropIndicator!(\n {\n target: {type: 'item', key: item.key, dropPosition: 'on'}\n },\n dropState,\n dropIndicatorRef\n );\n }\n\n let isDragging = dragState && dragState.isDragging(item.key);\n let renderProps = useRenderProps({\n ...props,\n id: undefined,\n children: item.rendered,\n defaultClassName: 'react-aria-GridListItem',\n values: {\n ...states,\n isHovered,\n isFocusVisible,\n isFocusVisibleWithin,\n selectionMode: state.selectionManager.selectionMode,\n selectionBehavior: state.selectionManager.selectionBehavior,\n allowsDragging: !!dragState,\n isDragging,\n isDropTarget: dropIndicator?.isDropTarget,\n id: item.key,\n state\n }\n });\n\n let dragButtonRef = useRef<HTMLButtonElement>(null);\n useEffect(() => {\n if (dragState && !dragButtonRef.current) {\n console.warn(\n 'Draggable items in a GridList must contain a <Button slot=\"drag\"> element so that keyboard and screen reader users can drag them.'\n );\n }\n // eslint-disable-next-line\n }, []);\n\n useEffect(() => {\n if (!item.textValue && process.env.NODE_ENV !== 'production') {\n console.warn(\n 'A `textValue` prop is required for <GridListItem> elements with non-plain text children in order to support accessibility features such as type to select.'\n );\n }\n }, [item.textValue]);\n\n let DOMProps = filterDOMProps(props as any, {global: true});\n delete DOMProps.id;\n delete DOMProps.onClick;\n\n return (\n <>\n {dropIndicator && !dropIndicator.isHidden && (\n <div role=\"row\" style={{position: 'absolute'}}>\n <div role=\"gridcell\">\n <div\n role=\"button\"\n {...visuallyHiddenProps}\n {...dropIndicator?.dropIndicatorProps}\n ref={dropIndicatorRef}\n />\n </div>\n </div>\n )}\n <dom.div\n {...mergeProps(\n DOMProps,\n renderProps,\n rowProps,\n focusProps,\n focusWithinProps,\n hoverProps,\n draggableItem?.dragProps\n )}\n ref={ref}\n data-selected={states.isSelected || undefined}\n data-disabled={states.isDisabled || undefined}\n data-hovered={isHovered || undefined}\n data-focused={states.isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined}\n data-focus-visible-within={isFocusVisibleWithin || undefined}\n data-pressed={states.isPressed || undefined}\n data-allows-dragging={!!dragState || undefined}\n data-dragging={isDragging || undefined}\n data-drop-target={dropIndicator?.isDropTarget || undefined}\n data-selection-mode={\n state.selectionManager.selectionMode === 'none'\n ? undefined\n : state.selectionManager.selectionMode\n }>\n <div {...gridCellProps} style={{display: 'contents'}}>\n <Provider\n values={[\n [\n CheckboxContext,\n {\n slots: {\n [DEFAULT_SLOT]: {},\n selection: checkboxProps\n }\n }\n ],\n [\n CheckboxFieldContext,\n {\n slots: {\n [DEFAULT_SLOT]: {},\n selection: checkboxProps\n }\n }\n ],\n [\n ButtonContext,\n {\n slots: {\n [DEFAULT_SLOT]: buttonProps,\n drag: {\n ...draggableItem?.dragButtonProps,\n ref: dragButtonRef,\n style: {\n pointerEvents: 'none'\n }\n }\n }\n }\n ],\n [\n TextContext,\n {\n slots: {\n [DEFAULT_SLOT]: {},\n description: descriptionProps\n }\n }\n ],\n [CollectionRendererContext, DefaultCollectionRenderer],\n [ListStateContext, null],\n [SelectableCollectionContext, null],\n [FieldInputContext, null],\n [SelectionIndicatorContext, {isSelected: states.isSelected}]\n ]}>\n {renderProps.children}\n </Provider>\n </div>\n </dom.div>\n </>\n );\n});\n\nfunction GridListDropIndicatorWrapper(props: DropIndicatorProps, ref: ForwardedRef<HTMLElement>) {\n ref = useObjectRef(ref);\n let {dragAndDropHooks, dropState} = useContext(DragAndDropContext);\n let buttonRef = useRef<HTMLDivElement>(null);\n let {dropIndicatorProps, isHidden, isDropTarget} = dragAndDropHooks!.useDropIndicator!(\n props,\n dropState!,\n buttonRef\n );\n\n if (isHidden) {\n return null;\n }\n\n return (\n <GridListDropIndicatorForwardRef\n {...props}\n dropIndicatorProps={dropIndicatorProps}\n isDropTarget={isDropTarget}\n buttonRef={buttonRef}\n ref={ref}\n />\n );\n}\n\ninterface GridListDropIndicatorProps extends DropIndicatorProps {\n dropIndicatorProps: React.HTMLAttributes<HTMLElement>;\n isDropTarget: boolean;\n buttonRef: RefObject<HTMLDivElement | null>;\n}\n\nfunction GridListDropIndicator(props: GridListDropIndicatorProps, ref: ForwardedRef<HTMLElement>) {\n let {dropIndicatorProps, isDropTarget, buttonRef, ...otherProps} = props;\n\n let {visuallyHiddenProps} = useVisuallyHidden();\n let renderProps = useRenderProps({\n ...otherProps,\n defaultClassName: 'react-aria-DropIndicator',\n values: {\n isDropTarget\n }\n });\n\n return (\n <dom.div\n {...renderProps}\n role=\"row\"\n ref={ref as RefObject<HTMLDivElement | null>}\n data-drop-target={isDropTarget || undefined}>\n <div role=\"gridcell\">\n <div {...visuallyHiddenProps} role=\"button\" {...dropIndicatorProps} ref={buttonRef} />\n {renderProps.children}\n </div>\n </dom.div>\n );\n}\n\nconst GridListDropIndicatorForwardRef = forwardRef(GridListDropIndicator);\n\nfunction RootDropIndicator() {\n let {dragAndDropHooks, dropState} = useContext(DragAndDropContext);\n let ref = useRef<HTMLDivElement>(null);\n let {dropIndicatorProps} = dragAndDropHooks!.useDropIndicator!(\n {\n target: {type: 'root'}\n },\n dropState!,\n ref\n );\n let isDropTarget = dropState!.isDropTarget({type: 'root'});\n let {visuallyHiddenProps} = useVisuallyHidden();\n\n if (!isDropTarget && dropIndicatorProps['aria-hidden']) {\n return null;\n }\n\n return (\n <div role=\"row\" aria-hidden={dropIndicatorProps['aria-hidden']} style={{position: 'absolute'}}>\n <div role=\"gridcell\">\n <div role=\"button\" {...visuallyHiddenProps} {...dropIndicatorProps} ref={ref} />\n </div>\n </div>\n );\n}\n\nexport interface GridListLoadMoreItemProps\n extends\n Omit<LoadMoreSentinelProps, 'collection'>,\n StyleProps,\n DOMRenderProps<'div', undefined>,\n GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element.\n *\n * @default 'react-aria-GridListLoadMoreItem'\n */\n className?: string;\n /**\n * The load more spinner to render when loading additional items.\n */\n children?: ReactNode;\n /**\n * Whether or not the loading spinner should be rendered or not.\n */\n isLoading?: boolean;\n}\n\nexport const GridListLoadMoreItem = createLeafComponent(\n LoaderNode,\n function GridListLoadingIndicator(\n props: GridListLoadMoreItemProps,\n ref: ForwardedRef<HTMLDivElement>,\n item: Node<object>\n ) {\n let state = useContext(ListStateContext)!;\n let {isVirtualized} = useContext(CollectionRendererContext);\n let {isLoading, onLoadMore, scrollOffset, ...otherProps} = props;\n\n let sentinelRef = useRef(null);\n let memoedLoadMoreProps = useMemo(\n () => ({\n onLoadMore,\n collection: state?.collection,\n sentinelRef,\n scrollOffset\n }),\n [onLoadMore, scrollOffset, state?.collection]\n );\n useLoadMoreSentinel(memoedLoadMoreProps, sentinelRef);\n\n let renderProps = useRenderProps({\n ...otherProps,\n id: undefined,\n children: item.rendered,\n defaultClassName: 'react-aria-GridListLoadingIndicator',\n values: undefined\n });\n // For now don't include aria-posinset and aria-setsize on loader since they aren't keyboard focusable\n // Arguably shouldn't include them ever since it might be confusing to the user to include the loaders as part of the\n // item count\n\n return (\n <>\n {/* Alway render the sentinel. For now onus is on the user for styling when using flex + gap (this would introduce a gap even though it doesn't take room) */}\n {/* @ts-ignore - compatibility with React < 19 */}\n <div style={{position: 'relative', width: 0, height: 0}} inert={inertValue(true)}>\n <div\n data-testid=\"loadMoreSentinel\"\n ref={sentinelRef}\n style={{position: 'absolute', height: 1, width: 1}}\n />\n </div>\n {isLoading && renderProps.children && (\n <dom.div {...renderProps} {...filterDOMProps(props, {global: true})} role=\"row\" ref={ref}>\n <div aria-colindex={isVirtualized ? 1 : undefined} role=\"gridcell\">\n {renderProps.children}\n </div>\n </dom.div>\n )}\n </>\n );\n }\n);\n\nexport interface GridListSectionProps<T> extends SectionProps<T>, DOMRenderProps<'div', undefined> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element.\n *\n * @default 'react-aria-GridListSection'\n */\n className?: string;\n}\n\n/**\n * A GridListSection represents a section within a GridList.\n */\nexport const GridListSection = /*#__PURE__*/ createBranchComponent(\n SectionNode,\n <T extends any>(\n props: GridListSectionProps<T>,\n ref: ForwardedRef<HTMLDivElement>,\n item: Node<T>\n ) => {\n let state = useContext(ListStateContext)!;\n let {CollectionBranch} = useContext(CollectionRendererContext);\n let headingRef = useRef(null);\n ref = useObjectRef<HTMLDivElement>(ref);\n let {rowHeaderProps, rowProps, rowGroupProps} = useGridListSection(\n {\n 'aria-label': props['aria-label'] ?? undefined\n },\n state,\n ref\n );\n let renderProps = useRenderProps({\n ...props,\n id: undefined,\n children: undefined,\n defaultClassName: 'react-aria-GridListSection',\n values: undefined\n });\n\n let DOMProps = filterDOMProps(props as any, {global: true});\n delete DOMProps.id;\n\n return (\n <dom.div {...mergeProps(DOMProps, renderProps, rowGroupProps)} ref={ref}>\n <Provider\n values={[\n [GridListHeaderContext, {...rowProps, ref: headingRef}],\n [GridListHeaderInnerContext, {...rowHeaderProps}]\n ]}>\n <CollectionBranch collection={state.collection} parent={item} />\n </Provider>\n </dom.div>\n );\n }\n);\n\nexport interface GridListHeaderProps\n extends DOMRenderProps<'div', undefined>, DOMProps, GlobalDOMAttributes<HTMLElement> {}\n\nexport const GridListHeaderContext = createContext<\n ContextValue<GridListHeaderProps, HTMLDivElement>\n>({});\nexport const GridListHeaderInnerContext = createContext<HTMLAttributes<HTMLElement> | null>(null);\n\nexport const GridListHeader = /*#__PURE__*/ createLeafComponent(\n HeaderNode,\n function Header(props: GridListHeaderProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, GridListHeaderContext);\n let rowHeaderProps = useContext(GridListHeaderInnerContext);\n\n return (\n <dom.div render={props.render} className=\"react-aria-GridListHeader\" ref={ref} {...props}>\n <div {...rowHeaderProps} style={{display: 'contents'}}>\n {props.children}\n </div>\n </dom.div>\n );\n }\n);\n"],"names":[],"version":3,"file":"GridList.js.map"}
@@ -79,8 +79,8 @@ const $1f7649abe3ae3599$export$a7bfbda1311ca015 = /*#__PURE__*/ (0, $6XsrP$forwa
79
79
  });
80
80
  function $1f7649abe3ae3599$var$GridListInner({ props: props, collection: collection, gridListRef: ref }) {
81
81
  [props, ref] = (0, $7230ffa83bc0c2cf$export$29f1550f4b0d4415)(props, ref, (0, $4b38b5b75ecc6208$export$b0d3ecf7112093a7));
82
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
83
- let { shouldUseVirtualFocus: shouldUseVirtualFocus, filter: filter, disallowTypeAhead: disallowTypeAhead, ...DOMCollectionProps } = props;
82
+ let { shouldUseVirtualFocus: // eslint-disable-next-line @typescript-eslint/no-unused-vars
83
+ shouldUseVirtualFocus, filter: filter, disallowTypeAhead: disallowTypeAhead, UNSTABLE_focusOnEntry: UNSTABLE_focusOnEntry, ...DOMCollectionProps } = props;
84
84
  let { dragAndDropHooks: dragAndDropHooks, keyboardNavigationBehavior: keyboardNavigationBehavior = 'arrow', layout: layout = 'stack', orientation: orientation = 'vertical' } = props;
85
85
  let { CollectionRoot: CollectionRoot, isVirtualized: isVirtualized, layoutDelegate: layoutDelegate, dropTargetDelegate: ctxDropTargetDelegate } = (0, $6XsrP$useContext)((0, $263ab7fc0f95ccdb$export$4feb769f8ddf26c5));
86
86
  let gridlistState = (0, $6XsrP$useListState)({
@@ -124,7 +124,8 @@ function $1f7649abe3ae3599$var$GridListInner({ props: props, collection: collect
124
124
  keyboardNavigationBehavior: layout === 'grid' ? 'tab' : keyboardNavigationBehavior,
125
125
  isVirtualized: isVirtualized,
126
126
  shouldSelectOnPressUp: props.shouldSelectOnPressUp,
127
- disallowTypeAhead: disallowTypeAhead
127
+ disallowTypeAhead: disallowTypeAhead,
128
+ UNSTABLE_focusOnEntry: UNSTABLE_focusOnEntry
128
129
  }, filteredState, ref);
129
130
  let selectionManager = filteredState.selectionManager;
130
131
  let isListDraggable = !!dragAndDropHooks?.useDraggableCollectionState;
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsMM,MAAM,0DACX,CAAA,GAAA,oBAAY,EAAoD;AAM3D,MAAM,4CAAyB,AAAd,WAAW,GAAI,CAAA,GAAA,iBAAS,EAAqB,SAAS,SAC5E,KAAuB,EACvB,GAAiC;IAEjC,+FAA+F;IAC/F,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAE3C,qBACE,gCAAC,CAAA,GAAA,wBAAgB;QAAE,uBAAS,gCAAC,CAAA,GAAA,iBAAS,GAAM;OACzC,CAAA,2BAAc,gCAAC;YAAc,OAAO;YAAO,YAAY;YAAY,aAAa;;AAGvF;AAQA,SAAS,oCAAiB,SAAC,KAAK,cAAE,UAAU,EAAE,aAAa,GAAG,EAAwB;IACpF,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK,CAAA,GAAA,yCAA0B;IACrE,6DAA6D;IAC7D,IAAI,yBAAC,qBAAqB,UAAE,MAAM,qBAAE,iBAAiB,EAAE,GAAG,oBAAmB,GAAG;IAChF,IAAI,oBACF,gBAAgB,8BAChB,6BAA6B,iBAC7B,SAAS,sBACT,cAAc,YACf,GAAG;IACJ,IAAI,kBACF,cAAc,iBACd,aAAa,kBACb,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cesContent":["/*\n * Copyright 2022 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 */\nimport {\n AriaGridListProps,\n useGridList,\n useGridListItem,\n useGridListSection,\n useGridListSelectionCheckbox\n} from 'react-aria/useGridList';\n\nimport {ButtonContext} from './Button';\nimport {CheckboxContext, CheckboxFieldContext} from './Checkbox';\nimport {\n ClassNameOrFunction,\n ContextValue,\n DEFAULT_SLOT,\n dom,\n DOMProps,\n DOMRenderProps,\n Provider,\n RenderProps,\n SlotProps,\n StyleProps,\n StyleRenderProps,\n useContextProps,\n useRenderProps\n} from './utils';\nimport {Collection} from 'react-aria/Collection';\nimport {\n CollectionBuilder,\n createBranchComponent,\n createLeafComponent\n} from 'react-aria/CollectionBuilder';\nimport {\n CollectionProps,\n CollectionRendererContext,\n DefaultCollectionRenderer,\n ItemRenderProps,\n SectionProps\n} from './Collection';\nimport {\n DragAndDropContext,\n DropIndicatorContext,\n DropIndicatorProps,\n useDndPersistedKeys,\n useRenderDropIndicator\n} from './DragAndDrop';\nimport {DragAndDropHooks} from './useDragAndDrop';\nimport {DraggableCollectionState} from 'react-stately/useDraggableCollectionState';\nimport {DraggableItemResult} from 'react-aria/useDraggableCollection';\nimport {DragPreviewRenderer} from '@react-types/shared';\nimport {DropIndicatorAria, DroppableCollectionResult} from 'react-aria/useDroppableCollection';\nimport {DroppableCollectionState} from 'react-stately/useDroppableCollectionState';\nimport {\n FieldInputContext,\n SelectableCollectionContext,\n SelectableCollectionContextValue\n} from './Autocomplete';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {FocusScope} from 'react-aria/FocusScope';\nimport {\n forwardRefType,\n GlobalDOMAttributes,\n HoverEvents,\n Key,\n LinkDOMProps,\n Orientation,\n PressEvents,\n RefObject\n} from '@react-types/shared';\nimport {\n HeaderNode,\n ItemNode,\n LoaderNode,\n SectionNode\n} from 'react-aria/private/collections/BaseCollection';\nimport {Collection as ICollection, Node, SelectionBehavior} from '@react-types/shared';\nimport {inertValue} from 'react-aria/private/utils/inertValue';\nimport {ListKeyboardDelegate} from 'react-aria/ListKeyboardDelegate';\nimport {ListState, UNSTABLE_useFilteredListState, useListState} from 'react-stately/useListState';\nimport {ListStateContext} from './ListBox';\nimport {\n LoadMoreSentinelProps,\n useLoadMoreSentinel\n} from 'react-aria/private/utils/useLoadMoreSentinel';\nimport {mergeProps} from 'react-aria/mergeProps';\nimport React, {\n createContext,\n ForwardedRef,\n forwardRef,\n HTMLAttributes,\n JSX,\n ReactNode,\n useContext,\n useEffect,\n useMemo,\n useRef\n} from 'react';\nimport {SelectionIndicatorContext} from './SelectionIndicator';\nimport {SharedElementTransition} from './SharedElementTransition';\nimport {TextContext} from './Text';\nimport {useCollator} from 'react-aria/useCollator';\nimport {useFocusRing} from 'react-aria/useFocusRing';\nimport {useHover} from 'react-aria/useHover';\nimport {useLocale} from 'react-aria/I18nProvider';\nimport {useObjectRef} from 'react-aria/useObjectRef';\nimport {useVisuallyHidden} from 'react-aria/VisuallyHidden';\n\nexport interface GridListRenderProps {\n /**\n * Whether the list has no items and should display its empty state.\n *\n * @selector [data-empty]\n */\n isEmpty: boolean;\n /**\n * Whether the grid list is currently focused.\n *\n * @selector [data-focused]\n */\n isFocused: boolean;\n /**\n * Whether the grid list is currently keyboard focused.\n *\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean;\n /**\n * Whether the grid list is currently the active drop target.\n *\n * @selector [data-drop-target]\n */\n isDropTarget: boolean;\n /**\n * Whether the items are arranged in a stack or grid.\n *\n * @selector [data-layout=\"stack | grid\"]\n */\n layout: 'stack' | 'grid';\n /**\n * The primary orientation of the items.\n *\n * @selector [data-orientation=\"vertical | horizontal\"]\n */\n orientation: Orientation;\n /**\n * State of the grid list.\n */\n state: ListState<unknown>;\n}\n\nexport interface GridListProps<T>\n extends\n Omit<AriaGridListProps<T>, 'children'>,\n CollectionProps<T>,\n StyleRenderProps<GridListRenderProps>,\n SlotProps,\n GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element. A function may be provided to compute the class based on component state.\n *\n * @default 'react-aria-GridList'\n */\n className?: ClassNameOrFunction<GridListRenderProps>;\n /**\n * Whether typeahead navigation is disabled.\n *\n * @default false\n */\n disallowTypeAhead?: boolean;\n /**\n * How multiple selection should behave in the collection.\n *\n * @default 'toggle'\n */\n selectionBehavior?: SelectionBehavior;\n /**\n * The drag and drop hooks returned by `useDragAndDrop` used to enable drag and drop behavior for\n * the GridList.\n */\n dragAndDropHooks?: DragAndDropHooks<NoInfer<T>>;\n /** Provides content to display when there are no items in the list. */\n renderEmptyState?: (props: GridListRenderProps) => ReactNode;\n /**\n * Whether the items are arranged in a stack or grid.\n *\n * @default 'stack'\n */\n layout?: 'stack' | 'grid';\n /**\n * The primary orientation of the items. Usually this is the direction that the collection\n * scrolls.\n *\n * @default 'vertical'\n */\n orientation?: Orientation;\n}\n\nexport const GridListContext =\n createContext<ContextValue<GridListProps<any>, HTMLDivElement>>(null);\n\n/**\n * A grid list displays a list of interactive items, with support for keyboard navigation,\n * single or multiple selection, and row actions.\n */\nexport const GridList = /*#__PURE__*/ (forwardRef as forwardRefType)(function GridList<T>(\n props: GridListProps<T>,\n ref: ForwardedRef<HTMLDivElement>\n) {\n // Render the portal first so that we have the collection by the time we render the DOM in SSR.\n [props, ref] = useContextProps(props, ref, GridListContext);\n\n return (\n <CollectionBuilder content={<Collection {...props} />}>\n {collection => <GridListInner props={props} collection={collection} gridListRef={ref} />}\n </CollectionBuilder>\n );\n});\n\ninterface GridListInnerProps<T> {\n props: GridListProps<T> & SelectableCollectionContextValue<T>;\n collection: ICollection<Node<any>>;\n gridListRef: RefObject<HTMLElement | null>;\n}\n\nfunction GridListInner<T>({props, collection, gridListRef: ref}: GridListInnerProps<T>) {\n [props, ref] = useContextProps(props, ref, SelectableCollectionContext);\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n let {shouldUseVirtualFocus, filter, disallowTypeAhead, ...DOMCollectionProps} = props;\n let {\n dragAndDropHooks,\n keyboardNavigationBehavior = 'arrow',\n layout = 'stack',\n orientation = 'vertical'\n } = props;\n let {\n CollectionRoot,\n isVirtualized,\n layoutDelegate,\n dropTargetDelegate: ctxDropTargetDelegate\n } = useContext(CollectionRendererContext);\n let gridlistState = useListState({\n ...DOMCollectionProps,\n collection,\n children: undefined,\n layoutDelegate\n });\n\n let filteredState = UNSTABLE_useFilteredListState(gridlistState as ListState<T>, filter);\n let collator = useCollator({usage: 'search', sensitivity: 'base'});\n let {disabledBehavior, disabledKeys} = filteredState.selectionManager;\n let {direction} = useLocale();\n let keyboardDelegate = useMemo(\n () =>\n new ListKeyboardDelegate({\n collection: filteredState.collection,\n collator,\n ref,\n disabledKeys,\n disabledBehavior,\n layoutDelegate,\n layout,\n orientation,\n direction\n }),\n [\n filteredState.collection,\n ref,\n layout,\n orientation,\n disabledKeys,\n disabledBehavior,\n layoutDelegate,\n collator,\n direction\n ]\n );\n\n let {gridProps} = useGridList(\n {\n ...DOMCollectionProps,\n keyboardDelegate,\n // Only tab navigation is supported in grid layout.\n keyboardNavigationBehavior: layout === 'grid' ? 'tab' : keyboardNavigationBehavior,\n isVirtualized,\n shouldSelectOnPressUp: props.shouldSelectOnPressUp,\n disallowTypeAhead\n },\n filteredState,\n ref\n );\n\n let selectionManager = filteredState.selectionManager;\n let isListDraggable = !!dragAndDropHooks?.useDraggableCollectionState;\n let isListDroppable = !!dragAndDropHooks?.useDroppableCollectionState;\n let dragHooksProvided = useRef(isListDraggable);\n let dropHooksProvided = useRef(isListDroppable);\n useEffect(() => {\n if (process.env.NODE_ENV === 'production') {\n return;\n }\n if (dragHooksProvided.current !== isListDraggable) {\n console.warn(\n 'Drag hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.'\n );\n }\n if (dropHooksProvided.current !== isListDroppable) {\n console.warn(\n 'Drop hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.'\n );\n }\n }, [isListDraggable, isListDroppable]);\n\n let dragState: DraggableCollectionState | undefined = undefined;\n let dropState: DroppableCollectionState | undefined = undefined;\n let droppableCollection: DroppableCollectionResult | undefined = undefined;\n let isRootDropTarget = false;\n let dragPreview: JSX.Element | null = null;\n let preview = useRef<DragPreviewRenderer>(null);\n\n if (isListDraggable && dragAndDropHooks) {\n dragState = dragAndDropHooks.useDraggableCollectionState!({\n collection: filteredState.collection,\n selectionManager,\n preview: dragAndDropHooks.renderDragPreview ? preview : undefined\n });\n dragAndDropHooks.useDraggableCollection!({}, dragState, ref);\n\n let DragPreview = dragAndDropHooks.DragPreview!;\n dragPreview = dragAndDropHooks.renderDragPreview ? (\n <DragPreview ref={preview}>{dragAndDropHooks.renderDragPreview}</DragPreview>\n ) : null;\n }\n\n if (isListDroppable && dragAndDropHooks) {\n dropState = dragAndDropHooks.useDroppableCollectionState!({\n collection: filteredState.collection,\n selectionManager\n });\n\n let dropTargetDelegate =\n dragAndDropHooks.dropTargetDelegate ||\n ctxDropTargetDelegate ||\n new dragAndDropHooks.ListDropTargetDelegate(collection, ref, {\n layout,\n direction,\n orientation\n });\n droppableCollection = dragAndDropHooks.useDroppableCollection!(\n {\n keyboardDelegate,\n dropTargetDelegate\n },\n dropState,\n ref\n );\n\n isRootDropTarget = dropState.isDropTarget({type: 'root'});\n }\n\n let {focusProps, isFocused, isFocusVisible} = useFocusRing();\n let isEmpty = filteredState.collection.size === 0;\n let renderValues = {\n isDropTarget: isRootDropTarget,\n orientation,\n isEmpty,\n isFocused,\n isFocusVisible,\n layout,\n state: filteredState\n };\n let renderProps = useRenderProps({\n ...props,\n children: undefined,\n defaultClassName: 'react-aria-GridList',\n values: renderValues\n });\n\n let emptyState: ReactNode = null;\n let emptyStatePropOverrides: HTMLAttributes<HTMLElement> | null = null;\n\n if (isEmpty && props.renderEmptyState) {\n let content = props.renderEmptyState(renderValues);\n emptyState = (\n <div role=\"row\" aria-rowindex={1} style={{display: 'contents'}}>\n <div role=\"gridcell\" style={{display: 'contents'}}>\n {content}\n </div>\n </div>\n );\n }\n\n let DOMProps = filterDOMProps(props, {global: true});\n\n return (\n <FocusScope>\n <dom.div\n {...mergeProps(\n DOMProps,\n renderProps,\n gridProps,\n focusProps,\n droppableCollection?.collectionProps,\n emptyStatePropOverrides\n )}\n ref={ref as RefObject<HTMLDivElement>}\n slot={props.slot || undefined}\n onScroll={props.onScroll}\n data-drop-target={isRootDropTarget || undefined}\n data-empty={isEmpty || undefined}\n data-focused={isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined}\n data-layout={layout}\n data-orientation={orientation}>\n <Provider\n values={[\n [ListStateContext, filteredState],\n [DragAndDropContext, {dragAndDropHooks, dragState, dropState}],\n [DropIndicatorContext, {render: GridListDropIndicatorWrapper}]\n ]}>\n {isListDroppable && <RootDropIndicator />}\n <SharedElementTransition>\n <CollectionRoot\n collection={filteredState.collection}\n scrollRef={ref}\n persistedKeys={useDndPersistedKeys(selectionManager, dragAndDropHooks, dropState)}\n renderDropIndicator={useRenderDropIndicator(dragAndDropHooks, dropState)}\n />\n </SharedElementTransition>\n </Provider>\n {emptyState}\n {dragPreview}\n </dom.div>\n </FocusScope>\n );\n}\n\nexport interface GridListItemRenderProps extends ItemRenderProps {\n /** The unique id of the item. */\n id?: Key;\n /**\n * Whether the item's children have keyboard focus.\n *\n * @selector [data-focus-visible-within]\n */\n isFocusVisibleWithin: boolean;\n /**\n * State of the grid list.\n */\n state: ListState<unknown>;\n}\n\nexport interface GridListItemProps<T = object>\n extends\n RenderProps<GridListItemRenderProps>,\n LinkDOMProps,\n HoverEvents,\n PressEvents,\n Omit<GlobalDOMAttributes<HTMLDivElement>, 'onClick'> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element. A function may be provided to compute the class based on component state.\n *\n * @default 'react-aria-GridListItem'\n */\n className?: ClassNameOrFunction<GridListItemRenderProps>;\n /** The unique id of the item. */\n id?: Key;\n /**\n * The object value that this item represents. When using dynamic collections, this is set\n * automatically.\n */\n value?: T;\n /** A string representation of the item's contents, used for features like typeahead. */\n textValue?: string;\n /** Whether the item is disabled. */\n isDisabled?: boolean;\n /**\n * Handler that is called when a user performs an action on the item. The exact user event depends\n * on the collection's `selectionBehavior` prop and the interaction modality.\n */\n onAction?: () => void;\n}\n\n/**\n * A GridListItem represents an individual item in a GridList.\n */\nexport const GridListItem = /*#__PURE__*/ createLeafComponent(ItemNode, function GridListItem<\n T\n>(props: GridListItemProps<T>, forwardedRef: ForwardedRef<HTMLDivElement>, item: Node<T>) {\n let state = useContext(ListStateContext)!;\n let {dragAndDropHooks, dragState, dropState} = useContext(DragAndDropContext);\n let ref = useObjectRef<HTMLDivElement>(forwardedRef);\n let {isVirtualized} = useContext(CollectionRendererContext);\n let isDraggable =\n dragState && !(dragState.isDisabled || dragState.selectionManager.isDisabled(item.key));\n let {rowProps, gridCellProps, descriptionProps, ...states} = useGridListItem(\n {\n node: item,\n shouldSelectOnPressUp: !!dragState,\n isVirtualized\n },\n state,\n ref\n );\n\n let {hoverProps, isHovered} = useHover({\n // because of https://bugs.webkit.org/show_bug.cgi?id=214609, supporting hover styles when a item is ONLY isDraggable\n // results in hover styles sticking around after a reorder/drop operation...\n isDisabled: !states.allowsSelection && !states.hasAction && !isDraggable,\n onHoverStart: item.props.onHoverStart,\n onHoverChange: item.props.onHoverChange,\n onHoverEnd: item.props.onHoverEnd\n });\n\n let {isFocusVisible, focusProps} = useFocusRing();\n let {isFocusVisible: isFocusVisibleWithin, focusProps: focusWithinProps} = useFocusRing({\n within: true\n });\n let {checkboxProps} = useGridListSelectionCheckbox({key: item.key}, state);\n\n let buttonProps =\n state.selectionManager.disabledBehavior === 'all' && states.isDisabled\n ? {isDisabled: true}\n : {};\n\n let draggableItem: DraggableItemResult | null = null;\n if (dragState && dragAndDropHooks) {\n draggableItem = dragAndDropHooks.useDraggableItem!(\n {key: item.key, hasDragButton: true},\n dragState\n );\n }\n\n let dropIndicator: DropIndicatorAria | null = null;\n let dropIndicatorRef = useRef<HTMLDivElement>(null);\n let {visuallyHiddenProps} = useVisuallyHidden();\n if (dropState && dragAndDropHooks) {\n dropIndicator = dragAndDropHooks.useDropIndicator!(\n {\n target: {type: 'item', key: item.key, dropPosition: 'on'}\n },\n dropState,\n dropIndicatorRef\n );\n }\n\n let isDragging = dragState && dragState.isDragging(item.key);\n let renderProps = useRenderProps({\n ...props,\n id: undefined,\n children: item.rendered,\n defaultClassName: 'react-aria-GridListItem',\n values: {\n ...states,\n isHovered,\n isFocusVisible,\n isFocusVisibleWithin,\n selectionMode: state.selectionManager.selectionMode,\n selectionBehavior: state.selectionManager.selectionBehavior,\n allowsDragging: !!dragState,\n isDragging,\n isDropTarget: dropIndicator?.isDropTarget,\n id: item.key,\n state\n }\n });\n\n let dragButtonRef = useRef<HTMLButtonElement>(null);\n useEffect(() => {\n if (dragState && !dragButtonRef.current) {\n console.warn(\n 'Draggable items in a GridList must contain a <Button slot=\"drag\"> element so that keyboard and screen reader users can drag them.'\n );\n }\n // eslint-disable-next-line\n }, []);\n\n useEffect(() => {\n if (!item.textValue && process.env.NODE_ENV !== 'production') {\n console.warn(\n 'A `textValue` prop is required for <GridListItem> elements with non-plain text children in order to support accessibility features such as type to select.'\n );\n }\n }, [item.textValue]);\n\n let DOMProps = filterDOMProps(props as any, {global: true});\n delete DOMProps.id;\n delete DOMProps.onClick;\n\n return (\n <>\n {dropIndicator && !dropIndicator.isHidden && (\n <div role=\"row\" style={{position: 'absolute'}}>\n <div role=\"gridcell\">\n <div\n role=\"button\"\n {...visuallyHiddenProps}\n {...dropIndicator?.dropIndicatorProps}\n ref={dropIndicatorRef}\n />\n </div>\n </div>\n )}\n <dom.div\n {...mergeProps(\n DOMProps,\n renderProps,\n rowProps,\n focusProps,\n focusWithinProps,\n hoverProps,\n draggableItem?.dragProps\n )}\n ref={ref}\n data-selected={states.isSelected || undefined}\n data-disabled={states.isDisabled || undefined}\n data-hovered={isHovered || undefined}\n data-focused={states.isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined}\n data-focus-visible-within={isFocusVisibleWithin || undefined}\n data-pressed={states.isPressed || undefined}\n data-allows-dragging={!!dragState || undefined}\n data-dragging={isDragging || undefined}\n data-drop-target={dropIndicator?.isDropTarget || undefined}\n data-selection-mode={\n state.selectionManager.selectionMode === 'none'\n ? undefined\n : state.selectionManager.selectionMode\n }>\n <div {...gridCellProps} style={{display: 'contents'}}>\n <Provider\n values={[\n [\n CheckboxContext,\n {\n slots: {\n [DEFAULT_SLOT]: {},\n selection: checkboxProps\n }\n }\n ],\n [\n CheckboxFieldContext,\n {\n slots: {\n [DEFAULT_SLOT]: {},\n selection: checkboxProps\n }\n }\n ],\n [\n ButtonContext,\n {\n slots: {\n [DEFAULT_SLOT]: buttonProps,\n drag: {\n ...draggableItem?.dragButtonProps,\n ref: dragButtonRef,\n style: {\n pointerEvents: 'none'\n }\n }\n }\n }\n ],\n [\n TextContext,\n {\n slots: {\n [DEFAULT_SLOT]: {},\n description: descriptionProps\n }\n }\n ],\n [CollectionRendererContext, DefaultCollectionRenderer],\n [ListStateContext, null],\n [SelectableCollectionContext, null],\n [FieldInputContext, null],\n [SelectionIndicatorContext, {isSelected: states.isSelected}]\n ]}>\n {renderProps.children}\n </Provider>\n </div>\n </dom.div>\n </>\n );\n});\n\nfunction GridListDropIndicatorWrapper(props: DropIndicatorProps, ref: ForwardedRef<HTMLElement>) {\n ref = useObjectRef(ref);\n let {dragAndDropHooks, dropState} = useContext(DragAndDropContext);\n let buttonRef = useRef<HTMLDivElement>(null);\n let {dropIndicatorProps, isHidden, isDropTarget} = dragAndDropHooks!.useDropIndicator!(\n props,\n dropState!,\n buttonRef\n );\n\n if (isHidden) {\n return null;\n }\n\n return (\n <GridListDropIndicatorForwardRef\n {...props}\n dropIndicatorProps={dropIndicatorProps}\n isDropTarget={isDropTarget}\n buttonRef={buttonRef}\n ref={ref}\n />\n );\n}\n\ninterface GridListDropIndicatorProps extends DropIndicatorProps {\n dropIndicatorProps: React.HTMLAttributes<HTMLElement>;\n isDropTarget: boolean;\n buttonRef: RefObject<HTMLDivElement | null>;\n}\n\nfunction GridListDropIndicator(props: GridListDropIndicatorProps, ref: ForwardedRef<HTMLElement>) {\n let {dropIndicatorProps, isDropTarget, buttonRef, ...otherProps} = props;\n\n let {visuallyHiddenProps} = useVisuallyHidden();\n let renderProps = useRenderProps({\n ...otherProps,\n defaultClassName: 'react-aria-DropIndicator',\n values: {\n isDropTarget\n }\n });\n\n return (\n <dom.div\n {...renderProps}\n role=\"row\"\n ref={ref as RefObject<HTMLDivElement | null>}\n data-drop-target={isDropTarget || undefined}>\n <div role=\"gridcell\">\n <div {...visuallyHiddenProps} role=\"button\" {...dropIndicatorProps} ref={buttonRef} />\n {renderProps.children}\n </div>\n </dom.div>\n );\n}\n\nconst GridListDropIndicatorForwardRef = forwardRef(GridListDropIndicator);\n\nfunction RootDropIndicator() {\n let {dragAndDropHooks, dropState} = useContext(DragAndDropContext);\n let ref = useRef<HTMLDivElement>(null);\n let {dropIndicatorProps} = dragAndDropHooks!.useDropIndicator!(\n {\n target: {type: 'root'}\n },\n dropState!,\n ref\n );\n let isDropTarget = dropState!.isDropTarget({type: 'root'});\n let {visuallyHiddenProps} = useVisuallyHidden();\n\n if (!isDropTarget && dropIndicatorProps['aria-hidden']) {\n return null;\n }\n\n return (\n <div role=\"row\" aria-hidden={dropIndicatorProps['aria-hidden']} style={{position: 'absolute'}}>\n <div role=\"gridcell\">\n <div role=\"button\" {...visuallyHiddenProps} {...dropIndicatorProps} ref={ref} />\n </div>\n </div>\n );\n}\n\nexport interface GridListLoadMoreItemProps\n extends\n Omit<LoadMoreSentinelProps, 'collection'>,\n StyleProps,\n DOMRenderProps<'div', undefined>,\n GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element.\n *\n * @default 'react-aria-GridListLoadMoreItem'\n */\n className?: string;\n /**\n * The load more spinner to render when loading additional items.\n */\n children?: ReactNode;\n /**\n * Whether or not the loading spinner should be rendered or not.\n */\n isLoading?: boolean;\n}\n\nexport const GridListLoadMoreItem = createLeafComponent(\n LoaderNode,\n function GridListLoadingIndicator(\n props: GridListLoadMoreItemProps,\n ref: ForwardedRef<HTMLDivElement>,\n item: Node<object>\n ) {\n let state = useContext(ListStateContext)!;\n let {isVirtualized} = useContext(CollectionRendererContext);\n let {isLoading, onLoadMore, scrollOffset, ...otherProps} = props;\n\n let sentinelRef = useRef(null);\n let memoedLoadMoreProps = useMemo(\n () => ({\n onLoadMore,\n collection: state?.collection,\n sentinelRef,\n scrollOffset\n }),\n [onLoadMore, scrollOffset, state?.collection]\n );\n useLoadMoreSentinel(memoedLoadMoreProps, sentinelRef);\n\n let renderProps = useRenderProps({\n ...otherProps,\n id: undefined,\n children: item.rendered,\n defaultClassName: 'react-aria-GridListLoadingIndicator',\n values: undefined\n });\n // For now don't include aria-posinset and aria-setsize on loader since they aren't keyboard focusable\n // Arguably shouldn't include them ever since it might be confusing to the user to include the loaders as part of the\n // item count\n\n return (\n <>\n {/* Alway render the sentinel. For now onus is on the user for styling when using flex + gap (this would introduce a gap even though it doesn't take room) */}\n {/* @ts-ignore - compatibility with React < 19 */}\n <div style={{position: 'relative', width: 0, height: 0}} inert={inertValue(true)}>\n <div\n data-testid=\"loadMoreSentinel\"\n ref={sentinelRef}\n style={{position: 'absolute', height: 1, width: 1}}\n />\n </div>\n {isLoading && renderProps.children && (\n <dom.div {...renderProps} {...filterDOMProps(props, {global: true})} role=\"row\" ref={ref}>\n <div aria-colindex={isVirtualized ? 1 : undefined} role=\"gridcell\">\n {renderProps.children}\n </div>\n </dom.div>\n )}\n </>\n );\n }\n);\n\nexport interface GridListSectionProps<T> extends SectionProps<T>, DOMRenderProps<'div', undefined> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element.\n *\n * @default 'react-aria-GridListSection'\n */\n className?: string;\n}\n\n/**\n * A GridListSection represents a section within a GridList.\n */\nexport const GridListSection = /*#__PURE__*/ createBranchComponent(\n SectionNode,\n <T extends any>(\n props: GridListSectionProps<T>,\n ref: ForwardedRef<HTMLDivElement>,\n item: Node<T>\n ) => {\n let state = useContext(ListStateContext)!;\n let {CollectionBranch} = useContext(CollectionRendererContext);\n let headingRef = useRef(null);\n ref = useObjectRef<HTMLDivElement>(ref);\n let {rowHeaderProps, rowProps, rowGroupProps} = useGridListSection(\n {\n 'aria-label': props['aria-label'] ?? undefined\n },\n state,\n ref\n );\n let renderProps = useRenderProps({\n ...props,\n id: undefined,\n children: undefined,\n defaultClassName: 'react-aria-GridListSection',\n values: undefined\n });\n\n let DOMProps = filterDOMProps(props as any, {global: true});\n delete DOMProps.id;\n\n return (\n <dom.div {...mergeProps(DOMProps, renderProps, rowGroupProps)} ref={ref}>\n <Provider\n values={[\n [GridListHeaderContext, {...rowProps, ref: headingRef}],\n [GridListHeaderInnerContext, {...rowHeaderProps}]\n ]}>\n <CollectionBranch collection={state.collection} parent={item} />\n </Provider>\n </dom.div>\n );\n }\n);\n\nexport interface GridListHeaderProps\n extends DOMRenderProps<'div', undefined>, DOMProps, GlobalDOMAttributes<HTMLElement> {}\n\nexport const GridListHeaderContext = createContext<\n ContextValue<GridListHeaderProps, HTMLDivElement>\n>({});\nexport const GridListHeaderInnerContext = createContext<HTMLAttributes<HTMLElement> | null>(null);\n\nexport const GridListHeader = /*#__PURE__*/ createLeafComponent(\n HeaderNode,\n function Header(props: GridListHeaderProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, GridListHeaderContext);\n let rowHeaderProps = useContext(GridListHeaderInnerContext);\n\n return (\n <dom.div render={props.render} className=\"react-aria-GridListHeader\" ref={ref} {...props}>\n <div {...rowHeaderProps} style={{display: 'contents'}}>\n {props.children}\n </div>\n </dom.div>\n );\n }\n);\n"],"names":[],"version":3,"file":"GridList.mjs.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6MM,MAAM,0DACX,CAAA,GAAA,oBAAY,EAAoD;AAM3D,MAAM,4CAAyB,AAAd,WAAW,GAAI,CAAA,GAAA,iBAAS,EAAqB,SAAS,SAC5E,KAAuB,EACvB,GAAiC;IAEjC,+FAA+F;IAC/F,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAE3C,qBACE,gCAAC,CAAA,GAAA,wBAAgB;QAAE,uBAAS,gCAAC,CAAA,GAAA,iBAAS,GAAM;OACzC,CAAA,2BAAc,gCAAC;YAAc,OAAO;YAAO,YAAY;YAAY,aAAa;;AAGvF;AAQA,SAAS,oCAAiB,SAAC,KAAK,cAAE,UAAU,EAAE,aAAa,GAAG,EAAwB;IACpF,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK,CAAA,GAAA,yCAA0B;IACrE,IAAI,yBACF,6DAA6D;IAC7D,qBAAqB,UACrB,MAAM,qBACN,iBAAiB,yBACjB,qBAAqB,EACrB,GAAG,oBACJ,GAAG;IACJ,IAAI,oBACF,gBAAgB,8BAChB,6BAA6B,iBAC7B,SAAS,sBACT,cAAc,YACf,GAAG;IACJ,IAAI,kBACF,cAAc,iBACd,aAAa,kBACb,cAAc,EACd,oBAAoB,qBAAqB,EAC1C,GAAG,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,yCAAwB;IACvC,IAAI,gBAAgB,CAAA,GAAA,mBAAW,EAAE;QAC/B,GAAG,kBAAkB;oBACrB;QACA,UAAU;wBACV;IACF;IAEA,IAA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,kBAAkB;QAClB,QAAQ;IACV;IAEA,IAAI,WAAW,CAAA,GAAA,qBAAa,EAAE,OAAc;QAAC,QAAQ;IAAI;IACzD,OAAO,SAAS,EAAE;IAElB,qBACE,gCAAC,CAAA,GAAA,yCAAE,EAAE,GAAG;QAAE,GAAG,CAAA,GAAA,iBAAS,EAAE,UAAU,aAAa,cAAc;QAAE,KAAK;qBAClE,gCAAC,CAAA,GAAA,yCAAO;QACN,QAAQ;YACN;gBAAC;gBAAuB;oBAAC,GAAG,QAAQ;oBAAE,KAAK;gBAAU;aAAE;YACvD;gBAAC;gBAA4B;oBAAC,GAAG,cAAc;gBAAA;aAAE;SAClD;qBACD,gCAAC;QAAiB,YAAY,MAAM,UAAU;QAAE,QAAQ;;AAIhE;AAMK,MAAM,0DAAwB,CAAA,GAAA,oBAAY,EAE/C,CAAC;AACI,MAAM,0DAA6B,CAAA,GAAA,oBAAY,EAAsC;AAErF,MAAM,4CAAiB,WAAW,GAAG,CAAA,GAAA,0BAAkB,EAC5D,CAAA,GAAA,iBAAS,GACT,SAAS,OAAO,KAA0B,EAAE,GAAiC;IAC3E,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,iBAAiB,CAAA,GAAA,iBAAS,EAAE;IAEhC,qBACE,gCAAC,CAAA,GAAA,yCAAE,EAAE,GAAG;QAAC,QAAQ,MAAM,MAAM;QAAE,WAAU;QAA4B,KAAK;QAAM,GAAG,KAAK;qBACtF,gCAAC;QAAK,GAAG,cAAc;QAAE,OAAO;YAAC,SAAS;QAAU;OACjD,MAAM,QAAQ;AAIvB","sources":["packages/react-aria-components/src/GridList.tsx"],"sourcesContent":["/*\n * Copyright 2022 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 */\nimport {\n AriaGridListProps,\n useGridList,\n useGridListItem,\n useGridListSection,\n useGridListSelectionCheckbox\n} from 'react-aria/useGridList';\n\nimport {ButtonContext} from './Button';\nimport {CheckboxContext, CheckboxFieldContext} from './Checkbox';\nimport {\n ClassNameOrFunction,\n ContextValue,\n DEFAULT_SLOT,\n dom,\n DOMProps,\n DOMRenderProps,\n Provider,\n RenderProps,\n SlotProps,\n StyleProps,\n StyleRenderProps,\n useContextProps,\n useRenderProps\n} from './utils';\nimport {Collection} from 'react-aria/Collection';\nimport {\n CollectionBuilder,\n createBranchComponent,\n createLeafComponent\n} from 'react-aria/CollectionBuilder';\nimport {\n CollectionProps,\n CollectionRendererContext,\n DefaultCollectionRenderer,\n ItemRenderProps,\n SectionProps\n} from './Collection';\nimport {\n DragAndDropContext,\n DropIndicatorContext,\n DropIndicatorProps,\n useDndPersistedKeys,\n useRenderDropIndicator\n} from './DragAndDrop';\nimport {DragAndDropHooks} from './useDragAndDrop';\nimport {DraggableCollectionState} from 'react-stately/useDraggableCollectionState';\nimport {DraggableItemResult} from 'react-aria/useDraggableCollection';\nimport {DragPreviewRenderer} from '@react-types/shared';\nimport {DropIndicatorAria, DroppableCollectionResult} from 'react-aria/useDroppableCollection';\nimport {DroppableCollectionState} from 'react-stately/useDroppableCollectionState';\nimport {\n FieldInputContext,\n SelectableCollectionContext,\n SelectableCollectionContextValue\n} from './Autocomplete';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {FocusScope} from 'react-aria/FocusScope';\nimport {\n forwardRefType,\n GlobalDOMAttributes,\n HoverEvents,\n Key,\n LinkDOMProps,\n Orientation,\n PressEvents,\n RefObject\n} from '@react-types/shared';\nimport {\n HeaderNode,\n ItemNode,\n LoaderNode,\n SectionNode\n} from 'react-aria/private/collections/BaseCollection';\nimport {Collection as ICollection, Node, SelectionBehavior} from '@react-types/shared';\nimport {inertValue} from 'react-aria/private/utils/inertValue';\nimport {ListKeyboardDelegate} from 'react-aria/ListKeyboardDelegate';\nimport {ListState, UNSTABLE_useFilteredListState, useListState} from 'react-stately/useListState';\nimport {ListStateContext} from './ListBox';\nimport {\n LoadMoreSentinelProps,\n useLoadMoreSentinel\n} from 'react-aria/private/utils/useLoadMoreSentinel';\nimport {mergeProps} from 'react-aria/mergeProps';\nimport React, {\n createContext,\n ForwardedRef,\n forwardRef,\n HTMLAttributes,\n JSX,\n ReactNode,\n useContext,\n useEffect,\n useMemo,\n useRef\n} from 'react';\nimport {SelectionIndicatorContext} from './SelectionIndicator';\nimport {SharedElementTransition} from './SharedElementTransition';\nimport {TextContext} from './Text';\nimport {useCollator} from 'react-aria/useCollator';\nimport {useFocusRing} from 'react-aria/useFocusRing';\nimport {useHover} from 'react-aria/useHover';\nimport {useLocale} from 'react-aria/I18nProvider';\nimport {useObjectRef} from 'react-aria/useObjectRef';\nimport {useVisuallyHidden} from 'react-aria/VisuallyHidden';\n\nexport interface GridListRenderProps {\n /**\n * Whether the list has no items and should display its empty state.\n *\n * @selector [data-empty]\n */\n isEmpty: boolean;\n /**\n * Whether the grid list is currently focused.\n *\n * @selector [data-focused]\n */\n isFocused: boolean;\n /**\n * Whether the grid list is currently keyboard focused.\n *\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean;\n /**\n * Whether the grid list is currently the active drop target.\n *\n * @selector [data-drop-target]\n */\n isDropTarget: boolean;\n /**\n * Whether the items are arranged in a stack or grid.\n *\n * @selector [data-layout=\"stack | grid\"]\n */\n layout: 'stack' | 'grid';\n /**\n * The primary orientation of the items.\n *\n * @selector [data-orientation=\"vertical | horizontal\"]\n */\n orientation: Orientation;\n /**\n * State of the grid list.\n */\n state: ListState<unknown>;\n}\n\nexport interface GridListProps<T>\n extends\n Omit<AriaGridListProps<T>, 'children'>,\n CollectionProps<T>,\n StyleRenderProps<GridListRenderProps>,\n SlotProps,\n GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element. A function may be provided to compute the class based on component state.\n *\n * @default 'react-aria-GridList'\n */\n className?: ClassNameOrFunction<GridListRenderProps>;\n /**\n * Whether typeahead navigation is disabled.\n *\n * @default false\n */\n disallowTypeAhead?: boolean;\n /**\n * How multiple selection should behave in the collection.\n *\n * @default 'toggle'\n */\n selectionBehavior?: SelectionBehavior;\n /**\n * The drag and drop hooks returned by `useDragAndDrop` used to enable drag and drop behavior for\n * the GridList.\n */\n dragAndDropHooks?: DragAndDropHooks<NoInfer<T>>;\n /** Provides content to display when there are no items in the list. */\n renderEmptyState?: (props: GridListRenderProps) => ReactNode;\n /**\n * Whether the items are arranged in a stack or grid.\n *\n * @default 'stack'\n */\n layout?: 'stack' | 'grid';\n /**\n * The primary orientation of the items. Usually this is the direction that the collection\n * scrolls.\n *\n * @default 'vertical'\n */\n orientation?: Orientation;\n /**\n * Which item in the collection to focus when tabbing into the collection. Overrides default\n * roving tab index like behavior.\n *\n * @private\n */\n UNSTABLE_focusOnEntry?: 'first' | 'last';\n}\n\nexport const GridListContext =\n createContext<ContextValue<GridListProps<any>, HTMLDivElement>>(null);\n\n/**\n * A grid list displays a list of interactive items, with support for keyboard navigation,\n * single or multiple selection, and row actions.\n */\nexport const GridList = /*#__PURE__*/ (forwardRef as forwardRefType)(function GridList<T>(\n props: GridListProps<T>,\n ref: ForwardedRef<HTMLDivElement>\n) {\n // Render the portal first so that we have the collection by the time we render the DOM in SSR.\n [props, ref] = useContextProps(props, ref, GridListContext);\n\n return (\n <CollectionBuilder content={<Collection {...props} />}>\n {collection => <GridListInner props={props} collection={collection} gridListRef={ref} />}\n </CollectionBuilder>\n );\n});\n\ninterface GridListInnerProps<T> {\n props: GridListProps<T> & SelectableCollectionContextValue<T>;\n collection: ICollection<Node<any>>;\n gridListRef: RefObject<HTMLElement | null>;\n}\n\nfunction GridListInner<T>({props, collection, gridListRef: ref}: GridListInnerProps<T>) {\n [props, ref] = useContextProps(props, ref, SelectableCollectionContext);\n let {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n shouldUseVirtualFocus,\n filter,\n disallowTypeAhead,\n UNSTABLE_focusOnEntry,\n ...DOMCollectionProps\n } = props;\n let {\n dragAndDropHooks,\n keyboardNavigationBehavior = 'arrow',\n layout = 'stack',\n orientation = 'vertical'\n } = props;\n let {\n CollectionRoot,\n isVirtualized,\n layoutDelegate,\n dropTargetDelegate: ctxDropTargetDelegate\n } = useContext(CollectionRendererContext);\n let gridlistState = useListState({\n ...DOMCollectionProps,\n collection,\n children: undefined,\n layoutDelegate\n });\n\n let filteredState = UNSTABLE_useFilteredListState(gridlistState as ListState<T>, filter);\n let collator = useCollator({usage: 'search', sensitivity: 'base'});\n let {disabledBehavior, disabledKeys} = filteredState.selectionManager;\n let {direction} = useLocale();\n let keyboardDelegate = useMemo(\n () =>\n new ListKeyboardDelegate({\n collection: filteredState.collection,\n collator,\n ref,\n disabledKeys,\n disabledBehavior,\n layoutDelegate,\n layout,\n orientation,\n direction\n }),\n [\n filteredState.collection,\n ref,\n layout,\n orientation,\n disabledKeys,\n disabledBehavior,\n layoutDelegate,\n collator,\n direction\n ]\n );\n\n let {gridProps} = useGridList(\n {\n ...DOMCollectionProps,\n keyboardDelegate,\n // Only tab navigation is supported in grid layout.\n keyboardNavigationBehavior: layout === 'grid' ? 'tab' : keyboardNavigationBehavior,\n isVirtualized,\n shouldSelectOnPressUp: props.shouldSelectOnPressUp,\n disallowTypeAhead,\n UNSTABLE_focusOnEntry\n },\n filteredState,\n ref\n );\n\n let selectionManager = filteredState.selectionManager;\n let isListDraggable = !!dragAndDropHooks?.useDraggableCollectionState;\n let isListDroppable = !!dragAndDropHooks?.useDroppableCollectionState;\n let dragHooksProvided = useRef(isListDraggable);\n let dropHooksProvided = useRef(isListDroppable);\n useEffect(() => {\n if (process.env.NODE_ENV === 'production') {\n return;\n }\n if (dragHooksProvided.current !== isListDraggable) {\n console.warn(\n 'Drag hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.'\n );\n }\n if (dropHooksProvided.current !== isListDroppable) {\n console.warn(\n 'Drop hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.'\n );\n }\n }, [isListDraggable, isListDroppable]);\n\n let dragState: DraggableCollectionState | undefined = undefined;\n let dropState: DroppableCollectionState | undefined = undefined;\n let droppableCollection: DroppableCollectionResult | undefined = undefined;\n let isRootDropTarget = false;\n let dragPreview: JSX.Element | null = null;\n let preview = useRef<DragPreviewRenderer>(null);\n\n if (isListDraggable && dragAndDropHooks) {\n dragState = dragAndDropHooks.useDraggableCollectionState!({\n collection: filteredState.collection,\n selectionManager,\n preview: dragAndDropHooks.renderDragPreview ? preview : undefined\n });\n dragAndDropHooks.useDraggableCollection!({}, dragState, ref);\n\n let DragPreview = dragAndDropHooks.DragPreview!;\n dragPreview = dragAndDropHooks.renderDragPreview ? (\n <DragPreview ref={preview}>{dragAndDropHooks.renderDragPreview}</DragPreview>\n ) : null;\n }\n\n if (isListDroppable && dragAndDropHooks) {\n dropState = dragAndDropHooks.useDroppableCollectionState!({\n collection: filteredState.collection,\n selectionManager\n });\n\n let dropTargetDelegate =\n dragAndDropHooks.dropTargetDelegate ||\n ctxDropTargetDelegate ||\n new dragAndDropHooks.ListDropTargetDelegate(collection, ref, {\n layout,\n direction,\n orientation\n });\n droppableCollection = dragAndDropHooks.useDroppableCollection!(\n {\n keyboardDelegate,\n dropTargetDelegate\n },\n dropState,\n ref\n );\n\n isRootDropTarget = dropState.isDropTarget({type: 'root'});\n }\n\n let {focusProps, isFocused, isFocusVisible} = useFocusRing();\n let isEmpty = filteredState.collection.size === 0;\n let renderValues = {\n isDropTarget: isRootDropTarget,\n orientation,\n isEmpty,\n isFocused,\n isFocusVisible,\n layout,\n state: filteredState\n };\n let renderProps = useRenderProps({\n ...props,\n children: undefined,\n defaultClassName: 'react-aria-GridList',\n values: renderValues\n });\n\n let emptyState: ReactNode = null;\n let emptyStatePropOverrides: HTMLAttributes<HTMLElement> | null = null;\n\n if (isEmpty && props.renderEmptyState) {\n let content = props.renderEmptyState(renderValues);\n emptyState = (\n <div role=\"row\" aria-rowindex={1} style={{display: 'contents'}}>\n <div role=\"gridcell\" style={{display: 'contents'}}>\n {content}\n </div>\n </div>\n );\n }\n\n let DOMProps = filterDOMProps(props, {global: true});\n\n return (\n <FocusScope>\n <dom.div\n {...mergeProps(\n DOMProps,\n renderProps,\n gridProps,\n focusProps,\n droppableCollection?.collectionProps,\n emptyStatePropOverrides\n )}\n ref={ref as RefObject<HTMLDivElement>}\n slot={props.slot || undefined}\n onScroll={props.onScroll}\n data-drop-target={isRootDropTarget || undefined}\n data-empty={isEmpty || undefined}\n data-focused={isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined}\n data-layout={layout}\n data-orientation={orientation}>\n <Provider\n values={[\n [ListStateContext, filteredState],\n [DragAndDropContext, {dragAndDropHooks, dragState, dropState}],\n [DropIndicatorContext, {render: GridListDropIndicatorWrapper}]\n ]}>\n {isListDroppable && <RootDropIndicator />}\n <SharedElementTransition>\n <CollectionRoot\n collection={filteredState.collection}\n scrollRef={ref}\n persistedKeys={useDndPersistedKeys(selectionManager, dragAndDropHooks, dropState)}\n renderDropIndicator={useRenderDropIndicator(dragAndDropHooks, dropState)}\n />\n </SharedElementTransition>\n </Provider>\n {emptyState}\n {dragPreview}\n </dom.div>\n </FocusScope>\n );\n}\n\nexport interface GridListItemRenderProps extends ItemRenderProps {\n /** The unique id of the item. */\n id?: Key;\n /**\n * Whether the item's children have keyboard focus.\n *\n * @selector [data-focus-visible-within]\n */\n isFocusVisibleWithin: boolean;\n /**\n * State of the grid list.\n */\n state: ListState<unknown>;\n}\n\nexport interface GridListItemProps<T = object>\n extends\n RenderProps<GridListItemRenderProps>,\n LinkDOMProps,\n HoverEvents,\n PressEvents,\n Omit<GlobalDOMAttributes<HTMLDivElement>, 'onClick'> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element. A function may be provided to compute the class based on component state.\n *\n * @default 'react-aria-GridListItem'\n */\n className?: ClassNameOrFunction<GridListItemRenderProps>;\n /** The unique id of the item. */\n id?: Key;\n /**\n * The object value that this item represents. When using dynamic collections, this is set\n * automatically.\n */\n value?: T;\n /** A string representation of the item's contents, used for features like typeahead. */\n textValue?: string;\n /** Whether the item is disabled. */\n isDisabled?: boolean;\n /**\n * Handler that is called when a user performs an action on the item. The exact user event depends\n * on the collection's `selectionBehavior` prop and the interaction modality.\n */\n onAction?: () => void;\n}\n\n/**\n * A GridListItem represents an individual item in a GridList.\n */\nexport const GridListItem = /*#__PURE__*/ createLeafComponent(ItemNode, function GridListItem<\n T\n>(props: GridListItemProps<T>, forwardedRef: ForwardedRef<HTMLDivElement>, item: Node<T>) {\n let state = useContext(ListStateContext)!;\n let {dragAndDropHooks, dragState, dropState} = useContext(DragAndDropContext);\n let ref = useObjectRef<HTMLDivElement>(forwardedRef);\n let {isVirtualized} = useContext(CollectionRendererContext);\n let isDraggable =\n dragState && !(dragState.isDisabled || dragState.selectionManager.isDisabled(item.key));\n let {rowProps, gridCellProps, descriptionProps, ...states} = useGridListItem(\n {\n node: item,\n shouldSelectOnPressUp: !!dragState,\n isVirtualized\n },\n state,\n ref\n );\n\n let {hoverProps, isHovered} = useHover({\n // because of https://bugs.webkit.org/show_bug.cgi?id=214609, supporting hover styles when a item is ONLY isDraggable\n // results in hover styles sticking around after a reorder/drop operation...\n isDisabled: !states.allowsSelection && !states.hasAction && !isDraggable,\n onHoverStart: item.props.onHoverStart,\n onHoverChange: item.props.onHoverChange,\n onHoverEnd: item.props.onHoverEnd\n });\n\n let {isFocusVisible, focusProps} = useFocusRing();\n let {isFocusVisible: isFocusVisibleWithin, focusProps: focusWithinProps} = useFocusRing({\n within: true\n });\n let {checkboxProps} = useGridListSelectionCheckbox({key: item.key}, state);\n\n let buttonProps =\n state.selectionManager.disabledBehavior === 'all' && states.isDisabled\n ? {isDisabled: true}\n : {};\n\n let draggableItem: DraggableItemResult | null = null;\n if (dragState && dragAndDropHooks) {\n draggableItem = dragAndDropHooks.useDraggableItem!(\n {key: item.key, hasDragButton: true},\n dragState\n );\n }\n\n let dropIndicator: DropIndicatorAria | null = null;\n let dropIndicatorRef = useRef<HTMLDivElement>(null);\n let {visuallyHiddenProps} = useVisuallyHidden();\n if (dropState && dragAndDropHooks) {\n dropIndicator = dragAndDropHooks.useDropIndicator!(\n {\n target: {type: 'item', key: item.key, dropPosition: 'on'}\n },\n dropState,\n dropIndicatorRef\n );\n }\n\n let isDragging = dragState && dragState.isDragging(item.key);\n let renderProps = useRenderProps({\n ...props,\n id: undefined,\n children: item.rendered,\n defaultClassName: 'react-aria-GridListItem',\n values: {\n ...states,\n isHovered,\n isFocusVisible,\n isFocusVisibleWithin,\n selectionMode: state.selectionManager.selectionMode,\n selectionBehavior: state.selectionManager.selectionBehavior,\n allowsDragging: !!dragState,\n isDragging,\n isDropTarget: dropIndicator?.isDropTarget,\n id: item.key,\n state\n }\n });\n\n let dragButtonRef = useRef<HTMLButtonElement>(null);\n useEffect(() => {\n if (dragState && !dragButtonRef.current) {\n console.warn(\n 'Draggable items in a GridList must contain a <Button slot=\"drag\"> element so that keyboard and screen reader users can drag them.'\n );\n }\n // eslint-disable-next-line\n }, []);\n\n useEffect(() => {\n if (!item.textValue && process.env.NODE_ENV !== 'production') {\n console.warn(\n 'A `textValue` prop is required for <GridListItem> elements with non-plain text children in order to support accessibility features such as type to select.'\n );\n }\n }, [item.textValue]);\n\n let DOMProps = filterDOMProps(props as any, {global: true});\n delete DOMProps.id;\n delete DOMProps.onClick;\n\n return (\n <>\n {dropIndicator && !dropIndicator.isHidden && (\n <div role=\"row\" style={{position: 'absolute'}}>\n <div role=\"gridcell\">\n <div\n role=\"button\"\n {...visuallyHiddenProps}\n {...dropIndicator?.dropIndicatorProps}\n ref={dropIndicatorRef}\n />\n </div>\n </div>\n )}\n <dom.div\n {...mergeProps(\n DOMProps,\n renderProps,\n rowProps,\n focusProps,\n focusWithinProps,\n hoverProps,\n draggableItem?.dragProps\n )}\n ref={ref}\n data-selected={states.isSelected || undefined}\n data-disabled={states.isDisabled || undefined}\n data-hovered={isHovered || undefined}\n data-focused={states.isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined}\n data-focus-visible-within={isFocusVisibleWithin || undefined}\n data-pressed={states.isPressed || undefined}\n data-allows-dragging={!!dragState || undefined}\n data-dragging={isDragging || undefined}\n data-drop-target={dropIndicator?.isDropTarget || undefined}\n data-selection-mode={\n state.selectionManager.selectionMode === 'none'\n ? undefined\n : state.selectionManager.selectionMode\n }>\n <div {...gridCellProps} style={{display: 'contents'}}>\n <Provider\n values={[\n [\n CheckboxContext,\n {\n slots: {\n [DEFAULT_SLOT]: {},\n selection: checkboxProps\n }\n }\n ],\n [\n CheckboxFieldContext,\n {\n slots: {\n [DEFAULT_SLOT]: {},\n selection: checkboxProps\n }\n }\n ],\n [\n ButtonContext,\n {\n slots: {\n [DEFAULT_SLOT]: buttonProps,\n drag: {\n ...draggableItem?.dragButtonProps,\n ref: dragButtonRef,\n style: {\n pointerEvents: 'none'\n }\n }\n }\n }\n ],\n [\n TextContext,\n {\n slots: {\n [DEFAULT_SLOT]: {},\n description: descriptionProps\n }\n }\n ],\n [CollectionRendererContext, DefaultCollectionRenderer],\n [ListStateContext, null],\n [SelectableCollectionContext, null],\n [FieldInputContext, null],\n [SelectionIndicatorContext, {isSelected: states.isSelected}]\n ]}>\n {renderProps.children}\n </Provider>\n </div>\n </dom.div>\n </>\n );\n});\n\nfunction GridListDropIndicatorWrapper(props: DropIndicatorProps, ref: ForwardedRef<HTMLElement>) {\n ref = useObjectRef(ref);\n let {dragAndDropHooks, dropState} = useContext(DragAndDropContext);\n let buttonRef = useRef<HTMLDivElement>(null);\n let {dropIndicatorProps, isHidden, isDropTarget} = dragAndDropHooks!.useDropIndicator!(\n props,\n dropState!,\n buttonRef\n );\n\n if (isHidden) {\n return null;\n }\n\n return (\n <GridListDropIndicatorForwardRef\n {...props}\n dropIndicatorProps={dropIndicatorProps}\n isDropTarget={isDropTarget}\n buttonRef={buttonRef}\n ref={ref}\n />\n );\n}\n\ninterface GridListDropIndicatorProps extends DropIndicatorProps {\n dropIndicatorProps: React.HTMLAttributes<HTMLElement>;\n isDropTarget: boolean;\n buttonRef: RefObject<HTMLDivElement | null>;\n}\n\nfunction GridListDropIndicator(props: GridListDropIndicatorProps, ref: ForwardedRef<HTMLElement>) {\n let {dropIndicatorProps, isDropTarget, buttonRef, ...otherProps} = props;\n\n let {visuallyHiddenProps} = useVisuallyHidden();\n let renderProps = useRenderProps({\n ...otherProps,\n defaultClassName: 'react-aria-DropIndicator',\n values: {\n isDropTarget\n }\n });\n\n return (\n <dom.div\n {...renderProps}\n role=\"row\"\n ref={ref as RefObject<HTMLDivElement | null>}\n data-drop-target={isDropTarget || undefined}>\n <div role=\"gridcell\">\n <div {...visuallyHiddenProps} role=\"button\" {...dropIndicatorProps} ref={buttonRef} />\n {renderProps.children}\n </div>\n </dom.div>\n );\n}\n\nconst GridListDropIndicatorForwardRef = forwardRef(GridListDropIndicator);\n\nfunction RootDropIndicator() {\n let {dragAndDropHooks, dropState} = useContext(DragAndDropContext);\n let ref = useRef<HTMLDivElement>(null);\n let {dropIndicatorProps} = dragAndDropHooks!.useDropIndicator!(\n {\n target: {type: 'root'}\n },\n dropState!,\n ref\n );\n let isDropTarget = dropState!.isDropTarget({type: 'root'});\n let {visuallyHiddenProps} = useVisuallyHidden();\n\n if (!isDropTarget && dropIndicatorProps['aria-hidden']) {\n return null;\n }\n\n return (\n <div role=\"row\" aria-hidden={dropIndicatorProps['aria-hidden']} style={{position: 'absolute'}}>\n <div role=\"gridcell\">\n <div role=\"button\" {...visuallyHiddenProps} {...dropIndicatorProps} ref={ref} />\n </div>\n </div>\n );\n}\n\nexport interface GridListLoadMoreItemProps\n extends\n Omit<LoadMoreSentinelProps, 'collection'>,\n StyleProps,\n DOMRenderProps<'div', undefined>,\n GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element.\n *\n * @default 'react-aria-GridListLoadMoreItem'\n */\n className?: string;\n /**\n * The load more spinner to render when loading additional items.\n */\n children?: ReactNode;\n /**\n * Whether or not the loading spinner should be rendered or not.\n */\n isLoading?: boolean;\n}\n\nexport const GridListLoadMoreItem = createLeafComponent(\n LoaderNode,\n function GridListLoadingIndicator(\n props: GridListLoadMoreItemProps,\n ref: ForwardedRef<HTMLDivElement>,\n item: Node<object>\n ) {\n let state = useContext(ListStateContext)!;\n let {isVirtualized} = useContext(CollectionRendererContext);\n let {isLoading, onLoadMore, scrollOffset, ...otherProps} = props;\n\n let sentinelRef = useRef(null);\n let memoedLoadMoreProps = useMemo(\n () => ({\n onLoadMore,\n collection: state?.collection,\n sentinelRef,\n scrollOffset\n }),\n [onLoadMore, scrollOffset, state?.collection]\n );\n useLoadMoreSentinel(memoedLoadMoreProps, sentinelRef);\n\n let renderProps = useRenderProps({\n ...otherProps,\n id: undefined,\n children: item.rendered,\n defaultClassName: 'react-aria-GridListLoadingIndicator',\n values: undefined\n });\n // For now don't include aria-posinset and aria-setsize on loader since they aren't keyboard focusable\n // Arguably shouldn't include them ever since it might be confusing to the user to include the loaders as part of the\n // item count\n\n return (\n <>\n {/* Alway render the sentinel. For now onus is on the user for styling when using flex + gap (this would introduce a gap even though it doesn't take room) */}\n {/* @ts-ignore - compatibility with React < 19 */}\n <div style={{position: 'relative', width: 0, height: 0}} inert={inertValue(true)}>\n <div\n data-testid=\"loadMoreSentinel\"\n ref={sentinelRef}\n style={{position: 'absolute', height: 1, width: 1}}\n />\n </div>\n {isLoading && renderProps.children && (\n <dom.div {...renderProps} {...filterDOMProps(props, {global: true})} role=\"row\" ref={ref}>\n <div aria-colindex={isVirtualized ? 1 : undefined} role=\"gridcell\">\n {renderProps.children}\n </div>\n </dom.div>\n )}\n </>\n );\n }\n);\n\nexport interface GridListSectionProps<T> extends SectionProps<T>, DOMRenderProps<'div', undefined> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element.\n *\n * @default 'react-aria-GridListSection'\n */\n className?: string;\n}\n\n/**\n * A GridListSection represents a section within a GridList.\n */\nexport const GridListSection = /*#__PURE__*/ createBranchComponent(\n SectionNode,\n <T extends any>(\n props: GridListSectionProps<T>,\n ref: ForwardedRef<HTMLDivElement>,\n item: Node<T>\n ) => {\n let state = useContext(ListStateContext)!;\n let {CollectionBranch} = useContext(CollectionRendererContext);\n let headingRef = useRef(null);\n ref = useObjectRef<HTMLDivElement>(ref);\n let {rowHeaderProps, rowProps, rowGroupProps} = useGridListSection(\n {\n 'aria-label': props['aria-label'] ?? undefined\n },\n state,\n ref\n );\n let renderProps = useRenderProps({\n ...props,\n id: undefined,\n children: undefined,\n defaultClassName: 'react-aria-GridListSection',\n values: undefined\n });\n\n let DOMProps = filterDOMProps(props as any, {global: true});\n delete DOMProps.id;\n\n return (\n <dom.div {...mergeProps(DOMProps, renderProps, rowGroupProps)} ref={ref}>\n <Provider\n values={[\n [GridListHeaderContext, {...rowProps, ref: headingRef}],\n [GridListHeaderInnerContext, {...rowHeaderProps}]\n ]}>\n <CollectionBranch collection={state.collection} parent={item} />\n </Provider>\n </dom.div>\n );\n }\n);\n\nexport interface GridListHeaderProps\n extends DOMRenderProps<'div', undefined>, DOMProps, GlobalDOMAttributes<HTMLElement> {}\n\nexport const GridListHeaderContext = createContext<\n ContextValue<GridListHeaderProps, HTMLDivElement>\n>({});\nexport const GridListHeaderInnerContext = createContext<HTMLAttributes<HTMLElement> | null>(null);\n\nexport const GridListHeader = /*#__PURE__*/ createLeafComponent(\n HeaderNode,\n function Header(props: GridListHeaderProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, GridListHeaderContext);\n let rowHeaderProps = useContext(GridListHeaderInnerContext);\n\n return (\n <dom.div render={props.render} className=\"react-aria-GridListHeader\" ref={ref} {...props}>\n <div {...rowHeaderProps} style={{display: 'contents'}}>\n {props.children}\n </div>\n </dom.div>\n );\n }\n);\n"],"names":[],"version":3,"file":"GridList.mjs.map"}
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;;;;;;;AA0HM,MAAM,0DACX,CAAA,GAAA,0BAAY,EAAiE;AACxE,MAAM,0DAAqB,CAAA,GAAA,0BAAY,EAA8C;AAKrF,MAAM,4CAAS,WAAW,GAAG,CAAA,GAAA,gEAAsB,EAAE,SAAS,OAGnE,KAAwB,EAAE,GAAiC;IAC3D,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAc,EAAE,OAAO,KAAK;IAC3C,IAAI,YAAC,QAAQ,cAAE,aAAa,kBAAO,YAAY,mBAAO,aAAa,OAAM,GAAG;IAC5E,IAAI,UAAU,CAAA,GAAA,oBAAM,EAClB,IACE,OAAO,aAAa,aAChB,SAAS;YACP,QAAQ;wBACR;uBACA;wBACA;YACA,WAAW;YACX,gBAAgB;YAChB,iBAAiB;QACnB,KACA,UACN;QAAC;QAAU;QAAY;QAAW;KAAW;IAG/C,qBACE,0DAAC,CAAA,GAAA,mDAAgB;QAAE,SAAS;OACzB,CAAA,2BAAc,0DAAC;YAAY,OAAO;YAAO,YAAY;YAAY,WAAW;;AAGnF;AAEA,wCAAwC;AACxC,MAAM,uCAAiB;IAAC,CAAA,GAAA,sCAAW;IAAG,CAAA,GAAA,uCAAY;IAAG,CAAA,GAAA,qCAAU;CAAE;AAQjE,SAAS,kCAAe,SAAC,KAAK,EAAE,WAAW,GAAG,cAAE,UAAU,EAAsB;IAC9E,IAAI,EAAC,oBAAoB,sBAAsB,EAAC,GAAG,CAAA,GAAA,2CAAgB,EAAE,CAAA,GAAA,qCAAU,MAAM,CAAC;IACtF,IAAI,qBAAqB,MAAM,kBAAkB,IAAI,0BAA0B;IAC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AK;eAAQ,QAAQ,CAAC,QAAQ;iBAE/C,OAAO,KAAK,KAAK;QAErB;IACF,GAAG;QAAC;QAAe;QAAW;QAAW;KAAS;IAElD,IAAI,kBAAkB,CAAA,GAAA,uEAA0B,EAAE,CAAA,GAAA,mDAAW,GAAG;IAEhE,IAAI,cAAc,CAAA,GAAA,wCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,iBAAiB,mBAAmB,eAAe,gBAAgB,MAAM,CAAC;QAC1E,kBAAkB;QAClB,QAAQ;YACN,cAAc,AAAC,MAAM,aAAa,CAAC,EAAE,EAAE,SAAe;YACtD,eAAe,CAAA,GAAA,oBAAM,EACnB,IAAM,MAAM,aAAa,CAAC,GAAG,CAAC,CAAA,OAAQ,AAAC,KAAK,KAAK,IAAU,OAC3D;gBAAC,MAAM,aAAa;aAAC;0BAEvB;YACA,eAAe,MAAM,aAAa,CAAC,MAAM,KAAK;mBAC9C;QACF;IACF;IAEA,IAAI,WAAW,CAAA,GAAA,6CAAa,EAAE,OAAO;QAAC,QAAQ;IAAI;IAElD,qBACE,0DAAC,CAAA,GAAA,6BAAE,EAAE,IAAI;QACP,KAAK;QACJ,GAAG,QAAQ;QACX,GAAG,WAAW;QACf,oBAAkB,MAAM,aAAa,CAAC,MAAM,KAAK,KAAK;qBAEtD,0DAAC,CAAA,GAAA,qCAAU,EAAE,QAAQ;QAAC,OAAO;OAAY,YAAY,QAAQ;AAGnE","sources":["packages/react-aria-components/src/Select.tsx"],"sourcesContent":["/*\n * Copyright 2022 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 {AriaSelectProps, HiddenSelect, useSelect} from 'react-aria/useSelect';\n\nimport {ButtonContext} from './Button';\nimport {\n ClassNameOrFunction,\n ContextValue,\n dom,\n Provider,\n RACValidation,\n removeDataAttributes,\n RenderProps,\n SlotProps,\n useContextProps,\n useRenderProps,\n useSlot,\n useSlottedContext\n} from './utils';\nimport {Collection, Node} from '@react-types/shared';\nimport {CollectionBuilder} from 'react-aria/CollectionBuilder';\nimport {createHideableComponent} from 'react-aria/private/collections/Hidden';\nimport {FieldErrorContext} from './FieldError';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {FormContext} from './Form';\nimport {GlobalDOMAttributes} from '@react-types/shared';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {ItemRenderProps} from './Collection';\nimport {LabelContext} from './Label';\nimport {ListBoxContext, ListStateContext} from './ListBox';\nimport {mergeProps} from 'react-aria/mergeProps';\nimport {OverlayTriggerStateContext} from './Dialog';\nimport {PopoverContext} from './Popover';\nimport React, {\n createContext,\n ForwardedRef,\n Fragment,\n HTMLAttributes,\n ReactNode,\n useContext,\n useMemo,\n useRef\n} from 'react';\nimport {SelectState, useSelectState} from 'react-stately/useSelectState';\nimport {TextContext} from './Text';\nimport {useFocusRing} from 'react-aria/useFocusRing';\nimport {useListFormatter} from 'react-aria/useListFormatter';\nimport {useLocalizedStringFormatter} from 'react-aria/useLocalizedStringFormatter';\n\ntype SelectionMode = 'single' | 'multiple';\n\nexport interface SelectRenderProps {\n /**\n * Whether the select is focused, either via a mouse or keyboard.\n *\n * @selector [data-focused]\n */\n isFocused: boolean;\n /**\n * Whether the select is keyboard focused.\n *\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean;\n /**\n * Whether the select is disabled.\n *\n * @selector [data-disabled]\n */\n isDisabled: boolean;\n /**\n * Whether the select is currently open.\n *\n * @selector [data-open]\n */\n isOpen: boolean;\n /**\n * Whether the select is invalid.\n *\n * @selector [data-invalid]\n */\n isInvalid: boolean;\n /**\n * Whether the select is required.\n *\n * @selector [data-required]\n */\n isRequired: boolean;\n}\n\nexport interface SelectProps<T, M extends SelectionMode = 'single'>\n extends\n Omit<\n AriaSelectProps<T, M>,\n | 'children'\n | 'label'\n | 'description'\n | 'errorMessage'\n | 'validationState'\n | 'validationBehavior'\n | 'items'\n >,\n RACValidation,\n RenderProps<SelectRenderProps>,\n SlotProps,\n GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element. A function may be provided to compute the class based on component state.\n *\n * @default 'react-aria-Select'\n */\n className?: ClassNameOrFunction<SelectRenderProps>;\n /**\n * Temporary text that occupies the select when it is empty.\n *\n * @default 'Select an item' (localized)\n */\n placeholder?: string;\n}\n\nexport const SelectContext =\n createContext<ContextValue<SelectProps<any, SelectionMode>, HTMLDivElement>>(null);\nexport const SelectStateContext = createContext<SelectState<unknown, SelectionMode> | null>(null);\n\n/**\n * A select displays a collapsible list of options and allows a user to select one of them.\n */\nexport const Select = /*#__PURE__*/ createHideableComponent(function Select<\n T,\n M extends SelectionMode = 'single'\n>(props: SelectProps<T, M>, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, SelectContext);\n let {children, isDisabled = false, isInvalid = false, isRequired = false} = props;\n let content = useMemo(\n () =>\n typeof children === 'function'\n ? children({\n isOpen: false,\n isDisabled,\n isInvalid,\n isRequired,\n isFocused: false,\n isFocusVisible: false,\n defaultChildren: null\n })\n : children,\n [children, isDisabled, isInvalid, isRequired]\n );\n\n return (\n <CollectionBuilder content={content}>\n {collection => <SelectInner props={props} collection={collection} selectRef={ref} />}\n </CollectionBuilder>\n );\n});\n\n// Contexts to clear inside the popover.\nconst CLEAR_CONTEXTS = [LabelContext, ButtonContext, TextContext];\n\ninterface SelectInnerProps<T> {\n props: SelectProps<T, SelectionMode>;\n selectRef: ForwardedRef<HTMLDivElement>;\n collection: Collection<Node<T>>;\n}\n\nfunction SelectInner<T>({props, selectRef: ref, collection}: SelectInnerProps<T>) {\n let {validationBehavior: formValidationBehavior} = useSlottedContext(FormContext) || {};\n let validationBehavior = props.validationBehavior ?? formValidationBehavior ?? 'native';\n let state = useSelectState({\n ...props,\n collection,\n children: undefined,\n validationBehavior\n });\n\n let {isFocusVisible, focusProps} = useFocusRing({within: true});\n\n // Get props for child elements from useSelect\n let buttonRef = useRef<HTMLButtonElement>(null);\n let [labelRef, label] = useSlot(!props['aria-label'] && !props['aria-labelledby']);\n let {\n labelProps,\n triggerProps,\n valueProps,\n menuProps,\n descriptionProps,\n errorMessageProps,\n hiddenSelectProps,\n ...validation\n } = useSelect(\n {\n ...removeDataAttributes(props),\n label,\n validationBehavior\n },\n state,\n buttonRef\n );\n\n // Only expose a subset of state to renderProps function to avoid infinite render loop\n let renderPropsState = useMemo(\n () => ({\n isOpen: state.isOpen,\n isFocused: state.isFocused,\n isFocusVisible,\n isDisabled: props.isDisabled || false,\n isInvalid: validation.isInvalid || false,\n isRequired: props.isRequired || false\n }),\n [\n state.isOpen,\n state.isFocused,\n isFocusVisible,\n props.isDisabled,\n validation.isInvalid,\n props.isRequired\n ]\n );\n\n let renderProps = useRenderProps({\n ...props,\n values: renderPropsState,\n defaultClassName: 'react-aria-Select'\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n delete DOMProps.id;\n\n let scrollRef = useRef(null);\n\n return (\n <Provider\n values={[\n [SelectContext, props],\n [SelectStateContext, state],\n [SelectValueContext, valueProps],\n [LabelContext, {...labelProps, ref: labelRef, elementType: 'span'}],\n [\n ButtonContext,\n {...triggerProps, ref: buttonRef, isPressed: state.isOpen, autoFocus: props.autoFocus}\n ],\n [OverlayTriggerStateContext, state],\n [\n PopoverContext,\n {\n trigger: 'Select',\n triggerRef: buttonRef,\n scrollRef,\n placement: 'bottom start',\n 'aria-labelledby': menuProps['aria-labelledby'],\n clearContexts: CLEAR_CONTEXTS\n }\n ],\n [ListBoxContext, {...menuProps, ref: scrollRef}],\n [ListStateContext, state],\n [\n TextContext,\n {\n slots: {\n description: descriptionProps,\n errorMessage: errorMessageProps\n }\n }\n ],\n [FieldErrorContext, validation]\n ]}>\n <dom.div\n {...mergeProps(DOMProps, renderProps, focusProps)}\n ref={ref}\n slot={props.slot || undefined}\n data-focused={state.isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined}\n data-open={state.isOpen || undefined}\n data-disabled={props.isDisabled || undefined}\n data-invalid={validation.isInvalid || undefined}\n data-required={props.isRequired || undefined}>\n {renderProps.children}\n <HiddenSelect {...hiddenSelectProps} autoComplete={props.autoComplete} />\n </dom.div>\n </Provider>\n );\n}\n\nexport interface SelectValueRenderProps<T> {\n /**\n * Whether the value is a placeholder.\n *\n * @selector [data-placeholder]\n */\n isPlaceholder: boolean;\n /**\n * The object value of the first selected item.\n *\n * @deprecated\n */\n selectedItem: T | null;\n /** The object values of the currently selected items. */\n selectedItems: (T | null)[];\n /** The textValue of the currently selected items. */\n selectedText: string;\n /** The state of the select. */\n state: SelectState<T, 'single' | 'multiple'>;\n}\n\nexport interface SelectValueProps<T>\n extends\n Omit<HTMLAttributes<HTMLElement>, keyof RenderProps<unknown>>,\n RenderProps<SelectValueRenderProps<T>, 'span'> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element. A function may be provided to compute the class based on component state.\n *\n * @default 'react-aria-SelectValue'\n */\n className?: ClassNameOrFunction<SelectValueRenderProps<T>>;\n}\n\nexport const SelectValueContext =\n createContext<ContextValue<SelectValueProps<any>, HTMLSpanElement>>(null);\n\n/**\n * SelectValue renders the current value of a Select, or a placeholder if no value is selected.\n * It is usually placed within the button element.\n */\nexport const SelectValue = /*#__PURE__*/ createHideableComponent(function SelectValue<T>(\n props: SelectValueProps<T>,\n ref: ForwardedRef<HTMLSpanElement>\n) {\n [props, ref] = useContextProps(props, ref, SelectValueContext);\n let state = useContext(SelectStateContext)! as SelectState<T, 'single' | 'multiple'>;\n let {placeholder} = useSlottedContext(SelectContext)!;\n let rendered = state.selectedItems.map(item => {\n let rendered = item.props?.children;\n // If the selected item has a function as a child, we need to call it to render to React.JSX.\n if (typeof rendered === 'function') {\n let fn = rendered as (s: ItemRenderProps) => ReactNode;\n rendered = fn({\n isHovered: false,\n isPressed: false,\n isSelected: false,\n isFocused: false,\n isFocusVisible: false,\n isDisabled: false,\n selectionMode: 'single',\n selectionBehavior: 'toggle'\n });\n }\n\n return rendered;\n });\n\n let formatter = useListFormatter();\n let textValue = useMemo(\n () => state.selectedItems.map(item => item?.textValue),\n [state.selectedItems]\n );\n let selectionMode = state.selectionManager.selectionMode;\n let selectedText = useMemo(\n () => (selectionMode === 'single' ? (textValue[0] ?? '') : formatter.format(textValue)),\n [selectionMode, formatter, textValue]\n );\n\n let defaultChildren = useMemo(() => {\n if (selectionMode === 'single') {\n return rendered[0];\n }\n\n let parts = formatter.formatToParts(textValue);\n if (parts.length === 0) {\n return null;\n }\n\n let index = 0;\n return parts.map(part => {\n if (part.type === 'element') {\n return <Fragment key={index}>{rendered[index++]}</Fragment>;\n } else {\n return part.value;\n }\n });\n }, [selectionMode, formatter, textValue, rendered]);\n\n let stringFormatter = useLocalizedStringFormatter(intlMessages, 'react-aria-components');\n\n let renderProps = useRenderProps({\n ...props,\n defaultChildren: defaultChildren ?? placeholder ?? stringFormatter.format('selectPlaceholder'),\n defaultClassName: 'react-aria-SelectValue',\n values: {\n selectedItem: (state.selectedItems[0]?.value as T) ?? null,\n selectedItems: useMemo(\n () => state.selectedItems.map(item => (item.value as T) ?? null),\n [state.selectedItems]\n ),\n selectedText,\n isPlaceholder: state.selectedItems.length === 0,\n state\n }\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n\n return (\n <dom.span\n ref={ref}\n {...DOMProps}\n {...renderProps}\n data-placeholder={state.selectedItems.length === 0 || undefined}>\n {/* clear description and error message slots */}\n <TextContext.Provider value={undefined}>{renderProps.children}</TextContext.Provider>\n </dom.span>\n );\n});\n"],"names":[],"version":3,"file":"Select.cjs.map"}
1
+ {"mappings":";;;;;;;;;;;;;;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AG;IAEhE,IAAI,cAAc,CAAA,GAAA,wCAAa,EAAE;QAC/B,GAAG,KAAK;QACR,iBAAiB,mBAAmB,eAAe,gBAAgB,MAAM,CAAC;QAC1E,kBAAkB;QAClB,QAAQ;YACN,cAAc,AAAC,MAAM,aAAa,CAAC,EAAE,EAAE,SAAe;YACtD,eAAe,CAAA,GAAA,oBAAM,EACnB,IAAM,MAAM,aAAa,CAAC,GAAG,CAAC,CAAA,OAAQ,AAAC,KAAK,KAAK,IAAU,OAC3D;gBAAC,MAAM,aAAa;aAAC;0BAEvB;YACA,eAAe,MAAM,aAAa,CAAC,MAAM,KAAK;mBAC9C;QACF;IACF;IAEA,IAAI,WAAW,CAAA,GAAA,6CAAa,EAAE,OAAO;QAAC,QAAQ;IAAI;IAElD,qBACE,0DAAC,CAAA,GAAA,6BAAE,EAAE,IAAI;QACP,KAAK;QACJ,GAAG,QAAQ;QACX,GAAG,WAAW;QACf,oBAAkB,MAAM,aAAa,CAAC,MAAM,KAAK,KAAK;qBAEtD,0DAAC,CAAA,GAAA,qCAAU,EAAE,QAAQ;QAAC,OAAO;OAAY,YAAY,QAAQ;AAGnE","sources":["packages/react-aria-components/src/Select.tsx"],"sourcesContent":["/*\n * Copyright 2022 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 {AriaSelectProps, HiddenSelect, useSelect} from 'react-aria/useSelect';\n\nimport {ButtonContext} from './Button';\nimport {\n ClassNameOrFunction,\n ContextValue,\n dom,\n Provider,\n RACValidation,\n removeDataAttributes,\n RenderProps,\n SlotProps,\n useContextProps,\n useRenderProps,\n useSlot,\n useSlottedContext\n} from './utils';\nimport {Collection, Node} from '@react-types/shared';\nimport {CollectionBuilder} from 'react-aria/CollectionBuilder';\nimport {createHideableComponent} from 'react-aria/private/collections/Hidden';\nimport {FieldErrorContext} from './FieldError';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {FormContext} from './Form';\nimport {GlobalDOMAttributes} from '@react-types/shared';\nimport intlMessages from '../intl/*.json';\nimport {ItemRenderProps} from './Collection';\nimport {LabelContext} from './Label';\nimport {ListBoxContext, ListStateContext} from './ListBox';\nimport {mergeProps} from 'react-aria/mergeProps';\nimport {OverlayTriggerStateContext} from './Dialog';\nimport {PopoverContext} from './Popover';\nimport React, {\n createContext,\n ForwardedRef,\n Fragment,\n HTMLAttributes,\n ReactNode,\n useContext,\n useMemo,\n useRef\n} from 'react';\nimport {SelectState, useSelectState} from 'react-stately/useSelectState';\nimport {TextContext} from './Text';\nimport {useFocusRing} from 'react-aria/useFocusRing';\nimport {useListFormatter} from 'react-aria/useListFormatter';\nimport {useLocalizedStringFormatter} from 'react-aria/useLocalizedStringFormatter';\n\ntype SelectionMode = 'single' | 'multiple';\n\nexport interface SelectRenderProps {\n /**\n * Whether the select is focused, either via a mouse or keyboard.\n *\n * @selector [data-focused]\n */\n isFocused: boolean;\n /**\n * Whether the select is keyboard focused.\n *\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean;\n /**\n * Whether the select is disabled.\n *\n * @selector [data-disabled]\n */\n isDisabled: boolean;\n /**\n * Whether the select is currently open.\n *\n * @selector [data-open]\n */\n isOpen: boolean;\n /**\n * Whether the select is invalid.\n *\n * @selector [data-invalid]\n */\n isInvalid: boolean;\n /**\n * Whether the select is required.\n *\n * @selector [data-required]\n */\n isRequired: boolean;\n}\n\nexport interface SelectProps<T, M extends SelectionMode = 'single'>\n extends\n Omit<\n AriaSelectProps<T, M>,\n | 'children'\n | 'label'\n | 'description'\n | 'errorMessage'\n | 'validationState'\n | 'validationBehavior'\n | 'items'\n >,\n RACValidation,\n RenderProps<SelectRenderProps>,\n SlotProps,\n GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element. A function may be provided to compute the class based on component state.\n *\n * @default 'react-aria-Select'\n */\n className?: ClassNameOrFunction<SelectRenderProps>;\n /**\n * Temporary text that occupies the select when it is empty.\n *\n * @default 'Select an item' (localized)\n */\n placeholder?: string;\n}\n\nexport const SelectContext =\n createContext<ContextValue<SelectProps<any, SelectionMode>, HTMLDivElement>>(null);\nexport const SelectStateContext = createContext<SelectState<unknown, SelectionMode> | null>(null);\n\n/**\n * A select displays a collapsible list of options and allows a user to select one of them.\n */\nexport const Select = /*#__PURE__*/ createHideableComponent(function Select<\n T,\n M extends SelectionMode = 'single'\n>(props: SelectProps<T, M>, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useContextProps(props, ref, SelectContext);\n let {children, isDisabled = false, isInvalid = false, isRequired = false} = props;\n let content = useMemo(\n () =>\n typeof children === 'function'\n ? children({\n isOpen: false,\n isDisabled,\n isInvalid,\n isRequired,\n isFocused: false,\n isFocusVisible: false,\n defaultChildren: null\n })\n : children,\n [children, isDisabled, isInvalid, isRequired]\n );\n\n return (\n <CollectionBuilder content={content}>\n {collection => <SelectInner props={props} collection={collection} selectRef={ref} />}\n </CollectionBuilder>\n );\n});\n\n// Contexts to clear inside the popover.\nconst CLEAR_CONTEXTS = [LabelContext, ButtonContext, TextContext];\n\ninterface SelectInnerProps<T> {\n props: SelectProps<T, SelectionMode>;\n selectRef: ForwardedRef<HTMLDivElement>;\n collection: Collection<Node<T>>;\n}\n\nfunction SelectInner<T>({props, selectRef: ref, collection}: SelectInnerProps<T>) {\n let {validationBehavior: formValidationBehavior} = useSlottedContext(FormContext) || {};\n let validationBehavior = props.validationBehavior ?? formValidationBehavior ?? 'native';\n let state = useSelectState({\n ...props,\n collection,\n children: undefined,\n validationBehavior\n });\n\n let {isFocusVisible, focusProps} = useFocusRing({within: true});\n\n // Get props for child elements from useSelect\n let buttonRef = useRef<HTMLButtonElement>(null);\n let [labelRef, label] = useSlot(!props['aria-label'] && !props['aria-labelledby']);\n let {\n labelProps,\n triggerProps,\n valueProps,\n menuProps,\n descriptionProps,\n errorMessageProps,\n hiddenSelectProps,\n ...validation\n } = useSelect(\n {\n ...removeDataAttributes(props),\n label,\n validationBehavior\n },\n state,\n buttonRef\n );\n\n // Only expose a subset of state to renderProps function to avoid infinite render loop\n let renderPropsState = useMemo(\n () => ({\n isOpen: state.isOpen,\n isFocused: state.isFocused,\n isFocusVisible,\n isDisabled: props.isDisabled || false,\n isInvalid: validation.isInvalid || false,\n isRequired: props.isRequired || false\n }),\n [\n state.isOpen,\n state.isFocused,\n isFocusVisible,\n props.isDisabled,\n validation.isInvalid,\n props.isRequired\n ]\n );\n\n let renderProps = useRenderProps({\n ...props,\n values: renderPropsState,\n defaultClassName: 'react-aria-Select'\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n delete DOMProps.id;\n\n let scrollRef = useRef(null);\n\n return (\n <Provider\n values={[\n [SelectContext, props],\n [SelectStateContext, state],\n [SelectValueContext, valueProps],\n [LabelContext, {...labelProps, ref: labelRef, elementType: 'span'}],\n [\n ButtonContext,\n {...triggerProps, ref: buttonRef, isPressed: state.isOpen, autoFocus: props.autoFocus}\n ],\n [OverlayTriggerStateContext, state],\n [\n PopoverContext,\n {\n trigger: 'Select',\n triggerRef: buttonRef,\n scrollRef,\n placement: 'bottom start',\n 'aria-labelledby': menuProps['aria-labelledby'],\n clearContexts: CLEAR_CONTEXTS\n }\n ],\n [ListBoxContext, {...menuProps, ref: scrollRef}],\n [ListStateContext, state],\n [\n TextContext,\n {\n slots: {\n description: descriptionProps,\n errorMessage: errorMessageProps\n }\n }\n ],\n [FieldErrorContext, validation]\n ]}>\n <dom.div\n {...mergeProps(DOMProps, renderProps, focusProps)}\n ref={ref}\n slot={props.slot || undefined}\n data-focused={state.isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined}\n data-open={state.isOpen || undefined}\n data-disabled={props.isDisabled || undefined}\n data-invalid={validation.isInvalid || undefined}\n data-required={props.isRequired || undefined}>\n {renderProps.children}\n <HiddenSelect {...hiddenSelectProps} autoComplete={props.autoComplete} />\n </dom.div>\n </Provider>\n );\n}\n\nexport interface SelectValueRenderProps<T> {\n /**\n * Whether the value is a placeholder.\n *\n * @selector [data-placeholder]\n */\n isPlaceholder: boolean;\n /**\n * The object value of the first selected item.\n *\n * @deprecated\n */\n selectedItem: T | null;\n /** The object values of the currently selected items. */\n selectedItems: (T | null)[];\n /** The textValue of the currently selected items. */\n selectedText: string;\n /** The state of the select. */\n state: SelectState<T, 'single' | 'multiple'>;\n}\n\nexport interface SelectValueProps<T>\n extends\n Omit<HTMLAttributes<HTMLElement>, keyof RenderProps<unknown>>,\n RenderProps<SelectValueRenderProps<T>, 'span'> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element. A function may be provided to compute the class based on component state.\n *\n * @default 'react-aria-SelectValue'\n */\n className?: ClassNameOrFunction<SelectValueRenderProps<T>>;\n}\n\nexport const SelectValueContext =\n createContext<ContextValue<SelectValueProps<any>, HTMLSpanElement>>(null);\n\n/**\n * SelectValue renders the current value of a Select, or a placeholder if no value is selected.\n * It is usually placed within the button element.\n */\nexport const SelectValue = /*#__PURE__*/ createHideableComponent(function SelectValue<T>(\n props: SelectValueProps<T>,\n ref: ForwardedRef<HTMLSpanElement>\n) {\n [props, ref] = useContextProps(props, ref, SelectValueContext);\n let state = useContext(SelectStateContext)! as SelectState<T, 'single' | 'multiple'>;\n let {placeholder} = useSlottedContext(SelectContext)!;\n let rendered = state.selectedItems.map(item => {\n let rendered = item.props?.children;\n // If the selected item has a function as a child, we need to call it to render to React.JSX.\n if (typeof rendered === 'function') {\n let fn = rendered as (s: ItemRenderProps) => ReactNode;\n rendered = fn({\n isHovered: false,\n isPressed: false,\n isSelected: false,\n isFocused: false,\n isFocusVisible: false,\n isDisabled: false,\n selectionMode: 'single',\n selectionBehavior: 'toggle'\n });\n }\n\n return rendered;\n });\n\n let formatter = useListFormatter();\n let textValue = useMemo(\n () => state.selectedItems.map(item => item?.textValue),\n [state.selectedItems]\n );\n let selectionMode = state.selectionManager.selectionMode;\n let selectedText = useMemo(\n () => (selectionMode === 'single' ? (textValue[0] ?? '') : formatter.format(textValue)),\n [selectionMode, formatter, textValue]\n );\n\n let defaultChildren = useMemo(() => {\n if (selectionMode === 'single') {\n return rendered[0];\n }\n\n let parts = formatter.formatToParts(textValue);\n if (parts.length === 0) {\n return null;\n }\n\n let index = 0;\n return parts.map(part => {\n if (part.type === 'element') {\n return <Fragment key={index}>{rendered[index++]}</Fragment>;\n } else {\n return part.value;\n }\n });\n }, [selectionMode, formatter, textValue, rendered]);\n\n let stringFormatter = useLocalizedStringFormatter(intlMessages, 'react-aria-components');\n\n let renderProps = useRenderProps({\n ...props,\n defaultChildren: defaultChildren ?? placeholder ?? stringFormatter.format('selectPlaceholder'),\n defaultClassName: 'react-aria-SelectValue',\n values: {\n selectedItem: (state.selectedItems[0]?.value as T) ?? null,\n selectedItems: useMemo(\n () => state.selectedItems.map(item => (item.value as T) ?? null),\n [state.selectedItems]\n ),\n selectedText,\n isPlaceholder: state.selectedItems.length === 0,\n state\n }\n });\n\n let DOMProps = filterDOMProps(props, {global: true});\n\n return (\n <dom.span\n ref={ref}\n {...DOMProps}\n {...renderProps}\n data-placeholder={state.selectedItems.length === 0 || undefined}>\n {/* clear description and error message slots */}\n <TextContext.Provider value={undefined}>{renderProps.children}</TextContext.Provider>\n </dom.span>\n );\n});\n"],"names":[],"version":3,"file":"Select.cjs.map"}