Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/calcite-components/src/core/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import type { FocusTrap } from "focus-trap";

const config: { trapStack: FocusTrap[] } = { trapStack: [] };

export default config;
1 change: 1 addition & 0 deletions packages/calcite-components/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
// this file was added as a workaround to force the build to export `getAssetPath`,
// which enables developers to check if the asset path has been set or not
export { getAssetPath } from "@stencil/core";
export * as config from "./core/config";
4 changes: 2 additions & 2 deletions packages/calcite-components/src/utils/focusTrapComponent.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { createFocusTrap, FocusTrap as _FocusTrap, Options as FocusTrapOptions } from "focus-trap";
import { FocusableElement, focusElement, tabbableOptions } from "./dom";

const trapStack: _FocusTrap[] = [];
import config from "../core/config";
const { trapStack } = config;

/**
* Defines interface for components with a focus trap. Focusable content is required for components implementing focus trapping with this interface.
Expand Down