From 3d81d8d9a763c1071a98b5d5fdccc28cd3304eae Mon Sep 17 00:00:00 2001 From: Francis Terrero Date: Wed, 4 Mar 2026 23:52:40 -0400 Subject: [PATCH 1/2] feat: improve Tooltip accessibility, API, and maintainability - Add ARIA support (role, aria-describedby, aria-hidden) and keyboard handling (focus/blur, Escape to dismiss) - Add new props: content, delayShowInMs, tooltipClassName, titleClassName, animation - Rename delayInMs to delayHideInMs for clarity - Allow hovering tooltip bubble when delayHideInMs is set - Extract position config into a constant and refactor show/hide logic - Replace lineHeight hack with flex layout - Update tests to use data-testid and role queries --- package.json | 2 +- src/components/copyable/Copyable.tsx | 2 +- src/components/tooltip/Tooltip.tsx | 233 ++++++++++++------ .../tooltip/__test__/Tooltip.test.tsx | 89 +++---- .../__snapshots__/Tooltip.test.tsx.snap | 34 +-- .../components/tooltip/Tooltip.stories.tsx | 2 +- 6 files changed, 221 insertions(+), 141 deletions(-) diff --git a/package.json b/package.json index 1971667..38bf600 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@internxt/ui", - "version": "0.1.9", + "version": "0.1.10", "description": "Library of Internxt components", "repository": { "type": "git", diff --git a/src/components/copyable/Copyable.tsx b/src/components/copyable/Copyable.tsx index 578c55b..3a2b878 100644 --- a/src/components/copyable/Copyable.tsx +++ b/src/components/copyable/Copyable.tsx @@ -53,7 +53,7 @@ const Copyable = ({ className="ml-6" popsFrom="bottom" title={justCopied ? copiedText : copyToClipboardText} - delayInMs={justCopied ? 500 : undefined} + delayHideInMs={justCopied ? 500 : undefined} >