Skip to content

Commit

Permalink
remove unused import
Browse files Browse the repository at this point in the history
  • Loading branch information
k-egor-smirnov committed Sep 23, 2022
1 parent a91f214 commit a5b0d64
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
5 changes: 3 additions & 2 deletions src/components/FocusTrap/FocusTrap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useExternRef } from "../../hooks/useExternRef";
import { useGlobalEventListener } from "../../hooks/useGlobalEventListener";
import { useTimeout } from "../../hooks/useTimeout";
import {
FOCUSABLE_ELEMENTS_QUERY,
FOCUSABLE_ELEMENTS_LIST,
Keys,
pressedKey,
} from "../../lib/accessibility";
Expand All @@ -12,6 +12,7 @@ import { useIsomorphicLayoutEffect } from "../../lib/useIsomorphicLayoutEffect";
import { HasComponent, HasRootRef } from "../../types";
import { AppRootContext } from "../AppRoot/AppRootContext";

const FOCUSABLE_ELEMENTS: string = FOCUSABLE_ELEMENTS_LIST.join();
export interface FocusTrapProps
extends React.AllHTMLAttributes<HTMLElement>,
HasRootRef<HTMLElement>,
Expand Down Expand Up @@ -69,7 +70,7 @@ export const FocusTrap = ({
const nodes: HTMLElement[] = [];
Array.prototype.forEach.call(
// eslint-disable-next-line no-restricted-properties
ref.current.querySelectorAll(FOCUSABLE_ELEMENTS_QUERY),
ref.current.querySelectorAll(FOCUSABLE_ELEMENTS),
(focusableEl: Element) => {
const { display, visibility } = window!.getComputedStyle(focusableEl);

Expand Down
6 changes: 4 additions & 2 deletions src/components/Tabs/Tabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { withAdaptivity, AdaptivityProps } from "../../hoc/withAdaptivity";
import { warnOnce } from "../../lib/warnOnce";
import { useGlobalEventListener } from "../../hooks/useGlobalEventListener";
import { useDOM } from "../../lib/dom";
import { FOCUSABLE_ELEMENTS_QUERY, pressedKey } from "../../lib/accessibility";
import { pressedKey } from "../../lib/accessibility";
import "./Tabs.css";

export interface TabsProps
Expand Down Expand Up @@ -78,7 +78,9 @@ const TabsComponent = ({

return Array.from(
// eslint-disable-next-line
tabsRef.current.querySelectorAll<HTMLDivElement>("[role=tab]:not([disabled])")
tabsRef.current.querySelectorAll<HTMLDivElement>(
"[role=tab]:not([disabled])"
)
);
}

Expand Down
1 change: 0 additions & 1 deletion src/components/TabsItem/TabsItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { useAdaptivity } from "../../hooks/useAdaptivity";
import { TabsModeContext, TabsContextProps } from "../Tabs/Tabs";
import { Headline } from "../Typography/Headline/Headline";
import { Subhead } from "../Typography/Subhead/Subhead";
import { Text } from "../Typography/Text/Text";
import { warnOnce } from "../../lib/warnOnce";
import "./TabsItem.css";

Expand Down
1 change: 0 additions & 1 deletion src/lib/accessibility.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ export const FOCUSABLE_ELEMENTS_LIST = [
"[contenteditable]",
'[tabindex]:not([tabindex="-1"])',
];
export const FOCUSABLE_ELEMENTS_QUERY: string = FOCUSABLE_ELEMENTS_LIST.join();

export enum Keys {
ENTER = "Enter",
Expand Down

0 comments on commit a5b0d64

Please sign in to comment.