Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/neat-hotels-brush.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@clerk/clerk-js': patch
---

Update floating-ui packages to latest.
4 changes: 2 additions & 2 deletions packages/clerk-js/bundlewatch.config.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"files": [
{ "path": "./dist/clerk.js", "maxSize": "572kB" },
{ "path": "./dist/clerk.js", "maxSize": "573kB" },
{ "path": "./dist/clerk.browser.js", "maxSize": "78kB" },
{ "path": "./dist/clerk.headless.js", "maxSize": "50KB" },
{ "path": "./dist/ui-common*.js", "maxSize": "92KB" },
{ "path": "./dist/vendors*.js", "maxSize": "26.5KB" },
{ "path": "./dist/vendors*.js", "maxSize": "28.5KB" },
{ "path": "./dist/coinbase*.js", "maxSize": "35.5KB" },
{ "path": "./dist/createorganization*.js", "maxSize": "5KB" },
{ "path": "./dist/impersonationfab*.js", "maxSize": "5KB" },
Expand Down
4 changes: 2 additions & 2 deletions packages/clerk-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@
"@coinbase/wallet-sdk": "4.3.0",
"@emotion/cache": "11.11.0",
"@emotion/react": "11.11.1",
"@floating-ui/react": "0.25.4",
"@floating-ui/react-dom": "^2.0.2",
"@floating-ui/react": "0.27.5",
"@floating-ui/react-dom": "^2.1.2",
"@formkit/auto-animate": "^0.8.1",
"@stripe/react-stripe-js": "3.1.1",
"@stripe/stripe-js": "5.6.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/clerk-js/src/ui/elements/Popover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import React from 'react';

type PopoverProps = PropsWithChildren<{
context: FloatingContext<ReferenceType>;
nodeId: string;
nodeId?: string;
isOpen?: boolean;
initialFocus?: number | React.MutableRefObject<HTMLElement | null>;
order?: Array<'reference' | 'floating' | 'content'>;
Expand Down
8 changes: 2 additions & 6 deletions packages/clerk-js/src/ui/hooks/usePopover.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,6 @@ export const usePopover = (props: UsePopoverProps = {}) => {
}),
],
});
// Names are aliased because in @floating-ui/react-dom@2.0.0 the top-level elements were removed
// This keeps the API shape for consumers of usePopover
// @see https://github.com/floating-ui/floating-ui/releases/tag/%40floating-ui%2Freact-dom%402.0.0
const { setReference: reference, setFloating: floating } = refs;

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

return {
reference,
floating,
reference: refs.setReference,
floating: refs.setFloating,
toggle,
open,
nodeId,
Expand Down
33 changes: 19 additions & 14 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.