Skip to content

Commit cb6c4bd

Browse files
chore(clerk-js): Bump floating-ui packages to latest (#5341)
Co-authored-by: Lennart <lekoarts@gmail.com>
1 parent 9bcb786 commit cb6c4bd

File tree

6 files changed

+31
-25
lines changed

6 files changed

+31
-25
lines changed

.changeset/neat-hotels-brush.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@clerk/clerk-js': patch
3+
---
4+
5+
Update floating-ui packages to latest.

packages/clerk-js/bundlewatch.config.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"files": [
3-
{ "path": "./dist/clerk.js", "maxSize": "572kB" },
3+
{ "path": "./dist/clerk.js", "maxSize": "573kB" },
44
{ "path": "./dist/clerk.browser.js", "maxSize": "78kB" },
55
{ "path": "./dist/clerk.headless.js", "maxSize": "50KB" },
66
{ "path": "./dist/ui-common*.js", "maxSize": "92KB" },
7-
{ "path": "./dist/vendors*.js", "maxSize": "26.5KB" },
7+
{ "path": "./dist/vendors*.js", "maxSize": "28.5KB" },
88
{ "path": "./dist/coinbase*.js", "maxSize": "35.5KB" },
99
{ "path": "./dist/createorganization*.js", "maxSize": "5KB" },
1010
{ "path": "./dist/impersonationfab*.js", "maxSize": "5KB" },

packages/clerk-js/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@
6060
"@coinbase/wallet-sdk": "4.3.0",
6161
"@emotion/cache": "11.11.0",
6262
"@emotion/react": "11.11.1",
63-
"@floating-ui/react": "0.25.4",
64-
"@floating-ui/react-dom": "^2.0.2",
63+
"@floating-ui/react": "0.27.5",
64+
"@floating-ui/react-dom": "^2.1.2",
6565
"@formkit/auto-animate": "^0.8.1",
6666
"@stripe/react-stripe-js": "3.1.1",
6767
"@stripe/stripe-js": "5.6.0",

packages/clerk-js/src/ui/elements/Popover.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import React from 'react';
55

66
type PopoverProps = PropsWithChildren<{
77
context: FloatingContext<ReferenceType>;
8-
nodeId: string;
8+
nodeId?: string;
99
isOpen?: boolean;
1010
initialFocus?: number | React.MutableRefObject<HTMLElement | null>;
1111
order?: Array<'reference' | 'floating' | 'content'>;

packages/clerk-js/src/ui/hooks/usePopover.ts

+2-6
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,6 @@ export const usePopover = (props: UsePopoverProps = {}) => {
5656
}),
5757
],
5858
});
59-
// Names are aliased because in @floating-ui/react-dom@2.0.0 the top-level elements were removed
60-
// This keeps the API shape for consumers of usePopover
61-
// @see https://github.com/floating-ui/floating-ui/releases/tag/%40floating-ui%2Freact-dom%402.0.0
62-
const { setReference: reference, setFloating: floating } = refs;
6359

6460
useDismiss(context, {
6561
enabled: canCloseModal !== false,
@@ -78,8 +74,8 @@ export const usePopover = (props: UsePopoverProps = {}) => {
7874
const close = React.useCallback(() => setIsOpen(false), [setIsOpen]);
7975

8076
return {
81-
reference,
82-
floating,
77+
reference: refs.setReference,
78+
floating: refs.setFloating,
8379
toggle,
8480
open,
8581
nodeId,

pnpm-lock.yaml

+19-14
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)