| 75 | } |
| 76 | |
| 77 | function AutocompletePopup({ |
| 78 | className, |
| 79 | children, |
| 80 | sideOffset = 4, |
| 81 | ...props |
| 82 | }: AutocompletePrimitive.Popup.Props & { |
| 83 | sideOffset?: number; |
| 84 | }) { |
| 85 | return ( |
| 86 | <AutocompletePrimitive.Portal> |
| 87 | <AutocompletePrimitive.Positioner |
| 88 | className="z-50 select-none" |
| 89 | data-slot="autocomplete-positioner" |
| 90 | sideOffset={sideOffset} |
| 91 | > |
| 92 | <span |
| 93 | className={cn( |
| 94 | "relative flex max-h-full origin-(--transform-origin) rounded-lg border bg-popover bg-clip-padding transition-[scale,opacity] before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] before:shadow-lg has-data-starting-style:scale-98 has-data-starting-style:opacity-0 dark:not-in-data-[slot=group]:bg-clip-border", |
| 95 | className, |
| 96 | )} |
| 97 | > |
| 98 | <AutocompletePrimitive.Popup |
| 99 | className="flex max-h-[min(var(--available-height),23rem)] w-(--anchor-width) max-w-(--available-width) flex-col" |
| 100 | data-slot="autocomplete-popup" |
| 101 | {...props} |
| 102 | > |
| 103 | {children} |
| 104 | </AutocompletePrimitive.Popup> |
| 105 | </span> |
| 106 | </AutocompletePrimitive.Positioner> |
| 107 | </AutocompletePrimitive.Portal> |
| 108 | ); |
| 109 | } |
| 110 | |
| 111 | function AutocompleteItem({ |
| 112 | className, |