From f715af531f6eccc6fc4ea0962271e93d0ebc5235 Mon Sep 17 00:00:00 2001 From: Taylor Jones Date: Wed, 12 Jun 2024 08:08:28 -0500 Subject: [PATCH] fix(definitiontooltip): update alignment options to match popover (#16737) --- .../__snapshots__/PublicAPI-test.js.snap | 8 ++++++ .../components/Tooltip/DefinitionTooltip.tsx | 26 +++++++++++++------ 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap b/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap index 60b019f0a0a8..e7e99169d66d 100644 --- a/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap +++ b/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap @@ -2712,6 +2712,14 @@ Map { "right", "right-bottom", "right-top", + "top-start", + "top-end", + "bottom-start", + "bottom-end", + "left-end", + "left-start", + "right-end", + "right-start", ], ], "type": "oneOf", diff --git a/packages/react/src/components/Tooltip/DefinitionTooltip.tsx b/packages/react/src/components/Tooltip/DefinitionTooltip.tsx index b98bb56c24cc..22574c824ab6 100644 --- a/packages/react/src/components/Tooltip/DefinitionTooltip.tsx +++ b/packages/react/src/components/Tooltip/DefinitionTooltip.tsx @@ -138,20 +138,30 @@ DefinitionTooltip.propTypes = { */ align: PropTypes.oneOf([ 'top', - 'top-left', - 'top-right', + 'top-left', // deprecated use top-start instead + 'top-right', // deprecated use top-end instead 'bottom', - 'bottom-left', - 'bottom-right', + 'bottom-left', // deprecated use bottom-start instead + 'bottom-right', // deprecated use bottom-end instead 'left', - 'left-bottom', - 'left-top', + 'left-bottom', // deprecated use left-end instead + 'left-top', // deprecated use left-start instead 'right', - 'right-bottom', - 'right-top', + 'right-bottom', // deprecated use right-end instead + 'right-top', // deprecated use right-start instead + + // new values to match floating-ui + 'top-start', + 'top-end', + 'bottom-start', + 'bottom-end', + 'left-end', + 'left-start', + 'right-end', + 'right-start', ]), /**