/** Select look (trigger, popover with search field, list box item states) shared by `SendouSelect` and `SearchSelect`. */ import clsx from "clsx"; import { ChevronsUpDown, Search, X } from "lucide-react"; import type * as React from "react"; import { Button, Input, ListBox, ListBoxItem, type ListBoxItemProps, Popover, SearchField, Select, type SelectProps, } from "react-aria-components"; import styles from "./SelectShell.module.css"; export function SelectShell({ className, children, ...rest }: SelectProps & { children: React.ReactNode }) { return ( ); } export function SelectShellTrigger({ ref, children, }: { ref?: React.Ref; children: React.ReactNode; }) { return ( ); } export function SelectShellPopover({ className, children, }: { className?: string; children: React.ReactNode; }) { return ( {children} ); } export function SelectShellSearchField({ placeholder, inputClassName, inputTestId, }: { placeholder?: string; inputClassName?: string; inputTestId?: string; }) { return ( ); } export function SelectShellListBox({ items, className, renderEmptyState, children, }: { items?: Iterable; className?: string; renderEmptyState?: () => React.ReactNode; children: React.ReactNode | ((item: T) => React.ReactNode); }) { return ( {children} ); } /** list box item carrying the shared focus/selection styling */ export function SelectShellItem({ className, ...rest }: Omit & { className?: string }) { return ( clsx(className, styles.item, { [styles.itemFocused]: isFocused, [styles.itemSelected]: isSelected, }) } /> ); }