Skip to content

Commit 3c08c6f

Browse files
katiegeorgeKatie George
andauthored
chore: Adds exports to index files (#115)
Co-authored-by: Katie George <[email protected]>
1 parent d83de23 commit 3c08c6f

File tree

6 files changed

+13
-4
lines changed

6 files changed

+13
-4
lines changed

src/dom/__tests__/node-belongs.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
// SPDX-License-Identifier: Apache-2.0
33

4-
import { nodeBelongs } from '../node-belongs';
4+
import nodeBelongs from '../node-belongs';
55

66
describe('nodeBelongs', () => {
77
let div: HTMLDivElement;

src/dom/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33

44
export { default as findUpUntil } from './find-up-until';
55
export { default as nodeContains } from './node-contains';
6+
export { default as nodeBelongs } from './node-belongs';

src/dom/node-belongs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { isHTMLElement, isNode } from './element-types';
1212
* @param container Container node
1313
* @param target Node that is checked to be a descendant of the container
1414
*/
15-
export function nodeBelongs(container: Node | null, target: Node | EventTarget | null): boolean {
15+
export default function nodeBelongs(container: Node | null, target: Node | EventTarget | null): boolean {
1616
if (!isNode(target)) {
1717
return false;
1818
}

src/internal/index.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,11 @@ export {
2828
export { useFocusVisible } from './focus-visible';
2929
export { KeyCode, isModifierKey } from './keycode';
3030
export { getGlobalFlag } from './global-flags';
31+
export {
32+
SingleTabStopNavigationAPI,
33+
SingleTabStopNavigationProvider,
34+
useSingleTabStopNavigation,
35+
} from './single-tab-stop';
36+
export { isFocusable, getAllFocusables, getFirstFocusable, getLastFocusable } from './focus-lock-utils/utils';
37+
export { default as handleKey } from './utils/handle-key';
38+
export { default as circleIndex } from './utils/circle-index';

src/internal/single-tab-stop/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import React, {
1111
useState,
1212
} from 'react';
1313

14-
import { nodeBelongs } from '../../dom/node-belongs';
14+
import nodeBelongs from '../../dom/node-belongs';
1515

1616
export type FocusableChangeHandler = (isFocusable: boolean) => void;
1717

src/internal/utils/circle-index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// SPDX-License-Identifier: Apache-2.0
33

44
// Returns given index if it is in range or the opposite range boundary otherwise.
5-
export function circleIndex(index: number, [from, to]: [number, number]): number {
5+
export default function circleIndex(index: number, [from, to]: [number, number]): number {
66
if (index < from) {
77
return to;
88
}

0 commit comments

Comments
 (0)