@dxos/react-ui-searchlist 0.8.4-main.ae835ea → 0.8.4-main.bc674ce

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.
Files changed (49) hide show
  1. package/dist/lib/browser/index.mjs +669 -337
  2. package/dist/lib/browser/index.mjs.map +4 -4
  3. package/dist/lib/browser/meta.json +1 -1
  4. package/dist/lib/node-esm/index.mjs +669 -337
  5. package/dist/lib/node-esm/index.mjs.map +4 -4
  6. package/dist/lib/node-esm/meta.json +1 -1
  7. package/dist/types/src/components/Combobox/Combobox.d.ts +48 -8
  8. package/dist/types/src/components/Combobox/Combobox.d.ts.map +1 -1
  9. package/dist/types/src/components/Combobox/Combobox.stories.d.ts +1 -1
  10. package/dist/types/src/components/Combobox/Combobox.stories.d.ts.map +1 -1
  11. package/dist/types/src/components/Listbox/Listbox.d.ts.map +1 -1
  12. package/dist/types/src/components/Listbox/Listbox.stories.d.ts +1 -1
  13. package/dist/types/src/components/SearchList/SearchList.d.ts +83 -20
  14. package/dist/types/src/components/SearchList/SearchList.d.ts.map +1 -1
  15. package/dist/types/src/components/SearchList/SearchList.stories.d.ts +10 -7
  16. package/dist/types/src/components/SearchList/SearchList.stories.d.ts.map +1 -1
  17. package/dist/types/src/components/SearchList/context.d.ts +33 -0
  18. package/dist/types/src/components/SearchList/context.d.ts.map +1 -0
  19. package/dist/types/src/components/SearchList/hooks/index.d.ts +5 -0
  20. package/dist/types/src/components/SearchList/hooks/index.d.ts.map +1 -0
  21. package/dist/types/src/components/SearchList/hooks/useGlobalFilter.d.ts +34 -0
  22. package/dist/types/src/components/SearchList/hooks/useGlobalFilter.d.ts.map +1 -0
  23. package/dist/types/src/components/SearchList/hooks/useSearchListInput.d.ts +12 -0
  24. package/dist/types/src/components/SearchList/hooks/useSearchListInput.d.ts.map +1 -0
  25. package/dist/types/src/components/SearchList/hooks/useSearchListItem.d.ts +10 -0
  26. package/dist/types/src/components/SearchList/hooks/useSearchListItem.d.ts.map +1 -0
  27. package/dist/types/src/components/SearchList/hooks/useSearchListResults.d.ts +36 -0
  28. package/dist/types/src/components/SearchList/hooks/useSearchListResults.d.ts.map +1 -0
  29. package/dist/types/src/components/SearchList/index.d.ts +1 -0
  30. package/dist/types/src/components/SearchList/index.d.ts.map +1 -1
  31. package/dist/types/src/translations.d.ts +2 -2
  32. package/dist/types/src/translations.d.ts.map +1 -1
  33. package/dist/types/tsconfig.tsbuildinfo +1 -1
  34. package/package.json +20 -17
  35. package/src/components/Combobox/Combobox.stories.tsx +9 -4
  36. package/src/components/Combobox/Combobox.tsx +35 -14
  37. package/src/components/Listbox/Listbox.stories.tsx +1 -1
  38. package/src/components/Listbox/Listbox.tsx +8 -3
  39. package/src/components/SearchList/SearchList.stories.tsx +500 -30
  40. package/src/components/SearchList/SearchList.tsx +458 -62
  41. package/src/components/SearchList/context.ts +43 -0
  42. package/src/components/SearchList/hooks/index.ts +8 -0
  43. package/src/components/SearchList/hooks/useGlobalFilter.tsx +61 -0
  44. package/src/components/SearchList/hooks/useSearchListInput.ts +14 -0
  45. package/src/components/SearchList/hooks/useSearchListItem.ts +14 -0
  46. package/src/components/SearchList/hooks/useSearchListResults.ts +104 -0
  47. package/src/components/SearchList/index.ts +1 -0
  48. package/src/translations.ts +1 -1
  49. package/src/types/command-score.d.ts +16 -0
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../src/components/Combobox/Combobox.tsx", "../../../src/components/SearchList/SearchList.tsx", "../../../src/translations.ts", "../../../src/components/Listbox/Listbox.tsx"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { createContext } from '@radix-ui/react-context';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport React, { type PropsWithChildren, forwardRef, useCallback } from 'react';\n\nimport {\n Button,\n type ButtonProps,\n Icon,\n Popover,\n type PopoverArrowProps,\n type PopoverContentProps,\n type PopoverVirtualTriggerProps,\n} from '@dxos/react-ui';\nimport { useId } from '@dxos/react-ui';\nimport { mx, staticPlaceholderText } from '@dxos/react-ui-theme';\n\nimport {\n SearchList,\n type SearchListContentProps,\n type SearchListEmptyProps,\n type SearchListInputProps,\n type SearchListItemProps,\n type SearchListRootProps,\n} from '../SearchList';\n\nconst COMBOBOX_NAME = 'Combobox';\nconst COMBOBOX_CONTENT_NAME = 'ComboboxContent';\nconst COMBOBOX_ITEM_NAME = 'ComboboxItem';\nconst COMBOBOX_TRIGGER_NAME = 'ComboboxTrigger';\n\n//\n// Context\n//\n\ntype ComboboxContextValue = {\n modalId: string;\n isCombobox: true;\n placeholder?: string;\n open: boolean;\n onOpenChange: (nextOpen: boolean) => void;\n value: string;\n onValueChange: (nextValue: string) => void;\n};\n\nconst [ComboboxProvider, useComboboxContext] = createContext<Partial<ComboboxContextValue>>(COMBOBOX_NAME, {});\n\n//\n// Root\n//\n\ntype ComboboxRootProps = PropsWithChildren<\n Partial<ComboboxContextValue & { modal: boolean; defaultOpen: boolean; defaultValue: string; placeholder: string }>\n>;\n\nconst ComboboxRoot = ({\n modal,\n modalId: propsModalId,\n open: propsOpen,\n defaultOpen,\n onOpenChange: propsOnOpenChange,\n value: propsValue,\n defaultValue,\n onValueChange: propsOnValueChange,\n placeholder,\n children,\n}: ComboboxRootProps) => {\n const modalId = useId(COMBOBOX_NAME, propsModalId);\n const [open = false, onOpenChange] = useControllableState({\n prop: propsOpen,\n onChange: propsOnOpenChange,\n defaultProp: defaultOpen,\n });\n const [value = '', onValueChange] = useControllableState({\n prop: propsValue,\n onChange: propsOnValueChange,\n defaultProp: defaultValue,\n });\n\n return (\n <Popover.Root open={open} onOpenChange={onOpenChange} modal={modal}>\n <ComboboxProvider\n isCombobox\n modalId={modalId}\n placeholder={placeholder}\n open={open}\n onOpenChange={onOpenChange}\n value={value}\n onValueChange={onValueChange}\n >\n {children}\n </ComboboxProvider>\n </Popover.Root>\n );\n};\n\n//\n// ContentProps\n//\n\ntype ComboboxContentProps = SearchListRootProps & PopoverContentProps;\n\nconst ComboboxContent = forwardRef<HTMLDivElement, ComboboxContentProps>(\n (\n {\n side = 'bottom',\n collisionPadding = 48,\n sideOffset,\n align,\n alignOffset,\n avoidCollisions,\n collisionBoundary,\n arrowPadding,\n sticky,\n hideWhenDetached,\n onOpenAutoFocus,\n onCloseAutoFocus,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n forceMount,\n children,\n classNames,\n ...props\n },\n forwardedRef,\n ) => {\n const { modalId } = useComboboxContext(COMBOBOX_CONTENT_NAME);\n\n return (\n <Popover.Content\n {...{\n side,\n sideOffset,\n align,\n alignOffset,\n avoidCollisions,\n collisionBoundary,\n collisionPadding,\n arrowPadding,\n sticky,\n hideWhenDetached,\n onOpenAutoFocus,\n onCloseAutoFocus,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n forceMount,\n }}\n classNames={[\n 'is-[--radix-popover-trigger-width] max-bs-[--radix-popover-content-available-height] grid grid-rows-[min-content_1fr]',\n classNames,\n ]}\n id={modalId}\n ref={forwardedRef}\n >\n <SearchList.Root {...props} classNames='contents density-fine' role='none'>\n {children}\n </SearchList.Root>\n </Popover.Content>\n );\n },\n);\n\nComboboxContent.displayName = COMBOBOX_CONTENT_NAME;\n\n//\n// Trigger\n//\n\ntype ComboboxTriggerProps = ButtonProps;\n\nconst ComboboxTrigger = forwardRef<HTMLButtonElement, ComboboxTriggerProps>(\n ({ children, onClick, ...props }, forwardedRef) => {\n const { modalId, open, onOpenChange, placeholder, value } = useComboboxContext(COMBOBOX_TRIGGER_NAME);\n const handleClick = useCallback(\n (event: Parameters<Exclude<ButtonProps['onClick'], undefined>>[0]) => {\n onClick?.(event);\n onOpenChange?.(true);\n },\n [onClick, onOpenChange],\n );\n\n return (\n <Popover.Trigger asChild>\n <Button\n {...props}\n role='combobox'\n aria-expanded={open}\n aria-controls={modalId}\n aria-haspopup='dialog'\n onClick={handleClick}\n ref={forwardedRef}\n >\n {children ?? (\n <>\n <span\n className={mx('font-normal text-start flex-1 min-is-0 truncate mie-2', !value && staticPlaceholderText)}\n >\n {value || placeholder}\n </span>\n <Icon icon='ph--caret-down--bold' size={3} />\n </>\n )}\n </Button>\n </Popover.Trigger>\n );\n },\n);\n\nComboboxTrigger.displayName = COMBOBOX_TRIGGER_NAME;\n\n//\n// VirtualTrigger\n//\n\ntype ComboboxVirtualTriggerProps = PopoverVirtualTriggerProps;\n\nconst ComboboxVirtualTrigger = Popover.VirtualTrigger;\n\n//\n// Input\n//\n\ntype ComboboxInputProps = SearchListInputProps;\n\nconst ComboboxInput = forwardRef<HTMLInputElement, ComboboxInputProps>(({ classNames, ...props }, forwardedRef) => {\n return (\n <SearchList.Input\n {...props}\n classNames={[\n 'mli-cardSpacingChrome mbs-cardSpacingChrome mbe-0 is-[calc(100%-2*var(--dx-cardSpacingChrome))]',\n classNames,\n ]}\n ref={forwardedRef}\n />\n );\n});\n\n//\n// List\n//\n\ntype ComboboxListProps = SearchListContentProps;\n\nconst ComboboxList = forwardRef<HTMLDivElement, ComboboxListProps>(({ classNames, ...props }, forwardedRef) => {\n return (\n <SearchList.Content\n {...props}\n classNames={['min-bs-0 overflow-y-auto plb-cardSpacingChrome', classNames]}\n ref={forwardedRef}\n />\n );\n});\n\n//\n// Item\n//\n\ntype ComboboxItemProps = SearchListItemProps;\n\nconst ComboboxItem = forwardRef<HTMLDivElement, ComboboxItemProps>(\n ({ classNames, onSelect, ...props }, forwardedRef) => {\n const { onValueChange, onOpenChange } = useComboboxContext(COMBOBOX_ITEM_NAME);\n const handleSelect = useCallback<NonNullable<SearchListItemProps['onSelect']>>(\n (nextValue) => {\n onSelect?.(nextValue);\n onValueChange?.(nextValue);\n onOpenChange?.(false);\n },\n [onSelect, onValueChange, onOpenChange],\n );\n\n return (\n <SearchList.Item\n {...props}\n classNames={['mli-cardSpacingChrome pli-cardSpacingChrome', classNames]}\n onSelect={handleSelect}\n ref={forwardedRef}\n />\n );\n },\n);\n\nComboboxItem.displayName = COMBOBOX_ITEM_NAME;\n\n//\n// Arrow\n//\n\ntype ComboboxArrowProps = PopoverArrowProps;\n\nconst ComboboxArrow = Popover.Arrow;\n\n//\n// Empty\n//\n\ntype ComboboxEmptyProps = SearchListEmptyProps;\n\nconst ComboboxEmpty = SearchList.Empty;\n\n//\n// Combobox\n// https://www.w3.org/WAI/ARIA/apg/patterns/combobox\n//\n\nexport const Combobox = {\n Root: ComboboxRoot,\n Content: ComboboxContent,\n Trigger: ComboboxTrigger,\n VirtualTrigger: ComboboxVirtualTrigger,\n Input: ComboboxInput,\n List: ComboboxList,\n Item: ComboboxItem,\n Arrow: ComboboxArrow,\n Empty: ComboboxEmpty,\n};\n\nexport type {\n ComboboxRootProps,\n ComboboxContentProps,\n ComboboxTriggerProps,\n ComboboxVirtualTriggerProps,\n ComboboxInputProps,\n ComboboxListProps,\n ComboboxItemProps,\n ComboboxArrowProps,\n ComboboxEmptyProps,\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { CommandEmpty, CommandInput, CommandItem, CommandList, CommandRoot } from 'cmdk';\nimport React, { type ComponentPropsWithRef, forwardRef } from 'react';\n\nimport {\n type TextInputProps,\n type ThemedClassName,\n useDensityContext,\n useElevationContext,\n useThemeContext,\n useTranslation,\n} from '@dxos/react-ui';\nimport { mx } from '@dxos/react-ui-theme';\n\nimport { translationKey } from '../../translations';\n\nconst commandItem = 'flex items-center overflow-hidden';\nconst searchListItem =\n 'plb-1 pli-2 rounded-sm select-none cursor-pointer data-[selected]:bg-hoverOverlay hover:bg-hoverOverlay';\n\nconst SEARCHLIST_NAME = 'SearchList';\nconst SEARCHLIST_ITEM_NAME = 'SearchListItem';\n\n//\n// Root\n//\n\ntype SearchListVariant = 'list' | 'menu' | 'listbox';\n\ntype SearchListRootProps = ThemedClassName<ComponentPropsWithRef<typeof CommandRoot>> & {\n variant?: SearchListVariant;\n};\n\nconst SearchListRoot = forwardRef<HTMLDivElement, SearchListRootProps>(\n ({ children, classNames, ...props }, forwardedRef) => {\n return (\n <CommandRoot {...props} className={mx(classNames)} ref={forwardedRef}>\n {children}\n </CommandRoot>\n );\n },\n);\n\nSearchListRoot.displayName = SEARCHLIST_NAME;\n\n//\n// Input\n//\n\ntype CommandInputPrimitiveProps = ComponentPropsWithRef<typeof CommandInput>;\n\n// TODO: Harmonize with other inputs’ `onChange` prop.\ntype SearchListInputProps = Omit<TextInputProps, 'value' | 'defaultValue' | 'onChange'> &\n Pick<CommandInputPrimitiveProps, 'value' | 'defaultValue' | 'onValueChange'>;\n\nconst SearchListInput = forwardRef<HTMLInputElement, SearchListInputProps>(\n ({ classNames, density: propsDensity, elevation: propsElevation, variant, ...props }, forwardedRef) => {\n const { t } = useTranslation(translationKey);\n const placeholder = props.placeholder ?? t('search.placeholder');\n\n // TODO(thure): Keep this in-sync with `TextInput`, or submit a PR for `cmdk` to support `asChild` so we don’t have to.\n const { hasIosKeyboard } = useThemeContext();\n const { tx } = useThemeContext();\n const density = useDensityContext(propsDensity);\n const elevation = useElevationContext(propsElevation);\n\n return (\n <CommandInput\n {...props}\n placeholder={placeholder}\n className={tx(\n 'input.input',\n 'input',\n {\n variant,\n disabled: props.disabled,\n density,\n elevation,\n },\n 'mbe-cardSpacingBlock',\n classNames,\n )}\n {...(props.autoFocus && !hasIosKeyboard && { autoFocus: true })}\n ref={forwardedRef}\n />\n );\n },\n);\n\n//\n// Content\n//\n\ntype SearchListContentProps = ThemedClassName<ComponentPropsWithRef<typeof CommandList>>;\n\nconst SearchListContent = forwardRef<HTMLDivElement, SearchListContentProps>(\n ({ children, classNames, ...props }, forwardedRef) => {\n return (\n <CommandList {...props} className={mx(classNames)} ref={forwardedRef}>\n {children}\n </CommandList>\n );\n },\n);\n\n//\n// Empty\n//\n\ntype SearchListEmptyProps = ThemedClassName<ComponentPropsWithRef<typeof CommandEmpty>>;\n\nconst SearchListEmpty = forwardRef<HTMLDivElement, SearchListEmptyProps>(\n ({ children, classNames, ...props }, forwardedRef) => {\n return (\n <CommandEmpty {...props} className={mx(classNames)} ref={forwardedRef}>\n {children}\n </CommandEmpty>\n );\n },\n);\n\n//\n// Item\n//\n\ntype SearchListItemProps = ThemedClassName<ComponentPropsWithRef<typeof CommandItem>>;\n\nconst SearchListItem = forwardRef<HTMLDivElement, SearchListItemProps>(\n ({ children, classNames, ...props }, forwardedRef) => {\n return (\n <CommandItem {...props} className={mx(searchListItem, classNames)} ref={forwardedRef}>\n {children}\n </CommandItem>\n );\n },\n);\n\nSearchListItem.displayName = SEARCHLIST_ITEM_NAME;\n\n//\n// SearchList\n//\n\nexport const SearchList = {\n Root: SearchListRoot,\n Input: SearchListInput,\n Content: SearchListContent,\n Empty: SearchListEmpty,\n Item: SearchListItem,\n};\n\nexport type {\n SearchListRootProps,\n SearchListInputProps,\n SearchListContentProps,\n SearchListEmptyProps,\n SearchListItemProps,\n};\n\nexport { commandItem, searchListItem };\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Resource } from '@dxos/react-ui';\n\nexport const translationKey = 'react-ui-searchlist';\n\nexport const translations = [\n {\n 'en-US': {\n [translationKey]: {\n 'search.placeholder': 'Search...',\n },\n },\n },\n] as const satisfies Resource[];\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { useArrowNavigationGroup } from '@fluentui/react-tabster';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { type Scope, createContextScope } from '@radix-ui/react-context';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport React, { type ComponentPropsWithRef, forwardRef, useCallback, useEffect, useRef } from 'react';\n\nimport { Icon, type IconProps, type ThemedClassName } from '@dxos/react-ui';\nimport { mx } from '@dxos/react-ui-theme';\n\nimport { commandItem, searchListItem } from '../SearchList';\n\nconst LISTBOX_NAME = 'Listbox';\nconst LISTBOX_OPTION_NAME = 'ListboxOption';\nconst LISTBOX_OPTION_LABEL_NAME = 'ListboxOptionLabel';\nconst LISTBOX_OPTION_INDICATOR_NAME = 'ListboxOptionIndicator';\n\n//\n// Context\n//\n\ntype ListboxScopedProps<P> = P & { __listboxScope?: Scope };\ntype ListboxOptionScopedProps<P> = P & { __listboxOptionScope?: Scope };\n\ntype ListboxOptionProps = ThemedClassName<ComponentPropsWithRef<'li'>> & {\n value: string;\n};\n\nconst [createListboxContext, createListboxScope] = createContextScope(LISTBOX_NAME, []);\nconst [createListboxOptionContext, createListboxOptionScope] = createContextScope(LISTBOX_OPTION_NAME, [\n createListboxScope,\n]);\n\ntype ListboxContextValue = {\n selectedValue: string | undefined;\n onValueChange: (value: string) => void;\n};\n\ntype ListboxOptionContextValue = {\n value: string;\n isSelected: boolean;\n};\n\nconst [ListboxProvider, useListboxContext] = createListboxContext<ListboxContextValue>(LISTBOX_NAME);\nconst [ListboxOptionProvider, useListboxOptionContext] =\n createListboxOptionContext<ListboxOptionContextValue>(LISTBOX_OPTION_NAME);\n\n//\n// Root\n//\n\ntype ListboxRootProps = ThemedClassName<ComponentPropsWithRef<'ul'>> & {\n value?: string;\n defaultValue?: string;\n onValueChange?: (value: string) => void;\n autoFocus?: boolean;\n};\n\n// TODO(thure): Note that this overlaps significantly with the the `SelectableListbox` story of `List.tsx` in `react-ui`,\n// making this an exemplar of `List` specifying standard `role=\"listbox\"` interactivity, though it is here because it\n// coheres with SearchList’s styles and norms. This can be promoted to `react-ui`, but doing so should involve clearing\n// the technical- and design-debt in its `List` component.\nconst ListboxRoot = forwardRef<HTMLUListElement, ListboxRootProps>(\n (props: ListboxScopedProps<ListboxRootProps>, forwardedRef) => {\n const {\n __listboxScope,\n children,\n classNames,\n value: propsValue,\n defaultValue,\n onValueChange,\n autoFocus,\n ...rootProps\n } = props;\n\n const arrowGroup = useArrowNavigationGroup({ axis: 'vertical' });\n const ref = useRef<HTMLUListElement | null>(null);\n const rootRef = useComposedRefs<HTMLUListElement>(ref, forwardedRef);\n\n const [selectedValue, setSelectedValue] = useControllableState({\n prop: propsValue,\n defaultProp: defaultValue,\n onChange: onValueChange,\n });\n\n const handleValueChange = (value: string) => {\n setSelectedValue(value);\n };\n\n useEffect(() => {\n // Autofocus the selected option on mount using querySelector\n (ref.current?.querySelector('[aria-selected=\"true\"]') as HTMLLIElement)?.focus();\n }, [autoFocus]);\n\n return (\n <ListboxProvider scope={__listboxScope} selectedValue={selectedValue} onValueChange={handleValueChange}>\n <ul\n role='listbox'\n {...rootProps}\n className={mx('is-full p-cardSpacingChrome', classNames)}\n ref={rootRef}\n {...arrowGroup}\n >\n {children}\n </ul>\n </ListboxProvider>\n );\n },\n);\n\nListboxRoot.displayName = LISTBOX_NAME;\n\n//\n// Option\n//\n\nconst ListboxOption = forwardRef<HTMLLIElement, ListboxOptionProps>(\n (props: ListboxScopedProps<ListboxOptionProps>, forwardedRef) => {\n const { __listboxScope, children, classNames, value, ...rootProps } = props;\n const { selectedValue, onValueChange } = useListboxContext(LISTBOX_OPTION_NAME, __listboxScope);\n\n const isSelected = selectedValue === value;\n\n const handleSelect = useCallback(() => {\n onValueChange(value);\n }, [value, onValueChange]);\n\n return (\n <ListboxOptionProvider scope={__listboxScope} value={value} isSelected={isSelected}>\n <li\n role='option'\n {...rootProps}\n aria-selected={isSelected}\n tabIndex={0}\n className={mx('dx-focus-ring', commandItem, searchListItem, classNames)}\n onClick={handleSelect}\n onKeyDown={({ key }) => {\n if (['Enter', ' '].includes(key)) {\n handleSelect();\n }\n }}\n ref={forwardedRef}\n >\n {children}\n </li>\n </ListboxOptionProvider>\n );\n },\n);\n\nListboxOption.displayName = LISTBOX_OPTION_NAME;\n\n//\n// OptionLabel\n//\n\nconst ListboxOptionLabel = forwardRef<HTMLDivElement, ThemedClassName<ComponentPropsWithRef<'div'>>>(\n ({ children, classNames, ...rootProps }, forwardedRef) => {\n return (\n <span {...rootProps} className={mx('grow truncate', classNames)} ref={forwardedRef}>\n {children}\n </span>\n );\n },\n);\n\nListboxOptionLabel.displayName = LISTBOX_OPTION_LABEL_NAME;\n\ntype ListboxOptionIndicatorProps = Omit<IconProps, 'icon'> & Partial<Pick<IconProps, 'icon'>>;\n\n//\n// OptionIndicator\n//\n\nconst ListboxOptionIndicator = forwardRef<SVGSVGElement, ListboxOptionIndicatorProps>(\n (props: ListboxOptionScopedProps<ListboxOptionIndicatorProps>, forwardedRef) => {\n const { __listboxOptionScope, classNames, ...rootProps } = props;\n const { isSelected } = useListboxOptionContext(LISTBOX_OPTION_INDICATOR_NAME, __listboxOptionScope);\n\n return (\n <Icon\n icon='ph--check--regular'\n {...rootProps}\n classNames={mx(!isSelected && 'invisible', classNames)}\n ref={forwardedRef}\n />\n );\n },\n);\n\nListboxOptionIndicator.displayName = LISTBOX_OPTION_INDICATOR_NAME;\n\n//\n// Listbox\n//\n\nexport const Listbox = {\n Root: ListboxRoot,\n Option: ListboxOption,\n OptionLabel: ListboxOptionLabel,\n OptionIndicator: ListboxOptionIndicator,\n};\n\nexport { createListboxScope, useListboxContext };\n\nexport type { ListboxRootProps, ListboxOptionProps, ListboxScopedProps };\n"],
5
- "mappings": ";;;;AAIA,SAASA,qBAAqB;AAC9B,SAASC,4BAA4B;AACrC,OAAOC,UAAiCC,cAAAA,aAAYC,mBAAmB;AAEvE,SACEC,QAEAC,MACAC,eAIK;AACP,SAASC,aAAa;AACtB,SAASC,MAAAA,KAAIC,6BAA6B;;;;ACd1C,SAASC,cAAcC,cAAcC,aAAaC,aAAaC,mBAAmB;AAClF,OAAOC,SAAqCC,kBAAkB;AAE9D,SAGEC,mBACAC,qBACAC,iBACAC,sBACK;AACP,SAASC,UAAU;;;ACTZ,IAAMC,iBAAiB;AAEvB,IAAMC,eAAe;EAC1B;IACE,SAAS;MACP,CAACD,cAAAA,GAAiB;QAChB,sBAAsB;MACxB;IACF;EACF;;;;ADIF,IAAME,cAAc;AACpB,IAAMC,iBACJ;AAEF,IAAMC,kBAAkB;AACxB,IAAMC,uBAAuB;AAY7B,IAAMC,iBAAiBC,2BACrB,CAAC,EAAEC,UAAUC,YAAY,GAAGC,MAAAA,GAASC,iBAAAA;;;AACnC,WACE,sBAAA,cAAC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C,wBAAwBT,+BAA+BgE,oBAAAA;AAE9E,WACE,gBAAAvB,OAAA,cAACwB,OAAAA;MACCC,MAAK;MACJ,GAAG5C;MACJN,YAAY8B,IAAG,CAACG,cAAc,aAAajC,UAAAA;MAC3CU,KAAKb;;;;;AAGX,CAAA;AAGFkD,uBAAuBhB,cAAc/C;AAM9B,IAAMmE,UAAU;EACrBC,MAAM1D;EACN2D,QAAQrB;EACRsB,aAAaT;EACbU,iBAAiBR;AACnB;",
6
- "names": ["createContext", "useControllableState", "React", "forwardRef", "useCallback", "Button", "Icon", "Popover", "useId", "mx", "staticPlaceholderText", "CommandEmpty", "CommandInput", "CommandItem", "CommandList", "CommandRoot", "React", "forwardRef", "useDensityContext", "useElevationContext", "useThemeContext", "useTranslation", "mx", "translationKey", "translations", "commandItem", "searchListItem", "SEARCHLIST_NAME", "SEARCHLIST_ITEM_NAME", "SearchListRoot", "forwardRef", "children", "classNames", "props", "forwardedRef", "CommandRoot", "className", "mx", "ref", "displayName", "SearchListInput", "density", "propsDensity", "elevation", "propsElevation", "variant", "t", "useTranslation", "translationKey", "placeholder", "hasIosKeyboard", "useThemeContext", "tx", "useDensityContext", "useElevationContext", "CommandInput", "disabled", "autoFocus", "SearchListContent", "CommandList", "SearchListEmpty", "CommandEmpty", "SearchListItem", "CommandItem", "SearchList", "Root", "Input", "Content", "Empty", "Item", "COMBOBOX_NAME", "COMBOBOX_CONTENT_NAME", "COMBOBOX_ITEM_NAME", "COMBOBOX_TRIGGER_NAME", "ComboboxProvider", "useComboboxContext", "createContext", "ComboboxRoot", "modal", "modalId", "propsModalId", "open", "propsOpen", "defaultOpen", "onOpenChange", "propsOnOpenChange", "value", "propsValue", "defaultValue", "onValueChange", "propsOnValueChange", "placeholder", "children", "useId", "useControllableState", "prop", "onChange", "defaultProp", "React", "Popover", "Root", "isCombobox", "ComboboxContent", "forwardRef", "side", "collisionPadding", "sideOffset", "align", "alignOffset", "avoidCollisions", "collisionBoundary", "arrowPadding", "sticky", "hideWhenDetached", "onOpenAutoFocus", "onCloseAutoFocus", "onEscapeKeyDown", "onPointerDownOutside", "onFocusOutside", "onInteractOutside", "forceMount", "classNames", "props", "forwardedRef", "Content", "id", "ref", "SearchList", "role", "displayName", "ComboboxTrigger", "onClick", "handleClick", "useCallback", "event", "Trigger", "asChild", "Button", "aria-expanded", "aria-controls", "aria-haspopup", "span", "className", "mx", "staticPlaceholderText", "Icon", "icon", "size", "ComboboxVirtualTrigger", "VirtualTrigger", "ComboboxInput", "Input", "ComboboxList", "ComboboxItem", "onSelect", "handleSelect", "nextValue", "Item", "ComboboxArrow", "Arrow", "ComboboxEmpty", "Empty", "Combobox", "List", "useArrowNavigationGroup", "useComposedRefs", "createContextScope", "useControllableState", "React", "forwardRef", "useCallback", "useEffect", "useRef", "Icon", "mx", "LISTBOX_NAME", "LISTBOX_OPTION_NAME", "LISTBOX_OPTION_LABEL_NAME", "LISTBOX_OPTION_INDICATOR_NAME", "createListboxContext", "createListboxScope", "createContextScope", "createListboxOptionContext", "createListboxOptionScope", "ListboxProvider", "useListboxContext", "ListboxOptionProvider", "useListboxOptionContext", "ListboxRoot", "forwardRef", "props", "forwardedRef", "__listboxScope", "children", "classNames", "value", "propsValue", "defaultValue", "onValueChange", "autoFocus", "rootProps", "arrowGroup", "useArrowNavigationGroup", "axis", "ref", "useRef", "rootRef", "useComposedRefs", "selectedValue", "setSelectedValue", "useControllableState", "prop", "defaultProp", "onChange", "handleValueChange", "useEffect", "current", "querySelector", "focus", "React", "scope", "ul", "role", "className", "mx", "displayName", "ListboxOption", "isSelected", "handleSelect", "useCallback", "li", "aria-selected", "tabIndex", "commandItem", "searchListItem", "onClick", "onKeyDown", "key", "includes", "ListboxOptionLabel", "span", "ListboxOptionIndicator", "__listboxOptionScope", "Icon", "icon", "Listbox", "Root", "Option", "OptionLabel", "OptionIndicator"]
3
+ "sources": ["../../../src/components/Combobox/Combobox.tsx", "../../../src/components/SearchList/SearchList.tsx", "../../../src/translations.ts", "../../../src/components/SearchList/context.ts", "../../../src/components/SearchList/hooks/useGlobalFilter.tsx", "../../../src/components/SearchList/hooks/useSearchListInput.ts", "../../../src/components/SearchList/hooks/useSearchListItem.ts", "../../../src/components/SearchList/hooks/useSearchListResults.ts", "../../../src/components/Listbox/Listbox.tsx"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { createContext } from '@radix-ui/react-context';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport React, { type PropsWithChildren, forwardRef, useCallback } from 'react';\n\nimport {\n Button,\n type ButtonProps,\n Icon,\n Popover,\n type PopoverArrowProps,\n type PopoverContentProps,\n type PopoverVirtualTriggerProps,\n} from '@dxos/react-ui';\nimport { useId } from '@dxos/react-ui';\nimport { mx, staticPlaceholderText } from '@dxos/ui-theme';\n\nimport {\n SearchList,\n type SearchListContentProps,\n type SearchListEmptyProps,\n type SearchListInputProps,\n type SearchListItemProps,\n type SearchListRootProps,\n} from '../SearchList';\n\nconst COMBOBOX_NAME = 'Combobox';\nconst COMBOBOX_CONTENT_NAME = 'ComboboxContent';\nconst COMBOBOX_ITEM_NAME = 'ComboboxItem';\nconst COMBOBOX_TRIGGER_NAME = 'ComboboxTrigger';\n\n//\n// Context\n//\n\ntype ComboboxContextValue = {\n modalId: string;\n isCombobox: true;\n placeholder?: string;\n open: boolean;\n onOpenChange: (nextOpen: boolean) => void;\n value: string;\n onValueChange: (nextValue: string) => void;\n};\n\nconst [ComboboxProvider, useComboboxContext] = createContext<Partial<ComboboxContextValue>>(COMBOBOX_NAME, {});\n\n//\n// Root\n//\n\ntype ComboboxRootProps = PropsWithChildren<\n Partial<ComboboxContextValue & { modal: boolean; defaultOpen: boolean; defaultValue: string; placeholder: string }>\n>;\n\nconst ComboboxRoot = ({\n modal,\n modalId: propsModalId,\n open: propsOpen,\n defaultOpen,\n onOpenChange: propsOnOpenChange,\n value: propsValue,\n defaultValue,\n onValueChange: propsOnValueChange,\n placeholder,\n children,\n}: ComboboxRootProps) => {\n const modalId = useId(COMBOBOX_NAME, propsModalId);\n const [open = false, onOpenChange] = useControllableState({\n prop: propsOpen,\n onChange: propsOnOpenChange,\n defaultProp: defaultOpen,\n });\n const [value = '', onValueChange] = useControllableState({\n prop: propsValue,\n onChange: propsOnValueChange,\n defaultProp: defaultValue,\n });\n\n return (\n <Popover.Root open={open} onOpenChange={onOpenChange} modal={modal}>\n <ComboboxProvider\n isCombobox\n modalId={modalId}\n placeholder={placeholder}\n open={open}\n onOpenChange={onOpenChange}\n value={value}\n onValueChange={onValueChange}\n >\n {children}\n </ComboboxProvider>\n </Popover.Root>\n );\n};\n\n//\n// ContentProps\n//\n\ntype ComboboxContentProps = SearchListRootProps & PopoverContentProps & { label?: string };\n\nconst ComboboxContent = forwardRef<HTMLDivElement, ComboboxContentProps>(\n (\n {\n side = 'bottom',\n collisionPadding = 48,\n sideOffset,\n align,\n alignOffset,\n avoidCollisions,\n collisionBoundary,\n arrowPadding,\n sticky,\n hideWhenDetached,\n onOpenAutoFocus,\n onCloseAutoFocus,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n forceMount,\n children,\n classNames,\n onSearch,\n value,\n defaultValue,\n debounceMs,\n label,\n },\n forwardedRef,\n ) => {\n const { modalId } = useComboboxContext(COMBOBOX_CONTENT_NAME);\n\n return (\n <Popover.Content\n {...{\n side,\n sideOffset,\n align,\n alignOffset,\n avoidCollisions,\n collisionBoundary,\n collisionPadding,\n arrowPadding,\n sticky,\n hideWhenDetached,\n onOpenAutoFocus,\n onCloseAutoFocus,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n forceMount,\n }}\n classNames={[\n 'is-[--radix-popover-trigger-width] max-bs-[--radix-popover-content-available-height] grid grid-rows-[min-content_1fr]',\n classNames,\n ]}\n id={modalId}\n ref={forwardedRef}\n >\n <SearchList.Root onSearch={onSearch} value={value} defaultValue={defaultValue} debounceMs={debounceMs}>\n <div className='contents density-fine' aria-label={label} role='combobox' aria-expanded='true'>\n {children}\n </div>\n </SearchList.Root>\n </Popover.Content>\n );\n },\n);\n\nComboboxContent.displayName = COMBOBOX_CONTENT_NAME;\n\n//\n// Trigger\n//\n\ntype ComboboxTriggerProps = ButtonProps;\n\nconst ComboboxTrigger = forwardRef<HTMLButtonElement, ComboboxTriggerProps>(\n ({ children, onClick, ...props }, forwardedRef) => {\n const { modalId, open, onOpenChange, placeholder, value } = useComboboxContext(COMBOBOX_TRIGGER_NAME);\n const handleClick = useCallback(\n (event: Parameters<Exclude<ButtonProps['onClick'], undefined>>[0]) => {\n onClick?.(event);\n onOpenChange?.(true);\n },\n [onClick, onOpenChange],\n );\n\n return (\n <Popover.Trigger asChild>\n <Button\n {...props}\n role='combobox'\n aria-expanded={open}\n aria-controls={modalId}\n aria-haspopup='dialog'\n onClick={handleClick}\n ref={forwardedRef}\n >\n {children ?? (\n <>\n <span\n className={mx('font-normal text-start flex-1 min-is-0 truncate mie-2', !value && staticPlaceholderText)}\n >\n {value || placeholder}\n </span>\n <Icon icon='ph--caret-down--bold' size={3} />\n </>\n )}\n </Button>\n </Popover.Trigger>\n );\n },\n);\n\nComboboxTrigger.displayName = COMBOBOX_TRIGGER_NAME;\n\n//\n// VirtualTrigger\n//\n\ntype ComboboxVirtualTriggerProps = PopoverVirtualTriggerProps;\n\nconst ComboboxVirtualTrigger = Popover.VirtualTrigger;\n\n//\n// Input\n//\n\ntype ComboboxInputProps = SearchListInputProps;\n\nconst ComboboxInput = forwardRef<HTMLInputElement, ComboboxInputProps>(({ classNames, ...props }, forwardedRef) => {\n return (\n <SearchList.Input\n {...props}\n classNames={[\n 'mli-cardSpacingChrome mbs-cardSpacingChrome mbe-0 is-[calc(100%-2*var(--dx-cardSpacingChrome))]',\n classNames,\n ]}\n ref={forwardedRef}\n />\n );\n});\n\n//\n// List\n//\n\ntype ComboboxListProps = SearchListContentProps;\n\nconst ComboboxList = forwardRef<HTMLDivElement, ComboboxListProps>(({ classNames, ...props }, forwardedRef) => {\n return (\n <SearchList.Content\n {...props}\n classNames={['min-bs-0 overflow-y-auto plb-cardSpacingChrome', classNames]}\n ref={forwardedRef}\n />\n );\n});\n\n//\n// Item\n//\n\ntype ComboboxItemProps = SearchListItemProps & {\n /** Whether to close the popover when this item is selected. Defaults to true. */\n closeOnSelect?: boolean;\n};\n\nconst ComboboxItem = forwardRef<HTMLDivElement, ComboboxItemProps>(\n ({ classNames, onSelect, value, closeOnSelect = true, ...props }, forwardedRef) => {\n const { onValueChange, onOpenChange } = useComboboxContext(COMBOBOX_ITEM_NAME);\n const handleSelect = useCallback<NonNullable<SearchListItemProps['onSelect']>>(() => {\n onSelect?.();\n if (value !== undefined) {\n onValueChange?.(value);\n }\n if (closeOnSelect) {\n onOpenChange?.(false);\n }\n }, [onSelect, onValueChange, onOpenChange, value, closeOnSelect]);\n\n return (\n <SearchList.Item\n {...props}\n value={value}\n classNames={['mli-cardSpacingChrome pli-cardSpacingChrome', classNames]}\n onSelect={handleSelect}\n ref={forwardedRef}\n />\n );\n },\n);\n\nComboboxItem.displayName = COMBOBOX_ITEM_NAME;\n\n//\n// Arrow\n//\n\ntype ComboboxArrowProps = PopoverArrowProps;\n\nconst ComboboxArrow = Popover.Arrow;\n\n//\n// Empty\n//\n\ntype ComboboxEmptyProps = SearchListEmptyProps;\n\nconst ComboboxEmpty = SearchList.Empty;\n\n//\n// Combobox\n// https://www.w3.org/WAI/ARIA/apg/patterns/combobox\n//\n\n//\n// Portal\n//\n\ntype ComboboxPortalProps = React.ComponentPropsWithoutRef<typeof Popover.Portal>;\n\nconst ComboboxPortal = Popover.Portal;\n\nexport const Combobox = {\n Root: ComboboxRoot,\n Portal: ComboboxPortal,\n Content: ComboboxContent,\n Trigger: ComboboxTrigger,\n VirtualTrigger: ComboboxVirtualTrigger,\n Input: ComboboxInput,\n List: ComboboxList,\n Item: ComboboxItem,\n Arrow: ComboboxArrow,\n Empty: ComboboxEmpty,\n};\n\nexport type {\n ComboboxRootProps,\n ComboboxPortalProps,\n ComboboxContentProps,\n ComboboxTriggerProps,\n ComboboxVirtualTriggerProps,\n ComboboxInputProps,\n ComboboxListProps,\n ComboboxItemProps,\n ComboboxArrowProps,\n ComboboxEmptyProps,\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport React, {\n type ChangeEvent,\n type ComponentPropsWithRef,\n type KeyboardEvent,\n type PropsWithChildren,\n type ReactNode,\n forwardRef,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\n\nimport {\n type Density,\n type Elevation,\n Icon,\n type ThemedClassName,\n useDensityContext,\n useElevationContext,\n useThemeContext,\n useTranslation,\n} from '@dxos/react-ui';\nimport { descriptionText, mx } from '@dxos/ui-theme';\n\nimport { translationKey } from '../../translations';\n\nimport {\n SearchListInputContextProvider,\n SearchListItemContextProvider,\n useSearchListInputContext,\n useSearchListItemContext,\n} from './context';\n\n//\n// Internal types\n//\n\ntype ItemData = {\n element: HTMLElement;\n disabled?: boolean;\n onSelect?: () => void;\n};\n\n//\n// Root\n//\n\ntype SearchListRootProps = PropsWithChildren<{\n /** Controlled query value. */\n value?: string;\n /** Default query value for uncontrolled mode. */\n defaultValue?: string;\n /** Debounce delay in milliseconds. */\n debounceMs?: number;\n /** Callback when search query changes (debounced). */\n onSearch?: (query: string) => void;\n}>;\n\nconst SearchListRoot = ({\n children,\n value: valueProp,\n defaultValue = '',\n debounceMs = 200,\n onSearch,\n}: SearchListRootProps) => {\n const [query = '', setQuery] = useControllableState({\n prop: valueProp,\n defaultProp: defaultValue,\n onChange: undefined,\n });\n\n const [selectedValue, setSelectedValue] = useState<string | undefined>(undefined);\n\n // Track registered items: value -> { element, onSelect, disabled }.\n const itemsRef = useRef<Map<string, ItemData>>(new Map());\n\n const debounceRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n const handleQueryChange = useCallback(\n (newQuery: string) => {\n setQuery(newQuery);\n // Don't update selectedValue here - let the effect handle it when items actually change.\n // This prevents unnecessary re-renders of items when query changes.\n\n // Debounce onSearch callback.\n if (debounceRef.current) {\n clearTimeout(debounceRef.current);\n }\n debounceRef.current = setTimeout(() => {\n onSearch?.(newQuery);\n }, debounceMs);\n },\n [setQuery, onSearch, debounceMs],\n );\n\n // Track when items change to trigger first-item selection.\n const [itemVersion, setItemVersion] = useState(0);\n\n // Cleanup debounce on unmount.\n useEffect(() => {\n return () => {\n if (debounceRef.current) {\n clearTimeout(debounceRef.current);\n }\n };\n }, []);\n\n // Auto-select first non-disabled item when items change and no valid selection exists.\n useEffect(() => {\n // Check if current selection is still valid (exists and not disabled).\n const currentItem = selectedValue !== undefined ? itemsRef.current.get(selectedValue) : undefined;\n const isSelectionValid = currentItem !== undefined && !currentItem.disabled;\n if (!isSelectionValid && itemsRef.current.size > 0) {\n // Get first non-disabled item in DOM order.\n const entries = Array.from(itemsRef.current.entries()).filter(([, data]) => !data.disabled);\n if (entries.length > 0) {\n entries.sort(([, a], [, b]) => {\n const position = a.element.compareDocumentPosition(b.element);\n if (position & Node.DOCUMENT_POSITION_FOLLOWING) {\n return -1;\n }\n if (position & Node.DOCUMENT_POSITION_PRECEDING) {\n return 1;\n }\n return 0;\n });\n const firstValue = entries[0]?.[0];\n if (firstValue !== undefined && firstValue !== selectedValue) {\n setSelectedValue(firstValue);\n }\n } else if (selectedValue !== undefined) {\n // No valid items available, clear selection\n setSelectedValue(undefined);\n }\n }\n }, [itemVersion, selectedValue]);\n\n const registerItem = useCallback(\n (value: string, element: HTMLElement | null, onSelect: (() => void) | undefined, disabled?: boolean) => {\n if (element) {\n itemsRef.current.set(value, { element, onSelect, disabled });\n setItemVersion((v) => v + 1);\n }\n },\n [],\n );\n\n const unregisterItem = useCallback((value: string) => {\n itemsRef.current.delete(value);\n setItemVersion((v) => v + 1);\n }, []);\n\n // Get item values in DOM order by sorting registered elements (excludes disabled items).\n const getItemValues = useCallback(() => {\n return Array.from(itemsRef.current.entries())\n .filter(([, data]) => !data.disabled)\n .sort(([, a], [, b]) => {\n // Sort by DOM position using compareDocumentPosition.\n const position = a.element.compareDocumentPosition(b.element);\n return position & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : position & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;\n })\n .map(([value]) => value);\n }, []);\n\n const triggerSelect = useCallback(() => {\n if (selectedValue !== undefined) {\n const item = itemsRef.current.get(selectedValue);\n item?.onSelect?.();\n }\n }, [selectedValue]);\n\n // Item context; stable, doesn't change when query changes.\n const itemContextValue = useMemo(\n () => ({\n selectedValue,\n onSelectedValueChange: setSelectedValue,\n registerItem,\n unregisterItem,\n }),\n [selectedValue, registerItem, unregisterItem],\n );\n\n const inputContextValue = useMemo(\n () => ({\n query,\n onQueryChange: handleQueryChange,\n selectedValue,\n onSelectedValueChange: setSelectedValue,\n getItemValues,\n triggerSelect,\n }),\n [query, handleQueryChange, selectedValue, getItemValues, triggerSelect],\n );\n\n // NOTE: Separate contexts for items and input to avoid unnecessary re-renders of items when query changes.\n return (\n <SearchListInputContextProvider\n query={inputContextValue.query}\n onQueryChange={inputContextValue.onQueryChange}\n selectedValue={inputContextValue.selectedValue}\n onSelectedValueChange={inputContextValue.onSelectedValueChange}\n getItemValues={inputContextValue.getItemValues}\n triggerSelect={inputContextValue.triggerSelect}\n >\n <SearchListItemContextProvider\n selectedValue={itemContextValue.selectedValue}\n onSelectedValueChange={itemContextValue.onSelectedValueChange}\n registerItem={itemContextValue.registerItem}\n unregisterItem={itemContextValue.unregisterItem}\n >\n {children}\n </SearchListItemContextProvider>\n </SearchListInputContextProvider>\n );\n};\n\nSearchListRoot.displayName = 'SearchList.Root';\n\n//\n// Viewport\n//\n\ntype SearchListViewportProps = ThemedClassName<PropsWithChildren<{}>>;\n\n/**\n * Scrollable viewport wrapper for Content.\n * Only Content wrapped in Viewport will be scrollable.\n */\n// TODO(burdon): Reconcile with Mosaic.Viewport.\nconst SearchListViewport = ({ classNames, children }: SearchListViewportProps) => {\n return (\n <div role='none' className={mx('is-full min-bs-0 grow overflow-y-auto', classNames)}>\n {children}\n </div>\n );\n};\n\nSearchListViewport.displayName = 'SearchList.Viewport';\n\n//\n// Content\n//\n\ntype SearchListContentProps = ThemedClassName<PropsWithChildren<{}>>;\n\n/**\n * Container for search results. Does not scroll by default.\n * Wrap in Viewport for scrollable content.\n */\nconst SearchListContent = forwardRef<HTMLDivElement, SearchListContentProps>(\n ({ classNames, children }, forwardedRef) => {\n return (\n <div\n ref={forwardedRef}\n role='listbox'\n className={mx('flex flex-col is-full min-bs-0 grow overflow-hidden', classNames)}\n >\n {children}\n </div>\n );\n },\n);\n\nSearchListContent.displayName = 'SearchList.Content';\n\n//\n// Input\n//\n\ntype InputVariant = 'default' | 'subdued';\n\ntype SearchListInputProps = ThemedClassName<\n Omit<ComponentPropsWithRef<'input'>, 'value'> & {\n density?: Density;\n elevation?: Elevation;\n variant?: InputVariant;\n }\n>;\n\nconst SearchListInput = forwardRef<HTMLInputElement, SearchListInputProps>(\n (\n { classNames, density: propsDensity, elevation: propsElevation, variant, placeholder, onChange, ...props },\n forwardedRef,\n ) => {\n const { query, onQueryChange, selectedValue, onSelectedValueChange, getItemValues, triggerSelect } =\n useSearchListInputContext('SearchList.Input');\n const { t } = useTranslation(translationKey);\n const { hasIosKeyboard, tx } = useThemeContext();\n const density = useDensityContext(propsDensity);\n const elevation = useElevationContext(propsElevation);\n const defaultPlaceholder = t('search.placeholder');\n\n const handleChange = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => {\n onQueryChange(event.target.value);\n onChange?.(event);\n },\n [onQueryChange, onChange],\n );\n\n const handleKeyDown = useCallback(\n (event: KeyboardEvent<HTMLInputElement>) => {\n const values = getItemValues();\n if (values.length === 0) {\n if (event.key === 'Escape') {\n onQueryChange('');\n }\n return;\n }\n\n const currentIndex = selectedValue !== undefined ? values.indexOf(selectedValue) : -1;\n\n switch (event.key) {\n case 'ArrowDown': {\n event.preventDefault();\n const nextIndex = currentIndex === -1 ? 0 : Math.min(currentIndex + 1, values.length - 1);\n const nextValue = values[nextIndex];\n if (nextValue !== undefined) {\n onSelectedValueChange(nextValue);\n }\n break;\n }\n case 'ArrowUp': {\n event.preventDefault();\n const prevIndex = currentIndex === -1 ? values.length - 1 : Math.max(currentIndex - 1, 0);\n const prevValue = values[prevIndex];\n if (prevValue !== undefined) {\n onSelectedValueChange(prevValue);\n }\n break;\n }\n case 'Enter': {\n if (selectedValue !== undefined) {\n event.preventDefault();\n triggerSelect();\n }\n break;\n }\n case 'Home': {\n event.preventDefault();\n const firstValue = values[0];\n if (firstValue !== undefined) {\n onSelectedValueChange(firstValue);\n }\n break;\n }\n case 'End': {\n event.preventDefault();\n const lastValue = values[values.length - 1];\n if (lastValue !== undefined) {\n onSelectedValueChange(lastValue);\n }\n break;\n }\n case 'Escape': {\n event.preventDefault();\n if (selectedValue !== undefined) {\n onSelectedValueChange(undefined);\n } else {\n onQueryChange('');\n }\n break;\n }\n }\n },\n [selectedValue, onSelectedValueChange, getItemValues, triggerSelect, onQueryChange],\n );\n\n return (\n <input\n {...props}\n {...(props.autoFocus && !hasIosKeyboard && { autoFocus: true })}\n type='text'\n value={query}\n placeholder={placeholder ?? defaultPlaceholder}\n className={tx(\n 'input.input',\n 'input',\n {\n variant,\n disabled: props.disabled,\n density,\n elevation,\n },\n classNames,\n )}\n onChange={handleChange}\n onKeyDown={handleKeyDown}\n ref={forwardedRef}\n />\n );\n },\n);\n\nSearchListInput.displayName = 'SearchList.Input';\n\n//\n// Item\n//\n\ntype SearchListItemProps = ThemedClassName<{\n /** Unique identifier for the item. */\n value: string;\n /** Display label for the item. */\n label: string;\n /** Icon to display (string identifier for Icon component). */\n icon?: string;\n /** Whether to show a check icon. */\n checked?: boolean;\n /** Suffix text to display after the label. */\n suffix?: string;\n /** Callback when item is selected. */\n onSelect?: () => void;\n /** Whether the item is disabled. */\n disabled?: boolean;\n}>;\n\nconst SearchListItem = forwardRef<HTMLDivElement, SearchListItemProps>(\n ({ classNames, value, label, icon, checked, suffix, onSelect, disabled }, forwardedRef) => {\n const { selectedValue, registerItem, unregisterItem } = useSearchListItemContext('SearchList.Item');\n const internalRef = useRef<HTMLDivElement>(null);\n\n const isSelected = selectedValue === value && !disabled;\n\n // Register this item.\n useEffect(() => {\n const element = internalRef.current;\n if (element) {\n registerItem(value, element, onSelect, disabled);\n }\n return () => unregisterItem(value);\n }, [value, onSelect, disabled, registerItem, unregisterItem]);\n\n // Scroll into view when selected.\n useEffect(() => {\n if (isSelected && internalRef.current) {\n internalRef.current.scrollIntoView({ block: 'nearest', behavior: 'smooth' });\n }\n }, [isSelected]);\n\n const handleClick = useCallback(() => {\n if (!disabled) {\n onSelect?.();\n }\n }, [onSelect, disabled]);\n\n return (\n <div\n ref={(node) => {\n internalRef.current = node;\n if (typeof forwardedRef === 'function') {\n forwardedRef(node);\n } else if (forwardedRef) {\n forwardedRef.current = node;\n }\n }}\n role='option'\n aria-selected={isSelected}\n aria-disabled={disabled}\n data-selected={isSelected}\n data-disabled={disabled}\n data-value={value}\n tabIndex={-1}\n className={mx(\n 'flex gap-2 items-center',\n 'plb-1 pli-2 rounded-sm select-none cursor-pointer data-[selected=true]:bg-hoverOverlay hover:bg-hoverOverlay',\n disabled && 'opacity-50 cursor-not-allowed hover:bg-transparent data-[selected=true]:bg-transparent',\n classNames,\n )}\n onClick={handleClick}\n >\n {icon && <Icon icon={icon} size={5} />}\n <span className='is-0 grow truncate'>{label}</span>\n {suffix && <span className={mx('shrink-0', descriptionText)}>{suffix}</span>}\n {checked && <Icon icon='ph--check--regular' size={5} />}\n </div>\n );\n },\n);\n\nSearchListItem.displayName = 'SearchList.Item';\n\n//\n// Empty\n//\n\ntype SearchListEmptyProps = ThemedClassName<PropsWithChildren<{}>>;\n\nconst SearchListEmpty = ({ classNames, children }: SearchListEmptyProps) => {\n return (\n <div role='status' className={mx('flex flex-col is-full pli-2 plb-1', classNames)}>\n {children}\n </div>\n );\n};\n\nSearchListEmpty.displayName = 'SearchList.Empty';\n\n//\n// Group\n//\n\ntype SearchListGroupProps = ThemedClassName<\n PropsWithChildren<{\n /** Heading for the group. */\n heading?: ReactNode;\n }>\n>;\n\n/**\n * Groups related search items with an optional heading.\n */\nconst SearchListGroup = forwardRef<HTMLDivElement, SearchListGroupProps>(\n ({ classNames, heading, children }, forwardedRef) => {\n return (\n <div ref={forwardedRef} role='group' className={mx('flex flex-col', classNames)}>\n {heading && (\n <div role='presentation' className='pli-2 plb-1 text-xs font-medium text-description'>\n {heading}\n </div>\n )}\n {children}\n </div>\n );\n },\n);\n\nSearchListGroup.displayName = 'SearchList.Group';\n\n//\n// SearchList\n//\n\nexport const SearchList = {\n Root: SearchListRoot,\n Viewport: SearchListViewport,\n Content: SearchListContent,\n Input: SearchListInput,\n Item: SearchListItem,\n Empty: SearchListEmpty,\n Group: SearchListGroup,\n};\n\nexport type {\n SearchListRootProps,\n SearchListViewportProps,\n SearchListContentProps,\n SearchListInputProps,\n SearchListItemProps,\n SearchListEmptyProps,\n SearchListGroupProps,\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Resource } from '@dxos/react-ui';\n\nexport const translationKey = '@dxos/react-ui-searchlist';\n\nexport const translations = [\n {\n 'en-US': {\n [translationKey]: {\n 'search.placeholder': 'Search...',\n },\n },\n },\n] as const satisfies Resource[];\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { createContext } from '@radix-ui/react-context';\n\n/** Context for items - stable, doesn't change when query changes */\nexport type SearchListItemContextValue = {\n /** Currently selected item value for keyboard navigation. */\n selectedValue: string | undefined;\n /** Update the selected value. */\n onSelectedValueChange: (value: string | undefined) => void;\n /** Register an item for keyboard navigation. */\n registerItem: (\n value: string,\n element: HTMLElement | null,\n onSelect: (() => void) | undefined,\n disabled?: boolean,\n ) => void;\n /** Unregister an item. */\n unregisterItem: (value: string) => void;\n};\n\n/** Context for input - can change frequently with query */\nexport type SearchListInputContextValue = {\n /** Current search query. */\n query: string;\n /** Update the query value. */\n onQueryChange: (query: string) => void;\n /** Currently selected item value for keyboard navigation. */\n selectedValue: string | undefined;\n /** Update the selected value. */\n onSelectedValueChange: (value: string | undefined) => void;\n /** Get ordered list of registered item values (excludes disabled items). */\n getItemValues: () => string[];\n /** Trigger selection of the currently highlighted item. */\n triggerSelect: () => void;\n};\n\nexport const [SearchListItemContextProvider, useSearchListItemContext] =\n createContext<SearchListItemContextValue>('SearchListItem');\nexport const [SearchListInputContextProvider, useSearchListInputContext] =\n createContext<SearchListInputContextValue>('SearchListInput');\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React, { type PropsWithChildren, createContext, useContext, useMemo } from 'react';\n\n/**\n * Type for a filter function that filters an array of objects.\n */\nexport type FilterFunction<T = any> = (objects: T[]) => T[];\n\ntype GlobalFilterContextType = {\n /** The current filter function. */\n filter?: FilterFunction;\n};\n\nconst GlobalFilterContext = createContext<GlobalFilterContextType>({});\n\nexport type GlobalFilterProviderProps = PropsWithChildren<{\n /** The filter function to apply globally. */\n filter?: FilterFunction;\n}>;\n\n/**\n * Provider that makes a filter function available globally.\n * Used by plugin-search to provide its regex-based filtering.\n */\nexport const GlobalFilterProvider = ({ children, filter }: GlobalFilterProviderProps) => {\n const value = useMemo(() => ({ filter }), [filter]);\n return <GlobalFilterContext.Provider value={value}>{children}</GlobalFilterContext.Provider>;\n};\n\n/**\n * Hook to access the global filter context.\n * Returns the filter function if one is provided.\n */\nexport const useGlobalFilter = () => {\n return useContext(GlobalFilterContext);\n};\n\n/**\n * Hook that applies the global filter to an array of objects.\n * If no filter is set, returns the original objects unchanged.\n *\n * @example\n * const objects = useQuery(db, Filter.everything());\n * const filteredObjects = useGlobalFilteredObjects(objects);\n */\nexport const useGlobalFilteredObjects = <T extends Record<string, any>>(objects?: T[]): T[] => {\n const { filter } = useGlobalFilter();\n\n return useMemo(() => {\n if (!objects) {\n return [];\n }\n if (!filter) {\n return objects;\n }\n return filter(objects);\n }, [objects, filter]);\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { useSearchListInputContext } from '../context';\n\n/**\n * Hook to access the search context for custom input implementations.\n */\nexport const useSearchListInput = () => {\n const { query, onQueryChange, selectedValue, onSelectedValueChange, getItemValues, triggerSelect } =\n useSearchListInputContext('useSearchListInput');\n return { query, onQueryChange, selectedValue, onSelectedValueChange, getItemValues, triggerSelect };\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { useSearchListItemContext } from '../context';\n\n/**\n * Hook to access selection state for custom item renderers.\n * Returns the current selected value and registration functions.\n */\nexport const useSearchListItem = () => {\n const { selectedValue, registerItem, unregisterItem } = useSearchListItemContext('useSearchListItem');\n return { selectedValue, registerItem, unregisterItem };\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport commandScore from 'command-score';\nimport { useCallback, useEffect, useMemo, useRef, useState } from 'react';\n\nexport type UseSearchListResultsOptions<T> = {\n /** Items to filter. */\n items: T[];\n /** Custom filter function. Defaults to filtering by extracted string. */\n filter?: (item: T, query: string) => boolean;\n /** Enable fuzzy filtering using command-score algorithm. Defaults to true. */\n fuzzy?: boolean;\n /** Custom function to extract the searchable string from an item. Defaults to accessing 'label' property if it exists. */\n extract?: (item: T) => string;\n /** Minimum score threshold for fuzzy matches (0-1). Defaults to 0. */\n minScore?: number;\n};\n\n/**\n * Hook to manage search results with fuzzy filtering (enabled by default).\n * Returns filtered results and a handleSearch function to pass to SearchList.Root.\n *\n * @example\n * // Default fuzzy filtering using command-score (tries to extract from 'label' property)\n * const { results, handleSearch } = useSearchListResults({ items });\n *\n * @example\n * // Disable fuzzy for basic case-insensitive substring match\n * const { results, handleSearch } = useSearchListResults({ items, fuzzy: false });\n *\n * @example\n * // Custom extraction for fuzzy filtering\n * const { results, handleSearch } = useSearchListResults({\n * items,\n * extract: (item) => `${item.name} ${item.description}`,\n * });\n */\nexport const useSearchListResults = <T = unknown>({\n items,\n filter,\n fuzzy = true,\n extract,\n minScore = 0,\n}: UseSearchListResultsOptions<T>) => {\n const [query, setQuery] = useState<string>('');\n const queryRef = useRef<string>('');\n\n // Update results when items change.\n useEffect(() => {\n queryRef.current = '';\n setQuery('');\n }, [items]);\n\n const defaultExtract = useCallback((item: T) => {\n // If item is a string, return it directly\n if (typeof item === 'string') {\n return item;\n }\n // Otherwise, try to access 'label' property\n return (item as any)?.label ?? '';\n }, []);\n const extractFn = extract ?? defaultExtract;\n\n const defaultFilter = useCallback(\n (item: T, query: string) => {\n const searchable = extractFn(item);\n return searchable.toLowerCase().includes(query.toLowerCase());\n },\n [extractFn],\n );\n\n const filterFn = filter ?? defaultFilter;\n\n const handleSearch = useCallback((searchQuery: string) => {\n queryRef.current = searchQuery;\n setQuery(searchQuery);\n }, []);\n\n const results = useMemo(() => {\n const currentQuery = queryRef.current;\n if (!currentQuery) {\n return items;\n }\n\n if (fuzzy) {\n // Score and filter items using command-score.\n const scored = items\n .map((item) => ({\n item,\n score: commandScore(extractFn(item), currentQuery) as number,\n }))\n .filter(({ score }) => score > minScore)\n .sort((a, b) => b.score - a.score);\n\n return scored.map(({ item }) => item);\n } else {\n return items.filter((item) => filterFn(item, currentQuery));\n }\n }, [items, query, filterFn, fuzzy, extractFn, minScore]);\n\n return { results, handleSearch };\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { useArrowNavigationGroup } from '@fluentui/react-tabster';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { type Scope, createContextScope } from '@radix-ui/react-context';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport React, { type ComponentPropsWithRef, forwardRef, useCallback, useEffect, useRef } from 'react';\n\nimport { Icon, type IconProps, type ThemedClassName } from '@dxos/react-ui';\nimport { mx } from '@dxos/ui-theme';\n\nconst commandItem = 'flex items-center overflow-hidden';\n\nconst LISTBOX_NAME = 'Listbox';\nconst LISTBOX_OPTION_NAME = 'ListboxOption';\nconst LISTBOX_OPTION_LABEL_NAME = 'ListboxOptionLabel';\nconst LISTBOX_OPTION_INDICATOR_NAME = 'ListboxOptionIndicator';\n\n//\n// Context\n//\n\ntype ListboxScopedProps<P> = P & { __listboxScope?: Scope };\ntype ListboxOptionScopedProps<P> = P & { __listboxOptionScope?: Scope };\n\ntype ListboxOptionProps = ThemedClassName<ComponentPropsWithRef<'li'>> & {\n value: string;\n};\n\nconst [createListboxContext, createListboxScope] = createContextScope(LISTBOX_NAME, []);\nconst [createListboxOptionContext, createListboxOptionScope] = createContextScope(LISTBOX_OPTION_NAME, [\n createListboxScope,\n]);\n\ntype ListboxContextValue = {\n selectedValue: string | undefined;\n onValueChange: (value: string) => void;\n};\n\ntype ListboxOptionContextValue = {\n value: string;\n isSelected: boolean;\n};\n\nconst [ListboxProvider, useListboxContext] = createListboxContext<ListboxContextValue>(LISTBOX_NAME);\nconst [ListboxOptionProvider, useListboxOptionContext] =\n createListboxOptionContext<ListboxOptionContextValue>(LISTBOX_OPTION_NAME);\n\n//\n// Root\n//\n\ntype ListboxRootProps = ThemedClassName<ComponentPropsWithRef<'ul'>> & {\n value?: string;\n defaultValue?: string;\n onValueChange?: (value: string) => void;\n autoFocus?: boolean;\n};\n\n// TODO(thure): Note that this overlaps significantly with the the `SelectableListbox` story of `List.tsx` in `react-ui`,\n// making this an exemplar of `List` specifying standard `role=\"listbox\"` interactivity, though it is here because it\n// coheres with SearchList’s styles and norms. This can be promoted to `react-ui`, but doing so should involve clearing\n// the technical- and design-debt in its `List` component.\nconst ListboxRoot = forwardRef<HTMLUListElement, ListboxRootProps>(\n (props: ListboxScopedProps<ListboxRootProps>, forwardedRef) => {\n const {\n __listboxScope,\n children,\n classNames,\n value: propsValue,\n defaultValue,\n onValueChange,\n autoFocus,\n ...rootProps\n } = props;\n\n const arrowGroup = useArrowNavigationGroup({ axis: 'vertical' });\n const ref = useRef<HTMLUListElement | null>(null);\n const rootRef = useComposedRefs<HTMLUListElement>(ref, forwardedRef);\n\n const [selectedValue, setSelectedValue] = useControllableState({\n prop: propsValue,\n defaultProp: defaultValue,\n onChange: onValueChange,\n });\n\n const handleValueChange = (value: string) => {\n setSelectedValue(value);\n };\n\n useEffect(() => {\n // Autofocus the selected option on mount using querySelector\n (ref.current?.querySelector('[aria-selected=\"true\"]') as HTMLLIElement)?.focus();\n }, [autoFocus]);\n\n return (\n <ListboxProvider scope={__listboxScope} selectedValue={selectedValue} onValueChange={handleValueChange}>\n <ul\n role='listbox'\n {...rootProps}\n className={mx('is-full p-cardSpacingChrome', classNames)}\n ref={rootRef}\n {...arrowGroup}\n >\n {children}\n </ul>\n </ListboxProvider>\n );\n },\n);\n\nListboxRoot.displayName = LISTBOX_NAME;\n\n//\n// Option\n//\n\nconst ListboxOption = forwardRef<HTMLLIElement, ListboxOptionProps>(\n (props: ListboxScopedProps<ListboxOptionProps>, forwardedRef) => {\n const { __listboxScope, children, classNames, value, ...rootProps } = props;\n const { selectedValue, onValueChange } = useListboxContext(LISTBOX_OPTION_NAME, __listboxScope);\n\n const isSelected = selectedValue === value;\n\n const handleSelect = useCallback(() => {\n onValueChange(value);\n }, [value, onValueChange]);\n\n return (\n <ListboxOptionProvider scope={__listboxScope} value={value} isSelected={isSelected}>\n <li\n role='option'\n {...rootProps}\n aria-selected={isSelected}\n tabIndex={0}\n className={mx(\n 'dx-focus-ring',\n 'plb-1 pli-2 rounded-sm select-none cursor-pointer data-[selected=true]:bg-hoverOverlay hover:bg-hoverOverlay',\n commandItem,\n classNames,\n )}\n onClick={handleSelect}\n onKeyDown={({ key }) => {\n if (['Enter', ' '].includes(key)) {\n handleSelect();\n }\n }}\n ref={forwardedRef}\n >\n {children}\n </li>\n </ListboxOptionProvider>\n );\n },\n);\n\nListboxOption.displayName = LISTBOX_OPTION_NAME;\n\n//\n// OptionLabel\n//\n\nconst ListboxOptionLabel = forwardRef<HTMLDivElement, ThemedClassName<ComponentPropsWithRef<'div'>>>(\n ({ children, classNames, ...rootProps }, forwardedRef) => {\n return (\n <span {...rootProps} className={mx('grow truncate', classNames)} ref={forwardedRef}>\n {children}\n </span>\n );\n },\n);\n\nListboxOptionLabel.displayName = LISTBOX_OPTION_LABEL_NAME;\n\ntype ListboxOptionIndicatorProps = Omit<IconProps, 'icon'> & Partial<Pick<IconProps, 'icon'>>;\n\n//\n// OptionIndicator\n//\n\nconst ListboxOptionIndicator = forwardRef<SVGSVGElement, ListboxOptionIndicatorProps>(\n (props: ListboxOptionScopedProps<ListboxOptionIndicatorProps>, forwardedRef) => {\n const { __listboxOptionScope, classNames, ...rootProps } = props;\n const { isSelected } = useListboxOptionContext(LISTBOX_OPTION_INDICATOR_NAME, __listboxOptionScope);\n\n return (\n <Icon\n icon='ph--check--regular'\n {...rootProps}\n classNames={mx(!isSelected && 'invisible', classNames)}\n ref={forwardedRef}\n />\n );\n },\n);\n\nListboxOptionIndicator.displayName = LISTBOX_OPTION_INDICATOR_NAME;\n\n//\n// Listbox\n//\n\nexport const Listbox = {\n Root: ListboxRoot,\n Option: ListboxOption,\n OptionLabel: ListboxOptionLabel,\n OptionIndicator: ListboxOptionIndicator,\n};\n\nexport { createListboxScope, useListboxContext };\n\nexport type { ListboxRootProps, ListboxOptionProps, ListboxScopedProps };\n"],
5
+ "mappings": ";;;AAIA,SAASA,iBAAAA,sBAAqB;AAC9B,SAASC,wBAAAA,6BAA4B;AACrC,OAAOC,UAAiCC,cAAAA,aAAYC,eAAAA,oBAAmB;AAEvE,SACEC,QAEAC,QAAAA,OACAC,eAIK;AACP,SAASC,aAAa;AACtB,SAASC,MAAAA,KAAIC,6BAA6B;;;ACd1C,SAASC,4BAA4B;AACrC,OAAOC,SAMLC,YACAC,aACAC,WACAC,SACAC,QACAC,gBACK;AAEP,SAGEC,MAEAC,mBACAC,qBACAC,iBACAC,sBACK;AACP,SAASC,iBAAiBC,UAAU;;;ACvB7B,IAAMC,iBAAiB;AAEvB,IAAMC,eAAe;EAC1B;IACE,SAAS;MACP,CAACD,cAAAA,GAAiB;QAChB,sBAAsB;MACxB;IACF;EACF;;;;ACXF,SAASE,qBAAqB;AAmCvB,IAAM,CAACC,+BAA+BC,wBAAAA,IAC3CC,cAA0C,gBAA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uC,SAASL;IACTM,WAAW,CAAC,EAAEC,IAAG,MAAE;AACjB,UAAI;QAAC;QAAS;QAAKC,SAASD,GAAAA,GAAM;AAChCP,qBAAAA;MACF;IACF;IACAxB,KAAKb;KAEJE,QAAAA,CAAAA;AAIT,CAAA;AAGFiC,cAAcD,cAAcjD;AAM5B,IAAM6D,qBAAqBhD,gBAAAA,YACzB,CAAC,EAAEI,UAAUC,YAAY,GAAGM,UAAAA,GAAaT,iBAAAA;AACvC,SACE,gBAAA4B,OAAA,cAACmB,QAAAA;IAAM,GAAGtC;IAAWuB,WAAWC,IAAG,iBAAiB9B,UAAAA;IAAaU,KAAKb;KACnEE,QAAAA;AAGP,CAAA;AAGF4C,mBAAmBZ,cAAchD;AAQjC,IAAM8D,yBAAyBlD,gBAAAA,YAC7B,CAACC,OAA8DC,iBAAAA;AAC7D,QAAM,EAAEiD,sBAAsB9C,YAAY,GAAGM,UAAAA,IAAcV;AAC3D,QAAM,EAAEqC,WAAU,IAAKxC,wBAAwBT,+BAA+B8D,oBAAAA;AAE9E,SACE,gBAAArB,OAAA,cAACsB,OAAAA;IACCC,MAAK;IACJ,GAAG1C;IACJN,YAAY8B,IAAG,CAACG,cAAc,aAAajC,UAAAA;IAC3CU,KAAKb;;AAGX,CAAA;AAGFgD,uBAAuBd,cAAc/C;AAM9B,IAAMiE,UAAU;EACrBC,MAAMxD;EACNyD,QAAQnB;EACRoB,aAAaT;EACbU,iBAAiBR;AACnB;",
6
+ "names": ["createContext", "useControllableState", "React", "forwardRef", "useCallback", "Button", "Icon", "Popover", "useId", "mx", "staticPlaceholderText", "useControllableState", "React", "forwardRef", "useCallback", "useEffect", "useMemo", "useRef", "useState", "Icon", "useDensityContext", "useElevationContext", "useThemeContext", "useTranslation", "descriptionText", "mx", "translationKey", "translations", "createContext", "SearchListItemContextProvider", "useSearchListItemContext", "createContext", "SearchListInputContextProvider", "useSearchListInputContext", "SearchListRoot", "children", "value", "valueProp", "defaultValue", "debounceMs", "onSearch", "query", "setQuery", "useControllableState", "prop", "defaultProp", "onChange", "undefined", "selectedValue", "setSelectedValue", "useState", "itemsRef", "useRef", "Map", "debounceRef", "handleQueryChange", "useCallback", "newQuery", "current", "clearTimeout", "setTimeout", "itemVersion", "setItemVersion", "useEffect", "currentItem", "get", "isSelectionValid", "disabled", "size", "entries", "Array", "from", "filter", "data", "length", "sort", "a", "b", "position", "element", "compareDocumentPosition", "Node", "DOCUMENT_POSITION_FOLLOWING", "DOCUMENT_POSITION_PRECEDING", "firstValue", "registerItem", "onSelect", "set", "v", "unregisterItem", "delete", "getItemValues", "map", "triggerSelect", "item", "itemContextValue", "useMemo", "onSelectedValueChange", "inputContextValue", "onQueryChange", "SearchListInputContextProvider", "SearchListItemContextProvider", "displayName", "SearchListViewport", "classNames", "div", "role", "className", "mx", "SearchListContent", "forwardRef", "forwardedRef", "ref", "SearchListInput", "density", "propsDensity", "elevation", "propsElevation", "variant", "placeholder", "props", "useSearchListInputContext", "t", "useTranslation", "translationKey", "hasIosKeyboard", "tx", "useThemeContext", "useDensityContext", "useElevationContext", "defaultPlaceholder", "handleChange", "event", "target", "handleKeyDown", "values", "key", "currentIndex", "indexOf", "preventDefault", "nextIndex", "Math", "min", "nextValue", "prevIndex", "max", "prevValue", "lastValue", "input", "autoFocus", "type", "onKeyDown", "SearchListItem", "label", "icon", "checked", "suffix", "useSearchListItemContext", "internalRef", "isSelected", "scrollIntoView", "block", "behavior", "handleClick", "node", "aria-selected", "aria-disabled", "data-selected", "data-disabled", "data-value", "tabIndex", "onClick", "Icon", "span", "descriptionText", "SearchListEmpty", "SearchListGroup", "heading", "SearchList", "Root", "Viewport", "Content", "Input", "Item", "Empty", "Group", "React", "createContext", "useContext", "useMemo", "GlobalFilterContext", "createContext", "GlobalFilterProvider", "children", "filter", "value", "useMemo", "React", "Provider", "useGlobalFilter", "useContext", "useGlobalFilteredObjects", "objects", "useSearchListInput", "query", "onQueryChange", "selectedValue", "onSelectedValueChange", "getItemValues", "triggerSelect", "useSearchListInputContext", "useSearchListItem", "selectedValue", "registerItem", "unregisterItem", "useSearchListItemContext", "commandScore", "useCallback", "useEffect", "useMemo", "useRef", "useState", "useSearchListResults", "items", "filter", "fuzzy", "extract", "minScore", "query", "setQuery", "useState", "queryRef", "useRef", "useEffect", "current", "defaultExtract", "useCallback", "item", "label", "extractFn", "defaultFilter", "searchable", "toLowerCase", "includes", "filterFn", "handleSearch", "searchQuery", "results", "useMemo", "currentQuery", "scored", "map", "score", "commandScore", "sort", "a", "b", "COMBOBOX_NAME", "COMBOBOX_CONTENT_NAME", "COMBOBOX_ITEM_NAME", "COMBOBOX_TRIGGER_NAME", "ComboboxProvider", "useComboboxContext", "createContext", "ComboboxRoot", "modal", "modalId", "propsModalId", "open", "propsOpen", "defaultOpen", "onOpenChange", "propsOnOpenChange", "value", "propsValue", "defaultValue", "onValueChange", "propsOnValueChange", "placeholder", "children", "useId", "useControllableState", "prop", "onChange", "defaultProp", "React", "Popover", "Root", "isCombobox", "ComboboxContent", "forwardRef", "side", "collisionPadding", "sideOffset", "align", "alignOffset", "avoidCollisions", "collisionBoundary", "arrowPadding", "sticky", "hideWhenDetached", "onOpenAutoFocus", "onCloseAutoFocus", "onEscapeKeyDown", "onPointerDownOutside", "onFocusOutside", "onInteractOutside", "forceMount", "classNames", "onSearch", "debounceMs", "label", "forwardedRef", "Content", "id", "ref", "SearchList", "div", "className", "aria-label", "role", "aria-expanded", "displayName", "ComboboxTrigger", "onClick", "props", "handleClick", "useCallback", "event", "Trigger", "asChild", "Button", "aria-controls", "aria-haspopup", "span", "mx", "staticPlaceholderText", "Icon", "icon", "size", "ComboboxVirtualTrigger", "VirtualTrigger", "ComboboxInput", "Input", "ComboboxList", "ComboboxItem", "onSelect", "closeOnSelect", "handleSelect", "undefined", "Item", "ComboboxArrow", "Arrow", "ComboboxEmpty", "Empty", "ComboboxPortal", "Portal", "Combobox", "List", "useArrowNavigationGroup", "useComposedRefs", "createContextScope", "useControllableState", "React", "forwardRef", "useCallback", "useEffect", "useRef", "Icon", "mx", "commandItem", "LISTBOX_NAME", "LISTBOX_OPTION_NAME", "LISTBOX_OPTION_LABEL_NAME", "LISTBOX_OPTION_INDICATOR_NAME", "createListboxContext", "createListboxScope", "createContextScope", "createListboxOptionContext", "createListboxOptionScope", "ListboxProvider", "useListboxContext", "ListboxOptionProvider", "useListboxOptionContext", "ListboxRoot", "forwardRef", "props", "forwardedRef", "__listboxScope", "children", "classNames", "value", "propsValue", "defaultValue", "onValueChange", "autoFocus", "rootProps", "arrowGroup", "useArrowNavigationGroup", "axis", "ref", "useRef", "rootRef", "useComposedRefs", "selectedValue", "setSelectedValue", "useControllableState", "prop", "defaultProp", "onChange", "handleValueChange", "useEffect", "current", "querySelector", "focus", "React", "scope", "ul", "role", "className", "mx", "displayName", "ListboxOption", "isSelected", "handleSelect", "useCallback", "li", "aria-selected", "tabIndex", "onClick", "onKeyDown", "key", "includes", "ListboxOptionLabel", "span", "ListboxOptionIndicator", "__listboxOptionScope", "Icon", "icon", "Listbox", "Root", "Option", "OptionLabel", "OptionIndicator"]
7
7
  }
@@ -1 +1 @@
1
- {"inputs":{"src/translations.ts":{"bytes":1212,"imports":[],"format":"esm"},"src/components/SearchList/SearchList.tsx":{"bytes":13072,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"cmdk","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"src/translations.ts","kind":"import-statement","original":"../../translations"}],"format":"esm"},"src/components/SearchList/index.ts":{"bytes":486,"imports":[{"path":"src/components/SearchList/SearchList.tsx","kind":"import-statement","original":"./SearchList"}],"format":"esm"},"src/components/Combobox/Combobox.tsx":{"bytes":24299,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"@radix-ui/react-context","kind":"import-statement","external":true},{"path":"@radix-ui/react-use-controllable-state","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"src/components/SearchList/index.ts","kind":"import-statement","original":"../SearchList"}],"format":"esm"},"src/components/Combobox/index.ts":{"bytes":478,"imports":[{"path":"src/components/Combobox/Combobox.tsx","kind":"import-statement","original":"./Combobox"}],"format":"esm"},"src/components/Listbox/Listbox.tsx":{"bytes":19830,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"@radix-ui/react-compose-refs","kind":"import-statement","external":true},{"path":"@radix-ui/react-context","kind":"import-statement","external":true},{"path":"@radix-ui/react-use-controllable-state","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"src/components/SearchList/index.ts","kind":"import-statement","original":"../SearchList"}],"format":"esm"},"src/components/Listbox/index.ts":{"bytes":476,"imports":[{"path":"src/components/Listbox/Listbox.tsx","kind":"import-statement","original":"./Listbox"}],"format":"esm"},"src/components/index.ts":{"bytes":650,"imports":[{"path":"src/components/Combobox/index.ts","kind":"import-statement","original":"./Combobox"},{"path":"src/components/Listbox/index.ts","kind":"import-statement","original":"./Listbox"},{"path":"src/components/SearchList/index.ts","kind":"import-statement","original":"./SearchList"}],"format":"esm"},"src/index.ts":{"bytes":564,"imports":[{"path":"src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"src/translations.ts","kind":"import-statement","original":"./translations"}],"format":"esm"}},"outputs":{"dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":30670},"dist/lib/node-esm/index.mjs":{"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"@radix-ui/react-context","kind":"import-statement","external":true},{"path":"@radix-ui/react-use-controllable-state","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"cmdk","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"@radix-ui/react-compose-refs","kind":"import-statement","external":true},{"path":"@radix-ui/react-context","kind":"import-statement","external":true},{"path":"@radix-ui/react-use-controllable-state","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"exports":["Combobox","Listbox","SearchList","commandItem","createListboxScope","searchListItem","translationKey","translations","useListboxContext"],"entryPoint":"src/index.ts","inputs":{"src/components/Combobox/Combobox.tsx":{"bytesInOutput":6261},"src/components/SearchList/SearchList.tsx":{"bytesInOutput":3178},"src/translations.ts":{"bytesInOutput":173},"src/components/SearchList/index.ts":{"bytesInOutput":0},"src/components/Combobox/index.ts":{"bytesInOutput":0},"src/components/index.ts":{"bytesInOutput":0},"src/components/Listbox/Listbox.tsx":{"bytesInOutput":4724},"src/components/Listbox/index.ts":{"bytesInOutput":0},"src/index.ts":{"bytesInOutput":0}},"bytes":14856}}}
1
+ {"inputs":{"src/translations.ts":{"bytes":1226,"imports":[],"format":"esm"},"src/components/SearchList/context.ts":{"bytes":3162,"imports":[{"path":"@radix-ui/react-context","kind":"import-statement","external":true}],"format":"esm"},"src/components/SearchList/SearchList.tsx":{"bytes":49710,"imports":[{"path":"@radix-ui/react-use-controllable-state","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"src/translations.ts","kind":"import-statement","original":"../../translations"},{"path":"src/components/SearchList/context.ts","kind":"import-statement","original":"./context"}],"format":"esm"},"src/components/SearchList/hooks/useGlobalFilter.tsx":{"bytes":5067,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"src/components/SearchList/hooks/useSearchListInput.ts":{"bytes":2012,"imports":[{"path":"src/components/SearchList/context.ts","kind":"import-statement","original":"../context"}],"format":"esm"},"src/components/SearchList/hooks/useSearchListItem.ts":{"bytes":1753,"imports":[{"path":"src/components/SearchList/context.ts","kind":"import-statement","original":"../context"}],"format":"esm"},"src/components/SearchList/hooks/useSearchListResults.ts":{"bytes":9665,"imports":[{"path":"command-score","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"src/components/SearchList/hooks/index.ts":{"bytes":852,"imports":[{"path":"src/components/SearchList/hooks/useGlobalFilter.tsx","kind":"import-statement","original":"./useGlobalFilter"},{"path":"src/components/SearchList/hooks/useSearchListInput.ts","kind":"import-statement","original":"./useSearchListInput"},{"path":"src/components/SearchList/hooks/useSearchListItem.ts","kind":"import-statement","original":"./useSearchListItem"},{"path":"src/components/SearchList/hooks/useSearchListResults.ts","kind":"import-statement","original":"./useSearchListResults"}],"format":"esm"},"src/components/SearchList/index.ts":{"bytes":567,"imports":[{"path":"src/components/SearchList/SearchList.tsx","kind":"import-statement","original":"./SearchList"},{"path":"src/components/SearchList/hooks/index.ts","kind":"import-statement","original":"./hooks"}],"format":"esm"},"src/components/Combobox/Combobox.tsx":{"bytes":24920,"imports":[{"path":"@radix-ui/react-context","kind":"import-statement","external":true},{"path":"@radix-ui/react-use-controllable-state","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"src/components/SearchList/index.ts","kind":"import-statement","original":"../SearchList"}],"format":"esm"},"src/components/Combobox/index.ts":{"bytes":478,"imports":[{"path":"src/components/Combobox/Combobox.tsx","kind":"import-statement","original":"./Combobox"}],"format":"esm"},"src/components/Listbox/Listbox.tsx":{"bytes":19311,"imports":[{"path":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"@radix-ui/react-compose-refs","kind":"import-statement","external":true},{"path":"@radix-ui/react-context","kind":"import-statement","external":true},{"path":"@radix-ui/react-use-controllable-state","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true}],"format":"esm"},"src/components/Listbox/index.ts":{"bytes":476,"imports":[{"path":"src/components/Listbox/Listbox.tsx","kind":"import-statement","original":"./Listbox"}],"format":"esm"},"src/components/index.ts":{"bytes":650,"imports":[{"path":"src/components/Combobox/index.ts","kind":"import-statement","original":"./Combobox"},{"path":"src/components/Listbox/index.ts","kind":"import-statement","original":"./Listbox"},{"path":"src/components/SearchList/index.ts","kind":"import-statement","original":"./SearchList"}],"format":"esm"},"src/index.ts":{"bytes":564,"imports":[{"path":"src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"src/translations.ts","kind":"import-statement","original":"./translations"}],"format":"esm"}},"outputs":{"dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":62103},"dist/lib/node-esm/index.mjs":{"imports":[{"path":"@radix-ui/react-context","kind":"import-statement","external":true},{"path":"@radix-ui/react-use-controllable-state","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"@radix-ui/react-use-controllable-state","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"@radix-ui/react-context","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"command-score","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"@radix-ui/react-compose-refs","kind":"import-statement","external":true},{"path":"@radix-ui/react-context","kind":"import-statement","external":true},{"path":"@radix-ui/react-use-controllable-state","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true}],"exports":["Combobox","GlobalFilterProvider","Listbox","SearchList","createListboxScope","translationKey","translations","useGlobalFilter","useGlobalFilteredObjects","useListboxContext","useSearchListInput","useSearchListItem","useSearchListResults"],"entryPoint":"src/index.ts","inputs":{"src/components/Combobox/Combobox.tsx":{"bytesInOutput":5944},"src/components/SearchList/SearchList.tsx":{"bytesInOutput":11344},"src/translations.ts":{"bytesInOutput":179},"src/components/SearchList/context.ts":{"bytesInOutput":254},"src/components/SearchList/hooks/useGlobalFilter.tsx":{"bytesInOutput":737},"src/components/SearchList/hooks/useSearchListInput.ts":{"bytesInOutput":317},"src/components/SearchList/hooks/useSearchListItem.ts":{"bytesInOutput":212},"src/components/SearchList/hooks/useSearchListResults.ts":{"bytesInOutput":1614},"src/components/Listbox/Listbox.tsx":{"bytesInOutput":4368},"src/index.ts":{"bytesInOutput":0}},"bytes":25866}}}
@@ -1,5 +1,5 @@
1
1
  import React, { type PropsWithChildren } from 'react';
2
- import { type ButtonProps, type PopoverArrowProps, type PopoverContentProps, type PopoverVirtualTriggerProps } from '@dxos/react-ui';
2
+ import { type ButtonProps, Popover, type PopoverArrowProps, type PopoverContentProps, type PopoverVirtualTriggerProps } from '@dxos/react-ui';
3
3
  import { type SearchListContentProps, type SearchListEmptyProps, type SearchListInputProps, type SearchListItemProps, type SearchListRootProps } from '../SearchList';
4
4
  type ComboboxContextValue = {
5
5
  modalId: string;
@@ -16,17 +16,37 @@ type ComboboxRootProps = PropsWithChildren<Partial<ComboboxContextValue & {
16
16
  defaultValue: string;
17
17
  placeholder: string;
18
18
  }>>;
19
- type ComboboxContentProps = SearchListRootProps & PopoverContentProps;
19
+ type ComboboxContentProps = SearchListRootProps & PopoverContentProps & {
20
+ label?: string;
21
+ };
20
22
  type ComboboxTriggerProps = ButtonProps;
21
23
  type ComboboxVirtualTriggerProps = PopoverVirtualTriggerProps;
22
24
  type ComboboxInputProps = SearchListInputProps;
23
25
  type ComboboxListProps = SearchListContentProps;
24
- type ComboboxItemProps = SearchListItemProps;
26
+ type ComboboxItemProps = SearchListItemProps & {
27
+ /** Whether to close the popover when this item is selected. Defaults to true. */
28
+ closeOnSelect?: boolean;
29
+ };
25
30
  type ComboboxArrowProps = PopoverArrowProps;
26
31
  type ComboboxEmptyProps = SearchListEmptyProps;
32
+ type ComboboxPortalProps = React.ComponentPropsWithoutRef<typeof Popover.Portal>;
27
33
  export declare const Combobox: {
28
34
  Root: ({ modal, modalId: propsModalId, open: propsOpen, defaultOpen, onOpenChange: propsOnOpenChange, value: propsValue, defaultValue, onValueChange: propsOnValueChange, placeholder, children, }: ComboboxRootProps) => React.JSX.Element;
29
- Content: React.ForwardRefExoticComponent<Omit<ComboboxContentProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
35
+ Portal: React.FC<import("@dxos/react-ui").PopoverPortalProps>;
36
+ Content: React.ForwardRefExoticComponent<{
37
+ value?: string;
38
+ defaultValue?: string;
39
+ debounceMs?: number;
40
+ onSearch?: (query: string) => void;
41
+ } & {
42
+ children?: React.ReactNode | undefined;
43
+ } & Omit<import("@dxos/react-ui").PopoverContentTypeProps, "className"> & {
44
+ classNames?: import("@dxos/ui-types").ClassNameValue;
45
+ } & {
46
+ forceMount?: boolean;
47
+ } & {
48
+ label?: string;
49
+ } & React.RefAttributes<HTMLDivElement>>;
30
50
  Trigger: React.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
31
51
  VirtualTrigger: {
32
52
  (props: PopoverVirtualTriggerProps & {
@@ -35,10 +55,30 @@ export declare const Combobox: {
35
55
  displayName: string;
36
56
  };
37
57
  Input: React.ForwardRefExoticComponent<Omit<SearchListInputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
38
- List: React.ForwardRefExoticComponent<Omit<SearchListContentProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
39
- Item: React.ForwardRefExoticComponent<Omit<SearchListItemProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
58
+ List: React.ForwardRefExoticComponent<Omit<{
59
+ children?: React.ReactNode | undefined;
60
+ }, "className"> & {
61
+ classNames?: import("@dxos/ui-types").ClassNameValue;
62
+ } & React.RefAttributes<HTMLDivElement>>;
63
+ Item: React.ForwardRefExoticComponent<Omit<{
64
+ value: string;
65
+ label: string;
66
+ icon?: string;
67
+ checked?: boolean;
68
+ suffix?: string;
69
+ onSelect?: () => void;
70
+ disabled?: boolean;
71
+ }, "className"> & {
72
+ classNames?: import("@dxos/ui-types").ClassNameValue;
73
+ } & {
74
+ /** Whether to close the popover when this item is selected. Defaults to true. */
75
+ closeOnSelect?: boolean;
76
+ } & React.RefAttributes<HTMLDivElement>>;
40
77
  Arrow: React.ForwardRefExoticComponent<PopoverArrowProps & React.RefAttributes<SVGSVGElement>>;
41
- Empty: React.ForwardRefExoticComponent<Omit<SearchListEmptyProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
78
+ Empty: {
79
+ ({ classNames, children }: SearchListEmptyProps): React.JSX.Element;
80
+ displayName: string;
81
+ };
42
82
  };
43
- export type { ComboboxRootProps, ComboboxContentProps, ComboboxTriggerProps, ComboboxVirtualTriggerProps, ComboboxInputProps, ComboboxListProps, ComboboxItemProps, ComboboxArrowProps, ComboboxEmptyProps, };
83
+ export type { ComboboxRootProps, ComboboxPortalProps, ComboboxContentProps, ComboboxTriggerProps, ComboboxVirtualTriggerProps, ComboboxInputProps, ComboboxListProps, ComboboxItemProps, ComboboxArrowProps, ComboboxEmptyProps, };
44
84
  //# sourceMappingURL=Combobox.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Combobox.d.ts","sourceRoot":"","sources":["../../../../../src/components/Combobox/Combobox.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAA2B,MAAM,OAAO,CAAC;AAE/E,OAAO,EAEL,KAAK,WAAW,EAGhB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,0BAA0B,EAChC,MAAM,gBAAgB,CAAC;AAIxB,OAAO,EAEL,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACzB,MAAM,eAAe,CAAC;AAWvB,KAAK,oBAAoB,GAAG;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,IAAI,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAC1C,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;CAC5C,CAAC;AAQF,KAAK,iBAAiB,GAAG,iBAAiB,CACxC,OAAO,CAAC,oBAAoB,GAAG;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,WAAW,EAAE,OAAO,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,CAAC,CACpH,CAAC;AA+CF,KAAK,oBAAoB,GAAG,mBAAmB,GAAG,mBAAmB,CAAC;AAwEtE,KAAK,oBAAoB,GAAG,WAAW,CAAC;AA8CxC,KAAK,2BAA2B,GAAG,0BAA0B,CAAC;AAQ9D,KAAK,kBAAkB,GA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AAG;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,WAAW,EAAE,OAAO,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,CAAC,CACpH,CAAC;AA+CF,KAAK,oBAAoB,GAAG,mBAAmB,GAAG,mBAAmB,GAAG;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AA8E3F,KAAK,oBAAoB,GAAG,WAAW,CAAC;AA8CxC,KAAK,2BAA2B,GAAG,0BAA0B,CAAC;AAQ9D,KAAK,kBAAkB,GAAG,oBAAoB,CAAC;AAmB/C,KAAK,iBAAiB,GAAG,sBAAsB,CAAC;AAgBhD,KAAK,iBAAiB,GAAG,mBAAmB,GAAG;IAC7C,iFAAiF;IACjF,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC;AAiCF,KAAK,kBAAkB,GAAG,iBAAiB,CAAC;AAQ5C,KAAK,kBAAkB,GAAG,oBAAoB,CAAC;AAa/C,KAAK,mBAAmB,GAAG,KAAK,CAAC,wBAAwB,CAAC,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC;AAIjF,eAAO,MAAM,QAAQ;wMAtQlB,iBAAiB;;;;;;;;;;;;;;gBAkC8D,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;QAwKtF,iFAAiF;wBACjE,OAAO;;;;;;;CAsExB,CAAC;AAEF,YAAY,EACV,iBAAiB,EACjB,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACpB,2BAA2B,EAC3B,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,GACnB,CAAC"}
@@ -8,7 +8,7 @@ declare const meta: {
8
8
  parameters: {
9
9
  translations: [{
10
10
  readonly 'en-US': {
11
- readonly "react-ui-searchlist": {
11
+ readonly "@dxos/react-ui-searchlist": {
12
12
  readonly 'search.placeholder': "Search...";
13
13
  };
14
14
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Combobox.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Combobox/Combobox.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;AAmC1B,QAAA,MAAM,IAAI;;eAEoB,GAAG;;;;;;;;;;;;CAMI,CAAC;AAEtC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC"}
1
+ {"version":3,"file":"Combobox.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Combobox/Combobox.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;AAwC1B,QAAA,MAAM,IAAI;;eAEoB,GAAG;;;;;;;;;;;;CAMI,CAAC;AAEtC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Listbox.d.ts","sourceRoot":"","sources":["../../../../../src/components/Listbox/Listbox.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,KAAK,EAAsB,MAAM,yBAAyB,CAAC;AAEzE,OAAO,KAAK,EAAE,EAAE,KAAK,qBAAqB,EAA8C,MAAM,OAAO,CAAC;AAEtG,OAAO,EAAQ,KAAK,SAAS,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAc5E,KAAK,kBAAkB,CAAC,CAAC,IAAI,CAAC,GAAG;IAAE,cAAc,CAAC,EAAE,KAAK,CAAA;CAAE,CAAC;AAG5D,KAAK,kBAAkB,GAAG,eAAe,CAAC,qBAAqB,CAAC,IAAI,CAA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AC;AAG5D,KAAK,kBAAkB,GAAG,eAAe,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC,GAAG;IACvE,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,QAAA,MAA6B,kBAAkB,+CAAwC,CAAC;AAKxF,KAAK,mBAAmB,GAAG;IACzB,aAAa,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACxC,CAAC;AAOF,QAAA,MAAwB,iBAAiB,8FAA2D,CAAC;AAQrG,KAAK,gBAAgB,GAAG,eAAe,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC,GAAG;IACrE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAqHF,KAAK,2BAA2B,GAAG,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC;AA4B9F,eAAO,MAAM,OAAO;;;;;CAKnB,CAAC;AAEF,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,CAAC;AAEjD,YAAY,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,CAAC"}
@@ -8,7 +8,7 @@ declare const meta: {
8
8
  parameters: {
9
9
  translations: [{
10
10
  readonly 'en-US': {
11
- readonly "react-ui-searchlist": {
11
+ readonly "@dxos/react-ui-searchlist": {
12
12
  readonly 'search.placeholder': "Search...";
13
13
  };
14
14
  };
@@ -1,24 +1,87 @@
1
- import { CommandEmpty, CommandInput, CommandItem, CommandList, CommandRoot } from 'cmdk';
2
- import React, { type ComponentPropsWithRef } from 'react';
3
- import { type TextInputProps, type ThemedClassName } from '@dxos/react-ui';
4
- declare const commandItem = "flex items-center overflow-hidden";
5
- declare const searchListItem = "plb-1 pli-2 rounded-sm select-none cursor-pointer data-[selected]:bg-hoverOverlay hover:bg-hoverOverlay";
6
- type SearchListVariant = 'list' | 'menu' | 'listbox';
7
- type SearchListRootProps = ThemedClassName<ComponentPropsWithRef<typeof CommandRoot>> & {
8
- variant?: SearchListVariant;
9
- };
10
- type CommandInputPrimitiveProps = ComponentPropsWithRef<typeof CommandInput>;
11
- type SearchListInputProps = Omit<TextInputProps, 'value' | 'defaultValue' | 'onChange'> & Pick<CommandInputPrimitiveProps, 'value' | 'defaultValue' | 'onValueChange'>;
12
- type SearchListContentProps = ThemedClassName<ComponentPropsWithRef<typeof CommandList>>;
13
- type SearchListEmptyProps = ThemedClassName<ComponentPropsWithRef<typeof CommandEmpty>>;
14
- type SearchListItemProps = ThemedClassName<ComponentPropsWithRef<typeof CommandItem>>;
1
+ import React, { type ComponentPropsWithRef, type PropsWithChildren, type ReactNode } from 'react';
2
+ import { type Density, type Elevation, type ThemedClassName } from '@dxos/react-ui';
3
+ type SearchListRootProps = PropsWithChildren<{
4
+ /** Controlled query value. */
5
+ value?: string;
6
+ /** Default query value for uncontrolled mode. */
7
+ defaultValue?: string;
8
+ /** Debounce delay in milliseconds. */
9
+ debounceMs?: number;
10
+ /** Callback when search query changes (debounced). */
11
+ onSearch?: (query: string) => void;
12
+ }>;
13
+ type SearchListViewportProps = ThemedClassName<PropsWithChildren<{}>>;
14
+ type SearchListContentProps = ThemedClassName<PropsWithChildren<{}>>;
15
+ type InputVariant = 'default' | 'subdued';
16
+ type SearchListInputProps = ThemedClassName<Omit<ComponentPropsWithRef<'input'>, 'value'> & {
17
+ density?: Density;
18
+ elevation?: Elevation;
19
+ variant?: InputVariant;
20
+ }>;
21
+ type SearchListItemProps = ThemedClassName<{
22
+ /** Unique identifier for the item. */
23
+ value: string;
24
+ /** Display label for the item. */
25
+ label: string;
26
+ /** Icon to display (string identifier for Icon component). */
27
+ icon?: string;
28
+ /** Whether to show a check icon. */
29
+ checked?: boolean;
30
+ /** Suffix text to display after the label. */
31
+ suffix?: string;
32
+ /** Callback when item is selected. */
33
+ onSelect?: () => void;
34
+ /** Whether the item is disabled. */
35
+ disabled?: boolean;
36
+ }>;
37
+ type SearchListEmptyProps = ThemedClassName<PropsWithChildren<{}>>;
38
+ type SearchListGroupProps = ThemedClassName<PropsWithChildren<{
39
+ /** Heading for the group. */
40
+ heading?: ReactNode;
41
+ }>>;
15
42
  export declare const SearchList: {
16
- Root: React.ForwardRefExoticComponent<Omit<SearchListRootProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
43
+ Root: {
44
+ ({ children, value: valueProp, defaultValue, debounceMs, onSearch, }: SearchListRootProps): React.JSX.Element;
45
+ displayName: string;
46
+ };
47
+ Viewport: {
48
+ ({ classNames, children }: SearchListViewportProps): React.JSX.Element;
49
+ displayName: string;
50
+ };
51
+ Content: React.ForwardRefExoticComponent<Omit<{
52
+ children?: ReactNode | undefined;
53
+ }, "className"> & {
54
+ classNames?: import("@dxos/ui-types").ClassNameValue;
55
+ } & React.RefAttributes<HTMLDivElement>>;
17
56
  Input: React.ForwardRefExoticComponent<Omit<SearchListInputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
18
- Content: React.ForwardRefExoticComponent<Omit<SearchListContentProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
19
- Empty: React.ForwardRefExoticComponent<Omit<SearchListEmptyProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
20
- Item: React.ForwardRefExoticComponent<Omit<SearchListItemProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
57
+ Item: React.ForwardRefExoticComponent<Omit<{
58
+ /** Unique identifier for the item. */
59
+ value: string;
60
+ /** Display label for the item. */
61
+ label: string;
62
+ /** Icon to display (string identifier for Icon component). */
63
+ icon?: string;
64
+ /** Whether to show a check icon. */
65
+ checked?: boolean;
66
+ /** Suffix text to display after the label. */
67
+ suffix?: string;
68
+ /** Callback when item is selected. */
69
+ onSelect?: () => void;
70
+ /** Whether the item is disabled. */
71
+ disabled?: boolean;
72
+ }, "className"> & {
73
+ classNames?: import("@dxos/ui-types").ClassNameValue;
74
+ } & React.RefAttributes<HTMLDivElement>>;
75
+ Empty: {
76
+ ({ classNames, children }: SearchListEmptyProps): React.JSX.Element;
77
+ displayName: string;
78
+ };
79
+ Group: React.ForwardRefExoticComponent<Omit<React.PropsWithChildren<{
80
+ /** Heading for the group. */
81
+ heading?: ReactNode;
82
+ }>, "className"> & {
83
+ classNames?: import("@dxos/ui-types").ClassNameValue;
84
+ } & React.RefAttributes<HTMLDivElement>>;
21
85
  };
22
- export type { SearchListRootProps, SearchListInputProps, SearchListContentProps, SearchListEmptyProps, SearchListItemProps, };
23
- export { commandItem, searchListItem };
86
+ export type { SearchListRootProps, SearchListViewportProps, SearchListContentProps, SearchListInputProps, SearchListItemProps, SearchListEmptyProps, SearchListGroupProps, };
24
87
  //# sourceMappingURL=SearchList.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SearchList.d.ts","sourceRoot":"","sources":["../../../../../src/components/SearchList/SearchList.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AACzF,OAAO,KAAK,EAAE,EAAE,KAAK,qBAAqB,EAAc,MAAM,OAAO,CAAC;AAEtE,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,eAAe,EAKrB,MAAM,gBAAgB,CAAC;AAKxB,QAAA,MAAM,WAAW,sCAAsC,CAAC;AACxD,QAAA,MAAM,cAAc,4GACuF,CAAC;AAS5G,KAAK,iBAAiB,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;AAErD,KAAK,mBAAmB,GAAG,eAAe,CAAC,qBAAqB,CAAC,OAAO,WAAW,CAAC,CAAC,GAAG;IACtF,OAAO,CAAC,EAAE,iBAAiB,CAAC;CAC7B,CAAC;AAkBF,KAAK,0BA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C;kBAC1B,OAAO;QACjB,8CAA8C;iBACrC,MAAM;QACf,sCAAsC;mBAC3B,MAAM,IAAI;QACrB,oCAAoC;mBACzB,OAAO;;;;;mCA0E+B,oBAAoB;;;;QAgBnE,6BAA6B;kBACnB,SAAS;;;;CAoCtB,CAAC;AAEF,YAAY,EACV,mBAAmB,EACnB,uBAAuB,EACvB,sBAAsB,EACtB,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,GACrB,CAAC"}
@@ -1,18 +1,13 @@
1
1
  import { type StoryObj } from '@storybook/react-vite';
2
- import React from 'react';
3
- type StoryItems = Record<string, string>;
4
- type StoryProps = {
5
- items: StoryItems;
6
- };
7
2
  declare const meta: {
8
3
  title: string;
9
4
  component: any;
10
- render: ({ items }: StoryProps) => React.JSX.Element;
11
5
  decorators: import("@storybook/react").Decorator[];
12
6
  parameters: {
7
+ layout: string;
13
8
  translations: [{
14
9
  readonly 'en-US': {
15
- readonly "react-ui-searchlist": {
10
+ readonly "@dxos/react-ui-searchlist": {
16
11
  readonly 'search.placeholder': "Search...";
17
12
  };
18
13
  };
@@ -22,4 +17,12 @@ declare const meta: {
22
17
  export default meta;
23
18
  type Story = StoryObj<typeof meta>;
24
19
  export declare const Default: Story;
20
+ export declare const Controlled: Story;
21
+ export declare const CustomRendering: Story;
22
+ export declare const WithEmpty: Story;
23
+ export declare const WithoutViewport: Story;
24
+ export declare const WithIcons: Story;
25
+ export declare const CustomInputExample: Story;
26
+ export declare const WithDisabledItems: Story;
27
+ export declare const WithGroups: Story;
25
28
  //# sourceMappingURL=SearchList.stories.d.ts.map