@dxos/react-ui-searchlist 0.8.4-main.b97322e → 0.8.4-main.dedc0f3

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.
@@ -88,7 +88,7 @@ var SearchListItem = /* @__PURE__ */ forwardRef(({ children, classNames, onSelec
88
88
  return /* @__PURE__ */ React.createElement(CommandItem, {
89
89
  ...props,
90
90
  onSelect: handleSelect,
91
- className: mx("p-1 rounded select-none cursor-pointer data-[selected]:bg-hoverOverlay", classNames),
91
+ className: mx("p-1 pis-2 pie-2 rounded-sm select-none cursor-pointer data-[selected]:bg-hoverOverlay", classNames),
92
92
  ref: forwardedRef
93
93
  }, children);
94
94
  } finally {
@@ -216,14 +216,17 @@ var PopoverComboboxContent = /* @__PURE__ */ forwardRef2(({ side = "bottom", col
216
216
  onFocusOutside,
217
217
  onInteractOutside,
218
218
  forceMount,
219
- classNames,
219
+ classNames: [
220
+ "is-[--radix-popover-trigger-width] max-bs-[--radix-popover-content-available-height] grid grid-rows-[min-content_1fr] overflow-hidden",
221
+ classNames
222
+ ],
220
223
  id: modalId,
221
224
  ref: forwardedRef
222
- }, /* @__PURE__ */ React2.createElement(Popover.Viewport, null, /* @__PURE__ */ React2.createElement(SearchList.Root, {
225
+ }, /* @__PURE__ */ React2.createElement(SearchList.Root, {
223
226
  ...props,
224
227
  classNames: "contents density-fine",
225
228
  role: "none"
226
- }, children)));
229
+ }, children));
227
230
  } finally {
228
231
  _effect.f();
229
232
  }
@@ -249,7 +252,7 @@ var PopoverComboboxInput = /* @__PURE__ */ forwardRef2(({ classNames, ...props }
249
252
  return /* @__PURE__ */ React2.createElement(SearchList.Input, {
250
253
  ...props,
251
254
  classNames: [
252
- "mli-cardSpacingChrome mbs-cardSpacingChrome is-[calc(100%-2*var(--dx-cardSpacingChrome))]",
255
+ "mli-cardSpacingChrome mbs-cardSpacingChrome mbe-0 is-[calc(100%-2*var(--dx-cardSpacingChrome))]",
253
256
  classNames
254
257
  ],
255
258
  ref: forwardedRef
@@ -258,16 +261,17 @@ var PopoverComboboxInput = /* @__PURE__ */ forwardRef2(({ classNames, ...props }
258
261
  _effect.f();
259
262
  }
260
263
  });
261
- var PopoverComboboxList = /* @__PURE__ */ forwardRef2(({ constrainInline, constrainBlock, ...props }, forwardedRef) => {
264
+ var PopoverComboboxList = /* @__PURE__ */ forwardRef2(({ classNames, ...props }, forwardedRef) => {
262
265
  var _effect = _useSignals2();
263
266
  try {
264
- return /* @__PURE__ */ React2.createElement(Popover.Viewport, {
265
- constrainInline,
266
- constrainBlock
267
- }, /* @__PURE__ */ React2.createElement(SearchList.Content, {
267
+ return /* @__PURE__ */ React2.createElement(SearchList.Content, {
268
268
  ...props,
269
+ classNames: [
270
+ "min-bs-0 overflow-y-auto plb-cardSpacingChrome",
271
+ classNames
272
+ ],
269
273
  ref: forwardedRef
270
- }));
274
+ });
271
275
  } finally {
272
276
  _effect.f();
273
277
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/SearchList.tsx", "../../../src/composites/PopoverCombobox.tsx", "../../../src/translations.ts"],
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 { CommandEmpty, CommandInput, CommandItem, CommandList, CommandRoot } from 'cmdk';\nimport React, { type ComponentPropsWithRef, forwardRef, type PropsWithChildren, useCallback } from 'react';\n\nimport {\n Button,\n type ButtonProps,\n Icon,\n type TextInputProps,\n type ThemedClassName,\n useDensityContext,\n useElevationContext,\n useId,\n useThemeContext,\n} from '@dxos/react-ui';\nimport { mx, staticPlaceholderText } from '@dxos/react-ui-theme';\n\ntype SearchListVariant = 'list' | 'menu' | 'listbox';\n\ntype SearchListRootProps = ThemedClassName<ComponentPropsWithRef<typeof CommandRoot>> & {\n variant?: SearchListVariant;\n};\n\ntype ComboboxContextValue = {\n isCombobox: true;\n modalId: string;\n open: boolean;\n onOpenChange: (nextOpen: boolean) => void;\n value: string;\n onValueChange: (nextValue: string) => void;\n placeholder?: string;\n};\n\nconst COMBOBOX_NAME = 'Combobox';\nconst COMBOBOX_TRIGGER_NAME = 'ComboboxTrigger';\nconst SEARCHLIST_NAME = 'SearchList';\nconst SEARCHLIST_ITEM_NAME = 'SearchListItem';\n\nconst [ComboboxProvider, useComboboxContext] = createContext<Partial<ComboboxContextValue>>(COMBOBOX_NAME, {});\n\ntype ComboboxRootProps = PropsWithChildren<\n Partial<ComboboxContextValue & { defaultOpen: boolean; defaultValue: string; placeholder: string }>\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\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' | 'onValueChange' | 'defaultValue'>;\n\nconst SearchListInput = forwardRef<HTMLInputElement, SearchListInputProps>(\n ({ children, classNames, density: propsDensity, elevation: propsElevation, variant, ...props }, forwardedRef) => {\n // CHORE(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 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\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\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\ntype SearchListItemProps = ThemedClassName<ComponentPropsWithRef<typeof CommandItem>>;\n\nconst SearchListItem = forwardRef<HTMLDivElement, SearchListItemProps>(\n ({ children, classNames, onSelect, ...props }, forwardedRef) => {\n const { onValueChange, onOpenChange } = useComboboxContext(SEARCHLIST_ITEM_NAME);\n const handleSelect = useCallback(\n (nextValue: string) => {\n onValueChange?.(nextValue);\n onOpenChange?.(false);\n onSelect?.(nextValue);\n },\n [onValueChange, onOpenChange, onSelect],\n );\n return (\n <CommandItem\n {...props}\n onSelect={handleSelect}\n className={mx('p-1 rounded select-none cursor-pointer data-[selected]:bg-hoverOverlay', classNames)}\n ref={forwardedRef}\n >\n {children}\n </CommandItem>\n );\n },\n);\n\nSearchListItem.displayName = SEARCHLIST_ITEM_NAME;\n\nconst ComboboxRoot = ({\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 return (\n <ComboboxProvider\n isCombobox\n modalId={modalId}\n open={open}\n onOpenChange={onOpenChange}\n value={value}\n onValueChange={onValueChange}\n placeholder={placeholder}\n >\n {children}\n </ComboboxProvider>\n );\n};\n\nComboboxRoot.displayName = COMBOBOX_NAME;\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 return (\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 );\n },\n);\n\nComboboxTrigger.displayName = COMBOBOX_TRIGGER_NAME;\n\nexport const SearchList = {\n Root: SearchListRoot,\n Input: SearchListInput,\n Content: SearchListContent,\n Empty: SearchListEmpty,\n Item: SearchListItem,\n};\n\nexport const Combobox = {\n Root: ComboboxRoot,\n Trigger: ComboboxTrigger,\n useComboboxContext,\n};\n\nexport type {\n SearchListRootProps,\n SearchListInputProps,\n SearchListContentProps,\n SearchListEmptyProps,\n SearchListItemProps,\n ComboboxRootProps,\n ComboboxTriggerProps,\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport React, { forwardRef } from 'react';\n\nimport {\n Popover,\n type PopoverArrowProps,\n type PopoverContentProps,\n type PopoverViewportProps,\n type PopoverVirtualTriggerProps,\n} from '@dxos/react-ui';\n\nimport {\n Combobox,\n type ComboboxRootProps,\n type ComboboxTriggerProps,\n SearchList,\n type SearchListContentProps,\n type SearchListEmptyProps,\n type SearchListInputProps,\n type SearchListItemProps,\n type SearchListRootProps,\n} from '../components';\n\ntype PopoverComboboxRootProps = ComboboxRootProps & { modal?: boolean };\n\nconst PopoverComboboxRoot = ({\n modal,\n children,\n open: propsOpen,\n onOpenChange: propsOnOpenChange,\n defaultOpen,\n ...props\n}: PopoverComboboxRootProps) => {\n const [open, onOpenChange] = useControllableState({\n prop: propsOpen,\n onChange: propsOnOpenChange,\n defaultProp: defaultOpen,\n });\n return (\n <Combobox.Root open={open} onOpenChange={onOpenChange} {...props}>\n <Popover.Root open={open} onOpenChange={onOpenChange} modal={modal}>\n {children}\n </Popover.Root>\n </Combobox.Root>\n );\n};\n\ntype PopoverComboboxContentProps = SearchListRootProps & PopoverContentProps;\n\nconst POPOVER_COMBOBOX_CONTENT_NAME = 'PopoverComboboxContent';\n\nconst PopoverComboboxContent = forwardRef<HTMLDivElement, PopoverComboboxContentProps>(\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 } = Combobox.useComboboxContext(POPOVER_COMBOBOX_CONTENT_NAME);\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 classNames,\n }}\n id={modalId}\n ref={forwardedRef}\n >\n <Popover.Viewport>\n <SearchList.Root {...props} classNames='contents density-fine' role='none'>\n {children}\n </SearchList.Root>\n </Popover.Viewport>\n </Popover.Content>\n );\n },\n);\n\nPopoverComboboxContent.displayName = POPOVER_COMBOBOX_CONTENT_NAME;\n\ntype PopoverComboboxTriggerProps = ComboboxTriggerProps;\n\nconst PopoverComboboxTrigger = forwardRef<HTMLButtonElement, PopoverComboboxTriggerProps>((props, forwardedRef) => {\n return (\n <Popover.Trigger asChild>\n <Combobox.Trigger {...props} ref={forwardedRef} />\n </Popover.Trigger>\n );\n});\n\ntype PopoverComboboxVirtualTriggerProps = PopoverVirtualTriggerProps;\n\nconst PopoverComboboxVirtualTrigger = Popover.VirtualTrigger;\n\ntype PopoverComboboxInputProps = SearchListInputProps;\n\nconst PopoverComboboxInput = forwardRef<HTMLInputElement, PopoverComboboxInputProps>(\n ({ classNames, ...props }, forwardedRef) => {\n return (\n <SearchList.Input\n {...props}\n classNames={[\n 'mli-cardSpacingChrome mbs-cardSpacingChrome is-[calc(100%-2*var(--dx-cardSpacingChrome))]',\n classNames,\n ]}\n ref={forwardedRef}\n />\n );\n },\n);\n\ntype PopoverComboboxListProps = SearchListContentProps &\n Pick<PopoverViewportProps, 'constrainBlock' | 'constrainInline'>;\n\nconst PopoverComboboxList = forwardRef<HTMLDivElement, PopoverComboboxListProps>(\n ({ constrainInline, constrainBlock, ...props }, forwardedRef) => {\n return (\n <Popover.Viewport {...{ constrainInline, constrainBlock }}>\n <SearchList.Content {...props} ref={forwardedRef} />\n </Popover.Viewport>\n );\n },\n);\n\ntype PopoverComboboxItemProps = SearchListItemProps;\n\nconst PopoverComboboxItem = forwardRef<HTMLDivElement, PopoverComboboxItemProps>(\n ({ classNames, ...props }, forwardedRef) => {\n return (\n <SearchList.Item\n {...props}\n classNames={['mli-cardSpacingChrome pli-cardSpacingChrome', classNames]}\n ref={forwardedRef}\n />\n );\n },\n);\n\ntype PopoverComboboxArrowProps = PopoverArrowProps;\n\nconst PopoverComboboxArrow = Popover.Arrow;\n\ntype PopoverComboboxEmptyProps = SearchListEmptyProps;\n\nconst PopoverComboboxEmpty = SearchList.Empty;\n\nexport const PopoverCombobox = {\n Root: PopoverComboboxRoot,\n Content: PopoverComboboxContent,\n Trigger: PopoverComboboxTrigger,\n VirtualTrigger: PopoverComboboxVirtualTrigger,\n Input: PopoverComboboxInput,\n List: PopoverComboboxList,\n Item: PopoverComboboxItem,\n Arrow: PopoverComboboxArrow,\n Empty: PopoverComboboxEmpty,\n};\n\nexport type {\n PopoverComboboxRootProps,\n PopoverComboboxContentProps,\n PopoverComboboxTriggerProps,\n PopoverComboboxVirtualTriggerProps,\n PopoverComboboxInputProps,\n PopoverComboboxListProps,\n PopoverComboboxItemProps,\n PopoverComboboxArrowProps,\n PopoverComboboxEmptyProps,\n};\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 },\n },\n] as const satisfies Resource[];\n"],
5
- "mappings": ";;AAIA,SAASA,qBAAqB;AAC9B,SAASC,4BAA4B;AACrC,SAASC,cAAcC,cAAcC,aAAaC,aAAaC,mBAAmB;AAClF,OAAOC,SAAqCC,YAAoCC,mBAAmB;AAEnG,SACEC,QAEAC,MAGAC,mBACAC,qBACAC,OACAC,uBACK;AACP,SAASC,IAAIC,6BAA6B;AAkB1C,IAAMC,gBAAgB;AACtB,IAAMC,wBAAwB;AAC9B,IAAMC,kBAAkB;AACxB,IAAMC,uBAAuB;AAE7B,IAAM,CAACC,kBAAkBC,kBAAAA,IAAsBC,cAA6CN,eAAe,CAAC,CAAA;AAM5G,IAAMO,iBAAiBC,2BACrB,CAAC,EAAEC,UAAUC,YAAY,GAAGC,MAAAA,GAASC,iBAAAA;;;AACnC,WACE,sBAAA,cAACC,aAAAA;MAAa,GAAGF;MAAOG,WAAWC,GAAG,IAAIL,UAAAA;MAAaM,KAAKJ;OACzDH,QAAAA;;;;AAGP,CAAA;AAGFF,eA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uB5C,QAAQ6C;AAIrC,IAAMC,uBAAuBjB,WAAWkB;AAEjC,IAAMC,kBAAkB;EAC7BjD,MAAMf;EACNyC,SAASvB;EACT+B,SAASD;EACTI,gBAAgBD;EAChBG,OAAOD;EACPY,MAAMV;EACNI,MAAMD;EACNG,OAAOD;EACPG,OAAOD;AACT;;;AC7LO,IAAMI,iBAAiB;AAEvB,IAAMC,eAAe;EAC1B;IACE,SAAS;MACP,CAACD,cAAAA,GAAiB,CAAC;IACrB;EACF;;",
6
- "names": ["createContext", "useControllableState", "CommandEmpty", "CommandInput", "CommandItem", "CommandList", "CommandRoot", "React", "forwardRef", "useCallback", "Button", "Icon", "useDensityContext", "useElevationContext", "useId", "useThemeContext", "mx", "staticPlaceholderText", "COMBOBOX_NAME", "COMBOBOX_TRIGGER_NAME", "SEARCHLIST_NAME", "SEARCHLIST_ITEM_NAME", "ComboboxProvider", "useComboboxContext", "createContext", "SearchListRoot", "forwardRef", "children", "classNames", "props", "forwardedRef", "CommandRoot", "className", "mx", "ref", "displayName", "SearchListInput", "density", "propsDensity", "elevation", "propsElevation", "variant", "hasIosKeyboard", "useThemeContext", "tx", "useDensityContext", "useElevationContext", "CommandInput", "disabled", "autoFocus", "SearchListContent", "CommandList", "SearchListEmpty", "CommandEmpty", "SearchListItem", "onSelect", "onValueChange", "onOpenChange", "handleSelect", "useCallback", "nextValue", "CommandItem", "ComboboxRoot", "modalId", "propsModalId", "open", "propsOpen", "defaultOpen", "propsOnOpenChange", "value", "propsValue", "defaultValue", "propsOnValueChange", "placeholder", "useId", "useControllableState", "prop", "onChange", "defaultProp", "isCombobox", "ComboboxTrigger", "onClick", "handleClick", "event", "Button", "role", "aria-expanded", "aria-controls", "aria-haspopup", "span", "staticPlaceholderText", "Icon", "icon", "size", "SearchList", "Root", "Input", "Content", "Empty", "Item", "Combobox", "Trigger", "useControllableState", "React", "forwardRef", "Popover", "PopoverComboboxRoot", "modal", "children", "open", "propsOpen", "onOpenChange", "propsOnOpenChange", "defaultOpen", "props", "useControllableState", "prop", "onChange", "defaultProp", "React", "Combobox", "Root", "Popover", "POPOVER_COMBOBOX_CONTENT_NAME", "PopoverComboboxContent", "forwardRef", "side", "collisionPadding", "sideOffset", "align", "alignOffset", "avoidCollisions", "collisionBoundary", "arrowPadding", "sticky", "hideWhenDetached", "onOpenAutoFocus", "onCloseAutoFocus", "onEscapeKeyDown", "onPointerDownOutside", "onFocusOutside", "onInteractOutside", "forceMount", "classNames", "forwardedRef", "modalId", "useComboboxContext", "Content", "id", "ref", "Viewport", "SearchList", "role", "displayName", "PopoverComboboxTrigger", "Trigger", "asChild", "PopoverComboboxVirtualTrigger", "VirtualTrigger", "PopoverComboboxInput", "Input", "PopoverComboboxList", "constrainInline", "constrainBlock", "PopoverComboboxItem", "Item", "PopoverComboboxArrow", "Arrow", "PopoverComboboxEmpty", "Empty", "PopoverCombobox", "List", "translationKey", "translations"]
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 { CommandEmpty, CommandInput, CommandItem, CommandList, CommandRoot } from 'cmdk';\nimport React, { type ComponentPropsWithRef, type PropsWithChildren, forwardRef, useCallback } from 'react';\n\nimport {\n Button,\n type ButtonProps,\n Icon,\n type TextInputProps,\n type ThemedClassName,\n useDensityContext,\n useElevationContext,\n useId,\n useThemeContext,\n} from '@dxos/react-ui';\nimport { mx, staticPlaceholderText } from '@dxos/react-ui-theme';\n\ntype SearchListVariant = 'list' | 'menu' | 'listbox';\n\ntype SearchListRootProps = ThemedClassName<ComponentPropsWithRef<typeof CommandRoot>> & {\n variant?: SearchListVariant;\n};\n\ntype ComboboxContextValue = {\n isCombobox: true;\n modalId: string;\n open: boolean;\n onOpenChange: (nextOpen: boolean) => void;\n value: string;\n onValueChange: (nextValue: string) => void;\n placeholder?: string;\n};\n\nconst COMBOBOX_NAME = 'Combobox';\nconst COMBOBOX_TRIGGER_NAME = 'ComboboxTrigger';\nconst SEARCHLIST_NAME = 'SearchList';\nconst SEARCHLIST_ITEM_NAME = 'SearchListItem';\n\nconst [ComboboxProvider, useComboboxContext] = createContext<Partial<ComboboxContextValue>>(COMBOBOX_NAME, {});\n\ntype ComboboxRootProps = PropsWithChildren<\n Partial<ComboboxContextValue & { defaultOpen: boolean; defaultValue: string; placeholder: string }>\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\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' | 'onValueChange' | 'defaultValue'>;\n\nconst SearchListInput = forwardRef<HTMLInputElement, SearchListInputProps>(\n ({ children, classNames, density: propsDensity, elevation: propsElevation, variant, ...props }, forwardedRef) => {\n // CHORE(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 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\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\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\ntype SearchListItemProps = ThemedClassName<ComponentPropsWithRef<typeof CommandItem>>;\n\nconst SearchListItem = forwardRef<HTMLDivElement, SearchListItemProps>(\n ({ children, classNames, onSelect, ...props }, forwardedRef) => {\n const { onValueChange, onOpenChange } = useComboboxContext(SEARCHLIST_ITEM_NAME);\n const handleSelect = useCallback(\n (nextValue: string) => {\n onValueChange?.(nextValue);\n onOpenChange?.(false);\n onSelect?.(nextValue);\n },\n [onValueChange, onOpenChange, onSelect],\n );\n return (\n <CommandItem\n {...props}\n onSelect={handleSelect}\n className={mx(\n 'p-1 pis-2 pie-2 rounded-sm select-none cursor-pointer data-[selected]:bg-hoverOverlay',\n classNames,\n )}\n ref={forwardedRef}\n >\n {children}\n </CommandItem>\n );\n },\n);\n\nSearchListItem.displayName = SEARCHLIST_ITEM_NAME;\n\nconst ComboboxRoot = ({\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 return (\n <ComboboxProvider\n isCombobox\n modalId={modalId}\n open={open}\n onOpenChange={onOpenChange}\n value={value}\n onValueChange={onValueChange}\n placeholder={placeholder}\n >\n {children}\n </ComboboxProvider>\n );\n};\n\nComboboxRoot.displayName = COMBOBOX_NAME;\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 return (\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 );\n },\n);\n\nComboboxTrigger.displayName = COMBOBOX_TRIGGER_NAME;\n\nexport const SearchList = {\n Root: SearchListRoot,\n Input: SearchListInput,\n Content: SearchListContent,\n Empty: SearchListEmpty,\n Item: SearchListItem,\n};\n\nexport const Combobox = {\n Root: ComboboxRoot,\n Trigger: ComboboxTrigger,\n useComboboxContext,\n};\n\nexport type {\n SearchListRootProps,\n SearchListInputProps,\n SearchListContentProps,\n SearchListEmptyProps,\n SearchListItemProps,\n ComboboxRootProps,\n ComboboxTriggerProps,\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport React, { forwardRef } from 'react';\n\nimport {\n Popover,\n type PopoverArrowProps,\n type PopoverContentProps,\n type PopoverVirtualTriggerProps,\n} from '@dxos/react-ui';\n\nimport {\n Combobox,\n type ComboboxRootProps,\n type ComboboxTriggerProps,\n SearchList,\n type SearchListContentProps,\n type SearchListEmptyProps,\n type SearchListInputProps,\n type SearchListItemProps,\n type SearchListRootProps,\n} from '../components';\n\ntype PopoverComboboxRootProps = ComboboxRootProps & { modal?: boolean };\n\nconst PopoverComboboxRoot = ({\n modal,\n children,\n open: propsOpen,\n onOpenChange: propsOnOpenChange,\n defaultOpen,\n ...props\n}: PopoverComboboxRootProps) => {\n const [open, onOpenChange] = useControllableState({\n prop: propsOpen,\n onChange: propsOnOpenChange,\n defaultProp: defaultOpen,\n });\n return (\n <Combobox.Root open={open} onOpenChange={onOpenChange} {...props}>\n <Popover.Root open={open} onOpenChange={onOpenChange} modal={modal}>\n {children}\n </Popover.Root>\n </Combobox.Root>\n );\n};\n\ntype PopoverComboboxContentProps = SearchListRootProps & PopoverContentProps;\n\nconst POPOVER_COMBOBOX_CONTENT_NAME = 'PopoverComboboxContent';\n\nconst PopoverComboboxContent = forwardRef<HTMLDivElement, PopoverComboboxContentProps>(\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 } = Combobox.useComboboxContext(POPOVER_COMBOBOX_CONTENT_NAME);\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] overflow-hidden',\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\nPopoverComboboxContent.displayName = POPOVER_COMBOBOX_CONTENT_NAME;\n\ntype PopoverComboboxTriggerProps = ComboboxTriggerProps;\n\nconst PopoverComboboxTrigger = forwardRef<HTMLButtonElement, PopoverComboboxTriggerProps>((props, forwardedRef) => {\n return (\n <Popover.Trigger asChild>\n <Combobox.Trigger {...props} ref={forwardedRef} />\n </Popover.Trigger>\n );\n});\n\ntype PopoverComboboxVirtualTriggerProps = PopoverVirtualTriggerProps;\n\nconst PopoverComboboxVirtualTrigger = Popover.VirtualTrigger;\n\ntype PopoverComboboxInputProps = SearchListInputProps;\n\nconst PopoverComboboxInput = forwardRef<HTMLInputElement, PopoverComboboxInputProps>(\n ({ 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\ntype PopoverComboboxListProps = SearchListContentProps;\n\nconst PopoverComboboxList = forwardRef<HTMLDivElement, PopoverComboboxListProps>(\n ({ 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\ntype PopoverComboboxItemProps = SearchListItemProps;\n\nconst PopoverComboboxItem = forwardRef<HTMLDivElement, PopoverComboboxItemProps>(\n ({ classNames, ...props }, forwardedRef) => {\n return (\n <SearchList.Item\n {...props}\n classNames={['mli-cardSpacingChrome pli-cardSpacingChrome', classNames]}\n ref={forwardedRef}\n />\n );\n },\n);\n\ntype PopoverComboboxArrowProps = PopoverArrowProps;\n\nconst PopoverComboboxArrow = Popover.Arrow;\n\ntype PopoverComboboxEmptyProps = SearchListEmptyProps;\n\nconst PopoverComboboxEmpty = SearchList.Empty;\n\nexport const PopoverCombobox = {\n Root: PopoverComboboxRoot,\n Content: PopoverComboboxContent,\n Trigger: PopoverComboboxTrigger,\n VirtualTrigger: PopoverComboboxVirtualTrigger,\n Input: PopoverComboboxInput,\n List: PopoverComboboxList,\n Item: PopoverComboboxItem,\n Arrow: PopoverComboboxArrow,\n Empty: PopoverComboboxEmpty,\n};\n\nexport type {\n PopoverComboboxRootProps,\n PopoverComboboxContentProps,\n PopoverComboboxTriggerProps,\n PopoverComboboxVirtualTriggerProps,\n PopoverComboboxInputProps,\n PopoverComboboxListProps,\n PopoverComboboxItemProps,\n PopoverComboboxArrowProps,\n PopoverComboboxEmptyProps,\n};\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 },\n },\n] as const satisfies Resource[];\n"],
5
+ "mappings": ";;AAIA,SAASA,qBAAqB;AAC9B,SAASC,4BAA4B;AACrC,SAASC,cAAcC,cAAcC,aAAaC,aAAaC,mBAAmB;AAClF,OAAOC,SAA6DC,YAAYC,mBAAmB;AAEnG,SACEC,QAEAC,MAGAC,mBACAC,qBACAC,OACAC,uBACK;AACP,SAASC,IAAIC,6BAA6B;AAkB1C,IAAMC,gBAAgB;AACtB,IAAMC,wBAAwB;AAC9B,IAAMC,kBAAkB;AACxB,IAAMC,uBAAuB;AAE7B,IAAM,CAACC,kBAAkBC,kBAAAA,IAAsBC,cAA6CN,eAAe,CAAC,CAAA;AAM5G,IAAMO,iBAAiBC,2BACrB,CAAC,EAAEC,UAAUC,YAAY,GAAGC,MAAAA,GAASC,iBAAAA;;;AACnC,WACE,sBAAA,cAACC,aAAAA;MAAa,GAAGF;MAAOG,WAAWC,GAAG,IAAIL,UAAAA;MAAaM,KAAKJ;OACzDH,QAAAA;;;;AAGP,CAAA;AAGFF,eAAeU,cAAcf;AAQ7B,IAAMgB,kBAAkBV,2BACtB,CAAC,EAAEC,UAAUC,YAAYS,SAASC,cAAcC,WAAWC,gBAAgBC,SAAS,G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OAAOD;AACT;;;AC9LO,IAAMI,iBAAiB;AAEvB,IAAMC,eAAe;EAC1B;IACE,SAAS;MACP,CAACD,cAAAA,GAAiB,CAAC;IACrB;EACF;;",
6
+ "names": ["createContext", "useControllableState", "CommandEmpty", "CommandInput", "CommandItem", "CommandList", "CommandRoot", "React", "forwardRef", "useCallback", "Button", "Icon", "useDensityContext", "useElevationContext", "useId", "useThemeContext", "mx", "staticPlaceholderText", "COMBOBOX_NAME", "COMBOBOX_TRIGGER_NAME", "SEARCHLIST_NAME", "SEARCHLIST_ITEM_NAME", "ComboboxProvider", "useComboboxContext", "createContext", "SearchListRoot", "forwardRef", "children", "classNames", "props", "forwardedRef", "CommandRoot", "className", "mx", "ref", "displayName", "SearchListInput", "density", "propsDensity", "elevation", "propsElevation", "variant", "hasIosKeyboard", "useThemeContext", "tx", "useDensityContext", "useElevationContext", "CommandInput", "disabled", "autoFocus", "SearchListContent", "CommandList", "SearchListEmpty", "CommandEmpty", "SearchListItem", "onSelect", "onValueChange", "onOpenChange", "handleSelect", "useCallback", "nextValue", "CommandItem", "ComboboxRoot", "modalId", "propsModalId", "open", "propsOpen", "defaultOpen", "propsOnOpenChange", "value", "propsValue", "defaultValue", "propsOnValueChange", "placeholder", "useId", "useControllableState", "prop", "onChange", "defaultProp", "isCombobox", "ComboboxTrigger", "onClick", "handleClick", "event", "Button", "role", "aria-expanded", "aria-controls", "aria-haspopup", "span", "staticPlaceholderText", "Icon", "icon", "size", "SearchList", "Root", "Input", "Content", "Empty", "Item", "Combobox", "Trigger", "useControllableState", "React", "forwardRef", "Popover", "PopoverComboboxRoot", "modal", "children", "open", "propsOpen", "onOpenChange", "propsOnOpenChange", "defaultOpen", "props", "useControllableState", "prop", "onChange", "defaultProp", "React", "Combobox", "Root", "Popover", "POPOVER_COMBOBOX_CONTENT_NAME", "PopoverComboboxContent", "forwardRef", "side", "collisionPadding", "sideOffset", "align", "alignOffset", "avoidCollisions", "collisionBoundary", "arrowPadding", "sticky", "hideWhenDetached", "onOpenAutoFocus", "onCloseAutoFocus", "onEscapeKeyDown", "onPointerDownOutside", "onFocusOutside", "onInteractOutside", "forceMount", "classNames", "forwardedRef", "modalId", "useComboboxContext", "Content", "id", "ref", "SearchList", "role", "displayName", "PopoverComboboxTrigger", "Trigger", "asChild", "PopoverComboboxVirtualTrigger", "VirtualTrigger", "PopoverComboboxInput", "Input", "PopoverComboboxList", "PopoverComboboxItem", "Item", "PopoverComboboxArrow", "Arrow", "PopoverComboboxEmpty", "Empty", "PopoverCombobox", "List", "translationKey", "translations"]
7
7
  }
@@ -1 +1 @@
1
- {"inputs":{"src/components/SearchList.tsx":{"bytes":22289,"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":"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}],"format":"esm"},"src/components/index.ts":{"bytes":475,"imports":[{"path":"src/components/SearchList.tsx","kind":"import-statement","original":"./SearchList"}],"format":"esm"},"src/composites/PopoverCombobox.tsx":{"bytes":16763,"imports":[{"path":"@preact-signals/safe-react/tracking","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":"src/components/index.ts","kind":"import-statement","original":"../components"}],"format":"esm"},"src/composites/index.ts":{"bytes":488,"imports":[{"path":"src/composites/PopoverCombobox.tsx","kind":"import-statement","original":"./PopoverCombobox"}],"format":"esm"},"src/translations.ts":{"bytes":1061,"imports":[],"format":"esm"},"src/index.ts":{"bytes":658,"imports":[{"path":"src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"src/composites/index.ts","kind":"import-statement","original":"./composites"},{"path":"src/translations.ts","kind":"import-statement","original":"./translations"}],"format":"esm"}},"outputs":{"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":21229},"dist/lib/browser/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":"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":"@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}],"exports":["Combobox","PopoverCombobox","SearchList","translationKey","translations"],"entryPoint":"src/index.ts","inputs":{"src/components/SearchList.tsx":{"bytesInOutput":5714},"src/components/index.ts":{"bytesInOutput":0},"src/index.ts":{"bytesInOutput":0},"src/composites/PopoverCombobox.tsx":{"bytesInOutput":4364},"src/composites/index.ts":{"bytesInOutput":0},"src/translations.ts":{"bytesInOutput":124}},"bytes":10423}}}
1
+ {"inputs":{"src/components/SearchList.tsx":{"bytes":22368,"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":"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}],"format":"esm"},"src/components/index.ts":{"bytes":475,"imports":[{"path":"src/components/SearchList.tsx","kind":"import-statement","original":"./SearchList"}],"format":"esm"},"src/composites/PopoverCombobox.tsx":{"bytes":16818,"imports":[{"path":"@preact-signals/safe-react/tracking","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":"src/components/index.ts","kind":"import-statement","original":"../components"}],"format":"esm"},"src/composites/index.ts":{"bytes":488,"imports":[{"path":"src/composites/PopoverCombobox.tsx","kind":"import-statement","original":"./PopoverCombobox"}],"format":"esm"},"src/translations.ts":{"bytes":1061,"imports":[],"format":"esm"},"src/index.ts":{"bytes":658,"imports":[{"path":"src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"src/composites/index.ts","kind":"import-statement","original":"./composites"},{"path":"src/translations.ts","kind":"import-statement","original":"./translations"}],"format":"esm"}},"outputs":{"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":21179},"dist/lib/browser/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":"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":"@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}],"exports":["Combobox","PopoverCombobox","SearchList","translationKey","translations"],"entryPoint":"src/index.ts","inputs":{"src/components/SearchList.tsx":{"bytesInOutput":5729},"src/components/index.ts":{"bytesInOutput":0},"src/index.ts":{"bytesInOutput":0},"src/composites/PopoverCombobox.tsx":{"bytesInOutput":4459},"src/composites/index.ts":{"bytesInOutput":0},"src/translations.ts":{"bytesInOutput":124}},"bytes":10533}}}
@@ -90,7 +90,7 @@ var SearchListItem = /* @__PURE__ */ forwardRef(({ children, classNames, onSelec
90
90
  return /* @__PURE__ */ React.createElement(CommandItem, {
91
91
  ...props,
92
92
  onSelect: handleSelect,
93
- className: mx("p-1 rounded select-none cursor-pointer data-[selected]:bg-hoverOverlay", classNames),
93
+ className: mx("p-1 pis-2 pie-2 rounded-sm select-none cursor-pointer data-[selected]:bg-hoverOverlay", classNames),
94
94
  ref: forwardedRef
95
95
  }, children);
96
96
  } finally {
@@ -218,14 +218,17 @@ var PopoverComboboxContent = /* @__PURE__ */ forwardRef2(({ side = "bottom", col
218
218
  onFocusOutside,
219
219
  onInteractOutside,
220
220
  forceMount,
221
- classNames,
221
+ classNames: [
222
+ "is-[--radix-popover-trigger-width] max-bs-[--radix-popover-content-available-height] grid grid-rows-[min-content_1fr] overflow-hidden",
223
+ classNames
224
+ ],
222
225
  id: modalId,
223
226
  ref: forwardedRef
224
- }, /* @__PURE__ */ React2.createElement(Popover.Viewport, null, /* @__PURE__ */ React2.createElement(SearchList.Root, {
227
+ }, /* @__PURE__ */ React2.createElement(SearchList.Root, {
225
228
  ...props,
226
229
  classNames: "contents density-fine",
227
230
  role: "none"
228
- }, children)));
231
+ }, children));
229
232
  } finally {
230
233
  _effect.f();
231
234
  }
@@ -251,7 +254,7 @@ var PopoverComboboxInput = /* @__PURE__ */ forwardRef2(({ classNames, ...props }
251
254
  return /* @__PURE__ */ React2.createElement(SearchList.Input, {
252
255
  ...props,
253
256
  classNames: [
254
- "mli-cardSpacingChrome mbs-cardSpacingChrome is-[calc(100%-2*var(--dx-cardSpacingChrome))]",
257
+ "mli-cardSpacingChrome mbs-cardSpacingChrome mbe-0 is-[calc(100%-2*var(--dx-cardSpacingChrome))]",
255
258
  classNames
256
259
  ],
257
260
  ref: forwardedRef
@@ -260,16 +263,17 @@ var PopoverComboboxInput = /* @__PURE__ */ forwardRef2(({ classNames, ...props }
260
263
  _effect.f();
261
264
  }
262
265
  });
263
- var PopoverComboboxList = /* @__PURE__ */ forwardRef2(({ constrainInline, constrainBlock, ...props }, forwardedRef) => {
266
+ var PopoverComboboxList = /* @__PURE__ */ forwardRef2(({ classNames, ...props }, forwardedRef) => {
264
267
  var _effect = _useSignals2();
265
268
  try {
266
- return /* @__PURE__ */ React2.createElement(Popover.Viewport, {
267
- constrainInline,
268
- constrainBlock
269
- }, /* @__PURE__ */ React2.createElement(SearchList.Content, {
269
+ return /* @__PURE__ */ React2.createElement(SearchList.Content, {
270
270
  ...props,
271
+ classNames: [
272
+ "min-bs-0 overflow-y-auto plb-cardSpacingChrome",
273
+ classNames
274
+ ],
271
275
  ref: forwardedRef
272
- }));
276
+ });
273
277
  } finally {
274
278
  _effect.f();
275
279
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/SearchList.tsx", "../../../src/composites/PopoverCombobox.tsx", "../../../src/translations.ts"],
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 { CommandEmpty, CommandInput, CommandItem, CommandList, CommandRoot } from 'cmdk';\nimport React, { type ComponentPropsWithRef, forwardRef, type PropsWithChildren, useCallback } from 'react';\n\nimport {\n Button,\n type ButtonProps,\n Icon,\n type TextInputProps,\n type ThemedClassName,\n useDensityContext,\n useElevationContext,\n useId,\n useThemeContext,\n} from '@dxos/react-ui';\nimport { mx, staticPlaceholderText } from '@dxos/react-ui-theme';\n\ntype SearchListVariant = 'list' | 'menu' | 'listbox';\n\ntype SearchListRootProps = ThemedClassName<ComponentPropsWithRef<typeof CommandRoot>> & {\n variant?: SearchListVariant;\n};\n\ntype ComboboxContextValue = {\n isCombobox: true;\n modalId: string;\n open: boolean;\n onOpenChange: (nextOpen: boolean) => void;\n value: string;\n onValueChange: (nextValue: string) => void;\n placeholder?: string;\n};\n\nconst COMBOBOX_NAME = 'Combobox';\nconst COMBOBOX_TRIGGER_NAME = 'ComboboxTrigger';\nconst SEARCHLIST_NAME = 'SearchList';\nconst SEARCHLIST_ITEM_NAME = 'SearchListItem';\n\nconst [ComboboxProvider, useComboboxContext] = createContext<Partial<ComboboxContextValue>>(COMBOBOX_NAME, {});\n\ntype ComboboxRootProps = PropsWithChildren<\n Partial<ComboboxContextValue & { defaultOpen: boolean; defaultValue: string; placeholder: string }>\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\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' | 'onValueChange' | 'defaultValue'>;\n\nconst SearchListInput = forwardRef<HTMLInputElement, SearchListInputProps>(\n ({ children, classNames, density: propsDensity, elevation: propsElevation, variant, ...props }, forwardedRef) => {\n // CHORE(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 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\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\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\ntype SearchListItemProps = ThemedClassName<ComponentPropsWithRef<typeof CommandItem>>;\n\nconst SearchListItem = forwardRef<HTMLDivElement, SearchListItemProps>(\n ({ children, classNames, onSelect, ...props }, forwardedRef) => {\n const { onValueChange, onOpenChange } = useComboboxContext(SEARCHLIST_ITEM_NAME);\n const handleSelect = useCallback(\n (nextValue: string) => {\n onValueChange?.(nextValue);\n onOpenChange?.(false);\n onSelect?.(nextValue);\n },\n [onValueChange, onOpenChange, onSelect],\n );\n return (\n <CommandItem\n {...props}\n onSelect={handleSelect}\n className={mx('p-1 rounded select-none cursor-pointer data-[selected]:bg-hoverOverlay', classNames)}\n ref={forwardedRef}\n >\n {children}\n </CommandItem>\n );\n },\n);\n\nSearchListItem.displayName = SEARCHLIST_ITEM_NAME;\n\nconst ComboboxRoot = ({\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 return (\n <ComboboxProvider\n isCombobox\n modalId={modalId}\n open={open}\n onOpenChange={onOpenChange}\n value={value}\n onValueChange={onValueChange}\n placeholder={placeholder}\n >\n {children}\n </ComboboxProvider>\n );\n};\n\nComboboxRoot.displayName = COMBOBOX_NAME;\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 return (\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 );\n },\n);\n\nComboboxTrigger.displayName = COMBOBOX_TRIGGER_NAME;\n\nexport const SearchList = {\n Root: SearchListRoot,\n Input: SearchListInput,\n Content: SearchListContent,\n Empty: SearchListEmpty,\n Item: SearchListItem,\n};\n\nexport const Combobox = {\n Root: ComboboxRoot,\n Trigger: ComboboxTrigger,\n useComboboxContext,\n};\n\nexport type {\n SearchListRootProps,\n SearchListInputProps,\n SearchListContentProps,\n SearchListEmptyProps,\n SearchListItemProps,\n ComboboxRootProps,\n ComboboxTriggerProps,\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport React, { forwardRef } from 'react';\n\nimport {\n Popover,\n type PopoverArrowProps,\n type PopoverContentProps,\n type PopoverViewportProps,\n type PopoverVirtualTriggerProps,\n} from '@dxos/react-ui';\n\nimport {\n Combobox,\n type ComboboxRootProps,\n type ComboboxTriggerProps,\n SearchList,\n type SearchListContentProps,\n type SearchListEmptyProps,\n type SearchListInputProps,\n type SearchListItemProps,\n type SearchListRootProps,\n} from '../components';\n\ntype PopoverComboboxRootProps = ComboboxRootProps & { modal?: boolean };\n\nconst PopoverComboboxRoot = ({\n modal,\n children,\n open: propsOpen,\n onOpenChange: propsOnOpenChange,\n defaultOpen,\n ...props\n}: PopoverComboboxRootProps) => {\n const [open, onOpenChange] = useControllableState({\n prop: propsOpen,\n onChange: propsOnOpenChange,\n defaultProp: defaultOpen,\n });\n return (\n <Combobox.Root open={open} onOpenChange={onOpenChange} {...props}>\n <Popover.Root open={open} onOpenChange={onOpenChange} modal={modal}>\n {children}\n </Popover.Root>\n </Combobox.Root>\n );\n};\n\ntype PopoverComboboxContentProps = SearchListRootProps & PopoverContentProps;\n\nconst POPOVER_COMBOBOX_CONTENT_NAME = 'PopoverComboboxContent';\n\nconst PopoverComboboxContent = forwardRef<HTMLDivElement, PopoverComboboxContentProps>(\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 } = Combobox.useComboboxContext(POPOVER_COMBOBOX_CONTENT_NAME);\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 classNames,\n }}\n id={modalId}\n ref={forwardedRef}\n >\n <Popover.Viewport>\n <SearchList.Root {...props} classNames='contents density-fine' role='none'>\n {children}\n </SearchList.Root>\n </Popover.Viewport>\n </Popover.Content>\n );\n },\n);\n\nPopoverComboboxContent.displayName = POPOVER_COMBOBOX_CONTENT_NAME;\n\ntype PopoverComboboxTriggerProps = ComboboxTriggerProps;\n\nconst PopoverComboboxTrigger = forwardRef<HTMLButtonElement, PopoverComboboxTriggerProps>((props, forwardedRef) => {\n return (\n <Popover.Trigger asChild>\n <Combobox.Trigger {...props} ref={forwardedRef} />\n </Popover.Trigger>\n );\n});\n\ntype PopoverComboboxVirtualTriggerProps = PopoverVirtualTriggerProps;\n\nconst PopoverComboboxVirtualTrigger = Popover.VirtualTrigger;\n\ntype PopoverComboboxInputProps = SearchListInputProps;\n\nconst PopoverComboboxInput = forwardRef<HTMLInputElement, PopoverComboboxInputProps>(\n ({ classNames, ...props }, forwardedRef) => {\n return (\n <SearchList.Input\n {...props}\n classNames={[\n 'mli-cardSpacingChrome mbs-cardSpacingChrome is-[calc(100%-2*var(--dx-cardSpacingChrome))]',\n classNames,\n ]}\n ref={forwardedRef}\n />\n );\n },\n);\n\ntype PopoverComboboxListProps = SearchListContentProps &\n Pick<PopoverViewportProps, 'constrainBlock' | 'constrainInline'>;\n\nconst PopoverComboboxList = forwardRef<HTMLDivElement, PopoverComboboxListProps>(\n ({ constrainInline, constrainBlock, ...props }, forwardedRef) => {\n return (\n <Popover.Viewport {...{ constrainInline, constrainBlock }}>\n <SearchList.Content {...props} ref={forwardedRef} />\n </Popover.Viewport>\n );\n },\n);\n\ntype PopoverComboboxItemProps = SearchListItemProps;\n\nconst PopoverComboboxItem = forwardRef<HTMLDivElement, PopoverComboboxItemProps>(\n ({ classNames, ...props }, forwardedRef) => {\n return (\n <SearchList.Item\n {...props}\n classNames={['mli-cardSpacingChrome pli-cardSpacingChrome', classNames]}\n ref={forwardedRef}\n />\n );\n },\n);\n\ntype PopoverComboboxArrowProps = PopoverArrowProps;\n\nconst PopoverComboboxArrow = Popover.Arrow;\n\ntype PopoverComboboxEmptyProps = SearchListEmptyProps;\n\nconst PopoverComboboxEmpty = SearchList.Empty;\n\nexport const PopoverCombobox = {\n Root: PopoverComboboxRoot,\n Content: PopoverComboboxContent,\n Trigger: PopoverComboboxTrigger,\n VirtualTrigger: PopoverComboboxVirtualTrigger,\n Input: PopoverComboboxInput,\n List: PopoverComboboxList,\n Item: PopoverComboboxItem,\n Arrow: PopoverComboboxArrow,\n Empty: PopoverComboboxEmpty,\n};\n\nexport type {\n PopoverComboboxRootProps,\n PopoverComboboxContentProps,\n PopoverComboboxTriggerProps,\n PopoverComboboxVirtualTriggerProps,\n PopoverComboboxInputProps,\n PopoverComboboxListProps,\n PopoverComboboxItemProps,\n PopoverComboboxArrowProps,\n PopoverComboboxEmptyProps,\n};\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 },\n },\n] as const satisfies Resource[];\n"],
5
- "mappings": ";;;;AAIA,SAASA,qBAAqB;AAC9B,SAASC,4BAA4B;AACrC,SAASC,cAAcC,cAAcC,aAAaC,aAAaC,mBAAmB;AAClF,OAAOC,SAAqCC,YAAoCC,mBAAmB;AAEnG,SACEC,QAEAC,MAGAC,mBACAC,qBACAC,OACAC,uBACK;AACP,SAASC,IAAIC,6BAA6B;AAkB1C,IAAMC,gBAAgB;AACtB,IAAMC,wBAAwB;AAC9B,IAAMC,kBAAkB;AACxB,IAAMC,uBAAuB;AAE7B,IAAM,CAACC,kBAAkBC,kBAAAA,IAAsBC,cAA6CN,eAAe,CAAC,CAAA;AAM5G,IAAMO,iBAAiBC,2BACrB,CAAC,EAAEC,UAAUC,YAAY,GAAGC,MAAAA,GAASC,iBAAAA;;;AACnC,WACE,sBAAA,cAACC,aAAAA;MAAa,GAAGF;MAAOG,WAAWC,GAAG,IAAIL,UAAAA;MAAaM,KAAKJ;OACzDH,QAAAA;;;;AAGP,CAAA;AAGFF,eAAeU,cAAcf;AAQ7B,IAAMgB,kBAAkBV,2BACtB,CAAC,EAAEC,UAAUC,YAAYS,SAASC,cAAcC,WAAWC,gBAAgBC,SAAS,GAAGZ,MAAAA,GAASC,iBAAAA;;;AAE9F,UAAM,EAAEY,eAAc,IAAKC,gBAAAA;AAC3B,UAAM,EAAEC,GAAE,IAAKD,gBAAAA;AACf,UA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vB,IAAMC,eAAe;EAC1B;IACE,SAAS;MACP,CAACD,cAAAA,GAAiB,CAAC;IACrB;EACF;;",
6
- "names": ["createContext", "useControllableState", "CommandEmpty", "CommandInput", "CommandItem", "CommandList", "CommandRoot", "React", "forwardRef", "useCallback", "Button", "Icon", "useDensityContext", "useElevationContext", "useId", "useThemeContext", "mx", "staticPlaceholderText", "COMBOBOX_NAME", "COMBOBOX_TRIGGER_NAME", "SEARCHLIST_NAME", "SEARCHLIST_ITEM_NAME", "ComboboxProvider", "useComboboxContext", "createContext", "SearchListRoot", "forwardRef", "children", "classNames", "props", "forwardedRef", "CommandRoot", "className", "mx", "ref", "displayName", "SearchListInput", "density", "propsDensity", "elevation", "propsElevation", "variant", "hasIosKeyboard", "useThemeContext", "tx", "useDensityContext", "useElevationContext", "CommandInput", "disabled", "autoFocus", "SearchListContent", "CommandList", "SearchListEmpty", "CommandEmpty", "SearchListItem", "onSelect", "onValueChange", "onOpenChange", "handleSelect", "useCallback", "nextValue", "CommandItem", "ComboboxRoot", "modalId", "propsModalId", "open", "propsOpen", "defaultOpen", "propsOnOpenChange", "value", "propsValue", "defaultValue", "propsOnValueChange", "placeholder", "useId", "useControllableState", "prop", "onChange", "defaultProp", "isCombobox", "ComboboxTrigger", "onClick", "handleClick", "event", "Button", "role", "aria-expanded", "aria-controls", "aria-haspopup", "span", "staticPlaceholderText", "Icon", "icon", "size", "SearchList", "Root", "Input", "Content", "Empty", "Item", "Combobox", "Trigger", "useControllableState", "React", "forwardRef", "Popover", "PopoverComboboxRoot", "modal", "children", "open", "propsOpen", "onOpenChange", "propsOnOpenChange", "defaultOpen", "props", "useControllableState", "prop", "onChange", "defaultProp", "React", "Combobox", "Root", "Popover", "POPOVER_COMBOBOX_CONTENT_NAME", "PopoverComboboxContent", "forwardRef", "side", "collisionPadding", "sideOffset", "align", "alignOffset", "avoidCollisions", "collisionBoundary", "arrowPadding", "sticky", "hideWhenDetached", "onOpenAutoFocus", "onCloseAutoFocus", "onEscapeKeyDown", "onPointerDownOutside", "onFocusOutside", "onInteractOutside", "forceMount", "classNames", "forwardedRef", "modalId", "useComboboxContext", "Content", "id", "ref", "Viewport", "SearchList", "role", "displayName", "PopoverComboboxTrigger", "Trigger", "asChild", "PopoverComboboxVirtualTrigger", "VirtualTrigger", "PopoverComboboxInput", "Input", "PopoverComboboxList", "constrainInline", "constrainBlock", "PopoverComboboxItem", "Item", "PopoverComboboxArrow", "Arrow", "PopoverComboboxEmpty", "Empty", "PopoverCombobox", "List", "translationKey", "translations"]
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 { CommandEmpty, CommandInput, CommandItem, CommandList, CommandRoot } from 'cmdk';\nimport React, { type ComponentPropsWithRef, type PropsWithChildren, forwardRef, useCallback } from 'react';\n\nimport {\n Button,\n type ButtonProps,\n Icon,\n type TextInputProps,\n type ThemedClassName,\n useDensityContext,\n useElevationContext,\n useId,\n useThemeContext,\n} from '@dxos/react-ui';\nimport { mx, staticPlaceholderText } from '@dxos/react-ui-theme';\n\ntype SearchListVariant = 'list' | 'menu' | 'listbox';\n\ntype SearchListRootProps = ThemedClassName<ComponentPropsWithRef<typeof CommandRoot>> & {\n variant?: SearchListVariant;\n};\n\ntype ComboboxContextValue = {\n isCombobox: true;\n modalId: string;\n open: boolean;\n onOpenChange: (nextOpen: boolean) => void;\n value: string;\n onValueChange: (nextValue: string) => void;\n placeholder?: string;\n};\n\nconst COMBOBOX_NAME = 'Combobox';\nconst COMBOBOX_TRIGGER_NAME = 'ComboboxTrigger';\nconst SEARCHLIST_NAME = 'SearchList';\nconst SEARCHLIST_ITEM_NAME = 'SearchListItem';\n\nconst [ComboboxProvider, useComboboxContext] = createContext<Partial<ComboboxContextValue>>(COMBOBOX_NAME, {});\n\ntype ComboboxRootProps = PropsWithChildren<\n Partial<ComboboxContextValue & { defaultOpen: boolean; defaultValue: string; placeholder: string }>\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\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' | 'onValueChange' | 'defaultValue'>;\n\nconst SearchListInput = forwardRef<HTMLInputElement, SearchListInputProps>(\n ({ children, classNames, density: propsDensity, elevation: propsElevation, variant, ...props }, forwardedRef) => {\n // CHORE(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 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\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\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\ntype SearchListItemProps = ThemedClassName<ComponentPropsWithRef<typeof CommandItem>>;\n\nconst SearchListItem = forwardRef<HTMLDivElement, SearchListItemProps>(\n ({ children, classNames, onSelect, ...props }, forwardedRef) => {\n const { onValueChange, onOpenChange } = useComboboxContext(SEARCHLIST_ITEM_NAME);\n const handleSelect = useCallback(\n (nextValue: string) => {\n onValueChange?.(nextValue);\n onOpenChange?.(false);\n onSelect?.(nextValue);\n },\n [onValueChange, onOpenChange, onSelect],\n );\n return (\n <CommandItem\n {...props}\n onSelect={handleSelect}\n className={mx(\n 'p-1 pis-2 pie-2 rounded-sm select-none cursor-pointer data-[selected]:bg-hoverOverlay',\n classNames,\n )}\n ref={forwardedRef}\n >\n {children}\n </CommandItem>\n );\n },\n);\n\nSearchListItem.displayName = SEARCHLIST_ITEM_NAME;\n\nconst ComboboxRoot = ({\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 return (\n <ComboboxProvider\n isCombobox\n modalId={modalId}\n open={open}\n onOpenChange={onOpenChange}\n value={value}\n onValueChange={onValueChange}\n placeholder={placeholder}\n >\n {children}\n </ComboboxProvider>\n );\n};\n\nComboboxRoot.displayName = COMBOBOX_NAME;\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 return (\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 );\n },\n);\n\nComboboxTrigger.displayName = COMBOBOX_TRIGGER_NAME;\n\nexport const SearchList = {\n Root: SearchListRoot,\n Input: SearchListInput,\n Content: SearchListContent,\n Empty: SearchListEmpty,\n Item: SearchListItem,\n};\n\nexport const Combobox = {\n Root: ComboboxRoot,\n Trigger: ComboboxTrigger,\n useComboboxContext,\n};\n\nexport type {\n SearchListRootProps,\n SearchListInputProps,\n SearchListContentProps,\n SearchListEmptyProps,\n SearchListItemProps,\n ComboboxRootProps,\n ComboboxTriggerProps,\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport React, { forwardRef } from 'react';\n\nimport {\n Popover,\n type PopoverArrowProps,\n type PopoverContentProps,\n type PopoverVirtualTriggerProps,\n} from '@dxos/react-ui';\n\nimport {\n Combobox,\n type ComboboxRootProps,\n type ComboboxTriggerProps,\n SearchList,\n type SearchListContentProps,\n type SearchListEmptyProps,\n type SearchListInputProps,\n type SearchListItemProps,\n type SearchListRootProps,\n} from '../components';\n\ntype PopoverComboboxRootProps = ComboboxRootProps & { modal?: boolean };\n\nconst PopoverComboboxRoot = ({\n modal,\n children,\n open: propsOpen,\n onOpenChange: propsOnOpenChange,\n defaultOpen,\n ...props\n}: PopoverComboboxRootProps) => {\n const [open, onOpenChange] = useControllableState({\n prop: propsOpen,\n onChange: propsOnOpenChange,\n defaultProp: defaultOpen,\n });\n return (\n <Combobox.Root open={open} onOpenChange={onOpenChange} {...props}>\n <Popover.Root open={open} onOpenChange={onOpenChange} modal={modal}>\n {children}\n </Popover.Root>\n </Combobox.Root>\n );\n};\n\ntype PopoverComboboxContentProps = SearchListRootProps & PopoverContentProps;\n\nconst POPOVER_COMBOBOX_CONTENT_NAME = 'PopoverComboboxContent';\n\nconst PopoverComboboxContent = forwardRef<HTMLDivElement, PopoverComboboxContentProps>(\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 } = Combobox.useComboboxContext(POPOVER_COMBOBOX_CONTENT_NAME);\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] overflow-hidden',\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\nPopoverComboboxContent.displayName = POPOVER_COMBOBOX_CONTENT_NAME;\n\ntype PopoverComboboxTriggerProps = ComboboxTriggerProps;\n\nconst PopoverComboboxTrigger = forwardRef<HTMLButtonElement, PopoverComboboxTriggerProps>((props, forwardedRef) => {\n return (\n <Popover.Trigger asChild>\n <Combobox.Trigger {...props} ref={forwardedRef} />\n </Popover.Trigger>\n );\n});\n\ntype PopoverComboboxVirtualTriggerProps = PopoverVirtualTriggerProps;\n\nconst PopoverComboboxVirtualTrigger = Popover.VirtualTrigger;\n\ntype PopoverComboboxInputProps = SearchListInputProps;\n\nconst PopoverComboboxInput = forwardRef<HTMLInputElement, PopoverComboboxInputProps>(\n ({ 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\ntype PopoverComboboxListProps = SearchListContentProps;\n\nconst PopoverComboboxList = forwardRef<HTMLDivElement, PopoverComboboxListProps>(\n ({ 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\ntype PopoverComboboxItemProps = SearchListItemProps;\n\nconst PopoverComboboxItem = forwardRef<HTMLDivElement, PopoverComboboxItemProps>(\n ({ classNames, ...props }, forwardedRef) => {\n return (\n <SearchList.Item\n {...props}\n classNames={['mli-cardSpacingChrome pli-cardSpacingChrome', classNames]}\n ref={forwardedRef}\n />\n );\n },\n);\n\ntype PopoverComboboxArrowProps = PopoverArrowProps;\n\nconst PopoverComboboxArrow = Popover.Arrow;\n\ntype PopoverComboboxEmptyProps = SearchListEmptyProps;\n\nconst PopoverComboboxEmpty = SearchList.Empty;\n\nexport const PopoverCombobox = {\n Root: PopoverComboboxRoot,\n Content: PopoverComboboxContent,\n Trigger: PopoverComboboxTrigger,\n VirtualTrigger: PopoverComboboxVirtualTrigger,\n Input: PopoverComboboxInput,\n List: PopoverComboboxList,\n Item: PopoverComboboxItem,\n Arrow: PopoverComboboxArrow,\n Empty: PopoverComboboxEmpty,\n};\n\nexport type {\n PopoverComboboxRootProps,\n PopoverComboboxContentProps,\n PopoverComboboxTriggerProps,\n PopoverComboboxVirtualTriggerProps,\n PopoverComboboxInputProps,\n PopoverComboboxListProps,\n PopoverComboboxItemProps,\n PopoverComboboxArrowProps,\n PopoverComboboxEmptyProps,\n};\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 },\n },\n] as const satisfies Resource[];\n"],
5
+ "mappings": ";;;;AAIA,SAASA,qBAAqB;AAC9B,SAASC,4BAA4B;AACrC,SAASC,cAAcC,cAAcC,aAAaC,aAAaC,mBAAmB;AAClF,OAAOC,SAA6DC,YAAYC,mBAAmB;AAEnG,SACEC,QAEAC,MAGAC,mBACAC,qBACAC,OACAC,uBACK;AACP,SAASC,IAAIC,6BAA6B;AAkB1C,IAAMC,gBAAgB;AACtB,IAAMC,wBAAwB;AAC9B,IAAMC,kBAAkB;AACxB,IAAMC,uBAAuB;AAE7B,IAAM,CAACC,kBAAkBC,kBAAAA,IAAsBC,cAA6CN,eAAe,CAAC,CAAA;AAM5G,IAAMO,iBAAiBC,2BACrB,CAAC,EAAEC,UAAUC,YAAY,GAAGC,MAAAA,GAASC,iBAAAA;;;AACnC,WACE,sBAAA,cAACC,aAAAA;MAAa,GAAGF;MAAOG,WAAWC,GAAG,IAAIL,UAAAA;MAAaM,KAAKJ;OACzDH,QAAAA;;;;AAGP,CAAA;AAGFF,eAAeU,cAAcf;AAQ7B,IAAMgB,kBAAkBV,2BACtB,CAAC,EAAEC,UAAUC,YAAYS,SAASC,cAAcC,WAAWC,gBAAgBC,SAAS,GAAGZ,MAAAA,GAASC,iBAAAA;;;AAE9F,UAAM,EAAEY,eAAc,IAAKC,gBAAAA;AAC3B,UAAM,EAAEC,GAAE,IAAKD,gBAAAA;AACf,UAAMN,UAAUQ,kBAAkBP,YAAAA;AAClC,UAAMC,YAAYO,oBAAoBN,cAAAA;AAEtC,WACE,sBAAA,cAACO,cAAAA;MACE,GAA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O;MAACC,SAAAA;OACf,gBAAApC,OAAA,cAACC,SAASkC,SAAO;MAAE,GAAGxC;MAAOmC,KAAKL;;;;;AAGxC,CAAA;AAIA,IAAMY,gCAAgClC,QAAQmC;AAI9C,IAAMC,uBAAuBjC,gBAAAA,YAC3B,CAAC,EAAEkB,YAAY,GAAG7B,MAAAA,GAAS8B,iBAAAA;;;AACzB,WACE,gBAAAzB,OAAA,cAAC+B,WAAWS,OAAK;MACd,GAAG7C;MACJ6B,YAAY;QACV;QACAA;;MAEFM,KAAKL;;;;;AAGX,CAAA;AAKF,IAAMgB,sBAAsBnC,gBAAAA,YAC1B,CAAC,EAAEkB,YAAY,GAAG7B,MAAAA,GAAS8B,iBAAAA;;;AACzB,WACE,gBAAAzB,OAAA,cAAC+B,WAAWH,SAAO;MAChB,GAAGjC;MACJ6B,YAAY;QAAC;QAAkDA;;MAC/DM,KAAKL;;;;;AAGX,CAAA;AAKF,IAAMiB,sBAAsBpC,gBAAAA,YAC1B,CAAC,EAAEkB,YAAY,GAAG7B,MAAAA,GAAS8B,iBAAAA;;;AACzB,WACE,gBAAAzB,OAAA,cAAC+B,WAAWY,MAAI;MACb,GAAGhD;MACJ6B,YAAY;QAAC;QAA+CA;;MAC5DM,KAAKL;;;;;AAGX,CAAA;AAKF,IAAMmB,uBAAuBzC,QAAQ0C;AAIrC,IAAMC,uBAAuBf,WAAWgB;AAEjC,IAAMC,kBAAkB;EAC7B9C,MAAMf;EACNyC,SAASvB;EACT8B,SAASD;EACTI,gBAAgBD;EAChBG,OAAOD;EACPU,MAAMR;EACNE,MAAMD;EACNG,OAAOD;EACPG,OAAOD;AACT;;;AC9LO,IAAMI,iBAAiB;AAEvB,IAAMC,eAAe;EAC1B;IACE,SAAS;MACP,CAACD,cAAAA,GAAiB,CAAC;IACrB;EACF;;",
6
+ "names": ["createContext", "useControllableState", "CommandEmpty", "CommandInput", "CommandItem", "CommandList", "CommandRoot", "React", "forwardRef", "useCallback", "Button", "Icon", "useDensityContext", "useElevationContext", "useId", "useThemeContext", "mx", "staticPlaceholderText", "COMBOBOX_NAME", "COMBOBOX_TRIGGER_NAME", "SEARCHLIST_NAME", "SEARCHLIST_ITEM_NAME", "ComboboxProvider", "useComboboxContext", "createContext", "SearchListRoot", "forwardRef", "children", "classNames", "props", "forwardedRef", "CommandRoot", "className", "mx", "ref", "displayName", "SearchListInput", "density", "propsDensity", "elevation", "propsElevation", "variant", "hasIosKeyboard", "useThemeContext", "tx", "useDensityContext", "useElevationContext", "CommandInput", "disabled", "autoFocus", "SearchListContent", "CommandList", "SearchListEmpty", "CommandEmpty", "SearchListItem", "onSelect", "onValueChange", "onOpenChange", "handleSelect", "useCallback", "nextValue", "CommandItem", "ComboboxRoot", "modalId", "propsModalId", "open", "propsOpen", "defaultOpen", "propsOnOpenChange", "value", "propsValue", "defaultValue", "propsOnValueChange", "placeholder", "useId", "useControllableState", "prop", "onChange", "defaultProp", "isCombobox", "ComboboxTrigger", "onClick", "handleClick", "event", "Button", "role", "aria-expanded", "aria-controls", "aria-haspopup", "span", "staticPlaceholderText", "Icon", "icon", "size", "SearchList", "Root", "Input", "Content", "Empty", "Item", "Combobox", "Trigger", "useControllableState", "React", "forwardRef", "Popover", "PopoverComboboxRoot", "modal", "children", "open", "propsOpen", "onOpenChange", "propsOnOpenChange", "defaultOpen", "props", "useControllableState", "prop", "onChange", "defaultProp", "React", "Combobox", "Root", "Popover", "POPOVER_COMBOBOX_CONTENT_NAME", "PopoverComboboxContent", "forwardRef", "side", "collisionPadding", "sideOffset", "align", "alignOffset", "avoidCollisions", "collisionBoundary", "arrowPadding", "sticky", "hideWhenDetached", "onOpenAutoFocus", "onCloseAutoFocus", "onEscapeKeyDown", "onPointerDownOutside", "onFocusOutside", "onInteractOutside", "forceMount", "classNames", "forwardedRef", "modalId", "useComboboxContext", "Content", "id", "ref", "SearchList", "role", "displayName", "PopoverComboboxTrigger", "Trigger", "asChild", "PopoverComboboxVirtualTrigger", "VirtualTrigger", "PopoverComboboxInput", "Input", "PopoverComboboxList", "PopoverComboboxItem", "Item", "PopoverComboboxArrow", "Arrow", "PopoverComboboxEmpty", "Empty", "PopoverCombobox", "List", "translationKey", "translations"]
7
7
  }
@@ -1 +1 @@
1
- {"inputs":{"src/components/SearchList.tsx":{"bytes":22289,"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":"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}],"format":"esm"},"src/components/index.ts":{"bytes":475,"imports":[{"path":"src/components/SearchList.tsx","kind":"import-statement","original":"./SearchList"}],"format":"esm"},"src/composites/PopoverCombobox.tsx":{"bytes":16763,"imports":[{"path":"@preact-signals/safe-react/tracking","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":"src/components/index.ts","kind":"import-statement","original":"../components"}],"format":"esm"},"src/composites/index.ts":{"bytes":488,"imports":[{"path":"src/composites/PopoverCombobox.tsx","kind":"import-statement","original":"./PopoverCombobox"}],"format":"esm"},"src/translations.ts":{"bytes":1061,"imports":[],"format":"esm"},"src/index.ts":{"bytes":658,"imports":[{"path":"src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"src/composites/index.ts","kind":"import-statement","original":"./composites"},{"path":"src/translations.ts","kind":"import-statement","original":"./translations"}],"format":"esm"}},"outputs":{"dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":21231},"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":"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":"@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}],"exports":["Combobox","PopoverCombobox","SearchList","translationKey","translations"],"entryPoint":"src/index.ts","inputs":{"src/components/SearchList.tsx":{"bytesInOutput":5714},"src/components/index.ts":{"bytesInOutput":0},"src/index.ts":{"bytesInOutput":0},"src/composites/PopoverCombobox.tsx":{"bytesInOutput":4364},"src/composites/index.ts":{"bytesInOutput":0},"src/translations.ts":{"bytesInOutput":124}},"bytes":10516}}}
1
+ {"inputs":{"src/components/SearchList.tsx":{"bytes":22368,"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":"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}],"format":"esm"},"src/components/index.ts":{"bytes":475,"imports":[{"path":"src/components/SearchList.tsx","kind":"import-statement","original":"./SearchList"}],"format":"esm"},"src/composites/PopoverCombobox.tsx":{"bytes":16818,"imports":[{"path":"@preact-signals/safe-react/tracking","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":"src/components/index.ts","kind":"import-statement","original":"../components"}],"format":"esm"},"src/composites/index.ts":{"bytes":488,"imports":[{"path":"src/composites/PopoverCombobox.tsx","kind":"import-statement","original":"./PopoverCombobox"}],"format":"esm"},"src/translations.ts":{"bytes":1061,"imports":[],"format":"esm"},"src/index.ts":{"bytes":658,"imports":[{"path":"src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"src/composites/index.ts","kind":"import-statement","original":"./composites"},{"path":"src/translations.ts","kind":"import-statement","original":"./translations"}],"format":"esm"}},"outputs":{"dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":21181},"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":"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":"@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}],"exports":["Combobox","PopoverCombobox","SearchList","translationKey","translations"],"entryPoint":"src/index.ts","inputs":{"src/components/SearchList.tsx":{"bytesInOutput":5729},"src/components/index.ts":{"bytesInOutput":0},"src/index.ts":{"bytesInOutput":0},"src/composites/PopoverCombobox.tsx":{"bytesInOutput":4459},"src/composites/index.ts":{"bytesInOutput":0},"src/translations.ts":{"bytesInOutput":124}},"bytes":10626}}}
@@ -1 +1 @@
1
- {"version":3,"file":"SearchList.d.ts","sourceRoot":"","sources":["../../../../src/components/SearchList.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AACzF,OAAO,KAAK,EAAE,EAAE,KAAK,qBAAqB,EAAc,KAAK,iBAAiB,EAAe,MAAM,OAAO,CAAC;AAE3G,OAAO,EAEL,KAAK,WAAW,EAEhB,KAAK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EAAE,OAAO,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,CAAC,CACpG,CAAC;AAcF,KAAK,0BAA0B,GAAG,qBAAqB,CAAC,OAAO,YAAY,CAAC,CAAC;AAG7E,KAAK,oBAAoB,GAAG,IAAI,CAAC,cAAc,EAAE,OAAO,GAAG,cAAc,GAAG,UAAU,CAAC,GACrF,IAAI,CAAC,0BAA0B,EAAE,OAAO,GAAG,eAAe,GAAG,cAAc,CAAC,CAAC;AAgC/E,KAAK,sBAAsB,GAAG,eAAe,CAAC,qBAAqB,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC;AAYzF,KAAK,oBAAoB,GAAG,eAAe,CAAC,qBAAqB,CAAC,OAAO,YAAY,CAAC,CAAC,CAAC;AAYxF,KAAK,mBAAmB,GAAG,eAAe,CAAC,qBAAqB,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC;AAsEtF,KAAK,oBAAoB,GAAG,WAAW,CAAC;AAuCxC,eAAO,MAAM,UAAU;;;;;;CAMtB,CAAC;AAEF,eAAO,MAAM,QAAQ;;+LA5ElB,iBAAiB;;;;;CAgFnB,CAAC;AAEF,YAAY,EACV,mBAAmB,EACnB,oBAAoB,EACpB,sBAAsB,EACtB,oBAAoB,EACpB,mBAAmB,EACnB,iBAAiB,EACjB,oBAAoB,GACrB,CAAC"}
@@ -1,15 +1,17 @@
1
1
  import '@dxos-theme';
2
+ import { type StoryObj } from '@storybook/react-vite';
2
3
  import React from 'react';
3
4
  type StoryItems = Record<string, string>;
4
- declare const _default: {
5
+ type StoryProps = {
6
+ items: StoryItems;
7
+ };
8
+ declare const meta: {
5
9
  title: string;
6
- component: React.FC<{
7
- items: StoryItems;
8
- }>;
10
+ component: any;
11
+ render: ({ items }: StoryProps) => React.JSX.Element;
9
12
  decorators: import("@storybook/react").Decorator[];
10
13
  };
11
- export default _default;
12
- export declare const Default: {
13
- args: {};
14
- };
14
+ export default meta;
15
+ type Story = StoryObj<typeof meta>;
16
+ export declare const Default: Story;
15
17
  //# sourceMappingURL=SearchList.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SearchList.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/SearchList.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,KAAkB,MAAM,OAAO,CAAC;AAOvC,KAAK,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;;;;eAUN,UAAU;;;;AAe7C,wBAIE;AAEF,eAAO,MAAM,OAAO;;CAEnB,CAAC"}
1
+ {"version":3,"file":"SearchList.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/SearchList.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,KAAK,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAUzC,KAAK,UAAU,GAAG;IAChB,KAAK,EAAE,UAAU,CAAC;CACnB,CAAC;AAiBF,QAAA,MAAM,IAAI;;eAEsB,GAAG;wBAjBa,UAAU;;CAoBrB,CAAC;AAEtC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { type PopoverArrowProps, type PopoverContentProps, type PopoverViewportProps, type PopoverVirtualTriggerProps } from '@dxos/react-ui';
2
+ import { type PopoverArrowProps, type PopoverContentProps, type PopoverVirtualTriggerProps } from '@dxos/react-ui';
3
3
  import { type ComboboxRootProps, type ComboboxTriggerProps, type SearchListContentProps, type SearchListEmptyProps, type SearchListInputProps, type SearchListItemProps, type SearchListRootProps } from '../components';
4
4
  type PopoverComboboxRootProps = ComboboxRootProps & {
5
5
  modal?: boolean;
@@ -8,7 +8,7 @@ type PopoverComboboxContentProps = SearchListRootProps & PopoverContentProps;
8
8
  type PopoverComboboxTriggerProps = ComboboxTriggerProps;
9
9
  type PopoverComboboxVirtualTriggerProps = PopoverVirtualTriggerProps;
10
10
  type PopoverComboboxInputProps = SearchListInputProps;
11
- type PopoverComboboxListProps = SearchListContentProps & Pick<PopoverViewportProps, 'constrainBlock' | 'constrainInline'>;
11
+ type PopoverComboboxListProps = SearchListContentProps;
12
12
  type PopoverComboboxItemProps = SearchListItemProps;
13
13
  type PopoverComboboxArrowProps = PopoverArrowProps;
14
14
  type PopoverComboboxEmptyProps = SearchListEmptyProps;
@@ -23,7 +23,7 @@ export declare const PopoverCombobox: {
23
23
  displayName: string;
24
24
  };
25
25
  Input: React.ForwardRefExoticComponent<Omit<SearchListInputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
26
- List: React.ForwardRefExoticComponent<Omit<PopoverComboboxListProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
26
+ List: React.ForwardRefExoticComponent<Omit<SearchListContentProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
27
27
  Item: React.ForwardRefExoticComponent<Omit<SearchListItemProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
28
28
  Arrow: React.ForwardRefExoticComponent<PopoverArrowProps & React.RefAttributes<SVGSVGElement>>;
29
29
  Empty: React.ForwardRefExoticComponent<Omit<SearchListEmptyProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
@@ -1 +1 @@
1
- {"version":3,"file":"PopoverCombobox.d.ts","sourceRoot":"","sources":["../../../../src/composites/PopoverCombobox.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,OAAO,EAEL,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,0BAA0B,EAChC,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAEL,KAAK,iBAAiB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ACzB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACzB,MAAM,eAAe,CAAC;AAEvB,KAAK,wBAAwB,GAAG,iBAAiB,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAwBxE,KAAK,2BAA2B,GAAG,mBAAmB,GAAG,mBAAmB,CAAC;AAqE7E,KAAK,2BAA2B,GAAG,oBAAoB,CAAC;AAUxD,KAAK,kCAAkC,GAAG,0BAA0B,CAAC;AAIrE,KAAK,yBAAyB,GAAG,oBAAoB,CAAC;AAiBtD,KAAK,wBAAwB,GAAG,sBAAsB,CAAC;AAcvD,KAAK,wBAAwB,GAAG,mBAAmB,CAAC;AAcpD,KAAK,yBAAyB,GAAG,iBAAiB,CAAC;AAInD,KAAK,yBAAyB,GAAG,oBAAoB,CAAC;AAItD,eAAO,MAAM,eAAe;yGAvJzB,wBAAwB;;;;;;;;;;;;;;CAiK1B,CAAC;AAEF,YAAY,EACV,wBAAwB,EACxB,2BAA2B,EAC3B,2BAA2B,EAC3B,kCAAkC,EAClC,yBAAyB,EACzB,wBAAwB,EACxB,wBAAwB,EACxB,yBAAyB,EACzB,yBAAyB,GAC1B,CAAC"}
@@ -1,28 +1,13 @@
1
1
  import '@dxos-theme';
2
+ import { type StoryObj } from '@storybook/react-vite';
2
3
  import React from 'react';
3
- declare const _default: {
4
+ declare const meta: {
4
5
  title: string;
5
- component: {
6
- Root: ({ modal, children, open: propsOpen, onOpenChange: propsOnOpenChange, defaultOpen, ...props }: import("./PopoverCombobox").PopoverComboboxRootProps) => React.JSX.Element;
7
- Content: React.ForwardRefExoticComponent<Omit<import("./PopoverCombobox").PopoverComboboxContentProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
8
- Trigger: React.ForwardRefExoticComponent<Omit<import("@dxos/react-ui").ButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
9
- VirtualTrigger: {
10
- (props: import("@dxos/react-ui").PopoverVirtualTriggerProps & {
11
- __scopePopover?: import("@radix-ui/react-context").Scope;
12
- }): React.JSX.Element;
13
- displayName: string;
14
- };
15
- Input: React.ForwardRefExoticComponent<Omit<import("..").SearchListInputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
16
- List: React.ForwardRefExoticComponent<Omit<import("./PopoverCombobox").PopoverComboboxListProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
17
- Item: React.ForwardRefExoticComponent<Omit<import("..").SearchListItemProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
18
- Arrow: React.ForwardRefExoticComponent<import("@dxos/react-ui").PopoverArrowProps & React.RefAttributes<SVGSVGElement>>;
19
- Empty: React.ForwardRefExoticComponent<Omit<import("..").SearchListEmptyProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
20
- };
6
+ component: any;
21
7
  render: () => React.JSX.Element;
22
8
  decorators: import("@storybook/react").Decorator[];
23
9
  };
24
- export default _default;
25
- export declare const Default: {
26
- args: {};
27
- };
10
+ export default meta;
11
+ type Story = StoryObj<typeof meta>;
12
+ export declare const Default: Story;
28
13
  //# sourceMappingURL=PopoverCombobox.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PopoverCombobox.stories.d.ts","sourceRoot":"","sources":["../../../../src/composites/PopoverCombobox.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,KAAK,MAAM,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;AA4B1B,wBAKE;AAEF,eAAO,MAAM,OAAO;;CAEnB,CAAC"}
1
+ {"version":3,"file":"PopoverCombobox.stories.d.ts","sourceRoot":"","sources":["../../../../src/composites/PopoverCombobox.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;AA4B1B,QAAA,MAAM,IAAI;;eAE2B,GAAG;;;CAGH,CAAC;AAEtC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC"}