@solid2-aria/components 0.0.1 → 0.1.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.
- package/README.md +6 -0
- package/dist/NOTICE.txt +33 -11
- package/dist/browser/collection-dnd.js +37 -40
- package/dist/browser/collection-dnd.js.map +1 -1
- package/dist/browser/color-field.js +12 -6
- package/dist/browser/color-field.js.map +1 -1
- package/dist/browser/drop-zone.js +6 -3
- package/dist/browser/drop-zone.js.map +1 -1
- package/dist/browser/grid-list.d.ts +2 -2
- package/dist/browser/grid-list.js +8 -7
- package/dist/browser/grid-list.js.map +1 -1
- package/dist/browser/list-box.js +31 -37
- package/dist/browser/list-box.js.map +1 -1
- package/dist/browser/menu.js +16 -19
- package/dist/browser/menu.js.map +1 -1
- package/dist/browser/modal.js +28 -31
- package/dist/browser/modal.js.map +1 -1
- package/dist/browser/number-field.js +5 -4
- package/dist/browser/number-field.js.map +1 -1
- package/dist/browser/popover.js +26 -29
- package/dist/browser/popover.js.map +1 -1
- package/dist/browser/shared-element-transition.js +19 -22
- package/dist/browser/shared-element-transition.js.map +1 -1
- package/dist/browser/sheet.d.ts +1 -1
- package/dist/browser/sheet.js +82 -7
- package/dist/browser/sheet.js.map +1 -1
- package/dist/browser/table.d.ts +2 -2
- package/dist/browser/table.js +5 -2
- package/dist/browser/table.js.map +1 -1
- package/dist/browser/tabs.d.ts +1 -1
- package/dist/browser/tabs.js +65 -26
- package/dist/browser/tabs.js.map +1 -1
- package/dist/browser/toast.js +43 -46
- package/dist/browser/toast.js.map +1 -1
- package/dist/browser/token-field.js +0 -1
- package/dist/browser/token-field.js.map +1 -1
- package/dist/browser/tooltip.js +22 -25
- package/dist/browser/tooltip.js.map +1 -1
- package/dist/browser/tree.js +21 -10
- package/dist/browser/tree.js.map +1 -1
- package/dist/server/calendar.js +3 -1
- package/dist/server/calendar.js.map +1 -1
- package/dist/server/checkbox.js +3 -1
- package/dist/server/checkbox.js.map +1 -1
- package/dist/server/collection-dnd.js +8 -36
- package/dist/server/collection-dnd.js.map +1 -1
- package/dist/server/color-field.js +7 -2
- package/dist/server/color-field.js.map +1 -1
- package/dist/server/color-thumb.js +6 -2
- package/dist/server/color-thumb.js.map +1 -1
- package/dist/server/drop-zone.js +12 -5
- package/dist/server/drop-zone.js.map +1 -1
- package/dist/server/grid-list.js +16 -32
- package/dist/server/grid-list.js.map +1 -1
- package/dist/server/hidden-date-input.js +3 -1
- package/dist/server/hidden-date-input.js.map +1 -1
- package/dist/server/list-box.js +25 -69
- package/dist/server/list-box.js.map +1 -1
- package/dist/server/menu.js +10 -31
- package/dist/server/menu.js.map +1 -1
- package/dist/server/modal.js +35 -67
- package/dist/server/modal.js.map +1 -1
- package/dist/server/popover.js +71 -98
- package/dist/server/popover.js.map +1 -1
- package/dist/server/radio-group.js +3 -1
- package/dist/server/radio-group.js.map +1 -1
- package/dist/server/shared-element-transition.js +13 -42
- package/dist/server/shared-element-transition.js.map +1 -1
- package/dist/server/sheet.js +135 -60
- package/dist/server/sheet.js.map +1 -1
- package/dist/server/slider.js +3 -1
- package/dist/server/slider.js.map +1 -1
- package/dist/server/switch.js +3 -1
- package/dist/server/switch.js.map +1 -1
- package/dist/server/table.js +8 -3
- package/dist/server/table.js.map +1 -1
- package/dist/server/tabs.js +180 -169
- package/dist/server/tabs.js.map +1 -1
- package/dist/server/toast.js +68 -101
- package/dist/server/toast.js.map +1 -1
- package/dist/server/token-field.js +2 -2
- package/dist/server/tooltip.js +34 -61
- package/dist/server/tooltip.js.map +1 -1
- package/dist/server/tree.js +156 -130
- package/dist/server/tree.js.map +1 -1
- package/dist/server/virtualizer.js +3 -1
- package/dist/server/virtualizer.js.map +1 -1
- package/package.json +12 -11
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-box.js","names":["<ListBoxInner props={props} state={state} listRef={setRef} />","listRef={setRef}","<CollectionBuilder\n createCollection={() => new BaseCollection<object>()}\n content={<Collection {...props} />}\n >\n {(collection) => (\n <StandaloneListBox\n props={props}\n collection={collection}\n listRef={setRef}\n />\n )}\n </CollectionBuilder>","createCollection={() => new BaseCollection<object>()}","<Collection {...props} />","<StandaloneListBox\n props={props}\n collection={collection}\n listRef={setRef}\n />","<ListBoxInner props={input.props} state={state} listRef={input.listRef} />","<dom.div\n {...mergeProps(\n filterDOMProps(props, { global: true }),\n merge(() => aria.listBoxProps ?? {}),\n merge(() => dnd.collectionProps ?? {}),\n merge(() => focus.focusProps ?? {}),\n render\n )}\n ref={(element: HTMLDivElement) => {\n setRef(element);\n }}\n slot={props.slot ?? undefined}\n data-drop-target={values.isDropTarget || undefined}\n data-empty={values.isEmpty || undefined}\n data-focused={focus.isFocused || undefined}\n data-focus-visible={focus.isFocusVisible || undefined}\n data-layout={values.layout}\n data-orientation={values.orientation}\n >\n <ListBoxContext value={props}>\n <ListStateContext value={state}>\n <SectionContext\n value={{\n name: \"ListBoxSection\",\n render: (sectionProps, sectionRef, sectionNode, defaultClass) => (\n <ListBoxSectionContent\n props={sectionProps}\n sectionRef={sectionRef}\n node={sectionNode}\n defaultClass={defaultClass}\n />\n ),\n }}\n >\n <DragAndDropContext value={dnd}>\n <DropIndicatorContext\n value={{\n render: (indicatorProps, indicatorRef) => (\n <ListBoxDropIndicator\n {...indicatorProps}\n ref={indicatorRef}\n />\n ),\n }}\n >\n <Root\n collection={state.collection}\n scrollRef={ref}\n persistedKeys={createDndPersistedKeys(\n state.selectionManager,\n props.dragAndDropHooks,\n dnd.dropState\n )}\n renderDropIndicator={createRenderDropIndicator(\n props.dragAndDropHooks,\n dnd.dropState\n )}\n />\n </DropIndicatorContext>\n </DragAndDropContext>\n </SectionContext>\n </ListStateContext>\n </ListBoxContext>\n {dnd.preview}\n {values.isEmpty && props.renderEmptyState ? (\n <div role=\"option\" style={{ display: \"contents\" }}>\n {props.renderEmptyState(values)}\n </div>\n ) : null}\n </dom.div>","dom.div","ref={(element: HTMLDivElement) => {\n setRef(element);\n }}","<ListBoxContext value={props}>\n <ListStateContext value={state}>\n <SectionContext\n value={{\n name: \"ListBoxSection\",\n render: (sectionProps, sectionRef, sectionNode, defaultClass) => (\n <ListBoxSectionContent\n props={sectionProps}\n sectionRef={sectionRef}\n node={sectionNode}\n defaultClass={defaultClass}\n />\n ),\n }}\n >\n <DragAndDropContext value={dnd}>\n <DropIndicatorContext\n value={{\n render: (indicatorProps, indicatorRef) => (\n <ListBoxDropIndicator\n {...indicatorProps}\n ref={indicatorRef}\n />\n ),\n }}\n >\n <Root\n collection={state.collection}\n scrollRef={ref}\n persistedKeys={createDndPersistedKeys(\n state.selectionManager,\n props.dragAndDropHooks,\n dnd.dropState\n )}\n renderDropIndicator={createRenderDropIndicator(\n props.dragAndDropHooks,\n dnd.dropState\n )}\n />\n </DropIndicatorContext>\n </DragAndDropContext>\n </SectionContext>\n </ListStateContext>\n </ListBoxContext>","value={props}","<ListStateContext value={state}>\n <SectionContext\n value={{\n name: \"ListBoxSection\",\n render: (sectionProps, sectionRef, sectionNode, defaultClass) => (\n <ListBoxSectionContent\n props={sectionProps}\n sectionRef={sectionRef}\n node={sectionNode}\n defaultClass={defaultClass}\n />\n ),\n }}\n >\n <DragAndDropContext value={dnd}>\n <DropIndicatorContext\n value={{\n render: (indicatorProps, indicatorRef) => (\n <ListBoxDropIndicator\n {...indicatorProps}\n ref={indicatorRef}\n />\n ),\n }}\n >\n <Root\n collection={state.collection}\n scrollRef={ref}\n persistedKeys={createDndPersistedKeys(\n state.selectionManager,\n props.dragAndDropHooks,\n dnd.dropState\n )}\n renderDropIndicator={createRenderDropIndicator(\n props.dragAndDropHooks,\n dnd.dropState\n )}\n />\n </DropIndicatorContext>\n </DragAndDropContext>\n </SectionContext>\n </ListStateContext>","value={state}","<SectionContext\n value={{\n name: \"ListBoxSection\",\n render: (sectionProps, sectionRef, sectionNode, defaultClass) => (\n <ListBoxSectionContent\n props={sectionProps}\n sectionRef={sectionRef}\n node={sectionNode}\n defaultClass={defaultClass}\n />\n ),\n }}\n >\n <DragAndDropContext value={dnd}>\n <DropIndicatorContext\n value={{\n render: (indicatorProps, indicatorRef) => (\n <ListBoxDropIndicator\n {...indicatorProps}\n ref={indicatorRef}\n />\n ),\n }}\n >\n <Root\n collection={state.collection}\n scrollRef={ref}\n persistedKeys={createDndPersistedKeys(\n state.selectionManager,\n props.dragAndDropHooks,\n dnd.dropState\n )}\n renderDropIndicator={createRenderDropIndicator(\n props.dragAndDropHooks,\n dnd.dropState\n )}\n />\n </DropIndicatorContext>\n </DragAndDropContext>\n </SectionContext>","value={{\n name: \"ListBoxSection\",\n render: (sectionProps, sectionRef, sectionNode, defaultClass) => (\n <ListBoxSectionContent\n props={sectionProps}\n sectionRef={sectionRef}\n node={sectionNode}\n defaultClass={defaultClass}\n />\n ),\n }}","<ListBoxSectionContent\n props={sectionProps}\n sectionRef={sectionRef}\n node={sectionNode}\n defaultClass={defaultClass}\n />","props={sectionProps}","node={sectionNode}","<DragAndDropContext value={dnd}>\n <DropIndicatorContext\n value={{\n render: (indicatorProps, indicatorRef) => (\n <ListBoxDropIndicator\n {...indicatorProps}\n ref={indicatorRef}\n />\n ),\n }}\n >\n <Root\n collection={state.collection}\n scrollRef={ref}\n persistedKeys={createDndPersistedKeys(\n state.selectionManager,\n props.dragAndDropHooks,\n dnd.dropState\n )}\n renderDropIndicator={createRenderDropIndicator(\n props.dragAndDropHooks,\n dnd.dropState\n )}\n />\n </DropIndicatorContext>\n </DragAndDropContext>","value={dnd}","<DropIndicatorContext\n value={{\n render: (indicatorProps, indicatorRef) => (\n <ListBoxDropIndicator\n {...indicatorProps}\n ref={indicatorRef}\n />\n ),\n }}\n >\n <Root\n collection={state.collection}\n scrollRef={ref}\n persistedKeys={createDndPersistedKeys(\n state.selectionManager,\n props.dragAndDropHooks,\n dnd.dropState\n )}\n renderDropIndicator={createRenderDropIndicator(\n props.dragAndDropHooks,\n dnd.dropState\n )}\n />\n </DropIndicatorContext>","value={{\n render: (indicatorProps, indicatorRef) => (\n <ListBoxDropIndicator\n {...indicatorProps}\n ref={indicatorRef}\n />\n ),\n }}","<ListBoxDropIndicator\n {...indicatorProps}\n ref={indicatorRef}\n />","ref={indicatorRef}","<Root\n collection={state.collection}\n scrollRef={ref}\n persistedKeys={createDndPersistedKeys(\n state.selectionManager,\n props.dragAndDropHooks,\n dnd.dropState\n )}\n renderDropIndicator={createRenderDropIndicator(\n props.dragAndDropHooks,\n dnd.dropState\n )}\n />","scrollRef={ref}","dnd.preview","{values.isEmpty && props.renderEmptyState ? (\n <div role=\"option\" style={{ display: \"contents\" }}>\n {props.renderEmptyState(values)}\n </div>\n ) : null}","{props.renderEmptyState(values)}","<dom.section\n {...mergeProps(\n omit(filterDOMProps(props, { global: true }), \"id\"),\n merge(() => aria.groupProps ?? {})\n )}\n class={props.class ?? defaultClass}\n style={props.style}\n render={props.render}\n ref={ref}\n >\n <HeaderContext\n value={mergeProps(\n merge(() => aria.headingProps ?? {}),\n { registerSlot: registerHeading }\n )}\n >\n <Branch collection={state.collection} parent={section} />\n </HeaderContext>\n </dom.section>","dom.section","ref={ref}","<HeaderContext\n value={mergeProps(\n merge(() => aria.headingProps ?? {}),\n { registerSlot: registerHeading }\n )}\n >\n <Branch collection={state.collection} parent={section} />\n </HeaderContext>","<Branch collection={state.collection} parent={section} />","parent={section}","<Element\n {...mergeProps(\n omit(filterDOMProps(props, { global: true }), \"id\", \"onClick\"),\n render,\n merge(() => aria.optionProps ?? {}),\n merge(() => hover.hoverProps ?? {}),\n merge(() => keyboard.keyboardProps ?? {}),\n merge(() => focus.focusProps ?? {}),\n merge(() => drag?.dragProps ?? {}),\n merge(() => drop?.dropProps ?? {})\n )}\n ref={[\n (element: HTMLDivElement) => {\n setRef(element);\n },\n (element: HTMLDivElement) => {\n assignRef(forwardedRef, element);\n },\n ]}\n data-allows-dragging={values.allowsDragging ?? undefined}\n data-dragging={values.isDragging ?? undefined}\n data-drop-target={values.isDropTarget ?? undefined}\n data-selected={aria.isSelected || undefined}\n data-disabled={aria.isDisabled || undefined}\n data-hovered={hover.isHovered || undefined}\n data-focused={aria.isFocused || undefined}\n data-focus-visible={aria.isFocusVisible || undefined}\n data-pressed={aria.isPressed || undefined}\n data-selection-mode={\n state.selectionManager.selectionMode === \"none\"\n ? undefined\n : state.selectionManager.selectionMode\n }\n >\n <TextContext\n value={{\n slots: {\n get [DEFAULT_SLOT]() {\n return aria.labelProps;\n },\n get description() {\n return aria.descriptionProps;\n },\n get label() {\n return aria.labelProps;\n },\n },\n }}\n >\n <SelectionIndicatorContext\n value={{\n get isSelected() {\n return aria.isSelected;\n },\n }}\n >\n {render.children}\n </SelectionIndicatorContext>\n </TextContext>\n </Element>","ref={[\n (element: HTMLDivElement) => {\n setRef(element);\n },\n (element: HTMLDivElement) => {\n assignRef(forwardedRef, element);\n },\n ]}","state.selectionManager.selectionMode === \"none\"\n ? undefined\n : state.selectionManager.selectionMode","<TextContext\n value={{\n slots: {\n get [DEFAULT_SLOT]() {\n return aria.labelProps;\n },\n get description() {\n return aria.descriptionProps;\n },\n get label() {\n return aria.labelProps;\n },\n },\n }}\n >\n <SelectionIndicatorContext\n value={{\n get isSelected() {\n return aria.isSelected;\n },\n }}\n >\n {render.children}\n </SelectionIndicatorContext>\n </TextContext>","value={{\n slots: {\n get [DEFAULT_SLOT]() {\n return aria.labelProps;\n },\n get description() {\n return aria.descriptionProps;\n },\n get label() {\n return aria.labelProps;\n },\n },\n }}","<SelectionIndicatorContext\n value={{\n get isSelected() {\n return aria.isSelected;\n },\n }}\n >\n {render.children}\n </SelectionIndicatorContext>","value={{\n get isSelected() {\n return aria.isSelected;\n },\n }}","ref={(element: HTMLDivElement) => {\n setSentinel(element);\n }}","<Show when={props.isLoading}>\n <dom.div\n {...filterDOMProps(props, { global: true })}\n {...render}\n role=\"option\"\n tabindex={-1}\n ref={(element: HTMLDivElement) => {\n assignRef(forwardedRef, element);\n }}\n >\n {render.children}\n </dom.div>\n </Show>","<dom.div\n {...filterDOMProps(props, { global: true })}\n {...render}\n role=\"option\"\n tabindex={-1}\n ref={(element: HTMLDivElement) => {\n assignRef(forwardedRef, element);\n }}\n >\n {render.children}\n </dom.div>","role=\"option\"","tabindex={-1}","ref={(element: HTMLDivElement) => {\n assignRef(forwardedRef, element);\n }}","<ListBoxItemCollection\n {...props}\n ref={(element: HTMLDivElement) => {\n assignRef(\n untrack(() => props.ref),\n element\n );\n }}\n />","ref={(element: HTMLDivElement) => {\n assignRef(\n untrack(() => props.ref),\n element\n );\n }}","<ListBoxSectionCollection\n {...props}\n ref={(element: HTMLElement) => {\n assignRef(\n untrack(() => props.ref),\n element\n );\n }}\n />","ref={(element: HTMLElement) => {\n assignRef(\n untrack(() => props.ref),\n element\n );\n }}","<ListBoxLoadMoreItemCollection\n {...props}\n ref={(element: HTMLDivElement) => {\n assignRef(\n untrack(() => props.ref),\n element\n );\n }}\n />","<Show when={!aria.isHidden}>\n <dom.div\n {...aria.dropIndicatorProps}\n {...render}\n role=\"option\"\n ref={[\n (element: HTMLElement) => {\n setRef(element);\n },\n (element: HTMLElement) => {\n assignRef(\n untrack(() => props.ref),\n element\n );\n },\n ]}\n data-drop-target={aria.isDropTarget || undefined}\n />\n </Show>","<dom.div\n {...aria.dropIndicatorProps}\n {...render}\n role=\"option\"\n ref={[\n (element: HTMLElement) => {\n setRef(element);\n },\n (element: HTMLElement) => {\n assignRef(\n untrack(() => props.ref),\n element\n );\n },\n ]}\n data-drop-target={aria.isDropTarget || undefined}\n />","ref={[\n (element: HTMLElement) => {\n setRef(element);\n },\n (element: HTMLElement) => {\n assignRef(\n untrack(() => props.ref),\n element\n );\n },\n ]}","_$createComponent","mergeProps","_$mergeProps","_$applyRef","_$memo","_$getNextElement","_$scope"],"sources":["../../src/list-box.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/*\n * Derived from Adobe React Spectrum: packages/react-aria-components/src/ListBox.tsx.\n * Modified for Solid Aria: adapted collection ownership, contexts, accessibility primitives, and reactive properties for Solid 2; uses Solid class props.\n * Licensed under Apache-2.0. See LICENSES/Apache-2.0.txt and NOTICE.txt at the repository root.\n */\n\nimport {\n ItemNode,\n SectionNode,\n LoaderNode,\n BaseCollection,\n} from \"@solid2-aria/core/collections/base-collection\";\nimport {\n Collection,\n CollectionBuilder,\n createLeafComponent,\n createBranchComponent,\n} from \"@solid2-aria/core/collections/collection-builder\";\nimport { createFocusRing } from \"@solid2-aria/core/focus/create-focus-ring\";\nimport { createCollator } from \"@solid2-aria/core/i18n/create-collator\";\nimport { createLocale } from \"@solid2-aria/core/i18n/i18n-provider\";\nimport { createFocus } from \"@solid2-aria/core/interactions/create-focus\";\nimport { createHover } from \"@solid2-aria/core/interactions/create-hover\";\nimport { createKeyboard } from \"@solid2-aria/core/interactions/create-keyboard\";\nimport { createListBox } from \"@solid2-aria/core/listbox/create-list-box\";\nimport type { AriaListBoxProps } from \"@solid2-aria/core/listbox/create-list-box\";\nimport { createListBoxSection } from \"@solid2-aria/core/listbox/create-list-box-section\";\nimport { createOption } from \"@solid2-aria/core/listbox/create-option\";\nimport { ListKeyboardDelegate } from \"@solid2-aria/core/selection/list-keyboard-delegate\";\nimport { createLoadMoreSentinel } from \"@solid2-aria/core/utils/create-load-more-sentinel\";\nimport type { LoadMoreSentinelProps } from \"@solid2-aria/core/utils/create-load-more-sentinel\";\nimport { filterDOMProps } from \"@solid2-aria/core/utils/filter-dom-props\";\nimport { mergeProps } from \"@solid2-aria/core/utils/merge-props\";\nimport { isTruthy } from \"@solid2-aria/core/utils/truthy\";\nimport { createListState } from \"@solid2-aria/stately/list/create-list-state\";\nimport type { ListState } from \"@solid2-aria/stately/list/create-list-state\";\nimport type {\n Collection as SharedCollection,\n FocusEvents,\n HoverEvents,\n Key,\n KeyboardEvents,\n LinkDOMProps,\n PressEvents,\n Orientation,\n SelectionBehavior,\n Node,\n} from \"@solid2-aria/types-shared\";\nimport type { GlobalDOMAttributes } from \"@solid2-aria/types-shared-web\";\nimport { dynamic } from \"@solidjs/web\";\nimport type { JSX } from \"@solidjs/web\";\nimport {\n merge,\n untrack,\n createSignal,\n createContext,\n createMemo,\n useContext,\n omit,\n Show,\n} from \"solid-js\";\n\nimport { SelectableCollectionContext } from \"./autocomplete\";\nimport type { SelectableCollectionContextValue } from \"./autocomplete\";\nimport { CollectionRendererContext, SectionContext } from \"./collection\";\nimport type {\n CollectionProps,\n ItemRenderProps,\n SectionProps,\n} from \"./collection\";\nimport { createCollectionDragAndDrop } from \"./collection-dnd\";\nimport type { DragAndDropHooks } from \"./create-drag-and-drop\";\nimport {\n DragAndDropContext,\n DropIndicatorContext,\n createRenderDropIndicator,\n createDndPersistedKeys,\n} from \"./drag-and-drop\";\nimport type { DropIndicatorProps } from \"./drag-and-drop\";\nimport { HeaderContext } from \"./header\";\nimport { SelectionIndicatorContext } from \"./selection-indicator\";\nimport { TextContext } from \"./text\";\nimport {\n dom,\n createContextProps,\n createRenderProps,\n createSlot,\n DEFAULT_SLOT,\n assignRef,\n} from \"./utils\";\nimport type {\n Ref,\n ClassOrFunction,\n DOMRenderProps,\n PossibleLinkDOMRenderProps,\n RenderProps,\n SlotProps,\n StyleProps,\n StyleRenderProps,\n ContextValue,\n} from \"./utils\";\n\nexport const ListBoxContext =\n // oxlint-disable-next-line typescript/no-explicit-any -- Collection contexts erase item types; each typed factory restores its owner's item contract.\n createContext<ContextValue<ListBoxProps<any>, HTMLDivElement>>(null);\n\nexport const ListStateContext = createContext<ListState<unknown> | null>(null);\n\nexport interface ListBoxRenderProps {\n /**\n * Whether the listbox has no items and should display its empty state.\n *\n * @selector [data-empty]\n */\n isEmpty: boolean;\n /**\n * Whether the listbox is currently focused.\n *\n * @selector [data-focused]\n */\n isFocused: boolean;\n /**\n * Whether the listbox is currently keyboard focused.\n *\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean;\n /**\n * Whether the listbox 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 listbox.\n */\n state: ListState<unknown>;\n}\n\nexport interface ListBoxProps<T>\n extends\n Omit<AriaListBoxProps<T>, \"children\" | \"label\">,\n CollectionProps<T>,\n StyleRenderProps<ListBoxRenderProps>,\n SlotProps,\n GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [class](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/class) for the\n * element. A function may be provided to compute the class based on component state.\n *\n * @default 'react-aria-ListBox'\n */\n class?: ClassOrFunction<ListBoxRenderProps>;\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 `createDragAndDrop` used to enable drag and drop behavior for\n * the ListBox.\n */\n dragAndDropHooks?: DragAndDropHooks<NoInfer<T>>;\n /** Provides content to display when there are no items in the list. */\n renderEmptyState?: (props: ListBoxRenderProps) => JSX.Element;\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\n * direction that the collection scrolls.\n *\n * @default 'vertical'\n */\n orientation?: Orientation;\n}\n\nexport interface ListBoxSectionProps<T>\n extends SectionProps<T>, DOMRenderProps<\"section\", undefined> {\n /**\n * The CSS [class](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/class) for the\n * element.\n *\n * @default 'react-aria-ListBoxSection'\n */\n class?: JSX.ClassValue;\n}\n\nexport type ListBoxItemRenderProps = ItemRenderProps;\n\nexport interface ListBoxItemProps<T = object>\n extends\n Omit<RenderProps<ListBoxItemRenderProps>, \"render\">,\n PossibleLinkDOMRenderProps<\"div\", ListBoxItemRenderProps>,\n LinkDOMProps,\n HoverEvents,\n PressEvents,\n KeyboardEvents,\n FocusEvents<HTMLDivElement>,\n Omit<GlobalDOMAttributes<HTMLDivElement>, \"onClick\"> {\n /**\n * The CSS [class](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/class) for the\n * element. A function may be provided to compute the class based on component state.\n *\n * @default 'react-aria-ListBoxItem'\n */\n class?: ClassOrFunction<ListBoxItemRenderProps>;\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 /** An accessibility label for this item. */\n \"aria-label\"?: 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\nexport interface ListBoxLoadMoreItemProps\n extends\n Omit<LoadMoreSentinelProps, \"collection\" | \"direction\">,\n StyleProps,\n DOMRenderProps<\"div\", undefined>,\n GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [class](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/class) for the\n * element.\n *\n * @default 'react-aria-ListBoxLoadingIndicator'\n */\n class?: JSX.ClassValue;\n /**\n * The load more spinner to render when loading additional items.\n */\n children?: JSX.Element;\n /**\n * Whether or not the loading spinner should be rendered or not.\n */\n isLoading?: boolean;\n}\n\nexport function ListBox<T extends object>(\n input: ListBoxProps<T> & { ref?: Ref<HTMLDivElement> }\n): JSX.Element {\n const [props, , setRef] = createContextProps(\n input,\n untrack(() => input.ref),\n ListBoxContext\n );\n\n const state = useContext(ListStateContext);\n\n if (state) {\n // oxlint-disable-next-line solid/components-return-once -- Static collection traversal and context registration are fixed when the owner is created.\n return <ListBoxInner props={props} state={state} listRef={setRef} />;\n }\n\n return (\n <CollectionBuilder\n createCollection={() => new BaseCollection<object>()}\n content={<Collection {...props} />}\n >\n {(collection) => (\n <StandaloneListBox\n props={props}\n collection={collection}\n listRef={setRef}\n />\n )}\n </CollectionBuilder>\n );\n}\n\nfunction StandaloneListBox<T extends object>(input: {\n props: ListBoxProps<T>;\n collection: BaseCollection<object>;\n listRef: (element: HTMLDivElement) => void;\n}): JSX.Element {\n const state = createListState(\n mergeProps(\n merge(() => input.props ?? {}),\n {\n children: null,\n get collection() {\n return input.collection;\n },\n items: undefined,\n }\n )\n );\n\n return (\n <ListBoxInner props={input.props} state={state} listRef={input.listRef} />\n );\n}\n\nfunction ListBoxInner<T>(input: {\n props: ListBoxProps<T> & SelectableCollectionContextValue<unknown>;\n state: ListState<unknown>;\n listRef: (element: HTMLDivElement) => void;\n}): JSX.Element {\n const [props, ref, setRef] = createContextProps(\n untrack(() => input.props),\n untrack(() => input.listRef),\n SelectableCollectionContext\n );\n\n const renderer = useContext(CollectionRendererContext);\n\n const filtered = createMemo(() =>\n props.filter && input.state.collection.filter\n ? input.state.collection.filter(props.filter)\n : input.state.collection\n );\n\n const state: ListState<unknown> = {\n get collection() {\n return filtered();\n },\n get disabledKeys() {\n return input.state.disabledKeys;\n },\n get selectionManager() {\n return input.state.selectionManager.withCollection(filtered());\n },\n };\n\n const locale = createLocale();\n const collator = createCollator({ sensitivity: \"base\", usage: \"search\" });\n\n const keyboardDelegate = createMemo(\n () =>\n new ListKeyboardDelegate({\n collator,\n collection: state.collection,\n direction: locale.direction,\n disabledBehavior: state.selectionManager.disabledBehavior,\n disabledKeys: state.disabledKeys,\n layout: props.layout ?? \"stack\",\n layoutDelegate: renderer.layoutDelegate,\n orientation: props.orientation ?? \"vertical\",\n ref,\n })\n );\n\n const dnd = createCollectionDragAndDrop<T>({\n get collection() {\n // SAFETY: This state was constructed from the same ListBox<T> collection passed to the drag adapter.\n // oxlint-disable-next-line typescript/no-unsafe-type-assertion -- The shared selection context erases T between the owner and its descendants.\n return state.collection as SharedCollection<Node<T>>;\n },\n get direction() {\n return locale.direction;\n },\n get dropTargetDelegate() {\n return renderer.dropTargetDelegate;\n },\n get hooks() {\n return props.dragAndDropHooks;\n },\n get keyboardDelegate() {\n return keyboardDelegate();\n },\n get layout() {\n return props.layout;\n },\n get orientation() {\n return props.orientation;\n },\n ref,\n get selectionManager() {\n return state.selectionManager;\n },\n });\n\n const aria = createListBox(\n mergeProps(props, {\n get isVirtualized() {\n return renderer.isVirtualized;\n },\n get keyboardDelegate() {\n return keyboardDelegate();\n },\n }),\n state,\n ref\n );\n\n const focus = createFocusRing();\n\n const values: ListBoxRenderProps = {\n get isDropTarget() {\n return dnd.dropState?.isDropTarget({ type: \"root\" }) === true;\n },\n get isEmpty() {\n return state.collection.size === 0;\n },\n get isFocusVisible() {\n return focus.isFocusVisible;\n },\n get isFocused() {\n return focus.isFocused;\n },\n get layout() {\n return props.layout ?? \"stack\";\n },\n get orientation() {\n return props.orientation ?? \"vertical\";\n },\n state,\n };\n\n const render = createRenderProps(\n mergeProps(props, {\n children: undefined,\n defaultClass: \"solid2-aria-ListBox\",\n values,\n })\n );\n\n const Root = renderer.CollectionRoot;\n\n return (\n <dom.div\n {...mergeProps(\n filterDOMProps(props, { global: true }),\n merge(() => aria.listBoxProps ?? {}),\n merge(() => dnd.collectionProps ?? {}),\n merge(() => focus.focusProps ?? {}),\n render\n )}\n ref={(element: HTMLDivElement) => {\n setRef(element);\n }}\n slot={props.slot ?? undefined}\n data-drop-target={values.isDropTarget || undefined}\n data-empty={values.isEmpty || undefined}\n data-focused={focus.isFocused || undefined}\n data-focus-visible={focus.isFocusVisible || undefined}\n data-layout={values.layout}\n data-orientation={values.orientation}\n >\n <ListBoxContext value={props}>\n <ListStateContext value={state}>\n <SectionContext\n value={{\n name: \"ListBoxSection\",\n render: (sectionProps, sectionRef, sectionNode, defaultClass) => (\n <ListBoxSectionContent\n props={sectionProps}\n sectionRef={sectionRef}\n node={sectionNode}\n defaultClass={defaultClass}\n />\n ),\n }}\n >\n <DragAndDropContext value={dnd}>\n <DropIndicatorContext\n value={{\n render: (indicatorProps, indicatorRef) => (\n <ListBoxDropIndicator\n {...indicatorProps}\n ref={indicatorRef}\n />\n ),\n }}\n >\n <Root\n collection={state.collection}\n scrollRef={ref}\n persistedKeys={createDndPersistedKeys(\n state.selectionManager,\n props.dragAndDropHooks,\n dnd.dropState\n )}\n renderDropIndicator={createRenderDropIndicator(\n props.dragAndDropHooks,\n dnd.dropState\n )}\n />\n </DropIndicatorContext>\n </DragAndDropContext>\n </SectionContext>\n </ListStateContext>\n </ListBoxContext>\n {dnd.preview}\n {values.isEmpty && props.renderEmptyState ? (\n <div role=\"option\" style={{ display: \"contents\" }}>\n {props.renderEmptyState(values)}\n </div>\n ) : null}\n </dom.div>\n );\n}\n\nfunction ListBoxSectionInner(\n // oxlint-disable-next-line typescript/no-explicit-any -- Collection contexts erase item types; each typed factory restores its owner's item contract.\n props: ListBoxSectionProps<any>,\n ref: Ref<HTMLElement>,\n section: Node<unknown>,\n defaultClass = \"solid2-aria-ListBoxSection\"\n): JSX.Element {\n const state = useContext(ListStateContext);\n\n if (!state) {\n throw new Error(\"ListBoxSection must be rendered in a ListBox.\");\n }\n\n const renderer = useContext(CollectionRendererContext);\n const Branch = renderer.CollectionBranch;\n const [registerHeading, heading] = createSlot();\n\n const aria = createListBoxSection({\n get \"aria-label\"() {\n return props[\"aria-label\"] ?? undefined;\n },\n get heading() {\n return heading();\n },\n });\n\n return (\n <dom.section\n {...mergeProps(\n omit(filterDOMProps(props, { global: true }), \"id\"),\n merge(() => aria.groupProps ?? {})\n )}\n class={props.class ?? defaultClass}\n style={props.style}\n render={props.render}\n ref={ref}\n >\n <HeaderContext\n value={mergeProps(\n merge(() => aria.headingProps ?? {}),\n { registerSlot: registerHeading }\n )}\n >\n <Branch collection={state.collection} parent={section} />\n </HeaderContext>\n </dom.section>\n );\n}\n\nconst ListBoxSectionCollection = createBranchComponent(\n SectionNode,\n ListBoxSectionInner\n);\n\nconst ListBoxItemCollection = createLeafComponent(\n ItemNode,\n <T,>(\n props: ListBoxItemProps<T>,\n forwardedRef: Ref<HTMLDivElement>,\n item: Node<T>\n ): JSX.Element => {\n const state = useContext(ListStateContext);\n\n if (!state) {\n throw new Error(\"ListBoxItem must be rendered in a ListBox.\");\n }\n\n const [ref, setRef] = createSignal<HTMLDivElement | null>(null, {\n ownedWrite: true,\n });\n\n const aria = createOption(\n {\n get \"aria-label\"() {\n return props[\"aria-label\"];\n },\n key: item.key,\n },\n state,\n ref\n );\n\n const hover = createHover(\n mergeProps(props, {\n get isDisabled() {\n return aria.isDisabled;\n },\n })\n );\n\n const dnd = useContext(DragAndDropContext);\n\n const drag = dnd.dragState\n ? dnd.dragAndDropHooks?.createDraggableItem?.(\n { hasAction: aria.hasAction, key: item.key },\n dnd.dragState\n )\n : undefined;\n\n const drop = dnd.dropState\n ? dnd.dragAndDropHooks?.createDroppableItem?.(\n { target: { dropPosition: \"on\", key: item.key, type: \"item\" } },\n dnd.dropState,\n ref\n )\n : undefined;\n\n const keyboard = createKeyboard(props);\n const focus = createFocus(props);\n\n const values: ListBoxItemRenderProps = {\n get allowsDragging() {\n return !!dnd.dragState;\n },\n get isDisabled() {\n return aria.isDisabled;\n },\n get isDragging() {\n return dnd.dragState?.isDragging(item.key) === true;\n },\n get isDropTarget() {\n return drop?.isDropTarget === true;\n },\n get isFocusVisible() {\n return aria.isFocusVisible;\n },\n get isFocused() {\n return aria.isFocused;\n },\n get isHovered() {\n return hover.isHovered;\n },\n get isPressed() {\n return aria.isPressed;\n },\n get isSelected() {\n return aria.isSelected;\n },\n get selectionBehavior() {\n return state.selectionManager.selectionBehavior;\n },\n get selectionMode() {\n return state.selectionManager.selectionMode;\n },\n };\n\n const render = createRenderProps(\n mergeProps(props, { defaultClass: \"solid2-aria-ListBoxItem\", values })\n );\n\n const Element = dynamic(() => (isTruthy(props.href) ? dom.a : dom.div));\n\n return (\n <Element\n {...mergeProps(\n omit(filterDOMProps(props, { global: true }), \"id\", \"onClick\"),\n render,\n merge(() => aria.optionProps ?? {}),\n merge(() => hover.hoverProps ?? {}),\n merge(() => keyboard.keyboardProps ?? {}),\n merge(() => focus.focusProps ?? {}),\n merge(() => drag?.dragProps ?? {}),\n merge(() => drop?.dropProps ?? {})\n )}\n ref={[\n (element: HTMLDivElement) => {\n setRef(element);\n },\n (element: HTMLDivElement) => {\n assignRef(forwardedRef, element);\n },\n ]}\n data-allows-dragging={values.allowsDragging ?? undefined}\n data-dragging={values.isDragging ?? undefined}\n data-drop-target={values.isDropTarget ?? undefined}\n data-selected={aria.isSelected || undefined}\n data-disabled={aria.isDisabled || undefined}\n data-hovered={hover.isHovered || undefined}\n data-focused={aria.isFocused || undefined}\n data-focus-visible={aria.isFocusVisible || undefined}\n data-pressed={aria.isPressed || undefined}\n data-selection-mode={\n state.selectionManager.selectionMode === \"none\"\n ? undefined\n : state.selectionManager.selectionMode\n }\n >\n <TextContext\n value={{\n slots: {\n get [DEFAULT_SLOT]() {\n return aria.labelProps;\n },\n get description() {\n return aria.descriptionProps;\n },\n get label() {\n return aria.labelProps;\n },\n },\n }}\n >\n <SelectionIndicatorContext\n value={{\n get isSelected() {\n return aria.isSelected;\n },\n }}\n >\n {render.children}\n </SelectionIndicatorContext>\n </TextContext>\n </Element>\n );\n }\n);\n\nconst ListBoxLoadMoreItemCollection = createLeafComponent(\n LoaderNode,\n (\n props: ListBoxLoadMoreItemProps,\n forwardedRef: Ref<HTMLDivElement>,\n _node: Node<unknown>\n ): JSX.Element => {\n const state = useContext(ListStateContext);\n\n if (!state) {\n throw new Error(\"ListBoxLoadMoreItem must be rendered in a ListBox.\");\n }\n\n const [sentinel, setSentinel] = createSignal<HTMLDivElement | null>(null, {\n ownedWrite: true,\n });\n\n createLoadMoreSentinel(\n mergeProps(props, {\n get collection() {\n return state.collection;\n },\n }),\n sentinel\n );\n\n const render = createRenderProps(\n mergeProps(props, {\n defaultClass: \"solid2-aria-ListBoxLoadingIndicator\",\n values: undefined,\n })\n );\n\n return (\n <>\n <div style={{ height: 0, position: \"relative\", width: 0 }} inert>\n <div\n data-testid=\"loadMoreSentinel\"\n ref={(element: HTMLDivElement) => {\n setSentinel(element);\n }}\n style={{ height: \"1px\", position: \"absolute\", width: \"1px\" }}\n />\n </div>\n <Show when={props.isLoading}>\n <dom.div\n {...filterDOMProps(props, { global: true })}\n {...render}\n role=\"option\"\n tabindex={-1}\n ref={(element: HTMLDivElement) => {\n assignRef(forwardedRef, element);\n }}\n >\n {render.children}\n </dom.div>\n </Show>\n </>\n );\n }\n);\n\nfunction ListBoxSectionContent(input: {\n props: SectionProps<unknown>;\n sectionRef: Ref<HTMLElement>;\n node: Node<unknown>;\n defaultClass?: string;\n}): JSX.Element {\n return ListBoxSectionInner(\n input.props,\n input.sectionRef,\n input.node,\n input.defaultClass\n );\n}\n\nexport function ListBoxItem<T>(\n props: ListBoxItemProps<T> & { ref?: Ref<HTMLDivElement> }\n): JSX.Element {\n return (\n <ListBoxItemCollection\n {...props}\n ref={(element: HTMLDivElement) => {\n assignRef(\n untrack(() => props.ref),\n element\n );\n }}\n />\n );\n}\n\nexport function ListBoxSection<T>(\n props: ListBoxSectionProps<T> & { ref?: Ref<HTMLElement> }\n): JSX.Element {\n return (\n <ListBoxSectionCollection\n {...props}\n ref={(element: HTMLElement) => {\n assignRef(\n untrack(() => props.ref),\n element\n );\n }}\n />\n );\n}\n\nexport function ListBoxLoadMoreItem(\n props: ListBoxLoadMoreItemProps & { ref?: Ref<HTMLDivElement> }\n): JSX.Element {\n return (\n <ListBoxLoadMoreItemCollection\n {...props}\n ref={(element: HTMLDivElement) => {\n assignRef(\n untrack(() => props.ref),\n element\n );\n }}\n />\n );\n}\n\nfunction ListBoxDropIndicator(props: DropIndicatorProps): JSX.Element {\n const context = useContext(DragAndDropContext);\n\n const [ref, setRef] = createSignal<HTMLElement | null>(null, {\n ownedWrite: true,\n });\n\n if (!context.dragAndDropHooks?.createDropIndicator || !context.dropState) {\n // oxlint-disable-next-line solid/components-return-once -- Static collection traversal and context registration are fixed when the owner is created.\n return null;\n }\n\n const aria = context.dragAndDropHooks.createDropIndicator(\n props,\n context.dropState,\n ref\n );\n\n const render = createRenderProps(\n mergeProps(props, {\n defaultClass: \"solid2-aria-DropIndicator\",\n values: {\n get isDropTarget() {\n return aria.isDropTarget;\n },\n },\n })\n );\n\n return (\n <Show when={!aria.isHidden}>\n <dom.div\n {...aria.dropIndicatorProps}\n {...render}\n role=\"option\"\n ref={[\n (element: HTMLElement) => {\n setRef(element);\n },\n (element: HTMLElement) => {\n assignRef(\n untrack(() => props.ref),\n element\n );\n },\n ]}\n data-drop-target={aria.isDropTarget || undefined}\n />\n </Show>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiHA,MAAa,iBAEX,cAA+D,IAAI;AAErE,MAAa,mBAAmB,cAAyC,IAAI;AAgK7E,SAAgB,QACd,OACa;CACb,MAAM,CAAC,SAAS,UAAU,mBACxB,OACA,cAAc,MAAM,GAAG,GACvB,cACF;CAEA,MAAM,QAAQ,WAAW,gBAAgB;CAEzC,IAAI,OAEF,OAAOA,gBAAAA,cAAAA;EAAqB;EAAc;EAAOC,SAAS;CAAS,CAAA;CAGrE,OACEC,gBAAAA,mBAAAA;EACEC,wBAAwB,IAAI,eAAuB;EACnD,IAAA,UAAA;GAASC,OAAAA,gBAAAA,YAAgB,KAAQ;EAAC;EAFpCF,WAII,eACAG,gBAAAA,mBAAAA;GACS;GACK;GACZJ,SAAS;EACV,CAAA;CAEc,CAAA;AAEvB;AAEA,SAAS,kBAAoC,OAI7B;CACd,MAAM,QAAQ,gBACZyD,aACE,YAAY,MAAM,SAAS,CAAC,CAAC,GAC7B;EACE,UAAU;EACV,IAAI,aAAa;GACf,OAAO,MAAM;E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E;IAAI,OAAA,KAAK;GAAkB,GACvB,QAFN;IAGET,MAAK;IACLU,KAAK,EACF,YAAyB;KACxB,OAAO,OAAO;IAChB,IACC,YAAyB;KACxB,UACE,cAAc,MAAM,GAAG,GACvB,OACF;IACF,CACF;IACA,IAAA,qBAAA;KAAkB,OAAA,KAAK,gBAAgB,KAAA;IAAS;GACjD,CAAA,CAAA;EACG;;AAEV"}
|
|
1
|
+
{"version":3,"file":"list-box.js","names":["<ListBoxInner props={props} state={state} listRef={setRef} />","listRef={setRef}","<CollectionBuilder\n createCollection={() => new BaseCollection<object>()}\n content={<Collection {...props} />}\n >\n {(collection) => (\n <StandaloneListBox\n props={props}\n collection={collection}\n listRef={setRef}\n />\n )}\n </CollectionBuilder>","createCollection={() => new BaseCollection<object>()}","<Collection {...props} />","<StandaloneListBox\n props={props}\n collection={collection}\n listRef={setRef}\n />","<ListBoxInner props={input.props} state={state} listRef={input.listRef} />","<dom.div\n {...mergeProps(\n filterDOMProps(props, { global: true }),\n merge(() => aria.listBoxProps ?? {}),\n merge(() => dnd.collectionProps ?? {}),\n merge(() => focus.focusProps ?? {}),\n render\n )}\n ref={(element: HTMLDivElement) => {\n setRef(element);\n }}\n slot={props.slot ?? undefined}\n data-drop-target={values.isDropTarget || undefined}\n data-empty={values.isEmpty || undefined}\n data-focused={focus.isFocused || undefined}\n data-focus-visible={focus.isFocusVisible || undefined}\n data-layout={values.layout}\n data-orientation={values.orientation}\n >\n <ListBoxContext value={props}>\n <ListStateContext value={state}>\n <SectionContext\n value={{\n name: \"ListBoxSection\",\n render: (sectionProps, sectionRef, sectionNode, defaultClass) => (\n <ListBoxSectionContent\n props={sectionProps}\n sectionRef={sectionRef}\n node={sectionNode}\n defaultClass={defaultClass}\n />\n ),\n }}\n >\n <DragAndDropContext value={dnd}>\n <DropIndicatorContext\n value={{\n render: (indicatorProps, indicatorRef) => (\n <ListBoxDropIndicator\n {...indicatorProps}\n ref={indicatorRef}\n />\n ),\n }}\n >\n <Root\n collection={state.collection}\n scrollRef={ref}\n persistedKeys={createDndPersistedKeys(\n state.selectionManager,\n props.dragAndDropHooks,\n dnd.dropState\n )}\n renderDropIndicator={createRenderDropIndicator(\n props.dragAndDropHooks,\n dnd.dropState\n )}\n />\n </DropIndicatorContext>\n </DragAndDropContext>\n </SectionContext>\n </ListStateContext>\n </ListBoxContext>\n {dnd.preview}\n {values.isEmpty && props.renderEmptyState ? (\n <div role=\"option\" style={{ display: \"contents\" }}>\n {props.renderEmptyState(values)}\n </div>\n ) : null}\n </dom.div>","dom.div","ref={(element: HTMLDivElement) => {\n setRef(element);\n }}","<ListBoxContext value={props}>\n <ListStateContext value={state}>\n <SectionContext\n value={{\n name: \"ListBoxSection\",\n render: (sectionProps, sectionRef, sectionNode, defaultClass) => (\n <ListBoxSectionContent\n props={sectionProps}\n sectionRef={sectionRef}\n node={sectionNode}\n defaultClass={defaultClass}\n />\n ),\n }}\n >\n <DragAndDropContext value={dnd}>\n <DropIndicatorContext\n value={{\n render: (indicatorProps, indicatorRef) => (\n <ListBoxDropIndicator\n {...indicatorProps}\n ref={indicatorRef}\n />\n ),\n }}\n >\n <Root\n collection={state.collection}\n scrollRef={ref}\n persistedKeys={createDndPersistedKeys(\n state.selectionManager,\n props.dragAndDropHooks,\n dnd.dropState\n )}\n renderDropIndicator={createRenderDropIndicator(\n props.dragAndDropHooks,\n dnd.dropState\n )}\n />\n </DropIndicatorContext>\n </DragAndDropContext>\n </SectionContext>\n </ListStateContext>\n </ListBoxContext>","value={props}","<ListStateContext value={state}>\n <SectionContext\n value={{\n name: \"ListBoxSection\",\n render: (sectionProps, sectionRef, sectionNode, defaultClass) => (\n <ListBoxSectionContent\n props={sectionProps}\n sectionRef={sectionRef}\n node={sectionNode}\n defaultClass={defaultClass}\n />\n ),\n }}\n >\n <DragAndDropContext value={dnd}>\n <DropIndicatorContext\n value={{\n render: (indicatorProps, indicatorRef) => (\n <ListBoxDropIndicator\n {...indicatorProps}\n ref={indicatorRef}\n />\n ),\n }}\n >\n <Root\n collection={state.collection}\n scrollRef={ref}\n persistedKeys={createDndPersistedKeys(\n state.selectionManager,\n props.dragAndDropHooks,\n dnd.dropState\n )}\n renderDropIndicator={createRenderDropIndicator(\n props.dragAndDropHooks,\n dnd.dropState\n )}\n />\n </DropIndicatorContext>\n </DragAndDropContext>\n </SectionContext>\n </ListStateContext>","value={state}","<SectionContext\n value={{\n name: \"ListBoxSection\",\n render: (sectionProps, sectionRef, sectionNode, defaultClass) => (\n <ListBoxSectionContent\n props={sectionProps}\n sectionRef={sectionRef}\n node={sectionNode}\n defaultClass={defaultClass}\n />\n ),\n }}\n >\n <DragAndDropContext value={dnd}>\n <DropIndicatorContext\n value={{\n render: (indicatorProps, indicatorRef) => (\n <ListBoxDropIndicator\n {...indicatorProps}\n ref={indicatorRef}\n />\n ),\n }}\n >\n <Root\n collection={state.collection}\n scrollRef={ref}\n persistedKeys={createDndPersistedKeys(\n state.selectionManager,\n props.dragAndDropHooks,\n dnd.dropState\n )}\n renderDropIndicator={createRenderDropIndicator(\n props.dragAndDropHooks,\n dnd.dropState\n )}\n />\n </DropIndicatorContext>\n </DragAndDropContext>\n </SectionContext>","value={{\n name: \"ListBoxSection\",\n render: (sectionProps, sectionRef, sectionNode, defaultClass) => (\n <ListBoxSectionContent\n props={sectionProps}\n sectionRef={sectionRef}\n node={sectionNode}\n defaultClass={defaultClass}\n />\n ),\n }}","<ListBoxSectionContent\n props={sectionProps}\n sectionRef={sectionRef}\n node={sectionNode}\n defaultClass={defaultClass}\n />","props={sectionProps}","node={sectionNode}","<DragAndDropContext value={dnd}>\n <DropIndicatorContext\n value={{\n render: (indicatorProps, indicatorRef) => (\n <ListBoxDropIndicator\n {...indicatorProps}\n ref={indicatorRef}\n />\n ),\n }}\n >\n <Root\n collection={state.collection}\n scrollRef={ref}\n persistedKeys={createDndPersistedKeys(\n state.selectionManager,\n props.dragAndDropHooks,\n dnd.dropState\n )}\n renderDropIndicator={createRenderDropIndicator(\n props.dragAndDropHooks,\n dnd.dropState\n )}\n />\n </DropIndicatorContext>\n </DragAndDropContext>","value={dnd}","<DropIndicatorContext\n value={{\n render: (indicatorProps, indicatorRef) => (\n <ListBoxDropIndicator\n {...indicatorProps}\n ref={indicatorRef}\n />\n ),\n }}\n >\n <Root\n collection={state.collection}\n scrollRef={ref}\n persistedKeys={createDndPersistedKeys(\n state.selectionManager,\n props.dragAndDropHooks,\n dnd.dropState\n )}\n renderDropIndicator={createRenderDropIndicator(\n props.dragAndDropHooks,\n dnd.dropState\n )}\n />\n </DropIndicatorContext>","value={{\n render: (indicatorProps, indicatorRef) => (\n <ListBoxDropIndicator\n {...indicatorProps}\n ref={indicatorRef}\n />\n ),\n }}","<ListBoxDropIndicator\n {...indicatorProps}\n ref={indicatorRef}\n />","ref={indicatorRef}","<Root\n collection={state.collection}\n scrollRef={ref}\n persistedKeys={createDndPersistedKeys(\n state.selectionManager,\n props.dragAndDropHooks,\n dnd.dropState\n )}\n renderDropIndicator={createRenderDropIndicator(\n props.dragAndDropHooks,\n dnd.dropState\n )}\n />","scrollRef={ref}","dnd.preview","{values.isEmpty && props.renderEmptyState ? (\n <div role=\"option\" style={{ display: \"contents\" }}>\n {props.renderEmptyState(values)}\n </div>\n ) : null}","{props.renderEmptyState(values)}","<dom.section\n {...mergeProps(\n omit(filterDOMProps(props, { global: true }), \"id\"),\n merge(() => aria.groupProps ?? {})\n )}\n class={props.class ?? defaultClass}\n style={props.style}\n render={props.render}\n ref={ref}\n >\n <HeaderContext\n value={mergeProps(\n merge(() => aria.headingProps ?? {}),\n { registerSlot: registerHeading }\n )}\n >\n <Branch collection={state.collection} parent={section} />\n </HeaderContext>\n </dom.section>","dom.section","ref={ref}","<HeaderContext\n value={mergeProps(\n merge(() => aria.headingProps ?? {}),\n { registerSlot: registerHeading }\n )}\n >\n <Branch collection={state.collection} parent={section} />\n </HeaderContext>","<Branch collection={state.collection} parent={section} />","parent={section}","<Element\n {...mergeProps(\n omit(filterDOMProps(props, { global: true }), \"id\", \"onClick\"),\n render,\n merge(() => aria.optionProps ?? {}),\n merge(() => hover.hoverProps ?? {}),\n merge(() => keyboard.keyboardProps ?? {}),\n merge(() => focus.focusProps ?? {}),\n merge(() => drag?.dragProps ?? {}),\n merge(() => drop?.dropProps ?? {})\n )}\n ref={[\n (element: HTMLDivElement) => {\n setRef(element);\n },\n (element: HTMLDivElement) => {\n assignRef(forwardedRef, element);\n },\n ]}\n data-allows-dragging={values.allowsDragging ?? undefined}\n data-dragging={values.isDragging ?? undefined}\n data-drop-target={values.isDropTarget ?? undefined}\n data-selected={aria.isSelected || undefined}\n data-disabled={aria.isDisabled || undefined}\n data-hovered={hover.isHovered || undefined}\n data-focused={aria.isFocused || undefined}\n data-focus-visible={aria.isFocusVisible || undefined}\n data-pressed={aria.isPressed || undefined}\n data-selection-mode={\n state.selectionManager.selectionMode === \"none\"\n ? undefined\n : state.selectionManager.selectionMode\n }\n >\n <TextContext\n value={{\n slots: {\n get [DEFAULT_SLOT]() {\n return aria.labelProps;\n },\n get description() {\n return aria.descriptionProps;\n },\n get label() {\n return aria.labelProps;\n },\n },\n }}\n >\n <SelectionIndicatorContext\n value={{\n get isSelected() {\n return aria.isSelected;\n },\n }}\n >\n {render.children}\n </SelectionIndicatorContext>\n </TextContext>\n </Element>","ref={[\n (element: HTMLDivElement) => {\n setRef(element);\n },\n (element: HTMLDivElement) => {\n assignRef(forwardedRef, element);\n },\n ]}","state.selectionManager.selectionMode === \"none\"\n ? undefined\n : state.selectionManager.selectionMode","<TextContext\n value={{\n slots: {\n get [DEFAULT_SLOT]() {\n return aria.labelProps;\n },\n get description() {\n return aria.descriptionProps;\n },\n get label() {\n return aria.labelProps;\n },\n },\n }}\n >\n <SelectionIndicatorContext\n value={{\n get isSelected() {\n return aria.isSelected;\n },\n }}\n >\n {render.children}\n </SelectionIndicatorContext>\n </TextContext>","value={{\n slots: {\n get [DEFAULT_SLOT]() {\n return aria.labelProps;\n },\n get description() {\n return aria.descriptionProps;\n },\n get label() {\n return aria.labelProps;\n },\n },\n }}","<SelectionIndicatorContext\n value={{\n get isSelected() {\n return aria.isSelected;\n },\n }}\n >\n {render.children}\n </SelectionIndicatorContext>","value={{\n get isSelected() {\n return aria.isSelected;\n },\n }}","ref={(element: HTMLDivElement) => {\n setSentinel(element);\n }}","<Show when={props.isLoading}>\n <dom.div\n {...filterDOMProps(props, { global: true })}\n {...render}\n role=\"option\"\n tabindex={-1}\n ref={(element: HTMLDivElement) => {\n assignRef(forwardedRef, element);\n }}\n >\n {render.children}\n </dom.div>\n </Show>","<dom.div\n {...filterDOMProps(props, { global: true })}\n {...render}\n role=\"option\"\n tabindex={-1}\n ref={(element: HTMLDivElement) => {\n assignRef(forwardedRef, element);\n }}\n >\n {render.children}\n </dom.div>","role=\"option\"","tabindex={-1}","ref={(element: HTMLDivElement) => {\n assignRef(forwardedRef, element);\n }}","<ListBoxItemCollection\n {...props}\n ref={(element: HTMLDivElement) => {\n assignRef(\n untrack(() => props.ref),\n element\n );\n }}\n />","ref={(element: HTMLDivElement) => {\n assignRef(\n untrack(() => props.ref),\n element\n );\n }}","<ListBoxSectionCollection\n {...props}\n ref={(element: HTMLElement) => {\n assignRef(\n untrack(() => props.ref),\n element\n );\n }}\n />","ref={(element: HTMLElement) => {\n assignRef(\n untrack(() => props.ref),\n element\n );\n }}","<ListBoxLoadMoreItemCollection\n {...props}\n ref={(element: HTMLDivElement) => {\n assignRef(\n untrack(() => props.ref),\n element\n );\n }}\n />","<Show when={!aria.isHidden}>\n <dom.div\n {...aria.dropIndicatorProps}\n {...render}\n role=\"option\"\n ref={[\n (element: HTMLElement) => {\n setRef(element);\n },\n (element: HTMLElement) => {\n assignRef(\n untrack(() => props.ref),\n element\n );\n },\n ]}\n data-drop-target={aria.isDropTarget || undefined}\n />\n </Show>","<dom.div\n {...aria.dropIndicatorProps}\n {...render}\n role=\"option\"\n ref={[\n (element: HTMLElement) => {\n setRef(element);\n },\n (element: HTMLElement) => {\n assignRef(\n untrack(() => props.ref),\n element\n );\n },\n ]}\n data-drop-target={aria.isDropTarget || undefined}\n />","ref={[\n (element: HTMLElement) => {\n setRef(element);\n },\n (element: HTMLElement) => {\n assignRef(\n untrack(() => props.ref),\n element\n );\n },\n ]}","_$createComponent","mergeProps","_$mergeProps","_$applyRef","_$memo","_$getNextElement","_$scope"],"sources":["../../src/list-box.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/*\n * Derived from Adobe React Spectrum: packages/react-aria-components/src/ListBox.tsx.\n * Modified for Solid Aria: adapted collection ownership, contexts, accessibility primitives, and reactive properties for Solid 2; uses Solid class props.\n * Licensed under Apache-2.0. See LICENSES/Apache-2.0.txt and NOTICE.txt at the repository root.\n */\n\nimport {\n ItemNode,\n SectionNode,\n LoaderNode,\n BaseCollection,\n} from \"@solid2-aria/core/collections/base-collection\";\nimport {\n Collection,\n CollectionBuilder,\n createLeafComponent,\n createBranchComponent,\n} from \"@solid2-aria/core/collections/collection-builder\";\nimport { createFocusRing } from \"@solid2-aria/core/focus/create-focus-ring\";\nimport { createCollator } from \"@solid2-aria/core/i18n/create-collator\";\nimport { createLocale } from \"@solid2-aria/core/i18n/i18n-provider\";\nimport { createFocus } from \"@solid2-aria/core/interactions/create-focus\";\nimport { createHover } from \"@solid2-aria/core/interactions/create-hover\";\nimport { createKeyboard } from \"@solid2-aria/core/interactions/create-keyboard\";\nimport { createListBox } from \"@solid2-aria/core/listbox/create-list-box\";\nimport type { AriaListBoxProps } from \"@solid2-aria/core/listbox/create-list-box\";\nimport { createListBoxSection } from \"@solid2-aria/core/listbox/create-list-box-section\";\nimport { createOption } from \"@solid2-aria/core/listbox/create-option\";\nimport { ListKeyboardDelegate } from \"@solid2-aria/core/selection/list-keyboard-delegate\";\nimport { createLoadMoreSentinel } from \"@solid2-aria/core/utils/create-load-more-sentinel\";\nimport type { LoadMoreSentinelProps } from \"@solid2-aria/core/utils/create-load-more-sentinel\";\nimport { filterDOMProps } from \"@solid2-aria/core/utils/filter-dom-props\";\nimport { mergeProps } from \"@solid2-aria/core/utils/merge-props\";\nimport { isTruthy } from \"@solid2-aria/core/utils/truthy\";\nimport { createListState } from \"@solid2-aria/stately/list/create-list-state\";\nimport type { ListState } from \"@solid2-aria/stately/list/create-list-state\";\nimport type {\n Collection as SharedCollection,\n FocusEvents,\n HoverEvents,\n Key,\n KeyboardEvents,\n LinkDOMProps,\n PressEvents,\n Orientation,\n SelectionBehavior,\n Node,\n} from \"@solid2-aria/types-shared\";\nimport type { GlobalDOMAttributes } from \"@solid2-aria/types-shared-web\";\nimport { dynamic } from \"@solidjs/web\";\nimport type { JSX } from \"@solidjs/web\";\nimport {\n merge,\n untrack,\n createSignal,\n createContext,\n createMemo,\n useContext,\n omit,\n Show,\n} from \"solid-js\";\n\nimport { SelectableCollectionContext } from \"./autocomplete\";\nimport type { SelectableCollectionContextValue } from \"./autocomplete\";\nimport { CollectionRendererContext, SectionContext } from \"./collection\";\nimport type {\n CollectionProps,\n ItemRenderProps,\n SectionProps,\n} from \"./collection\";\nimport { createCollectionDragAndDrop } from \"./collection-dnd\";\nimport type { DragAndDropHooks } from \"./create-drag-and-drop\";\nimport {\n DragAndDropContext,\n DropIndicatorContext,\n createRenderDropIndicator,\n createDndPersistedKeys,\n} from \"./drag-and-drop\";\nimport type { DropIndicatorProps } from \"./drag-and-drop\";\nimport { HeaderContext } from \"./header\";\nimport { SelectionIndicatorContext } from \"./selection-indicator\";\nimport { TextContext } from \"./text\";\nimport {\n dom,\n createContextProps,\n createRenderProps,\n createSlot,\n DEFAULT_SLOT,\n assignRef,\n} from \"./utils\";\nimport type {\n Ref,\n ClassOrFunction,\n DOMRenderProps,\n PossibleLinkDOMRenderProps,\n RenderProps,\n SlotProps,\n StyleProps,\n StyleRenderProps,\n ContextValue,\n} from \"./utils\";\n\nexport const ListBoxContext =\n // oxlint-disable-next-line typescript/no-explicit-any -- Collection contexts erase item types; each typed factory restores its owner's item contract.\n createContext<ContextValue<ListBoxProps<any>, HTMLDivElement>>(null);\n\nexport const ListStateContext = createContext<ListState<unknown> | null>(null);\n\nexport interface ListBoxRenderProps {\n /**\n * Whether the listbox has no items and should display its empty state.\n *\n * @selector [data-empty]\n */\n isEmpty: boolean;\n /**\n * Whether the listbox is currently focused.\n *\n * @selector [data-focused]\n */\n isFocused: boolean;\n /**\n * Whether the listbox is currently keyboard focused.\n *\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean;\n /**\n * Whether the listbox 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 listbox.\n */\n state: ListState<unknown>;\n}\n\nexport interface ListBoxProps<T>\n extends\n Omit<AriaListBoxProps<T>, \"children\" | \"label\">,\n CollectionProps<T>,\n StyleRenderProps<ListBoxRenderProps>,\n SlotProps,\n GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [class](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/class) for the\n * element. A function may be provided to compute the class based on component state.\n *\n * @default 'react-aria-ListBox'\n */\n class?: ClassOrFunction<ListBoxRenderProps>;\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 `createDragAndDrop` used to enable drag and drop behavior for\n * the ListBox.\n */\n dragAndDropHooks?: DragAndDropHooks<NoInfer<T>>;\n /** Provides content to display when there are no items in the list. */\n renderEmptyState?: (props: ListBoxRenderProps) => JSX.Element;\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\n * direction that the collection scrolls.\n *\n * @default 'vertical'\n */\n orientation?: Orientation;\n}\n\nexport interface ListBoxSectionProps<T>\n extends SectionProps<T>, DOMRenderProps<\"section\", undefined> {\n /**\n * The CSS [class](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/class) for the\n * element.\n *\n * @default 'react-aria-ListBoxSection'\n */\n class?: JSX.ClassValue;\n}\n\nexport type ListBoxItemRenderProps = ItemRenderProps;\n\nexport interface ListBoxItemProps<T = object>\n extends\n Omit<RenderProps<ListBoxItemRenderProps>, \"render\">,\n PossibleLinkDOMRenderProps<\"div\", ListBoxItemRenderProps>,\n LinkDOMProps,\n HoverEvents,\n PressEvents,\n KeyboardEvents,\n FocusEvents<HTMLDivElement>,\n Omit<GlobalDOMAttributes<HTMLDivElement>, \"onClick\"> {\n /**\n * The CSS [class](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/class) for the\n * element. A function may be provided to compute the class based on component state.\n *\n * @default 'react-aria-ListBoxItem'\n */\n class?: ClassOrFunction<ListBoxItemRenderProps>;\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 /** An accessibility label for this item. */\n \"aria-label\"?: 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\nexport interface ListBoxLoadMoreItemProps\n extends\n Omit<LoadMoreSentinelProps, \"collection\" | \"direction\">,\n StyleProps,\n DOMRenderProps<\"div\", undefined>,\n GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [class](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/class) for the\n * element.\n *\n * @default 'react-aria-ListBoxLoadingIndicator'\n */\n class?: JSX.ClassValue;\n /**\n * The load more spinner to render when loading additional items.\n */\n children?: JSX.Element;\n /**\n * Whether or not the loading spinner should be rendered or not.\n */\n isLoading?: boolean;\n}\n\nexport function ListBox<T extends object>(\n input: ListBoxProps<T> & { ref?: Ref<HTMLDivElement> }\n): JSX.Element {\n const [props, , setRef] = createContextProps(\n input,\n untrack(() => input.ref),\n ListBoxContext\n );\n\n const state = useContext(ListStateContext);\n\n if (state) {\n // oxlint-disable-next-line solid/components-return-once -- Static collection traversal and context registration are fixed when the owner is created.\n return <ListBoxInner props={props} state={state} listRef={setRef} />;\n }\n\n return (\n <CollectionBuilder\n createCollection={() => new BaseCollection<object>()}\n content={<Collection {...props} />}\n >\n {(collection) => (\n <StandaloneListBox\n props={props}\n collection={collection}\n listRef={setRef}\n />\n )}\n </CollectionBuilder>\n );\n}\n\nfunction StandaloneListBox<T extends object>(input: {\n props: ListBoxProps<T>;\n collection: BaseCollection<object>;\n listRef: (element: HTMLDivElement) => void;\n}): JSX.Element {\n const state = createListState(\n mergeProps(\n merge(() => input.props ?? {}),\n {\n children: null,\n get collection() {\n return input.collection;\n },\n items: undefined,\n }\n )\n );\n\n return (\n <ListBoxInner props={input.props} state={state} listRef={input.listRef} />\n );\n}\n\nfunction ListBoxInner<T>(input: {\n props: ListBoxProps<T> & SelectableCollectionContextValue<unknown>;\n state: ListState<unknown>;\n listRef: (element: HTMLDivElement) => void;\n}): JSX.Element {\n const [props, ref, setRef] = createContextProps(\n untrack(() => input.props),\n untrack(() => input.listRef),\n SelectableCollectionContext\n );\n\n const renderer = useContext(CollectionRendererContext);\n\n const filtered = createMemo(() =>\n props.filter && input.state.collection.filter\n ? input.state.collection.filter(props.filter)\n : input.state.collection\n );\n\n const state: ListState<unknown> = {\n get collection() {\n return filtered();\n },\n get disabledKeys() {\n return input.state.disabledKeys;\n },\n get selectionManager() {\n return input.state.selectionManager.withCollection(filtered());\n },\n };\n\n const locale = createLocale();\n const collator = createCollator({ sensitivity: \"base\", usage: \"search\" });\n\n const keyboardDelegate = createMemo(\n () =>\n new ListKeyboardDelegate({\n collator,\n collection: state.collection,\n direction: locale.direction,\n disabledBehavior: state.selectionManager.disabledBehavior,\n disabledKeys: state.disabledKeys,\n layout: props.layout ?? \"stack\",\n layoutDelegate: renderer.layoutDelegate,\n orientation: props.orientation ?? \"vertical\",\n ref,\n })\n );\n\n const dnd = createCollectionDragAndDrop<T>({\n get collection() {\n // SAFETY: This state was constructed from the same ListBox<T> collection passed to the drag adapter.\n // oxlint-disable-next-line typescript/no-unsafe-type-assertion -- The shared selection context erases T between the owner and its descendants.\n return state.collection as SharedCollection<Node<T>>;\n },\n get direction() {\n return locale.direction;\n },\n get dropTargetDelegate() {\n return renderer.dropTargetDelegate;\n },\n get hooks() {\n return props.dragAndDropHooks;\n },\n get keyboardDelegate() {\n return keyboardDelegate();\n },\n get layout() {\n return props.layout;\n },\n get orientation() {\n return props.orientation;\n },\n ref,\n get selectionManager() {\n return state.selectionManager;\n },\n });\n\n const aria = createListBox(\n mergeProps(props, {\n get isVirtualized() {\n return renderer.isVirtualized;\n },\n get keyboardDelegate() {\n return keyboardDelegate();\n },\n }),\n state,\n ref\n );\n\n const focus = createFocusRing();\n\n const values: ListBoxRenderProps = {\n get isDropTarget() {\n return dnd.dropState?.isDropTarget({ type: \"root\" }) === true;\n },\n get isEmpty() {\n return state.collection.size === 0;\n },\n get isFocusVisible() {\n return focus.isFocusVisible;\n },\n get isFocused() {\n return focus.isFocused;\n },\n get layout() {\n return props.layout ?? \"stack\";\n },\n get orientation() {\n return props.orientation ?? \"vertical\";\n },\n state,\n };\n\n const render = createRenderProps(\n mergeProps(props, {\n children: undefined,\n defaultClass: \"solid2-aria-ListBox\",\n values,\n })\n );\n\n const Root = renderer.CollectionRoot;\n\n return (\n <dom.div\n {...mergeProps(\n filterDOMProps(props, { global: true }),\n merge(() => aria.listBoxProps ?? {}),\n merge(() => dnd.collectionProps ?? {}),\n merge(() => focus.focusProps ?? {}),\n render\n )}\n ref={(element: HTMLDivElement) => {\n setRef(element);\n }}\n slot={props.slot ?? undefined}\n data-drop-target={values.isDropTarget || undefined}\n data-empty={values.isEmpty || undefined}\n data-focused={focus.isFocused || undefined}\n data-focus-visible={focus.isFocusVisible || undefined}\n data-layout={values.layout}\n data-orientation={values.orientation}\n >\n <ListBoxContext value={props}>\n <ListStateContext value={state}>\n <SectionContext\n value={{\n name: \"ListBoxSection\",\n render: (sectionProps, sectionRef, sectionNode, defaultClass) => (\n <ListBoxSectionContent\n props={sectionProps}\n sectionRef={sectionRef}\n node={sectionNode}\n defaultClass={defaultClass}\n />\n ),\n }}\n >\n <DragAndDropContext value={dnd}>\n <DropIndicatorContext\n value={{\n render: (indicatorProps, indicatorRef) => (\n <ListBoxDropIndicator\n {...indicatorProps}\n ref={indicatorRef}\n />\n ),\n }}\n >\n <Root\n collection={state.collection}\n scrollRef={ref}\n persistedKeys={createDndPersistedKeys(\n state.selectionManager,\n props.dragAndDropHooks,\n dnd.dropState\n )}\n renderDropIndicator={createRenderDropIndicator(\n props.dragAndDropHooks,\n dnd.dropState\n )}\n />\n </DropIndicatorContext>\n </DragAndDropContext>\n </SectionContext>\n </ListStateContext>\n </ListBoxContext>\n {dnd.preview}\n {values.isEmpty && props.renderEmptyState ? (\n <div role=\"option\" style={{ display: \"contents\" }}>\n {props.renderEmptyState(values)}\n </div>\n ) : null}\n </dom.div>\n );\n}\n\nfunction ListBoxSectionInner(\n // oxlint-disable-next-line typescript/no-explicit-any -- Collection contexts erase item types; each typed factory restores its owner's item contract.\n props: ListBoxSectionProps<any>,\n ref: Ref<HTMLElement>,\n section: Node<unknown>,\n defaultClass = \"solid2-aria-ListBoxSection\"\n): JSX.Element {\n const state = useContext(ListStateContext);\n\n if (!state) {\n throw new Error(\"ListBoxSection must be rendered in a ListBox.\");\n }\n\n const renderer = useContext(CollectionRendererContext);\n const Branch = renderer.CollectionBranch;\n const [registerHeading, heading] = createSlot();\n\n const aria = createListBoxSection({\n get \"aria-label\"() {\n return props[\"aria-label\"] ?? undefined;\n },\n get heading() {\n return heading();\n },\n });\n\n return (\n <dom.section\n {...mergeProps(\n omit(filterDOMProps(props, { global: true }), \"id\"),\n merge(() => aria.groupProps ?? {})\n )}\n class={props.class ?? defaultClass}\n style={props.style}\n render={props.render}\n ref={ref}\n >\n <HeaderContext\n value={mergeProps(\n merge(() => aria.headingProps ?? {}),\n { registerSlot: registerHeading }\n )}\n >\n <Branch collection={state.collection} parent={section} />\n </HeaderContext>\n </dom.section>\n );\n}\n\nconst ListBoxSectionCollection = createBranchComponent(\n SectionNode,\n ListBoxSectionInner\n);\n\nconst ListBoxItemCollection = createLeafComponent(\n ItemNode,\n <T,>(\n props: ListBoxItemProps<T>,\n forwardedRef: Ref<HTMLDivElement>,\n item: Node<T>\n ): JSX.Element => {\n const state = useContext(ListStateContext);\n\n if (!state) {\n throw new Error(\"ListBoxItem must be rendered in a ListBox.\");\n }\n\n const [ref, setRef] = createSignal<HTMLDivElement | null>(null, {\n ownedWrite: true,\n });\n\n const aria = createOption(\n {\n get \"aria-label\"() {\n return props[\"aria-label\"];\n },\n key: item.key,\n },\n state,\n ref\n );\n\n const hover = createHover(\n mergeProps(props, {\n get isDisabled() {\n return aria.isDisabled;\n },\n })\n );\n\n const dnd = useContext(DragAndDropContext);\n\n const drag = dnd.dragState\n ? dnd.dragAndDropHooks?.createDraggableItem?.(\n { hasAction: aria.hasAction, key: item.key },\n dnd.dragState\n )\n : undefined;\n\n const drop = dnd.dropState\n ? dnd.dragAndDropHooks?.createDroppableItem?.(\n { target: { dropPosition: \"on\", key: item.key, type: \"item\" } },\n dnd.dropState,\n ref\n )\n : undefined;\n\n const keyboard = createKeyboard(props);\n const focus = createFocus(props);\n\n const values: ListBoxItemRenderProps = {\n get allowsDragging() {\n return !!dnd.dragState;\n },\n get isDisabled() {\n return aria.isDisabled;\n },\n get isDragging() {\n return dnd.dragState?.isDragging(item.key) === true;\n },\n get isDropTarget() {\n return drop?.isDropTarget === true;\n },\n get isFocusVisible() {\n return aria.isFocusVisible;\n },\n get isFocused() {\n return aria.isFocused;\n },\n get isHovered() {\n return hover.isHovered;\n },\n get isPressed() {\n return aria.isPressed;\n },\n get isSelected() {\n return aria.isSelected;\n },\n get selectionBehavior() {\n return state.selectionManager.selectionBehavior;\n },\n get selectionMode() {\n return state.selectionManager.selectionMode;\n },\n };\n\n const render = createRenderProps(\n mergeProps(props, { defaultClass: \"solid2-aria-ListBoxItem\", values })\n );\n\n const Element = dynamic(() => (isTruthy(props.href) ? dom.a : dom.div));\n\n return (\n <Element\n {...mergeProps(\n omit(filterDOMProps(props, { global: true }), \"id\", \"onClick\"),\n render,\n merge(() => aria.optionProps ?? {}),\n merge(() => hover.hoverProps ?? {}),\n merge(() => keyboard.keyboardProps ?? {}),\n merge(() => focus.focusProps ?? {}),\n merge(() => drag?.dragProps ?? {}),\n merge(() => drop?.dropProps ?? {})\n )}\n ref={[\n (element: HTMLDivElement) => {\n setRef(element);\n },\n (element: HTMLDivElement) => {\n assignRef(forwardedRef, element);\n },\n ]}\n data-allows-dragging={values.allowsDragging ?? undefined}\n data-dragging={values.isDragging ?? undefined}\n data-drop-target={values.isDropTarget ?? undefined}\n data-selected={aria.isSelected || undefined}\n data-disabled={aria.isDisabled || undefined}\n data-hovered={hover.isHovered || undefined}\n data-focused={aria.isFocused || undefined}\n data-focus-visible={aria.isFocusVisible || undefined}\n data-pressed={aria.isPressed || undefined}\n data-selection-mode={\n state.selectionManager.selectionMode === \"none\"\n ? undefined\n : state.selectionManager.selectionMode\n }\n >\n <TextContext\n value={{\n slots: {\n get [DEFAULT_SLOT]() {\n return aria.labelProps;\n },\n get description() {\n return aria.descriptionProps;\n },\n get label() {\n return aria.labelProps;\n },\n },\n }}\n >\n <SelectionIndicatorContext\n value={{\n get isSelected() {\n return aria.isSelected;\n },\n }}\n >\n {render.children}\n </SelectionIndicatorContext>\n </TextContext>\n </Element>\n );\n }\n);\n\nconst ListBoxLoadMoreItemCollection = createLeafComponent(\n LoaderNode,\n (\n props: ListBoxLoadMoreItemProps,\n forwardedRef: Ref<HTMLDivElement>,\n _node: Node<unknown>\n ): JSX.Element => {\n const state = useContext(ListStateContext);\n\n if (!state) {\n throw new Error(\"ListBoxLoadMoreItem must be rendered in a ListBox.\");\n }\n\n const [sentinel, setSentinel] = createSignal<HTMLDivElement | null>(null, {\n ownedWrite: true,\n });\n\n createLoadMoreSentinel(\n mergeProps(props, {\n get collection() {\n return state.collection;\n },\n }),\n sentinel\n );\n\n const render = createRenderProps(\n mergeProps(props, {\n defaultClass: \"solid2-aria-ListBoxLoadingIndicator\",\n values: undefined,\n })\n );\n\n return (\n <>\n <div style={{ height: 0, position: \"relative\", width: 0 }} inert>\n <div\n data-testid=\"loadMoreSentinel\"\n ref={(element: HTMLDivElement) => {\n setSentinel(element);\n }}\n style={{ height: \"1px\", position: \"absolute\", width: \"1px\" }}\n />\n </div>\n <Show when={props.isLoading}>\n <dom.div\n {...filterDOMProps(props, { global: true })}\n {...render}\n role=\"option\"\n tabindex={-1}\n ref={(element: HTMLDivElement) => {\n assignRef(forwardedRef, element);\n }}\n >\n {render.children}\n </dom.div>\n </Show>\n </>\n );\n }\n);\n\nfunction ListBoxSectionContent(input: {\n props: SectionProps<unknown>;\n sectionRef: Ref<HTMLElement>;\n node: Node<unknown>;\n defaultClass?: string;\n}): JSX.Element {\n return ListBoxSectionInner(\n input.props,\n input.sectionRef,\n input.node,\n input.defaultClass\n );\n}\n\nexport function ListBoxItem<T>(\n props: ListBoxItemProps<T> & { ref?: Ref<HTMLDivElement> }\n): JSX.Element {\n return (\n <ListBoxItemCollection\n {...props}\n ref={(element: HTMLDivElement) => {\n assignRef(\n untrack(() => props.ref),\n element\n );\n }}\n />\n );\n}\n\nexport function ListBoxSection<T>(\n props: ListBoxSectionProps<T> & { ref?: Ref<HTMLElement> }\n): JSX.Element {\n return (\n <ListBoxSectionCollection\n {...props}\n ref={(element: HTMLElement) => {\n assignRef(\n untrack(() => props.ref),\n element\n );\n }}\n />\n );\n}\n\nexport function ListBoxLoadMoreItem(\n props: ListBoxLoadMoreItemProps & { ref?: Ref<HTMLDivElement> }\n): JSX.Element {\n return (\n <ListBoxLoadMoreItemCollection\n {...props}\n ref={(element: HTMLDivElement) => {\n assignRef(\n untrack(() => props.ref),\n element\n );\n }}\n />\n );\n}\n\nfunction ListBoxDropIndicator(props: DropIndicatorProps): JSX.Element {\n const context = useContext(DragAndDropContext);\n\n const [ref, setRef] = createSignal<HTMLElement | null>(null, {\n ownedWrite: true,\n });\n\n if (!context.dragAndDropHooks?.createDropIndicator || !context.dropState) {\n // oxlint-disable-next-line solid/components-return-once -- Static collection traversal and context registration are fixed when the owner is created.\n return null;\n }\n\n const aria = context.dragAndDropHooks.createDropIndicator(\n props,\n context.dropState,\n ref\n );\n\n const render = createRenderProps(\n mergeProps(props, {\n defaultClass: \"solid2-aria-DropIndicator\",\n values: {\n get isDropTarget() {\n return aria.isDropTarget;\n },\n },\n })\n );\n\n return (\n <Show when={!aria.isHidden}>\n <dom.div\n {...aria.dropIndicatorProps}\n {...render}\n role=\"option\"\n ref={[\n (element: HTMLElement) => {\n setRef(element);\n },\n (element: HTMLElement) => {\n assignRef(\n untrack(() => props.ref),\n element\n );\n },\n ]}\n data-drop-target={aria.isDropTarget || undefined}\n />\n </Show>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiHA,MAAa,iBAEX,cAA+D,IAAI;AAErE,MAAa,mBAAmB,cAAyC,IAAI;AAgK7E,SAAgB,QACd,OACa;CACb,MAAM,CAAC,SAAS,UAAU,mBACxB,OACA,cAAc,MAAM,GAAG,GACvB,cACF;CAEA,MAAM,QAAQ,WAAW,gBAAgB;CAEzC,IAAI,OAEF,OAAOA,gBAAAA,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,CAAC;CAED,IAAI,CAAC,QAAQ,kBAAkB,uBAAuB,CAAC,QAAQ,WAE7D,OAAO;CAGT,MAAM,OAAO,QAAQ,iBAAiB,oBACpC,OACA,QAAQ,WACR,GACF;CAEA,MAAM,SAAS,kBACbQ,aAAW,OAAO;EAChB,cAAc;EACd,QAAQ,EACN,IAAI,eAAe;GACjB,OAAO,KAAK;EACd,EACF;CACF,CAAC,CACH;CAEA,OACEJ,WAAAA;;GAAY,OAAA,CAAC,KAAK;EAkBZ,CAAA,CAAC,CAAD,IAjBJC,gBAAAA,IAAC/C,KAAD+C,iBACE;GAAI,OAAA,KAAK;EAAkB,GACvB,QAFN;GAGET,MAAK;GACLU,KAAK,EACF,YAAyB;IACxB,OAAO,OAAO;GAChB,IACC,YAAyB;IACxB,UACE,cAAc,MAAM,GAAG,GACvB,OACF;GACF,CACF;GACA,IAAA,qBAAA;IAAkB,OAAA,KAAK,gBAAgB,KAAA;GAAS;EACjD,CAAA,CAAA,IAjBH,KAAA;CAkBM,CAAA;AAEV"}
|
package/dist/browser/menu.js
CHANGED
|
@@ -25,7 +25,7 @@ import { PopoverContext } from "./popover.js";
|
|
|
25
25
|
import { KeyboardContext } from "./keyboard.js";
|
|
26
26
|
import { applyRef, createComponent, dynamic, getNextElement, insert, memo, mergeProps, ref, scope, template } from "@solidjs/web";
|
|
27
27
|
import { mergeProps as mergeProps$1 } from "@solid2-aria/core/utils/merge-props";
|
|
28
|
-
import {
|
|
28
|
+
import { createContext, createMemo, createSignal, merge, omit, untrack, useContext } from "solid-js";
|
|
29
29
|
import { BaseCollection, CollectionNode, ItemNode, LoaderNode, SectionNode } from "@solid2-aria/core/collections/base-collection";
|
|
30
30
|
import { Collection, CollectionBuilder, createBranchComponent, createLeafComponent } from "@solid2-aria/core/collections/collection-builder";
|
|
31
31
|
import { filterDOMProps } from "@solid2-aria/core/utils/filter-dom-props";
|
|
@@ -548,24 +548,21 @@ const MenuLoadMoreItemCollection = createLeafComponent(LoaderNode, (props, forwa
|
|
|
548
548
|
};
|
|
549
549
|
}, _el$3);
|
|
550
550
|
return _el$2;
|
|
551
|
-
})(),
|
|
552
|
-
|
|
553
|
-
return props.isLoading;
|
|
554
|
-
},
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
}
|
|
567
|
-
}));
|
|
568
|
-
}
|
|
551
|
+
})(), memo(() => {
|
|
552
|
+
return memo(() => {
|
|
553
|
+
return !!props.isLoading;
|
|
554
|
+
})() ? createComponent(dom.div, mergeProps(() => {
|
|
555
|
+
return filterDOMProps(props, { global: true });
|
|
556
|
+
}, render, {
|
|
557
|
+
ref: (element) => {
|
|
558
|
+
assignRef(forwardedRef, element);
|
|
559
|
+
},
|
|
560
|
+
role: "menuitem",
|
|
561
|
+
tabindex: -1,
|
|
562
|
+
get children() {
|
|
563
|
+
return render.children;
|
|
564
|
+
}
|
|
565
|
+
})) : void 0;
|
|
569
566
|
})];
|
|
570
567
|
});
|
|
571
568
|
function MenuSection(props) {
|