The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
InputSelect improvements
Tim Wilsoncc10ac7d98b9
diff --git a/packages/ui/package.json b/packages/ui/package.jsonindex 7895314f18..5f35949fd8 100644--- a/packages/ui/package.json+++ b/packages/ui/package.json@@ -36,6 +36,7 @@"typescript": "^5.1.6"},"dependencies": {+ "@floating-ui/react": "^0.26.20","@internationalized/date": "^3.5.3","@radix-ui/react-accordion": "^1.0.1","@radix-ui/react-checkbox": "^1.0.4",diff --git a/packages/ui/src/filter/filter-select.tsx b/packages/ui/src/filter/filter-select.tsxindex 0ab9e508ec..03ba84cf72 100644--- a/packages/ui/src/filter/filter-select.tsx+++ b/packages/ui/src/filter/filter-select.tsx@@ -13,11 +13,8 @@ import {useState,} from "react";import { AnimatedSizeContainer } from "../animated-size-container";-import {- useKeyboardShortcut,- useMediaQuery,- useResizeObserver,-} from "../hooks";+import { useKeyboardShortcut, useMediaQuery } from "../hooks";+import { useScrollProgress } from "../hooks/use-scroll-progress";import { Check, LoadingSpinner, Magic } from "../icons";import { Popover } from "../popover";import { Filter, FilterOption } from "./types";@@ -315,22 +312,7 @@ const FilterScroll = forwardRef(const ref = useRef<HTMLDivElement>(null);useImperativeHandle(forwardedRef, () => ref.current);- const [scrollProgress, setScrollProgress] = useState(1);-- const updateScrollProgress = useCallback(() => {- if (!ref.current) return;- const { scrollTop, scrollHeight, clientHeight } = ref.current;-- setScrollProgress(- scrollHeight === clientHeight- ? 1- : scrollTop / (scrollHeight - clientHeight),- );- }, []);-- const resizeObserverEntry = useResizeObserver(ref);-- useEffect(updateScrollProgress, [resizeObserverEntry]);+ const { scrollProgress, updateScrollProgress } = useScrollProgress(ref);return (<>diff --git a/packages/ui/src/hooks/use-scroll-progress.ts b/packages/ui/src/hooks/use-scroll-progress.tsnew file mode 100644index 0000000000..0b373bfc1f--- /dev/null+++ b/packages/ui/src/hooks/use-scroll-progress.ts@@ -0,0 +1,25 @@+"use client";++import { RefObject, useCallback, useEffect, useState } from "react";+import { useResizeObserver } from "./use-resize-observer";++export function useScrollProgress(ref: RefObject<HTMLElement>) {+ const [scrollProgress, setScrollProgress] = useState(1);++ const updateScrollProgress = useCallback(() => {+ if (!ref.current) return;+ const { scrollTop, scrollHeight, clientHeight } = ref.current;++ setScrollProgress(+ scrollHeight === clientHeight+ ? 1+ : Math.min(scrollTop / (scrollHeight - clientHeight), 1),+ );+ }, []);++ const resizeObserverEntry = useResizeObserver(ref);++ useEffect(updateScrollProgress, [resizeObserverEntry]);++ return { scrollProgress, updateScrollProgress };+}diff --git a/packages/ui/src/input-select.tsx b/packages/ui/src/input-select.tsxindex 62e49b2d85..5bb60ab4ab 100644--- a/packages/ui/src/input-select.tsx+++ b/packages/ui/src/input-select.tsx@@ -1,4 +1,12 @@import { cn } from "@dub/utils";+import {+ flip,+ offset,+ size,+ useDismiss,+ useFloating,+ useInteractions,+} from "@floating-ui/react";import { Command, useCommandState } from "cmdk";import { Check, ChevronDown, Search, X } from "lucide-react";import {@@ -6,8 +14,11 @@ import {InputHTMLAttributes,ReactNode,SetStateAction,- memo,+ createContext,+ forwardRef,+ useContext,useEffect,+ useMemo,useRef,useState,} from "react";@@ -15,6 +26,27 @@ import { Drawer } from "vaul";import { Badge } from "./badge";import { BlurImage } from "./blur-image";import { useMediaQuery } from "./hooks";+import { useScrollProgress } from "./hooks/use-scroll-progress";++const InputSelectContext = createContext<{+ inputAttrs: InputHTMLAttributes<HTMLInputElement>;+ openCommandList: boolean;+ setOpenCommandList: Dispatch<SetStateAction<boolean>>;+ inputValue: string;+ setInputValue: Dispatch<SetStateAction<string>>;+ disabled: boolean;+ selectedItem: InputSelectItemProps | null;+ setSelectedItem: Dispatch<SetStateAction<InputSelectItemProps | null>>;+}>({+ inputAttrs: {},+ openCommandList: false,+ setOpenCommandList: () => {},+ inputValue: "",+ setInputValue: () => {},+ disabled: false,+ selectedItem: null,+ setSelectedItem: () => {},+});export interface InputSelectItemProps {id: string;@@ -50,169 +82,96 @@ export function InputSelect({const [openCommandList, setOpenCommandList] = useState(false);const [inputValue, setInputValue] = useState("");+ // Whether the input has changed since opening+ const [inputChanged, setInputChanged] = useState(false);+useEffect(() => {- if (selectedItem) {- setInputValue(selectedItem.value);- }- }, [selectedItem]);+ // Reset inputChanged when the command list is opened+ if (openCommandList) setInputChanged(false);+ }, [openCommandList]);++ useEffect(() => setInputChanged(true), [inputValue]);useEffect(() => {- const handleClickOutside = (e: MouseEvent) => {- if (- commandRef.current &&- !commandRef.current.contains(e.target as Node)- ) {- setOpenCommandList(false);- }- };- if (openCommandList) {- document.addEventListener("click", handleClickOutside);- return () => document.removeEventListener("click", handleClickOutside);- }- }, [commandRef, openCommandList]);+ if (selectedItem) setInputValue(selectedItem.value);+ }, [selectedItem]);- const { isMobile } = useMediaQuery();+ const filteredItems = useMemo(() => {+ const search = inputValue.toLowerCase();- const CommandInput = memo(() => {- const isEmpty = useCommandState((state: any) => state.filtered.count === 0);+ return inputChanged+ ? // Filter the items+ items.filter((item) => item.value.toLowerCase().includes(search))+ : inputValue+ ? // Just sort the items instead of filtering+ items.sort(+ (a, b) =>+ (b.value.toLowerCase().includes(search) ? 1 : 0) -+ (a.value.toLowerCase().includes(search) ? 1 : 0),+ )+ : items;+ }, [inputChanged, inputValue, items]);- return (- <Command.Input- placeholder={inputAttrs?.placeholder || "Search..."}- // hacky focus on the input when the dropdown opens- autoFocus={openCommandList}- onFocus={() => setOpenCommandList(true)}- value={inputValue}- onValueChange={setInputValue}- onKeyDown={(e) => {- if (e.key === "Escape") {- e.preventDefault();- setOpenCommandList(false);- // listen for cases where empty results and enter is pressed- } else if (e.key === "Enter" && isEmpty) {- setOpenCommandList(false);- // if it's a letter or a number and there's no meta key pressed, openCommandList dropdown- } else if (e.key.match(/^[a-z0-9]$/i) && !e.metaKey) {- setOpenCommandList(true);- }- }}- disabled={disabled}- className="block w-full truncate rounded-md border-none px-0 text-base text-gray-900 placeholder-gray-400 outline-none outline-0 transition-all duration-300 focus:ring-0 md:text-sm"- />- );+ const {+ refs: floatingRefs,+ floatingStyles,+ context,+ } = useFloating({+ open: openCommandList,+ onOpenChange: setOpenCommandList,+ middleware: [+ offset(8),+ size({+ apply({ elements: { floating }, availableHeight }) {+ Object.assign(floating.style, {+ // Minimum height before 'flip' takes over is 112px+ maxHeight: `${Math.max(75, Math.min(availableHeight, 290))}px`,+ });+ },+ padding: 8,+ }),+ flip({+ fallbackStrategy: "initialPlacement",+ padding: 8,+ }),+ ],});- const CloseChevron = memo(() => (- <button- onClick={() => {- setOpenCommandList((prev) => !prev);- setSelectedItem(null);- setInputValue("");- }}- className="absolute inset-y-0 right-0 my-auto pr-3"- >- {inputValue.length > 0 ? (- <X className="h-4 w-4 text-gray-400 transition-all hover:text-gray-700" />- ) : (- <ChevronDown- className={cn(- "h-4 w-4 text-gray-400 transition-all hover:text-gray-700",- {- "rotate-180 transform": openCommandList,- },- )}- />- )}- </button>- ));+ const dismiss = useDismiss(context);- // renders a reusable list of items- const SelectorList = memo(() =>- items.map((item) => (- <Command.Item- key={item.id}- value={item.value}- disabled={item.disabled}- onSelect={() => {- setSelectedItem(item);- setInputValue(item.value);- setOpenCommandList(false);- }}- className="group flex cursor-pointer items-center justify-between rounded-md px-4 py-2 text-sm text-gray-900 hover:bg-gray-100 hover:text-gray-900 active:bg-gray-200 aria-disabled:cursor-not-allowed aria-disabled:opacity-75 aria-disabled:hover:bg-white aria-selected:bg-gray-100 aria-selected:text-gray-900"- >- <div className="flex items-center space-x-2">- {item.image && (- <BlurImage- src={item.image}- alt={item.value}- className="h-4 w-4 rounded-full"- width={16}- height={16}- />- )}- <p- className={cn(- "whitespace-nowrap py-0.5 text-sm",- item.color && "rounded-md px-2",- item.color === "red" && "bg-red-100 text-red-600",- item.color === "yellow" && "bg-yellow-100 text-yellow-600",- item.color === "green" && "bg-green-100 text-green-600",- item.color === "blue" && "bg-blue-100 text-blue-600",- item.color === "purple" && "bg-purple-100 text-purple-600",- item.color === "brown" && "bg-brown-100 text-brown-600",- )}- >- {item.value}- </p>- {item.label && (- <Badge className="text-xs" variant="neutral">- {item.label}- </Badge>- )}- </div>+ const { getReferenceProps, getFloatingProps } = useInteractions([dismiss]);- <Check className="invisible h-5 w-5 text-gray-500 aria-selected:visible" />- </Command.Item>- )),- );+ const scrollRef = useRef<HTMLDivElement>(null);+ const { scrollProgress, updateScrollProgress } = useScrollProgress(scrollRef);- // when adjustForMobile is true, render the input as a drawer- if (isMobile && adjustForMobile) {- return (- <Drawer.Root open={openCommandList} onOpenChange={setOpenCommandList}>- <Drawer.Trigger className="sm:hidden" asChild>- <Command ref={commandRef} className="relative" loop>- <div- className={cn(- "group relative rounded-md border border-gray-300 bg-white px-1 focus-within:border-gray-500 focus-within:ring-1 focus-within:ring-gray-500 md:min-w-[140px]",- className,- )}+ const { isMobile } = useMediaQuery();++ return (+ <InputSelectContext.Provider+ value={{+ inputAttrs: inputAttrs || {},+ openCommandList,+ setOpenCommandList,+ inputValue,+ setInputValue,+ disabled: Boolean(disabled),+ selectedItem,+ setSelectedItem,+ }}+ >+ {isMobile && adjustForMobile ? (+ // when adjustForMobile is true, render the input as a drawer+ <Drawer.Root open={openCommandList} onOpenChange={setOpenCommandList}>+ <Drawer.Trigger className="sm:hidden" asChild>+ <Command+ ref={commandRef}+ className="relative"+ shouldFilter={false}+ loop>- <div className="absolute inset-y-0 left-0 flex items-center justify-center pl-3 text-gray-400">- {selectedItem && selectedItem.image ? (- <img- src={selectedItem.image}- alt={selectedItem.value}- className="h-4 w-4 rounded-full"- />- ) : (- icon || <Search className="h-4 w-4 text-gray-400" />- )}- </div>- <div className="flex h-10 px-8">- <CommandInput />- <CloseChevron />- </div>- </div>- </Command>- </Drawer.Trigger>- <Drawer.Overlay className="fixed inset-0 z-40 bg-gray-100 bg-opacity-10 backdrop-blur" />- <Drawer.Portal>- <Drawer.Content className="fixed bottom-0 left-0 right-0 z-50 mt-24 rounded-t-lg border-t border-gray-200 bg-white">- <Command ref={commandRef} className="relative" loop><divclassName={cn(- "group relative mb-2 rounded-t-md border-b border-gray-300 bg-white p-1 sm:border sm:py-0 sm:focus-within:border-gray-500 sm:focus-within:ring-1 sm:focus-within:ring-gray-200",+ "group relative rounded-md border border-gray-300 bg-white px-1 focus-within:border-gray-500 focus-within:ring-1 focus-within:ring-gray-500 md:min-w-[140px]",className,)}>@@ -232,8 +191,111 @@ export function InputSelect({<CloseChevron /></div></div>- {openCommandList && (- <Command.List className="dub-scrollbar h-[70vh] overflow-y-auto p-2">+ </Command>+ </Drawer.Trigger>+ <Drawer.Overlay className="fixed inset-0 z-40 bg-gray-100 bg-opacity-10 backdrop-blur" />+ <Drawer.Portal>+ <Drawer.Content className="fixed bottom-0 left-0 right-0 z-50 mt-24 rounded-t-lg border-t border-gray-200 bg-white">+ <Command+ ref={commandRef}+ className="relative"+ shouldFilter={false}+ loop+ >+ <div+ className={cn(+ "group relative mb-2 rounded-t-md border-b border-gray-300 bg-white p-1 sm:border sm:py-0 sm:focus-within:border-gray-500 sm:focus-within:ring-1 sm:focus-within:ring-gray-200",+ className,+ )}+ >+ <div className="absolute inset-y-0 left-0 flex items-center justify-center pl-3 text-gray-400">+ {selectedItem && selectedItem.image ? (+ <img+ src={selectedItem.image}+ alt={selectedItem.value}+ className="h-4 w-4 rounded-full"+ />+ ) : (+ icon || <Search className="h-4 w-4 text-gray-400" />+ )}+ </div>+ <div className="flex h-10 px-8">+ <CommandInput />+ <CloseChevron />+ </div>+ </div>+ {openCommandList && (+ <Command.List className="dub-scrollbar h-[70vh] overflow-y-auto p-2">+ {items.length === 0 &&+ inputValue === "" &&+ (noItemsElement ? (+ <div>{noItemsElement}</div>+ ) : (+ <p className="px-4 py-2 text-sm text-gray-600">+ No items found.+ </p>+ ))}+ {inputValue !== "" && (+ <Command.Empty className="px-4 py-2 text-sm text-gray-600">+ No results found.+ </Command.Empty>+ )}+ <SelectorList items={filteredItems} />+ </Command.List>+ )}+ </Command>+ </Drawer.Content>+ <Drawer.Overlay />+ </Drawer.Portal>+ </Drawer.Root>+ ) : (+ <Command+ ref={commandRef}+ className="relative"+ shouldFilter={false}+ loop+ >+ <div+ className={cn(+ "group rounded-md border border-gray-200 bg-white px-1 transition-all focus-within:border-gray-500 focus-within:ring-4 focus-within:ring-gray-200",+ className,+ )}+ >+ <div+ onClick={() => setOpenCommandList((prev) => !prev)}+ className="absolute inset-y-0 left-0 flex cursor-pointer items-center justify-center pl-3 text-gray-400"+ >+ {selectedItem && selectedItem.image ? (+ <img+ src={selectedItem.image}+ alt={selectedItem.value}+ className="h-4 w-4 rounded-full"+ />+ ) : (+ icon || <Search className="h-4 w-4 text-gray-400" />+ )}+ </div>+ <div className="flex h-10 px-8">+ <CommandInput+ ref={floatingRefs.setReference}+ {...getReferenceProps()}+ />+ <CloseChevron />+ </div>+ </div>+ {openCommandList && (+ <div+ ref={floatingRefs.setFloating}+ style={floatingStyles}+ {...getFloatingProps()}+ className="z-20 flex w-full min-w-[160px] flex-col overflow-hidden rounded-md border border-gray-200 bg-white shadow-md transition-all duration-75"+ >+ <div+ ref={scrollRef}+ onScroll={updateScrollProgress}+ className="grow overflow-y-auto p-2"+ >+ <Command.List>{items.length === 0 &&inputValue === "" &&(noItemsElement ? (@@ -248,61 +310,144 @@ export function InputSelect({No results found.</Command.Empty>)}- <SelectorList /></Command.List>- )}- </Command>- </Drawer.Content>- <Drawer.Overlay />- </Drawer.Portal>- </Drawer.Root>- );- }+ <SelectorList items={filteredItems} />+ </div>- return (- <Command ref={commandRef} className="relative" loop>- <div- className={cn(- "group rounded-md border border-gray-200 bg-white px-1 transition-all focus-within:border-gray-500 focus-within:ring-4 focus-within:ring-gray-200",- className,- )}- >- <div- onClick={() => setOpenCommandList((prev) => !prev)}- className="absolute inset-y-0 left-0 flex cursor-pointer items-center justify-center pl-3 text-gray-400"- >- {selectedItem && selectedItem.image ? (- <img- src={selectedItem.image}- alt={selectedItem.value}- className="h-4 w-4 rounded-full"- />- ) : (- icon || <Search className="h-4 w-4 text-gray-400" />+ {/* Bottom scroll fade */}+ <div+ className="pointer-events-none absolute bottom-0 left-0 hidden h-16 w-full bg-gradient-to-t from-white sm:block"+ style={{ opacity: 1 - Math.pow(scrollProgress, 2) }}+ />+ </div>)}- </div>- <div className="flex h-10 px-8">- <CommandInput />- <CloseChevron />- </div>- </div>- {openCommandList && (- <Command.List className="dub-scrollbar absolute z-20 mt-2 h-[calc(var(--cmdk-list-height)+17px)] max-h-[300px] w-full min-w-[160px] overflow-auto rounded-md border border-gray-200 bg-white p-2 shadow-md transition-all duration-75">- {items.length === 0 &&- inputValue === "" &&- (noItemsElement ? (- <div>{noItemsElement}</div>- ) : (- <p className="px-4 py-2 text-sm text-gray-600">No items found.</p>- ))}- {inputValue !== "" && (- <Command.Empty className="px-4 py-2 text-sm text-gray-600">- No results found.- </Command.Empty>+ </Command>+ )}+ </InputSelectContext.Provider>+ );+}++const CommandInput = forwardRef<HTMLInputElement>((_, ref) => {+ const isEmpty = useCommandState((state: any) => state.filtered.count === 0);++ const {+ inputAttrs,+ openCommandList,+ setOpenCommandList,+ inputValue,+ setInputValue,+ disabled,+ } = useContext(InputSelectContext);++ return (+ <Command.Input+ ref={ref}+ placeholder={inputAttrs?.placeholder || "Search..."}+ // hacky focus on the input when the dropdown opens+ autoFocus={openCommandList}+ onFocus={() => setOpenCommandList(true)}+ value={inputValue}+ onValueChange={setInputValue}+ onKeyDown={(e) => {+ if (e.key === "Escape") {+ e.preventDefault();+ setOpenCommandList(false);+ // listen for cases where empty results and enter is pressed+ } else if (e.key === "Enter" && isEmpty) {+ setOpenCommandList(false);+ // if it's a letter or a number and there's no meta key pressed, openCommandList dropdown+ } else if (e.key.match(/^[a-z0-9]$/i) && !e.metaKey) {+ setOpenCommandList(true);+ }+ }}+ disabled={disabled}+ className="block w-full truncate rounded-md border-none px-0 text-base text-gray-900 placeholder-gray-400 outline-none outline-0 transition-all duration-300 focus:ring-0 md:text-sm"+ />+ );+});++function CloseChevron() {+ const {+ setSelectedItem,+ openCommandList,+ setOpenCommandList,+ inputValue,+ setInputValue,+ } = useContext(InputSelectContext);++ return (+ <button+ onClick={() => {+ setOpenCommandList((prev) => !prev);+ setSelectedItem(null);+ setInputValue("");+ }}+ className="absolute inset-y-0 right-0 my-auto pr-3"+ >+ {inputValue.length > 0 ? (+ <X className="h-4 w-4 text-gray-400 transition-all hover:text-gray-700" />+ ) : (+ <ChevronDown+ className={cn(+ "h-4 w-4 text-gray-400 transition-all hover:text-gray-700",+ {+ "rotate-180 transform": openCommandList,+ },)}- <SelectorList />- </Command.List>+ />)}- </Command>+ </button>);}++function SelectorList({ items }: { items: InputSelectItemProps[] }) {+ const { setSelectedItem, setOpenCommandList, setInputValue } =+ useContext(InputSelectContext);++ return items.map((item) => (+ <Command.Item+ key={item.id}+ value={item.value}+ disabled={item.disabled}+ onSelect={() => {+ setSelectedItem(item);+ setInputValue(item.value);+ setOpenCommandList(false);+ }}+ className="group flex cursor-pointer items-center justify-between rounded-md px-4 py-2 text-sm text-gray-900 hover:bg-gray-100 hover:text-gray-900 active:bg-gray-200 aria-disabled:cursor-not-allowed aria-disabled:opacity-75 aria-disabled:hover:bg-white aria-selected:bg-gray-100 aria-selected:text-gray-900"+ >+ <div className="flex items-center space-x-2">+ {item.image && (+ <BlurImage+ src={item.image}+ alt={item.value}+ className="h-4 w-4 rounded-full"+ width={16}+ height={16}+ />+ )}+ <p+ className={cn(+ "whitespace-nowrap py-0.5 text-sm",+ item.color && "rounded-md px-2",+ item.color === "red" && "bg-red-100 text-red-600",+ item.color === "yellow" && "bg-yellow-100 text-yellow-600",+ item.color === "green" && "bg-green-100 text-green-600",+ item.color === "blue" && "bg-blue-100 text-blue-600",+ item.color === "purple" && "bg-purple-100 text-purple-600",+ item.color === "brown" && "bg-brown-100 text-brown-600",+ )}+ >+ {item.value}+ </p>+ {item.label && (+ <Badge className="text-xs" variant="neutral">+ {item.label}+ </Badge>+ )}+ </div>++ <Check className="invisible h-5 w-5 text-gray-500 aria-selected:visible" />+ </Command.Item>+ ));+}diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 39d5744a4b..8921e16da8 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -448,6 +448,9 @@ importers:packages/ui:dependencies:+ '@floating-ui/react':+ specifier: ^0.26.20+ version: 0.26.20([email protected])([email protected])'@internationalized/date':specifier: ^3.5.3version: 3.5.4@@ -3616,17 +3619,17 @@ packages:resolution: {integrity: sha512-ZSjtmelB7IJfWD2Fvb7+Z+ChTIKWq6kjda95fLcQKNS5aheVHn4IkfgRQE3sIIzTcSLwLcLZUD9UBt+V7+h+Pw==}engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}- /@floating-ui/[email protected]:- resolution: {integrity: sha512-kK1h4m36DQ0UHGj5Ah4db7R0rHemTqqO0QLvUqi1/mUUp3LuAWbWxdxSIf/XsnH9VS6rRVPLJCncjRzUvyCLXg==}+ /@floating-ui/[email protected]:+ resolution: {integrity: sha512-8GrTWmoFhm5BsMZOTHeGD2/0FLKLQQHvO/ZmQga4tKempYRLz8aqJGqXVuQgisnMObq2YZ2SgkwctN1LOOxcqA==}dependencies:- '@floating-ui/utils': 0.1.6+ '@floating-ui/utils': 0.2.5dev: false- /@floating-ui/[email protected]:- resolution: {integrity: sha512-ClAbQnEqJAKCJOEbbLo5IUlZHkNszqhuxS4fHAVxRPXPya6Ysf2G8KypnYcOTpx6I8xcgF9bbHb6g/2KpbV8qA==}+ /@floating-ui/[email protected]:+ resolution: {integrity: sha512-kx62rP19VZ767Q653wsP1XZCGIirkE09E0QUGNYTM/ttbbQHqcGPdSfWFxUyyNLc/W6aoJRBajOSXhP6GXjC0Q==}dependencies:- '@floating-ui/core': 1.5.0- '@floating-ui/utils': 0.1.6+ '@floating-ui/core': 1.6.5+ '@floating-ui/utils': 0.2.5dev: false@@ -3635,13 +3638,37 @@ packages:react: '>=16.8.0'react-dom: '>=16.8.0'dependencies:- '@floating-ui/dom': 1.5.3+ '@floating-ui/dom': 1.6.8react: 18.2.0react-dom: 18.2.0([email protected])dev: false- /@floating-ui/[email protected]:- resolution: {integrity: sha512-OfX7E2oUDYxtBvsuS4e/jSn4Q9Qb6DzgeYtsAdkPZ47znpoNsMgZw0+tVijiv3uGNR6dgNlty6r9rzIzHjtd/A==}+ resolution: {integrity: sha512-4h84MJt3CHrtG18mGsXuLCHMrug49d7DFkU0RMIyshRveBeyV2hmV/pDaF2Uxtu8kgq5r46llp5E5FQiR0K2Yg==}+ peerDependencies:+ react: '>=16.8.0'+ react-dom: '>=16.8.0'+ dependencies:+ '@floating-ui/dom': 1.6.8+ react: 18.2.0+ react-dom: 18.2.0([email protected])+ dev: false++ resolution: {integrity: sha512-RixKJJG92fcIsVoqrFr4Onpzh7hlOx4U7NV4aLhMLmtvjZ5oTB/WzXaANYUZATKqXvvW7t9sCxtzejip26N5Ag==}+ peerDependencies:+ react: '>=16.8.0'+ react-dom: '>=16.8.0'+ dependencies:+ '@floating-ui/react-dom': 2.1.1([email protected])([email protected])+ '@floating-ui/utils': 0.2.5+ react: 18.2.0+ react-dom: 18.2.0([email protected])+ tabbable: 6.2.0+ dev: false++ /@floating-ui/[email protected]:+ resolution: {integrity: sha512-sTcG+QZ6fdEUObICavU+aB3Mp8HY4n14wYHdxK4fXjPmv3PXZZeY5RaguJmGyeH/CJQhX3fqKUtS4qc1LoHwhQ==}dev: false/@formatjs/[email protected]:@@ -19007,6 +19034,10 @@ packages:resolution: {integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==}dev: true+ resolution: {integrity: sha512-Cat63mxsVJlzYvN51JmVXIgNoUokrIaT2zLclCXjRd8boZ0004U4KCs/sToJ75C6sdlByWxpYnb5Boif1VSFew==}+ dev: false+resolution: {integrity: sha512-SqqhhaL0T06SW59+JVNfAqKdqLs0497esifRrZ7jOaefP3o64fdFNDMrAQWZFMxTLJPiHVjRLUywT8uFz1xNWQ==}dependencies: