diff --git a/docs/data/api/menu-positioner.json b/docs/data/api/menu-positioner.json index f57d2e57bf..6356647f8d 100644 --- a/docs/data/api/menu-positioner.json +++ b/docs/data/api/menu-positioner.json @@ -33,7 +33,7 @@ "container": { "type": { "name": "union", "description": "HTML element
| func" } }, "hideWhenDetached": { "type": { "name": "bool" }, "default": "false" }, "keepMounted": { "type": { "name": "bool" }, "default": "false" }, - "positionStrategy": { + "positionMethod": { "type": { "name": "enum", "description": "'absolute'
| 'fixed'" }, "default": "'absolute'" }, diff --git a/docs/data/api/popover-positioner.json b/docs/data/api/popover-positioner.json index e40a2886ea..adc5433259 100644 --- a/docs/data/api/popover-positioner.json +++ b/docs/data/api/popover-positioner.json @@ -33,7 +33,7 @@ "container": { "type": { "name": "union", "description": "HTML element
| func" } }, "hideWhenDetached": { "type": { "name": "bool" }, "default": "false" }, "keepMounted": { "type": { "name": "bool" }, "default": "false" }, - "positionStrategy": { + "positionMethod": { "type": { "name": "enum", "description": "'absolute'
| 'fixed'" }, "default": "'absolute'" }, diff --git a/docs/data/api/preview-card-positioner.json b/docs/data/api/preview-card-positioner.json index 84141a8efb..ae28e1f9c6 100644 --- a/docs/data/api/preview-card-positioner.json +++ b/docs/data/api/preview-card-positioner.json @@ -33,7 +33,7 @@ "container": { "type": { "name": "union", "description": "HTML element
| func" } }, "hideWhenDetached": { "type": { "name": "bool" }, "default": "false" }, "keepMounted": { "type": { "name": "bool" }, "default": "false" }, - "positionStrategy": { + "positionMethod": { "type": { "name": "enum", "description": "'absolute'
| 'fixed'" }, "default": "'absolute'" }, diff --git a/docs/data/api/tooltip-positioner.json b/docs/data/api/tooltip-positioner.json index d670049eb7..3d29c4807b 100644 --- a/docs/data/api/tooltip-positioner.json +++ b/docs/data/api/tooltip-positioner.json @@ -33,7 +33,7 @@ "container": { "type": { "name": "union", "description": "HTML element
| func" } }, "hideWhenDetached": { "type": { "name": "bool" }, "default": "false" }, "keepMounted": { "type": { "name": "bool" }, "default": "false" }, - "positionStrategy": { + "positionMethod": { "type": { "name": "enum", "description": "'absolute'
| 'fixed'" }, "default": "'absolute'" }, diff --git a/docs/data/translations/api-docs/menu-positioner/menu-positioner.json b/docs/data/translations/api-docs/menu-positioner/menu-positioner.json index 23fd5b5ac1..d04977dc56 100644 --- a/docs/data/translations/api-docs/menu-positioner/menu-positioner.json +++ b/docs/data/translations/api-docs/menu-positioner/menu-positioner.json @@ -27,7 +27,7 @@ "keepMounted": { "description": "Whether the menu popup remains mounted in the DOM while closed." }, - "positionStrategy": { + "positionMethod": { "description": "The CSS position strategy for positioning the Menu popup element." }, "render": { "description": "A function to customize rendering of the component." }, diff --git a/docs/data/translations/api-docs/popover-positioner/popover-positioner.json b/docs/data/translations/api-docs/popover-positioner/popover-positioner.json index 327de01f6d..a3e4cceb4d 100644 --- a/docs/data/translations/api-docs/popover-positioner/popover-positioner.json +++ b/docs/data/translations/api-docs/popover-positioner/popover-positioner.json @@ -27,7 +27,7 @@ "keepMounted": { "description": "Whether the popover remains mounted in the DOM while closed." }, - "positionStrategy": { + "positionMethod": { "description": "The CSS position strategy for positioning the popover element." }, "render": { "description": "A function to customize rendering of the component." }, diff --git a/docs/data/translations/api-docs/preview-card-positioner/preview-card-positioner.json b/docs/data/translations/api-docs/preview-card-positioner/preview-card-positioner.json index 5cf8e3b6d1..045423c060 100644 --- a/docs/data/translations/api-docs/preview-card-positioner/preview-card-positioner.json +++ b/docs/data/translations/api-docs/preview-card-positioner/preview-card-positioner.json @@ -29,7 +29,7 @@ "keepMounted": { "description": "If true, preview card stays mounted in the DOM when closed." }, - "positionStrategy": { + "positionMethod": { "description": "The CSS position strategy for positioning the preview card popup element." }, "render": { "description": "A function to customize rendering of the component." }, diff --git a/docs/data/translations/api-docs/tooltip-positioner/tooltip-positioner.json b/docs/data/translations/api-docs/tooltip-positioner/tooltip-positioner.json index 3201fa0d44..379354a0ca 100644 --- a/docs/data/translations/api-docs/tooltip-positioner/tooltip-positioner.json +++ b/docs/data/translations/api-docs/tooltip-positioner/tooltip-positioner.json @@ -27,7 +27,7 @@ "keepMounted": { "description": "Whether the tooltip remains mounted in the DOM while closed." }, - "positionStrategy": { + "positionMethod": { "description": "The CSS position strategy for positioning the tooltip element." }, "render": { "description": "A function to customize rendering of the component." }, diff --git a/docs/src/components/DocsVersionSelector.tsx b/docs/src/components/DocsVersionSelector.tsx index 92be157508..f1bb24dea1 100644 --- a/docs/src/components/DocsVersionSelector.tsx +++ b/docs/src/components/DocsVersionSelector.tsx @@ -30,7 +30,7 @@ export function DocsVersionSelector(props: DocsVersionSelectorProps) { side="bottom" alignment="start" sideOffset={5} - positionStrategy="fixed" + positionMethod="fixed" > {versions.map((version) => ( diff --git a/packages/mui-base/src/Menu/Positioner/MenuPositioner.tsx b/packages/mui-base/src/Menu/Positioner/MenuPositioner.tsx index 5dd0f6c963..681118cf23 100644 --- a/packages/mui-base/src/Menu/Positioner/MenuPositioner.tsx +++ b/packages/mui-base/src/Menu/Positioner/MenuPositioner.tsx @@ -35,7 +35,7 @@ const MenuPositioner = React.forwardRef(function MenuPositioner( ) { const { anchor, - positionStrategy = 'absolute', + positionMethod = 'absolute', className, render, keepMounted = false, @@ -69,7 +69,7 @@ const MenuPositioner = React.forwardRef(function MenuPositioner( const positioner = useMenuPositioner({ anchor: anchor || triggerElement, floatingRootContext, - positionStrategy, + positionMethod, container, open, mounted, @@ -253,7 +253,7 @@ MenuPositioner.propTypes /* remove-proptypes */ = { * The CSS position strategy for positioning the Menu popup element. * @default 'absolute' */ - positionStrategy: PropTypes.oneOf(['absolute', 'fixed']), + positionMethod: PropTypes.oneOf(['absolute', 'fixed']), /** * A function to customize rendering of the component. */ diff --git a/packages/mui-base/src/Menu/Positioner/useMenuPositioner.ts b/packages/mui-base/src/Menu/Positioner/useMenuPositioner.ts index 46ea58744b..818bb235fe 100644 --- a/packages/mui-base/src/Menu/Positioner/useMenuPositioner.ts +++ b/packages/mui-base/src/Menu/Positioner/useMenuPositioner.ts @@ -91,7 +91,7 @@ export namespace useMenuPositioner { * The CSS position strategy for positioning the Menu popup element. * @default 'absolute' */ - positionStrategy?: 'absolute' | 'fixed'; + positionMethod?: 'absolute' | 'fixed'; /** * The container element to which the Menu popup will be appended to. */ diff --git a/packages/mui-base/src/Popover/Positioner/PopoverPositioner.tsx b/packages/mui-base/src/Popover/Positioner/PopoverPositioner.tsx index 1e03b0208f..25399963d1 100644 --- a/packages/mui-base/src/Popover/Positioner/PopoverPositioner.tsx +++ b/packages/mui-base/src/Popover/Positioner/PopoverPositioner.tsx @@ -32,7 +32,7 @@ const PopoverPositioner = React.forwardRef(function PopoverPositioner( anchor, container, keepMounted = false, - positionStrategy = 'absolute', + positionMethod = 'absolute', side = 'bottom', alignment = 'center', sideOffset = 0, @@ -51,7 +51,7 @@ const PopoverPositioner = React.forwardRef(function PopoverPositioner( const positioner = usePopoverPositioner({ anchor: anchor || triggerElement, floatingRootContext, - positionStrategy, + positionMethod, open, keepMounted, side, @@ -220,7 +220,7 @@ PopoverPositioner.propTypes /* remove-proptypes */ = { * The CSS position strategy for positioning the popover element. * @default 'absolute' */ - positionStrategy: PropTypes.oneOf(['absolute', 'fixed']), + positionMethod: PropTypes.oneOf(['absolute', 'fixed']), /** * A function to customize rendering of the component. */ diff --git a/packages/mui-base/src/Popover/Positioner/usePopoverPositioner.tsx b/packages/mui-base/src/Popover/Positioner/usePopoverPositioner.tsx index 96380cb96b..dff80d7ede 100644 --- a/packages/mui-base/src/Popover/Positioner/usePopoverPositioner.tsx +++ b/packages/mui-base/src/Popover/Positioner/usePopoverPositioner.tsx @@ -87,7 +87,7 @@ export namespace usePopoverPositioner { * The CSS position strategy for positioning the popover element. * @default 'absolute' */ - positionStrategy?: 'absolute' | 'fixed'; + positionMethod?: 'absolute' | 'fixed'; /** * The side of the anchor element that the popover element should be placed at. * @default 'bottom' diff --git a/packages/mui-base/src/PreviewCard/Positioner/PreviewCardPositioner.tsx b/packages/mui-base/src/PreviewCard/Positioner/PreviewCardPositioner.tsx index da77b72fc9..8c0f2c4ce6 100644 --- a/packages/mui-base/src/PreviewCard/Positioner/PreviewCardPositioner.tsx +++ b/packages/mui-base/src/PreviewCard/Positioner/PreviewCardPositioner.tsx @@ -29,7 +29,7 @@ const PreviewCardPositioner = React.forwardRef(function PreviewCardPositioner( render, className, anchor, - positionStrategy = 'absolute', + positionMethod = 'absolute', side = 'bottom', alignment = 'center', sideOffset = 0, @@ -50,7 +50,7 @@ const PreviewCardPositioner = React.forwardRef(function PreviewCardPositioner( const positioner = usePreviewCardPositioner({ anchor: anchor || triggerElement, floatingRootContext, - positionStrategy, + positionMethod, container, open, mounted, @@ -214,7 +214,7 @@ PreviewCardPositioner.propTypes /* remove-proptypes */ = { * The CSS position strategy for positioning the preview card popup element. * @default 'absolute' */ - positionStrategy: PropTypes.oneOf(['absolute', 'fixed']), + positionMethod: PropTypes.oneOf(['absolute', 'fixed']), /** * A function to customize rendering of the component. */ diff --git a/packages/mui-base/src/PreviewCard/Positioner/usePreviewCardPositioner.ts b/packages/mui-base/src/PreviewCard/Positioner/usePreviewCardPositioner.ts index 30d6ada6da..3a9991d890 100644 --- a/packages/mui-base/src/PreviewCard/Positioner/usePreviewCardPositioner.ts +++ b/packages/mui-base/src/PreviewCard/Positioner/usePreviewCardPositioner.ts @@ -83,7 +83,7 @@ export namespace usePreviewCardPositioner { * The CSS position strategy for positioning the preview card popup element. * @default 'absolute' */ - positionStrategy?: 'absolute' | 'fixed'; + positionMethod?: 'absolute' | 'fixed'; /** * The container element to which the preview card popup will be appended to. */ diff --git a/packages/mui-base/src/Tooltip/Positioner/TooltipPositioner.tsx b/packages/mui-base/src/Tooltip/Positioner/TooltipPositioner.tsx index 712a170780..76e9e0542e 100644 --- a/packages/mui-base/src/Tooltip/Positioner/TooltipPositioner.tsx +++ b/packages/mui-base/src/Tooltip/Positioner/TooltipPositioner.tsx @@ -32,7 +32,7 @@ const TooltipPositioner = React.forwardRef(function TooltipPositioner( anchor, container, keepMounted = false, - positionStrategy = 'absolute', + positionMethod = 'absolute', side = 'top', alignment = 'center', sideOffset = 0, @@ -57,7 +57,7 @@ const TooltipPositioner = React.forwardRef(function TooltipPositioner( const positioner = useTooltipPositioner({ anchor: anchor || triggerElement, floatingRootContext, - positionStrategy, + positionMethod, open, keepMounted, side, @@ -219,7 +219,7 @@ TooltipPositioner.propTypes /* remove-proptypes */ = { * The CSS position strategy for positioning the tooltip element. * @default 'absolute' */ - positionStrategy: PropTypes.oneOf(['absolute', 'fixed']), + positionMethod: PropTypes.oneOf(['absolute', 'fixed']), /** * A function to customize rendering of the component. */ diff --git a/packages/mui-base/src/Tooltip/Positioner/useTooltipPositioner.ts b/packages/mui-base/src/Tooltip/Positioner/useTooltipPositioner.ts index d733a0af70..55ef351f98 100644 --- a/packages/mui-base/src/Tooltip/Positioner/useTooltipPositioner.ts +++ b/packages/mui-base/src/Tooltip/Positioner/useTooltipPositioner.ts @@ -79,7 +79,7 @@ export namespace useTooltipPositioner { * The CSS position strategy for positioning the tooltip element. * @default 'absolute' */ - positionStrategy?: 'absolute' | 'fixed'; + positionMethod?: 'absolute' | 'fixed'; /** * The side of the anchor element that the tooltip element should be placed at. * @default 'top' diff --git a/packages/mui-base/src/utils/useAnchorPositioning.ts b/packages/mui-base/src/utils/useAnchorPositioning.ts index 55fd04438d..b5d468fa5f 100644 --- a/packages/mui-base/src/utils/useAnchorPositioning.ts +++ b/packages/mui-base/src/utils/useAnchorPositioning.ts @@ -31,7 +31,7 @@ interface UseAnchorPositioningParameters { | (() => Element | VirtualElement | null) | React.MutableRefObject | null; - positionStrategy?: 'absolute' | 'fixed'; + positionMethod?: 'absolute' | 'fixed'; side?: Side; sideOffset?: number; alignment?: 'start' | 'center' | 'end'; @@ -72,7 +72,7 @@ export function useAnchorPositioning( const { anchor, floatingRootContext, - positionStrategy = 'absolute', + positionMethod = 'absolute', side = 'top', sideOffset = 0, alignment = 'center', @@ -198,7 +198,7 @@ export function useAnchorPositioning( rootContext: floatingRootContext, placement, middleware, - strategy: positionStrategy, + strategy: positionMethod, whileElementsMounted: keepMounted || !trackAnchor ? undefined : autoUpdate, nodeId, });