diff --git a/docs/reference/generated/menu-portal.json b/docs/reference/generated/menu-portal.json
index 317c6bba39..5a7bcc3858 100644
--- a/docs/reference/generated/menu-portal.json
+++ b/docs/reference/generated/menu-portal.json
@@ -9,7 +9,7 @@
"keepMounted": {
"type": "boolean",
"default": "false",
- "description": "Whether to keep the portal mounted in the DOM while the popup is hidden.\nwhen the popup is closed."
+ "description": "Whether to keep the portal mounted in the DOM while the popup is hidden."
}
},
"dataAttributes": {},
diff --git a/docs/reference/generated/popover-portal.json b/docs/reference/generated/popover-portal.json
index 8f8687b8ea..4a4554c421 100644
--- a/docs/reference/generated/popover-portal.json
+++ b/docs/reference/generated/popover-portal.json
@@ -9,7 +9,7 @@
"keepMounted": {
"type": "boolean",
"default": "false",
- "description": "Whether to keep the portal mounted in the DOM while the popup is hidden.\nwhen the popup is closed."
+ "description": "Whether to keep the portal mounted in the DOM while the popup is hidden."
}
},
"dataAttributes": {},
diff --git a/docs/reference/generated/preview-card-portal.json b/docs/reference/generated/preview-card-portal.json
index 7f56e0d0d4..34c82e1b85 100644
--- a/docs/reference/generated/preview-card-portal.json
+++ b/docs/reference/generated/preview-card-portal.json
@@ -9,7 +9,7 @@
"keepMounted": {
"type": "boolean",
"default": "false",
- "description": "Whether to keep the portal mounted in the DOM while the popup is hidden.\nwhen the popup is closed."
+ "description": "Whether to keep the portal mounted in the DOM while the popup is hidden."
}
},
"dataAttributes": {},
diff --git a/docs/reference/generated/tooltip-portal.json b/docs/reference/generated/tooltip-portal.json
index 5876bbfa56..41be076137 100644
--- a/docs/reference/generated/tooltip-portal.json
+++ b/docs/reference/generated/tooltip-portal.json
@@ -9,7 +9,7 @@
"keepMounted": {
"type": "boolean",
"default": "false",
- "description": "Whether to keep the portal mounted in the DOM while the popup is hidden.\nwhen the popup is closed."
+ "description": "Whether to keep the portal mounted in the DOM while the popup is hidden."
}
},
"dataAttributes": {},
diff --git a/docs/src/app/(private)/experiments/dialog.tsx b/docs/src/app/(private)/experiments/dialog.tsx
index cf2509c77c..1573d4d1c7 100644
--- a/docs/src/app/(private)/experiments/dialog.tsx
+++ b/docs/src/app/(private)/experiments/dialog.tsx
@@ -74,16 +74,11 @@ function CssTransitionDialogDemo({ keepMounted, modal, dismissible }: DemoProps)
Open with CSS transition
-
-
-
-
+
+
+
{renderContent(
'Dialog with CSS transitions',
NESTED_DIALOGS,
@@ -106,16 +101,11 @@ function CssAnimationDialogDemo({ keepMounted, modal, dismissible }: DemoProps)
Open with CSS animation
-
-
-
-
+
+
+
{renderContent(
'Dialog with CSS animations',
NESTED_DIALOGS,
@@ -147,9 +137,8 @@ function ReactSpringDialogDemo({ keepMounted, modal, dismissible }: DemoProps) {
/>
-
+
{renderContent(
diff --git a/docs/src/app/(private)/experiments/menu-rtl.tsx b/docs/src/app/(private)/experiments/menu-rtl.tsx
index ee6ac09979..d1c2b1e2a3 100644
--- a/docs/src/app/(private)/experiments/menu-rtl.tsx
+++ b/docs/src/app/(private)/experiments/menu-rtl.tsx
@@ -16,13 +16,8 @@ export default function RtlPopover() {
-
-
+
+
@@ -40,13 +35,8 @@ export default function RtlPopover() {
-
-
+
+
diff --git a/docs/src/app/(private)/experiments/popup-transform-origin.tsx b/docs/src/app/(private)/experiments/popup-transform-origin.tsx
index 98b804e5d2..97731bc862 100644
--- a/docs/src/app/(private)/experiments/popup-transform-origin.tsx
+++ b/docs/src/app/(private)/experiments/popup-transform-origin.tsx
@@ -9,9 +9,11 @@ function Popover({ side }: { side: Side }) {
{side}
-
-
-
+
+
+
+
+
);
}
@@ -22,11 +24,13 @@ function PopoverWithArrow({ side }: { side: Side }) {
{side}
-
-
-
-
-
+
+
+
+
+
+
+
);
}
diff --git a/docs/src/app/(private)/experiments/tooltip.tsx b/docs/src/app/(private)/experiments/tooltip.tsx
index 41f2052d06..e205e70991 100644
--- a/docs/src/app/(private)/experiments/tooltip.tsx
+++ b/docs/src/app/(private)/experiments/tooltip.tsx
@@ -227,7 +227,7 @@ export default function TooltipTransitionExperiment() {
Anchor
-
+
Tooltip
@@ -237,7 +237,7 @@ export default function TooltipTransitionExperiment() {
Anchor
-
+
Tooltip
@@ -250,7 +250,7 @@ export default function TooltipTransitionExperiment() {
Anchor
-
+
Tooltip
@@ -264,7 +264,7 @@ export default function TooltipTransitionExperiment() {
Anchor
-
+
Tooltip
@@ -274,7 +274,7 @@ export default function TooltipTransitionExperiment() {
Anchor
-
+
Tooltip
@@ -287,7 +287,7 @@ export default function TooltipTransitionExperiment() {
Anchor
-
+
Tooltip
@@ -311,7 +311,7 @@ function FramerMotion() {
{isOpen && (
-
+
', () => {
it(`should ${!expectedIsMounted ? 'not ' : ''}keep the dialog mounted when keepMounted=${keepMounted}`, async () => {
const { queryByRole } = await render(
-
-
+
+
,
);
diff --git a/packages/react/src/dialog/root/DialogRoot.test.tsx b/packages/react/src/dialog/root/DialogRoot.test.tsx
index 9ffb90aeab..b9a4f2b9f1 100644
--- a/packages/react/src/dialog/root/DialogRoot.test.tsx
+++ b/packages/react/src/dialog/root/DialogRoot.test.tsx
@@ -133,7 +133,6 @@ describe('', () => {
className="animation-test-popup"
data-testid="popup"
onAnimationEnd={notifyAnimationFinished}
- keepMounted
/>
@@ -399,8 +398,8 @@ describe('', () => {
{/* eslint-disable-next-line react/no-danger */}
-
-
+
+
,
);
diff --git a/packages/react/src/menu/checkbox-item/MenuCheckboxItem.test.tsx b/packages/react/src/menu/checkbox-item/MenuCheckboxItem.test.tsx
index 8c316b2658..28c2cc79ac 100644
--- a/packages/react/src/menu/checkbox-item/MenuCheckboxItem.test.tsx
+++ b/packages/react/src/menu/checkbox-item/MenuCheckboxItem.test.tsx
@@ -293,7 +293,7 @@ describe('', () => {
Open
-
+
Item
diff --git a/packages/react/src/menu/portal/MenuPortal.tsx b/packages/react/src/menu/portal/MenuPortal.tsx
index 58b4207fe9..d5bf6e5756 100644
--- a/packages/react/src/menu/portal/MenuPortal.tsx
+++ b/packages/react/src/menu/portal/MenuPortal.tsx
@@ -34,7 +34,6 @@ namespace MenuPortal {
children?: React.ReactNode;
/**
* Whether to keep the portal mounted in the DOM while the popup is hidden.
- * when the popup is closed.
* @default false
*/
keepMounted?: boolean;
@@ -60,7 +59,6 @@ MenuPortal.propTypes /* remove-proptypes */ = {
container: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([HTMLElementType, refType]),
/**
* Whether to keep the portal mounted in the DOM while the popup is hidden.
- * when the popup is closed.
* @default false
*/
keepMounted: PropTypes.bool,
diff --git a/packages/react/src/menu/positioner/MenuPositioner.test.tsx b/packages/react/src/menu/positioner/MenuPositioner.test.tsx
index 8af237d028..7693a149fb 100644
--- a/packages/react/src/menu/positioner/MenuPositioner.test.tsx
+++ b/packages/react/src/menu/positioner/MenuPositioner.test.tsx
@@ -248,7 +248,7 @@ describe('', () => {
Toggle
-
+
1
2
@@ -278,7 +278,7 @@ describe('', () => {
Toggle
-
+
1
2
diff --git a/packages/react/src/menu/positioner/useMenuPositioner.ts b/packages/react/src/menu/positioner/useMenuPositioner.ts
index 9325808bbf..46c5c89aae 100644
--- a/packages/react/src/menu/positioner/useMenuPositioner.ts
+++ b/packages/react/src/menu/positioner/useMenuPositioner.ts
@@ -144,10 +144,6 @@ export namespace useMenuPositioner {
* @default 5
*/
collisionPadding?: Padding;
- /**
- * Whether the portal is kept mounted in the DOM while the popup is closed.
- */
- keepMounted: boolean;
/**
* Whether to maintain the menu in the viewport after
* the anchor element is scrolled out of view.
@@ -164,6 +160,10 @@ export namespace useMenuPositioner {
}
export interface Parameters extends SharedParameters {
+ /**
+ * Whether the portal is kept mounted in the DOM while the popup is closed.
+ */
+ keepMounted: boolean;
/**
* Whether the Menu is mounted.
*/
diff --git a/packages/react/src/menu/radio-item/MenuRadioItem.test.tsx b/packages/react/src/menu/radio-item/MenuRadioItem.test.tsx
index f410cb397c..5c6aa09b17 100644
--- a/packages/react/src/menu/radio-item/MenuRadioItem.test.tsx
+++ b/packages/react/src/menu/radio-item/MenuRadioItem.test.tsx
@@ -249,7 +249,7 @@ describe('', () => {
Open
-
+
Item
diff --git a/packages/react/src/menu/root/MenuRoot.test.tsx b/packages/react/src/menu/root/MenuRoot.test.tsx
index b2c879dedb..5bb3303f03 100644
--- a/packages/react/src/menu/root/MenuRoot.test.tsx
+++ b/packages/react/src/menu/root/MenuRoot.test.tsx
@@ -597,8 +597,8 @@ describe('', () => {
Toggle
-
-
+
+
Close
@@ -804,7 +804,7 @@ describe('', () => {
-
+
', () => {
describeConformance(, () => ({
refInstanceof: window.HTMLDivElement,
render(node) {
- return render({node});
+ return render(
+
+ {node}
+ ,
+ );
},
}));
@@ -18,7 +22,9 @@ describe('', () => {
it('has hidden attribute when closed', async () => {
await render(
-
+
+
+
,
);
@@ -28,7 +34,9 @@ describe('', () => {
it('does not have inert attribute when open', async () => {
await render(
-
+
+
+
,
);
diff --git a/packages/react/src/popover/positioner/usePopoverPositioner.tsx b/packages/react/src/popover/positioner/usePopoverPositioner.tsx
index b5569e3b18..68ec63b80a 100644
--- a/packages/react/src/popover/positioner/usePopoverPositioner.tsx
+++ b/packages/react/src/popover/positioner/usePopoverPositioner.tsx
@@ -132,10 +132,6 @@ export namespace usePopoverPositioner {
* @default 5
*/
arrowPadding?: number;
- /**
- * Whether the portal is kept mounted in the DOM while the popup is closed.
- */
- keepMounted: boolean;
/**
* Whether the popover continuously tracks its anchor after the initial positioning upon mount.
* @default true
@@ -144,6 +140,10 @@ export namespace usePopoverPositioner {
}
export interface Parameters extends SharedParameters {
+ /**
+ * Whether the portal is kept mounted in the DOM while the popup is closed.
+ */
+ keepMounted: boolean;
/**
* Whether the popover is mounted.
*/
diff --git a/packages/react/src/popover/root/PopoverRoot.test.tsx b/packages/react/src/popover/root/PopoverRoot.test.tsx
index 0372a511fc..57f811692b 100644
--- a/packages/react/src/popover/root/PopoverRoot.test.tsx
+++ b/packages/react/src/popover/root/PopoverRoot.test.tsx
@@ -201,8 +201,8 @@ describe('', () => {
-
-
+
+
@@ -262,7 +262,7 @@ describe('', () => {
-
+
', () => {
Toggle
-
-
+
+
Close
diff --git a/packages/react/src/preview-card/portal/PreviewCardPortal.tsx b/packages/react/src/preview-card/portal/PreviewCardPortal.tsx
index 252609bd16..d387360425 100644
--- a/packages/react/src/preview-card/portal/PreviewCardPortal.tsx
+++ b/packages/react/src/preview-card/portal/PreviewCardPortal.tsx
@@ -34,7 +34,6 @@ namespace PreviewCardPortal {
children?: React.ReactNode;
/**
* Whether to keep the portal mounted in the DOM while the popup is hidden.
- * when the popup is closed.
* @default false
*/
keepMounted?: boolean;
@@ -60,7 +59,6 @@ PreviewCardPortal.propTypes /* remove-proptypes */ = {
container: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([HTMLElementType, refType]),
/**
* Whether to keep the portal mounted in the DOM while the popup is hidden.
- * when the popup is closed.
* @default false
*/
keepMounted: PropTypes.bool,
diff --git a/packages/react/src/preview-card/positioner/usePreviewCardPositioner.ts b/packages/react/src/preview-card/positioner/usePreviewCardPositioner.ts
index 5d34532aa2..2228d1e050 100644
--- a/packages/react/src/preview-card/positioner/usePreviewCardPositioner.ts
+++ b/packages/react/src/preview-card/positioner/usePreviewCardPositioner.ts
@@ -134,10 +134,6 @@ export namespace usePreviewCardPositioner {
* @default 5
*/
arrowPadding?: number;
- /**
- * Whether the portal is kept mounted in the DOM while the popup is closed.
- */
- keepMounted: boolean;
/**
* Whether the preview card popup continuously tracks its anchor after the initial positioning
* upon mount.
@@ -147,6 +143,10 @@ export namespace usePreviewCardPositioner {
}
export interface Parameters extends SharedParameters {
+ /**
+ * Whether the portal is kept mounted in the DOM while the popup is closed.
+ */
+ keepMounted: boolean;
/**
* Whether the preview card is mounted.
*/
diff --git a/packages/react/src/preview-card/root/PreviewCardRoot.test.tsx b/packages/react/src/preview-card/root/PreviewCardRoot.test.tsx
index 65a3a50aab..876e5e84b0 100644
--- a/packages/react/src/preview-card/root/PreviewCardRoot.test.tsx
+++ b/packages/react/src/preview-card/root/PreviewCardRoot.test.tsx
@@ -238,7 +238,7 @@ describe('', () => {
-
+