From 0bf6783d00ea8c12343517b4cfd83a98447a0dd4 Mon Sep 17 00:00:00 2001 From: Alexey Date: Fri, 27 Sep 2024 00:46:23 +0800 Subject: [PATCH] CB-5446 chore: keyboard navigation improvements (#2935) * chore: keyboard navigation improvements * CB-5446 chore: use theme color for outline --------- Co-authored-by: Evgenia Bezborodova <139753579+EvgeniaBzzz@users.noreply.github.com> --- .../packages/core-blocks/src/IconButton.tsx | 2 +- webapp/packages/core-blocks/src/Menu/Menu.tsx | 2 + .../core-blocks/src/TextPlaceholder.tsx | 7 +- .../core-blocks/src/ToolsPanel/ToolsPanel.tsx | 10 +- .../src/Tree/TreeNode/TreeNodeControl.tsx | 3 +- webapp/packages/core-blocks/src/index.ts | 1 + .../src/useListKeyboardNavigation.ts | 100 ++++++++++++++++++ .../src/styles/main/normalize.pure.css | 45 +++++--- .../src/ContextMenu/MenuBar/MenuBar.tsx | 6 +- .../src/ContextMenu/MenuBar/MenuBarItem.tsx | 8 +- .../core-ui/src/Tabs/Tab/Tab.module.css | 3 +- .../src/Tabs/Tab/TabUnderline.module.css | 1 - .../core-ui/src/Tabs/TabList.module.css | 1 - .../src/Tabs/TabListVertical.module.css | 1 - .../Tabs/TabListVerticalRotated.module.css | 1 - .../core-ui/src/Tabs/TabPanel.module.css | 1 - .../core-ui/src/Tabs/TabsBox/TabsBox.tsx | 2 +- .../TabsBox/shared/TabsBoxTabPanel.module.css | 1 - .../core-view/src/View/CaptureView.module.css | 2 +- .../src/DataGrid/DataGridTable.tsx | 5 +- .../src/DataPresentationService.ts | 4 +- .../src/TableViewer/DataPresentation.tsx | 9 +- .../TableViewer/TableFooter/TableFooter.tsx | 7 +- .../TableFooterMenu/TableFooterMenu.tsx | 6 +- .../TableViewer/TableHeader/TableHeader.tsx | 6 +- .../TablePresentationBar.tsx | 6 +- .../src/TableViewer/TableStatistics.tsx | 7 +- .../src/TableViewer/TableViewer.module.css | 10 ++ .../src/TableViewer/TableViewer.tsx | 18 +++- .../NavigationTabsBar/NavigationTabsBar.tsx | 1 - .../ElementsTree/ElementsTree.tsx | 6 +- .../TreeNodeMenu/TreeNodeMenu.module.css | 1 + .../src/TopNavBar/shared/TopMenu.module.css | 2 +- .../shared/TopMenuBarItem.module.css | 2 +- .../TopNavBar/shared/TopMenuItem.module.css | 2 +- 35 files changed, 227 insertions(+), 62 deletions(-) create mode 100644 webapp/packages/core-blocks/src/useListKeyboardNavigation.ts diff --git a/webapp/packages/core-blocks/src/IconButton.tsx b/webapp/packages/core-blocks/src/IconButton.tsx index 06e673a620..c246243b63 100644 --- a/webapp/packages/core-blocks/src/IconButton.tsx +++ b/webapp/packages/core-blocks/src/IconButton.tsx @@ -30,7 +30,7 @@ export const IconButton: React.FC = observer(function IconButto const Button = tag ?? ReakitButton; return ( -